diff options
author | ng0 <ng0@n0.is> | 2019-12-01 19:33:04 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-12-01 19:33:04 +0000 |
commit | 24d9ece906cc03e80db617168c9a2d93409e4640 (patch) | |
tree | ec55849eb22cf0131d1f73185884da605824130c /contrib | |
parent | 492a887121d7ddd5aa35450cf35cfd0fc3b5d239 (diff) |
Add --with-gnunet-logread to configure.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/scripts/gnunet-logread/Makefile.am | 12 | ||||
-rwxr-xr-x | contrib/scripts/gnunet-logread/gnunet-logread.in | 2 |
2 files changed, 10 insertions, 4 deletions
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; |