2003-11-09 09:37:14 +01:00
|
|
|
# This file is part of the FreeType project.
|
|
|
|
#
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
2005-06-05 01:04:30 +02:00
|
|
|
#
|
2014-03-01 12:32:20 +01:00
|
|
|
# Copyright 2001-2014 by
|
2005-06-05 01:04:30 +02:00
|
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
#
|
|
|
|
# This file is part of the FreeType project, and may only be used, modified,
|
|
|
|
# and distributed under the terms of the FreeType project license,
|
|
|
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
|
|
|
# indicate that you have read the license and understand and accept it
|
|
|
|
# fully.
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2006-05-08 09:10:29 +02:00
|
|
|
AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype])
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_CONFIG_SRCDIR([ftconfig.in])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Don't forget to update docs/VERSION.DLL!
|
|
|
|
|
* Version 2.5.4 released.
=========================
Tag sources with `VER-2-5-4'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.4.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
* builds/unix/configure.raw (version_info): Set to 17:3:11.
* CMakeLists.txt (VERSION_PATCH): Set to 4.
* docs/CHANGES: Updated.
2014-12-06 07:11:44 +01:00
|
|
|
version_info='17:3:11'
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([version_info])
|
2001-03-20 08:52:52 +01:00
|
|
|
ft_version=`echo $version_info | tr : .`
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([ft_version])
|
|
|
|
|
|
|
|
|
|
|
|
# checks for system type
|
|
|
|
|
2006-10-14 15:08:05 +02:00
|
|
|
AC_CANONICAL_HOST
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# checks for programs
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
2006-10-14 15:08:05 +02:00
|
|
|
AC_SUBST(EXEEXT)
|
|
|
|
|
2014-03-01 06:57:19 +01:00
|
|
|
PKG_PROG_PKG_CONFIG([0.24])
|
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
LT_INIT(win32-dll)
|
|
|
|
|
2006-10-14 15:08:05 +02:00
|
|
|
|
|
|
|
# checks for native programs to generate building tool
|
|
|
|
|
|
|
|
if test ${cross_compiling} = yes; then
|
2007-08-11 18:35:06 +02:00
|
|
|
AC_CHECK_PROG(CC_BUILD, ${build}-gcc, ${build}-gcc)
|
2006-10-14 15:08:05 +02:00
|
|
|
test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, gcc, gcc)
|
|
|
|
test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, cc, cc, , , /usr/ucb/cc)
|
|
|
|
test -z "${CC_BUILD}" && AC_MSG_ERROR([cannot find native C compiler])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for suffix of native executables])
|
|
|
|
rm -f a.* b.* a_out.exe conftest.*
|
|
|
|
echo > conftest.c "int main() { return 0;}"
|
|
|
|
${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working])
|
|
|
|
rm -f conftest.c
|
|
|
|
if test -x a.out -o -x b.out -o -x conftest; then
|
|
|
|
EXEEXT_BUILD=""
|
|
|
|
elif test -x a_out.exe -o -x conftest.exe; then
|
|
|
|
EXEEXT_BUILD=".exe"
|
2011-05-01 12:30:37 +02:00
|
|
|
elif test -x conftest.*; then
|
2009-06-27 07:27:55 +02:00
|
|
|
EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'`
|
2006-10-14 15:08:05 +02:00
|
|
|
fi
|
2009-09-12 19:12:44 +02:00
|
|
|
rm -f a.* b.* a_out.exe conftest.*
|
2006-10-14 15:08:05 +02:00
|
|
|
AC_MSG_RESULT($EXEEXT_BUILD)
|
|
|
|
else
|
|
|
|
CC_BUILD=${CC}
|
|
|
|
EXEEXT_BUILD=${EXEEXT}
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(CC_BUILD)
|
|
|
|
AC_SUBST(EXEEXT_BUILD)
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# auxiliary programs
|
|
|
|
|
|
|
|
AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-31 12:56:42 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Since this file will be finally moved to another directory we make
|
|
|
|
# the path of the install script absolute. This small code snippet has
|
|
|
|
# been taken from automake's `ylwrap' script.
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_PROG_INSTALL
|
2000-07-31 12:56:42 +02:00
|
|
|
case "$INSTALL" in
|
2003-11-09 09:37:14 +01:00
|
|
|
/*)
|
|
|
|
;;
|
|
|
|
*/*)
|
2011-05-01 12:30:37 +02:00
|
|
|
INSTALL="`pwd`/$INSTALL"
|
|
|
|
;;
|
2000-07-31 12:56:42 +02:00
|
|
|
esac
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# checks for header files
|
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
AC_HEADER_STDC
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_HEADERS([fcntl.h unistd.h])
|
|
|
|
|
|
|
|
|
|
|
|
# checks for typedefs, structures, and compiler characteristics
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
AC_C_CONST
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_SIZEOF([int])
|
|
|
|
AC_CHECK_SIZEOF([long])
|
|
|
|
|
|
|
|
|
2008-09-12 18:27:48 +02:00
|
|
|
# check whether cpp computation of size of int and long in ftconfig.in works
|
2008-09-11 10:02:23 +02:00
|
|
|
|
2012-01-30 14:14:43 +01:00
|
|
|
AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
|
2008-09-11 10:02:23 +02:00
|
|
|
orig_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
|
2012-11-30 13:45:47 +01:00
|
|
|
|
|
|
|
ac_clean_files=
|
|
|
|
for f in ft2build.h ftoption.h ftstdlib.h; do
|
|
|
|
if test ! -f $f; then
|
|
|
|
ac_clean_files="$ac_clean_files $f"
|
|
|
|
touch $f
|
|
|
|
fi
|
|
|
|
done
|
2008-09-12 18:27:48 +02:00
|
|
|
|
2008-09-11 10:02:23 +02:00
|
|
|
cat > conftest.c <<\_ACEOF
|
|
|
|
#include <limits.h>
|
|
|
|
#define FT_CONFIG_OPTIONS_H "ftoption.h"
|
|
|
|
#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
|
|
|
|
#define FT_UINT_MAX UINT_MAX
|
|
|
|
#define FT_ULONG_MAX ULONG_MAX
|
|
|
|
#include "ftconfig.in"
|
|
|
|
_ACEOF
|
|
|
|
echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
|
|
|
|
echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
|
|
|
|
echo >> conftest.c "#endif"
|
|
|
|
echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
|
|
|
|
echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
|
|
|
|
echo >> conftest.c "#endif"
|
2008-09-12 18:27:48 +02:00
|
|
|
|
2008-09-11 10:02:23 +02:00
|
|
|
${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh
|
|
|
|
eval `cat conftest.sh`
|
2012-11-30 13:45:47 +01:00
|
|
|
rm -f conftest.* $ac_clean_files
|
2008-09-12 18:27:48 +02:00
|
|
|
|
|
|
|
if test x != "x${ac_cpp_ft_sizeof_int}" \
|
|
|
|
-a x != x"${ac_cpp_ft_sizeof_long}"; then
|
2008-09-11 10:02:23 +02:00
|
|
|
unset ft_use_autoconf_sizeof_types
|
|
|
|
else
|
2008-09-12 18:27:48 +02:00
|
|
|
ft_use_autoconf_sizeof_types=yes
|
2008-09-11 10:02:23 +02:00
|
|
|
fi
|
2008-09-12 18:27:48 +02:00
|
|
|
|
2008-09-11 10:02:23 +02:00
|
|
|
AC_ARG_ENABLE(biarch-config,
|
|
|
|
[ --enable-biarch-config install biarch ftconfig.h to support multiple
|
2008-09-12 18:27:48 +02:00
|
|
|
architectures by single file], [], [])
|
2008-09-11 10:02:23 +02:00
|
|
|
|
|
|
|
case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
|
2008-09-12 18:27:48 +02:00
|
|
|
:yes:yes:)
|
|
|
|
AC_MSG_RESULT([broken but use it])
|
2008-09-11 10:02:23 +02:00
|
|
|
unset ft_use_autoconf_sizeof_types
|
|
|
|
;;
|
2008-09-12 18:27:48 +02:00
|
|
|
::no:)
|
|
|
|
AC_MSG_RESULT([works but ignore it])
|
|
|
|
ft_use_autoconf_sizeof_types=yes
|
2008-09-11 10:02:23 +02:00
|
|
|
;;
|
2008-09-12 18:27:48 +02:00
|
|
|
::yes: | :::)
|
2008-09-11 10:02:23 +02:00
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
unset ft_use_autoconf_sizeof_types
|
|
|
|
;;
|
2008-09-12 18:27:48 +02:00
|
|
|
*)
|
2008-09-11 10:02:23 +02:00
|
|
|
AC_MSG_RESULT([no])
|
2008-09-12 18:27:48 +02:00
|
|
|
ft_use_autoconf_sizeof_types=yes
|
2008-09-11 10:02:23 +02:00
|
|
|
;;
|
|
|
|
esac
|
2008-09-12 18:27:48 +02:00
|
|
|
|
|
|
|
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
|
2012-05-29 13:57:12 +02:00
|
|
|
AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [],
|
|
|
|
[Define if autoconf sizeof types should be used.])
|
2008-09-11 10:02:23 +02:00
|
|
|
fi
|
2008-09-12 18:27:48 +02:00
|
|
|
|
2008-09-11 10:02:23 +02:00
|
|
|
CPPFLAGS="${orig_CPPFLAGS}"
|
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# checks for library functions
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Here we check whether we can use our mmap file component.
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2011-05-01 12:06:24 +02:00
|
|
|
AC_ARG_ENABLE([mmap],
|
|
|
|
AS_HELP_STRING([--disable-mmap],
|
|
|
|
[do not check mmap() and do not use]),
|
|
|
|
[enable_mmap="no"],[enable_mmap="yes"])
|
|
|
|
if test "x${enable_mmap}" != "xno"; then
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
fi
|
2011-05-01 12:30:37 +02:00
|
|
|
if test "x${enable_mmap}" = "xno" \
|
|
|
|
-o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
|
2000-07-08 02:22:20 +02:00
|
|
|
else
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
|
2000-08-01 00:51:00 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_DECLS([munmap],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
[
|
|
|
|
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2000-08-01 00:51:00 +02:00
|
|
|
FT_MUNMAP_PARAM
|
2000-07-08 02:22:20 +02:00
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([FTSYS_SRC])
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS([memcpy memmove])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2012-03-21 07:42:14 +01:00
|
|
|
# get compiler flags right
|
2014-02-04 16:14:09 +01:00
|
|
|
#
|
|
|
|
# We try to make the compiler work for C89-strict source. Even if the
|
|
|
|
# C compiler is gcc and C89 flags are available, some system headers
|
|
|
|
# (e.g., Android Bionic libc) are broken in C89 mode. We have to check
|
|
|
|
# whether the compilation finishes successfully.
|
|
|
|
#
|
|
|
|
# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
|
2012-03-21 07:42:14 +01:00
|
|
|
#
|
2014-03-01 21:00:02 +01:00
|
|
|
# To avoid zillions of
|
|
|
|
#
|
|
|
|
# ISO C90 does not support 'long long'
|
|
|
|
#
|
|
|
|
# warnings, we disable `-pedantic' for gcc version < 4.6.
|
|
|
|
#
|
2012-03-21 07:42:14 +01:00
|
|
|
if test "x$GCC" = xyes; then
|
|
|
|
XX_CFLAGS="-Wall"
|
2014-02-04 16:14:09 +01:00
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*)
|
|
|
|
XX_ANSIFLAGS="-pedantic"
|
|
|
|
;;
|
|
|
|
*)
|
2014-03-01 21:00:02 +01:00
|
|
|
GCC_VERSION=`$CC -dumpversion`
|
|
|
|
GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
|
|
|
|
GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
|
|
|
|
|
|
|
|
XX_PEDANTIC=-pedantic
|
|
|
|
if test $GCC_MAJOR -lt 4; then
|
|
|
|
XX_PEDANTIC=
|
|
|
|
else
|
|
|
|
if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
|
|
|
|
XX_PEDANTIC=
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-02-04 16:14:09 +01:00
|
|
|
XX_ANSIFLAGS=""
|
2014-03-01 21:00:02 +01:00
|
|
|
for a in $XX_PEDANTIC -ansi
|
2014-02-04 16:14:09 +01:00
|
|
|
do
|
|
|
|
AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
|
|
|
|
orig_CFLAGS="${CFLAGS}"
|
|
|
|
CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
],
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
puts( "" );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
])],
|
|
|
|
[AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
|
|
|
|
XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
CFLAGS="${orig_CFLAGS}"
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
esac
|
2012-03-21 07:42:14 +01:00
|
|
|
else
|
|
|
|
case "$host" in
|
|
|
|
*-dec-osf*)
|
|
|
|
CFLAGS=
|
|
|
|
XX_CFLAGS="-std1 -g3"
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
XX_CFLAGS=
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
AC_SUBST([XX_CFLAGS])
|
|
|
|
AC_SUBST([XX_ANSIFLAGS])
|
|
|
|
|
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
# All library tests below try `pkg-config' first. If that fails, a function
|
|
|
|
# from the library is tested in the traditional autoconf way (zlib, bzip2),
|
|
|
|
# or a config script is called (libpng).
|
|
|
|
#
|
|
|
|
# The `xxx_reqpriv' variables are for the `Requires.private' field in
|
|
|
|
# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private'
|
|
|
|
# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file.
|
|
|
|
#
|
|
|
|
# The `xxx_libstaticconf' variables are for the `freetype-config' script.
|
|
|
|
#
|
|
|
|
# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the
|
|
|
|
# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set
|
|
|
|
# for a library by the user, no entry for this library is added to
|
|
|
|
# `Requires.private'. Instead, it gets added to `Libs.private'
|
|
|
|
|
|
|
|
|
2008-06-23 00:41:24 +02:00
|
|
|
# check for system zlib
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH([zlib],
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
[AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@],
|
|
|
|
[use system zlib instead of internal library @<:@default=auto@:>@])],
|
|
|
|
[], [with_zlib=auto])
|
2003-05-11 09:12:26 +02:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
have_zlib=no
|
|
|
|
if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then
|
|
|
|
zlib_pkg="zlib"
|
|
|
|
have_zlib_pkg=no
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then
|
|
|
|
PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes])
|
|
|
|
fi
|
|
|
|
PKG_CHECK_MODULES([ZLIB], [$zlib_pkg],
|
|
|
|
[have_zlib="yes (pkg-config)"], [:])
|
|
|
|
|
|
|
|
if test $have_zlib_pkg = yes; then
|
|
|
|
# we have zlib.pc
|
|
|
|
zlib_reqpriv="$zlib_pkg"
|
|
|
|
zlib_libpriv=
|
|
|
|
zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"`
|
|
|
|
else
|
|
|
|
zlib_reqpriv=
|
|
|
|
|
|
|
|
if test "$have_zlib" != no; then
|
|
|
|
# ZLIB_CFLAGS and ZLIB_LIBS are set by the user
|
|
|
|
zlib_libpriv="$ZLIB_LIBS"
|
|
|
|
zlib_libstaticconf="$ZLIB_LIBS"
|
|
|
|
have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)"
|
|
|
|
else
|
|
|
|
# fall back to standard autoconf test
|
|
|
|
AC_CHECK_LIB([z],
|
|
|
|
[gzsetparams],
|
|
|
|
[AC_CHECK_HEADER([zlib.h],
|
|
|
|
[have_zlib="yes (autoconf test)"
|
|
|
|
zlib_libpriv="-lz"
|
|
|
|
zlib_libstaticconf="$zlib_libpriv"
|
|
|
|
ZLIB_LIBS="$zlib_libpriv"])])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
|
|
|
|
AC_MSG_ERROR([external zlib support requested but library not found])
|
|
|
|
fi
|
2014-03-01 12:32:20 +01:00
|
|
|
|
|
|
|
|
2010-12-31 16:59:33 +01:00
|
|
|
# check for system libbz2
|
|
|
|
|
|
|
|
AC_ARG_WITH([bzip2],
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
[AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@],
|
|
|
|
[support bzip2 compressed fonts @<:@default=auto@:>@])],
|
|
|
|
[], [with_bzip2=auto])
|
|
|
|
|
|
|
|
have_bzip2=no
|
|
|
|
if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then
|
|
|
|
bzip2_pkg="bzip2"
|
|
|
|
have_bzip2_pkg=no
|
|
|
|
|
|
|
|
if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then
|
|
|
|
PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes])
|
|
|
|
fi
|
|
|
|
PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg],
|
|
|
|
[have_bzip2="yes (pkg-config)"], [:])
|
|
|
|
|
|
|
|
if test $have_bzip2_pkg = yes; then
|
|
|
|
# we have bzip2.pc
|
|
|
|
bzip2_reqpriv="$bzip2_pkg"
|
|
|
|
bzip2_libpriv=
|
|
|
|
bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"`
|
2014-03-01 12:32:20 +01:00
|
|
|
else
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
bzip2_reqpriv=
|
|
|
|
|
|
|
|
if test "$have_bzip2" != no; then
|
|
|
|
# BZIP2_CFLAGS and BZIP2_LIBS are set by the user
|
|
|
|
bzip2_libpriv="$BZIP2_LIBS"
|
|
|
|
bzip2_libstaticconf="$BZIP2_LIBS"
|
|
|
|
have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)"
|
|
|
|
else
|
|
|
|
# fall back to standard autoconf test
|
|
|
|
AC_CHECK_LIB([bz2],
|
|
|
|
[BZ2_bzDecompress],
|
|
|
|
[AC_CHECK_HEADER([bzlib.h],
|
|
|
|
[have_bzip2="yes (autoconf test)"
|
|
|
|
bzip2_libpriv="-lbz2"
|
|
|
|
bzip2_libstaticconf="$bzip2_libpriv"
|
|
|
|
BZIP2_LIBS="$bzip2_libpriv"])])
|
|
|
|
fi
|
2014-03-01 12:32:20 +01:00
|
|
|
fi
|
2010-12-31 16:59:33 +01:00
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then
|
|
|
|
AC_MSG_ERROR([bzip2 support requested but library not found])
|
|
|
|
fi
|
|
|
|
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
|
|
|
|
# check for system libpng
|
|
|
|
|
|
|
|
AC_ARG_WITH([png],
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
[AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@],
|
|
|
|
[support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])],
|
|
|
|
[], [with_png=auto])
|
|
|
|
|
|
|
|
have_libpng=no
|
|
|
|
if test x"$with_png" = xyes -o x"$with_png" = xauto; then
|
|
|
|
libpng_pkg="libpng"
|
|
|
|
have_libpng_pkg=no
|
|
|
|
|
|
|
|
if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then
|
|
|
|
PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes])
|
|
|
|
fi
|
|
|
|
PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg],
|
|
|
|
[have_libpng="yes (pkg-config)"], [:])
|
|
|
|
|
|
|
|
if test $have_libpng_pkg = yes; then
|
|
|
|
# we have libpng.pc
|
|
|
|
libpng_reqpriv="$libpng_pkg"
|
|
|
|
libpng_libpriv=
|
|
|
|
libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"`
|
2014-03-01 12:32:20 +01:00
|
|
|
else
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
libpng_reqpriv=
|
|
|
|
|
|
|
|
if test "$have_libpng" != no; then
|
|
|
|
# LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user
|
|
|
|
libpng_libpriv="$LIBPNG_LIBS"
|
|
|
|
libpng_libstaticconf="$LIBPNG_LIBS"
|
|
|
|
have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
|
|
|
|
else
|
|
|
|
# fall back to config script.
|
|
|
|
AC_MSG_CHECKING([for libpng-config])
|
2014-03-14 08:06:06 +01:00
|
|
|
if which libpng-config > /dev/null 2>&1; then
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
LIBPNG_CFLAGS=`libpng-config --cflags`
|
|
|
|
LIBPNG_LIBS=`libpng-config --ldflags`
|
|
|
|
libpng_libpriv=`libpng-config --static --ldflags`
|
|
|
|
libpng_libstaticconf="$libpng_libpriv"
|
|
|
|
have_libpng="yes (libpng-config)"
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
fi
|
2014-03-01 12:32:20 +01:00
|
|
|
fi
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
fi
|
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
if test x"$with_png" = xyes -a "$have_libpng" = no; then
|
|
|
|
AC_MSG_ERROR([libpng support requested but library not found])
|
|
|
|
fi
|
|
|
|
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
|
2014-03-01 06:57:19 +01:00
|
|
|
# check for system libharfbuzz
|
|
|
|
|
|
|
|
AC_ARG_WITH([harfbuzz],
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
[AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@],
|
|
|
|
[improve auto-hinting of OpenType fonts @<:@default=auto@:>@])],
|
|
|
|
[], [with_harfbuzz=auto])
|
|
|
|
|
|
|
|
have_harfbuzz=no
|
|
|
|
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
|
|
|
|
harfbuzz_pkg="harfbuzz >= 0.9.19"
|
|
|
|
have_harfbuzz_pkg=no
|
|
|
|
|
|
|
|
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
|
|
|
|
PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes])
|
|
|
|
fi
|
|
|
|
PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg],
|
|
|
|
[have_harfbuzz="yes (pkg-config)"], [:])
|
|
|
|
|
|
|
|
if test $have_harfbuzz_pkg = yes; then
|
|
|
|
# we have harfbuzz.pc
|
|
|
|
harfbuzz_reqpriv="$harfbuzz_pkg"
|
|
|
|
harfbuzz_libpriv=
|
|
|
|
harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"`
|
2014-03-01 12:32:20 +01:00
|
|
|
else
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
harfbuzz_reqpriv=
|
|
|
|
|
|
|
|
if test "$have_harfbuzz" != no; then
|
|
|
|
# HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user
|
|
|
|
harfbuzz_libpriv="$HARFBUZZ_LIBS"
|
|
|
|
harfbuzz_libstaticconf="$HARFBUZZ_LIBS"
|
|
|
|
have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)"
|
|
|
|
else
|
|
|
|
# since HarfBuzz is quite a new library we don't fall back to a
|
|
|
|
# different test; additionally, it has too many dependencies
|
|
|
|
:
|
|
|
|
fi
|
2014-03-01 12:32:20 +01:00
|
|
|
fi
|
2014-03-01 06:57:19 +01:00
|
|
|
fi
|
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
|
|
|
|
AC_MSG_ERROR([harfbuzz support requested but library not found])
|
|
|
|
fi
|
|
|
|
|
2014-03-01 06:57:19 +01:00
|
|
|
|
2009-12-16 05:23:14 +01:00
|
|
|
# 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.
|
|
|
|
|
|
|
|
save_config_args=$*
|
|
|
|
set dummy ${CFLAGS}
|
|
|
|
i=1
|
2011-01-15 05:21:32 +01:00
|
|
|
while test $i -le $#
|
2009-12-16 05:23:14 +01:00
|
|
|
do
|
|
|
|
c=$1
|
|
|
|
|
|
|
|
case "${c}" in
|
|
|
|
-isysroot|-arch) # options taking 1 argument
|
|
|
|
a=$2
|
|
|
|
AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c} ${a}])
|
|
|
|
if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
|
|
|
|
then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no, copy to LDFLAGS])
|
|
|
|
LDFLAGS="${LDFLAGS} ${c} ${a}"
|
|
|
|
fi
|
|
|
|
shift 1
|
2008-06-22 17:32:56 +02:00
|
|
|
;;
|
2011-01-15 05:33:28 +01:00
|
|
|
-m32|-m64|-march=*|-mcpu=*) # options taking no argument
|
2012-06-28 06:45:26 +02:00
|
|
|
AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}])
|
2009-12-16 05:23:14 +01:00
|
|
|
if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
|
|
|
|
then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no, copy to LDFLAGS])
|
|
|
|
LDFLAGS="${LDFLAGS} ${c}"
|
|
|
|
fi
|
2008-06-22 17:32:56 +02:00
|
|
|
;;
|
2009-12-16 05:23:14 +01:00
|
|
|
# *)
|
|
|
|
# AC_MSG_RESULT([${c} is not copied to LDFLAGS])
|
|
|
|
# ;;
|
2008-06-23 00:41:24 +02:00
|
|
|
esac
|
2009-12-16 05:23:14 +01:00
|
|
|
|
|
|
|
shift 1
|
|
|
|
done
|
|
|
|
set ${save_config_args}
|
2008-06-22 17:32:56 +02:00
|
|
|
|
|
|
|
|
2006-01-11 11:57:42 +01:00
|
|
|
# Whether to use Mac OS resource-based fonts.
|
2003-11-09 09:37:14 +01:00
|
|
|
|
2008-09-30 18:21:07 +02:00
|
|
|
ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_ARG_WITH([old-mac-fonts],
|
|
|
|
AS_HELP_STRING([--with-old-mac-fonts],
|
|
|
|
[allow Mac resource-based fonts to be used]))
|
2003-05-11 09:12:26 +02:00
|
|
|
if test x$with_old_mac_fonts = xyes; then
|
2006-02-08 13:58:24 +01:00
|
|
|
orig_LDFLAGS="${LDFLAGS}"
|
|
|
|
AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X])
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
|
|
|
|
LDFLAGS="$LDFLAGS $ft2_extra_libs"
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2006-12-15 16:23:21 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2006-12-15 16:23:21 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
2006-12-15 16:23:21 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
short res = 0;
|
2006-12-15 16:23:21 +01:00
|
|
|
|
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
UseResFile( res );
|
2006-12-15 16:23:21 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2007-02-05 03:50:45 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
2008-09-30 18:21:07 +02:00
|
|
|
ftmac_c='ftmac.c'
|
2012-01-30 14:14:43 +01:00
|
|
|
AC_MSG_CHECKING([whether OS_INLINE macro is ANSI compatible])
|
2011-12-02 13:14:18 +01:00
|
|
|
orig_CFLAGS="$CFLAGS -DFT_MACINTOSH"
|
2007-02-05 03:50:45 +01:00
|
|
|
CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2007-02-05 03:50:45 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2007-02-05 03:50:45 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
/* OSHostByteOrder() is typed as OS_INLINE */
|
|
|
|
int32_t os_byte_order = OSHostByteOrder();
|
2007-02-08 09:54:09 +01:00
|
|
|
|
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
if ( OSBigEndian != os_byte_order )
|
|
|
|
return 1;
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2007-02-08 09:54:09 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$orig_CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT([no, ANSI incompatible])
|
|
|
|
CFLAGS="$orig_CFLAGS"
|
2008-06-24 19:13:58 +02:00
|
|
|
])
|
|
|
|
AC_MSG_CHECKING([type ResourceIndex])
|
|
|
|
orig_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2008-06-24 19:13:58 +02:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
# include <Resources.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
],
|
|
|
|
[
|
|
|
|
|
|
|
|
ResourceIndex i = 0;
|
|
|
|
return i;
|
|
|
|
|
|
|
|
])],
|
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$orig_CFLAGS"
|
2008-08-18 08:02:07 +02:00
|
|
|
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
|
2008-06-24 19:13:58 +02:00
|
|
|
],
|
|
|
|
[AC_MSG_RESULT([no])
|
|
|
|
CFLAGS="$orig_CFLAGS"
|
2008-08-18 08:02:07 +02:00
|
|
|
CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
|
2008-06-26 00:21:42 +02:00
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([not found])
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
ft2_extra_libs=""
|
2006-02-09 08:38:57 +01:00
|
|
|
LDFLAGS="${orig_LDFLAGS}"
|
|
|
|
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
|
2006-05-20 00:11:50 +02:00
|
|
|
else
|
2009-01-06 08:07:39 +01:00
|
|
|
case x$host_os in
|
2006-05-20 00:11:50 +02:00
|
|
|
xdarwin*)
|
2009-01-06 08:07:39 +01:00
|
|
|
dnl AC_MSG_WARN([host system is MacOS but configured to build without Carbon])
|
2006-05-20 00:11:50 +02:00
|
|
|
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
|
|
|
|
;;
|
2011-05-01 12:30:37 +02:00
|
|
|
*)
|
|
|
|
;;
|
2006-05-20 00:11:50 +02:00
|
|
|
esac
|
2003-05-11 09:12:26 +02:00
|
|
|
fi
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
2014-03-14 08:06:06 +01:00
|
|
|
# Whether to use FileManager, which is deprecated since Mac OS X 10.4.
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH([fsspec],
|
|
|
|
AS_HELP_STRING([--with-fsspec],
|
|
|
|
[use obsolete FSSpec API of MacOS, if available (default=yes)]))
|
|
|
|
if test x$with_fsspec = xno; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"
|
2006-12-15 16:23:21 +01:00
|
|
|
elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_MSG_CHECKING([FSSpec-based FileManager])
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2006-01-11 10:28:38 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
FCBPBPtr paramBlock;
|
|
|
|
short vRefNum;
|
|
|
|
long dirID;
|
|
|
|
ConstStr255Param fileName;
|
|
|
|
FSSpec* spec;
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
/* FSSpec functions: deprecated since Mac OS X 10.4 */
|
|
|
|
PBGetFCBInfoSync( paramBlock );
|
|
|
|
FSMakeFSSpec( vRefNum, dirID, fileName, spec );
|
2007-01-17 13:45:26 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"])
|
2006-01-11 10:28:38 +01:00
|
|
|
fi
|
|
|
|
|
2006-01-11 11:57:42 +01:00
|
|
|
|
|
|
|
# Whether to use FileManager in Carbon since MacOS 9.x.
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH([fsref],
|
|
|
|
AS_HELP_STRING([--with-fsref],
|
|
|
|
[use Carbon FSRef API of MacOS, if available (default=yes)]))
|
|
|
|
if test x$with_fsref = xno; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** WARNING
|
|
|
|
FreeType2 built without FSRef API cannot load
|
|
|
|
data-fork fonts on MacOS, except of XXX.dfont.
|
2006-02-09 08:38:57 +01:00
|
|
|
])
|
2006-01-11 10:28:38 +01:00
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSREF=0"
|
2006-12-15 16:23:21 +01:00
|
|
|
elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_MSG_CHECKING([FSRef-based FileManager])
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2006-01-11 10:28:38 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
|
|
|
|
short vRefNum;
|
|
|
|
long dirID;
|
|
|
|
ConstStr255Param fileName;
|
|
|
|
|
|
|
|
Boolean* isDirectory;
|
|
|
|
UInt8* path;
|
|
|
|
SInt16 desiredRefNum;
|
|
|
|
SInt16* iterator;
|
|
|
|
SInt16* actualRefNum;
|
|
|
|
HFSUniStr255* outForkName;
|
|
|
|
FSVolumeRefNum volume;
|
|
|
|
FSCatalogInfoBitmap whichInfo;
|
|
|
|
FSCatalogInfo* catalogInfo;
|
|
|
|
FSForkInfo* forkInfo;
|
|
|
|
FSRef* ref;
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2007-12-06 08:47:25 +01:00
|
|
|
#if HAVE_FSSPEC
|
2008-06-09 23:02:13 +02:00
|
|
|
FSSpec* spec;
|
2007-12-06 08:47:25 +01:00
|
|
|
#endif
|
2007-02-08 09:54:09 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
/* FSRef functions: no need to check? */
|
|
|
|
FSGetForkCBInfo( desiredRefNum, volume, iterator,
|
|
|
|
actualRefNum, forkInfo, ref,
|
|
|
|
outForkName );
|
|
|
|
FSPathMakeRef( path, ref, isDirectory );
|
2007-12-06 08:47:25 +01:00
|
|
|
|
|
|
|
#if HAVE_FSSPEC
|
2008-06-09 23:02:13 +02:00
|
|
|
FSpMakeFSRef ( spec, ref );
|
|
|
|
FSGetCatalogInfo( ref, whichInfo, catalogInfo,
|
|
|
|
outForkName, spec, ref );
|
2007-12-06 08:47:25 +01:00
|
|
|
#endif
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSREF=1"],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_FSREF=0"])
|
2006-01-11 10:28:38 +01:00
|
|
|
fi
|
|
|
|
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2014-03-14 08:06:06 +01:00
|
|
|
# Whether to use QuickDraw API in ToolBox, which is deprecated since
|
2007-02-08 09:54:09 +01:00
|
|
|
# Mac OS X 10.4.
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH([quickdraw-toolbox],
|
|
|
|
AS_HELP_STRING([--with-quickdraw-toolbox],
|
|
|
|
[use MacOS QuickDraw in ToolBox, if available (default=yes)]))
|
|
|
|
if test x$with_quickdraw_toolbox = xno; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"
|
2006-12-15 16:23:21 +01:00
|
|
|
elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox])
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2006-01-11 10:28:38 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Fonts.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
Str255 familyName;
|
|
|
|
SInt16 familyID = 0;
|
|
|
|
FMInput* fmIn = NULL;
|
|
|
|
FMOutput* fmOut = NULL;
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
GetFontName( familyID, familyName );
|
|
|
|
GetFNum( familyName, &familyID );
|
|
|
|
fmOut = FMSwapFont( fmIn );
|
2006-01-11 10:28:38 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"])
|
2006-01-11 10:28:38 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2014-03-14 08:06:06 +01:00
|
|
|
# Whether to use QuickDraw API in Carbon, which is deprecated since
|
2007-02-08 09:54:09 +01:00
|
|
|
# Mac OS X 10.4.
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH([quickdraw-carbon],
|
|
|
|
AS_HELP_STRING([--with-quickdraw-carbon],
|
|
|
|
[use MacOS QuickDraw in Carbon, if available (default=yes)]))
|
|
|
|
if test x$with_quickdraw_carbon = xno; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"
|
2006-12-15 16:23:21 +01:00
|
|
|
elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon])
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
2008-08-18 07:08:01 +02:00
|
|
|
# include <CoreServices/CoreServices.h>
|
2006-01-11 10:28:38 +01:00
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Fonts.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
|
|
|
|
FMFontFamilyIterator famIter;
|
|
|
|
FMFontFamily family;
|
|
|
|
Str255 famNameStr;
|
|
|
|
FMFontFamilyInstanceIterator instIter;
|
|
|
|
FMFontStyle style;
|
|
|
|
FMFontSize size;
|
|
|
|
FMFont font;
|
|
|
|
FSSpec* pathSpec;
|
|
|
|
|
|
|
|
|
|
|
|
FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
|
|
|
|
&famIter );
|
|
|
|
FMGetNextFontFamily( &famIter, &family );
|
|
|
|
FMGetFontFamilyName( family, famNameStr );
|
|
|
|
FMCreateFontFamilyInstanceIterator( family, &instIter );
|
|
|
|
FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
|
|
|
|
FMDisposeFontFamilyInstanceIterator( &instIter );
|
|
|
|
FMDisposeFontFamilyIterator( &famIter );
|
|
|
|
FMGetFontContainer( font, pathSpec );
|
|
|
|
|
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"])
|
2006-01-11 10:28:38 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2006-01-11 11:57:42 +01:00
|
|
|
# Whether to use AppleTypeService since Mac OS X.
|
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_ARG_WITH([ats],
|
|
|
|
AS_HELP_STRING([--with-ats],
|
|
|
|
[use AppleTypeService, if available (default=yes)]))
|
|
|
|
if test x$with_ats = xno; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_ATS=0"
|
2011-05-01 12:30:37 +02:00
|
|
|
elif test x$with_old_mac_fonts = xyes -a x$with_ats != x; then
|
2006-01-11 10:28:38 +01:00
|
|
|
AC_MSG_CHECKING([AppleTypeService functions])
|
2008-06-09 23:02:13 +02:00
|
|
|
AC_LINK_IFELSE([
|
|
|
|
AC_LANG_PROGRAM([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-08-18 07:08:01 +02:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
|
|
|
# include <CoreServices/CoreServices.h>
|
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
FSSpec* pathSpec;
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
|
2007-12-06 08:47:25 +01:00
|
|
|
#if HAVE_FSSPEC
|
2008-06-09 23:02:13 +02:00
|
|
|
ATSFontGetFileSpecification( 0, pathSpec );
|
2007-12-06 08:47:25 +01:00
|
|
|
#endif
|
2006-01-11 10:28:38 +01:00
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
])],
|
2006-02-09 08:38:57 +01:00
|
|
|
[AC_MSG_RESULT([ok])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_ATS=1"],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_ATS=0"])
|
2006-01-11 11:57:42 +01:00
|
|
|
fi
|
2006-01-11 10:28:38 +01:00
|
|
|
|
2006-12-15 16:23:21 +01:00
|
|
|
case "$CFLAGS" in
|
|
|
|
*HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* )
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** WARNING
|
2006-12-16 03:57:46 +01:00
|
|
|
FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
|
2008-02-14 03:55:16 +01:00
|
|
|
thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
|
2006-12-15 16:23:21 +01:00
|
|
|
])
|
|
|
|
CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
# entries in Requires.private are separated by commas;
|
|
|
|
REQUIRES_PRIVATE="$zlib_reqpriv, \
|
|
|
|
$bzip2_reqpriv, \
|
|
|
|
$libpng_reqpriv, \
|
|
|
|
$harfbuzz_reqpriv"
|
|
|
|
# beautify
|
|
|
|
REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
|
|
|
|
| sed -e 's/^ *//' \
|
|
|
|
-e 's/ *$//' \
|
|
|
|
-e 's/, */,/g' \
|
|
|
|
-e 's/,,*/,/g' \
|
|
|
|
-e 's/^,*//' \
|
|
|
|
-e 's/,*$//' \
|
|
|
|
-e 's/,/, /g'`
|
|
|
|
|
|
|
|
LIBS_PRIVATE="$zlib_libpriv \
|
|
|
|
$bzip2_libpriv \
|
|
|
|
$libpng_libpriv \
|
|
|
|
$harfbuzz_libpriv \
|
|
|
|
$ft2_extra_libs"
|
|
|
|
# beautify
|
|
|
|
LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
|
|
|
|
| sed -e 's/^ *//' \
|
|
|
|
-e 's/ *$//' \
|
|
|
|
-e 's/ */ /g'`
|
|
|
|
|
|
|
|
LIBSSTATIC_CONFIG="-lfreetype \
|
|
|
|
$zlib_libstaticconf \
|
|
|
|
$bzip2_libstaticconf \
|
|
|
|
$libpng_libstaticconf \
|
|
|
|
$harfbuzz_libstaticconf \
|
|
|
|
$ft2_extra_libs"
|
|
|
|
# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
|
|
|
|
# on if necessary; also beautify
|
|
|
|
LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
|
|
|
|
| sed -e 's|-L */usr/lib64/* | |g' \
|
|
|
|
-e 's|-L */usr/lib/* | |g' \
|
|
|
|
-e 's/^ *//' \
|
|
|
|
-e 's/ *$//' \
|
|
|
|
-e 's/ */ /g'`
|
2003-11-09 09:37:14 +01:00
|
|
|
|
2014-03-01 06:57:19 +01:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
AC_SUBST([ftmac_c])
|
|
|
|
AC_SUBST([REQUIRES_PRIVATE])
|
|
|
|
AC_SUBST([LIBS_PRIVATE])
|
|
|
|
AC_SUBST([LIBSSTATIC_CONFIG])
|
2007-08-05 00:17:48 +02:00
|
|
|
|
2004-02-08 23:45:48 +01:00
|
|
|
AC_SUBST([hardcode_libdir_flag_spec])
|
|
|
|
AC_SUBST([wl])
|
2008-06-09 23:27:17 +02:00
|
|
|
AC_SUBST([build_libtool_libs])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
|
2012-06-30 07:59:28 +02:00
|
|
|
# changing LDFLAGS value should only be done after
|
|
|
|
# lt_cv_prog_compiler_static_works test
|
2014-03-01 12:32:20 +01:00
|
|
|
|
2014-03-05 08:02:46 +01:00
|
|
|
if test "$have_zlib" != no; then
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
|
|
|
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
|
2012-06-30 07:59:28 +02:00
|
|
|
fi
|
|
|
|
|
2014-03-05 08:02:46 +01:00
|
|
|
if test "$have_bzip2" != no; then
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
|
|
|
|
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
|
2012-06-30 07:59:28 +02:00
|
|
|
fi
|
2014-03-05 08:02:46 +01:00
|
|
|
if test "$have_libpng" != no; then
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
|
2014-03-01 12:32:20 +01:00
|
|
|
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
fi
|
2014-03-05 08:02:46 +01:00
|
|
|
if test "$have_harfbuzz" != no; then
|
2014-03-01 06:57:19 +01:00
|
|
|
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
|
|
|
|
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
|
|
|
|
fi
|
2012-06-30 07:59:28 +02:00
|
|
|
|
|
|
|
AC_SUBST([CFLAGS])
|
|
|
|
AC_SUBST([LDFLAGS])
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# configuration file -- stay in 8.3 limit
|
|
|
|
#
|
|
|
|
# since #undef doesn't survive in configuration header files we replace
|
|
|
|
# `/undef' with `#undef' after creating the output file
|
|
|
|
|
|
|
|
AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
|
|
|
|
[mv ftconfig.h ftconfig.tmp
|
|
|
|
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
|
|
|
|
rm ftconfig.tmp])
|
|
|
|
|
|
|
|
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
|
2007-02-08 09:54:09 +01:00
|
|
|
# and `builds/unix/unix-cc.mk' that will be used by the build system
|
2003-11-09 09:37:14 +01:00
|
|
|
#
|
2003-04-28 11:43:32 +02:00
|
|
|
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
|
2013-02-08 12:49:41 +01:00
|
|
|
unix-def.mk:unix-def.in])
|
2002-01-08 19:33:55 +01:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# re-generate the Jamfile to use libtool now
|
|
|
|
#
|
|
|
|
# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
|
2002-01-08 19:33:55 +01:00
|
|
|
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_OUTPUT
|
2000-07-08 02:22:20 +02:00
|
|
|
|
Rewrite library option handling in `configure'; improve `freetype-config'.
o Introduce `auto' value for `--with-XXX' library options; this is
now the default.
o First use `pkg-config' for library detection, then fall back to
other tests.
* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
--with-harfbuzz): Rewrite.
Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
variables to collect data for `freetype2.pc' and `freetype-config'.
(FT2_EXTRA_LIBS): Renamed to ...
(ft2_extra_libs): This since it gets no longer substituted.
(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
New output variables, replacing `XXX_PKG' and `LIBXXX'.
Add notice at the end of `configure' showing the library
configuration.
* builds/unix/freetype-config.in (--static): New command line
option.
(libs): Updated.
(staticlibs): New variable, to be used if `--static' is given.
* builds/doc/freetype-config.1: Document `--static'.
* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2014-03-03 07:13:45 +01:00
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
|
|
|
Library configuration:
|
|
|
|
external zlib: $have_zlib
|
|
|
|
bzip2: $have_bzip2
|
|
|
|
libpng: $have_libpng
|
|
|
|
harfbuzz: $have_harfbuzz
|
|
|
|
])
|
|
|
|
|
2007-02-08 09:54:09 +01:00
|
|
|
# end of configure.raw
|