mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-25 13:21:04 +00:00
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:
parent
b7b9937dcb
commit
5ce33303ac
4 changed files with 15 additions and 30 deletions
|
@ -12,7 +12,7 @@ CC := @CC@
|
||||||
|
|
||||||
LDFLAGS += @LDFLAGS@ @LIBS@
|
LDFLAGS += @LDFLAGS@ @LIBS@
|
||||||
INCLUDES += -I$(srcdir) -I$(COMMON_DIR) @OGL_INCLUDES@ -I$(top_builddir)/common
|
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 \
|
MAKE_SURE_DIR = if test -d "$$DIR"; then \
|
||||||
true; \
|
true; \
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
/* Define if you want .qz support */
|
/* Define if you want .qz support */
|
||||||
#undef GENERATIONS
|
#undef GENERATIONS
|
||||||
|
|
||||||
/* Define this to the default global configuration file */
|
|
||||||
#undef GLOBAL_CFG_FILE
|
|
||||||
|
|
||||||
/* Define this to the default location of the game directories */
|
/* Define this to the default location of the game directories */
|
||||||
#undef FS_BASEPATH
|
#undef FS_BASEPATH
|
||||||
|
|
||||||
|
|
|
@ -555,9 +555,9 @@ Host_Init (quakeparms_t *parms)
|
||||||
Cbuf_Execute_Sets ();
|
Cbuf_Execute_Sets ();
|
||||||
|
|
||||||
// execute the global configuration file if it exists
|
// execute the global configuration file if it exists
|
||||||
// would have been nice if Cmd_Exec_f could have been used, but it only
|
// would have been nice if Cmd_Exec_f could have been used, but it
|
||||||
// reads from within the quake file system, and changing that is probably
|
// only reads from within the quake file system, and changing that is
|
||||||
// Not A Good Thing (tm).
|
// probably Not A Good Thing (tm).
|
||||||
global_cfg_file = Cvar_Get("global_cfg_file", GLOBAL_CFG_FILE,
|
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) {
|
if ((globalcfg = Qopen (global_cfg_file->string, "r")) != NULL) {
|
||||||
|
|
32
configure.in
32
configure.in
|
@ -123,28 +123,16 @@ else
|
||||||
AC_DEFINE(GAMENAME, "id1")
|
AC_DEFINE(GAMENAME, "id1")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(global-cfg-file,
|
AC_ARG_WITH(global-cfg,
|
||||||
[ --with-global-cfg-file=FILE
|
[ --with-global-cfg=FILE If set will change the name and location of the
|
||||||
define the default global config file. defaults to
|
global config file used by QuakeForge. Defaults to
|
||||||
/etc/quakeforge.conf or
|
\${sysconfdir}/quakeforge.con],
|
||||||
/usr/local/etc/quakeforge.conf, depending on
|
globalconf="$withval", globalconf="auto")
|
||||||
\${prefix}.],
|
if test "x$globalconf" = "xauto" || test "x$globalconf" = "xyes" || \
|
||||||
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "$withval"),
|
test "x$globalconf" = "xno"; then dnl yes/no sanity checks
|
||||||
if test "x$prefix" = xNONE; then
|
globalconf="$sysconfdir/quakeforge.conf"
|
||||||
if test "${ac_default_prefix}" = /usr; then
|
fi
|
||||||
AC_DEFINE_UNQUOTED(GLOBAL_CFG_FILE, "/etc/quakeforge.conf")
|
AC_SUBST(globalconf)
|
||||||
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_ENABLE(basepath,
|
AC_ARG_ENABLE(basepath,
|
||||||
[ --enable-basepath use \${prefix}/games/quakeforge instead of . for game
|
[ --enable-basepath use \${prefix}/games/quakeforge instead of . for game
|
||||||
|
|
Loading…
Reference in a new issue