]> granicus.if.org Git - neomutt/commitdiff
Alternative way to check for DocBook DTD
authorPietro Cerutti <gahr@gahr.ch>
Thu, 8 Feb 2018 12:04:20 +0000 (12:04 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 10 Feb 2018 00:14:27 +0000 (00:14 +0000)
auto.def

index 1b9344240211eb3fce1664676a5f0ac8c03f9d4d..10948935559a3de7a6d50c7b7441e7d014611cac 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -324,20 +324,8 @@ if {[get-define want-doc]} {
   }
 
   msg-checking "Checking for DocBook DTDs..."
-
-  writefile xslt_test.xsl {<?xml version="1.0"?>
-    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-      <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
-    </xsl:stylesheet>}
-
-  writefile xslt_test.xml {<?xml version="1.0" standalone="no"?>
-    <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-    <book />}
-
-  set err [catch {exec xsltproc --nonet xslt_test.xsl xslt_test.xml}]
-  file delete -- xslt_test.xsl xslt_test.xml
-  if {$err} {
+  set res [exec xmlcatalog --shell << {public "-//OASIS//DTD DocBook XML V4.2//EN"}]
+  if {[string match {> No entry*} $res]} {
     msg-result "no"
     user-error "Install DocBook DTDs or './configure --disable-doc'"
   }