[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patches] Re: gawk, mawk, and eglibc
- To: "Seebach, Peter" <Peter.Seebach@xxxxxxxxxxxxx>, "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Subject: [patches] Re: gawk, mawk, and eglibc
- From: Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
- Date: Mon, 09 Nov 2009 15:37:27 +0300
[taking to patches@xxxxxxxxxx]
Seebach, Peter wrote:
AC_PROG_AWK is wrong.
Specifically: If you try to build eglibc on a machine which has mawk, but doesn't have gawk, it fails. At least two scripts (gen-sorted.awk, option-groups.awk) are dependent on gawk-specific behavior or functionality.
The INSTALL file recommends gawk 3.0 or higher to build GLIBC.
...
I don't have a specific idea in mind of how best to fix this. I could make a case for removing the dependency, or for changing the configure test. I'm not sure which is better.
Is it that hard to install gawk on your build system that you'd prefer hacking glibc to build with mawk?
...
Not that hard, but if eglibc absolutely can't be built without gawk,
configure should test for it, not continue to fail inexplicably much later.
That sounds reasonable. Here is a patch that restricts EGLIBC to gawk.
Joseph, is the patch ok to commit to trunk?
Regards,
--
Maxim Kuvyrkov
CodeSourcery
maxim@xxxxxxxxxxxxxxxx
(650) 331-3385 x724
2009-11-09 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
Peter Seebach <peter.seebach@xxxxxxxxxxxxx>
* configure.in (AC_PROG_AWK): Require GNU `awk'.
* configure: Regenerate.
diff --git a/configure b/configure
index 55bc3e0..4d638e9 100755
--- a/configure
+++ b/configure
@@ -5708,6 +5708,12 @@ fi
test -n "$AWK" && break
done
+if test "x$AWK" != "xgawk"; then
+ { { $as_echo "$as_me:$LINENO: error: \"GLIBC requires GNU awk.\"" >&5
+$as_echo "$as_me: error: \"GLIBC requires GNU awk.\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
diff --git a/configure.in b/configure.in
index 301e4fc..60e0a27 100644
--- a/configure.in
+++ b/configure.in
@@ -1089,6 +1089,11 @@ fi
AC_SUBST(libc_cv_have_ksh)
AC_PROG_AWK
+dnl We need gawk for at least gen-sorted.awk and option-groups.awk.
+if test "x$AWK" != "xgawk"; then
+ AC_MSG_ERROR("GLIBC requires GNU awk.")
+fi
+
AC_PATH_PROG(PERL, perl, no)
if test "$PERL" != no &&
(eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then