Commit cfe2fd2a authored by Simon Marlow's avatar Simon Marlow

tidy up autoconfiguration of docbook stuff

 * use --nonet, so xmllint and co don't go off trying to download
   stuff from the web

 * use the http:// reference for the stylesheet, so we don't have to
   search the filesystem for it (should speedup ./configure)
parent 467f1aa6
...@@ -793,33 +793,30 @@ fi ...@@ -793,33 +793,30 @@ fi
])# FP_PROG_XSLTPROC ])# FP_PROG_XSLTPROC
# FP_DIR_DOCBOOK_XSL(XSL-DIRS) # FP_DOCBOOK_XSL(XSL-DIRS)
# ---------------------------- # ----------------------------
# Check which of the directories XSL-DIRS contains DocBook XSL stylesheets. The # Check which of the directories XSL-DIRS contains DocBook XSL stylesheets. The
# output variable DIR_DOCBOOK_XSL will contain the first usable directory or # output variable HAVE_DOCBOOK_XSL will contain the first usable directory or
# will be empty if none could be found. # will be empty if none could be found.
AC_DEFUN([FP_DIR_DOCBOOK_XSL], AC_DEFUN([FP_DOCBOOK_XSL],
[AC_REQUIRE([FP_PROG_XSLTPROC])dnl [AC_REQUIRE([FP_PROG_XSLTPROC])dnl
if test -n "$XsltprocCmd"; then if test -n "$XsltprocCmd"; then
AC_CACHE_CHECK([for DocBook XSL stylesheet directory], fp_cv_dir_docbook_xsl, AC_CACHE_CHECK([for DocBook XSL stylesheet], fp_cv_dir_docbook_xsl,
[FP_GEN_DOCBOOK_XML [FP_GEN_DOCBOOK_XML
fp_cv_dir_docbook_xsl=no fp_cv_dir_docbook_xsl=no
for fp_var in $1; do if $XsltprocCmd --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl conftest.xml > /dev/null 2>&1; then
if $XsltprocCmd ${fp_var}/html/docbook.xsl conftest.xml > /dev/null 2>&1; then fp_cv_dir_docbook_xsl=yes
fp_cv_dir_docbook_xsl=$fp_var fi
break
fi
done
rm -rf conftest*]) rm -rf conftest*])
fi fi
if test x"$fp_cv_dir_docbook_xsl" = xno; then if test x"$fp_cv_dir_docbook_xsl" = xno; then
AC_MSG_WARN([cannot find DocBook XSL stylesheets, you will not be able to build the documentation]) AC_MSG_WARN([cannot find DocBook XSL stylesheets, you will not be able to build the documentation])
DIR_DOCBOOK_XSL= HAVE_DOCBOOK_XSL=NO
else else
DIR_DOCBOOK_XSL=$fp_cv_dir_docbook_xsl HAVE_DOCBOOK_XSL=YES
fi fi
AC_SUBST([DIR_DOCBOOK_XSL]) AC_SUBST([HAVE_DOCBOOK_XSL])
])# FP_DIR_DOCBOOK_XSL ])# FP_DOCBOOK_XSL
# FP_PROG_XMLLINT # FP_PROG_XMLLINT
...@@ -841,7 +838,7 @@ AC_DEFUN([FP_CHECK_DOCBOOK_DTD], ...@@ -841,7 +838,7 @@ AC_DEFUN([FP_CHECK_DOCBOOK_DTD],
if test -n "$XmllintCmd"; then if test -n "$XmllintCmd"; then
AC_MSG_CHECKING([for DocBook DTD]) AC_MSG_CHECKING([for DocBook DTD])
FP_GEN_DOCBOOK_XML FP_GEN_DOCBOOK_XML
if $XmllintCmd --valid --noout conftest.xml > /dev/null 2>&1; then if $XmllintCmd --nonet --valid --noout conftest.xml > /dev/null 2>&1; then
AC_MSG_RESULT([ok]) AC_MSG_RESULT([ok])
else else
AC_MSG_RESULT([failed]) AC_MSG_RESULT([failed])
......
...@@ -621,8 +621,7 @@ fi ...@@ -621,8 +621,7 @@ fi
dnl ** check for DocBook toolchain dnl ** check for DocBook toolchain
FP_CHECK_DOCBOOK_DTD FP_CHECK_DOCBOOK_DTD
FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/xml/docbook/xsl-stylesheets* /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl]) FP_DOCBOOK_XSL
FP_PROG_DBLATEX FP_PROG_DBLATEX
FP_PROG_HSTAGS FP_PROG_HSTAGS
...@@ -922,7 +921,7 @@ else ...@@ -922,7 +921,7 @@ else
fi fi
AC_SUBST(HavePapi) AC_SUBST(HavePapi)
if test "$DIR_DOCBOOK_XSL" = "" || if test "$HAVE_DOCBOOK_XSL" = "" ||
test "$XsltprocCmd" = "" test "$XsltprocCmd" = ""
then then
BUILD_DOCBOOK_HTML=NO BUILD_DOCBOOK_HTML=NO
......
...@@ -842,18 +842,17 @@ ISCC = ...@@ -842,18 +842,17 @@ ISCC =
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# DocBook XML stuff # DocBook XML stuff
BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@ BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@ BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@ BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
DBLATEX = @DblatexCmd@ DBLATEX = @DblatexCmd@
XSLTPROC = @XsltprocCmd@ XSLTPROC = @XsltprocCmd@
XMLLINT = @XmllintCmd@ XMLLINT = @XmllintCmd@
HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
DIR_DOCBOOK_XSL = @DIR_DOCBOOK_XSL@ XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \ --stringparam section.autolabel 1 \
--stringparam section.autolabel 1 \ --stringparam section.label.includes.component.label 1
--stringparam section.label.includes.component.label 1
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# FPtools support software # FPtools support software
......
...@@ -34,8 +34,10 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES) ...@@ -34,8 +34,10 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
"$$(XSLTPROC)" --stringparam base.dir $$(dir $$@) \ "$$(XSLTPROC)" --stringparam base.dir $$(dir $$@) \
--stringparam use.id.as.filename 1 \ --stringparam use.id.as.filename 1 \
--stringparam html.stylesheet fptools.css \ --stringparam html.stylesheet fptools.css \
--nonet \
$$(XSLTPROC_LABEL_OPTS) $$(XSLTPROC_OPTS) \ $$(XSLTPROC_LABEL_OPTS) $$(XSLTPROC_OPTS) \
$$(DIR_DOCBOOK_XSL)/html/chunk.xsl $1/$2.xml $$(XSLTPROC_HTML_STYLESHEET) \
$1/$2.xml
cp mk/fptools.css $$(dir $$@) cp mk/fptools.css $$(dir $$@)
else else
html_$1 : html_$1 :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment