source: openpam/trunk/configure.ac @ 909

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

Remove experimental code that was accidentally committed in r908

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1dnl $Id: configure.ac 909 2017-01-20 08:13:20Z des $
2
3AC_PREREQ([2.62])
4AC_REVISION([$Id: configure.ac 909 2017-01-20 08:13:20Z des $])
5AC_INIT([OpenPAM], [trunk], [des@des.no], [openpam], [http://www.openpam.org/])
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        AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
52            "${OPENPAM_MODULES_DIR%/}",
53            [OpenPAM modules directory])
54    ])])
55AC_SUBST(OPENPAM_MODULES_DIR)
56AM_CONDITIONAL([CUSTOM_MODULES_DIR], [test x"$OPENPAM_MODULES_DIR" != x""])
57
58AC_ARG_WITH([doc],
59    AC_HELP_STRING([--without-doc], [do not build documentation]),
60    [],
61    [with_doc=yes])
62AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" = x"yes"])
63
64AC_ARG_WITH([pam-unix],
65    AC_HELP_STRING([--with-pam-unix], [build sample pam_unix(8) module]),
66    [],
67    [with_pam_unix=no])
68AM_CONDITIONAL([WITH_PAM_UNIX], [test x"$with_pam_unix" = x"yes"])
69
70AC_ARG_WITH(pamtest,
71    AC_HELP_STRING([--with-pamtest], [build test application]),
72    [],
73    [with_pamtest=no])
74AM_CONDITIONAL([WITH_PAMTEST], [test x"$with_pamtest" = x"yes"])
75
76AC_ARG_WITH(su,
77    AC_HELP_STRING([--with-su], [build sample su(1) implementation]),
78    [],
79    [with_su=no])
80AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
81
82AC_ARG_WITH(system-libpam,
83    AC_HELP_STRING([--with-system-libpam], [use system libpam]),
84    [],
85    [with_system_libpam=no])
86AM_CONDITIONAL([WITH_SYSTEM_LIBPAM], [test x"$with_system_libpam" = x"yes"])
87
88AC_CHECK_HEADERS([crypt.h])
89
90AC_CHECK_FUNCS([asprintf vasprintf])
91AC_CHECK_FUNCS([dlfunc fdlopen])
92AC_CHECK_FUNCS([fpurge])
93AC_CHECK_FUNCS([setlogmask])
94AC_CHECK_FUNCS([strlcat strlcmp strlcpy strlset])
95
96saved_LIBS="${LIBS}"
97LIBS=""
98AC_CHECK_LIB([dl], [dlopen])
99DL_LIBS="${LIBS}"
100LIBS="${saved_LIBS}"
101AC_SUBST(DL_LIBS)
102
103saved_LIBS="${LIBS}"
104LIBS=""
105AC_CHECK_LIB([crypt], [crypt])
106CRYPT_LIBS="${LIBS}"
107LIBS="${saved_LIBS}"
108AC_SUBST(CRYPT_LIBS)
109
110saved_LIBS="${LIBS}"
111LIBS=""
112AC_CHECK_LIB([crypto], [HMAC_CTX_init])
113CRYPTO_LIBS="${LIBS}"
114LIBS="${saved_LIBS}"
115AC_SUBST(CRYPTO_LIBS)
116
117saved_LIBS="${LIBS}"
118LIBS=""
119AC_CHECK_LIB([pam], [pam_start])
120SYSTEM_LIBPAM="${LIBS}"
121LIBS="${saved_LIBS}"
122AC_SUBST(SYSTEM_LIBPAM)
123
124AC_ARG_ENABLE([developer-warnings],
125    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
126    [CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual"])
127AC_ARG_ENABLE([debugging-symbols],
128    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
129    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
130AC_ARG_ENABLE([werror],
131    AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
132    [CFLAGS="${CFLAGS} -Werror"])
133
134AC_CONFIG_FILES([
135    Makefile
136    bin/Makefile
137    bin/openpam_dump_policy/Makefile
138    bin/pamtest/Makefile
139    bin/su/Makefile
140    doc/Makefile
141    doc/man/Makefile
142    include/Makefile
143    include/security/Makefile
144    lib/Makefile
145    lib/libpam/Makefile
146    modules/Makefile
147    modules/pam_deny/Makefile
148    modules/pam_permit/Makefile
149    modules/pam_return/Makefile
150    modules/pam_unix/Makefile
151    t/Makefile
152])
153AC_CONFIG_FILES([mkpkgng],[chmod +x mkpkgng])
154AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.