From dd9be3b21842aacdee5501cd2e0bfafb11b5ec08 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 14 Sep 2011 14:50:36 -0500 Subject: Add a configure option to disable dga Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Signed-off-by: Jamey Sharp --- configure.ac | 9 ++++++++- src/Makefile.am | 6 +++++- src/dummy_driver.c | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1d73f6b..e3623f9 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ AC_PROG_LIBTOOL AH_TOP([#include "xorg-server.h"]) # Define a configure option for an alternate module directory +AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: yes)]), [DGA=$enableval], [DGA=yes]) AC_ARG_WITH(xorg-module-dir, [ --with-xorg-module-dir=DIR ], [ moduledir="$withval" ], [ moduledir="$libdir/xorg/modules" ]) @@ -57,7 +58,13 @@ AC_SUBST(moduledir) XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) -XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto) + +if test "x$DGA" = xyes; then + XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto) + AC_DEFINE(XFreeXDGA, 1, [Support DGA extension]) +fi +AC_SUBST([DGA]) +AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) diff --git a/src/Makefile.am b/src/Makefile.am index 6705742..52b9921 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,6 +33,10 @@ dummy_drv_ladir = @moduledir@/drivers dummy_drv_la_SOURCES = \ dummy_cursor.c \ - dummy_dga.c \ dummy_driver.c \ dummy.h + +if DGA +dummy_drv_la_SOURCES += \ + dummy_dga.c +endif diff --git a/src/dummy_driver.c b/src/dummy_driver.c index e6124e8..041ca96 100644 --- a/src/dummy_driver.c +++ b/src/dummy_driver.c @@ -592,7 +592,9 @@ DUMMYScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86SetBlackWhitePixels(pScreen); +#ifdef XFreeXDGA DUMMYDGAInit(pScreen); +#endif if (dPtr->swCursor) xf86DrvMsg(scrnIndex, X_CONFIG, "Using Software Cursor.\n"); -- cgit v1.2.3