only enable support for freedreno on arm automatically
Users can still override this by explicitly passing --enable-freedreno
to configure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
diff --git a/configure.ac b/configure.ac
index c0ab430..8422de9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,8 +95,8 @@
AC_ARG_ENABLE(freedreno,
AS_HELP_STRING([--disable-freedreno],
- [Enable support for freedreno's KMS API (default: enabled)]),
- [FREEDRENO=$enableval], [FREEDRENO=yes])
+ [Enable support for freedreno's KMS API (default: enabled on arm)]),
+ [FREEDRENO=$enableval], [FREEDRENO=auto])
AC_ARG_ENABLE(freedreno-kgsl,
AS_HELP_STRING([--enable-freedreno-kgsl],
@@ -277,6 +277,13 @@
esac
fi
+if test "x$FREEDRENO" = xauto ; then
+ case $host_cpu in
+ arm*|aarch64) FREEDRENO="yes" ;;
+ *) FREEDRENO="no" ;;
+ esac
+fi
+
AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])