wireshark: Inject $(prefix) at the right time

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.
This commit is contained in:
Andrea Bolognani 2016-10-26 13:56:52 +02:00
parent debf2f0b8a
commit c587c73549
2 changed files with 6 additions and 2 deletions

View File

@ -42,7 +42,11 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
dnl /usr is our best bet dnl /usr is our best bet
ws_prefix="/usr" ws_prefix="/usr"
fi 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 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]) AC_MSG_ERROR([ws-plugindir must be used only with valid path])
else else

View File

@ -398,7 +398,7 @@ EXTRA_DIST += \
if WITH_WIRESHARK_DISSECTOR if WITH_WIRESHARK_DISSECTOR
ws_plugindir = $(prefix)$(plugindir) ws_plugindir = @plugindir@
ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
wireshark_src_libvirt_la_CPPFLAGS = \ wireshark_src_libvirt_la_CPPFLAGS = \
-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS)