fix --with-old-mac-fonts option
diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac
index e0a70fe..529da51 100644
--- a/builds/unix/configure.ac
+++ b/builds/unix/configure.ac
@@ -140,10 +140,17 @@
   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"
-else
-  CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+  AC_TRY_LINK([ ], [ ], [
+    AC_MSG_RESULT([ok])
+  ], [
+    AC_MSG_RESULT([not found])
+    LDFLAGS="${orig_LDFLAGS}"
+    CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+  ])
 fi