From c8c873fb519799f61034d61f23f6e2ec1decb569 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 19 Sep 2001 21:20:36 +0000 Subject: header to abstract the difference between FreeType 2.0.3 and 2.0.4 error 2001-09-19 Havoc Pennington * pango/opentype/fterrcompat.h: header to abstract the difference between FreeType 2.0.3 and 2.0.4 error codes, based on the configure check. * configure.in: check for the tterrors.h header in FreeType 2.0.3, and define HAVE_FREETYPE_2_0_3 if we have it --- ChangeLog | 9 +++++++++ ChangeLog.pre-1-0 | 9 +++++++++ ChangeLog.pre-1-10 | 9 +++++++++ ChangeLog.pre-1-2 | 9 +++++++++ ChangeLog.pre-1-4 | 9 +++++++++ ChangeLog.pre-1-6 | 9 +++++++++ ChangeLog.pre-1-8 | 9 +++++++++ acconfig.h | 1 + configure.in | 6 ++++++ pango/opentype/Makefile.am | 1 + pango/opentype/fterrcompat.h | 16 ++++++++++++++++ pango/opentype/ftxgdef.c | 3 ++- pango/opentype/ftxgpos.c | 3 ++- pango/opentype/ftxgsub.c | 3 ++- pango/opentype/ftxopen.c | 3 ++- pango/opentype/pango-ot-info.c | 2 +- 16 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 pango/opentype/fterrcompat.h diff --git a/ChangeLog b/ChangeLog index c5c54a49..7c6faab8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index c5c54a49..7c6faab8 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,12 @@ +2001-09-19 Havoc Pennington + + * pango/opentype/fterrcompat.h: header to abstract the difference + between FreeType 2.0.3 and 2.0.4 error codes, based on the + configure check. + + * configure.in: check for the tterrors.h header in FreeType 2.0.3, + and define HAVE_FREETYPE_2_0_3 if we have it + Wed Sep 19 10:48:04 2001 Tim Janik * Released 0.19. diff --git a/acconfig.h b/acconfig.h index fa17938e..7f052237 100644 --- a/acconfig.h +++ b/acconfig.h @@ -16,3 +16,4 @@ #undef HAVE_FRIBIDI #undef HAVE_UNISTD_H +#undef HAVE_FREETYPE_2_0_3 diff --git a/configure.in b/configure.in index 77b75448..780c6be4 100644 --- a/configure.in +++ b/configure.in @@ -87,6 +87,12 @@ AC_SUBST(FREETYPE_LIBS) AC_SUBST(FREETYPE_CFLAGS) AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) +## see which freetype we have, 2.0.3 vs. 2.0.4 +pango_save_cppflags="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" +AC_CHECK_HEADER(freetype/internal/tterrors.h, AC_DEFINE(HAVE_FREETYPE_2_0_3)) +CPPFLAGS="$pango_save_cppflags" + # # Checks for Xft/XRender # diff --git a/pango/opentype/Makefile.am b/pango/opentype/Makefile.am index 9f9c9dd5..2081396a 100644 --- a/pango/opentype/Makefile.am +++ b/pango/opentype/Makefile.am @@ -18,6 +18,7 @@ LDADDS = @STRIP_BEGIN@ \ noinst_LTLIBRARIES = libpango-ot.la libpango_ot_la_SOURCES = \ + fterrcompat.h \ ftxopen.c \ ftxopen.h \ ftxopenf.h \ diff --git a/pango/opentype/fterrcompat.h b/pango/opentype/fterrcompat.h new file mode 100644 index 00000000..70b45e22 --- /dev/null +++ b/pango/opentype/fterrcompat.h @@ -0,0 +1,16 @@ + +#ifndef FTERRCOMPAT_H +#define FTERRCOMPAT_H + +#include + +#ifdef HAVE_FREETYPE_2_0_3 +#include +#else +#define TT_Err_Ok FT_Err_Ok +#define TT_Err_Invalid_Argument FT_Err_Invalid_Argument +#define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle +#define TT_Err_Table_Missing FT_Err_Table_Missing +#endif + +#endif diff --git a/pango/opentype/ftxgdef.c b/pango/opentype/ftxgdef.c index ee177e85..54b1dd01 100644 --- a/pango/opentype/ftxgdef.c +++ b/pango/opentype/ftxgdef.c @@ -19,9 +19,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c index 07d73d9f..7515b53b 100644 --- a/pango/opentype/ftxgpos.c +++ b/pango/opentype/ftxgpos.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/pango/opentype/ftxgsub.c b/pango/opentype/ftxgsub.c index 43adb2ce..b1f516cd 100644 --- a/pango/opentype/ftxgsub.c +++ b/pango/opentype/ftxgsub.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/pango/opentype/ftxopen.c b/pango/opentype/ftxopen.c index 07a50290..7815aba8 100644 --- a/pango/opentype/ftxopen.c +++ b/pango/opentype/ftxopen.c @@ -17,9 +17,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/pango/opentype/pango-ot-info.c b/pango/opentype/pango-ot-info.c index b426e32e..5a657c45 100644 --- a/pango/opentype/pango-ot-info.c +++ b/pango/opentype/pango-ot-info.c @@ -20,7 +20,7 @@ */ #include "pango-ot-private.h" -#include +#include "fterrcompat.h" #include #include -- cgit v1.2.1