mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 20:21:38 +00:00
Added MGL target.
This commit is contained in:
parent
c87243d94c
commit
88701b5038
2 changed files with 52 additions and 10 deletions
43
configure.in
43
configure.in
|
@ -176,6 +176,42 @@ fi
|
|||
dnl Checks for working -lm
|
||||
AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken]))
|
||||
|
||||
dnl Checks for MGL support
|
||||
AC_ARG_WITH(mgl,
|
||||
[ --with-mgl[=DIR] use MGL found in DIR],
|
||||
HAVE_MGL=$withval, HAVE_MGL=auto)
|
||||
if test "x$HAVE_MGL" != xno; then
|
||||
if test "x$ac_cv_header_windows_h" != "xyes"; then
|
||||
HAVE_MGL=no
|
||||
else
|
||||
if test "x$HAVE_MGL" != xauto; then
|
||||
MGL_CFLAGS="$MGL_CFLAGS -I$withval/include"
|
||||
MGL_LIBS="$MGL_LIBS -L$withval/lib"
|
||||
fi
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $MGL_CFLAGS"
|
||||
AC_CHECK_HEADER(mgraph.h, HAVE_MGL=yes, HAVE_MGL=no)
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
|
||||
dnl Make sure -lmgllt or -lmglfx works
|
||||
if test "x$HAVE_MGL" = xyes; then
|
||||
for lib in mglfx mgllt; do
|
||||
MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw"
|
||||
AC_CHECK_LIB($lib,MGL_registerDriver,
|
||||
MGL_LIBS="-l$lib $MGL_LIBS"
|
||||
HAVE_MGL=yes
|
||||
break, HAVE_MGL=no, [$MGL_LIBS])
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "x$HAVE_MGL" != xyes; then
|
||||
MGL_CFLAGS="" MGL_LIBS=""
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_MGL)
|
||||
AC_SUBST(MGL_CFLAGS)
|
||||
AC_SUBST(MGL_LIBS)
|
||||
|
||||
dnl Checks for LibGGI support
|
||||
AC_ARG_WITH(ggi,
|
||||
[ --with-ggi[=DIR] use LibGGI found in DIR],
|
||||
|
@ -557,12 +593,15 @@ dnl ==================================================================
|
|||
dnl Find out what to build and finish
|
||||
dnl ==================================================================
|
||||
|
||||
if test "x$HAVE_SVGA" = xyes; then
|
||||
TARGETS="$TARGETS qf-client-svga\$(EXEEXT)"
|
||||
if test "x$HAVE_MGL" = xyes; then
|
||||
TARGETS="$TARGETS qf-client-mgl\$(EXEEXT)"
|
||||
fi
|
||||
if test "x$HAVE_GGI" = xyes; then
|
||||
TARGETS="$TARGETS qf-client-ggi\$(EXEEXT)"
|
||||
fi
|
||||
if test "x$HAVE_SVGA" = xyes; then
|
||||
TARGETS="$TARGETS qf-client-svga\$(EXEEXT)"
|
||||
fi
|
||||
if test "x$HAVE_X" = xyes; then
|
||||
TARGETS="$TARGETS qf-client-x11\$(EXEEXT)"
|
||||
if test "x$HAVE_GLX" = xyes; then
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES= -I$(top_srcdir)/include $(GGI_CFLAGS) $(SVGA_CFLAGS) $(X_CFLAGS) $(GLX_CFLAGS)
|
||||
INCLUDES= -I$(top_srcdir)/include $(MGL_CFLAGS) $(GGI_CFLAGS) $(SVGA_CFLAGS) $(X_CFLAGS) $(GLX_CFLAGS)
|
||||
|
||||
bin_PROGRAMS = @TARGETS@
|
||||
|
||||
EXTRA_PROGRAMS= qf-server qf-client-ggi qf-client-svga qf-client-x11 \
|
||||
qf-client-glx
|
||||
EXTRA_PROGRAMS= qf-server qf-client-mgl qf-client-ggi qf-client-svga \
|
||||
qf-client-x11 qf-client-glx
|
||||
|
||||
if SYSTYPE_WIN32
|
||||
cl_sys = sys_win.c cl_sys_win.c
|
||||
|
@ -38,6 +38,7 @@ ogl_SOURCES= gl_draw.c gl_mesh.c gl_model.c gl_ngraph.c gl_part.c \
|
|||
gl_refrag.c gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c \
|
||||
gl_screen.c gl_trans.c gl_view.c gl_warp.c
|
||||
|
||||
mgl_SOURCES= vid_mgl.c in_win.c
|
||||
ggi_SOURCES= vid_ggi.c
|
||||
svga_SOURCES= vid_svgalib.c
|
||||
x11_SOURCES= vid_x11.c
|
||||
|
@ -48,16 +49,18 @@ EXTRA_qf_server_SOURCES= sys_unix.c cl_sys_unix.c sv_sys_unix.c \
|
|||
sys_win.c cl_sys_win.c sv_sys_win.c
|
||||
|
||||
qf_server_SOURCES= $(common_SOURCES) $(server_SOURCES)
|
||||
qf_client_mgl_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES) $(mgl_SOURCES)
|
||||
qf_client_ggi_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES) $(ggi_SOURCES)
|
||||
qf_client_svga_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES) $(svga_SOURCES)
|
||||
qf_client_x11_SOURCES= $(common_SOURCES) $(client_SOURCES) $(soft_SOURCES) $(x11_SOURCES)
|
||||
qf_client_glx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES) $(glx_SOURCES)
|
||||
|
||||
LDADD = $(NET_LIBS)
|
||||
qf_client_ggi_LDADD= $(GGI_LIBS)
|
||||
qf_client_svga_LDADD= $(SVGA_LIBS)
|
||||
qf_client_x11_LDADD= $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB)
|
||||
qf_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
|
||||
qf_server_LDADD= $(NET_LIBS)
|
||||
qf_client_mgl_LDADD= $(MGL_LIBS) $(NET_LIBS)
|
||||
qf_client_ggi_LDADD= $(GGI_LIBS) $(NET_LIBS)
|
||||
qf_client_svga_LDADD= $(SVGA_LIBS) $(NET_LIBS)
|
||||
qf_client_x11_LDADD= $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS)
|
||||
qf_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(NET_LIBS)
|
||||
|
||||
EXTRA_DIST = makefile.winc makefile.wingl makefile.wins \
|
||||
qw_client.dsp qw_server.dsp
|
||||
|
|
Loading…
Reference in a new issue