Added --without-docs to configure
authorTrond Norbye <trond.norbye@gmail.com>
Wed, 21 Jul 2010 16:18:14 +0000 (18:18 +0200)
committerTrond Norbye <trond.norbye@gmail.com>
Wed, 21 Jul 2010 16:18:14 +0000 (18:18 +0200)
The purpose of this option is to be able to disable generation of manual
pages from pod2man (to enable compilation of libmemcached on systems
without a working pod2man)

Makefile.am
configure.ac
tests/include.am

index 0728e01d21d6159c080927968ba8e984adb1fd57..386494118ee63d15b4eb94db850c2213b48d7644 100644 (file)
@@ -12,7 +12,7 @@ noinst_LTLIBRARIES =
 noinst_PROGRAMS =
 include_HEADERS =
 nobase_include_HEADERS =
-check_PROGRAMS = 
+check_PROGRAMS =
 EXTRA_HEADERS =
 BUILT_SOURCES=
 EXTRA_DIST= \
@@ -30,8 +30,11 @@ EXTRA_DIST= \
            m4/po.m4 \
            m4/progtest.m4
 
-
+TEST_DOCS=
+if BUILD_DOCS
 SUBDIRS = docs
+TEST_DOCS+=test-docs
+endif
 
 test-docs:
        (cd docs && $(MAKE) test-docs)
@@ -84,7 +87,7 @@ lcov: lcov-clean check
        genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out
 
 lcov-clean: clean
-       rm -rf lcov */lcov.out 
+       rm -rf lcov */lcov.out
        find . -name '*.gcno' | xargs rm -f
        find . -name '*.gcda' | xargs rm -f
 
index d450ef1f26529113ab44ca5e4a942170c720a816..c192234c3e3f1e0641c38d976a4eecc673d570b9 100644 (file)
@@ -50,8 +50,6 @@ DETECT_BYTEORDER
 ENABLE_UTILLIB
 SETSOCKOPT_SANITY
 ENABLE_HSIEH_HASH
-REQUIRE_POD2MAN
-REQUIRE_PODCHECKER
 PROTOCOL_BINARY_TEST
 WITH_MEMCACHED
 ENABLE_DEPRECATED
@@ -73,6 +71,20 @@ AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
                      [1],
                       [Define to true if you want to use functions from atomic.h])])])
 
+AC_ARG_WITH([docs],
+  [AS_HELP_STRING([--with-docs],
+    [Generate documentation (yes|no) @<:@default=yes@:>@])],
+  [with_docs=$withval],
+  [with_docs=yes])
+
+AS_IF([test "$with_docs" = "yes"],
+  [
+    REQUIRE_POD2MAN
+    REQUIRE_PODCHECKER
+  ])
+AM_CONDITIONAL(BUILD_DOCS, test "$with_docs" = "yes")
+
+
 AC_CONFIG_FILES([
   Makefile
   docs/Makefile
@@ -109,3 +121,13 @@ case "$host_os" in
   ;;
 esac
 
+AS_IF(test "$with_docs" = "no",
+  [
+    echo "*****"
+    echo "*"
+    echo "*  WARNING: You are not generating any documentation."
+    echo "*           Please don't ship libmemcached to an end user"
+    echo "*           without documentation..."
+    echo "*"
+    echo "*****"
+  ])
index 3d0d7760b329fd827ae70460f5b57c35b988c613..7a9c206284d6824531cac8fde75c01c29cd5691e 100644 (file)
@@ -91,7 +91,7 @@ tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
 
 test: check
 
-check-local: test-docs test-mem test-hash memcapable
+check-local: $(TEST_DOCS) test-mem test-hash memcapable
        echo "Tests completed"
 
 test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat