Configure.in: minor changes.

include/* -- #defines so that you can #include them more than once.
This commit is contained in:
Jeff Teunissen 2000-05-17 18:28:13 +00:00
parent 686c0b5178
commit 7647fdd484
26 changed files with 109 additions and 62 deletions

View file

@ -8,10 +8,12 @@ AC_CANONICAL_SYSTEM
dnl This is the only place where the package version appears
AM_INIT_AUTOMAKE(quakeforge, 0.1.99pre0)
dnl Define the proper name for package
AC_DEFINE(PROGRAM, "QuakeForge")
QW_VERSION=2.40
QSG_VERSION=1.0
AC_DEFINE_UNQUOTED(PROGRAM, "QuakeForge")
AC_DEFINE_UNQUOTED(QW_VERSION, "$QW_VERSION")
AC_DEFINE_UNQUOTED(QSG_VERSION, "$QSG_VERSION")
AC_SUBST(QW_VERSION)
@ -263,7 +265,6 @@ if test "x$OPENGL_LIBS" != xno; then
dnl Make sure -lGL or -lMesaGL works
if test "x$HAVE_OPENGL" = xyes; then
AC_CHECK_LIB(GL, glColor4f,
OPENGL_LIBS="$OPENGL_LIBS -lGL"
HAVE_OPENGL=yes
OPENGL_NAME=GL
if test "x$have_dynload" != "xyes"; then
@ -291,6 +292,7 @@ if test "x$OPENGL_LIBS" != xno; then
if test "x$HAVE_OPENGL" != xyes; then
OPENGL_CFLAGS="" OPENGL_LIBS=""
else
OPENGL_LIBS="$OPENGL_LIBS -l$OPENGL_NAME"
if test "x$HAVE_XMESA" = xyes; then
AC_DEFINE(HAVE_XMESA)
fi
@ -376,7 +378,7 @@ if test "x$RELEASE" = xyes; then
AC_MSG_CHECKING(for special release compiler settings)
case "${target}" in
i?86-*-*)
MORE_CFLAGS="-malign-loops=2 -malign-jumps=2 -malign-functions=2"
MORE_CFLAGS="-malign-loops=4 -malign-jumps=4 -malign-functions=4"
;;
*)
MORE_CFLAGS=""

View file

@ -20,11 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// defs common to client and server
#define QSG_STANDARD "1"
#define QW_VERSION "2.40"
#define QF_VERSION "newtree test build"
#if USE_INTEL_ASM
#define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported
#else

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _BSPFILE_H
#define _BSPFILE_H
// upper design bounds
@ -269,3 +271,4 @@ void WriteBSPFile (char *filename);
void PrintBSPFileSizes (void);
#endif
#endif // _BSPFILE_H

View file

@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// client.h
#ifndef _CLIENT_H
#define _CLIENT_H
typedef struct
{
@ -558,3 +560,5 @@ void Skin_NextDownload (void);
#define RSSHOT_WIDTH 320
#define RSSHOT_HEIGHT 200
#endif // _CLIENT_H

View file

@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// cmd.h -- Command buffer and command execution
#ifndef _CMD_H
#define _CMD_H
//===========================================================================
/*
@ -106,3 +109,5 @@ void Cmd_ForwardToServer (void);
// so when they are typed in at the console, they will need to be forwarded.
void Cmd_StuffCmds_f (void);
#endif // _CMD_H

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// comndef.h -- general definitions
#ifndef _COMMON_H
#define _COMMON_H
typedef unsigned char byte;
#define _DEF_BYTE_
@ -226,3 +228,4 @@ byte COM_BlockSequenceCheckByte (byte *base, int length, int sequence, unsigned
byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence);
int build_number( void );
#endif // _COMMON_H

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _CONSOLE_H
#define _CONSOLE_H
//
// console
//
@ -58,3 +60,4 @@ void Con_ToggleConsole_f (void);
void Con_NotifyBox (char *text); // during startup for sound / cd warnings
#endif // _CONSOLE_H

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _DRAW_H
#define _DRAW_H
// draw.h -- these are the only functions outside the refresh allowed
// to touch the vid buffer
@ -41,3 +43,5 @@ void Draw_Alt_String (int x, int y, char *str);
qpic_t *Draw_PicFromWad (char *name);
qpic_t *Draw_CachePic (char *path);
void Draw_Crosshair(void);
#endif // _DRAW_H

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KEYS_H
#define _KEYS_H
//
// these are the key numbers that should be passed to Key_Event
//
@ -167,3 +169,4 @@ void Key_WriteBindings (FILE *f);
void Key_SetBinding (int keynum, char *binding);
void Key_ClearStates (void);
#endif // _KEYS_H

View file

@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// mathlib.h
#ifndef _MATHLIB_H
#define _MATHLIB_H
typedef float vec_t;
typedef vec_t vec3_t[3];
typedef vec_t vec5_t[5];
@ -89,3 +92,5 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
) \
: \
BoxOnPlaneSide( (emins), (emaxs), (p)))
#endif // _MATHLIB_H

View file

@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// net.h -- quake's interface to the networking layer
#ifndef _NET_H
#define _NET_H
#define PORT_ANY -1
typedef struct
@ -112,3 +115,4 @@ void Netchan_Setup (netchan_t *chan, netadr_t adr, int qport);
qboolean Netchan_CanPacket (netchan_t *chan);
qboolean Netchan_CanReliable (netchan_t *chan);
#endif // _NET_H

View file

@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// protocol.h -- communications protocols
#ifndef _PROTOCOL_H
#define _PROTOCOL_H
#define PROTOCOL_VERSION 28
#define QW_CHECK_HASH 0x5157
@ -280,3 +283,4 @@ typedef struct usercmd_s
byte impulse;
} usercmd_t;
#endif // _PROTOCOL_H

View file

@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// refresh.h -- public interface to refresh functions
#ifndef _RENDER_H
#define _RENDER_H
#define TOP_RANGE 16 // soldier uniform colors
#define BOTTOM_RANGE 96
@ -151,3 +154,4 @@ void D_DeleteSurfaceCache (void);
void D_InitCaches (void *buffer, int size);
void R_SetVrect (vrect_t *pvrect, vrect_t *pvrectin, int lineadj);
#endif // _RENDER_H

View file

@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// vid.h -- video driver defs
#ifndef _VID_H
#define _VID_H
#define VID_CBITS 6
#define VID_GRADES (1 << VID_CBITS)
@ -88,3 +91,5 @@ void VID_LockBuffer (void);
void VID_UnlockBuffer (void);
qboolean VID_Is8bit(void);
#endif // _VID_H

View file

@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// wad.h
#ifndef _WAD_H
#define _WAD_H
//===============
// TYPES
@ -73,3 +75,5 @@ void *W_GetLumpName (char *name);
void *W_GetLumpNum (int num);
void SwapPic (qpic_t *pic);
#endif // _WAD_H

View file

@ -17,6 +17,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _ZONE_H
#define _ZONE_H
/*
memory allocation
@ -127,5 +129,4 @@ void *Cache_Alloc (cache_user_t *c, int size, char *name);
void Cache_Report (void);
#endif // _ZONE_H

View file

@ -245,7 +245,7 @@ CL_Version_f
*/
void CL_Version_f (void)
{
Con_Printf ("QuakeForge Version %s\n", QF_VERSION);
Con_Printf ("%s Version %s\n", PROGRAM, VERSION);
Con_Printf ("Binary: "__TIME__" "__DATE__"\n");
}
@ -494,7 +494,7 @@ void CL_Disconnect (void)
connect_time = -1;
#ifdef _WIN32
SetWindowText (mainwindow, "QuakeForge: disconnected");
SetWindowText (mainwindow, PROGRAM ": disconnected");
#endif
// stop sounds (especially looping!)
@ -654,7 +654,7 @@ void CL_FullServerinfo_f (void)
strcpy (cl.serverinfo, Cmd_Argv(1));
Con_DPrintf("cl.serverinfo: '%s'\n", cl.serverinfo);
if ((p = Info_ValueForKey(cl.serverinfo, "*version")) && *p)
if ((p = Info_ValueForKey(cl.serverinfo, "*qf_version")) && *p)
{
if (server_version == NULL)
Con_Printf("QuakeForge Version %s Server\n", p);
@ -666,10 +666,10 @@ void CL_FullServerinfo_f (void)
server_version = strdup(p);
}
if ((p = Info_ValueForKey(cl.serverinfo, "*qsg_standard")) && *p)
if ((p = Info_ValueForKey(cl.serverinfo, "*qsg_version")) && *p)
{
if ((cl.stdver = atoi (p)))
Con_Printf("QSG standards version %i\n", cl.stdver);
Con_Printf("QSG Standard version %i\n", cl.stdver);
else
Con_Printf("Invalid standards version: %s", p);
}
@ -962,8 +962,8 @@ void CL_ConnectionlessPacket (void)
Con_Printf("===========================\n");
Con_Printf("Invalid localid on command packet received from local host. "
"\n|%s| != |%s|\n"
"You may need to reload your server browser and QuakeForge.\n",
s, localid->string);
"You may need to reload your server browser and %s.\n",
s, localid->string, PROGRAM);
Con_Printf("===========================\n");
Cvar_Set("localid", "");
return;
@ -1709,9 +1709,9 @@ void Host_Init (quakeparms_t *parms)
host_initialized = true;
Con_Printf ("\nClient Version %s (Build %04d)\n\n", QF_VERSION, build_number());
Con_Printf ("\nClient Version %s (Build %04d)\n\n", VERSION, build_number());
Con_Printf ("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> QuakeForge Initialized <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
Con_Printf ("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %s Initialized <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n", PROGRAM);
}

View file

@ -167,7 +167,7 @@ void CL_PredictMove (void)
char text[1024];
cls.state = ca_active;
snprintf (text, sizeof(text), "QuakeForge: %s", cls.servername);
snprintf (text, sizeof(text), "%s: %s", PROGRAM, cls.servername);
#ifdef _WIN32
SetWindowText (mainwindow, text);
#endif

View file

@ -221,7 +221,7 @@ void Sys_Init (void)
if ((vinfo.dwMajorVersion < 4) ||
(vinfo.dwPlatformId == VER_PLATFORM_WIN32s))
{
Sys_Error ("This version of QuakeForge requires at least Win95 or NT 4.0");
Sys_Error ("This version of " PROGRAM " requires at least Win95 or NT 4.0");
}
if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)

View file

@ -135,7 +135,7 @@ void Draw_Init (void)
/* Cvar_RegisterVariable (&cl_verstring);
CVAR_FIXME */
cl_verstring = Cvar_Get("cl_verstring", "QuakeForge " QF_VERSION, CVAR_NONE, "None");
cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, "None");
}

View file

@ -437,7 +437,7 @@ void Draw_Init (void)
/* Cvar_RegisterVariable (&cl_verstring);
CVAR_FIXME */
cl_verstring = Cvar_Get("cl_verstring", "QuakeForge " QF_VERSION, CVAR_NONE, "None");
cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, "None");
// 3dfx can only handle 256 wide textures
if (!Q_strncasecmp ((char *)gl_renderer, "3dfx",4) ||

View file

@ -1581,9 +1581,9 @@ void SV_InitLocal (void)
MAX_SERVERINFO_STRING);
// Brand server as QF, with appropriate QSG standards version --KB
Info_SetValueForStarKey (svs.info, "*qf_version", QF_VERSION,
Info_SetValueForStarKey (svs.info, "*qf_version", VERSION,
MAX_SERVERINFO_STRING);
Info_SetValueForStarKey (svs.info, "*qsg_standard", QSG_STANDARD,
Info_SetValueForStarKey (svs.info, "*qsg_version", QSG_VERSION,
MAX_SERVERINFO_STRING);
// init fraglog stuff
@ -1867,7 +1867,7 @@ void SV_Init (quakeparms_t *parms)
Con_Printf ("\nServer Version %s (Build %04d)\n\n", QW_VERSION, build_number());
Con_Printf ("======== QuakeForge Initialized ========\n");
Con_Printf ("======== %s Initialized ========\n", PROGRAM);
// process command line arguments
Cmd_StuffCmds_f ();

View file

@ -191,7 +191,7 @@ void Sys_Init (void)
if ((vinfo.dwMajorVersion < 4) ||
(vinfo.dwPlatformId == VER_PLATFORM_WIN32s))
{
Sys_Error ("QuakeForge requires at least Win95 or NT 4.0");
Sys_Error (PROGRAM " requires at least Win95 or NT 4.0");
}
if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)

View file

@ -1,7 +1,7 @@
/*
vid_glx.c
(description)
OpenGL GLX video driver
Copyright (C) 1996-1997 Id Software, Inc.
@ -38,6 +38,8 @@
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include <quakedef.h>
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
@ -113,7 +115,7 @@ int texture_mode = GL_LINEAR;
int texture_extension_number = 1;
float gldepthmin, gldepthmax;
float gldepthmin, gldepthmax;
/* cvar_t gl_ztrick = {"gl_ztrick","1"};
CVAR_FIXME */
@ -125,7 +127,6 @@ const char *gl_version;
const char *gl_extensions;
qboolean is8bit = false;
qboolean isPermedia = false;
qboolean gl_mtexable = false;
/*-----------------------------------------------------------------------*/
@ -484,7 +485,7 @@ void VID_SetPalette (unsigned char *palette)
//
// 8 8 8 encoding
//
Con_DPrintf("Converting 8to24\n");
// Con_DPrintf("Converting 8to24\n");
pal = palette;
table = d_8to24table;
@ -573,6 +574,11 @@ void GL_Init (void)
glAlphaFunc(GL_GREATER, 0.666);
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
/* glShadeMode(GL_SMOOTH) should look better then GL_FLAT but
I don't know if it looks any better, sure is slower
glShadeModel (GL_SMOOTH);
*/
glShadeModel (GL_FLAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@ -616,7 +622,7 @@ qboolean VID_Is8bit(void)
return is8bit;
}
#ifdef GLX_VERSION_1_2
#ifdef GLX_EXT_SHARED
void VID_Init8bitPalette()
{
// Check for 8bit Extensions and initialize them.
@ -642,6 +648,12 @@ void VID_Init8bitPalette()
}
#else
void VID_Init8bitPalette(void)
{
}
#if 0
extern void gl3DfxSetPaletteEXT(GLuint *pal);
void VID_Init8bitPalette(void)
@ -669,10 +681,7 @@ void VID_Init8bitPalette(void)
}
#endif
void VID_InitCvars ()
{
m_filter = Cvar_Get("m_filter", "0", CVAR_NONE, "None");
}
#endif
void VID_Init(unsigned char *palette)
{
@ -694,16 +703,9 @@ void VID_Init(unsigned char *palette)
Window root;
XVisualInfo *visinfo;
// S_Init();
/* Cvar_RegisterVariable (&vid_mode);
CVAR_FIXME */
vid_mode = Cvar_Get("vid_mode", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&gl_ztrick);
CVAR_FIXME */
gl_ztrick = Cvar_Get("gl_ztrick", "1", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&_windowed_mouse);
CVAR_FIXME */
gl_ztrick = Cvar_Get("gl_ztrick", "0", CVAR_NONE, "None");
_windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
vid.maxwarpwidth = WARP_WIDTH;
@ -711,9 +713,9 @@ void VID_Init(unsigned char *palette)
vid.colormap = host_colormap;
vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
// interpret command-line params
// interpret command-line params
// set vid parameters
// set vid parameters
if ((i = COM_CheckParm("-width")) != 0)
width = atoi(com_argv[i+1]);
if ((i = COM_CheckParm("-height")) != 0)
@ -722,20 +724,17 @@ void VID_Init(unsigned char *palette)
if ((i = COM_CheckParm("-conwidth")) != 0)
vid.conwidth = Q_atoi(com_argv[i+1]);
else
vid.conwidth = 640;
vid.conwidth = width;
vid.conwidth &= 0xfff8; // make it a multiple of eight
if (vid.conwidth < 320)
vid.conwidth = 320;
vid.conwidth = max(vid.conwidth, 320);
// pick a conheight that matches with correct aspect
vid.conheight = vid.conwidth*3 / 4;
if ((i = COM_CheckParm("-conheight")) != 0)
vid.conheight = Q_atoi(com_argv[i+1]);
if (vid.conheight < 200)
vid.conheight = 200;
vid.conheight = max(Q_atoi(com_argv[i+1]), 200);
if (!(x_disp = XOpenDisplay(NULL))) {
fprintf(stderr, "Error couldn't open the X display\n");
@ -777,12 +776,8 @@ void VID_Init(unsigned char *palette)
scr_width = width;
scr_height = height;
if (vid.conheight > height)
vid.conheight = height;
if (vid.conwidth > width)
vid.conwidth = width;
vid.width = vid.conwidth;
vid.height = vid.conheight;
vid.height = vid.conheight = min(height, vid.conheight);
vid.width = vid.conwidth = min(width, vid.conwidth);
vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
vid.numpages = 2;
@ -884,6 +879,10 @@ void IN_Move (usercmd_t *cmd)
IN_MouseMove(cmd);
}
void VID_InitCvars ()
{
m_filter = Cvar_Get("m_filter", "0", CVAR_NONE, "None");
}
void VID_UnlockBuffer() {}
void VID_LockBuffer() {}

View file

@ -1,7 +1,7 @@
/*
vid_x11.c
(description)
General X11 video driver
Copyright (C) 1996-1997 Id Software, Inc.
@ -25,7 +25,6 @@
$Id$
*/
// vid_x.c -- general x video driver
#define _BSD

View file

@ -423,9 +423,9 @@ void *Hunk_AllocName (int size, char *name)
if (hunk_size - hunk_low_used - hunk_high_used < size)
// Sys_Error ("Hunk_Alloc: failed on %i bytes",size);
#ifdef _WIN32
Sys_Error ("Not enough RAM allocated. Try starting using \"-heapsize 16000\" on the QuakeForge command line.");
Sys_Error ("Not enough RAM allocated. Try starting using \"-heapsize 16000\" on the " PROGRAM " command line.");
#else
Sys_Error ("Not enough RAM allocated. Try starting using \"-mem 16\" on the QuakeForge command line.");
Sys_Error ("Not enough RAM allocated. Try starting using \"-mem 16\" on the " PROGRAM " command line.");
#endif
h = (hunk_t *)(hunk_base + hunk_low_used);