trace_backends="log"
trace_file="trace"
opengl="$default_feature"
-guest_agent="$default_feature"
vss_win32_sdk="$default_feature"
win_sdk="no"
-want_tools="$default_feature"
coroutine=""
tls_priority="NORMAL"
plugins="$default_feature"
;;
--disable-zlib-test)
;;
- --enable-guest-agent) guest_agent="yes"
- ;;
- --disable-guest-agent) guest_agent="no"
- ;;
--with-vss-sdk) vss_win32_sdk=""
;;
--with-vss-sdk=*) vss_win32_sdk="$optarg"
;;
--without-win-sdk) win_sdk="no"
;;
- --enable-tools) want_tools="yes"
- ;;
- --disable-tools) want_tools="no"
- ;;
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2
;;
user supported user emulation targets
linux-user all linux usermode emulation targets
bsd-user all BSD usermode emulation targets
- guest-agent build the QEMU Guest Agent
pie Position Independent Executables
modules modules support (non-Windows)
module-upgrades try to load modules from alternate paths for upgrades
vhost-user vhost-user backend support
vhost-vdpa vhost-vdpa kernel backend support
opengl opengl support
- tools build qemu-io, qemu-nbd and qemu-img tools
gio libgio support
NOTE: The object files are built at the place where configure is launched
exit 1
fi
-##########################################
-# system tools
-if test -z "$want_tools"; then
- if test "$softmmu" = "no"; then
- want_tools=no
- else
- want_tools=yes
- fi
-fi
-
#########################################
# vhost interdependencies and host support
# check if we have VSS SDK headers for win
guest_agent_with_vss="no"
-if test "$mingw32" = "yes" && test "$guest_agent" != "no" && \
+if test "$mingw32" = "yes" && \
test "$vss_win32_sdk" != "no" ; then
case "$vss_win32_sdk" in
"") vss_win32_include="-isystem $source_path" ;;
# VSS provider from the source. It is usually unnecessary because the
# pre-compiled .tlb file is included.
-if test "$mingw32" = "yes" && test "$guest_agent" != "no" && \
+if test "$mingw32" = "yes" && \
test "$guest_agent_with_vss" = "yes" ; then
if test -z "$win_sdk"; then
programfiles="$PROGRAMFILES"
##########################################
# check if mingw environment provides a recent ntddscsi.h
guest_agent_ntddscsi="no"
-if test "$mingw32" = "yes" && test "$guest_agent" != "no"; then
+if test "$mingw32" = "yes"; then
cat > $TMPC << EOF
#include <windows.h>
#include <ntddscsi.h>
done
fi
-# Probe for guest agent support/options
-
-if [ "$guest_agent" != "no" ]; then
- if [ "$softmmu" = no -a "$want_tools" = no ] ; then
- guest_agent=no
- elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
- guest_agent=yes
- elif [ "$guest_agent" != yes ]; then
- guest_agent=no
- else
- error_exit "Guest agent is not supported on this platform"
- fi
-fi
-
# Guest agent Windows MSI package
if test "$QEMU_GA_MANUFACTURER" = ""; then
if test "$static" = "yes" ; then
echo "CONFIG_STATIC=y" >> $config_host_mak
fi
-if test "$want_tools" = "yes" ; then
- echo "CONFIG_TOOLS=y" >> $config_host_mak
-fi
-if test "$guest_agent" = "yes" ; then
- echo "CONFIG_GUEST_AGENT=y" >> $config_host_mak
-fi
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
qemu_version=$(head $source_path/VERSION)
-if 'CONFIG_TOOLS' in config_host and virgl.found() and gbm.found() \
+if have_tools and virgl.found() and gbm.found() \
and 'CONFIG_LINUX' in config_host and pixman.found()
executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, opengl],
if build_docs
SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']]
- have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
-
man_pages = {
'qemu-ga.8': (have_ga ? 'man8' : ''),
'qemu-ga-ref.7': (have_ga ? 'man7' : ''),
genh = []
qapi_trace_events = []
+bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
+supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
+supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64',
+ 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+
+cpu = host_machine.cpu_family()
+
+# Unify riscv* to a single family.
+if cpu in ['riscv32', 'riscv64']
+ cpu = 'riscv'
+endif
+
+targetos = host_machine.system()
+
target_dirs = config_host['TARGET_DIRS'].split()
have_linux_user = false
have_bsd_user = false
have_system = have_system or target.endswith('-softmmu')
endforeach
have_user = have_linux_user or have_bsd_user
-have_tools = 'CONFIG_TOOLS' in config_host
+have_tools = get_option('tools') \
+ .disable_auto_if(not have_system) \
+ .allowed()
+have_ga = get_option('guest_agent') \
+ .disable_auto_if(not have_system and not have_tools) \
+ .require(targetos in ['sunos', 'linux', 'windows'],
+ error_message: 'unsupported OS for QEMU guest agent') \
+ .allowed()
have_block = have_system or have_tools
python = import('python').find_installation()
-supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
-supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64',
- 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64']
-
-cpu = host_machine.cpu_family()
-
-# Unify riscv* to a single family.
-if cpu in ['riscv32', 'riscv64']
- cpu = 'riscv'
-endif
-
-targetos = host_machine.system()
-
if cpu not in supported_cpus
host_arch = 'unknown'
elif cpu == 'x86'
install_headers('include/qemu/qemu-plugin.h')
endif
-if 'CONFIG_GUEST_AGENT' in config_host
- subdir('qga')
-elif get_option('guest_agent_msi').enabled()
- error('Guest agent MSI requested, but the guest agent is not being built')
-endif
+subdir('qga')
# Don't build qemu-keymap if xkbcommon is not explicitly enabled
# when we don't build tools or system
summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
endif
summary_info += {'genisoimage': config_host['GENISOIMAGE']}
-if targetos == 'windows' and config_host.has_key('CONFIG_GUEST_AGENT')
+if targetos == 'windows' and have_ga
summary_info += {'wixl': wixl}
endif
if slirp_opt != 'disabled' and have_system
summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')}
summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')}
-summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')}
+summary_info += {'build guest agent': have_ga}
summary(summary_info, bool_yn: true, section: 'Configurable features')
# Compilation information
summary_info += {'libiscsi support': libiscsi}
summary_info += {'libnfs support': libnfs}
if targetos == 'windows'
- if config_host.has_key('CONFIG_GUEST_AGENT')
+ if have_ga
summary_info += {'QGA VSS support': config_host.has_key('CONFIG_QGA_VSS')}
summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')}
endif
description: 'install provided firmware blobs')
option('sparse', type : 'feature', value : 'auto',
description: 'sparse checker')
+option('guest_agent', type : 'feature', value : 'auto',
+ description: 'Build QEMU Guest Agent')
option('guest_agent_msi', type : 'feature', value : 'auto',
description: 'Build MSI package for the QEMU Guest Agent')
+option('tools', type : 'feature', value : 'auto',
+ description: 'build support utilities that come with QEMU')
option('malloc_trim', type : 'feature', value : 'auto',
description: 'enable libc malloc_trim() for memory optimization')
+if not have_ga
+ if get_option('guest_agent_msi').enabled()
+ error('Guest agent MSI requested, but the guest agent is not being built')
+ endif
+ subdir_done()
+endif
+
all_qga = []
qga_qapi_outputs = [
printf "%s\n" ' glusterfs Glusterfs block device driver'
printf "%s\n" ' gnutls GNUTLS cryptography support'
printf "%s\n" ' gtk GTK+ user interface'
+ printf "%s\n" ' guest-agent Build QEMU Guest Agent'
printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Agent'
printf "%s\n" ' hax HAX acceleration support'
printf "%s\n" ' hvf HVF acceleration support'
printf "%s\n" ' spice Spice server support'
printf "%s\n" ' spice-protocol Spice protocol support'
printf "%s\n" ' tcg TCG support'
+ printf "%s\n" ' tools build support utilities that come with QEMU'
printf "%s\n" ' tpm TPM support'
printf "%s\n" ' u2f U2F emulation support'
printf "%s\n" ' usb-redir libusbredir support'
--disable-gprof) printf "%s" -Dgprof=false ;;
--enable-gtk) printf "%s" -Dgtk=enabled ;;
--disable-gtk) printf "%s" -Dgtk=disabled ;;
+ --enable-guest-agent) printf "%s" -Dguest_agent=enabled ;;
+ --disable-guest-agent) printf "%s" -Dguest_agent=disabled ;;
--enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=enabled ;;
--disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=disabled ;;
--enable-hax) printf "%s" -Dhax=enabled ;;
--disable-tcg) printf "%s" -Dtcg=disabled ;;
--enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
--disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=false ;;
+ --enable-tools) printf "%s" -Dtools=enabled ;;
+ --disable-tools) printf "%s" -Dtools=disabled ;;
--enable-tpm) printf "%s" -Dtpm=enabled ;;
--disable-tpm) printf "%s" -Dtpm=disabled ;;
--enable-trace-backends=*) quote_sh "-Dtrace_backends=$2" ;;
.PHONY: check-block check check-clean get-vm-images
check:
-ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy)
+ifneq ($(.check-block.deps),)
check: check-block
check-block: run-ninja
$(if $(MAKE.n),,+)$(MESON) test $(MTESTARGS) $(.mtestargs) --verbose \
endif
endif
-if 'CONFIG_TSAN' not in config_host and \
- 'CONFIG_GUEST_AGENT' in config_host and \
- 'CONFIG_LINUX' in config_host
+if have_ga and targetos == 'linux' and 'CONFIG_TSAN' not in config_host
tests += {'test-qga': ['../qtest/libqtest.c']}
test_deps += {'test-qga': qga}
endif