fix build system to actually handle openssl.cnf properly
authorChristian Grothoff <christian@grothoff.org>
Wed, 20 Feb 2019 09:05:26 +0000 (10:05 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 20 Feb 2019 09:05:26 +0000 (10:05 +0100)
configure.ac
src/fs/Makefile.am
src/gns/Makefile.am
src/gns/gnunet-gns-proxy-setup-ca.in

index b3caee6762f2d04dc2be492e50bc2dfedfe6ceb9..8b93d8d6c96e1e15cb7632bfd626f5208b80104b 100644 (file)
@@ -377,10 +377,6 @@ AC_ARG_ENABLE(gcc-hardening,
     LDFLAGS="$LDFLAGS -pie"
 fi])
 
-# gnunet-gns-proxy-setup-ca requires openssl and certutil (nss)
-AC_CHECK_PROG(have_openssl, [openssl], [yes], [no])
-AC_CHECK_PROG(have_certutil, [certutil], [yes], [no])
-
 # Linker hardening options
 # Currently these options are ELF specific - you can't use this with MacOSX
 AC_ARG_ENABLE(linker-hardening,
@@ -1304,6 +1300,8 @@ AC_SUBST(LIBPREFIX)
 AC_SUBST(DLLDIR)
 AC_SUBST(EXT_LIB_PATH)
 
+DATAROOTDIR=$datarootdir
+AC_SUBST(DATAROOTDIR)
 
 # test for sudo
 AC_MSG_CHECKING(for sudo)
@@ -1443,23 +1441,6 @@ AC_MSG_RESULT($enable_test_run)
 AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
 
 
-# should monkey be used when running (certain) services?
-AC_MSG_CHECKING(whether to run with monkey)
-AC_ARG_ENABLE([monkey],
-   [AS_HELP_STRING([--enable-monkey], [enable running with monkey])],
-   [enable_monkey=${enableval}],
-   [enable_monkey=no])
-AC_MSG_RESULT($enable_monkey)
-AM_CONDITIONAL([ENABLE_MONKEY], [test "x$enable_monkey" = "xyes"])
-if test "x$enable_monkey" = "xyes"
-then
-  MONKEYPREFIX="pathologist -d $(eval echo ${datarootdir}/gnunet/gnunet.sqlite) -p 30 --"
-else
-  MONKEYPREFIX=""
-fi
-AC_SUBST(MONKEYPREFIX)
-
-
 AC_MSG_CHECKING([whether to compile in benchmarks (currently for http and crypto)])
 AC_ARG_ENABLE([benchmark],
    [AS_HELP_STRING([--enable-benchmark], [enable benchmarking])],
index 33260a79408979c1a9ae5fe75ef5d5d1d346ebe4..d452bbf3c6bb32c6ef24afb6394cf57af0b8d577 100644 (file)
@@ -282,11 +282,6 @@ check_SCRIPTS += \
 endif
 endif
 
-if ENABLE_MONKEY
- MONKEY = @MONKEYPREFIX@
- AM_LDFLAGS = -no-install
-endif
-
 
 if ENABLE_TEST_RUN
 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; $(MONKEY)
index 991c40ae307367977097890b054e768231ae8ed6..434d50f34c4d0dce0cd712e9146ce8a5f8ac2df6 100644 (file)
@@ -14,7 +14,8 @@ EXTRA_DIST = \
   test_gns_simple_lookup.conf \
   gns-helper-service-w32.conf \
   w32nsp.def \
-  gnunet-gns-proxy-setup-ca \
+  openssl.cnf \
+  gnunet-gns-proxy-setup-ca.in \
   zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
   zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
   zonefiles/test_zonekey \
@@ -80,7 +81,7 @@ noinst_PROGRAMS = \
   gnunet-gns-benchmark
 
 pkgdata_DATA = \
-       openssl.cnf
+  openssl.cnf
 
 if HAVE_MHD
 if LINUX
@@ -93,25 +94,16 @@ plugin_LTLIBRARIES = \
   libgnunet_plugin_gnsrecord_gns.la
 
 
-if HAVE_OPENSSL
-xOPENSSL=$(shell which openssl)
-do_subst_openssl = $(SED) -e 's,[@]OPENSSLBIN[@],${xOPENSSL},g'
-endif
-
-if HAVE_CERTUTIL
-xCERTUTIL=$(shell which certutil)
-do_subst_certutil = $(SED) -e 's,[@]CERTUTILBIN[@],${xCERTUTIL},g'
-endif
+bin_SCRIPTS = \
+  gnunet-gns-proxy-setup-ca
 
-xPFX=$(pkgdatadir)/openssl.cnf
-do_subst = $(SED) -e 's,[@]PREFIX[@],${xPFX},g'
+# See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts
+do_subst = sed -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
 
-gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in
-       $(do_subst) < $(top_srcdir)/src/gns/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
+gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile
+       $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
        chmod +x gnunet-gns-proxy-setup-ca
 
-bin_SCRIPTS = gnunet-gns-proxy-setup-ca
-
 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
   plugin_gnsrecord_gns.c
 libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
index 55a60e544b1059d148ad01974024d6b6ada3f604..0a6fab18a5a0a07e2b7d59d256def7128806e027 100644 (file)
@@ -3,7 +3,7 @@
 # and install it (for both GNUnet and your browser).
 #
 
-OPENSSLCFG=@PREFIX@
+OPENSSLCFG=@pkgdatadir@/openssl.cnf
 if ! which openssl > /dev/null
 then
     echo "'openssl' command not found. Please install it."