mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
wireshark: Use ${exec_prefix} instead of ${prefix}
${exec_prefix} and ${prefix} point to the same directory in most setups, but when that's not the case the former should be used for architecture-dependent data such as shared objects, which makes it the best fit for our Wireshark dissector. While at it, change all uses of $(var) to ${var}: they are absolutely identicaly as far as make's concerned, but autoconf itself seems to prefer the latter form so we might as well follow suit.
This commit is contained in:
parent
054fd1a7d0
commit
7b3b254063
@ -29,23 +29,24 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
|
|||||||
if test "x$with_wireshark_dissector" != "xno" ; then
|
if test "x$with_wireshark_dissector" != "xno" ; then
|
||||||
if test "x$with_ws_plugindir" = "xcheck" ; then
|
if test "x$with_ws_plugindir" = "xcheck" ; then
|
||||||
ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
|
ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
|
||||||
ws_prefix="$($PKG_CONFIG --variable prefix wireshark)"
|
ws_exec_prefix="$($PKG_CONFIG --variable exec_prefix wireshark)"
|
||||||
ws_modversion="$($PKG_CONFIG --modversion wireshark)"
|
ws_modversion="$($PKG_CONFIG --modversion wireshark)"
|
||||||
if test "x$ws_plugindir" = "x" ; then
|
if test "x$ws_plugindir" = "x" ; then
|
||||||
dnl On some systems the plugindir variable may not be stored within pkg config.
|
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.
|
dnl Fall back to older style of constructing the plugin dir path.
|
||||||
ws_plugindir="$libdir/wireshark/plugins/$ws_modversion"
|
ws_plugindir="$libdir/wireshark/plugins/$ws_modversion"
|
||||||
else
|
else
|
||||||
if test "x$ws_prefix" = "x" ; then
|
if test "x$ws_exec_prefix" = "x" ; then
|
||||||
dnl If the wireshark prefix cannot be retrieved from pkg-config,
|
dnl If wireshark's exec_prefix cannot be retrieved from pkg-config,
|
||||||
dnl /usr is our best bet
|
dnl this is our best bet
|
||||||
ws_prefix="/usr"
|
ws_exec_prefix="/usr"
|
||||||
fi
|
fi
|
||||||
dnl Replace the wireshark prefix with our own.
|
dnl Replace wireshark's exec_prefix with our own.
|
||||||
dnl Note that $(prefix) is kept verbatim at this point in time, and will
|
dnl Note that ${exec_prefix} is kept verbatim at this point in time,
|
||||||
dnl only be expanded later, when make is called: this makes it possible
|
dnl and will only be expanded later, when make is called: this makes
|
||||||
dnl to override the prefix at compilation or installation time
|
dnl it possible to override such prefix at compilation or installation
|
||||||
ws_plugindir='$(prefix)'"${ws_plugindir#$ws_prefix}"
|
dnl time
|
||||||
|
ws_plugindir='${exec_prefix}'"${ws_plugindir#$ws_exec_prefix}"
|
||||||
fi
|
fi
|
||||||
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])
|
||||||
|
Loading…
Reference in New Issue
Block a user