[PATCH] Allow building without XV.

Cyril Brulebois kibi at debian.org
Sun Nov 7 06:55:47 PST 2010


It is useful when one is trying to build an X system with a limited
amount of features, like in the Debian Graphical Installer.

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 configure.ac |   12 ++++++++++++
 src/fbdev.c  |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6010c70..7ab2e22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,11 @@ AC_ARG_ENABLE(pciaccess,     AS_HELP_STRING([--enable-pciaccess],
                              [Enable use of libpciaccess (default: disabled)]),
 			     [PCIACCESS=$enableval], [PCIACCESS=no])
 
+AC_ARG_ENABLE(xv,            AS_HELP_STRING([--enable-xv],
+                             [Enable use of xv (default: enabled)]),
+                             [USE_XV=$enableval], [USE_XV=yes])
+
+
 # Store the list of server defined optional extensions in REQUIRED_MODULES
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -79,6 +84,13 @@ if test "x$PCIACCESS" = xyes; then
     XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
 fi
 
+AM_CONDITIONAL(USE_XV, [test "xUSE_XV" = xyes])
+if test "x$USE_XV" = xyes; then
+   AC_DEFINE(USE_XV, 1, [Use XV])
+else
+   AC_DEFINE(USE_XV, 0, [Do not use XV])
+fi
+
 # Checks for libraries.
 
 
diff --git a/src/fbdev.c b/src/fbdev.c
index 4c0fc31..41e050d 100644
--- a/src/fbdev.c
+++ b/src/fbdev.c
@@ -893,6 +893,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	fPtr->CloseScreen = pScreen->CloseScreen;
 	pScreen->CloseScreen = FBDevCloseScreen;
 
+#if USE_XV
 	{
 	    XF86VideoAdaptorPtr *ptr;
 
@@ -901,6 +902,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 		xf86XVScreenInit(pScreen,ptr,n);
 	    }
 	}
+#endif
 
 	TRACE_EXIT("FBDevScreenInit");
 
-- 
1.7.2.3



More information about the xorg-devel mailing list