netmap="no"
sdl="auto"
sdl_image="auto"
+virtiofsd="auto"
virtfs=""
libudev="auto"
mpath="auto"
vhost_crypto=""
vhost_scsi=""
vhost_vsock=""
-vhost_user=""
+vhost_user="no"
+vhost_user_blk_server="auto"
vhost_user_fs=""
kvm="auto"
hax="auto"
softmmu="yes"
linux_user="no"
bsd_user="no"
-blobs="yes"
-edk2_blobs="no"
+blobs="true"
pkgversion=""
pie=""
qom_cast_debug="yes"
ninja=""
skip_meson=no
gettext=""
+fuse="auto"
+fuse_lseek="auto"
bogus_os="no"
malloc_trim="auto"
if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
cpu="x86_64"
fi
+ HOST_DSOSUF=".dylib"
;;
SunOS)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
case $targetos in
MINGW32*)
mingw32="yes"
- vhost_user="no"
audio_possible_drivers="dsound sdl"
if check_include dsound.h; then
audio_drv_list="dsound"
;;
Haiku)
haiku="yes"
- QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -DBSD_SOURCE $QEMU_CFLAGS"
+ QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
;;
Linux)
audio_drv_list="try-pa oss"
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
+ vhost_user="yes"
;;
esac
;;
--docdir=*) docdir="$optarg"
;;
+ --localedir=*) localedir="$optarg"
+ ;;
--sysconfdir=*) sysconfdir="$optarg"
;;
--localstatedir=*) local_statedir="$optarg"
--host=*|--build=*|\
--disable-dependency-tracking|\
--sbindir=*|--sharedstatedir=*|\
- --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
+ --oldincludedir=*|--datarootdir=*|--infodir=*|\
--htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
# These switches are silently ignored, for compatibility with
# autoconf-generated configure scripts. This allows QEMU's
;;
--enable-libudev) libudev="enabled"
;;
+ --disable-virtiofsd) virtiofsd="disabled"
+ ;;
+ --enable-virtiofsd) virtiofsd="enabled"
+ ;;
--disable-mpath) mpath="disabled"
;;
--enable-mpath) mpath="enabled"
;;
--enable-membarrier) membarrier="yes"
;;
- --disable-blobs) blobs="no"
+ --disable-blobs) blobs="false"
;;
--with-pkgversion=*) pkgversion="$optarg"
;;
;;
--enable-vhost-vsock) vhost_vsock="yes"
;;
+ --disable-vhost-user-blk-server) vhost_user_blk_server="disabled"
+ ;;
+ --enable-vhost-user-blk-server) vhost_user_blk_server="enabled"
+ ;;
--disable-vhost-user-fs) vhost_user_fs="no"
;;
--enable-vhost-user-fs) vhost_user_fs="yes"
;;
--disable-libdaxctl) libdaxctl=no
;;
+ --enable-fuse) fuse="enabled"
+ ;;
+ --disable-fuse) fuse="disabled"
+ ;;
+ --enable-fuse-lseek) fuse_lseek="enabled"
+ ;;
+ --disable-fuse-lseek) fuse_lseek="disabled"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
esac
done
-firmwarepath="${firmwarepath:-$prefix/share/qemu-firmware}"
libdir="${libdir:-$prefix/lib}"
libexecdir="${libexecdir:-$prefix/libexec}"
includedir="${includedir:-$prefix/include}"
docdir="$prefix"
bindir="$prefix"
sysconfdir="$prefix"
- local_statedir=
+ local_statedir="$prefix"
else
mandir="${mandir:-$prefix/share/man}"
datadir="${datadir:-$prefix/share}"
sysconfdir="${sysconfdir:-$prefix/etc}"
local_statedir="${local_statedir:-$prefix/var}"
fi
+firmwarepath="${firmwarepath:-$datadir/qemu-firmware}"
+localedir="${localedir:-$datadir/locale}"
case "$cpu" in
ppc)
--prefix=PREFIX install in PREFIX [$prefix]
--interp-prefix=PREFIX where to find shared libraries, etc.
use %M for cpu name [$interp_prefix]
- --target-list=LIST set target list (default: build everything)
+ --target-list=LIST set target list (default: build all non-deprecated)
$(echo Available targets: $default_target_list | \
fold -s -w 53 | sed -e 's/^/ /')
+$(echo Deprecated targets: $deprecated_targets_list | \
+ fold -s -w 53 | sed -e 's/^/ /')
--target-list-exclude=LIST exclude a set of targets from the default target-list
Advanced options (experts only):
--static enable static build [$static]
--mandir=PATH install man pages in PATH
--datadir=PATH install firmware in PATH/$qemu_suffix
+ --localedir=PATH install translation in PATH/$qemu_suffix
--docdir=PATH install documentation in PATH/$qemu_suffix
--bindir=PATH install binaries in PATH
--libdir=PATH install libraries in PATH
vnc-png PNG compression for VNC server
cocoa Cocoa UI (Mac OS X only)
virtfs VirtFS
+ virtiofsd build virtiofs daemon (virtiofsd)
libudev Use libudev to enumerate host devices
mpath Multipath persistent reservation passthrough
xen xen backend driver support
vhost-crypto vhost-user-crypto backend support
vhost-kernel vhost kernel backend support
vhost-user vhost-user backend support
+ vhost-user-blk-server vhost-user-blk server support
vhost-vdpa vhost-vdpa kernel backend support
spice spice
rbd rados block device (rbd)
xkbcommon xkbcommon support
rng-none dummy RNG, avoid using /dev/(u)random and getrandom()
libdaxctl libdaxctl support
+ fuse FUSE block device export
+ fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
NOTE: The object files are built at the place where configure is launched
EOF
case "$meson" in
git | internal)
- if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then
- error_exit "Python setuptools not found"
- fi
meson="$python ${source_path}/meson/meson.py"
;;
*) meson=$(command -v "$meson") ;;
;;
esac
-for target in $target_list; do
- case "$target" in
- arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
- edk2_blobs="yes"
- ;;
- esac
-done
-# The EDK2 binaries are compressed with bzip2
-if test "$edk2_blobs" = "yes" && ! has bzip2; then
- error_exit "The bzip2 program is required for building QEMU"
-fi
-
feature_not_found() {
feature=$1
remedy=$2
# vhost interdependencies and host support
# vhost backends
-test "$vhost_user" = "" && vhost_user=yes
-if test "$vhost_user" = "yes" && test "$mingw32" = "yes"; then
- error_exit "vhost-user isn't available on win32"
+if test "$vhost_user" = "yes" && test "$linux" != "yes"; then
+ error_exit "vhost-user is only available on Linux"
fi
test "$vhost_vdpa" = "" && vhost_vdpa=$linux
if test "$vhost_vdpa" = "yes" && test "$linux" != "yes"; then
xen_ctrl_version="$(printf '%d%02d%02d' \
$($pkg_config --modversion xencontrol | sed 's/\./ /g') )"
xen=enabled
- xen_pc="xencontrol xenstore xenguest xenforeignmemory xengnttab"
+ xen_pc="xencontrol xenstore xenforeignmemory xengnttab"
xen_pc="$xen_pc xenevtchn xendevicemodel"
if $pkg_config --exists xentoolcore; then
xen_pc="$xen_pc xentoolcore"
xen_libs="$($pkg_config --libs $xen_pc)"
else
- xen_libs="-lxenstore -lxenctrl -lxenguest"
+ xen_libs="-lxenstore -lxenctrl"
xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
# First we test whether Xen headers and libraries are available.
fi
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
- gio=yes
gio_cflags=$($pkg_config --cflags gio-2.0)
gio_libs=$($pkg_config --libs gio-2.0)
gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
if [ ! -x "$gdbus_codegen" ]; then
gdbus_codegen=
fi
+ # Check that the libraries actually work -- Ubuntu 18.04 ships
+ # with pkg-config --static --libs data for gio-2.0 that is missing
+ # -lblkid and will give a link error.
+ cat > $TMPC <<EOF
+#include <gio/gio.h>
+int main(void)
+{
+ g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0);
+ return 0;
+}
+EOF
+ if compile_prog "$gio_cflags" "$gio_libs" ; then
+ gio=yes
+ else
+ gio=no
+ fi
else
gio=no
fi
if test "$found" = "no"; then
LIBS="$pthread_lib $LIBS"
fi
- PTHREAD_LIB="$pthread_lib"
break
fi
done
trace_backend_stap="no"
if has 'stap' ; then
trace_backend_stap="yes"
+
+ # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol
+ # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility
+ # instead. QEMU --enable-modules depends on this because the SystemTap
+ # semaphores are linked into the main binary and not the module's shared
+ # object.
+ QEMU_CFLAGS="$QEMU_CFLAGS -DSTAP_SDT_V2"
fi
fi
done
fi
-qemu_confdir="$sysconfdir/$qemu_suffix"
-qemu_moddir="$libdir/$qemu_suffix"
-qemu_datadir="$datadir/$qemu_suffix"
-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
ivshmem=yes
roms=
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
- test "$softmmu" = yes ; then
+ test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
# Different host OS linkers have different ideas about the name of the ELF
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
echo >> $config_host_mak
echo all: >> $config_host_mak
-echo "prefix=$prefix" >> $config_host_mak
-echo "bindir=$bindir" >> $config_host_mak
-echo "libdir=$libdir" >> $config_host_mak
-echo "libexecdir=$libexecdir" >> $config_host_mak
-echo "includedir=$includedir" >> $config_host_mak
-echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
-echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
-echo "qemu_firmwarepath=$firmwarepath" >> $config_host_mak
-echo "qemu_moddir=$qemu_moddir" >> $config_host_mak
-if test "$mingw32" = "no" ; then
- echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
-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 "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "GIT_UPDATE=$git_update" >> $config_host_mak
if test "$vhost_user_fs" = "yes" ; then
echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
fi
-if test "$blobs" = "yes" ; then
- echo "INSTALL_BLOBS=yes" >> $config_host_mak
-fi
if test "$iovec" = "yes" ; then
echo "CONFIG_IOVEC=y" >> $config_host_mak
fi
echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
-echo "PTHREAD_LIB=$PTHREAD_LIB" >> $config_host_mak
echo "EXESUF=$EXESUF" >> $config_host_mak
echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
echo "LIBS_QGA=$libs_qga" >> $config_host_mak
fi
echo "FUZZ_EXE_LDFLAGS=$FUZZ_EXE_LDFLAGS" >> $config_host_mak
-if test "$edk2_blobs" = "yes" ; then
- echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
-fi
-
if test "$rng_none" = "yes"; then
echo "CONFIG_RNG_NONE=y" >> $config_host_mak
fi
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
+unset staticpic
+if ! version_ge "$($meson --version)" 0.56.0; then
+ staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
+fi
NINJA=$ninja $meson setup \
--prefix "$prefix" \
--libdir "$libdir" \
--datadir "$datadir" \
--mandir "$mandir" \
--sysconfdir "$sysconfdir" \
+ --localedir "$localedir" \
--localstatedir "$local_statedir" \
-Ddocdir="$docdir" \
+ -Dqemu_firmwarepath="$firmwarepath" \
-Dqemu_suffix="$qemu_suffix" \
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
- -Db_staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi) \
+ ${staticpic:+-Db_staticpic=$staticpic} \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
-Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \
-Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
-Dcocoa=$cocoa -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
- -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \
+ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \
-Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \
-Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
- -Ddocs=$docs -Dsphinx_build=$sphinx_build \
+ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
+ -Dvhost_user_blk_server=$vhost_user_blk_server \
+ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \
$cross_arg \
"$PWD" "$source_path"