meson: move libudev test

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-09-16 17:54:14 +02:00
parent 19ca8285fc
commit f01496a314
2 changed files with 4 additions and 17 deletions

View file

@ -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')}