test: configure/make shouldn't build GL/GLES1/GLES2 programs if unsupported.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
diff --git a/test/Makefile.in b/test/Makefile.in
index 9ddd6ff..9a62156 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -28,9 +28,6 @@ TARGETS = \
testfilesystem$(EXE) \
testgamecontroller$(EXE) \
testgesture$(EXE) \
- testgl2$(EXE) \
- testgles$(EXE) \
- testgles2$(EXE) \
testhaptic$(EXE) \
testhittesting$(EXE) \
testhotplug$(EXE) \
@@ -56,7 +53,6 @@ TARGETS = \
testscale$(EXE) \
testsem$(EXE) \
testsensor$(EXE) \
- testshader$(EXE) \
testshape$(EXE) \
testsprite2$(EXE) \
testspriteminimal$(EXE) \
@@ -69,7 +65,13 @@ TARGETS = \
testwm2$(EXE) \
testyuv$(EXE) \
torturethread$(EXE) \
+
+@OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
+@OPENGLES1_TARGETS@ += testgles$(EXE)
+@OPENGLES2_TARGETS@ += testgles2$(EXE)
+
+
all: Makefile $(TARGETS) copydatafiles
Makefile: $(srcdir)/Makefile.in
diff --git a/test/configure b/test/configure
index 61c32fb..909a485 100755
--- a/test/configure
+++ b/test/configure
@@ -589,6 +589,9 @@ XLIB
GLES2LIB
GLESLIB
GLLIB
+OPENGL_TARGETS
+OPENGLES2_TARGETS
+OPENGLES1_TARGETS
CPP
XMKMF
SDL_CONFIG
@@ -3901,17 +3904,23 @@ $as_echo "$have_opengles2" >&6; }
GLLIB=""
GLESLIB=""
GLES2LIB=""
+OPENGLES1_TARGETS="UNUSED"
+OPENGLES2_TARGETS="UNUSED"
+OPENGL_TARGETS="UNUSED"
if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM"
+ OPENGLES1_TARGETS="TARGETS"
fi
if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
#GLES2LIB="$XPATH -lGLESv2"
+ OPENGLES2_TARGETS="TARGETS"
fi
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
+ OPENGL_TARGETS="TARGETS"
fi
@@ -3919,6 +3928,9 @@ fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTF_Init in -lSDL2_ttf" >&5
$as_echo_n "checking for TTF_Init in -lSDL2_ttf... " >&6; }
if ${ac_cv_lib_SDL2_ttf_TTF_Init+:} false; then :
diff --git a/test/configure.ac b/test/configure.ac
index fd3f302..2e23726 100644
--- a/test/configure.ac
+++ b/test/configure.ac
@@ -161,19 +161,28 @@ AC_MSG_RESULT($have_opengles2)
GLLIB=""
GLESLIB=""
GLES2LIB=""
+OPENGLES1_TARGETS="UNUSED"
+OPENGLES2_TARGETS="UNUSED"
+OPENGL_TARGETS="UNUSED"
if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM"
+ OPENGLES1_TARGETS="TARGETS"
fi
if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
#GLES2LIB="$XPATH -lGLESv2"
+ OPENGLES2_TARGETS="TARGETS"
fi
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
+ OPENGL_TARGETS="TARGETS"
fi
+AC_SUBST(OPENGLES1_TARGETS)
+AC_SUBST(OPENGLES2_TARGETS)
+AC_SUBST(OPENGL_TARGETS)
AC_SUBST(GLLIB)
AC_SUBST(GLESLIB)
AC_SUBST(GLES2LIB)