summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2015-02-15 17:57:53 -0600
committerNicolas Williams <nico@cryptonector.com>2015-02-15 18:34:44 -0600
commit8cef5a37ab9d53ee81500b93f44e410c7814a512 (patch)
treebc4cd1706f10ec47acba98565b9399e92796a93e /configure.ac
parent8afdeee785140f3f916321f2a24b4c02d99131ee (diff)
Add --disable-maintainer-mode; make bison optional
Also flex is now optional. The outputs of flex and bison are now committed. By default they get built, but users who want to build from git can now ./configure --disable-maintainer-mode to turn off the dependency on bison and flex. Maintainers must, of course, commit the bison and/or flex outputs when they make changes to parser.y and/or lexer.l, respectively.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 15 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index 5364985a..b551df90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,7 @@ AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([parallel-tests foreign -Wall])
AM_SILENT_RULES([yes])
AM_PROG_AR
+AM_MAINTAINER_MODE([enable])
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP_WERROR
@@ -27,28 +28,20 @@ dnl AC_PROG_YACC macros...
dnl check bison version
-if test "$YACC" != "bison -y"; then
- AC_MSG_CHECKING([bison version])
- AC_MSG_RESULT([not bison])
-else
- AX_PROG_BISON_VERSION([3],
- [],
- [AC_MSG_ERROR([You need bison version 3.0 or greater.])])
- dnl These gross square brackets keep autotools from eating the perl script...
-# yacc_version=[$($YACC --version 2>1 | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')]
-# AX_COMPARE_VERSION([$yacc_version], [gt], [3],
-# [AC_MSG_RESULT([ok])],
-# [AC_MSG_RESULT([no])
-# AC_MSG_ERROR([You need bison version 3.0 or greater.])])
-fi
-
-dnl
-dnl these program checks should probably be deleted
-dnl
-
-AC_PROG_LEX
-if test "x$LEX" != xflex; then
- LEX="$SHELL $missing_dir/missing flex"
+if test "$USE_MAINTAINER_MODE" = yes; then
+ if test "$YACC" != "bison -y"; then
+ AC_MSG_CHECKING([bison version])
+ AC_MSG_RESULT([not bison])
+ else
+ AX_PROG_BISON_VERSION([3],
+ [],
+ [AC_MSG_ERROR([You need bison version 3.0 or greater.])])
+ fi
+
+ AC_PROG_LEX
+ if test "x$LEX" != xflex; then
+ LEX="$SHELL $missing_dir/missing flex"
+ fi
fi