From f62b1dd2d41a1670ead8f701742254db12637f0c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 18 Nov 2000 04:25:01 +0000 Subject: [PATCH] take care of PFNGLCOLORTABLEEXTPROC properly. I just hope the configure test works for those that DO have it. --- acconfig.h | 3 +++ configure.in | 12 +++++++++++- source/vid_common_gl.c | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/acconfig.h b/acconfig.h index 4911dbe..3db2abb 100644 --- a/acconfig.h +++ b/acconfig.h @@ -55,6 +55,9 @@ /* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */ #undef HAVE_GL_COLOR_INDEX8_EXT +/* Define this if you have PFNGLCOLORTABLEEXTPROC in GL/glext.h */ +#undef HAVE_PFNGLCOLORTABLEEXTPROC + /* Define this if you are using a version of Mesa with X mode change support */ #undef HAVE_XMESA diff --git a/configure.in b/configure.in index 61e91d0..c0daea8 100644 --- a/configure.in +++ b/configure.in @@ -419,7 +419,17 @@ if test "x$HAVE_GLX" != xno; then AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) ) - AC_CHECK_HEADERS(GL/glext.h) + AC_CHECK_HEADERS(GL/glext.h, HAVE_GL_GLEXT_H=yes) + if test "x$HAVE_GL_GLEXT_H" = xyes; then + AC_MSG_CHECKING(for PFNGLCOLORTABLEEXTPROC) + AC_TRY_COMPILE( + [#include ] + [#include ], + [PFNGLCOLORTABLEEXTPROC x;], + AC_DEFINE(HAVE_PFNGLCOLORTABLEEXTPROC) AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + fi fi CPPFLAGS="$save_CPPFLAGS" diff --git a/source/vid_common_gl.c b/source/vid_common_gl.c index bda53eb..333cbe8 100644 --- a/source/vid_common_gl.c +++ b/source/vid_common_gl.c @@ -326,7 +326,7 @@ void } #endif -#ifdef HAVE_GL_GLEXT_H +#ifdef HAVE_PFNGLCOLORTABLEEXTPROC //#ifndef PFNGLCOLORTABLEEXTPROC //typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); @@ -390,7 +390,7 @@ VID_Init8bitPalette (void) #ifdef HAVE_TDFXGL 3dfx_Init8bitPalette(); #else -# ifdef HAVE_GL_GLEXT_H +# ifdef HAVE_PFNGLCOLORTABLEEXTPROC Shared_Init8bitPalette(); # endif #endif