[FFmpeg-devel] [PATCH] doc/faq: explain pkg-config basic setup.

Nicolas George george at nsup.org
Tue Dec 23 10:35:12 CET 2014


Signed-off-by: Nicolas George <george at 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.
 
+ at 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
+ at code{$PKG_CONFIG_PATH}:
+
+ at example
+export PKG_CONFIG_PATH=/opt/x264/lib/pkgconfig:/opt/opus/lib/pkgconfig
+ at end example
+
+If you need to @emph{replace} @command{pkg-config}'s search list
+(typical use case: cross-compiling), set it in
+ at code{$PKG_CONFIG_LIBDIR}:
+
+ at example
+export PKG_CONFIG_LIBDIR=/home/me/cross/usr/lib/pkgconfig:/home/me/cross/usr/local/lib/pkgconfig
+ at 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}:
+
+ at example
+./configure --pkg-config-flags=--static
+ at end example
+
 @chapter Usage
 
 @section ffmpeg does not work; what is wrong?
-- 
2.1.3



More information about the ffmpeg-devel mailing list