summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-10-04 01:21:57 +0000
committerDave Airlie <airlied@redhat.com>2012-10-08 15:49:23 +1000
commit14db948127e549ea9234e02d8e112de3871f8f9f (patch)
treee026e83268b55a6b78cd9b4aa3c12f73434490c1 /configure.ac
parenta83444c925b18b3db431336360d6915aaf21f727 (diff)
configure.ac: Allow forcible disabling of Cairo support
We don't want to build libdrm tests with Cairo support under Poky, since they're never used and also cause a build loop from libdrm -> cairo -> mesa-dri -> libdrm. To avoid variance in build results, introduce a --disable-cairo-tests switch. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 290362c4..8c28107a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,11 +222,23 @@ if test "x$EXYNOS" = xyes; then
AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
fi
+AC_ARG_ENABLE([cairo-tests],
+ [AS_HELP_STRING([--enable-cairo-tests],
+ [Enable support for Cairo rendering in tests (default: auto)])],
+ [CAIRO=$enableval], [CAIRO=auto])
PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
-if test "x$HAVE_CAIRO" = xyes; then
- AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support])
+AC_MSG_CHECKING([whether to enable Cairo tests])
+if test "x$CAIRO" = xauto; then
+ CAIRO="$HAVE_CAIRO"
fi
-AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes])
+if test "x$CAIRO" = xyes; then
+ if ! test "x$HAVE_CAIRO" = xyes; then
+ AC_MSG_ERROR([Cairo support required but not present])
+ fi
+ AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support])
+fi
+AC_MSG_RESULT([$CAIRO])
+AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
# For enumerating devices in test case
PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])