configure.in
changeset 11729 d1ce8396c356
parent 11726 27d08f1aab80
child 11730 ac6c607e065c
     1.1 --- a/configure.in	Thu Dec 07 09:35:28 2017 -0800
     1.2 +++ b/configure.in	Thu Apr 21 03:16:44 2016 -0400
     1.3 @@ -2053,6 +2053,19 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckMETAL()
     1.8 +{
     1.9 +    AC_ARG_ENABLE(render-metal,
    1.10 +AC_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=no]]]),
    1.11 +                                , enable_render_metal=no)
    1.12 +    if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    1.13 +        dnl This should maybe make sure you have a supported SDK version.
    1.14 +        AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
    1.15 +        SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
    1.16 +    fi
    1.17 +}
    1.18 +
    1.19 +
    1.20  dnl Find DirectFB
    1.21  CheckDirectFB()
    1.22  {
    1.23 @@ -2103,7 +2116,6 @@
    1.24                                , enable_directfb_shared=yes)
    1.25  
    1.26              AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ])
    1.27 -            AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ])
    1.28              SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
    1.29              EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
    1.30  
    1.31 @@ -3636,8 +3648,9 @@
    1.32          CheckDiskAudio
    1.33          CheckDummyAudio
    1.34          CheckDLOPEN
    1.35 +        CheckMETAL
    1.36 +        CheckVulkan
    1.37          CheckPTHREAD
    1.38 -        CheckVulkan
    1.39  
    1.40          # Set up files for the audio library
    1.41          if test x$enable_audio = xyes; then
    1.42 @@ -3701,6 +3714,10 @@
    1.43          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
    1.44          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
    1.45          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
    1.46 +
    1.47 +        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    1.48 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
    1.49 +        fi
    1.50          ;;
    1.51      *-*-darwin* )
    1.52          # This could be either full "Mac OS X", or plain "Darwin" which is
    1.53 @@ -3719,6 +3736,7 @@
    1.54          CheckDummyAudio
    1.55          CheckDLOPEN
    1.56          CheckCOCOA
    1.57 +        CheckMETAL
    1.58          CheckX11
    1.59          CheckMacGL
    1.60          CheckOpenGLX11