From 497c3e3ff6b0055e40fa5fad3db248a48902f40a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 17 Aug 2012 11:27:09 -0500 Subject: Adding a local directory option and setting the PAM install directory based on whether we're local or not --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index 05b48d1..1d3a0a1 100644 --- a/configure.ac +++ b/configure.ac @@ -7,12 +7,38 @@ AM_SILENT_RULES([yes]) AC_PROG_CC AC_PROG_LIBTOOL +########################### +# PAM +########################### + have_pam=no AC_CHECK_LIB(pam, pam_getenv, have_pam=yes) if test "x$have_pam" = "xno"; then AC_MSG_ERROR([Required library PAM was not found]) fi +########################### +# Local Install +########################### + +with_localinstall="no" +AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], + [install all files locally (for distcheck)]), + with_localinstall=$enableval, + with_localinstall=no) + +########################### +# PAM Module dir +########################### + +if test "x$with_localinstall" = "xyes"; then + PAMMODULEDIR="${libdir}/security/" +else + PAMMODULEDIR="/lib/security" +fi +AC_SUBST(PAMMODULEDIR) + + AC_CONFIG_FILES([ Makefile src/Makefile -- cgit v1.2.3