configure, meson: move image format options to meson_options.txt

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-10-13 11:42:25 +02:00
parent 8726368593
commit ed793c2c45
5 changed files with 80 additions and 96 deletions

View File

@ -45,20 +45,37 @@ block_ss.add(files(
softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
block_ss.add(when: 'CONFIG_QED', if_true: files(
'qed-check.c',
'qed-cluster.c',
'qed-l2-cache.c',
'qed-table.c',
'qed.c',
))
block_ss.add(when: 'CONFIG_PARALLELS', if_true: files('parallels.c', 'parallels-ext.c'))
if get_option('qcow1').allowed()
block_ss.add(files('qcow.c'))
endif
if get_option('vdi').allowed()
block_ss.add(files('vdi.c'))
endif
if get_option('cloop').allowed()
block_ss.add(files('cloop.c'))
endif
if get_option('bochs').allowed()
block_ss.add(files('bochs.c'))
endif
if get_option('vvfat').allowed()
block_ss.add(files('vvfat.c'))
endif
if get_option('dmg').allowed()
block_ss.add(files('dmg.c'))
endif
if get_option('qed').allowed()
block_ss.add(files(
'qed-check.c',
'qed-cluster.c',
'qed-l2-cache.c',
'qed-table.c',
'qed.c',
))
endif
if get_option('parallels').allowed()
block_ss.add(files('parallels.c', 'parallels-ext.c'))
endif
block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
@ -89,7 +106,7 @@ foreach m : [
endforeach
# those are not exactly regular block modules, so treat them apart
if 'CONFIG_DMG' in config_host
if get_option('dmg').allowed()
foreach m : [
[liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
[libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']

73
configure vendored
View File

@ -331,14 +331,6 @@ debug_stack_usage="no"
tls_priority="NORMAL"
live_block_migration=${default_feature:-yes}
replication=${default_feature:-yes}
bochs=${default_feature:-yes}
cloop=${default_feature:-yes}
dmg=${default_feature:-yes}
qcow1=${default_feature:-yes}
vdi=${default_feature:-yes}
vvfat=${default_feature:-yes}
qed=${default_feature:-yes}
parallels=${default_feature:-yes}
debug_mutex="no"
plugins="$default_feature"
rng_none="no"
@ -1044,38 +1036,6 @@ for opt do
;;
--enable-replication) replication="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-vhost-user) vhost_user="no"
;;
--enable-vhost-user) vhost_user="yes"
@ -1375,14 +1335,6 @@ cat << EOF
opengl opengl support
qom-cast-debug cast debugging support
tools build qemu-io, qemu-nbd and qemu-img tools
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
debug-mutex mutex debugging support
rng-none dummy RNG, avoid using /dev/(u)random and getrandom()
gio libgio support
@ -3264,31 +3216,6 @@ if test "$debug_mutex" = "yes" ; then
echo "CONFIG_DEBUG_MUTEX=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 "$plugins" = "yes" ; then
echo "CONFIG_PLUGIN=y" >> $config_host_mak
fi

View File

@ -3463,14 +3463,14 @@ if have_block
summary_info += {'build virtiofs daemon': have_virtiofsd}
summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')}
summary_info += {'replication support': config_host.has_key('CONFIG_REPLICATION')}
summary_info += {'bochs support': config_host.has_key('CONFIG_BOCHS')}
summary_info += {'cloop support': config_host.has_key('CONFIG_CLOOP')}
summary_info += {'dmg support': config_host.has_key('CONFIG_DMG')}
summary_info += {'qcow v1 support': config_host.has_key('CONFIG_QCOW1')}
summary_info += {'vdi support': config_host.has_key('CONFIG_VDI')}
summary_info += {'vvfat support': config_host.has_key('CONFIG_VVFAT')}
summary_info += {'qed support': config_host.has_key('CONFIG_QED')}
summary_info += {'parallels support': config_host.has_key('CONFIG_PARALLELS')}
summary_info += {'bochs support': get_option('bochs').allowed()}
summary_info += {'cloop support': get_option('cloop').allowed()}
summary_info += {'dmg support': get_option('dmg').allowed()}
summary_info += {'qcow v1 support': get_option('qcow1').allowed()}
summary_info += {'vdi support': get_option('vdi').allowed()}
summary_info += {'vvfat support': get_option('vvfat').allowed()}
summary_info += {'qed support': get_option('qed').allowed()}
summary_info += {'parallels support': get_option('parallels').allowed()}
summary_info += {'FUSE exports': fuse}
endif
summary(summary_info, bool_yn: true, section: 'Block layer support')

View File

@ -222,3 +222,19 @@ option('fdt', type: 'combo', value: 'auto',
option('selinux', type: 'feature', value: 'auto',
description: 'SELinux support in qemu-nbd')
option('bochs', type: 'feature', value: 'auto',
description: 'bochs image format support')
option('cloop', type: 'feature', value: 'auto',
description: 'cloop image format support')
option('dmg', type: 'feature', value: 'auto',
description: 'dmg image format support')
option('qcow1', type: 'feature', value: 'auto',
description: 'qcow1 image format support')
option('vdi', type: 'feature', value: 'auto',
description: 'vdi image format support')
option('vvfat', type: 'feature', value: 'auto',
description: 'vvfat image format support')
option('qed', type: 'feature', value: 'auto',
description: 'qed image format support')
option('parallels', type: 'feature', value: 'auto',
description: 'parallels image format support')

View File

@ -28,16 +28,19 @@ meson_options_help() {
printf "%s\n" ' auth-pam PAM access control'
printf "%s\n" ' avx2 AVX2 optimizations'
printf "%s\n" ' avx512f AVX512F optimizations'
printf "%s\n" ' bochs bochs image format support'
printf "%s\n" ' bpf eBPF support'
printf "%s\n" ' brlapi brlapi character device driver'
printf "%s\n" ' bzip2 bzip2 support for DMG images'
printf "%s\n" ' cap-ng cap_ng support'
printf "%s\n" ' cloop cloop image format support'
printf "%s\n" ' cocoa Cocoa user interface (macOS only)'
printf "%s\n" ' coreaudio CoreAudio sound support'
printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver'
printf "%s\n" ' curl CURL block device driver'
printf "%s\n" ' curses curses UI'
printf "%s\n" ' dbus-display -display dbus support'
printf "%s\n" ' dmg dmg image format support'
printf "%s\n" ' docs Documentations build support'
printf "%s\n" ' dsound DirectSound sound support'
printf "%s\n" ' fuse FUSE block device export'
@ -75,6 +78,9 @@ meson_options_help() {
printf "%s\n" ' nvmm NVMM acceleration support'
printf "%s\n" ' oss OSS sound support'
printf "%s\n" ' pa PulseAudio sound support'
printf "%s\n" ' parallels parallels image format support'
printf "%s\n" ' qcow1 qcow1 image format support'
printf "%s\n" ' qed qed image format support'
printf "%s\n" ' rbd Ceph block device driver'
printf "%s\n" ' sdl SDL user interface'
printf "%s\n" ' sdl-image SDL Image support for icons'
@ -90,6 +96,7 @@ meson_options_help() {
printf "%s\n" ' u2f U2F emulation support'
printf "%s\n" ' usb-redir libusbredir support'
printf "%s\n" ' vde vde network backend support'
printf "%s\n" ' vdi vdi image format support'
printf "%s\n" ' vhost-user-blk-server'
printf "%s\n" ' build vhost-user-blk server'
printf "%s\n" ' virglrenderer virgl rendering support'
@ -100,6 +107,7 @@ meson_options_help() {
printf "%s\n" ' vnc-png PNG compression for VNC server'
printf "%s\n" ' vnc-sasl SASL authentication for VNC server'
printf "%s\n" ' vte vte support for the gtk UI'
printf "%s\n" ' vvfat vvfat image format support'
printf "%s\n" ' whpx WHPX acceleration support'
printf "%s\n" ' xen Xen backend support'
printf "%s\n" ' xen-pci-passthrough'
@ -119,6 +127,8 @@ _meson_option_parse() {
--disable-avx2) printf "%s" -Davx2=disabled ;;
--enable-avx512f) printf "%s" -Davx512f=enabled ;;
--disable-avx512f) printf "%s" -Davx512f=disabled ;;
--enable-bochs) printf "%s" -Dbochs=enabled ;;
--disable-bochs) printf "%s" -Dbochs=disabled ;;
--enable-bpf) printf "%s" -Dbpf=enabled ;;
--disable-bpf) printf "%s" -Dbpf=disabled ;;
--enable-brlapi) printf "%s" -Dbrlapi=enabled ;;
@ -134,6 +144,8 @@ _meson_option_parse() {
--disable-cfi) printf "%s" -Dcfi=false ;;
--enable-cfi-debug) printf "%s" -Dcfi_debug=true ;;
--disable-cfi-debug) printf "%s" -Dcfi_debug=false ;;
--enable-cloop) printf "%s" -Dcloop=enabled ;;
--disable-cloop) printf "%s" -Dcloop=disabled ;;
--enable-cocoa) printf "%s" -Dcocoa=enabled ;;
--disable-cocoa) printf "%s" -Dcocoa=disabled ;;
--enable-coreaudio) printf "%s" -Dcoreaudio=enabled ;;
@ -146,6 +158,8 @@ _meson_option_parse() {
--disable-curses) printf "%s" -Dcurses=disabled ;;
--enable-dbus-display) printf "%s" -Ddbus_display=enabled ;;
--disable-dbus-display) printf "%s" -Ddbus_display=disabled ;;
--enable-dmg) printf "%s" -Ddmg=enabled ;;
--disable-dmg) printf "%s" -Ddmg=disabled ;;
--enable-docs) printf "%s" -Ddocs=enabled ;;
--disable-docs) printf "%s" -Ddocs=disabled ;;
--enable-dsound) printf "%s" -Ddsound=enabled ;;
@ -228,6 +242,12 @@ _meson_option_parse() {
--disable-oss) printf "%s" -Doss=disabled ;;
--enable-pa) printf "%s" -Dpa=enabled ;;
--disable-pa) printf "%s" -Dpa=disabled ;;
--enable-parallels) printf "%s" -Dparallels=enabled ;;
--disable-parallels) printf "%s" -Dparallels=disabled ;;
--enable-qcow1) printf "%s" -Dqcow1=enabled ;;
--disable-qcow1) printf "%s" -Dqcow1=disabled ;;
--enable-qed) printf "%s" -Dqed=enabled ;;
--disable-qed) printf "%s" -Dqed=disabled ;;
--enable-rbd) printf "%s" -Drbd=enabled ;;
--disable-rbd) printf "%s" -Drbd=disabled ;;
--enable-sdl) printf "%s" -Dsdl=enabled ;;
@ -266,6 +286,8 @@ _meson_option_parse() {
--disable-usb-redir) printf "%s" -Dusb_redir=disabled ;;
--enable-vde) printf "%s" -Dvde=enabled ;;
--disable-vde) printf "%s" -Dvde=disabled ;;
--enable-vdi) printf "%s" -Dvdi=enabled ;;
--disable-vdi) printf "%s" -Dvdi=disabled ;;
--enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=enabled ;;
--disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=disabled ;;
--enable-virglrenderer) printf "%s" -Dvirglrenderer=enabled ;;
@ -284,6 +306,8 @@ _meson_option_parse() {
--disable-vnc-sasl) printf "%s" -Dvnc_sasl=disabled ;;
--enable-vte) printf "%s" -Dvte=enabled ;;
--disable-vte) printf "%s" -Dvte=disabled ;;
--enable-vvfat) printf "%s" -Dvvfat=enabled ;;
--disable-vvfat) printf "%s" -Dvvfat=disabled ;;
--enable-whpx) printf "%s" -Dwhpx=enabled ;;
--disable-whpx) printf "%s" -Dwhpx=disabled ;;
--enable-xen) printf "%s" -Dxen=enabled ;;