root/trunk/configure.ac @ 425

Revision 425, 3.1 KB (checked in by des, 11 months ago)

These days, -Wall -Wextra should suffice.

  • Property svn:keywords set to Id
Line 
1dnl $Id$
2
3AC_PREREQ(2.59)
4AC_REVISION([$Id$])
5AC_INIT([OpenPAM],[trunk],[des@des.no])
6AC_CONFIG_SRCDIR(lib/pam_start.c)
7AM_CONFIG_HEADER(config.h)
8
9AC_CANONICAL_SYSTEM
10AC_LANG(C)
11AC_C_VOLATILE
12AC_DISABLE_STATIC
13AC_PROG_LIBTOOL
14AM_INIT_AUTOMAKE
15
16LIB_MAJ=2
17AC_SUBST(LIB_MAJ)
18AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
19
20AC_ARG_ENABLE(debug,
21        AC_HELP_STRING([--enable-debug],
22                [turn debugging on by default]),
23        AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
24
25AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
26AC_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,
31                        1,
32                        [Whether loading unversioned modules support is disabled])
33        fi
34        AC_MSG_RESULT(no)],
35        AC_MSG_RESULT(yes))
36
37AC_MSG_CHECKING([for modules directory support])
38AC_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)
47        else
48                OPENPAM_MODULES_DIR="$libdir"
49                AC_MSG_RESULT(no)
50        fi],
51        [OPENPAM_MODULES_DIR="$libdir"
52        AC_MSG_RESULT(no)])
53AC_SUBST(OPENPAM_MODULES_DIR)
54
55AC_MSG_CHECKING([whether to build the documentation])
56AC_ARG_WITH(doc,
57        AC_HELP_STRING([--with-doc],
58                [build documentation]),
59        ,
60        [with_doc=yes])
61AC_MSG_RESULT($with_doc)
62
63AC_MSG_CHECKING([whether to build example version of pam_unix.so])
64AC_ARG_WITH(pam-unix,
65        AC_HELP_STRING([--with-pam-unix],
66                [compile example version of pam_unix.so]),
67        ,
68        [with_pam_unix=no])
69AC_MSG_RESULT($with_pam_unix)
70
71AC_MSG_CHECKING([whether to build example version of su(1)])
72AC_ARG_WITH(su,
73        AC_HELP_STRING([--with-su],
74                [compile example version of su(1)]),
75        ,
76        [with_su=no])
77AC_MSG_RESULT($with_su)
78
79AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes")
80AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
81AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes")
82
83AC_PROG_INSTALL
84
85AC_CHECK_HEADERS(crypt.h)
86
87AC_CHECK_FUNCS(fpurge)
88
89DL_LIBS=
90AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
91AC_SUBST(DL_LIBS)
92
93CRYPT_LIBS=
94AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
95AC_SUBST(CRYPT_LIBS)
96
97CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
98
99AC_ARG_ENABLE(developer-warnings,
100        AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
101        CFLAGS="${CFLAGS} -Wall -Wextra")
102AC_ARG_ENABLE(debugging-symbols,
103        AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
104        CFLAGS="${CFLAGS} -O0 -g -fno-inline")
105AC_ARG_ENABLE(werror,
106        AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
107        CFLAGS="${CFLAGS} -Werror")
108
109AC_CONFIG_FILES([
110        bin/Makefile
111        bin/su/Makefile
112        include/Makefile
113        include/security/Makefile
114        lib/Makefile
115        modules/Makefile
116        modules/pam_unix/Makefile
117        modules/pam_deny/Makefile
118        modules/pam_permit/Makefile
119        doc/Makefile
120        doc/man/Makefile
121        Makefile
122])
123AC_OUTPUT
Note: See TracBrowser for help on using the browser.