summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-12 22:16:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-12 22:16:55 +0100
commitb5d6a57f12025aef9850c7d9baa6905f776be971 (patch)
tree3b476b420d2a6af0d34f48f2472ceda24098df03
parent6c2975ab2943478b3a246b5fb231f9f3df2d8475 (diff)
Enable compilation of SNA by default
But only if we meet the required versions of Xorg and leave UXA as the default AccelMethod for the time being. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 128a30c7..d323da7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,13 +120,17 @@ required_pixman_version=0.24
AC_ARG_ENABLE(sna,
AS_HELP_STRING([--enable-sna],
- [Enable SandyBridge's New Acceleration (SNA) [default=no]]),
+ [Enable SandyBridge's New Acceleration (SNA) [default=auto]]),
[SNA="$enableval"],
- [SNA=no])
+ [SNA=auto])
+
+AC_CHECK_HEADERS([sys/sysinfo.h], , SNA=no)
+if test "x$SNA" = "xauto" && pkg-config --exists "xorg-server >= 1.10"; then
+ SNA=yes
+fi
if test "x$SNA" != "xno"; then
required_xorg_xserver_version=1.10
AC_DEFINE(USE_SNA, 1, [Enable SNA support])
- AC_CHECK_HEADERS([sys/sysinfo.h])
fi
AC_MSG_CHECKING([whether to include SNA support])
AM_CONDITIONAL(SNA, test x$SNA != xno)