Skip to content

Commit

Permalink
lib/cfg-grammar.y: depend on bison 3.7.6
Browse files Browse the repository at this point in the history
Due to akimd/bison#72 and issue 74 we are
going to need at least bison 3.7.6, make that explicit in the
configure scripts and the grammar.

Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
  • Loading branch information
bazsi committed Apr 29, 2021
1 parent 5d304d6 commit ba6cf8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ set(WITH_GETTEXT "" CACHE STRING "Set the prefix where gettext is installed (e.g

set(CMAKE_C_STANDARD 99)

find_package(BISON 3.4.2 REQUIRED)
find_package(BISON 3.7.6 REQUIRED)

string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\..*$" _dummy "${BISON_VERSION}")

Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@ if echo "$YACC" | grep -q bison; then
bison_version_minor=`echo $bison_version | cut -d. -f2`
bison_version_patch=`echo $bison_version | cut -d. -f3`
if ([[ "$bison_version_major" -gt 3 ]]) ||
([[ "$bison_version_major" -eq 3 ]] && [[ "$bison_version_minor" -gt 4 ]]) ||
([[ "$bison_version_major" -eq 3 ]] && [[ "$bison_version_minor" -eq 4 ]] && [[ "$bison_version_patch" -ge 2 ]]); then
([[ "$bison_version_major" -eq 3 ]] && [[ "$bison_version_minor" -gt 7 ]]) ||
([[ "$bison_version_major" -eq 3 ]] && [[ "$bison_version_minor" -eq 7 ]] && [[ "$bison_version_patch" -ge 6 ]]); then
yacc_ok=1
else
AC_MSG_WARN([bison is found, but your bison version $bison_version is not recent enough, at least 3.4.2 is required])
AC_MSG_WARN([bison is found, but your bison version $bison_version is not recent enough, at least 3.7.6 is required])
fi
fi

Expand All @@ -447,7 +447,7 @@ if test $yacc_ok = 0; then
AC_MSG_WARN([No proper bison found, you'll not be able to change lib/cfg-grammar.y])
YACC="echo Required bison not found && false"
else
AC_MSG_ERROR([syslog-ng requires bison 3.4.2 or later. Your source tree seems to be from git, which doesn't have the bison generated files (like cfg-grammar.c). Please install/upgrade bison or use a distribution tarball.])
AC_MSG_ERROR([syslog-ng requires bison 3.7.6 or later. Your source tree seems to be from git, which doesn't have the bison generated files (like cfg-grammar.c). Please install/upgrade bison or use a distribution tarball.])
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/cfg-grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

/* START_DECLS */

%require "3.4.2"
%require "3.7.6"
%locations
%define api.pure
%define api.value.type {CFG_STYPE}
Expand Down

0 comments on commit ba6cf8e

Please sign in to comment.