diff --git a/app/sanity.c b/app/sanity.c index 9220ffc5b3..53f76019f8 100644 --- a/app/sanity.c +++ b/app/sanity.c @@ -17,6 +17,7 @@ #include "config.h" +#include #include #include #include @@ -31,6 +32,7 @@ static gchar * sanity_check_gimp (void); static gchar * sanity_check_glib (void); +static gchar * sanity_check_cairo (void); static gchar * sanity_check_pango (void); static gchar * sanity_check_fontconfig (void); static gchar * sanity_check_freetype (void); @@ -49,6 +51,9 @@ sanity_check (void) if (! abort_message) abort_message = sanity_check_glib (); + if (! abort_message) + abort_message = sanity_check_cairo (); + if (! abort_message) abort_message = sanity_check_pango (); @@ -149,6 +154,36 @@ sanity_check_glib (void) return NULL; } +static gchar * +sanity_check_cairo (void) +{ +#define CAIRO_REQUIRED_MAJOR 1 +#define CAIRO_REQUIRED_MINOR 8 +#define CAIRO_REQUIRED_MICRO 0 + + if (cairo_version () < CAIRO_VERSION_ENCODE (CAIRO_REQUIRED_MAJOR, + CAIRO_REQUIRED_MINOR, + CAIRO_REQUIRED_MICRO)) + { + return g_strdup_printf + ("The Cairo version being used is too old!\n\n" + "GIMP requires Cairo version %d.%d.%d or later.\n" + "Installed Cairo version is %s.\n\n" + "Somehow you or your software packager managed\n" + "to install GIMP with an older Cairo version.\n\n" + "Please upgrade to Cairo version %d.%d.%d or later.", + CAIRO_REQUIRED_MAJOR, CAIRO_REQUIRED_MINOR, CAIRO_REQUIRED_MICRO, + cairo_version_string (), + CAIRO_REQUIRED_MAJOR, CAIRO_REQUIRED_MINOR, CAIRO_REQUIRED_MICRO); + } + +#undef CAIRO_REQUIRED_MAJOR +#undef CAIRO_REQUIRED_MINOR +#undef CAIRO_REQUIRED_MICRO + + return NULL; +} + static gchar * sanity_check_pango (void) { diff --git a/configure.ac b/configure.ac index 76f7612e14..066ae2fe73 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ m4_define([gegl_required_version], [0.1.2]) m4_define([glib_required_version], [2.24.0]) m4_define([gtk_required_version], [2.20.0]) m4_define([gdk_pixbuf_required_version], [gtk_required_version]) -m4_define([cairo_required_version], [1.6.0]) +m4_define([cairo_required_version], [1.8.0]) m4_define([pangocairo_required_version], [1.20.1]) m4_define([fontconfig_required_version], [2.2.0]) m4_define([gtkdoc_required_version], [1.0])