blob: 48b83cc4a61f5bad45568fad59a008f49856e6f2 [file] [log] [blame]
Reid Spencer491f6812004-09-07 06:56:14 +00001#
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#
8AC_DEFUN([AC_PROG_BISON],
Reid Spencer145f8572004-12-13 09:37:41 +00009[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()])
Reid Spencer491f6812004-09-07 06:56:14 +000010if test "$YACC" != "bison -y"; then
Reid Spencer4869d7f2006-08-24 22:41:20 +000011 AC_SUBST(BISON,[])
12 AC_MSG_WARN([bison not found, can't rebuild grammars])
Reid Spencer491f6812004-09-07 06:56:14 +000013else
Reid Spencer4869d7f2006-08-24 22:41:20 +000014 AC_SUBST(BISON,[bison])
Reid Spencer145f8572004-12-13 09:37:41 +000015fi])