test/configure.in
changeset 8014 0a4b6dec7de5
parent 7981 6d538bc1b395
child 8021 f96e12e0ade9
--- a/test/configure.in	Tue Nov 19 10:00:05 2013 -0300
+++ b/test/configure.in	Tue Nov 19 10:56:38 2013 -0300
@@ -135,12 +135,34 @@
 ])
 AC_MSG_RESULT($have_opengles)
 
+dnl Check for OpenGL ES2
+AC_MSG_CHECKING(for OpenGL ES2 support)
+have_opengles2=no
+AC_TRY_COMPILE([
+ #if defined (__IPHONEOS__)
+    #include <OpenGLES/ES2/gl.h>
+    #include <OpenGLES/ES2/glext.h>
+ #else
+    #include <GLES2/gl2.h>
+    #include <GLES2/gl2ext.h>
+ #endif
+],[
+],[
+have_opengles2=yes
+])
+AC_MSG_RESULT($have_opengles2)
+
 GLLIB=""
 GLESLIB=""
+GLES2LIB=""
 if test x$have_opengles = xyes; then
     CFLAGS="$CFLAGS -DHAVE_OPENGLES"
     GLESLIB="$XPATH -lGLESv1_CM"
 fi
+if test x$have_opengles2 = xyes; then
+    CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
+    GLES2LIB="$XPATH -lGLESv2"
+fi
 if test x$have_opengl = xyes; then
     CFLAGS="$CFLAGS -DHAVE_OPENGL"
     GLLIB="$XPATH $SYS_GL_LIBS"
@@ -148,6 +170,7 @@
 
 AC_SUBST(GLLIB)
 AC_SUBST(GLESLIB)
+AC_SUBST(GLES2LIB)
 AC_SUBST(XLIB)
 
 dnl Check for SDL_ttf