]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: support bison < 3.0 for parse.error=verbose
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 23 Jan 2017 22:26:23 +0000 (23:26 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 23 Jan 2017 22:26:23 +0000 (23:26 +0100)
*sigh*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac
lib/Makefile.am
lib/command_parse.y

index 6ce5d0cc2ce683497207ce66f5298e66b781c1ec..550ac4f9264803d6b196c4a50767ca1c984e2a4a 100755 (executable)
@@ -1459,6 +1459,7 @@ case "x${quagga_ac_bison_version}" in
   x2.7*)
     BISON_OPENBRACE='"'
     BISON_CLOSEBRACE='"'
+    BISON_VERBOSE=''
     AC_MSG_RESULT([$quagga_ac_bison_version - 2.7 or older])
     ;;
   x2.*|x1.*)
@@ -1474,11 +1475,13 @@ case "x${quagga_ac_bison_version}" in
   *)
     BISON_OPENBRACE='{'
     BISON_CLOSEBRACE='}'
+    BISON_VERBOSE='-Dparse.error=verbose'
     AC_MSG_RESULT([$quagga_ac_bison_version - 3.0 or newer])
     ;;
 esac
 AC_SUBST(BISON_OPENBRACE)
 AC_SUBST(BISON_CLOSEBRACE)
+AC_SUBST(BISON_VERBOSE)
 
 if $quagga_ac_bison_missing; then
   YACC="$SHELL $missing_dir/missing bison -y"
index b0487206739315a59f2153914c3f823d37990f51..08d9dccb9d426cb18abbe9dbc99306db54f9cdb4 100644 (file)
@@ -3,7 +3,7 @@
 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
 AM_CFLAGS = $(WERROR)
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
-AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@
+AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
 
 command_lex.h: command_lex.c
        @if test ! -f $@; then rm -f command_lex.c; else :; fi
index cbc7ce97541b6aac60525a710df8b32e8f556445..dd8e6fb596d45f3ac602c3b1dccd466574f58f82 100644 (file)
@@ -28,7 +28,7 @@
 %}
 
 %locations
-%define parse.error verbose
+/* define parse.error verbose */
 %define api.pure full
 /* define api.prefix {cmd_yy} */