diff options
Diffstat (limited to 'libltdl/missing')
-rwxr-xr-x | libltdl/missing | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/libltdl/missing b/libltdl/missing index 894e786e..e7ef83a1 100755 --- a/libltdl/missing +++ b/libltdl/missing | |||
@@ -1,9 +1,9 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | # Common stub for a few missing GNU programs while installing. | 2 | # Common stub for a few missing GNU programs while installing. |
3 | 3 | ||
4 | scriptversion=2005-06-08.21 | 4 | scriptversion=2003-09-02.23 |
5 | 5 | ||
6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 | 6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 |
7 | # Free Software Foundation, Inc. | 7 | # Free Software Foundation, Inc. |
8 | # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | 8 | # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
9 | 9 | ||
@@ -19,8 +19,8 @@ scriptversion=2005-06-08.21 | |||
19 | 19 | ||
20 | # You should have received a copy of the GNU General Public License | 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 | 21 | # along with this program; if not, write to the Free Software |
22 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 22 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
23 | # 02110-1301, USA. | 23 | # 02111-1307, USA. |
24 | 24 | ||
25 | # As a special exception to the GNU General Public License, if you | 25 | # As a special exception to the GNU General Public License, if you |
26 | # distribute this file as part of a program that contains a | 26 | # distribute this file as part of a program that contains a |
@@ -60,6 +60,11 @@ case "$1" in | |||
60 | msg="probably too old" | 60 | msg="probably too old" |
61 | fi | 61 | fi |
62 | ;; | 62 | ;; |
63 | esac | ||
64 | |||
65 | # If it does not exist, or fails to run (possibly an outdated version), | ||
66 | # try to emulate it. | ||
67 | case "$1" in | ||
63 | 68 | ||
64 | -h|--h|--he|--hel|--help) | 69 | -h|--h|--he|--hel|--help) |
65 | echo "\ | 70 | echo "\ |
@@ -87,12 +92,10 @@ Supported PROGRAM values: | |||
87 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] | 92 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] |
88 | 93 | ||
89 | Send bug reports to <bug-automake@gnu.org>." | 94 | Send bug reports to <bug-automake@gnu.org>." |
90 | exit $? | ||
91 | ;; | 95 | ;; |
92 | 96 | ||
93 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | 97 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
94 | echo "missing $scriptversion (GNU Automake)" | 98 | echo "missing $scriptversion (GNU Automake)" |
95 | exit $? | ||
96 | ;; | 99 | ;; |
97 | 100 | ||
98 | -*) | 101 | -*) |
@@ -101,42 +104,12 @@ Send bug reports to <bug-automake@gnu.org>." | |||
101 | exit 1 | 104 | exit 1 |
102 | ;; | 105 | ;; |
103 | 106 | ||
104 | esac | 107 | aclocal*) |
105 | |||
106 | # Now exit if we have it, but it failed. Also exit now if we | ||
107 | # don't have it and --version was passed (most likely to detect | ||
108 | # the program). | ||
109 | case "$1" in | ||
110 | lex|yacc) | ||
111 | # Not GNU programs, they don't have --version. | ||
112 | ;; | ||
113 | |||
114 | tar) | ||
115 | if test -n "$run"; then | ||
116 | echo 1>&2 "ERROR: \`tar' requires --run" | ||
117 | exit 1 | ||
118 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | ||
119 | exit 1 | ||
120 | fi | ||
121 | ;; | ||
122 | |||
123 | *) | ||
124 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | 108 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then |
125 | # We have it, but it failed. | 109 | # We have it, but it failed. |
126 | exit 1 | 110 | exit 1 |
127 | elif test "x$2" = "x--version" || test "x$2" = "x--help"; then | ||
128 | # Could not run --version or --help. This is probably someone | ||
129 | # running `$TOOL --version' or `$TOOL --help' to check whether | ||
130 | # $TOOL exists and not knowing $TOOL uses missing. | ||
131 | exit 1 | ||
132 | fi | 111 | fi |
133 | ;; | ||
134 | esac | ||
135 | 112 | ||
136 | # If it does not exist, or fails to run (possibly an outdated version), | ||
137 | # try to emulate it. | ||
138 | case "$1" in | ||
139 | aclocal*) | ||
140 | echo 1>&2 "\ | 113 | echo 1>&2 "\ |
141 | WARNING: \`$1' is $msg. You should only need it if | 114 | WARNING: \`$1' is $msg. You should only need it if |
142 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want | 115 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want |
@@ -146,6 +119,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
146 | ;; | 119 | ;; |
147 | 120 | ||
148 | autoconf) | 121 | autoconf) |
122 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
123 | # We have it, but it failed. | ||
124 | exit 1 | ||
125 | fi | ||
126 | |||
149 | echo 1>&2 "\ | 127 | echo 1>&2 "\ |
150 | WARNING: \`$1' is $msg. You should only need it if | 128 | WARNING: \`$1' is $msg. You should only need it if |
151 | you modified \`${configure_ac}'. You might want to install the | 129 | you modified \`${configure_ac}'. You might want to install the |
@@ -155,6 +133,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
155 | ;; | 133 | ;; |
156 | 134 | ||
157 | autoheader) | 135 | autoheader) |
136 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
137 | # We have it, but it failed. | ||
138 | exit 1 | ||
139 | fi | ||
140 | |||
158 | echo 1>&2 "\ | 141 | echo 1>&2 "\ |
159 | WARNING: \`$1' is $msg. You should only need it if | 142 | WARNING: \`$1' is $msg. You should only need it if |
160 | you modified \`acconfig.h' or \`${configure_ac}'. You might want | 143 | you modified \`acconfig.h' or \`${configure_ac}'. You might want |
@@ -174,6 +157,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
174 | ;; | 157 | ;; |
175 | 158 | ||
176 | automake*) | 159 | automake*) |
160 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
161 | # We have it, but it failed. | ||
162 | exit 1 | ||
163 | fi | ||
164 | |||
177 | echo 1>&2 "\ | 165 | echo 1>&2 "\ |
178 | WARNING: \`$1' is $msg. You should only need it if | 166 | WARNING: \`$1' is $msg. You should only need it if |
179 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. | 167 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. |
@@ -185,6 +173,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
185 | ;; | 173 | ;; |
186 | 174 | ||
187 | autom4te) | 175 | autom4te) |
176 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
177 | # We have it, but it failed. | ||
178 | exit 1 | ||
179 | fi | ||
180 | |||
188 | echo 1>&2 "\ | 181 | echo 1>&2 "\ |
189 | WARNING: \`$1' is needed, but is $msg. | 182 | WARNING: \`$1' is needed, but is $msg. |
190 | You might have modified some files without having the | 183 | You might have modified some files without having the |
@@ -261,6 +254,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
261 | ;; | 254 | ;; |
262 | 255 | ||
263 | help2man) | 256 | help2man) |
257 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
258 | # We have it, but it failed. | ||
259 | exit 1 | ||
260 | fi | ||
261 | |||
264 | echo 1>&2 "\ | 262 | echo 1>&2 "\ |
265 | WARNING: \`$1' is $msg. You should only need it if | 263 | WARNING: \`$1' is $msg. You should only need it if |
266 | you modified a dependency of a manual page. You may need the | 264 | you modified a dependency of a manual page. You may need the |
@@ -281,6 +279,11 @@ WARNING: \`$1' is $msg. You should only need it if | |||
281 | ;; | 279 | ;; |
282 | 280 | ||
283 | makeinfo) | 281 | makeinfo) |
282 | if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then | ||
283 | # We have makeinfo, but it failed. | ||
284 | exit 1 | ||
285 | fi | ||
286 | |||
284 | echo 1>&2 "\ | 287 | echo 1>&2 "\ |
285 | WARNING: \`$1' is $msg. You should only need it if | 288 | WARNING: \`$1' is $msg. You should only need it if |
286 | you modified a \`.texi' or \`.texinfo' file, or any other file | 289 | you modified a \`.texi' or \`.texinfo' file, or any other file |
@@ -288,23 +291,20 @@ WARNING: \`$1' is $msg. You should only need it if | |||
288 | call might also be the consequence of using a buggy \`make' (AIX, | 291 | call might also be the consequence of using a buggy \`make' (AIX, |
289 | DU, IRIX). You might want to install the \`Texinfo' package or | 292 | DU, IRIX). You might want to install the \`Texinfo' package or |
290 | the \`GNU make' package. Grab either from any GNU archive site." | 293 | the \`GNU make' package. Grab either from any GNU archive site." |
291 | # The file to touch is that specified with -o ... | ||
292 | file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` | 294 | file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` |
293 | if test -z "$file"; then | 295 | if test -z "$file"; then |
294 | # ... or it is the one specified with @setfilename ... | 296 | file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` |
295 | infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` | 297 | file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` |
296 | file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` | ||
297 | # ... or it is derived from the source name (dir/f.texi becomes f.info) | ||
298 | test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info | ||
299 | fi | 298 | fi |
300 | # If the file does not exist, the user really needs makeinfo; | ||
301 | # let's fail without touching anything. | ||
302 | test -f $file || exit 1 | ||
303 | touch $file | 299 | touch $file |
304 | ;; | 300 | ;; |
305 | 301 | ||
306 | tar) | 302 | tar) |
307 | shift | 303 | shift |
304 | if test -n "$run"; then | ||
305 | echo 1>&2 "ERROR: \`tar' requires --run" | ||
306 | exit 1 | ||
307 | fi | ||
308 | 308 | ||
309 | # We have already tried tar in the generic part. | 309 | # We have already tried tar in the generic part. |
310 | # Look for gnutar/gtar before invocation to avoid ugly error | 310 | # Look for gnutar/gtar before invocation to avoid ugly error |