]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Don’t issue obsoletion warnings for AC_DIAGNOSE.
authorZack Weinberg <zackw@panix.com>
Wed, 7 Oct 2020 13:01:16 +0000 (09:01 -0400)
committerZack Weinberg <zackw@panix.com>
Wed, 7 Oct 2020 13:18:33 +0000 (09:18 -0400)
commit09346f1a776b1bba3634f2d3ccf30460fc372d44
tree8c26f75ed05db434165f921fb9dabf1ad4931a1f
parent1b52a8609b9417a188fee773b8f296c180c4cc73
Don’t issue obsoletion warnings for AC_DIAGNOSE.

AC_DIAGNOSE is used in several extremely popular add-on macros,
notably AM_INIT_AUTOMAKE, AM_GNU_GETTEXT, and AC_LIBTOOL_DLOPEN.
Until newer versions of these macros are available, -Wobsolete
warnings for AC_DIAGNOSE will be unhelpful noise.

Therefore, make it so AC_DIAGNOSE(...) will still be replaced with
m4_warn(...) by autoupdate, but autoconf runs will not complain about
AC_DIAGNOSE.  The bulk of the patch is augmenting AU_DEFUN so that it
can define a “silent” autoupdate replacement, and documenting the new
feature.

* lib/autoconf/autoupdate.m4 (AU_DEFUN): Add a fourth argument, SILENT,
  which must be either empty or the word ‘silent’.  If it is ‘silent’,
  the macro being defined will *not* issue a -Wobsolete warning when
  expanded by autoconf.
  Tweak quotation to prevent emacs’ parenthesis matching from getting
  confused.
  (AU_ALIAS): Add the SILENT argument here as well.

* lib/autoconf/general.m4 (AC_DIAGNOSE): Define as a silent AU_DEFUN.
  Add commentary explaining why this was done and when it can be
  changed back.

* doc/autoconf.texi (AU_DEFUN, AU_ALIAS): Revise; document new SILENT
  argument.
doc/autoconf.texi
lib/autoconf/autoupdate.m4
lib/autoconf/general.m4