- AC_PROG_CC now prefers C11 if available, falling back on C99 and
then on C89 as before.
+- AC_PROG_CC is now defined via AC_DEFUN_ONCE, to avoid bloat in 'configure'.
+
- AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99 have been marked as obsolete.
Applications should use AC_PROG_CC.
Many Autoconf macros use a compiler, and thus call
@samp{AC_REQUIRE([AC_PROG_CC])} to ensure that the compiler has been
determined before the body of the outermost @code{AC_DEFUN} macro.
-Although @code{AC_PROG_CC} is safe to directly expand multiple times, it
-performs certain checks (such as the proper value of @env{EXEEXT}) only
-on the first invocation. Therefore, care must be used when invoking
-this macro from within another macro rather than at the top level
-(@pxref{Expanded Before Required}).
+@code{AC_PROG_CC} is therefore defined via @code{AC_DEFUN_ONCE} to avoid
+needless reexpansion (@pxref{One-Shot Macros}).
@end defmac
@anchor{AC_PROG_CC_C_O}
AN_MAKEVAR([CC], [AC_PROG_CC])
AN_PROGRAM([cc], [AC_PROG_CC])
AN_PROGRAM([gcc], [AC_PROG_CC])
-AC_DEFUN([AC_PROG_CC],
+AC_DEFUN_ONCE([AC_PROG_CC],
[AC_LANG_PUSH(C)dnl
AC_ARG_VAR([CC], [C compiler command])dnl
AC_ARG_VAR([CFLAGS], [C compiler flags])dnl