if test -e "$source_path/.git"
then
git_submodules_action="update"
- git_submodules="ui/keycodemapdb"
- git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
- git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
else
git_submodules_action="ignore"
- git_submodules=""
-
- if ! test -f "$source_path/ui/keycodemapdb/README"
- then
- echo
- echo "ERROR: missing file $source_path/ui/keycodemapdb/README"
- echo
- echo "This is not a GIT checkout but module content appears to"
- echo "be missing. Do not use 'git archive' or GitHub download links"
- echo "to acquire QEMU source archives. Non-GIT builds are only"
- echo "supported with source archives linked from:"
- echo
- echo " https://www.qemu.org/download/#source"
- echo
- echo "Developers working with GIT can use scripts/archive-source.sh"
- echo "if they need to create valid source archives."
- echo
- exit 1
- fi
fi
+
+git_submodules="ui/keycodemapdb"
git="git"
# Don't accept a target_list environment variable.
trace_backends="log"
trace_file="trace"
spice="$default_feature"
+spice_protocol="auto"
rbd="auto"
smartcard="$default_feature"
u2f="auto"
nettle="$default_feature"
nettle_xts="no"
gcrypt="$default_feature"
-gcrypt_hmac="no"
gcrypt_xts="no"
qemu_private_xts="yes"
auth_pam="$default_feature"
;;
--disable-spice) spice="no"
;;
- --enable-spice) spice="yes"
+ --enable-spice)
+ spice_protocol="yes"
+ spice="yes"
+ ;;
+ --disable-spice-protocol)
+ spice_protocol="no"
+ spice="no"
+ ;;
+ --enable-spice-protocol) spice_protocol="yes"
;;
--disable-libiscsi) libiscsi="disabled"
;;
fi
;;
ignore)
+ if ! test -f "$source_path/ui/keycodemapdb/README"
+ then
+ echo
+ echo "ERROR: missing GIT submodules"
+ echo
+ if test -e "$source_path/.git"; then
+ echo "--with-git-submodules=ignore specified but submodules were not"
+ echo "checked out. Please initialize and update submodules."
+ else
+ echo "This is not a GIT checkout but module content appears to"
+ echo "be missing. Do not use 'git archive' or GitHub download links"
+ echo "to acquire QEMU source archives. Non-GIT builds are only"
+ echo "supported with source archives linked from:"
+ echo
+ echo " https://www.qemu.org/download/#source"
+ echo
+ echo "Developers working with GIT can use scripts/archive-source.sh"
+ echo "if they need to create valid source archives."
+ fi
+ echo
+ exit 1
+ fi
;;
*)
echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
vhost-user-blk-server vhost-user-blk server support
vhost-vdpa vhost-vdpa kernel backend support
spice spice
+ spice-protocol spice-protocol
rbd rados block device (rbd)
libiscsi iscsi support
libnfs nfs support
cat > $TMPC << EOF
#if defined(__clang_major__) && defined(__clang_minor__)
# ifdef __apple_build_version__
-# if __clang_major__ < 5 || (__clang_major__ == 5 && __clang_minor__ < 1)
-# error You need at least XCode Clang v5.1 to compile QEMU
+# if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
+# error You need at least XCode Clang v10.0 to compile QEMU
# endif
# else
-# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
-# error You need at least Clang v3.4 to compile QEMU
+# if __clang_major__ < 6 || (__clang_major__ == 6 && __clang_minor__ < 0)
+# error You need at least Clang v6.0 to compile QEMU
# endif
# endif
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
-# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
-# error You need at least GCC v4.8 to compile QEMU
+# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 5)
+# error You need at least GCC v7.5.0 to compile QEMU
# endif
#else
# error You either need GCC or Clang to compiler QEMU
int main (void) { return 0; }
EOF
if ! compile_prog "" "" ; then
- error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v5.1)"
+ error_exit "You need at least GCC v7.5 or Clang v6.0 (or XCode Clang v10.0)"
fi
# Accumulate -Wfoo and -Wno-bar separately.
fi
fi
+if test "$tcg" = "enabled"; then
+ git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
+ git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
+fi
+
if test -z "${target_list+xxx}" ; then
default_targets=yes
for target in $default_target_list; do
if test "$gnutls" != "no"; then
pass="no"
- if $pkg_config --exists "gnutls >= 3.1.18"; then
+ if $pkg_config --exists "gnutls >= 3.5.18"; then
gnutls_cflags=$($pkg_config --cflags gnutls)
gnutls_libs=$($pkg_config --libs gnutls)
# Packaging for the static libraries is not always correct.
maj=`libgcrypt-config --version | awk -F . '{print $1}'`
min=`libgcrypt-config --version | awk -F . '{print $2}'`
- if test $maj != 1 || test $min -lt 5
+ if test $maj != 1 || test $min -lt 8
then
return 1
fi
if test "$nettle" != "no"; then
pass="no"
- if $pkg_config --exists "nettle >= 2.7.1"; then
+ if $pkg_config --exists "nettle >= 3.4"; then
nettle_cflags=$($pkg_config --cflags nettle)
nettle_libs=$($pkg_config --libs nettle)
- nettle_version=$($pkg_config --modversion nettle)
# Link test to make sure the given libraries work (e.g for static).
write_c_skeleton
if compile_prog "" "$nettle_libs" ; then
gcrypt="yes"
cat > $TMPC << EOF
#include <gcrypt.h>
-int main(void) {
- gcry_mac_hd_t handle;
- gcry_mac_open(&handle, GCRY_MAC_HMAC_MD5,
- GCRY_MAC_FLAG_SECURE, NULL);
- return 0;
-}
-EOF
- if compile_prog "$gcrypt_cflags" "$gcrypt_libs" ; then
- gcrypt_hmac=yes
- fi
- cat > $TMPC << EOF
-#include <gcrypt.h>
int main(void) {
gcry_cipher_hd_t handle;
gcry_cipher_open(&handle, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_XTS, 0);
##########################################
# glib support probe
-glib_req_ver=2.48
+glib_req_ver=2.56
glib_modules=gthread-2.0
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-export-2.0"
##########################################
# libssh probe
if test "$libssh" != "no" ; then
- if $pkg_config --exists libssh; then
+ if $pkg_config --exists "libssh >= 0.8.7"; then
libssh_cflags=$($pkg_config libssh --cflags)
libssh_libs=$($pkg_config libssh --libs)
libssh=yes
fi
fi
-##########################################
-# Check for libssh 0.8
-# This is done like this instead of using the LIBSSH_VERSION_* and
-# SSH_VERSION_* macros because some distributions in the past shipped
-# snapshots of the future 0.8 from Git, and those snapshots did not
-# have updated version numbers (still referring to 0.7.0).
-
-if test "$libssh" = "yes"; then
- cat > $TMPC <<EOF
-#include <libssh/libssh.h>
-int main(void) { return ssh_get_server_publickey(NULL, NULL); }
-EOF
- if compile_prog "$libssh_cflags" "$libssh_libs"; then
- libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
- fi
-fi
-
##########################################
# linux-aio probe
case "$fdt" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} dtc"
- fi
+ git_submodules="${git_submodules} dtc"
;;
esac
##########################################
# spice probe
+if test "$spice_protocol" != "no" ; then
+ spice_protocol_cflags=$($pkg_config --cflags spice-protocol 2>/dev/null)
+ if $pkg_config --atleast-version=0.12.3 spice-protocol; then
+ spice_protocol="yes"
+ else
+ if test "$spice_protocol" = "yes" ; then
+ feature_not_found "spice_protocol" \
+ "Install spice-protocol(>=0.12.3) devel"
+ fi
+ spice_protocol="no"
+ fi
+fi
+
if test "$spice" != "no" ; then
cat > $TMPC << EOF
#include <spice.h>
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
if $pkg_config --atleast-version=0.12.5 spice-server && \
- $pkg_config --atleast-version=0.12.3 spice-protocol && \
+ test "$spice_protocol" = "yes" && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
else
if test "$spice" = "yes" ; then
feature_not_found "spice" \
- "Install spice-server(>=0.12.5) and spice-protocol(>=0.12.3) devel"
+ "Install spice-server(>=0.12.5) devel"
fi
spice="no"
fi
case "$capstone" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} capstone"
- fi
+ git_submodules="${git_submodules} capstone"
;;
esac
case "$slirp" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} slirp"
- fi
+ git_submodules="${git_submodules} slirp"
;;
esac
roms="$roms s390-ccw"
# SLOF is required for building the s390-ccw firmware on s390x,
# since it is using the libnet code from SLOF for network booting.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} roms/SLOF"
- fi
+ git_submodules="${git_submodules} roms/SLOF"
fi
fi
fi
if test "$gcrypt" = "yes" ; then
echo "CONFIG_GCRYPT=y" >> $config_host_mak
- if test "$gcrypt_hmac" = "yes" ; then
- echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
- fi
echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
fi
if test "$nettle" = "yes" ; then
echo "CONFIG_NETTLE=y" >> $config_host_mak
- echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak
echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak
echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak
fi
if test "$posix_memalign" = "yes" ; then
echo "CONFIG_POSIX_MEMALIGN=y" >> $config_host_mak
fi
+
+if test "$spice_protocol" = "yes" ; then
+ echo "CONFIG_SPICE_PROTOCOL=y" >> $config_host_mak
+ echo "SPICE_PROTOCOL_CFLAGS=$spice_protocol_cflags" >> $config_host_mak
+fi
if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
- echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
+ echo "SPICE_CFLAGS=$spice_cflags $spice_protocol_cflags" >> $config_host_mak
echo "SPICE_LIBS=$spice_libs" >> $config_host_mak
fi
# Create list of config switches that should be poisoned in common code...
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
-sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
- -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
- *-config-devices.h *-config-target.h | \
- sort -u > config-poison.h
+target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
+if test -n "$target_configs_h" ; then
+ sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
+ -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
+ $target_configs_h | sort -u > config-poison.h
+else
+ :> config-poison.h
+fi
# Save the configure command line for later reuse.
cat <<EOD >config.status