slight cleanup of taniwha's global config stuff.. YES another -D on the

cmdline to gcc.  *sigh*  This is the "proper"(?) way to do what we're
doing.  Shouldn't affect anything for win32.
This commit is contained in:
Joseph Carter 2000-04-26 16:12:03 +00:00
parent b7b9937dcb
commit 5ce33303ac
4 changed files with 15 additions and 30 deletions

View file

@ -12,7 +12,7 @@ CC := @CC@
LDFLAGS += @LDFLAGS@ @LIBS@
INCLUDES += -I$(srcdir) -I$(COMMON_DIR) @OGL_INCLUDES@ -I$(top_builddir)/common
CFLAGS += @CFLAGS@ $(INCLUDES)
CFLAGS += @CFLAGS@ -DGLOBAL_CFG_FILE=\"@globalconf@\" $(INCLUDES)
MAKE_SURE_DIR = if test -d "$$DIR"; then \
true; \

View file

@ -9,9 +9,6 @@
/* Define if you want .qz support */
#undef GENERATIONS
/* Define this to the default global configuration file */
#undef GLOBAL_CFG_FILE
/* Define this to the default location of the game directories */
#undef FS_BASEPATH

View file

@ -555,11 +555,11 @@ Host_Init (quakeparms_t *parms)
Cbuf_Execute_Sets ();
// execute the global configuration file if it exists
// would have been nice if Cmd_Exec_f could have been used, but it only
// reads from within the quake file system, and changing that is probably
// Not A Good Thing (tm).
// would have been nice if Cmd_Exec_f could have been used, but it
// only reads from within the quake file system, and changing that is
// probably Not A Good Thing (tm).
global_cfg_file = Cvar_Get("global_cfg_file", GLOBAL_CFG_FILE,
CVAR_ROM, "global configuration file");
CVAR_ROM, "global configuration file");
if ((globalcfg = Qopen (global_cfg_file->string, "r")) != NULL) {
char *f;
int mark;

View file

@ -123,28 +123,16 @@ else
AC_DEFINE(GAMENAME, "id1")
fi
AC_ARG_WITH(global-cfg-file,
[ --with-global-cfg-file=FILE
define the default global config file. defaults to
/etc/quakeforge.conf or
/usr/local/etc/quakeforge.conf, depending on
\${prefix}.],
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "$withval"),
if test "x$prefix" = xNONE; then
if test "${ac_default_prefix}" = /usr; then
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "/etc/quakeforge.conf")
else
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE,
"${ac_default_prefix}/etc/quakeforge.conf")
fi
else
if test "${prefix}" = /usr; then
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "/etc/quakeforge.conf")
else
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "${prefix}/etc/quakeforge.conf")
fi
fi
)
AC_ARG_WITH(global-cfg,
[ --with-global-cfg=FILE If set will change the name and location of the
global config file used by QuakeForge. Defaults to
\${sysconfdir}/quakeforge.con],
globalconf="$withval", globalconf="auto")
if test "x$globalconf" = "xauto" || test "x$globalconf" = "xyes" || \
test "x$globalconf" = "xno"; then dnl yes/no sanity checks
globalconf="$sysconfdir/quakeforge.conf"
fi
AC_SUBST(globalconf)
AC_ARG_ENABLE(basepath,
[ --enable-basepath use \${prefix}/games/quakeforge instead of . for game