configure.in
changeset 6188 e82023802002
parent 6116 66f48d6bf735
child 6217 6952b11b7f46
     1.1 --- a/configure.in	Sun Jan 08 01:15:20 2012 -0500
     1.2 +++ b/configure.in	Sun Jan 08 02:23:37 2012 -0500
     1.3 @@ -1474,6 +1474,57 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check to see if OpenGL ES support is desired
     1.8 +AC_ARG_ENABLE(video-opengles,
     1.9 +AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
    1.10 +              , enable_video_opengles=yes)
    1.11 +
    1.12 +dnl Find OpenGL ES
    1.13 +CheckOpenGLESX11()
    1.14 +{
    1.15 +    if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
    1.16 +        AC_MSG_CHECKING(for OpenGL ES (EGL) support)
    1.17 +        video_opengles=no
    1.18 +        AC_TRY_COMPILE([
    1.19 +         #include <EGL/egl.h>
    1.20 +        ],[
    1.21 +        ],[
    1.22 +        video_opengles=yes
    1.23 +        ])
    1.24 +        AC_MSG_RESULT($video_opengles)
    1.25 +        if test x$video_opengles = xyes; then
    1.26 +            AC_MSG_CHECKING(for OpenGL ES v1 headers)
    1.27 +            video_opengles_v1=no
    1.28 +            AC_TRY_COMPILE([
    1.29 +             #include <GLES/gl.h>
    1.30 +             #include <GLES/glext.h>
    1.31 +            ],[
    1.32 +            ],[
    1.33 +            video_opengles_v1=yes
    1.34 +            ])
    1.35 +            AC_MSG_RESULT($video_opengles_v1)
    1.36 +            if test x$video_opengles_v1 = xyes; then
    1.37 +                AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
    1.38 +                AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
    1.39 +            fi
    1.40 +            AC_MSG_CHECKING(for OpenGL ES v2 headers)
    1.41 +            video_opengles_v2=no
    1.42 +            AC_TRY_COMPILE([
    1.43 +             #include <GLES2/gl2.h>
    1.44 +             #include <GLES2/gl2ext.h>
    1.45 +            ],[
    1.46 +            ],[
    1.47 +            video_opengles_v2=yes
    1.48 +            ])
    1.49 +            AC_MSG_RESULT($video_opengles_v2)
    1.50 +            if test x$video_opengles_v2 = xyes; then
    1.51 +                AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
    1.52 +                AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
    1.53 +            fi
    1.54 +        fi
    1.55 +    fi
    1.56 +}
    1.57 +
    1.58  dnl Check for Windows OpenGL
    1.59  CheckWINDOWSGL()
    1.60  {
    1.61 @@ -2043,6 +2094,7 @@
    1.62          CheckDirectFB
    1.63          CheckFusionSound
    1.64          CheckOpenGLX11
    1.65 +        CheckOpenGLESX11
    1.66          CheckInputEvents
    1.67          CheckTslib
    1.68          CheckUSBHID