source: openpam/trunk/configure.ac @ 684

Last change on this file since 684 was 684, checked in by Dag-Erling Smørgrav, 8 years ago

OPENPAM_DEBUG (--enable-debug) has a double action: it enables the
debugging macros, and sets the initial value of openpam_debug to 1.
This effectively gives the user a choice between no debugging at all,
or drowning in debugging messages from every part of the system.

Assuming that the primary use case for debugging is to allow admins to
troubleshoot their policies by adding the debug option to selected
pam.conf entries, remove the initialization of openpam_debug to 1.
This allows integrators to ship OpenPAM with OPENPAM_DEBUG defined
without spamming /var/log.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1dnl $Id: configure.ac 684 2013-04-14 15:44:32Z des $
2
3AC_PREREQ([2.62])
4AC_REVISION([$Id: configure.ac 684 2013-04-14 15:44:32Z des $])
5AC_INIT([OpenPAM], [trunk], [des@des.no])
6AC_CONFIG_SRCDIR([lib/libpam/pam_start.c])
7AC_CONFIG_MACRO_DIR([m4])
8AM_INIT_AUTOMAKE([foreign])
9AM_CONFIG_HEADER([config.h])
10
11# C compiler and features
12AC_LANG(C)
13AC_PROG_CC
14AC_PROG_CC_STDC
15AC_PROG_CPP
16AC_GNU_SOURCE
17AC_C_CONST
18AC_C_RESTRICT
19AC_C_VOLATILE
20
21# libtool
22LT_PREREQ([2.2.6])
23LT_INIT([disable-static dlopen])
24
25# other programs
26AC_PROG_INSTALL
27
28LIB_MAJ=2
29AC_SUBST(LIB_MAJ)
30AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
31
32AC_ARG_ENABLE([debug],
33    AC_HELP_STRING([--enable-debug],
34        [turn debugging macros on]),
35    AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging macros on]))
36
37AC_ARG_ENABLE([unversioned-modules],
38    AC_HELP_STRING([--disable-unversioned-modules],
39        [support loading of unversioned modules]),
40    [AS_IF([test x"$enableval" = x"no"], [
41        AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
42            1,
43            [Whether loading unversioned modules support is disabled])
44    ])])
45
46AC_ARG_WITH([modules-dir],
47    AC_HELP_STRING([--with-modules-dir=DIR],
48        [OpenPAM modules directory]),
49    [AS_IF([test x"$withval" != x"no"], [
50        OPENPAM_MODULES_DIR="$withval"
51    ], [
52        OPENPAM_MODULES_DIR="$libdir"
53    ])],
54    [OPENPAM_MODULES_DIR="$libdir"])
55AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
56    "${OPENPAM_MODULES_DIR%/}/",
57    [OpenPAM modules directory])
58AC_SUBST(OPENPAM_MODULES_DIR)
59
60AC_ARG_WITH([doc],
61    AC_HELP_STRING([--without-doc], [do not build documentation]),
62    [],
63    [with_doc=yes])
64AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" = x"yes"])
65
66AC_ARG_WITH([pam-unix],
67    AC_HELP_STRING([--with-pam-unix], [compile sample pam_unix(8) module]),
68    [],
69    [with_pam_unix=no])
70AM_CONDITIONAL([WITH_PAM_UNIX], [test x"$with_pam_unix" = x"yes"])
71
72AC_ARG_WITH([oath],
73    AC_HELP_STRING([--with-oath], [compile OATH library, module and utility]),
74    [],
75    [with_oath=no])
76AM_CONDITIONAL([WITH_OATH], [test x"$with_oath" = x"yes"])
77
78AC_ARG_WITH(pamtest,
79    AC_HELP_STRING([--with-pamtest], [compile test application]),
80    [],
81    [with_pamtest=no])
82AM_CONDITIONAL([WITH_PAMTEST], [test x"$with_pamtest" = x"yes"])
83
84AC_ARG_WITH(su,
85    AC_HELP_STRING([--with-su], [compile sample su(1) implementation]),
86    [],
87    [with_su=no])
88AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
89
90AC_CHECK_HEADERS([crypt.h])
91
92AC_CHECK_FUNCS([asprintf vasprintf])
93AC_CHECK_FUNCS([dlfunc fdlopen])
94AC_CHECK_FUNCS([fpurge])
95AC_CHECK_FUNCS([setlogmask])
96AC_CHECK_FUNCS([strlcat strlcmp strlcpy])
97
98saved_LIBS="${LIBS}"
99LIBS=""
100AC_CHECK_LIB([dl], [dlopen])
101DL_LIBS="${LIBS}"
102LIBS="${saved_LIBS}"
103AC_SUBST(DL_LIBS)
104
105saved_LIBS="${LIBS}"
106LIBS=""
107AC_CHECK_LIB([crypt], [crypt])
108CRYPT_LIBS="${LIBS}"
109LIBS="${saved_LIBS}"
110AC_SUBST(CRYPT_LIBS)
111
112saved_LIBS="${LIBS}"
113LIBS=""
114AC_CHECK_LIB([crypto], [HMAC_CTX_init])
115CRYPTO_LIBS="${LIBS}"
116LIBS="${saved_LIBS}"
117AC_SUBST(CRYPTO_LIBS)
118
119AC_ARG_ENABLE([developer-warnings],
120    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
121    [CFLAGS="${CFLAGS} -Wall -Wextra"])
122AC_ARG_ENABLE([debugging-symbols],
123    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
124    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
125AC_ARG_ENABLE([werror],
126    AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
127    [CFLAGS="${CFLAGS} -Werror"])
128
129AC_CONFIG_FILES([
130    Makefile
131    bin/Makefile
132    bin/openpam_dump_policy/Makefile
133    bin/pamtest/Makefile
134    bin/su/Makefile
135    doc/Makefile
136    doc/man/Makefile
137    include/Makefile
138    include/security/Makefile
139    lib/Makefile
140    lib/liboath/Makefile
141    lib/libpam/Makefile
142    modules/Makefile
143    modules/pam_deny/Makefile
144    modules/pam_permit/Makefile
145    modules/pam_unix/Makefile
146    modules/pam_oath/Makefile
147    t/Makefile
148])
149AC_CONFIG_FILES([pamgdb],[chmod +x pamgdb])
150AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.