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

Michael Niedermayer michaelni at gmx.at
Tue Dec 23 14:37:31 CET 2014


On Tue, Dec 23, 2014 at 02:23:49PM +0100, Nicolas George wrote:
> Le tridi 3 nivôse, an CCXXIII, Michael Niedermayer a écrit :
> > did you attach the correct patch ?
> > i dont see a mention on "--pkg-config=" in it
> 
> Sorry, forgot "-a" in "git commit -a --amend".
> 
> Regards,
> 
> -- 
>   Nicolas George

>  faq.texi |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 6d3aa5199ee359dcf30a4b66d8869e386a2a8752  0001-doc-faq-explain-pkg-config-basic-setup.patch
> From b8427aa4a698e892c94200cd8c7b5eb3bf11ce03 Mon Sep 17 00:00:00 2001
> From: Nicolas George <george at 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 <george at nsup.org>
> ---
>  doc/faq.texi | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/doc/faq.texi b/doc/faq.texi
> index fdcb46d..2ec6936 100644
> --- a/doc/faq.texi
> +++ b/doc/faq.texi
> @@ -90,6 +90,56 @@ 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
> +
> + at section How do I use @command{pkg-config} when cross-compiling?
> +
> +The best way is to install @command{pkg-config} in your cross-compilation
> +environment. It will automatically use the cross-compilation libraries.
> +
> +You can also use @command{pkg-config} from the host environment by
> +specifying explicitly @code{--pkg-config=pkg-config} to @command{configure}.
> +In that case, you must point @command{pkg-config} to the correct directories
> +using the @code{PKG_CONFIG_LIBDIR}, as explained in the previous entry.
> +
> +As an intermediate solution, you can place in your corss-compilation
> +environment a script that calls the host @command{pkg-config} with
> + at code{PKG_CONFIG_LIBDIR} set. That script can look like that:
> +
> + at example
> +#!/bin/sh

> +PKG_CONFIG_LIBDIR=/path/to/cross/libs

actually, maybe
PKG_CONFIG_LIBDIR=/path/to/cross/lib/pkgconfig
is a bit clearer

rest LGTM

[....]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141223/e614161d/attachment.asc>


More information about the ffmpeg-devel mailing list