diff configure.in @ 407:173909e17b7f

API changes on OpenBSD and FreeBSD...
author Sam Lantinga <slouken@libsdl.org>
date Wed, 12 Jun 2002 03:32:01 +0000
parents cbb346aca05d
children 2a1486305412
line wrap: on
line diff
--- a/configure.in	Wed Jun 12 03:30:58 2002 +0000
+++ b/configure.in	Wed Jun 12 03:32:01 2002 +0000
@@ -1614,6 +1614,33 @@
                 CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
             fi
             AC_MSG_RESULT($have_usbhid_ucr_data)
+            
+	    AC_MSG_CHECKING(for new usbhid API)
+            have_usbhid_new=no
+            AC_TRY_COMPILE([
+              #include <sys/types.h>
+              #if defined(HAVE_USB_H)
+              #include <usb.h>
+              #endif
+              #include <dev/usb/usb.h>
+              #include <dev/usb/usbhid.h>
+              #if defined(HAVE_USBHID_H)
+              #include <usbhid.h>
+              #elif defined(HAVE_LIBUSB_H)
+              #include <libusb.h>
+              #elif defined(HAVE_LIBUSBHID_H)
+              #include <libusbhid.h>
+              #endif
+            ],[
+              report_desc_t d;
+	      hid_start_parse(d, 1, 1);
+            ],[
+            have_usbhid_new=yes
+            ])
+            if test x$have_usbhid_new = xyes; then
+                CFLAGS="$CFLAGS -DUSBHID_NEW"
+            fi
+            AC_MSG_RESULT($have_usbhid_new)
 
             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"