build-sys: fix crypt() detection without -lcrypt
PATCH 1/1 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 <[email protected]>
--- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
configure.ac +4 -1
@@ -798,7 +798,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
Signature · 1 line
2.20.1
Quoted 2 lines · Johannes Nixdorf
configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com