Commit graph

56 commits

Author SHA1 Message Date
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
Arch Librarian
20d118d57a 2005-05-21 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-05-21 09:14:47 GMT
2005-05-21  Tollef Fog Heen  <tfheen@err.no>

    * check/check-libs-private: New test to check for support for
    private libraries.

    * check/simple.pc (prefix): Add Libs.private header.

    * check/Makefile.am (TESTS): Add check-libs-private test

    * pkg.h: Adjust function prototypes.

    * pkg.c: Add global ignore_private_libs variable.
    (scan_dir): Use the correct free function.  Stop leaking file
    descriptors.
    (package_get_l_libs, packages_get_l_libs, package_get_L_libs,
    packages_get_L_libs): Stop the recursive silliness and go back to
    old behaviour.
    (packages_get_all_libs): Adjust parameters to packages_get_*_libs
    (enable_private_libs, disable_private_libs): Trivial helper
    functions.

    * pkg-config.1: Update documentation wrt search path (Debian
    #308942), update docs for Libs.private and add the problematic
    handling of mixing = and non-= arguments to the bugs section.

    * parse.h: Adjust parameters for parse_package_file to get private
    libs or not.

    * parse.c (trim_and_sub): Fix memory leak.
    (_do_parse_libs): New function including what's common between
    parse_libs and parse_private_libs.
    (parse_libs_private): New function.  Handle private libraries.
    (parse_line): Add . to the list of valid characters in headers (so
    Libs.private works correctly.
    (parse_line): Fix memory leaks.
    (parse_line): Handle Libs.private.
    (parse_package_file): Fix memory leak.

    * main.c (main): Fix memory leak.

    * NEWS: Document changes to inter-library handling.

    * main.c (main): Handle inter-library dependencies old-style, but
    do private libraries too.  Adjust parameters to
    packages_get_*_libs.

    * configure.in: Change comment wrt inter-library handling to talk
    about private libraries instead.
2005-07-14 13:07:18 +00:00
Arch Librarian
4a431629c2 Get rid of groff warnings when formatting pkg-config(1)...
Author: tfheen
Date: 2005-02-21 07:53:41 GMT
Get rid of groff warnings when formatting pkg-config(1) on an 80-column terminal.  Thanks to Colin Watson and Ubuntu for the fix.  (Freedesktop #148)
2005-07-14 13:06:14 +00:00
Arch Librarian
b1584b5aaf Improve pkg-config's configure instructure and bring it bang
Author: keybuk
Date: 2004-06-07 23:43:21 GMT
Improve pkg-config's configure instructure and bring it bang
up to date.

* pkg.m4: Complete rewrite.
(PKG_PROG_PKG_CONFIG): if PKG_CONFIG not defined, find the
pkg-config in the path or $host-pkg-config if cross-compiling,
check that is of at least version 0.9.0 or one given.
(_PKG_CONFIG): internal macro to call pkg-config.
(PKG_CHECK_MODULES): same semantics as the previous incarnation
except you can prevent pkg-config from being called by defining
xxx_CFLAGS and xxx_LIBS yourself, additionally all results are
cached.
* README, pkg-config.1: Adjust documentation to match.
2005-07-14 13:05:59 +00:00
Arch Librarian
7207c289d8 2003-02-15 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2003-02-15 15:04:07 GMT
2003-02-15  Havoc Pennington  <hp@pobox.com>

	Fixes suggested by Werner Trobin

	* main.c (verbose_error): honor --errors-to-stdout and flush
	the same stream we write to

	* parse.c (parse_url): support an "url" field so if someone
	has a .pc file they can figure out where to go for newer
	versions and such
2005-07-14 13:05:41 +00:00
Arch Librarian
bc990e9be1 2003-01-15 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2003-01-15 04:02:47 GMT
2003-01-15  Havoc Pennington  <hp@pobox.com>

	* pkg.c (package_init): honor a PKG_CONFIG_LIBDIR to move default
	search dir, useful in cross-compilation for example, bug
	#103545 fix from David Schleef
2005-07-14 13:05:36 +00:00
Arch Librarian
891bb5f92d 2002-11-19 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2002-11-19 16:58:53 GMT
2002-11-19  Havoc Pennington  <hp@redhat.com>

	* pkg-config.1: apply formatting fixes from  Peter Breitenlohner
2005-07-14 13:05:33 +00:00
Arch Librarian
a96350cdef 2002-02-28 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2002-02-28 23:22:11 GMT
2002-02-28  Havoc Pennington  <hp@redhat.com>

	* pkg-config.1: add a note about the need for AC_SUBST with
	PKG_CHECK_MODULES. Stefan Kost pointed this out.
2005-07-14 13:05:06 +00:00
Arch Librarian
d192f98006 2002-02-01 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2002-02-01 22:24:24 GMT
2002-02-01  Havoc Pennington  <hp@redhat.com>

        Throughout: cast chars to guchar before passing to isspace, etc.,
	noted by Morten Welinder

	* pkg.c (verify_package): actually strip system -I/-L out of the
	cflags/libs, unless you set an environment variable asking to
	leave them in.
2005-07-14 13:04:51 +00:00