xserver: Branch 'master'

Kristian Høgsberg krh at kemper.freedesktop.org
Wed Dec 3 08:26:50 PST 2008


 configure.ac    |   22 ++++++++++++++++++++++
 glx/Makefile.am |    4 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 110a71d11ab7a1a55a6a24d792457fdef0b0746d
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Dec 3 11:22:38 2008 -0500

    Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found.

diff --git a/configure.ac b/configure.ac
index 13da45e..be1e7a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -877,6 +877,28 @@ if test "x$DRI" = xyes || test "x$DRI2" = xyes; then
 	AC_SUBST(LIBDRM_LIBS)
 fi
 
+if test "x$DRI2" = xyes; then
+	save_CFLAGS=$CFLAGS
+	CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS -Wall"
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+#ifndef __DRI_DRI2
+#error DRI2 extension not available.
+#endif]])],
+			  [HAVE_DRI2EXTENSION=yes],
+			  [HAVE_DRI2EXTENSION=no])
+	CFLAGS=$save_CFLAGS
+	if test "x$HAVE_DRI2EXTENSION" = xyes; then
+		AC_DEFINE(DRI2_AIGLX, 1, [Build DRI2 AIGLX loader])
+		DRI2_AIGLX=yes
+	else
+		AC_MSG_NOTICE([DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h.])
+		DRI2_AIGLX=no
+	fi
+fi
+AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" == xyes)
+
+
 AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
 	AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
diff --git a/glx/Makefile.am b/glx/Makefile.am
index 8c705a7..bec35bf 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -24,7 +24,7 @@ INCLUDES = \
 	-I$(top_srcdir)/hw/xfree86/dri \
 	-I$(top_srcdir)/mi
 
-if DRI2
+if DRI2_AIGLX
 INCLUDES += -I$(top_srcdir)/hw/xfree86/dri2
 endif
 
@@ -53,7 +53,7 @@ libglxdri_la_SOURCES = \
         extension_string.c \
         extension_string.h
 
-if DRI2
+if DRI2_AIGLX
 libglxdri_la_SOURCES += glxdri2.c
 endif
 


More information about the xorg-commit mailing list