summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-24 18:22:45 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-24 19:01:22 +0100
commite45629135065d0cc73c285f8df35ab4e1d07c6dc (patch)
tree7677db32ced6e3114ca4cf7822dabd6871d1a177 /configure.ac
parentdf6ab02c3690eea8393ecc8c113e2f2891856cc6 (diff)
Allow runtime switching of AccelMethod between uxa/sna and even glamor
Section "Device" Option "AccelMethod" "uxa/glamor/sna" EndSection The appropriate backend must also be enabled at compile time for the runtime option to be available (i.e. --enable-uxa (default) --enable-sna --enable-glamor) Demanded-by: Adam Jackson <ajax@redhat.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50290 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 37 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c031a26f..a025521c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,6 +158,43 @@ if test "x$GLAMOR" != "xno"; then
AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
fi
+AC_ARG_WITH(default-accel,
+ AS_HELP_STRING([--with-default-accel],
+ [Select the default acceleration method [default=sna if enabled, otherwise uxa]]),
+ [accel="$withval"],
+ [accel=auto])
+
+AC_MSG_CHECKING([which acceleration method to use by default])
+if test "x$accel" = xauto; then
+ if test "x$UXA" != "xno"; then
+ accel=uxa
+ else
+ if test "x$SNA" != "xno"; then
+ accel=sna
+ fi
+ fi
+ if test "x$accel" = xauto; then
+ AC_MSG_ERROR([No default acceleration option])
+ fi
+fi
+
+if test "x$accel" = xsna; then
+ if test "x$SNA" != "xno"; then
+ AC_DEFINE(DEFAULT_ACCEL_METHOD, SNA, [Default acceleration method])
+ else
+ AC_MSG_ERROR([SNA requested as default, but is not enabled])
+ fi
+fi
+
+if test "x$accel" = xuxa; then
+ if test "x$UXA" != "xno"; then
+ AC_DEFINE(DEFAULT_ACCEL_METHOD, UXA, [Default acceleration method])
+ else
+ AC_MSG_ERROR([UXA requested as default, but is not enabled])
+ fi
+fi
+AC_MSG_RESULT($accel)
+
AC_ARG_ENABLE(vmap,
AS_HELP_STRING([--enable-vmap],
[Enable use of vmap [default=no]]),
@@ -174,7 +211,6 @@ AC_ARG_ENABLE(debug,
[Enables internal debugging [default=no]]),
[DEBUG="$enableval"],
[DEBUG=no])
-
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)