[PATCH 3/3] Let configure --enable/disable-aiglx control building of AIGLX for all DDXs

Jon TURNEY jon.turney at dronecode.org.uk
Fri Apr 16 08:24:24 PDT 2010


Can't use --enable/disable-aiglx to control if Xwin DDX is built with AIGLX enabled,
as at the moment it's forced off if we aren't building the X.Org DDX DRI loader

Rearrange things a bit, introducing a new configure symbol, DRI1_AIGLX to specifically
indicate if the X.Org DDX DRI loader should be built, and replace the previous X.Org
DDX-specific uses of AIGLX with that.  As before DRI1_AIGLX is only enabled if
all of --enable-glx, --enable-aiglx and --enable-dri are

This allows the general symbol AIGLX to control if AIGLX is built for the XWin DDX as
well

It's a bit unclear to me if --disable-aiglx is just a shorthand for ---disable-dri
and --disable-dri2, or if it's supposed to more than that?

Perhaps DRI2_AIGLX should require DRI1_AIGLX, but I don't see anything which enforces
that currently (and perhaps the only reason to do so is for the functions in
extension_string.c, which I want to move to make more generally available, anyhow)...

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 configure.ac                   |   14 ++++++++------
 glx/Makefile.am                |    2 +-
 hw/xfree86/dixmods/Makefile.am |    2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index d06fbbe..01888c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -991,12 +991,13 @@ else
 fi
 AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
 
-if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a "x$DRI" = xyes; then
-	AC_DEFINE(AIGLX, 1, [Build AIGLX loader])
-else
-	AIGLX=no
+if test "x$GLX" = xno; then
+        AIGLX=no
+fi
+if test "x$AIGLX" = xno; then
+        DRI=no
+        DRI2=no
 fi
-AM_CONDITIONAL(AIGLX, test "x$AIGLX" = xyes)
 
 if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then
 	GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
@@ -1011,6 +1012,7 @@ if test "x$DRI" = xyes; then
 	PKG_CHECK_MODULES([DRI], $GLPROTO $LIBDRI)
 	AC_SUBST(DRIPROTO_CFLAGS)
 fi
+AM_CONDITIONAL(DRI1_AIGLX, test "x$DRI" = xyes)
 
 PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO,
                   [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no])
@@ -1883,7 +1885,7 @@ AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes])
 AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes])
-AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && false])
+AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$AIGLX" = xyes])
 AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false])
 AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false])
 AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
diff --git a/glx/Makefile.am b/glx/Makefile.am
index dcf44c7..71e7e43 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -1,4 +1,4 @@
-if AIGLX
+if DRI1_AIGLX
 GLXDRI_LIBRARY = libglxdri.la
 endif
 
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 365f006..6187dc9 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -45,7 +45,7 @@ libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
 libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
 
 libglx_la_LDFLAGS = -avoid-version
-if AIGLX
+if DRI1_AIGLX
 GLXDRI_LIBRARY = $(top_builddir)/glx/libglxdri.la
 endif
 libglx_la_LIBADD = \
-- 
1.7.0.4



More information about the xorg-devel mailing list