aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure123
1 files changed, 105 insertions, 18 deletions
diff --git a/configure b/configure
index f7b8c2ea94..79453a674f 100755
--- a/configure
+++ b/configure
@@ -406,7 +406,7 @@ includedir="\${prefix}/include"
sysconfdir="\${prefix}/etc"
local_statedir="\${prefix}/var"
confsuffix="/qemu"
-slirp="yes"
+slirp=""
oss_lib=""
bsd="no"
linux="no"
@@ -466,7 +466,7 @@ gcrypt_hmac="no"
auth_pam=""
vte=""
virglrenderer=""
-tpm="yes"
+tpm=""
libssh2=""
live_block_migration="yes"
numa=""
@@ -487,7 +487,7 @@ libxml2=""
docker="no"
debug_mutex="no"
libpmem=""
-libudev="no"
+default_devices="yes"
# cross compilers defaults, can be overridden with --cross-cc-ARCH
cross_cc_aarch64="aarch64-linux-gnu-gcc"
@@ -996,6 +996,10 @@ for opt do
;;
--with-trace-file=*) trace_file="$optarg"
;;
+ --with-default-devices) default_devices="yes"
+ ;;
+ --without-default-devices) default_devices="no"
+ ;;
--enable-gprof) gprof="yes"
;;
--enable-gcov) gcov="yes"
@@ -1105,6 +1109,10 @@ for opt do
;;
--disable-slirp) slirp="no"
;;
+ --enable-slirp=git) slirp="git"
+ ;;
+ --enable-slirp=system) slirp="system"
+ ;;
--disable-vde) vde="no"
;;
--enable-vde) vde="yes"
@@ -3873,20 +3881,20 @@ EOF
fi
##########################################
-# TPM passthrough is only on x86 Linux
+# TPM emulation is only on POSIX
-if test "$targetos" = Linux && { test "$cpu" = i386 || test "$cpu" = x86_64; }; then
- tpm_passthrough=$tpm
-else
- tpm_passthrough=no
+if test "$tpm" = ""; then
+ if test "$mingw32" = "yes"; then
+ tpm=no
+ else
+ tpm=yes
+ fi
+elif test "$tpm" = "yes"; then
+ if test "$mingw32" = "yes" ; then
+ error_exit "TPM emulation only available on POSIX systems"
+ fi
fi
-# TPM emulator is for all posix systems
-if test "$mingw32" != "yes"; then
- tpm_emulator=$tpm
-else
- tpm_emulator=no
-fi
##########################################
# attr probe
@@ -4589,13 +4597,24 @@ if compile_prog "" "" ; then
syncfs=yes
fi
+# Check we have a new enough version of sphinx-build
+has_sphinx_build() {
+ # This is a bit awkward but works: create a trivial document and
+ # try to run it with our configuration file (which enforces a
+ # version requirement). This will fail if either
+ # sphinx-build doesn't exist at all or if it is too old.
+ mkdir -p "$TMPDIR1/sphinx"
+ touch "$TMPDIR1/sphinx/index.rst"
+ sphinx-build -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1
+}
+
# Check if tools are available to build documentation.
if test "$docs" != "no" ; then
- if has makeinfo && has pod2man; then
+ if has makeinfo && has pod2man && has_sphinx_build; then
docs=yes
else
if test "$docs" = "yes" ; then
- feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
+ feature_not_found "docs" "Install texinfo, Perl/perl-podlators and python-sphinx"
fi
docs=no
fi
@@ -5755,6 +5774,55 @@ if test "$libpmem" != "no"; then
fi
##########################################
+# check for slirp
+
+case "$slirp" in
+ "" | yes)
+ if $pkg_config slirp; then
+ slirp=system
+ elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then
+ slirp=git
+ elif test -e "${source_path}/slirp/Makefile" ; then
+ slirp=internal
+ elif test -z "$slirp" ; then
+ slirp=no
+ else
+ feature_not_found "slirp" "Install slirp devel or git submodule"
+ fi
+ ;;
+
+ system)
+ if ! $pkg_config slirp; then
+ feature_not_found "slirp" "Install slirp devel"
+ fi
+ ;;
+esac
+
+case "$slirp" in
+ git | internal)
+ if test "$slirp" = git; then
+ git_submodules="${git_submodules} slirp"
+ fi
+ mkdir -p slirp
+ slirp_cflags="-I\$(SRC_PATH)/slirp/src -I\$(BUILD_DIR)/slirp/src"
+ slirp_libs="-L\$(BUILD_DIR)/slirp -lslirp"
+ ;;
+
+ system)
+ slirp_version=$($pkg_config --modversion slirp 2>/dev/null)
+ slirp_cflags=$($pkg_config --cflags slirp 2>/dev/null)
+ slirp_libs=$($pkg_config --libs slirp 2>/dev/null)
+ ;;
+
+ no)
+ ;;
+ *)
+ error_exit "Unknown state for slirp: $slirp"
+ ;;
+esac
+
+
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -6111,7 +6179,8 @@ echo "QEMU_LDFLAGS $QEMU_LDFLAGS"
echo "make $make"
echo "install $install"
echo "python $python ($python_version)"
-if test "$slirp" = "yes" ; then
+echo "slirp support $slirp $(echo_version $slirp $slirp_version)"
+if test "$slirp" != "no" ; then
echo "smbd $smbd"
fi
echo "module support $modules"
@@ -6250,6 +6319,7 @@ echo "capstone $capstone"
echo "docker $docker"
echo "libpmem support $libpmem"
echo "libudev $libudev"
+echo "default devices $default_devices"
if test "$supported_cpu" = "no"; then
echo
@@ -6311,6 +6381,11 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak
echo "ARCH=$ARCH" >> $config_host_mak
+if test "$default_devices" = "yes" ; then
+ echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak
+else
+ echo "CONFIG_MINIKCONF_MODE=--allnoconfig" >> $config_host_mak
+fi
if test "$debug_tcg" = "yes" ; then
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
fi
@@ -6372,9 +6447,14 @@ fi
if test "$profiler" = "yes" ; then
echo "CONFIG_PROFILER=y" >> $config_host_mak
fi
-if test "$slirp" = "yes" ; then
+if test "$slirp" != "no"; then
echo "CONFIG_SLIRP=y" >> $config_host_mak
echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
+ echo "SLIRP_CFLAGS=$slirp_cflags" >> $config_host_mak
+ echo "SLIRP_LIBS=$slirp_libs" >> $config_host_mak
+fi
+if [ "$slirp" = "git" -o "$slirp" = "internal" ]; then
+ echo "config-host.h: subdir-slirp" >> $config_host_mak
fi
if test "$vde" = "yes" ; then
echo "CONFIG_VDE=y" >> $config_host_mak
@@ -7427,12 +7507,18 @@ fi
if supported_xen_target $target; then
echo "CONFIG_XEN=y" >> $config_target_mak
+ echo "$target/config-devices.mak: CONFIG_XEN=y" >> $config_host_mak
if test "$xen_pci_passthrough" = yes; then
echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
fi
+else
+ echo "$target/config-devices.mak: CONFIG_XEN=n" >> $config_host_mak
fi
if supported_kvm_target $target; then
echo "CONFIG_KVM=y" >> $config_target_mak
+ echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak
+else
+ echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak
fi
if supported_hax_target $target; then
echo "CONFIG_HAX=y" >> $config_target_mak
@@ -7663,6 +7749,7 @@ LINKS="$LINKS pc-bios/qemu-icon.bmp"
LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit
LINKS="$LINKS tests/acceptance tests/data"
LINKS="$LINKS tests/qemu-iotests/check"
+LINKS="$LINKS python"
for bios_file in \
$source_path/pc-bios/*.bin \
$source_path/pc-bios/*.lid \