Commit 5120f9a6 authored by Ting-Wei Lan's avatar Ting-Wei Lan

build: Don't require exact match in the bison check

Autoconf changed its way to use bison several years ago:
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=42761668c0300afa7f8bf5ba736458a818cd5d15

It haven't been made available in any release, but it is possible for
distributions to backport the commit into their packages, causing the
bison check to fail. Specifically, it already happens on FreeBSD.

Therefore, instead of requiring an exact match, the check is changed to
only require the variable is started with 'bison' and a white space.
parent 4375ad6e
......@@ -78,9 +78,13 @@ if test "$LEX" != "flex"; then
AC_MSG_ERROR(flex is required)
fi
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_ERROR(bison is required)
fi
case "$YACC" in
'bison '*)
;;
*)
AC_MSG_ERROR(bison is required)
;;
esac
AC_LANG([C])
AC_LANG([C++])
AC_PROG_CXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment