aboutsummaryrefslogtreecommitdiff
path: root/freetype/builds/unix/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/builds/unix/configure.ac')
-rw-r--r--freetype/builds/unix/configure.ac46
1 files changed, 38 insertions, 8 deletions
diff --git a/freetype/builds/unix/configure.ac b/freetype/builds/unix/configure.ac
index 7189d4e81..e00d2cc33 100644
--- a/freetype/builds/unix/configure.ac
+++ b/freetype/builds/unix/configure.ac
@@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
-# Copyright 2001-2012 by
+# Copyright 2001-2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -11,13 +11,13 @@
# indicate that you have read the license and understand and accept it
# fully.
-AC_INIT([FreeType], [2.4.11], [freetype@nongnu.org], [freetype])
+AC_INIT([FreeType], [2.5], [freetype@nongnu.org], [freetype])
AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
-version_info='16:0:10'
+version_info='16:2:10'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -254,12 +254,15 @@ AC_ARG_WITH([zlib],
AS_HELP_STRING([--without-zlib],
[use internal zlib instead of system-wide]))
if test x$with_zlib != xno && test -z "$LIBZ"; then
- AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
+ AC_CHECK_LIB([z],
+ [gzsetparams],
+ [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
fi
if test x$with_zlib != xno && test -n "$LIBZ"; then
SYSTEM_ZLIB=yes
fi
+
# check for system libbz2
# don't quote AS_HELP_STRING!
@@ -267,12 +270,37 @@ AC_ARG_WITH([bzip2],
AS_HELP_STRING([--without-bzip2],
[do not support bzip2 compressed fonts]))
if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then
- AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
+ AC_CHECK_LIB([bz2],
+ [BZ2_bzDecompress],
+ [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
fi
if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
SYSTEM_LIBBZ2=yes
fi
+
+# check for system libpng
+
+HAVE_LIBPNG=no
+AC_ARG_WITH([png],
+ AS_HELP_STRING([--without-png],
+ [do not support png compressed OpenType embedded bitmaps]))
+if test x$with_png != xno; then
+ AC_MSG_CHECKING([for libpng])
+ if test -z "$LIBPNG_CFLAGS" -a -z "$LIBPNG_LDFLAGS"; then
+ if ! which libpng-config >/dev/null; then
+ AC_MSG_ERROR([`libpng-config' not found;
+either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables,
+or pass `--without-png' to the `configure' script.])
+ fi
+ LIBPNG_CFLAGS="`libpng-config --cflags`"
+ LIBPNG_LDFLAGS="`libpng-config --ldflags`"
+ fi
+ HAVE_LIBPNG=yes
+ AC_MSG_RESULT([$LIBPNG_LDFLAGS])
+fi
+
+
# Some options handling SDKs/archs in CFLAGS should be copied
# to LDFLAGS. Apple TechNote 2137 recommends to include these
# options in CFLAGS but not in LDFLAGS.
@@ -709,6 +737,10 @@ if test x$SYSTEM_LIBBZ2 = xyes; then
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
LDFLAGS="$LDFLAGS $LIBBZ2"
fi
+if test x$HAVE_LIBPNG = xyes; then
+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
+ LDFLAGS="$LDFLAGS $LIBPNG_LDFLAGS"
+fi
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
@@ -727,9 +759,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
# and `builds/unix/unix-cc.mk' that will be used by the build system
#
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
- unix-def.mk:unix-def.in
- freetype-config
- freetype2.pc:freetype2.in])
+ unix-def.mk:unix-def.in])
# re-generate the Jamfile to use libtool now
#