From 79ab6e6131fc5c0db7be83bb7c356de4e094a719 Mon Sep 17 00:00:00 2001 From: Debian Octave Group Date: Tue, 7 May 2019 10:36:11 +0100 Subject: [PATCH] bison-3.3 Gbp-Pq: Name bison-3.3.patch --- Makefile.am | 2 +- m4/acinclude.m4 | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index f788def6..810bfe2f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,7 +37,7 @@ TEXINFO_TEX=$(top_srcdir)/build-aux/texinfo.tex AM_LFLAGS = @LFLAGS@ -AM_YFLAGS = -dv +AM_YFLAGS = -dv ${WARN_YFLAGS} # Fortran compiler flags. diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index db97be15..8f4443a4 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -3134,6 +3134,7 @@ dnl Check for bison. dnl AC_DEFUN([OCTAVE_PROG_BISON], [ AC_PROG_YACC + WARN_YFLAGS= case "`$YACC --version`" in *bison*) tmp_have_bison=yes ;; @@ -3141,6 +3142,13 @@ AC_DEFUN([OCTAVE_PROG_BISON], [ esac if test $tmp_have_bison = yes; then + dnl FIXME: Call GNU bison with the `-Wno-yacc` option, which works with + dnl bison 2.5 and all later versions, as recommended by the bison NEWS. + dnl This is needed as long as Octave supports Autoconf version 2.69 or + dnl older. In Autoconf 2.70, AC_PROG_YACC no longer adds the `-y` + dnl option to emulate POSIX yacc. + WARN_YFLAGS="-Wno-yacc" + AC_CACHE_CHECK([syntax of bison api.prefix (or name-prefix) declaration], [octave_cv_bison_api_prefix_decl_style], [ style="api name" @@ -3168,7 +3176,7 @@ input:; %% EOF ## Older versions of bison only warn and exit with success. - octave_bison_output=`$YACC conftest.yy 2>&1` + octave_bison_output=`$YACC $WARN_YFLAGS conftest.yy 2>&1` ac_status=$? if test $ac_status -eq 0 && test -z "$octave_bison_output"; then octave_cv_bison_api_prefix_decl_style="$s $q" @@ -3219,7 +3227,7 @@ $def input:; %% EOF - octave_bison_output=`$YACC conftest.yy 2>&1` + octave_bison_output=`$YACC $WARN_YFLAGS conftest.yy 2>&1` ac_status=$? if test $ac_status -eq 0 && test -z "$octave_bison_output"; then if test $q = noquote; then @@ -3260,6 +3268,7 @@ building from VCS sources. " OCTAVE_CONFIGURE_WARNING([warn_bison]) fi + AC_SUBST(WARN_YFLAGS) ]) dnl dnl Find find program. -- 2.30.2