gl_driver default is now configurable

This commit is contained in:
Bill Currie 2002-02-22 08:55:24 +00:00
parent 3e4422a9f3
commit 29706477d4
3 changed files with 24 additions and 10 deletions

View File

@ -34,6 +34,9 @@
/* Define this to the unshared game directory root */
#undef FS_USERPATH
/* Define this to the default GL dynamic lib */
#undef GL_DRIVER
/* Define this to use experimental code */
#undef _EXPERIMENTAL_

View File

@ -1138,6 +1138,20 @@ AC_DEFINE_UNQUOTED(FS_PLUGINPATH, "$expanded_plugindir")
AC_SUBST(plugindir)
AC_SUBST(PLUGINDIR)
AC_ARG_WITH(gl-driver,
[ --with-gl-driver default gl dynamic lib name],
gl_driver=%withval,
gl_driver=auto
)
if test "$gl_driver" = auto; then
if test "$SYSTYPE" = WIN32; then
gl_driver="OPENGL32.DLL"
else
gl_driver="libGL.so.1"
fi
fi
AC_DEFINE_UNQUOTED(GL_DRIVER, "$gl_driver")
dnl CFLAGS for release and devel versions
AC_ARG_ENABLE(debug,
[ --disable-debug compile without debugging],
@ -1901,11 +1915,12 @@ AC_MSG_RESULT([
Compiler flags : $CFLAGS
qfcc cpp invocation: $CPP_NAME
Shared game data directory: $sharepath
Shared game data directory : $sharepath
Per-user game data directory: $userpath
Plugin load directory: $expanded_plugindir
Global configuration file: $globalconf
User configuration file: $userconf
Plugin load directory : $expanded_plugindir
Global configuration file : $globalconf
User configuration file : $userconf
OpenGL dynamic lib : $gl_driver
])
if test -d $srcdir/CVS; then

View File

@ -190,12 +190,8 @@ R_Init_Cvars (void)
gl_lerp_anim = Cvar_Get ("gl_lerp_anim", "1", CVAR_ARCHIVE, NULL,
"Toggles model animation interpolation");
#ifdef _WIN32
gl_driver = Cvar_Get ("gl_driver", "OPENGL32.DLL", CVAR_ROM, NULL,
#else
gl_driver = Cvar_Get ("gl_driver", "libGL.so.1", CVAR_ROM, NULL,
#endif
"The OpenGL library to use. (path optional)");
gl_driver = Cvar_Get ("gl_driver", GL_DRIVER, CVAR_ROM, NULL,
"The OpenGL library to use. (path optional)");
gl_lightmap_align = Cvar_Get ("gl_lightmap_align", "1", CVAR_NONE, NULL,
"Workaround for nvidia slow path. Set to 4 "
"or 16 if you have an nvidia 3d "