[PATCH 4/5] wireshark: Inject $(prefix) at the right time

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

 



Adding $(prefix) in Makefile.am, as we were doing, means that
it would be prepended even when using --with-ws-plugindir,
which is something we don't want to happen.

Instead, we add it beforehand but take care that it doesn't
get expanded until make is called.
---
 m4/virt-wireshark.m4 | 6 +++++-
 tools/Makefile.am    | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index 90d731e..c949f8a 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -42,7 +42,11 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
         dnl /usr is our best bet
         ws_prefix="/usr"
       fi
-      plugindir="${plugindir#$ws_prefix}"
+      dnl Replace the wireshark prefix with our own.
+      dnl Note that $(prefix) is kept verbatim at this point in time, and will
+      dnl only be expanded later, when make is called: this makes it possible
+      dnl to override the prefix at compilation or installation time
+      plugindir='$(prefix)'"${plugindir#$ws_prefix}"
     elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then
       AC_MSG_ERROR([ws-plugindir must be used only with valid path])
     else
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 08e1680..981be31 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -398,7 +398,7 @@ EXTRA_DIST += \
 
 if WITH_WIRESHARK_DISSECTOR
 
-ws_plugindir = $(prefix)$(plugindir)
+ws_plugindir = @plugindir@
 ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
 wireshark_src_libvirt_la_CPPFLAGS = \
 	-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS)
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]