[PATCH weston sdk v2 1/8] weston.pc: Add dependencies for pixman-1 and xkbcommon

Pekka Paalanen ppaalanen at gmail.com
Sat Jul 6 01:35:11 PDT 2013

On Fri, 05 Jul 2013 10:35:20 -0700
Thiago Macieira <thiago.macieira at intel.com> wrote:

> On sexta-feira, 5 de julho de 2013 09.26.23, Pekka Paalanen wrote:
> > The color management modules are an example of a weston module, that
> > does not need pixman at all. If you grep through src/cms*.[ch], there
> > is not a single mention of "pixman". Why do these modules, if they were
> > external, need to link directly to pixman then?
> That's a very good example.
> I had written:
> <<<
> If the CMS module compiles without the -I flags, then we shouldn't have pixman 
> listed in Requires. If it requires the -I flags, then it needs to publicly 
> depend on pixman, whether it actually uses anything from it or not.
> The edge scenario is when some headers in weston trigger the dependency on 
> pixman and some don't. Then it becomes a subjective call: is the dependency 
> big enough to warrant the public dependency? Is it likely to grow?
> >>>
> Then I actually tested pkg-config. Turns out that Requires.private behaves 
> slightly different from Libs.private. The docs are a bit cryptic:
>        Requires.private:
>               A list of packages required by this package. The difference from
>               Requires  is that the packages listed under Requires.private are
>               not taken into account when a flag list is computed for  dynami‐
>               cally linked executable (i.e., when --static was not specified).
>               In the situation where each .pc file corresponds to  a  library,
>               Requires.private shall be used exclusively to specify the depen‐
>               dencies between the libraries.
> First, it mentions that Requires.private is *not* used in dynamic linking. 
> Then it changes its mind with that last sentence, which is cryptic.

To me it reads: Requires.private libraries, that means -L and -l
flags, are not used, when linking to this project. If this project
which the .pc file corresponds to is a dynamic library itself, then
it should use Requires.private only.

The "executable" refers to a third party project, that is using this
project via this .pc file.

I think it simply forgets to document the CFLAGS behaviour, and
talks only about the linker flags.

> In any case, the actual behaviour is that Requires.private is used in dynamic 
> linking. It adds -I flags, but no -L or -l flags.


This might be nitpicking, but I don't consider -I flags to be about
linking. They are for the pre-processor. The linking mode does not
affect how CFLAGS are computed, right?

Weston SDK headers unconditionally use Pixman headers, so Pixman
headers are mandatory. Requires.private is completely sufficient
for that. Therefore there must be some other reason to use Requires.


ps. Please use reply-to-all.

More information about the wayland-devel mailing list