aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac11
2 files changed, 16 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index c6edd12..42cd0c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,7 +33,13 @@ else
lang_subdirs =
endif
-SUBDIRS = m4 src doc tests po $(lang_subdirs)
+if BUILD_DOC
+doc = doc
+else
+doc =
+endif
+
+SUBDIRS = m4 src $(doc) tests po $(lang_subdirs)
dist-hook: gen-ChangeLog
diff --git a/configure.ac b/configure.ac
index 9683c81..27fda63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -508,10 +508,17 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
-AC_ARG_ENABLE(languages,
-[ --disable-languages do not build support for other languages than C])
+AC_ARG_ENABLE(languages, AC_HELP_STRING([--disable-languages],
+ [do not build support for other languages than C]))
AM_CONDITIONAL([LANGUAGES_SOME], [test "x$enable_languages" != xno])
+build_doc=yes
+AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-doc],
+ [do not build the documentation]),
+ build_doc=$enableval, build_doc=yes)
+AM_CONDITIONAL([BUILD_DOC], [test "x$enable_languages" != xno])
+
+
#
# Substitution
#