configure.in
changeset 8714 4e57cfd9fca8
parent 8703 0c32452a6141
child 8731 ede9d13dad21
     1.1 --- a/configure.in	Thu Apr 17 21:00:25 2014 -0700
     1.2 +++ b/configure.in	Sun Apr 06 00:30:48 2014 +0300
     1.3 @@ -2139,6 +2139,10 @@
     1.4  AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
     1.5                    , enable_pthread_sem=yes)
     1.6      case "$host" in
     1.7 +	 *-*-androideabi*)
     1.8 +            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
     1.9 +            pthread_lib=""
    1.10 +	    ;;
    1.11          *-*-linux*|*-*-uclinux*)
    1.12              pthread_cflags="-D_REENTRANT"
    1.13              pthread_lib="-lpthread"
    1.14 @@ -2642,6 +2646,20 @@
    1.15                      $as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
    1.16                  fi
    1.17                  ;;
    1.18 +            *-*-androideabi*)
    1.19 +                # Android
    1.20 +                ARCH=android
    1.21 +                ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
    1.22 +                CFLAGS="$CFLAGS $ANDROID_CFLAGS"
    1.23 +                SDL_CFLAGS="$SDL_CFLAGS $ANDROID_CFLAGS"
    1.24 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $ANDROID_CFLAGS"
    1.25 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl -lGLESv1_CM -lGLESv2 -llog -landroid"
    1.26 +
    1.27 +                if test x$enable_video = xyes; then
    1.28 +                    SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
    1.29 +                    $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
    1.30 +                fi
    1.31 +                ;;
    1.32              *-*-linux*)         ARCH=linux ;;
    1.33              *-*-uclinux*)       ARCH=linux ;;
    1.34              *-*-kfreebsd*-gnu)  ARCH=kfreebsd-gnu ;;
    1.35 @@ -2706,6 +2724,11 @@
    1.36                  SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
    1.37                  have_audio=yes
    1.38              ;;
    1.39 +            android)
    1.40 +                AC_DEFINE(SDL_AUDIO_DRIVER_ANDROID, 1, [ ])
    1.41 +                SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
    1.42 +                have_audio=yes
    1.43 +            ;;
    1.44            esac
    1.45          fi
    1.46          # Set up files for the joystick library
    1.47 @@ -2716,6 +2739,11 @@
    1.48                  SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
    1.49                  have_joystick=yes
    1.50              ;;
    1.51 +            android)
    1.52 +                AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
    1.53 +                SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
    1.54 +                have_joystick=yes
    1.55 +            ;;
    1.56            esac
    1.57          fi
    1.58          # Set up files for the haptic library
    1.59 @@ -2738,6 +2766,11 @@
    1.60                     SOURCES="$SOURCES $srcdir/src/power/linux/*.c"
    1.61                     have_power=yes
    1.62                 ;;
    1.63 +               android)
    1.64 +                   AC_DEFINE(SDL_POWER_ANDROID, 1, [ ])
    1.65 +                   SOURCES="$SOURCES $srcdir/src/power/android/*.c"
    1.66 +                   have_power=yes
    1.67 +               ;;
    1.68               esac
    1.69          fi
    1.70          # Set up files for the filesystem library