diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 22f9684d..fdbf73dd 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8846,18 +8846,16 @@ with their modern implementation. Autoconf provides a simple means to obsolete a macro. -@defmac AU_DEFUN (@var{old-macro}, @var{implementation}) +@defmac AU_DEFUN (@var{old-macro}, @var{implementation}, @ovar{message}) @acindex{DEFUN} @acindex{AU_DEFUN} Define @var{old-macro} as @var{implementation}. The only difference with @code{AC_DEFUN} is that the user will be warned that -@var{old-macro} is now obsolete; if she then uses @command{autoupdate}, -the call to @var{old-macro} will be replaced by the modern -@var{implementation}. +@var{old-macro} is now obsolete. -Note that you can provide another definition with @code{AC_DEFUN} in -order to update the way a macro is used without making it completely -obsolete. +If she then uses @command{autoupdate}, the call to @var{old-macro} will be +replaced by the modern @var{implementation}. In the future, +@command{autoupdate} will then print the additional @var{message}. @end defmac @node Coding Style diff --git a/lib/autoconf/autoupdate.m4 b/lib/autoconf/autoupdate.m4 index 62bb3bcf..d071299f 100644 --- a/lib/autoconf/autoupdate.m4 +++ b/lib/autoconf/autoupdate.m4 @@ -50,17 +50,23 @@ # Roland McGrath, Noah Friedman, david d zuhn, and many others. -## ----------------------------------- ## -## Defining macros to be autoupdated. ## -## ----------------------------------- ## +## ---------------------------------- ## +## Macros to define obsolete macros. ## +## ---------------------------------- ## -# AU_DEFUN(NAME, NEW-CODE) +# AU_DEFUN(NAME, NEW-CODE, [MESSAGE]) # ----------------------------------- # Declare that the macro NAME is now obsoleted, and should be replaced # by NEW-CODE. Tell the user she should run autoupdate, and include # the additional MESSAGE. # +# FIXME: MESSAGE should be grabbed with autom4te traces, and that's +# why it is never used in the body of the macro; however, as of 2003-11-25 +# it is never used and it seems that it never was. Also, MESSAGE is +# used only once in AC_LINK_FILES, it may be the case to remove it from +# there. See the FIXME in AC_LINK_FILES as well. +# # Also define NAME as a macro which code is NEW-CODE. # # This allows to share the same code for both supporting obsoleted macros, diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 9376c41c..216b64f9 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -735,12 +735,7 @@ m4_define([AC_LIST_LINKS_COMMANDS]) # # _AC_LINK_CNT is used to be robust to multiple calls. AU_DEFUN([AC_LINK_FILES], -[AC_DIAGNOSE([obsolete], [ -It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES -to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant -update, you should probably tune the result yourself and remove this -warning.]) -m4_if($#, 2, , +[m4_if($#, 2, , [m4_fatal([$0: incorrect number of arguments])])dnl m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl ac_sources="$1" @@ -751,7 +746,19 @@ while test -n "$ac_sources"; do [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source" done AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl -]) +], +dnl FIXME: Macros such as AC_USG put messages like this into an +dnl AC_DIAGNOSE macro, in the first parameter of AU_DEFUN. We cannot +dnl do the same with this one, because it makes no sense to print it +dnl when running `autoconf -W obsolete' on a configure script that uses +dnl AC_LINK_FILES. Instead, only `autoupdate' should print it (it may +dnl be acceptable that autoupdated configure scripts print this message +dnl when running `autoconf -W obsolete'). As of 2003-11-25, the third +dnl argument to AU_DEFUN is broken, so this is never seen by the user. +[ + It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES + to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant + update, you should probably tune the result yourself.])# AC_LINK_FILES # Initialize.