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)
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)