Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 1 | # This file is part of the FreeType project. |
| 2 | # |
| 3 | # Process this file with autoconf to produce a configure script. |
Werner Lemberg | 60a04df | 2005-06-04 23:04:30 +0000 | [diff] [blame] | 4 | # |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 5 | # Copyright 2001, 2002, 2003, 2004, 2005, 2006 by |
Werner Lemberg | 60a04df | 2005-06-04 23:04:30 +0000 | [diff] [blame] | 6 | # David Turner, Robert Wilhelm, and Werner Lemberg. |
| 7 | # |
| 8 | # This file is part of the FreeType project, and may only be used, modified, |
| 9 | # and distributed under the terms of the FreeType project license, |
| 10 | # LICENSE.TXT. By continuing to use, modify, or distribute this file you |
| 11 | # indicate that you have read the license and understand and accept it |
| 12 | # fully. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 13 | |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 14 | AC_INIT |
| 15 | AC_CONFIG_SRCDIR([ftconfig.in]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 16 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 17 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 18 | # Don't forget to update docs/VERSION.DLL! |
| 19 | |
Werner Lemberg | 49f4d34 | 2005-06-16 19:07:08 +0000 | [diff] [blame] | 20 | version_info='9:9:3' |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 21 | AC_SUBST([version_info]) |
Werner Lemberg | 3de5b07 | 2001-03-20 07:52:52 +0000 | [diff] [blame] | 22 | ft_version=`echo $version_info | tr : .` |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 23 | AC_SUBST([ft_version]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 24 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 25 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 26 | # checks for system type |
| 27 | |
| 28 | AC_CANONICAL_TARGET |
| 29 | |
| 30 | |
| 31 | # checks for programs |
| 32 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 33 | AC_PROG_CC |
| 34 | AC_PROG_CPP |
| 35 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 36 | |
| 37 | # get compiler flags right |
| 38 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 39 | if test "x$CC" = xgcc; then |
Werner Lemberg | 92aa527 | 2005-05-23 21:33:02 +0000 | [diff] [blame] | 40 | XX_CFLAGS="-Wall" |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 41 | XX_ANSIFLAGS="-pedantic -ansi" |
| 42 | else |
| 43 | case "$host" in |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 44 | *-dec-osf*) |
| 45 | CFLAGS= |
| 46 | XX_CFLAGS="-std1 -g3" |
| 47 | XX_ANSIFLAGS= |
| 48 | ;; |
| 49 | *) |
| 50 | XX_CFLAGS= |
| 51 | XX_ANSIFLAGS= |
| 52 | ;; |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 53 | esac |
| 54 | fi |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 55 | AC_SUBST([XX_CFLAGS]) |
| 56 | AC_SUBST([XX_ANSIFLAGS]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 57 | |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 58 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 59 | # auxiliary programs |
| 60 | |
| 61 | AC_CHECK_PROG([RMF], [rm], [rm -f]) |
| 62 | AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) |
| 63 | |
| 64 | |
| 65 | # Since this file will be finally moved to another directory we make |
| 66 | # the path of the install script absolute. This small code snippet has |
| 67 | # been taken from automake's `ylwrap' script. |
| 68 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 69 | AC_PROG_INSTALL |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 70 | case "$INSTALL" in |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 71 | /*) |
| 72 | ;; |
| 73 | */*) |
| 74 | INSTALL="`pwd`/$INSTALL" ;; |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 75 | esac |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 76 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 77 | |
| 78 | # checks for header files |
| 79 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 80 | AC_HEADER_STDC |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 81 | AC_CHECK_HEADERS([fcntl.h unistd.h]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 82 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 83 | |
| 84 | # checks for typedefs, structures, and compiler characteristics |
| 85 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 86 | AC_C_CONST |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 87 | AC_CHECK_SIZEOF([int]) |
| 88 | AC_CHECK_SIZEOF([long]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 89 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 90 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 91 | # checks for library functions |
| 92 | |
| 93 | # Here we check whether we can use our mmap file component. |
| 94 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 95 | AC_FUNC_MMAP |
| 96 | if test "$ac_cv_func_mmap_fixed_mapped" != yes; then |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 97 | FTSYS_SRC='$(BASE_DIR)/ftsystem.c' |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 98 | else |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 99 | FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' |
Werner Lemberg | b1dd353 | 2000-07-31 22:51:00 +0000 | [diff] [blame] | 100 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 101 | AC_CHECK_DECLS([munmap], |
| 102 | [], |
| 103 | [], |
| 104 | [ |
| 105 | |
| 106 | #ifdef HAVE_UNISTD_H |
| 107 | #include <unistd.h> |
| 108 | #endif |
| 109 | #include <sys/mman.h> |
| 110 | |
| 111 | ]) |
| 112 | |
Werner Lemberg | b1dd353 | 2000-07-31 22:51:00 +0000 | [diff] [blame] | 113 | FT_MUNMAP_PARAM |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 114 | fi |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 115 | AC_SUBST([FTSYS_SRC]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 116 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 117 | AC_CHECK_FUNCS([memcpy memmove]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 118 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 119 | |
| 120 | # Check for system zlib |
| 121 | |
| 122 | AC_ARG_WITH([zlib], |
| 123 | dnl don't quote AS_HELP_STRING! |
| 124 | AS_HELP_STRING([--without-zlib], |
| 125 | [use internal zlib instead of system-wide])) |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 126 | if test x$with_zlib != xno && test -z "$LIBZ"; then |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 127 | AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 128 | fi |
| 129 | if test x$with_zlib != xno && test -n "$LIBZ"; then |
| 130 | CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" |
David Turner | 19b6b99 | 2002-12-23 22:40:21 +0000 | [diff] [blame] | 131 | LDFLAGS="$LDFLAGS $LIBZ" |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 132 | SYSTEM_ZLIB=yes |
| 133 | fi |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 134 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 135 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 136 | # Whether to use Mac OS resource-based fonts. |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 137 | |
| 138 | AC_ARG_WITH([old-mac-fonts], |
| 139 | dnl don't quote AS_HELP_STRING! |
| 140 | AS_HELP_STRING([--with-old-mac-fonts], |
| 141 | [allow Mac resource-based fonts to be used])) |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 142 | if test x$with_old_mac_fonts = xyes; then |
Suzuki, Toshiya (鈴木俊哉) | 458c342 | 2006-02-08 12:58:24 +0000 | [diff] [blame] | 143 | orig_LDFLAGS="${LDFLAGS}" |
| 144 | AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 145 | LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \ |
| 146 | -Xlinker -framework -Xlinker ApplicationServices" |
Suzuki, Toshiya (鈴木俊哉) | 458c342 | 2006-02-08 12:58:24 +0000 | [diff] [blame] | 147 | AC_TRY_LINK([ ], [ ], [ |
| 148 | AC_MSG_RESULT([ok]) |
| 149 | ], [ |
| 150 | AC_MSG_RESULT([not found]) |
| 151 | LDFLAGS="${orig_LDFLAGS}" |
| 152 | CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" |
| 153 | ]) |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 154 | fi |
| 155 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 156 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 157 | # Whether to use FileManager which is deprecated since Mac OS X 10.4. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 158 | |
| 159 | AC_ARG_WITH([fsspec], |
| 160 | AS_HELP_STRING([--with-fsspec], |
| 161 | [use obsolete FSSpec API of MacOS, if available (default=yes)])) |
| 162 | if test x$with_fsspec = xno; then |
| 163 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" |
| 164 | elif test x$with_old_mac_fonts = xyes; then |
| 165 | AC_MSG_CHECKING([FSSpec-based FileManager]) |
| 166 | AC_TRY_LINK([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 167 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 168 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 169 | # include <Carbon/Carbon.h> |
| 170 | # include <ApplicationServices/ApplicationServices.h> |
| 171 | #else |
| 172 | # include <ConditionalMacros.h> |
| 173 | # include <Files.h> |
| 174 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 175 | |
| 176 | ], |
| 177 | [ |
| 178 | |
| 179 | FCBPBPtr paramBlock; |
| 180 | short vRefNum; |
| 181 | long dirID; |
| 182 | ConstStr255Param fileName; |
| 183 | FSSpec* spec; |
| 184 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 185 | |
| 186 | /* FSSpec functions: deprecated sicne Mac OS X 10.4 */ |
| 187 | PBGetFCBInfoSync( paramBlock ); |
| 188 | FSMakeFSSpec( vRefNum, dirID, fileName, spec ); |
| 189 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 190 | ], |
| 191 | [AC_MSG_RESULT([ok]) |
| 192 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"], |
| 193 | [AC_MSG_RESULT([not found]) |
| 194 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 195 | fi |
| 196 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 197 | |
| 198 | # Whether to use FileManager in Carbon since MacOS 9.x. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 199 | |
| 200 | AC_ARG_WITH([fsref], |
| 201 | AS_HELP_STRING([--with-fsref], |
| 202 | [use Carbon FSRef API of MacOS, if available (default=yes)])) |
| 203 | if test x$with_fsref = xno; then |
| 204 | AC_MSG_WARN([ |
| 205 | *** WARNING |
| 206 | FreeType2 built without FSRef API cannot load |
| 207 | data-fork fonts on MacOS, except of XXX.dfont. |
| 208 | ]) |
| 209 | CFLAGS="$CFLAGS -DHAVE_FSREF=0" |
| 210 | elif test x$with_old_mac_fonts = xyes; then |
| 211 | AC_MSG_CHECKING([FSRef-based FileManager]) |
| 212 | AC_TRY_LINK([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 213 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 214 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 215 | # include <Carbon/Carbon.h> |
| 216 | # include <ApplicationServices/ApplicationServices.h> |
| 217 | #else |
| 218 | # include <ConditionalMacros.h> |
| 219 | # include <Files.h> |
| 220 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 221 | |
| 222 | ], |
| 223 | [ |
| 224 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 225 | FCBPBPtr paramBlock; |
| 226 | short vRefNum; |
| 227 | long dirID; |
| 228 | ConstStr255Param fileName; |
| 229 | FSSpec* spec; |
| 230 | |
| 231 | Boolean* isDirectory; |
| 232 | UInt8* path; |
| 233 | SInt16 desiredRefNum; |
| 234 | SInt16* iterator; |
| 235 | SInt16* actualRefNum; |
| 236 | HFSUniStr255* outForkName; |
| 237 | FSVolumeRefNum volume; |
| 238 | FSCatalogInfoBitmap whichInfo; |
| 239 | FSCatalogInfo* catalogInfo; |
| 240 | FSForkInfo* forkInfo; |
| 241 | FSRef* ref; |
| 242 | |
| 243 | |
| 244 | /* FSRef functions: no need to check? */ |
| 245 | FSGetForkCBInfo( desiredRefNum, volume, iterator, |
| 246 | actualRefNum, forkInfo, ref, |
| 247 | outForkName ); |
| 248 | FSpMakeFSRef ( spec, ref ); |
| 249 | FSGetCatalogInfo( ref, whichInfo, catalogInfo, |
| 250 | outForkName, spec, ref ); |
| 251 | FSPathMakeRef( path, ref, isDirectory ); |
| 252 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 253 | ], |
| 254 | [AC_MSG_RESULT([ok]) |
| 255 | CFLAGS="$CFLAGS -DHAVE_FSREF=1"], |
| 256 | [AC_MSG_RESULT([not found]) |
| 257 | CFLAGS="$CFLAGS -DHAVE_FSREF=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 258 | fi |
| 259 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 260 | |
| 261 | # Whether to use QuickDraw API in ToolBox which is deprecated since Mac OS X 10.4. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 262 | |
| 263 | AC_ARG_WITH([quickdraw-toolbox], |
| 264 | AS_HELP_STRING([--with-quickdraw-toolbox], |
| 265 | [use MacOS QuickDraw in ToolBox, if available (default=yes)])) |
| 266 | if test x$with_quickdraw_toolbox = xno; then |
| 267 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" |
| 268 | elif test x$with_old_mac_fonts = xyes; then |
| 269 | AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox]) |
| 270 | AC_TRY_LINK([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 271 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 272 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 273 | # include <Carbon/Carbon.h> |
| 274 | # include <ApplicationServices/ApplicationServices.h> |
| 275 | #else |
| 276 | # include <ConditionalMacros.h> |
| 277 | # include <Fonts.h> |
| 278 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 279 | |
| 280 | ], |
| 281 | [ |
| 282 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 283 | Str255 familyName; |
| 284 | SInt16 familyID = 0; |
| 285 | FMInput* fmIn = NULL; |
| 286 | FMOutput* fmOut = NULL; |
| 287 | |
| 288 | |
| 289 | GetFontName( familyID, familyName ); |
| 290 | GetFNum( familyName, &familyID ); |
| 291 | fmOut = FMSwapFont( fmIn ); |
| 292 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 293 | ], |
| 294 | [AC_MSG_RESULT([ok]) |
| 295 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"], |
| 296 | [AC_MSG_RESULT([not found]) |
| 297 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 298 | fi |
| 299 | |
| 300 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 301 | # Whether to use QuickDraw API in Carbon which is deprecated since Mac OS X 10.4. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 302 | |
| 303 | AC_ARG_WITH([quickdraw-carbon], |
| 304 | AS_HELP_STRING([--with-quickdraw-carbon], |
| 305 | [use MacOS QuickDraw in Carbon, if available (default=yes)])) |
| 306 | if test x$with_quickdraw_carbon = xno; then |
| 307 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" |
| 308 | elif test x$with_old_mac_fonts = xyes; then |
| 309 | AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon]) |
| 310 | AC_TRY_LINK([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 311 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 312 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 313 | # include <Carbon/Carbon.h> |
| 314 | # include <ApplicationServices/ApplicationServices.h> |
| 315 | #else |
| 316 | # include <ConditionalMacros.h> |
| 317 | # include <Fonts.h> |
| 318 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 319 | |
| 320 | ], |
| 321 | [ |
| 322 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 323 | FMFontFamilyIterator famIter; |
| 324 | FMFontFamily family; |
| 325 | Str255 famNameStr; |
| 326 | FMFontFamilyInstanceIterator instIter; |
| 327 | FMFontStyle style; |
| 328 | FMFontSize size; |
| 329 | FMFont font; |
| 330 | FSSpec* pathSpec; |
| 331 | |
| 332 | |
| 333 | FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, &famIter ); |
| 334 | FMGetNextFontFamily( &famIter, &family ); |
| 335 | FMGetFontFamilyName( family, famNameStr ); |
| 336 | FMCreateFontFamilyInstanceIterator( family, &instIter ); |
| 337 | FMGetNextFontFamilyInstance( &instIter, &font, &style, &size ); |
| 338 | FMDisposeFontFamilyInstanceIterator( &instIter ); |
| 339 | FMDisposeFontFamilyIterator( &famIter ); |
| 340 | FMGetFontContainer( font, pathSpec ); |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 341 | |
| 342 | ], |
| 343 | [AC_MSG_RESULT([ok]) |
| 344 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"], |
| 345 | [AC_MSG_RESULT([not found]) |
| 346 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 347 | fi |
| 348 | |
| 349 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 350 | # Whether to use AppleTypeService since Mac OS X. |
| 351 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 352 | AC_ARG_WITH([ats], |
| 353 | dnl don't quote AS_HELP_STRING! |
| 354 | AS_HELP_STRING([--with-ats], |
| 355 | [use AppleTypeService, if available (default=yes)])) |
| 356 | if test x$with_ats = xno; then |
| 357 | CFLAGS="$CFLAGS -DHAVE_ATS=0" |
| 358 | elif test x$with_old_mac_fonts = xyes; then |
| 359 | AC_MSG_CHECKING([AppleTypeService functions]) |
| 360 | AC_TRY_LINK([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 361 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 362 | #include <Carbon/Carbon.h> |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 363 | |
| 364 | ], |
| 365 | [ |
| 366 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 367 | FSSpec* pathSpec; |
| 368 | |
| 369 | |
| 370 | ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); |
| 371 | ATSFontGetFileSpecification( 0, pathSpec ); |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 372 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 373 | ], |
| 374 | [AC_MSG_RESULT([ok]) |
| 375 | CFLAGS="$CFLAGS -DHAVE_ATS=1"], |
| 376 | [AC_MSG_RESULT([not found]) |
| 377 | CFLAGS="$CFLAGS -DHAVE_ATS=0"]) |
| 378 | fi |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 379 | |
| 380 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 381 | AC_SUBST([LIBZ]) |
| 382 | AC_SUBST([CFLAGS]) |
| 383 | AC_SUBST([LDFLAGS]) |
| 384 | AC_SUBST([SYSTEM_ZLIB]) |
| 385 | |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 386 | |
Werner Lemberg | c0c2abe | 2001-06-07 17:36:17 +0000 | [diff] [blame] | 387 | AC_PROG_LIBTOOL |
Werner Lemberg | 53a1edd | 2004-02-08 22:45:48 +0000 | [diff] [blame] | 388 | # urgh -- these are internal libtool variables... |
| 389 | AC_SUBST([enable_shared]) |
| 390 | AC_SUBST([hardcode_libdir_flag_spec]) |
| 391 | AC_SUBST([wl]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 392 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 393 | |
| 394 | # configuration file -- stay in 8.3 limit |
| 395 | # |
| 396 | # since #undef doesn't survive in configuration header files we replace |
| 397 | # `/undef' with `#undef' after creating the output file |
| 398 | |
| 399 | AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in], |
| 400 | [mv ftconfig.h ftconfig.tmp |
| 401 | sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h |
| 402 | rm ftconfig.tmp]) |
| 403 | |
| 404 | # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' |
| 405 | # and 'builds/unix/unix-cc.mk' that will be used by the build system |
| 406 | # |
Werner Lemberg | 3a317c6 | 2003-04-28 09:43:32 +0000 | [diff] [blame] | 407 | AC_CONFIG_FILES([unix-cc.mk:unix-cc.in |
| 408 | unix-def.mk:unix-def.in |
| 409 | freetype-config |
| 410 | freetype2.pc:freetype2.in]) |
David Turner | ce9a044 | 2002-01-08 18:33:55 +0000 | [diff] [blame] | 411 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 412 | # re-generate the Jamfile to use libtool now |
| 413 | # |
| 414 | # AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in]) |
David Turner | ce9a044 | 2002-01-08 18:33:55 +0000 | [diff] [blame] | 415 | |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 416 | AC_OUTPUT |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 417 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 418 | # end of configure.ac |