autotools: initial adjustments after the recent hidapi changes.
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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
diff --git a/configure b/configure
index c87dc3d..c46659f 100755
--- a/configure
+++ b/configure
@@ -17312,6 +17312,7 @@ SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.c"
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
+SOURCES="$SOURCES $srcdir/src/hidapi/*.c"
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
SOURCES="$SOURCES $srcdir/src/libm/*.c"
SOURCES="$SOURCES $srcdir/src/misc/*.c"
@@ -24546,6 +24547,12 @@ else
fi
+ if test x$enable_hidapi != xyes; then
+
+$as_echo "#define SDL_HIDAPI_DISABLED 1" >>confdefs.h
+
+ fi
+
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
case "$host" in
# libusb does not support iOS
@@ -24652,9 +24659,7 @@ fi
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
if test x$have_libusb_h = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
@@ -24685,6 +24690,10 @@ _ACEOF
fi
fi
+ else
+
+$as_echo "#define SDL_HIDAPI_DISABLED 1" >>confdefs.h
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
diff --git a/configure.ac b/configure.ac
index bec63a7..a791902 100644
--- a/configure.ac
+++ b/configure.ac
@@ -408,6 +408,7 @@ SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.c"
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
+SOURCES="$SOURCES $srcdir/src/hidapi/*.c"
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
SOURCES="$SOURCES $srcdir/src/libm/*.c"
SOURCES="$SOURCES $srcdir/src/misc/*.c"
@@ -3386,6 +3387,10 @@ CheckHIDAPI()
[AS_HELP_STRING([--enable-hidapi-libusb], [use libusb for low level joystick drivers [default=maybe]])],
, enable_hidapi_libusb=maybe)
+ if test x$enable_hidapi != xyes; then
+ AC_DEFINE(SDL_HIDAPI_DISABLED, 1, [ ])
+ fi
+
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
case "$host" in
# libusb does not support iOS
@@ -3413,9 +3418,7 @@ CheckHIDAPI()
if test x$hidapi_support = xyes; then
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
if test x$have_libusb_h = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
@@ -3441,6 +3444,8 @@ CheckHIDAPI()
AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
fi
fi
+ else
+ AC_DEFINE(SDL_HIDAPI_DISABLED, 1, [ ])
fi
AC_MSG_CHECKING(for hidapi support)