From 12d2d4d1f53f7f1c6d53d0eb82672cdbd75a6df9 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Thu, 9 May 2013 15:22:38 +0100 Subject: Don't build the manpage unless there's a working Ruby setup. --- configure.ac | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'configure.ac') 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]) -- cgit v1.2.3