Skip to content

Commit

Permalink
Android configure-based build fixes (thanks Vit!)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 4, 2017
1 parent 1724313 commit 7abef33
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
29 changes: 17 additions & 12 deletions configure.in
Expand Up @@ -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
Expand Down Expand Up @@ -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=""
;;
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config.h.in
Expand Up @@ -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
Expand Down

0 comments on commit 7abef33

Please sign in to comment.