diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-09 15:22:38 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-09 15:22:38 +0100 |
commit | 12d2d4d1f53f7f1c6d53d0eb82672cdbd75a6df9 (patch) | |
tree | c75b8a9be7f5c67b8e2ef34183576ae0c76748e9 /configure.ac | |
parent | d75414bc94ee1e9ba74336350755df60330edbe7 (diff) |
Don't build the manpage unless there's a working Ruby setup.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 503ceaa0..32ecdf7b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,18 +26,28 @@ if test "x$LEX" != xflex; then fi -dnl Check for flex -AC_CHECK_PROGS(flex_cmd, flex) -if test x$flex_cmd = "x" ; then - AC_MSG_NOTICE([flex is required to patch jq.]) -fi - dnl Check for valgrind AC_CHECK_PROGS(valgrind_cmd, valgrind) -if test x$valgrind_cmd = "x" ; then - AC_MSG_NOTICE([valgrind is required to test jq.]) +if test "x$valgrind_cmd" = "x" ; then + AC_MSG_WARN([valgrind is required to test jq.]) fi + +dnl Don't attempt to build docs if there's no Ruby lying around +AC_ARG_ENABLE([docs], + AC_HELP_STRING([--disable-docs], [don't build docs])) + +AS_IF([test "x$enable_docs" != "xno"],[ + AC_CHECK_PROG(bundle_cmd, bundle) + AS_IF([test "x$bundle_cmd" = "x" || \ + ! ( cd ${srcdir}/docs; bundle check 2>/dev/null )],[ + AC_MSG_WARN([no bundler]) + enable_docs=no + ]) +]) + +AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" != xno]) + dnl AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE([-Wall]) |