Remove generated files
[framework/connectivity/libgphoto2.git] / libgphoto2_port / m4 / gp-manual-docbook-xml.m4
1 dnl ------------------------------------------------------------------------
2 dnl try to find xmlto (required for generation of man pages and html docs)
3 dnl ------------------------------------------------------------------------
4 AC_DEFUN([GP_CHECK_DOCBOOK_XML],
5 [
6
7 AC_MSG_CHECKING([for XML catalogs])
8 XML_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`"
9 if test "x$XML_CATALOG_FILES" = "x"
10 then
11         AC_MSG_RESULT([none found.])
12 else
13         AC_MSG_RESULT([found ${XML_CATALOG_FILES}])
14 fi
15 AC_SUBST(XML_CATALOG_FILES)
16
17 #XML_DEBUG_CATALOG=0
18 #AC_SUBST(XML_DEBUG_CATALOG)
19
20 manual_msg="no (http://cyberelk.net/tim/xmlto/)"
21 try_xmlto=true
22 have_xmlto=false
23 AC_ARG_WITH(xmlto, [  --without-xmlto           Don't use xmlto],[
24         if test x$withval = xno; then
25                 try_xmlto=false
26         fi])
27 if $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
43 fi
44
45 AM_CONDITIONAL(XMLTO, $have_xmlto)
46 ])