Commit 9d49961fcc28a2824eecb008494bfc8f953e8f86

Suzuki, Toshiya (鈴木俊哉) 2006-10-12T01:35:54

* embed explicit Carbon dependency into freetype2.pc and freetype-config, if configured to use Carbon

diff --git a/ChangeLog b/ChangeLog
index 4888568..ca302fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-10-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	* builds/unix/configure.raw: Introduce new macro to embed optional
+	dependency: FT2_EXTRA_LIBS, which is embedded in freetype2.pc and
+	freetype-config. Use it to record Carbon dependency of MacOSX.
+
+	* builds/unix/freetype2.in: Embed FT2_EXTRA_LIBS.
+
+	* builds/unix/freetype-config.in: Ditto.
+
 2006-10-11  Werner Lemberg  <wl@gnu.org>
 
 	* devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): Define for
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 9d205da..7d1cd87 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -142,8 +142,8 @@ AC_ARG_WITH([old-mac-fonts],
 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"
+  FT2_EXTRA_LIBS="-Wl,-framework,CoreServices,-framework,ApplicationServices"
+  LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
   AC_TRY_LINK([],
     [],
     [AC_MSG_RESULT([ok])],
@@ -388,6 +388,7 @@ fi
 AC_SUBST([LIBZ])
 AC_SUBST([CFLAGS])
 AC_SUBST([LDFLAGS])
+AC_SUBST([FT2_EXTRA_LIBS])
 AC_SUBST([SYSTEM_ZLIB])
 
 
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index 16e15e5..57f0f95 100644
--- a/builds/unix/freetype-config.in
+++ b/builds/unix/freetype-config.in
@@ -141,7 +141,7 @@ if test "$echo_libs" = "yes" ; then
   if test "$enable_shared" = "yes" ; then
     eval "rpath=\"$hardcode_libdir_flag_spec\""
   fi
-  libs="-lfreetype @LIBZ@"
+  libs="-lfreetype @LIBZ@ @FT2_EXTRA_LIBS@"
   if test "$libdir" != "/usr/lib" && test "$libdir" != "/usr/lib64"; then
     echo -L$libdir $rpath $libs
   else
diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in
index 8c7754a..0d7aefa 100644
--- a/builds/unix/freetype2.in
+++ b/builds/unix/freetype2.in
@@ -7,5 +7,5 @@ Name: FreeType 2
 Description: A free, high-quality, and portable font engine.
 Version: @ft_version@
 Requires:
-Libs: -L${libdir} -lfreetype @LIBZ@
+Libs: -L${libdir} -lfreetype @LIBZ@ @FT2_EXTRA_LIBS@
 Cflags: -I${includedir}/freetype2 -I${includedir}