[anjuta/wip/lantw/build-dont-require-exact-match-in-the-bison-check] build: Don't require exact match in the bison check



commit 5120f9a68a7ef6734d2ec2433f457f2791ba2835
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Thu Aug 29 12:25:19 2019 +0800

    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.

 configure.ac | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index eeda3ed3e..6f7088ab9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]