From f78c5d06a8775b33890071166d56be82d9233c8b Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sat, 23 Jan 2021 18:56:21 -0500 Subject: [PATCH] Fix build with new Bison versions. New Bison needs additional options to work. Pull in dxcommon updates to get relevant configure tests and adapt the build recipes accordingly. --- Makefile.am | 6 +++--- common | 2 +- configure.ac | 19 +++++++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index da056d7..ef816f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright © 2011-2013,2019-2020 Nick Bowler +# Copyright © 2011-2013, 2019-2021 Nick Bowler # # License WTFPL2: Do What The Fuck You Want To Public License, version 2. # This is free software: you are free to do what the fuck you want to. @@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I m4 -I common/m4 # For Gnulib MOSTLYCLEANFILES = -noinst_LTLIBRARIES = +EXTRA_LTLIBRARIES = AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_builddir)/lib -I$(top_srcdir)/lib \ @@ -164,7 +164,7 @@ FLEX_V_0 = @printf ' %$(DX_ALIGN_V)s %s\n' 'FLEX ' $<; .y.stamp: $(AM_V_at) touch $@.tmp - $(BISON_V) $(BISON) -o $*.c --defines=$*.h.tmp $(BISONFLAGS) $< + $(BISON_V) $(BISON) $(BISON_COMPAT) -o $*.c --defines=$*.h.tmp $(BISONFLAGS) $< $(AM_V_at) if cmp $*.h.tmp $*.h >/dev/null 2>&1; then \ rm -f $*.h.tmp; \ else \ diff --git a/common b/common index 92a8970..8dc6be8 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 92a89700c65e52fac8c2cace51a7112d60b3f42f +Subproject commit 8dc6be89e724f1255b5332f0dac012b304377645 diff --git a/configure.ac b/configure.ac index fa00e02..a0bf6b1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Copyright © 2011-2013, 2020 Nick Bowler +dnl Copyright © 2011-2013, 2020-2021 Nick Bowler dnl dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. dnl This is free software: you are free to do what the fuck you want to. @@ -48,15 +48,18 @@ m4_traceoff([AM_GNU_GETTEXT]) AM_GNU_GETTEXT([external]) DX_LINGUAS -AC_ARG_VAR([FLEX], [Command to invoke flex. Defaults to flex.]) -AC_ARG_VAR([FLEXFLAGS], [Additional options to pass to flex.]) -AC_CHECK_PROGS([FLEX], [flex], [flex]) - -AC_ARG_VAR([BISON], [Command to invoke GNU Bison. Defaults to bison.]) -AC_ARG_VAR([BISONFLAGS], [Additional options to pass to Bison.]) -AC_CHECK_PROGS([BISON], [bison], [bison]) +DX_PROG_FLEX([], [], [FLEX=false]) +DX_PROG_BISON([], [], [BISON=false]) +DX_BISON_COMPAT BISON_I18N +BISON_COMPAT= +AS_IF([test x"$dx_cv_bison_api_header_include" = x"yes"], + [BISON_COMPAT="'--define=api.header.include={\"\$(*F).h\"}'"]) +AS_IF([test x"$dx_cv_bison_warn_no_deprecated" = x"yes"], + [AS_VAR_APPEND([BISON_COMPAT], ["${BISON_COMPAT:+ }-Wno-deprecated"])]) +AC_SUBST([BISON_COMPAT]) + AH_TOP([#include ]) AH_BOTTOM([#include ]) -- 2.43.0