summaryrefslogtreecommitdiffstats
path: root/patches/03_accept-any-awk.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/03_accept-any-awk.patch')
-rw-r--r--patches/03_accept-any-awk.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/patches/03_accept-any-awk.patch b/patches/03_accept-any-awk.patch
new file mode 100644
index 0000000..3b96b5c
--- /dev/null
+++ b/patches/03_accept-any-awk.patch
@@ -0,0 +1,57 @@
+From: "P. J. McDermott" <pjm@nac.net>
+Description: Accept any awk implementation
+ Use "AC_PROG_GREP" instead of "AC_CHECK_PROG_VER(AWK, gawk, ...)".
+
+diff -Naur src.orig/libc/configure src/libc/configure
+--- src.orig/libc/configure 2012-12-02 16:11:45.000000000 -0500
++++ src/libc/configure 2013-06-20 21:07:27.741343950 -0400
+@@ -5207,7 +5207,7 @@
+ SED=: aux_missing="$aux_missing sed"
+ fi
+
+-for ac_prog in gawk
++for ac_prog in gawk mawk nawk awk
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -5250,23 +5250,6 @@
+ done
+
+ if test -z "$AWK"; then
+- ac_verc_fail=yes
+-else
+- # Found it, now check the version.
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AWK" >&5
+-$as_echo_n "checking version of $AWK... " >&6; }
+- ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
+- case $ac_prog_version in
+- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- [3-9].*)
+- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+-
+- esac
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+-$as_echo "$ac_prog_version" >&6; }
+-fi
+-if test $ac_verc_fail = yes; then
+ critic_missing="$critic_missing gawk"
+ fi
+
+diff -Naur src.orig/libc/configure.in src/libc/configure.in
+--- src.orig/libc/configure.in 2012-12-02 16:11:45.000000000 -0500
++++ src/libc/configure.in 2013-06-20 21:00:07.913300996 -0400
+@@ -982,9 +982,10 @@
+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)],
+ [3.0[2-9]*|3.[1-9]*|[4-9]*],
+ SED=: aux_missing="$aux_missing sed")
+-AC_CHECK_PROG_VER(AWK, gawk, --version,
+- [GNU Awk[^0-9]*\([0-9][0-9.]*\)],
+- [[3-9].*], critic_missing="$critic_missing gawk")
++AC_PROG_AWK
++if test -z "$AWK"; then
++ critic_missing="$critic_missing gawk"
++fi
+
+ AC_CHECK_TOOL(NM, nm, false)
+