build: remove repeated bison detection from configure.

AC_PROG_YACC already detects the bison program. We can just use it,
and make notice if [ $YACC != 'bison -y' ]

Remove unused AC_SUBST([BISON], ...).

Add AM_CONDITIONAL([HAVE_BISON], ...) so that we can skip bison tests
in testsuite when bison is absent.

We don't make any attempt to detect other yacc implementations since
flex is developed with bison. While it would be possible, the need
isn't there right now. It would be possible to add a --with-parser
option that defaulted to bison if such a need cropped up.
diff --git a/configure.ac b/configure.ac
index c6c5bd4..3152ccc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,11 @@
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.19])
 AC_PROG_YACC
+AS_IF([test "$YACC" != 'bison -y'], [
+	YACC="\${top_srcdir}/build-aux/missing bison -y"
+	AC_MSG_NOTICE(no bison program found: only required for maintainers)
+	])
+AM_CONDITIONAL([HAVE_BISON], [test "$YACC" = 'bison -y'])
 AM_PROG_LEX
 AC_PROG_CC
 AC_PROG_CXX
@@ -75,12 +80,6 @@
   [], [enable_bootstrap=yes])
 AM_CONDITIONAL([ENABLE_BOOTSTRAP], [test "x$enable_bootstrap" = xyes])
 
-AC_PATH_PROG([BISON], bison, no)
-AS_IF([test "$BISON" != no],[],
-	[ AC_SUBST([BISON], [\${top_srcdir}/build-aux/missing bison])
-	  AC_MSG_NOTICE(no bison program found: only required for maintainers)
-	])
-
 AC_PATH_PROG([HELP2MAN], help2man, [\${top_srcdir}/build-aux/missing help2man])
   AS_IF([test "$HELP2MAN" = "\${top_srcdir}/build-aux/missing help2man"],
     AC_MSG_WARN(help2man: program not found: building man page will not work)