configure
changeset 11365 a9bd2625fa01
parent 11337 d9f24e95e8ba
child 11367 e8fc755a89e8
     1.1 --- a/configure	Sun Aug 27 19:10:30 2017 -0700
     1.2 +++ b/configure	Sun Aug 27 22:15:57 2017 -0400
     1.3 @@ -745,6 +745,7 @@
     1.4  docdir
     1.5  oldincludedir
     1.6  includedir
     1.7 +runstatedir
     1.8  localstatedir
     1.9  sharedstatedir
    1.10  sysconfdir
    1.11 @@ -854,6 +855,7 @@
    1.12  enable_video_opengles
    1.13  enable_video_opengles1
    1.14  enable_video_opengles2
    1.15 +enable_video_vulkan
    1.16  enable_libudev
    1.17  enable_dbus
    1.18  enable_ime
    1.19 @@ -920,6 +922,7 @@
    1.20  sysconfdir='${prefix}/etc'
    1.21  sharedstatedir='${prefix}/com'
    1.22  localstatedir='${prefix}/var'
    1.23 +runstatedir='${localstatedir}/run'
    1.24  includedir='${prefix}/include'
    1.25  oldincludedir='/usr/include'
    1.26  docdir='${datarootdir}/doc/${PACKAGE}'
    1.27 @@ -1172,6 +1175,15 @@
    1.28    | -silent | --silent | --silen | --sile | --sil)
    1.29      silent=yes ;;
    1.30  
    1.31 +  -runstatedir | --runstatedir | --runstatedi | --runstated \
    1.32 +  | --runstate | --runstat | --runsta | --runst | --runs \
    1.33 +  | --run | --ru | --r)
    1.34 +    ac_prev=runstatedir ;;
    1.35 +  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
    1.36 +  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
    1.37 +  | --run=* | --ru=* | --r=*)
    1.38 +    runstatedir=$ac_optarg ;;
    1.39 +
    1.40    -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    1.41      ac_prev=sbindir ;;
    1.42    -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
    1.43 @@ -1309,7 +1321,7 @@
    1.44  for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
    1.45  		datadir sysconfdir sharedstatedir localstatedir includedir \
    1.46  		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
    1.47 -		libdir localedir mandir
    1.48 +		libdir localedir mandir runstatedir
    1.49  do
    1.50    eval ac_val=\$$ac_var
    1.51    # Remove trailing slashes.
    1.52 @@ -1462,6 +1474,7 @@
    1.53    --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
    1.54    --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
    1.55    --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
    1.56 +  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
    1.57    --libdir=DIR            object code libraries [EPREFIX/lib]
    1.58    --includedir=DIR        C header files [PREFIX/include]
    1.59    --oldincludedir=DIR     C header files for non-gcc [/usr/include]
    1.60 @@ -1603,6 +1616,7 @@
    1.61                            include OpenGL ES 1.1 support [[default=yes]]
    1.62    --enable-video-opengles2
    1.63                            include OpenGL ES 2.0 support [[default=yes]]
    1.64 +  --enable-video-vulkan   include Vulkan surface support [[default=yes]]
    1.65    --enable-libudev        enable libudev support [[default=yes]]
    1.66    --enable-dbus           enable D-Bus support [[default=yes]]
    1.67    --enable-ime            enable IME support [[default=yes]]
    1.68 @@ -21891,6 +21905,87 @@
    1.69      fi
    1.70  }
    1.71  
    1.72 +# Check whether --enable-video-vulkan was given.
    1.73 +if test "${enable_video_vulkan+set}" = set; then :
    1.74 +  enableval=$enable_video_vulkan;
    1.75 +else
    1.76 +  enable_video_vulkan=yes
    1.77 +fi
    1.78 +
    1.79 +
    1.80 +CheckVulkan()
    1.81 +{
    1.82 +    have_vulkan_hdr=no
    1.83 +    if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
    1.84 +        case "$host" in
    1.85 +            *-*-androideabi*)
    1.86 +                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.87 +/* end confdefs.h.  */
    1.88 +
    1.89 +                  #if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__)
    1.90 +                  #error Vulkan doesn't work on this configuration
    1.91 +                  #endif
    1.92 +                  int main()
    1.93 +                  {
    1.94 +                     return 0;
    1.95 +                  }
    1.96 +
    1.97 +int
    1.98 +main ()
    1.99 +{
   1.100 +
   1.101 +                    enable_video_vulkan=no
   1.102 +
   1.103 +  ;
   1.104 +  return 0;
   1.105 +}
   1.106 +_ACEOF
   1.107 +if ac_fn_c_try_compile "$LINENO"; then :
   1.108 +
   1.109 +
   1.110 +fi
   1.111 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.112 +                ;;
   1.113 +            *)
   1.114 +                ;;
   1.115 +        esac
   1.116 +        if test x$enable_video_vulkan = xno; then
   1.117 +            # For reasons I am totally unable to see, I get an undefined macro error if
   1.118 +            # I put this in the AC_TRY_COMPILE.
   1.119 +            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, Vulkan does not work on this configuration." >&5
   1.120 +$as_echo "$as_me: WARNING: Sorry, Vulkan does not work on this configuration." >&2;}
   1.121 +        fi
   1.122 +        if test x$enable_video_vulkan = xyes; then
   1.123 +            vsdk_include_dir="${VULKAN_SDK}/include"
   1.124 +            vulkan_header="vulkan/vulkan.h"
   1.125 +            save_CPPFLAGS="$CPPFLAGS"
   1.126 +            CPPFLAGS="${save_CPPFLAGS} -I$vsdk_include_dir"
   1.127 +            as_ac_Header=`$as_echo "ac_cv_header_$vulkan_header" | $as_tr_sh`
   1.128 +ac_fn_c_check_header_mongrel "$LINENO" "$vulkan_header" "$as_ac_Header" "$ac_includes_default"
   1.129 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   1.130 +  have_vulkan_hdr=yes
   1.131 +else
   1.132 +  have_vulkan_hdr=no
   1.133 +fi
   1.134 +
   1.135 +
   1.136 +            CPPFLAGS="$save_CPPFLAGS"
   1.137 +        fi
   1.138 +    fi
   1.139 +    if test x$have_vulkan_hdr = xyes; then
   1.140 +        # vulkan.h has been found in either $VULKAN_SDK/include or along the
   1.141 +        # the standard include path. Unfortunately there seems no easy
   1.142 +        # way to find out which, so...
   1.143 +        if test -n "$VULKAN_SDK" -a -f "$vsdk_include_dir/$vulkan_header"; then
   1.144 +            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$vsdk_include_dir"
   1.145 +        fi
   1.146 +
   1.147 +$as_echo "#define SDL_VIDEO_VULKAN_SURFACE 1" >>confdefs.h
   1.148 +
   1.149 +        SUMMARY_video="${SUMMARY_video} vulkan"
   1.150 +    fi
   1.151 +}
   1.152 +
   1.153  CheckInputEvents()
   1.154  {
   1.155              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
   1.156 @@ -23637,6 +23732,7 @@
   1.157          CheckKMSDRM
   1.158          CheckOpenGLX11
   1.159          CheckOpenGLESX11
   1.160 +        CheckVulkan
   1.161          CheckMir
   1.162          CheckWayland
   1.163          CheckLibUDev
   1.164 @@ -23806,6 +23902,7 @@
   1.165          CheckWINDOWS
   1.166          CheckWINDOWSGL
   1.167          CheckWINDOWSGLES
   1.168 +        CheckVulkan
   1.169          CheckDIRECTX
   1.170  
   1.171          # Set up the core platform files
   1.172 @@ -24092,6 +24189,7 @@
   1.173          CheckDummyAudio
   1.174          CheckDLOPEN
   1.175          CheckPTHREAD
   1.176 +        CheckVulkan
   1.177  
   1.178          # Set up files for the audio library
   1.179          if test x$enable_audio = xyes; then
   1.180 @@ -24174,6 +24272,9 @@
   1.181          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
   1.182          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
   1.183          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
   1.184 +        if test x$ac_cv_header_vulkan_vulkan_h = xyes; then
   1.185 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
   1.186 +        fi
   1.187          ;;
   1.188      *-*-darwin* )
   1.189          # This could be either full "Mac OS X", or plain "Darwin" which is
   1.190 @@ -24195,6 +24296,7 @@
   1.191          CheckX11
   1.192          CheckMacGL
   1.193          CheckOpenGLX11
   1.194 +        CheckVulkan
   1.195          CheckPTHREAD
   1.196  
   1.197          # Set up files for the audio library
   1.198 @@ -24260,6 +24362,9 @@
   1.199          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
   1.200          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
   1.201          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
   1.202 +        if test x$ac_cv_header_vulkan_vulkan_h = xyes; then
   1.203 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
   1.204 +        fi
   1.205          ;;
   1.206      *-nacl|*-pnacl)
   1.207          ARCH=nacl