From c5a612fc18a7f5c542fca580494e2c66ecfc2159 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 16 Apr 2010 21:55:01 +0100 Subject: [PATCH] configure: Let configure --enable/disable-aiglx control building of AIGLX for all DDXs Let configure --enable/disable-aiglx control building of AIGLX for all DDXs. Currently we 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 or DRI2 loader Rearrange things a bit, introducing a new automake conditional, AIGLX_DRI_LOADER to specifically indicate if the X.Org DDX DRI/DRI2 loader convenience library should be built, and replace the previous X.Org DDX-specific uses of the AIGLX conditional with that As before, AIGLX_DRI_LOADER is only enabled if --enable-glx, --enable-aiglx and at least one of --enable-dri or --enable-dri2 are enabled This allows the general conditional AIGLX to control if AIGLX is built for the XWin DDX as well The C #define AIGLX set by AC_DEFINE(AIGLX) seems to be obsolete, I can't find anything which checks it Updated for ajax's "glx: Make --disable-dri not disable AIGLX" patch, which allows DRI2 to be enabled independently of DRI1 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Ian Romanick --- 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 56e51a4073..30701b0cf7 100644 --- a/configure.ac +++ b/configure.ac @@ -1008,12 +1008,14 @@ else fi AM_CONDITIONAL(GLX, test "x$GLX" = xyes) -if test "x$AIGLX" = xyes -a "x$GLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then - AC_DEFINE(AIGLX, 1, [Build AIGLX loader]) -else - AIGLX=no +if test "x$GLX" = xno; then + AIGLX=no fi -AM_CONDITIONAL(AIGLX, test "x$AIGLX" = xyes) + +if test "x$AIGLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then + AC_DEFINE(AIGLX, 1, [Build AIGLX loader]) +fi +AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI" = xyes || test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes) if test "x$GLX_USE_TLS" = xyes ; then GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" @@ -1857,7 +1859,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]) AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) diff --git a/glx/Makefile.am b/glx/Makefile.am index ef8677a7c8..5f74ab890c 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am @@ -1,4 +1,4 @@ -if AIGLX +if AIGLX_DRI_LOADER GLXDRI_LIBRARY = libglxdri.la endif diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index 365f00671b..1a162ab1c9 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 AIGLX_DRI_LOADER GLXDRI_LIBRARY = $(top_builddir)/glx/libglxdri.la endif libglx_la_LIBADD = \