~ubuntu-branches/ubuntu/feisty/libgnome/feisty

« back to all changes in this revision

Viewing changes to missing

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-01-09 10:07:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20070109100749-uc3lve73086th31g
Tags: 2.17.2-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Common stub for a few missing GNU programs while installing.
3
3
 
4
 
scriptversion=2006-05-10.23
 
4
scriptversion=2005-06-08.21
5
5
 
6
 
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
 
6
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
7
7
#   Free Software Foundation, Inc.
8
8
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
9
 
33
33
fi
34
34
 
35
35
run=:
36
 
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
37
 
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
38
36
 
39
37
# In the cases where this matters, `missing' is being run in the
40
38
# srcdir already.
46
44
 
47
45
msg="missing on your system"
48
46
 
49
 
case $1 in
 
47
case "$1" in
50
48
--run)
51
49
  # Try to run requested program, and just exit if it succeeds.
52
50
  run=
79
77
  aclocal      touch file \`aclocal.m4'
80
78
  autoconf     touch file \`configure'
81
79
  autoheader   touch file \`config.h.in'
82
 
  autom4te     touch the output file, or create a stub one
83
80
  automake     touch all \`Makefile.in' files
84
81
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
85
82
  flex         create \`lex.yy.c', if possible, from existing .c
109
106
# Now exit if we have it, but it failed.  Also exit now if we
110
107
# don't have it and --version was passed (most likely to detect
111
108
# the program).
112
 
case $1 in
 
109
case "$1" in
113
110
  lex|yacc)
114
111
    # Not GNU programs, they don't have --version.
115
112
    ;;
138
135
 
139
136
# If it does not exist, or fails to run (possibly an outdated version),
140
137
# try to emulate it.
141
 
case $1 in
 
138
case "$1" in
142
139
  aclocal*)
143
140
    echo 1>&2 "\
144
141
WARNING: \`$1' is $msg.  You should only need it if
167
164
    test -z "$files" && files="config.h"
168
165
    touch_files=
169
166
    for f in $files; do
170
 
      case $f in
 
167
      case "$f" in
171
168
      *:*) touch_files="$touch_files "`echo "$f" |
172
169
                                       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
173
170
      *) touch_files="$touch_files $f.in";;
195
192
         You can get \`$1' as part of \`Autoconf' from any GNU
196
193
         archive site."
197
194
 
198
 
    file=`echo "$*" | sed -n "$sed_output"`
199
 
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
 
195
    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
 
196
    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
200
197
    if test -f "$file"; then
201
198
        touch $file
202
199
    else
217
214
         in order for those modifications to take effect.  You can get
218
215
         \`Bison' from any GNU archive site."
219
216
    rm -f y.tab.c y.tab.h
220
 
    if test $# -ne 1; then
 
217
    if [ $# -ne 1 ]; then
221
218
        eval LASTARG="\${$#}"
222
 
        case $LASTARG in
 
219
        case "$LASTARG" in
223
220
        *.y)
224
221
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
225
 
            if test -f "$SRCFILE"; then
 
222
            if [ -f "$SRCFILE" ]; then
226
223
                 cp "$SRCFILE" y.tab.c
227
224
            fi
228
225
            SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
229
 
            if test -f "$SRCFILE"; then
 
226
            if [ -f "$SRCFILE" ]; then
230
227
                 cp "$SRCFILE" y.tab.h
231
228
            fi
232
229
          ;;
233
230
        esac
234
231
    fi
235
 
    if test ! -f y.tab.h; then
 
232
    if [ ! -f y.tab.h ]; then
236
233
        echo >y.tab.h
237
234
    fi
238
 
    if test ! -f y.tab.c; then
 
235
    if [ ! -f y.tab.c ]; then
239
236
        echo 'main() { return 0; }' >y.tab.c
240
237
    fi
241
238
    ;;
247
244
         in order for those modifications to take effect.  You can get
248
245
         \`Flex' from any GNU archive site."
249
246
    rm -f lex.yy.c
250
 
    if test $# -ne 1; then
 
247
    if [ $# -ne 1 ]; then
251
248
        eval LASTARG="\${$#}"
252
 
        case $LASTARG in
 
249
        case "$LASTARG" in
253
250
        *.l)
254
251
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
255
 
            if test -f "$SRCFILE"; then
 
252
            if [ -f "$SRCFILE" ]; then
256
253
                 cp "$SRCFILE" lex.yy.c
257
254
            fi
258
255
          ;;
259
256
        esac
260
257
    fi
261
 
    if test ! -f lex.yy.c; then
 
258
    if [ ! -f lex.yy.c ]; then
262
259
        echo 'main() { return 0; }' >lex.yy.c
263
260
    fi
264
261
    ;;
270
267
         \`Help2man' package in order for those modifications to take
271
268
         effect.  You can get \`Help2man' from any GNU archive site."
272
269
 
273
 
    file=`echo "$*" | sed -n "$sed_output"`
274
 
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
275
 
    if test -f "$file"; then
 
270
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
 
271
    if test -z "$file"; then
 
272
        file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
 
273
    fi
 
274
    if [ -f "$file" ]; then
276
275
        touch $file
277
276
    else
278
277
        test -z "$file" || exec >$file
290
289
         DU, IRIX).  You might want to install the \`Texinfo' package or
291
290
         the \`GNU make' package.  Grab either from any GNU archive site."
292
291
    # The file to touch is that specified with -o ...
293
 
    file=`echo "$*" | sed -n "$sed_output"`
294
 
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
 
292
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
295
293
    if test -z "$file"; then
296
294
      # ... or it is the one specified with @setfilename ...
297
295
      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
298
 
      file=`sed -n '
299
 
        /^@setfilename/{
300
 
          s/.* \([^ ]*\) *$/\1/
301
 
          p
302
 
          q
303
 
        }' $infile`
 
296
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
304
297
      # ... or it is derived from the source name (dir/f.texi becomes f.info)
305
298
      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
306
299
    fi
324
317
    fi
325
318
    firstarg="$1"
326
319
    if shift; then
327
 
        case $firstarg in
 
320
        case "$firstarg" in
328
321
        *o*)
329
322
            firstarg=`echo "$firstarg" | sed s/o//`
330
323
            tar "$firstarg" "$@" && exit 0
331
324
            ;;
332
325
        esac
333
 
        case $firstarg in
 
326
        case "$firstarg" in
334
327
        *h*)
335
328
            firstarg=`echo "$firstarg" | sed s/h//`
336
329
            tar "$firstarg" "$@" && exit 0