On Mon, Jan 06, 2014 at 06:33:45PM +0200, Martin Storsjö wrote:
> On Mon, 6 Jan 2014, Luca Barbato wrote:
> >On 06/01/14 16:49, Martin Storsjö wrote:
> >>On Mon, 6 Jan 2014, Martin Storsjö wrote:
> >>>On Mon, 6 Jan 2014, Luca Barbato wrote:
> >>>>Should make work properly linking against static libraries dynamically
> >>>>linking secondary libraries.
> >>>>---
> >>>>
> >>>>Apparently yet another freetype cute feat.
> >>
> >>Nothing at all related to freetype in this, but just to proper
> >>pkg-config use...
> >>>>
> >>>>--- a/configure
> >>>>+++ b/configure
> >>>>@@ -918,8 +918,9 @@ check_pkg_config(){
> >>>>    funcs="$3"
> >>>>    shift 3
> >>>>    check_cmd $pkg_config --exists --print-errors $pkg || return
> >>>>-    pkg_cflags=$($pkg_config --cflags $pkg)
> >>>>-    pkg_libs=$($pkg_config --libs $pkg)
> >>>>+    enabled static && pkgconf_flags="--static"
> >>>>+    pkg_cflags=$($pkg_config --cflags $pkgconf_flags $pkg)
> >>>>+    pkg_libs=$($pkg_config --libs $pkgconf_flags $pkg)
> >>>
> >>>I'm not sure if this is right - we should pass --static to pkg-config
> >>>if we explicitly are linking statically to freetype (which we
> >>>seldom/never do)
> >>
> >>Ok, so now I read the irc backlog and noticed that this was exactly what
> >>the user was doing - explicitly adding --extra-ldflags=-static is what
> >>triggers this issue, not building static libav libs.
> >>
> >>So "enabled static" is not the right condition for this - looking for
> >>-static in the ldflags is probably the most correct way although that's
> >>also a little ugly.
> >
> >What about adding a --extra-pkgflags option and be done with that?
> 
> I guess it would work, but it would be pretty nonobvious to use and
> I doubt many would figure it out.

Do you see a better alternative?  I don't see how we can sensibly
detect how an external lib that we are to link against was compiled.
Also, dealing with such external library details seems to be going
out of scope for our configure...

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to