1dnl $P4: //depot/projects/openpam/configure.ac#2 $ 2 3AC_PREREQ(2.53) 4AC_INIT([OpenPAM],[20050201],[des@freebsd.org],[openpam]) 5AC_CONFIG_SRCDIR([lib/pam_start.c]) 6AM_CONFIG_HEADER([config.h]) 7 8AC_CANONICAL_SYSTEM 9AC_C_VOLATILE 10AC_DISABLE_STATIC 11AC_PROG_LIBTOOL 12AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) 13 14LIB_MAJ=2 15AC_SUBST(LIB_MAJ) 16AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number]) 17 18AC_MSG_CHECKING([whether loading unversioned modules support is enabled]) 19AC_ARG_ENABLE(unversioned-modules, 20 AC_HELP_STRING([--disable-unversioned-modules], 21 [support loading of unversioned modules]), 22 [if test "$enableval" = "no"; then 23 AC_DEFINE(DISABLE_UNVERSIONED_MODULES, 24 1, 25 [Whether loading unversioned modules support is disabled]) 26 fi 27 AC_MSG_RESULT(no)], 28 AC_MSG_RESULT(yes)) 29 30AC_MSG_CHECKING([for modules directory support]) 31AC_ARG_WITH(modules-dir, 32 AC_HELP_STRING([--with-modules-dir=DIR], 33 [OpenPAM modules directory]), 34 [if test "$withval" != "no"; then 35 OPENPAM_MODULES_DIR="$withval" 36 AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR, 37 "$OPENPAM_MODULES_DIR", 38 [OpenPAM modules directory]) 39 AC_MSG_RESULT($OPENPAM_MODULES_DIR) 40 else 41 OPENPAM_MODULES_DIR="$libdir" 42 AC_MSG_RESULT(no) 43 fi], 44 [OPENPAM_MODULES_DIR="$libdir" 45 AC_MSG_RESULT(no)]) 46AC_SUBST(OPENPAM_MODULES_DIR) 47 48AC_MSG_CHECKING([whether to build example version of /bin/su]) 49AC_ARG_WITH(pam-su, 50 AC_HELP_STRING([--with-pam-su], 51 [compile example version of /bin/su]), 52 , 53 [with_pam_su=no]) 54AC_MSG_RESULT($with_pam_su) 55 56AC_MSG_CHECKING([whether to build example version of pam_unix.so]) 57AC_ARG_WITH(pam-unix, 58 AC_HELP_STRING([--with-pam-unix], 59 [compile example version of pam_unix.so]), 60 , 61 [with_pam_unix=no]) 62AC_MSG_RESULT($with_pam_unix) 63 64AM_CONDITIONAL(WITH_PAM_SU, test "x$with_pam_su" = "xyes") 65AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes") 66 67AC_PROG_INSTALL 68 69AC_CHECK_HEADERS(crypt.h) 70 71AC_CHECK_FUNCS(fpurge) 72 73DL_LIBS= 74AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl) 75AC_SUBST(DL_LIBS) 76 77CRYPT_LIBS= 78AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt) 79AC_SUBST(CRYPT_LIBS) 80 81CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" 82AC_SUBST(CPPFLAGS) 83 84CFLAGS="$CFLAGS -Werror" 85AC_SUBST(CFLAGS) 86 87AC_CONFIG_FILES([bin/Makefile 88 bin/su/Makefile 89 include/Makefile 90 include/security/Makefile 91 lib/Makefile 92 modules/Makefile 93 modules/pam_unix/Makefile 94 modules/pam_deny/Makefile 95 modules/pam_permit/Makefile 96 doc/Makefile 97 doc/man/Makefile 98 Makefile]) 99AC_OUTPUT 100