From: Christian Grothoff Date: Thu, 31 May 2012 18:04:28 +0000 (+0000) Subject: -allow installation even as non-root non-sudo user to succeed with new nss code X-Git-Tag: initial-import-from-subversion-38251~13337 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3fa149e507bf5cca1f499d48c780a4853e7b2c5;p=oweals%2Fgnunet.git -allow installation even as non-root non-sudo user to succeed with new nss code --- diff --git a/configure.ac b/configure.ac index c75b52f4c..2cc522bf6 100644 --- a/configure.ac +++ b/configure.ac @@ -766,7 +766,7 @@ AC_ARG_WITH(sudo, ], [AC_MSG_RESULT([no])]) AC_SUBST(SUDO_BINARY) - +AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /]) # test for gnunetdns group name GNUNETDNS_GROUP=gnunetdns @@ -1104,6 +1104,11 @@ then AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.]) fi +if test "x$SUDO_BINARY" = "x" -a ! -w / +then + AC_MSG_NOTICE([NOTICE: --with-sudo not specified and not running as 'root', will not install GNS NSS library]) +fi + AC_MSG_NOTICE([******************************************** You can compile GNUnet with make diff --git a/src/gns/nss/Makefile.am b/src/gns/nss/Makefile.am index c5e415dbf..582aa0696 100644 --- a/src/gns/nss/Makefile.am +++ b/src/gns/nss/Makefile.am @@ -21,15 +21,22 @@ EXTRA_DIST = map-file AM_LDFLAGS=-avoid-version -module -export-dynamic +if HAVE_SUDO nssdir = /lib/ +else +nssdir = $(libdir) +endif + LIBTOOL = $(SUDO_BINARY) $(SHELL) $(top_builddir)/libtool if !MINGW +if HAVE_SUDO nss_LTLIBRARIES = \ libnss_gns.la \ libnss_gns4.la \ libnss_gns6.la endif +endif sources = util.c util.h query.h query.c diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 7c1991b91..f9998642d 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am @@ -12,8 +12,6 @@ endif #bin_PROGRAMS = \ # connection_watchdog -check_PROGRAMS = - noinst_PROGRAMS = connection_watchdog noinst_SCRIPTS = \ @@ -98,7 +96,7 @@ test_integration_clique.py: test_integration_clique.py.in Makefile test_integration_clique_nat.py: test_integration_clique_nat.py.in Makefile $(do_subst) < $(srcdir)/test_integration_clique_nat.py.in > test_integration_clique_nat.py chmod +x test_integration_clique_nat.py - + test_integration_connect_on_restart.py: test_integration_connect_on_restart.py.in Makefile $(do_subst) < $(srcdir)/test_integration_connect_on_restart.py.in > test_integration_connect_on_restart.py chmod +x test_integration_connect_on_restart.py