Le tridi 3 nivôse, an CCXXIII, Michael Niedermayer a écrit : > i think this is a bit misleading > because this doesnt result in working pkgconfig for cross compiling > you just get > WARNING: /usr/powerpc-linux-gnu/bin/pkg-config not found, library detection > may fail.
Right, I had not noticed that configure applies the cross-prefix to pkg-config too. > now if you write a /usr/powerpc-linux-gnu/bin/pkg-config wraper > script then this would set PKG_CONFIG_LIBDIR already > the faq should explain the need for such wraper script and how to > write one, or configure should work automatically with the non cross > pkgconfig. that is unless theres a easier way to get pkg config to > work for cross compiling. I have added explanations in the FAQ. Basically, the quickest way is "--pkg-config=pkg-config" to use the host's pkg-config, and then set PKG_CONFIG_LIBDIR. I added to my TODO list a note about automatically detecting that case, but I do not have a clean cross-compile environment to test extensively yet. Regards, -- Nicolas George
>From f739e2d588ddfa77d307f387d7a53f591e0d158c Mon Sep 17 00:00:00 2001 From: Nicolas George <geo...@nsup.org> Date: Tue, 23 Dec 2014 10:34:48 +0100 Subject: [PATCH] doc/faq: explain pkg-config basic setup. Signed-off-by: Nicolas George <geo...@nsup.org> --- doc/faq.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/faq.texi b/doc/faq.texi index fdcb46d..2f84b49 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -90,6 +90,35 @@ To build FFmpeg, you need to install the development package. It is usually called @file{libfoo-dev} or @file{libfoo-devel}. You can remove it after the build is finished, but be sure to keep the main package. +@section How do I make @command{pkg-config} find my libraries? + +Somewhere along with your libraries, there is a @file{.pc} file (or several) +in a @file{pkgconfig} directory. You need to set environment variables to +point @command{pkg-config} to these files. + +If you need to @emph{add} directories to @command{pkg-config}'s search list +(typical use case: library installed separately), add it to +@code{$PKG_CONFIG_PATH}: + +@example +export PKG_CONFIG_PATH=/opt/x264/lib/pkgconfig:/opt/opus/lib/pkgconfig +@end example + +If you need to @emph{replace} @command{pkg-config}'s search list +(typical use case: cross-compiling), set it in +@code{$PKG_CONFIG_LIBDIR}: + +@example +export PKG_CONFIG_LIBDIR=/home/me/cross/usr/lib/pkgconfig:/home/me/cross/usr/local/lib/pkgconfig +@end example + +If you need to know the library's internal dependencies (typical use: static +linking), add the @code{--static} option to @command{pkg-config}: + +@example +./configure --pkg-config-flags=--static +@end example + @chapter Usage @section ffmpeg does not work; what is wrong? -- 2.1.3
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel