~vcs-imports/gnash/trunk

« back to all changes in this revision

Viewing changes to macros/docbook.m4

  • Committer: rsavoye
  • Date: 2008-02-22 08:33:58 UTC
  • Revision ID: vcs-imports@canonical.com-20080222083358-u31ydaspvjpshaoq
        * macros/docbook.m4: Don't use the POSIX shell wrappers for the
        Docbook2X utilities, only use the perl versions. If we can't find
        usable wrappers, then drop back to using the lower level tools
        like we used to.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl  
2
 
dnl    Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
2
dnl    Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
3
3
dnl  
4
4
dnl  This program is free software; you can redistribute it and/or modify
5
5
dnl  it under the terms of the GNU General Public License as published by
100
100
          [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
101
101
    fi
102
102
 
103
 
    dnl Find the programs we need to convert docbook into Texi for making
104
 
    dnl info pages. The first catagory are the wrapper utilities included
105
 
    dnl in most docbook2x packages.
 
103
    dnl Find the programs we need to convert docbook into Texi for
 
104
    dnl making info pages. The first catagory are the wrapper
 
105
    dnl utilities included in most docbook2x packages.
 
106
    dnl It turns out there are two sets of wrapper functions, the good
 
107
    dnl ones from the newer DocBook2X tools are written in perl, and
 
108
    dnl actually work correctly. There are other versions of the same
 
109
    dnl tools ,but they are merely a 1 line wrapper for the OpenJade
 
110
    dnl tools. These versions have big problems, namely they don't
 
111
    dnl support the encoding of entities, so we get massive warnings
 
112
    dnl about entities in included files we never heard about.
106
113
    scripts="db2x_docbook2texi docbook2texi docbook2texi.pl"
107
114
    for i in $scripts; do
108
115
      AC_PATH_PROG(DB2X_TEXI, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
109
116
      if test x$DB2X_TEXI != x; then
110
 
        break
111
 
      fi
112
 
    done
113
 
 
114
 
    dnl These look for the sepearte utilities used by the wrapper scripts. If we don't find
115
 
    dnl the wrappers, then we use the lower level utilities directly.
116
 
    if test x$DB2X_TEXI = x; then
117
 
      scripts="db2x_texixml db2x_texixml.pl"
118
 
      for i in $scripts; do
119
 
        AC_PATH_PROG(DB2X_TEXIXML, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
120
 
        if test x$DB2X_TEXIXML != x; then
 
117
        type="`file $DB2X_TEXI  | grep -ic " perl " 2>&1`"
 
118
        if test $type -gt 0; then
121
119
          break
 
120
        else
 
121
          DB2X_TEXI=
122
122
        fi
123
 
      done
124
 
    fi
 
123
      fi
 
124
    done
 
125
 
 
126
    dnl These look for the seperate utilities used by the wrapper
 
127
    dnl scripts. If we don't find the wrappers, then we use the lower
 
128
    dnl level utilities directly. 
 
129
 
 
130
    scripts="db2x_texixml db2x_texixml.pl"
 
131
    for i in $scripts; do
 
132
      AC_PATH_PROG(DB2X_TEXIXML, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
 
133
      if test x$DB2X_TEXIXML != x; then
 
134
        break
 
135
      fi
 
136
    done
125
137
 
126
138
    dnl Find the programs we need to convert docbook into man pages.
127
139
    scripts="db2x_docbook2man docbook2man docbook2man.pl"
128
140
    for i in $scripts; do
129
141
      AC_PATH_PROG(DB2X_MAN, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
130
 
      if test x$DB2X_MAN != x; then
131
 
        break
132
 
      fi
133
 
    done
134
 
 
135
 
    if test x$DB2X_MANXML != x; then
136
 
      scripts="db2x_manxml db2x_manxml.pl"
137
 
      for i in $scripts; do
138
 
        AC_PATH_PROG(DB2X_MANXML, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
139
 
        if test x$DB2X_MANXML != x; then
 
142
      if test x$DB2X_MAN != x; then 
 
143
        type="`file $DB2X_MAN  | grep -ic " perl " 2>&1`"
 
144
        if test $type -gt 0; then
140
145
          break
 
146
        else
 
147
          DB2X_MAN=
141
148
        fi
142
 
      done
143
 
    fi
 
149
      fi
 
150
    done
 
151
 
 
152
# file /usr/bin/db2x_docbook2man
 
153
# /usr/bin/db2x_docbook2man: perl script text executable
 
154
# /usr/bin/db2x_docbook2man
 
155
#/usr/bin/db2x_xsltproc: you must specify exactly one source document
 
156
# Unable to recognise encoding of this document at /usr/lib/perl5/site_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 100.
 
157
# Document requires an element [Ln: 1, Col: 0]
 
158
 
 
159
# file /usr/bin/docbook2man
 
160
# /usr/bin/docbook2man: POSIX shell script text executable
 
161
 
 
162
    scripts="db2x_manxml db2x_manxml.pl"
 
163
    for i in $scripts; do
 
164
      AC_PATH_PROG(DB2X_MANXML, $i, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
 
165
      if test x$DB2X_MANXML != x; then
 
166
        break
 
167
      fi
 
168
    done
144
169
 
145
170
    AC_PATH_PROG(MAKEINFO, makeinfo, [], [$PATH:/usr/bin:/usr/bin/X11:/usr/local/X11/bin])
146
171