configure.in
changeset 407 173909e17b7f
parent 404 cbb346aca05d
child 413 2a1486305412
     1.1 --- a/configure.in	Wed Jun 12 03:30:58 2002 +0000
     1.2 +++ b/configure.in	Wed Jun 12 03:32:01 2002 +0000
     1.3 @@ -1614,6 +1614,33 @@
     1.4                  CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
     1.5              fi
     1.6              AC_MSG_RESULT($have_usbhid_ucr_data)
     1.7 +            
     1.8 +	    AC_MSG_CHECKING(for new usbhid API)
     1.9 +            have_usbhid_new=no
    1.10 +            AC_TRY_COMPILE([
    1.11 +              #include <sys/types.h>
    1.12 +              #if defined(HAVE_USB_H)
    1.13 +              #include <usb.h>
    1.14 +              #endif
    1.15 +              #include <dev/usb/usb.h>
    1.16 +              #include <dev/usb/usbhid.h>
    1.17 +              #if defined(HAVE_USBHID_H)
    1.18 +              #include <usbhid.h>
    1.19 +              #elif defined(HAVE_LIBUSB_H)
    1.20 +              #include <libusb.h>
    1.21 +              #elif defined(HAVE_LIBUSBHID_H)
    1.22 +              #include <libusbhid.h>
    1.23 +              #endif
    1.24 +            ],[
    1.25 +              report_desc_t d;
    1.26 +	      hid_start_parse(d, 1, 1);
    1.27 +            ],[
    1.28 +            have_usbhid_new=yes
    1.29 +            ])
    1.30 +            if test x$have_usbhid_new = xyes; then
    1.31 +                CFLAGS="$CFLAGS -DUSBHID_NEW"
    1.32 +            fi
    1.33 +            AC_MSG_RESULT($have_usbhid_new)
    1.34  
    1.35              JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
    1.36              JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"