Solaris 10/gl compile problems

Tring to compile libsdl-1.2.11 on Solaris 10 on a 64-bit sparc system. I was able
get get rid of some of the conflicts for the defines, but was unable to figure
out a way to get solaris compiling with those conflicting typedefs.

Ideas?

Thanks,

Ben

gcc -m64 -R/usr/sfw/lib/64 -g -O2 -I./include -D_GNU_SOURCE=1 -I/usr/openwin/include -DXTHREADS -D_REENTRANT -c ./src/events/SDL_events.c -fPIC -DPIC -o build/.libs/SDL_events.o
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:414:1: warning: “GL_FOG_COORD_SRC” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1135:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:415:1: warning: “GL_FOG_COORD” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1137:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:416:1: warning: “GL_CURRENT_FOG_COORD” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1141:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:417:1: warning: “GL_FOG_COORD_ARRAY_TYPE” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1143:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:418:1: warning: “GL_FOG_COORD_ARRAY_STRIDE” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1145:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:419:1: warning: “GL_FOG_COORD_ARRAY_POINTER” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1147:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:420:1: warning: “GL_FOG_COORD_ARRAY” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1149:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:422:1: warning: “GL_SRC0_RGB” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1076:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:423:1: warning: “GL_SRC1_RGB” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1078:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:424:1: warning: “GL_SRC2_RGB” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1080:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:425:1: warning: “GL_SRC0_ALPHA” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1082:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:426:1: warning: “GL_SRC1_ALPHA” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1084:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:427:1: warning: “GL_SRC2_ALPHA” redefined
In file included from ./include/SDL_opengl.h:44,
from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
/usr/openwin/include/GL/gl.h:1086:1: warning: this is the location of the previous definition
In file included from ./src/events/…/video/SDL_sysvideo.h:37,
from ./src/events/SDL_sysevents.h:24,
from ./src/events/SDL_events.c:28:
./include/SDL_opengl.h:3113: error: redefinition of typedef ‘GLintptrARB’
/usr/openwin/include/GL/gl.h:51: error: previous declaration of ‘GLintptrARB’ was here
./include/SDL_opengl.h:3114: error: redefinition of typedef ‘GLsizeiptrARB’
/usr/openwin/include/GL/gl.h:52: error: previous declaration of ‘GLsizeiptrARB’ was here
./include/SDL_opengl.h:3119: error: conflicting types for ‘GLcharARB’
/usr/openwin/include/GL/gl.h:48: error: previous declaration of ‘GLcharARB’ was here
./include/SDL_opengl.h:3120: error: conflicting types for ‘GLhandleARB’
/usr/openwin/include/GL/gl.h:47: error: previous declaration of ‘GLhandleARB’ was here
gmake: *** [build/SDL_events.lo] Error 1