summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Nixdorf <mixi@shadowice.org>2019-01-22 19:17:55 +0100
committerKarel Zak <kzak@redhat.com>2019-04-02 12:16:53 +0200
commit68628af004ec878b87ece147f0a951cda5a8c7ac (patch)
tree34ceb16e5f4c031cfec4acd754d0dc8181069e12
parent24b1741940c50a81b5914cc2b71a189f15a708ef (diff)
downloadutil-linux-68628af004ec878b87ece147f0a951cda5a8c7ac.tar.gz
build-sys: fix crypt() detection without -lcrypt
The check tested whether code using crypt() links without -lcrypt, but didn't set have_crypt to yes if it succeeded. This fixes the check erroneously failing when compiling against musl libc. Signed-off-by: Johannes Nixdorf <mixi@shadowice.org>
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a24c6d8ab..0353c0ca8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -792,7 +792,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#endif
]], [[
char *c = crypt("abc","pw");
-]])],[],[
+]])],[
+ have_libcrypt=no
+ have_crypt=yes
+],[
LIBS="$LIBS -lcrypt"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_CRYPT_H