The R Project SVN R

Rev

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

Rev 25784 Rev 26214
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
 
-
 
4
scriptversion=2003-09-02.23
-
 
5
 
3
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
6
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
-
 
7
#   Free Software Foundation, Inc.
4
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
5
 
9
 
6
# 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
7
# 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
8
# the Free Software Foundation; either version 2, or (at your option)
12
# the Free Software Foundation; either version 2, or (at your option)
Line 36... Line 40...
36
  configure_ac=configure.ac
40
  configure_ac=configure.ac
37
else
41
else
38
  configure_ac=configure.in
42
  configure_ac=configure.in
39
fi
43
fi
40
 
44
 
-
 
45
msg="missing on your system"
-
 
46
 
41
case "$1" in
47
case "$1" in
42
--run)
48
--run)
43
  # Try to run requested program, and just exit if it succeeds.
49
  # Try to run requested program, and just exit if it succeeds.
44
  run=
50
  run=
45
  shift
51
  shift
46
  "$@" && exit 0
52
  "$@" && exit 0
-
 
53
  # Exit code 63 means version mismatch.  This often happens
-
 
54
  # when the user try to use an ancient version of a tool on
-
 
55
  # a file that requires a minimum version.  In this case we
-
 
56
  # we should proceed has if the program had been absent, or
-
 
57
  # if --run hadn't been passed.
-
 
58
  if test $? = 63; then
-
 
59
    run=:
-
 
60
    msg="probably too old"
-
 
61
  fi
47
  ;;
62
  ;;
48
esac
63
esac
49
 
64
 
50
# If it does not exist, or fails to run (possibly an outdated version),
65
# If it does not exist, or fails to run (possibly an outdated version),
51
# try to emulate it.
66
# try to emulate it.
Line 72... Line 87...
72
  flex         create \`lex.yy.c', if possible, from existing .c
87
  flex         create \`lex.yy.c', if possible, from existing .c
73
  help2man     touch the output file
88
  help2man     touch the output file
74
  lex          create \`lex.yy.c', if possible, from existing .c
89
  lex          create \`lex.yy.c', if possible, from existing .c
75
  makeinfo     touch the output file
90
  makeinfo     touch the output file
76
  tar          try tar, gnutar, gtar, then tar without non-portable flags
91
  tar          try tar, gnutar, gtar, then tar without non-portable flags
77
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
92
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
 
93
 
-
 
94
Send bug reports to <bug-automake@gnu.org>."
78
    ;;
95
    ;;
79
 
96
 
80
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
97
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
81
    echo "missing 0.4 - GNU automake"
98
    echo "missing $scriptversion (GNU Automake)"
82
    ;;
99
    ;;
83
 
100
 
84
  -*)
101
  -*)
85
    echo 1>&2 "$0: Unknown \`$1' option"
102
    echo 1>&2 "$0: Unknown \`$1' option"
86
    echo 1>&2 "Try \`$0 --help' for more information"
103
    echo 1>&2 "Try \`$0 --help' for more information"
Line 92... Line 109...
92
       # We have it, but it failed.
109
       # We have it, but it failed.
93
       exit 1
110
       exit 1
94
    fi
111
    fi
95
 
112
 
96
    echo 1>&2 "\
113
    echo 1>&2 "\
97
WARNING: \`$1' is missing on your system.  You should only need it if
114
WARNING: \`$1' is $msg.  You should only need it if
98
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
115
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
99
         to install the \`Automake' and \`Perl' packages.  Grab them from
116
         to install the \`Automake' and \`Perl' packages.  Grab them from
100
         any GNU archive site."
117
         any GNU archive site."
101
    touch aclocal.m4
118
    touch aclocal.m4
102
    ;;
119
    ;;
Line 106... Line 123...
106
       # We have it, but it failed.
123
       # We have it, but it failed.
107
       exit 1
124
       exit 1
108
    fi
125
    fi
109
 
126
 
110
    echo 1>&2 "\
127
    echo 1>&2 "\
111
WARNING: \`$1' is missing on your system.  You should only need it if
128
WARNING: \`$1' is $msg.  You should only need it if
112
         you modified \`${configure_ac}'.  You might want to install the
129
         you modified \`${configure_ac}'.  You might want to install the
113
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
130
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
114
         archive site."
131
         archive site."
115
    touch configure
132
    touch configure
116
    ;;
133
    ;;
Line 120... Line 137...
120
       # We have it, but it failed.
137
       # We have it, but it failed.
121
       exit 1
138
       exit 1
122
    fi
139
    fi
123
 
140
 
124
    echo 1>&2 "\
141
    echo 1>&2 "\
125
WARNING: \`$1' is missing on your system.  You should only need it if
142
WARNING: \`$1' is $msg.  You should only need it if
126
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
143
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
127
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
144
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
128
         from any GNU archive site."
145
         from any GNU archive site."
129
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
146
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
130
    test -z "$files" && files="config.h"
147
    test -z "$files" && files="config.h"
Line 144... Line 161...
144
       # We have it, but it failed.
161
       # We have it, but it failed.
145
       exit 1
162
       exit 1
146
    fi
163
    fi
147
 
164
 
148
    echo 1>&2 "\
165
    echo 1>&2 "\
149
WARNING: \`$1' is missing on your system.  You should only need it if
166
WARNING: \`$1' is $msg.  You should only need it if
150
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
167
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
151
         You might want to install the \`Automake' and \`Perl' packages.
168
         You might want to install the \`Automake' and \`Perl' packages.
152
         Grab them from any GNU archive site."
169
         Grab them from any GNU archive site."
153
    find . -type f -name Makefile.am -print |
170
    find . -type f -name Makefile.am -print |
154
	   sed 's/\.am$/.in/' |
171
	   sed 's/\.am$/.in/' |
Line 160... Line 177...
160
       # We have it, but it failed.
177
       # We have it, but it failed.
161
       exit 1
178
       exit 1
162
    fi
179
    fi
163
 
180
 
164
    echo 1>&2 "\
181
    echo 1>&2 "\
165
WARNING: \`$1' is needed, and you do not seem to have it handy on your
182
WARNING: \`$1' is needed, but is $msg.
166
         system.  You might have modified some files without having the
183
         You might have modified some files without having the
167
         proper tools for further handling them.
184
         proper tools for further handling them.
168
         You can get \`$1' as part of \`Autoconf' from any GNU
185
         You can get \`$1' as part of \`Autoconf' from any GNU
169
         archive site."
186
         archive site."
170
 
187
 
171
    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
188
    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
Line 183... Line 200...
183
    fi
200
    fi
184
    ;;
201
    ;;
185
 
202
 
186
  bison|yacc)
203
  bison|yacc)
187
    echo 1>&2 "\
204
    echo 1>&2 "\
188
WARNING: \`$1' is missing on your system.  You should only need it if
205
WARNING: \`$1' $msg.  You should only need it if
189
         you modified a \`.y' file.  You may need the \`Bison' package
206
         you modified a \`.y' file.  You may need the \`Bison' package
190
         in order for those modifications to take effect.  You can get
207
         in order for those modifications to take effect.  You can get
191
         \`Bison' from any GNU archive site."
208
         \`Bison' from any GNU archive site."
192
    rm -f y.tab.c y.tab.h
209
    rm -f y.tab.c y.tab.h
193
    if [ $# -ne 1 ]; then
210
    if [ $# -ne 1 ]; then
Line 213... Line 230...
213
    fi
230
    fi
214
    ;;
231
    ;;
215
 
232
 
216
  lex|flex)
233
  lex|flex)
217
    echo 1>&2 "\
234
    echo 1>&2 "\
218
WARNING: \`$1' is missing on your system.  You should only need it if
235
WARNING: \`$1' is $msg.  You should only need it if
219
         you modified a \`.l' file.  You may need the \`Flex' package
236
         you modified a \`.l' file.  You may need the \`Flex' package
220
         in order for those modifications to take effect.  You can get
237
         in order for those modifications to take effect.  You can get
221
         \`Flex' from any GNU archive site."
238
         \`Flex' from any GNU archive site."
222
    rm -f lex.yy.c
239
    rm -f lex.yy.c
223
    if [ $# -ne 1 ]; then
240
    if [ $# -ne 1 ]; then
Line 241... Line 258...
241
       # We have it, but it failed.
258
       # We have it, but it failed.
242
       exit 1
259
       exit 1
243
    fi
260
    fi
244
 
261
 
245
    echo 1>&2 "\
262
    echo 1>&2 "\
246
WARNING: \`$1' is missing on your system.  You should only need it if
263
WARNING: \`$1' is $msg.  You should only need it if
247
	 you modified a dependency of a manual page.  You may need the
264
	 you modified a dependency of a manual page.  You may need the
248
	 \`Help2man' package in order for those modifications to take
265
	 \`Help2man' package in order for those modifications to take
249
	 effect.  You can get \`Help2man' from any GNU archive site."
266
	 effect.  You can get \`Help2man' from any GNU archive site."
250
 
267
 
251
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
268
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
Line 266... Line 283...
266
       # We have makeinfo, but it failed.
283
       # We have makeinfo, but it failed.
267
       exit 1
284
       exit 1
268
    fi
285
    fi
269
 
286
 
270
    echo 1>&2 "\
287
    echo 1>&2 "\
271
WARNING: \`$1' is missing on your system.  You should only need it if
288
WARNING: \`$1' is $msg.  You should only need it if
272
         you modified a \`.texi' or \`.texinfo' file, or any other file
289
         you modified a \`.texi' or \`.texinfo' file, or any other file
273
         indirectly affecting the aspect of the manual.  The spurious
290
         indirectly affecting the aspect of the manual.  The spurious
274
         call might also be the consequence of using a buggy \`make' (AIX,
291
         call might also be the consequence of using a buggy \`make' (AIX,
275
         DU, IRIX).  You might want to install the \`Texinfo' package or
292
         DU, IRIX).  You might want to install the \`Texinfo' package or
276
         the \`GNU make' package.  Grab either from any GNU archive site."
293
         the \`GNU make' package.  Grab either from any GNU archive site."
Line 321... Line 338...
321
    exit 1
338
    exit 1
322
    ;;
339
    ;;
323
 
340
 
324
  *)
341
  *)
325
    echo 1>&2 "\
342
    echo 1>&2 "\
326
WARNING: \`$1' is needed, and you do not seem to have it handy on your
343
WARNING: \`$1' is needed, and is $msg.
327
         system.  You might have modified some files without having the
344
         You might have modified some files without having the
328
         proper tools for further handling them.  Check the \`README' file,
345
         proper tools for further handling them.  Check the \`README' file,
329
         it often tells you about the needed prerequirements for installing
346
         it often tells you about the needed prerequisites for installing
330
         this package.  You may also peek at any GNU archive site, in case
347
         this package.  You may also peek at any GNU archive site, in case
331
         some other package would contain this missing \`$1' program."
348
         some other package would contain this missing \`$1' program."
332
    exit 1
349
    exit 1
333
    ;;
350
    ;;
334
esac
351
esac
335
 
352
 
336
exit 0
353
exit 0
-
 
354
 
-
 
355
# Local variables:
-
 
356
# eval: (add-hook 'write-file-hooks 'time-stamp)
-
 
357
# time-stamp-start: "scriptversion="
-
 
358
# time-stamp-format: "%:y-%02m-%02d.%02H"
-
 
359
# time-stamp-end: "$"
-
 
360
# End: