From eaaf5dd373ab36491ac719f1408f1f4e2f7eb4f4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 7 Aug 2012 08:58:44 +1000 Subject: [PATCH] xgi: fix for XAA removal Signed-off-by: Dave Airlie --- configure.ac | 18 ++++++++++++++++++ src/xgi.h | 2 ++ src/xgi_dga.c | 5 +++-- src/xgi_video.c | 3 ++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0116265..3dae714 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,24 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) +AC_ARG_ENABLE(xaa, + AS_HELP_STRING([--enable-xaa], + [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), + [XAA="$enableval"], + [XAA=auto]) +if test "x$XAA" != xno; then + save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + CFLAGS=$XORG_CFLAGS + CPPFLAGS="$XORG_CFLAGS" + AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) + CFLAGS=$save_CFLAGS + CPPFLAGS=$save_CPPFLAGS +fi +AC_MSG_CHECKING([whether to include XAA support]) +AM_CONDITIONAL(XAA, test "x$XAA" = xyes) +AC_MSG_RESULT([$XAA]) + AC_SUBST([moduledir]) AC_DEFINE_UNQUOTED(XGI_RELEASE_DATE, ["$RELEASE_DATE"], [Driver release]) DRIVER_NAME=xgi diff --git a/src/xgi.h b/src/xgi.h index 53deadd..9181f25 100755 --- a/src/xgi.h +++ b/src/xgi.h @@ -169,7 +169,9 @@ extern BOOL g_bRunTimeDebug; #endif /* Jong 01/13/2009; support EXA */ +#ifdef HAVE_XAA_H #define XGI_USE_XAA +#endif /* #define XGI_USE_EXA */ #ifdef XGI_USE_XAA diff --git a/src/xgi_dga.c b/src/xgi_dga.c index 8bd84bc..66e0319 100755 --- a/src/xgi_dga.c +++ b/src/xgi_dga.c @@ -40,11 +40,12 @@ #include "xf86_OSproc.h" #include "xf86Pci.h" #include "xf86PciInfo.h" -#include "xaa.h" -#include "xaalocal.h" #include "xgi.h" #include "xgi_regs.h" #include "dgaproc.h" +#ifdef HAVE_XAA_H +#include "xaalocal.h" +#endif #ifndef NEW_DGAOPENFRAMEBUFFER static Bool XGI_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, diff --git a/src/xgi_video.c b/src/xgi_video.c index df76d14..4864b3a 100755 --- a/src/xgi_video.c +++ b/src/xgi_video.c @@ -78,8 +78,9 @@ #include "xgi.h" #include "xf86xv.h" #include -#include "xaa.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "dixstruct.h" #include "fourcc.h"