From: Bruno Haible Date: Fri, 1 May 2020 17:46:00 +0000 (+0200) Subject: build: Fix a build failure with bison < 3.0 when cldr-plural.y is modified. X-Git-Tag: v0.21~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74a9fca389a0ece51c703be5ab36fbe8bff0b268;p=thirdparty%2Fgettext.git build: Fix a build failure with bison < 3.0 when cldr-plural.y is modified. * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add bison. * gettext-tools/configure.ac: Don't invoke AC_PROG_YACC. Instead, invoke gl_PROG_BISON, set YACC, and invoke gl_BISON. --- diff --git a/autogen.sh b/autogen.sh index c9046c308..343a6e4bf 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2003-2019 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -121,6 +121,7 @@ if ! $skip_gnulib; then backupfile basename binary-io + bison bison-i18n byteswap c-ctype diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index c8e9882bc..3f65ae773 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -31,7 +31,6 @@ test "$docdir" != '${datarootdir}/doc/${PACKAGE_TARNAME}' || docdir='${datarootd dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL -AC_PROG_YACC gt_JAVA_CHOICE @@ -161,6 +160,10 @@ fi AM_CONDITIONAL([USE_INSTALLED_CSHARP_DLL], [test "$gt_use_installed_csharp_dll" != no]) +dnl Check for bison and set YACC. (cldr-plural.y requires bison >= 3.0.) +gl_PROG_BISON([TOOLS_BISON], [3.0], [1.* | 2.*]) +: ${YACC="${TOOLS_BISON} -o y.tab.c"} +gl_BISON dnl This line internationalizes the bison generated parsers. BISON_I18N