API changes on OpenBSD and FreeBSD...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40408
This commit is contained in:
Sam Lantinga 2002-06-12 03:32:01 +00:00
parent 7825ae2b6d
commit f794e9e37c
2 changed files with 40 additions and 1 deletions

View file

@ -1614,6 +1614,33 @@ CheckUSBHID()
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"