test: Improved detection of OpenGL support
authorCameron Cawley <ccawley2011@gmail.com>
Sat, 08 Feb 2020 19:34:51 +0000
changeset 13528cf2ef2000634
parent 13527 604325956b9a
child 13530 4c816dbd8912
test: Improved detection of OpenGL support
test/configure
test/configure.ac
     1.1 --- a/test/configure	Tue Feb 04 16:46:22 2020 +0000
     1.2 +++ b/test/configure	Sat Feb 08 19:34:51 2020 +0000
     1.3 @@ -3825,6 +3825,9 @@
     1.4  /* end confdefs.h.  */
     1.5  
     1.6   #include "SDL_opengl.h"
     1.7 + #ifndef SDL_VIDEO_OPENGL
     1.8 + #error SDL_VIDEO_OPENGL
     1.9 + #endif
    1.10  
    1.11  int
    1.12  main ()
    1.13 @@ -3850,11 +3853,10 @@
    1.14  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.15  /* end confdefs.h.  */
    1.16  
    1.17 - #if defined (__IPHONEOS__)
    1.18 -    #include <OpenGLES/ES1/gl.h>
    1.19 - #else
    1.20 -    #include <GLES/gl.h>
    1.21 - #endif /* __QNXNTO__ */
    1.22 + #include "SDL_opengles.h"
    1.23 + #ifndef SDL_VIDEO_OPENGL_ES
    1.24 + #error SDL_VIDEO_OPENGL_ES
    1.25 + #endif
    1.26  
    1.27  int
    1.28  main ()
    1.29 @@ -3880,12 +3882,9 @@
    1.30  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.31  /* end confdefs.h.  */
    1.32  
    1.33 - #if defined (__IPHONEOS__)
    1.34 -    #include <OpenGLES/ES2/gl.h>
    1.35 -    #include <OpenGLES/ES2/glext.h>
    1.36 - #else
    1.37 -    #include <GLES2/gl2.h>
    1.38 -    #include <GLES2/gl2ext.h>
    1.39 + #include "SDL_opengles2.h"
    1.40 + #ifndef SDL_VIDEO_OPENGL_ES2
    1.41 + #error SDL_VIDEO_OPENGL_ES2
    1.42   #endif
    1.43  
    1.44  int
     2.1 --- a/test/configure.ac	Tue Feb 04 16:46:22 2020 +0000
     2.2 +++ b/test/configure.ac	Sat Feb 08 19:34:51 2020 +0000
     2.3 @@ -125,6 +125,9 @@
     2.4  have_opengl=no
     2.5  AC_TRY_COMPILE([
     2.6   #include "SDL_opengl.h"
     2.7 + #ifndef SDL_VIDEO_OPENGL
     2.8 + #error SDL_VIDEO_OPENGL
     2.9 + #endif
    2.10  ],[
    2.11  ],[
    2.12  have_opengl=yes
    2.13 @@ -135,11 +138,10 @@
    2.14  AC_MSG_CHECKING(for OpenGL ES support)
    2.15  have_opengles=no
    2.16  AC_TRY_COMPILE([
    2.17 - #if defined (__IPHONEOS__)
    2.18 -    #include <OpenGLES/ES1/gl.h>
    2.19 - #else
    2.20 -    #include <GLES/gl.h>
    2.21 - #endif /* __QNXNTO__ */
    2.22 + #include "SDL_opengles.h"
    2.23 + #ifndef SDL_VIDEO_OPENGL_ES
    2.24 + #error SDL_VIDEO_OPENGL_ES
    2.25 + #endif
    2.26  ],[
    2.27  ],[
    2.28  have_opengles=yes
    2.29 @@ -150,12 +152,9 @@
    2.30  AC_MSG_CHECKING(for OpenGL ES2 support)
    2.31  have_opengles2=no
    2.32  AC_TRY_COMPILE([
    2.33 - #if defined (__IPHONEOS__)
    2.34 -    #include <OpenGLES/ES2/gl.h>
    2.35 -    #include <OpenGLES/ES2/glext.h>
    2.36 - #else
    2.37 -    #include <GLES2/gl2.h>
    2.38 -    #include <GLES2/gl2ext.h>
    2.39 + #include "SDL_opengles2.h"
    2.40 + #ifndef SDL_VIDEO_OPENGL_ES2
    2.41 + #error SDL_VIDEO_OPENGL_ES2
    2.42   #endif
    2.43  ],[
    2.44  ],[