From e848ee98108ab8c5b12e2167b041b274b4bede83 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 8 Oct 2015 11:06:44 +0200 Subject: [PATCH] Update freetype includes to work with >=freetype-2.5.1 Signed-off-by: Lars Wendler --- configure.in | 22 +++------------------- libgnomeprint/gnome-font-face.c | 3 ++- libgnomeprint/gnome-print-gdi.c | 2 +- libgnomeprint/gnome-rfont.c | 4 ++-- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/configure.in b/configure.in index c15bb69..aebe591 100644 --- a/configure.in +++ b/configure.in @@ -162,25 +162,9 @@ LDFLAGS="$LDFLAGS $LIBM" dnl ================================= dnl Checking for freetype2 dnl ================================= -FREETYPE_LIBS= -FREETYPE_CFLAGS= -AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) -if test "x$FREETYPE_CONFIG" = "xno" ; then - AC_MSG_ERROR(You need FreeType2 (freetype-devel v 2.x package) for this version of libgnomeprint) -else - FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` - FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` -fi - -libgnomeprint_save_ldflags=$LDFLAGS -LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - -freetype_version=false -AC_MSG_NOTICE([checking for sufficiently new FreeType (at least 2.0.5)]) -AC_CHECK_LIB(freetype, FT_Get_Postscript_Name,:,[ - AC_MSG_ERROR(You need FreeType2 (freetype-devel 2.0.5 or greater package) for this version of libgnomeprint)]) - -LDFLAGS=$libgnomeprint_save_ldflags +dnl "freetype2 >= 17" means freetype-2.5.1 +PKG_CHECK_MODULES(FREETYPE, freetype2 >= 17, , + [PKG_CHECK_MODULES(FREETYPE, freetype2, [FREETYPE_CFLAGS="$FREETYPE_CFLAGS -I`$PKG_CONFIG --variable=includedir freetype2`/freetype2/freetype"])]) dnl ================================= dnl END: Checking for freetype2 diff --git a/libgnomeprint/gnome-font-face.c b/libgnomeprint/gnome-font-face.c index 0447377..23794a8 100644 --- a/libgnomeprint/gnome-font-face.c +++ b/libgnomeprint/gnome-font-face.c @@ -36,7 +36,8 @@ #include #include -#include +#include +#include FT_OUTLINE_H #include #include diff --git a/libgnomeprint/gnome-print-gdi.c b/libgnomeprint/gnome-print-gdi.c index f89a8e8..7755673 100755 --- a/libgnomeprint/gnome-print-gdi.c +++ b/libgnomeprint/gnome-print-gdi.c @@ -36,7 +36,7 @@ #include #include -#include +#include FT_FREETYPE_H #define WIN32_LEAN_AND_MEAN #include diff --git a/libgnomeprint/gnome-rfont.c b/libgnomeprint/gnome-rfont.c index 55ec261..a71bbda 100644 --- a/libgnomeprint/gnome-rfont.c +++ b/libgnomeprint/gnome-rfont.c @@ -28,8 +28,8 @@ #include #include FT_FREETYPE_H -#include -#include +#include FT_GLYPH_H +#include FT_BBOX_H #include #include #include -- 2.6.1