configure
changeset 11808 510c0e047122
parent 11762 c4900725a75a
child 11829 fcbafc9e443c
     1.1 --- a/configure	Tue Jan 02 14:32:15 2018 -0800
     1.2 +++ b/configure	Tue Jan 02 19:06:14 2018 -0400
     1.3 @@ -21230,11 +21230,47 @@
     1.4  fi
     1.5  
     1.6      if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
     1.7 +        save_CFLAGS="$CFLAGS"
     1.8 +                CFLAGS="$CFLAGS -x objective-c"
     1.9 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Metal framework" >&5
    1.10 +$as_echo_n "checking for Metal framework... " >&6; }
    1.11 +        have_metal=no
    1.12 +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.13 +/* end confdefs.h.  */
    1.14 +
    1.15 +          #import <Cocoa/Cocoa.h>
    1.16 +          #import <Metal/Metal.h>
    1.17 +          #import <QuartzCore/CAMetalLayer.h>
    1.18 +
    1.19 +          #if !TARGET_CPU_X86_64
    1.20 +          #error Metal doesn't work on this configuration
    1.21 +          #endif
    1.22 +
    1.23 +int
    1.24 +main ()
    1.25 +{
    1.26 +
    1.27 +
    1.28 +  ;
    1.29 +  return 0;
    1.30 +}
    1.31 +_ACEOF
    1.32 +if ac_fn_c_try_compile "$LINENO"; then :
    1.33 +
    1.34 +        have_metal=yes
    1.35 +
    1.36 +fi
    1.37 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.38 +        CFLAGS="$save_CFLAGS"
    1.39 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_metal" >&5
    1.40 +$as_echo "$have_metal" >&6; }
    1.41 +        if test x$have_metal = xyes; then
    1.42  
    1.43  $as_echo "#define SDL_VIDEO_RENDER_METAL 1" >>confdefs.h
    1.44  
    1.45 -        SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
    1.46 -        SUMMARY_video="${SUMMARY_video} metal"
    1.47 +            SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
    1.48 +            SUMMARY_video="${SUMMARY_video} metal"
    1.49 +        fi
    1.50      fi
    1.51  }
    1.52