annotate missing @ 120:f93fa5091070

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