dnl icc handles -fpie as -fp without error, so blacklist icc
dnl
AC_ARG_ENABLE(pie,AS_HELP_STRING([--disable-pie],
- [Disable position-independent executeables (PIE)]),
+ [disable position-independent executeables (PIE)]),
USE_PIE=$enableval, USE_PIE=yes)
AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
AC_CHECK_LIB([dl], [dlopen], LIBDL="-ldl", LIBDL="")
AC_SUBST(LIBDL)
-AC_CHECK_LIB([crack], [FascistCheck], LIBCRACK="-lcrack", LIBCRACK="")
+# Check for cracklib
+AC_ARG_ENABLE([cracklib],
+ AC_HELP_STRING([--disable-cracklib],[do not use cracklib]),
+ WITH_CRACKLIB=$enableval, WITH_CRACKLIB=yes)
+if test x"$WITH_CRACKLIB" != xno ; then
+ AC_CHECK_HEADER([crack.h],
+ AC_CHECK_LIB([crack], [FascistCheck], LIBCRACK="-lcrack", LIBCRACK=""))
+else
+ LIBCRACK=""
+fi
AC_SUBST(LIBCRACK)
AM_CONDITIONAL([HAVE_LIBCRACK], [test ! -z "$LIBCRACK"])
dnl Look for Linux Auditing library - see documentation
-AC_CHECK_HEADER([libaudit.h],
- [AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")]
-)
-AC_SUBST(LIBAUDIT)
-if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
- AC_DEFINE([HAVE_LIBAUDIT], 1, [Defined if audit support should be compiled in])
+AC_ARG_ENABLE([audit],
+ AC_HELP_STRING([--disable-audit],[do not enable audit support]),
+ WITH_LIBAUDIT=$enableval, WITH_LIBAUDIT=yes)
+if test x"$WITH_LIBAUDIT" != xno ; then
+ AC_CHECK_HEADER([libaudit.h],
+ [AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")]
+ )
+ if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
+ AC_DEFINE([HAVE_LIBAUDIT], 1, [Defined if audit support should be compiled in])
+ fi
+else
+ LIBAUDIT=""
fi
+AC_SUBST(LIBAUDIT)
BACKUP_LIBS=$LIBS
AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
dnl check for libdb or libndbm as fallback. Some libndbm compat
dnl libraries are unuseable, so try libdb first.
-AC_CHECK_LIB([db], [db_create], LIBDB="-ldb", LIBDB="")
-if test -z "$LIBDB" ; then
- AC_CHECK_LIB([db], [dbm_store], LIBDB="-ldb", LIBDB="")
-fi
-if test -z "$LIBDB" ; then
- AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="")
- if test ! -z "$LIBDB" ; then
- AC_CHECK_HEADERS(ndbm.h)
- fi
-else
- AC_CHECK_HEADERS(db.h)
+AC_ARG_ENABLE([db],
+ AC_HELP_STRING([--enable-db=(db|ndbm|yes|no)],[Default behavior 'yes', which is to check for libdb first, followed by ndbm. Use 'no' to disable db support.]),
+ WITH_DB=$enableval, WITH_DB=yes)
+if test x"$WITH_DB" != xno ; then
+ if test x"$WITH_DB" = xyes -o x"$WITH_DB" = xdb ; then
+ AC_CHECK_LIB([db], [db_create], LIBDB="-ldb", LIBDB="")
+ if test -z "$LIBDB" ; then
+ AC_CHECK_LIB([db], [dbm_store], LIBDB="-ldb", LIBDB="")
+ fi
+ fi
+ if test -z "$LIBDB" ; then
+ AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="")
+ if test ! -z "$LIBDB" ; then
+ AC_CHECK_HEADERS(ndbm.h)
+ fi
+ else
+ AC_CHECK_HEADERS(db.h)
+ fi
fi
AC_SUBST(LIBDB)
AM_CONDITIONAL([HAVE_LIBDB], [test ! -z "$LIBDB"])
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h sys/fsuid.h inittypes.h)
AC_CHECK_HEADERS(crypt.h)
-AC_CHECK_HEADERS(crack.h)
dnl For module/pam_lastlog
AC_CHECK_HEADERS(lastlog.h utmp.h utmpx.h)
fi
AC_PATH_PROG([FO2PDF], [fop])
-
+
AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test x$enable_man != xno)
AM_CONDITIONAL(ENABLE_GENERATE_PDF, test ! -z "$FO2PDF")