blob: 89abf7541d2937a2f74f070f891739bf16b50d0b (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
--- a/src/gns/nss/Makefile.am
+++ b/src/gns/nss/Makefile.am
@@ -21,20 +21,18 @@
AM_LDFLAGS=-avoid-version -module -export-dynamic
-if HAVE_SUDO
-nssdir = /lib/
-else
-nssdir = $(libdir)
-endif
+nssdir = $(NSS_DIR)
LIBTOOL = $(SUDO_BINARY) $(SHELL) $(top_builddir)/libtool
if !MINGW
+if INSTALL_NSS
nss_LTLIBRARIES = \
libnss_gns.la \
libnss_gns4.la \
libnss_gns6.la
endif
+endif
sources = nss_gns_query.h nss_gns_query.c
--- a/configure.ac
+++ b/configure.ac
@@ -780,6 +780,42 @@
AC_SUBST(SUDO_BINARY)
AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
+
+# test for nssdir
+AC_MSG_CHECKING(with nssdir)
+AC_ARG_WITH(nssdir,
+ [ --with-nssdir=PATH where to install NSS plugins],
+ [AC_MSG_RESULT("$with_nssdir")
+ case $with_nssdir in
+ no)
+ NSS_DIR=
+ install_nss=0
+ ;;
+ yes)
+ NSS_DIR="/lib"
+ install_nss=1
+ ;;
+ *)
+ NSS_DIR=$with_nssdir
+ install_nss=1
+ ;;
+ esac
+ ],
+ [
+ if test "x$SUDO_BINARY" != "x" -o -w /
+ then
+ NSS_DIR="/lib"
+ install_nss=1
+ AC_MSG_RESULT([yes, to /lib])
+ else
+ NSS_DIR=
+ install_nss=0
+ AC_MSG_RESULT([no])
+ fi
+ ])
+AC_SUBST(NSS_DIR)
+AM_CONDITIONAL([INSTALL_NSS], [test "x$install_nss" != "x0"])
+
# test for gnunetdns group name
GNUNETDNS_GROUP=gnunetdns
AC_MSG_CHECKING(for gnunetdns group name)
|