* builds/unix/configure.raw: Copy -isysroot option from CFLAGS to LDFLAGS, if required
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
diff --git a/ChangeLog b/ChangeLog
index 0ce63c0..ffa1bc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: If CFLAGS has "-isysroot XXX"
+ option but LDFLAGS does not, import it to LDFLAGS. The option
+ is used to specify non-default SDK on Mac OS X (e.g. universal
+ binary SDK for Mac OS X 10.4 on PowerPC platform). Although
+ Apple TechNote 2137 recommends to add the option only to CFLAGS,
+ LDFLAGS should include it because libfreetype.la is built with
+ -no-undefined. This fixes a bug reported by Ryan Schmidt in
+ MacPorts, http://trac.macports.org/ticket/15331.
+
2008-06-21 Werner Lemberg <wl@gnu.org>
Enable access to the various dropout rules of the B&W rasterizer.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 26a63c7..2015aac 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -171,6 +171,32 @@ if test x$with_zlib != xno && test -n "$LIBZ"; then
fi
+# check Apple "-isysroot" option and duplicate it to LDFLAGS if required
+# Apple TechNote 2137 recommends to include it in CFLAGS but not in LDFLAGS.
+
+AC_MSG_CHECKING([CFLAGS includes -isysroot option])
+case "$CFLAGS" in
+ *sysroot* )
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([LDFLAGS includes -isysroot option])
+ case "$LDFLAGS" in
+ *sysroot* )
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ isysroot_dir=`echo ${CFLAGS} | tr '\t' ' ' | sed 's/^.*-isysroot *//;s/ .*//'`
+ AC_MSG_WARN(-isysroot ${isysroot_dir} is added to LDFLAGS)
+ LDFLAGS="-isysroot ${isysroot_dir} ${LDFLAGS}"
+ ;;
+ esac
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+esac
+
+
# Whether to use Mac OS resource-based fonts.
# don't quote AS_HELP_STRING!