1 dnl $Id: configure.ac,v 1.1.1.2 2008/01/27 00:54:47 christos Exp $
4 AC_REVISION([$Id: configure.ac,v 1.1.1.2 2008/01/27 00:54:47 christos Exp $])
5 AC_INIT([OpenPAM],[20071221],[des@des.no])
6 AC_CONFIG_SRCDIR(lib/pam_start.c)
7 AM_CONFIG_HEADER(config.h)
18 AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
21 AC_HELP_STRING([--enable-debug],
22 [turn debugging on by default]),
23 AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
25 AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
26 AC_ARG_ENABLE(unversioned-modules,
27 AC_HELP_STRING([--disable-unversioned-modules],
28 [support loading of unversioned modules]),
29 [if test "$enableval" = "no"; then
30 AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
32 [Whether loading unversioned modules support is disabled])
37 AC_MSG_CHECKING([for modules directory support])
38 AC_ARG_WITH(modules-dir,
39 AC_HELP_STRING([--with-modules-dir=DIR],
40 [OpenPAM modules directory]),
41 [if test "$withval" != "no"; then
42 OPENPAM_MODULES_DIR="$withval"
43 AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
44 "$OPENPAM_MODULES_DIR",
45 [OpenPAM modules directory])
46 AC_MSG_RESULT($OPENPAM_MODULES_DIR)
48 OPENPAM_MODULES_DIR="$libdir"
51 [OPENPAM_MODULES_DIR="$libdir"
53 AC_SUBST(OPENPAM_MODULES_DIR)
55 AC_MSG_CHECKING([whether to build the documentation])
57 AC_HELP_STRING([--with-doc],
58 [build documentation]),
61 AC_MSG_RESULT($with_doc)
63 AC_MSG_CHECKING([whether to build example version of pam_unix.so])
65 AC_HELP_STRING([--with-pam-unix],
66 [compile example version of pam_unix.so]),
69 AC_MSG_RESULT($with_pam_unix)
71 AC_MSG_CHECKING([whether to build example version of su(1)])
73 AC_HELP_STRING([--with-su],
74 [compile example version of su(1)]),
77 AC_MSG_RESULT($with_su)
79 AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes")
80 AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
81 AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes")
85 AC_CHECK_HEADERS(crypt.h)
87 AC_CHECK_FUNCS(fpurge)
90 AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
94 AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
97 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
99 # This corresponds to FreeBSD's WARNS level 6
100 DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
102 AC_ARG_ENABLE(developer-warnings,
103 AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
104 CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
105 AC_ARG_ENABLE(debugging-symbols,
106 AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
107 CFLAGS="${CFLAGS} -O0 -g -fno-inline")
108 AC_ARG_ENABLE(werror,
109 AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
110 CFLAGS="${CFLAGS} -Werror")
116 include/security/Makefile
119 modules/pam_unix/Makefile
120 modules/pam_deny/Makefile
121 modules/pam_permit/Makefile