test: Improved detection of OpenGL support

This commit is contained in:
Cameron Cawley 2020-02-08 19:34:51 +00:00
parent 582f570600
commit 80cf4f0724
2 changed files with 20 additions and 22 deletions

21
test/configure vendored
View File

@ -3825,6 +3825,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include "SDL_opengl.h" #include "SDL_opengl.h"
#ifndef SDL_VIDEO_OPENGL
#error SDL_VIDEO_OPENGL
#endif
int int
main () main ()
@ -3850,11 +3853,10 @@ have_opengles=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#if defined (__IPHONEOS__) #include "SDL_opengles.h"
#include <OpenGLES/ES1/gl.h> #ifndef SDL_VIDEO_OPENGL_ES
#else #error SDL_VIDEO_OPENGL_ES
#include <GLES/gl.h> #endif
#endif /* __QNXNTO__ */
int int
main () main ()
@ -3880,12 +3882,9 @@ have_opengles2=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#if defined (__IPHONEOS__) #include "SDL_opengles2.h"
#include <OpenGLES/ES2/gl.h> #ifndef SDL_VIDEO_OPENGL_ES2
#include <OpenGLES/ES2/glext.h> #error SDL_VIDEO_OPENGL_ES2
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif #endif
int int

View File

@ -125,6 +125,9 @@ AC_MSG_CHECKING(for OpenGL support)
have_opengl=no have_opengl=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include "SDL_opengl.h" #include "SDL_opengl.h"
#ifndef SDL_VIDEO_OPENGL
#error SDL_VIDEO_OPENGL
#endif
],[ ],[
],[ ],[
have_opengl=yes have_opengl=yes
@ -135,11 +138,10 @@ dnl Check for OpenGL ES
AC_MSG_CHECKING(for OpenGL ES support) AC_MSG_CHECKING(for OpenGL ES support)
have_opengles=no have_opengles=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined (__IPHONEOS__) #include "SDL_opengles.h"
#include <OpenGLES/ES1/gl.h> #ifndef SDL_VIDEO_OPENGL_ES
#else #error SDL_VIDEO_OPENGL_ES
#include <GLES/gl.h> #endif
#endif /* __QNXNTO__ */
],[ ],[
],[ ],[
have_opengles=yes have_opengles=yes
@ -150,12 +152,9 @@ dnl Check for OpenGL ES2
AC_MSG_CHECKING(for OpenGL ES2 support) AC_MSG_CHECKING(for OpenGL ES2 support)
have_opengles2=no have_opengles2=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#if defined (__IPHONEOS__) #include "SDL_opengles2.h"
#include <OpenGLES/ES2/gl.h> #ifndef SDL_VIDEO_OPENGL_ES2
#include <OpenGLES/ES2/glext.h> #error SDL_VIDEO_OPENGL_ES2
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif #endif
],[ ],[
],[ ],[