]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
config.status now checks for missing awk
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Apr 2025 20:32:03 +0000 (13:32 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Apr 2025 22:17:11 +0000 (15:17 -0700)
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
Diagnose missing awk and fail, rather than blundering on.

NEWS
lib/autoconf/status.m4

diff --git a/NEWS b/NEWS
index 0b57386c0ec79227ddc55974b8cd9b97b71cfccc..0899de5f5088a9bfa66c6bbb76e68266fb20e019 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,9 @@ GNU Autoconf NEWS - User visible changes.
 *** 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
index 4fd8f39b31199db742093285daa06796e89e76f6..8bbf4b385e94a46ba05d5b2d58627817f75849b4 100644 (file)
@@ -1470,7 +1470,13 @@ AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
 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