summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-07-16 04:29:53 +0100
committerDave Airlie <airlied@redhat.com>2012-07-16 04:29:53 +0100
commita2213da6d87baa8b5f49d3894513ced2c6974259 (patch)
tree23228783092ddc052a692f0546ae27cd719f3fe4
parent3fce61b475355820f735e50b7070ee6fc906083d (diff)
mach64: fix build against server without XAA
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--configure.ac23
-rw-r--r--src/atimach64accel.h2
2 files changed, 23 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6308c92..90207a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,8 +162,6 @@ if test "x$ATIMISC_TV_OUT" = xyes; then
AC_DEFINE(TV_OUT, 1, [Build TV-Out support for atimisc.])
fi
-AC_DEFINE(USE_XAA, 1, [Build support for XAA])
-
# Properly handle EXA.
AC_MSG_CHECKING([whether to enable EXA support])
if test "x$EXA" = xyes; then
@@ -197,6 +195,27 @@ if test "x$have_exa_h" = xyes; then
fi
fi
+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)
+if test "x$XAA" = xyes; then
+ AC_DEFINE(USE_XAA, test "x$XAA" = xyes, [Build support for XAA])
+fi
+AC_MSG_RESULT([$XAA])
+
AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
[#include "xorg-server.h"])
diff --git a/src/atimach64accel.h b/src/atimach64accel.h
index a8585d5..92fb4df 100644
--- a/src/atimach64accel.h
+++ b/src/atimach64accel.h
@@ -25,7 +25,9 @@
#include "atipriv.h"
+#ifdef HAVE_XAA_H
#include "xaa.h"
+#endif
#include "exa.h"
#define ATIMach64MaxX 4095