[PATCH video-dummy] Default DGA to auto based on presence of xf86dgaproto

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Wed Oct 24 14:40:35 PDT 2012


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

If xf86dgaproto is absent, then we can safely assume that DGA isn't
supported in the server either.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 configure.ac |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index c74f3a0..5ff4b64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +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_ENABLE(dga,           AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
 AC_ARG_WITH(xorg-module-dir, [  --with-xorg-module-dir=DIR ],
                              [ moduledir="$withval" ],
                              [ moduledir="$libdir/xorg/modules" ])
@@ -59,6 +59,9 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
 XORG_DRIVER_CHECK_EXT(XV, videoproto)
 
+if test "x$DGA" = xauto; then
+	PKG_CHECK_EXISTS(xf86dgaproto, [DGA=yes], [DGA=no])
+fi
 if test "x$DGA" = xyes; then
 	XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 	AC_DEFINE(USE_DGA, 1, [Support DGA extension])
-- 
1.7.9



More information about the xorg-devel mailing list