diff -Naur Mesa-7.0.2/include/GL/internal/dri_interface.h Mesa-7.0.2.fix/include/GL/internal/dri_interface.h
--- Mesa-7.0.2/include/GL/internal/dri_interface.h	2007-11-01 16:30:52.000000000 +0100
+++ Mesa-7.0.2.fix/include/GL/internal/dri_interface.h	2007-12-01 21:20:30.000000000 +0100
@@ -30,7 +30,7 @@
  * between a DRI driver and driver loader.  Currently, the most common driver
  * loader is the XFree86 libGL.so.  However, other loaders do exist, and in
  * the future the server-side libglx.a will also be a loader.
- * 
+ *
  * \author Kevin E. Martin <kevin@precisioninsight.com>
  * \author Ian Romanick <idr@us.ibm.com>
  */
@@ -113,7 +113,9 @@
  * XML document describing the configuration options supported by the
  * driver.
  */
-extern const char __driConfigOptions[];
+/* MW. previous declaration extern blocks using 2 drivers with different options
+ * because only one option list can be valid */
+static const char __driConfigOptions[];
 
 /*@}*/
 
@@ -121,7 +123,7 @@
 /**
  * Stored version of some component (i.e., server-side DRI module, kernel-side
  * DRM, etc.).
- * 
+ *
  * \todo
  * There are several data structures that explicitly store a major version,
  * minor version, and patch level.  These structures should be modified to
@@ -172,7 +174,7 @@
     /*@{*/
     /**
      * Determine if the specified window ID still exists.
-     * 
+     *
      * \note
      * Implementations may assume that the driver will only pass an ID into
      * this function that actually corresponds to a window.  On
@@ -229,7 +231,7 @@
 
     /**
      * Get the media stream counter (MSC) rate.
-     * 
+     *
      * Matching the definition in GLX_OML_sync_control, this function returns
      * the rate of the "media stream counter".  In practical terms, this is
      * the frame refresh rate of the display.
@@ -259,11 +261,11 @@
 			 int front_buffer);
 };
 
-   
+
 /**
  * Framebuffer information record.  Used by libGL to communicate information
  * about the framebuffer to the driver's \c __driCreateNewScreen function.
- * 
+ *
  * In XFree86, most of this information is derrived from data returned by
  * calling \c XF86DRIGetDeviceInfo.
  *
@@ -322,13 +324,13 @@
     /**
      * Get the number of vertical refreshes since some point in time before
      * this function was first called (i.e., system start up).
-     * 
+     *
      * \since Internal API version 20030317.
      */
     int (*getMSC)( void *screenPrivate, int64_t *msc );
 
     /**
-     * Opaque pointer that points back to the containing 
+     * Opaque pointer that points back to the containing
      * \c __GLXscreenConfigs.  This data structure is shared with DRI drivers
      * but \c __GLXscreenConfigs is not. However, they are needed by some GLX
      * functions called by DRI drivers.
@@ -346,9 +348,9 @@
     void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size,
 			    GLfloat readfreq, GLfloat writefreq,
 			    GLfloat priority);
-   
+
     void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer);
-   
+
     GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer);
     /*@}*/
 
@@ -461,7 +463,7 @@
      * the next time (MSC % divisor) is equal to remainder.  If divisor is
      * zero, the function will return as soon as MSC is greater than or equal
      * to target_msc.
-     * 
+     *
      * \since Internal API version 20030317.
      */
     int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv,
@@ -474,7 +476,7 @@
      * if that has already passed, waits until (MSC % divisor) is equal
      * to remainder.  If divisor is zero, the swap will happen as soon as
      * MSC is greater than or equal to target_msc.
-     * 
+     *
      * \since Internal API version 20030317.
      */
     int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate,
@@ -483,14 +485,14 @@
 
     /**
      * Enable or disable frame usage tracking.
-     * 
+     *
      * \since Internal API version 20030317.
      */
     int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable);
 
     /**
      * Retrieve frame usage information.
-     * 
+     *
      * \since Internal API version 20030317.
      */
     int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate,
diff -Naur Mesa-7.0.2/src/mesa/drivers/dri/mga/mga_xmesa.c Mesa-7.0.2.fix/src/mesa/drivers/dri/mga/mga_xmesa.c
--- Mesa-7.0.2/src/mesa/drivers/dri/mga/mga_xmesa.c	2007-11-01 16:30:52.000000000 +0100
+++ Mesa-7.0.2.fix/src/mesa/drivers/dri/mga/mga_xmesa.c	2007-12-01 21:20:30.000000000 +0100
@@ -87,7 +87,9 @@
  */
 #include "xmlpool.h"
 
-PUBLIC const char __driConfigOptions[] =
+/* MW. previous declaration PUBLIC blocks using 2 drivers with different options
+ * because only one option list can be valid */
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
@@ -138,7 +140,7 @@
     depth_bits_array[0] = 0;
     depth_bits_array[1] = depth_bits;
     depth_bits_array[2] = depth_bits;
-    
+
     /* Just like with the accumulation buffer, always provide some modes
      * with a stencil buffer.  It will be a sw fallback, but some apps won't
      * care about that.
@@ -301,12 +303,12 @@
    mgaScreen->textureSize[MGA_CARD_HEAP] = serverInfo->textureSize;
    mgaScreen->textureSize[MGA_AGP_HEAP] = serverInfo->agpTextureSize;
 
-   
+
    /* The texVirtual array stores the base addresses in the CPU's address
     * space of the texture memory pools.  The base address of the on-card
     * memory pool is calculated as an offset of the base of video memory.  The
     * AGP texture pool has to be mapped into the processes address space by
-    * the DRM. 
+    * the DRM.
     */
 
    mgaScreen->texVirtual[MGA_CARD_HEAP] = (char *)(mgaScreen->sPriv->pFB +
@@ -366,12 +368,12 @@
 extern const struct tnl_pipeline_stage _mga_render_stage;
 
 static const struct tnl_pipeline_stage *mga_pipeline[] = {
-   &_tnl_vertex_transform_stage, 
-   &_tnl_normal_transform_stage, 
-   &_tnl_lighting_stage,	
+   &_tnl_vertex_transform_stage,
+   &_tnl_normal_transform_stage,
+   &_tnl_lighting_stage,
    &_tnl_fog_coordinate_stage,
-   &_tnl_texgen_stage, 
-   &_tnl_texture_transform_stage, 
+   &_tnl_texgen_stage,
+   &_tnl_texture_transform_stage,
    &_tnl_vertex_program_stage,
 
 				/* REMOVE: point attenuation stage */
@@ -379,7 +381,7 @@
    &_mga_render_stage,		/* ADD: unclipped rastersetup-to-dma */
                                 /* Need new ioctl for wacceptseq */
 #endif
-   &_tnl_render_stage,		
+   &_tnl_render_stage,
    0,
 };
 
@@ -474,7 +476,7 @@
    /* Allocate the Mesa context */
    if (sharedContextPrivate)
       shareCtx = ((mgaContextPtr) sharedContextPrivate)->glCtx;
-   else 
+   else
       shareCtx = NULL;
    mmesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
                                        &functions, (void *) mmesa);
@@ -558,8 +560,8 @@
    mmesa->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24;
 
    switch (mesaVis->depthBits) {
-   case 16: 
-      mmesa->depth_scale = 1.0/(GLdouble)0xffff; 
+   case 16:
+      mmesa->depth_scale = 1.0/(GLdouble)0xffff;
       mmesa->depth_clear_mask = ~0;
       mmesa->ClearDepth = 0xffff;
       break;
@@ -582,7 +584,7 @@
    mmesa->haveHwStipple = GL_FALSE;
    mmesa->RenderIndex = -1;		/* impossible value */
    mmesa->dirty = ~0;
-   mmesa->vertex_format = 0;   
+   mmesa->vertex_format = 0;
    mmesa->CurrentTexObj[0] = 0;
    mmesa->CurrentTexObj[1] = 0;
    mmesa->tmu_source[0] = 0;
@@ -590,13 +592,13 @@
 
    mmesa->texAge[0] = 0;
    mmesa->texAge[1] = 0;
-   
+
    /* Initialize the software rasterizer and helper modules.
     */
    _swrast_CreateContext( ctx );
    _vbo_CreateContext( ctx );
    _tnl_CreateContext( ctx );
-   
+
    _swsetup_CreateContext( ctx );
 
    /* Install the customized pipeline:
@@ -625,12 +627,12 @@
    if ( driQueryOptionb( &mmesa->optionCache, "arb_vertex_program" ) ) {
       driInitSingleExtension( ctx, ARB_vp_extension );
    }
-   
+
    if ( driQueryOptionb( &mmesa->optionCache, "nv_vertex_program" ) ) {
       driInitExtensions( ctx, NV_vp_extensions, GL_FALSE );
    }
 
-	
+
    /* XXX these should really go right after _mesa_init_driver_functions() */
    mgaDDInitStateFuncs( ctx );
    mgaDDInitSpanFuncs( ctx );
@@ -685,7 +687,7 @@
       /* free the Mesa context */
       mmesa->glCtx->DriverCtx = NULL;
       _mesa_destroy_context(mmesa->glCtx);
-       
+
       if ( release_texture_heaps ) {
          /* This share group is about to go away, free our private
           * texture object data.
@@ -724,11 +726,11 @@
       return GL_FALSE; /* not implemented */
    }
    else {
-      GLboolean swStencil = (mesaVis->stencilBits > 0 && 
+      GLboolean swStencil = (mesaVis->stencilBits > 0 &&
 			     mesaVis->depthBits != 24);
 
 #if 0
-      driDrawPriv->driverPrivate = (void *) 
+      driDrawPriv->driverPrivate = (void *)
          _mesa_create_framebuffer(mesaVis,
                                   GL_FALSE,  /* software depth buffer? */
                                   swStencil,
@@ -882,8 +884,8 @@
 	 driDrawableInitVBlank( driDrawPriv, mmesa->vblank_flags,
 				&mmesa->vbl_seq );
 	 mmesa->driDrawable = driDrawPriv;
-	 mmesa->dirty = ~0; 
-	 mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK); 
+	 mmesa->dirty = ~0;
+	 mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK);
       }
 
       mmesa->driReadable = driReadPriv;
@@ -958,8 +960,8 @@
  * This routine also fills in the linked list pointed to by \c driver_modes
  * with the \c __GLcontextModes that the driver can support for windows or
  * pbuffers.
- * 
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on 
+ *
+ * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
  *         failure.
  */
 PUBLIC
@@ -969,11 +971,11 @@
 			     const __DRIversion * dri_version,
 			     const __DRIversion * drm_version,
 			     const __DRIframebuffer * frame_buffer,
-			     drmAddress pSAREA, int fd, 
+			     drmAddress pSAREA, int fd,
 			     int internal_api_version,
 			     const __DRIinterfaceMethods * interface,
 			     __GLcontextModes ** driver_modes )
-			     
+
 {
    __DRIscreenPrivate *psp;
    static const __DRIversion ddx_expected = { 1, 2, 0 };
diff -Naur Mesa-7.0.2/src/mesa/drivers/dri/r200/radeon_screen.c Mesa-7.0.2.fix/src/mesa/drivers/dri/r200/radeon_screen.c
--- Mesa-7.0.2/src/mesa/drivers/dri/r200/radeon_screen.c	2007-11-08 15:36:29.000000000 +0100
+++ Mesa-7.0.2.fix/src/mesa/drivers/dri/r200/radeon_screen.c	2007-12-01 21:20:30.000000000 +0100
@@ -73,7 +73,10 @@
 #include "xmlpool.h"
 
 #if !RADEON_COMMON	/* R100 */
-PUBLIC const char __driConfigOptions[] =
+
+/* MW. previous declaration PUBLIC blocks using 2 drivers with different options
+ * because only one option list can be valid */
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -100,7 +103,7 @@
 
 #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
 
-PUBLIC const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -179,7 +182,7 @@
         DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
-const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
 	DRI_CONF_SECTION_PERFORMANCE
 		DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -244,10 +247,10 @@
 {
   int ret;
   drm_radeon_getparam_t gp;
-  
+
   gp.param = param;
   gp.value = value;
-  
+
   ret = drmCommandWriteRead( fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
   return ret;
 }
@@ -279,7 +282,7 @@
 
     depth_bits_array[0] = depth_bits;
     depth_bits_array[1] = depth_bits;
-    
+
     /* Just like with the accumulation buffer, always provide some modes
      * with a stencil buffer.  It will be a sw fallback, but some apps won't
      * care about that.
@@ -374,7 +377,7 @@
       int ret;
       ret = radeonGetParam( sPriv->fd, RADEON_PARAM_GART_BUFFER_OFFSET,
 			    &screen->gart_buffer_offset);
-	
+
       if (ret) {
 	 FREE( screen );
 	 fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_GART_BUFFER_OFFSET): %d\n", ret);
@@ -986,7 +989,7 @@
  * with the \c __GLcontextModes that the driver can support for windows or
  * pbuffers.
  *
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on 
+ * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
  *         failure.
  */
 PUBLIC void *
diff -Naur Mesa-7.0.2/src/mesa/drivers/dri/r300/radeon_screen.c Mesa-7.0.2.fix/src/mesa/drivers/dri/r300/radeon_screen.c
--- Mesa-7.0.2/src/mesa/drivers/dri/r300/radeon_screen.c	2007-11-08 15:36:29.000000000 +0100
+++ Mesa-7.0.2.fix/src/mesa/drivers/dri/r300/radeon_screen.c	2007-12-01 21:20:30.000000000 +0100
@@ -73,7 +73,10 @@
 #include "xmlpool.h"
 
 #if !RADEON_COMMON	/* R100 */
-PUBLIC const char __driConfigOptions[] =
+
+/* MW. previous declaration PUBLIC blocks using 2 drivers with different options
+ * because only one option list can be valid */
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -100,7 +103,7 @@
 
 #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
 
-PUBLIC const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -179,7 +182,7 @@
         DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
-const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
 	DRI_CONF_SECTION_PERFORMANCE
 		DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -244,10 +247,10 @@
 {
   int ret;
   drm_radeon_getparam_t gp;
-  
+
   gp.param = param;
   gp.value = value;
-  
+
   ret = drmCommandWriteRead( fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
   return ret;
 }
@@ -279,7 +282,7 @@
 
     depth_bits_array[0] = depth_bits;
     depth_bits_array[1] = depth_bits;
-    
+
     /* Just like with the accumulation buffer, always provide some modes
      * with a stencil buffer.  It will be a sw fallback, but some apps won't
      * care about that.
@@ -374,7 +377,7 @@
       int ret;
       ret = radeonGetParam( sPriv->fd, RADEON_PARAM_GART_BUFFER_OFFSET,
 			    &screen->gart_buffer_offset);
-	
+
       if (ret) {
 	 FREE( screen );
 	 fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_GART_BUFFER_OFFSET): %d\n", ret);
@@ -986,7 +989,7 @@
  * with the \c __GLcontextModes that the driver can support for windows or
  * pbuffers.
  *
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on 
+ * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
  *         failure.
  */
 PUBLIC void *
diff -Naur Mesa-7.0.2/src/mesa/drivers/dri/radeon/radeon_screen.c Mesa-7.0.2.fix/src/mesa/drivers/dri/radeon/radeon_screen.c
--- Mesa-7.0.2/src/mesa/drivers/dri/radeon/radeon_screen.c	2007-11-08 15:36:29.000000000 +0100
+++ Mesa-7.0.2.fix/src/mesa/drivers/dri/radeon/radeon_screen.c	2007-12-01 21:20:30.000000000 +0100
@@ -73,7 +73,10 @@
 #include "xmlpool.h"
 
 #if !RADEON_COMMON	/* R100 */
-PUBLIC const char __driConfigOptions[] =
+
+/* MW. previous declaration PUBLIC blocks using 2 drivers with different options
+ * because only one option list can be valid */
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -100,7 +103,7 @@
 
 #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
 
-PUBLIC const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
     DRI_CONF_SECTION_PERFORMANCE
         DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -179,7 +182,7 @@
         DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
-const char __driConfigOptions[] =
+static const char __driConfigOptions[] =
 DRI_CONF_BEGIN
 	DRI_CONF_SECTION_PERFORMANCE
 		DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
@@ -244,10 +247,10 @@
 {
   int ret;
   drm_radeon_getparam_t gp;
-  
+
   gp.param = param;
   gp.value = value;
-  
+
   ret = drmCommandWriteRead( fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
   return ret;
 }
@@ -279,7 +282,7 @@
 
     depth_bits_array[0] = depth_bits;
     depth_bits_array[1] = depth_bits;
-    
+
     /* Just like with the accumulation buffer, always provide some modes
      * with a stencil buffer.  It will be a sw fallback, but some apps won't
      * care about that.
@@ -374,7 +377,7 @@
       int ret;
       ret = radeonGetParam( sPriv->fd, RADEON_PARAM_GART_BUFFER_OFFSET,
 			    &screen->gart_buffer_offset);
-	
+
       if (ret) {
 	 FREE( screen );
 	 fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_GART_BUFFER_OFFSET): %d\n", ret);
@@ -986,7 +989,7 @@
  * with the \c __GLcontextModes that the driver can support for windows or
  * pbuffers.
  *
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on 
+ * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
  *         failure.
  */
 PUBLIC void *
