Android configure-based build fixes (thanks Vit!)

Sam Lantinga 2017-11-04 09:00:40 -07:00
parent 1724313349
commit 7abef33c5b
2 changed files with 18 additions and 12 deletions

View File

@ -2459,7 +2459,7 @@ CheckVulkan()
{ {
if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
case "$host" in case "$host" in
*-*-androideabi*) *-*-android*)
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined(__ARM_ARCH) && __ARM_ARCH < 7 #if defined(__ARM_ARCH) && __ARM_ARCH < 7
#error Vulkan doesn't work on this configuration #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]]]), AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
, enable_pthread_sem=yes) , enable_pthread_sem=yes)
case "$host" in case "$host" in
*-*-androideabi*) *-*-android*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="" pthread_lib=""
;; ;;
@ -3243,7 +3243,7 @@ dnl Set up the configuration based on the host platform!
case "$host" in case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*) *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
case "$host" in case "$host" in
*-*-androideabi*) *-*-android*)
# Android # Android
ARCH=android ARCH=android
ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES" ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
@ -3376,15 +3376,20 @@ case "$host" in
fi fi
# Set up files for the haptic library # Set up files for the haptic library
if test x$enable_haptic = xyes; then if test x$enable_haptic = xyes; then
if test x$use_input_events = xyes; then case $ARCH in
case $ARCH in linux)
linux) if test x$use_input_events = xyes; then
AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ]) AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c" SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
have_haptic=yes have_haptic=yes
;; fi
esac ;;
fi android)
AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ])
SOURCES="$SOURCES $srcdir/src/haptic/android/*.c"
have_haptic=yes
;;
esac
fi fi
# Set up files for the power library # Set up files for the power library
if test x$enable_power = xyes; then if test x$enable_power = xyes; then

View File

@ -264,6 +264,7 @@
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#undef SDL_JOYSTICK_EMSCRIPTEN #undef SDL_JOYSTICK_EMSCRIPTEN
#undef SDL_HAPTIC_DUMMY #undef SDL_HAPTIC_DUMMY
#undef SDL_HAPTIC_ANDROID
#undef SDL_HAPTIC_LINUX #undef SDL_HAPTIC_LINUX
#undef SDL_HAPTIC_IOKIT #undef SDL_HAPTIC_IOKIT
#undef SDL_HAPTIC_DINPUT #undef SDL_HAPTIC_DINPUT