From patchwork Thu Dec 11 18:11:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 42157 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E0A3026C7A for ; Thu, 11 Dec 2014 18:12:06 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf3775836wgg.4 for ; Thu, 11 Dec 2014 10:12:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=RNlIisW+ctsJ+ks+c//1SF4+NxmK1dIfqRiRdBcpdY8=; b=Yq8JRbMdc2VdCFpVOebIKXZajMZSREwXzUDeqA/kISI/cTmj7UCJlnLa7pLorsyJEP 3SzkyqR6DKEhTjoHssKP1h7tr2EclR9MpCmClPRR8172wv325Nc6vOr+W9S6EBjFLnAD YxhPk+la3ut/zVWjrHHROMgIr1t/8LqLkmkASYCLLXWqZ+hKeN7XeAN/r5dojFVDMO40 qNnY208lwTMIo9OUKkZZFgOjYU6UXmJFLP/IeW08HGWKEuMuxXVQw0JjC1j0SxNyKfSl lstsa/SfVMrJ7vOkaowRRg8Rvi5gTlyOHCkLwOEyFlUMAs1TbAXT7Yw5Om0I+SzePlVG xCvg== X-Gm-Message-State: ALoCoQk7rD0pynUffMZpAOuS7bInUku/r02RWM5AstfOSdYCapAnfHzn2D6kPZC5bqGiMR7jd5HC X-Received: by 10.194.133.39 with SMTP id oz7mr1679000wjb.3.1418321526136; Thu, 11 Dec 2014 10:12:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.14 with SMTP id js14ls347272lab.69.gmail; Thu, 11 Dec 2014 10:12:05 -0800 (PST) X-Received: by 10.112.199.40 with SMTP id jh8mr11333513lbc.5.1418321525515; Thu, 11 Dec 2014 10:12:05 -0800 (PST) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com. [2a00:1450:4010:c04::234]) by mx.google.com with ESMTPS id qa1si2048845lbb.79.2014.12.11.10.12.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Dec 2014 10:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::234 as permitted sender) client-ip=2a00:1450:4010:c04::234; Received: by mail-lb0-f180.google.com with SMTP id l4so4524870lbv.25 for ; Thu, 11 Dec 2014 10:12:05 -0800 (PST) X-Received: by 10.112.16.168 with SMTP id h8mr11249350lbd.41.1418321525371; Thu, 11 Dec 2014 10:12:05 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp607525lbb; Thu, 11 Dec 2014 10:12:03 -0800 (PST) X-Received: by 10.68.170.130 with SMTP id am2mr19148513pbc.156.1418321522056; Thu, 11 Dec 2014 10:12:02 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ua6si2916095pac.60.2014.12.11.10.12.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Dec 2014 10:12:02 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-55347-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 19891 invoked by alias); 11 Dec 2014 18:11:50 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 19878 invoked by uid 89); 11 Dec 2014 18:11:50 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f174.google.com X-Received: by 10.194.119.99 with SMTP id kt3mr19934206wjb.14.1418321504912; Thu, 11 Dec 2014 10:11:44 -0800 (PST) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH v3] Require bison 2.7 or newer for regenerating intl/plural.y Date: Thu, 11 Dec 2014 18:11:39 +0000 Message-Id: <1418321499-9935-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::234 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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-11 Will Newton * 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. --- INSTALL | 5 +++++ configure | 53 +++++++++++++++++++++++++++++++++++++---------------- configure.ac | 5 ++++- manual/install.texi | 9 +++++++++ 4 files changed, 55 insertions(+), 17 deletions(-) Changes in v3: - Fix up texinfo formatting diff --git a/INSTALL b/INSTALL index dac6178..0fee315 100644 --- a/INSTALL +++ b/INSTALL @@ -386,6 +386,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. diff --git a/configure b/configure index 0cb54ec..c4e6546 100755 --- a/configure +++ b/configure @@ -5318,27 +5318,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 @@ -5346,11 +5345,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; } @@ -5360,6 +5357,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; } diff --git a/configure.ac b/configure.ac index b2c4b1f..82271c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1041,7 +1041,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 diff --git a/manual/install.texi b/manual/install.texi index 1eafb6e..1484081 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -442,6 +442,15 @@ 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.