Submitted by Thomas Fischl (initially):

Add the CoreFoundation and IOKit framework linker flags on MacOS X
when configuring for USB support.

patch #4685: Libusb on MacOS X: detection and additional includes

Thanks to Matthias Ringwald for testing the reworked patch.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@666 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2006-09-24 13:35:40 +00:00
parent 73cfe88386
commit 65d1632701
2 changed files with 21 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2006-09-24 Joerg Wunsch <j@uriah.heep.sax.de>
Submitted by Thomas Fischl (initially):
* configure.ac: Add the CoreFoundation and IOKit framework
linker flags on MacOS X when configuring for USB support.
patch #4685: Libusb on MacOS X: detection and additional includes
2006-09-20 Joerg Wunsch <j@uriah.heep.sax.de>
* avr910.c: As there is a lot of ambiguity about the AVR910

View File

@ -44,14 +44,20 @@ AM_PROG_LEX
AC_CHECK_LIB([termcap], [tputs])
AC_CHECK_LIB([ncurses], [tputs])
AC_CHECK_LIB([readline], [readline])
# usb_get_string_simple is only available in recent enough
# versions of libusb, so use that as a decision base.
AC_CHECK_LIB([usb], [usb_get_string_simple],
[LIBUSB=-lusb
AC_DEFINE([HAVE_LIBUSB],
[1],
[Define to 1 if libusb is available.])],
[LIBUSB=])
AH_TEMPLATE([HAVE_LIBUSB],
[Define if USB support is enabled via libusb])
AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes])
if test x$have_libusb = xyes; then
case $target in
*-*-darwin*)
LIBUSB="-lusb -framework CoreFoundation -framework IOKit"
;;
*)
LIBUSB="-lusb"
;;
esac
AC_DEFINE([HAVE_LIBUSB])
fi
AC_SUBST(LIBUSB, $LIBUSB)
# Checks for header files.