mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Adds testgles2
Source code copied from: https://github.com/fantasydr/sdl-2.0-gles (thanks!) Minor fixes, configure script changes done by me.
This commit is contained in:
38
test/configure
vendored
38
test/configure
vendored
@@ -587,6 +587,7 @@ LIBOBJS
|
||||
SDL_TTF_LIB
|
||||
XLIB
|
||||
GLESLIB
|
||||
GLES2LIB
|
||||
GLLIB
|
||||
CPP
|
||||
XMKMF
|
||||
@@ -3860,12 +3861,49 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles" >&5
|
||||
$as_echo "$have_opengles" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES2 support" >&5
|
||||
$as_echo_n "checking for OpenGL ES2 support... " >&6; }
|
||||
have_opengles2=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#if defined (__IPHONEOS__)
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
have_opengles2=yes
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles2" >&5
|
||||
$as_echo "$have_opengles2" >&6; }
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user