Commit Graph

10 Commits (master)

Author SHA1 Message Date
Ismael Luceno c583d49a37 pkg.m4: Abort by default if no pkgconf
ci/woodpecker/push/woodpecker Pipeline failed Details
Provide a second optional argument to PKG_PROG_PKG_CONFIG with an action to
take if no pkgconf is found, and default to aborting.

Too many configure scripts in the wild don't handle an empty PKG_CONFIG,
resulting in weird error messages through the run, which often confuse

Authors wishing to fallback to other methods can either return to the old
behavior by specifying [:] as an action, or use [PKG_CONFIG=false] and call
pkg-config macros normally, handling the fallback as any other failure.

Users can override PKG_CONFIG in the command line so this should imply no

Signed-off-by: Ismael Luceno <>
2024-04-25 23:48:18 -07:00
Ariadne Conill 1ce000f397 Revert "pkg.m4: PKG_CHECK_MODULES provides modversion"
ci/woodpecker/push/woodpecker Pipeline was successful Details
This reverts commit 8d9d3de6eb.
2023-01-21 20:59:22 +00:00
Eli Schwartz 59a56dfa64 trivial sync of pkg.m4 from freedesktop
ci/woodpecker/push/woodpecker Pipeline was successful Details
This contains 3 changes, mostly inconsequential:

- fix some spelling issues in the comments


- bump the serial number; upstream rationale is very 🤷 but it is
  what it is:
  > There aren't any significant changes here, but this will cause aclocal
  > to get the latest version.


- make the status log for PKG_CHECK_MODULES say "checking for <mod>..."
  instead of "checking for <VAR>..."


There are additional whitespace-only changes that could be synced, and
were explicitly synced in commit 95b683c864
but then undone in commit 360a818f2f so
rather than fighting over it, are simply ignored. Diffing against the
freedesktop version of pkg.m4 will therefore show additional
2022-08-07 00:40:17 +00:00
Mattias Hansson 8d9d3de6eb pkg.m4: PKG_CHECK_MODULES provides modversion
Projects using PKG_CHECK_MODULES wants to add dependency versions to
their binaries. Currently, the projects have to resolve dependency
versions themselves when using pkgconf.

With this patch PKG_CHECK_MODULES now defines a $PKG_VERSION variable
that represents `--modversion`.
2021-10-27 06:41:28 -05:00
Mattias Hansson 360a818f2f pkg.m4: Unified indentation in PKG_CHECK_MODULES
Currently the indentation in PKG_CHECK_MODULES is a mix och tabs and
spaces which makes it hard to read. This patch unifies the indentation
in the function to spaces.
2021-10-27 06:41:28 -05:00
Dag-Erling Smørgrav 95b683c864 Update pkg.m4 to latest upstream version (0.29.1) (#116)
* Update comments to reduce diffs against latest upstream (0.29.1).

* Clean up our comments to match the new upstream style.

* Update pkg.m4 to latest upstream version (0.29.1).
2017-03-07 11:11:01 -06:00
David Michael f8a2519d1b Include PKG_CHECK_VAR macro for reading variables in .pc files
Freedesktop #48098 (
2013-02-24 06:47:48 -06:00
Dan Nicholson 840ecc846d Add autoconf macros to help packagers install .pc files
Some distros and users have unusual installation needs that don't
conform to the standard $libdir/pkgconfig and $datadir/pkgconfig
pathways. Help packagers support these users with the macros
PKG_INSTALLDIR and PKG_NOARCH_INSTALLDIR. These are simple macros that
provide the configure parameters --with-pkgconfigdir and
--with-noarch-pkgconfigdir to allow users to override the standard

Freedesktop #48743
2012-07-21 01:09:13 -05:00
Luca Barbato 5f35ec35a8 m4: provide additional pkg-config macros
The macros provide a succint way to run a pkg-config check over modules
depending on a --with-name configure option.

There is a flexible variant to have custom behaviour if the package is
found or not and two more limited ones that just set HAVE_NAME make and
preprocessor variables.
2012-05-03 20:59:22 +00:00
William Pitcock 7993ad0952 Install a copy of pkg.m4 into aclocal like pkg-config does. 2012-04-30 05:43:46 +00:00