diff options
author | Zack Weinberg <zackw@panix.com> | 2020-09-22 14:24:33 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-09-22 15:46:44 -0400 |
commit | 119beb03250a5ddf9514994c5c5d601692b81fa6 (patch) | |
tree | c8adad651c7f3bb674af8001fd657425d569ec82 /lib/autoconf/functions.m4 | |
parent | 8cb3442318041c78df6182fc37ad55a2450048fc (diff) | |
download | autoconf-119beb03250a5ddf9514994c5c5d601692b81fa6.tar.gz |
Autoupdate AC_{DIAGNOSE,FATAL,OBSOLETE,WARNING} and _AC_COMPUTE_INT.
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.
Diffstat (limited to 'lib/autoconf/functions.m4')
-rw-r--r-- | lib/autoconf/functions.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 46c4a115..aa560a63 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -85,7 +85,7 @@ m4_define([_AH_CHECK_FUNC], m4_define([_AC_CHECK_FUNCS_ONE_U], [AS_LITERAL_WORD_IF([$1], [_AH_CHECK_FUNC([$1])], - [AC_DIAGNOSE([syntax], [AC_CHECK_FUNCS($1): you should use literals])])]) + [m4_warn([syntax], [AC_CHECK_FUNCS($1): you should use literals])])]) # _AC_CHECK_FUNCS_ONE_S(FUNCTION) # ------------------------------- @@ -173,7 +173,7 @@ done])]) m4_define([_AC_REPLACE_FUNC_U], [AS_LITERAL_WORD_IF([$1], [_AH_CHECK_FUNC([$1])AC_LIBSOURCE([$1.c])], - [AC_DIAGNOSE([syntax], [AC_REPLACE_FUNCS($1): you should use literals])])]) + [m4_warn([syntax], [AC_REPLACE_FUNCS($1): you should use literals])])]) # _AC_REPLACE_FUNC_L(FUNCTION) # ---------------------------- @@ -1776,7 +1776,7 @@ test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen]) # AC_FUNC_SETVBUF_REVERSED # ------------------------ AC_DEFUN([AC_FUNC_SETVBUF_REVERSED], -[AC_DIAGNOSE([obsolete], +[m4_warn([obsolete], [The macro `$0' is obsolete. Remove it and all references to SETVBUF_REVERSED.])dnl AC_CACHE_VAL([ac_cv_func_setvbuf_reversed], [ac_cv_func_setvbuf_reversed=no]) ])# AC_FUNC_SETVBUF_REVERSED @@ -2063,7 +2063,7 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF]) # any invocation should be removed, and the code adjusted. AN_FUNCTION([wait3], [AC_FUNC_WAIT3]) AC_DEFUN([AC_FUNC_WAIT3], -[AC_DIAGNOSE([obsolete], +[m4_warn([obsolete], [$0: `wait3' has been removed from POSIX. Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl AC_CACHE_CHECK([for wait3 that fills in rusage], |