Commit graph

64 commits

Author SHA1 Message Date
Dan Nicholson
df6e4b6cf1 pkg: Check INCLUDE environment variable for MSVC
On Windows builds when --msvc-syntax is in use, add paths in the INCLUDE
environment variable to the system include search path and ignore the
various GCC environment variables. See
https://msdn.microsoft.com/en-us/library/73f9s62w.aspx for details.

https://bugs.freedesktop.org/show_bug.cgi?id=94729
2017-03-20 11:34:02 -05:00
Dan Nicholson
325ddf2f4b man: Document PKG_PROG_PKG_CONFIG conditional issue there
The issue of PKG_PROG_PKG_CONFIG being run first from a conditional
affects more than PKG_CHECK_MODULES and PKG_CHECK_EXISTS since
PKG_PROG_PKG_CONFIG is AC_REQUIRE'd from many other macros. Describe the
issue completely in the PKG_PROG_PKG_CONFIG section.
2017-03-20 06:51:27 -05:00
Dan Nicholson
99ef6fd55a man: Fix PKG_CHECK_EXISTS comment about PKG_PROG_PKG_CONFIG
The sentence is clearly referring to the issue of running
PKG_PROG_PKG_CONFIG from outside of a conditional. Thanks to Reuben
Thomas for the suggestion.

https://bugs.freedesktop.org/show_bug.cgi?id=99885
2017-03-20 06:48:14 -05:00
Dan Nicholson
7f4afa0214 man: Put valid make syntax in the example
Use backquotes for substitution in the Makefile example as using the $()
form of command substitution would actually use make's variable
substitution and fail. Thanks to joerg.strebel@gmail.com for the report.

https://bugs.freedesktop.org/show_bug.cgi?id=98011
2017-03-19 12:47:50 -05:00
Dan Nicholson
c424a4cf37 man: Document system search path environment variables
None of the environment variables affecting the system include and
library paths were documented. This includes the pkg-config specific
variables like PKG_CONFIG_SYSTEM_INCLUDE_PATH as well as the GCC
variables like C_INCLUDE_PATH.

https://bugs.freedesktop.org/show_bug.cgi?id=99224
2017-03-19 09:37:22 -05:00
Alexander Larsson
ae0a8b1ad5 Allow overriding package variables with env vars
pkg-config allows a way to override package variables through the
--define-prefix interface, but this is very cumbersome to do in a global
way since it always needs to be passed on the command line and the
override cannot be scoped to a single packge.

Allow overriding package variables using environment variables of the
form PKG_CONFIG_$PACKAGE_$VARIABLE. For example, setting
PKG_CONFIG_GLADEUI_2_0_CATALOGDIR will override the variable
"catalogdir" in the "gladeui-2.0" package.

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2016-01-29 14:32:24 -08: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
0e847a2201 Add --validate option to check .pc syntax without dependencies
Provide developers a way to check their .pc files prior to release. This
works the same as --exists except that package dependencies are not
processed. That allows the .pc file to be checked in complete isolation
of others.

Freedesktop #7000 (https://bugs.freedesktop.org/show_bug.cgi?id=7000)
2014-09-27 16:45:50 -07:00
Matthias Clasen
9f65411341 Add missing options to manual
Freedesktop #66155 (https://bugs.freedesktop.org/show_bug.cgi?id=66155)
2013-09-21 07:58:02 -07:00
Dan Nicholson
0efb668bd5 Add static linking variant of PKG_CHECK_MODULES
PKG_CHECK_MODULES_STATIC is a convenience autoconf macro wrapping
PKG_CHECK_MODULES with --static enabled. This gives developers a way to
get static linking information from a specific set of modules.

Freedesktop #19541 (https://bugs.freedesktop.org/show_bug.cgi?id=19541)
2013-05-18 19:37:24 -07:00
Dan Nicholson
925119ce51 Document all pkg-config derived metadata variables
The derived variables pcfiledir, pc_top_builddir and pc_sysrootdir were
lacking in documentation. Rework the "QUERYING PKG-CONFIG'S DEFAULTS"
section to describe these and pc_path.

The example of using "pkg-config --modversion pkg-config" was removed
since it's superfluous to "pkg-config --version".

Freedesktop #62018 (https://bugs.freedesktop.org/show_bug.cgi?id=62018)
2013-05-17 05:13:15 -07:00
Dan Nicholson
43c1e0e4af Make the --define-prefix feature available on all platforms
Allowing pkg-config to override the prefix variable in .pc files is a
useful feature for making packages relocatable. There's nothing Windows
specific about it.

Freedesktop #63602 (https://bugs.freedesktop.org/show_bug.cgi?id=63602)
2013-05-17 05:13:15 -07:00
Dan Nicholson
a65d5cff5f Allow Windows prefix redefinition in any pkgconfig directory
The prefix redefinition feature on Windows to make packages relocatable
was being confined only to locations where the .pc file was in a
directory ending in lib/pkgconfig or share/pkgconfig. This is too
restrictive as it's quite common for the libdir to have a different name
such as lib64. This keeps the convention that the feature will only be
enabled when the .pc file is in a pkgconfig directory, and it continues
to define the prefix to the grandparent of the pkgconfig directory.

The path handling is switched over to standard glib functions
g_path_get_basename and g_path_get_dirname to avoid handrolled handling
of Windows paths.
2013-05-17 05:13:14 -07:00
Dan Nicholson
409ee76ce1 Allow more control of redefined prefix behavior
Currently the native Win32 builds default to redefining the prefix
variable in .pc files based on their installation paths. This behavior
is not always desired when pkg-config is being used in a traditional
fixed path environment (e.g., /mingw like /usr).

Allow the default to be set via configure switch
--enable/disable-define-prefix, and allow it to be set both ways at
runtime through the --[dont-]define-prefix pkg-config option.
2013-05-17 05:13:14 -07:00
Dan Nicholson
636e804ded Fix default path in PKG_CONFIG_LIBDIR description
It's been a long time that $datadir/pkgconfig was in the default path.
2013-04-20 10:18:18 -07:00
Dan Nicholson
cf21a002be Document search path construction on Windows 2013-04-18 05:43:23 -07:00
Dan Nicholson
4ccdb947dd Remove duplicate LIBRARIES in manual
Freedesktop #62374 (https://bugs.freedesktop.org/show_bug.cgi?id=62374)
2013-04-06 11:29:57 -07:00
Dan Nicholson
72e1346d04 Add root /lib* directories to the default -L paths
Avoids outputting -L/lib, which the linker will search in implicitly
like -L/usr/lib.

Freedesktop #58363 (https://bugs.freedesktop.org/show_bug.cgi?id=58363)
2012-12-19 07:20:05 -08:00
David Michael
5b463c927b Include PKG_CHECK_VAR macro for reading variables in .pc files
Freedesktop #48098 (https://bugs.freedesktop.org/show_bug.cgi?id=48098)
2012-12-14 14:13:41 -08:00
Dan Nicholson
9cd35c624f Enforce that only the first --atleast/exact/max-version option honored
This provides the user with output matching the behavior of the code.
When multiple --atleast/exact/max-version options are supplied, only the
first will be honored.
2012-12-11 11:59:40 -08:00
Dan Nicholson
ec11c93ef8 Explicitly set --exists as the default option
This happened basically by accident before when "pkg-config foo" was run
because the code wouldn't find any options set and just fall through to
the end after processing the package arguments. However, it would act
differently in that Requires.private was only enabled with an explicit
--exists.
2012-12-11 11:59:40 -08:00
Dan Nicholson
30245b2a89 Document PKG*INSTALLDIR autoconf macros in manpage
Freedesktop #54463 (https://bugs.freedesktop.org/show_bug.cgi?id=54463)
2012-12-08 12:37:12 -08:00
Dan Nicholson
83aef0efd9 Fix formatting for --print-provides in man page 2012-10-03 05:33:31 -07:00
Dan Nicholson
1baefdf7d6 Discourage repeated usage of VARIABLE-PREFIX in PKG_CHECK_MODULES
When the VARIABLE-PREFIX tag is used more than once in PKG_CHECK_MODULES
it can result in later runs reporting success without actually running
pkg-config. This is because PKG_CHECK_MODULES looks for FOO_CFLAGS and
FOO_LIBS from the environment as a way to allow users to override the
test. PKG_CHECK_MODULES also sets these variables, though, and
subsequent calls will simply use these values.

Although there are legitimate ways to use the same VARIABLE-PREFIX
(e.g., they're all under conditionals meaning only one will be used),
document that repeated usage is not recommended.

Freedesktop #3550
2012-08-22 11:35:13 -07:00
Dan Nicholson
bde0ffb444 Document a couple more pkg-config options 2012-05-10 07:56:34 -07:00
Lawrence A. Murakami
e10eee3c00 Fix errors in man page source cause missing content
Freedesktop #29011
2012-05-10 06:02:17 -07:00
Dan Nicholson
c96d5e3172 Remove unused roff macros causing problems on old groff/nroff
The DW and EW roff macros had been used to suppress warnings around the
documentation on the now removed Windows registry keys. These macro
definitions are unneeded and cause problems with older groff and nroff
versions. Numerous patches exist around the web to remove them. I
confirmed this with an old nroff from the Heirloom project.

Fixes Freedesktop #5214
2012-04-16 17:14:53 -07:00
Tollef Fog Heen
1363621467 Document specifying paths to .pc files
Thanks to Binki for the patch

Freedesktop #32622
2011-05-15 10:34:01 +02:00
Tollef Fog Heen
ad10a80814 Mention that auto* recommends building .pc files at build time
Fixes Freedesktop #32094
2011-04-13 21:03:15 +02:00
Ville Skyttä
35495b1e74 Man page syntax and spelling fixes. 2011-04-13 20:17:12 +02:00
Tollef Fog Heen
6702b97935 Document pc_path a bit 2010-05-27 22:43:04 +02:00
Tollef Fog Heen
ec55562d9a Fix typo in man page 2010-05-24 00:09:03 +02:00
Johannes Schmid
5ade770f76 Add --print-provides and --print-requires-private to the manual page 2010-05-10 20:03:28 +02:00
Kirill Smelkov
e58b5b94c6 Fix formatting typo in pkg-config.1
Without <dot>TP, "Requires" and "Requires.private" are rendered as one
paragraph.
2010-05-09 10:18:44 +02:00
Jorn Amundsen
4b80e49ff8 Add listing of variables
Fixes Freedesktop #133
2010-05-09 09:49:13 +02:00
Tollef Fog Heen
fbc4f8e076 Fix up man page
Make sure to avoid \ macros at the start of lines, as that makes some
man implementations unhappy.

Fixes freedesktop #17914
2010-05-09 09:02:33 +02:00
Tollef Fog Heen
59af363873 Make it clearer which directory PKG_CONFIG_LIBDIR refers to
Fixes Freedesktop.org #26879
2010-05-08 23:32:46 +02:00
Tollef Fog Heen
479b54fe34 Use $() rather than ``
Fixes Freedesktop.org #27376
2010-05-08 23:29:33 +02:00
Dan Nicholson
02c5f9a2d6 Document --list-all option in man page
Present in the --help output, but not the manual...
2010-05-08 22:30:49 +02:00
Tollef Fog Heen
1437da3b5d Add link to bugs.fd.o in man page
Bug #4793
2009-12-06 22:16:13 +01:00
Tollef Fog Heen
39663612a6 2009-06-12 Tor Lillqvist <tml@iki.fi>
* parse.c: On Win32, if the value of a a variable other than the
	"prefix" one starts with the non-overridden value of "prefix",
	then replace that prefix, too, with the run-time one.

	To avoid shadowing warnings, rename a 'p' variable to 'q'.

	* pkg-config.1: Corresponding update.

	* main.c
	* pkg.h: Move the Win32 redefinition of PKG_CONFIG_PC_PATH from
	main.c to pkg.h as it now is needed in pkg.c, too.
2009-06-30 03:47:01 +02:00
Tollef Fog Heen
7e8a4d6c85 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg-config.1: Verbosify the text about Libs.private a bit. Patch
	from Loïc Minier.
2009-03-30 20:53:02 +02:00
Tollef Fog Heen
4edc026776 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg-config.1: Add documentation for --cflags-only-I, patch from
	Loïc Minier.
2009-03-30 20:51:18 +02:00
Tollef Fog Heen
53abbad201 2008-03-23 Stepan Kasal <skasal@redhat.com>
* pkg-config.1: Document "Requires.private" and recommend it
      for libraries.  Freedesktop #13188
2008-03-23 20:46:08 +01:00
Tollef Fog Heen
a3701dc44f 2008-03-23 Stepan Kasal <skasal@redhat.com>
* pkg-config.1: Fix a few typos--add two omitted .TP tags and two
	omitted full stops; and empty lines do influence the formatting in
	nroff.
2008-03-23 20:26:14 +01:00
Tollef Fog Heen
dce0339076 2008-02-19 Tor Lillqvist <tml@novell.com>
* main.c: Remove the possibility to have a default PKG_CONFIG_PATH
	in the Registry. It is much more flexible to just use environment
	variables. In general the Registry is not used in the ports of
	GTK+ or GNOME libraries and software to Windows.

	* parse.c (parse_line): On Windows, handle also .pc files found in
	a share/pkgconfig folder when automatically redefining a prefix
	variable for the package.

	* pkg-config.1: Corresponding changes.

2008-02-18  Tor Lillqvist  <tml@novell.com>

	* main.c: Fix some bitrot: On Windows, don't use the compile-time
	PKG_CONFIG_PC_PATH, but deduce a default one at run-time based on
	the location of the executable. This was originally what
	pkg-config did on Windows, but it had bit-rotted.
2008-03-23 20:00:00 +01:00
Tollef Fog Heen
ed75a7dd4b 2008-01-16 Tollef Fog Heen <tfheen@err.no>
* pkg.h, pkg.c (string_list_to_string), pkg-config.1, main.c
             (main): Add sysroot support and document same.  Triggered by
             setting PKG_CONFIG_SYSROOT_DIR in the environment.
2008-01-16 23:10:25 +01:00
Tollef Fog Heen
ecfb96aa4c 2006-08-16 Tollef Fog Heen <tfheen@err.no>
* pkg-config.1: Apply patch from Ed Catmur to document
	PKG_CHECK_EXIST.  Thanks a lot for both patches.
2006-08-16 19:43:17 +02:00
Tollef Fog Heen
e22c1a9c49 2006-08-16 Tollef Fog Heen <tfheen@err.no>
* pkg-config.1: Apply patch from Ed Catmur to document
	PKG_PROG_PKG_CONFIG and that it should be used if the first call
	to PKG_CHECK_MODULES might not happen.
2006-08-16 19:37:20 +02:00
Arch Librarian
ef703c4284 2005-06-03 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-03 06:53:20 GMT
2005-06-03  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4, README, pkg-config.1: s/configure.in/configure.ac/,
    thanks to Morten Brix Pedersen <morten@wtf.dk>
2005-07-14 13:07:20 +00:00