[MPlayer-cvslog] r34289 - in trunk: DOCS/xml/configure configure

diego subversion at mplayerhq.hu
Thu Nov 3 15:23:15 CET 2011


Author: diego
Date: Thu Nov  3 15:23:14 2011
New Revision: 34289

Log:
configure: merge DOCS/xml/configure into top-level configure

Modified:
   trunk/configure

Changes in other areas also in this revision:
Deleted:
   trunk/DOCS/xml/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure	Thu Nov  3 14:24:53 2011	(r34288)
+++ trunk/configure	Thu Nov  3 15:23:14 2011	(r34289)
@@ -7769,6 +7769,179 @@ echores "$_dvdnav"
 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
 # Read dvdnav comment above.
 
+
+# XML documentation tests
+echocheck "XML catalogs"
+for try_catalog in \
+  /etc/sgml/catalog \
+  /usr/share/xml/docbook/*/catalog.xml \
+  /opt/local/share/xml/docbook-xml/*/catalog.xml \
+  /opt/local/share/xml/docbook/*/catalog.xml \
+  /usr/share/sgml/docbook/*/*catalog \
+  /usr/share/apps/ksgmltools2/customization/en/catalog \
+  /usr/share/sgml/catalog \
+  /usr/local/share/sgml/catalog \
+  /usr/lib/sgml/catalog \
+  /usr/local/lib/sgml/catalog \
+  /usr/share/docbook-xml42/catalog.xml \
+  /usr/share/sgml/docbook/xmlcatalog; do
+  if test -f "$try_catalog"; then
+    catalog=$try_catalog
+    break
+  fi
+done
+
+if test -n "$catalog"; then
+  echores "SGML catalog"
+  catalog_opts=--catalogs
+else
+  echores "No SGML catalog found."
+fi
+
+echocheck "XML chunked stylesheet"
+for try_chunk_xsl in \
+  /usr/share/xml/docbook/*/html/chunk.xsl \
+  /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
+  /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
+  /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
+  /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
+  /usr/share/docbook-xsl/html/chunk.xsl \
+  /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \
+  /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \
+  /opt/local/share/xsl/docbook-xsl/html/chunk.xsl; do
+  if test -f "$try_chunk_xsl"; then
+    chunk_xsl=$try_chunk_xsl
+    break
+  fi
+done
+
+if test -z "$chunk_xsl"; then
+  chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
+  echores "not found, using default"
+  fake_chunk_xsl=yes
+else
+  echores "chunk.xsl"
+fi
+
+echocheck "XML monolithic stylesheet"
+for try_docbook_xsl in \
+  /usr/share/xml/docbook/*/html/docbook.xsl \
+  /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
+  /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
+  /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
+  /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
+  /usr/share/docbook-xsl/html/docbook.xsl \
+  /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \
+  /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \
+  /opt/local/share/xsl/docbook-xsl/html/docbook.xsl; do
+  if test -f "$try_docbook_xsl"; then
+    docbook_xsl=$try_docbook_xsl
+    break
+  fi
+done
+
+if test -z "$docbook_xsl"; then
+  docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl
+  echores "not found, using default"
+else
+  echores "docbook.xsl"
+fi
+
+cat > DOCS/xml/html-chunk.xsl << EOF
+<?xml version="1.0" encoding="utf-8"?>
+<!-- **************************************************
+     This file is generated automatically. DO NOT EDIT.
+     ************************************************** -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:import href="$chunk_xsl"/>
+  <xsl:include href="html-common.xsl"/>
+
+</xsl:stylesheet>
+EOF
+
+cat > DOCS/xml/html-single.xsl << EOF
+<?xml version="1.0" encoding="utf-8"?>
+<!-- **************************************************
+     This file is generated automatically. DO NOT EDIT.
+     ************************************************** -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:import href="$docbook_xsl"/>
+  <xsl:include href="html-common.xsl"/>
+
+</xsl:stylesheet>
+EOF
+
+echocheck "XML DTD"
+#FIXME: This should prefer higher version numbers, not the other way around ..
+for try_dtd in \
+  /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
+  /usr/share/xml/docbook/*/docbookx.dtd \
+  /usr/share/sgml/docbook/*/docbookx.dtd \
+  /usr/share/sgml/docbook/dtd/*/docbookx.dtd \
+  /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \
+  /usr/share/docbook-xml*/docbookx.dtd \
+  /opt/local/share/xml/docbook*/*/docbookx.dtd \
+  /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd; do
+  if test -f "$try_dtd"; then
+    dtd=$try_dtd
+    break
+  fi
+done
+
+if test -z "$dtd"; then
+  dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd
+  echores "not found, using default"
+else
+  echores "docbookx.dtd"
+fi
+
+for lang in $language_doc; do
+  cat > DOCS/xml/$lang/main.xml << EOF
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!-- **************************************************
+     This file is generated automatically. DO NOT EDIT.
+     ************************************************** -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "$dtd"
+[
+EOF
+
+  for file in $(find DOCS/xml/en -name \*.xml -exec basename \{\} \;); do
+    echo '<!ENTITY '$file' SYSTEM "'$file'">' >> DOCS/xml/$lang/main.xml
+  done
+
+  cat >> DOCS/xml/$lang/main.xml << EOF
+]>
+<book id="index" lang="$lang">
+&documentation.xml;
+</book>
+EOF
+
+done
+
+echocheck "valid XSLT processor"
+if xsltproc --version > /dev/null 2>&1; then
+  if test -z "$fake_chunk_xsl"; then
+    echores "xsltproc"
+    xsltcommand="xsltproc $catalog_opts -o \$\$1 \$\$2 \$\$3"
+  else
+    echores "Found xsltproc but no stylesheets on your system."
+    echores "xsltproc is unusable without stylesheets."
+  fi
+fi
+
+cat > DOCS/xml/xml.mak << EOF
+CATALOG = $catalog
+XMLLINT_COMMAND = xmllint --noout --noent --postvalid $catalog_opts \$*
+XSLT_COMMAND = $xsltcommand
+EOF
+
+#############################################################################
+
 mak_enable () {
 list=$(echo $1 | tr '[a-z]' '[A-Z]')
 item=$(echo $2 | tr '[a-z]' '[A-Z]')


More information about the MPlayer-cvslog mailing list