aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-10-09 14:13:59 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-18 10:01:02 +0200
commite20d68aa0b9546655c4017fb7341173bba825958 (patch)
tree97e2f603e13f773af4fd1e6ccc27c57974adeaf2
parent17599573bf1ff18442e34d6760bbb8d090a30a08 (diff)
configure, meson: use command line options to configure qemu-ga
Preserve the functionality of the environment variables, but allow using the command line instead. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xconfigure16
-rw-r--r--meson_options.txt7
-rw-r--r--qga/meson.build9
-rw-r--r--scripts/meson-buildoptions.sh9
4 files changed, 31 insertions, 10 deletions
diff --git a/configure b/configure
index 4b24c572d5..8827a29bf4 100755
--- a/configure
+++ b/configure
@@ -1592,12 +1592,6 @@ echo >> $config_host_mak
echo all: >> $config_host_mak
-if test "$targetos" = "windows"; then
- echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak
- echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO-Linux}" >> $config_host_mak
- echo "QEMU_GA_VERSION=${QEMU_GA_VERSION-$(cat "$source_path"/VERSION)}" >> $config_host_mak
-fi
-
echo "SRC_PATH=$source_path" >> $config_host_mak
echo "TARGET_DIRS=$target_list" >> $config_host_mak
echo "GDB=$gdb_bin" >> $config_host_mak
@@ -1724,6 +1718,15 @@ if test "$skip_meson" = no; then
if test "$SMBD" != ''; then
echo "smbd = $(meson_quote "$SMBD")" >> $cross
fi
+ if test "${QEMU_GA_MANUFACTURER}" != ''; then
+ echo "qemu_ga_manufacturer = $(meson_quote "${QEMU_GA_MANUFACTURER}")" >> $cross
+ fi
+ if test "${QEMU_GA_DISTRO}" != ''; then
+ echo "qemu_ga_distro = $(meson_quote "${QEMU_GA_DISTRO}")" >> $cross
+ fi
+ if test "${QEMU_GA_VERSION}" != ''; then
+ echo "qemu_ga_version = $(meson_quote "${QEMU_GA_VERSION}")" >> $cross
+ fi
echo >> $cross
echo "[binaries]" >> $cross
@@ -1775,7 +1778,6 @@ if test "$skip_meson" = no; then
rm -rf meson-private meson-info meson-logs
- # Built-in options
test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
test "$default_feature" = no && meson_option_add -Dauto_features=disabled
test "$static" = yes && meson_option_add -Dprefer_static=true
diff --git a/meson_options.txt b/meson_options.txt
index e237b26846..1b0c02b4a5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -353,5 +353,12 @@ option('qom_cast_debug', type: 'boolean', value: true,
option('slirp_smbd', type : 'feature', value : 'auto',
description: 'use smbd (at path --smbd=*) in slirp networking')
+option('qemu_ga_manufacturer', type: 'string', value: 'QEMU',
+ description: '"manufacturer" name for qemu-ga registry entries')
+option('qemu_ga_distro', type: 'string', value: 'Linux',
+ description: 'second path element in qemu-ga registry entries')
+option('qemu_ga_version', type: 'string', value: '',
+ description: 'version number for qemu-ga installer')
+
option('hexagon_idef_parser', type : 'boolean', value : true,
description: 'use idef-parser to automatically generate TCG code for the Hexagon frontend')
diff --git a/qga/meson.build b/qga/meson.build
index 59cae0cc6e..940a51d55d 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -145,6 +145,9 @@ if targetos == 'windows'
else
libpcre = 'libpcre2'
endif
+ qga_msi_version = get_option('qemu_ga_version') == '' \
+ ? project.version() \
+ : get_option('qemu_ga_version')
qga_msi = custom_target('QGA MSI',
input: files('installer/qemu-ga.wxs'),
output: 'qemu-ga-@0@.msi'.format(host_arch),
@@ -155,9 +158,9 @@ if targetos == 'windows'
qemu_ga_msi_vss,
'-D', 'BUILD_DIR=' + meson.project_build_root(),
'-D', 'BIN_DIR=' + glib_pc.get_variable('bindir'),
- '-D', 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
- '-D', 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
- '-D', 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+ '-D', 'QEMU_GA_VERSION=' + qga_msi_version,
+ '-D', 'QEMU_GA_MANUFACTURER=' + get_option('qemu_ga_manufacturer'),
+ '-D', 'QEMU_GA_DISTRO=' + get_option('qemu_ga_distro'),
'-D', 'LIBPCRE=' + libpcre,
])
all_qga += [qga_msi]
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index dec3382016..bda88993bd 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -64,6 +64,12 @@ meson_options_help() {
printf "%s\n" ' --localstatedir=VALUE Localstate data directory [/var/local]'
printf "%s\n" ' --mandir=VALUE Manual page directory [share/man]'
printf "%s\n" ' --prefix=VALUE Installation prefix [/usr/local]'
+ printf "%s\n" ' --qemu-ga-distro=VALUE second path element in qemu-ga registry entries'
+ printf "%s\n" ' [Linux]'
+ printf "%s\n" ' --qemu-ga-manufacturer=VALUE'
+ printf "%s\n" ' "manufacturer" name for qemu-ga registry entries'
+ printf "%s\n" ' [QEMU]'
+ printf "%s\n" ' --qemu-ga-version=VALUE version number for qemu-ga installer'
printf "%s\n" ' --smbd=VALUE Path to smbd for slirp networking'
printf "%s\n" ' --sysconfdir=VALUE Sysconf data directory [etc]'
printf "%s\n" ' --tls-priority=VALUE Default TLS protocol/cipher priority string'
@@ -422,6 +428,9 @@ _meson_option_parse() {
--enable-qed) printf "%s" -Dqed=enabled ;;
--disable-qed) printf "%s" -Dqed=disabled ;;
--firmwarepath=*) quote_sh "-Dqemu_firmwarepath=$(meson_option_build_array $2)" ;;
+ --qemu-ga-distro=*) quote_sh "-Dqemu_ga_distro=$2" ;;
+ --qemu-ga-manufacturer=*) quote_sh "-Dqemu_ga_manufacturer=$2" ;;
+ --qemu-ga-version=*) quote_sh "-Dqemu_ga_version=$2" ;;
--with-suffix=*) quote_sh "-Dqemu_suffix=$2" ;;
--enable-qga-vss) printf "%s" -Dqga_vss=enabled ;;
--disable-qga-vss) printf "%s" -Dqga_vss=disabled ;;