mirror of
https://github.com/X11Libre/xf86-input-joystick.git
synced 2026-03-24 01:34:06 +00:00
fix Dragonfly BSD build
On Dragonfly the USB headers are in different locations, view #define's differ in naming. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
49c36ac0f1
commit
b501e24344
19
configure.ac
19
configure.ac
@@ -69,15 +69,16 @@ if test "x$linux_backend" = xyes; then
|
||||
AC_DEFINE(LINUX_BACKEND, 1, [Compile Linux joystick backend])
|
||||
fi
|
||||
|
||||
bsd_backend=yes
|
||||
AC_CHECK_HEADERS([dev/usb/usb.h])
|
||||
AC_CHECK_HEADERS([usbhid.h dev/usb/usbhid.h],, [bsd_backend=no],
|
||||
[[#if HAVE_DEV_USB_USB_H
|
||||
#include <dev/usb/usb.h>
|
||||
#endif
|
||||
]])
|
||||
AC_CHECK_HEADERS([dev/hid/hid.h])
|
||||
AC_CHECK_LIB([usbhid],[hid_get_item],, [bsd_backend=no])
|
||||
bsd_backend=no
|
||||
case $host_os in
|
||||
*dragonfly*)
|
||||
AC_CHECK_HEADERS([bus/u4b/usb.h bus/u4b/usbhid.h], [bsd_backend=yes])
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_HEADERS([dev/usb/usbhid.h], [bsd_backend=yes])
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(BSD_BACKEND, [test "x$bsd_backend" = xyes])
|
||||
if test "x$bsd_backend" = xyes; then
|
||||
AC_CHECK_HEADERS([dev/usb/usb_ioctl.h])
|
||||
|
||||
@@ -40,8 +40,21 @@
|
||||
#include <xf86_OSproc.h>
|
||||
|
||||
#include <usbhid.h>
|
||||
|
||||
#ifdef __DragonFly__
|
||||
|
||||
#include <bus/u4b/usb.h>
|
||||
#include <bus/u4b/usbhid.h>
|
||||
|
||||
#define USB_GET_REPORT_ID UR_GET_REPORT
|
||||
|
||||
#else /* __DragonFly__ */
|
||||
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
|
||||
#endif /* __DragonFly__ */
|
||||
|
||||
#ifdef HAVE_DEV_HID_HID_H
|
||||
#include <dev/hid/hid.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user