Avoids Msys path mangling that turns *nix paths (such as /usr/include) into
DOS-style absolute paths (such as c:/mingw/msys/1.0/include).
Allows mingw-built pkg-config to pass check-cflags.
Instead of hard-coding /usr/include, we now use the environment variable
PKG_CONFIG_SYSTEM_INCLUDE_PATH, defaulting to the argument of
./configure --with-system-include-path, which in turn defaults to
/usr/include.
Similarly, PKG_CONFIG_SYSTEM_LIBRARY_PATH defaults to /usr/lib or
/usr/lib:/usr/lib64 as appropriate.
(As currently implemented, this causes a behaviour change on Win32 -
the option -I/usr/include will now be filtered out.)
The intended usage is for Debian to configure pkg-config with
--with-system-include-path=/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include
and the corresponding library path, for multiarch support
(<http://bugs.debian.org/482884>).
Based on work by Colin Walters <walters@verbum.org>
--exists no longer does a full depth traversal, which means we need to
pay attention to the exit status when calling pkg-config --libs and
--cflags. If those fail, we run with --cflags and --libs to get the
error message before printing it out.
Fixes Freedesktop #36039
We used to call gnome-config, gtk-config, glib-config and so on, which
was useful in the beginning of pkg-config. This hasn't served any
practical purpose in recent years, so drop the support.
We want to use the libtool script to determine if indirect dependencies
should be listed. LT_OUTPUT forces the script to be created immediately
so that the test can be run reliably.
This is borrowed from glib's configure.in.
To ensure that pkg-config has been built and updated before running the
test suite, complete the top directory before descending to the check
directory.
There is really no reason to manually vet and run all the autotools.
That's what autoreconf is for. It has the added bonus that it will
descend to the glib subdirectory and rebuild the autotools there. The
handling of configure is also fixed as the previous --no-configure code
was completely broken.
This is basically the xorg autogen.sh, so we can be pretty confident
it'll work as advertised.
The bundled popt handled the case of Cflags or Libs with no value, but
newer popt linked through --with-installed-popt chokes parsing it into
a vector. This is arguably a popt bug in poptParseArgvString, but I
guess they expect you not to ask it to split an empty string.
In order to avoid having the COPYING file from automake included in
the distribution, add a copy of the GPLv2 for pkg-config. This matches
the source files, which all specify GPLv2+.
The COPYING file from upstream popt has also been added for the
bundled popt sources.
Allow paths and other components to contain shell metacharacters, but
escape them on output. White space has to be escaped in the input
files using quotes or backslashes
Freedesktop.org #3571
The one imported into pkg-config has seen very little maintenance, so
let's give users the option to use the upstream version. The default is
to use the included sources, but it can search for the system library
using --with-installed-popt.
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.