* builds/unix/aclocal.m4: Comment out definition of `allow_undefined_flag' for Darwin 1.3. * builds/unix/configure.ac: Add option --with-old-mac-fonts. * builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3. * builds/unix/configure: Regenerated. * include/freetype/config/ftconfig.h: Fix conditions for defining `FT_MACINTOSH'. * src/base/ftbase.c: Include `ftmac.c' conditionally. * src/base/ftmac.c: Handle __GNUC__.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
diff --git a/ChangeLog b/ChangeLog
index 908c3ec..e882564 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,17 @@
-2003-15-07 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+2003-05-10 Dan Williams <dan@bigw.org>
+
+ * builds/unix/aclocal.m4: Comment out definition of
+ `allow_undefined_flag' for Darwin 1.3.
+ * builds/unix/configure.ac: Add option --with-old-mac-fonts.
+ * builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3.
+ * builds/unix/configure: Regenerated.
+
+ * include/freetype/config/ftconfig.h: Fix conditions for defining
+ `FT_MACINTOSH'.
+ * src/base/ftbase.c: Include `ftmac.c' conditionally.
+ * src/base/ftmac.c: Handle __GNUC__.
+
+2003-05-07 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
* src/cid/cidload.c (is_alpha): Removed.
(cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'.
diff --git a/builds/unix/aclocal.m4 b/builds/unix/aclocal.m4
index bb44b8d..e63092a 100644
--- a/builds/unix/aclocal.m4
+++ b/builds/unix/aclocal.m4
@@ -1574,7 +1574,7 @@ else
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
+# allow_undefined_flag='-undefined suppress'
;;
esac
# FIXME: Relying on posixy $() will cause problems for
diff --git a/builds/unix/configure b/builds/unix/configure
index a16cb4b..088fa76 100644
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -1009,6 +1009,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-zlib use internal zlib instead of system-wide
+ --with-old-mac-fonts allow Mac resource-based fonts to be used
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-pic try to use only PIC/non-PIC objects default=use both
@@ -4471,6 +4472,21 @@ if test x$with_zlib != xno && test -n "$LIBZ"; then
fi
+# Check whether --with-old-mac-fonts or --without-old-mac-fonts was given.
+if test "${with_old_mac_fonts+set}" = set; then
+ withval="$with_old_mac_fonts"
+
+fi;
+if test x$with_old_mac_fonts = xyes; then
+ CFLAGS="$CFLAGS -DTARGET_API_MAC_CARBON"
+ LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
+ -Xlinker -framework -Xlinker ApplicationServices"
+else
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+fi
+
+
+
@@ -5622,7 +5638,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5625 "configure"' > conftest.$ac_ext
+ echo '#line 5641 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6136,7 +6152,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:6139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -6698,7 +6714,7 @@ else
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
+# allow_undefined_flag='-undefined suppress'
;;
esac
# FIXME: Relying on posixy $() will cause problems for
@@ -7910,7 +7926,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7913 "configure"
+#line 7929 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8008,7 +8024,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8011 "configure"
+#line 8027 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac
index cc03504..e7ac82a 100644
--- a/builds/unix/configure.ac
+++ b/builds/unix/configure.ac
@@ -92,6 +92,18 @@ if test x$with_zlib != xno && test -n "$LIBZ"; then
LDFLAGS="$LDFLAGS $LIBZ"
SYSTEM_ZLIB=yes
fi
+
+dnl Whether to use Mac OS resource-based fonts or not
+AC_ARG_WITH(old-mac-fonts,
+ [ --with-old-mac-fonts allow Mac resource-based fonts to be used])
+if test x$with_old_mac_fonts = xyes; then
+ CFLAGS="$CFLAGS -DTARGET_API_MAC_CARBON"
+ LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
+ -Xlinker -framework -Xlinker ApplicationServices"
+else
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+fi
+
AC_SUBST(LIBZ)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
diff --git a/builds/unix/ltmain.sh b/builds/unix/ltmain.sh
index 7e0c9f4..8b50e53 100644
--- a/builds/unix/ltmain.sh
+++ b/builds/unix/ltmain.sh
@@ -2275,15 +2275,28 @@ compiler."
case $version_type in
none) ;;
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
+ darwin* | rhapsody*)
+ case "$host_os" in
+ darwin1.[012])
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ *)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ compatage=`expr $age - 1`
+ compatver="$major.$compatage.0"
+ verstring="-compatibility_version $compatver -current_version $versuffix"
+ ;;
+ esac
+ ;;
freebsd-aout)
major=".$current"
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 72bee0c..705539a 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -108,7 +108,8 @@ FT_BEGIN_HEADER
/* This is the only necessary change, so it is defined here instead */
/* providing a new configuration file. */
/* */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+#if ( defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
#define FT_MACINTOSH 1
#endif
diff --git a/src/base/ftbase.c b/src/base/ftbase.c
index 4ea846d..18a98c3 100644
--- a/src/base/ftbase.c
+++ b/src/base/ftbase.c
@@ -30,5 +30,8 @@
#include "ftobjs.c"
#include "ftnames.c"
+#if defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON )
+#include "ftmac.c"
+#endif
/* END */
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index 1f30696..4dbd825 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -62,15 +62,20 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_STREAM_H
+
+#ifdef __GNUC__
+#include "../truetype/ttobjs.h"
+#include "../type1/t1objs.h"
+#include <Carbon/Carbon.h>
+#else
#include "truetype/ttobjs.h"
#include "type1/t1objs.h"
-
#include <Resources.h>
#include <Fonts.h>
#include <Errors.h>
#include <Files.h>
#include <TextUtils.h>
-
+#endif
#include FT_MAC_H