Commit ab76d970e70634e1fcef774ab4ea59d9365b03fb

Werner Lemberg 2014-03-24T19:45:03

Fix Savannah bug #41946. Based on a patch from Marek Kašík <mkasik@redhat.com>. * builds/unix/configure.raw (LIBS_CONFIG): Remove. * builds/unix/freetype-config.in (libs): Hard-code value. * builds/unix/unix-def.in: Updated.

diff --git a/ChangeLog b/ChangeLog
index 1954f3d..0874f93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-03-24  Werner Lemberg  <wl@gnu.org>
+
+	Fix Savannah bug #41946.
+
+	Based on a patch from Marek Kašík <mkasik@redhat.com>.
+
+	* builds/unix/configure.raw (LIBS_CONFIG): Remove.
+	* builds/unix/freetype-config.in (libs): Hard-code value.
+	* builds/unix/unix-def.in: Updated.
+
 2014-03-22  Werner Lemberg  <wl@gnu.org>
 
 	Another revert for the change from 2014-03-18.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 5c712bf..8a17ffe 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -937,21 +937,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE"  \
                     -e 's/  *$//'   \
                     -e 's/  */ /g'`
 
-LIBS_CONFIG="-lfreetype      \
-             $ZLIB_LIBS      \
-             $BZIP2_LIBS     \
-             $LIBPNG_LIBS    \
-             $HARFBUZZ_LIBS  \
-             $ft2_extra_libs"
-# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
-# on if necessary; also beautify
-LIBS_CONFIG=`echo "$LIBS_CONFIG"                \
-             | sed -e 's|-L */usr/lib64/* | |g' \
-                   -e 's|-L */usr/lib/* | |g'   \
-                   -e 's/^  *//'                \
-                   -e 's/  *$//'                \
-                   -e 's/  */ /g'`
-
 LIBSSTATIC_CONFIG="-lfreetype              \
                    $zlib_libstaticconf     \
                    $bzip2_libstaticconf    \
@@ -971,7 +956,6 @@ LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG"          \
 AC_SUBST([ftmac_c])
 AC_SUBST([REQUIRES_PRIVATE])
 AC_SUBST([LIBS_PRIVATE])
-AC_SUBST([LIBS_CONFIG])
 AC_SUBST([LIBSSTATIC_CONFIG])
 
 AC_SUBST([hardcode_libdir_flag_spec])
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index 41c3a88..ebc311f 100644
--- a/builds/unix/freetype-config.in
+++ b/builds/unix/freetype-config.in
@@ -142,7 +142,7 @@ if test "$echo_cflags" = "yes" ; then
 fi
 
 if test "$echo_libs" = "yes" ; then
-  libs="%LIBS_CONFIG%"
+  libs="-lfreetype"
   staticlibs="%LIBSSTATIC_CONFIG%"
   if test "$show_static" = "yes" ; then
     libs="$staticlibs"
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index 35ea9c8..6a4eef6 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -64,7 +64,6 @@ version_info := @version_info@
 #
 REQUIRES_PRIVATE   := @REQUIRES_PRIVATE@
 LIBS_PRIVATE       := @LIBS_PRIVATE@
-LIBS_CONFIG        := @LIBS_CONFIG@
 LIBSSTATIC_CONFIG  := @LIBSSTATIC_CONFIG@
 build_libtool_libs := @build_libtool_libs@
 ft_version         := @ft_version@
@@ -102,8 +101,7 @@ NO_OUTPUT := 2> /dev/null
 
 $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
 	rm -f $@ $@.tmp
-	sed -e 's|%LIBS_CONFIG%|$(LIBS_CONFIG)|'               \
-	    -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|'   \
+	sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|'   \
 	    -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
 	    -e 's|%exec_prefix%|$(exec_prefix)|'               \
 	    -e 's|%ft_version%|$(ft_version)|'                 \