[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/34] meson, configure: move usbfs test to meson
From: |
Paolo Bonzini |
Subject: |
[PATCH v2 10/34] meson, configure: move usbfs test to meson |
Date: |
Sat, 23 Apr 2022 14:51:27 +0200 |
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 28 ----------------------------
meson.build | 13 +++++++++++++
2 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/configure b/configure
index 313579019d..d527a9c22e 100755
--- a/configure
+++ b/configure
@@ -2160,31 +2160,6 @@ case "$fdt" in
;;
esac
-##########################################
-# check for usbfs
-have_usbfs=no
-if test "$linux_user" = "yes"; then
- cat > $TMPC << EOF
-#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;
-}
-EOF
- if compile_prog "" ""; then
- have_usbfs=yes
- fi
-fi
-
##########################################
# capstone
@@ -2641,9 +2616,6 @@ fi
if test "$module_upgrades" = "yes"; then
echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
fi
-if test "$have_usbfs" = "yes" ; then
- echo "CONFIG_USBFS=y" >> $config_host_mak
-fi
if test "$gio" = "yes" ; then
echo "CONFIG_GIO=y" >> $config_host_mak
echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
diff --git a/meson.build b/meson.build
index b39b157222..a26eb878ea 100644
--- a/meson.build
+++ b/meson.build
@@ -1938,6 +1938,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('''
--
2.35.1
- [PATCH v2 00/34] Misc meson conversions for QEMU 7.1, Paolo Bonzini, 2022/04/23
- [PATCH v2 01/34] meson: show final set of compiler flags, Paolo Bonzini, 2022/04/23
- [PATCH v2 02/34] configure: remove dead code, Paolo Bonzini, 2022/04/23
- [PATCH v2 04/34] configure: pc-bios/qemu-icon.bmp does not exist, Paolo Bonzini, 2022/04/23
- [PATCH v2 03/34] qga: wixl: get path to sysroot from pkg-config as intended, Paolo Bonzini, 2022/04/23
- [PATCH v2 05/34] configure: gcov should not exclude fortify-source, Paolo Bonzini, 2022/04/23
- [PATCH v2 06/34] configure: move --enable/--disable-debug-info to second option parsing pass, Paolo Bonzini, 2022/04/23
- [PATCH v2 07/34] configure, meson: move OpenGL check to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 08/34] meson, configure: move RDMA options to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 09/34] meson, configure: move keyctl test to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 10/34] meson, configure: move usbfs test to meson,
Paolo Bonzini <=
- [PATCH v2 11/34] meson, configure: move libgio test to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 13/34] meson, configure: move --enable-module-upgrades to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 12/34] meson: remove CONFIG_XEN_PCI_PASSTHROUGH from config-target.h, Paolo Bonzini, 2022/04/23
- [PATCH v2 15/34] meson-buildoptions: add support for string options, Paolo Bonzini, 2022/04/23
- [PATCH v2 16/34] configure, meson: move iasl detection to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 23/34] meson: always combine directories with prefix, Paolo Bonzini, 2022/04/23
- [PATCH v2 24/34] configure: switch directory options to automatic parsing, Paolo Bonzini, 2022/04/23
- [PATCH v2 14/34] meson, configure: move Xen detection to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 18/34] configure: switch string options to automatic parsing, Paolo Bonzini, 2022/04/23
- [PATCH v2 29/34] build: move vhost-vsock configuration to Kconfig, Paolo Bonzini, 2022/04/23