]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix a build failure with bison < 3.0 when cldr-plural.y is modified.
authorBruno Haible <bruno@clisp.org>
Fri, 1 May 2020 17:46:00 +0000 (19:46 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 1 May 2020 17:46:00 +0000 (19:46 +0200)
* 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.

autogen.sh
gettext-tools/configure.ac

index c9046c3080364432e21f53eb7bc6770f1c5c5355..343a6e4bf4123cdef66450ce86c518a8a4a9a514 100755 (executable)
@@ -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
index c8e9882bcf3176553d68fcce3fc4971f1ee02679..3f65ae773173b83a28c65b853f4ee8935931cd84 100644 (file)
@@ -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