[MPlayer-dev-eng] [PATCH] External libass detection in mingw

Josh joshf87 at live.com
Sat Jan 12 12:28:17 CET 2013


External libass detection hasn't worked in MinGW; "-lass" isn't enough. 
Since libass requires freetype, -lfreetype is needed and -lenca is 
needed if compiled with ENCA. fontconfig is a non-issue, probably that 
it is checked before libass takes care of it.

This was the best I could come up with. The 'test "$ass_internal"' was 
factored out to its own "if/fi" otherwise internal libass didn't work if 
external wasn't present. Maybe a saner solution is needed but it seemed 
to work as intended at least under mingw.
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 35737)
+++ configure	(working copy)
@@ -6201,10 +6201,13 @@
   return 0;
 }
 EOF
-        if cc_check -lass ; then
-            res_comment="external"
-            extra_ldflags="$extra_ldflags -lass"
-        elif test "$ass_internal" = auto ; then
+        for ld_ass in "-lass" "-lass -lfreetype" "-lass -lenca -lfreetype" ; do
+          if cc_check $ld_ass ; then
+              res_comment="external"
+              extra_ldflags="$extra_ldflags $ld_ass"
+          fi
+        done
+        if test "$ass_internal" = auto ; then
             ass_internal=yes
         else
             _ass=no


More information about the MPlayer-dev-eng mailing list