Submitted by Simone:

patch #8128: Added new option to configure.ac script
* configure.ac (disable-libusb_1_0): New option




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1423 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2018-01-18 22:15:08 +00:00
parent 7de935d3ad
commit 9cb9f504ae
3 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2018-01-18 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Simone:
patch #8128: Added new option to configure.ac script
* configure.ac (disable-libusb_1_0): New option
2018-01-18 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Jan Egil Ruud:

2
NEWS
View File

@ -16,6 +16,7 @@ Current:
- TPI support for USBtinyISP
- AVR Doper uses libhidapi rather than raw libusb (patch #9033)
- -P net:host:port can use IPv6 now (Posix systems only)
- New configure option: -disable-libusb_1_0
* New devices supported:
@ -62,6 +63,7 @@ Current:
patch #9185: Add extended_param to usbasp.c - erasing
patch #8311: Add IPv6 support to the -Pnet:host:port option
patch #9542: Correct "usersig" on avr8x devices
patch #8128: Added new option to configure.ac script
* Internals:
- New avrdude.conf keyword "family_id", used to verify SIB attributes

View File

@ -115,10 +115,22 @@ if test x$have_libusb = xyes; then
fi
AC_SUBST(LIBUSB, $LIBUSB)
AC_ARG_ENABLE(
[libusb_1_0],
AC_HELP_STRING(
[--disable-libusb_1_0],
[Allow to build with libusb instead of libusb_1_0 if both are present]),
[case "${enableval}" in
yes) enabled_libusb_1_0=yes ;;
no) enabled_libusb_1_0=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-libusb_1_0 option) ;;
esac],
[enabled_libusb_1_0=yes])
AH_TEMPLATE([HAVE_LIBUSB_1_0],
[Define if USB support is enabled via libusb 1.0])
AC_CHECK_LIB([usb-1.0], [libusb_init], [have_libusb_1_0=yes])
if test x$have_libusb_1_0 = xyes; then
if test x$have_libusb_1_0 = xyes && test x$enabled_libusb_1_0 = xyes; then
case $target in
*-*-darwin*)
LIBUSB_1_0="-lusb-1.0 -framework CoreFoundation -framework IOKit"
@ -134,7 +146,7 @@ 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
if test x$have_libusb_1_0 = xyes test x$have_libusb_1_0 = xyes; then
case $target in
*-*-freebsd*)
# FreeBSD 8+ has a native libusb-1.0 API compatible
@ -517,7 +529,11 @@ else
fi
if test x$have_libusb_1_0 = xyes; then
echo "DO HAVE libusb_1_0"
if test x$enabled_libusb_1_0 = xyes; then
echo "DO HAVE libusb_1_0"
else
echo "DISABLED libusb_1_0"
fi
else
echo "DON'T HAVE libusb_1_0"
fi