Bump minimum required versions of gtk+, goffice and gtkhtml

gtk+: 2.10
goffice: 0.5.1
gtkhtml: 3.14

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18703 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2010-02-21 18:30:32 +00:00
parent 3c7c04d699
commit 80e38458f8
25 changed files with 208 additions and 961 deletions

View File

@@ -253,7 +253,7 @@ then
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_GLIB_2_8, test "x$HAVE_GLIB_2_8" = "xyes")
AM_CONDITIONAL(HAVE_GLIB_2_12, test "x$HAVE_GLIB_2_12" = "xyes")
AC_MSG_CHECKING([for untested GLIB versions (glib >= 2.13.0)])
if $PKG_CONFIG 'glib-2.0 >= 2.13.0'
@@ -1039,28 +1039,16 @@ then
fi
GNOME_COMPILE_WARNINGS
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10)
AS_SCRUB_INCLUDE(GTK_CFLAGS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
HAVE_UNTESTED_GTK=yes
AC_MSG_CHECKING(for GTK - version >= 2.10.0)
if $PKG_CONFIG 'gtk+-2.0 >= 2.10.0'
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GTK_2_10,1,[System has gtk 2.10.0 or better])
HAVE_GTK_2_10=yes
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_GTK_2_10, test "x$HAVE_GTK_2_10" = "xyes" )
AC_MSG_CHECKING([for untested GDK versions (gdk > 2.11.0)])
AC_MSG_CHECKING([for untested GTK versions (gtk > 2.11.0)])
if $PKG_CONFIG 'gtk+-2.0 > 2.11.0'
then
AC_MSG_RESULT(yes)
HAVE_UNTESTED_GDK=yes
HAVE_UNTESTED_GTK=yes
fi
PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= 2.4)
@@ -1088,46 +1076,15 @@ then
AC_SUBST(GLADE_LIBS)
# checks for goffice
goffice=0
goffice_with_cairo=0
have_goffice_0_5=0
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.8 >= 0.7.0, [goffice=1], [
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.6 >= 0.6.0, [goffice=1], [
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.5 >= 0.5.1, [goffice=1], [goffice=0])
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.5 >= 0.5.1, [goffice=1], [AC_MSG_ERROR([Cannot find libgoffice.>= 0.5.1])])
])
])
if test x$goffice = x1
then
AC_DEFINE(HAVE_GOFFICE_0_5,1,[System has goffice 0.5.1 or better])
AC_DEFINE(GOFFICE_WITH_CAIRO,1,[GOffice has been built with cairo support])
have_goffice_0_5=1
goffice_with_cairo=1
else
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.4 >= 0.4.0, [goffice=1], [
PKG_CHECK_MODULES(GOFFICE, libgoffice-0.3 >= 0.3.0, [goffice=1], [
PKG_CHECK_MODULES(GOFFICE, libgoffice-1 >= 0.0.4, [goffice=1], [
AC_MSG_ERROR([Cannot find libgoffice.])
])
])
])
fi
AS_SCRUB_INCLUDE(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_CFLAGS)
AC_SUBST(GOFFICE_LIBS)
if test x$goffice_with_cairo = x0
then
saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GOFFICE_CFLAGS} ${CPPFLAGS}"
AC_CHECK_HEADER(goffice/graph/gog-renderer-cairo.h, [
AC_DEFINE(GOFFICE_WITH_CAIRO,1,[GOffice has been built with cairo support])
goffice_with_cairo=1
], [
goffice_with_cairo=0
])
CPPFLAGS="${saved_CPPFLAGS}"
fi
### --------------------------------------------------------------------------
### determine the HTML engine
@@ -1143,24 +1100,7 @@ then
# check for gtkhtml >= 3.14 with gtkprint support
gtkhtml=0
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.14, [
if test "x$HAVE_GTK_2_10" != "xyes"; then
AC_MSG_NOTICE([Found libgtkhtml-3.14, but not gtk+-2.0 >= 2.10])
elif test "x$goffice_with_cairo" != "x1"; then
AC_MSG_NOTICE([Found libgtkhtml-3.14, but goffice lacks a cairo renderer])
else
gtkhtml=1
AC_DEFINE(GTKHTML_USES_GTKPRINT,1,[GtkHTML uses GtkPrint for printing operations])
fi
], [gtkhtml=0])
AM_CONDITIONAL(GTKHTML_USES_GTKPRINT,test "x$gtkhtml" = "x1")
# GOffice >= 0.5 requires GtkHTML >= 3.14
if test x$have_goffice_0_5 = x1 -a x$gtkhtml = x0 ; then
AC_MSG_ERROR([Goffice uses Cairo/GtkPrint but didn't find GtkHTML with GtkPrint support])
fi
# check for gtkhtml >= 3.16 (includes gtk_html_print_operation_run())
if test x$gtkhtml = x1; then
# check for gtkhtml >= 3.16 (includes gtk_html_print_operation_run())
AC_MSG_CHECKING(for GtkHTML - version >= 3.16.0)
if $PKG_CONFIG 'libgtkhtml-3.14 >= 3.16.0'; then
AC_MSG_RESULT(yes)
@@ -1169,32 +1109,14 @@ then
else
AC_MSG_RESULT(no)
fi
fi
# fallback to older gtkhtml versions and gnomeprint
if test x$gtkhtml = x0
then
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.8 , [gtkhtml=1], [
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.6 , [gtkhtml=1], [
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.2 , [gtkhtml=1], [
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.1 , [gtkhtml=1], [
AC_MSG_ERROR([Could not find a working gtkhtml version (need 3.1, 3.2, 3.6, 3.8 or 3.14)])
])
])
])
])
PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
AC_SUBST(GNOME_PRINT_CFLAGS)
AC_SUBST(GNOME_PRINT_LIBS)
fi
;;
], [
AC_MSG_ERROR([cannot find GtkHTML >= 3.14])
])
;;
webkit)
PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= "1.0")
AC_DEFINE(WANT_WEBKIT,1,[Use webkit instead of gtkhtml])
AM_CONDITIONAL(GTKHTML_USES_GTKPRINT,false)
;;
*) AC_MSG_ERROR([Invalid HTML engine: must be gtkhtml or webkit]) ;;
esac
@@ -1207,6 +1129,7 @@ then
AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
dnl if Mac OSX, also scrub /sw/include
dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
case $host_os in
darwin*)
GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;"`
@@ -1247,8 +1170,6 @@ else
CFLAGS="${CFLAGS} -Wall"
fi
### AM conditionals that need to be set
AM_CONDITIONAL(HAVE_GTK_2_10, false)
fi
### End of gui-only checks
@@ -1274,26 +1195,6 @@ then
fi
if test x${HAVE_UNTESTED_GDK} = "xyes"
then
allow_deprecated=true
else
allow_deprecated=false
fi
AC_ARG_ENABLE(deprecated-gdk,
[AS_HELP_STRING([--disable-deprecated-gdk],[don't use deprecated gdk functions])],
[case "${enableval}" in
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
esac]
)
if test x${allow_deprecated} != "xtrue"
then
AC_DEFINE(GDK_DISABLE_DEPRECATED,1, [Don't use deprecated gdk functions])
AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1, [Don't use deprecated gdk-pixbuf functions])
fi
if test x${HAVE_UNTESTED_GTK} = "xyes"
then
allow_deprecated=true
@@ -1301,7 +1202,7 @@ else
allow_deprecated=false
fi
AC_ARG_ENABLE(deprecated-gtk,
[AS_HELP_STRING([--disable-deprecated-gtk],[don't use deprecated gtk functions])],
[AS_HELP_STRING([--disable-deprecated-gtk],[don't use deprecated gtk, gdk or gdk-pixbuf functions])],
[case "${enableval}" in
no) allow_deprecated=false ;;
*) allow_deprecated=true ;;
@@ -1310,6 +1211,8 @@ AC_ARG_ENABLE(deprecated-gtk,
if test x${allow_deprecated} != "xtrue"
then
AC_DEFINE(GTK_DISABLE_DEPRECATED,1, [Don't use deprecated gtk functions])
AC_DEFINE(GDK_DISABLE_DEPRECATED,1, [Don't use deprecated gdk functions])
AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1, [Don't use deprecated gdk-pixbuf functions])
fi