bug-autoconf
[Top][All Lists]
Advanced

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

2.59: AC_REQUIREd macros expanded too early


From: Maciej W. Rozycki
Subject: 2.59: AC_REQUIREd macros expanded too early
Date: Fri, 2 Apr 2004 15:30:28 +0200 (CEST)

Hello,

 I've observed under certain circumstances AC_REQUIREd macros are expanded
too early.  This happens if a macro (say "B") that calls AC_REQUIRE is
called from another macro (say "A").  In this case the AC_REQUIREd macro
is expanded right at the beginning of the "A" macro instead of just before
the "B" macro is called.  As a result any preparation steps for
dependencies of "B" are expanded too late.

 Here's a trivial test case:

$ cat configure.ac
AC_INIT(test, 0)

AC_DEFUN([MY_SETUP],
[
AC_CONFIG_AUX_DIR([.])
AC_CANONICAL_SYSTEM
])

MY_SETUP

AC_OUTPUT

The resulting configure script calls:

$ac_config_sub sun4 >/dev/null 2>&1

which comes from AC_CANONICAL_BUILD (which is AC_REQUIREd indirectly by
AC_CANONICAL_SYSTEM), before "ac_config_sub" is set up by
AC_CONFIG_AUX_DIR.

 I tried to follow the m4 machinery to track the problem down, but I
failed, lacking adequate experience.  I've verified the problem is still
present in 2.59a as of yesterday.  The problem typically manifests itself
as strange errors from scripts created for 2.13 that look otherwise
correct for 2.5x.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: address@hidden, PGP key available        +




reply via email to

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