From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 3/9] configure: rewrite accelerator defaults as tests
Date: Sun, 20 Sep 2020 09:07:02 -0400 [thread overview]
Message-ID: <20200920130708.1156310-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20200920130708.1156310-1-pbonzini@redhat.com>
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
next prev parent reply other threads:[~2020-09-20 13:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 13:06 [RFC PATCH 0/9] Move target configuration to meson Paolo Bonzini
2020-09-20 13:07 ` [PATCH 1/9] default-configs: move files to default-configs/devices/ Paolo Bonzini
2020-09-20 23:56 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 2/9] configure: convert accelerator variables to meson options Paolo Bonzini
2020-09-21 0:04 ` Richard Henderson
2020-09-20 13:07 ` Paolo Bonzini [this message]
2020-09-21 0:06 ` [PATCH 3/9] configure: rewrite accelerator defaults as tests Richard Henderson
2020-09-20 13:07 ` [PATCH 4/9] configure: move accelerator logic to meson Paolo Bonzini
2020-09-21 0:17 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 5/9] configure: remove dead variable Paolo Bonzini
2020-09-21 0:17 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 6/9] configure: move CONFIG_* symbols to meson Paolo Bonzini
2020-09-21 0:20 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 7/9] configure: remove target configuration Paolo Bonzini
2020-09-20 13:13 ` 罗勇刚(Yonggang Luo)
2020-09-20 16:44 ` Paolo Bonzini
2020-09-20 13:07 ` [PATCH 8/9] default-configs/targets: remove useless lines Paolo Bonzini
2020-09-21 0:29 ` Richard Henderson
2020-09-21 7:50 ` Paolo Bonzini
2020-09-20 13:07 ` [PATCH 9/9] default-configs: remove default-configs/devices for user-mode targets Paolo Bonzini
2020-09-21 0:30 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200920130708.1156310-4-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).