summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2017-01-03 20:44:17 +0800
committerWill Estes <westes575@gmail.com>2017-01-25 10:29:26 -0500
commit546851ba357d956b05b14cfd5ec89dcad4a1576a (patch)
tree3dc2974b78919e4d8cfef3b6ffbcedd3c94d1f28 /configure.ac
parenta2fccbe579622bd3f4eb301040978f1f47bb70f1 (diff)
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 5 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index c6c5bd4..3152ccc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,11 @@ AC_SUBST(SHARED_VERSION_INFO)
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 @@ AC_ARG_ENABLE([bootstrap],
[], [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)