source: openpam/trunk/configure.ac @ 623

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

WIP: OATH module

  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1dnl $Id: configure.ac 623 2013-02-25 07:24:51Z des $
2
3AC_PREREQ([2.62])
4AC_REVISION([$Id: configure.ac 623 2013-02-25 07:24:51Z des $])
5AC_INIT([OpenPAM], [trunk], [des@des.no])
6AC_CONFIG_SRCDIR([lib/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 on by default]),
35    AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
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([pam-oath],
73    AC_HELP_STRING([--with-pam-oath], [compile pam_oath(8) module]),
74    [],
75    [with_pam_oath=no])
76AM_CONDITIONAL([WITH_PAM_OATH], [test x"$with_pam_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 fdlopen fpurge strlcat strlcmp strlcpy vasprintf])
93
94saved_LIBS="${LIBS}"
95LIBS=""
96AC_CHECK_LIB([dl], [dlopen])
97DL_LIBS="${LIBS}"
98LIBS="${saved_LIBS}"
99AC_SUBST(DL_LIBS)
100
101saved_LIBS="${LIBS}"
102LIBS=""
103AC_CHECK_LIB([crypt], [crypt])
104CRYPT_LIBS="${LIBS}"
105LIBS="${saved_LIBS}"
106AC_SUBST(CRYPT_LIBS)
107
108saved_LIBS="${LIBS}"
109LIBS=""
110AC_CHECK_LIB([crypto], [OpenSSL_add_all_algorithms])
111CRYPTO_LIBS="${LIBS}"
112LIBS="${saved_LIBS}"
113AC_SUBST(CRYPTO_LIBS)
114
115AC_ARG_ENABLE([developer-warnings],
116    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
117    [CFLAGS="${CFLAGS} -Wall -Wextra"])
118AC_ARG_ENABLE([debugging-symbols],
119    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
120    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
121AC_ARG_ENABLE([werror],
122    AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
123    [CFLAGS="${CFLAGS} -Werror"])
124
125AC_CONFIG_FILES([
126    Makefile
127    bin/Makefile
128    bin/openpam_dump_policy/Makefile
129    bin/pamtest/Makefile
130    bin/su/Makefile
131    doc/Makefile
132    doc/man/Makefile
133    include/Makefile
134    include/security/Makefile
135    lib/Makefile
136    modules/Makefile
137    modules/pam_deny/Makefile
138    modules/pam_permit/Makefile
139    modules/pam_unix/Makefile
140    modules/pam_oath/Makefile
141    t/Makefile
142])
143AC_CONFIG_FILES([pamgdb],[chmod +x pamgdb])
144AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.