On Wed, 24 Mar 2010 19:43:22 +0200, Damjan Jovanovic damjan.jov@gmail.com wrote:
On Wed, Mar 24, 2010 at 6:58 PM, Albert Lee trisk@forkgnu.org wrote:
On Wed, 24 Mar 2010 16:15:59 +0200, Damjan Jovanovic damjan.jov@gmail.com wrote:
Changelog:
- configure.ac: detect libusb-1.0
There are multiple libusb implementations (notably, Solaris libusb and FreeBSD libusb20) and it would be necessary to do an API test for
those,
rather than using pkgconfig.
-Albert
My patch already distinguishes between libusb-1.0 and libusb-0.1 - they have different headers, different libnames, and different pkg-config names.
Okay, that's great to know. I hadn't seen your existing code.
Freebsd's libusb20 has all symbols starting with libusb20_tr_: http://www.unix.com/man-page/FreeBSD/3/libusb20/
libusb20 supports the libusb-0.1 (specifically libusb-0.1.12) interfaces.
Solaris seems to use standard libusb-0.1:
http://src.opensolaris.org/source/xref/sfw/usr/src/lib/libusb/doc/libusb.txt
Like libusb20, it is an independent conforming implementation: "Johannes Erdfelt started the libusb project, did the libusb implementation for linux and is responsible for the libusb API definition. Solaris and Sun Ray implementations were done by Sun based on the interfaces in usb.h."
We can't support 4 differerent libusb's. The one I propose here is libusb-1.0 (http://libusb.sourceforge./net), which runs on Linux and MacOS and is currently being ported to Windows itself. It is designed to be easy to port.
Looks like there are only two sets of interfaces. that matter - libusb-0.1 and libusb-1.0. libusb (the implementation) cannot be the native library on many platforms because of its licence. The libusb-0.1 interfaces are more widely supported, and the incentive for other implementations to support the new API seems to be low. It seems reasonable for Wine's low-level USB code to still be able to utilise libusb-0.1 if libusb-1.0 is not available.
-Albert