bug-autoconf
[Top][All Lists]
Advanced

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

AU_DEFUN and AC_REQUIRE


From: Alexandre Duret-Lutz
Subject: AU_DEFUN and AC_REQUIRE
Date: Fri, 19 Apr 2002 12:13:01 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

Some AU_DEFUNs in Autoconf use AC_REQUIRE.  Autoupdating them
cause AC_REQUIRE to be called from the top-level.

~/tmp % cat configure.in
AC_INIT
AC_MINGW32
~/tmp % autoconf -Wobsolete
configure.in:2: warning: The macro `AC_MINGW32' is obsolete.
You should run autoupdate.
configure.in:2: warning: AC_MINGW32 is obsolete: use AC_CANONICAL_HOST and 
$host_os
~/tmp % autoupdate
autoupdate: `configure.in' is updated
~/tmp % autoconf -Wobsolete
configure.in:2: error: AC_REQUIRE: cannot be used outside of an m4_defun'd macro
configure.in:2: AC_CANONICAL_HOST is required by...
configure.in:2: the top level
~/tmp % cat configure.in
AC_INIT
AC_REQUIRE([AC_CANONICAL_HOST])AC_DIAGNOSE([obsolete],[AC_MINGW32 is obsolete: 
use AC_CANONICAL_HOST and $host_os])case $host_os in
  *mingw32* ) MINGW32=yes;;
          * ) MINGW32=no;;
esac

I think I understand the intent of AC_REQUIRE since some other
AU_DEFUNs map to AC_CANONICAL_HOST too.  Would it be possible to
teach autoupdate how to handle AC_REQUIRE?  I.e., if
AC_CANONICAL_HOST has already been seen, output nothing,
otherwise output it.  (Just a suggestion; I have no idea if this
is possible at all.)
-- 
Alexandre Duret-Lutz




reply via email to

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