configure.in
changeset 11408 0783887749f6
parent 11395 a8c29f5b679f
child 11409 3a5c77515d55
     1.1 --- a/configure.in	Mon Aug 28 22:13:45 2017 -0700
     1.2 +++ b/configure.in	Mon Aug 28 22:36:45 2017 -0700
     1.3 @@ -1983,7 +1983,7 @@
     1.4                    , enable_video_cocoa=yes)
     1.5      if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
     1.6          save_CFLAGS="$CFLAGS"
     1.7 -        dnl work around that we don't have Objective-C support in autoconf
     1.8 +        dnl Work around that we don't have Objective-C support in autoconf
     1.9          CFLAGS="$CFLAGS -x objective-c"
    1.10          AC_MSG_CHECKING(for Cocoa framework)
    1.11          have_cocoa=no
    1.12 @@ -2401,7 +2401,7 @@
    1.13      fi
    1.14  }
    1.15  
    1.16 -dnl Check to see if Vulkan surface support is desired
    1.17 +dnl Check to see if Vulkan support is desired
    1.18  AC_ARG_ENABLE(video-vulkan,
    1.19  AC_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
    1.20                , enable_video_vulkan=yes)
    1.21 @@ -2413,17 +2413,33 @@
    1.22          case "$host" in
    1.23              *-*-androideabi*)
    1.24                  AC_TRY_COMPILE([
    1.25 -                  #if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__)
    1.26 +                  #if defined(__ARM_ARCH) && __ARM_ARCH < 7
    1.27                    #error Vulkan doesn't work on this configuration
    1.28                    #endif
    1.29 -                  int main()
    1.30 -                  {
    1.31 -                     return 0;
    1.32 -                  }
    1.33 +                ],[
    1.34 +                ],[
    1.35                  ],[
    1.36                      enable_video_vulkan=no
    1.37 +                ])
    1.38 +                ;;
    1.39 +            *-*-darwin*)
    1.40 +                save_CFLAGS="$CFLAGS"
    1.41 +                dnl Work around that we don't have Objective-C support in autoconf
    1.42 +                CFLAGS="$CFLAGS -x objective-c"
    1.43 +                AC_TRY_COMPILE([
    1.44 +                  #include <Cocoa/Cocoa.h>
    1.45 +                  #include <Metal/Metal.h>
    1.46 +                  #include <QuartzCore/CAMetalLayer.h>
    1.47 +
    1.48 +                  #if !TARGET_CPU_X86_64
    1.49 +                  #error Vulkan doesn't work on this configuration
    1.50 +                  #endif
    1.51                  ],[
    1.52 +                ],[
    1.53 +                ],[
    1.54 +                    enable_video_vulkan=no
    1.55                  ])
    1.56 +                CFLAGS="$save_CFLAGS"
    1.57                  ;;
    1.58              *)
    1.59                  ;;
    1.60 @@ -2431,7 +2447,7 @@
    1.61          if test x$enable_video_vulkan = xno; then
    1.62              # For reasons I am totally unable to see, I get an undefined macro error if
    1.63              # I put this in the AC_TRY_COMPILE.
    1.64 -            AC_MSG_WARN([Sorry, Vulkan does not work on this configuration.])
    1.65 +            AC_MSG_WARN([Vulkan does not work on this configuration.])
    1.66          fi
    1.67      fi
    1.68      if test x$enable_video_vulkan = xyes; then