Bug in the detection of docbook
[scilab.git] / scilab / m4 / docbook.m4
1 dnl DOCBOOK detection
2 dnl
3 dnl Sylvestre Ledru <sylvestre.ledru@inria.fr>
4 dnl INRIA - Scilab 2008
5 dnl ------------------------------------------------------
6 dnl Check if Docbook is usable and working
7 dnl
8 AC_DEFUN([AC_DOCBOOK], [
9
10 DOCBOOK_OK=no
11 DOCBOOK_ROOT=
12
13 AC_ARG_WITH(docbook,
14                 AC_HELP_STRING([--with-docbook=DIR],[Set the path to the docbook package]),
15                 [with_docbook=$withval],
16                 [with_docbook='yes']
17                 )
18
19         for dir in $with_docbook /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/docbook2X/xslt/man/ /usr/share/xml/docbook/stylesheet/nwalsh/ /sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/xsl-stylesheets-*/ /usr/share/sgml/docbook/xsl-stylesheets--*/ /usr/share/sgml/docbook/xsl-stylesheets-*/; do
20                 if test -d "$dir"; then
21                         DOCBOOK_ROOT=$dir
22         fi
23         done
24         if test -z "$DOCBOOK_ROOT"; then
25                 AC_MSG_ERROR([Could not find the Docbook root directory. If you have installed it on your system and we haven't been able to find it. Please report a bug])
26         fi
27         # xml.apache.org SVG Library
28         AC_JAVA_CHECK_PACKAGE([batik],[org.apache.batik.parser.Parser],[Apache SVG Library])
29         BATIK=$PACKAGE_JAR_FILE
30         AC_SUBST(BATIK)
31
32         # Saxon XSLT Processor
33         AC_JAVA_CHECK_PACKAGE([saxon],[com.icl.saxon.Loader],[Saxon XSLT Processor])
34         SAXON=$PACKAGE_JAR_FILE
35         AC_SUBST(SAXON)
36
37         # XML to PDF/other Translator
38         AC_JAVA_CHECK_PACKAGE([fop],[org.apache.fop.pdf.PDFInfo],[XML to PDF Translator (fop)])
39         FOP=$PACKAGE_JAR_FILE
40         AC_SUBST(FOP)
41
42         # MathML rendering solution
43         AC_JAVA_CHECK_PACKAGE([jeuclid-core],[net.sourceforge.jeuclid.MathBase],[MathML rendering solution])
44         JEUCLID_CORE=$PACKAGE_JAR_FILE
45         AC_SUBST(JEUCLID_CORE)
46
47         # Commons I/O library
48         AC_JAVA_CHECK_PACKAGE([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library])
49         COMMONS_IO=$PACKAGE_JAR_FILE
50         AC_SUBST(COMMONS_IO)
51
52
53 AC_SUBST(DOCBOOK_ROOT)
54
55 ])