summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-06-02 13:49:43 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-06-02 13:49:43 +0000
commitcfe2fd2a36f43c1f998bb5e7c0cec15480ed3f96 (patch)
tree20808b4bef6320497def03be470b2b16095b0f9a
parent467f1aa698446b99d365122a2a30d1618f2bec74 (diff)
downloadhaskell-cfe2fd2a36f43c1f998bb5e7c0cec15480ed3f96.tar.gz
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)
-rw-r--r--aclocal.m427
-rw-r--r--configure.ac5
-rw-r--r--mk/config.mk.in23
-rw-r--r--rules/docbook.mk4
4 files changed, 28 insertions, 31 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 35ddbdb3cc..d614effe9c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -793,33 +793,30 @@ fi
])# 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
-# 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.
-AC_DEFUN([FP_DIR_DOCBOOK_XSL],
+AC_DEFUN([FP_DOCBOOK_XSL],
[AC_REQUIRE([FP_PROG_XSLTPROC])dnl
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_cv_dir_docbook_xsl=no
- for fp_var in $1; do
- if $XsltprocCmd ${fp_var}/html/docbook.xsl conftest.xml > /dev/null 2>&1; then
- fp_cv_dir_docbook_xsl=$fp_var
- break
- fi
- done
+ if $XsltprocCmd --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl conftest.xml > /dev/null 2>&1; then
+ fp_cv_dir_docbook_xsl=yes
+ fi
rm -rf conftest*])
fi
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])
- DIR_DOCBOOK_XSL=
+ HAVE_DOCBOOK_XSL=NO
else
- DIR_DOCBOOK_XSL=$fp_cv_dir_docbook_xsl
+ HAVE_DOCBOOK_XSL=YES
fi
-AC_SUBST([DIR_DOCBOOK_XSL])
-])# FP_DIR_DOCBOOK_XSL
+AC_SUBST([HAVE_DOCBOOK_XSL])
+])# FP_DOCBOOK_XSL
# FP_PROG_XMLLINT
@@ -841,7 +838,7 @@ AC_DEFUN([FP_CHECK_DOCBOOK_DTD],
if test -n "$XmllintCmd"; then
AC_MSG_CHECKING([for DocBook DTD])
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])
else
AC_MSG_RESULT([failed])
diff --git a/configure.ac b/configure.ac
index 6aa6361a49..a6cee7077f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -621,8 +621,7 @@ fi
dnl ** check for DocBook toolchain
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_HSTAGS
@@ -922,7 +921,7 @@ else
fi
AC_SUBST(HavePapi)
-if test "$DIR_DOCBOOK_XSL" = "" ||
+if test "$HAVE_DOCBOOK_XSL" = "" ||
test "$XsltprocCmd" = ""
then
BUILD_DOCBOOK_HTML=NO
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 800c32e82e..1e2bde0dec 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -842,18 +842,17 @@ ISCC =
#-----------------------------------------------------------------------------
# DocBook XML stuff
-BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
-BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
-BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
-DBLATEX = @DblatexCmd@
-XSLTPROC = @XsltprocCmd@
-XMLLINT = @XmllintCmd@
-
-DIR_DOCBOOK_XSL = @DIR_DOCBOOK_XSL@
-
-XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
- --stringparam section.autolabel 1 \
- --stringparam section.label.includes.component.label 1
+BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
+BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
+BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
+DBLATEX = @DblatexCmd@
+XSLTPROC = @XsltprocCmd@
+XMLLINT = @XmllintCmd@
+HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
+XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
+XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
+ --stringparam section.autolabel 1 \
+ --stringparam section.label.includes.component.label 1
#-----------------------------------------------------------------------------
# FPtools support software
diff --git a/rules/docbook.mk b/rules/docbook.mk
index a06aa0f41b..73532b72cc 100644
--- a/rules/docbook.mk
+++ b/rules/docbook.mk
@@ -34,8 +34,10 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
"$$(XSLTPROC)" --stringparam base.dir $$(dir $$@) \
--stringparam use.id.as.filename 1 \
--stringparam html.stylesheet fptools.css \
+ --nonet \
$$(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 $$@)
else
html_$1 :