From 119beb03250a5ddf9514994c5c5d601692b81fa6 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Tue, 22 Sep 2020 14:24:33 -0400 Subject: Autoupdate AC_{DIAGNOSE,FATAL,OBSOLETE,WARNING} and _AC_COMPUTE_INT. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While working on the previous patches I noticed that all of these macros are officially obsolete, but autoupdate doesn’t replace them. _AC_COMPUTE_INT is easy to autoupdate. AC_{DIAGNOSE,FATAL,WARNING} require a little special handling because their replacements are m4sugar macros, and autoupdate normally expands m4sugar macros as it goes. Fortunately, the same workaround as is used for AC_FOREACH can be applied. AC_OBSOLETE also needs that workaround, and cannot be fully replaced automatically. The bulk of the patch is removing internal uses of AC_DIAGNOSE. * lib/autoconf/autoupdate.m4 * lib/autoconf/c.m4 * lib/autoconf/functions.m4 * lib/autoconf/general.m4 * lib/autoconf/headers.m4 * lib/autoconf/lang.m4 * lib/autoconf/status.m4 * lib/autoconf/types.m4 * tests/local.at * tests/tools.at: Use, and/or refer to, m4_warn instead of AC_DIAGNOSE. * lib/autoconf/general.m4 (_AC_COMPUTE_INT): Define using AU_DEFUN. (AC_DIAGNOSE, AC_FATAL, AC_WARNING): Autoupdate to m4_warn, m4_fatal, and m4_warn([syntax], [$1]) respectively, using the same paired AU_DEFUN/AC_DEFUN trick that is used for AC_FOREACH. (AC_OBSOLETE): Autoupdate to m4_warn([obsolete], [$1]) and advise hand-conversion to AU_DEFUN. * lib/autoconf/autoupdate.m4 (AU_DEFUN): Tweak quoting so m4_warn([$3]) is emitted into the edited configure.ac instead of being expanded at autoupdate time. * tests/tools.at (autoupdating AC_FOREACH): Adjust grep expressions. (autoupdating AC_DIAGNOSE and AC_WARNING): New test. (autoupdating AC_FATAL): New test. (autoupdating AC_OBSOLETE): New test. * tests/mktests.sh (ac_exclude_list, au_exclude_list): Exclude AC_DIAGNOSE, AC_FATAL, AC_FOREACH, AC_OBSOLETE, and AC_WARNING if not already excluded. --- NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 9ee7dbec..8a8ac9f1 100644 --- a/NEWS +++ b/NEWS @@ -199,6 +199,16 @@ GNU Autoconf NEWS - User visible changes. diagnosed as obsolete, and replaced with AC_CONFIG_HEADERS by autoupdate. +- The obsolete macros AC_DIAGNOSE, AC_FATAL, AC_WARNING, and + _AC_COMPUTE_INT are now replaced with modern equivalents by + autoupdate. + +- The macro AC_OBSOLETE is obsolete. Autoupdate will replace it with + m4_warn([obsolete], [explanation]). If possible, macros using + AC_OBSOLETE should be converted to use AU_DEFUN or AU_ALIAS instead, + which enables autoupdate to replace them, but this has to be done by + hand and is not always possible. + - AC_FC_LINE_LENGTH now documents the maximum portable length of "unlimited" Fortran source code lines to be 250 columns, not 254. -- cgit v1.2.1