summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-01-07 12:57:17 -0500
committerColin Walters <walters@verbum.org>2013-01-07 12:57:17 -0500
commitf5631640751b5a998b3616db78dd5dcd9ee62126 (patch)
tree8a91c5d99f4eec16f87a2b467cf6578a815f5261 /configure.ac
parent9efe417e2e636df49ff6fb822dc84e7ce72a0ce1 (diff)
downloadgobject-introspection-f5631640751b5a998b3616db78dd5dcd9ee62126.tar.gz
Clean up cairo handling somewhat
I'm building on RHEL6 which doesn't have cairo-gobject. Now, we tried to support this in that 'make' would succeed, but 'make check' would blow up. This patch allows more of 'make check' to succeed - I just need to figure out how to make the diff against the -expected.gir work. What's more important though, is this will allow gjs to also #define _GI_DISABLE_CAIRO.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 10 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 37380be6..96b36751 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,24 +131,20 @@ PKG_CHECK_MODULES(GIO, [gio-2.0])
PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false)
AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue)
-AC_ARG_ENABLE(tests,
- AS_HELP_STRING([--disable-tests], [disable test libraries]),
- enable_tests=$enableval,
- enable_tests=maybe)
+# Prefer cairo-gobject if we have it
+AC_ARG_WITH(cairo,
+ AS_HELP_STRING([--with-cairo], [Use cairo @<:@default=maybe@:>@]),
+ [], [with_cairo=maybe])
-AS_IF([test x${enable_tests} != xno], [
+AS_IF([test x${with_cairo} != xno], [
PKG_CHECK_MODULES(CAIRO, [cairo cairo-gobject], have_cairo=yes, have_cairo=no)
- AS_IF([test x$have_cairo != xyes], [
- AS_IF([ test x$enable_tests = xmaybe ], [
- enable_tests=no
- ], [
- AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo])
- ])
- ], [
- enable_tests=yes
+ AS_IF([ test x$have_cairo = xyes && test x$with_cairo = xmaybe ], [
+ have_cairo=no
+ ], [ test x$have_cairo = xno && test x$with_cairo = xyes ], [
+ AC_MSG_ERROR([cairo enabled but not found])
])
])
-AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno)
+AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes)
case "$host" in
*-*-darwin*)