From e85a602bb7b8394b75198178682ed5607efa1782 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 29 May 2011 12:40:24 +0200 Subject: [PATCH] openvz: Automatically disable on non-Linux systems As OpenVZ is Linux specific. --- configure.ac | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 55ae7915e5..b2ba930d48 100644 --- a/configure.ac +++ b/configure.ac @@ -255,7 +255,7 @@ AC_ARG_WITH([qemu], AC_ARG_WITH([uml], AC_HELP_STRING([--with-uml], [add UML support @<:@default=check@:>@]),[],[with_uml=check]) AC_ARG_WITH([openvz], - AC_HELP_STRING([--with-openvz], [add OpenVZ support @<:@default=yes@:>@]),[],[with_openvz=yes]) + AC_HELP_STRING([--with-openvz], [add OpenVZ support @<:@default=check@:>@]),[],[with_openvz=check]) AC_ARG_WITH([vmware], AC_HELP_STRING([--with-vmware], [add VMware support @<:@default=yes@:>@]),[],[with_vmware=yes]) AC_ARG_WITH([libssh2], @@ -348,16 +348,34 @@ AC_PATH_PROG([EBTABLES_PATH], [ebtables], /sbin/ebtables, [/usr/sbin:$PATH]) AC_DEFINE_UNQUOTED([EBTABLES_PATH], "$EBTABLES_PATH", [path to ebtables binary]) +dnl +dnl Checks for the OpenVZ driver +dnl + +if test "$with_openvz" = "check"; then + with_openvz=$with_linux +fi + +if test "$with_openvz" = "yes" && test "$with_linux" = "no"; then + AC_MSG_ERROR([The OpenVZ driver can be enabled on Linux only.]) +fi + if test "$with_openvz" = "yes"; then AC_DEFINE_UNQUOTED([WITH_OPENVZ], 1, [whether OpenVZ driver is enabled]) fi AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"]) + +dnl +dnl Checks for the VMware Workstation/Player driver +dnl + if test "$with_vmware" = "yes"; then AC_DEFINE_UNQUOTED([WITH_VMWARE], 1, [whether VMware driver is enabled]) fi AM_CONDITIONAL([WITH_VMWARE], [test "$with_vmware" = "yes"]) + dnl dnl check for XDR dnl -- GitLab