doc: let configure find the XML tools if possible
authorChas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Thu, 2 Jun 2011 23:00:47 +0000 (19:00 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sun, 5 Jun 2011 15:15:55 +0000 (08:15 -0700)
configure should attempt to find the XML tools we need to process
the documentation.  if it can't, it should provide a safe default.
still allow the user to override via command line.

Change-Id: Ifaf3a5b090e93858c3d3c88363760c508030db90
Change-Id: Ib9558c37b04a4533e91b172a2a62039e4ed06d6f
Reviewed-on: http://gerrit.openafs.org/4766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4
doc/xml/AdminGuide/Makefile.in
doc/xml/QuickStartUnix/Makefile.in
doc/xml/UserGuide/Makefile.in

index 4ba2d40..ba3084c 100644 (file)
@@ -230,12 +230,11 @@ AC_ARG_ENABLE([linux-syscall-probing],
     ,
     [enable_linux_syscall_probing="maybe"])
     
-
 AC_ARG_WITH([xslt-processor],
        AS_HELP_STRING([--with-xslt-processor=ARG],
        [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]),
                XSLTPROC="$withval",
-               XSLTPROC="libxslt")
+       AC_CHECK_PROGS([XSLTPROC], [libxslt saxon xalan-j xsltproc], [echo]))
 
 AC_ARG_WITH([html-xsl], 
         AS_HELP_STRING([--with-html-xsl],
@@ -243,6 +242,12 @@ AC_ARG_WITH([html-xsl],
        HTML_XSL="$withval",
        HTML_XSL=no)
 
+AC_ARG_WITH([docbook2pdf],
+       AS_HELP_STRING([--with-docbook2pdf=ARG],
+       [which Docbook to PDF utility to use (possible choices are: docbook2pdf, dblatex)]),
+               DOCBOOK2PDF="$withval",
+       AC_CHECK_PROGS([DOCBOOK2PDF], [docbook2pdf dblatex], [echo]))
+
 enable_login="no"
 
 dnl weird ass systems
@@ -1672,6 +1677,7 @@ AC_SUBST(DARWIN_INFOFILE)
 AC_SUBST(IRIX_BUILD_IP35)
 AC_SUBST(HTML_XSL)
 AC_SUBST(XSLTPROC)
+AC_SUBST(DOCBOOK2PDF)
 
 OPENAFS_OSCONF
 OPENAFS_FUSE
index 7683525..d442707 100644 (file)
@@ -27,13 +27,14 @@ SRCS     = $(BOOK) auagd005.xml auagd006.xml auagd007.xml auagd008.xml \
           auagd024.xml auagd025.xml
 HTML_XSL = @HTML_XSL@
 XSLTPROC = @XSLTPROC@
+DOCBOOK2PDF = @DOCBOOK2PDF@
 
 html: $(SRCS) $(VERSFILE).xml
        $(XSLTPROC) --param navig.graphics 1 \
            --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK)
 
 pdf: $(SRCS) $(VERSFILE).xml
-       dblatex $(BOOK)
+       $(DOCBOOK2PDF) $(BOOK)
 
 check:
        xmllint --noout --valid $(BOOK)
index 2c2afb7..7d82c76 100644 (file)
@@ -24,13 +24,14 @@ SRCS     = $(BOOK) auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml \
           auqbg007.xml auqbg008.xml appendix.xml appendix_dafs.xml
 HTML_XSL = @HTML_XSL@
 XSLTPROC = @XSLTPROC@
+DOCBOOK2PDF = @DOCBOOK2PDF@
 
 html: $(SRCS) $(VERSFILE).xml
        $(XSLTPROC) --param navig.graphics 1 \
            --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK)
 
 pdf: $(SRCS) $(VERSFILE).xml
-       dblatex $(BOOK)
+       $(DOCBOOK2PDF) $(BOOK)
 
 check:
        xmllint --noout --valid $(BOOK)
index fe4fb91..40608a7 100644 (file)
@@ -25,13 +25,14 @@ SRCS     = $(BOOK) auusg003.xml auusg004.xml auusg005.xml auusg006.xml \
           auusg012.xml
 HTML_XSL = @HTML_XSL@
 XSLTPROC = @XSLTPROC@
+DOCBOOK2PDF = @DOCBOOK2PDF@
 
 html: $(SRCS) $(VERSFILE).xml
        $(XSLTPROC) --param navig.graphics 1 \
            --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK)
 
 pdf: $(SRCS) $(VERSFILE).xml
-       dblatex $(BOOK)
+       $(DOCBOOK2PDF) $(BOOK)
 
 check:
        xmllint --noout --valid $(BOOK)