dnl
LIBPAM_VERSION_MAJOR=0
-LIBPAM_VERSION_MINOR=76
+LIBPAM_VERSION_MINOR=78
AC_SUBST(LIBPAM_VERSION_MAJOR)
AC_SUBST(LIBPAM_VERSION_MINOR)
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)
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
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],
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)
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)
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),
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)
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
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
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"
### 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=""
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)
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
fi
fi
AC_SUBST(PSER)
+AC_SUBST(PS2PDF)
dnl Files to be created from when we run configure
AC_OUTPUT(Make.Rules)