Android configure-based build fixes (thanks Vit!)
authorSam Lantinga <slouken@libsdl.org>
Sat, 04 Nov 2017 09:00:40 -0700
changeset 116743f1de86751e4
parent 11673 9c7602bf7385
child 11675 18e285e9e1be
Android configure-based build fixes (thanks Vit!)
configure.in
include/SDL_config.h.in
     1.1 --- a/configure.in	Sat Nov 04 11:16:49 2017 +0000
     1.2 +++ b/configure.in	Sat Nov 04 09:00:40 2017 -0700
     1.3 @@ -2459,7 +2459,7 @@
     1.4  {
     1.5      if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
     1.6          case "$host" in
     1.7 -            *-*-androideabi*)
     1.8 +            *-*-android*)
     1.9                  AC_TRY_COMPILE([
    1.10                    #if defined(__ARM_ARCH) && __ARM_ARCH < 7
    1.11                    #error Vulkan doesn't work on this configuration
    1.12 @@ -2715,7 +2715,7 @@
    1.13  AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
    1.14                    , enable_pthread_sem=yes)
    1.15      case "$host" in
    1.16 -         *-*-androideabi*)
    1.17 +         *-*-android*)
    1.18              pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
    1.19              pthread_lib=""
    1.20              ;;
    1.21 @@ -3243,7 +3243,7 @@
    1.22  case "$host" in
    1.23      *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
    1.24          case "$host" in
    1.25 -            *-*-androideabi*)
    1.26 +            *-*-android*)
    1.27                  # Android
    1.28                  ARCH=android
    1.29                  ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
    1.30 @@ -3376,15 +3376,20 @@
    1.31          fi
    1.32          # Set up files for the haptic library
    1.33          if test x$enable_haptic = xyes; then
    1.34 -           if test x$use_input_events = xyes; then
    1.35 -             case $ARCH in
    1.36 -               linux)
    1.37 -                   AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
    1.38 -                   SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
    1.39 -                   have_haptic=yes
    1.40 -               ;;
    1.41 -             esac
    1.42 -           fi
    1.43 +          case $ARCH in
    1.44 +            linux)
    1.45 +                if test x$use_input_events = xyes; then
    1.46 +                    AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
    1.47 +                    SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
    1.48 +                    have_haptic=yes
    1.49 +                fi
    1.50 +            ;;
    1.51 +            android)
    1.52 +                AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ])
    1.53 +                SOURCES="$SOURCES $srcdir/src/haptic/android/*.c"
    1.54 +                have_haptic=yes
    1.55 +            ;;
    1.56 +          esac
    1.57          fi
    1.58          # Set up files for the power library
    1.59          if test x$enable_power = xyes; then
     2.1 --- a/include/SDL_config.h.in	Sat Nov 04 11:16:49 2017 +0000
     2.2 +++ b/include/SDL_config.h.in	Sat Nov 04 09:00:40 2017 -0700
     2.3 @@ -264,6 +264,7 @@
     2.4  #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
     2.5  #undef SDL_JOYSTICK_EMSCRIPTEN
     2.6  #undef SDL_HAPTIC_DUMMY
     2.7 +#undef SDL_HAPTIC_ANDROID
     2.8  #undef SDL_HAPTIC_LINUX
     2.9  #undef SDL_HAPTIC_IOKIT
    2.10  #undef SDL_HAPTIC_DINPUT