Skip to content

Commit

Permalink
Added configure options to disable OpenGL ES 1.1 and 2.0 individually
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 13, 2014
1 parent 411e0f9 commit bebc8d1
Showing 1 changed file with 38 additions and 28 deletions.
66 changes: 38 additions & 28 deletions configure.in
Expand Up @@ -1973,6 +1973,12 @@ dnl Check to see if OpenGL ES support is desired
AC_ARG_ENABLE(video-opengles,
AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
, enable_video_opengles=yes)
AC_ARG_ENABLE(video-opengles1,
AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
, enable_video_opengles1=yes)
AC_ARG_ENABLE(video-opengles2,
AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
, enable_video_opengles2=yes)

dnl Find OpenGL ES
CheckOpenGLESX11()
Expand All @@ -1993,36 +1999,40 @@ CheckOpenGLESX11()
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
fi

AC_MSG_CHECKING(for OpenGL ES v1 headers)
video_opengles_v1=no
AC_TRY_COMPILE([
#include <GLES/gl.h>
#include <GLES/glext.h>
],[
],[
video_opengles_v1=yes
])
AC_MSG_RESULT($video_opengles_v1)
if test x$video_opengles_v1 = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
SUMMARY_video="${SUMMARY_video} opengl_es1"
if test x$enable_video_opengles1 = xyes; then
AC_MSG_CHECKING(for OpenGL ES v1 headers)
video_opengles_v1=no
AC_TRY_COMPILE([
#include <GLES/gl.h>
#include <GLES/glext.h>
],[
],[
video_opengles_v1=yes
])
AC_MSG_RESULT($video_opengles_v1)
if test x$video_opengles_v1 = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
SUMMARY_video="${SUMMARY_video} opengl_es1"
fi
fi

AC_MSG_CHECKING(for OpenGL ES v2 headers)
video_opengles_v2=no
AC_TRY_COMPILE([
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
],[
],[
video_opengles_v2=yes
])
AC_MSG_RESULT($video_opengles_v2)
if test x$video_opengles_v2 = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
SUMMARY_video="${SUMMARY_video} opengl_es2"
if test x$enable_video_opengles2 = xyes; then
AC_MSG_CHECKING(for OpenGL ES v2 headers)
video_opengles_v2=no
AC_TRY_COMPILE([
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
],[
],[
video_opengles_v2=yes
])
AC_MSG_RESULT($video_opengles_v2)
if test x$video_opengles_v2 = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
SUMMARY_video="${SUMMARY_video} opengl_es2"
fi
fi
fi
}
Expand Down

0 comments on commit bebc8d1

Please sign in to comment.