]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Require bison 2.7 or newer for regenerating intl/plural.y
authorWill Newton <will.newton@linaro.org>
Thu, 11 Dec 2014 17:27:34 +0000 (17:27 +0000)
committerWill Newton <will.newton@linaro.org>
Mon, 22 Dec 2014 11:57:40 +0000 (11:57 +0000)
The merge of the latest gettext code introduced changes to the yacc
parser source that are incompatible with versions of bison older
than 2.7. Add a configure check for the appropriate versions and
document the requirement in INSTALL.

ChangeLog:

2014-12-22  Will Newton  <will.newton@linaro.org>

* manual/install.texi: Document that we require bison 2.7
or above.
* INSTALL: Regenerate.
* configure.ac: Use AC_CHECK_PROG_VER instead of
AC_PATH_PROG when checking for bison and check for
version 2.7 or above.
* configure: Regenerate.

ChangeLog
INSTALL
configure
configure.ac
manual/install.texi

index d488679832b20871b2ce51939aae2585af443e04..99c248c575784e8aaff42f3a0784109e1955aa4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-12-22  Will Newton  <will.newton@linaro.org>
+
+       * manual/install.texi: Document that we require bison 2.7
+       or above.
+       * INSTALL: Regenerate.
+       * configure.ac: Use AC_CHECK_PROG_VER instead of
+       AC_PATH_PROG when checking for bison and check for
+       version 2.7 or above.
+       * configure: Regenerate.
+
 2014-12-21  Chris Metcalf  <cmetcalf@ezchip.com>
 
        * sysdeps/tile/ffs.c (__ffs): Moved ffsll definition...
diff --git a/INSTALL b/INSTALL
index 35f70e0f5e4ff2a0d050180d93f1715dc7d37fba..8e5a4a191b09ae0a05a6d7df0913b2d6a32e025f 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -393,6 +393,11 @@ and if you change any of the message translation files you will need
 
    * GNU `gettext' 0.10.36 or later
 
+If you wish to regenerate the `yacc' parser code in the `intl'
+subdirectory you will need
+
+   * GNU `bison' 2.7 or later
+
 You may also need these packages if you upgrade your source tree using
 patches, although we try to avoid this.
 
index cde55de15fe64a90279359a18e418bd1f2088bd3..ce0c6a01f114d009945dcca58d039fa5123d648e 100755 (executable)
--- a/configure
+++ b/configure
@@ -5330,27 +5330,26 @@ $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "bison", so it can be a program name with args.
-set dummy bison; ac_word=$2
+for ac_prog in bison
+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_path_BISON+:} false; then :
+if ${ac_cv_prog_BISON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $BISON in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/local/bin:/usr/bin:/bin"
-for as_dir in $as_dummy
+  if test -n "$BISON"; then
+  ac_cv_prog_BISON="$BISON" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_prog_BISON="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5358,11 +5357,9 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_BISON" && ac_cv_path_BISON="no"
-  ;;
-esac
 fi
-BISON=$ac_cv_path_BISON
+fi
+BISON=$ac_cv_prog_BISON
 if test -n "$BISON"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
 $as_echo "$BISON" >&6; }
@@ -5372,6 +5369,30 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$BISON" && break
+done
+
+if test -z "$BISON"; then
+  ac_verc_fail=yes
+else
+  # Found it, now check the version.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $BISON" >&5
+$as_echo_n "checking version of $BISON... " >&6; }
+  ac_prog_version=`$BISON --version 2>&1 | sed -n 's/^.*bison (GNU Bison) \([0-9]*\.[0-9.]*\).*$/\1/p'`
+  case $ac_prog_version in
+    '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+    2.7*|[3-9].*|[1-9][0-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
+  BISON=no
+fi
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libc-friendly stddef.h" >&5
 $as_echo_n "checking for libc-friendly stddef.h... " >&6; }
index f1e6394e7ee2255cc1247c325d82222c5f565429..d89aaf0cdf329f1fe6247dbbfad49693642c570f 100644 (file)
@@ -1048,7 +1048,10 @@ if test "$PERL" != no &&
 fi
 AC_PATH_PROG(INSTALL_INFO, install-info, no,
             $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
-AC_PATH_PROG(BISON, bison, no, $PATH:/usr/local/bin:/usr/bin:/bin)
+AC_CHECK_PROG_VER(BISON, bison, --version,
+                 [bison (GNU Bison) \([0-9]*\.[0-9.]*\)],
+                 [2.7*|[3-9].*|[1-9][0-9]*],
+                 BISON=no)
 
 AC_CACHE_CHECK(for libc-friendly stddef.h, libc_cv_friendly_stddef, [dnl
 AC_TRY_COMPILE(dnl
index 2b9b57ca32214727120a62f6a0c2096ba80d0d1c..d8dc3d58c9db159c4c111d0cd347621578bb082d 100644 (file)
@@ -448,6 +448,15 @@ and if you change any of the message translation files you will need
 GNU @code{gettext} 0.10.36 or later
 @end itemize
 
+@noindent
+If you wish to regenerate the @code{yacc} parser code in the @file{intl}
+subdirectory you will need
+
+@itemize @bullet
+@item
+GNU @code{bison} 2.7 or later
+@end itemize
+
 @noindent
 You may also need these packages if you upgrade your source tree using
 patches, although we try to avoid this.