summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in5
-rw-r--r--libpam/pam_static_modules.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 15ff6dc1..cba05ee3 100644
--- a/configure.in
+++ b/configure.in
@@ -363,8 +363,11 @@ if test x"$WITH_CRACKLIB" != xno ; then
else
LIBCRACK=""
fi
+if test -n "$LIBCRACK"; then
+ AC_DEFINE([HAVE_LIBCRACK], [1], [Define to 1 if you have cracklib.])
+fi
AC_SUBST(LIBCRACK)
-AM_CONDITIONAL([HAVE_LIBCRACK], [test ! -z "$LIBCRACK"])
+AM_CONDITIONAL([HAVE_LIBCRACK], [test -n "$LIBCRACK"])
dnl Look for Linux Auditing library - see documentation
AC_ARG_ENABLE([audit],
diff --git a/libpam/pam_static_modules.h b/libpam/pam_static_modules.h
index 67d81359..b1739ed1 100644
--- a/libpam/pam_static_modules.h
+++ b/libpam/pam_static_modules.h
@@ -94,7 +94,9 @@ extern struct pam_module _pam_xauth_modstruct;
static struct pam_module *static_modules[] = {
&_pam_access_modstruct,
+#ifdef HAVE_LIBCRACK
&_pam_cracklib_modstruct,
+#endif
&_pam_debug_modstruct,
&_pam_deny_modstruct,
&_pam_echo_modstruct,