configury: allow libusb-less hidapi for macosx.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/configure b/configure
index 30e1b10..b0657da 100755
--- a/configure
+++ b/configure
@@ -24221,6 +24221,12 @@ fi
CFLAGS="$save_CFLAGS"
if test x$have_libusb_h = xyes; then
hidapi_support=yes
+ elif test x$onlylibusb = xno; then
+ case "$host" in
+ *-*-darwin* )
+ hidapi_support=yes
+ ;;
+ esac
fi
fi
@@ -24236,6 +24242,12 @@ $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
if test x$onlylibusb = xyes; then
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
+ elif test x$have_libusb_h != xyes ; then
+ case "$host" in
+ *-*-darwin* )
+ SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
+ ;;
+ esac
else
if test x$have_loadso != xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&5
diff --git a/configure.ac b/configure.ac
index 101eb2d..0d13684 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3236,6 +3236,12 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
CFLAGS="$save_CFLAGS"
if test x$have_libusb_h = xyes; then
hidapi_support=yes
+ elif test x$onlylibusb = xno; then
+ case "$host" in
+ *-*-darwin* )
+ hidapi_support=yes
+ ;;
+ esac
fi
fi
@@ -3249,6 +3255,12 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
if test x$onlylibusb = xyes; then
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
+ elif test x$have_libusb_h != xyes ; then
+ case "$host" in
+ *-*-darwin* )
+ SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
+ ;;
+ esac
else
if test x$have_loadso != xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])