summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-08-21 23:14:04 +0000
committerKristian Høgsberg <krh@redhat.com>2005-08-21 23:14:04 +0000
commit6070b1dc4b76c236f3100fbd255c2d906e61c3c2 (patch)
tree39ad7f621ad2cfdc328d968827cf47639e90aa6a /configure.ac
parent2698ca6fa107ea91dc01eb8cfb0c93383fbca125 (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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 24 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 84b0b652..a654814a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Based on Xpdf configure.in and evince configure.ac
AC_PREREQ(2.59)
-AC_INIT(poppler, 0.3.3)
+AC_INIT(poppler, 0.5.0-cvs)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(poppler/poppler-config.h)
@@ -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