[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#395466: AM_PATH_CHECK causes "possibly undefined macro" errors

From: Josh Triplett
Subject: Bug#395466: AM_PATH_CHECK causes "possibly undefined macro" errors
Date: Fri, 27 Oct 2006 00:33:30 -0700
User-agent: Thunderbird (X11/20060927)

Package: check
Version: 0.9.4-1
Severity: grave
Tags: patch upstream

[Justification: breaks any package using the AM_PATH_CHECK macro in]

AM_PATH_CHECK uses AC_MSG_WARN to warn about the deprecation of AM_PATH_CHECK
in favor of PKG_CHECK_MODULES.  However, this causes the following error when
attempting to run autoconf:

autoreconf: running: /usr/bin/autoconf error: possibly undefined macro: AM_PATH_CHECK
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation. error: possibly undefined macro: PKG_CHECK_MODULES
autoreconf: /usr/bin/autoconf failed with exit status: 1

This occurs because autoconf complains whenever it sees an unexpanded symbol
which looks like it should have gotten expanded.  The attached patch (written
by Jamey Sharp) fixes this problem by not letting autoconf see the full
strings AM_PATH_CHECK or PKG_CHECK_MODULES.  Note that various attempts to use
empty bracket quotes or doublequotes do not seem to work correctly, either
failing to prevent attempted expansion, failing to avoid warning, or leaving
quote characters in the resulting message; the empty variable approach in the
attached patch represents the only successful method Jamey and I found which
avoids all of these problems.  I have CCed the autoconf list, in the hopes
that they might have a better solution to the problem of writing the name of a
macro in an AC_MSG_WARN message.

This wouldn't make the package *completely* unusable, except that the package
doesn't actually ship the pkg-config file needed to use PKG_CHECK_MODULES,
which AM_PATH_CHECK suggests as a replacement.  An additional bug report for 
will follow shortly.

- Josh Triplett
--- check.m4.orig       2006-10-13 12:24:41.000000000 -0700
+++ check.m4    2006-10-26 23:55:54.000000000 -0700
@@ -4,8 +4,9 @@
-  AC_MSG_WARN([[AM_PATH_CHECK() is deprecated]])
-  AC_MSG_WARN([[use PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
+  empty=
+  AC_MSG_WARN([A${empty}M_PATH_CHECK() is deprecated])
+  AC_MSG_WARN([[use P${empty}KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) 
   [  --with-check=PATH       prefix where check is installed [default=auto]])

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]