From c74ea8b075168168820528d0423e46428de1c84d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 28 Jan 2016 15:22:10 -0500 Subject: [PATCH] build: Add --disable-man Gnome Continuous doesn't have docbook, so copy what we do for glib. --- Makefile-man.am | 4 ++-- configure.ac | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile-man.am b/Makefile-man.am index d2f31ca0..299e3177 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -26,7 +26,7 @@ man5_MANS = $(addprefix man/,$(man5_files)) EXTRA_DIST += $(man1_MANS) $(man5_MANS) -if ENABLE_XSLTPROC +if ENABLE_MAN XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl @@ -51,4 +51,4 @@ CLEANFILES += \ $(man5_MANS) \ $(NULL) -endif # ENABLE_GTK_DOC +endif diff --git a/configure.ac b/configure.ac index 140b6c21..c36134b9 100644 --- a/configure.ac +++ b/configure.ac @@ -126,8 +126,22 @@ enable_gtk_doc=no AM_CONDITIONAL([ENABLE_GTK_DOC], false) ]) -AC_PATH_PROG([XSLTPROC], [xsltproc]) -AM_CONDITIONAL([ENABLE_XSLTPROC], test -n "${XSLTPROC}") +AC_ARG_ENABLE(man, + [AS_HELP_STRING([--enable-man], + [generate man pages [default=auto]])],, + enable_man=maybe) + +AS_IF([test "$enable_man" != no], [ + AC_PATH_PROG([XSLTPROC], [xsltproc]) + AS_IF([test -z "$XSLTPROC"], [ + AS_IF([test "$enable_man" = yes], [ + AC_MSG_ERROR([xsltproc is required for --enable-man]) + ]) + enable_man=no + ]) + enable_man=yes +]) +AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) AC_ARG_WITH(libarchive, AS_HELP_STRING([--without-libarchive], [Do not use libarchive]), @@ -248,7 +262,7 @@ echo " SELinux: $with_selinux libarchive (parse tar files directly): $with_libarchive static deltas: $enable_static_deltas - man pages (xsltproc): $XSLTPROC + man pages (xsltproc): $enable_man api docs (gtk-doc): $enable_gtk_doc gjs-based tests: $have_gjs dracut: $with_dracut