| 1 |
|
#! /bin/sh |
| 2 |
|
# Common stub for a few missing GNU programs while installing. |
| 3 |
|
|
| 4 |
< |
scriptversion=2006-05-10.23 |
| 4 |
> |
scriptversion=2012-01-06.13; # UTC |
| 5 |
|
|
| 6 |
< |
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 |
| 7 |
< |
# Free Software Foundation, Inc. |
| 6 |
> |
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, |
| 7 |
> |
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. |
| 8 |
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
| 9 |
|
|
| 10 |
|
# This program is free software; you can redistribute it and/or modify |
| 18 |
|
# GNU General Public License for more details. |
| 19 |
|
|
| 20 |
|
# You should have received a copy of the GNU General Public License |
| 21 |
< |
# along with this program; if not, write to the Free Software |
| 22 |
< |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 23 |
< |
# 02110-1301, USA. |
| 21 |
> |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 |
|
|
| 23 |
|
# As a special exception to the GNU General Public License, if you |
| 24 |
|
# distribute this file as part of a program that contains a |
| 84 |
|
help2man touch the output file |
| 85 |
|
lex create \`lex.yy.c', if possible, from existing .c |
| 86 |
|
makeinfo touch the output file |
| 89 |
– |
tar try tar, gnutar, gtar, then tar without non-portable flags |
| 87 |
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch] |
| 88 |
|
|
| 89 |
+ |
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and |
| 90 |
+ |
\`g' are ignored when checking the name. |
| 91 |
+ |
|
| 92 |
|
Send bug reports to <bug-automake@gnu.org>." |
| 93 |
|
exit $? |
| 94 |
|
;; |
| 106 |
|
|
| 107 |
|
esac |
| 108 |
|
|
| 109 |
+ |
# normalize program name to check for. |
| 110 |
+ |
program=`echo "$1" | sed ' |
| 111 |
+ |
s/^gnu-//; t |
| 112 |
+ |
s/^gnu//; t |
| 113 |
+ |
s/^g//; t'` |
| 114 |
+ |
|
| 115 |
|
# Now exit if we have it, but it failed. Also exit now if we |
| 116 |
|
# don't have it and --version was passed (most likely to detect |
| 117 |
< |
# the program). |
| 117 |
> |
# the program). This is about non-GNU programs, so use $1 not |
| 118 |
> |
# $program. |
| 119 |
|
case $1 in |
| 120 |
< |
lex|yacc) |
| 120 |
> |
lex*|yacc*) |
| 121 |
|
# Not GNU programs, they don't have --version. |
| 122 |
|
;; |
| 123 |
|
|
| 117 |
– |
tar) |
| 118 |
– |
if test -n "$run"; then |
| 119 |
– |
echo 1>&2 "ERROR: \`tar' requires --run" |
| 120 |
– |
exit 1 |
| 121 |
– |
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then |
| 122 |
– |
exit 1 |
| 123 |
– |
fi |
| 124 |
– |
;; |
| 125 |
– |
|
| 124 |
|
*) |
| 125 |
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then |
| 126 |
|
# We have it, but it failed. |
| 136 |
|
|
| 137 |
|
# If it does not exist, or fails to run (possibly an outdated version), |
| 138 |
|
# try to emulate it. |
| 139 |
< |
case $1 in |
| 139 |
> |
case $program in |
| 140 |
|
aclocal*) |
| 141 |
|
echo 1>&2 "\ |
| 142 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 146 |
|
touch aclocal.m4 |
| 147 |
|
;; |
| 148 |
|
|
| 149 |
< |
autoconf) |
| 149 |
> |
autoconf*) |
| 150 |
|
echo 1>&2 "\ |
| 151 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 152 |
|
you modified \`${configure_ac}'. You might want to install the |
| 155 |
|
touch configure |
| 156 |
|
;; |
| 157 |
|
|
| 158 |
< |
autoheader) |
| 158 |
> |
autoheader*) |
| 159 |
|
echo 1>&2 "\ |
| 160 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 161 |
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want |
| 185 |
|
while read f; do touch "$f"; done |
| 186 |
|
;; |
| 187 |
|
|
| 188 |
< |
autom4te) |
| 188 |
> |
autom4te*) |
| 189 |
|
echo 1>&2 "\ |
| 190 |
|
WARNING: \`$1' is needed, but is $msg. |
| 191 |
|
You might have modified some files without having the |
| 208 |
|
fi |
| 209 |
|
;; |
| 210 |
|
|
| 211 |
< |
bison|yacc) |
| 211 |
> |
bison*|yacc*) |
| 212 |
|
echo 1>&2 "\ |
| 213 |
|
WARNING: \`$1' $msg. You should only need it if |
| 214 |
|
you modified a \`.y' file. You may need the \`Bison' package |
| 216 |
|
\`Bison' from any GNU archive site." |
| 217 |
|
rm -f y.tab.c y.tab.h |
| 218 |
|
if test $# -ne 1; then |
| 219 |
< |
eval LASTARG="\${$#}" |
| 219 |
> |
eval LASTARG=\${$#} |
| 220 |
|
case $LASTARG in |
| 221 |
|
*.y) |
| 222 |
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` |
| 238 |
|
fi |
| 239 |
|
;; |
| 240 |
|
|
| 241 |
< |
lex|flex) |
| 241 |
> |
lex*|flex*) |
| 242 |
|
echo 1>&2 "\ |
| 243 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 244 |
|
you modified a \`.l' file. You may need the \`Flex' package |
| 246 |
|
\`Flex' from any GNU archive site." |
| 247 |
|
rm -f lex.yy.c |
| 248 |
|
if test $# -ne 1; then |
| 249 |
< |
eval LASTARG="\${$#}" |
| 249 |
> |
eval LASTARG=\${$#} |
| 250 |
|
case $LASTARG in |
| 251 |
|
*.l) |
| 252 |
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` |
| 261 |
|
fi |
| 262 |
|
;; |
| 263 |
|
|
| 264 |
< |
help2man) |
| 264 |
> |
help2man*) |
| 265 |
|
echo 1>&2 "\ |
| 266 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 267 |
|
you modified a dependency of a manual page. You may need the |
| 275 |
|
else |
| 276 |
|
test -z "$file" || exec >$file |
| 277 |
|
echo ".ab help2man is required to generate this page" |
| 278 |
< |
exit 1 |
| 278 |
> |
exit $? |
| 279 |
|
fi |
| 280 |
|
;; |
| 281 |
|
|
| 282 |
< |
makeinfo) |
| 282 |
> |
makeinfo*) |
| 283 |
|
echo 1>&2 "\ |
| 284 |
|
WARNING: \`$1' is $msg. You should only need it if |
| 285 |
|
you modified a \`.texi' or \`.texinfo' file, or any other file |
| 308 |
|
touch $file |
| 309 |
|
;; |
| 310 |
|
|
| 313 |
– |
tar) |
| 314 |
– |
shift |
| 315 |
– |
|
| 316 |
– |
# We have already tried tar in the generic part. |
| 317 |
– |
# Look for gnutar/gtar before invocation to avoid ugly error |
| 318 |
– |
# messages. |
| 319 |
– |
if (gnutar --version > /dev/null 2>&1); then |
| 320 |
– |
gnutar "$@" && exit 0 |
| 321 |
– |
fi |
| 322 |
– |
if (gtar --version > /dev/null 2>&1); then |
| 323 |
– |
gtar "$@" && exit 0 |
| 324 |
– |
fi |
| 325 |
– |
firstarg="$1" |
| 326 |
– |
if shift; then |
| 327 |
– |
case $firstarg in |
| 328 |
– |
*o*) |
| 329 |
– |
firstarg=`echo "$firstarg" | sed s/o//` |
| 330 |
– |
tar "$firstarg" "$@" && exit 0 |
| 331 |
– |
;; |
| 332 |
– |
esac |
| 333 |
– |
case $firstarg in |
| 334 |
– |
*h*) |
| 335 |
– |
firstarg=`echo "$firstarg" | sed s/h//` |
| 336 |
– |
tar "$firstarg" "$@" && exit 0 |
| 337 |
– |
;; |
| 338 |
– |
esac |
| 339 |
– |
fi |
| 340 |
– |
|
| 341 |
– |
echo 1>&2 "\ |
| 342 |
– |
WARNING: I can't seem to be able to run \`tar' with the given arguments. |
| 343 |
– |
You may want to install GNU tar or Free paxutils, or check the |
| 344 |
– |
command line arguments." |
| 345 |
– |
exit 1 |
| 346 |
– |
;; |
| 347 |
– |
|
| 311 |
|
*) |
| 312 |
|
echo 1>&2 "\ |
| 313 |
|
WARNING: \`$1' is needed, and is $msg. |
| 326 |
|
# eval: (add-hook 'write-file-hooks 'time-stamp) |
| 327 |
|
# time-stamp-start: "scriptversion=" |
| 328 |
|
# time-stamp-format: "%:y-%02m-%02d.%02H" |
| 329 |
< |
# time-stamp-end: "$" |
| 329 |
> |
# time-stamp-time-zone: "UTC" |
| 330 |
> |
# time-stamp-end: "; # UTC" |
| 331 |
|
# End: |