summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2013-06-05 16:40:01 +0100
committerStephen Dolan <mu@netsoc.tcd.ie>2013-06-05 16:40:01 +0100
commitc8ab67be2778d88224516de9b626cbdd91c4b3c6 (patch)
treeff3d0c16c121e2551c8eb7bb161359978e412c3b
parent6c34288ebff15f1be4267a45295d8c9b75e25a2d (diff)
Speed up cached configure (./configure -C)
-rw-r--r--.gitignore1
-rw-r--r--configure.ac19
2 files changed, 14 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 8a8cabba..8734c174 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@ aclocal.m4
Makefile.in
version.h
.remake-version-h
+config.cache
diff --git a/configure.ac b/configure.ac
index 1ee3ad7d..76a49a9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,10 +39,13 @@ AC_ARG_ENABLE([docs],
AS_IF([test "x$enable_docs" != "xno"],[
AC_CHECK_PROGS(bundle_cmd, bundle)
- AS_IF([test "x$bundle_cmd" = "x" || \
- ! ( cd ${srcdir}/docs; "$bundle_cmd" check 2>/dev/null )],[
- AC_MSG_WARN([no bundler])
- cat <<EOF
+
+ AC_CACHE_CHECK([for Ruby dependencies], [jq_cv_ruby_deps],
+ [jq_cv_ruby_deps=yes;
+ AS_IF([test "x$bundle_cmd" = "x" || \
+ ! bmsg="`cd ${srcdir}/docs; "$bundle_cmd" check 2>/dev/null`"],[
+ AC_MSG_WARN([$bmsg])
+ cat <<EOF
*****************************************************************
* Ruby dependencies for building jq documentation not found. *
* You can still build, install and hack on jq, but the manpage *
@@ -50,8 +53,12 @@ AS_IF([test "x$enable_docs" != "xno"],[
* See docs/README.md for how to install the docs dependencies. *
*****************************************************************
EOF
- enable_docs=no
- ])
+ jq_cv_ruby_deps=no
+ ])])
+
+ if test "x$jq_cv_ruby_deps" != "xyes"; then
+ enable_docs=no
+ fi
])
AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" != xno])