Depend on GTK+ >= 2.24.3, cairo >= 1.20.1, gdk-pixbuf >= 2.22.1

and completely separate configure and sanity checks for gdk-pixbuf
from GTK+, because it's now distributed as a separate package. Remove
all sorts of conditional compiling based on GDK_CHECK_VERSION() and
CAIRO_VERSION.
This commit is contained in:
Michael Natterer
2011-04-06 19:58:24 +02:00
parent a83876040d
commit 24ee3370b8
17 changed files with 69 additions and 150 deletions

View File

@ -21,6 +21,7 @@
#include <fontconfig/fontconfig.h>
#include <pango/pango.h>
#include <pango/pangoft2.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
@ -36,6 +37,7 @@ static gchar * sanity_check_cairo (void);
static gchar * sanity_check_pango (void);
static gchar * sanity_check_fontconfig (void);
static gchar * sanity_check_freetype (void);
static gchar * sanity_check_gdk_pixbuf (void);
static gchar * sanity_check_babl (void);
static gchar * sanity_check_gegl (void);
static gchar * sanity_check_filename_encoding (void);
@ -63,6 +65,9 @@ sanity_check (void)
if (! abort_message)
abort_message = sanity_check_freetype ();
if (! abort_message)
abort_message = sanity_check_gdk_pixbuf ();
if (! abort_message)
abort_message = sanity_check_babl ();
@ -158,8 +163,8 @@ static gchar *
sanity_check_cairo (void)
{
#define CAIRO_REQUIRED_MAJOR 1
#define CAIRO_REQUIRED_MINOR 8
#define CAIRO_REQUIRED_MICRO 0
#define CAIRO_REQUIRED_MINOR 10
#define CAIRO_REQUIRED_MICRO 2
if (cairo_version () < CAIRO_VERSION_ENCODE (CAIRO_REQUIRED_MAJOR,
CAIRO_REQUIRED_MINOR,
@ -307,6 +312,36 @@ sanity_check_freetype (void)
return NULL;
}
static gchar *
sanity_check_gdk_pixbuf (void)
{
#define GDK_PIXBUF_REQUIRED_MAJOR 2
#define GDK_PIXBUF_REQUIRED_MINOR 22
#define GDK_PIXBUF_REQUIRED_MICRO 1
if (! sanity_check_version (gdk_pixbuf_major_version, GDK_PIXBUF_REQUIRED_MAJOR,
gdk_pixbuf_minor_version, GDK_PIXBUF_REQUIRED_MINOR,
gdk_pixbuf_micro_version, GDK_PIXBUF_REQUIRED_MICRO))
{
return g_strdup_printf
("GdkPixbuf version too old!\n\n"
"GIMP requires GdkPixbuf version %d.%d.%d or later.\n"
"Installed GdkPixbuf version is %d.%d.%d.\n\n"
"Somehow you or your software packager managed\n"
"to install GIMP with an older GdkPixbuf version.\n\n"
"Please upgrade to GdkPixbuf version %d.%d.%d or later.",
GDK_PIXBUF_REQUIRED_MAJOR, GDK_PIXBUF_REQUIRED_MINOR, GDK_PIXBUF_REQUIRED_MICRO,
gdk_pixbuf_major_version, gdk_pixbuf_minor_version, gdk_pixbuf_micro_version,
GDK_PIXBUF_REQUIRED_MAJOR, GDK_PIXBUF_REQUIRED_MINOR, GDK_PIXBUF_REQUIRED_MICRO);
}
#undef GDK_PIXBUF_REQUIRED_MAJOR
#undef GDK_PIXBUF_REQUIRED_MINOR
#undef GDK_PIXBUF_REQUIRED_MICRO
return NULL;
}
static gchar *
sanity_check_babl (void)
{