summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-08-07 19:34:38 +0000
committerGerald Carter <jerry@samba.org>2001-08-07 19:34:38 +0000
commitdb3ad910125ae077459205af6688d69ca7758e70 (patch)
treeffa4c93ca19ce85b683452973967a2fa9c9e8184 /source3/configure.in
parent64c24ebf6d0b159a744739cf14b1b45fd3dda01d (diff)
downloadsamba-db3ad910125ae077459205af6688d69ca7758e70.tar.gz
samba-db3ad910125ae077459205af6688d69ca7758e70.tar.bz2
samba-db3ad910125ae077459205af6688d69ca7758e70.zip
merge from 2.2
(This used to be commit a7bf5e2ab84e21198a22e893e8640710a9ba2f7b)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in27
1 files changed, 18 insertions, 9 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 12148d4078..8cc8b5d4cd 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1472,13 +1472,6 @@ exit(1);
fi
fi
-AC_CACHE_CHECK([for a crypt that needs truncated salt],samba_cv_HAVE_TRUNCATED_SALT,[
-AC_TRY_RUN([#include "${srcdir-.}/tests/crypttest.c"],
- samba_cv_HAVE_TRUNCATED_SALT=no,samba_cv_HAVE_TRUNCATED_SALT=yes,samba_cv_HAVE_TRUNCATED_SALT=cross)])
-if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
- AC_DEFINE(HAVE_TRUNCATED_SALT)
-fi
-
AC_CACHE_CHECK([for broken nisplus include files],samba_cv_BROKEN_NISPLUS_INCLUDE_FILES,[
AC_TRY_COMPILE([#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
@@ -1650,7 +1643,7 @@ AC_ARG_WITH(smbmount,
#################################################
# check for a PAM password database
-
+with_pam_for_crypt=no
AC_MSG_CHECKING(whether to use PAM password database)
AC_ARG_WITH(pam,
[ --with-pam Include PAM password database support
@@ -1660,6 +1653,7 @@ AC_ARG_WITH(pam,
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_PAM)
LIBS="$LIBS -lpam"
+ with_pam_for_crypt=yes
;;
*)
AC_MSG_RESULT(no)
@@ -1705,7 +1699,7 @@ AC_ARG_WITH(pam_smbpass,
###############################################
# test for where we get crypt() from, but only
# if not using PAM
-if test "$with_pam" != yes; then
+if test $with_pam_for_crypt = no; then
AC_CHECK_FUNCS(crypt)
if test x"$ac_cv_func_crypt" = x"no"; then
AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt";
@@ -1713,6 +1707,21 @@ if test x"$ac_cv_func_crypt" = x"no"; then
fi
fi
+##
+## moved after the check for -lcrypt in order to
+## ensure that the necessary libraries are included
+## check checking for truncated salt. Wrapped by the
+## $with_pam_for_crypt variable as above --jerry
+##
+if test $with_pam_for_crypt = no; then
+AC_CACHE_CHECK([for a crypt that needs truncated salt],samba_cv_HAVE_TRUNCATED_SALT,[
+AC_TRY_RUN([#include "${srcdir-.}/tests/crypttest.c"],
+ samba_cv_HAVE_TRUNCATED_SALT=no,samba_cv_HAVE_TRUNCATED_SALT=yes,samba_cv_HAVE_TRUNCATED_SALT=cross)])
+if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
+ AC_DEFINE(HAVE_TRUNCATED_SALT)
+fi
+fi
+
#################################################
# check for a TDB password database