source: openpam/trunk/configure.ac @ 455

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

Language tweaks.

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1dnl $Id: configure.ac 438 2011-09-13 12:29:25Z des $
2
3AC_PREREQ([2.62])
4AC_REVISION([$Id: configure.ac 438 2011-09-13 12:29:25Z 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        AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
52            "$OPENPAM_MODULES_DIR",
53            [OpenPAM modules directory])
54    ], [
55        OPENPAM_MODULES_DIR="$libdir"
56    ])],
57    [OPENPAM_MODULES_DIR="$libdir"])
58AC_SUBST(OPENPAM_MODULES_DIR)
59
60AC_ARG_WITH([doc],
61    AC_HELP_STRING([--with-doc], [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) implementation]),
68    [],
69    [with_pam_unix=no])
70AM_CONDITIONAL([WITH_PAM_UNIX], [test x"$with_pam_unix" = x"yes"])
71
72AC_ARG_WITH(su,
73    AC_HELP_STRING([--with-su], [compile sample su(1) implementation]),
74    [],
75    [with_su=no])
76AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
77
78AC_CHECK_HEADERS([crypt.h])
79
80AC_CHECK_FUNCS([fpurge])
81
82saved_LIBS="${LIBS}"
83LIBS=""
84AC_CHECK_LIB([dl], [dlopen])
85DL_LIBS="${LIBS}"
86LIBS="${saved_LIBS}"
87AC_SUBST(DL_LIBS)
88
89saved_LIBS="${LIBS}"
90LIBS=""
91AC_CHECK_LIB([crypt], [crypt])
92CRYPT_LIBS="${LIBS}"
93LIBS="${saved_LIBS}"
94AC_SUBST(CRYPT_LIBS)
95
96AC_ARG_ENABLE([developer-warnings],
97    AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
98    [CFLAGS="${CFLAGS} -Wall -Wextra"])
99AC_ARG_ENABLE([debugging-symbols],
100    AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
101    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
102AC_ARG_ENABLE([werror],
103    AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
104    [CFLAGS="${CFLAGS} -Werror"])
105
106AC_CONFIG_FILES([
107    bin/Makefile
108    bin/su/Makefile
109    include/Makefile
110    include/security/Makefile
111    lib/Makefile
112    modules/Makefile
113    modules/pam_unix/Makefile
114    modules/pam_deny/Makefile
115    modules/pam_permit/Makefile
116    doc/Makefile
117    doc/man/Makefile
118    Makefile
119])
120AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.