This allows mutt to be built without the documentation.
Thanks to Sylvain Bertrand for the original patch.
AUTOMAKE_OPTIONS = 1.6 foreign
EXTRA_PROGRAMS = mutt_dotlock pgpring pgpewrap mutt_md5
+if BUILD_DOC
+DOC_SUBDIR = doc
+endif
+
if BUILD_IMAP
IMAP_SUBDIR = imap
IMAP_INCLUDES = -I$(top_srcdir)/imap
endif
-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
+SUBDIRS = m4 po intl $(DOC_SUBDIR) contrib $(IMAP_SUBDIR)
bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET)
fi
AC_SUBST(DSLROOT)
+AC_ARG_ENABLE(doc, AS_HELP_STRING([--disable-doc],[Do not build the documentation]),
+[ if test x$enableval = xno ; then
+ do_build_doc=no
+ fi
+])
+AM_CONDITIONAL(BUILD_DOC, test x$do_build_doc != xno)
+
AC_ARG_ENABLE(full_doc,
AS_HELP_STRING([--disable-full-doc],[Omit disabled variables]),
[ if test x$enableval = xno ; then