[FFmpeg-devel] [PATCH] Fix pkg-config detection when using a cross-prefix

Michael Niedermayer michaelni at gmx.at
Thu Jul 5 22:19:35 CEST 2012


On Thu, Jul 05, 2012 at 08:33:58PM +0200, Reimar Döffinger wrote:
> On Thu, Jul 05, 2012 at 12:33:33PM +0200, Michael Niedermayer wrote:
> > > >If you want to use the native pkg-config as a fallback then the
> > > >code you add should check that PKG_CONFIG_LIBDIR is set. If if its not
> > > >set it shouldnt use the native pkg-config
> > > 
> > > So only fall back if PKG_CONFIG_LIBDIR is not set?
> > 
> > if PKG_CONFIG_LIBDIR is set and no prefixed pkg-config is found then
> > the hosts could probably be used safely otherwise no pkg-config
> > should be used.
> > above is IMHO and from a quick look at things, its not tested ...
> 
> As someone else pointed out: If we ever start using pkg-config to detect
> host libraries (e.g. because we need them to calculate some hardcoded
> tables at compile time) we will be breaking that feature badly.
> It might be better to document a better solution (creating a script
> that acts as a cross-pkg-config) and make sure its easy to find from
> configure.

> Another alternative is that we try creating such a script on the fly,
> if it's possible to guess a suitable PKG_CONFIG_LIBDIR...

this is a great idea, actually i dont think a script is needed,
configure just needs to set the PKG_CONFIG_LIBDIR (and maybe others)
before calling the host pkg_config for the target and reset it
afterwards

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120705/6c0c6ec1/attachment.asc>


More information about the ffmpeg-devel mailing list