1 dnl $P4: //depot/projects/openpam/configure.ac#2 $
4 AC_INIT([OpenPAM],[20050201],[des@freebsd.org],[openpam])
5 AC_CONFIG_SRCDIR([lib/pam_start.c])
6 AM_CONFIG_HEADER([config.h])
12 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
16 AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
18 AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
19 AC_ARG_ENABLE(unversioned-modules,
20 AC_HELP_STRING([--disable-unversioned-modules],
21 [support loading of unversioned modules]),
22 [if test "$enableval" = "no"; then
23 AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
25 [Whether loading unversioned modules support is disabled])
30 AC_MSG_CHECKING([for modules directory support])
31 AC_ARG_WITH(modules-dir,
32 AC_HELP_STRING([--with-modules-dir=DIR],
33 [OpenPAM modules directory]),
34 [if test "$withval" != "no"; then
35 OPENPAM_MODULES_DIR="$withval"
36 AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
37 "$OPENPAM_MODULES_DIR",
38 [OpenPAM modules directory])
39 AC_MSG_RESULT($OPENPAM_MODULES_DIR)
41 OPENPAM_MODULES_DIR="$libdir"
44 [OPENPAM_MODULES_DIR="$libdir"
46 AC_SUBST(OPENPAM_MODULES_DIR)
48 AC_MSG_CHECKING([whether to build example version of /bin/su])
50 AC_HELP_STRING([--with-pam-su],
51 [compile example version of /bin/su]),
54 AC_MSG_RESULT($with_pam_su)
56 AC_MSG_CHECKING([whether to build example version of pam_unix.so])
58 AC_HELP_STRING([--with-pam-unix],
59 [compile example version of pam_unix.so]),
62 AC_MSG_RESULT($with_pam_unix)
64 AM_CONDITIONAL(WITH_PAM_SU, test "x$with_pam_su" = "xyes")
65 AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
69 AC_CHECK_HEADERS(crypt.h)
71 AC_CHECK_FUNCS(fpurge)
74 AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
78 AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
81 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
84 CFLAGS="$CFLAGS -Werror"
87 AC_CONFIG_FILES([bin/Makefile
90 include/security/Makefile
93 modules/pam_unix/Makefile
94 modules/pam_deny/Makefile
95 modules/pam_permit/Makefile