From 4f7742c31bcf64550dae6a14d6b6da54d6d57e59 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 12 Oct 2012 15:32:08 +0000 Subject: -fix for #688590: allow user to specify how to install nsslibs --- configure.ac | 36 ++++++++++++++++++++++++++++++++++++ src/gns/nss/Makefile.am | 8 +++----- src/transport/Makefile.am | 33 +++++++++++++-------------------- 3 files changed, 52 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index c1d463a26..0bedbaca9 100644 --- a/configure.ac +++ b/configure.ac @@ -812,6 +812,42 @@ AC_ARG_WITH(sudo, 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) diff --git a/src/gns/nss/Makefile.am b/src/gns/nss/Makefile.am index 0569fce7d..f2a6daac2 100644 --- a/src/gns/nss/Makefile.am +++ b/src/gns/nss/Makefile.am @@ -21,20 +21,18 @@ EXTRA_DIST = map-file 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 diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 54d6a1a35..df238d338 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -12,7 +12,6 @@ if HAVE_MHD GN_LIBMHD = -lmicrohttpd HTTP_SERVER_PLUGIN_LA = libgnunet_plugin_transport_http_server.la HTTPS_SERVER_PLUGIN_LA = libgnunet_plugin_transport_https_server.la - HTTP_SERVER_PLUGIN_TEST = test_plugin_http_server HTTPS_SERVER_PLUGIN_TEST = test_plugin_https_server endif @@ -32,8 +31,6 @@ if HAVE_LIBCURL HTTP_REL_TEST = test_transport_api_reliability_http HTTP_QUOTA_TEST = test_quota_compliance_http \ test_quota_compliance_http_asymmetric - - HTTPS_API_TEST = test_transport_api_https HTTPS_API_TIMEOUT_TEST = test_transport_api_timeout_https HTTPS_REL_TEST = test_transport_api_reliability_https @@ -42,10 +39,6 @@ if HAVE_LIBCURL endif endif -#if FALSE - -#endif - if USE_COVERAGE AM_CFLAGS = --coverage -O0 endif @@ -239,8 +232,8 @@ libgnunet_plugin_transport_unix_la_LIBADD = \ $(LTLIBINTL) libgnunet_plugin_transport_unix_la_LDFLAGS = \ $(GN_PLUGIN_LDFLAGS) - - + + libgnunet_plugin_transport_http_client_la_SOURCES = \ plugin_transport_http_client.c plugin_transport_http_common.c libgnunet_plugin_transport_http_client_la_LIBADD = \ @@ -256,8 +249,8 @@ libgnunet_plugin_transport_http_client_la_CFLAGS = \ $(CFLAGS) libgnunet_plugin_transport_http_client_la_CPPFLAGS = \ @LIBCURL_CPPFLAGS@ - - + + libgnunet_plugin_transport_http_server_la_SOURCES = \ plugin_transport_http_server.c plugin_transport_http_common.c libgnunet_plugin_transport_http_server_la_LIBADD = \ @@ -287,8 +280,8 @@ libgnunet_plugin_transport_https_client_la_CFLAGS = \ $(CFLAGS) -DBUILD_HTTPS libgnunet_plugin_transport_https_client_la_CPPFLAGS = \ @LIBCURL_CPPFLAGS@ - - + + libgnunet_plugin_transport_https_server_la_SOURCES = \ plugin_transport_http_server.c plugin_transport_http_common.c libgnunet_plugin_transport_https_server_la_LIBADD = \ @@ -497,7 +490,7 @@ test_plugin_http_server_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_plugin_https_server_SOURCES = \ test_plugin_transport.c test_plugin_https_server_LDADD = \ @@ -506,7 +499,7 @@ test_plugin_https_server_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_plugin_http_client_SOURCES = \ test_plugin_transport.c test_plugin_http_client_LDADD = \ @@ -515,7 +508,7 @@ test_plugin_http_client_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_plugin_https_client_SOURCES = \ test_plugin_transport.c test_plugin_https_client_LDADD = \ @@ -663,7 +656,7 @@ test_transport_api_http_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_transport_api_http_reverse_SOURCES = \ test_transport_api.c test_transport_api_http_reverse_LDADD = \ @@ -671,7 +664,7 @@ test_transport_api_http_reverse_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_transport_api_timeout_http_SOURCES = \ test_transport_api_timeout.c test_transport_api_timeout_http_LDADD = \ @@ -728,7 +721,7 @@ test_transport_api_https_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_transport_api_timeout_https_SOURCES = \ test_transport_api_timeout.c test_transport_api_timeout_https_LDADD = \ @@ -736,7 +729,7 @@ test_transport_api_timeout_https_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la - + test_transport_api_reliability_https_SOURCES = \ test_transport_api_reliability.c -- cgit v1.2.3