[PATCH 0/3] Add Cflags.private required on Windows

Oneric oneric at oneric.de
Fri Oct 15 20:31:14 UTC 2021

On Windows-platforms, linking to libraries which expose variables requires
different CFLAGS depending on linkage mode (more info in commit message).
Cflags.private was originally proposed to pkg-config to deal with this here:
and the field was added to pkgconf in August 2013:

As there simply is no other way to correctly deal with linking on windows with
pkg-config right now I believe it would be a very good idea to adopt this field
in pkg-config to standardise it.

This series has 3 commits but the first one is just a noop refactor to make the
next commit less noisy and the last one is a cosmetic renaming of existing
fields to make them consistent in the whole source code which can be dropped if
you prefer to not touch more than necessary.
Of course the documentation and tests are also updated to cover the new field.

I already opened a merge request on the GitLab repository 3 weeks ago before I
noticed the mailing list was or is apparently also used for patches. Apologies
if either these mails or the GitLab-MR were superfluous, I'm just not sure what
the preferred way to submit patches is.

Also note, that in order to compile this with recent autoconf and automake I
first had to apply another patch of mine (if you prefer I can post it to the ML
as well):

If you feel like anything needs more explaining or want me
to amend the patches, please do not hesitate to say so.

More information about the pkg-config mailing list