| I decided to give autoconf-2.49c a try on Cygwin.
| In configuring the libtool package I
|   cd libtool-1.3.5
|   autoupdate
|   autoconf
|   cd libltdl
|   autoupdate
|   autoconf  ;# Reports error.
| 
| The errors are:
| 
| configure.in:109: error: AC_REQUIRE: cannot be used outside of an
| m4_defun'd macro
| configure.in:109: AC_CANONICAL_HOST is required by...
| configure.in:109: the top level.

That's correct: there are indeed macros required from the top level.
I don't want to dive into the details, but indeed before this used to
work, somewhat luckily, but you no longer can with 2.50, and I think
it is safer that you can't.  Typically, inside a macro, running this:

if foo; then
  AC_REQUIRE([foo])
fi

is safe, but not at the top level, this is why I did not struggle to
restore the old behavior.  But really, making this work at the top
level is special casing: I have not prohibited it for free.

| I also execute the autoheader in the libltdl directory and get an error:
| 
| autoheader: running /usr/local/bin/autoconf -l . to trace from
| configure.in
| autoheader: sourcing /tmp/ah309/traces.sh
| autoheader: error: shell error while sourcing /tmp/ah309/trace.sh
| 
| The script creates traces.sh and executes trace.sh.

Well, trace.sh contains this:

/* Define if you have the \`dlerror' function. */
#undef HAVE_DLERROR"
configure.in:109: error: AC_REQUIRE: cannot be used outside of an m4_defun'd mac
ro
configure.in:109: AC_CANONICAL_HOST is required by...
configure.in:109: the top level

I'll try to see if there are means to improve the diagnostic.

Reply via email to