From e605302b38863eb167008c4c178bbbc1c7148055 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 25 Apr 2000 12:31:03 +0000 Subject: [PATCH] autoconfiscate fs_basepath --enable-basepath causes qf to look in ${prefix}/gqmes/quakeforge for the files --with-basepath=path gives you more control --- acconfig.h | 3 +++ common/quakefs.c | 2 +- configure.in | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/acconfig.h b/acconfig.h index 62d8160..a2ef474 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 diff --git a/common/quakefs.c b/common/quakefs.c index d4ebafa..389baff 100644 --- a/common/quakefs.c +++ b/common/quakefs.c @@ -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"); diff --git a/configure.in b/configure.in index e8f5bf1..3743d29 100644 --- a/configure.in +++ b/configure.in @@ -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)],