summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueness <basile@opensource.dyc.edu>2014-03-22 16:50:11 -0400
committerblueness <basile@opensource.dyc.edu>2014-03-22 16:50:11 -0400
commit12c87cef17934b0909b96fdaa18b178963ec4436 (patch)
treec8f4dd5c74beeacfb18665c8c8862614c49c54fa
parentc0acbd0656ae0aeaa53f1d291fdee385ea43f7ff (diff)
parent8a5de44bb829d65fcf156b97eb040d9482f70b36 (diff)
Merge pull request #88 from lhb-jr/check_for_docbook
configure.ac: find docbook catalog Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--configure.ac45
-rw-r--r--man/Makefile.am3
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
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="test">
+</book>
+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
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="test">
+</book>
+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 \