fi
done
+dnl
+dnl Search for other binaries needed to build docs
+dnl
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([PDFXMLTEX], [pdfxmltex])
+AC_PATH_PROG([JW], [jw])
+AC_SUBST(XSLTPROC)
+AC_SUBST(PDFXMLTEX)
+AC_SUBST(JW)
+
+DOC_RULE=requirements_not_met
+if test -n "${XSLBASE}"; then
+ if test -n "${XSLTPROC}"; then
+ DOC_RULE=html/postgis.html
+ else
+ if test -n "${JW}"; then
+ DOC_RULE=jw
+ fi
+ fi
+fi
+AC_SUBST(DOC_RULE)
+
if test $USE_JTS -gt 0; then
dnl AC_MSG_RESULT([ GEOS disabled, using JTS.])
LAST_RELEASE_VERSION = $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_MICRO_VERSION)
-#XSLBASE?=/usr/share/sgml/docbook/xsl-stylesheets
-#XSLBASE = /usr/share/xml/docbook/stylesheet/nwalsh
+all: $(DOC_RULE)
-
-all: html
+requirements_not_met:
+ @echo
+ @echo "Docs building requires 'xsltproc' or 'jw'."
+ @echo "Configuration tool could not find any, either install"
+ @echo "them or refer to online manual:"
+ @echo
+ @echo " http://postgis.refractions.net/docs"
+ @echo
postgis-out.xml: postgis.xml ../Version.config
cat $< | sed "s/@@LAST_RELEASE_VERSION@@/$(LAST_RELEASE_VERSION)/g" > $@
chunked-html: postgis-out.xml
- xsltproc \
+ $(XSLTPROC) \
--output html/ \
--param shade.verbatim 1 \
--param chunk.section.depth 0 \
$<
html/postgis.html: postgis-out.xml
- xsltproc \
+ $(XSLTPROC) \
--output html/postgis.html \
--param shade.verbatim 1 \
--param section.autolabel 1 \
html: html/postgis.html
postgis.fo: postgis-out.xml
- xsltproc \
+ $(XSLTPROC) \
--output $@ \
--param shade.verbatim 1 \
--param section.autolabel 1 \
$<
postgis.pdf: postgis.fo
- pdfxmltex $< > /dev/null ; \
- pdfxmltex $< > /dev/null
+ $(PDFXMLTEX) $< > /dev/null ; \
+ $(PDFXMLTEX) $< > /dev/null
jw: postgis-out.xml
- jw $(COMMONOPTS) -o html/ postgis-out.xml
+ $(JW) $(COMMONOPTS) -o html/ postgis-out.xml
clean:
@rm -f \