| OLD | NEW |
| 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=2009-04-28.21; # UTC | 4 scriptversion=2012-01-06.13; # UTC |
| 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, 2006, |
| 7 # 2008, 2009 Free Software Foundation, Inc. | 7 # 2008, 2009, 2010, 2011, 2012 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 |
| 12 # the Free Software Foundation; either version 2, or (at your option) | 12 # the Free Software Foundation; either version 2, or (at your option) |
| 13 # any later version. | 13 # any later version. |
| 14 | 14 |
| 15 # This program is distributed in the hope that it will be useful, | 15 # This program is distributed in the hope that it will be useful, |
| 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 aclocal touch file \`aclocal.m4' | 77 aclocal touch file \`aclocal.m4' |
| 78 autoconf touch file \`configure' | 78 autoconf touch file \`configure' |
| 79 autoheader touch file \`config.h.in' | 79 autoheader touch file \`config.h.in' |
| 80 autom4te touch the output file, or create a stub one | 80 autom4te touch the output file, or create a stub one |
| 81 automake touch all \`Makefile.in' files | 81 automake touch all \`Makefile.in' files |
| 82 bison create \`y.tab.[ch]', if possible, from existing .[ch] | 82 bison create \`y.tab.[ch]', if possible, from existing .[ch] |
| 83 flex create \`lex.yy.c', if possible, from existing .c | 83 flex create \`lex.yy.c', if possible, from existing .c |
| 84 help2man touch the output file | 84 help2man touch the output file |
| 85 lex create \`lex.yy.c', if possible, from existing .c | 85 lex create \`lex.yy.c', if possible, from existing .c |
| 86 makeinfo touch the output file | 86 makeinfo touch the output file |
| 87 tar try tar, gnutar, gtar, then tar without non-portable flags | |
| 88 yacc create \`y.tab.[ch]', if possible, from existing .[ch] | 87 yacc create \`y.tab.[ch]', if possible, from existing .[ch] |
| 89 | 88 |
| 90 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and | 89 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and |
| 91 \`g' are ignored when checking the name. | 90 \`g' are ignored when checking the name. |
| 92 | 91 |
| 93 Send bug reports to <bug-automake@gnu.org>." | 92 Send bug reports to <bug-automake@gnu.org>." |
| 94 exit $? | 93 exit $? |
| 95 ;; | 94 ;; |
| 96 | 95 |
| 97 -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | 96 -v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 115 | 114 |
| 116 # Now exit if we have it, but it failed. Also exit now if we | 115 # Now exit if we have it, but it failed. Also exit now if we |
| 117 # don't have it and --version was passed (most likely to detect | 116 # don't have it and --version was passed (most likely to detect |
| 118 # the program). This is about non-GNU programs, so use $1 not | 117 # the program). This is about non-GNU programs, so use $1 not |
| 119 # $program. | 118 # $program. |
| 120 case $1 in | 119 case $1 in |
| 121 lex*|yacc*) | 120 lex*|yacc*) |
| 122 # Not GNU programs, they don't have --version. | 121 # Not GNU programs, they don't have --version. |
| 123 ;; | 122 ;; |
| 124 | 123 |
| 125 tar*) | |
| 126 if test -n "$run"; then | |
| 127 echo 1>&2 "ERROR: \`tar' requires --run" | |
| 128 exit 1 | |
| 129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | |
| 130 exit 1 | |
| 131 fi | |
| 132 ;; | |
| 133 | |
| 134 *) | 124 *) |
| 135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | 125 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then |
| 136 # We have it, but it failed. | 126 # We have it, but it failed. |
| 137 exit 1 | 127 exit 1 |
| 138 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | 128 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
| 139 # Could not run --version or --help. This is probably someone | 129 # Could not run --version or --help. This is probably someone |
| 140 # running `$TOOL --version' or `$TOOL --help' to check whether | 130 # running `$TOOL --version' or `$TOOL --help' to check whether |
| 141 # $TOOL exists and not knowing $TOOL uses missing. | 131 # $TOOL exists and not knowing $TOOL uses missing. |
| 142 exit 1 | 132 exit 1 |
| 143 fi | 133 fi |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 ;; | 209 ;; |
| 220 | 210 |
| 221 bison*|yacc*) | 211 bison*|yacc*) |
| 222 echo 1>&2 "\ | 212 echo 1>&2 "\ |
| 223 WARNING: \`$1' $msg. You should only need it if | 213 WARNING: \`$1' $msg. You should only need it if |
| 224 you modified a \`.y' file. You may need the \`Bison' package | 214 you modified a \`.y' file. You may need the \`Bison' package |
| 225 in order for those modifications to take effect. You can get | 215 in order for those modifications to take effect. You can get |
| 226 \`Bison' from any GNU archive site." | 216 \`Bison' from any GNU archive site." |
| 227 rm -f y.tab.c y.tab.h | 217 rm -f y.tab.c y.tab.h |
| 228 if test $# -ne 1; then | 218 if test $# -ne 1; then |
| 229 eval LASTARG="\${$#}" | 219 eval LASTARG=\${$#} |
| 230 case $LASTARG in | 220 case $LASTARG in |
| 231 *.y) | 221 *.y) |
| 232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` | 222 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` |
| 233 if test -f "$SRCFILE"; then | 223 if test -f "$SRCFILE"; then |
| 234 cp "$SRCFILE" y.tab.c | 224 cp "$SRCFILE" y.tab.c |
| 235 fi | 225 fi |
| 236 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` | 226 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` |
| 237 if test -f "$SRCFILE"; then | 227 if test -f "$SRCFILE"; then |
| 238 cp "$SRCFILE" y.tab.h | 228 cp "$SRCFILE" y.tab.h |
| 239 fi | 229 fi |
| 240 ;; | 230 ;; |
| 241 esac | 231 esac |
| 242 fi | 232 fi |
| 243 if test ! -f y.tab.h; then | 233 if test ! -f y.tab.h; then |
| 244 echo >y.tab.h | 234 echo >y.tab.h |
| 245 fi | 235 fi |
| 246 if test ! -f y.tab.c; then | 236 if test ! -f y.tab.c; then |
| 247 echo 'main() { return 0; }' >y.tab.c | 237 echo 'main() { return 0; }' >y.tab.c |
| 248 fi | 238 fi |
| 249 ;; | 239 ;; |
| 250 | 240 |
| 251 lex*|flex*) | 241 lex*|flex*) |
| 252 echo 1>&2 "\ | 242 echo 1>&2 "\ |
| 253 WARNING: \`$1' is $msg. You should only need it if | 243 WARNING: \`$1' is $msg. You should only need it if |
| 254 you modified a \`.l' file. You may need the \`Flex' package | 244 you modified a \`.l' file. You may need the \`Flex' package |
| 255 in order for those modifications to take effect. You can get | 245 in order for those modifications to take effect. You can get |
| 256 \`Flex' from any GNU archive site." | 246 \`Flex' from any GNU archive site." |
| 257 rm -f lex.yy.c | 247 rm -f lex.yy.c |
| 258 if test $# -ne 1; then | 248 if test $# -ne 1; then |
| 259 eval LASTARG="\${$#}" | 249 eval LASTARG=\${$#} |
| 260 case $LASTARG in | 250 case $LASTARG in |
| 261 *.l) | 251 *.l) |
| 262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` | 252 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` |
| 263 if test -f "$SRCFILE"; then | 253 if test -f "$SRCFILE"; then |
| 264 cp "$SRCFILE" lex.yy.c | 254 cp "$SRCFILE" lex.yy.c |
| 265 fi | 255 fi |
| 266 ;; | 256 ;; |
| 267 esac | 257 esac |
| 268 fi | 258 fi |
| 269 if test ! -f lex.yy.c; then | 259 if test ! -f lex.yy.c; then |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 }' $infile` | 301 }' $infile` |
| 312 # ... or it is derived from the source name (dir/f.texi becomes f.info) | 302 # ... or it is derived from the source name (dir/f.texi becomes f.info) |
| 313 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info | 303 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info |
| 314 fi | 304 fi |
| 315 # If the file does not exist, the user really needs makeinfo; | 305 # If the file does not exist, the user really needs makeinfo; |
| 316 # let's fail without touching anything. | 306 # let's fail without touching anything. |
| 317 test -f $file || exit 1 | 307 test -f $file || exit 1 |
| 318 touch $file | 308 touch $file |
| 319 ;; | 309 ;; |
| 320 | 310 |
| 321 tar*) | |
| 322 shift | |
| 323 | |
| 324 # We have already tried tar in the generic part. | |
| 325 # Look for gnutar/gtar before invocation to avoid ugly error | |
| 326 # messages. | |
| 327 if (gnutar --version > /dev/null 2>&1); then | |
| 328 gnutar "$@" && exit 0 | |
| 329 fi | |
| 330 if (gtar --version > /dev/null 2>&1); then | |
| 331 gtar "$@" && exit 0 | |
| 332 fi | |
| 333 firstarg="$1" | |
| 334 if shift; then | |
| 335 case $firstarg in | |
| 336 *o*) | |
| 337 firstarg=`echo "$firstarg" | sed s/o//` | |
| 338 tar "$firstarg" "$@" && exit 0 | |
| 339 ;; | |
| 340 esac | |
| 341 case $firstarg in | |
| 342 *h*) | |
| 343 firstarg=`echo "$firstarg" | sed s/h//` | |
| 344 tar "$firstarg" "$@" && exit 0 | |
| 345 ;; | |
| 346 esac | |
| 347 fi | |
| 348 | |
| 349 echo 1>&2 "\ | |
| 350 WARNING: I can't seem to be able to run \`tar' with the given arguments. | |
| 351 You may want to install GNU tar or Free paxutils, or check the | |
| 352 command line arguments." | |
| 353 exit 1 | |
| 354 ;; | |
| 355 | |
| 356 *) | 311 *) |
| 357 echo 1>&2 "\ | 312 echo 1>&2 "\ |
| 358 WARNING: \`$1' is needed, and is $msg. | 313 WARNING: \`$1' is needed, and is $msg. |
| 359 You might have modified some files without having the | 314 You might have modified some files without having the |
| 360 proper tools for further handling them. Check the \`README' file, | 315 proper tools for further handling them. Check the \`README' file, |
| 361 it often tells you about the needed prerequisites for installing | 316 it often tells you about the needed prerequisites for installing |
| 362 this package. You may also peek at any GNU archive site, in case | 317 this package. You may also peek at any GNU archive site, in case |
| 363 some other package would contain this missing \`$1' program." | 318 some other package would contain this missing \`$1' program." |
| 364 exit 1 | 319 exit 1 |
| 365 ;; | 320 ;; |
| 366 esac | 321 esac |
| 367 | 322 |
| 368 exit 0 | 323 exit 0 |
| 369 | 324 |
| 370 # Local variables: | 325 # Local variables: |
| 371 # eval: (add-hook 'write-file-hooks 'time-stamp) | 326 # eval: (add-hook 'write-file-hooks 'time-stamp) |
| 372 # time-stamp-start: "scriptversion=" | 327 # time-stamp-start: "scriptversion=" |
| 373 # time-stamp-format: "%:y-%02m-%02d.%02H" | 328 # time-stamp-format: "%:y-%02m-%02d.%02H" |
| 374 # time-stamp-time-zone: "UTC" | 329 # time-stamp-time-zone: "UTC" |
| 375 # time-stamp-end: "; # UTC" | 330 # time-stamp-end: "; # UTC" |
| 376 # End: | 331 # End: |
| OLD | NEW |