On Mon, Sep 26, 2011 at 7:22 PM, Matt Turner <[email protected]> wrote:
> Hi,
>
> It seems impossible currently to build DDXs with --disable-dri against
> an X server built with DRI. The X server's xorg-server.h file defines
> XF86DRI, which is included by the DDX's config.h files.
>
> In config.h, if --enable-dri is passed, XF86DRI is defined to 1. With
> --disable-dri, /* #undef XF86DRI */ is added, which doesn't negate the
> definition provided by xorg-server.h, and causes build failures later
> on.
>
> Is this intended? We've had a bug about it in Gentoo for a while [1]
> and it seems to cover xf86-video-{tdfx,sis,ati,intel,mga,r128,savage}.
>
> The autoconf manual [2] seems to say there's no way to put #undef XXX
> into config.h. What's the solution here?
>
> Thanks,
> Matt
>
> [1] https://bugs.gentoo.org/show_bug.cgi?id=266087
> [2] http://www.gnu.org/s/hello/manual/autoconf/Header-Templates.html

Trying to use autoheader's AH_TOP to do something like AH_TOP([#undef
XF86DRI]) doesn't work. It just comments it out.

The only thing I've come up with is something like the attached patch:
add a disable-dri.h file which just contains #undef XF86DRI, which we
include in config.h with AH_TOP([#include "disable-dri.h"]).

Maybe there are other things we should undef in there as well. I'm not sure.

Matt
From 372bd66f8c43eda20cbc3af3b01c6e069267896c Mon Sep 17 00:00:00 2001
From: Matt Turner <[email protected]>
Date: Mon, 26 Sep 2011 21:54:30 -0400
Subject: [PATCH] Add disable-dri.h header to allow --disable-dri to work

Signed-off-by: Matt Turner <[email protected]>
---
 configure.ac  |    1 +
 disable-dri.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 disable-dri.h

diff --git a/configure.ac b/configure.ac
index 540c390..89469d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 
 AH_TOP([#include "xorg-server.h"])
+AH_TOP([#include "disable-dri.h"])
 
 # Define a configure option for an alternate module directory
 AC_ARG_WITH(xorg-module-dir,
diff --git a/disable-dri.h b/disable-dri.h
new file mode 100644
index 0000000..0443033
--- /dev/null
+++ b/disable-dri.h
@@ -0,0 +1 @@
+#undef XF86DRI
-- 
1.7.3.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to