[MPlayer-users] zlib and fontconfig

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 2 19:17:18 CET 2006


Hello,
On Thu, Nov 02, 2006 at 08:59:12AM -0800, Nicholas Schell wrote:
[...]
> Freetype can make use of zlib and this becomes a problem because freetype
> itself is also a dependency of fontconfig. When mplayer attempts to find
> fontconfig it will only add -lexpat -lfreetype, but not -lz with ld. It will
> throw out errors from freetype that point to functions which make use of
> zlib (inflate*).

please try attached patch.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 20607)
+++ configure	(working copy)
@@ -5438,16 +5455,16 @@
     
 }
 EOF
-  _fontconfig=yes
-  if cc_check -lfontconfig ; then
-    _ld_fontconfig="-lfontconfig"
-  elif cc_check -lfontconfig -lexpat -lfreetype ; then
-    _ld_fontconfig="-lfontconfig -lexpat -lfreetype"
-  elif cc_check `$_pkg_config --silence-errors --cflags --libs fontconfig` ; then
-    _inc_extra="$_inc_extra `$_pkg_config --cflags fontconfig`"
-    _ld_fontconfig=`$_pkg_config --libs fontconfig`
-  else
-    _fontconfig=no
+  _fontconfig=no
+  for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
+    _ld_tmp="-lfontconfig $_ld_tmp"
+    cc_check $_ld_tmp && _fontconfig=yes && _ld_fontconfig="$_ld_tmp" && break
+  done
+  if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then
+    _inc_tmp=`$_pkg_config --cflags fontconfig`
+    _ld_tmp=`$_pkg_config --libs fontconfig`
+    cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes \
+      && _ld_fontconfig="$_ld_tmp" && _inc_extra="$_inc_extra $_inc_tmp"
   fi
 fi
 if test "$_fontconfig" = yes ; then


More information about the MPlayer-users mailing list