diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-08-21 23:12:39 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2005-08-21 23:12:39 +0000 |
commit | 3061cc51890038b8fc930d4d3841c2f1dfbbd40a (patch) | |
tree | a68d7464f44bb6259dbde1983027e0d751e32afd | |
parent | d9d820ff2da5064df80fc5f4df4138b6f52d1177 (diff) |
2005-08-21 Kristian Høgsberg <krh@redhat.com>
* poppler/Makefile.am (INCLUDES): Add FREETYPE_CFLAGS.
* configure.ac: Make freetype check use pkg-config if possible.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 32 | ||||
-rw-r--r-- | poppler/Makefile.am | 1 |
3 files changed, 30 insertions, 9 deletions
@@ -1,3 +1,9 @@ +2005-08-21 Kristian Høgsberg <krh@redhat.com> + + * poppler/Makefile.am (INCLUDES): Add FREETYPE_CFLAGS. + + * configure.ac: Make freetype check use pkg-config if possible. + 2005-08-16 Kristian Høgsberg <krh@redhat.com> * configure.ac: Bump version to 0.4.0. diff --git a/configure.ac b/configure.ac index 87680eb7..401b3015 100644 --- a/configure.ac +++ b/configure.ac @@ -144,17 +144,31 @@ AH_TEMPLATE([ENABLE_LIBJPEG], dnl Check for freetype headers FREETYPE_LIBS= FREETYPE_CFLAGS= -AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) -if test "x$FREETYPE_CONFIG" != "xno" ; then - FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` - FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` +FREETYPE_MIN_VERSION=9.5.3 + +PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION, + [freetype_pkgconfig=yes], [freetype_pkgconfig=no]) + +if test "x$freetype_pkgconfig" = "xyes"; then + AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files]) + AC_DEFINE_UNQUOTED(HAVE_FREETYPE_217_OR_OLDER, 1, [Defines if your system has the freetype library 2.1.7 or older]) - vers=`$FREETYPE_CONFIG --version 2>/dev/null | sed -e 's/libfreetype //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test -n "$vers" && test "$vers" -le 9005003; then - AC_DEFINE_UNQUOTED(HAVE_FREETYPE_217_OR_OLDER, 1, [Defines if your system has the freetype library 2.1.7 or older]) - else - AC_DEFINE_UNQUOTED(HAVE_FREETYPE_217_OR_OLDER, 0, [Defines if your system has the freetype library 2.1.7 or older]) +else + + AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) + if test "x$FREETYPE_CONFIG" != "xno" ; then + FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` + FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` + AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files]) + + vers=`$FREETYPE_CONFIG --version 2>/dev/null | sed -e 's/libfreetype //' | awk 'BEGIN { FS = "."; } { printf "%d", $1 * 10000 + $2 * 100 + $3;}'` + min_vers=`echo $FREETYPE_MIN_VERSION | awk 'BEGIN { FS = "."; } { printf "%d", $1 * 10000 + $2 * 100 + $3;}'` + if test -n "$vers" && test "$vers" -le $min_vers; then + AC_DEFINE_UNQUOTED(HAVE_FREETYPE_217_OR_OLDER, 1, [Defines if your system has the freetype library 2.1.7 or older]) + else + AC_DEFINE_UNQUOTED(HAVE_FREETYPE_217_OR_OLDER, 0, [Defines if your system has the freetype library 2.1.7 or older]) + fi fi fi diff --git a/poppler/Makefile.am b/poppler/Makefile.am index d1f0d498..f023cc66 100644 --- a/poppler/Makefile.am +++ b/poppler/Makefile.am @@ -77,6 +77,7 @@ INCLUDES = \ $(splash_includes) \ $(cairo_includes) \ $(arthur_includes) \ + $(FREETYPE_CFLAGS) \ -DDATADIR=\""$(datadir)"\" lib_LTLIBRARIES = libpoppler.la |