From 4df5b26fdfb659985fef6d482c1641b345243cbd Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 8 May 2006 07:10:29 +0000 Subject: Put version information into the configure script. Reported by Paul Watson . * builds/unix/configure.ac: Renamed to... * builds/unix/configure.raw: This which now serves (with appropriate modifications) as a template for configure.ac. * version.sed: New script. * autogen.sh: Generate configure.ac from configure.raw, using FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH from freetype.h. --- builds/unix/.cvsignore | 1 + builds/unix/configure.ac | 417 ---------------------------------------------- builds/unix/configure.raw | 417 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 418 insertions(+), 417 deletions(-) delete mode 100644 builds/unix/configure.ac create mode 100644 builds/unix/configure.raw (limited to 'builds') diff --git a/builds/unix/.cvsignore b/builds/unix/.cvsignore index 3785a9c13..86b8c409b 100644 --- a/builds/unix/.cvsignore +++ b/builds/unix/.cvsignore @@ -6,6 +6,7 @@ config.log config.status config.sub configure +configure.ac freetype2.pc freetype-config ftconfig.h diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac deleted file mode 100644 index 24c36f353..000000000 --- a/builds/unix/configure.ac +++ /dev/null @@ -1,417 +0,0 @@ -# This file is part of the FreeType project. -# -# Process this file with autoconf to produce a configure script. -# -# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by -# 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. - -AC_INIT -AC_CONFIG_SRCDIR([ftconfig.in]) - - -# Don't forget to update docs/VERSION.DLL! - -version_info='9:10:3' -AC_SUBST([version_info]) -ft_version=`echo $version_info | tr : .` -AC_SUBST([ft_version]) - - -# checks for system type - -AC_CANONICAL_TARGET - - -# checks for programs - -AC_PROG_CC -AC_PROG_CPP - - -# get compiler flags right - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall" - XX_ANSIFLAGS="-pedantic -ansi" -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]) - - -# auxiliary programs - -AC_CHECK_PROG([RMF], [rm], [rm -f]) -AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) - - -# 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. - -AC_PROG_INSTALL -case "$INSTALL" in -/*) - ;; -*/*) - INSTALL="`pwd`/$INSTALL" ;; -esac - - -# checks for header files - -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h unistd.h]) - - -# checks for typedefs, structures, and compiler characteristics - -AC_C_CONST -AC_CHECK_SIZEOF([int]) -AC_CHECK_SIZEOF([long]) - - -# checks for library functions - -# Here we check whether we can use our mmap file component. - -AC_FUNC_MMAP -if test "$ac_cv_func_mmap_fixed_mapped" != yes; then - FTSYS_SRC='$(BASE_DIR)/ftsystem.c' -else - FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' - - AC_CHECK_DECLS([munmap], - [], - [], - [ - -#ifdef HAVE_UNISTD_H -#include -#endif -#include - - ]) - - FT_MUNMAP_PARAM -fi -AC_SUBST([FTSYS_SRC]) - -AC_CHECK_FUNCS([memcpy memmove]) - - -# Check for system zlib - -# don't quote AS_HELP_STRING! -AC_ARG_WITH([zlib], - AS_HELP_STRING([--without-zlib], - [use internal zlib instead of system-wide])) -if test x$with_zlib != xno && test -z "$LIBZ"; then - AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) -fi -if test x$with_zlib != xno && test -n "$LIBZ"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" - SYSTEM_ZLIB=yes -fi - - -# Whether to use Mac OS resource-based fonts. - -# don't quote AS_HELP_STRING! -AC_ARG_WITH([old-mac-fonts], - AS_HELP_STRING([--with-old-mac-fonts], - [allow Mac resource-based fonts to be used])) -if test x$with_old_mac_fonts = xyes; then - orig_LDFLAGS="${LDFLAGS}" - AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) - LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \ - -Xlinker -framework -Xlinker ApplicationServices" - AC_TRY_LINK([], - [], - [AC_MSG_RESULT([ok])], - [AC_MSG_RESULT([not found]) - LDFLAGS="${orig_LDFLAGS}" - CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"]) -fi - - -# Whether to use FileManager which is deprecated since Mac OS X 10.4. - -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([ - -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif - - ], - [ - - FCBPBPtr paramBlock; - short vRefNum; - long dirID; - ConstStr255Param fileName; - FSSpec* spec; - - - /* FSSpec functions: deprecated sicne Mac OS X 10.4 */ - PBGetFCBInfoSync( paramBlock ); - FSMakeFSSpec( vRefNum, dirID, fileName, spec ); - - ], - [AC_MSG_RESULT([ok]) - CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"], - [AC_MSG_RESULT([not found]) - CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"]) -fi - - -# Whether to use FileManager in Carbon since MacOS 9.x. - -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. - ]) - CFLAGS="$CFLAGS -DHAVE_FSREF=0" -elif test x$with_old_mac_fonts = xyes; then - AC_MSG_CHECKING([FSRef-based FileManager]) - AC_TRY_LINK([ - -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif - - ], - [ - - 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 ); - - ], - [AC_MSG_RESULT([ok]) - CFLAGS="$CFLAGS -DHAVE_FSREF=1"], - [AC_MSG_RESULT([not found]) - CFLAGS="$CFLAGS -DHAVE_FSREF=0"]) -fi - - -# Whether to use QuickDraw API in ToolBox which is deprecated since Mac OS X 10.4. - -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([ - -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif - - ], - [ - - Str255 familyName; - SInt16 familyID = 0; - FMInput* fmIn = NULL; - FMOutput* fmOut = NULL; - - - GetFontName( familyID, familyName ); - GetFNum( familyName, &familyID ); - fmOut = FMSwapFont( fmIn ); - - ], - [AC_MSG_RESULT([ok]) - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"], - [AC_MSG_RESULT([not found]) - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"]) -fi - - -# Whether to use QuickDraw API in Carbon which is deprecated since Mac OS X 10.4. - -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([ - -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif - - ], - [ - - 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 ); - - ], - [AC_MSG_RESULT([ok]) - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"], - [AC_MSG_RESULT([not found]) - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"]) -fi - - -# Whether to use AppleTypeService since Mac OS X. - -# don't quote AS_HELP_STRING! -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([ - -#include - - ], - [ - - FSSpec* pathSpec; - - - ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); - ATSFontGetFileSpecification( 0, pathSpec ); - - ], - [AC_MSG_RESULT([ok]) - CFLAGS="$CFLAGS -DHAVE_ATS=1"], - [AC_MSG_RESULT([not found]) - CFLAGS="$CFLAGS -DHAVE_ATS=0"]) -fi - - -AC_SUBST([LIBZ]) -AC_SUBST([CFLAGS]) -AC_SUBST([LDFLAGS]) -AC_SUBST([SYSTEM_ZLIB]) - - -AC_PROG_LIBTOOL -# urgh -- these are internal libtool variables... -AC_SUBST([enable_shared]) -AC_SUBST([hardcode_libdir_flag_spec]) -AC_SUBST([wl]) - - -# 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 -# -AC_CONFIG_FILES([unix-cc.mk:unix-cc.in - unix-def.mk:unix-def.in - freetype-config - freetype2.pc:freetype2.in]) - -# re-generate the Jamfile to use libtool now -# -# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in]) - -AC_OUTPUT - -# end of configure.ac diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw new file mode 100644 index 000000000..f1f217cc3 --- /dev/null +++ b/builds/unix/configure.raw @@ -0,0 +1,417 @@ +# This file is part of the FreeType project. +# +# Process this file with autoconf to produce a configure script. +# +# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by +# 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. + +AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype]) +AC_CONFIG_SRCDIR([ftconfig.in]) + + +# Don't forget to update docs/VERSION.DLL! + +version_info='9:10:3' +AC_SUBST([version_info]) +ft_version=`echo $version_info | tr : .` +AC_SUBST([ft_version]) + + +# checks for system type + +AC_CANONICAL_TARGET + + +# checks for programs + +AC_PROG_CC +AC_PROG_CPP + + +# get compiler flags right + +if test "x$CC" = xgcc; then + XX_CFLAGS="-Wall" + XX_ANSIFLAGS="-pedantic -ansi" +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]) + + +# auxiliary programs + +AC_CHECK_PROG([RMF], [rm], [rm -f]) +AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) + + +# 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. + +AC_PROG_INSTALL +case "$INSTALL" in +/*) + ;; +*/*) + INSTALL="`pwd`/$INSTALL" ;; +esac + + +# checks for header files + +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h unistd.h]) + + +# checks for typedefs, structures, and compiler characteristics + +AC_C_CONST +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long]) + + +# checks for library functions + +# Here we check whether we can use our mmap file component. + +AC_FUNC_MMAP +if test "$ac_cv_func_mmap_fixed_mapped" != yes; then + FTSYS_SRC='$(BASE_DIR)/ftsystem.c' +else + FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' + + AC_CHECK_DECLS([munmap], + [], + [], + [ + +#ifdef HAVE_UNISTD_H +#include +#endif +#include + + ]) + + FT_MUNMAP_PARAM +fi +AC_SUBST([FTSYS_SRC]) + +AC_CHECK_FUNCS([memcpy memmove]) + + +# Check for system zlib + +# don't quote AS_HELP_STRING! +AC_ARG_WITH([zlib], + AS_HELP_STRING([--without-zlib], + [use internal zlib instead of system-wide])) +if test x$with_zlib != xno && test -z "$LIBZ"; then + AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) +fi +if test x$with_zlib != xno && test -n "$LIBZ"; then + CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $LIBZ" + SYSTEM_ZLIB=yes +fi + + +# Whether to use Mac OS resource-based fonts. + +# don't quote AS_HELP_STRING! +AC_ARG_WITH([old-mac-fonts], + AS_HELP_STRING([--with-old-mac-fonts], + [allow Mac resource-based fonts to be used])) +if test x$with_old_mac_fonts = xyes; then + orig_LDFLAGS="${LDFLAGS}" + AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) + LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \ + -Xlinker -framework -Xlinker ApplicationServices" + AC_TRY_LINK([], + [], + [AC_MSG_RESULT([ok])], + [AC_MSG_RESULT([not found]) + LDFLAGS="${orig_LDFLAGS}" + CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"]) +fi + + +# Whether to use FileManager which is deprecated since Mac OS X 10.4. + +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([ + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif + + ], + [ + + FCBPBPtr paramBlock; + short vRefNum; + long dirID; + ConstStr255Param fileName; + FSSpec* spec; + + + /* FSSpec functions: deprecated sicne Mac OS X 10.4 */ + PBGetFCBInfoSync( paramBlock ); + FSMakeFSSpec( vRefNum, dirID, fileName, spec ); + + ], + [AC_MSG_RESULT([ok]) + CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"], + [AC_MSG_RESULT([not found]) + CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"]) +fi + + +# Whether to use FileManager in Carbon since MacOS 9.x. + +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. + ]) + CFLAGS="$CFLAGS -DHAVE_FSREF=0" +elif test x$with_old_mac_fonts = xyes; then + AC_MSG_CHECKING([FSRef-based FileManager]) + AC_TRY_LINK([ + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif + + ], + [ + + 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 ); + + ], + [AC_MSG_RESULT([ok]) + CFLAGS="$CFLAGS -DHAVE_FSREF=1"], + [AC_MSG_RESULT([not found]) + CFLAGS="$CFLAGS -DHAVE_FSREF=0"]) +fi + + +# Whether to use QuickDraw API in ToolBox which is deprecated since Mac OS X 10.4. + +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([ + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif + + ], + [ + + Str255 familyName; + SInt16 familyID = 0; + FMInput* fmIn = NULL; + FMOutput* fmOut = NULL; + + + GetFontName( familyID, familyName ); + GetFNum( familyName, &familyID ); + fmOut = FMSwapFont( fmIn ); + + ], + [AC_MSG_RESULT([ok]) + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"], + [AC_MSG_RESULT([not found]) + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"]) +fi + + +# Whether to use QuickDraw API in Carbon which is deprecated since Mac OS X 10.4. + +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([ + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif + + ], + [ + + 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 ); + + ], + [AC_MSG_RESULT([ok]) + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"], + [AC_MSG_RESULT([not found]) + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"]) +fi + + +# Whether to use AppleTypeService since Mac OS X. + +# don't quote AS_HELP_STRING! +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([ + +#include + + ], + [ + + FSSpec* pathSpec; + + + ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); + ATSFontGetFileSpecification( 0, pathSpec ); + + ], + [AC_MSG_RESULT([ok]) + CFLAGS="$CFLAGS -DHAVE_ATS=1"], + [AC_MSG_RESULT([not found]) + CFLAGS="$CFLAGS -DHAVE_ATS=0"]) +fi + + +AC_SUBST([LIBZ]) +AC_SUBST([CFLAGS]) +AC_SUBST([LDFLAGS]) +AC_SUBST([SYSTEM_ZLIB]) + + +AC_PROG_LIBTOOL +# urgh -- these are internal libtool variables... +AC_SUBST([enable_shared]) +AC_SUBST([hardcode_libdir_flag_spec]) +AC_SUBST([wl]) + + +# 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 +# +AC_CONFIG_FILES([unix-cc.mk:unix-cc.in + unix-def.mk:unix-def.in + freetype-config + freetype2.pc:freetype2.in]) + +# re-generate the Jamfile to use libtool now +# +# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in]) + +AC_OUTPUT + +# end of configure.ac -- cgit v1.2.1