summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2015-03-27 16:17:17 +0300
committerVlad Glagolev2015-03-27 16:17:17 +0300
commit52ca0982ea55e5d7a3c39b4e54d62eaa76941670 (patch)
tree38b869aac21cd739d540e08e5a87429669a1e813
parent343a0d80e9c49bd13df62e9ad755ecae233e940a (diff)
made building of documentation optional
-rw-r--r--ChangeLog2
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac15
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 59438cd..4053036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
* doc/Makefile.am: implemented build for 'doc'
* doc/castfs.pod: added POD (Plain Old Documentation) version for castfs
manual page
+ * Makefile.am: made building of documentation optional
+ * configure.ac: added flags to enable/disable documentation
2015-03-26 Vlad Glagolev <stealth@sourcemage.org>
* configure.ac: corrected FUSE_PREFIX substring; use proper flags for
diff --git a/Makefile.am b/Makefile.am
index 02dc908..0a56436 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,8 @@
MAINTAINERCLEANFILES = config.sub config.guess Makefile.in depcomp install-sh \
ltmain.sh missing configure aclocal.m4 *~
-SUBDIRS = include src test debian doc
+SUBDIRS = include src test debian
+
+if BUILD_DOCS
+ SUBDIRS += doc
+endif
diff --git a/configure.ac b/configure.ac
index f1fadc3..dcc8382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,8 +49,23 @@ if test "x$support_xattr" = "xyes"; then
AC_CHECK_FUNCS([setxattr],, AC_MSG_ERROR([[XATTRs enabled, but support not detected]]))
fi
+AC_ARG_ENABLE(documentation,
+AC_HELP_STRING([--disable-documentation], [Disable build of the manual page]),
+[build_docs=${enableval}], [build_docs=yes])
+
+if test "x$build_docs" = "xyes"; then
+ AC_PATH_PROG(POD2MAN, pod2man, no)
+
+ if test "x$POD2MAN" = "xno"; then
+ AC_MSG_ERROR([[Unable to build the manual page, Perl/pod2man not found]])
+ fi
+fi
+
+AM_CONDITIONAL(BUILD_DOCS, test "x$build_docs" = "xyes")
+
AC_CONFIG_FILES([
Makefile
+doc/Makefile
include/Makefile
src/Makefile
test/Makefile