Commit 05049da4 authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40404
parent 2d3904c3
...@@ -1545,9 +1545,13 @@ CheckUSBHID() ...@@ -1545,9 +1545,13 @@ CheckUSBHID()
SYSTEM_LIBS="$SYSTEM_LIBS -lusb" SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
fi fi
AC_CHECK_HEADER(usb.h, have_usb_h=yes)
AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes) AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes) AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes) AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
if test x$have_usb_h = xyes; then
CFLAGS="$CFLAGS -DHAVE_USB_H"
fi
if test x$have_usbhid_h = xyes; then if test x$have_usbhid_h = xyes; then
CFLAGS="$CFLAGS -DHAVE_USBHID_H" CFLAGS="$CFLAGS -DHAVE_USBHID_H"
fi fi
...@@ -1561,6 +1565,9 @@ CheckUSBHID() ...@@ -1561,6 +1565,9 @@ CheckUSBHID()
AC_MSG_CHECKING(for usbhid) AC_MSG_CHECKING(for usbhid)
have_usbhid=no have_usbhid=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined(HAVE_USB_H)
#include <usb.h>
#endif
#include <dev/usb/usb.h> #include <dev/usb/usb.h>
#include <dev/usb/usbhid.h> #include <dev/usb/usbhid.h>
#if defined(HAVE_USBHID_H) #if defined(HAVE_USBHID_H)
...@@ -1569,7 +1576,6 @@ CheckUSBHID() ...@@ -1569,7 +1576,6 @@ CheckUSBHID()
#include <libusb.h> #include <libusb.h>
#elif defined(HAVE_LIBUSBHID_H) #elif defined(HAVE_LIBUSBHID_H)
#include <libusbhid.h> #include <libusbhid.h>
#endif
],[ ],[
struct report_desc *repdesc; struct report_desc *repdesc;
struct usb_ctl_report *repbuf; struct usb_ctl_report *repbuf;
......
...@@ -39,6 +39,9 @@ static char rcsid = ...@@ -39,6 +39,9 @@ static char rcsid =
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#if defined(HAVE_USB_H)
#include <usb.h>
#endif
#include <dev/usb/usb.h> #include <dev/usb/usb.h>
#include <dev/usb/usbhid.h> #include <dev/usb/usbhid.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment