]> xenbits.xensource.com Git - libvirt.git/commitdiff
wireshark: Inject $(prefix) at the right time
authorAndrea Bolognani <abologna@redhat.com>
Wed, 26 Oct 2016 11:56:52 +0000 (13:56 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 26 Oct 2016 15:00:21 +0000 (17:00 +0200)
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
tools/Makefile.am

index 90d731e2e384adb98851738f9817142484377ea8..c949f8a780e8ad6118bb48cf13a0bce6e1a08449 100644 (file)
@@ -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
index 08e1680cf5f456086b4a5e56a3c366e29e193611..981be31b34eb7e1d56b6e1886ab5eec951de0aa8 100644 (file)
@@ -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)