source: openpam/trunk/configure.ac

Last change on this file was 780, checked in by des, 5 months ago

Rudimentary key management tool.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1dnl $Id$
2
3AC_PREREQ([2.62])
4AC_REVISION([$Id$])
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([oath],
71    AC_HELP_STRING([--without-oath], [do not build OATH library, module and utility]),
72    [],
73    [with_oath=yes])
74AM_CONDITIONAL([WITH_OATH], [test x"$with_oath" = x"yes"])
75
76AC_ARG_WITH(pamtest,
77    AC_HELP_STRING([--with-pamtest], [build test application]),
78    [],
79    [with_pamtest=no])
80AM_CONDITIONAL([WITH_PAMTEST], [test x"$with_pamtest" = x"yes"])
81
82AC_ARG_WITH(su,
83    AC_HELP_STRING([--with-su], [build sample su(1) implementation]),
84    [],
85    [with_su=no])
86AM_CONDITIONAL([WITH_SU], [test x"$with_su" = 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])
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
117AC_ARG_ENABLE([developer-warnings],
118    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
119    [CFLAGS="${CFLAGS} -Wall -Wextra"])
120AC_ARG_ENABLE([debugging-symbols],
121    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
122    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
123AC_ARG_ENABLE([werror],
124    AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
125    [CFLAGS="${CFLAGS} -Werror"])
126
127AC_CONFIG_FILES([
128    Makefile
129    bin/Makefile
130    bin/oathkey/Makefile
131    bin/openpam_dump_policy/Makefile
132    bin/pamtest/Makefile
133    bin/su/Makefile
134    doc/Makefile
135    doc/man/Makefile
136    include/Makefile
137    include/security/Makefile
138    lib/Makefile
139    lib/liboath/Makefile
140    lib/libpam/Makefile
141    modules/Makefile
142    modules/pam_deny/Makefile
143    modules/pam_permit/Makefile
144    modules/pam_unix/Makefile
145    modules/pam_oath/Makefile
146    t/Makefile
147])
148AC_CONFIG_FILES([pamgdb],[chmod +x pamgdb])
149AC_CONFIG_FILES([mkpkgng],[chmod +x mkpkgng])
150AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.