From 8a5de44bb829d65fcf156b97eb040d9482f70b36 Mon Sep 17 00:00:00 2001 From: lhb-jr Date: Thu, 20 Mar 2014 20:51:06 -0400 Subject: modified: configure.ac modified: man/Makefile.am Added checking for DocBook in configure --- configure.ac | 45 ++++++++++++++++++++++++++++++++++++++------- man/Makefile.am | 3 +-- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 85e297b8d4..a661165432 100644 --- a/configure.ac +++ b/configure.ac @@ -251,15 +251,46 @@ AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [ ]) # ------------------------------------------------------------------------------ -have_manpages=no -AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) -AS_IF([test "x$enable_manpages" != xno], [ - AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [ - AC_MSG_ERROR([*** Manpages requested but xsltproc not found]) + +AC_ARG_VAR([XML_CATALOG_FILES],[Used to find Docbook catalog (to build man pages)]) +AC_ARG_ENABLE([manpages], AS_HELP_STRING([--disable-manpages], [disable manpages])) + +if test "x$enable_manpages" != "xno" -a "x$XSLTPROC" != "x"; then + AC_MSG_CHECKING([for local Docbook stylesheets]) + $XSLTPROC --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl >/dev/null 2>&1 << END + + + + +END + if test "$?" = 0; then + docbook_ok=yes + XSLTPROC_FLAGS=--nonet + AC_MSG_RESULT(${docbook_ok}) + else + AC_MSG_RESULT([no]) + AC_MSG_CHECKING([for Docbook stylesheets via internet(use '--disable-manpages' flag to omit)]) + $XSLTPROC http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl >/dev/null 2>&1 << END + + + + +END + if test "$?" = 0; then + docbook_ok=yes + XSLTPROC_FLAGS= + else + docbook_ok=no + fi + AC_MSG_RESULT(${docbook_ok}) + fi + + AS_IF([test "x${docbook_ok}" = "xyes"],[have_manpages=yes], [ + AC_MSG_WARN([Manpages requested but docbook not enabled. Manpages disabled!]) ]) - AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes]) -]) +fi AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) +AC_SUBST(XSLTPROC_FLAGS) # ------------------------------------------------------------------------------ diff --git a/man/Makefile.am b/man/Makefile.am index a82d537dbf..80d2086772 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -22,8 +22,7 @@ man_MANS = \ CLEANFILES = \ $(MANPAGES) -XSLTPROC_FLAGS = \ - --nonet \ +XSLTPROC_FLAGS += \ --stringparam man.output.quietly 1 \ --stringparam funcsynopsis.style ansi \ --stringparam man.th.extra1.suppress 1 \ -- cgit v1.2.3-54-g00ecf