about the fields Requires.private and Libs.private

Dan Nicholson dbn.lists at gmail.com
Wed Sep 9 08:35:56 PDT 2009


On Tue, Sep 8, 2009 at 11:08 AM, Vincent Torri <vincent.torri at gmail.com> wrote:
> Hey,
>
> In our configure.ac, we list all the packages that have .pc files and we add
> them in the Requires.private.
> Suppose that one of those package is foo, PKG_CHECK_MODULE defines FOO_LIBS.
> One of us also added in the Libs.private field FOO_LIBS, that is:
>
> Requires.private: foo
> Libs: ****
> Libs.private: @FOO_LIBS@
>
> Is it really necessary to add @FOO_LIBS@ in Libs.private ?

No, it's redundant since Requires.private will add foo's Libs.private.
pkg-config will filter out the duplicates, though. You can test this
yourself by just doing 'PKG_CONFIG_PATH=. pkg-config --libs --static
foo'. You'll see that there's no difference if you comment out the
Libs.private line.

--
Dan


More information about the pkg-config mailing list