diff options
author | Johannes Nixdorf <mixi@shadowice.org> | 2019-01-22 19:17:55 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2019-04-02 12:16:53 +0200 |
commit | 68628af004ec878b87ece147f0a951cda5a8c7ac (patch) | |
tree | 34ceb16e5f4c031cfec4acd754d0dc8181069e12 | |
parent | 24b1741940c50a81b5914cc2b71a189f15a708ef (diff) | |
download | util-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.ac | 5 |
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 |