Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 1 | # |
| 2 | # Check for Bison. |
| 3 | # |
| 4 | # This macro verifies that Bison is installed. If successful, then |
| 5 | # 1) YACC is set to bison -y (to emulate YACC calls) |
| 6 | # 2) BISON is set to bison |
| 7 | # |
| 8 | AC_DEFUN([AC_PROG_BISON], |
Reid Spencer | 145f857 | 2004-12-13 09:37:41 +0000 | [diff] [blame] | 9 | [AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 10 | if test "$YACC" != "bison -y"; then |
Reid Spencer | 4869d7f | 2006-08-24 22:41:20 +0000 | [diff] [blame] | 11 | AC_SUBST(BISON,[]) |
| 12 | AC_MSG_WARN([bison not found, can't rebuild grammars]) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 13 | else |
Reid Spencer | 4869d7f | 2006-08-24 22:41:20 +0000 | [diff] [blame] | 14 | AC_SUBST(BISON,[bison]) |
Reid Spencer | 145f857 | 2004-12-13 09:37:41 +0000 | [diff] [blame] | 15 | fi]) |