Fix Gtk+ < 2.13 and GIO build

This commit is contained in:
Christian Dywan 2008-07-06 23:47:40 +02:00
parent c796974152
commit 25edd5e13b
5 changed files with 17 additions and 2 deletions

View File

@ -38,6 +38,14 @@ if test x"$enable_debug" = x"yes"; then
])
fi
# Checks for GIO2
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, have_gio=true, have_gio=false)
if test "x${have_gio}" = "xfalse" ; then
AC_MSG_ERROR([No GIO2 package information found])
fi
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
# Checks for GTK+2
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6, have_gtk=true, have_gtk=false)
if test "x${have_gtk}" = "xfalse" ; then

View File

@ -1,4 +1,5 @@
INCLUDES = \
$(GIO_CFLAGS) \
$(GTK_CFLAGS) \
$(WEBKIT_CFLAGS) \
$(LIBSEXY_CFLAGS) \
@ -7,6 +8,7 @@ INCLUDES = \
AM_CFLAGS = -DMIDORI_LOCALEDIR=\""$(localedir)"\"
LDADD = \
$(GIO_LIBS) \
$(GTK_LIBS) \
$(WEBKIT_LIBS) \
$(LIBSEXY_LIBS) \

View File

@ -12,7 +12,7 @@
#ifndef __COMPAT_H__
#define __COMPAT_H__
#include "glib.h"
#include <glib.h>
#if GLIB_CHECK_VERSION(2, 16, 0)
#include <gio/gio.h>
#endif
@ -22,6 +22,8 @@ G_BEGIN_DECLS
#if !GTK_CHECK_VERSION(2, 14, 0)
#if GLIB_CHECK_VERSION(2,16, 0)
GdkPixbuf*
gdk_pixbuf_new_from_stream (GInputStream* stream,
GCancellable* cancellable,
@ -29,6 +31,8 @@ gdk_pixbuf_new_from_stream (GInputStream* stream,
#endif
#endif
#if !GTK_CHECK_VERSION(2, 12, 0)
void

View File

@ -5,5 +5,5 @@ obj = bld.create_obj ('cc', 'program')
obj.target = 'midori'
obj.includes = '.. ../katze'
obj.find_sources_in_dirs ('.')
obj.uselib = 'GTK WEBKIT LIBXML LIBSEXY'
obj.uselib = 'GIO GTK WEBKIT LIBXML LIBSEXY'
obj.uselib_local = 'katze'

View File

@ -35,6 +35,7 @@ def configure (conf):
nls = 'no'
conf.check_message_custom ('localization', 'support', nls)
conf.check_pkg ('gio-2.0', destvar='GIO', vnum='2.16.0', mandatory=False)
conf.check_pkg ('gtk+-2.0', destvar='GTK', vnum='2.6.0', mandatory=True)
conf.check_pkg ('webkit-1.0', destvar='WEBKIT', vnum='0.1', mandatory=True)
conf.check_pkg ('libxml-2.0', destvar='LIBXML', vnum='2.6', mandatory=True)