bison-3.3
authorDebian Octave Group <team+pkg-octave-team@tracker.debian.org>
Fri, 1 Mar 2019 09:16:21 +0000 (09:16 +0000)
committerSébastien Villemot <sebastien@debian.org>
Fri, 1 Mar 2019 09:16:21 +0000 (09:16 +0000)
Gbp-Pq: Name bison-3.3.patch

Makefile.am
m4/acinclude.m4

index f788def676a4d67ea2533b7e0291006ddec3e866..810bfe2f2e75f6f04026812c621068efd97c9ad3 100644 (file)
@@ -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.
 
index db97be159242a3e5b54a9d439f8a8d8cb2b11100..8f4443a479fdce463a5d89ef2ef08646d859f765 100644 (file)
@@ -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.