take care of PFNGLCOLORTABLEEXTPROC properly. I just hope the configure test

works for those that DO have it.
This commit is contained in:
Bill Currie 2000-11-18 04:25:01 +00:00
parent b798113da8
commit f62b1dd2d4
3 changed files with 16 additions and 3 deletions

View file

@ -55,6 +55,9 @@
/* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */ /* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */
#undef HAVE_GL_COLOR_INDEX8_EXT #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 */ /* Define this if you are using a version of Mesa with X mode change support */
#undef HAVE_XMESA #undef HAVE_XMESA

View file

@ -419,7 +419,17 @@ if test "x$HAVE_GLX" != xno; then
AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT) AC_MSG_RESULT(yes), AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no) 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 <GL/gl.h>]
[#include <GL/glext.h>],
[PFNGLCOLORTABLEEXTPROC x;],
AC_DEFINE(HAVE_PFNGLCOLORTABLEEXTPROC) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
fi
fi fi
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"

View file

@ -326,7 +326,7 @@ void
} }
#endif #endif
#ifdef HAVE_GL_GLEXT_H #ifdef HAVE_PFNGLCOLORTABLEEXTPROC
//#ifndef PFNGLCOLORTABLEEXTPROC //#ifndef PFNGLCOLORTABLEEXTPROC
//typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); //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 #ifdef HAVE_TDFXGL
3dfx_Init8bitPalette(); 3dfx_Init8bitPalette();
#else #else
# ifdef HAVE_GL_GLEXT_H # ifdef HAVE_PFNGLCOLORTABLEEXTPROC
Shared_Init8bitPalette(); Shared_Init8bitPalette();
# endif # endif
#endif #endif