From 3c351a09e59eef9c754d119f94e780a71ab0797e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 13 Jan 2012 16:30:39 -0500 Subject: [PATCH] build: Add --disable-documentation flag We may have xsltproc, but no DTDs. --- Makefile.am | 2 +- configure.ac | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 88693896..ddcf078c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,7 +60,7 @@ XML_FILES = \ ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}} EXTRA_DIST += $(XML_FILES) -if HAVE_XSLTPROC +if BUILD_DOCUMENTATION dist_man_MANS = $(MANPAGES) diff --git a/configure.ac b/configure.ac index b9f1ed70..bce1a457 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,19 @@ LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0" PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY) +AC_ARG_ENABLE(documentation, + AC_HELP_STRING([--enable-documentation], + [build documentation]),, + enable_documentation=yes) +if test x$enable_documentation = xyes; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test x$XSLTPROC = x; then + AC_MSG_ERROR([xsltproc is required to build documentation]) + fi +fi +AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes) + + AC_ARG_WITH(soup-gnome, AS_HELP_STRING([--without-soup-gnome], [Do not use libsoup-gnome (implies no pull support)]), :, with_soup_gnome=maybe) @@ -65,9 +78,6 @@ AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no) AM_PATH_PYTHON([2.7]) -AC_PATH_PROG([XSLTPROC], [xsltproc]) -AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x) - AC_CONFIG_FILES([ Makefile ])