]> granicus.if.org Git - linux-pam/blobdiff - configure.in
Relevant BUGIDs:
[linux-pam] / configure.in
index f265b835dc4195cace9e5df6c4987fda25737ef4..08f1b4a4bb61bc4464c747b276c15cfa9cd494ea 100644 (file)
@@ -1,6 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(conf/pam_conv1/pam_conv.y)
-AM_INIT_AUTOMAKE("Linux-PAM", 0.99.4.0)
+AC_INIT(conf/pam_conv1/pam_conv_y.y)
+AM_INIT_AUTOMAKE("Linux-PAM", 0.99.6.3)
+AC_PREREQ([2.60])
 AM_CONFIG_HEADER(config.h)
 AC_CANONICAL_HOST
 
@@ -67,10 +68,14 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
+AM_PROG_CC_C_O
+PAM_LD_AS_NEEDED
+PAM_LD_O1
 
-# Largefile support
+dnl Largefile support
 AC_SYS_LARGEFILE
 
+dnl icc claims to be GCC compatible, but use other flags for warnings
 if eval "test x$GCC = xyes -a $CC != icc"; then
   for flag in \
       -W \
@@ -90,6 +95,7 @@ if eval "test x$GCC = xyes -a $CC != icc"; then
     JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
   done
 fi
+dnl icc has special warning flags
 if eval "test x$CC = xicc"; then
   for flag in \
       -Wall \
@@ -166,8 +172,10 @@ AM_CONDITIONAL([HAVE_VERSIONING],
 dnl
 dnl check for -fPIE/-pie support
 dnl
+dnl icc handles -fpie as -fp without error, so blacklist icc
+dnl
 AC_ARG_ENABLE(pie,AS_HELP_STRING([--disable-pie],
-                        [Disable position-independent executeables (PIE)]),
+                        [disable position-independent executeables (PIE)]),
         USE_PIE=$enableval, USE_PIE=yes)
 
 AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
@@ -217,12 +225,12 @@ AC_ARG_ENABLE([debug],
 AC_SUBST(WITH_DEBUG)
 
 AC_ARG_ENABLE(securedir,
-[  --enable-securedir=<path to location of PAMs> [default \$libdir/security]],
+       AC_HELP_STRING([--enable-securedir=DIR],[path to location of PAMs @<:@default=$libdir/security@:>@]),
        SECUREDIR=$enableval, SECUREDIR=$libdir/security)
 AC_SUBST(SECUREDIR)
 
 AC_ARG_ENABLE([isadir],
-       AC_HELP_STRING([--enable-isadir=DIR],[path to arch-specific module files [default ../../`basename $libdir`/security]]),
+       AC_HELP_STRING([--enable-isadir=DIR],[path to arch-specific module files @<:@default=../../(basename of $libdir)/security@:>@]),
 ISA=$enableval,
 ISA=../../`basename $libdir`/security)
 unset mylibdirbase
@@ -230,25 +238,19 @@ AC_DEFINE_UNQUOTED(_PAM_ISA,"$ISA",[Define to the path, relative to SECUREDIR, w
 AC_MSG_RESULT([Defining \$ISA to "$ISA"])
 
 AC_ARG_ENABLE(sconfigdir,
-[  --enable-sconfigdir=<path to module conf files> [default \$sysconfdir/security]],
+       AC_HELP_STRING([--enable-sconfigdir=DIR],[path to module conf files @<:@default=$sysconfdir/security@:>@]),
        SCONFIGDIR=$enableval, SCONFIGDIR=$sysconfdir/security)
 AC_SUBST(SCONFIGDIR)
 
-AC_ARG_ENABLE(docdir,
-[  --enable-docdir=<path to store documentation in - /usr/share/doc/pam>],
-       DOCDIR=$enableval, DOCDIR=/usr/share/doc/pam)
-AC_SUBST(DOCDIR)
-
-
 AC_ARG_ENABLE(pamlocking,
-[  --enable-pamlocking      configure libpam to observe a global authentication lock],
+       AC_HELP_STRING([--enable-pamlocking],[configure libpam to observe a global authentication lock]),
        WITH_PAMLOCKING=yes ; AC_DEFINE([PAM_LOCKING],,
                [libpam should observe a global authentication lock]),
                WITH_PAMLOCKING=no)
 AC_SUBST(WITH_PAMLOCKING)
 
 AC_ARG_ENABLE(read-both-confs,
-[  --enable-read-both-confs  read both /etc/pam.d and /etc/pam.conf files],
+       AC_HELP_STRING([--enable-read-both-confs],[read both /etc/pam.d and /etc/pam.conf files]),
        AC_DEFINE([PAM_READ_BOTH_CONFS],,
                [read both /etc/pam.d and /etc/pam.conf files]))
 AC_SUBST(PAM_READ_BOTH_CONFS)
@@ -305,18 +307,34 @@ dnl Checks for the existence of libdl - on BSD and Tru64 its part of libc
 AC_CHECK_LIB([dl], [dlopen], LIBDL="-ldl", LIBDL="")
 AC_SUBST(LIBDL)
 
-AC_CHECK_LIB([crack], [FascistCheck], LIBCRACK="-lcrack", LIBCRACK="")
+# Check for cracklib
+AC_ARG_ENABLE([cracklib],
+        AC_HELP_STRING([--disable-cracklib],[do not use cracklib]),
+        WITH_CRACKLIB=$enableval, WITH_CRACKLIB=yes)
+if test x"$WITH_CRACKLIB" != xno ; then
+        AC_CHECK_HEADER([crack.h],
+              AC_CHECK_LIB([crack], [FascistCheck], LIBCRACK="-lcrack", LIBCRACK=""))
+else
+       LIBCRACK=""
+fi
 AC_SUBST(LIBCRACK)
 AM_CONDITIONAL([HAVE_LIBCRACK], [test ! -z "$LIBCRACK"])
 
 dnl Look for Linux Auditing library - see documentation
-AC_CHECK_HEADER([libaudit.h],
-  [AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")]
-)
-AC_SUBST(LIBAUDIT)
-if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
-    AC_DEFINE([HAVE_LIBAUDIT], 1, [Defined if audit support should be compiled in])
+AC_ARG_ENABLE([audit],
+        AC_HELP_STRING([--disable-audit],[do not enable audit support]),
+        WITH_LIBAUDIT=$enableval, WITH_LIBAUDIT=yes)
+if test x"$WITH_LIBAUDIT" != xno ; then
+        AC_CHECK_HEADER([libaudit.h],
+              [AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")]
+        )
+        if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
+            AC_DEFINE([HAVE_LIBAUDIT], 1, [Defined if audit support should be compiled in])
+        fi
+else
+       LIBAUDIT=""
 fi
+AC_SUBST(LIBAUDIT)
 
 BACKUP_LIBS=$LIBS
 AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
@@ -325,17 +343,24 @@ AC_SUBST(LIBCRYPT)
 
 dnl check for libdb or libndbm as fallback. Some libndbm compat
 dnl libraries are unuseable, so try libdb first.
-AC_CHECK_LIB([db], [db_create], LIBDB="-ldb", LIBDB="")
-if test -z "$LIBDB" ; then
-    AC_CHECK_LIB([db], [dbm_store], LIBDB="-ldb", LIBDB="")
-fi
-if test -z "$LIBDB" ; then
-    AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="")
-    if test ! -z "$LIBDB" ; then
-        AC_CHECK_HEADERS(ndbm.h)
-    fi
-else
-    AC_CHECK_HEADERS(db.h)
+AC_ARG_ENABLE([db],
+        AC_HELP_STRING([--enable-db=(db|ndbm|yes|no)],[Default behavior 'yes', which is to check for libdb first, followed by ndbm. Use 'no' to disable db support.]),
+        WITH_DB=$enableval, WITH_DB=yes)
+if test x"$WITH_DB" != xno ; then
+        if test x"$WITH_DB" = xyes -o x"$WITH_DB" = xdb ; then
+              AC_CHECK_LIB([db], [db_create], LIBDB="-ldb", LIBDB="")
+              if test -z "$LIBDB" ; then
+                  AC_CHECK_LIB([db], [dbm_store], LIBDB="-ldb", LIBDB="")
+              fi
+        fi
+        if test -z "$LIBDB" ; then
+            AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="")
+            if test ! -z "$LIBDB" ; then
+                AC_CHECK_HEADERS(ndbm.h)
+            fi
+        else
+            AC_CHECK_HEADERS(db.h)
+        fi
 fi
 AC_SUBST(LIBDB)
 AM_CONDITIONAL([HAVE_LIBDB], [test ! -z "$LIBDB"])
@@ -346,14 +371,19 @@ AC_CHECK_FUNCS(yp_get_default_domain)
 LIBS=$BACKUP_LIBS
 AC_SUBST(LIBNSL)
 
-AC_CHECK_LIB([selinux],[getfilecon], LIBSELINUX="-lselinux", LIBSELINUX="")
+AC_ARG_ENABLE([selinux],
+        AC_HELP_STRING([--disable-selinux],[do not use SELinux]),
+        WITH_SELINUX=$enableval, WITH_SELINUX=yes)
+if test "$WITH_SELINUX" == "yes" ; then
+  AC_CHECK_LIB([selinux],[getfilecon], LIBSELINUX="-lselinux", LIBSELINUX="")
+else
+  LIBSELINUX=""
+fi
 AC_SUBST(LIBSELINUX)
 AM_CONDITIONAL([HAVE_LIBSELINUX], [test ! -z "$LIBSELINUX"])
-
-dnl Checks for Libcap
-AC_CHECK_LIB([cap], [cap_get_proc], LIBCAP="-lcap", LIBCAP="" )
-AC_SUBST(LIBCAP)
-AM_CONDITIONAL([HAVE_LIBCAP], [test ! -z "$LIBCAP"])
+if test ! -z "$LIBSELINUX" ; then
+    AC_DEFINE([WITH_SELINUX], 1, [Defined if SE Linux support is compiled in])
+fi
 
 dnl Checks for header files.
 AC_HEADER_DIRENT
@@ -362,7 +392,6 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h sys/fsuid.h inittypes.h)
 
 AC_CHECK_HEADERS(crypt.h)
-AC_CHECK_HEADERS(crack.h)
 
 dnl For module/pam_lastlog
 AC_CHECK_HEADERS(lastlog.h utmp.h utmpx.h)
@@ -386,30 +415,10 @@ AC_CHECK_FUNCS(fseeko gethostname gettimeofday lckpwdf mkdir select)
 AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
 AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
 AC_CHECK_FUNCS(getgrouplist getline getdelim)
-AC_CHECK_FUNCS(inet_ntop inet_pton)
-
-dnl Checks for programs/utilities
-AC_CHECK_PROG(SGML2PS, sgml2ps, yes, no)
-AC_CHECK_PROG(SGML2TXT, sgml2txt, yes, no)
-AC_CHECK_PROG(SGML2HTML, sgml2html, yes, no)
-AC_CHECK_PROG(SGML2LATEX, sgml2latex, yes, no)
-AC_CHECK_PROG(PS2PDF, ps2pdf, yes, no)
-AM_CONDITIONAL([HAVE_SGML2PS], [test "$SGML2PS" = yes || test "$SGML2LATEX" = yes])
-AM_CONDITIONAL([HAVE_SGML2TXT], [test "$SGML2TXT" = yes])
-AM_CONDITIONAL([HAVE_SGML2HTML], [test "$SGML2HTML" = yes])
-AM_CONDITIONAL([HAVE_PS2PDF], [test "$PS2PDF" = yes])
-if test $SGML2LATEX = "yes" ; then
-  if sgml2latex -h | grep -e --paper | grep  ' -p ' > /dev/null ; then
-    PSER="sgml2latex -o ps"
-  else
-    PSER="sgml2latex -p"
-  fi
-else
-  if test $SGML2PS = yes ; then
-    PSER="sgml2ps"
-  fi
-fi
-AC_SUBST(PSER)
+AC_CHECK_FUNCS(inet_ntop inet_pton ruserok_af)
+
+AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no])
+AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes])
 
 dnl
 dnl Check for xsltproc
@@ -421,8 +430,8 @@ if test -z "$XSLTPROC"; then
 fi
 AC_PATH_PROG([XMLLINT], [xmllint],[/bin/true])
 dnl check for DocBook DTD and stylesheets in the local catalog.
-JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.3//EN],
-                [DocBook XML DTD V4.3], [], enable_man=no)
+JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.4//EN],
+                [DocBook XML DTD V4.4], [], enable_man=no)
 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
                 [DocBook XSL Stylesheets], [], enable_man=no)
 
@@ -433,7 +442,10 @@ else
      enable_man=no
 fi
 
+AC_PATH_PROG([FO2PDF], [fop])
+
 AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test x$enable_man != xno)
+AM_CONDITIONAL(ENABLE_GENERATE_PDF, test ! -z "$FO2PDF")
 
 
 AM_GNU_GETTEXT_VERSION
@@ -450,6 +462,29 @@ AH_VERBATIM([_ZZENABLE_NLS],
 #define N_(msgid) msgid
 #endif /* ENABLE_NLS */])
 
+dnl
+dnl Check for the availability of the kernel key management facility
+dnl - The pam_keyinit module only requires the syscalls, not the error codes
+dnl
+have_key_syscalls=0
+AC_CHECK_DECL(__NR_keyctl, [have_key_syscalls=1],,[#include <sys/syscall.h>])
+have_key_errors=0
+AC_CHECK_DECL(ENOKEY, [have_key_errors=1])
+
+HAVE_KEY_MANAGEMENT=0
+if test $have_key_syscalls$have_key_errors = 11
+then
+       HAVE_KEY_MANAGEMENT=1
+fi
+
+if test $HAVE_KEY_MANAGEMENT = 1; then
+   AC_DEFINE([HAVE_KEY_MANAGEMENT], 1,
+            [Defined if the kernel key management facility is available])
+fi
+AC_SUBST([HAVE_KEY_MANAGEMENT], $HAVE_KEY_MANAGEMENT)
+
+AM_CONDITIONAL([HAVE_KEY_MANAGEMENT], [test "$have_key_syscalls" = 1])
+
 dnl Files to be created from when we run configure
 AC_OUTPUT(Makefile libpam/Makefile libpamc/Makefile libpamc/test/Makefile \
        libpam_misc/Makefile conf/Makefile conf/pam_conv1/Makefile \
@@ -458,12 +493,15 @@ AC_OUTPUT(Makefile libpam/Makefile libpamc/Makefile libpamc/test/Makefile \
        modules/pam_access/Makefile modules/pam_cracklib/Makefile \
         modules/pam_debug/Makefile modules/pam_deny/Makefile \
        modules/pam_echo/Makefile modules/pam_env/Makefile \
+       modules/pam_faildelay/Makefile \
        modules/pam_filter/Makefile modules/pam_filter/upperLOWER/Makefile \
        modules/pam_ftp/Makefile modules/pam_group/Makefile \
-       modules/pam_issue/Makefile modules/pam_lastlog/Makefile \
-       modules/pam_limits/Makefile modules/pam_listfile/Makefile \
-       modules/pam_localuser/Makefile modules/pam_mail/Makefile \
+       modules/pam_issue/Makefile modules/pam_keyinit/Makefile \
+       modules/pam_lastlog/Makefile modules/pam_limits/Makefile \
+       modules/pam_listfile/Makefile modules/pam_localuser/Makefile \
+       modules/pam_loginuid/Makefile modules/pam_mail/Makefile \
        modules/pam_mkhomedir/Makefile modules/pam_motd/Makefile \
+       modules/pam_namespace/Makefile \
        modules/pam_nologin/Makefile modules/pam_permit/Makefile \
        modules/pam_rhosts/Makefile \
        modules/pam_rootok/Makefile modules/pam_exec/Makefile \
@@ -474,4 +512,6 @@ AC_OUTPUT(Makefile libpam/Makefile libpamc/Makefile libpamc/test/Makefile \
        modules/pam_unix/Makefile modules/pam_userdb/Makefile \
        modules/pam_warn/Makefile modules/pam_wheel/Makefile \
        modules/pam_xauth/Makefile doc/Makefile doc/specs/Makefile \
-       doc/man/Makefile examples/Makefile tests/Makefile)
+       doc/man/Makefile doc/sag/Makefile doc/adg/Makefile \
+       doc/mwg/Makefile examples/Makefile tests/Makefile \
+       xtests/Makefile)