1dnl ------------------------------------------------------------------------ 2dnl try to find xmlto (required for generation of man pages and html docs) 3dnl ------------------------------------------------------------------------ 4AC_DEFUN([GP_CHECK_DOCBOOK_XML], 5[ 6 7AC_MSG_CHECKING([for XML catalogs]) 8XML_CATALOG_FILES="`find /etc/xml /usr/share/xml /usr/share/sgml -type f \( -iname 'catalog.xml' -or -iname 'catalog' \) -print 2> /dev/null | while read file; do echo -n "$file "; done`" 9if test "x$XML_CATALOG_FILES" = "x" 10then 11 AC_MSG_RESULT([none found.]) 12else 13 AC_MSG_RESULT([found ${XML_CATALOG_FILES}]) 14fi 15AC_SUBST(XML_CATALOG_FILES) 16 17#XML_DEBUG_CATALOG=0 18#AC_SUBST(XML_DEBUG_CATALOG) 19 20manual_msg="no (http://cyberelk.net/tim/xmlto/)" 21try_xmlto=true 22have_xmlto=false 23AC_ARG_WITH(xmlto, [ --without-xmlto Don't use xmlto],[ 24 if test x$withval = xno; then 25 try_xmlto=false 26 fi]) 27if $try_xmlto; then 28 AC_PATH_PROG(XMLTO,xmlto) 29 if test -n "${XMLTO}"; then 30 have_xmlto=true 31 manual_msg="yes" 32 PURE_XMLTO="$XMLTO" 33 if true || test "x$XML_CATALOG_FILES" = "x"; then 34 unset XML_CATALOG_FILES 35 XMLTO="${XMLTO} -m \$(top_srcdir)/src/xsl/custom.xsl" 36 else 37 XMLTO="env XML_CATALOG_FILES=\"${XML_CATALOG_FILES}\" ${XMLTO} -m ${top_srcdir}/src/xsl/custom.xsl" 38 fi 39 else 40 # in case anybody runs $(XMLTO) somewhere, we return false 41 XMLTO=false 42 fi 43fi 44 45AM_CONDITIONAL(XMLTO, $have_xmlto) 46]) 47