aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-09-16 17:54:14 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-30 19:11:15 +0200
commitf01496a314d916949ef84426d6cdd34f50447bb7 (patch)
tree6558ef3a20d3628b51106c6e6e1c6f7d391ff0a3 /meson.build
parent19ca8285fcd61a8f60f2f44f789a561e0958e8e6 (diff)
meson: move libudev test
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 4 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 975a187e2c..cd3d1ee260 100644
--- a/meson.build
+++ b/meson.build
@@ -257,8 +257,8 @@ if 'CONFIG_CURL' in config_host
link_args: config_host['CURL_LIBS'].split())
endif
libudev = not_found
-if 'CONFIG_LIBUDEV' in config_host
- libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
+if targetos == 'linux' and (have_system or have_tools)
+ libudev = dependency('libudev', static: enable_static)
endif
brlapi = not_found
if 'CONFIG_BRLAPI' in config_host
@@ -440,6 +440,7 @@ has_gettid = cc.has_function('gettid')
# Create config-host.h
+config_host_data.set('CONFIG_LIBUDEV', libudev.found())
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
config_host_data.set('CONFIG_VNC', vnc.found())
@@ -1450,7 +1451,7 @@ summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')}
summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')}
summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')}
summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')}
-summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')}
+summary_info += {'libudev': libudev.found()}
summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'}
summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')}
summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')}