autoconfiscate fs_basepath

--enable-basepath causes qf to look in ${prefix}/gqmes/quakeforge for the files
--with-basepath=path gives you more control
This commit is contained in:
Bill Currie 2000-04-25 12:31:03 +00:00
parent 0e44ae7475
commit e605302b38
3 changed files with 25 additions and 1 deletions

View File

@ -9,6 +9,9 @@
/* Define if you want .qz support */
#undef GENERATIONS
/* Define this to the default location of the game directories */
#undef FS_BASEPATH
/* Define this to the subdirectory name of the default game */
#undef GAMENAME

View File

@ -920,7 +920,7 @@ COM_InitFilesystem ( void )
int i;
#endif
fs_basepath = Cvar_Get ("fs_basepath", ".", CVAR_ROM,
fs_basepath = Cvar_Get ("fs_basepath", FS_BASEPATH, CVAR_ROM,
"the location of your game directories");
fs_sharepath = Cvar_Get ("fs_sharepath", fs_basepath->string,
CVAR_ROM, "read-only game directories");

View File

@ -123,6 +123,27 @@ else
AC_DEFINE(GAMENAME, "id1")
fi
AC_ARG_ENABLE(basepath,
[ --enable-basepath use \${prefix}/games/quakeforge instead of . for game
data],
BASEPATH=$enable_basepath
)
AC_ARG_WITH(basepath,
[ --with-basepath=DIR use basepath instead of . or
\${prefix}/games/quakeforge for game data],
BASEPATH=$withval)
if test "x$BASEPATH" = xyes; then
if test "x$prefix" = xNONE; then
AC_DEFINE_UNQUOTED(FS_BASEPATH, "${ac_default_prefix}/games/quakeforge")
else
AC_DEFINE_UNQUOTED(FS_BASEPATH, "${prefix}/games/quakeforge")
fi
elif test "x$BASEPATH" = xno -o "x$BASEPATH" = x; then
AC_DEFINE(FS_BASEPATH, ".")
else
AC_DEFINE_UNQUOTED(FS_BASEPATH, "$BASEPATH")
fi
GENERATIONS=no
AC_ARG_ENABLE(generations,
[ --enable-generations enable .qz support. Requires zlib)],