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
|
|
|
#
|
2006-01-11 11:57:42 +01:00
|
|
|
# Copyright 2001, 2002, 2003, 2004, 2005, 2006 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!
|
|
|
|
|
2006-05-06 18:44:58 +02:00
|
|
|
version_info='9:10:3'
|
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
|
|
|
|
|
|
|
|
AC_CANONICAL_TARGET
|
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
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# get compiler flags right
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
if test "x$CC" = xgcc; then
|
* builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk
(CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove
-fno-strict-aliasing.
Say you have `(Foo*)x' and want to assign, pass, or return it as
`(Bar*)'. If you simply say `x' or `(Bar*)x', then the C compiler
would warn you that type casting incompatible pointer types breaks
strict-aliasing. The solution is to cast to `(void*)' instead which
is the generic pointer type, so the compiler knows that it should
make no strict-aliasing assumption on `x'. But the problem with
`(void*)x' is that seems like in C++, unlike C, `void*' is not a
generic pointer type and assigning `void*' to `Bar*' without a cast
causes an error. The solution is to cast to `Bar*' too, with
`(Bar*)(void*)x' as the result -- this is what the patch does.
* include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP),
include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove
cast on lvalue, use a temporary pointer instead.
Cast temporarily to (void*) to not break strict aliasing.
* include/freetype/internal/ftmemory.h (FT_MEM_ALLOC,
FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE),
src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*)
to not break strict aliasing.
* src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information.
* builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c --
it is currently loaded from ttsbit.c.
Other formatting.
2005-05-23 23:33:02 +02:00
|
|
|
XX_CFLAGS="-Wall"
|
2000-07-08 02:22:20 +02:00
|
|
|
XX_ANSIFLAGS="-pedantic -ansi"
|
|
|
|
else
|
|
|
|
case "$host" in
|
2003-11-09 09:37:14 +01:00
|
|
|
*-dec-osf*)
|
|
|
|
CFLAGS=
|
|
|
|
XX_CFLAGS="-std1 -g3"
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
XX_CFLAGS=
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
2000-07-08 02:22:20 +02:00
|
|
|
esac
|
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([XX_CFLAGS])
|
|
|
|
AC_SUBST([XX_ANSIFLAGS])
|
|
|
|
|
|
|
|
|
|
|
|
# auxiliary programs
|
|
|
|
|
|
|
|
AC_CHECK_PROG([RMF], [rm], [rm -f])
|
|
|
|
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
|
|
|
/*)
|
|
|
|
;;
|
|
|
|
*/*)
|
|
|
|
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])
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
if test "$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
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Check for system zlib
|
|
|
|
|
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
|
2003-11-09 09:37:14 +01: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
|
|
|
|
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
2002-12-23 23:40:21 +01:00
|
|
|
LDFLAGS="$LDFLAGS $LIBZ"
|
2002-12-16 22:51:24 +01:00
|
|
|
SYSTEM_ZLIB=yes
|
|
|
|
fi
|
2003-05-11 09:12:26 +02:00
|
|
|
|
2003-11-09 09:37:14 +01: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
|
|
|
|
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])
|
2003-05-11 09:12:26 +02:00
|
|
|
LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
|
|
|
|
-Xlinker -framework -Xlinker ApplicationServices"
|
2006-02-09 08:38:57 +01:00
|
|
|
AC_TRY_LINK([],
|
|
|
|
[],
|
|
|
|
[AC_MSG_RESULT([ok])],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
LDFLAGS="${orig_LDFLAGS}"
|
|
|
|
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
|
2006-05-20 00:11:50 +02:00
|
|
|
else
|
|
|
|
case x$target_os in
|
|
|
|
xdarwin*)
|
|
|
|
dnl AC_MSG_WARN([target system is MacOS but configured to build without Carbon])
|
|
|
|
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
|
|
|
|
;;
|
|
|
|
*) ;;
|
|
|
|
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"
|
|
|
|
elif test x$with_old_mac_fonts = xyes; then
|
|
|
|
AC_MSG_CHECKING([FSSpec-based FileManager])
|
|
|
|
AC_TRY_LINK([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
|
|
|
# include <Carbon/Carbon.h>
|
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-02-09 08:38:57 +01:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
|
|
|
FCBPBPtr paramBlock;
|
|
|
|
short vRefNum;
|
|
|
|
long dirID;
|
|
|
|
ConstStr255Param fileName;
|
|
|
|
FSSpec* spec;
|
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
|
|
|
|
/* FSSpec functions: deprecated sicne Mac OS X 10.4 */
|
|
|
|
PBGetFCBInfoSync( paramBlock );
|
|
|
|
FSMakeFSSpec( vRefNum, dirID, fileName, spec );
|
|
|
|
|
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"
|
|
|
|
elif test x$with_old_mac_fonts = xyes; then
|
|
|
|
AC_MSG_CHECKING([FSRef-based FileManager])
|
|
|
|
AC_TRY_LINK([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
|
|
|
# include <Carbon/Carbon.h>
|
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Files.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-02-09 08:38:57 +01:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
FCBPBPtr paramBlock;
|
|
|
|
short vRefNum;
|
|
|
|
long dirID;
|
|
|
|
ConstStr255Param fileName;
|
|
|
|
FSSpec* spec;
|
|
|
|
|
|
|
|
Boolean* isDirectory;
|
|
|
|
UInt8* path;
|
|
|
|
SInt16 desiredRefNum;
|
|
|
|
SInt16* iterator;
|
|
|
|
SInt16* actualRefNum;
|
|
|
|
HFSUniStr255* outForkName;
|
|
|
|
FSVolumeRefNum volume;
|
|
|
|
FSCatalogInfoBitmap whichInfo;
|
|
|
|
FSCatalogInfo* catalogInfo;
|
|
|
|
FSForkInfo* forkInfo;
|
|
|
|
FSRef* ref;
|
|
|
|
|
|
|
|
|
|
|
|
/* FSRef functions: no need to check? */
|
|
|
|
FSGetForkCBInfo( desiredRefNum, volume, iterator,
|
|
|
|
actualRefNum, forkInfo, ref,
|
|
|
|
outForkName );
|
|
|
|
FSpMakeFSRef ( spec, ref );
|
|
|
|
FSGetCatalogInfo( ref, whichInfo, catalogInfo,
|
|
|
|
outForkName, spec, ref );
|
|
|
|
FSPathMakeRef( path, ref, isDirectory );
|
|
|
|
|
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
|
|
|
|
|
|
|
# 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"
|
|
|
|
elif test x$with_old_mac_fonts = xyes; then
|
|
|
|
AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox])
|
|
|
|
AC_TRY_LINK([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
|
|
|
# include <Carbon/Carbon.h>
|
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Fonts.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-02-09 08:38:57 +01:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
Str255 familyName;
|
|
|
|
SInt16 familyID = 0;
|
|
|
|
FMInput* fmIn = NULL;
|
|
|
|
FMOutput* fmOut = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
GetFontName( familyID, familyName );
|
|
|
|
GetFNum( familyName, &familyID );
|
|
|
|
fmOut = FMSwapFont( fmIn );
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2006-01-11 11:57:42 +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"
|
|
|
|
elif test x$with_old_mac_fonts = xyes; then
|
|
|
|
AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon])
|
|
|
|
AC_TRY_LINK([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#if defined(__GNUC__) && defined(__APPLE_CC__)
|
|
|
|
# include <Carbon/Carbon.h>
|
|
|
|
# include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#else
|
|
|
|
# include <ConditionalMacros.h>
|
|
|
|
# include <Fonts.h>
|
|
|
|
#endif
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-02-09 08:38:57 +01:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01: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-01-11 11:57:42 +01:00
|
|
|
|
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"
|
|
|
|
elif test x$with_old_mac_fonts = xyes; then
|
|
|
|
AC_MSG_CHECKING([AppleTypeService functions])
|
|
|
|
AC_TRY_LINK([
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
#include <Carbon/Carbon.h>
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-02-09 08:38:57 +01:00
|
|
|
],
|
|
|
|
[
|
2006-01-11 11:57:42 +01:00
|
|
|
|
2006-01-11 10:28:38 +01:00
|
|
|
FSSpec* pathSpec;
|
|
|
|
|
|
|
|
|
|
|
|
ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
|
|
|
|
ATSFontGetFileSpecification( 0, pathSpec );
|
|
|
|
|
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
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([LIBZ])
|
|
|
|
AC_SUBST([CFLAGS])
|
|
|
|
AC_SUBST([LDFLAGS])
|
|
|
|
AC_SUBST([SYSTEM_ZLIB])
|
|
|
|
|
2002-12-16 22:51:24 +01:00
|
|
|
|
2001-06-07 19:36:17 +02:00
|
|
|
AC_PROG_LIBTOOL
|
2004-02-08 23:45:48 +01:00
|
|
|
# urgh -- these are internal libtool variables...
|
|
|
|
AC_SUBST([enable_shared])
|
|
|
|
AC_SUBST([hardcode_libdir_flag_spec])
|
|
|
|
AC_SUBST([wl])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
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'
|
|
|
|
# and 'builds/unix/unix-cc.mk' that will be used by the build system
|
|
|
|
#
|
2003-04-28 11:43:32 +02:00
|
|
|
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
|
|
|
|
unix-def.mk:unix-def.in
|
|
|
|
freetype-config
|
|
|
|
freetype2.pc:freetype2.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
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# end of configure.ac
|