summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-09-14 14:50:36 -0500
committerJamey Sharp <jamey@minilop.net>2011-09-14 15:48:13 -0500
commitdd9be3b21842aacdee5501cd2e0bfafb11b5ec08 (patch)
tree92e38572b02a2fe6d9aef353187b345fe1f450bb
parentdd598ca433d2386687f9543457e4c6ffdb16d7c4 (diff)
Add a configure option to disable dga
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r--configure.ac9
-rw-r--r--src/Makefile.am6
-rw-r--r--src/dummy_driver.c2
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");