Only start the SLA thread if SLA has actually been configured.
[asterisk-bristuff.git] / missing
blob22e101ab1b08c028dd6774e833f46e9ec225977d
1 #! /bin/sh
2 # Common stub for a few missing GNU programs while installing.
3 # Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
4 # Franc,ois 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 if test $# -eq 0; then
22 echo 1>&2 "Try \`$0 --help' for more information"
23 exit 1
26 # In the cases where this matters, `missing' is being run in the
27 # srcdir already.
28 if test -f configure.in; then
29 configure_ac=configure.ac
30 else
31 configure_ac=configure.in
34 case "$1" in
36 -h|--h|--he|--hel|--help)
37 echo "\
38 $0 [OPTION]... PROGRAM [ARGUMENT]...
40 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
41 error status if there is no known handling for PROGRAM.
43 Options:
44 -h, --help display this help and exit
45 -v, --version output version information and exit
47 Supported PROGRAM values:
48 aclocal touch file \`aclocal.m4'
49 autoconf touch file \`configure'
50 autoheader touch file \`config.h.in'
51 automake touch all \`Makefile.in' files
52 bison create \`y.tab.[ch]', if possible, from existing .[ch]
53 flex create \`lex.yy.c', if possible, from existing .c
54 lex create \`lex.yy.c', if possible, from existing .c
55 makeinfo touch the output file
56 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
59 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
60 echo "missing - GNU libit 0.0"
63 -*)
64 echo 1>&2 "$0: Unknown \`$1' option"
65 echo 1>&2 "Try \`$0 --help' for more information"
66 exit 1
69 aclocal*)
70 echo 1>&2 "\
71 WARNING: \`$1' is missing on your system. You should only need it if
72 you modified \`acinclude.m4' or \`$configure_ac'. You might want
73 to install the \`Automake' and \`Perl' packages. Grab them from
74 any GNU archive site."
75 touch aclocal.m4
78 autoconf)
79 echo 1>&2 "\
80 WARNING: \`$1' is missing on your system. You should only need it if
81 you modified \`$configure_ac'. You might want to install the
82 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
83 archive site."
84 touch configure
87 autoheader)
88 echo 1>&2 "\
89 WARNING: \`$1' is missing on your system. You should only need it if
90 you modified \`acconfig.h' or \`$configure_ac'. You might want
91 to install the \`Autoconf' and \`GNU m4' packages. Grab them
92 from any GNU archive site."
93 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
94 test -z "$files" && files="config.h"
95 touch_files=
96 for f in $files; do
97 case "$f" in
98 *:*) touch_files="$touch_files "`echo "$f" |
99 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
100 *) touch_files="$touch_files $f.in";;
101 esac
102 done
103 touch $touch_files
106 automake*)
107 echo 1>&2 "\
108 WARNING: \`$1' is missing on your system. You should only need it if
109 you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
110 You might want to install the \`Automake' and \`Perl' packages.
111 Grab them from any GNU archive site."
112 find . -type f -name Makefile.am -print |
113 sed 's/\.am$/.in/' |
114 while read f; do touch "$f"; done
117 bison|yacc)
118 echo 1>&2 "\
119 WARNING: \`$1' is missing on your system. You should only need it if
120 you modified a \`.y' file. You may need the \`Bison' package
121 in order for those modifications to take effect. You can get
122 \`Bison' from any GNU archive site."
123 rm -f y.tab.c y.tab.h
124 if [ $# -ne 1 ]; then
125 eval LASTARG="\${$#}"
126 case "$LASTARG" in
127 *.y)
128 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
129 if [ -f "$SRCFILE" ]; then
130 cp "$SRCFILE" y.tab.c
132 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
133 if [ -f "$SRCFILE" ]; then
134 cp "$SRCFILE" y.tab.h
137 esac
139 if [ ! -f y.tab.h ]; then
140 echo >y.tab.h
142 if [ ! -f y.tab.c ]; then
143 echo 'main() { return 0; }' >y.tab.c
147 lex|flex)
148 echo 1>&2 "\
149 WARNING: \`$1' is missing on your system. You should only need it if
150 you modified a \`.l' file. You may need the \`Flex' package
151 in order for those modifications to take effect. You can get
152 \`Flex' from any GNU archive site."
153 rm -f lex.yy.c
154 if [ $# -ne 1 ]; then
155 eval LASTARG="\${$#}"
156 case "$LASTARG" in
157 *.l)
158 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
159 if [ -f "$SRCFILE" ]; then
160 cp "$SRCFILE" lex.yy.c
163 esac
165 if [ ! -f lex.yy.c ]; then
166 echo 'main() { return 0; }' >lex.yy.c
170 makeinfo)
171 echo 1>&2 "\
172 WARNING: \`$1' is missing on your system. You should only need it if
173 you modified a \`.texi' or \`.texinfo' file, or any other file
174 indirectly affecting the aspect of the manual. The spurious
175 call might also be the consequence of using a buggy \`make' (AIX,
176 DU, IRIX). You might want to install the \`Texinfo' package or
177 the \`GNU make' package. Grab either from any GNU archive site."
178 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
179 if test -z "$file"; then
180 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
181 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
183 touch $file
187 echo 1>&2 "\
188 WARNING: \`$1' is needed, and you do not seem to have it handy on your
189 system. You might have modified some files without having the
190 proper tools for further handling them. Check the \`README' file,
191 it often tells you about the needed prerequirements for installing
192 this package. You may also peek at any GNU archive site, in case
193 some other package would contain this missing \`$1' program."
194 exit 1
196 esac
198 exit 0