diff --git a/configure.ac b/configure.ac index 48798e1e0..1ee35e2ef 100644 --- a/configure.ac +++ b/configure.ac @@ -553,6 +553,32 @@ if test "x$HAVE_DGA" != xno; then fi AC_SUBST(DGA_LIBS) +dnl Checks for GLIDE support +AC_ARG_WITH(glide, +[ --with-glide=DIR use the GLIDE 2.x SDK found in DIR], +HAVE_GLIDE=$withval, HAVE_GLIDE=auto) +if test "x$HAVE_GLIDE" != xno; then + AC_CHECK_LIB(glide, grGammaCorrectionValue, GLIDE_LIBS="-lglide", + AC_CHECK_LIB(glide2x, grGammaCorrectionValue, GLIDE_LIBS="-lglide2x",GLIDE_LIBS="")) + if test "x$HAVE_GLIDE" != xauto; then + GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include" + GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib" + else + GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide" + fi + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS" + AC_CHECK_HEADER(glide.h, HAVE_GLIDE=yes, HAVE_GLIDE=no) + if test "x$HAVE_GLIDE" != xyes; then + HAVE_GLIDE=no + else + AC_DEFINE(HAVE_GLIDE) + fi + CPPFLAGS="$save_CPPFLAGS" +fi +AC_SUBST(GLIDE_CFLAGS) +AC_SUBST(GLIDE_LIBS) + dnl SDL/SDL-GL checks AC_ARG_ENABLE(sdl, [ --disable-sdl disable checking for SDL], @@ -1286,7 +1312,7 @@ dnl ================================================================== AC_ARG_WITH(clients, [ --with-clients= compile clients in ; - fbdev,glx,mgl,sdl,sdl32,sgl,svga,wgl,x11], + 3dfx,fbdev,glx,mgl,sdl,sdl32,sgl,svga,wgl,x11], clients="$withval", clients="all" ) @@ -1315,6 +1341,9 @@ else IFS="," for client in $clients; do case "$client" in + 3dfx) + ENABLE_3DFX=yes + ;; fbdev) ENABLE_FBDEV=yes ;; @@ -1471,6 +1500,16 @@ if test "x$HAVE_SVGA" = xyes; then BUILD_SW=yes fi CAN_BUILD_SW=yes + if test "x$HAVE_GLIDE" = xyes; then + if test "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 + CAN_BUILD_GL=yes + fi fi if test "x$mingw" = xyes; then if test "x$ENABLE_WGL" = xyes; then diff --git a/libs/video/targets/Makefile.am b/libs/video/targets/Makefile.am index 481a19916..be7579960 100644 --- a/libs/video/targets/Makefile.am +++ b/libs/video/targets/Makefile.am @@ -13,8 +13,8 @@ lib_LTLIBRARIES= @JOY_TARGETS@ noinst_LTLIBRARIES= @VID_TARGETS@ EXTRA_LTLIBRARIES= \ - libQFjs.la libQFfbdev.la libQFglx.la libQFsvga.la libQFx11.la \ - libQFsdl.la libQFsdl32.la libQFsgl.la libQFwgl.la libasm.la + libQFjs.la libQFfbdev.la libQFglx.la libQFsvga.la libQFtdfx.la \ + libQFx11.la libQFsdl.la libQFsdl32.la libQFsgl.la libQFwgl.la libasm.la libasm_la_SOURCES= d_copy.S @@ -79,6 +79,16 @@ endif libQFsvga_la_SOURCES= in_svgalib.c vid.c vid_common_sw.c vid_svgalib.c \ $(in_common_SOURCE) +# +# 3dfx +# +if ASM_ARCH +libQFtdfx_la_LIBADD= $(asm) +libQFtdfx_la_DEPENDENCIES=$(asm) +endif +libQFtdfx_la_SOURCES= in_svgalib.c vid.c vid_common_gl.c vid_3dfxsvga.c \ + qfgl_ext.c $(in_common_SOURCE) + # # OpenGL in Win32 # diff --git a/nq/source/Makefile.am b/nq/source/Makefile.am index 85465b630..fd7d66a95 100644 --- a/nq/source/Makefile.am +++ b/nq/source/Makefile.am @@ -35,8 +35,8 @@ SDL_LIBS = @SDL_LIBS@ bin_PROGRAMS= @NQ_TARGETS@ -EXTRA_PROGRAMS= nq-fbdev nq-glx nq-mgl nq-sdl nq-sdl32 nq-sgl nq-svga nq-wgl \ - nq-x11 nq-server +EXTRA_PROGRAMS= nq-fbdev nq-glx nq-mgl nq-sdl nq-sdl32 nq-sgl nq-svga nq-3dfx \ + nq-wgl nq-x11 nq-server asm_src= sys_ia32.S worlda.S @@ -169,6 +169,19 @@ nq_x11_DEPENDENCIES= $(top_builddir)/libs/video/renderer/libQFrenderer_sw.la \ # OpenGL-using targets +# ... Linux 3DFX +nq_3dfx_SOURCES= $(combined_sources) sys_unix.c +nq_3dfx_LDADD= $(top_builddir)/libs/video/renderer/libQFrenderer_gl.la \ + $(top_builddir)/libs/models/libQFmodels_gl.la \ + $(top_builddir)/libs/video/targets/libQFtdfx.la \ + $(client_LIBS) $(GLIDE_LIBS) $(SVGA_LIBS) +nq_3dfx_LDFAGS= $(common_ldflags) +nq_3dfx_DEPENDENCIES= \ + $(top_builddir)/libs/video/renderer/libQFrenderer_gl.la \ + $(top_builddir)/libs/models/libQFmodels_gl.la \ + $(top_builddir)/libs/video/targets/libQFtdfx.la \ + $(client_LIB_DEPS) + # ... OpenGL in X Window nq_glx_SOURCES= $(combined_sources) sys_unix.c nq_glx_LDADD= $(top_builddir)/libs/video/renderer/libQFrenderer_gl.la \ diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index 9bbc02119..e09d0e19e 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -36,8 +36,8 @@ SDL_LIBS = @SDL_LIBS@ bin_PROGRAMS= @QW_TARGETS@ EXTRA_PROGRAMS= qw-client-fbdev qw-client-glx qw-client-mgl qw-client-sdl \ - qw-client-sdl32 qw-client-sgl qw-client-svga qw-client-wgl \ - qw-client-x11 qw-server qw-master + qw-client-sdl32 qw-client-sgl qw-client-svga qw-client-3dfx \ + qw-client-wgl qw-client-x11 qw-server qw-master if ASM_ARCH asm= libasm.la @@ -207,6 +207,17 @@ qw_client_glx_DEPENDENCIES= \ $(top_builddir)/libs/video/targets/libQFglx.la \ $(client_LIB_DEPS) +# ... Linux 3DFX +qw_client_3dfx_SOURCES= $(common_sources) $(client_sources) cl_sys_unix.c +qw_client_3dfx_LDADD= $(opengl_LIBS) \ + $(top_builddir)/libs/video/targets/libQFtdfx.la \ + $(client_LIBS) $(GLIDE_LIBS) $(SVGA_LIBS) +qw_client_3dfx_LDFAGS= $(common_ldflags) +qw_client_3dfx_DEPENDENCIES= \ + $(opengl_LIBS) \ + $(top_builddir)/libs/video/targets/libQFtdfx.la \ + $(client_LIB_DEPS) + # ... Simple DirectMedia Layer, version 1.2 and higher, in GL mode qw_client_sgl_SOURCES= $(common_sources) $(client_sources) cl_sys_sdl.c qw_client_sgl_LDADD= $(opengl_LIBS) \