[PATCH 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). -- 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 f63669df192..7a02c06f6ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1552,14 +1552,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
This will link to libusb 0.1, which can't possibly work. Have you build tested this? What's preventing libusb 1.0 from working on FreeBSD? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10279#note_131663
participants (3)
-
Elizabeth Figura (@zfigura) -
Thibault Payet -
Thibault Payet (@thpayet)