autoconf: allow PAM security install directory to be configurable
authorLars Müller <lars@samba.org>
Wed, 2 Apr 2014 14:22:17 +0000 (10:22 -0400)
committerJeff Layton <jlayton@samba.org>
Wed, 2 Apr 2014 14:22:17 +0000 (10:22 -0400)
Allow the pam module install directory to be set at build time.

Signed-off-by: Jeff Layton <jlayton@samba.org>
Makefile.am
configure.ac

index a3fb413743b5d41951f9753f12ae9190bf29877b..92da8b19dd5bcdd0068fca03fb3c2fd5434c0099 100644 (file)
@@ -92,8 +92,6 @@ idmapwb.8: idmapwb.8.in
 endif
 
 if CONFIG_PAM
-pamdir = $(libdir)/security
-
 pam_PROGRAMS = pam_cifscreds.so
 
 pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
index 6cd8558a138a9fde538521ba0b1dbb27b1676239..43aa55c6005374d1fac3e7f0f20ecf9a5b6288e3 100644 (file)
@@ -58,6 +58,12 @@ AC_ARG_WITH(idmap-plugin,
 AC_DEFINE_UNQUOTED(IDMAP_PLUGIN_PATH, "$pluginpath", [Location of plugin that ID mapping infrastructure should use. (usually a symlink to real plugin)])
 AC_SUBST([pluginpath])
 
+AC_ARG_WITH(pamdir,
+       [AC_HELP_STRING([--with-pamdir=DIR],[Where to install the PAM module @<:@default=$(libdir)/security@:>@])],
+       pamdir=$withval,
+       pamdir="\$(libdir)/security")
+AC_SUBST([pamdir])
+
 # check for ROOTSBINDIR environment var
 if test -z $ROOTSBINDIR; then
        ROOTSBINDIR="/sbin"