]> Savannah Git Hosting - autoconf.git/commitdiff

Savannah Git Hosting - autoconf.git/commitdiff

git git@sv / autoconf.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d79cd9)
Fall back on busybox awk
2025年4月20日 17:36:19 +0000 (10:36 -0700)
2025年4月20日 17:38:45 +0000 (10:38 -0700)
* lib/autoconf/programs.m4 (AC_PROG_AWK):
Fall back 'busybox awk' of none of the other awks work.


diff --git a/NEWS b/NEWS
index 0899de5f5088a9bfa66c6bbb76e68266fb20e019..1e4e513ec6b6aa7044090b8c01d6d80e7fffe4c6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ GNU Autoconf NEWS - User visible changes.
The autom4te, autoscan and ifnames programs now recognize the two
preprocessor directives, which were introduced in C23 and C++23.
+*** AC_PROG_AWK now also checks for busybox awk.
+
*** AC_USE_SYSTEM_EXTENSIONS now defines _COSMO_SOURCE for Cosmopolitan Libc.
** Notable bug fixes
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index fd16d5fbc0cc56b7707ca50b6ba34d83c7a0f2fe..7b156b82091ba90b9f5c18332820af63f04a20e7 100644 (file)
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4162,14 +4162,19 @@ otherwise to @samp{:} (do nothing).
@acindex{PROG_AWK}
@ovindex AWK
@caindex prog_AWK
-Check for @code{gawk}, @code{mawk}, @code{nawk}, and @code{awk}, in that
+Check for the commands @command{gawk}, @command{mawk},
+@command{nawk}, @command{awk}, and @code{busybox awk}, in that
order, and set output variable @code{AWK} to the first one that is found.
-It tries @code{gawk} first because that is reported to be the
+Try @code{gawk} first because that is reported to be the
best implementation. The result can be overridden by setting the
variable @code{AWK} or the cache variable @code{ac_cv_prog_AWK}.
-Using this macro is sufficient to avoid the pitfalls of traditional
-@command{awk} (@pxref{awk, , Limitations of Usual Tools}).
+Using this macro avoids some pitfalls of older systems that have both
+traditional @command{awk} (@pxref{awk, , Limitations of Usual Tools})
+and better alternatives like @command{gawk}.
+It also can help port to stripped-down systems that have only
+@code{busybox awk}, although these systems could well have problems
+with other build components that use plain @command{awk}.
@end defmac
@defmac AC_PROG_GREP
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index 1d44bbf3dec2d733b39684b551212b99fb468dc4..d8b8b8b1dcac64621f2932506cf6e01dc1f2fd5b 100644 (file)
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -357,7 +357,7 @@ AN_PROGRAM([gawk], [AC_PROG_AWK])
AN_PROGRAM([mawk], [AC_PROG_AWK])
AN_PROGRAM([nawk], [AC_PROG_AWK])
AC_DEFUN([AC_PROG_AWK],
-[AC_CHECK_PROGS(AWK, gawk mawk nawk awk, )])
+[AC_CHECK_PROGS([AWK], [gawk mawk nawk awk 'busybox awk'])])
# AC_PROG_EGREP
GNU Autoconf source repository
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /