diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-07 15:08:21 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-14 09:50:57 +0200 |
commit | e17239993d0f55c6b67a0318f177ab1168817e01 (patch) | |
tree | 1880ddb28db5f9da6507082f93dd8bc05e85482c /meson.build | |
parent | ff66f3e55b5a8d95f0af1b7573bbcad5212b0ce7 (diff) | |
download | qemu-e17239993d0f55c6b67a0318f177ab1168817e01.zip qemu-e17239993d0f55c6b67a0318f177ab1168817e01.tar.gz qemu-e17239993d0f55c6b67a0318f177ab1168817e01.tar.bz2 |
configure, meson: move vde detection to meson
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20211007130829.632254-11-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 0ecb220..0e948a8 100644 --- a/meson.build +++ b/meson.build @@ -500,9 +500,28 @@ else xkbcommon = dependency('xkbcommon', required: get_option('xkbcommon'), method: 'pkg-config', kwargs: static_kwargs) endif + vde = not_found -if config_host.has_key('CONFIG_VDE') - vde = declare_dependency(link_args: config_host['VDE_LIBS'].split()) +if not get_option('vde').auto() or have_system or have_tools + vde = cc.find_library('vdeplug', has_headers: ['libvdeplug.h'], + required: get_option('vde'), + kwargs: static_kwargs) +endif +if vde.found() and not cc.links(''' + #include <libvdeplug.h> + int main(void) + { + struct vde_open_args a = {0, 0, 0}; + char s[] = ""; + vde_open(s, s, &a); + return 0; + }''', dependencies: vde) + vde = not_found + if get_option('cap_ng').enabled() + error('could not link libvdeplug') + else + warning('could not link libvdeplug, disabling') + endif endif pulse = not_found @@ -1441,6 +1460,7 @@ config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) +config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) @@ -3290,7 +3310,7 @@ if targetos == 'linux' endif summary_info += {'JACK support': jack} summary_info += {'brlapi support': brlapi} -summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} +summary_info += {'vde support': vde} summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} summary_info += {'Linux AIO support': libaio} summary_info += {'Linux io_uring support': linux_io_uring} |