xserver: Branch 'refs/remotes/origin/glucose-2' - 8 commits

Ben Byer bbyer at kemper.freedesktop.org
Tue Sep 18 19:58:08 PDT 2007


 configure.ac                        |   18 ++++++---
 fb/fb.h                             |    4 +-
 fb/fbpict.c                         |    2 -
 hw/xgl/glx/xglx.c                   |   65 +++++++++++++++++++-----------------
 hw/xgl/glxext/Makefile.am           |    2 -
 hw/xgl/glxext/module/Makefile.am    |   18 +++------
 hw/xgl/glxext/module/glcoremodule.c |   38 ---------------------
 hw/xgl/xglglx.c                     |   10 +++++
 hw/xgl/xglinit.c                    |    2 -
 hw/xgl/xglpixmap.c                  |    2 -
 include/xgl-config.h.in             |    3 +
 mi/miinitext.c                      |   20 ++++++-----
 render/picture.c                    |    4 +-
 13 files changed, 85 insertions(+), 103 deletions(-)

New commits:
diff-tree 41a5aee3859d4d7e648132ed0c4f204084d7c4f0 (from b16472ce94b954efdc0d9acadd3bb9b521c9c6fd)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Mon Sep 17 19:11:03 2007 +0100

    Prevent promotion to unsigned when calculating strides.

diff --git a/fb/fb.h b/fb/fb.h
index a924f49..01c05d7 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -715,7 +715,7 @@ typedef struct {
     } \
     fbPrepareAccess(pDrawable); \
     (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
-    (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
+    (stride) = _pPix->devKind / (int) sizeof (FbBits); (void)(stride); \
     (bpp) = _pPix->drawable.bitsPerPixel;  (void)(bpp); \
 }
 
@@ -732,7 +732,7 @@ typedef struct {
     } \
     fbPrepareAccess(pDrawable); \
     (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
-    (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
+    (stride) = _pPix->devKind / (int) sizeof (FbStip); (void)(stride); \
     (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
 }
 
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 85b5171..9b360bb 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -297,7 +297,7 @@ create_bits_picture (PicturePtr pict,
     image = pixman_image_create_bits (
 	pict->format,
 	pict->pDrawable->width, pict->pDrawable->height,
-	(uint32_t *)bits, stride * sizeof (FbStride));
+	(uint32_t *)bits, stride * (int) sizeof (FbStride));
     
     
 #ifdef FB_ACCESS_WRAPPER
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 69ef9c9..56c7ecd 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -600,7 +600,7 @@ xglAllocatePixmapBits (PixmapPtr pPixmap
     height = pPixmap->drawable.height;
     bpp    = pPixmap->drawable.bitsPerPixel;
 
-    stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
+    stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * (int) sizeof (FbBits);
 
     if (stride)
     {
diff-tree b16472ce94b954efdc0d9acadd3bb9b521c9c6fd (from 79677d094cf5f0f2f84f930aea882efc531b5e8b)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Mon Sep 17 18:51:26 2007 +0100

    Catch SourcePictTypeOther when freeing data.

diff --git a/render/picture.c b/render/picture.c
index a3c0286..129d0e7 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1636,7 +1636,9 @@ FreePicture (pointer	value,
 
 	if (pPicture->pSourcePict)
 	{
-	    if (pPicture->pSourcePict->type != SourcePictTypeSolidFill)
+	    if (pPicture->pSourcePict->type != SourcePictTypeSolidFill &&
+		pPicture->pSourcePict->type != SourcePictTypeOther
+	    )
 		xfree(pPicture->pSourcePict->linear.stops);
 
 	    if (pPicture->pSourcePict->source.Destroy)
diff-tree 79677d094cf5f0f2f84f930aea882efc531b5e8b (from ade1abeb4ae4f9dfff0ad7c7d29118a320d53430)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Sat Sep 15 12:32:48 2007 +0100

    Update keyboard event code to prevent crash on key input.

diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c
index 27aff1f..297036c 100644
--- a/hw/xgl/glx/xglx.c
+++ b/hw/xgl/glx/xglx.c
@@ -975,7 +975,21 @@ xglxBlockHandler (pointer   blockData,
     XFlush (xdisplay);
 }
 
-static DeviceIntPtr pKeyboard, pPointer;
+static DeviceIntPtr xglxKeyboardDevice = NULL;
+static DeviceIntPtr xglxPointerDevice = NULL;
+
+static xEvent *xglxEvents = NULL;
+
+static void
+xglxQueueKeyEvent(int type, unsigned int keycode)
+{
+  int i, n;
+
+  lastEventTime = GetTimeInMillis();
+  n = GetKeyboardEvents(xglxEvents, xglxKeyboardDevice, type, keycode);
+  for (i = 0; i < n; i++)
+    mieqEnqueue(xglxKeyboardDevice, xglxEvents + i);
+}
 
 static void
 xglxWakeupHandler (pointer blockData,
@@ -990,28 +1004,22 @@ xglxWakeupHandler (pointer blockData,
     {
 	switch (X.type) {
 	case KeyPress:
-	    x.u.u.type = KeyPress;
-	    x.u.u.detail = X.xkey.keycode;
-	    x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
-	    mieqEnqueue (pKeyboard, &x);
+	    xglxQueueKeyEvent(KeyPress, X.xkey.keycode);
 	    break;
 	case KeyRelease:
-	    x.u.u.type = KeyRelease;
-	    x.u.u.detail = X.xkey.keycode;
-	    x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
-	    mieqEnqueue (pKeyboard, &x);
+	    xglxQueueKeyEvent(KeyRelease, X.xkey.keycode);
 	    break;
 	case ButtonPress:
 	    x.u.u.type = ButtonPress;
 	    x.u.u.detail = X.xbutton.button;
 	    x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
-	    mieqEnqueue (pPointer, &x);
+	    mieqEnqueue (xglxPointerDevice, &x);
 	    break;
 	case ButtonRelease:
 	    x.u.u.type = ButtonRelease;
 	    x.u.u.detail = X.xbutton.button;
 	    x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
-	    mieqEnqueue (pPointer, &x);
+	    mieqEnqueue (xglxPointerDevice, &x);
 	    break;
 	case MotionNotify:
 	    x.u.u.type = MotionNotify;
@@ -1020,7 +1028,7 @@ xglxWakeupHandler (pointer blockData,
 	    x.u.keyButtonPointer.rootY = X.xmotion.y;
 	    x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
 	    miPointerAbsoluteCursor (X.xmotion.x, X.xmotion.y, lastEventTime);
-	    mieqEnqueue (pPointer, &x);
+	    mieqEnqueue (xglxPointerDevice, &x);
 	    break;
 	case EnterNotify:
 	    if (X.xcrossing.detail != NotifyInferior) {
@@ -1032,7 +1040,7 @@ xglxWakeupHandler (pointer blockData,
 		    x.u.keyButtonPointer.rootY = X.xcrossing.y;
 		    x.u.keyButtonPointer.time = lastEventTime =
 			GetTimeInMillis ();
-		    mieqEnqueue (pPointer, &x);
+		    mieqEnqueue (xglxPointerDevice, &x);
 		}
 	    }
 	    break;
@@ -1084,11 +1092,10 @@ xglxKbdCtrl (DeviceIntPtr pDev,
 }
 
 static int
-xglxKeybdProc (DeviceIntPtr pDevice,
+xglxKeybdProc (DeviceIntPtr pDev,
 	       int	    onoff)
 {
     Bool      ret = FALSE;
-    DevicePtr pDev = (DevicePtr) pDevice;
 
     if (!pDev)
 	return BadImplementation;
@@ -1099,7 +1106,7 @@ xglxKeybdProc (DeviceIntPtr pDevice,
       KeySym	      *xkeyMap;
       int	      minKeyCode, maxKeyCode, mapWidth, i, j;
       KeySymsRec      xglxKeySyms;
-      CARD8	      xglxModMap[256];
+      CARD8	      xglxModMap[MAP_LENGTH];
       XKeyboardState  values;
 
 #ifdef _XSERVER64
@@ -1112,9 +1119,6 @@ xglxKeybdProc (DeviceIntPtr pDevice,
       int	      xkbOp, xkbEvent, xkbError, xkbMajor, xkbMinor;
 #endif
 
-      if (pDev != LookupKeyboardDevice ())
-	  return !Success;
-
       xmodMap = XGetModifierMapping (xdisplay);
 
       XDisplayKeycodes (xdisplay, &minKeyCode, &maxKeyCode);
@@ -1138,8 +1142,8 @@ xglxKeybdProc (DeviceIntPtr pDevice,
 				     &mapWidth);
 #endif
 
-      memset (xglxModMap, 0, 256);
-
+      for (i = 0; i < MAP_LENGTH; i++)
+	  xglxModMap[i] = 0;
       for (j = 0; j < 8; j++)
       {
 	  for (i = 0; i < xmodMap->max_keypermod; i++)
@@ -1177,8 +1181,6 @@ xglxKeybdProc (DeviceIntPtr pDevice,
 	  if (desc && desc->geom)
 	  {
 	      XkbComponentNamesRec names;
-	      FILE		   *file;
-
 	      rules    = XKB_DFLT_RULES_FILE;
 	      model    = XKB_DFLT_KB_MODEL;
 	      layout   = XKB_DFLT_KB_LAYOUT;
@@ -1214,7 +1216,7 @@ xglxKeybdProc (DeviceIntPtr pDevice,
 	  memmove (defaultKeyboardControl.autoRepeats,
 		   values.auto_repeats, sizeof (values.auto_repeats));
 
-	  ret = InitKeyboardDeviceStruct (pDev,
+	  ret = InitKeyboardDeviceStruct (&pDev->public,
 					  &xglxKeySyms,
 					  xglxModMap,
 					  xglxBell,
@@ -1232,11 +1234,9 @@ xglxKeybdProc (DeviceIntPtr pDevice,
 
     } break;
     case DEVICE_ON:
-	pDev->on = TRUE;
 	break;
     case DEVICE_OFF:
     case DEVICE_CLOSE:
-	pDev->on = FALSE;
 	break;
     }
 
@@ -1261,11 +1261,16 @@ void
 xglxInitInput (int  argc,
 	       char **argv)
 {
-    pPointer  = AddInputDevice (xglMouseProc, TRUE);
-    pKeyboard = AddInputDevice (xglxKeybdProc, TRUE);
+    xglxPointerDevice  = AddInputDevice (xglMouseProc, TRUE);
+    xglxKeyboardDevice = AddInputDevice (xglxKeybdProc, TRUE);
+
+    RegisterPointerDevice (xglxPointerDevice);
+    RegisterKeyboardDevice (xglxKeyboardDevice);
 
-    RegisterPointerDevice (pPointer);
-    RegisterKeyboardDevice (pKeyboard);
+    if (!xglxEvents)
+	xglxEvents = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum());
+    if (!xglxEvents)
+        FatalError("couldn't allocate room for events\n");
 
     mieqInit ();
 
diff --git a/hw/xgl/xglinit.c b/hw/xgl/xglinit.c
index 9a6f9aa..d915c91 100644
--- a/hw/xgl/xglinit.c
+++ b/hw/xgl/xglinit.c
@@ -70,7 +70,7 @@ typedef struct _xglDDXFunc {
     void (*initInput)	       (int	     argc,
 				char	     **argv);
     Bool (*legalModifier)      (unsigned int key,
-				DevicePtr    pDev);
+	    			DeviceIntPtr    pDev);
     void (*processInputEvents) (void);
     void (*useMsg)	       (void);
     int  (*processArgument)    (int	     argc,
diff-tree ade1abeb4ae4f9dfff0ad7c7d29118a320d53430 (from 0bc3ae70521b05287821036d92a94a88b578a227)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Thu Sep 13 18:16:32 2007 +0100

    Add the XGLServer define, per Daniel Stone.

diff --git a/include/xgl-config.h.in b/include/xgl-config.h.in
index 877d179..b708a93 100644
--- a/include/xgl-config.h.in
+++ b/include/xgl-config.h.in
@@ -7,6 +7,9 @@
 
 #include <dix-config.h>
 
+/* Building XGL server */
+#undef XGLServer
+
 /* Use loadable XGL modules. */
 #undef XGL_MODULAR
 
diff-tree 0bc3ae70521b05287821036d92a94a88b578a227 (from d503862a02af8e48fb0690e82029b79dbc943fad)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Thu Sep 13 18:14:39 2007 +0100

    Remove the __glXMesaProvider stub and references to it to avoid symbol clash at run-time.

diff --git a/hw/xgl/xglglx.c b/hw/xgl/xglglx.c
index 09bbc35..e45f34e 100644
--- a/hw/xgl/xglglx.c
+++ b/hw/xgl/xglglx.c
@@ -101,15 +101,10 @@ GlxSetRenderTables (struct _glapi_table 
 	(*__xglGLXFunc.setRenderTables) (table);
 }
 
-/*
-** Stub to satisfy miinitext.c references.
-*/
-__GLXprovider __glXMesaProvider;
-
 void
 GlxPushProvider (__GLXprovider *provider)
 {
-    if (glXHandle && provider != &__glXMesaProvider)
+    if (glXHandle)
 	(*__xglGLXFunc.pushProvider) (provider);
 }
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 0fc6d15..5d7f163 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corp
 
                         All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of Digital not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -588,7 +588,7 @@ InitExtensions(argc, argv)
     if (!noXCMiscExtension) XCMiscExtensionInit();
 #endif
 #ifdef XRECORD
-    if (!noTestExtensions) RecordExtensionInit(); 
+    if (!noTestExtensions) RecordExtensionInit();
 #endif
 #ifdef DBE
     if (!noDbeExtension) DbeExtensionInit();
@@ -637,7 +637,9 @@ InitExtensions(argc, argv)
     DarwinGlxPushProvider(__DarwinglXMesaProvider);
     if (!noGlxExtension) DarwinGlxExtensionInit();
 #else
+#ifndef XGL_MODULAR
     GlxPushProvider(&__glXMesaProvider);
+#endif
     if (!noGlxExtension) GlxExtensionInit();
 #endif // INXDARWINAPP
 #endif // GLXEXT
@@ -735,10 +737,10 @@ static ExtensionModule staticExtensions[
 #endif
 #ifdef XEVIE
     { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL },
-#endif 
+#endif
     { NULL, NULL, NULL, NULL, NULL }
 };
-    
+
 /*ARGSUSED*/
 void
 InitExtensions(argc, argv)
@@ -771,8 +773,8 @@ InitExtensions(argc, argv)
 
     for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
 	ext = &ExtensionModuleList[i];
-	if (ext->initFunc != NULL && 
-	    (ext->disablePtr == NULL || 
+	if (ext->initFunc != NULL &&
+	    (ext->disablePtr == NULL ||
 	     (ext->disablePtr != NULL && !*ext->disablePtr))) {
 	    (ext->initFunc)();
 	}
diff-tree d503862a02af8e48fb0690e82029b79dbc943fad (from 0bfc2787059f0c687efe6621967825608088cfb9)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Thu Sep 13 12:31:16 2007 +0100

    Bring more build fixes from xgl-0-0-1.

diff --git a/configure.ac b/configure.ac
index ad1bde8..6b3acc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1261,7 +1261,7 @@ if test "x$XGL" = xyes; then
 	AC_SUBST([XGL_LIBS])
 	AC_SUBST([XGL_SYS_LIBS])
 	AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
-	SERVER_DEFINES="$SERVER_DEFINES -DXGLServer"
+	AC_DEFINE(XGLServer, 1, [Building XGL server])
 
 	xglmoduledir="$moduledir/xgl"
 	AC_SUBST([xglmoduledir])
diff --git a/hw/xgl/glxext/Makefile.am b/hw/xgl/glxext/Makefile.am
index 4fa84a6..830b2d1 100644
--- a/hw/xgl/glxext/Makefile.am
+++ b/hw/xgl/glxext/Makefile.am
@@ -16,7 +16,7 @@ AM_CFLAGS =		 \
 libxglglxext_libraries = libxglglxext.la
 libxglglxext_la_SOURCES = \
 	xglglxext.h	  \
-	xglglxext.c       \
+	xglglxext.c	  \
 	xglglxlog.c
 
 noinst_LTLIBRARIES = $(libxglglxext_libraries)
diff --git a/hw/xgl/glxext/module/Makefile.am b/hw/xgl/glxext/module/Makefile.am
index 4633f7f..66ea80a 100644
--- a/hw/xgl/glxext/module/Makefile.am
+++ b/hw/xgl/glxext/module/Makefile.am
@@ -5,18 +5,12 @@ AM_CFLAGS = \
 	$(XGLMODULES_CFLAGS) \
 	-I$(top_srcdir)/hw/xgl 
 
-libglx_la_LDFLAGS = -avoid-version
-libglx_la_SOURCES = glxmodule.c
-libglx_la_LIBADD  = $(top_builddir)/GL/glx/libglx.la
-libglx_modules    = libglx.la
-
-libglcore_la_LDFLAGS = -avoid-version
-libglcore_la_SOURCES = glcoremodule.c
-libglcore_la_LIBADD  = $(top_builddir)/GL/mesa/libGLcore.la
-libglcore_modules    = libglcore.la
+libglxext_la_LDFLAGS = -avoid-version
+libglxext_la_SOURCES = glxmodule.c
+libglxext_la_LIBADD  = $(top_builddir)/GL/glx/libglx.la \
+		       $(top_builddir)/GL/mesa/libGLcore.la
+libglxext_modules    = libglxext.la
 
 moduledir = @XGL_MODULE_PATH@
 
-module_LTLIBRARIES =	     \
-	$(libglcore_modules) \
-	$(libglx_modules)
+module_LTLIBRARIES = $(libglxext_modules)
diff --git a/hw/xgl/glxext/module/glcoremodule.c b/hw/xgl/glxext/module/glcoremodule.c
deleted file mode 100644
index 37aa9c6..0000000
--- a/hw/xgl/glxext/module/glcoremodule.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2005 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Novell, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Novell, Inc. makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: David Reveman <davidr at novell.com>
- */
-
-#include "xglmodule.h"
-
-char *
-moduleVersion (void)
-{
-    return VERSION;
-}
-
-Bool
-moduleInit (const char *module)
-{
-    return TRUE;
-}
diff-tree 0bfc2787059f0c687efe6621967825608088cfb9 (from 0f45673ce13bbe9e1c1401c750c0c2fbff9e08b9)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Thu Sep 13 11:33:08 2007 +0100

    Add stubs to satisfy linking references.

diff --git a/hw/xgl/xglglx.c b/hw/xgl/xglglx.c
index 5c1eee6..09bbc35 100644
--- a/hw/xgl/xglglx.c
+++ b/hw/xgl/xglglx.c
@@ -101,10 +101,15 @@ GlxSetRenderTables (struct _glapi_table 
 	(*__xglGLXFunc.setRenderTables) (table);
 }
 
+/*
+** Stub to satisfy miinitext.c references.
+*/
+__GLXprovider __glXMesaProvider;
+
 void
 GlxPushProvider (__GLXprovider *provider)
 {
-    if (glXHandle)
+    if (glXHandle && provider != &__glXMesaProvider)
 	(*__xglGLXFunc.pushProvider) (provider);
 }
 
@@ -201,4 +206,14 @@ xglUnloadGLXModules (void)
 
 }
 
+void
+__glXenterServer(GLboolean rendering)
+{
+}
+
+void
+__glXleaveServer(GLboolean rendering)
+{
+}
+
 #endif
diff-tree 0f45673ce13bbe9e1c1401c750c0c2fbff9e08b9 (from 1d7403a1c269a92bb1eb347c497f0682bf8a7287)
Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Thu Sep 13 10:08:03 2007 +0100

    Bring build fixes from xgl-0-0-1.

diff --git a/configure.ac b/configure.ac
index fbdb3cd..ad1bde8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1248,18 +1248,20 @@ dnl Xgl DDX
 
 AC_MSG_CHECKING([whether to build Xgl DDX])
 if test "x$XGL" != xno; then
-  PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XGL=yes], [XGL=no])
-  AC_SUBST(XGLMODULES_CFLAGS)
+	PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XGL=yes], [XGL=no])
+	AC_SUBST(XGLMODULES_CFLAGS)
+	AC_SUBST(XGLMODULES_LIBS)
 fi
 AC_MSG_RESULT([$XGL])
 AM_CONDITIONAL(XGL, [test "x$XGL" = xyes])
 
 if test "x$XGL" = xyes; then
-	XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
+	XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
 	XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
 	AC_SUBST([XGL_LIBS])
 	AC_SUBST([XGL_SYS_LIBS])
 	AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
+	SERVER_DEFINES="$SERVER_DEFINES -DXGLServer"
 
 	xglmoduledir="$moduledir/xgl"
 	AC_SUBST([xglmoduledir])
@@ -1270,8 +1272,9 @@ dnl Xegl DDX
 
 AC_MSG_CHECKING([whether to build Xegl DDX])
 if test "x$XEGL" != xno; then
-  PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XEGL=yes], [XEGL=no])
-  AC_SUBST(XEGLMODULES_CFLAGS)
+	PKG_CHECK_MODULES([XEGLMODULES], [glitz-egl >= 0.4.3], [XEGL=yes], [XEGL=no])
+	AC_SUBST(XEGLMODULES_CFLAGS)
+	AC_SUBST(XEGLMODULES_LIBS)
 fi
 AC_MSG_RESULT([$XEGL])
 AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes])
@@ -1287,8 +1290,9 @@ dnl Xglx DDX
 
 AC_MSG_CHECKING([whether to build Xglx DDX])
 if test "x$XGLX" != xno; then
-  PKG_CHECK_MODULES([XGLXMODULES], [glitz-glx >= 0.4.3 xrender], [XGLX=yes], [XGLX=no])
-  AC_SUBST(XGLXMODULES_CFLAGS)
+	PKG_CHECK_MODULES([XGLXMODULES], [glitz-glx >= 0.4.3 xrender], [XGLX=yes], [XGLX=no])
+	AC_SUBST(XGLXMODULES_CFLAGS)
+	AC_SUBST(XGLXMODULES_LIBS)
 fi
 AC_MSG_RESULT([$XGLX])
 AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes])


More information about the xorg-commit mailing list