From: Ben Pfaff Date: Tue, 22 Feb 2011 22:47:19 +0000 (-0800) Subject: configure: Reject incompatible XenServer version. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed2d4f6a5d6908e55e54117cdad45454dde93dac;p=openvswitch configure: Reject incompatible XenServer version. Suggested-by: Andrew Evans --- diff --git a/acinclude.m4 b/acinclude.m4 index 6a829d59..e2bd2c6f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -306,3 +306,29 @@ AC_DEFUN([OVS_CONDITIONAL_CC_OPTION], [$1], [ovs_have_cc_option=yes], [ovs_have_cc_option=no]) AM_CONDITIONAL([$2], [test $ovs_have_cc_option = yes])]) dnl ---------------------------------------------------------------------- + +dnl Check for too-old XenServer. +AC_DEFUN([OVS_CHECK_XENSERVER_VERSION], + [AC_CACHE_CHECK([XenServer release], [ovs_cv_xsversion], + [if test -e /etc/redhat-release; then + ovs_cv_xsversion=`sed -n 's/^XenServer DDK release \([[^-]]*\)-.*/\1/p' /etc/redhat-release` + fi + if test -z "$ovs_cv_xsversion"; then + ovs_cv_xsversion=none + fi]) + case $ovs_cv_xsversion in + none) + ;; + + [[1-9]][[0-9]]* | dnl XenServer 10 or later + [[6-9]]* | dnl XenServer 6 or later + 5.[[7-9]]* | dnl XenServer 5.7 or later + 5.6.[[1-9]][[0-9]][[0-9]][[0-9]]* | dnl XenServer 5.6.1000 or later + 5.6.[[2-9]][[0-9]][[0-9]]* | dnl XenServer 5.6.200 or later + 5.6.1[[0-9]][[0-9]]) dnl Xenserver 5.6.100 or later + ;; + + *) + AC_MSG_ERROR([This appears to be XenServer $ovs_cv_xsversion, but only XenServer 5.6.100 or later is supported. (If you are really using a supported version of XenServer, you may override this error message by specifying 'ovs_cv_xsversion=5.6.100' on the "configure" command line.)]) + ;; + esac]) diff --git a/configure.ac b/configure.ac index 47d09076..04834c28 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,7 @@ OVS_CHECK_MALLOC_HOOKS OVS_CHECK_VALGRIND OVS_CHECK_SOCKET_LIBS OVS_CHECK_LINKER_SECTIONS +OVS_CHECK_XENSERVER_VERSION OVS_ENABLE_OPTION([-Wall]) OVS_ENABLE_OPTION([-Wno-sign-compare])