2006-02-16 20:33:19 +00:00
|
|
|
dnl $Id$
|
2003-06-09 01:35:37 +00:00
|
|
|
|
2007-06-03 20:26:18 +00:00
|
|
|
AC_PREREQ(2.59)
|
|
|
|
AC_REVISION([$Id$])
|
|
|
|
AC_INIT([OpenPAM],[trunk],[des@des.no])
|
|
|
|
AC_CONFIG_SRCDIR(lib/pam_start.c)
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
2003-06-09 01:29:37 +00:00
|
|
|
|
|
|
|
AC_CANONICAL_SYSTEM
|
2007-06-03 20:26:18 +00:00
|
|
|
AC_LANG(C)
|
2003-07-14 14:17:47 +00:00
|
|
|
AC_C_VOLATILE
|
2003-06-09 01:29:37 +00:00
|
|
|
AC_DISABLE_STATIC
|
|
|
|
AC_PROG_LIBTOOL
|
2007-06-03 20:26:18 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2003-06-09 01:29:37 +00:00
|
|
|
|
|
|
|
LIB_MAJ=2
|
|
|
|
AC_SUBST(LIB_MAJ)
|
|
|
|
AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
|
|
|
|
|
2006-03-20 16:55:55 +00:00
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
AC_HELP_STRING([--enable-debug],
|
|
|
|
[turn debugging on by default]),
|
|
|
|
AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
|
|
|
|
|
2003-06-09 01:29:37 +00:00
|
|
|
AC_MSG_CHECKING([whether loading unversioned modules support is enabled])
|
|
|
|
AC_ARG_ENABLE(unversioned-modules,
|
|
|
|
AC_HELP_STRING([--disable-unversioned-modules],
|
|
|
|
[support loading of unversioned modules]),
|
|
|
|
[if test "$enableval" = "no"; then
|
|
|
|
AC_DEFINE(DISABLE_UNVERSIONED_MODULES,
|
|
|
|
1,
|
|
|
|
[Whether loading unversioned modules support is disabled])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(no)],
|
|
|
|
AC_MSG_RESULT(yes))
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for modules directory support])
|
|
|
|
AC_ARG_WITH(modules-dir,
|
|
|
|
AC_HELP_STRING([--with-modules-dir=DIR],
|
|
|
|
[OpenPAM modules directory]),
|
|
|
|
[if test "$withval" != "no"; then
|
|
|
|
OPENPAM_MODULES_DIR="$withval"
|
|
|
|
AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
|
|
|
|
"$OPENPAM_MODULES_DIR",
|
|
|
|
[OpenPAM modules directory])
|
|
|
|
AC_MSG_RESULT($OPENPAM_MODULES_DIR)
|
|
|
|
else
|
|
|
|
OPENPAM_MODULES_DIR="$libdir"
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi],
|
|
|
|
[OPENPAM_MODULES_DIR="$libdir"
|
|
|
|
AC_MSG_RESULT(no)])
|
|
|
|
AC_SUBST(OPENPAM_MODULES_DIR)
|
|
|
|
|
2006-04-12 10:26:27 +00:00
|
|
|
AC_MSG_CHECKING([whether to build the documentation])
|
|
|
|
AC_ARG_WITH(doc,
|
|
|
|
AC_HELP_STRING([--with-doc],
|
|
|
|
[build documentation]),
|
2003-06-09 01:29:37 +00:00
|
|
|
,
|
2006-04-12 10:26:27 +00:00
|
|
|
[with_doc=yes])
|
2006-04-12 10:29:01 +00:00
|
|
|
AC_MSG_RESULT($with_doc)
|
2003-06-09 01:29:37 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build example version of pam_unix.so])
|
|
|
|
AC_ARG_WITH(pam-unix,
|
|
|
|
AC_HELP_STRING([--with-pam-unix],
|
|
|
|
[compile example version of pam_unix.so]),
|
|
|
|
,
|
2004-07-28 15:57:54 +00:00
|
|
|
[with_pam_unix=no])
|
2003-06-09 01:29:37 +00:00
|
|
|
AC_MSG_RESULT($with_pam_unix)
|
|
|
|
|
2006-04-12 10:26:27 +00:00
|
|
|
AC_MSG_CHECKING([whether to build example version of su(1)])
|
|
|
|
AC_ARG_WITH(su,
|
|
|
|
AC_HELP_STRING([--with-su],
|
|
|
|
[compile example version of su(1)]),
|
|
|
|
,
|
|
|
|
[with_su=no])
|
|
|
|
AC_MSG_RESULT($with_su)
|
|
|
|
|
|
|
|
AM_CONDITIONAL(WITH_DOC, test "x$with_doc" = "xyes")
|
2003-06-09 01:29:37 +00:00
|
|
|
AM_CONDITIONAL(WITH_PAM_UNIX, test "x$with_pam_unix" = "xyes")
|
2006-04-12 10:26:27 +00:00
|
|
|
AM_CONDITIONAL(WITH_SU, test "x$with_su" = "xyes")
|
2003-06-09 01:29:37 +00:00
|
|
|
|
2003-07-14 14:17:47 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
2003-06-09 01:29:37 +00:00
|
|
|
AC_CHECK_HEADERS(crypt.h)
|
|
|
|
|
2003-07-14 14:17:47 +00:00
|
|
|
AC_CHECK_FUNCS(fpurge)
|
2003-06-09 01:29:37 +00:00
|
|
|
|
|
|
|
DL_LIBS=
|
|
|
|
AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
|
|
|
|
AC_SUBST(DL_LIBS)
|
|
|
|
|
|
|
|
CRYPT_LIBS=
|
|
|
|
AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt)
|
|
|
|
AC_SUBST(CRYPT_LIBS)
|
|
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
|
|
|
|
2007-06-03 20:26:18 +00:00
|
|
|
AC_ARG_ENABLE(developer-warnings,
|
|
|
|
AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
|
2009-10-29 17:42:57 +00:00
|
|
|
CFLAGS="${CFLAGS} -Wall -Wextra")
|
2007-06-03 20:26:18 +00:00
|
|
|
AC_ARG_ENABLE(debugging-symbols,
|
|
|
|
AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
|
|
|
|
CFLAGS="${CFLAGS} -O0 -g -fno-inline")
|
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
|
|
|
|
CFLAGS="${CFLAGS} -Werror")
|
2003-06-09 01:29:37 +00:00
|
|
|
|
2006-04-12 10:26:27 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
bin/Makefile
|
|
|
|
bin/su/Makefile
|
|
|
|
include/Makefile
|
|
|
|
include/security/Makefile
|
|
|
|
lib/Makefile
|
|
|
|
modules/Makefile
|
|
|
|
modules/pam_unix/Makefile
|
|
|
|
modules/pam_deny/Makefile
|
|
|
|
modules/pam_permit/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/man/Makefile
|
|
|
|
Makefile
|
|
|
|
])
|
2003-06-09 01:29:37 +00:00
|
|
|
AC_OUTPUT
|