Support XML_CATALOG_FILES
authorРуслан Ижбулатов <lrn1986@gmail.com>
Fri, 17 Aug 2012 04:38:35 +0000 (08:38 +0400)
committerStefan Sauer <ensonic@users.sf.net>
Tue, 9 Apr 2013 18:56:23 +0000 (20:56 +0200)
Fixes #682077

m4/as-docbook.m4

index 8a1b32a..2e27050 100644 (file)
@@ -14,7 +14,19 @@ AC_DEFUN([AS_DOCBOOK],
   TYPE_UC=XML
   DOCBOOK_VERSION=4.1.2
 
-  if test ! -f /etc/xml/catalog; then
+  if test -n "$XML_CATALOG_FILES"; then
+    oldIFS=$IFS
+    IFS=' '
+    for xml_catalog_file in $XML_CATALOG_FILES; do
+      if test -f $xml_catalog_file; then
+        XML_CATALOG=$xml_catalog_file
+        CAT_ENTRY_START='<!--'
+        CAT_ENTRY_END='-->'
+        break
+      fi
+    done
+    IFS=$oldIFS
+  elif test ! -f /etc/xml/catalog; then
     for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/ /usr/local/share/xsl/docbook ;
     do
       if test -d "$i"; then