From 4606c6c63a75abd06862259e6370b66d9d76fa45 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 17 May 2001 03:48:31 +0000 Subject: [PATCH] new automake conditionals: BUILD_GL and BUILD_SW for use in places where it matters (eg, selecting whether to build the gl and or sw specific model code) --- configure.in | 14 ++++++++++++++ libs/models/Makefile.am | 14 +++++++++++++- libs/models/alias/Makefile.am | 14 +++++++++++++- libs/models/brush/Makefile.am | 14 +++++++++++++- libs/models/sprite/Makefile.am | 14 +++++++++++++- 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index ed7f1d2b7..670820bb6 100644 --- a/configure.in +++ b/configure.in @@ -1401,17 +1401,21 @@ NQ_TARGETS="" CD_TARGETS="" SND_TARGETS="" VID_TARGETS="" +BUILD_GL=no +BUILD_SW=no if test "x$HAVE_TDFXGL" = xyes -a "x$ENABLE_3DFX" = xyes; then QW_TARGETS="$QW_TARGETS qw-client-3dfx\$(EXEEXT)" NQ_TARGETS="$NQ_TARGETS nq-3dfx\$(EXEEXT)" CL_TARGETS="$CL_TARGETS 3dfx" VID_TARGETS="$VID_TARGETS libQFtdfx.la" + BUILD_GL=yes fi if test "x$HAVE_FBDEV" = xyes -a "x$ENABLE_FBDEV" = xyes; then QW_TARGETS="$QW_TARGETS qw-client-fbdev\$(EXEEXT)" NQ_TARGETS="$NQ_TARGETS nq-fbdev\$(EXEEXT)" CL_TARGETS="$CL_TARGETS FBDEV" VID_TARGETS="$VID_TARGETS libQFfbdev.la" + BUILD_SW=yes fi if test "x$HAVE_X" = xyes; then if test "x$HAVE_GLX" = xyes -a "x$ENABLE_GLX" = xyes; then @@ -1419,6 +1423,7 @@ if test "x$HAVE_X" = xyes; then NQ_TARGETS="$NQ_TARGETS nq-glx\$(EXEEXT)" CL_TARGETS="$CL_TARGETS GLX" VID_TARGETS="$VID_TARGETS libQFglx.la" + BUILD_GL=yes fi fi if test "x$HAVE_MGL" = xyes -a "x$ENABLE_MGL" = xyes; then @@ -1426,12 +1431,14 @@ if test "x$HAVE_MGL" = xyes -a "x$ENABLE_MGL" = xyes; then NQ_TARGETS="$NQ_TARGETS nq-mgl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS MGL" VID_TARGETS="$VID_TARGETS libQFwgl.la" + BUILD_SW=yes fi if test "x$HAVE_SDL" = xyes -a "x$ENABLE_SDL" = xyes; then QW_TARGETS="$QW_TARGETS qw-client-sdl\$(EXEEXT)" NQ_TARGETS="$NQ_TARGETS nq-sdl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SDL" VID_TARGETS="$VID_TARGETS libQFsdl.la" + BUILD_SW=yes fi if test "x$HAVE_SGL" = xyes; then if test "x$HAVE_GLX" = xyes -a "x$ENABLE_SGL" = xyes; then @@ -1439,6 +1446,7 @@ if test "x$HAVE_SGL" = xyes; then NQ_TARGETS="$NQ_TARGETS nq-sgl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SDL-GL" VID_TARGETS="$VID_TARGETS libQFsgl.la" + BUILD_GL=yes fi fi if test "x$HAVE_SVGA" = xyes -a "x$ENABLE_SVGA" = xyes; then @@ -1446,18 +1454,21 @@ if test "x$HAVE_SVGA" = xyes -a "x$ENABLE_SVGA" = xyes; then NQ_TARGETS="$NQ_TARGETS nq-svga\$(EXEEXT)" CL_TARGETS="$CL_TARGETS SVGAlib" VID_TARGETS="$VID_TARGETS libQFsvga.la" + BUILD_SW=yes fi if test "x$mingw" = xyes -a "x$HAVE_GLX" = xyes -a "x$ENABLE_WGL" = xyes; then QW_TARGETS="$QW_TARGETS qw-client-wgl\$(EXEEXT)" NQ_TARGETS="$NQ_TARGETS nq-wgl\$(EXEEXT)" CL_TARGETS="$CL_TARGETS WGL" VID_TARGETS="$VID_TARGETS libQFwgl.la" + BUILD_GL=yes fi if test "x$HAVE_X" = xyes -a "x$ENABLE_X11" = xyes; then QW_TARGETS="$QW_TARGETS qw-client-x11\$(EXEEXT)" NQ_TARGETS="$NQ_TARGETS nq-x11\$(EXEEXT)" CL_TARGETS="$CL_TARGETS X11" VID_TARGETS="$VID_TARGETS libQFx11.la" + BUILD_SW=yes fi if test "x$SV_TARGETS" = xyes; then QW_TARGETS="qw-server\$(EXEEXT) $QW_TARGETS" @@ -1474,6 +1485,9 @@ AC_SUBST(CD_TARGETS) AC_SUBST(SND_TARGETS) AC_SUBST(VID_TARGETS) +AM_CONDITIONAL(BUILD_GL, test "$BUILD_GL" = "yes") +AM_CONDITIONAL(BUILD_SW, test "$BUILD_SW" = "yes") + dnl Output files AC_OUTPUT( Makefile diff --git a/libs/models/Makefile.am b/libs/models/Makefile.am index 26a2fbb5f..d8fcdaf5d 100644 --- a/libs/models/Makefile.am +++ b/libs/models/Makefile.am @@ -1,7 +1,19 @@ SUBDIRS= alias brush sprite INCLUDES= -I$(top_srcdir)/include -lib_LTLIBRARIES = libQFmodels.la libQFmodels_gl.la libQFmodels_sw.la +if BUILD_GL +MODELS_GL = libQFmodels_gl.la +else +MODELS_GL = +endif + +if BUILD_SW +MODELS_SW = libQFmodels_sw.la +else +MODELS_SW = +endif + +lib_LTLIBRARIES = libQFmodels.la $(MODELS_GL) $(MODELS_SW) libQFmodels_la_LDFLAGS = -version-info 1:0:0 brush/model_brush.lo libQFmodels_la_SOURCES = model.c diff --git a/libs/models/alias/Makefile.am b/libs/models/alias/Makefile.am index 5831d95e4..e55aef543 100644 --- a/libs/models/alias/Makefile.am +++ b/libs/models/alias/Makefile.am @@ -1,6 +1,18 @@ INCLUDES= -I$(top_srcdir)/include -noinst_LTLIBRARIES = libalias_gl.la libalias_sw.la +if BUILD_GL +ALIAS_GL = libalias_gl.la +else +ALIAS_GL = +endif + +if BUILD_SW +ALIAS_SW = libalias_sw.la +else +ALIAS_SW = +endif + +noinst_LTLIBRARIES = $(ALIAS_GL) $(ALIAS_SW) libalias_gl_la_LDFLAGS = -version-info 1:0:0 libalias_gl_la_SOURCES = gl_mesh.c gl_model_alias.c model_alias.c diff --git a/libs/models/brush/Makefile.am b/libs/models/brush/Makefile.am index c69afd12e..d738a3f86 100644 --- a/libs/models/brush/Makefile.am +++ b/libs/models/brush/Makefile.am @@ -1,6 +1,18 @@ INCLUDES= -I$(top_srcdir)/include -noinst_LTLIBRARIES = libbrush_gl.la libbrush_sw.la +if BUILD_GL +BRUSH_GL = libbrush_gl.la +else +BRUSH_GL = +endif + +if BUILD_SW +BRUSH_SW = libbrush_sw.la +else +BRUSH_SW = +endif + +noinst_LTLIBRARIES = $(BRUSH_GL) $(BRUSH_SW) libbrush_gl_la_LDFLAGS = -version-info 1:0:0 libbrush_gl_la_SOURCES = gl_model_brush.c model_brush.c diff --git a/libs/models/sprite/Makefile.am b/libs/models/sprite/Makefile.am index 79c2a240f..3c62f6fd7 100644 --- a/libs/models/sprite/Makefile.am +++ b/libs/models/sprite/Makefile.am @@ -1,6 +1,18 @@ INCLUDES= -I$(top_srcdir)/include -noinst_LTLIBRARIES = libsprite_gl.la libsprite_sw.la +if BUILD_GL +SPRITE_GL = libsprite_gl.la +else +SPRITE_GL = +endif + +if BUILD_SW +SPRITE_SW = libsprite_sw.la +else +SPRITE_SW = +endif + +noinst_LTLIBRARIES = $(SPRITE_GL) $(SPRITE_SW) libsprite_gl_la_LDFLAGS = -version-info 1:0:0 libsprite_gl_la_SOURCES = gl_model_sprite.c model_sprite.c