2015-03-16 11:52:13 +00:00
|
|
|
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
|
|
|
|
|
2016-12-12 17:11:51 +00:00
|
|
|
AC_DEFUN([LIBVIRT_ARG_WIRESHARK],[
|
2019-02-08 11:05:23 +00:00
|
|
|
LIBVIRT_ARG_WITH_FEATURE([WIRESHARK_DISSECTOR], [wireshark], [check], [2.4.0])
|
2016-12-22 11:49:51 +00:00
|
|
|
LIBVIRT_ARG_WITH([WS_PLUGINDIR],
|
|
|
|
[wireshark plugins directory for use when installing
|
|
|
|
wireshark plugin], [check])
|
2016-12-12 17:11:51 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
|
2019-02-08 11:05:23 +00:00
|
|
|
LIBVIRT_CHECK_PKG([WIRESHARK_DISSECTOR], [wireshark], [2.4.0])
|
2015-03-16 11:52:13 +00:00
|
|
|
|
|
|
|
dnl Check for system location of wireshark plugins
|
|
|
|
if test "x$with_wireshark_dissector" != "xno" ; then
|
|
|
|
if test "x$with_ws_plugindir" = "xcheck" ; then
|
2016-10-26 12:00:16 +00:00
|
|
|
ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
|
2016-10-26 14:27:05 +00:00
|
|
|
ws_exec_prefix="$($PKG_CONFIG --variable exec_prefix wireshark)"
|
2016-10-26 11:43:16 +00:00
|
|
|
ws_modversion="$($PKG_CONFIG --modversion wireshark)"
|
2016-10-26 12:00:16 +00:00
|
|
|
if test "x$ws_plugindir" = "x" ; then
|
2015-10-27 13:02:19 +00:00
|
|
|
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.
|
2016-10-26 12:00:16 +00:00
|
|
|
ws_plugindir="$libdir/wireshark/plugins/$ws_modversion"
|
2016-10-27 12:43:00 +00:00
|
|
|
else
|
2016-10-26 14:27:05 +00:00
|
|
|
if test "x$ws_exec_prefix" = "x" ; then
|
|
|
|
dnl If wireshark's exec_prefix cannot be retrieved from pkg-config,
|
|
|
|
dnl this is our best bet
|
|
|
|
ws_exec_prefix="/usr"
|
2016-10-27 12:43:00 +00:00
|
|
|
fi
|
2016-10-26 14:27:05 +00:00
|
|
|
dnl Replace wireshark's exec_prefix with our own.
|
|
|
|
dnl Note that ${exec_prefix} is kept verbatim at this point in time,
|
|
|
|
dnl and will only be expanded later, when make is called: this makes
|
|
|
|
dnl it possible to override such prefix at compilation or installation
|
|
|
|
dnl time
|
|
|
|
ws_plugindir='${exec_prefix}'"${ws_plugindir#$ws_exec_prefix}"
|
2015-10-27 13:02:19 +00:00
|
|
|
fi
|
2019-02-08 09:47:42 +00:00
|
|
|
|
|
|
|
dnl Since wireshark 2.5.0 plugins can't live in top level
|
|
|
|
dnl plugindir but have to be under one of ["epan",
|
|
|
|
dnl "wiretap", "codecs"] subdir. The first one looks okay.
|
|
|
|
ws_plugindir="$ws_plugindir/epan"
|
|
|
|
|
2015-03-16 11:52:13 +00:00
|
|
|
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
|
2016-10-26 12:00:16 +00:00
|
|
|
ws_plugindir=$with_ws_plugindir
|
2015-03-16 11:52:13 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-10-26 12:00:16 +00:00
|
|
|
AC_SUBST([ws_plugindir])
|
2015-03-16 11:52:13 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([LIBVIRT_RESULT_WIRESHARK],[
|
|
|
|
LIBVIRT_RESULT_LIB([WIRESHARK_DISSECTOR])
|
|
|
|
])
|