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
|
|
|
#
|
2013-02-08 12:49:41 +01:00
|
|
|
# Copyright 2001-2013 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.1 released.
=========================
Tag sources with `VER-2-5-1'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.1.
* 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.0/2.5.1/, s/250/251/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 17:0:11.
* docs/CHANGES, docs/release: Updated.
2013-11-25 00:28:11 +01:00
|
|
|
version_info='17:0: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)
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
# we try to make the compiler work for C89-strict source.
|
|
|
|
# even if C compiler is GCC and C89 flags are available,
|
|
|
|
# some system headers (e.g. Android Bionic libc) is broken
|
|
|
|
# in C89 mode. we have to check the compilation finishes
|
|
|
|
# successfully.
|
|
|
|
#
|
|
|
|
if test "x$GCC" = xyes; then
|
|
|
|
XX_CFLAGS="-Wall"
|
|
|
|
XX_ANSIFLAGS=""
|
|
|
|
for a in -pedantic -ansi
|
|
|
|
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
|
|
|
|
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])
|
|
|
|
|
|
|
|
|
2008-06-23 00:41:24 +02:00
|
|
|
# check for system zlib
|
2003-11-09 09:37:14 +01:00
|
|
|
|
2006-04-03 17:46:48 +02:00
|
|
|
# don't quote AS_HELP_STRING!
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_ARG_WITH([zlib],
|
|
|
|
AS_HELP_STRING([--without-zlib],
|
|
|
|
[use internal zlib instead of system-wide]))
|
2002-12-16 22:51:24 +01:00
|
|
|
if test x$with_zlib != xno && test -z "$LIBZ"; 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
|
|
|
AC_CHECK_LIB([z],
|
|
|
|
[gzsetparams],
|
|
|
|
[AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
|
2002-12-16 22:51:24 +01:00
|
|
|
fi
|
|
|
|
if test x$with_zlib != xno && test -n "$LIBZ"; then
|
|
|
|
SYSTEM_ZLIB=yes
|
|
|
|
fi
|
2003-05-11 09:12:26 +02:00
|
|
|
|
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
|
|
|
|
2010-12-31 16:59:33 +01:00
|
|
|
# check for system libbz2
|
|
|
|
|
|
|
|
# don't quote AS_HELP_STRING!
|
|
|
|
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
|
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
|
|
|
AC_CHECK_LIB([bz2],
|
|
|
|
[BZ2_bzDecompress],
|
|
|
|
[AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
|
2010-12-31 16:59:33 +01:00
|
|
|
fi
|
|
|
|
if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
|
2012-06-30 07:59:28 +02:00
|
|
|
SYSTEM_LIBBZ2=yes
|
2010-12-31 16:59:33 +01:00
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
|
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
|
|
|
|
|
|
|
|
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])
|
2013-06-02 23:38:13 +02:00
|
|
|
if test -z "$LIBPNG_CFLAGS" -a -z "$LIBPNG_LDFLAGS"; 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
|
|
|
if ! which libpng-config >/dev/null; then
|
|
|
|
AC_MSG_ERROR([`libpng-config' not found;
|
2013-06-02 23:38:13 +02:00
|
|
|
either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables,
|
2013-07-30 06:55:29 +02:00
|
|
|
or pass `--without-png' to the `configure' script.])
|
|
|
|
elif test ${cross_compiling} = yes; then
|
2013-07-31 22:55:50 +02:00
|
|
|
AC_MSG_ERROR([`libpng-config' should not be used in cross-building;
|
|
|
|
either set the LIBPNG_CFLAGS and LIBPNG_LDFLAGS environment variables,
|
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
|
|
|
or pass `--without-png' to the `configure' script.])
|
|
|
|
fi
|
2013-08-18 18:34:05 +02:00
|
|
|
LIBPNG="`libpng-config --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
|
|
|
LIBPNG_CFLAGS="`libpng-config --cflags`"
|
2013-06-02 23:38:13 +02:00
|
|
|
LIBPNG_LDFLAGS="`libpng-config --ldflags`"
|
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
|
|
|
|
HAVE_LIBPNG=yes
|
2013-06-02 23:38:13 +02:00
|
|
|
AC_MSG_RESULT([$LIBPNG_LDFLAGS])
|
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
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2006-04-03 17:46:48 +02:00
|
|
|
# don't quote AS_HELP_STRING!
|
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])
|
2008-02-21 11:15:41 +01:00
|
|
|
FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
|
2006-10-12 03:35:54 +02:00
|
|
|
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])
|
2008-09-05 05:21:21 +02: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
|
|
|
|
2006-01-11 11:57:42 +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
|
|
|
|
2007-02-08 09:54:09 +01:00
|
|
|
# Whether to use QuickDraw API in ToolBox which is deprecated since
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2007-02-08 09:54:09 +01:00
|
|
|
# Whether to use QuickDraw API in Carbon which is deprecated since
|
|
|
|
# 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-04-03 17:46:48 +02:00
|
|
|
# don't quote AS_HELP_STRING!
|
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
|
|
|
|
2008-09-30 18:21:07 +02:00
|
|
|
AC_SUBST([ftmac_c])
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([LIBZ])
|
2010-12-31 16:59:33 +01:00
|
|
|
AC_SUBST([LIBBZ2])
|
2013-08-18 18:34:05 +02:00
|
|
|
AC_SUBST([LIBPNG])
|
2006-10-12 03:35:54 +02:00
|
|
|
AC_SUBST([FT2_EXTRA_LIBS])
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([SYSTEM_ZLIB])
|
|
|
|
|
2008-06-09 23:02:13 +02:00
|
|
|
LT_INIT(win32-dll)
|
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
|
|
|
|
2012-06-30 07:59:28 +02:00
|
|
|
# changing LDFLAGS value should only be done after
|
|
|
|
# lt_cv_prog_compiler_static_works test
|
|
|
|
if test x$SYSTEM_ZLIB = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
|
|
|
LDFLAGS="$LDFLAGS $LIBZ"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$SYSTEM_LIBBZ2 = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
|
|
|
|
LDFLAGS="$LDFLAGS $LIBBZ2"
|
|
|
|
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
|
|
|
if test x$HAVE_LIBPNG = xyes; then
|
|
|
|
CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
|
2013-06-02 23:38:13 +02:00
|
|
|
LDFLAGS="$LDFLAGS $LIBPNG_LDFLAGS"
|
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
|
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
|
|
|
|
2007-02-08 09:54:09 +01:00
|
|
|
# end of configure.raw
|