]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Revert the behavioral changes in AC_LINK_FILES, and add several
authorPaolo Bonzini <bonzini@gnu.org>
Tue, 25 Nov 2003 13:50:45 +0000 (13:50 +0000)
committerPaolo Bonzini <bonzini@gnu.org>
Tue, 25 Nov 2003 13:50:45 +0000 (13:50 +0000)
clarificataions about the brokenness of AU_DEFUN's third argument.

doc/autoconf.texi
lib/autoconf/autoupdate.m4
lib/autoconf/status.m4

index 22f9684d5318209346d444fca496c6ea09edbfd8..fdbf73dd7691a1164aa21bbf4d36ab59c6e55bc0 100644 (file)
@@ -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
index 62bb3bcf9a1f5902f140da4b6079a1c5e411bc93..d071299f6a88763e1e4bee3a9c22b8de6d8b044f 100644 (file)
 # 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,
index 9376c41c59c6ea754021bdc4a583e4eb0b579f6b..216b64f9217306530b27c92b4501e3eba2c73ec1 100644 (file)
@@ -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.