[PATCH] configure: Check for a recent enough version of libusb.

Zebediah Figura z.figura12 at gmail.com
Tue Apr 21 23:55:12 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
Some particularly old but currently extant runtimes are too old to have this
function, in particular, Ubuntu 16.04 LTS, and the Steam runtime.

It's also possible, though it would be somewhat annoying, to replace uses of
libusb_interrupt_event_handler() with a poll() loop.  I'm not sure that it would
be worthwhile, however.

 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 37e3445a342..00b3f38d4aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1480,11 +1480,11 @@ if test "x$with_usb" != "xno"
 then
     WINE_PACKAGE_FLAGS(USB,[libusb-1.0],[-lusb-1.0],,,
         [AC_CHECK_HEADER([libusb.h],
-            [AC_CHECK_LIB(usb-1.0,libusb_init,[:],[USB_LIBS=""],[$USB_LIBS])],
+            [AC_CHECK_LIB(usb-1.0,libusb_interrupt_event_handler,[:],[USB_LIBS=""],[$USB_LIBS])],
             [USB_LIBS=""])])
 fi
-WINE_NOTICE_WITH(usb,[test "$ac_cv_lib_usb_1_0_libusb_init" != "yes"],
-                 [libusb-1.0 ${notice_platform}development files not found, USB devices won't be supported.],
+WINE_NOTICE_WITH(usb,[test "$ac_cv_lib_usb_1_0_libusb_interrupt_event_handler" != "yes"],
+                 [libusb-1.0 ${notice_platform}development files not found (or too old), USB devices won't be supported.],
                  [enable_wineusb_sys])
 
 dnl **** Check for libv4l2 ****
-- 
2.26.0




More information about the wine-devel mailing list