From 00a1cee869fce5b6aa79683da19a2529c2cfd690 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lars=20M=C3=BCller?= <lars@samba.org>
Date: Mon, 7 Apr 2014 14:35:10 -0400
Subject: [PATCH] autoconf: allow PAM security install directory to be
configurable
Allow the pam module install directory to be set at build time.
Signed-off-by: Jeff Layton <jlayton@samba.org>
---
Makefile.am | 2 --
configure.ac | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index a3fb413..92da8b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index 6cd8558..43aa55c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
--
1.8.4.2