From 68628af004ec878b87ece147f0a951cda5a8c7ac Mon Sep 17 00:00:00 2001 From: Johannes Nixdorf Date: Tue, 22 Jan 2019 19:17:55 +0100 Subject: [PATCH] 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 --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.2