annotate GEMBASSY-1.0.3/missing @ 1:84a17b3fad1f draft

Uploaded
author ktnyt
date Fri, 26 Jun 2015 05:20:29 -0400
parents 8300eb051bea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1 #! /bin/sh
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
2 # Common wrapper for a few potentially missing GNU programs.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
3
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
4 scriptversion=2013-10-28.13; # UTC
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
5
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
6 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
7 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
8
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
9 # This program is free software; you can redistribute it and/or modify
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
10 # it under the terms of the GNU General Public License as published by
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
11 # the Free Software Foundation; either version 2, or (at your option)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
12 # any later version.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
13
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
14 # This program is distributed in the hope that it will be useful,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
17 # GNU General Public License for more details.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
18
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
19 # You should have received a copy of the GNU General Public License
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
21
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
23 # distribute this file as part of a program that contains a
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
26
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
27 if test $# -eq 0; then
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
28 echo 1>&2 "Try '$0 --help' for more information"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
29 exit 1
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
30 fi
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
31
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
32 case $1 in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
33
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
34 --is-lightweight)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
35 # Used by our autoconf macros to check whether the available missing
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
36 # script is modern enough.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
37 exit 0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
38 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
39
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
40 --run)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
41 # Back-compat with the calling convention used by older automake.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
42 shift
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
43 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
44
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
45 -h|--h|--he|--hel|--help)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
46 echo "\
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
47 $0 [OPTION]... PROGRAM [ARGUMENT]...
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
48
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
49 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
50 to PROGRAM being missing or too old.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
51
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
52 Options:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
53 -h, --help display this help and exit
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
54 -v, --version output version information and exit
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
55
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
56 Supported PROGRAM values:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
57 aclocal autoconf autoheader autom4te automake makeinfo
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
58 bison yacc flex lex help2man
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
59
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
60 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
61 'g' are ignored when checking the name.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
62
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
63 Send bug reports to <bug-automake@gnu.org>."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
64 exit $?
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
65 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
66
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
67 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
68 echo "missing $scriptversion (GNU Automake)"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
69 exit $?
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
70 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
71
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
72 -*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
73 echo 1>&2 "$0: unknown '$1' option"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
74 echo 1>&2 "Try '$0 --help' for more information"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
75 exit 1
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
76 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
77
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
78 esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
79
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
80 # Run the given program, remember its exit status.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
81 "$@"; st=$?
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
82
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
83 # If it succeeded, we are done.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
84 test $st -eq 0 && exit 0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
85
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
86 # Also exit now if we it failed (or wasn't found), and '--version' was
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
87 # passed; such an option is passed most likely to detect whether the
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
88 # program is present and works.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
89 case $2 in --version|--help) exit $st;; esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
90
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
91 # Exit code 63 means version mismatch. This often happens when the user
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
92 # tries to use an ancient version of a tool on a file that requires a
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
93 # minimum version.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
94 if test $st -eq 63; then
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
95 msg="probably too old"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
96 elif test $st -eq 127; then
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
97 # Program was missing.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
98 msg="missing on your system"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
99 else
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
100 # Program was found and executed, but failed. Give up.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
101 exit $st
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
102 fi
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
103
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
104 perl_URL=http://www.perl.org/
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
105 flex_URL=http://flex.sourceforge.net/
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
106 gnu_software_URL=http://www.gnu.org/software
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
107
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
108 program_details ()
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
109 {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
110 case $1 in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
111 aclocal|automake)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
112 echo "The '$1' program is part of the GNU Automake package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
113 echo "<$gnu_software_URL/automake>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
114 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
115 echo "<$gnu_software_URL/autoconf>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
116 echo "<$gnu_software_URL/m4/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
117 echo "<$perl_URL>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
118 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
119 autoconf|autom4te|autoheader)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
120 echo "The '$1' program is part of the GNU Autoconf package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
121 echo "<$gnu_software_URL/autoconf/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
122 echo "It also requires GNU m4 and Perl in order to run:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
123 echo "<$gnu_software_URL/m4/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
124 echo "<$perl_URL>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
125 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
126 esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
127 }
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
128
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
129 give_advice ()
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
130 {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
131 # Normalize program name to check for.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
132 normalized_program=`echo "$1" | sed '
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
133 s/^gnu-//; t
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
134 s/^gnu//; t
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
135 s/^g//; t'`
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
136
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
137 printf '%s\n' "'$1' is $msg."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
138
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
139 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
140 case $normalized_program in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
141 autoconf*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
142 echo "You should only need it if you modified 'configure.ac',"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
143 echo "or m4 files included by it."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
144 program_details 'autoconf'
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
145 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
146 autoheader*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
147 echo "You should only need it if you modified 'acconfig.h' or"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
148 echo "$configure_deps."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
149 program_details 'autoheader'
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
150 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
151 automake*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
152 echo "You should only need it if you modified 'Makefile.am' or"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
153 echo "$configure_deps."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
154 program_details 'automake'
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
155 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
156 aclocal*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
157 echo "You should only need it if you modified 'acinclude.m4' or"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
158 echo "$configure_deps."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
159 program_details 'aclocal'
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
160 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
161 autom4te*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
162 echo "You might have modified some maintainer files that require"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
163 echo "the 'autom4te' program to be rebuilt."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
164 program_details 'autom4te'
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
165 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
166 bison*|yacc*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
167 echo "You should only need it if you modified a '.y' file."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
168 echo "You may want to install the GNU Bison package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
169 echo "<$gnu_software_URL/bison/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
170 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
171 lex*|flex*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
172 echo "You should only need it if you modified a '.l' file."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
173 echo "You may want to install the Fast Lexical Analyzer package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
174 echo "<$flex_URL>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
175 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
176 help2man*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
177 echo "You should only need it if you modified a dependency" \
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
178 "of a man page."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
179 echo "You may want to install the GNU Help2man package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
180 echo "<$gnu_software_URL/help2man/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
181 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
182 makeinfo*)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
183 echo "You should only need it if you modified a '.texi' file, or"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
184 echo "any other file indirectly affecting the aspect of the manual."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
185 echo "You might want to install the Texinfo package:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
186 echo "<$gnu_software_URL/texinfo/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
187 echo "The spurious makeinfo call might also be the consequence of"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
188 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
189 echo "want to install GNU make:"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
190 echo "<$gnu_software_URL/make/>"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
191 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
192 *)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
193 echo "You might have modified some files without having the proper"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
194 echo "tools for further handling them. Check the 'README' file, it"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
195 echo "often tells you about the needed prerequisites for installing"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
196 echo "this package. You may also peek at any GNU archive site, in"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
197 echo "case some other package contains this missing '$1' program."
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
198 ;;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
199 esac
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
200 }
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
201
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
202 give_advice "$1" | sed -e '1s/^/WARNING: /' \
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
203 -e '2,$s/^/ /' >&2
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
204
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
205 # Propagate the correct exit status (expected to be 127 for a program
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
206 # not found, 63 for a program that failed due to version mismatch).
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
207 exit $st
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
208
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
209 # Local variables:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
210 # eval: (add-hook 'write-file-hooks 'time-stamp)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
211 # time-stamp-start: "scriptversion="
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
212 # time-stamp-format: "%:y-%02m-%02d.%02H"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
213 # time-stamp-time-zone: "UTC"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
214 # time-stamp-end: "; # UTC"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
215 # End: