summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-04-27 16:17:23 +0200
committerGuido Günther <agx@sigxcpu.org>2016-04-27 16:17:23 +0200
commit1dad4b5b1f7a9e65f32f9cc3718855a7fb638a00 (patch)
tree3d5191c47c78ef89adbdcdb0976e9b51dcb16544 /m4
parentc0f0178cc4322003bc2d1553fe13ebd2d62292c8 (diff)
New upstream version 1.3.4~rc1
Diffstat (limited to 'm4')
-rw-r--r--m4/virt-compile-warnings.m422
-rw-r--r--m4/virt-host-validate.m440
-rw-r--r--m4/virt-login-shell.m42
-rw-r--r--m4/virt-nss.m42
-rw-r--r--m4/virt-wireshark.m48
5 files changed, 70 insertions, 4 deletions
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index 3dd0665c3..eb689e2f8 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -117,6 +117,20 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
[lv_cv_gcc_wlogical_op_broken=yes])
CFLAGS="$save_CFLAGS"])
+ AC_CACHE_CHECK([whether gcc gives bogus warnings for -Wlogical-op],
+ [lv_cv_gcc_wlogical_op_equal_expr_broken], [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-O2 -Wlogical-op -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define TEST1 1
+ #define TEST2 TEST1
+ ]], [[
+ int test = 0;
+ return test == TEST1 || test == TEST2;]])],
+ [lv_cv_gcc_wlogical_op_equal_expr_broken=no],
+ [lv_cv_gcc_wlogical_op_equal_expr_broken=yes])
+ CFLAGS="$save_CFLAGS"])
+
# We might fundamentally need some of these disabled forever, but
# ideally we'd turn many of them on
dontwarn="$dontwarn -Wfloat-equal"
@@ -236,7 +250,13 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
if test "$gl_cv_warn_c__Wlogical_op" = yes &&
test "$lv_cv_gcc_wlogical_op_broken" = yes; then
- AC_DEFINE_UNQUOTED([BROKEN_GCC_WLOGICALOP], 1,
+ AC_DEFINE_UNQUOTED([BROKEN_GCC_WLOGICALOP_STRCHR], 1,
[Define to 1 if gcc -Wlogical-op reports false positives on strchr])
fi
+
+ if test "$gl_cv_warn_c__Wlogical_op" = yes &&
+ test "$lv_cv_gcc_wlogical_op_equal_expr_broken" = yes; then
+ AC_DEFINE_UNQUOTED([BROKEN_GCC_WLOGICALOP_EQUAL_EXPR], 1,
+ [Define to 1 if gcc -Wlogical-op reports false positive 'or' equal expr])
+ fi
])
diff --git a/m4/virt-host-validate.m4 b/m4/virt-host-validate.m4
new file mode 100644
index 000000000..a56fe4154
--- /dev/null
+++ b/m4/virt-host-validate.m4
@@ -0,0 +1,40 @@
+dnl Copyright (C) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+dnl Copyright (C) 2016 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/>.
+
+AC_DEFUN([LIBVIRT_CHECK_HOST_VALIDATE], [
+ AC_ARG_WITH([host_validate],
+ [AS_HELP_STRING([--with-host-validate],
+ [build virt-host-validate @<:@default=check@:>@])])
+ m4_divert_text([DEFAULTS], [with_host_validate=check])
+
+ if test "x$with_host_validate" != "xno"; then
+ if test "x$with_win" = "xyes"; then
+ if test "x$with_host_validate" = "xyes"; then
+ AC_MSG_ERROR([virt-host-validate is not supported on Windows])
+ else
+ with_host_validate=no;
+ fi
+ else
+ with_host_validate=yes;
+ fi
+ fi
+
+ if test "x$with_host_validate" = "xyes" ; then
+ AC_DEFINE_UNQUOTED([WITH_HOST_VALIDATE], 1, [whether virt-host-validate is built])
+ fi
+ AM_CONDITIONAL([WITH_HOST_VALIDATE], [test "x$with_host_validate" = "xyes"])
+])
diff --git a/m4/virt-login-shell.m4 b/m4/virt-login-shell.m4
index c77ffb52e..d5e2e00e7 100644
--- a/m4/virt-login-shell.m4
+++ b/m4/virt-login-shell.m4
@@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_CHECK_LOGIN_SHELL], [
if test "x$with_login_shell" != "xno"; then
if test "x$with_win" = "xyes"; then
- if "x$with_login_shell" = "yes"; then
+ if test "x$with_login_shell" = "xyes"; then
AC_MSG_ERROR([virt-login-shell is not supported on Windows])
else
with_login_shell=no;
diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4
index 3d6e8f474..bf5c416c3 100644
--- a/m4/virt-nss.m4
+++ b/m4/virt-nss.m4
@@ -20,7 +20,7 @@ dnl
AC_DEFUN([LIBVIRT_CHECK_NSS],[
AC_ARG_WITH([nss-plugin],
[AS_HELP_STRING([--with-nss-plugin],
- [enable Name Servie Switch plugin for resolving guest IP addresses])],
+ [enable Name Service Switch plugin for resolving guest IP addresses])],
[], [with_nss_plugin=check])
bsd_nss=no
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index ac2e44cb9..d8cb7c8f5 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -29,10 +29,16 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
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$ws_plugindir" = "x" ; then
+ if test "x$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}"
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])