]> granicus.if.org Git - linux-pam/blobdiff - configure.in
Relevant BUGIDs:
[linux-pam] / configure.in
index 91354aed16319737f2e1426f58466ee7a45bbed4..73734335cfda582ff802e47676ff356f3bcd7f2f 100644 (file)
@@ -9,7 +9,7 @@ dnl Release specific
 dnl
 
 LIBPAM_VERSION_MAJOR=0
-LIBPAM_VERSION_MINOR=76
+LIBPAM_VERSION_MINOR=78
 
 AC_SUBST(LIBPAM_VERSION_MAJOR)
 AC_SUBST(LIBPAM_VERSION_MINOR)
@@ -23,9 +23,11 @@ dnl
 AC_PREFIX_DEFAULT()
 
 dnl
-dnl Useful info (believed to be portable)
+dnl Useful info (believed to be portable) - in the future
+dnl the LOCALSRCDIR and LOCALOBJDIRs may be different
 dnl
 LOCALSRCDIR=`/bin/pwd`         ; AC_SUBST(LOCALSRCDIR)
+LOCALOBJDIR=`/bin/pwd`         ; AC_SUBST(LOCALOBJDIR)
 OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 AC_SUBST(OS)
 
@@ -37,29 +39,20 @@ CONF_CFLAGS=                        ; AC_SUBST(CONF_CFLAGS)
 MKDIR="mkdir -p"               ; AC_SUBST(MKDIR)
 
 SHLIBMODE=755                  ; AC_SUBST(SHLIBMODE)
+MANMODE=644                    ; AC_SUBST(MANMODE)
 
 dnl These are most likely platform specific - I think HPUX differs
 USESONAME=yes                  ; AC_SUBST(USESONAME)
-SOSWITCH=-soname               ; AC_SUBST(SOSWITCH)
+SOSWITCH='-Xlinker -soname     -Xlinker '      ; AC_SUBST(SOSWITCH)
 NEEDSONAME=no                  ; AC_SUBST(NEEDSONAME)
 LDCONFIG=/sbin/ldconfig                ; AC_SUBST(LDCONFIG)
 
-dnl ### Should enable this INSTALL detection.
-dnl ### Would need to distribute GNU's config.guess and config.sub
-dnl AC_PROG_INSTALL
-if test "$OS" = "aix"; then
-  INSTALL=/usr/ucb/install -c
-else
-  INSTALL=/usr/bin/install
-fi
-AC_SUBST(INSTALL)
-
 dnl Checks for programs.
 AC_PROG_CC
 dnl ### AC_PROG_CXX
 AC_PROG_YACC
 AC_PROG_LEX
-dnl AC_PROG_INSTALL
+AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
@@ -69,10 +62,15 @@ dnl
 
 dnl lots of debugging information goes to /tmp/pam-debug.log
 AC_ARG_ENABLE(debug,
-[  --enable-debug           qspecify you are building with debugging on],
+[  --enable-debug           specify you are building with debugging on],
        WITH_DEBUG=yes ; AC_DEFINE(DEBUG) , WITH_DEBUG=no)
 AC_SUBST(WITH_DEBUG)
 
+AC_ARG_ENABLE(memory-debug,
+[  --enable-memory-debug    specify you want every malloc etc. call tracked],
+       WITH_MEMORY_DEBUG=yes ; AC_DEFINE(MEMORY_DEBUG) , WITH_MEMORY_DEBUG=no)
+AC_SUBST(WITH_MEMORY_DEBUG)
+
 dnl build specially named libraries (for debugging purposes)
 AC_ARG_ENABLE(libdebug,
 [  --enable-libdebug        specify you are building debugging libraries],
@@ -104,6 +102,16 @@ AC_ARG_ENABLE(includedir,
        INCLUDEDIR=$enableval, INCLUDEDIR=/usr/include)
 AC_SUBST(INCLUDEDIR)
 
+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(mandir,
+[  --enable-mandir=<path to store manuals in - /usr/share/man>],
+       MANDIR=$enableval, MANDIR=/usr/share/man)
+AC_SUBST(MANDIR)
+
 AC_ARG_ENABLE(pamlocking,
 [  --enable-pamlocking      configure libpam to observe a global authentication lock],
        WITH_PAMLOCKING=yes ; AC_DEFINE(PAM_LOCKING) , WITH_PAMLOCKING=no)
@@ -170,7 +178,7 @@ dnl Checks for the existence of lckpwdf in libc
 AC_CHECK_LIB(c, lckpwdf, HAVE_LCKPWDF=yes, HAVE_LCKPWDF=no)
 AC_SUBST(HAVE_LCKPWDF)
 
-dnl Checks for the existence of libdl - on BSD its part of libc
+dnl Checks for the existence of libdl - on BSD and Tru64 its part of libc
 AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl) 
 AC_SUBST(LIBDL)
 
@@ -182,7 +190,7 @@ AC_CHECK_LIB(crack, FascistCheck, HAVE_LIBCRACK=yes ; AC_DEFINE(HAVE_LIBCRACK),
        HAVE_LIBCRACK=no)
 AC_SUBST(HAVE_LIBCRACK)
 
-AC_CHECK_LIB(crypt, fcrypt, HAVE_LIBCRYPT=yes ; AC_DEFINE(HAVE_LIBCRYPT),
+AC_CHECK_LIB(crypt, crypt, HAVE_LIBCRYPT=yes ; AC_DEFINE(HAVE_LIBCRYPT),
        HAVE_LIBCRYPT=no)
 AC_SUBST(HAVE_LIBCRYPT)
 AC_CHECK_LIB(util, logwtmp, HAVE_LIBUTIL=yes ; AC_DEFINE(HAVE_LIBUTIL),
@@ -207,12 +215,18 @@ AC_SUBST(HAVE_LIBNSL)
 AC_CHECK_LIB(pwdb, pwdb_db_name, HAVE_LIBPWDB=yes ; AC_DEFINE(HAVE_LIBPWDB),
        HAVE_LIBPWDB=no)
 AC_SUBST(HAVE_LIBPWDB)
+AC_CHECK_LIB(fl, yywrap, HAVE_LIBFLEX=yes ; AC_DEFINE(HAVE_LIBFLEX),
+       HAVE_LIBFLEX=no)
+AC_SUBST(HAVE_LIBFLEX)
+AC_CHECK_LIB(l, yywrap, HAVE_LIBLEX=yes ; AC_DEFINE(HAVE_LIBLEX),
+       HAVE_LIBLEX=no)
+AC_SUBST(HAVE_LIBLEX)
 
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 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)
+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)
 
 dnl Linux wants features.h in some of the source files.
 AC_CHECK_HEADERS(features.h)
@@ -250,7 +264,7 @@ for d in $DICT_DIR_CANDIDATES ; do
       done
 done
 if test -z "$CRACKLIB_DICTPATH" ; then
-      AC_MSG_RESULT(none found)
+      AC_MSG_ERROR(none found)
 else
       AC_MSG_RESULT($CRACKLIB_DICTPATH)
 fi
@@ -259,9 +273,7 @@ AC_SUBST(CRACKLIB_DICTPATH)
 dnl Set FLAGS, linker options etc. depending on C compiler.
 dnl gcc is tested and much preferred; others less so, if at all
 dnl
-dnl If compiling with gcc, linking is also supposed to be done with gcc;
-dnl since we use linker-specific arguments, we may not gain anything by
-dnl switching LD_L over, but I think we can use LD_D as-is.
+dnl If compiling with gcc, linking is also supposed to be done with gcc
 dnl
 dnl For the moment, gcc is enforced above at "CC=gcc".
 dnl
@@ -286,8 +298,8 @@ if test "$GCC" = yes; then
                WARNINGS="$GCC_WARNINGS"
                PIC="-fPIC"
                DYNTYPE=so
-               LD=ld                           
-               LD_L="$LD -x -shared"
+               LD=gcc
+               LD_L="$LD -Xlinker -x -shared"
                RANLIB=ranlib
                STRIP=strip
                CC_STATIC="-Xlinker -export-dynamic"
@@ -322,6 +334,11 @@ else
 ### Non-gcc needs attention on per-OS basis
 ###
        case "$OS" in
+       darwin)
+# add some stuff here (see sourceforge bug 534205)
+# DOCDIR=/System/Documentation/Administration/Libraries/PAM
+# MANDIR=/usr/share/man
+               ;;
        solaris)
            ### Support for Solaris-C
            OS_CFLAGS=""
@@ -385,7 +402,7 @@ AC_FUNC_MEMCMP
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS(gethostname gettimeofday mkdir select strcspn strdup strerror strspn strstr strtol uname)
 
-AC_CHECK_FUNCS(getpwnam_r getgrnam_r)
+AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getgrouplist)
 
 dnl Checks for programs/utilities
 AC_CHECK_PROG(HAVE_SGML2TXT, sgml2txt, yes, no)
@@ -397,6 +414,7 @@ if test $HAVE_SGML2LATEX = "yes" ; then
   else
     PSER="sgml2latex -p"
   fi
+  AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no)
 else
   AC_CHECK_PROG(HAVE_SGML2PS, sgml2ps, yes, no)
   if test $HAVE_SGML2PS = yes ; then
@@ -404,6 +422,7 @@ else
   fi
 fi
 AC_SUBST(PSER)
+AC_SUBST(PS2PDF)
 
 dnl Files to be created from when we run configure
 AC_OUTPUT(Make.Rules)