tags 398901 + patch thanks Am Mon, 14. Jun 2010, 21:12:33 +0200 schrieb Jö Fahlke: > That implemented it only half and actually broke some things. Now the > generated configure skrip contains the strings and "PKG_CONFIG_LIBDIR" which > is cought by the m4_pattern_forbid([^_?PKG_[A-Z_]+$]) at line 28 in pkg.m4. > I guess it has to be added to the m4_pattern_allow() on line 29. > > This breaks running autoconf2.59 on packages which use pkg-config for me.
OK, here is a somewhat more extended report and a way to reproduce. Put the
following snippet as 'configure.ac' in an otherwise empty directory:
======================================================================
AC_INIT([configure.ac])
PKG_PROG_PKG_CONFIG
======================================================================
With pkg-config 0.25-1 run 'aclocal' to copy the definition of
PKG_PROG_PKG_CONFIG to aclocal.m4 and the run 'autoconf2.59'. You should get
something like this:
======================================================================
j...@paranoia:~/Projekte/test_pkg_config$ autoconf
j...@paranoia:~/Projekte/test_pkg_config$ autoconf2.59
configure:275: error: possibly undefined macro: PKG_CONFIG_LIBDIR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
j...@paranoia:~/Projekte/test_pkg_config$
======================================================================
With newer autoconf versions (tested with 2.56) this works, because AC_SUBST
(which is called from AC_ARG_VAR) includes a call to m4_pattern_allow now.
However, if you have to use autoconf2.59 with pkg-config you're screwed.
The fix is simple:
======================================================================
diff -r -u pkg-config-0.25.orig/pkg.m4 pkg-config-0.25/pkg.m4
--- pkg-config-0.25.orig/pkg.m4 2009-12-06 21:39:02.000000000 +0100
+++ pkg-config-0.25/pkg.m4 2010-06-20 13:51:49.000000000 +0200
@@ -26,7 +26,7 @@
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+m4_pattern_allow([^PKG_CONFIG(_PATH|_LIBDIR)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search
path])
======================================================================
Bye,
Jö.
--
A programmer is a device to turn coffee and pizza into bugs.
signature.asc
Description: Digital signature

