aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 23 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 0ecb220af1..0e948a8024 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}