configure, meson: move libaio check to meson.build
Message-Id: <20211007130829.632254-10-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
10f6b23187
commit
ff66f3e55b
@ -65,7 +65,7 @@ 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'))
|
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
|
||||||
block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
|
block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
|
||||||
block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
|
block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
|
||||||
block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
|
block_ss.add(when: libaio, if_true: files('linux-aio.c'))
|
||||||
block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
|
block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
|
||||||
|
|
||||||
block_modules = {}
|
block_modules = {}
|
||||||
|
31
configure
vendored
31
configure
vendored
@ -315,7 +315,7 @@ pa="auto"
|
|||||||
xen=${default_feature:+disabled}
|
xen=${default_feature:+disabled}
|
||||||
xen_ctrl_version="$default_feature"
|
xen_ctrl_version="$default_feature"
|
||||||
xen_pci_passthrough="auto"
|
xen_pci_passthrough="auto"
|
||||||
linux_aio="$default_feature"
|
linux_aio="auto"
|
||||||
linux_io_uring="auto"
|
linux_io_uring="auto"
|
||||||
cap_ng="auto"
|
cap_ng="auto"
|
||||||
attr="auto"
|
attr="auto"
|
||||||
@ -1196,9 +1196,9 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-fdt=system) fdt="system"
|
--enable-fdt=system) fdt="system"
|
||||||
;;
|
;;
|
||||||
--disable-linux-aio) linux_aio="no"
|
--disable-linux-aio) linux_aio="disabled"
|
||||||
;;
|
;;
|
||||||
--enable-linux-aio) linux_aio="yes"
|
--enable-linux-aio) linux_aio="enabled"
|
||||||
;;
|
;;
|
||||||
--disable-linux-io-uring) linux_io_uring="disabled"
|
--disable-linux-io-uring) linux_io_uring="disabled"
|
||||||
;;
|
;;
|
||||||
@ -3163,26 +3163,6 @@ if test "$libssh" != "no" ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# linux-aio probe
|
|
||||||
|
|
||||||
if test "$linux_aio" != "no" ; then
|
|
||||||
cat > $TMPC <<EOF
|
|
||||||
#include <libaio.h>
|
|
||||||
#include <sys/eventfd.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0); return 0; }
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "-laio" ; then
|
|
||||||
linux_aio=yes
|
|
||||||
else
|
|
||||||
if test "$linux_aio" = "yes" ; then
|
|
||||||
feature_not_found "linux AIO" "Install libaio devel"
|
|
||||||
fi
|
|
||||||
linux_aio=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# TPM emulation is only on POSIX
|
# TPM emulation is only on POSIX
|
||||||
|
|
||||||
@ -4272,9 +4252,6 @@ if test "$xen" = "enabled" ; then
|
|||||||
echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
|
echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
|
||||||
echo "XEN_LIBS=$xen_libs" >> $config_host_mak
|
echo "XEN_LIBS=$xen_libs" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
if test "$linux_aio" = "yes" ; then
|
|
||||||
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_scsi" = "yes" ; then
|
if test "$vhost_scsi" = "yes" ; then
|
||||||
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
|
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
@ -4774,7 +4751,7 @@ if test "$skip_meson" = no; then
|
|||||||
$(if test "$default_feature" = no; then echo "-Dauto_features=disabled"; fi) \
|
$(if test "$default_feature" = no; then echo "-Dauto_features=disabled"; fi) \
|
||||||
-Dalsa=$alsa -Dcoreaudio=$coreaudio -Ddsound=$dsound -Djack=$jack -Doss=$oss \
|
-Dalsa=$alsa -Dcoreaudio=$coreaudio -Ddsound=$dsound -Djack=$jack -Doss=$oss \
|
||||||
-Dpa=$pa -Daudio_drv_list=$audio_drv_list -Dtcg_interpreter=$tcg_interpreter \
|
-Dpa=$pa -Daudio_drv_list=$audio_drv_list -Dtcg_interpreter=$tcg_interpreter \
|
||||||
-Dtrace_backends=$trace_backends -Dtrace_file=$trace_file \
|
-Dtrace_backends=$trace_backends -Dtrace_file=$trace_file -Dlinux_aio=$linux_aio \
|
||||||
$cross_arg \
|
$cross_arg \
|
||||||
"$PWD" "$source_path"
|
"$PWD" "$source_path"
|
||||||
|
|
||||||
|
10
meson.build
10
meson.build
@ -400,9 +400,14 @@ if have_system or have_tools
|
|||||||
pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
|
pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
|
||||||
method: 'pkg-config', kwargs: static_kwargs)
|
method: 'pkg-config', kwargs: static_kwargs)
|
||||||
endif
|
endif
|
||||||
libaio = cc.find_library('aio', required: false)
|
|
||||||
zlib = dependency('zlib', required: true, kwargs: static_kwargs)
|
zlib = dependency('zlib', required: true, kwargs: static_kwargs)
|
||||||
|
|
||||||
|
libaio = not_found
|
||||||
|
if not get_option('linux_aio').auto() or have_block
|
||||||
|
libaio = cc.find_library('aio', has_headers: ['libaio.h'],
|
||||||
|
required: get_option('linux_aio'),
|
||||||
|
kwargs: static_kwargs)
|
||||||
|
endif
|
||||||
linux_io_uring = not_found
|
linux_io_uring = not_found
|
||||||
if not get_option('linux_io_uring').auto() or have_block
|
if not get_option('linux_io_uring').auto() or have_block
|
||||||
linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
|
linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
|
||||||
@ -1427,6 +1432,7 @@ config_host_data.set('CONFIG_EBPF', libbpf.found())
|
|||||||
config_host_data.set('CONFIG_LIBDAXCTL', libdaxctl.found())
|
config_host_data.set('CONFIG_LIBDAXCTL', libdaxctl.found())
|
||||||
config_host_data.set('CONFIG_LIBISCSI', libiscsi.found())
|
config_host_data.set('CONFIG_LIBISCSI', libiscsi.found())
|
||||||
config_host_data.set('CONFIG_LIBNFS', libnfs.found())
|
config_host_data.set('CONFIG_LIBNFS', libnfs.found())
|
||||||
|
config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
|
||||||
config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
|
config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
|
||||||
config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
|
config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
|
||||||
config_host_data.set('CONFIG_RBD', rbd.found())
|
config_host_data.set('CONFIG_RBD', rbd.found())
|
||||||
@ -3286,7 +3292,7 @@ summary_info += {'JACK support': jack}
|
|||||||
summary_info += {'brlapi support': brlapi}
|
summary_info += {'brlapi support': brlapi}
|
||||||
summary_info += {'vde support': config_host.has_key('CONFIG_VDE')}
|
summary_info += {'vde support': config_host.has_key('CONFIG_VDE')}
|
||||||
summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')}
|
summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')}
|
||||||
summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')}
|
summary_info += {'Linux AIO support': libaio}
|
||||||
summary_info += {'Linux io_uring support': linux_io_uring}
|
summary_info += {'Linux io_uring support': linux_io_uring}
|
||||||
summary_info += {'ATTR/XATTR support': libattr}
|
summary_info += {'ATTR/XATTR support': libattr}
|
||||||
summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')}
|
summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')}
|
||||||
|
@ -103,6 +103,8 @@ option('libusb', type : 'feature', value : 'auto',
|
|||||||
description: 'libusb support for USB passthrough')
|
description: 'libusb support for USB passthrough')
|
||||||
option('libxml2', type : 'feature', value : 'auto',
|
option('libxml2', type : 'feature', value : 'auto',
|
||||||
description: 'libxml2 support for Parallels image format')
|
description: 'libxml2 support for Parallels image format')
|
||||||
|
option('linux_aio', type : 'feature', value : 'auto',
|
||||||
|
description: 'Linux AIO support')
|
||||||
option('linux_io_uring', type : 'feature', value : 'auto',
|
option('linux_io_uring', type : 'feature', value : 'auto',
|
||||||
description: 'Linux io_uring support')
|
description: 'Linux io_uring support')
|
||||||
option('lzfse', type : 'feature', value : 'auto',
|
option('lzfse', type : 'feature', value : 'auto',
|
||||||
|
@ -20,7 +20,9 @@ endif
|
|||||||
stub_ss.add(files('iothread-lock.c'))
|
stub_ss.add(files('iothread-lock.c'))
|
||||||
stub_ss.add(files('isa-bus.c'))
|
stub_ss.add(files('isa-bus.c'))
|
||||||
stub_ss.add(files('is-daemonized.c'))
|
stub_ss.add(files('is-daemonized.c'))
|
||||||
stub_ss.add(when: 'CONFIG_LINUX_AIO', if_true: files('linux-aio.c'))
|
if libaio.found()
|
||||||
|
stub_ss.add(files('linux-aio.c'))
|
||||||
|
endif
|
||||||
stub_ss.add(files('migr-blocker.c'))
|
stub_ss.add(files('migr-blocker.c'))
|
||||||
stub_ss.add(files('module-opts.c'))
|
stub_ss.add(files('module-opts.c'))
|
||||||
stub_ss.add(files('monitor.c'))
|
stub_ss.add(files('monitor.c'))
|
||||||
|
Loading…
Reference in New Issue
Block a user