gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: Add --with-gnunet-logread to configure.


From: gnunet
Subject: [gnunet] branch master updated: Add --with-gnunet-logread to configure.
Date: Sun, 01 Dec 2019 20:36:15 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 24d9ece90 Add --with-gnunet-logread to configure.
24d9ece90 is described below

commit 24d9ece906cc03e80db617168c9a2d93409e4640
Author: ng0 <address@hidden>
AuthorDate: Sun Dec 1 19:33:04 2019 +0000

    Add --with-gnunet-logread to configure.
---
 ChangeLog                                        |  4 ++++
 configure.ac                                     | 19 +++++++++++++++++++
 contrib/scripts/gnunet-logread/Makefile.am       | 12 +++++++++---
 contrib/scripts/gnunet-logread/gnunet-logread.in |  2 +-
 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;
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]