summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index a7ef6546425..4b8f30511c5 100644
--- a/configure.in
+++ b/configure.in
@@ -827,9 +827,8 @@ AC_CHECK_FUNC(yp_get_default_domain, ,
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
# This may get things to compile even if bind-8 is installed
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
-# For crypt() on Linux
-AC_CHECK_LIB(crypt, crypt)
-AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt]))
+# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
+AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
# For sem_xxx functions on Solaris 2.6
AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init))