qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/9] configure: rewrite accelerator defaults as tests


From: Paolo Bonzini
Subject: [PATCH 3/9] configure: rewrite accelerator defaults as tests
Date: Sun, 20 Sep 2020 09:07:02 -0400

Prepare to process "auto" in meson rather than configure: localize the
code that changes "auto" to enabled/disabled, it will be moved to meson
and removed from configure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index ade456b7af..00348c2342 100755
--- a/configure
+++ b/configure
@@ -420,7 +420,7 @@ vhost_scsi=""
 vhost_vsock=""
 vhost_user=""
 vhost_user_fs=""
-kvm="disabled"
+kvm="auto"
 hax="disabled"
 hvf="disabled"
 whpx="disabled"
@@ -814,7 +814,6 @@ HOST_VARIANT_DIR=""
 case $targetos in
 MINGW32*)
   mingw32="yes"
-  hax="enabled"
   whpx="auto"
   vhost_user="no"
   audio_possible_drivers="dsound sdl"
@@ -849,7 +848,6 @@ DragonFly)
 ;;
 NetBSD)
   bsd="yes"
-  hax="enabled"
   make="${MAKE-gmake}"
   audio_drv_list="oss try-sdl"
   audio_possible_drivers="oss sdl"
@@ -866,7 +864,6 @@ OpenBSD)
 Darwin)
   bsd="yes"
   darwin="yes"
-  hax="enabled"
   hvf="auto"
   if [ "$cpu" = "x86_64" ] ; then
     QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
@@ -903,7 +900,6 @@ Linux)
   audio_possible_drivers="oss alsa sdl pa"
   linux="yes"
   linux_user="yes"
-  kvm="enabled"
   QEMU_INCLUDES="-isystem ${source_path}/linux-headers -Ilinux-headers 
$QEMU_INCLUDES"
 ;;
 esac
@@ -2664,6 +2660,28 @@ if test "$seccomp" != "no" ; then
         seccomp="no"
     fi
 fi
+
+##########################################
+# simple accelerator probes
+
+if test "$kvm" = "auto" ; then
+  if test "$linux" = yes ; then
+    kvm=enabled
+  else
+    if test "$kvm" = "enabled" ; then
+      feature_not_found "kvm" "KVM is only available on Linux"
+    fi
+  fi
+fi
+
+if test "$hax" = "auto" ; then
+  if test "$mingw" = yes || test "$darwin" = yes || test "$targetos" = NetBSD; 
then
+    hax=enabled
+  else
+    hax=disabled
+  fi
+fi
+
 ##########################################
 # xen probe
 
-- 
2.26.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]