test: configure/make shouldn't build GL/GLES1/GLES2 programs if unsupported.

This commit is contained in:
Ryan C. Gordon 2019-05-18 23:47:57 -04:00
parent 62a5797088
commit 18d83093a8
3 changed files with 27 additions and 4 deletions

View File

@ -28,9 +28,6 @@ TARGETS = \
testfilesystem$(EXE) \ testfilesystem$(EXE) \
testgamecontroller$(EXE) \ testgamecontroller$(EXE) \
testgesture$(EXE) \ testgesture$(EXE) \
testgl2$(EXE) \
testgles$(EXE) \
testgles2$(EXE) \
testhaptic$(EXE) \ testhaptic$(EXE) \
testhittesting$(EXE) \ testhittesting$(EXE) \
testhotplug$(EXE) \ testhotplug$(EXE) \
@ -56,7 +53,6 @@ TARGETS = \
testscale$(EXE) \ testscale$(EXE) \
testsem$(EXE) \ testsem$(EXE) \
testsensor$(EXE) \ testsensor$(EXE) \
testshader$(EXE) \
testshape$(EXE) \ testshape$(EXE) \
testsprite2$(EXE) \ testsprite2$(EXE) \
testspriteminimal$(EXE) \ testspriteminimal$(EXE) \
@ -70,6 +66,12 @@ TARGETS = \
testyuv$(EXE) \ testyuv$(EXE) \
torturethread$(EXE) \ torturethread$(EXE) \
@OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
@OPENGLES1_TARGETS@ += testgles$(EXE)
@OPENGLES2_TARGETS@ += testgles2$(EXE)
all: Makefile $(TARGETS) copydatafiles all: Makefile $(TARGETS) copydatafiles
Makefile: $(srcdir)/Makefile.in Makefile: $(srcdir)/Makefile.in

12
test/configure vendored
View File

@ -589,6 +589,9 @@ XLIB
GLES2LIB GLES2LIB
GLESLIB GLESLIB
GLLIB GLLIB
OPENGL_TARGETS
OPENGLES2_TARGETS
OPENGLES1_TARGETS
CPP CPP
XMKMF XMKMF
SDL_CONFIG SDL_CONFIG
@ -3901,17 +3904,23 @@ $as_echo "$have_opengles2" >&6; }
GLLIB="" GLLIB=""
GLESLIB="" GLESLIB=""
GLES2LIB="" GLES2LIB=""
OPENGLES1_TARGETS="UNUSED"
OPENGLES2_TARGETS="UNUSED"
OPENGL_TARGETS="UNUSED"
if test x$have_opengles = xyes; then if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES" CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM" GLESLIB="$XPATH -lGLESv1_CM"
OPENGLES1_TARGETS="TARGETS"
fi fi
if test x$have_opengles2 = xyes; then if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2" CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
#GLES2LIB="$XPATH -lGLESv2" #GLES2LIB="$XPATH -lGLESv2"
OPENGLES2_TARGETS="TARGETS"
fi fi
if test x$have_opengl = xyes; then if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL" CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS" GLLIB="$XPATH $SYS_GL_LIBS"
OPENGL_TARGETS="TARGETS"
fi fi
@ -3919,6 +3928,9 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTF_Init in -lSDL2_ttf" >&5 { $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; } $as_echo_n "checking for TTF_Init in -lSDL2_ttf... " >&6; }
if ${ac_cv_lib_SDL2_ttf_TTF_Init+:} false; then : if ${ac_cv_lib_SDL2_ttf_TTF_Init+:} false; then :

View File

@ -161,19 +161,28 @@ AC_MSG_RESULT($have_opengles2)
GLLIB="" GLLIB=""
GLESLIB="" GLESLIB=""
GLES2LIB="" GLES2LIB=""
OPENGLES1_TARGETS="UNUSED"
OPENGLES2_TARGETS="UNUSED"
OPENGL_TARGETS="UNUSED"
if test x$have_opengles = xyes; then if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES" CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM" GLESLIB="$XPATH -lGLESv1_CM"
OPENGLES1_TARGETS="TARGETS"
fi fi
if test x$have_opengles2 = xyes; then if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2" CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
#GLES2LIB="$XPATH -lGLESv2" #GLES2LIB="$XPATH -lGLESv2"
OPENGLES2_TARGETS="TARGETS"
fi fi
if test x$have_opengl = xyes; then if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL" CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS" GLLIB="$XPATH $SYS_GL_LIBS"
OPENGL_TARGETS="TARGETS"
fi fi
AC_SUBST(OPENGLES1_TARGETS)
AC_SUBST(OPENGLES2_TARGETS)
AC_SUBST(OPENGL_TARGETS)
AC_SUBST(GLLIB) AC_SUBST(GLLIB)
AC_SUBST(GLESLIB) AC_SUBST(GLESLIB)
AC_SUBST(GLES2LIB) AC_SUBST(GLES2LIB)