-Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
-Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
;;
+ -std=gnu99)
+ QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }"-std=gnu++98"
+ ;;
*)
QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
;;
fdt=""
netmap="no"
sdl=""
-sdlabi=""
+sdl_image=""
virtfs=""
mpath=""
vnc="yes"
xkbcommon=""
xen=""
xen_ctrl_version=""
-xen_pv_domain_build="no"
xen_pci_passthrough=""
linux_aio=""
cap_ng=""
lzo=""
snappy=""
bzip2=""
+lzfse=""
guest_agent=""
guest_agent_with_vss="no"
guest_agent_ntddscsi="no"
jemalloc="no"
replication="yes"
vxhs=""
+bochs="yes"
+cloop="yes"
+dmg="yes"
+qcow1="yes"
+vdi="yes"
+vvfat="yes"
+qed="yes"
+parallels="yes"
+sheepdog="yes"
libxml2=""
docker="no"
debug_mutex="no"
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
}
pkg_config=query_pkg_config
-sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
# left shift of signed integers is well defined and has the expected
# 2s-complement style results. (Both clang and gcc agree that it
# provides these semantics.)
-QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
+QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS"
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
else
cpu="s390"
fi
+elif check_define __riscv ; then
+ if check_define _LP64 ; then
+ cpu="riscv64"
+ else
+ cpu="riscv32"
+ fi
elif check_define __arm__ ; then
cpu="arm"
elif check_define __aarch64__ ; then
# Normalise host CPU name and set ARCH.
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
- ppc|ppc64|s390|s390x|sparc64|x32)
+ ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
cpu="$cpu"
supported_cpu="yes"
eval "cross_cc_${cpu}=\$host_cc"
;;
GNU/kFreeBSD)
bsd="yes"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
;;
FreeBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
# needed for kinfo_getvmmap(3) in libutil.h
LIBS="-lutil $LIBS"
DragonFly)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
HOST_VARIANT_DIR="dragonfly"
;;
NetBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl"
oss_lib="-lossaudio"
HOST_VARIANT_DIR="netbsd"
OpenBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="sdl"
+ audio_drv_list="try-sdl"
audio_possible_drivers="sdl"
HOST_VARIANT_DIR="openbsd"
supported_os="yes"
LDFLAGS="-arch x86_64 $LDFLAGS"
fi
cocoa="yes"
- audio_drv_list="coreaudio"
+ audio_drv_list="coreaudio try-sdl"
audio_possible_drivers="coreaudio sdl"
LDFLAGS="-framework CoreFoundation -framework IOKit $LDFLAGS"
libs_softmmu="-F/System/Library/Frameworks -framework Cocoa -framework IOKit $libs_softmmu"
install="${INSTALL-ginstall}"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
if test -f /usr/include/sys/soundcard.h ; then
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
fi
audio_possible_drivers="oss sdl"
# needed for CMSG_ macros in sys/socket.h
LIBS="-lposix_error_mapper -lnetwork $LIBS"
;;
Linux)
- audio_drv_list="oss"
+ audio_drv_list="try-pa try-alsa try-sdl oss"
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
vhost_crypto="yes"
vhost_scsi="yes"
vhost_vsock="yes"
- QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
+ QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
supported_os="yes"
libudev="yes"
;;
if test "$mingw32" = "yes" ; then
EXESUF=".exe"
DSOSUF=".dll"
- QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
- # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
- QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
# MinGW needs -mthreads for TLS and macro _MT.
QEMU_CFLAGS="-mthreads $QEMU_CFLAGS"
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
;;
--enable-sdl) sdl="yes"
;;
- --with-sdlabi=*) sdlabi="$optarg"
+ --disable-sdl-image) sdl_image="no"
+ ;;
+ --enable-sdl-image) sdl_image="yes"
;;
--disable-qom-cast-debug) qom_cast_debug="no"
;;
;;
--enable-xen-pci-passthrough) xen_pci_passthrough="yes"
;;
- --disable-xen-pv-domain-build) xen_pv_domain_build="no"
- ;;
- --enable-xen-pv-domain-build) xen_pv_domain_build="yes"
- ;;
--disable-brlapi) brlapi="no"
;;
--enable-brlapi) brlapi="yes"
;;
--enable-bzip2) bzip2="yes"
;;
+ --enable-lzfse) lzfse="yes"
+ ;;
+ --disable-lzfse) lzfse="no"
+ ;;
--enable-guest-agent) guest_agent="yes"
;;
--disable-guest-agent) guest_agent="no"
;;
--enable-vxhs) vxhs="yes"
;;
+ --disable-bochs) bochs="no"
+ ;;
+ --enable-bochs) bochs="yes"
+ ;;
+ --disable-cloop) cloop="no"
+ ;;
+ --enable-cloop) cloop="yes"
+ ;;
+ --disable-dmg) dmg="no"
+ ;;
+ --enable-dmg) dmg="yes"
+ ;;
+ --disable-qcow1) qcow1="no"
+ ;;
+ --enable-qcow1) qcow1="yes"
+ ;;
+ --disable-vdi) vdi="no"
+ ;;
+ --enable-vdi) vdi="yes"
+ ;;
+ --disable-vvfat) vvfat="no"
+ ;;
+ --enable-vvfat) vvfat="yes"
+ ;;
+ --disable-qed) qed="no"
+ ;;
+ --enable-qed) qed="yes"
+ ;;
+ --disable-parallels) parallels="no"
+ ;;
+ --enable-parallels) parallels="yes"
+ ;;
+ --disable-sheepdog) sheepdog="no"
+ ;;
+ --enable-sheepdog) sheepdog="yes"
+ ;;
--disable-vhost-user) vhost_user="no"
;;
--enable-vhost-user)
--tls-priority default TLS protocol/cipher priority string
--enable-gprof QEMU profiling with gprof
--enable-profiler profiler support
- --enable-xen-pv-domain-build
- xen pv domain builder
--enable-debug-stack-usage
track the maximum stack usage of stacks created by qemu_alloc_stack
nettle nettle cryptography support
gcrypt libgcrypt cryptography support
sdl SDL UI
- --with-sdlabi select preferred SDL ABI 1.2 or 2.0
+ sdl_image SDL Image support for icons
gtk gtk UI
vte vte support for the gtk UI
curses curses UI
snappy support of snappy compression library
bzip2 support of bzip2 compression library
(for reading bzip2-compressed dmg images)
+ lzfse support of lzfse compression library
+ (for reading lzfse-compressed dmg images)
seccomp seccomp support
coroutine-pool coroutine freelist (better performance)
glusterfs GlusterFS backend
qom-cast-debug cast debugging support
tools build qemu-io, qemu-nbd and qemu-image tools
vxhs Veritas HyperScale vDisk backend support
+ bochs bochs image format support
+ cloop cloop image format support
+ dmg dmg image format support
+ qcow1 qcow v1 image format support
+ vdi vdi image format support
+ vvfat vvfat image format support
+ qed qed image format support
+ parallels parallels image format support
+ sheepdog sheepdog block driver support
crypto-afalg Linux AF_ALG crypto backend driver
vhost-user vhost-user support
capstone capstone disassembler support
"Use --python=/path/to/python to specify a supported Python."
fi
+# Preserve python version since some functionality is dependent on it
+python_version=$($python -V 2>&1 | sed -e 's/Python\ //')
+
# Suppress writing compiled files
python="$python -B"
error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')"
fi
+# Check whether the compiler matches our minimum requirements:
+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
+# endif
+# else
+# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
+# error You need at least Clang v3.4 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
+# endif
+#else
+# error You either need GCC or Clang to compiler QEMU
+#endif
+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)"
+fi
+
gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
QEMU_CFLAGS="$QEMU_CFLAGS -Wno-missing-braces"
fi
-# Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC and
-# large functions that use global variables. The bug is in all releases of
-# GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fixed in
-# 4.7.3 and 4.8.0. We should be able to delete this at the end of 2013.
-cat > $TMPC << EOF
-#if __GNUC__ == 4 && (__GNUC_MINOR__ == 6 || (__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ <= 2))
-int main(void) { return 0; }
-#else
-#error No bug in this compiler.
-#endif
-EOF
-if compile_prog "-Werror -fno-gcse" "" ; then
- TRANSLATE_OPT_CFLAGS=-fno-gcse
-fi
-
+# Static linking is not possible with modules or PIE
if test "$static" = "yes" ; then
if test "$modules" = "yes" ; then
error_exit "static and modules are mutually incompatible"
fi
fi
+##########################################
+# lzfse check
+
+if test "$lzfse" != "no" ; then
+ cat > $TMPC << EOF
+#include <lzfse.h>
+int main(void) { lzfse_decode_scratch_size(); return 0; }
+EOF
+ if compile_prog "" "-llzfse" ; then
+ lzfse="yes"
+ else
+ if test "$lzfse" = "yes"; then
+ feature_not_found "lzfse" "Install lzfse devel"
+ fi
+ lzfse="no"
+ fi
+fi
+
##########################################
# libseccomp check
fi
QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
- LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
else
xen_libs="-lxenstore -lxenctrl -lxenguest"
xenforeignmemory_handle *xfmem;
xenevtchn_handle *xe;
xengnttab_handle *xg;
- xen_domain_handle_t handle;
xengnttab_grant_copy_segment_t* seg = NULL;
xs_daemon_open();
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
- xc_domain_create(xc, 0, handle, 0, NULL, NULL);
xfmem = xenforeignmemory_open(0, 0);
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
xenforeignmemory_handle *xfmem;
xenevtchn_handle *xe;
xengnttab_handle *xg;
- xen_domain_handle_t handle;
xs_daemon_open();
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
- xc_domain_create(xc, 0, handle, 0, NULL, NULL);
xfmem = xenforeignmemory_open(0, 0);
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
then
xen_ctrl_version=40701
xen=yes
- elif
- cat > $TMPC <<EOF &&
-#include <xenctrl.h>
-#include <stdint.h>
-int main(void) {
- xc_interface *xc = NULL;
- xen_domain_handle_t handle;
- xc_domain_create(xc, 0, handle, 0, NULL, NULL);
- return 0;
-}
-EOF
- compile_prog "" "$xen_libs"
- then
- xen_ctrl_version=40700
- xen=yes
# Xen 4.6
elif
fi
fi
-if test "$xen_pv_domain_build" = "yes" &&
- test "$xen" != "yes"; then
- error_exit "User requested Xen PV domain builder support" \
- "which requires Xen support."
-fi
-
##########################################
# Windows Hypervisor Platform accelerator (WHPX) check
if test "$whpx" != "no" ; then
sdl_probe ()
{
- sdl_too_old=no
- if test "$sdlabi" = ""; then
- if $pkg_config --exists "sdl2"; then
- sdlabi=2.0
- elif $pkg_config --exists "sdl"; then
- sdlabi=1.2
- else
- sdlabi=2.0
- fi
- fi
-
- if test $sdlabi = "2.0"; then
- sdl_config=$sdl2_config
- sdlname=sdl2
- sdlconfigname=sdl2_config
- elif test $sdlabi = "1.2"; then
- sdlname=sdl
- sdlconfigname=sdl_config
- else
- error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0"
- fi
-
- if test "$(basename $sdl_config)" != $sdlconfigname && ! has ${sdl_config}; then
- sdl_config=$sdlconfigname
- fi
-
- if $pkg_config $sdlname --exists; then
- sdlconfig="$pkg_config $sdlname"
+ if $pkg_config sdl2 --exists; then
+ sdlconfig="$pkg_config sdl2"
sdlversion=$($sdlconfig --modversion 2>/dev/null)
elif has ${sdl_config}; then
- sdlconfig="$sdl_config"
+ sdlconfig="$sdl2_config"
sdlversion=$($sdlconfig --version)
else
if test "$sdl" = "yes" ; then
sdl_cflags=$($sdlconfig --cflags 2>/dev/null)
sdl_cflags="$sdl_cflags -Wno-undef" # workaround 2.0.8 bug
if test "$static" = "yes" ; then
- if $pkg_config $sdlname --exists; then
- sdl_libs=$($pkg_config $sdlname --static --libs 2>/dev/null)
+ if $pkg_config sdl2 --exists; then
+ sdl_libs=$($pkg_config sdl2 --static --libs 2>/dev/null)
else
sdl_libs=$($sdlconfig --static-libs 2>/dev/null)
fi
sdl_libs=$($sdlconfig --libs 2>/dev/null)
fi
if compile_prog "$sdl_cflags" "$sdl_libs" ; then
- if test $(echo $sdlversion | sed 's/[^0-9]//g') -lt 121 ; then
- sdl_too_old=yes
- else
- sdl=yes
- fi
+ sdl=yes
# static link with sdl ? (note: sdl.pc's --static --libs is broken)
if test "$sdl" = "yes" -a "$static" = "yes" ; then
fi # static link
else # sdl not found
if test "$sdl" = "yes" ; then
- feature_not_found "sdl" "Install SDL devel"
+ feature_not_found "sdl" "Install SDL2 devel"
fi
sdl=no
fi # sdl compile test
}
+sdl_image_probe ()
+{
+ if test "$sdl_image" != "no" ; then
+ if $pkg_config SDL2_image --exists; then
+ if test "$static" = "yes"; then
+ sdl_image_libs=$($pkg_config SDL2_image --libs --static 2>/dev/null)
+ else
+ sdl_image_libs=$($pkg_config SDL2_image --libs 2>/dev/null)
+ fi
+ sdl_image_cflags=$($pkg_config SDL2_image --cflags 2>/dev/null)
+ sdl_image=yes
+
+ sdl_cflags="$sdl_cflags $sdl_image_cflags"
+ sdl_libs="$sdl_libs $sdl_image_libs"
+ else
+ if test "$sdl_image" = "yes" ; then
+ feature_not_found "sdl_image" "Install SDL Image devel"
+ else
+ sdl_image=no
+ fi
+ fi
+ fi
+}
+
if test "$sdl" != "no" ; then
sdl_probe
fi
+if test "$sdl" = "yes" ; then
+ sdl_image_probe
+else
+ if test "$sdl_image" = "yes"; then
+ echo "warning: SDL Image requested, but SDL is not available, disabling"
+ fi
+ sdl_image=no
+fi
+
if test "$sdl" = "yes" ; then
cat > $TMPC <<EOF
#include <SDL.h>
##########################################
# Sound support libraries probe
-audio_drv_probe()
-{
- drv=$1
- hdr=$2
- lib=$3
- exp=$4
- cfl=$5
- cat > $TMPC << EOF
-#include <$hdr>
-int main(void) { $exp }
-EOF
- if compile_prog "$cfl" "$lib" ; then
- :
- else
- error_exit "$drv check failed" \
- "Make sure to have the $drv libs and headers installed."
- fi
-}
-
audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/,/ /g')
for drv in $audio_drv_list; do
case $drv in
- alsa)
- audio_drv_probe $drv alsa/asoundlib.h -lasound \
- "return snd_pcm_close((snd_pcm_t *)0);"
- alsa_libs="-lasound"
+ alsa | try-alsa)
+ if $pkg_config alsa --exists; then
+ alsa_libs=$($pkg_config alsa --libs)
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/')
+ fi
+ else
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
+ fi
;;
- pa)
- audio_drv_probe $drv pulse/pulseaudio.h "-lpulse" \
- "pa_context_set_source_output_volume(NULL, 0, NULL, NULL, NULL); return 0;"
- pulse_libs="-lpulse"
- audio_pt_int="yes"
+ pa | try-pa)
+ if $pkg_config libpulse --exists; then
+ pulse_libs=$($pkg_config libpulse --libs)
+ audio_pt_int="yes"
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+ fi
+ else
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
+ fi
;;
sdl)
fi
;;
+ try-sdl)
+ if test "$sdl" = "no"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl//')
+ else
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl/sdl/')
+ fi
+ ;;
+
coreaudio)
coreaudio_libs="-framework CoreAudio"
;;
"Make sure to have the pthread libs and headers installed."
fi
-# check for pthread_setname_np
-pthread_setname_np=no
+# check for pthread_setname_np with thread id
+pthread_setname_np_w_tid=no
cat > $TMPC << EOF
#include <pthread.h>
}
EOF
if compile_prog "" "$pthread_lib" ; then
- pthread_setname_np=yes
+ pthread_setname_np_w_tid=yes
+fi
+
+# check for pthread_setname_np without thread id
+pthread_setname_np_wo_tid=no
+cat > $TMPC << EOF
+#include <pthread.h>
+
+static void *f(void *p) { pthread_setname_np("QEMU"); }
+int main(void)
+{
+ pthread_t thread;
+ pthread_create(&thread, 0, f, 0);
+ return 0;
+}
+EOF
+if compile_prog "" "$pthread_lib" ; then
+ pthread_setname_np_wo_tid=yes
fi
##########################################
cat > $TMPC << EOF
#include <libfdt.h>
#include <libfdt_env.h>
-int main(void) { fdt_first_subnode(0, 0); return 0; }
+int main(void) { fdt_check_full(NULL, 0); return 0; }
EOF
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
fi
fi
+if test "$opengl" = "yes" -a "$have_x11" = "yes"; then
+ for target in $target_list; do
+ case $target in
+ lm32-softmmu) # milkymist-tmu2 requires X11 and OpenGL
+ need_x11=yes
+ ;;
+ esac
+ done
+fi
+
##########################################
# libxml2 probe
if test "$libxml2" != "no" ; then
signalfd=yes
fi
+# check if optreset global is declared by <getopt.h>
+optreset="no"
+cat > $TMPC << EOF
+#include <getopt.h>
+int main(void) { return optreset; }
+EOF
+
+if compile_prog "" "" ; then
+ optreset=yes
+fi
+
# check if eventfd is supported
eventfd=no
cat > $TMPC << EOF
libs_qga="$libs_qga -lrt"
fi
-if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
- "$haiku" != "yes" ; then
+# Check whether we need to link libutil for openpty()
+cat > $TMPC << EOF
+extern int openpty(int *am, int *as, char *name, void *termp, void *winp);
+int main(void) { return openpty(0, 0, 0, 0, 0); }
+EOF
+
+if ! compile_prog "" "" ; then
+ if compile_prog "" "-lutil" ; then
libs_softmmu="-lutil $libs_softmmu"
+ libs_tools="-lutil $libs_tools"
+ fi
fi
##########################################
EOF
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.0 spice-server && \
+ if $pkg_config --atleast-version=0.12.5 spice-server && \
$pkg_config --atleast-version=0.12.3 spice-protocol && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
else
if test "$spice" = "yes" ; then
feature_not_found "spice" \
- "Install spice-server(>=0.12.0) and spice-protocol(>=0.12.3) devel"
+ "Install spice-server(>=0.12.5) and spice-protocol(>=0.12.3) devel"
fi
spice="no"
fi
int128=no
cat > $TMPC << EOF
-#if defined(__clang_major__) && defined(__clang_minor__)
-# if ((__clang_major__ < 3) || (__clang_major__ == 3) && (__clang_minor__ < 2))
-# error __int128_t does not work in CLANG before 3.2
-# endif
-#endif
__int128_t a;
__uint128_t b;
int main (void) {
qemu_moddir=$libdir$confsuffix
qemu_datadir=$datadir$confsuffix
qemu_localedir="$datadir/locale"
+qemu_icondir="$datadir/icons"
+qemu_desktopdir="$datadir/applications"
# We can only support ivshmem if we have eventfd
if [ "$eventfd" = "yes" ]; then
roms="$roms spapr-rtas"
fi
+# Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
if test "$cpu" = "s390x" ; then
- roms="$roms s390-ccw"
+ write_c_skeleton
+ if compile_prog "-march=z900" ""; then
+ roms="$roms s390-ccw"
+ fi
fi
# Probe for the need for relocating the user-only binary.
echo "QEMU_LDFLAGS $QEMU_LDFLAGS"
echo "make $make"
echo "install $install"
-echo "python $python"
+echo "python $python ($python_version)"
if test "$slirp" = "yes" ; then
echo "smbd $smbd"
fi
echo "Cocoa support $cocoa"
fi
echo "SDL support $sdl $(echo_version $sdl $sdlversion)"
+echo "SDL image support $sdl_image"
echo "GTK support $gtk $(echo_version $gtk $gtk_version)"
echo "GTK GL support $gtk_gl"
echo "VTE support $vte $(echo_version $vte $vteversion)"
echo "xen support $xen"
if test "$xen" = "yes" ; then
echo "xen ctrl version $xen_ctrl_version"
- echo "pv dom build $xen_pv_domain_build"
fi
echo "brlapi support $brlapi"
echo "bluez support $bluez"
echo "lzo support $lzo"
echo "snappy support $snappy"
echo "bzip2 support $bzip2"
+echo "lzfse support $lzfse"
echo "NUMA host support $numa"
echo "libxml2 $libxml2"
echo "tcmalloc support $tcmalloc"
echo "avx2 optimization $avx2_opt"
echo "replication support $replication"
echo "VxHS block device $vxhs"
+echo "bochs support $bochs"
+echo "cloop support $cloop"
+echo "dmg support $dmg"
+echo "qcow v1 support $qcow1"
+echo "vdi support $vdi"
+echo "vvfat support $vvfat"
+echo "qed support $qed"
+echo "parallels support $parallels"
+echo "sheepdog support $sheepdog"
echo "capstone $capstone"
echo "docker $docker"
echo "libpmem support $libpmem"
echo "libudev $libudev"
-if test "$sdl_too_old" = "yes"; then
-echo "-> Your SDL version is too old - please upgrade to have SDL support"
-fi
-
-if test "$sdlabi" = "1.2"; then
- echo
- echo "WARNING: Use of SDL 1.2 is deprecated and will be removed in"
- echo "WARNING: future releases. Please switch to using SDL 2.0"
-fi
-
if test "$supported_cpu" = "no"; then
echo
echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
fi
echo "qemu_helperdir=$libexecdir" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
+echo "qemu_icondir=$qemu_icondir" >> $config_host_mak
+echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
fi
if test "$sdl" = "yes" ; then
echo "CONFIG_SDL=m" >> $config_host_mak
- echo "CONFIG_SDLABI=$sdlabi" >> $config_host_mak
echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
echo "SDL_LIBS=$sdl_libs" >> $config_host_mak
+ if test "$sdl_image" = "yes" ; then
+ echo "CONFIG_SDL_IMAGE=y" >> $config_host_mak
+ fi
fi
if test "$cocoa" = "yes" ; then
echo "CONFIG_COCOA=y" >> $config_host_mak
if test "$xen" = "yes" ; then
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
- if test "$xen_pv_domain_build" = "yes" ; then
- echo "CONFIG_XEN_PV_DOMAIN_BUILD=y" >> $config_host_mak
- fi
fi
if test "$linux_aio" = "yes" ; then
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
if test "$signalfd" = "yes" ; then
echo "CONFIG_SIGNALFD=y" >> $config_host_mak
fi
+if test "$optreset" = "yes" ; then
+ echo "HAVE_OPTRESET=y" >> $config_host_mak
+fi
if test "$tcg" = "yes"; then
echo "CONFIG_TCG=y" >> $config_host_mak
if test "$tcg_interpreter" = "yes" ; then
echo "BZIP2_LIBS=-lbz2" >> $config_host_mak
fi
+if test "$lzfse" = "yes" ; then
+ echo "CONFIG_LZFSE=y" >> $config_host_mak
+ echo "LZFSE_LIBS=-llzfse" >> $config_host_mak
+fi
+
if test "$libiscsi" = "yes" ; then
echo "CONFIG_LIBISCSI=m" >> $config_host_mak
echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
# Hold two types of flag:
# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
# a thread we have a handle to
-# CONFIG_PTHREAD_SETNAME_NP - A way of doing it on a particular
+# CONFIG_PTHREAD_SETNAME_NP_W_TID - A way of doing it on a particular
# platform
-if test "$pthread_setname_np" = "yes" ; then
+if test "$pthread_setname_np_w_tid" = "yes" ; then
+ echo "CONFIG_THREAD_SETNAME_BYTHREAD=y" >> $config_host_mak
+ echo "CONFIG_PTHREAD_SETNAME_NP_W_TID=y" >> $config_host_mak
+elif test "$pthread_setname_np_wo_tid" = "yes" ; then
echo "CONFIG_THREAD_SETNAME_BYTHREAD=y" >> $config_host_mak
- echo "CONFIG_PTHREAD_SETNAME_NP=y" >> $config_host_mak
+ echo "CONFIG_PTHREAD_SETNAME_NP_WO_TID=y" >> $config_host_mak
fi
if test "$vxhs" = "yes" ; then
echo "CONFIG_LIBPMEM=y" >> $config_host_mak
fi
+if test "$bochs" = "yes" ; then
+ echo "CONFIG_BOCHS=y" >> $config_host_mak
+fi
+if test "$cloop" = "yes" ; then
+ echo "CONFIG_CLOOP=y" >> $config_host_mak
+fi
+if test "$dmg" = "yes" ; then
+ echo "CONFIG_DMG=y" >> $config_host_mak
+fi
+if test "$qcow1" = "yes" ; then
+ echo "CONFIG_QCOW1=y" >> $config_host_mak
+fi
+if test "$vdi" = "yes" ; then
+ echo "CONFIG_VDI=y" >> $config_host_mak
+fi
+if test "$vvfat" = "yes" ; then
+ echo "CONFIG_VVFAT=y" >> $config_host_mak
+fi
+if test "$qed" = "yes" ; then
+ echo "CONFIG_QED=y" >> $config_host_mak
+fi
+if test "$parallels" = "yes" ; then
+ echo "CONFIG_PARALLELS=y" >> $config_host_mak
+fi
+if test "$sheepdog" = "yes" ; then
+ echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
+fi
+
if test "$tcg_interpreter" = "yes"; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
elif test "$ARCH" = "sparc64" ; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/i386 $QEMU_INCLUDES"
elif test "$ARCH" = "ppc64" ; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/ppc $QEMU_INCLUDES"
+elif test "$ARCH" = "riscv32" -o "$ARCH" = "riscv64" ; then
+ QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/riscv $QEMU_INCLUDES"
else
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES"
fi
echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
+echo "PYTHON_VERSION=$python_version" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
echo "IASL=$iasl" >> $config_host_mak
echo "TASN1_LIBS=$tasn1_libs" >> $config_host_mak
echo "TASN1_CFLAGS=$tasn1_cflags" >> $config_host_mak
echo "POD2MAN=$POD2MAN" >> $config_host_mak
-echo "TRANSLATE_OPT_CFLAGS=$TRANSLATE_OPT_CFLAGS" >> $config_host_mak
if test "$gcov" = "yes" ; then
echo "CONFIG_GCOV=y" >> $config_host_mak
echo "GCOV=$gcov_tool" >> $config_host_mak
ppc*)
disas_config "PPC"
;;
- riscv)
+ riscv*)
disas_config "RISCV"
;;
s390*)
esac
if test "$gprof" = "yes" ; then
- echo "TARGET_GPROF=yes" >> $config_target_mak
+ echo "TARGET_GPROF=y" >> $config_target_mak
if test "$target_linux_user" = "yes" ; then
cflags="-p $cflags"
ldflags="-p $ldflags"