From c38ba181ede6b46f28d5a70bf0243bcd003f943b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Nov 2003 10:41:21 +0000 Subject: [PATCH] * Configure flags to specify the location of the DocBook DTD / stylesheets. --- configure.ac | 17 +++++++++++++++++ doc/manual/Makefile.am | 10 +++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 243ef392f..1da1ab854 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,23 @@ AC_PROG_CXX AC_PROG_RANLIB AC_PATH_PROG(wget, wget) +AC_PATH_PROG(xmllint, xmllint) +AC_PATH_PROG(xsltproc, xsltproc) + +AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH], + [path of the DocBook XML DTD]), + docbookcatalog=$withval, docbookcatalog=/docbook-dtd-missing) +AC_SUBST(docbookcatalog) + +AC_ARG_WITH(docbook-xsl, AC_HELP_STRING([--with-docbook-xsl=PATH], + [path of the DocBook XSL stylesheets]), + docbookxsl=$withval, docbookxsl=/docbook-xsl-missing) +AC_SUBST(docbookxsl) + +AC_ARG_WITH(xml-flags, AC_HELP_STRING([--xml-flags=FLAGS], + [extra flags to be passed to xmllint and xsltproc]), + xmlflags=$withval, xmlflags=) +AC_SUBST(xmlflags) AC_CHECK_LIB(pthread, pthread_mutex_init) diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index ac991ddbf..87d4e87d7 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -1,7 +1,7 @@ -ENV = SGML_CATALOG_FILES=$(DOCBOOK_DTD)/docbook.cat +ENV = SGML_CATALOG_FILES=$(docbookcatalog)/docbook.cat -XMLLINT = $(ENV) xmllint --catalogs --nonet -XSLTPROC = $(ENV) xsltproc --catalogs --nonet +XMLLINT = $(ENV) $(xmllint) $(xmlflags) --catalogs +XSLTPROC = $(ENV) $(xsltproc) $(xmlflags) --catalogs SOURCES = book.xml introduction.xml installation.xml nix-reference.xml \ troubleshooting.xml bugs.xml @@ -13,10 +13,10 @@ book.is-valid: $(SOURCES) man1_MANS = nix.1 fix.1 man nix.1 fix.1: $(SOURCES) book.is-valid - $(XSLTPROC) $(DOCBOOK_XSL)/manpages/docbook.xsl book.xml + $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl book.xml book.html: $(SOURCES) book.is-valid - $(XSLTPROC) --output book.html $(DOCBOOK_XSL)/html/docbook.xsl book.xml + $(XSLTPROC) --output book.html $(docbookxsl)/html/docbook.xsl book.xml all-local: book.html