[Top][All Lists]

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

2.59,head: AC_REQUIREd macros expanded too early [again]

From: Maciej W. Rozycki
Subject: 2.59,head: AC_REQUIREd macros expanded too early [again]
Date: Mon, 19 Apr 2004 21:50:35 +0200 (CEST)


 I'm writing once more as I've received no response and I've been hit by
the problem again:

On Fri, 2 Apr 2004, Maciej W. Rozycki wrote:

>  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)
> [
> ])
> 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
>  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.

 Here's another simple test case:

$ cat configure.ac
AC_INIT(test, 0)




The resulting configure script executes incorrectly:

checking how to run the C preprocessor... /lib/cpp
checking for grep that handles long lines... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for stdlib.h... (cached) no
configure: creating ./config.status

because it uses $ac_objext before it's defined.  This happens both for
2.59 and for the current CVS version.


+  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]