mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
7c8250d765
There has been a report on the list [1] that we are not installing the wireshark dissector into the correct plugin directory. And in fact we are not. The problem is, the plugin directory path is constructed at compile time. However, it's dependent on the wireshark version, e.g. /usr/lib/wireshark/plugins/1.12.6 This is rather unfortunate, because if libvirt RPMs were built with one version, but installed on a system with newer one, the plugins are not really loaded. This problem lead fedora packagers to unify plugin path to: /usr/lib/wireshark/plugins/ Cool! But this was enabled just in wireshark-1.12.6-4. Therefore, we must require at least that version. And while at it, on some distributions, the wireshark.pc file already has a variable that defines where plugin dir is. Use that if possible. 1: https://www.redhat.com/archives/libvirt-users/2015-October/msg00063.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
50 lines
1.9 KiB
Plaintext
50 lines
1.9 KiB
Plaintext
dnl The libvirt.so wireshark plugin
|
|
dnl
|
|
dnl Copyright (C) 2015 Red Hat, Inc.
|
|
dnl
|
|
dnl This library is free software; you can redistribute it and/or
|
|
dnl modify it under the terms of the GNU Lesser General Public
|
|
dnl License as published by the Free Software Foundation; either
|
|
dnl version 2.1 of the License, or (at your option) any later version.
|
|
dnl
|
|
dnl This library is distributed in the hope that it will be useful,
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
dnl Lesser General Public License for more details.
|
|
dnl
|
|
dnl You should have received a copy of the GNU Lesser General Public
|
|
dnl License along with this library. If not, see
|
|
dnl <http://www.gnu.org/licenses/>.
|
|
dnl
|
|
|
|
AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
|
|
LIBVIRT_CHECK_PKG([WIRESHARK_DISSECTOR], [wireshark], [1.11.3])
|
|
|
|
AC_ARG_WITH([ws-plugindir],
|
|
[AS_HELP_STRING([--with-ws-plugindir],
|
|
[wireshark plugins directory for use when installing wireshark plugin])],
|
|
[], [with_ws_plugindir=check])
|
|
|
|
dnl Check for system location of wireshark plugins
|
|
if test "x$with_wireshark_dissector" != "xno" ; then
|
|
if test "x$with_ws_plugindir" = "xcheck" ; then
|
|
ws_plugindir="$($PKG_CONFIG --variable plugindir 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.
|
|
ws_plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
|
|
fi
|
|
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
|
|
ws_plugindir=$with_ws_plugindir
|
|
fi
|
|
fi
|
|
|
|
AC_SUBST([ws_plugindir])
|
|
])
|
|
|
|
AC_DEFUN([LIBVIRT_RESULT_WIRESHARK],[
|
|
LIBVIRT_RESULT_LIB([WIRESHARK_DISSECTOR])
|
|
])
|