The R Project SVN R

Rev

Rev 26214 | Rev 37959 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26214 Rev 33038
Line 1... Line 1...
1
#! /bin/sh
1
#! /bin/sh
2
# Common stub for a few missing GNU programs while installing.
2
# Common stub for a few missing GNU programs while installing.
3
 
3
 
4
scriptversion=2003-09-02.23
4
scriptversion=2004-09-07.08
5
 
5
 
6
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
6
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
7
#   Free Software Foundation, Inc.
7
#   Free Software Foundation, Inc.
8
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
 
9
 
10
# This program is free software; you can redistribute it and/or modify
10
# This program is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
11
# it under the terms of the GNU General Public License as published by
Line 58... Line 58...
58
  if test $? = 63; then
58
  if test $? = 63; then
59
    run=:
59
    run=:
60
    msg="probably too old"
60
    msg="probably too old"
61
  fi
61
  fi
62
  ;;
62
  ;;
63
esac
-
 
64
 
-
 
65
# If it does not exist, or fails to run (possibly an outdated version),
-
 
66
# try to emulate it.
-
 
67
case "$1" in
-
 
68
 
63
 
69
  -h|--h|--he|--hel|--help)
64
  -h|--h|--he|--hel|--help)
70
    echo "\
65
    echo "\
71
$0 [OPTION]... PROGRAM [ARGUMENT]...
66
$0 [OPTION]... PROGRAM [ARGUMENT]...
72
 
67
 
Line 90... Line 85...
90
  makeinfo     touch the output file
85
  makeinfo     touch the output file
91
  tar          try tar, gnutar, gtar, then tar without non-portable flags
86
  tar          try tar, gnutar, gtar, then tar without non-portable flags
92
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
87
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
93
 
88
 
94
Send bug reports to <bug-automake@gnu.org>."
89
Send bug reports to <bug-automake@gnu.org>."
-
 
90
    exit 0
95
    ;;
91
    ;;
96
 
92
 
97
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
93
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
98
    echo "missing $scriptversion (GNU Automake)"
94
    echo "missing $scriptversion (GNU Automake)"
-
 
95
    exit 0
99
    ;;
96
    ;;
100
 
97
 
101
  -*)
98
  -*)
102
    echo 1>&2 "$0: Unknown \`$1' option"
99
    echo 1>&2 "$0: Unknown \`$1' option"
103
    echo 1>&2 "Try \`$0 --help' for more information"
100
    echo 1>&2 "Try \`$0 --help' for more information"
104
    exit 1
101
    exit 1
105
    ;;
102
    ;;
106
 
103
 
-
 
104
esac
-
 
105
 
-
 
106
# Now exit if we have it, but it failed.  Also exit now if we
-
 
107
# don't have it and --version was passed (most likely to detect
-
 
108
# the program).
-
 
109
case "$1" in
107
  aclocal*)
110
  lex|yacc)
-
 
111
    # Not GNU programs, they don't have --version.
-
 
112
    ;;
-
 
113
 
-
 
114
  tar)
-
 
115
    if test -n "$run"; then
-
 
116
       echo 1>&2 "ERROR: \`tar' requires --run"
-
 
117
       exit 1
-
 
118
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-
 
119
       exit 1
-
 
120
    fi
-
 
121
    ;;
-
 
122
 
-
 
123
  *)
108
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
124
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
109
       # We have it, but it failed.
125
       # We have it, but it failed.
110
       exit 1
126
       exit 1
-
 
127
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-
 
128
       # Could not run --version or --help.  This is probably someone
-
 
129
       # running `$TOOL --version' or `$TOOL --help' to check whether
-
 
130
       # $TOOL exists and not knowing $TOOL uses missing.
-
 
131
       exit 1
111
    fi
132
    fi
-
 
133
    ;;
-
 
134
esac
112
 
135
 
-
 
136
# If it does not exist, or fails to run (possibly an outdated version),
-
 
137
# try to emulate it.
-
 
138
case "$1" in
-
 
139
  aclocal*)
113
    echo 1>&2 "\
140
    echo 1>&2 "\
114
WARNING: \`$1' is $msg.  You should only need it if
141
WARNING: \`$1' is $msg.  You should only need it if
115
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
142
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
116
         to install the \`Automake' and \`Perl' packages.  Grab them from
143
         to install the \`Automake' and \`Perl' packages.  Grab them from
117
         any GNU archive site."
144
         any GNU archive site."
118
    touch aclocal.m4
145
    touch aclocal.m4
119
    ;;
146
    ;;
120
 
147
 
121
  autoconf)
148
  autoconf)
122
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-
 
123
       # We have it, but it failed.
-
 
124
       exit 1
-
 
125
    fi
-
 
126
 
-
 
127
    echo 1>&2 "\
149
    echo 1>&2 "\
128
WARNING: \`$1' is $msg.  You should only need it if
150
WARNING: \`$1' is $msg.  You should only need it if
129
         you modified \`${configure_ac}'.  You might want to install the
151
         you modified \`${configure_ac}'.  You might want to install the
130
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
152
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
131
         archive site."
153
         archive site."
132
    touch configure
154
    touch configure
133
    ;;
155
    ;;
134
 
156
 
135
  autoheader)
157
  autoheader)
136
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-
 
137
       # We have it, but it failed.
-
 
138
       exit 1
-
 
139
    fi
-
 
140
 
-
 
141
    echo 1>&2 "\
158
    echo 1>&2 "\
142
WARNING: \`$1' is $msg.  You should only need it if
159
WARNING: \`$1' is $msg.  You should only need it if
143
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
160
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
144
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
161
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
145
         from any GNU archive site."
162
         from any GNU archive site."
Line 155... Line 172...
155
    done
172
    done
156
    touch $touch_files
173
    touch $touch_files
157
    ;;
174
    ;;
158
 
175
 
159
  automake*)
176
  automake*)
160
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-
 
161
       # We have it, but it failed.
-
 
162
       exit 1
-
 
163
    fi
-
 
164
 
-
 
165
    echo 1>&2 "\
177
    echo 1>&2 "\
166
WARNING: \`$1' is $msg.  You should only need it if
178
WARNING: \`$1' is $msg.  You should only need it if
167
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
179
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
168
         You might want to install the \`Automake' and \`Perl' packages.
180
         You might want to install the \`Automake' and \`Perl' packages.
169
         Grab them from any GNU archive site."
181
         Grab them from any GNU archive site."
Line 171... Line 183...
171
	   sed 's/\.am$/.in/' |
183
	   sed 's/\.am$/.in/' |
172
	   while read f; do touch "$f"; done
184
	   while read f; do touch "$f"; done
173
    ;;
185
    ;;
174
 
186
 
175
  autom4te)
187
  autom4te)
176
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-
 
177
       # We have it, but it failed.
-
 
178
       exit 1
-
 
179
    fi
-
 
180
 
-
 
181
    echo 1>&2 "\
188
    echo 1>&2 "\
182
WARNING: \`$1' is needed, but is $msg.
189
WARNING: \`$1' is needed, but is $msg.
183
         You might have modified some files without having the
190
         You might have modified some files without having the
184
         proper tools for further handling them.
191
         proper tools for further handling them.
185
         You can get \`$1' as part of \`Autoconf' from any GNU
192
         You can get \`$1' as part of \`Autoconf' from any GNU
Line 252... Line 259...
252
	echo 'main() { return 0; }' >lex.yy.c
259
	echo 'main() { return 0; }' >lex.yy.c
253
    fi
260
    fi
254
    ;;
261
    ;;
255
 
262
 
256
  help2man)
263
  help2man)
257
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-
 
258
       # We have it, but it failed.
-
 
259
       exit 1
-
 
260
    fi
-
 
261
 
-
 
262
    echo 1>&2 "\
264
    echo 1>&2 "\
263
WARNING: \`$1' is $msg.  You should only need it if
265
WARNING: \`$1' is $msg.  You should only need it if
264
	 you modified a dependency of a manual page.  You may need the
266
	 you modified a dependency of a manual page.  You may need the
265
	 \`Help2man' package in order for those modifications to take
267
	 \`Help2man' package in order for those modifications to take
266
	 effect.  You can get \`Help2man' from any GNU archive site."
268
	 effect.  You can get \`Help2man' from any GNU archive site."
Line 277... Line 279...
277
	exit 1
279
	exit 1
278
    fi
280
    fi
279
    ;;
281
    ;;
280
 
282
 
281
  makeinfo)
283
  makeinfo)
282
    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-
 
283
       # We have makeinfo, but it failed.
-
 
284
       exit 1
-
 
285
    fi
-
 
286
 
-
 
287
    echo 1>&2 "\
284
    echo 1>&2 "\
288
WARNING: \`$1' is $msg.  You should only need it if
285
WARNING: \`$1' is $msg.  You should only need it if
289
         you modified a \`.texi' or \`.texinfo' file, or any other file
286
         you modified a \`.texi' or \`.texinfo' file, or any other file
290
         indirectly affecting the aspect of the manual.  The spurious
287
         indirectly affecting the aspect of the manual.  The spurious
291
         call might also be the consequence of using a buggy \`make' (AIX,
288
         call might also be the consequence of using a buggy \`make' (AIX,
Line 299... Line 296...
299
    touch $file
296
    touch $file
300
    ;;
297
    ;;
301
 
298
 
302
  tar)
299
  tar)
303
    shift
300
    shift
304
    if test -n "$run"; then
-
 
305
      echo 1>&2 "ERROR: \`tar' requires --run"
-
 
306
      exit 1
-
 
307
    fi
-
 
308
 
301
 
309
    # We have already tried tar in the generic part.
302
    # We have already tried tar in the generic part.
310
    # Look for gnutar/gtar before invocation to avoid ugly error
303
    # Look for gnutar/gtar before invocation to avoid ugly error
311
    # messages.
304
    # messages.
312
    if (gnutar --version > /dev/null 2>&1); then
305
    if (gnutar --version > /dev/null 2>&1); then