AC_DEFUN(AX_CHECK_DOCBOOK, [ # It's just rude to go over the net to build XSLTPROC_FLAGS=--nonet DOCBOOK_ROOT= for i in /usr/share/xml/docbook/stylesheet/docbook-xsl-ns /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/; do if test -d "$i"; then DOCBOOK_ROOT=$i break fi done if test ! -f /etc/xml/catalog; then # Last resort - try net if test -z "$DOCBOOK_ROOT"; then XSLTPROC_FLAGS= fi else XML_CATALOG=/etc/xml/catalog CAT_ENTRY_START='' fi AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) XSLTPROC_WORKS=no if test -n "$XSLTPROC"; then AC_MSG_CHECKING([whether xsltproc works]) if test -n "$XML_CATALOG"; then DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" else DB_FILE="$DOCBOOK_ROOT/docbook.xsl" fi $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END END if test "$?" = 0; then XSLTPROC_WORKS=yes fi AC_MSG_RESULT($XSLTPROC_WORKS) fi AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes") AC_CHECK_PROG(FOP,fop,fop,) AM_CONDITIONAL(have_fop, test x"${FOP}" == x"fop") AC_SUBST(XML_CATALOG) AC_SUBST(XSLTPROC_FLAGS) AC_SUBST(DOCBOOK_ROOT) AC_SUBST(CAT_ENTRY_START) AC_SUBST(CAT_ENTRY_END) ])