Commit graph

4 commits

Author SHA1 Message Date
Oneric
bb8f1b7b91 Add Cflags.private field
Those Cflags will be added if linking statically against a library;
this is necessary if the public headers need to be mutated depending on
linkage mode. Eg on Microsoft Windows varaibles whose definition resides
in a shared library need to be declared with a special attribute;
if linked to statically this attribute must not be used.

With Cflags.private their headers can eg check if 'LIBRARYNAME_STATIC'
is not defined to know that the special attribute is needed; without it
everyone linking against the library will need to manually research what
the expected macro is and set it depending on linkage mode.

This field is also supported by pkgconf since version 0.9.3 and
already used by (some) affected libraries targeting Microsoft Windows.

Note that _do_parse_cflags always adds the flags to pkg->cflags
and there is no pkg->cflags_private; instead the call to
parse_cflags_private is conditional. This matches the
existing implementation of Libs.private.

Closes: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/38
2021-09-30 19:02:01 +02:00
Dan Nicholson
b51cd2165d m4: Add PKG_PREREQ version checking macro
While PKG_PROG_PKG_CONFIG checks the version of pkg-config available at
build time, it doesn't check the version of the pkg-config macros being
used. PKG_PREREQ (like AC_PREREQ or LT_PREREQ) can be used to check the
version of the macros in use when configure is being generated by the
developer.

https://bugs.freedesktop.org/show_bug.cgi?id=89267
2015-09-26 15:02:36 -07:00
Dan Nicholson
29cddacd30 Update overlinking URL in guide
The Mandriva wiki is just being archived now, so point to the active
OpenMandriva article instead.
2014-09-22 12:25:16 -07:00
Dan Nicholson
b0fb05420c Include an introductory guide to pkg-config
The pkg-config(1) manual includes a lot of details behind pkg-config,
but not the background and usage patterns. This guide tries to provide
users and developers with a starting point for pkg-config.
2010-05-08 22:30:33 +02:00