Changeset 430
- Timestamp:
- 03/09/10 17:52:12 (5 months ago)
- Files:
-
- 1 modified
-
trunk/configure.ac (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r428 r430 1 1 dnl $Id$ 2 2 3 AC_PREREQ( 2.59)3 AC_PREREQ([2.62]) 4 4 AC_REVISION([$Id$]) 5 AC_INIT([OpenPAM], [trunk],[des@des.no])5 AC_INIT([OpenPAM], [trunk], [des@des.no]) 6 6 AC_CONFIG_SRCDIR([lib/pam_start.c]) 7 7 AC_CONFIG_MACRO_DIR([m4]) … … 9 9 AM_CONFIG_HEADER([config.h]) 10 10 11 # C compiler and features 12 AC_LANG(C) 13 AC_PROG_CC 14 AC_PROG_CC_STDC 15 AC_PROG_CPP 16 AC_GNU_SOURCE 17 AC_C_CONST 18 AC_C_RESTRICT 19 AC_C_VOLATILE 20 21 # libtool 11 22 LT_PREREQ([2.2.6]) 12 23 LT_INIT([disable-static dlopen]) 13 24 14 AC_LANG(C) 15 AC_C_VOLATILE 16 17 AC_PROG_CC 18 AC_PROG_CC_STDC 19 AC_PROG_CPP 25 # other programs 20 26 AC_PROG_INSTALL 21 27 … … 24 30 AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number]) 25 31 26 AC_ARG_ENABLE( debug,32 AC_ARG_ENABLE([debug], 27 33 AC_HELP_STRING([--enable-debug], 28 34 [turn debugging on by default]), 29 35 AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default])) 30 36 31 AC_MSG_CHECKING([whether loading unversioned modules support is enabled]) 32 AC_ARG_ENABLE(unversioned-modules, 37 AC_ARG_ENABLE([unversioned-modules], 33 38 AC_HELP_STRING([--disable-unversioned-modules], 34 39 [support loading of unversioned modules]), 35 [ if test "$enableval" = "no"; then40 [AS_IF([test x"$enableval" = x"no"], [ 36 41 AC_DEFINE(DISABLE_UNVERSIONED_MODULES, 37 42 1, 38 43 [Whether loading unversioned modules support is disabled]) 39 fi 40 AC_MSG_RESULT(no)], 41 AC_MSG_RESULT(yes)) 44 ])]) 42 45 43 AC_MSG_CHECKING([for modules directory support]) 44 AC_ARG_WITH(modules-dir, 46 AC_ARG_WITH([modules-dir], 45 47 AC_HELP_STRING([--with-modules-dir=DIR], 46 48 [OpenPAM modules directory]), 47 [ if test "$withval" != "no"; then49 [AS_IF([test x"$withval" != x"no"], [ 48 50 OPENPAM_MODULES_DIR="$withval" 49 51 AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR, 50 52 "$OPENPAM_MODULES_DIR", 51 53 [OpenPAM modules directory]) 52 AC_MSG_RESULT($OPENPAM_MODULES_DIR) 53 else 54 ], [ 54 55 OPENPAM_MODULES_DIR="$libdir" 55 AC_MSG_RESULT(no) 56 fi], 57 [OPENPAM_MODULES_DIR="$libdir" 58 AC_MSG_RESULT(no)]) 56 ])], 57 [OPENPAM_MODULES_DIR="$libdir"]) 59 58 AC_SUBST(OPENPAM_MODULES_DIR) 60 59 61 AC_MSG_CHECKING([whether to build the documentation]) 62 AC_ARG_WITH(doc, 63 AC_HELP_STRING([--with-doc], 64 [build documentation]), 65 , 60 AC_ARG_WITH([doc], 61 AC_HELP_STRING([--with-doc], [build documentation]), 62 [], 66 63 [with_doc=yes]) 67 A C_MSG_RESULT($with_doc)64 AM_CONDITIONAL([WITH_DOC], [test x"$with_doc" = x"yes"]) 68 65 69 AC_MSG_CHECKING([whether to build example version of pam_unix.so]) 70 AC_ARG_WITH(pam-unix, 71 AC_HELP_STRING([--with-pam-unix], 72 [compile example version of pam_unix.so]), 73 , 66 AC_ARG_WITH([pam-unix], 67 AC_HELP_STRING([--with-pam-unix], [compile example version of pam_unix.so]), 68 [], 74 69 [with_pam_unix=no]) 75 A C_MSG_RESULT($with_pam_unix)70 AM_CONDITIONAL([WITH_PAM_UNIX], [test x"$with_pam_unix" = x"yes"]) 76 71 77 AC_MSG_CHECKING([whether to build example version of su(1)])78 72 AC_ARG_WITH(su, 79 AC_HELP_STRING([--with-su], 80 [compile example version of su(1)]), 81 , 73 AC_HELP_STRING([--with-su], [compile example version of su(1)]), 74 [], 82 75 [with_su=no]) 83 A C_MSG_RESULT($with_su)76 AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"]) 84 77 85 AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes") 86 AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes") 87 AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes") 78 AC_CHECK_HEADERS([crypt.h]) 88 79 89 AC_CHECK_ HEADERS(crypt.h)80 AC_CHECK_FUNCS([fpurge]) 90 81 91 AC_CHECK_FUNCS(fpurge) 92 93 DL_LIBS= 94 AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl) 82 saved_LIBS="${LIBS}" 83 LIBS="" 84 AC_CHECK_LIB([dl], [dlopen]) 85 DL_LIBS="${LIBS}" 86 LIBS="${saved_LIBS}" 95 87 AC_SUBST(DL_LIBS) 96 88 97 CRYPT_LIBS= 98 AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt) 89 saved_LIBS="${LIBS}" 90 LIBS="" 91 AC_CHECK_LIB([crypt], [crypt]) 92 CRYPT_LIBS="${LIBS}" 93 LIBS="${saved_LIBS}" 99 94 AC_SUBST(CRYPT_LIBS) 100 95 101 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" 102 103 AC_ARG_ENABLE(developer-warnings, 104 AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), 105 CFLAGS="${CFLAGS} -Wall -Wextra") 106 AC_ARG_ENABLE(debugging-symbols, 107 AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), 108 CFLAGS="${CFLAGS} -O0 -g -fno-inline") 109 AC_ARG_ENABLE(werror, 110 AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), 111 CFLAGS="${CFLAGS} -Werror") 96 AC_ARG_ENABLE([developer-warnings], 97 AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]), 98 [CFLAGS="${CFLAGS} -Wall -Wextra"]) 99 AC_ARG_ENABLE([debugging-symbols], 100 AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]), 101 [CFLAGS="${CFLAGS} -O0 -g -fno-inline"]) 102 AC_ARG_ENABLE([werror], 103 AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]), 104 [CFLAGS="${CFLAGS} -Werror"]) 112 105 113 106 AC_CONFIG_FILES([