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 | 9b9d334 | 2008-02-21 23:22:06 +0000 | [diff] [blame] | 5 | # Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 | 4df5b26 | 2006-05-08 07:10:29 +0000 | [diff] [blame] | 14 | AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype]) |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 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 | be54a68 | 2008-06-29 07:43:41 +0000 | [diff] [blame] | 20 | version_info='9:18: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 | |
Suzuki, Toshiya (鈴木俊哉) | bfe872d | 2006-10-14 13:08:05 +0000 | [diff] [blame] | 28 | AC_CANONICAL_BUILD |
| 29 | AC_CANONICAL_HOST |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 30 | AC_CANONICAL_TARGET |
| 31 | |
| 32 | |
| 33 | # checks for programs |
| 34 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 35 | AC_PROG_CC |
| 36 | AC_PROG_CPP |
Suzuki, Toshiya (鈴木俊哉) | bfe872d | 2006-10-14 13:08:05 +0000 | [diff] [blame] | 37 | AC_SUBST(EXEEXT) |
| 38 | |
| 39 | |
| 40 | # checks for native programs to generate building tool |
| 41 | |
| 42 | if test ${cross_compiling} = yes; then |
Suzuki, Toshiya (鈴木俊哉) | 4fc0cce | 2007-08-11 16:35:06 +0000 | [diff] [blame] | 43 | AC_CHECK_PROG(CC_BUILD, ${build}-gcc, ${build}-gcc) |
Suzuki, Toshiya (鈴木俊哉) | bfe872d | 2006-10-14 13:08:05 +0000 | [diff] [blame] | 44 | test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, gcc, gcc) |
| 45 | test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, cc, cc, , , /usr/ucb/cc) |
| 46 | test -z "${CC_BUILD}" && AC_MSG_ERROR([cannot find native C compiler]) |
| 47 | |
| 48 | AC_MSG_CHECKING([for suffix of native executables]) |
| 49 | rm -f a.* b.* a_out.exe conftest.* |
| 50 | echo > conftest.c "int main() { return 0;}" |
| 51 | ${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working]) |
| 52 | rm -f conftest.c |
| 53 | if test -x a.out -o -x b.out -o -x conftest; then |
| 54 | EXEEXT_BUILD="" |
| 55 | elif test -x a_out.exe -o -x conftest.exe; then |
| 56 | EXEEXT_BUILD=".exe" |
| 57 | elif test -x conftest.* ; then |
| 58 | EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\.//g'` |
| 59 | fi |
| 60 | AC_MSG_RESULT($EXEEXT_BUILD) |
| 61 | else |
| 62 | CC_BUILD=${CC} |
| 63 | EXEEXT_BUILD=${EXEEXT} |
| 64 | fi |
| 65 | |
| 66 | |
| 67 | if test ! -z ${EXEEXT_BUILD}; then |
| 68 | EXEEXT_BUILD=."${EXEEXT_BUILD}" |
| 69 | fi |
| 70 | AC_SUBST(CC_BUILD) |
| 71 | AC_SUBST(EXEEXT_BUILD) |
| 72 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 73 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 74 | |
| 75 | # get compiler flags right |
| 76 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 77 | if test "x$CC" = xgcc; then |
Werner Lemberg | 92aa527 | 2005-05-23 21:33:02 +0000 | [diff] [blame] | 78 | XX_CFLAGS="-Wall" |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 79 | XX_ANSIFLAGS="-pedantic -ansi" |
| 80 | else |
| 81 | case "$host" in |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 82 | *-dec-osf*) |
| 83 | CFLAGS= |
| 84 | XX_CFLAGS="-std1 -g3" |
| 85 | XX_ANSIFLAGS= |
| 86 | ;; |
| 87 | *) |
| 88 | XX_CFLAGS= |
| 89 | XX_ANSIFLAGS= |
| 90 | ;; |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 91 | esac |
| 92 | fi |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 93 | AC_SUBST([XX_CFLAGS]) |
| 94 | AC_SUBST([XX_ANSIFLAGS]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 95 | |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 96 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 97 | # auxiliary programs |
| 98 | |
| 99 | AC_CHECK_PROG([RMF], [rm], [rm -f]) |
| 100 | AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) |
| 101 | |
| 102 | |
| 103 | # Since this file will be finally moved to another directory we make |
| 104 | # the path of the install script absolute. This small code snippet has |
| 105 | # been taken from automake's `ylwrap' script. |
| 106 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 107 | AC_PROG_INSTALL |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 108 | case "$INSTALL" in |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 109 | /*) |
| 110 | ;; |
| 111 | */*) |
| 112 | INSTALL="`pwd`/$INSTALL" ;; |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 113 | esac |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 114 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 115 | |
| 116 | # checks for header files |
| 117 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 118 | AC_HEADER_STDC |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 119 | AC_CHECK_HEADERS([fcntl.h unistd.h]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 120 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 121 | |
| 122 | # checks for typedefs, structures, and compiler characteristics |
| 123 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 124 | AC_C_CONST |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 125 | AC_CHECK_SIZEOF([int]) |
| 126 | AC_CHECK_SIZEOF([long]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 127 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 128 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 129 | # checks for library functions |
| 130 | |
| 131 | # Here we check whether we can use our mmap file component. |
| 132 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 133 | AC_FUNC_MMAP |
| 134 | if test "$ac_cv_func_mmap_fixed_mapped" != yes; then |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 135 | FTSYS_SRC='$(BASE_DIR)/ftsystem.c' |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 136 | else |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 137 | FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' |
Werner Lemberg | b1dd353 | 2000-07-31 22:51:00 +0000 | [diff] [blame] | 138 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 139 | AC_CHECK_DECLS([munmap], |
| 140 | [], |
| 141 | [], |
| 142 | [ |
| 143 | |
| 144 | #ifdef HAVE_UNISTD_H |
| 145 | #include <unistd.h> |
| 146 | #endif |
| 147 | #include <sys/mman.h> |
| 148 | |
| 149 | ]) |
| 150 | |
Werner Lemberg | b1dd353 | 2000-07-31 22:51:00 +0000 | [diff] [blame] | 151 | FT_MUNMAP_PARAM |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 152 | fi |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 153 | AC_SUBST([FTSYS_SRC]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 154 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 155 | AC_CHECK_FUNCS([memcpy memmove]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 156 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 157 | |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 158 | # check for system zlib |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 159 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 160 | # don't quote AS_HELP_STRING! |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 161 | AC_ARG_WITH([zlib], |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 162 | AS_HELP_STRING([--without-zlib], |
| 163 | [use internal zlib instead of system-wide])) |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 164 | if test x$with_zlib != xno && test -z "$LIBZ"; then |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 165 | AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 166 | fi |
| 167 | if test x$with_zlib != xno && test -n "$LIBZ"; then |
| 168 | CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" |
David Turner | 19b6b99 | 2002-12-23 22:40:21 +0000 | [diff] [blame] | 169 | LDFLAGS="$LDFLAGS $LIBZ" |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 170 | SYSTEM_ZLIB=yes |
| 171 | fi |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 172 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 173 | |
Werner Lemberg | be54a68 | 2008-06-29 07:43:41 +0000 | [diff] [blame] | 174 | # check Apple's `-isysroot' option and duplicate it to LDFLAGS if required -- |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 175 | # Apple TechNote 2137 recommends to include it in CFLAGS but not in LDFLAGS |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 176 | |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 177 | AC_MSG_CHECKING([whether CFLAGS includes -isysroot option]) |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 178 | case "$CFLAGS" in |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 179 | *sysroot* ) |
| 180 | AC_MSG_RESULT([yes]) |
| 181 | AC_MSG_CHECKING([whether LDFLAGS includes -isysroot option]) |
| 182 | case "$LDFLAGS" in |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 183 | *sysroot* ) |
| 184 | AC_MSG_RESULT([yes]) |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 185 | ;; |
| 186 | *) |
| 187 | AC_MSG_RESULT([no]) |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 188 | isysroot_dir=`echo ${CFLAGS} | tr '\t' ' ' | sed 's/^.*-isysroot *//;s/ .*//'` |
| 189 | AC_MSG_WARN(-isysroot ${isysroot_dir} is added to LDFLAGS) |
| 190 | LDFLAGS="-isysroot ${isysroot_dir} ${LDFLAGS}" |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 191 | ;; |
Werner Lemberg | 745a4f4 | 2008-06-22 22:41:24 +0000 | [diff] [blame] | 192 | esac |
| 193 | ;; |
| 194 | *) |
| 195 | AC_MSG_RESULT([no]) |
| 196 | ;; |
Suzuki, Toshiya (鈴木俊哉) | b1c36cf | 2008-06-22 15:32:56 +0000 | [diff] [blame] | 197 | esac |
| 198 | |
| 199 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 200 | # Whether to use Mac OS resource-based fonts. |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 201 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 202 | # don't quote AS_HELP_STRING! |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 203 | AC_ARG_WITH([old-mac-fonts], |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 204 | AS_HELP_STRING([--with-old-mac-fonts], |
| 205 | [allow Mac resource-based fonts to be used])) |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 206 | if test x$with_old_mac_fonts = xyes; then |
Suzuki, Toshiya (鈴木俊哉) | 458c342 | 2006-02-08 12:58:24 +0000 | [diff] [blame] | 207 | orig_LDFLAGS="${LDFLAGS}" |
| 208 | AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) |
Suzuki, Toshiya (鈴木俊哉) | 5d3ac4a | 2008-02-21 10:15:41 +0000 | [diff] [blame] | 209 | FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" |
Suzuki, Toshiya (鈴木俊哉) | 9d49961 | 2006-10-12 01:35:54 +0000 | [diff] [blame] | 210 | LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS" |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 211 | AC_LINK_IFELSE([ |
| 212 | AC_LANG_PROGRAM([ |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 213 | |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +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 | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 221 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 222 | ], |
| 223 | [ |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 224 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 225 | short res = 0; |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 226 | |
| 227 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 228 | UseResFile( res ); |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 229 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 230 | ])], |
Suzuki, Toshiya (鈴木俊哉) | 027357f | 2007-02-05 02:50:45 +0000 | [diff] [blame] | 231 | [AC_MSG_RESULT([ok]) |
| 232 | AC_MSG_CHECKING([OS_INLINE macro is ANSI compatible]) |
| 233 | orig_CFLAGS="$CFLAGS" |
| 234 | CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 235 | AC_COMPILE_IFELSE([ |
| 236 | AC_LANG_PROGRAM([ |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 237 | |
Suzuki, Toshiya (鈴木俊哉) | 027357f | 2007-02-05 02:50:45 +0000 | [diff] [blame] | 238 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 239 | # include <Carbon/Carbon.h> |
| 240 | # include <ApplicationServices/ApplicationServices.h> |
| 241 | #else |
| 242 | # include <ConditionalMacros.h> |
| 243 | # include <Files.h> |
| 244 | #endif |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 245 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 246 | ], |
| 247 | [ |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 248 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 249 | /* OSHostByteOrder() is typed as OS_INLINE */ |
| 250 | int32_t os_byte_order = OSHostByteOrder(); |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 251 | |
| 252 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 253 | if ( OSBigEndian != os_byte_order ) |
| 254 | return 1; |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 255 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 256 | ])], |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 257 | [AC_MSG_RESULT([ok]) |
| 258 | CFLAGS="$orig_CFLAGS" |
| 259 | CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1" |
| 260 | ], |
| 261 | [AC_MSG_RESULT([no, ANSI incompatible]) |
| 262 | CFLAGS="$orig_CFLAGS" |
Suzuki, Toshiya (鈴木俊哉) | f3a924d | 2008-06-24 17:13:58 +0000 | [diff] [blame] | 263 | ]) |
| 264 | AC_MSG_CHECKING([type ResourceIndex]) |
| 265 | orig_CFLAGS="$CFLAGS" |
| 266 | CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" |
| 267 | AC_COMPILE_IFELSE([ |
| 268 | AC_LANG_PROGRAM([ |
| 269 | |
| 270 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 271 | # include <Carbon/Carbon.h> |
| 272 | # include <ApplicationServices/ApplicationServices.h> |
| 273 | #else |
| 274 | # include <ConditionalMacros.h> |
| 275 | # include <Files.h> |
| 276 | # include <Resources.h> |
| 277 | #endif |
| 278 | |
| 279 | ], |
| 280 | [ |
| 281 | |
| 282 | ResourceIndex i = 0; |
| 283 | return i; |
| 284 | |
| 285 | ])], |
| 286 | [AC_MSG_RESULT([ok]) |
| 287 | CFLAGS="$orig_CFLAGS" |
| 288 | CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX" |
| 289 | ], |
| 290 | [AC_MSG_RESULT([no]) |
| 291 | CFLAGS="$orig_CFLAGS" |
Werner Lemberg | e172c33 | 2008-06-25 22:21:42 +0000 | [diff] [blame] | 292 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 293 | [AC_MSG_RESULT([not found]) |
| 294 | LDFLAGS="${orig_LDFLAGS}" |
| 295 | CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"]) |
Suzuki, Toshiya (鈴木俊哉) | 8cfa8bd | 2006-05-19 22:11:50 +0000 | [diff] [blame] | 296 | else |
| 297 | case x$target_os in |
| 298 | xdarwin*) |
| 299 | dnl AC_MSG_WARN([target system is MacOS but configured to build without Carbon]) |
| 300 | CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" |
| 301 | ;; |
| 302 | *) ;; |
| 303 | esac |
Werner Lemberg | 6eb116e | 2003-05-11 07:12:26 +0000 | [diff] [blame] | 304 | fi |
| 305 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 306 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 307 | # 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] | 308 | |
| 309 | AC_ARG_WITH([fsspec], |
| 310 | AS_HELP_STRING([--with-fsspec], |
| 311 | [use obsolete FSSpec API of MacOS, if available (default=yes)])) |
| 312 | if test x$with_fsspec = xno; then |
| 313 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 314 | elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 315 | AC_MSG_CHECKING([FSSpec-based FileManager]) |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 316 | AC_LINK_IFELSE([ |
| 317 | AC_LANG_PROGRAM([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 318 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 319 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 320 | # include <Carbon/Carbon.h> |
| 321 | # include <ApplicationServices/ApplicationServices.h> |
| 322 | #else |
| 323 | # include <ConditionalMacros.h> |
| 324 | # include <Files.h> |
| 325 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 326 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 327 | ], |
| 328 | [ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 329 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 330 | FCBPBPtr paramBlock; |
| 331 | short vRefNum; |
| 332 | long dirID; |
| 333 | ConstStr255Param fileName; |
| 334 | FSSpec* spec; |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 335 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 336 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 337 | /* FSSpec functions: deprecated since Mac OS X 10.4 */ |
| 338 | PBGetFCBInfoSync( paramBlock ); |
| 339 | FSMakeFSSpec( vRefNum, dirID, fileName, spec ); |
Werner Lemberg | b4142d5 | 2007-01-17 12:45:26 +0000 | [diff] [blame] | 340 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 341 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 342 | [AC_MSG_RESULT([ok]) |
| 343 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"], |
| 344 | [AC_MSG_RESULT([not found]) |
| 345 | CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 346 | fi |
| 347 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 348 | |
| 349 | # Whether to use FileManager in Carbon since MacOS 9.x. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 350 | |
| 351 | AC_ARG_WITH([fsref], |
| 352 | AS_HELP_STRING([--with-fsref], |
| 353 | [use Carbon FSRef API of MacOS, if available (default=yes)])) |
| 354 | if test x$with_fsref = xno; then |
| 355 | AC_MSG_WARN([ |
| 356 | *** WARNING |
| 357 | FreeType2 built without FSRef API cannot load |
| 358 | data-fork fonts on MacOS, except of XXX.dfont. |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 359 | ]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 360 | CFLAGS="$CFLAGS -DHAVE_FSREF=0" |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 361 | elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 362 | AC_MSG_CHECKING([FSRef-based FileManager]) |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 363 | AC_LINK_IFELSE([ |
| 364 | AC_LANG_PROGRAM([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 365 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 366 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 367 | # include <Carbon/Carbon.h> |
| 368 | # include <ApplicationServices/ApplicationServices.h> |
| 369 | #else |
| 370 | # include <ConditionalMacros.h> |
| 371 | # include <Files.h> |
| 372 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 373 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 374 | ], |
| 375 | [ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 376 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 377 | short vRefNum; |
| 378 | long dirID; |
| 379 | ConstStr255Param fileName; |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 380 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 381 | Boolean* isDirectory; |
| 382 | UInt8* path; |
| 383 | SInt16 desiredRefNum; |
| 384 | SInt16* iterator; |
| 385 | SInt16* actualRefNum; |
| 386 | HFSUniStr255* outForkName; |
| 387 | FSVolumeRefNum volume; |
| 388 | FSCatalogInfoBitmap whichInfo; |
| 389 | FSCatalogInfo* catalogInfo; |
| 390 | FSForkInfo* forkInfo; |
| 391 | FSRef* ref; |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 392 | |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 393 | #if HAVE_FSSPEC |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 394 | FSSpec* spec; |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 395 | #endif |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 396 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 397 | /* FSRef functions: no need to check? */ |
| 398 | FSGetForkCBInfo( desiredRefNum, volume, iterator, |
| 399 | actualRefNum, forkInfo, ref, |
| 400 | outForkName ); |
| 401 | FSPathMakeRef( path, ref, isDirectory ); |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 402 | |
| 403 | #if HAVE_FSSPEC |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 404 | FSpMakeFSRef ( spec, ref ); |
| 405 | FSGetCatalogInfo( ref, whichInfo, catalogInfo, |
| 406 | outForkName, spec, ref ); |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 407 | #endif |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 408 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 409 | [AC_MSG_RESULT([ok]) |
| 410 | CFLAGS="$CFLAGS -DHAVE_FSREF=1"], |
| 411 | [AC_MSG_RESULT([not found]) |
| 412 | CFLAGS="$CFLAGS -DHAVE_FSREF=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 413 | fi |
| 414 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 415 | |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 416 | # Whether to use QuickDraw API in ToolBox which is deprecated since |
| 417 | # Mac OS X 10.4. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 418 | |
| 419 | AC_ARG_WITH([quickdraw-toolbox], |
| 420 | AS_HELP_STRING([--with-quickdraw-toolbox], |
| 421 | [use MacOS QuickDraw in ToolBox, if available (default=yes)])) |
| 422 | if test x$with_quickdraw_toolbox = xno; then |
| 423 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 424 | elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 425 | AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox]) |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 426 | AC_LINK_IFELSE([ |
| 427 | AC_LANG_PROGRAM([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 428 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 429 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 430 | # include <Carbon/Carbon.h> |
| 431 | # include <ApplicationServices/ApplicationServices.h> |
| 432 | #else |
| 433 | # include <ConditionalMacros.h> |
| 434 | # include <Fonts.h> |
| 435 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 436 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 437 | ], |
| 438 | [ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 439 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 440 | Str255 familyName; |
| 441 | SInt16 familyID = 0; |
| 442 | FMInput* fmIn = NULL; |
| 443 | FMOutput* fmOut = NULL; |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 444 | |
| 445 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 446 | GetFontName( familyID, familyName ); |
| 447 | GetFNum( familyName, &familyID ); |
| 448 | fmOut = FMSwapFont( fmIn ); |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 449 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 450 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 451 | [AC_MSG_RESULT([ok]) |
| 452 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"], |
| 453 | [AC_MSG_RESULT([not found]) |
| 454 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 455 | fi |
| 456 | |
| 457 | |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 458 | # Whether to use QuickDraw API in Carbon which is deprecated since |
| 459 | # Mac OS X 10.4. |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 460 | |
| 461 | AC_ARG_WITH([quickdraw-carbon], |
| 462 | AS_HELP_STRING([--with-quickdraw-carbon], |
| 463 | [use MacOS QuickDraw in Carbon, if available (default=yes)])) |
| 464 | if test x$with_quickdraw_carbon = xno; then |
| 465 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 466 | elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 467 | AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon]) |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 468 | AC_LINK_IFELSE([ |
| 469 | AC_LANG_PROGRAM([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 470 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 471 | #if defined(__GNUC__) && defined(__APPLE_CC__) |
| 472 | # include <Carbon/Carbon.h> |
| 473 | # include <ApplicationServices/ApplicationServices.h> |
| 474 | #else |
| 475 | # include <ConditionalMacros.h> |
| 476 | # include <Fonts.h> |
| 477 | #endif |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 478 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 479 | ], |
| 480 | [ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 481 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 482 | FMFontFamilyIterator famIter; |
| 483 | FMFontFamily family; |
| 484 | Str255 famNameStr; |
| 485 | FMFontFamilyInstanceIterator instIter; |
| 486 | FMFontStyle style; |
| 487 | FMFontSize size; |
| 488 | FMFont font; |
| 489 | FSSpec* pathSpec; |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 490 | |
| 491 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 492 | FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, |
| 493 | &famIter ); |
| 494 | FMGetNextFontFamily( &famIter, &family ); |
| 495 | FMGetFontFamilyName( family, famNameStr ); |
| 496 | FMCreateFontFamilyInstanceIterator( family, &instIter ); |
| 497 | FMGetNextFontFamilyInstance( &instIter, &font, &style, &size ); |
| 498 | FMDisposeFontFamilyInstanceIterator( &instIter ); |
| 499 | FMDisposeFontFamilyIterator( &famIter ); |
| 500 | FMGetFontContainer( font, pathSpec ); |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 501 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 502 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 503 | [AC_MSG_RESULT([ok]) |
| 504 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"], |
| 505 | [AC_MSG_RESULT([not found]) |
| 506 | CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"]) |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 507 | fi |
| 508 | |
| 509 | |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 510 | # Whether to use AppleTypeService since Mac OS X. |
| 511 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 512 | # don't quote AS_HELP_STRING! |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 513 | AC_ARG_WITH([ats], |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 514 | AS_HELP_STRING([--with-ats], |
| 515 | [use AppleTypeService, if available (default=yes)])) |
| 516 | if test x$with_ats = xno; then |
| 517 | CFLAGS="$CFLAGS -DHAVE_ATS=0" |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 518 | elif test x$with_old_mac_fonts = xyes -a x$with_ats != x ; then |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 519 | AC_MSG_CHECKING([AppleTypeService functions]) |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 520 | AC_LINK_IFELSE([ |
| 521 | AC_LANG_PROGRAM([ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 522 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 523 | #include <Carbon/Carbon.h> |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 524 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 525 | ], |
| 526 | [ |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 527 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 528 | FSSpec* pathSpec; |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 529 | |
| 530 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 531 | ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 532 | #if HAVE_FSSPEC |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 533 | ATSFontGetFileSpecification( 0, pathSpec ); |
Suzuki, Toshiya (鈴木俊哉) | 44b5e57 | 2007-12-06 07:47:25 +0000 | [diff] [blame] | 534 | #endif |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 535 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 536 | ])], |
Werner Lemberg | 6be99f9 | 2006-02-09 07:38:57 +0000 | [diff] [blame] | 537 | [AC_MSG_RESULT([ok]) |
| 538 | CFLAGS="$CFLAGS -DHAVE_ATS=1"], |
| 539 | [AC_MSG_RESULT([not found]) |
| 540 | CFLAGS="$CFLAGS -DHAVE_ATS=0"]) |
Werner Lemberg | 435046b | 2006-01-11 10:57:42 +0000 | [diff] [blame] | 541 | fi |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 542 | |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 543 | case "$CFLAGS" in |
| 544 | *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* ) |
| 545 | AC_MSG_WARN([ |
| 546 | *** WARNING |
Werner Lemberg | 0fd08bd | 2006-12-16 02:57:46 +0000 | [diff] [blame] | 547 | FSSpec/FSRef/QuickDraw/ATS options are explicitly given, |
Suzuki, Toshiya (鈴木俊哉) | 60e83a1 | 2008-02-14 02:55:16 +0000 | [diff] [blame] | 548 | thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c. |
Suzuki, Toshiya (鈴木俊哉) | 7e3d601 | 2006-12-15 15:23:21 +0000 | [diff] [blame] | 549 | ]) |
| 550 | CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/' |
| 551 | ;; |
| 552 | *) |
| 553 | ;; |
| 554 | esac |
| 555 | |
Suzuki, Toshiya (鈴木俊哉) | f8d16cc | 2006-01-11 09:28:38 +0000 | [diff] [blame] | 556 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 557 | AC_SUBST([LIBZ]) |
| 558 | AC_SUBST([CFLAGS]) |
| 559 | AC_SUBST([LDFLAGS]) |
Suzuki, Toshiya (鈴木俊哉) | 9d49961 | 2006-10-12 01:35:54 +0000 | [diff] [blame] | 560 | AC_SUBST([FT2_EXTRA_LIBS]) |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 561 | AC_SUBST([SYSTEM_ZLIB]) |
| 562 | |
David Turner | 621e488 | 2002-12-16 21:51:24 +0000 | [diff] [blame] | 563 | |
Werner Lemberg | a984fda | 2008-06-09 21:02:13 +0000 | [diff] [blame] | 564 | LT_INIT(win32-dll) |
Werner Lemberg | b661788 | 2007-08-04 22:17:48 +0000 | [diff] [blame] | 565 | |
Werner Lemberg | 53a1edd | 2004-02-08 22:45:48 +0000 | [diff] [blame] | 566 | AC_SUBST([hardcode_libdir_flag_spec]) |
| 567 | AC_SUBST([wl]) |
Werner Lemberg | 26bd7a2 | 2008-06-09 21:27:17 +0000 | [diff] [blame] | 568 | AC_SUBST([build_libtool_libs]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 569 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 570 | |
| 571 | # configuration file -- stay in 8.3 limit |
| 572 | # |
| 573 | # since #undef doesn't survive in configuration header files we replace |
| 574 | # `/undef' with `#undef' after creating the output file |
| 575 | |
| 576 | AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in], |
| 577 | [mv ftconfig.h ftconfig.tmp |
| 578 | sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h |
| 579 | rm ftconfig.tmp]) |
| 580 | |
| 581 | # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 582 | # and `builds/unix/unix-cc.mk' that will be used by the build system |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 583 | # |
Werner Lemberg | 3a317c6 | 2003-04-28 09:43:32 +0000 | [diff] [blame] | 584 | AC_CONFIG_FILES([unix-cc.mk:unix-cc.in |
| 585 | unix-def.mk:unix-def.in |
| 586 | freetype-config |
| 587 | freetype2.pc:freetype2.in]) |
David Turner | ce9a044 | 2002-01-08 18:33:55 +0000 | [diff] [blame] | 588 | |
Werner Lemberg | e42dbce | 2003-11-09 08:37:14 +0000 | [diff] [blame] | 589 | # re-generate the Jamfile to use libtool now |
| 590 | # |
| 591 | # AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in]) |
David Turner | ce9a044 | 2002-01-08 18:33:55 +0000 | [diff] [blame] | 592 | |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 593 | AC_OUTPUT |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 594 | |
Werner Lemberg | dcbb708 | 2007-02-08 08:54:09 +0000 | [diff] [blame] | 595 | # end of configure.raw |