From 684647507879c79d3ee330e7429ac08600dd0629 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Fri, 5 Apr 2013 16:57:30 +0200 Subject: [PATCH] build: depends on cairo-gobject if introspection is enabled If introspection is used, GObject support in cairo must be enabled because gobject-introspection package relies on the presence of this wrapper library. That support is present since cairo 1.10.0. --- configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bc667631..f8da1087 100644 --- a/configure.ac +++ b/configure.ac @@ -131,10 +131,6 @@ AC_CONFIG_COMMANDS([default], PKG_CHECK_MODULES([GLIB],[glib-2.0]) PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= ]gobject_prereq) PKG_CHECK_MODULES([CAIRO],[cairo >= ]cairo_prereq) -PKG_CHECK_MODULES([CAIRO_GOBJECT],[cairo-gobject], - [AC_DEFINE_UNQUOTED([CAIRO_GOBJECT_ENABLED],[1], - [Defined if GObject support in cairo is present.])], - [:]) # Check for optional packages @@ -260,6 +256,15 @@ AM_COND_IF([HAVE_INTROSPECTION], Where to install the typelib files: ${with_typelibdir}"], [report_introspection=""]) +dnl If introspection is used GObject support in cairo must be enabled, +dnl that is the cairo-gobject library must be present. That support +dnl was introduced since cairo 1.10.0. +PKG_CHECK_MODULES([CAIRO_GOBJECT],[cairo-gobject], + [AC_DEFINE_UNQUOTED([CAIRO_GOBJECT_ENABLED],[1], + [Defined if GObject support in cairo is present.])], + [AS_IF([test "x${enable_introspection}" = "xyes"], + [AC_MSG_ERROR([GObject introspection requires the cairo-gobject library])])]) + dnl GLib test framework AC_ARG_ENABLE([test_framework], [AS_HELP_STRING([--enable-test-framework], -- 2.11.4.GIT