libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / accel-pptp / missing
blob7f1c505e9b4eed0c641ac7cd2a0f2573ea7c1fb2
1 #! /bin/sh
2 # Common stub for a few missing GNU programs while installing.
3 # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
4 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
6 # 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
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
26 exit
27 if test $# -eq 0; then
28 echo 1>&2 "Try \`$0 --help' for more information"
29 exit 1
32 run=:
34 # In the cases where this matters, `missing' is being run in the
35 # srcdir already.
36 if test -f configure.ac; then
37 configure_ac=configure.ac
38 else
39 configure_ac=configure.in
42 case "$1" in
43 --run)
44 # Try to run requested program, and just exit if it succeeds.
45 run=
46 shift
47 "$@" && exit 0
49 esac
51 # If it does not exist, or fails to run (possibly an outdated version),
52 # try to emulate it.
53 case "$1" in
55 -h|--h|--he|--hel|--help)
56 echo "\
57 $0 [OPTION]... PROGRAM [ARGUMENT]...
59 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
60 error status if there is no known handling for PROGRAM.
62 Options:
63 -h, --help display this help and exit
64 -v, --version output version information and exit
65 --run try to run the given command, and emulate it if it fails
67 Supported PROGRAM values:
68 aclocal touch file \`aclocal.m4'
69 autoconf touch file \`configure'
70 autoheader touch file \`config.h.in'
71 automake touch all \`Makefile.in' files
72 bison create \`y.tab.[ch]', if possible, from existing .[ch]
73 flex create \`lex.yy.c', if possible, from existing .c
74 help2man touch the output file
75 lex create \`lex.yy.c', if possible, from existing .c
76 makeinfo touch the output file
77 tar try tar, gnutar, gtar, then tar without non-portable flags
78 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
81 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
82 echo "missing 0.4 - GNU automake"
85 -*)
86 echo 1>&2 "$0: Unknown \`$1' option"
87 echo 1>&2 "Try \`$0 --help' for more information"
88 exit 1
91 aclocal*)
92 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
93 # We have it, but it failed.
94 exit 1
97 echo 1>&2 "\
98 WARNING: \`$1' is missing on your system. You should only need it if
99 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
100 to install the \`Automake' and \`Perl' packages. Grab them from
101 any GNU archive site."
102 touch aclocal.m4
105 autoconf)
106 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
107 # We have it, but it failed.
108 exit 1
111 echo 1>&2 "\
112 WARNING: \`$1' is missing on your system. You should only need it if
113 you modified \`${configure_ac}'. You might want to install the
114 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
115 archive site."
116 touch configure
119 autoheader)
120 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
121 # We have it, but it failed.
122 exit 1
125 echo 1>&2 "\
126 WARNING: \`$1' is missing on your system. You should only need it if
127 you modified \`acconfig.h' or \`${configure_ac}'. You might want
128 to install the \`Autoconf' and \`GNU m4' packages. Grab them
129 from any GNU archive site."
130 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
131 test -z "$files" && files="config.h"
132 touch_files=
133 for f in $files; do
134 case "$f" in
135 *:*) touch_files="$touch_files "`echo "$f" |
136 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
137 *) touch_files="$touch_files $f.in";;
138 esac
139 done
140 touch $touch_files
143 automake*)
144 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
145 # We have it, but it failed.
146 exit 1
149 echo 1>&2 "\
150 WARNING: \`$1' is missing on your system. You should only need it if
151 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
152 You might want to install the \`Automake' and \`Perl' packages.
153 Grab them from any GNU archive site."
154 find . -type f -name Makefile.am -print |
155 sed 's/\.am$/.in/' |
156 while read f; do touch "$f"; done
159 autom4te)
160 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
161 # We have it, but it failed.
162 exit 1
165 echo 1>&2 "\
166 WARNING: \`$1' is needed, and you do not seem to have it handy on your
167 system. You might have modified some files without having the
168 proper tools for further handling them.
169 You can get \`$1Help2man' as part of \`Autoconf' from any GNU
170 archive site."
172 file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
173 test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
174 if test -f "$file"; then
175 touch $file
176 else
177 test -z "$file" || exec >$file
178 echo "#! /bin/sh"
179 echo "# Created by GNU Automake missing as a replacement of"
180 echo "# $ $@"
181 echo "exit 0"
182 chmod +x $file
183 exit 1
187 bison|yacc)
188 echo 1>&2 "\
189 WARNING: \`$1' is missing on your system. You should only need it if
190 you modified a \`.y' file. You may need the \`Bison' package
191 in order for those modifications to take effect. You can get
192 \`Bison' from any GNU archive site."
193 rm -f y.tab.c y.tab.h
194 if [ $# -ne 1 ]; then
195 eval LASTARG="\${$#}"
196 case "$LASTARG" in
197 *.y)
198 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
199 if [ -f "$SRCFILE" ]; then
200 cp "$SRCFILE" y.tab.c
202 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
203 if [ -f "$SRCFILE" ]; then
204 cp "$SRCFILE" y.tab.h
207 esac
209 if [ ! -f y.tab.h ]; then
210 echo >y.tab.h
212 if [ ! -f y.tab.c ]; then
213 echo 'main() { return 0; }' >y.tab.c
217 lex|flex)
218 echo 1>&2 "\
219 WARNING: \`$1' is missing on your system. You should only need it if
220 you modified a \`.l' file. You may need the \`Flex' package
221 in order for those modifications to take effect. You can get
222 \`Flex' from any GNU archive site."
223 rm -f lex.yy.c
224 if [ $# -ne 1 ]; then
225 eval LASTARG="\${$#}"
226 case "$LASTARG" in
227 *.l)
228 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
229 if [ -f "$SRCFILE" ]; then
230 cp "$SRCFILE" lex.yy.c
233 esac
235 if [ ! -f lex.yy.c ]; then
236 echo 'main() { return 0; }' >lex.yy.c
240 help2man)
241 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
242 # We have it, but it failed.
243 exit 1
246 echo 1>&2 "\
247 WARNING: \`$1' is missing on your system. You should only need it if
248 you modified a dependency of a manual page. You may need the
249 \`Help2man' package in order for those modifications to take
250 effect. You can get \`Help2man' from any GNU archive site."
252 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
253 if test -z "$file"; then
254 file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
256 if [ -f "$file" ]; then
257 touch $file
258 else
259 test -z "$file" || exec >$file
260 echo ".ab help2man is required to generate this page"
261 exit 1
265 makeinfo)
266 if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
267 # We have makeinfo, but it failed.
268 exit 1
271 echo 1>&2 "\
272 WARNING: \`$1' is missing on your system. You should only need it if
273 you modified a \`.texi' or \`.texinfo' file, or any other file
274 indirectly affecting the aspect of the manual. The spurious
275 call might also be the consequence of using a buggy \`make' (AIX,
276 DU, IRIX). You might want to install the \`Texinfo' package or
277 the \`GNU make' package. Grab either from any GNU archive site."
278 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
279 if test -z "$file"; then
280 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
281 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
283 touch $file
286 tar)
287 shift
288 if test -n "$run"; then
289 echo 1>&2 "ERROR: \`tar' requires --run"
290 exit 1
293 # We have already tried tar in the generic part.
294 # Look for gnutar/gtar before invocation to avoid ugly error
295 # messages.
296 if (gnutar --version > /dev/null 2>&1); then
297 gnutar "$@" && exit 0
299 if (gtar --version > /dev/null 2>&1); then
300 gtar "$@" && exit 0
302 firstarg="$1"
303 if shift; then
304 case "$firstarg" in
305 *o*)
306 firstarg=`echo "$firstarg" | sed s/o//`
307 tar "$firstarg" "$@" && exit 0
309 esac
310 case "$firstarg" in
311 *h*)
312 firstarg=`echo "$firstarg" | sed s/h//`
313 tar "$firstarg" "$@" && exit 0
315 esac
318 echo 1>&2 "\
319 WARNING: I can't seem to be able to run \`tar' with the given arguments.
320 You may want to install GNU tar or Free paxutils, or check the
321 command line arguments."
322 exit 1
326 echo 1>&2 "\
327 WARNING: \`$1' is needed, and you do not seem to have it handy on your
328 system. You might have modified some files without having the
329 proper tools for further handling them. Check the \`README' file,
330 it often tells you about the needed prerequirements for installing
331 this package. You may also peek at any GNU archive site, in case
332 some other package would contain this missing \`$1' program."
333 exit 1
335 esac
337 exit 0