pkg-conf offers the following ways to get "link flags": --libs All link flags --libs-only-L The -L/-R stuff --libs-only-l The -l stuff --static Output ilbraries suitable for static linking
and then says the union of -only-L and -only-l may be smaller than the output of -libs because the latter might include flags like -rdynamic. We're already having to parse the output of pkg-config to try and separate LDADD stuff from LDFLAGS stuff, And this is before we start to address static v. dynamic things. This is because we really don't want -L stuff in LDADD, because we end up with things like: No rule to make: -L /usr/local/lib (or something). The autoconf macro PKG_CHECK_MODULES hasn't been all that helpful to us. What's a good way to deal with this? One could say that pkg-conf could be doing a better job. But even if it does, this would still require the folks who write the .pc files to do a better job of specifying their contents. Until we can expect .pc files to have proper content, I suspect we're going to need to have better smarts in autoconf/automake. But this will also require some better info about exactly how to do this, and it MIGHT be useful to augment PKG_CHECK_MODULES. Does anybody have some good/complete example cases for this? What's a good way to evolve this? -- Harlan Stenn <st...@ntp.org> http://networktimefoundation.org - be a member!