configure.in
changeset 10904 4dbd025c4eb9
parent 10850 c9dc0068b0e7
child 10916 bade97ed25ac
     1.1 --- a/configure.in	Mon Feb 20 10:55:33 2017 -0800
     1.2 +++ b/configure.in	Mon Feb 20 10:55:49 2017 -0800
     1.3 @@ -3346,9 +3346,7 @@
     1.4          SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
     1.5          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
     1.6          ;;
     1.7 -    arm*-apple-darwin*)
     1.8 -        # iOS - We are not writing anything to confdefs.h because you have to replace
     1.9 -        # SDL_config.h for SDL_config_iphoneos.h anyway
    1.10 +    arm*-apple-darwin*|*-ios-*)
    1.11          ARCH=ios
    1.12  
    1.13          CheckVisibilityHidden
    1.14 @@ -3357,18 +3355,18 @@
    1.15          CheckDiskAudio
    1.16          CheckDummyAudio
    1.17          CheckDLOPEN
    1.18 -        CheckCOCOA
    1.19          CheckPTHREAD
    1.20  
    1.21 -
    1.22          # Set up files for the audio library
    1.23          if test x$enable_audio = xyes; then
    1.24 +            AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
    1.25              SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
    1.26              SUMMARY_audio="${SUMMARY_audio} coreaudio"
    1.27              have_audio=yes
    1.28          fi
    1.29          # Set up files for the joystick library
    1.30          if test x$enable_joystick = xyes; then
    1.31 +            AC_DEFINE(SDL_JOYSTICK_MFI, 1, [ ])
    1.32              SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
    1.33              have_joystick=yes
    1.34          fi
    1.35 @@ -3380,6 +3378,7 @@
    1.36          #fi
    1.37          # Set up files for the power library
    1.38          if test x$enable_power = xyes; then
    1.39 +            AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
    1.40              SOURCES="$SOURCES $srcdir/src/power/uikit/*.m"
    1.41              have_power=yes
    1.42          fi
    1.43 @@ -3388,28 +3387,36 @@
    1.44              SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
    1.45              have_filesystem=yes
    1.46          fi
    1.47 +        # Set up additional files for the file library
    1.48 +        if test x$enable_file = xyes; then
    1.49 +            AC_DEFINE(SDL_FILESYSTEM_COCOA, 1, [ ])
    1.50 +            SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
    1.51 +        fi
    1.52          # Set up files for the timer library
    1.53          if test x$enable_timers = xyes; then
    1.54 +            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
    1.55              SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    1.56              have_timers=yes
    1.57          fi
    1.58 -        # Set up additional files for the file library
    1.59 -        if test x$enable_file = xyes; then
    1.60 -            SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
    1.61 -        fi
    1.62          # The iOS platform requires special setup.
    1.63 +        AC_DEFINE(SDL_VIDEO_DRIVER_UIKIT, 1, [ ])
    1.64 +        AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
    1.65 +        AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
    1.66 +        AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
    1.67 +        AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
    1.68          SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
    1.69          EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
    1.70          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
    1.71 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
    1.72 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
    1.73 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
    1.74 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreGraphics"
    1.75 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreMotion"
    1.76          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"
    1.77 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
    1.78 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,GameController"
    1.79          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
    1.80          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
    1.81 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
    1.82 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
    1.83 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreGraphics"
    1.84 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreMotion"
    1.85 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,GameController"
    1.86 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
    1.87          ;;
    1.88      *-*-darwin* )
    1.89          # This could be either full "Mac OS X", or plain "Darwin" which is