summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini2022-04-20 17:33:43 +0200
committerPaolo Bonzini2022-04-28 08:52:22 +0200
commit0dae95d4ad00b42814d3da451783d0b1f372ada4 (patch)
tree025c03dcffba5fb183e0727d4d192b28984fe43e /meson.build
parentmeson, configure: move keyctl test to meson (diff)
downloadqemu-0dae95d4ad00b42814d3da451783d0b1f372ada4.tar.gz
qemu-0dae95d4ad00b42814d3da451783d0b1f372ada4.tar.xz
qemu-0dae95d4ad00b42814d3da451783d0b1f372ada4.zip
meson, configure: move usbfs test to meson
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 13 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 64161dffe7..c99b28a5ef 100644
--- a/meson.build
+++ b/meson.build
@@ -1940,6 +1940,19 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + '''
return getauxval(AT_HWCAP) == 0;
}'''))
+config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles('''
+ #include <linux/usbdevice_fs.h>
+
+ #ifndef USBDEVFS_GET_CAPABILITIES
+ #error "USBDEVFS_GET_CAPABILITIES undefined"
+ #endif
+
+ #ifndef USBDEVFS_DISCONNECT_CLAIM
+ #error "USBDEVFS_DISCONNECT_CLAIM undefined"
+ #endif
+
+ int main(void) { return 0; }'''))
+
have_keyring = get_option('keyring') \
.require(targetos == 'linux', error_message: 'keyring is only available on Linux') \
.require(cc.compiles('''