configure, meson: move libnuma detection to meson
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
34b52615a0
commit
488a8c73fb
31
configure
vendored
31
configure
vendored
@ -332,7 +332,6 @@ debug_stack_usage="no"
|
|||||||
tls_priority="NORMAL"
|
tls_priority="NORMAL"
|
||||||
tpm="$default_feature"
|
tpm="$default_feature"
|
||||||
live_block_migration=${default_feature:-yes}
|
live_block_migration=${default_feature:-yes}
|
||||||
numa="$default_feature"
|
|
||||||
replication=${default_feature:-yes}
|
replication=${default_feature:-yes}
|
||||||
bochs=${default_feature:-yes}
|
bochs=${default_feature:-yes}
|
||||||
cloop=${default_feature:-yes}
|
cloop=${default_feature:-yes}
|
||||||
@ -1048,10 +1047,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-live-block-migration) live_block_migration="yes"
|
--enable-live-block-migration) live_block_migration="yes"
|
||||||
;;
|
;;
|
||||||
--disable-numa) numa="no"
|
|
||||||
;;
|
|
||||||
--enable-numa) numa="yes"
|
|
||||||
;;
|
|
||||||
--disable-replication) replication="no"
|
--disable-replication) replication="no"
|
||||||
;;
|
;;
|
||||||
--enable-replication) replication="yes"
|
--enable-replication) replication="yes"
|
||||||
@ -1384,7 +1379,6 @@ cat << EOF
|
|||||||
live-block-migration Block migration in the main migration stream
|
live-block-migration Block migration in the main migration stream
|
||||||
coroutine-pool coroutine freelist (better performance)
|
coroutine-pool coroutine freelist (better performance)
|
||||||
tpm TPM support
|
tpm TPM support
|
||||||
numa libnuma support
|
|
||||||
replication replication support
|
replication replication support
|
||||||
opengl opengl support
|
opengl opengl support
|
||||||
qom-cast-debug cast debugging support
|
qom-cast-debug cast debugging support
|
||||||
@ -2455,26 +2449,6 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# libnuma probe
|
|
||||||
|
|
||||||
if test "$numa" != "no" ; then
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <numa.h>
|
|
||||||
int main(void) { return numa_available(); }
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if compile_prog "" "-lnuma" ; then
|
|
||||||
numa=yes
|
|
||||||
numa_libs="-lnuma"
|
|
||||||
else
|
|
||||||
if test "$numa" = "yes" ; then
|
|
||||||
feature_not_found "numa" "install numactl devel"
|
|
||||||
fi
|
|
||||||
numa=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check for usbfs
|
# check for usbfs
|
||||||
have_usbfs=no
|
have_usbfs=no
|
||||||
if test "$linux_user" = "yes"; then
|
if test "$linux_user" = "yes"; then
|
||||||
@ -3442,11 +3416,6 @@ if test "$default_targets" = "yes"; then
|
|||||||
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
|
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$numa" = "yes"; then
|
|
||||||
echo "CONFIG_NUMA=y" >> $config_host_mak
|
|
||||||
echo "NUMA_LIBS=$numa_libs" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$ccache_cpp2" = "yes"; then
|
if test "$ccache_cpp2" = "yes"; then
|
||||||
echo "export CCACHE_CPP2=y" >> $config_host_mak
|
echo "export CCACHE_CPP2=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
25
meson.build
25
meson.build
@ -1164,14 +1164,28 @@ if lzo.found() and not cc.links('''
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
numa = not_found
|
||||||
|
if not get_option('numa').auto() or have_system or have_tools
|
||||||
|
numa = cc.find_library('numa', has_headers: ['numa.h'],
|
||||||
|
required: get_option('numa'),
|
||||||
|
kwargs: static_kwargs)
|
||||||
|
endif
|
||||||
|
if numa.found() and not cc.links('''
|
||||||
|
#include <numa.h>
|
||||||
|
int main(void) { return numa_available(); }
|
||||||
|
''', dependencies: numa)
|
||||||
|
numa = not_found
|
||||||
|
if get_option('numa').enabled()
|
||||||
|
error('could not link numa')
|
||||||
|
else
|
||||||
|
warning('could not link numa, disabling')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
rdma = not_found
|
rdma = not_found
|
||||||
if 'CONFIG_RDMA' in config_host
|
if 'CONFIG_RDMA' in config_host
|
||||||
rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
|
rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
|
||||||
endif
|
endif
|
||||||
numa = not_found
|
|
||||||
if 'CONFIG_NUMA' in config_host
|
|
||||||
numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
|
|
||||||
endif
|
|
||||||
xen = not_found
|
xen = not_found
|
||||||
if 'CONFIG_XEN_BACKEND' in config_host
|
if 'CONFIG_XEN_BACKEND' in config_host
|
||||||
xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
|
xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
|
||||||
@ -1472,6 +1486,7 @@ config_host_data.set('CONFIG_LIBSSH', libssh.found())
|
|||||||
config_host_data.set('CONFIG_LINUX_AIO', libaio.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_NUMA', numa.found())
|
||||||
config_host_data.set('CONFIG_RBD', rbd.found())
|
config_host_data.set('CONFIG_RBD', rbd.found())
|
||||||
config_host_data.set('CONFIG_SDL', sdl.found())
|
config_host_data.set('CONFIG_SDL', sdl.found())
|
||||||
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
|
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
|
||||||
@ -3548,7 +3563,7 @@ summary_info += {'snappy support': snappy}
|
|||||||
summary_info += {'bzip2 support': libbzip2}
|
summary_info += {'bzip2 support': libbzip2}
|
||||||
summary_info += {'lzfse support': liblzfse}
|
summary_info += {'lzfse support': liblzfse}
|
||||||
summary_info += {'zstd support': zstd}
|
summary_info += {'zstd support': zstd}
|
||||||
summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
|
summary_info += {'NUMA host support': numa}
|
||||||
summary_info += {'capstone': capstone_opt == 'internal' ? capstone_opt : capstone}
|
summary_info += {'capstone': capstone_opt == 'internal' ? capstone_opt : capstone}
|
||||||
summary_info += {'libpmem support': libpmem}
|
summary_info += {'libpmem support': libpmem}
|
||||||
summary_info += {'libdaxctl support': libdaxctl}
|
summary_info += {'libdaxctl support': libdaxctl}
|
||||||
|
@ -103,6 +103,8 @@ option('libnfs', type : 'feature', value : 'auto',
|
|||||||
description: 'libnfs block device driver')
|
description: 'libnfs block device driver')
|
||||||
option('mpath', type : 'feature', value : 'auto',
|
option('mpath', type : 'feature', value : 'auto',
|
||||||
description: 'Multipath persistent reservation passthrough')
|
description: 'Multipath persistent reservation passthrough')
|
||||||
|
option('numa', type : 'feature', value : 'auto',
|
||||||
|
description: 'libnuma support')
|
||||||
option('iconv', type : 'feature', value : 'auto',
|
option('iconv', type : 'feature', value : 'auto',
|
||||||
description: 'Font glyph conversion support')
|
description: 'Font glyph conversion support')
|
||||||
option('curses', type : 'feature', value : 'auto',
|
option('curses', type : 'feature', value : 'auto',
|
||||||
|
@ -71,6 +71,7 @@ meson_options_help() {
|
|||||||
printf "%s\n" ' multiprocess Out of process device emulation support'
|
printf "%s\n" ' multiprocess Out of process device emulation support'
|
||||||
printf "%s\n" ' netmap netmap network backend support'
|
printf "%s\n" ' netmap netmap network backend support'
|
||||||
printf "%s\n" ' nettle nettle cryptography support'
|
printf "%s\n" ' nettle nettle cryptography support'
|
||||||
|
printf "%s\n" ' numa libnuma support'
|
||||||
printf "%s\n" ' nvmm NVMM acceleration support'
|
printf "%s\n" ' nvmm NVMM acceleration support'
|
||||||
printf "%s\n" ' oss OSS sound support'
|
printf "%s\n" ' oss OSS sound support'
|
||||||
printf "%s\n" ' pa PulseAudio sound support'
|
printf "%s\n" ' pa PulseAudio sound support'
|
||||||
@ -218,6 +219,8 @@ _meson_option_parse() {
|
|||||||
--disable-netmap) printf "%s" -Dnetmap=disabled ;;
|
--disable-netmap) printf "%s" -Dnetmap=disabled ;;
|
||||||
--enable-nettle) printf "%s" -Dnettle=enabled ;;
|
--enable-nettle) printf "%s" -Dnettle=enabled ;;
|
||||||
--disable-nettle) printf "%s" -Dnettle=disabled ;;
|
--disable-nettle) printf "%s" -Dnettle=disabled ;;
|
||||||
|
--enable-numa) printf "%s" -Dnuma=enabled ;;
|
||||||
|
--disable-numa) printf "%s" -Dnuma=disabled ;;
|
||||||
--enable-nvmm) printf "%s" -Dnvmm=enabled ;;
|
--enable-nvmm) printf "%s" -Dnvmm=enabled ;;
|
||||||
--disable-nvmm) printf "%s" -Dnvmm=disabled ;;
|
--disable-nvmm) printf "%s" -Dnvmm=disabled ;;
|
||||||
--enable-oss) printf "%s" -Doss=enabled ;;
|
--enable-oss) printf "%s" -Doss=enabled ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user