Add a check for FreeBSD's libusb-1.0 compatible library that is found
in libusb.a/.so on FreeBSD 8+. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@980 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
43bd052abf
commit
6dff35135d
|
@ -1,3 +1,9 @@
|
|||
2011-08-25 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* configure.ac: Add a check for FreeBSD's libusb-1.0
|
||||
compatible library that is found in libusb.a/.so on
|
||||
FreeBSD 8+.
|
||||
|
||||
2011-08-25 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
Submitted by Doug Springer, based on work by
|
||||
|
|
20
configure.ac
20
configure.ac
|
@ -82,6 +82,26 @@ if test x$have_libusb_1_0 = xyes; then
|
|||
AC_CHECK_HEADERS([libusb-1.0/libusb.h])
|
||||
AC_CHECK_HEADERS([libusb.h])
|
||||
fi
|
||||
AH_TEMPLATE([HAVE_LIBUSB_1_0],
|
||||
[Define if USB support is enabled via a libusb-1.0 compatible libusb])
|
||||
AC_CHECK_LIB([usb], [libusb_init], [have_libusb_1_0=yes])
|
||||
if test x$have_libusb_1_0 = xyes; then
|
||||
case $target in
|
||||
*-*-freebsd*)
|
||||
# FreeBSD 8+ has a native libusb-1.0 API compatible
|
||||
# library offered by -lusb (which is also libusb-0.1
|
||||
# compatible). FreeBSD <8 does not have a libusb-1.0
|
||||
# at all so probing will fail but we do not have to
|
||||
# special-case that.
|
||||
LIBUSB_1_0="-lusb"
|
||||
;;
|
||||
*)
|
||||
LIBUSB_1_0="-lusb-1.0"
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE([HAVE_LIBUSB_1_0])
|
||||
AC_CHECK_HEADERS([libusb.h])
|
||||
fi
|
||||
AC_SUBST(LIBUSB_1_0, $LIBUSB_1_0)
|
||||
AH_TEMPLATE([HAVE_LIBFTDI],
|
||||
[Define if FTDI support is enabled via libftdi])
|
||||
|
|
Loading…
Reference in New Issue