Commit Graph

3 Commits

Author SHA1 Message Date
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
Nick Clifton 0e687cb4f1 Update the address and telephone number of the FSF organization
From-SVN: r99650
2005-05-13 08:03:47 +00:00
Zack Weinberg 6eb95e99e7 intl: New directory; see intl/ChangeLog for details.
top:
	* intl: New directory; see intl/ChangeLog for details.
	* ABOUT-NLS, config.rpath: Import from gettext 0.12.1.
	* Makefile.tpl: all-gcc depends on maybe-all-intl.
	* Makefile.in: Regenerate.
config:
	* gettext.m4: New file - copy of gettext.m4 from binutils
	CVS, with added AC_ISC_POSIX macro from gcc/aclocal.m4.
gcc:
	* ABOUT-NLS: Delete.
	* intl: Delete entire directory.
	* aclocal.m4: Include ../config/gettext.m4.  Delete
	AC_ISC_POSIX, AM_LANGINFO_CODESET, jm_GLIBC21, AM_LC_MESSAGES,
	AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, and AM_GNU_GETTEXT.
	* configure.in: Use CY_GNU_GETTEXT, not AM_GNU_GETTEXT.
	Remove intl/Makefile from all_outputs.
	* configure, config.in: Regenerate.
	* Makefile.in: Expunge all references to intl subdirectory.
	Add -I../intl to INCLUDES.
	* intl.h: Include libintl.h if and only if ENABLE_NLS is defined.
intl:
	* Makefile.in: Remove unnecessary capabilities for
	installation, build of shared libraries, generation of
	distribution tarballs, etc.  Fix all the places that rely on
	the parent directory.  Don't generate libgnuintl.h from
	anything; do generate $(objdir)/libintl.h from libgnuintl.h if
	necessary.  Adjust DEFS for use of config.h.
	* libgnuintl.h.in: Rename libgnuintl.h.
	* README: New file.
	* config.charset, ref-add.sin, ref-del.sin: Delete (unused).
	* COPYING.LIB-2.0, COPYING.LIB-2.1: Delete (redundant).
	* aclocal.m4: New; generated per instructions in gettext manual.
	* configure.in: New; written from scratch for this configuration.
	* configure, config.h.in: Generated.
contrib:
	* gcc_update: Remove gcc/intl/plural.c from list.
	Add new generated files intl/plural.c, intl/configure,
	intl/config.h.in.

From-SVN: r68928
2003-07-04 18:18:54 +00:00