about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-26T10·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-26T10·41+0000
commitc38ba181ede6b46f28d5a70bf0243bcd003f943b (patch)
treed3a82a0ec7efd658820ea22e2d46400e9376c17d
parent4da9316c8fa576cad77bf398785765e165f6865c (diff)
* Configure flags to specify the location of the DocBook DTD / stylesheets.
-rw-r--r--configure.ac17
-rw-r--r--doc/manual/Makefile.am10
2 files changed, 22 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 243ef392f566..1da1ab85476c 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 ac991ddbfea2..87d4e87d78ad 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