By default QEMU enables a lot of features if it can probe and find the
support libraries. It also enables a bunch of features by default.
This patch adds the ability to build --without-default-features which
can be paired with a --without-default-devices for a barely functional
build.
The main use case for this is testing our build assumptions and for
minimising the amount of stuff you build if you just want to test a
particular feature on your relatively slow emulated test system.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 159 ++++++++++++++++++++++++++++++------------------------
1 file changed, 88 insertions(+), 71 deletions(-)
diff --git a/configure b/configure
index 8f2095a2db..a08e6c96e0 100755
--- a/configure
+++ b/configure
@@ -291,10 +291,24 @@ unset target_list_exclude
#
# Always add --enable-foo and --disable-foo command line args.
# Distributions want to ensure that several features are compiled in, and it
-# is impossible without a --enable-foo that exits if a feature is not found.
+# is impossible without a --enable-foo that exits if a feature is not
+# found.
-brlapi=""
-curl=""
+default_feature=""
+default_yes_feature="yes"
+# parse CC options second
+for opt do
+ optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
+ case "$opt" in
+ --without-default-features)
+ default_feature="no"
+ default_yes_feature="no"
@@ -453,7 +467,7 @@ gettext=""
bogus_os="no"
malloc_trim="auto"
-# parse CC options first
+# parse CC options second
for opt do
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
case "$opt" in
@@ -796,7 +810,7 @@ Linux)
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
- vhost_user="yes"
+ vhost_user="$default_yes_feature"
;;
esac
@@ -940,6 +954,8 @@ for opt do
;;
--without-default-devices) default_devices="no"
;;
+ --without-default-features) # processed above
+ ;;
--enable-gprof) gprof="yes"
;;
--enable-gcov) gcov="yes"
@@ -1737,7 +1753,8 @@ Advanced options (experts only):
--gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
Optional features, enabled with --enable-FEATURE and
-disabled with --disable-FEATURE, default is enabled if available:
+disabled with --disable-FEATURE, default is enabled if available
+(unless built with --without-default-features):
system all system emulation targets
user supported user emulation targets