Mercurial > octave
changeset 26672:df42ea23502f stable
build: support GNU bison 3.3, silence POSIX compatibility warning (bug #55613)
* acinclude.m4 (OCTAVE_PROG_BISON): Define WARN_YFLAGS to include options to
silence POSIX compatibility warnings from GNU bison. Use it when testing for
required syntax support.
* Makefile.am (AM_YFLAGS): Include ${WARN_YFLAGS} in the list of options.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 31 Jan 2019 21:35:04 -0800 |
parents | c3c657ba1e97 |
children | af47f245a2ad |
files | Makefile.am m4/acinclude.m4 |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Wed Mar 28 15:27:58 2018 +0200 +++ b/Makefile.am Thu Jan 31 21:35:04 2019 -0800 @@ -35,7 +35,7 @@ AM_LFLAGS = @LFLAGS@ -AM_YFLAGS = -dv +AM_YFLAGS = -dv ${WARN_YFLAGS} # Fortran compiler flags.
--- a/m4/acinclude.m4 Wed Mar 28 15:27:58 2018 +0200 +++ b/m4/acinclude.m4 Thu Jan 31 21:35:04 2019 -0800 @@ -3180,6 +3180,7 @@ dnl AC_DEFUN([OCTAVE_PROG_BISON], [ AC_PROG_YACC + WARN_YFLAGS= case "`$YACC --version`" in *bison*) tmp_have_bison=yes ;; @@ -3187,6 +3188,13 @@ 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" @@ -3214,7 +3222,7 @@ %% 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" @@ -3252,6 +3260,7 @@ " OCTAVE_CONFIGURE_WARNING([warn_bison]) fi + AC_SUBST(WARN_YFLAGS) ]) dnl dnl Find find program.