about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-09-02 09:30:18 +1000
committerAllan McRae <allan@archlinux.org>2012-09-02 09:30:18 +1000
commit0786794f3a9d03040284c7d59d820de6f41e901c (patch)
treef4f4a1f70b7f1ab5a50e73b5e6d438d68e80bec9
parent26889eacc24cd9f0cb37c5a67beac1a0ba709adf (diff)
downloadglibc-0786794f3a9d03040284c7d59d820de6f41e901c.tar.gz
glibc-0786794f3a9d03040284c7d59d820de6f41e901c.tar.xz
glibc-0786794f3a9d03040284c7d59d820de6f41e901c.zip
Check for gawk >= 3.0 (bug 13412)
-rw-r--r--ChangeLog6
-rw-r--r--NEWS8
-rwxr-xr-xconfigure108
-rw-r--r--configure.in4
4 files changed, 77 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index bb5de85029..ad8f23e37f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-01  Allan McRae  <allan@archlinux.org>
+
+        [BZ #13412]
+        * configure.in (AWK): Require gawk version 3.0 or later.
+        * configure: Regenerated.
+
 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/kernel-features.h
diff --git a/NEWS b/NEWS
index 6ff950f7e2..c10e993a99 100644
--- a/NEWS
+++ b/NEWS
@@ -9,10 +9,10 @@ Version 2.17
 
 * The following bugs are resolved with this release:
 
-  3479, 5400, 6778, 6808, 9685, 11607, 13717, 13696, 13939, 14042, 14090,
-  14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14252, 14283,
-  14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459,
-  14476, 14505, 14516, 14519, 14532
+  3479, 5400, 6778, 6808, 9685, 11607, 13412, 13717, 13696, 13939, 14042,
+  14090, 14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14252,
+  14283, 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349,
+  14459, 14476, 14505, 14516, 14519, 14532
 
 * Support for STT_GNU_IFUNC symbols added for s390 and s390x.
   Optimized versions of memcpy, memset, and memcmp added for System z10 and
diff --git a/configure b/configure
index e240576645..6718bee0da 100755
--- a/configure
+++ b/configure
@@ -623,7 +623,6 @@ VERSIONING
 BISON
 INSTALL_INFO
 PERL
-AWK
 libc_cv_have_ksh
 KSH
 libc_cv_have_bash2
@@ -634,6 +633,7 @@ SYSINCLUDES
 AUTOCONF
 NM
 READELF
+AWK
 SED
 MAKEINFO
 MSGFMT
@@ -5002,6 +5002,69 @@ if test $ac_verc_fail = yes; then
   SED=: aux_missing="$aux_missing sed"
 fi
 
+for ac_prog in gawk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+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
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
@@ -5439,48 +5502,6 @@ else
 fi
 
 
-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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
 # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -8121,7 +8142,6 @@ gives unlimited permission to copy, distribute and modify it."
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
-AWK='$AWK'
 test -n "\$AWK" || AWK=awk
 _ACEOF
 
diff --git a/configure.in b/configure.in
index a5d9dea118..7de4b093d4 100644
--- a/configure.in
+++ b/configure.in
@@ -926,6 +926,9 @@ AC_CHECK_PROG_VER(SED, sed, --version,
   [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_CHECK_TOOL(READELF, readelf, false)
 AC_CHECK_TOOL(NM, nm, false)
@@ -1043,7 +1046,6 @@ else
 fi
 AC_SUBST(libc_cv_have_ksh)
 
-AC_PROG_AWK
 AC_PATH_PROG(PERL, perl, no)
 if test "$PERL" != no &&
    (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then