]> granicus.if.org Git - jq/commitdiff
Fix #201; check that bison accepts --warnings
authorNicolas Williams <nico@cryptonector.com>
Thu, 2 Jan 2014 05:10:00 +0000 (23:10 -0600)
committerNicolas Williams <nico@cryptonector.com>
Thu, 2 Jan 2014 05:10:00 +0000 (23:10 -0600)
configure.ac

index 7e1e08fcd4ba7adb380a6d2701be1f7224b0a19c..e9a069fc22367b323f76a52a367a546d48d9b306 100644 (file)
@@ -20,6 +20,17 @@ AM_PROG_CC_C_O
 dnl couldn't use AM_PROG_LEX as it doesn't support header files like the
 dnl AC_PROG_YACC macros...
 
+dnl check bison version
+AC_MSG_CHECKING([bison version])
+if test "$YACC" != "bison -y"; then
+  AC_MSG_RESULT([not bison])
+elif $YACC --help | grep -- --warnings >/dev/null; then 
+  AC_MSG_RESULT([ok])
+else 
+  AC_MSG_RESULT([no])
+  AC_MSG_ERROR([You need bison version 2.5 or more recent.])
+fi
+
 dnl
 dnl these program checks should probably be deleted
 dnl