configure.in
changeset 9155 dfeb88fc5a9d
parent 9127 a8c38ed1a674
child 9164 494876610c49
equal deleted inserted replaced
9154:3331d2f57704 9155:dfeb88fc5a9d
  1971 
  1971 
  1972 dnl Check to see if OpenGL ES support is desired
  1972 dnl Check to see if OpenGL ES support is desired
  1973 AC_ARG_ENABLE(video-opengles,
  1973 AC_ARG_ENABLE(video-opengles,
  1974 AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
  1974 AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
  1975               , enable_video_opengles=yes)
  1975               , enable_video_opengles=yes)
       
  1976 AC_ARG_ENABLE(video-opengles1,
       
  1977 AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
       
  1978               , enable_video_opengles1=yes)
       
  1979 AC_ARG_ENABLE(video-opengles2,
       
  1980 AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
       
  1981               , enable_video_opengles2=yes)
  1976 
  1982 
  1977 dnl Find OpenGL ES
  1983 dnl Find OpenGL ES
  1978 CheckOpenGLESX11()
  1984 CheckOpenGLESX11()
  1979 {
  1985 {
  1980     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
  1986     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
  1991         AC_MSG_RESULT($video_opengl_egl)
  1997         AC_MSG_RESULT($video_opengl_egl)
  1992         if test x$video_opengl_egl = xyes; then
  1998         if test x$video_opengl_egl = xyes; then
  1993             AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
  1999             AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
  1994         fi
  2000         fi
  1995             
  2001             
  1996         AC_MSG_CHECKING(for OpenGL ES v1 headers)
  2002         if test x$enable_video_opengles1 = xyes; then
  1997         video_opengles_v1=no
  2003             AC_MSG_CHECKING(for OpenGL ES v1 headers)
  1998         AC_TRY_COMPILE([
  2004             video_opengles_v1=no
  1999          #include <GLES/gl.h>
  2005             AC_TRY_COMPILE([
  2000          #include <GLES/glext.h>
  2006              #include <GLES/gl.h>
  2001         ],[
  2007              #include <GLES/glext.h>
  2002         ],[
  2008             ],[
  2003         video_opengles_v1=yes
  2009             ],[
  2004         ])
  2010             video_opengles_v1=yes
  2005         AC_MSG_RESULT($video_opengles_v1)
  2011             ])
  2006         if test x$video_opengles_v1 = xyes; then
  2012             AC_MSG_RESULT($video_opengles_v1)
  2007             AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
  2013             if test x$video_opengles_v1 = xyes; then
  2008             AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
  2014                 AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
  2009             SUMMARY_video="${SUMMARY_video} opengl_es1"
  2015                 AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
       
  2016                 SUMMARY_video="${SUMMARY_video} opengl_es1"
       
  2017             fi
  2010         fi
  2018         fi
  2011         
  2019         
  2012         AC_MSG_CHECKING(for OpenGL ES v2 headers)
  2020         if test x$enable_video_opengles2 = xyes; then
  2013         video_opengles_v2=no
  2021             AC_MSG_CHECKING(for OpenGL ES v2 headers)
  2014         AC_TRY_COMPILE([
  2022             video_opengles_v2=no
  2015          #include <GLES2/gl2.h>
  2023             AC_TRY_COMPILE([
  2016          #include <GLES2/gl2ext.h>
  2024              #include <GLES2/gl2.h>
  2017         ],[
  2025              #include <GLES2/gl2ext.h>
  2018         ],[
  2026             ],[
  2019         video_opengles_v2=yes
  2027             ],[
  2020         ])
  2028             video_opengles_v2=yes
  2021         AC_MSG_RESULT($video_opengles_v2)
  2029             ])
  2022         if test x$video_opengles_v2 = xyes; then
  2030             AC_MSG_RESULT($video_opengles_v2)
  2023             AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
  2031             if test x$video_opengles_v2 = xyes; then
  2024             AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
  2032                 AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
  2025             SUMMARY_video="${SUMMARY_video} opengl_es2"
  2033                 AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
       
  2034                 SUMMARY_video="${SUMMARY_video} opengl_es2"
       
  2035             fi
  2026         fi
  2036         fi
  2027     fi
  2037     fi
  2028 }
  2038 }
  2029 
  2039 
  2030 dnl Check for Windows OpenGL
  2040 dnl Check for Windows OpenGL