summaryrefslogtreecommitdiff
blob: 7dc4392e41cb3ecf73180dacf52fe5f62e204f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 4fc9023bb86689f1391651fa744d9e63ee1d7bbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
Date: Mon, 21 Nov 2016 08:18:32 +0100
Subject: [PATCH] pam_gdm: allow setting pam module dir at configure time

Code taken almost verbatim from gnome-keyring.
---
 configure.ac        | 10 +++++++++-
 pam_gdm/Makefile.am |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index dd98992..e0074dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -476,7 +476,7 @@ dnl ---------------------------------------------------------------------------
 dnl - Check for PAM stuff
 dnl ---------------------------------------------------------------------------
 
-dnl PAM prefix
+dnl PAM prefix (configuration files)
 withval=""
 AC_ARG_WITH(pam-prefix,
             AS_HELP_STRING([--with-pam-prefix=<prefix>],
@@ -492,6 +492,14 @@ else
 fi
 AC_SUBST(PAM_PREFIX)
 
+dnl PAM dir (dynamic modules)
+AC_ARG_WITH([pam-dir],
+            [AC_HELP_STRING([--with-pam-dir=DIR],
+                             [directory to install pam modules in])],
+             [], [with_pam_dir='${libdir}/security'])
+PAM_DEST_DIR="$with_pam_dir"
+AC_SUBST(PAM_DEST_DIR)
+
 have_pam=no
 AC_CHECK_LIB(pam, pam_start, have_pam=yes)
 
diff --git a/pam_gdm/Makefile.am b/pam_gdm/Makefile.am
index 61d672b..980b31c 100644
--- a/pam_gdm/Makefile.am
+++ b/pam_gdm/Makefile.am
@@ -36,4 +36,4 @@ pam_gdm_LTLIBRARIES = \
 	pam_gdm.la \
 	$(END_OF_LIST)
 
-pam_gdmdir = $(libdir)/security
+pam_gdmdir = $(PAM_DEST_DIR)
-- 
2.10.2