From 80cf4f07249024705d1fcd332ec0423d8dd0304f Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sat, 8 Feb 2020 19:34:51 +0000 Subject: [PATCH] test: Improved detection of OpenGL support --- test/configure | 21 ++++++++++----------- test/configure.ac | 21 ++++++++++----------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/test/configure b/test/configure index b0abb99c41260..24d27f36f557d 100755 --- a/test/configure +++ b/test/configure @@ -3825,6 +3825,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "SDL_opengl.h" + #ifndef SDL_VIDEO_OPENGL + #error SDL_VIDEO_OPENGL + #endif int main () @@ -3850,11 +3853,10 @@ have_opengles=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #if defined (__IPHONEOS__) - #include - #else - #include - #endif /* __QNXNTO__ */ + #include "SDL_opengles.h" + #ifndef SDL_VIDEO_OPENGL_ES + #error SDL_VIDEO_OPENGL_ES + #endif int main () @@ -3880,12 +3882,9 @@ have_opengles2=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #if defined (__IPHONEOS__) - #include - #include - #else - #include - #include + #include "SDL_opengles2.h" + #ifndef SDL_VIDEO_OPENGL_ES2 + #error SDL_VIDEO_OPENGL_ES2 #endif int diff --git a/test/configure.ac b/test/configure.ac index af801222d2bbf..6f7da7dce614a 100644 --- a/test/configure.ac +++ b/test/configure.ac @@ -125,6 +125,9 @@ AC_MSG_CHECKING(for OpenGL support) have_opengl=no AC_TRY_COMPILE([ #include "SDL_opengl.h" + #ifndef SDL_VIDEO_OPENGL + #error SDL_VIDEO_OPENGL + #endif ],[ ],[ have_opengl=yes @@ -135,11 +138,10 @@ dnl Check for OpenGL ES AC_MSG_CHECKING(for OpenGL ES support) have_opengles=no AC_TRY_COMPILE([ - #if defined (__IPHONEOS__) - #include - #else - #include - #endif /* __QNXNTO__ */ + #include "SDL_opengles.h" + #ifndef SDL_VIDEO_OPENGL_ES + #error SDL_VIDEO_OPENGL_ES + #endif ],[ ],[ have_opengles=yes @@ -150,12 +152,9 @@ dnl Check for OpenGL ES2 AC_MSG_CHECKING(for OpenGL ES2 support) have_opengles2=no AC_TRY_COMPILE([ - #if defined (__IPHONEOS__) - #include - #include - #else - #include - #include + #include "SDL_opengles2.h" + #ifndef SDL_VIDEO_OPENGL_ES2 + #error SDL_VIDEO_OPENGL_ES2 #endif ],[ ],[