configure
changeset 11730 ac6c607e065c
parent 11702 cf166abbde4a
child 11736 e54b6d8ffca8
     1.1 --- a/configure	Thu Apr 21 03:16:44 2016 -0400
     1.2 +++ b/configure	Thu Dec 07 16:08:09 2017 -0800
     1.3 @@ -846,6 +846,7 @@
     1.4  enable_video_x11_vm
     1.5  enable_video_vivante
     1.6  enable_video_cocoa
     1.7 +enable_render_metal
     1.8  enable_video_directfb
     1.9  enable_directfb_shared
    1.10  enable_video_kmsdrm
    1.11 @@ -1594,6 +1595,7 @@
    1.12    --enable-video-x11-vm   use X11 VM extension for fullscreen [[default=yes]]
    1.13    --enable-video-vivante  use Vivante EGL video driver [[default=yes]]
    1.14    --enable-video-cocoa    use Cocoa video driver [[default=yes]]
    1.15 +  --enable-render-metal   enable the Metal render driver [[default=yes]]
    1.16    --enable-video-directfb use DirectFB video driver [[default=no]]
    1.17    --enable-directfb-shared
    1.18                            dynamically load directfb support [[default=yes]]
    1.19 @@ -21204,6 +21206,24 @@
    1.20      fi
    1.21  }
    1.22  
    1.23 +CheckMETAL()
    1.24 +{
    1.25 +    # Check whether --enable-render-metal was given.
    1.26 +if test "${enable_render_metal+set}" = set; then :
    1.27 +  enableval=$enable_render_metal;
    1.28 +else
    1.29 +  enable_render_metal=yes
    1.30 +fi
    1.31 +
    1.32 +    if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    1.33 +
    1.34 +$as_echo "#define SDL_VIDEO_RENDER_METAL 1" >>confdefs.h
    1.35 +
    1.36 +        SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
    1.37 +    fi
    1.38 +}
    1.39 +
    1.40 +
    1.41  CheckDirectFB()
    1.42  {
    1.43      # Check whether --enable-video-directfb was given.
    1.44 @@ -21358,9 +21378,6 @@
    1.45  
    1.46  $as_echo "#define SDL_VIDEO_DRIVER_DIRECTFB 1" >>confdefs.h
    1.47  
    1.48 -
    1.49 -$as_echo "#define SDL_VIDEO_RENDER_DIRECTFB 1" >>confdefs.h
    1.50 -
    1.51              SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
    1.52              EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
    1.53  
    1.54 @@ -22998,12 +23015,6 @@
    1.55  fi
    1.56  
    1.57  
    1.58 -        ac_fn_c_check_header_mongrel "$LINENO" "xaudio2.h" "ac_cv_header_xaudio2_h" "$ac_includes_default"
    1.59 -if test "x$ac_cv_header_xaudio2_h" = xyes; then :
    1.60 -  have_xaudio2=yes
    1.61 -fi
    1.62 -
    1.63 -
    1.64          ac_fn_c_check_header_mongrel "$LINENO" "xinput.h" "ac_cv_header_xinput_h" "$ac_includes_default"
    1.65  if test "x$ac_cv_header_xinput_h" = xyes; then :
    1.66    have_xinput=yes
    1.67 @@ -24005,12 +24016,6 @@
    1.68  
    1.69                  SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
    1.70              fi
    1.71 -            if test x$have_xaudio2 = xyes; then
    1.72 -
    1.73 -$as_echo "#define SDL_AUDIO_DRIVER_XAUDIO2 1" >>confdefs.h
    1.74 -
    1.75 -                SOURCES="$SOURCES $srcdir/src/audio/xaudio2/*.c"
    1.76 -            fi
    1.77              if test x$have_wasapi = xyes; then
    1.78  
    1.79  $as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h
    1.80 @@ -24248,8 +24253,9 @@
    1.81          CheckDiskAudio
    1.82          CheckDummyAudio
    1.83          CheckDLOPEN
    1.84 +        CheckMETAL
    1.85 +        CheckVulkan
    1.86          CheckPTHREAD
    1.87 -        CheckVulkan
    1.88  
    1.89          # Set up files for the audio library
    1.90          if test x$enable_audio = xyes; then
    1.91 @@ -24333,6 +24339,10 @@
    1.92          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
    1.93          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
    1.94          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
    1.95 +
    1.96 +        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    1.97 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
    1.98 +        fi
    1.99          ;;
   1.100      *-*-darwin* )
   1.101          # This could be either full "Mac OS X", or plain "Darwin" which is
   1.102 @@ -24351,6 +24361,7 @@
   1.103          CheckDummyAudio
   1.104          CheckDLOPEN
   1.105          CheckCOCOA
   1.106 +        CheckMETAL
   1.107          CheckX11
   1.108          CheckMacGL
   1.109          CheckOpenGLX11
   1.110 @@ -24420,6 +24431,10 @@
   1.111          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
   1.112          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
   1.113          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
   1.114 +
   1.115 +        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
   1.116 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore -Wl,-weak_framework,Metal"
   1.117 +        fi
   1.118          ;;
   1.119      *-nacl|*-pnacl)
   1.120          ARCH=nacl