-#
-AC_CHECK_PROG(YaccCmd, bison, bison -y)
-if test -z "$YaccCmd"; then
- echo "Can't find bison out there..."
- AC_CHECK_PROG(WhatCmd, what, what, :)
- AC_CHECK_PROG(YaccCmd, yacc, $ac_dir/$ac_word)
- if test -z "$YaccCmd"; then
- echo "But that's okay...I can't find yacc either."
- YaccCmd=:
- else
- $WhatCmd $YaccCmd > conftest.out
- if egrep 'y1\.c 1\..*SMI' conftest.out >/dev/null 2>&1; then
- echo "I don't trust your $YaccCmd; it looks like an old Sun yacc"
- if test -f /usr/lang/yacc; then
- echo "I'm going to use /usr/lang/yacc instead"
- YaccCmd=/usr/lang/yacc
- else
- echo "I'm assuming the worst...no parser generator at all"
- YaccCmd=:
- fi
- elif egrep 'y1\.c.*Revision: 4\.2\.6\.3.*DEC' conftest.out >/dev/null 2>&1; then
- echo "I don't trust your $YaccCmd; it looks like a lame DEC yacc"
- echo "I'm assuming the worst...no parser generator at all"
- YaccCmd=:
- else
- echo "But that's okay...as far as I know, your yacc will work."
- fi
- rm -fr conftest*
- fi
-fi