config.status now checks for missing awk
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
Diagnose missing awk and fail, rather than blundering on.
diff --git a/NEWS b/NEWS
index 0b57386..0899de5 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,9 @@
*** Autoconf no longer generates ${1+"$@"} in scripts, working around
a bug in AIX 7.2 ksh93.
+*** config.status now fails with a diagnostic if awk is missing,
+ rather than misbehaving.
+
* Noteworthy changes in release 2.72 (2023-12-22) [release]
** Backward incompatibilities
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 4fd8f39..8bbf4b3 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1470,7 +1470,13 @@
AC_PROVIDE_IFELSE([AC_PROG_AWK],
[AWK='$AWK'
])dnl
-test -n "\$AWK" || AWK=awk
+test -n "\$AWK" || {
+ awk '' </dev/null ||
+ AS_ESCAPE(
+ m4_dquote(m4_expand([AC_MSG_ERROR([try installing gawk])])),
+ [\$`])
+ AWK=awk
+}
_ACEOF
cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1