gcc/intl
Jakub Jelinek 2ca17e0a89 intl: Allow building both with old bison and bison >= 3 [PR92008]
bison 3 apparently made a backwards incompatible change, dropped
YYLEX_PARAM/YYPARSE_PARAM support and instead needs %param or %lex-param
and %parse-param.  Furthermore, there is no easy way to conditionalize
on bison version in the *.y files.
While e.g. glibc bumped bison requirement and just has the bison 3
compatible version, Richi said there are still systems with older bison
where we want to build gcc.

So, this patch instead determines during configure bison version, and
depending on that when building plural.c (if building it at all) tweaks
what is passed over to bison if needed.

Tested with both bison 3 and bison 1.35, in each case with reconfiguring
intl and building with make all-yes (as in my setup intl isn't normally
used).

2020-04-16  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/92008
	* configure.ac: Add check for bison >= 3, AC_DEFINE HAVE_BISON3
	and AC_SUBST BISON3_YES and BISON3_NO.
	* Makefile.in (.y.c): Prefix $(YACC) invocation with @BISON3_NO@,
	add @BISON3_YES@ prefixed rule to adjust the *.y source using sed
	and adjust output afterwards.
	* plural-exp.h (PLURAL_PARSE): If HAVE_BISON3 is defined, use
	struct parse_args * type for arg instead of void *.
	* plural.y: Add magic /* BISON3 ... */ comments with bison >= 3
	directives.
	(YYLEX_PARAM, YYPARSE_PARAM): Don't define if HAVE_BISON3 is defined.
	(yylex, yyerror): Adjust prototypes and definitions if HAVE_BISON3
	is defined.
	* plural.c: Regenerated.
	* config.h.in: Regenerated.
	* configure: Regenerated.
2020-04-16 10:12:30 +02:00
..
ChangeLog intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
Makefile.in intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
README
VERSION
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
bindtextdom.c
config.h.in intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
config.intl.in
configure intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
configure.ac intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
dcgettext.c
dcigettext.c
dcngettext.c
dgettext.c
dngettext.c
eval-plural.h
explodename.c
finddomain.c
gettext.c
gettextP.h
gmo.h
hash-string.h
intl-compat.c
l10nflist.c
libgnuintl.h libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, [...]): Backport changes from upstream gettext. 2018-09-18 22:08:49 -06:00
loadinfo.h
loadmsgcat.c
localcharset.c
localcharset.h
locale.alias
localealias.c
localename.c
log.c
ngettext.c
osdep.c
plural-exp.c
plural-exp.h intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
plural.c intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
plural.y intl: Allow building both with old bison and bison >= 3 [PR92008] 2020-04-16 10:12:30 +02:00
relocatable.c
relocatable.h
textdomain.c

README

GNU toolchain edition of GNU libintl 0.12.1

Most of the content of this directory is taken from gettext 0.12.1
and is owned by that project.  Patches should be directed to the
gettext developers first.  However, note the following:

* libintl.h comes from gettext, but is named libgnuintl.h.in in that
  project's source tree.

* The files COPYING.LIB-2.0 and COPYING.LIB-2.1 are redundant with the
  top-level COPYING.LIB and have therefore been removed.

* The files config.charset, ref-add.sin, ref-del.sin, os2compat.c,
  and os2compat.h are not used in this setup and have therefore been 
  removed.

* aclocal.m4 was constructed using automake's "aclocal -I ../config".

* configure.ac, config.intl.in, and Makefile.in were written for this
  directory layout, by Zack Weinberg <zack@codesourcery.com>.  Please
  direct patches for these files to gcc-patches@gcc.gnu.org.