summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac19
-rw-r--r--contrib/scripts/gnunet-logread/Makefile.am12
-rwxr-xr-xcontrib/scripts/gnunet-logread/gnunet-logread.in2
4 files changed, 33 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ed48e3e7..4c4e3bf54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Dec 01 19:31:00 UTC 2019
+ configure: Add --with-gnunet-logread.
+ -ng0
+
Wed Oct 30 10:50:00 UTC 2019
Released gnunet 0.11.8
-ng0
diff --git a/configure.ac b/configure.ac
index 53db0bfaf..6471cb872 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,25 @@ AC_PATH_PROG( PERL, perl, ,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST([PERL])
+# should we install gnunet-logread?
+AC_MSG_CHECKING(whether to install gnunet-logread)
+AC_ARG_WITH([gnunet-logread],
+ [AS_HELP_STRING([--with-gnunet-logread],
+ [Install gnunet-logread])],
+ [logread=${withval}],
+ [logread=no])
+AC_MSG_RESULT($logread)
+AS_IF([test "x$logread" = "xyes"],
+ [AM_CONDITIONAL([GNUNET_LOGREAD], true)
+ AC_DEFINE([GNUNET_LOGREAD],
+ [1],
+ [Installing gnunet-logread])],
+ [AM_CONDITIONAL([GNUNET_LOGREAD],
+ false)
+ AC_DEFINE([GNUNET_LOGREAD],
+ [0],
+ [Not installing gnunet-logread])])
+
# iptables is a soft requirement to run tests
AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false)
diff --git a/contrib/scripts/gnunet-logread/Makefile.am b/contrib/scripts/gnunet-logread/Makefile.am
index 790b58fea..e1183a885 100644
--- a/contrib/scripts/gnunet-logread/Makefile.am
+++ b/contrib/scripts/gnunet-logread/Makefile.am
@@ -1,7 +1,7 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
-do_subst = $(AWK) -v py="$(PERL)" '{gsub("@PERLEXE@",py); print $$0}'
+do_subst = $(AWK) -v prl="$(PERL)" -v pfx="$(prefix)" '{if (/@SUBSTPREFIX@/) { gsub("@SUBSTPREFIX@",pfx)}; gsub("@PERLEXE@",prl); print $$0}'
SUFFIXES = .in
@@ -17,9 +17,15 @@ CLEANFILES= \
gnunet-logread \
gnunet-logread-ipc-sdedit
+if GNUNET_LOGREAD
+bin_SCRIPTS = \
+ gnunet-logread-ipc \
+ $(CLEANFILES)
+else
noinst_SCRIPTS = \
- $(CLEANFILES) \
- gnunet-logread-ipc
+ gnunet-logread-ipc \
+ $(CLEANFILES)
+endif
EXTRA_DIST = \
gnunet-logread.in \
diff --git a/contrib/scripts/gnunet-logread/gnunet-logread.in b/contrib/scripts/gnunet-logread/gnunet-logread.in
index e27c1d3fc..ce588b8e6 100755
--- a/contrib/scripts/gnunet-logread/gnunet-logread.in
+++ b/contrib/scripts/gnunet-logread/gnunet-logread.in
@@ -29,7 +29,7 @@ my %levels = ( NONE => 0, ERROR => 1, WARNING => 2, INFO => 4, DEBUG => 8 );
# Message type numbers to names
my %msgtypes;
-my $prefix = $ENV{GNUNET_PREFIX} || '/usr';
+my $prefix = $ENV{GNUNET_PREFIX} || '@SUBSTPREFIX@';
my $filename = "$prefix/include/gnunet/gnunet_protocols.h";
$ipc = $opts{s} || $DEFAULT_SOCKET;