+###############################################################################
+#
+# Handle --with-gles
+#
+###############################################################################
+
+with_gles_req=unspecified
+AC_ARG_WITH(gles,
+[ --with-gles Target OpenGL ES 1.x API instead of OpenGL 1.3.],
+ [with_gles="$withval"; with_gles_req="$withval"],[with_gles=no])
+
+HANDLE_X_PATH_ARG(with_gles, --with-gles, JWZGLES)
+
+if test "$with_gles" = yes; then
+ have_gles=yes
+ AC_DEFINE(HAVE_JWZGLES)
+ JWZGLES_OBJS="jwzgles.o"
+ AC_MSG_RESULT(using OpenGL ES compatiblity shim)
+elif test "$with_gles" != no; then
+ echo "error: must be yes or no: --with-gles=$with_xpm"
+ exit 1
+fi
+
+# May want to phase out glBitmap even in a non-GLES world.
+#
+if test "$have_gles" = yes; then
+ GLFPS_OBJS="fps-gl.o glxfonts.o texfont.o"
+ GLFONT_OBJS=""
+else
+ AC_DEFINE(HAVE_GLBITMAP)
+ GLFPS_OBJS="fps-gl.o glxfonts.o"
+ GLFONT_OBJS="texfont.o"
+fi
+
+