source: openpam/trunk/configure.ac @ 387

Last change on this file since 387 was 387, checked in by des, 8 years ago

fix cut'n'paste nit in previous commit.

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1dnl $Id$
2
3AC_PREREQ(2.53)
4AC_INIT([OpenPAM],[20050616],[des@freebsd.org],[openpam])
5AC_CONFIG_SRCDIR([lib/pam_start.c])
6AM_CONFIG_HEADER([config.h])
7
8AC_CANONICAL_SYSTEM
9AC_C_VOLATILE
10AC_DISABLE_STATIC
11AC_PROG_LIBTOOL
12AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
13
14LIB_MAJ=2
15AC_SUBST(LIB_MAJ)
16AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
17
18AC_ARG_ENABLE(debug,
19        AC_HELP_STRING([--enable-debug],
20                [turn debugging on by default]),
21        AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
22
23AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
24AC_ARG_ENABLE(unversioned-modules,
25        AC_HELP_STRING([--disable-unversioned-modules],
26                [support loading of unversioned modules]),
27        [if test "$enableval" = "no"; then
28                AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
29                        1,
30                        [Whether loading unversioned modules support is disabled])
31        fi
32        AC_MSG_RESULT(no)],
33        AC_MSG_RESULT(yes))
34
35AC_MSG_CHECKING([for modules directory support])
36AC_ARG_WITH(modules-dir,
37        AC_HELP_STRING([--with-modules-dir=DIR],
38                [OpenPAM modules directory]),
39        [if test "$withval" != "no"; then
40                OPENPAM_MODULES_DIR="$withval"
41                AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
42                        "$OPENPAM_MODULES_DIR",
43                        [OpenPAM modules directory])
44                AC_MSG_RESULT($OPENPAM_MODULES_DIR)
45        else
46                OPENPAM_MODULES_DIR="$libdir"
47                AC_MSG_RESULT(no)
48        fi],
49        [OPENPAM_MODULES_DIR="$libdir"
50        AC_MSG_RESULT(no)])
51AC_SUBST(OPENPAM_MODULES_DIR)
52
53AC_MSG_CHECKING([whether to build the documentation])
54AC_ARG_WITH(doc,
55        AC_HELP_STRING([--with-doc],
56                [build documentation]),
57        ,
58        [with_doc=yes])
59AC_MSG_RESULT($with_doc)
60
61AC_MSG_CHECKING([whether to build example version of pam_unix.so])
62AC_ARG_WITH(pam-unix,
63        AC_HELP_STRING([--with-pam-unix],
64                [compile example version of pam_unix.so]),
65        ,
66        [with_pam_unix=no])
67AC_MSG_RESULT($with_pam_unix)
68
69AC_MSG_CHECKING([whether to build example version of su(1)])
70AC_ARG_WITH(su,
71        AC_HELP_STRING([--with-su],
72                [compile example version of su(1)]),
73        ,
74        [with_su=no])
75AC_MSG_RESULT($with_su)
76
77AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes")
78AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
79AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes")
80
81AC_PROG_INSTALL
82
83AC_CHECK_HEADERS(crypt.h)
84
85AC_CHECK_FUNCS(fpurge)
86
87DL_LIBS=
88AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
89AC_SUBST(DL_LIBS)
90
91CRYPT_LIBS=
92AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
93AC_SUBST(CRYPT_LIBS)
94
95CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
96AC_SUBST(CPPFLAGS)
97
98CFLAGS="$CFLAGS -Werror"
99AC_SUBST(CFLAGS)
100
101AC_CONFIG_FILES([
102        bin/Makefile
103        bin/su/Makefile
104        include/Makefile
105        include/security/Makefile
106        lib/Makefile
107        modules/Makefile
108        modules/pam_unix/Makefile
109        modules/pam_deny/Makefile
110        modules/pam_permit/Makefile
111        doc/Makefile
112        doc/man/Makefile
113        Makefile
114])
115AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.