Android configure-based build fixes (thanks Vit!)
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
diff --git a/configure.in b/configure.in
index 5ac2130..cd8116a 100644
--- a/configure.in
+++ b/configure.in
@@ -2459,7 +2459,7 @@ CheckVulkan()
{
if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
case "$host" in
- *-*-androideabi*)
+ *-*-android*)
AC_TRY_COMPILE([
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
#error Vulkan doesn't work on this configuration
@@ -2715,7 +2715,7 @@ AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[def
AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
, enable_pthread_sem=yes)
case "$host" in
- *-*-androideabi*)
+ *-*-android*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib=""
;;
@@ -3243,7 +3243,7 @@ dnl Set up the configuration based on the host platform!
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
case "$host" in
- *-*-androideabi*)
+ *-*-android*)
# Android
ARCH=android
ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
@@ -3376,15 +3376,20 @@ case "$host" in
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
- if test x$use_input_events = xyes; then
- case $ARCH in
- linux)
- AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
- have_haptic=yes
- ;;
- esac
- fi
+ case $ARCH in
+ linux)
+ if test x$use_input_events = xyes; then
+ AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
+ have_haptic=yes
+ fi
+ ;;
+ android)
+ AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/haptic/android/*.c"
+ have_haptic=yes
+ ;;
+ esac
fi
# Set up files for the power library
if test x$enable_power = xyes; then
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index a28e83f..3655be6 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -264,6 +264,7 @@
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#undef SDL_JOYSTICK_EMSCRIPTEN
#undef SDL_HAPTIC_DUMMY
+#undef SDL_HAPTIC_ANDROID
#undef SDL_HAPTIC_LINUX
#undef SDL_HAPTIC_IOKIT
#undef SDL_HAPTIC_DINPUT