* configure.ac: Improve the detection of the Win32 HID library,
and the presence of the header ddk/hidsdi.h. It now works correctly under Cygwin and several flavours of MinGW. * Makefile.am: Add new LIBHID pattern. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@719 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
02c2030a64
commit
c573e47717
|
@ -1,3 +1,10 @@
|
||||||
|
2007-01-12 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* configure.ac: Improve the detection of the Win32 HID library,
|
||||||
|
and the presence of the header ddk/hidsdi.h. It now works
|
||||||
|
correctly under Cygwin and several flavours of MinGW.
|
||||||
|
* Makefile.am: Add new LIBHID pattern.
|
||||||
|
|
||||||
2007-01-11 Joerg Wunsch <j@uriah.heep.sax.de>
|
2007-01-11 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
* butterfly.c (butterfly_initialize): when sending the 'T'
|
* butterfly.c (butterfly_initialize): when sending the 'T'
|
||||||
|
|
|
@ -47,7 +47,7 @@ avrdude_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
|
||||||
|
|
||||||
avrdude_CFLAGS = @ENABLE_WARNINGS@
|
avrdude_CFLAGS = @ENABLE_WARNINGS@
|
||||||
|
|
||||||
avrdude_LDADD = @LIBUSB@
|
avrdude_LDADD = @LIBUSB@ @LIBHID@
|
||||||
|
|
||||||
bin_PROGRAMS = avrdude
|
bin_PROGRAMS = avrdude
|
||||||
|
|
||||||
|
|
47
configure.ac
47
configure.ac
|
@ -60,16 +60,36 @@ if test x$have_libusb = xyes; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBUSB, $LIBUSB)
|
AC_SUBST(LIBUSB, $LIBUSB)
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([limits.h stdlib.h string.h])
|
||||||
|
AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h])
|
||||||
|
AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include <windows.h>
|
||||||
|
#include <setupapi.h>])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_PROG_GCC_TRADITIONAL
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for a Win32 HID libray])
|
AC_MSG_CHECKING([for a Win32 HID libray])
|
||||||
SAVED_LIBS="${LIBS}"
|
SAVED_LIBS="${LIBS}"
|
||||||
case $target in
|
case $target in
|
||||||
*-*-mingw32*)
|
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
||||||
LIBHID="-lhid -lsetupapi"
|
LIBHID="-lhid -lsetupapi"
|
||||||
HIDINCLUDE="#include <ddk/hidsdi.h>"
|
if test $ac_cv_header_ddk_hidsdi_h = yes
|
||||||
|
then
|
||||||
|
HIDINCLUDE="#include <ddk/hidsdi.h>"
|
||||||
|
else
|
||||||
|
HIDINCLUDE="#include \"my_ddk_hidsdi.h\""
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LIBHID="-lhid"
|
LIBHID=""
|
||||||
HIDINCLUDE='#include "my_ddk_hidsdi.h"'
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
LIBS="${LIBS} ${LIBHID}"
|
LIBS="${LIBS} ${LIBHID}"
|
||||||
|
@ -96,22 +116,7 @@ else
|
||||||
LIBHID=""
|
LIBHID=""
|
||||||
fi
|
fi
|
||||||
LIBS="${SAVED_LIBS}"
|
LIBS="${SAVED_LIBS}"
|
||||||
|
AC_SUBST(LIBHID, $LIBHID)
|
||||||
# Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_CHECK_HEADERS([limits.h stdlib.h string.h])
|
|
||||||
AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h])
|
|
||||||
AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include <windows.h>
|
|
||||||
#include <setupapi.h>])
|
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
AC_C_CONST
|
|
||||||
AC_HEADER_TIME
|
|
||||||
|
|
||||||
# Checks for library functions.
|
|
||||||
AC_PROG_GCC_TRADITIONAL
|
|
||||||
AC_FUNC_MALLOC
|
|
||||||
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday])
|
|
||||||
|
|
||||||
# Checks for misc stuff.
|
# Checks for misc stuff.
|
||||||
|
|
||||||
|
@ -232,7 +237,7 @@ export confsubst
|
||||||
case $target in
|
case $target in
|
||||||
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
||||||
WINDOWS_DIRS="windows"
|
WINDOWS_DIRS="windows"
|
||||||
CFLAGS="-mno-cygwin -DWIN32NATIVE"
|
CFLAGS="${CFLAGS} -mno-cygwin -DWIN32NATIVE"
|
||||||
LDFLAGS="${LDFLAGS} -static"
|
LDFLAGS="${LDFLAGS} -static"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue