Commit graph

43 commits

Author SHA1 Message Date
Dan Nicholson
5fc77a96b7 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
locations.

Freedesktop #48743
2012-05-10 05:34:49 -07:00
Enrico Scholz
4939bdb9a6 Allow documented environment variables in autoconf
It might be useful to write something like

  sdkflags=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`

in configure.ac macros.  Unfortunately, this will be blocked because
'PKG_CONFIG_SYSROOT' is a forbidden m4 pattern.

This patch extends the list of allowed pattern by the names of
documented pkg-config environment variables.
2011-05-15 14:20:17 +02:00
Tollef Fog Heen
57d6c40d7a Add _LIBDIR to m4_pattern_allow too
Fixes Debian #398901
2011-04-13 22:26:18 +02:00
Tollef Fog Heen
4366f5842f Handle --exist working and --cflags or --libs failing
--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
2011-04-13 21:45:57 +02:00
Tollef Fog Heen
2b86e9b466 Add some []s before dnl
Autoconf 2.66 has some problems with missing []s before dnls, causing
the expanded text to be garbled.

Fixes #29056
2010-08-19 08:54:09 +02:00
Tollef Fog Heen
6ff8aeb77d Misc m4 cleanups
Whitespace cleanups
Use m4_default instead of some ifelses.

Thanks to Stepan Kasal for the patch this is based on
Bug #13892
2009-12-06 21:39:13 +01:00
Tollef Fog Heen
40f3532add Make sure AC_MSG_RESULT is always called
Based on a patch by Peter Breitenlohner, thanks.
Bug #9704
2009-12-06 21:32:35 +01:00
Tollef Fog Heen
e907f2a18b Add serial to pkg.m4
Bug #22709
2009-12-06 21:20:42 +01:00
Tollef Fog Heen
6a2c307ed2 Rephrase comment before PKG_CHECK_EXISTS in pkg.m4 2009-12-06 21:17:45 +01:00
Tollef Fog Heen
c3ddc0344e Merge 2009-08-15 21:45:10 +02:00
Tollef Fog Heen
a25f7e980e 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg.m4: Add PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR to the list of
	precious directories.  (AC_ARG_VAR)
2009-03-30 20:06:32 +02:00
Tollef Fog Heen
d251a97fa6 2007-12-29 Tollef Fog Heen <tfheen@err.no>
* pkg.m4: Don't use --errors-to-stdout in pkg.m4, but rather
	redirect stderr to stdout.  This makes pkg.m4 with old (pre 0.15)
	pkg-config look good, and it makes newer pkg-config with ancient
	pkg.m4 work well.  Gnome #111054
2007-12-29 16:00:37 +01:00
Tollef Fog Heen
e297a4b57f * pkg.m4: Fix bug so it's possible to override variables in case
pkg-config is not installed.
2007-06-19 15:56:48 +02:00
Tollef Fog Heen
9a1becb5d6 * pkg.m4: Update URL to pkg-config website. Thanks to Peter Eisentraut. 2007-05-29 08:58:44 +02:00
Tollef Fog Heen
712f0af7b8 Cosmetic m4 stuff
2005-10-17  Tollef Fog Heen  <tfheen@err.no>

	* pkg.m4: Do AC_MSG_RESULT([no]) even if $4 is set (so we don't
	fail).  Gnome #166537.
2005-10-17 07:08:37 +00:00
Tollef Fog Heen
39ef912d6e Get rid of text duplication in pkg.m4
2005-10-16  Tollef Fog Heen  <tfheen@err.no>

	* pkg.m4: use m4_define to avoid duplication of text.
2005-10-16 18:13:43 +00:00
Tollef Fog Heen
c9d147e189 Minor m4 cleanups
2005-10-16  Tollef Fog Heen  <tfheen@err.no>

	* pkg.m4: Minor cleanups, use m4_default rather than m4_ifval and
	echo 1>&FD is silly, just use echo >&FD
2005-10-16 18:08:18 +00:00
Tollef Fog Heen
979c89dcb6 Use --short-errors if it's available. 2005-10-16 17:51:24 +00:00
Tollef Fog Heen
3fd0e37e65 Look at XXX_CFLAGS and XXX_LIBS again
2005-09-21  Tollef Fog Heen  <tfheen@err.no>

	* pkg.m4: Apply patch from Roberto Huelga to look at XXX_CFLAGS
	and XXX_LIBS which got lost somewhere.
2005-09-21 13:12:35 +00:00
Arch Librarian
0df5bca1cf 2005-07-15 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-07-15 06:50:41 GMT
2005-07-15  Tollef Fog Heen  <tfheen@err.no>

        * pkg.m4: Add a missing AC_MSG_RESULT.  Thanks to Gary Kramlich
        for noticing this and harassing me to fix it.
2005-07-15 13:07:59 +00:00
Arch Librarian
bcd33f08a3 2005-06-29 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-29 11:06:59 GMT
2005-06-29  Tollef Fog Heen  <tfheen@err.no>

	* pkg.m4: Brown bag fix.  pkg_failed was always set to ���untried���.
	Debian #316181.
2005-07-14 13:07:36 +00:00
Arch Librarian
3062149924 2005-06-27 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-26 22:51:05 GMT
2005-06-27  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: Add PKG_CHECK_EXISTS to check if a module exists.
    Thanks to James Henstridge for the patch.
2005-07-14 13:07:25 +00:00
Arch Librarian
a587da1739 2005-06-26 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-26 20:04:10 GMT
2005-06-26  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: Get rid of caching again.  This breaks too much stuff,
    and pkg-config doesn't take much time to run.
2005-07-14 13:07:23 +00: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
76b1f44698 2005-04-12 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-04-12 17:06:32 GMT
2005-04-12  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: Apply patch from James Henstridge to have AC_RUN_LOG in
    the right place.  (Freedesktop #2992)
2005-07-14 13:07:00 +00:00
Arch Librarian
d918a29418 2005-04-12 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-04-12 11:46:59 GMT
2005-04-12  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: Add note that PKG_PROG_PKG_CONFIG must be called
    explicitly if the first call to PKG_CHECK_MODULES might not
    happen.  (Debian #303211)
2005-07-14 13:06:59 +00:00
Arch Librarian
15ce1f9d78 2005-04-12 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-04-12 10:49:11 GMT
2005-04-12  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: wrap running pkg-config in AC_RUN_LOG per James
    Henstridge's suggestion.
2005-07-14 13:06:54 +00:00
Arch Librarian
2374ab1c3e 2005-04-12 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-04-12 10:22:52 GMT
2005-04-12  Tollef Fog Heen  <tfheen@err.no>

    * pkg.m4: Patch from James Henstridge to evaluate second argument
    again.  (Freedesktop #2987, Gnome #300232, Debian #303878,
    #303969)
2005-07-14 13:06:53 +00:00
Arch Librarian
703193d7d9 * pkg.m4: Fix a bad patch causing duplication in one of...
Author: keybuk
Date: 2004-07-18 10:36:44 GMT
* pkg.m4: Fix a bad patch causing duplication in one of the error
messages.
2005-07-14 13:06:04 +00:00
Arch Librarian
edfd0d3f77 * pkg.m4: Correct quoting brackets to correctly split t...
Author: keybuk
Date: 2004-07-06 17:31:17 GMT
* pkg.m4: Correct quoting brackets to correctly split the words.
2005-07-14 13:06:03 +00:00
Arch Librarian
92170d7ef4 * README: Change gnome.org reference to freedesktop.org
Author: keybuk
Date: 2004-06-08 22:50:26 GMT
* README: Change gnome.org reference to freedesktop.org
* AUTHORS: Add myself here, I guess.
* pkg.m4: Mine! (fix copyright)
2005-07-14 13:06:01 +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
3ab7ea98e5 2003-05-09 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2003-05-09 18:15:05 GMT
2003-05-09  Havoc Pennington  <hp@redhat.com>

	* pkg.m4: improve error message a bit, from Tim Janik
2005-07-14 13:05:56 +00:00
Arch Librarian
fe704f16e4 2003-02-21 James Henstridge <james@daa.com.au>
Author: jamesh
Date: 2003-02-21 14:53:04 GMT
2003-02-21  James Henstridge  <james@daa.com.au>

    * pkg.m4: split macro into two parts.  The check for presence of
    pkg-config is now in a helper macro.  The main PKG_CHECK_MODULES
    macro now AC_REQUIRES() it, so that the pkg-config check is only
    performed once.
    Also update quoting to match current practices.
2005-07-14 13:05:46 +00:00
Arch Librarian
30f0c12348 0.9.0
Author: hp
Date: 2002-02-03 17:16:48 GMT
0.9.0
2005-07-14 13:04:54 +00:00
Arch Librarian
0f8e43f49a 2002-02-01 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2002-02-01 19:45:36 GMT
2002-02-01  Havoc Pennington  <hp@redhat.com>

	* pkg.m4: fix shell portability issue, reported by Morten Welinder
2005-07-14 13:04:49 +00:00
Arch Librarian
2f5befc9f7 2001-06-18 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2001-06-17 23:18:00 GMT
2001-06-18  Havoc Pennington  <hp@pobox.com>

	* pkg.m4: print the error, not the name of the variable containing
	it, doh
2005-07-14 13:04:16 +00:00
Arch Librarian
9a24428500 2001-06-14 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2001-06-14 10:09:03 GMT
2001-06-14  Havoc Pennington  <hp@redhat.com>

	* pkg.c (internal_get_package): don't fall back to legacy -config
	scripts for the -uninstalled case.

2001-06-07  Havoc Pennington  <hp@redhat.com>

	* pkg.m4: add URL to no-pkg-config error message
2005-07-14 13:04:13 +00:00
Arch Librarian
262ab6b259 2001-06-06 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2001-06-06 15:46:15 GMT
2001-06-06  Havoc Pennington  <hp@redhat.com>

	* pkg.m4: Fix mismatched backtick
2005-07-14 13:04:11 +00:00
Arch Librarian
1dd0d3d262 2001-06-05 Havoc Pennington <hp@redhat.com>
Author: hp
Date: 2001-06-05 18:41:27 GMT
2001-06-05  Havoc Pennington  <hp@redhat.com>

	* main.c: add --errors-to-stdout so you can capture them with backticks

	* pkg.m4: set FOO_PKG_ERRORS after a failed check, so people can
	print the errors.
2005-07-14 13:04:10 +00:00
Arch Librarian
6725d8ee36 updates
Author: hp
Date: 2001-06-05 17:00:58 GMT
updates
2005-07-14 13:04:06 +00:00
Arch Librarian
a7efbcc46a updates
Author: hp
Date: 2001-06-05 16:58:24 GMT
updates
2005-07-14 13:04:04 +00:00
Arch Librarian
2ac96cbcc7 import
Author: hp
Date: 2001-06-05 16:39:09 GMT
import
2005-07-14 13:04:01 +00:00