Mercurial > mplayer.hg
comparison DOCS/xml/configure @ 10912:6ec6b4a91003
Fix chunk.xsl autodetection.
author | lumag |
---|---|
date | Sun, 21 Sep 2003 13:02:27 +0000 |
parents | 373dc373ac4a |
children | ff06dcb06d93 |
comparison
equal
deleted
inserted
replaced
10911:a2b9b13af73f | 10912:6ec6b4a91003 |
---|---|
35 fi | 35 fi |
36 done | 36 done |
37 | 37 |
38 if test -z "$_chunk_xsl" | 38 if test -z "$_chunk_xsl" |
39 then | 39 then |
40 echo "Not found." | |
41 _chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl | 40 _chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl |
41 echo "Not found. Using default ($_chunk_xsl)" | |
42 _fake_chunk_xsl=yes | |
42 else | 43 else |
43 echo "Found chunk.xsl at $_chunk_xsl" | 44 echo "Found chunk.xsl at $_chunk_xsl" |
44 fi | 45 fi |
45 | 46 |
46 cat > html.xsl << EOF | 47 cat > html.xsl << EOF |
64 # Also checks for Jade/OpenJade. | 65 # Also checks for Jade/OpenJade. |
65 #FIXME: Add support for the xalan/xalan2 XSLT processors. | 66 #FIXME: Add support for the xalan/xalan2 XSLT processors. |
66 | 67 |
67 if xsltproc --version &> /dev/null | 68 if xsltproc --version &> /dev/null |
68 then | 69 then |
69 if test -n "$_chunk_xsl" | 70 if test -z "$_fake_chunk_xsl" |
70 then | 71 then |
71 echo "Found xsltproc. If it works, it's probably the best choice." | 72 echo "Found xsltproc. If it works, it's probably the best choice." |
72 if test -n "$_catalog" | 73 if test -n "$_catalog" |
73 then | 74 then |
74 _xsltcommand="xsltproc --catalogs -o \$1 \$2 \$3" | 75 _xsltcommand="xsltproc --catalogs -o \$1 \$2 \$3" |
84 # xsltproc not found. | 85 # xsltproc not found. |
85 # Now try to find a good Java virtual machine. | 86 # Now try to find a good Java virtual machine. |
86 # FIXME: We need more checks for Java virtual machines. | 87 # FIXME: We need more checks for Java virtual machines. |
87 if test -z "$_xsltcommand" | 88 if test -z "$_xsltcommand" |
88 then | 89 then |
90 #FIXME: Add more suitable machines!!! | |
89 for _try_java in java gij-3.3 gij-3.2 gij-3.1 gij-3.0 gij | 91 for _try_java in java gij-3.3 gij-3.2 gij-3.1 gij-3.0 gij |
90 do | 92 do |
91 if $_try_java --version > /dev/null 2>&1 || $_try_java -version > /dev/null 2>&1 | 93 if $_try_java --version > /dev/null 2>&1 || $_try_java -version > /dev/null 2>&1 |
92 then | 94 then |
93 _java=$_try_java | 95 _java=$_try_java |
98 then | 100 then |
99 echo "Java VM not found." | 101 echo "Java VM not found." |
100 else | 102 else |
101 # Try to find the right jar files for classpath. | 103 # Try to find the right jar files for classpath. |
102 # This must not trigger on something like saxon-fop-6.4.4.jar. | 104 # This must not trigger on something like saxon-fop-6.4.4.jar. |
103 for _try_saxon_jar in /usr/share/java/saxon.jar /usr/local/share/java/saxon.jar /usr/share/java/saxon-[0-9]*.jar /usr/local/share/java/saxon-[0-9]*.jar | 105 for _try_saxon_jar in /usr/share/java/saxon-[0-9]*.jar /usr/local/share/java/saxon-[0-9]*.jar /usr/share/java/saxon.jar /usr/local/share/java/saxon.jar |
104 do | 106 do |
105 if test -f "$_try_saxon_jar" | 107 if test -f "$_try_saxon_jar" |
106 then | 108 then |
107 _saxon_jar=$_try_saxon_jar | 109 _saxon_jar=$_try_saxon_jar |
108 #Don't break to find the _latest_ saxon.jar. | 110 #Don't break to find the _latest_ saxon.jar. |
109 fi | 111 fi |
110 done | 112 done |
111 if test -n "$_saxon_jar" | 113 if test -n "$_saxon_jar" |
112 then | 114 then |
113 if test -n "$_chunk_xsl" | 115 if test -z "$_fake_chunk_xsl" |
114 then | 116 then |
115 _xsltcommand="cd \$1 && if test \"\`dirname \$2 | head -c 1\`\" = \".\" ; then $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$_IN_DIR/\$2 ; else $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$2 ;fi" | 117 _xsltcommand="cd \$1 && if test \"\`dirname \$2 | head -c 1\`\" = \".\" ; then $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$_IN_DIR/\$2 ; else $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$2 ;fi" |
116 echo "Found the Saxon XSLT Processor ($_saxon_jar), using Java VM '$_java'." | 118 echo "Found the Saxon XSLT Processor ($_saxon_jar), using Java VM '$_java'." |
117 else | 119 else |
118 echo "Found the Saxon XSLT processor but no stylesheets on your system." | 120 echo "Found the Saxon XSLT processor but no stylesheets on your system." |