diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-10 09:36:38 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-10 09:38:32 +0100 |
commit | 7614a541886dd9eb5c9d441e2618785e9cc53a65 (patch) | |
tree | 1027a5006c5970c85d8b50ddd86e363bade5ff80 | |
parent | ea0209fbc12fca282bd8ef72223791bf163801ce (diff) |
configure: Harden --with-default-accel against simple mistakes
If the user specifies no options, assume automatic selection. Then
double check we found a valid backend and so avoid later breaking the
build.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cb740a7b..79df7e44 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,10 @@ AC_ARG_WITH(default-accel, [Select the default acceleration method [default=sna if enabled, otherwise uxa]]), [accel="$withval"], [accel=auto]) +if test "x$accel" = xyes; then + AC_MSG_WARN([No default acceleration specified, choosing automatic selection]) + accel="auto" +fi AC_MSG_CHECKING([which acceleration method to use by default]) if test "x$accel" = xauto; then @@ -178,9 +182,11 @@ if test "x$accel" = xauto; then fi fi +have_accel=no if test "x$accel" = xsna; then if test "x$SNA" != "xno"; then AC_DEFINE(DEFAULT_ACCEL_METHOD, SNA, [Default acceleration method]) + have_accel=yes else AC_MSG_ERROR([SNA requested as default, but is not enabled]) fi @@ -189,11 +195,15 @@ fi if test "x$accel" = xuxa; then if test "x$UXA" != "xno"; then AC_DEFINE(DEFAULT_ACCEL_METHOD, UXA, [Default acceleration method]) + have_accel=yes else AC_MSG_ERROR([UXA requested as default, but is not enabled]) fi fi AC_MSG_RESULT($accel) +if test "x$accel" = xno; then + AC_MSG_ERROR([No default acceleration option]) +fi AC_ARG_ENABLE(vmap, AS_HELP_STRING([--enable-vmap], |