[PATCH v2 0/1] MR10279: configure.ac: fixes libusb detection on FreeBSD
This fixes libusb detection on FreeBSD. I don't have a simple program to test though, nor a specific peripheral that need such access. I haven't build on GNU/Linux, but I think that it should not be impacted (hopefully, the build cluster will tell us). -- v2: configure.ac: fixes libusb detection on FreeBSD https://gitlab.winehq.org/wine/wine/-/merge_requests/10279
From: Thibault Payet <contact@thibaultpayet.fr> --- configure.ac | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 72b9a85929a..000399492e3 100644 --- a/configure.ac +++ b/configure.ac @@ -1597,14 +1597,35 @@ WINE_NOTICE_WITH(sane,[test "$ac_cv_lib_sane_sane_init" != "yes"], dnl **** Check for libusb **** 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_interrupt_event_handler,[:],[USB_LIBS=""],[$USB_LIBS])], - [USB_LIBS=""])]) + + case $host_os in + freebsd*) + WINE_PACKAGE_FLAGS(USB,[libusb-1.0],[-lusb],,, + [AC_CHECK_HEADER([libusb.h], + [AC_CHECK_LIB(usb,libusb_interrupt_event_handler,[:],[USB_LIBS=""],[$USB_LIBS])], + [USB_LIBS=""])]) + ;; + *) + WINE_PACKAGE_FLAGS(USB,[libusb-1.0],[-lusb-1.0],,, + [AC_CHECK_HEADER([libusb.h], + [AC_CHECK_LIB(usb-1.0,libusb_interrupt_event_handler,[:],[USB_LIBS=""],[$USB_LIBS])], + [USB_LIBS=""])]) + ;; + esac + fi -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]) +case $host_os in + freebsd*) + WINE_NOTICE_WITH(usb,[test "$ac_cv_lib_usb_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]) + ;; + *) + 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]) + ;; +esac dnl **** Check for libv4l2 **** if test "x$with_v4l2" != "xno" -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10279
participants (2)
-
Thibault Payet -
Thibault Payet (@thpayet)