From: Johannes Nixdorf Date: Tue, 22 Jan 2019 18:17:55 +0000 (+0100) Subject: build-sys: fix crypt() detection without -lcrypt X-Git-Tag: v2.33.2~32 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=68628af004ec878b87ece147f0a951cda5a8c7ac;p=thirdparty%2Futil-linux.git 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 --- diff --git a/configure.ac b/configure.ac index a24c6d8ab3..0353c0ca83 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