gnunet-qr: Use the `gnunet-uri` binary installed into PREFIX.
authorHartmut Goebel <h.goebel@crazy-compilers.com>
Sun, 3 Mar 2019 01:10:13 +0000 (02:10 +0100)
committerHartmut Goebel <h.goebel@crazy-compilers.com>
Wed, 13 Mar 2019 17:22:07 +0000 (18:22 +0100)
This helps keeping environments concise and functional package
managers like guix this will ensure `gnunet-uri` from the same
environment is used.

src/util/Makefile.am
src/util/gnunet-qr.c

index ba3c98ad13e1e1523b5c23c2bf5f9eb4a0a9d848..98997efbd9b22e78d0449dc7c1d454eda50e2f20 100644 (file)
@@ -283,7 +283,7 @@ gnunet_qr_SOURCES = \
   gnunet-qr.c \
   gnunet-qr-utils.h
 gnunet_qr_LDFLAGS= $(libzbar_LIBS)
-gnunet_qr_CFLAGS = $(libzbar_CFLAGS)
+gnunet_qr_CFLAGS = $(libzbar_CFLAGS) -DBINDIR=\"@bindir@/\"
 
 plugin_LTLIBRARIES = \
   libgnunet_plugin_test.la
index c8919dae4daa56f1b8defc96d2cfeeaa8c9d43d1..ea0e0fea22d4cc7a4de620de853ebb5698b7bee1 100644 (file)
@@ -132,11 +132,11 @@ int main (int argc, char **argv)
     if (configuration == NULL) {
       char* command_args[] = {"gnunet-uri", data, NULL };
       LOG("Running `gnunet-uri %s`\n", data);
-      rc = fork_and_exec("gnunet-uri", command_args);
+      rc = fork_and_exec(BINDIR "gnunet-uri", command_args);
     } else {
       char* command_args[] = {"gnunet-uri", "-c", configuration, data, NULL };
       LOG("Running `gnunet-uri -c '%s' %s`\n", configuration, data);
-      rc = fork_and_exec("gnunet-uri", command_args);
+      rc = fork_and_exec(BINDIR "gnunet-uri", command_args);
     };
 
     if (rc != 0) {