diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/virt-wireshark.m4 | 29 | ||||
-rw-r--r-- | m4/virt-yajl.m4 | 2 |
2 files changed, 19 insertions, 12 deletions
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4 index f383e2baf..556272ad8 100644 --- a/m4/virt-wireshark.m4 +++ b/m4/virt-wireshark.m4 @@ -28,26 +28,33 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[ dnl Check for system location of wireshark plugins if test "x$with_wireshark_dissector" != "xno" ; then if test "x$with_ws_plugindir" = "xcheck" ; then - plugindir="$($PKG_CONFIG --variable plugindir wireshark)" - if test "x$plugindir" = "x" ; then + ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)" + ws_prefix="$($PKG_CONFIG --variable prefix wireshark)" + ws_modversion="$($PKG_CONFIG --modversion wireshark)" + if test "x$ws_plugindir" = "x" ; then dnl On some systems the plugindir variable may not be stored within pkg config. dnl Fall back to older style of constructing the plugin dir path. - plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)" - else - ws_prefix="$($PKG_CONFIG --variable prefix wireshark)" - if test "x$ws_prefix" = "x" ; then - ws_prefix="/usr"; - fi - plugindir="${prefix}${plugindir#$ws_prefix}" + ws_plugindir="$libdir/wireshark/plugins/$ws_modversion" + ws_prefix="$prefix" fi + if test "x$ws_prefix" = "x" ; then + dnl If the wireshark prefix cannot be retrieved from pkg-config, + dnl /usr is our best bet + ws_prefix="/usr" + fi + 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 + ws_plugindir='$(prefix)'"${ws_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 - plugindir=$with_ws_plugindir + ws_plugindir=$with_ws_plugindir fi fi - AC_SUBST([plugindir]) + AC_SUBST([ws_plugindir]) ]) AC_DEFUN([LIBVIRT_RESULT_WIRESHARK],[ diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4 index adf2819ee..8c452adca 100644 --- a/m4/virt-yajl.m4 +++ b/m4/virt-yajl.m4 @@ -26,7 +26,7 @@ AC_DEFUN([LIBVIRT_CHECK_YAJL],[ AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64], [], [$PATH:/usr/bin:/usr/libexec]) if test -x "$QEMU"; then - if `$QEMU -help | grep libvirt` >/dev/null; then + if $QEMU -help 2>/dev/null | grep -q libvirt; then with_yajl=yes else [qemu_version_sed='s/.*ersion \([0-9.,]*\).*/\1/'] |