autoconf/doc
Zack Weinberg c38538737c
Revert "AC_PROG_CC: define via AC_DEFUN_ONCE". (#110350)
Revert commit 18c140b50b, restoring
AC_PROG_CC to being defined as an ordinary AC_DEFUN.  This broke
third-party macros (e.g. the Autoconf Macro Archive’s
AX_PROG_CC_FOR_BUILD) that intentionally invoked AC_PROG_CC a second
time with its guts redefined via a whole bunch of ‘pushdef’s.  I don’t
think we want to support this long-term, but needing access to a
build-native compiler in cross-compilation is common enough that we
should have *some* supported way to do it, and it may as well be
AX_PROG_CC_FOR_BUILD until we come up with something better.

If we go back to AC_DEFUN_ONCE for AC_PROG_CC in the future, we should
do it consistently for all the “find me a compiler” macros -- it
was *only* done for AC_PROG_CC in 18c140b5.

The rationale for AC_DEFUN_ONCE seems to have been to reduce the size
of the generated configure script.  The bulk of the size accountable to
AC_PROG_CC is the test programs for figuring out which version of the
C standard is available, so I tweaked _AC_C_STD_TRY (and _AC_CXX_STD_TRY)
to emit that text only once per program, into shell variables which
can then be referenced repeatedly.

Fixes bug #110350.

* NEWS, doc/autoconf.texi: Revert documentation changes associated
  with AC_PROG_CC being a one-shot macro.
* lib/autoconf/c.m4 (AC_PROG_CC): Revert to defining with AC_DEFUN.
  (_AC_C_STD_TRY, _AC_CXX_STD_TRY): Emit the test program only once,
  even if invoked multiple times with the same arguments.

* tests/foreign.at (AX_PROG_CC_FOR_BUILD, AX_PROG_CXX_FOR_BUILD):
  New tests.
2020-12-04 16:41:43 -05:00
..
autoconf.texi Revert "AC_PROG_CC: define via AC_DEFUN_ONCE". (#110350) 2020-12-04 16:41:43 -05:00
fdl.texi make fetch 2020-09-03 12:08:31 -04:00
gendocs_template make fetch 2020-06-29 17:08:26 -07:00
gnu-oids.texi make fetch 2020-07-11 11:10:39 -04:00
install.texi maint: make update-copyright 2020-01-01 11:45:50 -08:00
local.mk maint: make update-copyright 2020-01-01 11:45:50 -08:00
make-stds.texi make fetch 2020-06-29 17:08:26 -07:00
standards.texi make fetch and update savannah gitweb urls to cgit. 2020-11-30 11:45:24 -05:00