8650af5
From 00a1cee869fce5b6aa79683da19a2529c2cfd690 Mon Sep 17 00:00:00 2001
8650af5
From: =?UTF-8?q?Lars=20M=C3=BCller?= <lars@samba.org>
8650af5
Date: Mon, 7 Apr 2014 14:35:10 -0400
8650af5
Subject: [PATCH] autoconf: allow PAM security install directory to be
8650af5
 configurable
8650af5
8650af5
Allow the pam module install directory to be set at build time.
8650af5
8650af5
Signed-off-by: Jeff Layton <jlayton@samba.org>
8650af5
---
8650af5
 Makefile.am  | 2 --
8650af5
 configure.ac | 6 ++++++
8650af5
 2 files changed, 6 insertions(+), 2 deletions(-)
8650af5
8650af5
diff --git a/Makefile.am b/Makefile.am
8650af5
index a3fb413..92da8b1 100644
8650af5
--- a/Makefile.am
8650af5
+++ b/Makefile.am
8650af5
@@ -92,8 +92,6 @@ idmapwb.8: idmapwb.8.in
8650af5
 endif
8650af5
 
8650af5
 if CONFIG_PAM
8650af5
-pamdir = $(libdir)/security
8650af5
-
8650af5
 pam_PROGRAMS = pam_cifscreds.so
8650af5
 
8650af5
 pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
8650af5
diff --git a/configure.ac b/configure.ac
8650af5
index 6cd8558..43aa55c 100644
8650af5
--- a/configure.ac
8650af5
+++ b/configure.ac
8650af5
@@ -58,6 +58,12 @@ AC_ARG_WITH(idmap-plugin,
8650af5
 AC_DEFINE_UNQUOTED(IDMAP_PLUGIN_PATH, "$pluginpath", [Location of plugin that ID mapping infrastructure should use. (usually a symlink to real plugin)])
8650af5
 AC_SUBST([pluginpath])
8650af5
 
8650af5
+AC_ARG_WITH(pamdir,
8650af5
+	[AC_HELP_STRING([--with-pamdir=DIR],[Where to install the PAM module @<:@default=$(libdir)/security@:>@])],
8650af5
+	pamdir=$withval,
8650af5
+	pamdir="\$(libdir)/security")
8650af5
+AC_SUBST([pamdir])
8650af5
+
8650af5
 # check for ROOTSBINDIR environment var
8650af5
 if test -z $ROOTSBINDIR; then
8650af5
 	ROOTSBINDIR="/sbin"
8650af5
-- 
8650af5
1.8.4.2
8650af5