Merge lp:~racb/ubuntu/precise/sslsniff/merge into lp:ubuntu/precise/sslsniff
- Precise (12.04)
- merge
- Merge into precise
Proposed by
Robie Basak
Status: | Merged |
---|---|
Merge reported by: | Dave Walker |
Merged at revision: | not available |
Proposed branch: | lp:~racb/ubuntu/precise/sslsniff/merge |
Merge into: | lp:ubuntu/precise/sslsniff |
Diff against target: |
12030 lines (+11711/-34) 18 files modified
ChangeLog (+5/-0) FingerprintManager.cpp (+2/-1) Makefile.in (+2/-1) README (+5/-9) SSLBridge.cpp (+13/-4) SSLBridge.hpp (+2/-1) certificate/AuthorityCertificateManager.cpp (+13/-3) certificate/AuthorityCertificateManager.hpp (+3/-2) certificate/CertificateManager.hpp (+2/-1) certificate/TargetedCertificateManager.cpp (+8/-4) certificate/TargetedCertificateManager.hpp (+3/-2) config.guess (+1502/-0) config.sub (+1714/-0) configure (+1/-1) configure.ac (+1/-1) debian/changelog (+19/-0) ltmain.sh (+8413/-0) sslsniff.cpp (+3/-4) |
To merge this branch: | bzr merge lp:~racb/ubuntu/precise/sslsniff/merge |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dave Walker (community) | Approve | ||
Review via email: mp+79818@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 6. By Robie Basak
-
Debian fix in 0.8-1 did not fix this problem; see comments in debbugs
#632090. - 7. By Robie Basak
-
Upload to precise, not oneiric.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ChangeLog' |
2 | --- ChangeLog 2009-08-16 22:39:51 +0000 |
3 | +++ ChangeLog 2011-11-14 17:51:24 +0000 |
4 | @@ -1,3 +1,8 @@ |
5 | +sslsniff 0.7 |
6 | +------------ |
7 | +* Fixed networking shuttling bugs (thanks Daniel Roethlisberger) |
8 | +* Added basic interoperability for BSD pf (thanks Daniel Roethlisberger) |
9 | + |
10 | sslsniff 0.6 |
11 | ------------ |
12 | * Added support for null prefix attack vulnerability. |
13 | |
14 | === modified file 'FingerprintManager.cpp' |
15 | --- FingerprintManager.cpp 2009-08-16 22:39:51 +0000 |
16 | +++ FingerprintManager.cpp 2011-11-14 17:51:24 +0000 |
17 | @@ -57,7 +57,8 @@ |
18 | std::vector<std::string>::iterator iter = validAgents.begin(); |
19 | |
20 | while (iter != validAgents.end()) { |
21 | - if (*iter == "ff" && (userAgent->find("Firefox") != std::string::npos) && (userAgent->find("Firefox/3.5") == std::string::npos)) return true; |
22 | + if (*iter == "ff" && (userAgent->find("Firefox") != std::string::npos)) return true; |
23 | + else if (*iter == "ios" && (userAgent->find("iPhone") != std::string::npos)) return true; |
24 | else if (*iter == "ie" && (userAgent->find("MSIE") != std::string::npos)) return true; |
25 | else if (*iter == "safari" && (userAgent->find("Safari") != std::string::npos)) return true; |
26 | else if (*iter == "opera" && (userAgent->find("Opera") != std::string::npos)) return true; |
27 | |
28 | === modified file 'Makefile.in' |
29 | --- Makefile.in 2011-05-14 11:50:59 +0000 |
30 | +++ Makefile.in 2011-11-14 17:51:24 +0000 |
31 | @@ -36,7 +36,8 @@ |
32 | subdir = . |
33 | DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ |
34 | $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ |
35 | - ChangeLog INSTALL NEWS depcomp install-sh missing |
36 | + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ |
37 | + install-sh ltmain.sh missing |
38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
39 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac |
40 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
41 | |
42 | === modified file 'README' |
43 | --- README 2011-05-14 11:50:59 +0000 |
44 | +++ README 2011-11-14 17:51:24 +0000 |
45 | @@ -1,4 +1,4 @@ |
46 | -sslsniff v0.7 |
47 | +sslsniff v0.8 |
48 | Moxie Marlinspike <moxie@thoughtcrime.org> |
49 | ------------------------------------ |
50 | |
51 | @@ -7,14 +7,14 @@ |
52 | |
53 | The three steps to get this running are: |
54 | |
55 | - * Download and run sslsniff-0.6.tar.gz |
56 | + * Download and run sslsniff-0.8.tar.gz |
57 | * Setup iptables (or pf on BSD) |
58 | * Run arpspoof (or whatever method you'd like to use to redirect traffic). |
59 | |
60 | Installing sslsniff |
61 | ------------------- |
62 | |
63 | - * Unpack sslsniff-0.6.tar.gz, run "./configure" and "make". (You'll have |
64 | + * Unpack sslsniff-0.8.tar.gz, run "./configure" and "make". (You'll have |
65 | to make some changes to build on BSD systems, see below under "Setting up |
66 | pf") |
67 | * There are two ways to run this: in "authority" mode or "targeted" mode. |
68 | @@ -32,7 +32,7 @@ |
69 | instead of a CA cert. |
70 | |
71 | You would run sslsniff as: |
72 | - ./sslsniff -a -p <$listenPort> -w <$logFile> -c <$caCert> |
73 | + ./sslsniff -a -s <$listenPort> -w <$logFile> -c <$caCert> |
74 | |
75 | Targeted Mode: |
76 | |
77 | @@ -47,7 +47,7 @@ |
78 | wildcard cert remains) |
79 | |
80 | You would run sslsniff as: |
81 | - ./sslsniff -t -p <$listenPort> -w <$logFile> -m IPSCACLASEA1.crt \ |
82 | + ./sslsniff -t -s <$listenPort> -w <$logFile> -m IPSCACLASEA1.crt \ |
83 | -c <$certDir> |
84 | |
85 | Other options: |
86 | @@ -134,7 +134,3 @@ |
87 | (targeted certificate mode), or it dynamically forges a certificate and signs |
88 | it with your authoritative certificate (authority mode). |
89 | |
90 | -Thanks |
91 | ------------------ |
92 | - |
93 | -Jake Appelbaum for suggestions with this README. |
94 | \ No newline at end of file |
95 | |
96 | === modified file 'SSLBridge.cpp' |
97 | --- SSLBridge.cpp 2011-05-14 11:50:59 +0000 |
98 | +++ SSLBridge.cpp 2011-11-14 17:51:24 +0000 |
99 | @@ -26,7 +26,7 @@ |
100 | return SSL_get_peer_certificate(serverSession); |
101 | } |
102 | |
103 | -void SSLBridge::buildClientContext(SSL_CTX *context, Certificate *leaf, Certificate *chain) { |
104 | +void SSLBridge::buildClientContext(SSL_CTX *context, Certificate *leaf, std::list<Certificate*> *chain) { |
105 | |
106 | SSL_CTX_sess_set_new_cb(context, &SessionCache::setNewSessionIdTramp); |
107 | SSL_CTX_sess_set_get_cb(context, &SessionCache::getSessionIdTramp); |
108 | @@ -39,8 +39,15 @@ |
109 | throw SSLConnectionError(); |
110 | } |
111 | |
112 | - if (chain != NULL) |
113 | - SSL_CTX_add_extra_chain_cert(context, chain->getCert()); |
114 | + std::list<Certificate*>::iterator i = chain->begin(); |
115 | + std::list<Certificate*>::iterator end = chain->end(); |
116 | + |
117 | + for (;i != end; i++) { |
118 | + SSL_CTX_add_extra_chain_cert(context, (*i)->getCert()); |
119 | + } |
120 | + |
121 | + // if (chain != NULL) |
122 | + // SSL_CTX_add_extra_chain_cert(context, chain->getCert()); |
123 | |
124 | SSL_CTX_set_mode(context, SSL_MODE_AUTO_RETRY); |
125 | } |
126 | @@ -64,7 +71,9 @@ |
127 | } |
128 | |
129 | void SSLBridge::handshakeWithClient(CertificateManager &manager, bool wildcardOK) { |
130 | - Certificate *leaf, *chain; |
131 | + Certificate *leaf; |
132 | + std::list<Certificate*> *chain; |
133 | + |
134 | ip::tcp::endpoint endpoint = getRemoteEndpoint(); |
135 | manager.getCertificateForTarget(endpoint, wildcardOK, getServerCertificate(), &leaf, &chain); |
136 | |
137 | |
138 | === modified file 'SSLBridge.hpp' |
139 | --- SSLBridge.hpp 2009-08-16 22:39:51 +0000 |
140 | +++ SSLBridge.hpp 2011-11-14 17:51:24 +0000 |
141 | @@ -34,6 +34,7 @@ |
142 | #include <sys/types.h> |
143 | #include <netinet/in.h> |
144 | #include <arpa/inet.h> |
145 | +#include <list> |
146 | #include <map> |
147 | |
148 | #include "util/Util.hpp" |
149 | @@ -71,7 +72,7 @@ |
150 | SessionCache *cache; |
151 | |
152 | X509* getServerCertificate(); |
153 | - void buildClientContext(SSL_CTX *context, Certificate *leaf, Certificate *chain); |
154 | + void buildClientContext(SSL_CTX *context, Certificate *leaf, std::list<Certificate*> *chain); |
155 | int isAvailable(int revents); |
156 | int isClosed(int revents); |
157 | int forwardData(SSL *from, SSL *to); |
158 | |
159 | === modified file 'certificate/AuthorityCertificateManager.cpp' |
160 | --- certificate/AuthorityCertificateManager.cpp 2009-08-16 22:39:51 +0000 |
161 | +++ certificate/AuthorityCertificateManager.cpp 2011-11-14 17:51:24 +0000 |
162 | @@ -20,9 +20,18 @@ |
163 | #include "AuthorityCertificateManager.hpp" |
164 | |
165 | |
166 | -AuthorityCertificateManager::AuthorityCertificateManager(std::string &file) { |
167 | +AuthorityCertificateManager::AuthorityCertificateManager(std::string &file, std::string &chain) { |
168 | path certPath(file); |
169 | + path chainPath(chain); |
170 | + |
171 | this->authority = readCredentialsFromFile(certPath, false); |
172 | + chainList.push_back(this->authority); |
173 | + |
174 | + if (!chain.empty()) { |
175 | + Certificate *chain = readCredentialsFromFile(chainPath, false); |
176 | + chainList.push_back(chain); |
177 | + } |
178 | + |
179 | this->leafPair = buildKeysForClient(); |
180 | } |
181 | |
182 | @@ -41,7 +50,7 @@ |
183 | bool wildcardOK, |
184 | X509 *serverCertificate, |
185 | Certificate **cert, |
186 | - Certificate **chain) |
187 | + std::list<Certificate*> **chainList) |
188 | { |
189 | X509_NAME *serverName = X509_get_subject_name(serverCertificate); |
190 | X509_NAME *issuerName = X509_get_subject_name(authority->getCert()); |
191 | @@ -63,7 +72,8 @@ |
192 | leaf->setKey(this->leafPair); |
193 | |
194 | *cert = leaf; |
195 | - *chain = this->authority; |
196 | + *chainList = &(this->chainList); |
197 | + // *chain = this->authority; |
198 | } |
199 | |
200 | unsigned int AuthorityCertificateManager::generateRandomSerial() { |
201 | |
202 | === modified file 'certificate/AuthorityCertificateManager.hpp' |
203 | --- certificate/AuthorityCertificateManager.hpp 2009-08-16 22:39:51 +0000 |
204 | +++ certificate/AuthorityCertificateManager.hpp 2011-11-14 17:51:24 +0000 |
205 | @@ -37,19 +37,20 @@ |
206 | |
207 | private: |
208 | Certificate *authority; |
209 | + std::list<Certificate*> chainList; |
210 | EVP_PKEY *leafPair; |
211 | |
212 | EVP_PKEY* buildKeysForClient(); |
213 | unsigned int generateRandomSerial(); |
214 | |
215 | public: |
216 | - AuthorityCertificateManager(std::string &file); |
217 | + AuthorityCertificateManager(std::string &file, std::string &chain); |
218 | |
219 | virtual bool isOCSPAddress(boost::asio::ip::tcp::endpoint &endpoint); |
220 | virtual void getCertificateForTarget(boost::asio::ip::tcp::endpoint &endpoint, |
221 | bool wildcardOK, |
222 | X509 *serverCertificate, |
223 | - Certificate **cert, Certificate **chain); |
224 | + Certificate **cert, std::list<Certificate*> **chain); |
225 | |
226 | virtual bool isValidTarget(boost::asio::ip::tcp::endpoint &endpoint, bool wildcardOK); |
227 | |
228 | |
229 | === modified file 'certificate/CertificateManager.hpp' |
230 | --- certificate/CertificateManager.hpp 2009-08-16 22:39:51 +0000 |
231 | +++ certificate/CertificateManager.hpp 2011-11-14 17:51:24 +0000 |
232 | @@ -28,6 +28,7 @@ |
233 | #include <openssl/rand.h> |
234 | |
235 | #include <string> |
236 | +#include <list> |
237 | #include <boost/filesystem.hpp> |
238 | #include <boost/asio.hpp> |
239 | |
240 | @@ -43,7 +44,7 @@ |
241 | virtual void getCertificateForTarget(boost::asio::ip::tcp::endpoint &endpoint, |
242 | bool wildcardOK, |
243 | X509 *serverCertificate, Certificate **cert, |
244 | - Certificate **chain) = 0; |
245 | + std::list<Certificate*> **chainCerts) = 0; |
246 | |
247 | protected: |
248 | Certificate* readCredentialsFromFile(const path &file, bool resolve); |
249 | |
250 | === modified file 'certificate/TargetedCertificateManager.cpp' |
251 | --- certificate/TargetedCertificateManager.cpp 2009-08-16 22:39:51 +0000 |
252 | +++ certificate/TargetedCertificateManager.cpp 2011-11-14 17:51:24 +0000 |
253 | @@ -39,8 +39,11 @@ |
254 | path chainPath(chain); |
255 | |
256 | if (!exists(certDir)) throw NoCertificateDirectoryException(); |
257 | - if (chain.empty()) this->chain = NULL; |
258 | - else this->chain = readCredentialsFromFile(chainPath, false); |
259 | + |
260 | + if (!chain.empty()) { |
261 | + Certificate *chain = readCredentialsFromFile(chainPath, false); |
262 | + chainList.push_back(chain); |
263 | + } |
264 | |
265 | directory_iterator end_itr; |
266 | |
267 | @@ -89,10 +92,11 @@ |
268 | bool wildcardOK, |
269 | X509 *serverCertificate, |
270 | Certificate **cert, |
271 | - Certificate **chain) |
272 | + std::list<Certificate*> **chainList) |
273 | { |
274 | boost::asio::ip::address address = endpoint.address(); |
275 | - *chain = this->chain; |
276 | + *chainList = &(this->chainList); |
277 | + // *chain = this->chain; |
278 | |
279 | std::list<Certificate*>::iterator i = certificates.begin(); |
280 | std::list<Certificate*>::iterator end = certificates.end(); |
281 | |
282 | === modified file 'certificate/TargetedCertificateManager.hpp' |
283 | --- certificate/TargetedCertificateManager.hpp 2009-08-16 22:39:51 +0000 |
284 | +++ certificate/TargetedCertificateManager.hpp 2011-11-14 17:51:24 +0000 |
285 | @@ -39,7 +39,8 @@ |
286 | class TargetedCertificateManager : public CertificateManager { |
287 | |
288 | private: |
289 | - Certificate *chain; |
290 | + // Certificate *chain; |
291 | + std::list<Certificate*> chainList; |
292 | std::list<Certificate*> certificates; |
293 | |
294 | public: |
295 | @@ -54,7 +55,7 @@ |
296 | bool wildcardOK, |
297 | X509 *serverCertificate, |
298 | Certificate **cert, |
299 | - Certificate **chain); |
300 | + std::list<Certificate*> **chainCerts); |
301 | |
302 | }; |
303 | |
304 | |
305 | === added file 'config.guess' |
306 | --- config.guess 1970-01-01 00:00:00 +0000 |
307 | +++ config.guess 2011-11-14 17:51:24 +0000 |
308 | @@ -0,0 +1,1502 @@ |
309 | +#! /bin/sh |
310 | +# Attempt to guess a canonical system name. |
311 | +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
312 | +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
313 | +# Free Software Foundation, Inc. |
314 | + |
315 | +timestamp='2009-12-30' |
316 | + |
317 | +# This file is free software; you can redistribute it and/or modify it |
318 | +# under the terms of the GNU General Public License as published by |
319 | +# the Free Software Foundation; either version 2 of the License, or |
320 | +# (at your option) any later version. |
321 | +# |
322 | +# This program is distributed in the hope that it will be useful, but |
323 | +# WITHOUT ANY WARRANTY; without even the implied warranty of |
324 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
325 | +# General Public License for more details. |
326 | +# |
327 | +# You should have received a copy of the GNU General Public License |
328 | +# along with this program; if not, write to the Free Software |
329 | +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA |
330 | +# 02110-1301, USA. |
331 | +# |
332 | +# As a special exception to the GNU General Public License, if you |
333 | +# distribute this file as part of a program that contains a |
334 | +# configuration script generated by Autoconf, you may include it under |
335 | +# the same distribution terms that you use for the rest of that program. |
336 | + |
337 | + |
338 | +# Originally written by Per Bothner. Please send patches (context |
339 | +# diff format) to <config-patches@gnu.org> and include a ChangeLog |
340 | +# entry. |
341 | +# |
342 | +# This script attempts to guess a canonical system name similar to |
343 | +# config.sub. If it succeeds, it prints the system name on stdout, and |
344 | +# exits with 0. Otherwise, it exits with 1. |
345 | +# |
346 | +# You can get the latest version of this script from: |
347 | +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
348 | + |
349 | +me=`echo "$0" | sed -e 's,.*/,,'` |
350 | + |
351 | +usage="\ |
352 | +Usage: $0 [OPTION] |
353 | + |
354 | +Output the configuration name of the system \`$me' is run on. |
355 | + |
356 | +Operation modes: |
357 | + -h, --help print this help, then exit |
358 | + -t, --time-stamp print date of last modification, then exit |
359 | + -v, --version print version number, then exit |
360 | + |
361 | +Report bugs and patches to <config-patches@gnu.org>." |
362 | + |
363 | +version="\ |
364 | +GNU config.guess ($timestamp) |
365 | + |
366 | +Originally written by Per Bothner. |
367 | +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
368 | +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free |
369 | +Software Foundation, Inc. |
370 | + |
371 | +This is free software; see the source for copying conditions. There is NO |
372 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
373 | + |
374 | +help=" |
375 | +Try \`$me --help' for more information." |
376 | + |
377 | +# Parse command line |
378 | +while test $# -gt 0 ; do |
379 | + case $1 in |
380 | + --time-stamp | --time* | -t ) |
381 | + echo "$timestamp" ; exit ;; |
382 | + --version | -v ) |
383 | + echo "$version" ; exit ;; |
384 | + --help | --h* | -h ) |
385 | + echo "$usage"; exit ;; |
386 | + -- ) # Stop option processing |
387 | + shift; break ;; |
388 | + - ) # Use stdin as input. |
389 | + break ;; |
390 | + -* ) |
391 | + echo "$me: invalid option $1$help" >&2 |
392 | + exit 1 ;; |
393 | + * ) |
394 | + break ;; |
395 | + esac |
396 | +done |
397 | + |
398 | +if test $# != 0; then |
399 | + echo "$me: too many arguments$help" >&2 |
400 | + exit 1 |
401 | +fi |
402 | + |
403 | +trap 'exit 1' 1 2 15 |
404 | + |
405 | +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
406 | +# compiler to aid in system detection is discouraged as it requires |
407 | +# temporary files to be created and, as you can see below, it is a |
408 | +# headache to deal with in a portable fashion. |
409 | + |
410 | +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
411 | +# use `HOST_CC' if defined, but it is deprecated. |
412 | + |
413 | +# Portable tmp directory creation inspired by the Autoconf team. |
414 | + |
415 | +set_cc_for_build=' |
416 | +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; |
417 | +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; |
418 | +: ${TMPDIR=/tmp} ; |
419 | + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
420 | + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || |
421 | + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || |
422 | + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; |
423 | +dummy=$tmp/dummy ; |
424 | +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; |
425 | +case $CC_FOR_BUILD,$HOST_CC,$CC in |
426 | + ,,) echo "int x;" > $dummy.c ; |
427 | + for c in cc gcc c89 c99 ; do |
428 | + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then |
429 | + CC_FOR_BUILD="$c"; break ; |
430 | + fi ; |
431 | + done ; |
432 | + if test x"$CC_FOR_BUILD" = x ; then |
433 | + CC_FOR_BUILD=no_compiler_found ; |
434 | + fi |
435 | + ;; |
436 | + ,,*) CC_FOR_BUILD=$CC ;; |
437 | + ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
438 | +esac ; set_cc_for_build= ;' |
439 | + |
440 | +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
441 | +# (ghazi@noc.rutgers.edu 1994-08-24) |
442 | +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
443 | + PATH=$PATH:/.attbin ; export PATH |
444 | +fi |
445 | + |
446 | +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
447 | +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
448 | +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
449 | +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
450 | + |
451 | +# Note: order is significant - the case branches are not exclusive. |
452 | + |
453 | +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
454 | + *:NetBSD:*:*) |
455 | + # NetBSD (nbsd) targets should (where applicable) match one or |
456 | + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
457 | + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
458 | + # switched to ELF, *-*-netbsd* would select the old |
459 | + # object file format. This provides both forward |
460 | + # compatibility and a consistent mechanism for selecting the |
461 | + # object file format. |
462 | + # |
463 | + # Note: NetBSD doesn't particularly care about the vendor |
464 | + # portion of the name. We always set it to "unknown". |
465 | + sysctl="sysctl -n hw.machine_arch" |
466 | + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
467 | + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
468 | + case "${UNAME_MACHINE_ARCH}" in |
469 | + armeb) machine=armeb-unknown ;; |
470 | + arm*) machine=arm-unknown ;; |
471 | + sh3el) machine=shl-unknown ;; |
472 | + sh3eb) machine=sh-unknown ;; |
473 | + sh5el) machine=sh5le-unknown ;; |
474 | + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
475 | + esac |
476 | + # The Operating System including object format, if it has switched |
477 | + # to ELF recently, or will in the future. |
478 | + case "${UNAME_MACHINE_ARCH}" in |
479 | + arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
480 | + eval $set_cc_for_build |
481 | + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
482 | + | grep -q __ELF__ |
483 | + then |
484 | + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
485 | + # Return netbsd for either. FIX? |
486 | + os=netbsd |
487 | + else |
488 | + os=netbsdelf |
489 | + fi |
490 | + ;; |
491 | + *) |
492 | + os=netbsd |
493 | + ;; |
494 | + esac |
495 | + # The OS release |
496 | + # Debian GNU/NetBSD machines have a different userland, and |
497 | + # thus, need a distinct triplet. However, they do not need |
498 | + # kernel version information, so it can be replaced with a |
499 | + # suitable tag, in the style of linux-gnu. |
500 | + case "${UNAME_VERSION}" in |
501 | + Debian*) |
502 | + release='-gnu' |
503 | + ;; |
504 | + *) |
505 | + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
506 | + ;; |
507 | + esac |
508 | + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
509 | + # contains redundant information, the shorter form: |
510 | + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
511 | + echo "${machine}-${os}${release}" |
512 | + exit ;; |
513 | + *:OpenBSD:*:*) |
514 | + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
515 | + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} |
516 | + exit ;; |
517 | + *:ekkoBSD:*:*) |
518 | + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} |
519 | + exit ;; |
520 | + *:SolidBSD:*:*) |
521 | + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} |
522 | + exit ;; |
523 | + macppc:MirBSD:*:*) |
524 | + echo powerpc-unknown-mirbsd${UNAME_RELEASE} |
525 | + exit ;; |
526 | + *:MirBSD:*:*) |
527 | + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} |
528 | + exit ;; |
529 | + alpha:OSF1:*:*) |
530 | + case $UNAME_RELEASE in |
531 | + *4.0) |
532 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
533 | + ;; |
534 | + *5.*) |
535 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
536 | + ;; |
537 | + esac |
538 | + # According to Compaq, /usr/sbin/psrinfo has been available on |
539 | + # OSF/1 and Tru64 systems produced since 1995. I hope that |
540 | + # covers most systems running today. This code pipes the CPU |
541 | + # types through head -n 1, so we only detect the type of CPU 0. |
542 | + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
543 | + case "$ALPHA_CPU_TYPE" in |
544 | + "EV4 (21064)") |
545 | + UNAME_MACHINE="alpha" ;; |
546 | + "EV4.5 (21064)") |
547 | + UNAME_MACHINE="alpha" ;; |
548 | + "LCA4 (21066/21068)") |
549 | + UNAME_MACHINE="alpha" ;; |
550 | + "EV5 (21164)") |
551 | + UNAME_MACHINE="alphaev5" ;; |
552 | + "EV5.6 (21164A)") |
553 | + UNAME_MACHINE="alphaev56" ;; |
554 | + "EV5.6 (21164PC)") |
555 | + UNAME_MACHINE="alphapca56" ;; |
556 | + "EV5.7 (21164PC)") |
557 | + UNAME_MACHINE="alphapca57" ;; |
558 | + "EV6 (21264)") |
559 | + UNAME_MACHINE="alphaev6" ;; |
560 | + "EV6.7 (21264A)") |
561 | + UNAME_MACHINE="alphaev67" ;; |
562 | + "EV6.8CB (21264C)") |
563 | + UNAME_MACHINE="alphaev68" ;; |
564 | + "EV6.8AL (21264B)") |
565 | + UNAME_MACHINE="alphaev68" ;; |
566 | + "EV6.8CX (21264D)") |
567 | + UNAME_MACHINE="alphaev68" ;; |
568 | + "EV6.9A (21264/EV69A)") |
569 | + UNAME_MACHINE="alphaev69" ;; |
570 | + "EV7 (21364)") |
571 | + UNAME_MACHINE="alphaev7" ;; |
572 | + "EV7.9 (21364A)") |
573 | + UNAME_MACHINE="alphaev79" ;; |
574 | + esac |
575 | + # A Pn.n version is a patched version. |
576 | + # A Vn.n version is a released version. |
577 | + # A Tn.n version is a released field test version. |
578 | + # A Xn.n version is an unreleased experimental baselevel. |
579 | + # 1.2 uses "1.2" for uname -r. |
580 | + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
581 | + exit ;; |
582 | + Alpha\ *:Windows_NT*:*) |
583 | + # How do we know it's Interix rather than the generic POSIX subsystem? |
584 | + # Should we change UNAME_MACHINE based on the output of uname instead |
585 | + # of the specific Alpha model? |
586 | + echo alpha-pc-interix |
587 | + exit ;; |
588 | + 21064:Windows_NT:50:3) |
589 | + echo alpha-dec-winnt3.5 |
590 | + exit ;; |
591 | + Amiga*:UNIX_System_V:4.0:*) |
592 | + echo m68k-unknown-sysv4 |
593 | + exit ;; |
594 | + *:[Aa]miga[Oo][Ss]:*:*) |
595 | + echo ${UNAME_MACHINE}-unknown-amigaos |
596 | + exit ;; |
597 | + *:[Mm]orph[Oo][Ss]:*:*) |
598 | + echo ${UNAME_MACHINE}-unknown-morphos |
599 | + exit ;; |
600 | + *:OS/390:*:*) |
601 | + echo i370-ibm-openedition |
602 | + exit ;; |
603 | + *:z/VM:*:*) |
604 | + echo s390-ibm-zvmoe |
605 | + exit ;; |
606 | + *:OS400:*:*) |
607 | + echo powerpc-ibm-os400 |
608 | + exit ;; |
609 | + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
610 | + echo arm-acorn-riscix${UNAME_RELEASE} |
611 | + exit ;; |
612 | + arm:riscos:*:*|arm:RISCOS:*:*) |
613 | + echo arm-unknown-riscos |
614 | + exit ;; |
615 | + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
616 | + echo hppa1.1-hitachi-hiuxmpp |
617 | + exit ;; |
618 | + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
619 | + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
620 | + if test "`(/bin/universe) 2>/dev/null`" = att ; then |
621 | + echo pyramid-pyramid-sysv3 |
622 | + else |
623 | + echo pyramid-pyramid-bsd |
624 | + fi |
625 | + exit ;; |
626 | + NILE*:*:*:dcosx) |
627 | + echo pyramid-pyramid-svr4 |
628 | + exit ;; |
629 | + DRS?6000:unix:4.0:6*) |
630 | + echo sparc-icl-nx6 |
631 | + exit ;; |
632 | + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
633 | + case `/usr/bin/uname -p` in |
634 | + sparc) echo sparc-icl-nx7; exit ;; |
635 | + esac ;; |
636 | + s390x:SunOS:*:*) |
637 | + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
638 | + exit ;; |
639 | + sun4H:SunOS:5.*:*) |
640 | + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
641 | + exit ;; |
642 | + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
643 | + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
644 | + exit ;; |
645 | + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
646 | + echo i386-pc-auroraux${UNAME_RELEASE} |
647 | + exit ;; |
648 | + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
649 | + eval $set_cc_for_build |
650 | + SUN_ARCH="i386" |
651 | + # If there is a compiler, see if it is configured for 64-bit objects. |
652 | + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
653 | + # This test works for both compilers. |
654 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
655 | + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
656 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
657 | + grep IS_64BIT_ARCH >/dev/null |
658 | + then |
659 | + SUN_ARCH="x86_64" |
660 | + fi |
661 | + fi |
662 | + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
663 | + exit ;; |
664 | + sun4*:SunOS:6*:*) |
665 | + # According to config.sub, this is the proper way to canonicalize |
666 | + # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
667 | + # it's likely to be more like Solaris than SunOS4. |
668 | + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
669 | + exit ;; |
670 | + sun4*:SunOS:*:*) |
671 | + case "`/usr/bin/arch -k`" in |
672 | + Series*|S4*) |
673 | + UNAME_RELEASE=`uname -v` |
674 | + ;; |
675 | + esac |
676 | + # Japanese Language versions have a version number like `4.1.3-JL'. |
677 | + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` |
678 | + exit ;; |
679 | + sun3*:SunOS:*:*) |
680 | + echo m68k-sun-sunos${UNAME_RELEASE} |
681 | + exit ;; |
682 | + sun*:*:4.2BSD:*) |
683 | + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
684 | + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
685 | + case "`/bin/arch`" in |
686 | + sun3) |
687 | + echo m68k-sun-sunos${UNAME_RELEASE} |
688 | + ;; |
689 | + sun4) |
690 | + echo sparc-sun-sunos${UNAME_RELEASE} |
691 | + ;; |
692 | + esac |
693 | + exit ;; |
694 | + aushp:SunOS:*:*) |
695 | + echo sparc-auspex-sunos${UNAME_RELEASE} |
696 | + exit ;; |
697 | + # The situation for MiNT is a little confusing. The machine name |
698 | + # can be virtually everything (everything which is not |
699 | + # "atarist" or "atariste" at least should have a processor |
700 | + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
701 | + # to the lowercase version "mint" (or "freemint"). Finally |
702 | + # the system name "TOS" denotes a system which is actually not |
703 | + # MiNT. But MiNT is downward compatible to TOS, so this should |
704 | + # be no problem. |
705 | + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
706 | + echo m68k-atari-mint${UNAME_RELEASE} |
707 | + exit ;; |
708 | + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
709 | + echo m68k-atari-mint${UNAME_RELEASE} |
710 | + exit ;; |
711 | + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
712 | + echo m68k-atari-mint${UNAME_RELEASE} |
713 | + exit ;; |
714 | + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
715 | + echo m68k-milan-mint${UNAME_RELEASE} |
716 | + exit ;; |
717 | + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
718 | + echo m68k-hades-mint${UNAME_RELEASE} |
719 | + exit ;; |
720 | + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
721 | + echo m68k-unknown-mint${UNAME_RELEASE} |
722 | + exit ;; |
723 | + m68k:machten:*:*) |
724 | + echo m68k-apple-machten${UNAME_RELEASE} |
725 | + exit ;; |
726 | + powerpc:machten:*:*) |
727 | + echo powerpc-apple-machten${UNAME_RELEASE} |
728 | + exit ;; |
729 | + RISC*:Mach:*:*) |
730 | + echo mips-dec-mach_bsd4.3 |
731 | + exit ;; |
732 | + RISC*:ULTRIX:*:*) |
733 | + echo mips-dec-ultrix${UNAME_RELEASE} |
734 | + exit ;; |
735 | + VAX*:ULTRIX*:*:*) |
736 | + echo vax-dec-ultrix${UNAME_RELEASE} |
737 | + exit ;; |
738 | + 2020:CLIX:*:* | 2430:CLIX:*:*) |
739 | + echo clipper-intergraph-clix${UNAME_RELEASE} |
740 | + exit ;; |
741 | + mips:*:*:UMIPS | mips:*:*:RISCos) |
742 | + eval $set_cc_for_build |
743 | + sed 's/^ //' << EOF >$dummy.c |
744 | +#ifdef __cplusplus |
745 | +#include <stdio.h> /* for printf() prototype */ |
746 | + int main (int argc, char *argv[]) { |
747 | +#else |
748 | + int main (argc, argv) int argc; char *argv[]; { |
749 | +#endif |
750 | + #if defined (host_mips) && defined (MIPSEB) |
751 | + #if defined (SYSTYPE_SYSV) |
752 | + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); |
753 | + #endif |
754 | + #if defined (SYSTYPE_SVR4) |
755 | + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); |
756 | + #endif |
757 | + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) |
758 | + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); |
759 | + #endif |
760 | + #endif |
761 | + exit (-1); |
762 | + } |
763 | +EOF |
764 | + $CC_FOR_BUILD -o $dummy $dummy.c && |
765 | + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && |
766 | + SYSTEM_NAME=`$dummy $dummyarg` && |
767 | + { echo "$SYSTEM_NAME"; exit; } |
768 | + echo mips-mips-riscos${UNAME_RELEASE} |
769 | + exit ;; |
770 | + Motorola:PowerMAX_OS:*:*) |
771 | + echo powerpc-motorola-powermax |
772 | + exit ;; |
773 | + Motorola:*:4.3:PL8-*) |
774 | + echo powerpc-harris-powermax |
775 | + exit ;; |
776 | + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
777 | + echo powerpc-harris-powermax |
778 | + exit ;; |
779 | + Night_Hawk:Power_UNIX:*:*) |
780 | + echo powerpc-harris-powerunix |
781 | + exit ;; |
782 | + m88k:CX/UX:7*:*) |
783 | + echo m88k-harris-cxux7 |
784 | + exit ;; |
785 | + m88k:*:4*:R4*) |
786 | + echo m88k-motorola-sysv4 |
787 | + exit ;; |
788 | + m88k:*:3*:R3*) |
789 | + echo m88k-motorola-sysv3 |
790 | + exit ;; |
791 | + AViiON:dgux:*:*) |
792 | + # DG/UX returns AViiON for all architectures |
793 | + UNAME_PROCESSOR=`/usr/bin/uname -p` |
794 | + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
795 | + then |
796 | + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
797 | + [ ${TARGET_BINARY_INTERFACE}x = x ] |
798 | + then |
799 | + echo m88k-dg-dgux${UNAME_RELEASE} |
800 | + else |
801 | + echo m88k-dg-dguxbcs${UNAME_RELEASE} |
802 | + fi |
803 | + else |
804 | + echo i586-dg-dgux${UNAME_RELEASE} |
805 | + fi |
806 | + exit ;; |
807 | + M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
808 | + echo m88k-dolphin-sysv3 |
809 | + exit ;; |
810 | + M88*:*:R3*:*) |
811 | + # Delta 88k system running SVR3 |
812 | + echo m88k-motorola-sysv3 |
813 | + exit ;; |
814 | + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
815 | + echo m88k-tektronix-sysv3 |
816 | + exit ;; |
817 | + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
818 | + echo m68k-tektronix-bsd |
819 | + exit ;; |
820 | + *:IRIX*:*:*) |
821 | + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` |
822 | + exit ;; |
823 | + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
824 | + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
825 | + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
826 | + i*86:AIX:*:*) |
827 | + echo i386-ibm-aix |
828 | + exit ;; |
829 | + ia64:AIX:*:*) |
830 | + if [ -x /usr/bin/oslevel ] ; then |
831 | + IBM_REV=`/usr/bin/oslevel` |
832 | + else |
833 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
834 | + fi |
835 | + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} |
836 | + exit ;; |
837 | + *:AIX:2:3) |
838 | + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
839 | + eval $set_cc_for_build |
840 | + sed 's/^ //' << EOF >$dummy.c |
841 | + #include <sys/systemcfg.h> |
842 | + |
843 | + main() |
844 | + { |
845 | + if (!__power_pc()) |
846 | + exit(1); |
847 | + puts("powerpc-ibm-aix3.2.5"); |
848 | + exit(0); |
849 | + } |
850 | +EOF |
851 | + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` |
852 | + then |
853 | + echo "$SYSTEM_NAME" |
854 | + else |
855 | + echo rs6000-ibm-aix3.2.5 |
856 | + fi |
857 | + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
858 | + echo rs6000-ibm-aix3.2.4 |
859 | + else |
860 | + echo rs6000-ibm-aix3.2 |
861 | + fi |
862 | + exit ;; |
863 | + *:AIX:*:[456]) |
864 | + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
865 | + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
866 | + IBM_ARCH=rs6000 |
867 | + else |
868 | + IBM_ARCH=powerpc |
869 | + fi |
870 | + if [ -x /usr/bin/oslevel ] ; then |
871 | + IBM_REV=`/usr/bin/oslevel` |
872 | + else |
873 | + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
874 | + fi |
875 | + echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
876 | + exit ;; |
877 | + *:AIX:*:*) |
878 | + echo rs6000-ibm-aix |
879 | + exit ;; |
880 | + ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
881 | + echo romp-ibm-bsd4.4 |
882 | + exit ;; |
883 | + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
884 | + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to |
885 | + exit ;; # report: romp-ibm BSD 4.3 |
886 | + *:BOSX:*:*) |
887 | + echo rs6000-bull-bosx |
888 | + exit ;; |
889 | + DPX/2?00:B.O.S.:*:*) |
890 | + echo m68k-bull-sysv3 |
891 | + exit ;; |
892 | + 9000/[34]??:4.3bsd:1.*:*) |
893 | + echo m68k-hp-bsd |
894 | + exit ;; |
895 | + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
896 | + echo m68k-hp-bsd4.4 |
897 | + exit ;; |
898 | + 9000/[34678]??:HP-UX:*:*) |
899 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
900 | + case "${UNAME_MACHINE}" in |
901 | + 9000/31? ) HP_ARCH=m68000 ;; |
902 | + 9000/[34]?? ) HP_ARCH=m68k ;; |
903 | + 9000/[678][0-9][0-9]) |
904 | + if [ -x /usr/bin/getconf ]; then |
905 | + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
906 | + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
907 | + case "${sc_cpu_version}" in |
908 | + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
909 | + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
910 | + 532) # CPU_PA_RISC2_0 |
911 | + case "${sc_kernel_bits}" in |
912 | + 32) HP_ARCH="hppa2.0n" ;; |
913 | + 64) HP_ARCH="hppa2.0w" ;; |
914 | + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
915 | + esac ;; |
916 | + esac |
917 | + fi |
918 | + if [ "${HP_ARCH}" = "" ]; then |
919 | + eval $set_cc_for_build |
920 | + sed 's/^ //' << EOF >$dummy.c |
921 | + |
922 | + #define _HPUX_SOURCE |
923 | + #include <stdlib.h> |
924 | + #include <unistd.h> |
925 | + |
926 | + int main () |
927 | + { |
928 | + #if defined(_SC_KERNEL_BITS) |
929 | + long bits = sysconf(_SC_KERNEL_BITS); |
930 | + #endif |
931 | + long cpu = sysconf (_SC_CPU_VERSION); |
932 | + |
933 | + switch (cpu) |
934 | + { |
935 | + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
936 | + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
937 | + case CPU_PA_RISC2_0: |
938 | + #if defined(_SC_KERNEL_BITS) |
939 | + switch (bits) |
940 | + { |
941 | + case 64: puts ("hppa2.0w"); break; |
942 | + case 32: puts ("hppa2.0n"); break; |
943 | + default: puts ("hppa2.0"); break; |
944 | + } break; |
945 | + #else /* !defined(_SC_KERNEL_BITS) */ |
946 | + puts ("hppa2.0"); break; |
947 | + #endif |
948 | + default: puts ("hppa1.0"); break; |
949 | + } |
950 | + exit (0); |
951 | + } |
952 | +EOF |
953 | + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
954 | + test -z "$HP_ARCH" && HP_ARCH=hppa |
955 | + fi ;; |
956 | + esac |
957 | + if [ ${HP_ARCH} = "hppa2.0w" ] |
958 | + then |
959 | + eval $set_cc_for_build |
960 | + |
961 | + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
962 | + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
963 | + # generating 64-bit code. GNU and HP use different nomenclature: |
964 | + # |
965 | + # $ CC_FOR_BUILD=cc ./config.guess |
966 | + # => hppa2.0w-hp-hpux11.23 |
967 | + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
968 | + # => hppa64-hp-hpux11.23 |
969 | + |
970 | + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | |
971 | + grep -q __LP64__ |
972 | + then |
973 | + HP_ARCH="hppa2.0w" |
974 | + else |
975 | + HP_ARCH="hppa64" |
976 | + fi |
977 | + fi |
978 | + echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
979 | + exit ;; |
980 | + ia64:HP-UX:*:*) |
981 | + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
982 | + echo ia64-hp-hpux${HPUX_REV} |
983 | + exit ;; |
984 | + 3050*:HI-UX:*:*) |
985 | + eval $set_cc_for_build |
986 | + sed 's/^ //' << EOF >$dummy.c |
987 | + #include <unistd.h> |
988 | + int |
989 | + main () |
990 | + { |
991 | + long cpu = sysconf (_SC_CPU_VERSION); |
992 | + /* The order matters, because CPU_IS_HP_MC68K erroneously returns |
993 | + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct |
994 | + results, however. */ |
995 | + if (CPU_IS_PA_RISC (cpu)) |
996 | + { |
997 | + switch (cpu) |
998 | + { |
999 | + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; |
1000 | + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; |
1001 | + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; |
1002 | + default: puts ("hppa-hitachi-hiuxwe2"); break; |
1003 | + } |
1004 | + } |
1005 | + else if (CPU_IS_HP_MC68K (cpu)) |
1006 | + puts ("m68k-hitachi-hiuxwe2"); |
1007 | + else puts ("unknown-hitachi-hiuxwe2"); |
1008 | + exit (0); |
1009 | + } |
1010 | +EOF |
1011 | + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && |
1012 | + { echo "$SYSTEM_NAME"; exit; } |
1013 | + echo unknown-hitachi-hiuxwe2 |
1014 | + exit ;; |
1015 | + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
1016 | + echo hppa1.1-hp-bsd |
1017 | + exit ;; |
1018 | + 9000/8??:4.3bsd:*:*) |
1019 | + echo hppa1.0-hp-bsd |
1020 | + exit ;; |
1021 | + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
1022 | + echo hppa1.0-hp-mpeix |
1023 | + exit ;; |
1024 | + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
1025 | + echo hppa1.1-hp-osf |
1026 | + exit ;; |
1027 | + hp8??:OSF1:*:*) |
1028 | + echo hppa1.0-hp-osf |
1029 | + exit ;; |
1030 | + i*86:OSF1:*:*) |
1031 | + if [ -x /usr/sbin/sysversion ] ; then |
1032 | + echo ${UNAME_MACHINE}-unknown-osf1mk |
1033 | + else |
1034 | + echo ${UNAME_MACHINE}-unknown-osf1 |
1035 | + fi |
1036 | + exit ;; |
1037 | + parisc*:Lites*:*:*) |
1038 | + echo hppa1.1-hp-lites |
1039 | + exit ;; |
1040 | + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
1041 | + echo c1-convex-bsd |
1042 | + exit ;; |
1043 | + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
1044 | + if getsysinfo -f scalar_acc |
1045 | + then echo c32-convex-bsd |
1046 | + else echo c2-convex-bsd |
1047 | + fi |
1048 | + exit ;; |
1049 | + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
1050 | + echo c34-convex-bsd |
1051 | + exit ;; |
1052 | + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
1053 | + echo c38-convex-bsd |
1054 | + exit ;; |
1055 | + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
1056 | + echo c4-convex-bsd |
1057 | + exit ;; |
1058 | + CRAY*Y-MP:*:*:*) |
1059 | + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
1060 | + exit ;; |
1061 | + CRAY*[A-Z]90:*:*:*) |
1062 | + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
1063 | + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
1064 | + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
1065 | + -e 's/\.[^.]*$/.X/' |
1066 | + exit ;; |
1067 | + CRAY*TS:*:*:*) |
1068 | + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
1069 | + exit ;; |
1070 | + CRAY*T3E:*:*:*) |
1071 | + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
1072 | + exit ;; |
1073 | + CRAY*SV1:*:*:*) |
1074 | + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
1075 | + exit ;; |
1076 | + *:UNICOS/mp:*:*) |
1077 | + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
1078 | + exit ;; |
1079 | + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
1080 | + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
1081 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
1082 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
1083 | + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
1084 | + exit ;; |
1085 | + 5000:UNIX_System_V:4.*:*) |
1086 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
1087 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
1088 | + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
1089 | + exit ;; |
1090 | + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
1091 | + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
1092 | + exit ;; |
1093 | + sparc*:BSD/OS:*:*) |
1094 | + echo sparc-unknown-bsdi${UNAME_RELEASE} |
1095 | + exit ;; |
1096 | + *:BSD/OS:*:*) |
1097 | + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
1098 | + exit ;; |
1099 | + *:FreeBSD:*:*) |
1100 | + case ${UNAME_MACHINE} in |
1101 | + pc98) |
1102 | + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
1103 | + amd64) |
1104 | + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
1105 | + *) |
1106 | + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
1107 | + esac |
1108 | + exit ;; |
1109 | + i*:CYGWIN*:*) |
1110 | + echo ${UNAME_MACHINE}-pc-cygwin |
1111 | + exit ;; |
1112 | + *:MINGW*:*) |
1113 | + echo ${UNAME_MACHINE}-pc-mingw32 |
1114 | + exit ;; |
1115 | + i*:windows32*:*) |
1116 | + # uname -m includes "-pc" on this system. |
1117 | + echo ${UNAME_MACHINE}-mingw32 |
1118 | + exit ;; |
1119 | + i*:PW*:*) |
1120 | + echo ${UNAME_MACHINE}-pc-pw32 |
1121 | + exit ;; |
1122 | + *:Interix*:*) |
1123 | + case ${UNAME_MACHINE} in |
1124 | + x86) |
1125 | + echo i586-pc-interix${UNAME_RELEASE} |
1126 | + exit ;; |
1127 | + authenticamd | genuineintel | EM64T) |
1128 | + echo x86_64-unknown-interix${UNAME_RELEASE} |
1129 | + exit ;; |
1130 | + IA64) |
1131 | + echo ia64-unknown-interix${UNAME_RELEASE} |
1132 | + exit ;; |
1133 | + esac ;; |
1134 | + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
1135 | + echo i${UNAME_MACHINE}-pc-mks |
1136 | + exit ;; |
1137 | + 8664:Windows_NT:*) |
1138 | + echo x86_64-pc-mks |
1139 | + exit ;; |
1140 | + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
1141 | + # How do we know it's Interix rather than the generic POSIX subsystem? |
1142 | + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
1143 | + # UNAME_MACHINE based on the output of uname instead of i386? |
1144 | + echo i586-pc-interix |
1145 | + exit ;; |
1146 | + i*:UWIN*:*) |
1147 | + echo ${UNAME_MACHINE}-pc-uwin |
1148 | + exit ;; |
1149 | + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
1150 | + echo x86_64-unknown-cygwin |
1151 | + exit ;; |
1152 | + p*:CYGWIN*:*) |
1153 | + echo powerpcle-unknown-cygwin |
1154 | + exit ;; |
1155 | + prep*:SunOS:5.*:*) |
1156 | + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
1157 | + exit ;; |
1158 | + *:GNU:*:*) |
1159 | + # the GNU system |
1160 | + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
1161 | + exit ;; |
1162 | + *:GNU/*:*:*) |
1163 | + # other systems with GNU libc and userland |
1164 | + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu |
1165 | + exit ;; |
1166 | + i*86:Minix:*:*) |
1167 | + echo ${UNAME_MACHINE}-pc-minix |
1168 | + exit ;; |
1169 | + alpha:Linux:*:*) |
1170 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
1171 | + EV5) UNAME_MACHINE=alphaev5 ;; |
1172 | + EV56) UNAME_MACHINE=alphaev56 ;; |
1173 | + PCA56) UNAME_MACHINE=alphapca56 ;; |
1174 | + PCA57) UNAME_MACHINE=alphapca56 ;; |
1175 | + EV6) UNAME_MACHINE=alphaev6 ;; |
1176 | + EV67) UNAME_MACHINE=alphaev67 ;; |
1177 | + EV68*) UNAME_MACHINE=alphaev68 ;; |
1178 | + esac |
1179 | + objdump --private-headers /bin/sh | grep -q ld.so.1 |
1180 | + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
1181 | + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
1182 | + exit ;; |
1183 | + arm*:Linux:*:*) |
1184 | + eval $set_cc_for_build |
1185 | + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
1186 | + | grep -q __ARM_EABI__ |
1187 | + then |
1188 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1189 | + else |
1190 | + echo ${UNAME_MACHINE}-unknown-linux-gnueabi |
1191 | + fi |
1192 | + exit ;; |
1193 | + avr32*:Linux:*:*) |
1194 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1195 | + exit ;; |
1196 | + cris:Linux:*:*) |
1197 | + echo cris-axis-linux-gnu |
1198 | + exit ;; |
1199 | + crisv32:Linux:*:*) |
1200 | + echo crisv32-axis-linux-gnu |
1201 | + exit ;; |
1202 | + frv:Linux:*:*) |
1203 | + echo frv-unknown-linux-gnu |
1204 | + exit ;; |
1205 | + i*86:Linux:*:*) |
1206 | + LIBC=gnu |
1207 | + eval $set_cc_for_build |
1208 | + sed 's/^ //' << EOF >$dummy.c |
1209 | + #ifdef __dietlibc__ |
1210 | + LIBC=dietlibc |
1211 | + #endif |
1212 | +EOF |
1213 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` |
1214 | + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" |
1215 | + exit ;; |
1216 | + ia64:Linux:*:*) |
1217 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1218 | + exit ;; |
1219 | + m32r*:Linux:*:*) |
1220 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1221 | + exit ;; |
1222 | + m68*:Linux:*:*) |
1223 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1224 | + exit ;; |
1225 | + mips:Linux:*:* | mips64:Linux:*:*) |
1226 | + eval $set_cc_for_build |
1227 | + sed 's/^ //' << EOF >$dummy.c |
1228 | + #undef CPU |
1229 | + #undef ${UNAME_MACHINE} |
1230 | + #undef ${UNAME_MACHINE}el |
1231 | + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
1232 | + CPU=${UNAME_MACHINE}el |
1233 | + #else |
1234 | + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
1235 | + CPU=${UNAME_MACHINE} |
1236 | + #else |
1237 | + CPU= |
1238 | + #endif |
1239 | + #endif |
1240 | +EOF |
1241 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
1242 | + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
1243 | + ;; |
1244 | + or32:Linux:*:*) |
1245 | + echo or32-unknown-linux-gnu |
1246 | + exit ;; |
1247 | + padre:Linux:*:*) |
1248 | + echo sparc-unknown-linux-gnu |
1249 | + exit ;; |
1250 | + parisc64:Linux:*:* | hppa64:Linux:*:*) |
1251 | + echo hppa64-unknown-linux-gnu |
1252 | + exit ;; |
1253 | + parisc:Linux:*:* | hppa:Linux:*:*) |
1254 | + # Look for CPU level |
1255 | + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1256 | + PA7*) echo hppa1.1-unknown-linux-gnu ;; |
1257 | + PA8*) echo hppa2.0-unknown-linux-gnu ;; |
1258 | + *) echo hppa-unknown-linux-gnu ;; |
1259 | + esac |
1260 | + exit ;; |
1261 | + ppc64:Linux:*:*) |
1262 | + echo powerpc64-unknown-linux-gnu |
1263 | + exit ;; |
1264 | + ppc:Linux:*:*) |
1265 | + echo powerpc-unknown-linux-gnu |
1266 | + exit ;; |
1267 | + s390:Linux:*:* | s390x:Linux:*:*) |
1268 | + echo ${UNAME_MACHINE}-ibm-linux |
1269 | + exit ;; |
1270 | + sh64*:Linux:*:*) |
1271 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1272 | + exit ;; |
1273 | + sh*:Linux:*:*) |
1274 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1275 | + exit ;; |
1276 | + sparc:Linux:*:* | sparc64:Linux:*:*) |
1277 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1278 | + exit ;; |
1279 | + vax:Linux:*:*) |
1280 | + echo ${UNAME_MACHINE}-dec-linux-gnu |
1281 | + exit ;; |
1282 | + x86_64:Linux:*:*) |
1283 | + echo x86_64-unknown-linux-gnu |
1284 | + exit ;; |
1285 | + xtensa*:Linux:*:*) |
1286 | + echo ${UNAME_MACHINE}-unknown-linux-gnu |
1287 | + exit ;; |
1288 | + i*86:DYNIX/ptx:4*:*) |
1289 | + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1290 | + # earlier versions are messed up and put the nodename in both |
1291 | + # sysname and nodename. |
1292 | + echo i386-sequent-sysv4 |
1293 | + exit ;; |
1294 | + i*86:UNIX_SV:4.2MP:2.*) |
1295 | + # Unixware is an offshoot of SVR4, but it has its own version |
1296 | + # number series starting with 2... |
1297 | + # I am not positive that other SVR4 systems won't match this, |
1298 | + # I just have to hope. -- rms. |
1299 | + # Use sysv4.2uw... so that sysv4* matches it. |
1300 | + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1301 | + exit ;; |
1302 | + i*86:OS/2:*:*) |
1303 | + # If we were able to find `uname', then EMX Unix compatibility |
1304 | + # is probably installed. |
1305 | + echo ${UNAME_MACHINE}-pc-os2-emx |
1306 | + exit ;; |
1307 | + i*86:XTS-300:*:STOP) |
1308 | + echo ${UNAME_MACHINE}-unknown-stop |
1309 | + exit ;; |
1310 | + i*86:atheos:*:*) |
1311 | + echo ${UNAME_MACHINE}-unknown-atheos |
1312 | + exit ;; |
1313 | + i*86:syllable:*:*) |
1314 | + echo ${UNAME_MACHINE}-pc-syllable |
1315 | + exit ;; |
1316 | + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
1317 | + echo i386-unknown-lynxos${UNAME_RELEASE} |
1318 | + exit ;; |
1319 | + i*86:*DOS:*:*) |
1320 | + echo ${UNAME_MACHINE}-pc-msdosdjgpp |
1321 | + exit ;; |
1322 | + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) |
1323 | + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` |
1324 | + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
1325 | + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} |
1326 | + else |
1327 | + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
1328 | + fi |
1329 | + exit ;; |
1330 | + i*86:*:5:[678]*) |
1331 | + # UnixWare 7.x, OpenUNIX and OpenServer 6. |
1332 | + case `/bin/uname -X | grep "^Machine"` in |
1333 | + *486*) UNAME_MACHINE=i486 ;; |
1334 | + *Pentium) UNAME_MACHINE=i586 ;; |
1335 | + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
1336 | + esac |
1337 | + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
1338 | + exit ;; |
1339 | + i*86:*:3.2:*) |
1340 | + if test -f /usr/options/cb.name; then |
1341 | + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
1342 | + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL |
1343 | + elif /bin/uname -X 2>/dev/null >/dev/null ; then |
1344 | + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
1345 | + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
1346 | + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
1347 | + && UNAME_MACHINE=i586 |
1348 | + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
1349 | + && UNAME_MACHINE=i686 |
1350 | + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
1351 | + && UNAME_MACHINE=i686 |
1352 | + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
1353 | + else |
1354 | + echo ${UNAME_MACHINE}-pc-sysv32 |
1355 | + fi |
1356 | + exit ;; |
1357 | + pc:*:*:*) |
1358 | + # Left here for compatibility: |
1359 | + # uname -m prints for DJGPP always 'pc', but it prints nothing about |
1360 | + # the processor, so we play safe by assuming i586. |
1361 | + # Note: whatever this is, it MUST be the same as what config.sub |
1362 | + # prints for the "djgpp" host, or else GDB configury will decide that |
1363 | + # this is a cross-build. |
1364 | + echo i586-pc-msdosdjgpp |
1365 | + exit ;; |
1366 | + Intel:Mach:3*:*) |
1367 | + echo i386-pc-mach3 |
1368 | + exit ;; |
1369 | + paragon:*:*:*) |
1370 | + echo i860-intel-osf1 |
1371 | + exit ;; |
1372 | + i860:*:4.*:*) # i860-SVR4 |
1373 | + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
1374 | + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 |
1375 | + else # Add other i860-SVR4 vendors below as they are discovered. |
1376 | + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 |
1377 | + fi |
1378 | + exit ;; |
1379 | + mini*:CTIX:SYS*5:*) |
1380 | + # "miniframe" |
1381 | + echo m68010-convergent-sysv |
1382 | + exit ;; |
1383 | + mc68k:UNIX:SYSTEM5:3.51m) |
1384 | + echo m68k-convergent-sysv |
1385 | + exit ;; |
1386 | + M680?0:D-NIX:5.3:*) |
1387 | + echo m68k-diab-dnix |
1388 | + exit ;; |
1389 | + M68*:*:R3V[5678]*:*) |
1390 | + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
1391 | + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
1392 | + OS_REL='' |
1393 | + test -r /etc/.relid \ |
1394 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1395 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1396 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } |
1397 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1398 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1399 | + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1400 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1401 | + && { echo i486-ncr-sysv4; exit; } ;; |
1402 | + NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
1403 | + OS_REL='.3' |
1404 | + test -r /etc/.relid \ |
1405 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1406 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
1407 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } |
1408 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1409 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } |
1410 | + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
1411 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1412 | + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
1413 | + echo m68k-unknown-lynxos${UNAME_RELEASE} |
1414 | + exit ;; |
1415 | + mc68030:UNIX_System_V:4.*:*) |
1416 | + echo m68k-atari-sysv4 |
1417 | + exit ;; |
1418 | + TSUNAMI:LynxOS:2.*:*) |
1419 | + echo sparc-unknown-lynxos${UNAME_RELEASE} |
1420 | + exit ;; |
1421 | + rs6000:LynxOS:2.*:*) |
1422 | + echo rs6000-unknown-lynxos${UNAME_RELEASE} |
1423 | + exit ;; |
1424 | + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
1425 | + echo powerpc-unknown-lynxos${UNAME_RELEASE} |
1426 | + exit ;; |
1427 | + SM[BE]S:UNIX_SV:*:*) |
1428 | + echo mips-dde-sysv${UNAME_RELEASE} |
1429 | + exit ;; |
1430 | + RM*:ReliantUNIX-*:*:*) |
1431 | + echo mips-sni-sysv4 |
1432 | + exit ;; |
1433 | + RM*:SINIX-*:*:*) |
1434 | + echo mips-sni-sysv4 |
1435 | + exit ;; |
1436 | + *:SINIX-*:*:*) |
1437 | + if uname -p 2>/dev/null >/dev/null ; then |
1438 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1439 | + echo ${UNAME_MACHINE}-sni-sysv4 |
1440 | + else |
1441 | + echo ns32k-sni-sysv |
1442 | + fi |
1443 | + exit ;; |
1444 | + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
1445 | + # says <Richard.M.Bartel@ccMail.Census.GOV> |
1446 | + echo i586-unisys-sysv4 |
1447 | + exit ;; |
1448 | + *:UNIX_System_V:4*:FTX*) |
1449 | + # From Gerald Hewes <hewes@openmarket.com>. |
1450 | + # How about differentiating between stratus architectures? -djm |
1451 | + echo hppa1.1-stratus-sysv4 |
1452 | + exit ;; |
1453 | + *:*:*:FTX*) |
1454 | + # From seanf@swdc.stratus.com. |
1455 | + echo i860-stratus-sysv4 |
1456 | + exit ;; |
1457 | + i*86:VOS:*:*) |
1458 | + # From Paul.Green@stratus.com. |
1459 | + echo ${UNAME_MACHINE}-stratus-vos |
1460 | + exit ;; |
1461 | + *:VOS:*:*) |
1462 | + # From Paul.Green@stratus.com. |
1463 | + echo hppa1.1-stratus-vos |
1464 | + exit ;; |
1465 | + mc68*:A/UX:*:*) |
1466 | + echo m68k-apple-aux${UNAME_RELEASE} |
1467 | + exit ;; |
1468 | + news*:NEWS-OS:6*:*) |
1469 | + echo mips-sony-newsos6 |
1470 | + exit ;; |
1471 | + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1472 | + if [ -d /usr/nec ]; then |
1473 | + echo mips-nec-sysv${UNAME_RELEASE} |
1474 | + else |
1475 | + echo mips-unknown-sysv${UNAME_RELEASE} |
1476 | + fi |
1477 | + exit ;; |
1478 | + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1479 | + echo powerpc-be-beos |
1480 | + exit ;; |
1481 | + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
1482 | + echo powerpc-apple-beos |
1483 | + exit ;; |
1484 | + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
1485 | + echo i586-pc-beos |
1486 | + exit ;; |
1487 | + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
1488 | + echo i586-pc-haiku |
1489 | + exit ;; |
1490 | + SX-4:SUPER-UX:*:*) |
1491 | + echo sx4-nec-superux${UNAME_RELEASE} |
1492 | + exit ;; |
1493 | + SX-5:SUPER-UX:*:*) |
1494 | + echo sx5-nec-superux${UNAME_RELEASE} |
1495 | + exit ;; |
1496 | + SX-6:SUPER-UX:*:*) |
1497 | + echo sx6-nec-superux${UNAME_RELEASE} |
1498 | + exit ;; |
1499 | + SX-7:SUPER-UX:*:*) |
1500 | + echo sx7-nec-superux${UNAME_RELEASE} |
1501 | + exit ;; |
1502 | + SX-8:SUPER-UX:*:*) |
1503 | + echo sx8-nec-superux${UNAME_RELEASE} |
1504 | + exit ;; |
1505 | + SX-8R:SUPER-UX:*:*) |
1506 | + echo sx8r-nec-superux${UNAME_RELEASE} |
1507 | + exit ;; |
1508 | + Power*:Rhapsody:*:*) |
1509 | + echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1510 | + exit ;; |
1511 | + *:Rhapsody:*:*) |
1512 | + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1513 | + exit ;; |
1514 | + *:Darwin:*:*) |
1515 | + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1516 | + case $UNAME_PROCESSOR in |
1517 | + i386) |
1518 | + eval $set_cc_for_build |
1519 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then |
1520 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1521 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1522 | + grep IS_64BIT_ARCH >/dev/null |
1523 | + then |
1524 | + UNAME_PROCESSOR="x86_64" |
1525 | + fi |
1526 | + fi ;; |
1527 | + unknown) UNAME_PROCESSOR=powerpc ;; |
1528 | + esac |
1529 | + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1530 | + exit ;; |
1531 | + *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1532 | + UNAME_PROCESSOR=`uname -p` |
1533 | + if test "$UNAME_PROCESSOR" = "x86"; then |
1534 | + UNAME_PROCESSOR=i386 |
1535 | + UNAME_MACHINE=pc |
1536 | + fi |
1537 | + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
1538 | + exit ;; |
1539 | + *:QNX:*:4*) |
1540 | + echo i386-pc-qnx |
1541 | + exit ;; |
1542 | + NSE-?:NONSTOP_KERNEL:*:*) |
1543 | + echo nse-tandem-nsk${UNAME_RELEASE} |
1544 | + exit ;; |
1545 | + NSR-?:NONSTOP_KERNEL:*:*) |
1546 | + echo nsr-tandem-nsk${UNAME_RELEASE} |
1547 | + exit ;; |
1548 | + *:NonStop-UX:*:*) |
1549 | + echo mips-compaq-nonstopux |
1550 | + exit ;; |
1551 | + BS2000:POSIX*:*:*) |
1552 | + echo bs2000-siemens-sysv |
1553 | + exit ;; |
1554 | + DS/*:UNIX_System_V:*:*) |
1555 | + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} |
1556 | + exit ;; |
1557 | + *:Plan9:*:*) |
1558 | + # "uname -m" is not consistent, so use $cputype instead. 386 |
1559 | + # is converted to i386 for consistency with other x86 |
1560 | + # operating systems. |
1561 | + if test "$cputype" = "386"; then |
1562 | + UNAME_MACHINE=i386 |
1563 | + else |
1564 | + UNAME_MACHINE="$cputype" |
1565 | + fi |
1566 | + echo ${UNAME_MACHINE}-unknown-plan9 |
1567 | + exit ;; |
1568 | + *:TOPS-10:*:*) |
1569 | + echo pdp10-unknown-tops10 |
1570 | + exit ;; |
1571 | + *:TENEX:*:*) |
1572 | + echo pdp10-unknown-tenex |
1573 | + exit ;; |
1574 | + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
1575 | + echo pdp10-dec-tops20 |
1576 | + exit ;; |
1577 | + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
1578 | + echo pdp10-xkl-tops20 |
1579 | + exit ;; |
1580 | + *:TOPS-20:*:*) |
1581 | + echo pdp10-unknown-tops20 |
1582 | + exit ;; |
1583 | + *:ITS:*:*) |
1584 | + echo pdp10-unknown-its |
1585 | + exit ;; |
1586 | + SEI:*:*:SEIUX) |
1587 | + echo mips-sei-seiux${UNAME_RELEASE} |
1588 | + exit ;; |
1589 | + *:DragonFly:*:*) |
1590 | + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1591 | + exit ;; |
1592 | + *:*VMS:*:*) |
1593 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1594 | + case "${UNAME_MACHINE}" in |
1595 | + A*) echo alpha-dec-vms ; exit ;; |
1596 | + I*) echo ia64-dec-vms ; exit ;; |
1597 | + V*) echo vax-dec-vms ; exit ;; |
1598 | + esac ;; |
1599 | + *:XENIX:*:SysV) |
1600 | + echo i386-pc-xenix |
1601 | + exit ;; |
1602 | + i*86:skyos:*:*) |
1603 | + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
1604 | + exit ;; |
1605 | + i*86:rdos:*:*) |
1606 | + echo ${UNAME_MACHINE}-pc-rdos |
1607 | + exit ;; |
1608 | + i*86:AROS:*:*) |
1609 | + echo ${UNAME_MACHINE}-pc-aros |
1610 | + exit ;; |
1611 | +esac |
1612 | + |
1613 | +#echo '(No uname command or uname output not recognized.)' 1>&2 |
1614 | +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 |
1615 | + |
1616 | +eval $set_cc_for_build |
1617 | +cat >$dummy.c <<EOF |
1618 | +#ifdef _SEQUENT_ |
1619 | +# include <sys/types.h> |
1620 | +# include <sys/utsname.h> |
1621 | +#endif |
1622 | +main () |
1623 | +{ |
1624 | +#if defined (sony) |
1625 | +#if defined (MIPSEB) |
1626 | + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
1627 | + I don't know.... */ |
1628 | + printf ("mips-sony-bsd\n"); exit (0); |
1629 | +#else |
1630 | +#include <sys/param.h> |
1631 | + printf ("m68k-sony-newsos%s\n", |
1632 | +#ifdef NEWSOS4 |
1633 | + "4" |
1634 | +#else |
1635 | + "" |
1636 | +#endif |
1637 | + ); exit (0); |
1638 | +#endif |
1639 | +#endif |
1640 | + |
1641 | +#if defined (__arm) && defined (__acorn) && defined (__unix) |
1642 | + printf ("arm-acorn-riscix\n"); exit (0); |
1643 | +#endif |
1644 | + |
1645 | +#if defined (hp300) && !defined (hpux) |
1646 | + printf ("m68k-hp-bsd\n"); exit (0); |
1647 | +#endif |
1648 | + |
1649 | +#if defined (NeXT) |
1650 | +#if !defined (__ARCHITECTURE__) |
1651 | +#define __ARCHITECTURE__ "m68k" |
1652 | +#endif |
1653 | + int version; |
1654 | + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
1655 | + if (version < 4) |
1656 | + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
1657 | + else |
1658 | + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
1659 | + exit (0); |
1660 | +#endif |
1661 | + |
1662 | +#if defined (MULTIMAX) || defined (n16) |
1663 | +#if defined (UMAXV) |
1664 | + printf ("ns32k-encore-sysv\n"); exit (0); |
1665 | +#else |
1666 | +#if defined (CMU) |
1667 | + printf ("ns32k-encore-mach\n"); exit (0); |
1668 | +#else |
1669 | + printf ("ns32k-encore-bsd\n"); exit (0); |
1670 | +#endif |
1671 | +#endif |
1672 | +#endif |
1673 | + |
1674 | +#if defined (__386BSD__) |
1675 | + printf ("i386-pc-bsd\n"); exit (0); |
1676 | +#endif |
1677 | + |
1678 | +#if defined (sequent) |
1679 | +#if defined (i386) |
1680 | + printf ("i386-sequent-dynix\n"); exit (0); |
1681 | +#endif |
1682 | +#if defined (ns32000) |
1683 | + printf ("ns32k-sequent-dynix\n"); exit (0); |
1684 | +#endif |
1685 | +#endif |
1686 | + |
1687 | +#if defined (_SEQUENT_) |
1688 | + struct utsname un; |
1689 | + |
1690 | + uname(&un); |
1691 | + |
1692 | + if (strncmp(un.version, "V2", 2) == 0) { |
1693 | + printf ("i386-sequent-ptx2\n"); exit (0); |
1694 | + } |
1695 | + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
1696 | + printf ("i386-sequent-ptx1\n"); exit (0); |
1697 | + } |
1698 | + printf ("i386-sequent-ptx\n"); exit (0); |
1699 | + |
1700 | +#endif |
1701 | + |
1702 | +#if defined (vax) |
1703 | +# if !defined (ultrix) |
1704 | +# include <sys/param.h> |
1705 | +# if defined (BSD) |
1706 | +# if BSD == 43 |
1707 | + printf ("vax-dec-bsd4.3\n"); exit (0); |
1708 | +# else |
1709 | +# if BSD == 199006 |
1710 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); |
1711 | +# else |
1712 | + printf ("vax-dec-bsd\n"); exit (0); |
1713 | +# endif |
1714 | +# endif |
1715 | +# else |
1716 | + printf ("vax-dec-bsd\n"); exit (0); |
1717 | +# endif |
1718 | +# else |
1719 | + printf ("vax-dec-ultrix\n"); exit (0); |
1720 | +# endif |
1721 | +#endif |
1722 | + |
1723 | +#if defined (alliant) && defined (i860) |
1724 | + printf ("i860-alliant-bsd\n"); exit (0); |
1725 | +#endif |
1726 | + |
1727 | + exit (1); |
1728 | +} |
1729 | +EOF |
1730 | + |
1731 | +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && |
1732 | + { echo "$SYSTEM_NAME"; exit; } |
1733 | + |
1734 | +# Apollos put the system type in the environment. |
1735 | + |
1736 | +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } |
1737 | + |
1738 | +# Convex versions that predate uname can use getsysinfo(1) |
1739 | + |
1740 | +if [ -x /usr/convex/getsysinfo ] |
1741 | +then |
1742 | + case `getsysinfo -f cpu_type` in |
1743 | + c1*) |
1744 | + echo c1-convex-bsd |
1745 | + exit ;; |
1746 | + c2*) |
1747 | + if getsysinfo -f scalar_acc |
1748 | + then echo c32-convex-bsd |
1749 | + else echo c2-convex-bsd |
1750 | + fi |
1751 | + exit ;; |
1752 | + c34*) |
1753 | + echo c34-convex-bsd |
1754 | + exit ;; |
1755 | + c38*) |
1756 | + echo c38-convex-bsd |
1757 | + exit ;; |
1758 | + c4*) |
1759 | + echo c4-convex-bsd |
1760 | + exit ;; |
1761 | + esac |
1762 | +fi |
1763 | + |
1764 | +cat >&2 <<EOF |
1765 | +$0: unable to guess system type |
1766 | + |
1767 | +This script, last modified $timestamp, has failed to recognize |
1768 | +the operating system you are using. It is advised that you |
1769 | +download the most up to date version of the config scripts from |
1770 | + |
1771 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
1772 | +and |
1773 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD |
1774 | + |
1775 | +If the version you run ($0) is already up to date, please |
1776 | +send the following data and any information you think might be |
1777 | +pertinent to <config-patches@gnu.org> in order to provide the needed |
1778 | +information to handle your system. |
1779 | + |
1780 | +config.guess timestamp = $timestamp |
1781 | + |
1782 | +uname -m = `(uname -m) 2>/dev/null || echo unknown` |
1783 | +uname -r = `(uname -r) 2>/dev/null || echo unknown` |
1784 | +uname -s = `(uname -s) 2>/dev/null || echo unknown` |
1785 | +uname -v = `(uname -v) 2>/dev/null || echo unknown` |
1786 | + |
1787 | +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` |
1788 | +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` |
1789 | + |
1790 | +hostinfo = `(hostinfo) 2>/dev/null` |
1791 | +/bin/universe = `(/bin/universe) 2>/dev/null` |
1792 | +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` |
1793 | +/bin/arch = `(/bin/arch) 2>/dev/null` |
1794 | +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` |
1795 | +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` |
1796 | + |
1797 | +UNAME_MACHINE = ${UNAME_MACHINE} |
1798 | +UNAME_RELEASE = ${UNAME_RELEASE} |
1799 | +UNAME_SYSTEM = ${UNAME_SYSTEM} |
1800 | +UNAME_VERSION = ${UNAME_VERSION} |
1801 | +EOF |
1802 | + |
1803 | +exit 1 |
1804 | + |
1805 | +# Local variables: |
1806 | +# eval: (add-hook 'write-file-hooks 'time-stamp) |
1807 | +# time-stamp-start: "timestamp='" |
1808 | +# time-stamp-format: "%:y-%02m-%02d" |
1809 | +# time-stamp-end: "'" |
1810 | +# End: |
1811 | |
1812 | === added file 'config.sub' |
1813 | --- config.sub 1970-01-01 00:00:00 +0000 |
1814 | +++ config.sub 2011-11-14 17:51:24 +0000 |
1815 | @@ -0,0 +1,1714 @@ |
1816 | +#! /bin/sh |
1817 | +# Configuration validation subroutine script. |
1818 | +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
1819 | +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
1820 | +# Free Software Foundation, Inc. |
1821 | + |
1822 | +timestamp='2010-01-22' |
1823 | + |
1824 | +# This file is (in principle) common to ALL GNU software. |
1825 | +# The presence of a machine in this file suggests that SOME GNU software |
1826 | +# can handle that machine. It does not imply ALL GNU software can. |
1827 | +# |
1828 | +# This file is free software; you can redistribute it and/or modify |
1829 | +# it under the terms of the GNU General Public License as published by |
1830 | +# the Free Software Foundation; either version 2 of the License, or |
1831 | +# (at your option) any later version. |
1832 | +# |
1833 | +# This program is distributed in the hope that it will be useful, |
1834 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1835 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1836 | +# GNU General Public License for more details. |
1837 | +# |
1838 | +# You should have received a copy of the GNU General Public License |
1839 | +# along with this program; if not, write to the Free Software |
1840 | +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA |
1841 | +# 02110-1301, USA. |
1842 | +# |
1843 | +# As a special exception to the GNU General Public License, if you |
1844 | +# distribute this file as part of a program that contains a |
1845 | +# configuration script generated by Autoconf, you may include it under |
1846 | +# the same distribution terms that you use for the rest of that program. |
1847 | + |
1848 | + |
1849 | +# Please send patches to <config-patches@gnu.org>. Submit a context |
1850 | +# diff and a properly formatted GNU ChangeLog entry. |
1851 | +# |
1852 | +# Configuration subroutine to validate and canonicalize a configuration type. |
1853 | +# Supply the specified configuration type as an argument. |
1854 | +# If it is invalid, we print an error message on stderr and exit with code 1. |
1855 | +# Otherwise, we print the canonical config type on stdout and succeed. |
1856 | + |
1857 | +# You can get the latest version of this script from: |
1858 | +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD |
1859 | + |
1860 | +# This file is supposed to be the same for all GNU packages |
1861 | +# and recognize all the CPU types, system types and aliases |
1862 | +# that are meaningful with *any* GNU software. |
1863 | +# Each package is responsible for reporting which valid configurations |
1864 | +# it does not support. The user should be able to distinguish |
1865 | +# a failure to support a valid configuration from a meaningless |
1866 | +# configuration. |
1867 | + |
1868 | +# The goal of this file is to map all the various variations of a given |
1869 | +# machine specification into a single specification in the form: |
1870 | +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
1871 | +# or in some cases, the newer four-part form: |
1872 | +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
1873 | +# It is wrong to echo any other type of specification. |
1874 | + |
1875 | +me=`echo "$0" | sed -e 's,.*/,,'` |
1876 | + |
1877 | +usage="\ |
1878 | +Usage: $0 [OPTION] CPU-MFR-OPSYS |
1879 | + $0 [OPTION] ALIAS |
1880 | + |
1881 | +Canonicalize a configuration name. |
1882 | + |
1883 | +Operation modes: |
1884 | + -h, --help print this help, then exit |
1885 | + -t, --time-stamp print date of last modification, then exit |
1886 | + -v, --version print version number, then exit |
1887 | + |
1888 | +Report bugs and patches to <config-patches@gnu.org>." |
1889 | + |
1890 | +version="\ |
1891 | +GNU config.sub ($timestamp) |
1892 | + |
1893 | +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
1894 | +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free |
1895 | +Software Foundation, Inc. |
1896 | + |
1897 | +This is free software; see the source for copying conditions. There is NO |
1898 | +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
1899 | + |
1900 | +help=" |
1901 | +Try \`$me --help' for more information." |
1902 | + |
1903 | +# Parse command line |
1904 | +while test $# -gt 0 ; do |
1905 | + case $1 in |
1906 | + --time-stamp | --time* | -t ) |
1907 | + echo "$timestamp" ; exit ;; |
1908 | + --version | -v ) |
1909 | + echo "$version" ; exit ;; |
1910 | + --help | --h* | -h ) |
1911 | + echo "$usage"; exit ;; |
1912 | + -- ) # Stop option processing |
1913 | + shift; break ;; |
1914 | + - ) # Use stdin as input. |
1915 | + break ;; |
1916 | + -* ) |
1917 | + echo "$me: invalid option $1$help" |
1918 | + exit 1 ;; |
1919 | + |
1920 | + *local*) |
1921 | + # First pass through any local machine types. |
1922 | + echo $1 |
1923 | + exit ;; |
1924 | + |
1925 | + * ) |
1926 | + break ;; |
1927 | + esac |
1928 | +done |
1929 | + |
1930 | +case $# in |
1931 | + 0) echo "$me: missing argument$help" >&2 |
1932 | + exit 1;; |
1933 | + 1) ;; |
1934 | + *) echo "$me: too many arguments$help" >&2 |
1935 | + exit 1;; |
1936 | +esac |
1937 | + |
1938 | +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
1939 | +# Here we must recognize all the valid KERNEL-OS combinations. |
1940 | +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
1941 | +case $maybe_os in |
1942 | + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ |
1943 | + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ |
1944 | + kopensolaris*-gnu* | \ |
1945 | + storm-chaos* | os2-emx* | rtmk-nova*) |
1946 | + os=-$maybe_os |
1947 | + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
1948 | + ;; |
1949 | + *) |
1950 | + basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
1951 | + if [ $basic_machine != $1 ] |
1952 | + then os=`echo $1 | sed 's/.*-/-/'` |
1953 | + else os=; fi |
1954 | + ;; |
1955 | +esac |
1956 | + |
1957 | +### Let's recognize common machines as not being operating systems so |
1958 | +### that things like config.sub decstation-3100 work. We also |
1959 | +### recognize some manufacturers as not being operating systems, so we |
1960 | +### can provide default operating systems below. |
1961 | +case $os in |
1962 | + -sun*os*) |
1963 | + # Prevent following clause from handling this invalid input. |
1964 | + ;; |
1965 | + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
1966 | + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
1967 | + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
1968 | + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
1969 | + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
1970 | + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
1971 | + -apple | -axis | -knuth | -cray | -microblaze) |
1972 | + os= |
1973 | + basic_machine=$1 |
1974 | + ;; |
1975 | + -bluegene*) |
1976 | + os=-cnk |
1977 | + ;; |
1978 | + -sim | -cisco | -oki | -wec | -winbond) |
1979 | + os= |
1980 | + basic_machine=$1 |
1981 | + ;; |
1982 | + -scout) |
1983 | + ;; |
1984 | + -wrs) |
1985 | + os=-vxworks |
1986 | + basic_machine=$1 |
1987 | + ;; |
1988 | + -chorusos*) |
1989 | + os=-chorusos |
1990 | + basic_machine=$1 |
1991 | + ;; |
1992 | + -chorusrdb) |
1993 | + os=-chorusrdb |
1994 | + basic_machine=$1 |
1995 | + ;; |
1996 | + -hiux*) |
1997 | + os=-hiuxwe2 |
1998 | + ;; |
1999 | + -sco6) |
2000 | + os=-sco5v6 |
2001 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2002 | + ;; |
2003 | + -sco5) |
2004 | + os=-sco3.2v5 |
2005 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2006 | + ;; |
2007 | + -sco4) |
2008 | + os=-sco3.2v4 |
2009 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2010 | + ;; |
2011 | + -sco3.2.[4-9]*) |
2012 | + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
2013 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2014 | + ;; |
2015 | + -sco3.2v[4-9]*) |
2016 | + # Don't forget version if it is 3.2v4 or newer. |
2017 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2018 | + ;; |
2019 | + -sco5v6*) |
2020 | + # Don't forget version if it is 3.2v4 or newer. |
2021 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2022 | + ;; |
2023 | + -sco*) |
2024 | + os=-sco3.2v2 |
2025 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2026 | + ;; |
2027 | + -udk*) |
2028 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2029 | + ;; |
2030 | + -isc) |
2031 | + os=-isc2.2 |
2032 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2033 | + ;; |
2034 | + -clix*) |
2035 | + basic_machine=clipper-intergraph |
2036 | + ;; |
2037 | + -isc*) |
2038 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2039 | + ;; |
2040 | + -lynx*) |
2041 | + os=-lynxos |
2042 | + ;; |
2043 | + -ptx*) |
2044 | + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` |
2045 | + ;; |
2046 | + -windowsnt*) |
2047 | + os=`echo $os | sed -e 's/windowsnt/winnt/'` |
2048 | + ;; |
2049 | + -psos*) |
2050 | + os=-psos |
2051 | + ;; |
2052 | + -mint | -mint[0-9]*) |
2053 | + basic_machine=m68k-atari |
2054 | + os=-mint |
2055 | + ;; |
2056 | +esac |
2057 | + |
2058 | +# Decode aliases for certain CPU-COMPANY combinations. |
2059 | +case $basic_machine in |
2060 | + # Recognize the basic CPU types without company name. |
2061 | + # Some are omitted here because they have special meanings below. |
2062 | + 1750a | 580 \ |
2063 | + | a29k \ |
2064 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
2065 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
2066 | + | am33_2.0 \ |
2067 | + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ |
2068 | + | bfin \ |
2069 | + | c4x | clipper \ |
2070 | + | d10v | d30v | dlx | dsp16xx \ |
2071 | + | fido | fr30 | frv \ |
2072 | + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
2073 | + | i370 | i860 | i960 | ia64 \ |
2074 | + | ip2k | iq2000 \ |
2075 | + | lm32 \ |
2076 | + | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
2077 | + | maxq | mb | microblaze | mcore | mep | metag \ |
2078 | + | mips | mipsbe | mipseb | mipsel | mipsle \ |
2079 | + | mips16 \ |
2080 | + | mips64 | mips64el \ |
2081 | + | mips64octeon | mips64octeonel \ |
2082 | + | mips64orion | mips64orionel \ |
2083 | + | mips64r5900 | mips64r5900el \ |
2084 | + | mips64vr | mips64vrel \ |
2085 | + | mips64vr4100 | mips64vr4100el \ |
2086 | + | mips64vr4300 | mips64vr4300el \ |
2087 | + | mips64vr5000 | mips64vr5000el \ |
2088 | + | mips64vr5900 | mips64vr5900el \ |
2089 | + | mipsisa32 | mipsisa32el \ |
2090 | + | mipsisa32r2 | mipsisa32r2el \ |
2091 | + | mipsisa64 | mipsisa64el \ |
2092 | + | mipsisa64r2 | mipsisa64r2el \ |
2093 | + | mipsisa64sb1 | mipsisa64sb1el \ |
2094 | + | mipsisa64sr71k | mipsisa64sr71kel \ |
2095 | + | mipstx39 | mipstx39el \ |
2096 | + | mn10200 | mn10300 \ |
2097 | + | moxie \ |
2098 | + | mt \ |
2099 | + | msp430 \ |
2100 | + | nios | nios2 \ |
2101 | + | ns16k | ns32k \ |
2102 | + | or32 \ |
2103 | + | pdp10 | pdp11 | pj | pjl \ |
2104 | + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
2105 | + | pyramid \ |
2106 | + | rx \ |
2107 | + | score \ |
2108 | + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
2109 | + | sh64 | sh64le \ |
2110 | + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
2111 | + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
2112 | + | spu | strongarm \ |
2113 | + | tahoe | thumb | tic4x | tic80 | tron \ |
2114 | + | ubicom32 \ |
2115 | + | v850 | v850e \ |
2116 | + | we32k \ |
2117 | + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ |
2118 | + | z8k | z80) |
2119 | + basic_machine=$basic_machine-unknown |
2120 | + ;; |
2121 | + m6811 | m68hc11 | m6812 | m68hc12 | picochip) |
2122 | + # Motorola 68HC11/12. |
2123 | + basic_machine=$basic_machine-unknown |
2124 | + os=-none |
2125 | + ;; |
2126 | + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
2127 | + ;; |
2128 | + ms1) |
2129 | + basic_machine=mt-unknown |
2130 | + ;; |
2131 | + |
2132 | + # We use `pc' rather than `unknown' |
2133 | + # because (1) that's what they normally are, and |
2134 | + # (2) the word "unknown" tends to confuse beginning users. |
2135 | + i*86 | x86_64) |
2136 | + basic_machine=$basic_machine-pc |
2137 | + ;; |
2138 | + # Object if more than one company name word. |
2139 | + *-*-*) |
2140 | + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
2141 | + exit 1 |
2142 | + ;; |
2143 | + # Recognize the basic CPU types with company name. |
2144 | + 580-* \ |
2145 | + | a29k-* \ |
2146 | + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ |
2147 | + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ |
2148 | + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ |
2149 | + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
2150 | + | avr-* | avr32-* \ |
2151 | + | bfin-* | bs2000-* \ |
2152 | + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ |
2153 | + | clipper-* | craynv-* | cydra-* \ |
2154 | + | d10v-* | d30v-* | dlx-* \ |
2155 | + | elxsi-* \ |
2156 | + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ |
2157 | + | h8300-* | h8500-* \ |
2158 | + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ |
2159 | + | i*86-* | i860-* | i960-* | ia64-* \ |
2160 | + | ip2k-* | iq2000-* \ |
2161 | + | lm32-* \ |
2162 | + | m32c-* | m32r-* | m32rle-* \ |
2163 | + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
2164 | + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ |
2165 | + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
2166 | + | mips16-* \ |
2167 | + | mips64-* | mips64el-* \ |
2168 | + | mips64octeon-* | mips64octeonel-* \ |
2169 | + | mips64orion-* | mips64orionel-* \ |
2170 | + | mips64r5900-* | mips64r5900el-* \ |
2171 | + | mips64vr-* | mips64vrel-* \ |
2172 | + | mips64vr4100-* | mips64vr4100el-* \ |
2173 | + | mips64vr4300-* | mips64vr4300el-* \ |
2174 | + | mips64vr5000-* | mips64vr5000el-* \ |
2175 | + | mips64vr5900-* | mips64vr5900el-* \ |
2176 | + | mipsisa32-* | mipsisa32el-* \ |
2177 | + | mipsisa32r2-* | mipsisa32r2el-* \ |
2178 | + | mipsisa64-* | mipsisa64el-* \ |
2179 | + | mipsisa64r2-* | mipsisa64r2el-* \ |
2180 | + | mipsisa64sb1-* | mipsisa64sb1el-* \ |
2181 | + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
2182 | + | mipstx39-* | mipstx39el-* \ |
2183 | + | mmix-* \ |
2184 | + | mt-* \ |
2185 | + | msp430-* \ |
2186 | + | nios-* | nios2-* \ |
2187 | + | none-* | np1-* | ns16k-* | ns32k-* \ |
2188 | + | orion-* \ |
2189 | + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
2190 | + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ |
2191 | + | pyramid-* \ |
2192 | + | romp-* | rs6000-* | rx-* \ |
2193 | + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
2194 | + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
2195 | + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
2196 | + | sparclite-* \ |
2197 | + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ |
2198 | + | tahoe-* | thumb-* \ |
2199 | + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ |
2200 | + | tile-* | tilegx-* \ |
2201 | + | tron-* \ |
2202 | + | ubicom32-* \ |
2203 | + | v850-* | v850e-* | vax-* \ |
2204 | + | we32k-* \ |
2205 | + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ |
2206 | + | xstormy16-* | xtensa*-* \ |
2207 | + | ymp-* \ |
2208 | + | z8k-* | z80-*) |
2209 | + ;; |
2210 | + # Recognize the basic CPU types without company name, with glob match. |
2211 | + xtensa*) |
2212 | + basic_machine=$basic_machine-unknown |
2213 | + ;; |
2214 | + # Recognize the various machine names and aliases which stand |
2215 | + # for a CPU type and a company and sometimes even an OS. |
2216 | + 386bsd) |
2217 | + basic_machine=i386-unknown |
2218 | + os=-bsd |
2219 | + ;; |
2220 | + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
2221 | + basic_machine=m68000-att |
2222 | + ;; |
2223 | + 3b*) |
2224 | + basic_machine=we32k-att |
2225 | + ;; |
2226 | + a29khif) |
2227 | + basic_machine=a29k-amd |
2228 | + os=-udi |
2229 | + ;; |
2230 | + abacus) |
2231 | + basic_machine=abacus-unknown |
2232 | + ;; |
2233 | + adobe68k) |
2234 | + basic_machine=m68010-adobe |
2235 | + os=-scout |
2236 | + ;; |
2237 | + alliant | fx80) |
2238 | + basic_machine=fx80-alliant |
2239 | + ;; |
2240 | + altos | altos3068) |
2241 | + basic_machine=m68k-altos |
2242 | + ;; |
2243 | + am29k) |
2244 | + basic_machine=a29k-none |
2245 | + os=-bsd |
2246 | + ;; |
2247 | + amd64) |
2248 | + basic_machine=x86_64-pc |
2249 | + ;; |
2250 | + amd64-*) |
2251 | + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` |
2252 | + ;; |
2253 | + amdahl) |
2254 | + basic_machine=580-amdahl |
2255 | + os=-sysv |
2256 | + ;; |
2257 | + amiga | amiga-*) |
2258 | + basic_machine=m68k-unknown |
2259 | + ;; |
2260 | + amigaos | amigados) |
2261 | + basic_machine=m68k-unknown |
2262 | + os=-amigaos |
2263 | + ;; |
2264 | + amigaunix | amix) |
2265 | + basic_machine=m68k-unknown |
2266 | + os=-sysv4 |
2267 | + ;; |
2268 | + apollo68) |
2269 | + basic_machine=m68k-apollo |
2270 | + os=-sysv |
2271 | + ;; |
2272 | + apollo68bsd) |
2273 | + basic_machine=m68k-apollo |
2274 | + os=-bsd |
2275 | + ;; |
2276 | + aros) |
2277 | + basic_machine=i386-pc |
2278 | + os=-aros |
2279 | + ;; |
2280 | + aux) |
2281 | + basic_machine=m68k-apple |
2282 | + os=-aux |
2283 | + ;; |
2284 | + balance) |
2285 | + basic_machine=ns32k-sequent |
2286 | + os=-dynix |
2287 | + ;; |
2288 | + blackfin) |
2289 | + basic_machine=bfin-unknown |
2290 | + os=-linux |
2291 | + ;; |
2292 | + blackfin-*) |
2293 | + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` |
2294 | + os=-linux |
2295 | + ;; |
2296 | + bluegene*) |
2297 | + basic_machine=powerpc-ibm |
2298 | + os=-cnk |
2299 | + ;; |
2300 | + c90) |
2301 | + basic_machine=c90-cray |
2302 | + os=-unicos |
2303 | + ;; |
2304 | + cegcc) |
2305 | + basic_machine=arm-unknown |
2306 | + os=-cegcc |
2307 | + ;; |
2308 | + convex-c1) |
2309 | + basic_machine=c1-convex |
2310 | + os=-bsd |
2311 | + ;; |
2312 | + convex-c2) |
2313 | + basic_machine=c2-convex |
2314 | + os=-bsd |
2315 | + ;; |
2316 | + convex-c32) |
2317 | + basic_machine=c32-convex |
2318 | + os=-bsd |
2319 | + ;; |
2320 | + convex-c34) |
2321 | + basic_machine=c34-convex |
2322 | + os=-bsd |
2323 | + ;; |
2324 | + convex-c38) |
2325 | + basic_machine=c38-convex |
2326 | + os=-bsd |
2327 | + ;; |
2328 | + cray | j90) |
2329 | + basic_machine=j90-cray |
2330 | + os=-unicos |
2331 | + ;; |
2332 | + craynv) |
2333 | + basic_machine=craynv-cray |
2334 | + os=-unicosmp |
2335 | + ;; |
2336 | + cr16) |
2337 | + basic_machine=cr16-unknown |
2338 | + os=-elf |
2339 | + ;; |
2340 | + crds | unos) |
2341 | + basic_machine=m68k-crds |
2342 | + ;; |
2343 | + crisv32 | crisv32-* | etraxfs*) |
2344 | + basic_machine=crisv32-axis |
2345 | + ;; |
2346 | + cris | cris-* | etrax*) |
2347 | + basic_machine=cris-axis |
2348 | + ;; |
2349 | + crx) |
2350 | + basic_machine=crx-unknown |
2351 | + os=-elf |
2352 | + ;; |
2353 | + da30 | da30-*) |
2354 | + basic_machine=m68k-da30 |
2355 | + ;; |
2356 | + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
2357 | + basic_machine=mips-dec |
2358 | + ;; |
2359 | + decsystem10* | dec10*) |
2360 | + basic_machine=pdp10-dec |
2361 | + os=-tops10 |
2362 | + ;; |
2363 | + decsystem20* | dec20*) |
2364 | + basic_machine=pdp10-dec |
2365 | + os=-tops20 |
2366 | + ;; |
2367 | + delta | 3300 | motorola-3300 | motorola-delta \ |
2368 | + | 3300-motorola | delta-motorola) |
2369 | + basic_machine=m68k-motorola |
2370 | + ;; |
2371 | + delta88) |
2372 | + basic_machine=m88k-motorola |
2373 | + os=-sysv3 |
2374 | + ;; |
2375 | + dicos) |
2376 | + basic_machine=i686-pc |
2377 | + os=-dicos |
2378 | + ;; |
2379 | + djgpp) |
2380 | + basic_machine=i586-pc |
2381 | + os=-msdosdjgpp |
2382 | + ;; |
2383 | + dpx20 | dpx20-*) |
2384 | + basic_machine=rs6000-bull |
2385 | + os=-bosx |
2386 | + ;; |
2387 | + dpx2* | dpx2*-bull) |
2388 | + basic_machine=m68k-bull |
2389 | + os=-sysv3 |
2390 | + ;; |
2391 | + ebmon29k) |
2392 | + basic_machine=a29k-amd |
2393 | + os=-ebmon |
2394 | + ;; |
2395 | + elxsi) |
2396 | + basic_machine=elxsi-elxsi |
2397 | + os=-bsd |
2398 | + ;; |
2399 | + encore | umax | mmax) |
2400 | + basic_machine=ns32k-encore |
2401 | + ;; |
2402 | + es1800 | OSE68k | ose68k | ose | OSE) |
2403 | + basic_machine=m68k-ericsson |
2404 | + os=-ose |
2405 | + ;; |
2406 | + fx2800) |
2407 | + basic_machine=i860-alliant |
2408 | + ;; |
2409 | + genix) |
2410 | + basic_machine=ns32k-ns |
2411 | + ;; |
2412 | + gmicro) |
2413 | + basic_machine=tron-gmicro |
2414 | + os=-sysv |
2415 | + ;; |
2416 | + go32) |
2417 | + basic_machine=i386-pc |
2418 | + os=-go32 |
2419 | + ;; |
2420 | + h3050r* | hiux*) |
2421 | + basic_machine=hppa1.1-hitachi |
2422 | + os=-hiuxwe2 |
2423 | + ;; |
2424 | + h8300hms) |
2425 | + basic_machine=h8300-hitachi |
2426 | + os=-hms |
2427 | + ;; |
2428 | + h8300xray) |
2429 | + basic_machine=h8300-hitachi |
2430 | + os=-xray |
2431 | + ;; |
2432 | + h8500hms) |
2433 | + basic_machine=h8500-hitachi |
2434 | + os=-hms |
2435 | + ;; |
2436 | + harris) |
2437 | + basic_machine=m88k-harris |
2438 | + os=-sysv3 |
2439 | + ;; |
2440 | + hp300-*) |
2441 | + basic_machine=m68k-hp |
2442 | + ;; |
2443 | + hp300bsd) |
2444 | + basic_machine=m68k-hp |
2445 | + os=-bsd |
2446 | + ;; |
2447 | + hp300hpux) |
2448 | + basic_machine=m68k-hp |
2449 | + os=-hpux |
2450 | + ;; |
2451 | + hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
2452 | + basic_machine=hppa1.0-hp |
2453 | + ;; |
2454 | + hp9k2[0-9][0-9] | hp9k31[0-9]) |
2455 | + basic_machine=m68000-hp |
2456 | + ;; |
2457 | + hp9k3[2-9][0-9]) |
2458 | + basic_machine=m68k-hp |
2459 | + ;; |
2460 | + hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
2461 | + basic_machine=hppa1.0-hp |
2462 | + ;; |
2463 | + hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
2464 | + basic_machine=hppa1.1-hp |
2465 | + ;; |
2466 | + hp9k78[0-9] | hp78[0-9]) |
2467 | + # FIXME: really hppa2.0-hp |
2468 | + basic_machine=hppa1.1-hp |
2469 | + ;; |
2470 | + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
2471 | + # FIXME: really hppa2.0-hp |
2472 | + basic_machine=hppa1.1-hp |
2473 | + ;; |
2474 | + hp9k8[0-9][13679] | hp8[0-9][13679]) |
2475 | + basic_machine=hppa1.1-hp |
2476 | + ;; |
2477 | + hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
2478 | + basic_machine=hppa1.0-hp |
2479 | + ;; |
2480 | + hppa-next) |
2481 | + os=-nextstep3 |
2482 | + ;; |
2483 | + hppaosf) |
2484 | + basic_machine=hppa1.1-hp |
2485 | + os=-osf |
2486 | + ;; |
2487 | + hppro) |
2488 | + basic_machine=hppa1.1-hp |
2489 | + os=-proelf |
2490 | + ;; |
2491 | + i370-ibm* | ibm*) |
2492 | + basic_machine=i370-ibm |
2493 | + ;; |
2494 | +# I'm not sure what "Sysv32" means. Should this be sysv3.2? |
2495 | + i*86v32) |
2496 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2497 | + os=-sysv32 |
2498 | + ;; |
2499 | + i*86v4*) |
2500 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2501 | + os=-sysv4 |
2502 | + ;; |
2503 | + i*86v) |
2504 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2505 | + os=-sysv |
2506 | + ;; |
2507 | + i*86sol2) |
2508 | + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
2509 | + os=-solaris2 |
2510 | + ;; |
2511 | + i386mach) |
2512 | + basic_machine=i386-mach |
2513 | + os=-mach |
2514 | + ;; |
2515 | + i386-vsta | vsta) |
2516 | + basic_machine=i386-unknown |
2517 | + os=-vsta |
2518 | + ;; |
2519 | + iris | iris4d) |
2520 | + basic_machine=mips-sgi |
2521 | + case $os in |
2522 | + -irix*) |
2523 | + ;; |
2524 | + *) |
2525 | + os=-irix4 |
2526 | + ;; |
2527 | + esac |
2528 | + ;; |
2529 | + isi68 | isi) |
2530 | + basic_machine=m68k-isi |
2531 | + os=-sysv |
2532 | + ;; |
2533 | + m68knommu) |
2534 | + basic_machine=m68k-unknown |
2535 | + os=-linux |
2536 | + ;; |
2537 | + m68knommu-*) |
2538 | + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` |
2539 | + os=-linux |
2540 | + ;; |
2541 | + m88k-omron*) |
2542 | + basic_machine=m88k-omron |
2543 | + ;; |
2544 | + magnum | m3230) |
2545 | + basic_machine=mips-mips |
2546 | + os=-sysv |
2547 | + ;; |
2548 | + merlin) |
2549 | + basic_machine=ns32k-utek |
2550 | + os=-sysv |
2551 | + ;; |
2552 | + microblaze) |
2553 | + basic_machine=microblaze-xilinx |
2554 | + ;; |
2555 | + mingw32) |
2556 | + basic_machine=i386-pc |
2557 | + os=-mingw32 |
2558 | + ;; |
2559 | + mingw32ce) |
2560 | + basic_machine=arm-unknown |
2561 | + os=-mingw32ce |
2562 | + ;; |
2563 | + miniframe) |
2564 | + basic_machine=m68000-convergent |
2565 | + ;; |
2566 | + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
2567 | + basic_machine=m68k-atari |
2568 | + os=-mint |
2569 | + ;; |
2570 | + mips3*-*) |
2571 | + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
2572 | + ;; |
2573 | + mips3*) |
2574 | + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
2575 | + ;; |
2576 | + monitor) |
2577 | + basic_machine=m68k-rom68k |
2578 | + os=-coff |
2579 | + ;; |
2580 | + morphos) |
2581 | + basic_machine=powerpc-unknown |
2582 | + os=-morphos |
2583 | + ;; |
2584 | + msdos) |
2585 | + basic_machine=i386-pc |
2586 | + os=-msdos |
2587 | + ;; |
2588 | + ms1-*) |
2589 | + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` |
2590 | + ;; |
2591 | + mvs) |
2592 | + basic_machine=i370-ibm |
2593 | + os=-mvs |
2594 | + ;; |
2595 | + ncr3000) |
2596 | + basic_machine=i486-ncr |
2597 | + os=-sysv4 |
2598 | + ;; |
2599 | + netbsd386) |
2600 | + basic_machine=i386-unknown |
2601 | + os=-netbsd |
2602 | + ;; |
2603 | + netwinder) |
2604 | + basic_machine=armv4l-rebel |
2605 | + os=-linux |
2606 | + ;; |
2607 | + news | news700 | news800 | news900) |
2608 | + basic_machine=m68k-sony |
2609 | + os=-newsos |
2610 | + ;; |
2611 | + news1000) |
2612 | + basic_machine=m68030-sony |
2613 | + os=-newsos |
2614 | + ;; |
2615 | + news-3600 | risc-news) |
2616 | + basic_machine=mips-sony |
2617 | + os=-newsos |
2618 | + ;; |
2619 | + necv70) |
2620 | + basic_machine=v70-nec |
2621 | + os=-sysv |
2622 | + ;; |
2623 | + next | m*-next ) |
2624 | + basic_machine=m68k-next |
2625 | + case $os in |
2626 | + -nextstep* ) |
2627 | + ;; |
2628 | + -ns2*) |
2629 | + os=-nextstep2 |
2630 | + ;; |
2631 | + *) |
2632 | + os=-nextstep3 |
2633 | + ;; |
2634 | + esac |
2635 | + ;; |
2636 | + nh3000) |
2637 | + basic_machine=m68k-harris |
2638 | + os=-cxux |
2639 | + ;; |
2640 | + nh[45]000) |
2641 | + basic_machine=m88k-harris |
2642 | + os=-cxux |
2643 | + ;; |
2644 | + nindy960) |
2645 | + basic_machine=i960-intel |
2646 | + os=-nindy |
2647 | + ;; |
2648 | + mon960) |
2649 | + basic_machine=i960-intel |
2650 | + os=-mon960 |
2651 | + ;; |
2652 | + nonstopux) |
2653 | + basic_machine=mips-compaq |
2654 | + os=-nonstopux |
2655 | + ;; |
2656 | + np1) |
2657 | + basic_machine=np1-gould |
2658 | + ;; |
2659 | + nsr-tandem) |
2660 | + basic_machine=nsr-tandem |
2661 | + ;; |
2662 | + op50n-* | op60c-*) |
2663 | + basic_machine=hppa1.1-oki |
2664 | + os=-proelf |
2665 | + ;; |
2666 | + openrisc | openrisc-*) |
2667 | + basic_machine=or32-unknown |
2668 | + ;; |
2669 | + os400) |
2670 | + basic_machine=powerpc-ibm |
2671 | + os=-os400 |
2672 | + ;; |
2673 | + OSE68000 | ose68000) |
2674 | + basic_machine=m68000-ericsson |
2675 | + os=-ose |
2676 | + ;; |
2677 | + os68k) |
2678 | + basic_machine=m68k-none |
2679 | + os=-os68k |
2680 | + ;; |
2681 | + pa-hitachi) |
2682 | + basic_machine=hppa1.1-hitachi |
2683 | + os=-hiuxwe2 |
2684 | + ;; |
2685 | + paragon) |
2686 | + basic_machine=i860-intel |
2687 | + os=-osf |
2688 | + ;; |
2689 | + parisc) |
2690 | + basic_machine=hppa-unknown |
2691 | + os=-linux |
2692 | + ;; |
2693 | + parisc-*) |
2694 | + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` |
2695 | + os=-linux |
2696 | + ;; |
2697 | + pbd) |
2698 | + basic_machine=sparc-tti |
2699 | + ;; |
2700 | + pbb) |
2701 | + basic_machine=m68k-tti |
2702 | + ;; |
2703 | + pc532 | pc532-*) |
2704 | + basic_machine=ns32k-pc532 |
2705 | + ;; |
2706 | + pc98) |
2707 | + basic_machine=i386-pc |
2708 | + ;; |
2709 | + pc98-*) |
2710 | + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` |
2711 | + ;; |
2712 | + pentium | p5 | k5 | k6 | nexgen | viac3) |
2713 | + basic_machine=i586-pc |
2714 | + ;; |
2715 | + pentiumpro | p6 | 6x86 | athlon | athlon_*) |
2716 | + basic_machine=i686-pc |
2717 | + ;; |
2718 | + pentiumii | pentium2 | pentiumiii | pentium3) |
2719 | + basic_machine=i686-pc |
2720 | + ;; |
2721 | + pentium4) |
2722 | + basic_machine=i786-pc |
2723 | + ;; |
2724 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
2725 | + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
2726 | + ;; |
2727 | + pentiumpro-* | p6-* | 6x86-* | athlon-*) |
2728 | + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2729 | + ;; |
2730 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
2731 | + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
2732 | + ;; |
2733 | + pentium4-*) |
2734 | + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` |
2735 | + ;; |
2736 | + pn) |
2737 | + basic_machine=pn-gould |
2738 | + ;; |
2739 | + power) basic_machine=power-ibm |
2740 | + ;; |
2741 | + ppc) basic_machine=powerpc-unknown |
2742 | + ;; |
2743 | + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
2744 | + ;; |
2745 | + ppcle | powerpclittle | ppc-le | powerpc-little) |
2746 | + basic_machine=powerpcle-unknown |
2747 | + ;; |
2748 | + ppcle-* | powerpclittle-*) |
2749 | + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` |
2750 | + ;; |
2751 | + ppc64) basic_machine=powerpc64-unknown |
2752 | + ;; |
2753 | + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
2754 | + ;; |
2755 | + ppc64le | powerpc64little | ppc64-le | powerpc64-little) |
2756 | + basic_machine=powerpc64le-unknown |
2757 | + ;; |
2758 | + ppc64le-* | powerpc64little-*) |
2759 | + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` |
2760 | + ;; |
2761 | + ps2) |
2762 | + basic_machine=i386-ibm |
2763 | + ;; |
2764 | + pw32) |
2765 | + basic_machine=i586-unknown |
2766 | + os=-pw32 |
2767 | + ;; |
2768 | + rdos) |
2769 | + basic_machine=i386-pc |
2770 | + os=-rdos |
2771 | + ;; |
2772 | + rom68k) |
2773 | + basic_machine=m68k-rom68k |
2774 | + os=-coff |
2775 | + ;; |
2776 | + rm[46]00) |
2777 | + basic_machine=mips-siemens |
2778 | + ;; |
2779 | + rtpc | rtpc-*) |
2780 | + basic_machine=romp-ibm |
2781 | + ;; |
2782 | + s390 | s390-*) |
2783 | + basic_machine=s390-ibm |
2784 | + ;; |
2785 | + s390x | s390x-*) |
2786 | + basic_machine=s390x-ibm |
2787 | + ;; |
2788 | + sa29200) |
2789 | + basic_machine=a29k-amd |
2790 | + os=-udi |
2791 | + ;; |
2792 | + sb1) |
2793 | + basic_machine=mipsisa64sb1-unknown |
2794 | + ;; |
2795 | + sb1el) |
2796 | + basic_machine=mipsisa64sb1el-unknown |
2797 | + ;; |
2798 | + sde) |
2799 | + basic_machine=mipsisa32-sde |
2800 | + os=-elf |
2801 | + ;; |
2802 | + sei) |
2803 | + basic_machine=mips-sei |
2804 | + os=-seiux |
2805 | + ;; |
2806 | + sequent) |
2807 | + basic_machine=i386-sequent |
2808 | + ;; |
2809 | + sh) |
2810 | + basic_machine=sh-hitachi |
2811 | + os=-hms |
2812 | + ;; |
2813 | + sh5el) |
2814 | + basic_machine=sh5le-unknown |
2815 | + ;; |
2816 | + sh64) |
2817 | + basic_machine=sh64-unknown |
2818 | + ;; |
2819 | + sparclite-wrs | simso-wrs) |
2820 | + basic_machine=sparclite-wrs |
2821 | + os=-vxworks |
2822 | + ;; |
2823 | + sps7) |
2824 | + basic_machine=m68k-bull |
2825 | + os=-sysv2 |
2826 | + ;; |
2827 | + spur) |
2828 | + basic_machine=spur-unknown |
2829 | + ;; |
2830 | + st2000) |
2831 | + basic_machine=m68k-tandem |
2832 | + ;; |
2833 | + stratus) |
2834 | + basic_machine=i860-stratus |
2835 | + os=-sysv4 |
2836 | + ;; |
2837 | + sun2) |
2838 | + basic_machine=m68000-sun |
2839 | + ;; |
2840 | + sun2os3) |
2841 | + basic_machine=m68000-sun |
2842 | + os=-sunos3 |
2843 | + ;; |
2844 | + sun2os4) |
2845 | + basic_machine=m68000-sun |
2846 | + os=-sunos4 |
2847 | + ;; |
2848 | + sun3os3) |
2849 | + basic_machine=m68k-sun |
2850 | + os=-sunos3 |
2851 | + ;; |
2852 | + sun3os4) |
2853 | + basic_machine=m68k-sun |
2854 | + os=-sunos4 |
2855 | + ;; |
2856 | + sun4os3) |
2857 | + basic_machine=sparc-sun |
2858 | + os=-sunos3 |
2859 | + ;; |
2860 | + sun4os4) |
2861 | + basic_machine=sparc-sun |
2862 | + os=-sunos4 |
2863 | + ;; |
2864 | + sun4sol2) |
2865 | + basic_machine=sparc-sun |
2866 | + os=-solaris2 |
2867 | + ;; |
2868 | + sun3 | sun3-*) |
2869 | + basic_machine=m68k-sun |
2870 | + ;; |
2871 | + sun4) |
2872 | + basic_machine=sparc-sun |
2873 | + ;; |
2874 | + sun386 | sun386i | roadrunner) |
2875 | + basic_machine=i386-sun |
2876 | + ;; |
2877 | + sv1) |
2878 | + basic_machine=sv1-cray |
2879 | + os=-unicos |
2880 | + ;; |
2881 | + symmetry) |
2882 | + basic_machine=i386-sequent |
2883 | + os=-dynix |
2884 | + ;; |
2885 | + t3e) |
2886 | + basic_machine=alphaev5-cray |
2887 | + os=-unicos |
2888 | + ;; |
2889 | + t90) |
2890 | + basic_machine=t90-cray |
2891 | + os=-unicos |
2892 | + ;; |
2893 | + tic54x | c54x*) |
2894 | + basic_machine=tic54x-unknown |
2895 | + os=-coff |
2896 | + ;; |
2897 | + tic55x | c55x*) |
2898 | + basic_machine=tic55x-unknown |
2899 | + os=-coff |
2900 | + ;; |
2901 | + tic6x | c6x*) |
2902 | + basic_machine=tic6x-unknown |
2903 | + os=-coff |
2904 | + ;; |
2905 | + # This must be matched before tile*. |
2906 | + tilegx*) |
2907 | + basic_machine=tilegx-unknown |
2908 | + os=-linux-gnu |
2909 | + ;; |
2910 | + tile*) |
2911 | + basic_machine=tile-unknown |
2912 | + os=-linux-gnu |
2913 | + ;; |
2914 | + tx39) |
2915 | + basic_machine=mipstx39-unknown |
2916 | + ;; |
2917 | + tx39el) |
2918 | + basic_machine=mipstx39el-unknown |
2919 | + ;; |
2920 | + toad1) |
2921 | + basic_machine=pdp10-xkl |
2922 | + os=-tops20 |
2923 | + ;; |
2924 | + tower | tower-32) |
2925 | + basic_machine=m68k-ncr |
2926 | + ;; |
2927 | + tpf) |
2928 | + basic_machine=s390x-ibm |
2929 | + os=-tpf |
2930 | + ;; |
2931 | + udi29k) |
2932 | + basic_machine=a29k-amd |
2933 | + os=-udi |
2934 | + ;; |
2935 | + ultra3) |
2936 | + basic_machine=a29k-nyu |
2937 | + os=-sym1 |
2938 | + ;; |
2939 | + v810 | necv810) |
2940 | + basic_machine=v810-nec |
2941 | + os=-none |
2942 | + ;; |
2943 | + vaxv) |
2944 | + basic_machine=vax-dec |
2945 | + os=-sysv |
2946 | + ;; |
2947 | + vms) |
2948 | + basic_machine=vax-dec |
2949 | + os=-vms |
2950 | + ;; |
2951 | + vpp*|vx|vx-*) |
2952 | + basic_machine=f301-fujitsu |
2953 | + ;; |
2954 | + vxworks960) |
2955 | + basic_machine=i960-wrs |
2956 | + os=-vxworks |
2957 | + ;; |
2958 | + vxworks68) |
2959 | + basic_machine=m68k-wrs |
2960 | + os=-vxworks |
2961 | + ;; |
2962 | + vxworks29k) |
2963 | + basic_machine=a29k-wrs |
2964 | + os=-vxworks |
2965 | + ;; |
2966 | + w65*) |
2967 | + basic_machine=w65-wdc |
2968 | + os=-none |
2969 | + ;; |
2970 | + w89k-*) |
2971 | + basic_machine=hppa1.1-winbond |
2972 | + os=-proelf |
2973 | + ;; |
2974 | + xbox) |
2975 | + basic_machine=i686-pc |
2976 | + os=-mingw32 |
2977 | + ;; |
2978 | + xps | xps100) |
2979 | + basic_machine=xps100-honeywell |
2980 | + ;; |
2981 | + ymp) |
2982 | + basic_machine=ymp-cray |
2983 | + os=-unicos |
2984 | + ;; |
2985 | + z8k-*-coff) |
2986 | + basic_machine=z8k-unknown |
2987 | + os=-sim |
2988 | + ;; |
2989 | + z80-*-coff) |
2990 | + basic_machine=z80-unknown |
2991 | + os=-sim |
2992 | + ;; |
2993 | + none) |
2994 | + basic_machine=none-none |
2995 | + os=-none |
2996 | + ;; |
2997 | + |
2998 | +# Here we handle the default manufacturer of certain CPU types. It is in |
2999 | +# some cases the only manufacturer, in others, it is the most popular. |
3000 | + w89k) |
3001 | + basic_machine=hppa1.1-winbond |
3002 | + ;; |
3003 | + op50n) |
3004 | + basic_machine=hppa1.1-oki |
3005 | + ;; |
3006 | + op60c) |
3007 | + basic_machine=hppa1.1-oki |
3008 | + ;; |
3009 | + romp) |
3010 | + basic_machine=romp-ibm |
3011 | + ;; |
3012 | + mmix) |
3013 | + basic_machine=mmix-knuth |
3014 | + ;; |
3015 | + rs6000) |
3016 | + basic_machine=rs6000-ibm |
3017 | + ;; |
3018 | + vax) |
3019 | + basic_machine=vax-dec |
3020 | + ;; |
3021 | + pdp10) |
3022 | + # there are many clones, so DEC is not a safe bet |
3023 | + basic_machine=pdp10-unknown |
3024 | + ;; |
3025 | + pdp11) |
3026 | + basic_machine=pdp11-dec |
3027 | + ;; |
3028 | + we32k) |
3029 | + basic_machine=we32k-att |
3030 | + ;; |
3031 | + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) |
3032 | + basic_machine=sh-unknown |
3033 | + ;; |
3034 | + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) |
3035 | + basic_machine=sparc-sun |
3036 | + ;; |
3037 | + cydra) |
3038 | + basic_machine=cydra-cydrome |
3039 | + ;; |
3040 | + orion) |
3041 | + basic_machine=orion-highlevel |
3042 | + ;; |
3043 | + orion105) |
3044 | + basic_machine=clipper-highlevel |
3045 | + ;; |
3046 | + mac | mpw | mac-mpw) |
3047 | + basic_machine=m68k-apple |
3048 | + ;; |
3049 | + pmac | pmac-mpw) |
3050 | + basic_machine=powerpc-apple |
3051 | + ;; |
3052 | + *-unknown) |
3053 | + # Make sure to match an already-canonicalized machine name. |
3054 | + ;; |
3055 | + *) |
3056 | + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
3057 | + exit 1 |
3058 | + ;; |
3059 | +esac |
3060 | + |
3061 | +# Here we canonicalize certain aliases for manufacturers. |
3062 | +case $basic_machine in |
3063 | + *-digital*) |
3064 | + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` |
3065 | + ;; |
3066 | + *-commodore*) |
3067 | + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` |
3068 | + ;; |
3069 | + *) |
3070 | + ;; |
3071 | +esac |
3072 | + |
3073 | +# Decode manufacturer-specific aliases for certain operating systems. |
3074 | + |
3075 | +if [ x"$os" != x"" ] |
3076 | +then |
3077 | +case $os in |
3078 | + # First match some system type aliases |
3079 | + # that might get confused with valid system types. |
3080 | + # -solaris* is a basic system type, with this one exception. |
3081 | + -auroraux) |
3082 | + os=-auroraux |
3083 | + ;; |
3084 | + -solaris1 | -solaris1.*) |
3085 | + os=`echo $os | sed -e 's|solaris1|sunos4|'` |
3086 | + ;; |
3087 | + -solaris) |
3088 | + os=-solaris2 |
3089 | + ;; |
3090 | + -svr4*) |
3091 | + os=-sysv4 |
3092 | + ;; |
3093 | + -unixware*) |
3094 | + os=-sysv4.2uw |
3095 | + ;; |
3096 | + -gnu/linux*) |
3097 | + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
3098 | + ;; |
3099 | + # First accept the basic system types. |
3100 | + # The portable systems comes first. |
3101 | + # Each alternative MUST END IN A *, to match a version number. |
3102 | + # -sysv* is not here because it comes later, after sysvr4. |
3103 | + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
3104 | + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ |
3105 | + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ |
3106 | + | -sym* | -kopensolaris* \ |
3107 | + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
3108 | + | -aos* | -aros* \ |
3109 | + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
3110 | + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
3111 | + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ |
3112 | + | -openbsd* | -solidbsd* \ |
3113 | + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ |
3114 | + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
3115 | + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
3116 | + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
3117 | + | -chorusos* | -chorusrdb* | -cegcc* \ |
3118 | + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
3119 | + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ |
3120 | + | -uxpv* | -beos* | -mpeix* | -udk* \ |
3121 | + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
3122 | + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
3123 | + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
3124 | + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
3125 | + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
3126 | + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
3127 | + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) |
3128 | + # Remember, each alternative MUST END IN *, to match a version number. |
3129 | + ;; |
3130 | + -qnx*) |
3131 | + case $basic_machine in |
3132 | + x86-* | i*86-*) |
3133 | + ;; |
3134 | + *) |
3135 | + os=-nto$os |
3136 | + ;; |
3137 | + esac |
3138 | + ;; |
3139 | + -nto-qnx*) |
3140 | + ;; |
3141 | + -nto*) |
3142 | + os=`echo $os | sed -e 's|nto|nto-qnx|'` |
3143 | + ;; |
3144 | + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ |
3145 | + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ |
3146 | + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
3147 | + ;; |
3148 | + -mac*) |
3149 | + os=`echo $os | sed -e 's|mac|macos|'` |
3150 | + ;; |
3151 | + -linux-dietlibc) |
3152 | + os=-linux-dietlibc |
3153 | + ;; |
3154 | + -linux*) |
3155 | + os=`echo $os | sed -e 's|linux|linux-gnu|'` |
3156 | + ;; |
3157 | + -sunos5*) |
3158 | + os=`echo $os | sed -e 's|sunos5|solaris2|'` |
3159 | + ;; |
3160 | + -sunos6*) |
3161 | + os=`echo $os | sed -e 's|sunos6|solaris3|'` |
3162 | + ;; |
3163 | + -opened*) |
3164 | + os=-openedition |
3165 | + ;; |
3166 | + -os400*) |
3167 | + os=-os400 |
3168 | + ;; |
3169 | + -wince*) |
3170 | + os=-wince |
3171 | + ;; |
3172 | + -osfrose*) |
3173 | + os=-osfrose |
3174 | + ;; |
3175 | + -osf*) |
3176 | + os=-osf |
3177 | + ;; |
3178 | + -utek*) |
3179 | + os=-bsd |
3180 | + ;; |
3181 | + -dynix*) |
3182 | + os=-bsd |
3183 | + ;; |
3184 | + -acis*) |
3185 | + os=-aos |
3186 | + ;; |
3187 | + -atheos*) |
3188 | + os=-atheos |
3189 | + ;; |
3190 | + -syllable*) |
3191 | + os=-syllable |
3192 | + ;; |
3193 | + -386bsd) |
3194 | + os=-bsd |
3195 | + ;; |
3196 | + -ctix* | -uts*) |
3197 | + os=-sysv |
3198 | + ;; |
3199 | + -nova*) |
3200 | + os=-rtmk-nova |
3201 | + ;; |
3202 | + -ns2 ) |
3203 | + os=-nextstep2 |
3204 | + ;; |
3205 | + -nsk*) |
3206 | + os=-nsk |
3207 | + ;; |
3208 | + # Preserve the version number of sinix5. |
3209 | + -sinix5.*) |
3210 | + os=`echo $os | sed -e 's|sinix|sysv|'` |
3211 | + ;; |
3212 | + -sinix*) |
3213 | + os=-sysv4 |
3214 | + ;; |
3215 | + -tpf*) |
3216 | + os=-tpf |
3217 | + ;; |
3218 | + -triton*) |
3219 | + os=-sysv3 |
3220 | + ;; |
3221 | + -oss*) |
3222 | + os=-sysv3 |
3223 | + ;; |
3224 | + -svr4) |
3225 | + os=-sysv4 |
3226 | + ;; |
3227 | + -svr3) |
3228 | + os=-sysv3 |
3229 | + ;; |
3230 | + -sysvr4) |
3231 | + os=-sysv4 |
3232 | + ;; |
3233 | + # This must come after -sysvr4. |
3234 | + -sysv*) |
3235 | + ;; |
3236 | + -ose*) |
3237 | + os=-ose |
3238 | + ;; |
3239 | + -es1800*) |
3240 | + os=-ose |
3241 | + ;; |
3242 | + -xenix) |
3243 | + os=-xenix |
3244 | + ;; |
3245 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
3246 | + os=-mint |
3247 | + ;; |
3248 | + -aros*) |
3249 | + os=-aros |
3250 | + ;; |
3251 | + -kaos*) |
3252 | + os=-kaos |
3253 | + ;; |
3254 | + -zvmoe) |
3255 | + os=-zvmoe |
3256 | + ;; |
3257 | + -dicos*) |
3258 | + os=-dicos |
3259 | + ;; |
3260 | + -nacl*) |
3261 | + ;; |
3262 | + -none) |
3263 | + ;; |
3264 | + *) |
3265 | + # Get rid of the `-' at the beginning of $os. |
3266 | + os=`echo $os | sed 's/[^-]*-//'` |
3267 | + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 |
3268 | + exit 1 |
3269 | + ;; |
3270 | +esac |
3271 | +else |
3272 | + |
3273 | +# Here we handle the default operating systems that come with various machines. |
3274 | +# The value should be what the vendor currently ships out the door with their |
3275 | +# machine or put another way, the most popular os provided with the machine. |
3276 | + |
3277 | +# Note that if you're going to try to match "-MANUFACTURER" here (say, |
3278 | +# "-sun"), then you have to tell the case statement up towards the top |
3279 | +# that MANUFACTURER isn't an operating system. Otherwise, code above |
3280 | +# will signal an error saying that MANUFACTURER isn't an operating |
3281 | +# system, and we'll never get to this point. |
3282 | + |
3283 | +case $basic_machine in |
3284 | + score-*) |
3285 | + os=-elf |
3286 | + ;; |
3287 | + spu-*) |
3288 | + os=-elf |
3289 | + ;; |
3290 | + *-acorn) |
3291 | + os=-riscix1.2 |
3292 | + ;; |
3293 | + arm*-rebel) |
3294 | + os=-linux |
3295 | + ;; |
3296 | + arm*-semi) |
3297 | + os=-aout |
3298 | + ;; |
3299 | + c4x-* | tic4x-*) |
3300 | + os=-coff |
3301 | + ;; |
3302 | + # This must come before the *-dec entry. |
3303 | + pdp10-*) |
3304 | + os=-tops20 |
3305 | + ;; |
3306 | + pdp11-*) |
3307 | + os=-none |
3308 | + ;; |
3309 | + *-dec | vax-*) |
3310 | + os=-ultrix4.2 |
3311 | + ;; |
3312 | + m68*-apollo) |
3313 | + os=-domain |
3314 | + ;; |
3315 | + i386-sun) |
3316 | + os=-sunos4.0.2 |
3317 | + ;; |
3318 | + m68000-sun) |
3319 | + os=-sunos3 |
3320 | + # This also exists in the configure program, but was not the |
3321 | + # default. |
3322 | + # os=-sunos4 |
3323 | + ;; |
3324 | + m68*-cisco) |
3325 | + os=-aout |
3326 | + ;; |
3327 | + mep-*) |
3328 | + os=-elf |
3329 | + ;; |
3330 | + mips*-cisco) |
3331 | + os=-elf |
3332 | + ;; |
3333 | + mips*-*) |
3334 | + os=-elf |
3335 | + ;; |
3336 | + or32-*) |
3337 | + os=-coff |
3338 | + ;; |
3339 | + *-tti) # must be before sparc entry or we get the wrong os. |
3340 | + os=-sysv3 |
3341 | + ;; |
3342 | + sparc-* | *-sun) |
3343 | + os=-sunos4.1.1 |
3344 | + ;; |
3345 | + *-be) |
3346 | + os=-beos |
3347 | + ;; |
3348 | + *-haiku) |
3349 | + os=-haiku |
3350 | + ;; |
3351 | + *-ibm) |
3352 | + os=-aix |
3353 | + ;; |
3354 | + *-knuth) |
3355 | + os=-mmixware |
3356 | + ;; |
3357 | + *-wec) |
3358 | + os=-proelf |
3359 | + ;; |
3360 | + *-winbond) |
3361 | + os=-proelf |
3362 | + ;; |
3363 | + *-oki) |
3364 | + os=-proelf |
3365 | + ;; |
3366 | + *-hp) |
3367 | + os=-hpux |
3368 | + ;; |
3369 | + *-hitachi) |
3370 | + os=-hiux |
3371 | + ;; |
3372 | + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
3373 | + os=-sysv |
3374 | + ;; |
3375 | + *-cbm) |
3376 | + os=-amigaos |
3377 | + ;; |
3378 | + *-dg) |
3379 | + os=-dgux |
3380 | + ;; |
3381 | + *-dolphin) |
3382 | + os=-sysv3 |
3383 | + ;; |
3384 | + m68k-ccur) |
3385 | + os=-rtu |
3386 | + ;; |
3387 | + m88k-omron*) |
3388 | + os=-luna |
3389 | + ;; |
3390 | + *-next ) |
3391 | + os=-nextstep |
3392 | + ;; |
3393 | + *-sequent) |
3394 | + os=-ptx |
3395 | + ;; |
3396 | + *-crds) |
3397 | + os=-unos |
3398 | + ;; |
3399 | + *-ns) |
3400 | + os=-genix |
3401 | + ;; |
3402 | + i370-*) |
3403 | + os=-mvs |
3404 | + ;; |
3405 | + *-next) |
3406 | + os=-nextstep3 |
3407 | + ;; |
3408 | + *-gould) |
3409 | + os=-sysv |
3410 | + ;; |
3411 | + *-highlevel) |
3412 | + os=-bsd |
3413 | + ;; |
3414 | + *-encore) |
3415 | + os=-bsd |
3416 | + ;; |
3417 | + *-sgi) |
3418 | + os=-irix |
3419 | + ;; |
3420 | + *-siemens) |
3421 | + os=-sysv4 |
3422 | + ;; |
3423 | + *-masscomp) |
3424 | + os=-rtu |
3425 | + ;; |
3426 | + f30[01]-fujitsu | f700-fujitsu) |
3427 | + os=-uxpv |
3428 | + ;; |
3429 | + *-rom68k) |
3430 | + os=-coff |
3431 | + ;; |
3432 | + *-*bug) |
3433 | + os=-coff |
3434 | + ;; |
3435 | + *-apple) |
3436 | + os=-macos |
3437 | + ;; |
3438 | + *-atari*) |
3439 | + os=-mint |
3440 | + ;; |
3441 | + *) |
3442 | + os=-none |
3443 | + ;; |
3444 | +esac |
3445 | +fi |
3446 | + |
3447 | +# Here we handle the case where we know the os, and the CPU type, but not the |
3448 | +# manufacturer. We pick the logical manufacturer. |
3449 | +vendor=unknown |
3450 | +case $basic_machine in |
3451 | + *-unknown) |
3452 | + case $os in |
3453 | + -riscix*) |
3454 | + vendor=acorn |
3455 | + ;; |
3456 | + -sunos*) |
3457 | + vendor=sun |
3458 | + ;; |
3459 | + -cnk*|-aix*) |
3460 | + vendor=ibm |
3461 | + ;; |
3462 | + -beos*) |
3463 | + vendor=be |
3464 | + ;; |
3465 | + -hpux*) |
3466 | + vendor=hp |
3467 | + ;; |
3468 | + -mpeix*) |
3469 | + vendor=hp |
3470 | + ;; |
3471 | + -hiux*) |
3472 | + vendor=hitachi |
3473 | + ;; |
3474 | + -unos*) |
3475 | + vendor=crds |
3476 | + ;; |
3477 | + -dgux*) |
3478 | + vendor=dg |
3479 | + ;; |
3480 | + -luna*) |
3481 | + vendor=omron |
3482 | + ;; |
3483 | + -genix*) |
3484 | + vendor=ns |
3485 | + ;; |
3486 | + -mvs* | -opened*) |
3487 | + vendor=ibm |
3488 | + ;; |
3489 | + -os400*) |
3490 | + vendor=ibm |
3491 | + ;; |
3492 | + -ptx*) |
3493 | + vendor=sequent |
3494 | + ;; |
3495 | + -tpf*) |
3496 | + vendor=ibm |
3497 | + ;; |
3498 | + -vxsim* | -vxworks* | -windiss*) |
3499 | + vendor=wrs |
3500 | + ;; |
3501 | + -aux*) |
3502 | + vendor=apple |
3503 | + ;; |
3504 | + -hms*) |
3505 | + vendor=hitachi |
3506 | + ;; |
3507 | + -mpw* | -macos*) |
3508 | + vendor=apple |
3509 | + ;; |
3510 | + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
3511 | + vendor=atari |
3512 | + ;; |
3513 | + -vos*) |
3514 | + vendor=stratus |
3515 | + ;; |
3516 | + esac |
3517 | + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
3518 | + ;; |
3519 | +esac |
3520 | + |
3521 | +echo $basic_machine$os |
3522 | +exit |
3523 | + |
3524 | +# Local variables: |
3525 | +# eval: (add-hook 'write-file-hooks 'time-stamp) |
3526 | +# time-stamp-start: "timestamp='" |
3527 | +# time-stamp-format: "%:y-%02m-%02d" |
3528 | +# time-stamp-end: "'" |
3529 | +# End: |
3530 | |
3531 | === modified file 'configure' |
3532 | --- configure 2011-05-14 11:50:59 +0000 |
3533 | +++ configure 2011-11-14 17:51:24 +0000 |
3534 | @@ -2498,7 +2498,7 @@ |
3535 | |
3536 | # Define the identity of the package. |
3537 | PACKAGE=sslsniff |
3538 | - VERSION=0.7 |
3539 | + VERSION=0.8 |
3540 | |
3541 | |
3542 | cat >>confdefs.h <<_ACEOF |
3543 | |
3544 | === modified file 'configure.ac' |
3545 | --- configure.ac 2011-05-14 11:50:59 +0000 |
3546 | +++ configure.ac 2011-11-14 17:51:24 +0000 |
3547 | @@ -1,5 +1,5 @@ |
3548 | AC_INIT(sslsniff.cpp) |
3549 | -AM_INIT_AUTOMAKE(sslsniff,0.7) |
3550 | +AM_INIT_AUTOMAKE(sslsniff,0.8) |
3551 | AC_PROG_CC |
3552 | AC_PROG_CXX |
3553 | AC_PROG_INSTALL |
3554 | |
3555 | === modified file 'debian/changelog' |
3556 | --- debian/changelog 2011-08-21 14:43:22 +0000 |
3557 | +++ debian/changelog 2011-11-14 17:51:24 +0000 |
3558 | @@ -1,3 +1,22 @@ |
3559 | +sslsniff (0.8-1ubuntu1) precise; urgency=low |
3560 | + |
3561 | + * Merge from debian testing. |
3562 | + * Remaining changes: |
3563 | + - debian/control: pass libraries to link with in LIBS instead of LD_FLAGS |
3564 | + * fixes build with ld --as-needed (LP: #803200) |
3565 | + * Debian fix in 0.8-1 did not fix this problem; see comments in debbugs |
3566 | + #632090. |
3567 | + |
3568 | + -- Robie Basak <robie.basak@ubuntu.com> Mon, 14 Nov 2011 17:46:10 +0000 |
3569 | + |
3570 | +sslsniff (0.8-1) unstable; urgency=low |
3571 | + |
3572 | + * Imported Upstream version 0.8 |
3573 | + Fix for FTBFS with ld --as-needed has been merged upstream |
3574 | + (Closes: #632090) |
3575 | + |
3576 | + -- Pierre Chifflier <pollux@debian.org> Sat, 30 Jul 2011 17:58:00 +0200 |
3577 | + |
3578 | sslsniff (0.7-1ubuntu1) oneiric; urgency=low |
3579 | |
3580 | * debian/control: pass libraries to link with in LIBS instead of LD_FLAGS |
3581 | |
3582 | === added file 'ltmain.sh' |
3583 | --- ltmain.sh 1970-01-01 00:00:00 +0000 |
3584 | +++ ltmain.sh 2011-11-14 17:51:24 +0000 |
3585 | @@ -0,0 +1,8413 @@ |
3586 | +# Generated from ltmain.m4sh. |
3587 | + |
3588 | +# ltmain.sh (GNU libtool) 2.2.6b |
3589 | +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
3590 | + |
3591 | +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. |
3592 | +# This is free software; see the source for copying conditions. There is NO |
3593 | +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
3594 | + |
3595 | +# GNU Libtool is free software; you can redistribute it and/or modify |
3596 | +# it under the terms of the GNU General Public License as published by |
3597 | +# the Free Software Foundation; either version 2 of the License, or |
3598 | +# (at your option) any later version. |
3599 | +# |
3600 | +# As a special exception to the GNU General Public License, |
3601 | +# if you distribute this file as part of a program or library that |
3602 | +# is built using GNU Libtool, you may include this file under the |
3603 | +# same distribution terms that you use for the rest of that program. |
3604 | +# |
3605 | +# GNU Libtool is distributed in the hope that it will be useful, but |
3606 | +# WITHOUT ANY WARRANTY; without even the implied warranty of |
3607 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3608 | +# General Public License for more details. |
3609 | +# |
3610 | +# You should have received a copy of the GNU General Public License |
3611 | +# along with GNU Libtool; see the file COPYING. If not, a copy |
3612 | +# can be downloaded from http://www.gnu.org/licenses/gpl.html, |
3613 | +# or obtained by writing to the Free Software Foundation, Inc., |
3614 | +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3615 | + |
3616 | +# Usage: $progname [OPTION]... [MODE-ARG]... |
3617 | +# |
3618 | +# Provide generalized library-building support services. |
3619 | +# |
3620 | +# --config show all configuration variables |
3621 | +# --debug enable verbose shell tracing |
3622 | +# -n, --dry-run display commands without modifying any files |
3623 | +# --features display basic configuration information and exit |
3624 | +# --mode=MODE use operation mode MODE |
3625 | +# --preserve-dup-deps don't remove duplicate dependency libraries |
3626 | +# --quiet, --silent don't print informational messages |
3627 | +# --tag=TAG use configuration variables from tag TAG |
3628 | +# -v, --verbose print informational messages (default) |
3629 | +# --version print version information |
3630 | +# -h, --help print short or long help message |
3631 | +# |
3632 | +# MODE must be one of the following: |
3633 | +# |
3634 | +# clean remove files from the build directory |
3635 | +# compile compile a source file into a libtool object |
3636 | +# execute automatically set library path, then run a program |
3637 | +# finish complete the installation of libtool libraries |
3638 | +# install install libraries or executables |
3639 | +# link create a library or an executable |
3640 | +# uninstall remove libraries from an installed directory |
3641 | +# |
3642 | +# MODE-ARGS vary depending on the MODE. |
3643 | +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. |
3644 | +# |
3645 | +# When reporting a bug, please describe a test case to reproduce it and |
3646 | +# include the following information: |
3647 | +# |
3648 | +# host-triplet: $host |
3649 | +# shell: $SHELL |
3650 | +# compiler: $LTCC |
3651 | +# compiler flags: $LTCFLAGS |
3652 | +# linker: $LD (gnu? $with_gnu_ld) |
3653 | +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 |
3654 | +# automake: $automake_version |
3655 | +# autoconf: $autoconf_version |
3656 | +# |
3657 | +# Report bugs to <bug-libtool@gnu.org>. |
3658 | + |
3659 | +PROGRAM=ltmain.sh |
3660 | +PACKAGE=libtool |
3661 | +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" |
3662 | +TIMESTAMP="" |
3663 | +package_revision=1.3017 |
3664 | + |
3665 | +# Be Bourne compatible |
3666 | +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
3667 | + emulate sh |
3668 | + NULLCMD=: |
3669 | + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which |
3670 | + # is contrary to our usage. Disable this feature. |
3671 | + alias -g '${1+"$@"}'='"$@"' |
3672 | + setopt NO_GLOB_SUBST |
3673 | +else |
3674 | + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac |
3675 | +fi |
3676 | +BIN_SH=xpg4; export BIN_SH # for Tru64 |
3677 | +DUALCASE=1; export DUALCASE # for MKS sh |
3678 | + |
3679 | +# NLS nuisances: We save the old values to restore during execute mode. |
3680 | +# Only set LANG and LC_ALL to C if already set. |
3681 | +# These must not be set unconditionally because not all systems understand |
3682 | +# e.g. LANG=C (notably SCO). |
3683 | +lt_user_locale= |
3684 | +lt_safe_locale= |
3685 | +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES |
3686 | +do |
3687 | + eval "if test \"\${$lt_var+set}\" = set; then |
3688 | + save_$lt_var=\$$lt_var |
3689 | + $lt_var=C |
3690 | + export $lt_var |
3691 | + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" |
3692 | + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" |
3693 | + fi" |
3694 | +done |
3695 | + |
3696 | +$lt_unset CDPATH |
3697 | + |
3698 | + |
3699 | + |
3700 | + |
3701 | + |
3702 | +: ${CP="cp -f"} |
3703 | +: ${ECHO="echo"} |
3704 | +: ${EGREP="/bin/grep -E"} |
3705 | +: ${FGREP="/bin/grep -F"} |
3706 | +: ${GREP="/bin/grep"} |
3707 | +: ${LN_S="ln -s"} |
3708 | +: ${MAKE="make"} |
3709 | +: ${MKDIR="mkdir"} |
3710 | +: ${MV="mv -f"} |
3711 | +: ${RM="rm -f"} |
3712 | +: ${SED="/bin/sed"} |
3713 | +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} |
3714 | +: ${Xsed="$SED -e 1s/^X//"} |
3715 | + |
3716 | +# Global variables: |
3717 | +EXIT_SUCCESS=0 |
3718 | +EXIT_FAILURE=1 |
3719 | +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. |
3720 | +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. |
3721 | + |
3722 | +exit_status=$EXIT_SUCCESS |
3723 | + |
3724 | +# Make sure IFS has a sensible default |
3725 | +lt_nl=' |
3726 | +' |
3727 | +IFS=" $lt_nl" |
3728 | + |
3729 | +dirname="s,/[^/]*$,," |
3730 | +basename="s,^.*/,," |
3731 | + |
3732 | +# func_dirname_and_basename file append nondir_replacement |
3733 | +# perform func_basename and func_dirname in a single function |
3734 | +# call: |
3735 | +# dirname: Compute the dirname of FILE. If nonempty, |
3736 | +# add APPEND to the result, otherwise set result |
3737 | +# to NONDIR_REPLACEMENT. |
3738 | +# value returned in "$func_dirname_result" |
3739 | +# basename: Compute filename of FILE. |
3740 | +# value retuned in "$func_basename_result" |
3741 | +# Implementation must be kept synchronized with func_dirname |
3742 | +# and func_basename. For efficiency, we do not delegate to |
3743 | +# those functions but instead duplicate the functionality here. |
3744 | +func_dirname_and_basename () |
3745 | +{ |
3746 | + # Extract subdirectory from the argument. |
3747 | + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` |
3748 | + if test "X$func_dirname_result" = "X${1}"; then |
3749 | + func_dirname_result="${3}" |
3750 | + else |
3751 | + func_dirname_result="$func_dirname_result${2}" |
3752 | + fi |
3753 | + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` |
3754 | +} |
3755 | + |
3756 | +# Generated shell functions inserted here. |
3757 | + |
3758 | +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh |
3759 | +# is ksh but when the shell is invoked as "sh" and the current value of |
3760 | +# the _XPG environment variable is not equal to 1 (one), the special |
3761 | +# positional parameter $0, within a function call, is the name of the |
3762 | +# function. |
3763 | +progpath="$0" |
3764 | + |
3765 | +# The name of this program: |
3766 | +# In the unlikely event $progname began with a '-', it would play havoc with |
3767 | +# func_echo (imagine progname=-n), so we prepend ./ in that case: |
3768 | +func_dirname_and_basename "$progpath" |
3769 | +progname=$func_basename_result |
3770 | +case $progname in |
3771 | + -*) progname=./$progname ;; |
3772 | +esac |
3773 | + |
3774 | +# Make sure we have an absolute path for reexecution: |
3775 | +case $progpath in |
3776 | + [\\/]*|[A-Za-z]:\\*) ;; |
3777 | + *[\\/]*) |
3778 | + progdir=$func_dirname_result |
3779 | + progdir=`cd "$progdir" && pwd` |
3780 | + progpath="$progdir/$progname" |
3781 | + ;; |
3782 | + *) |
3783 | + save_IFS="$IFS" |
3784 | + IFS=: |
3785 | + for progdir in $PATH; do |
3786 | + IFS="$save_IFS" |
3787 | + test -x "$progdir/$progname" && break |
3788 | + done |
3789 | + IFS="$save_IFS" |
3790 | + test -n "$progdir" || progdir=`pwd` |
3791 | + progpath="$progdir/$progname" |
3792 | + ;; |
3793 | +esac |
3794 | + |
3795 | +# Sed substitution that helps us do robust quoting. It backslashifies |
3796 | +# metacharacters that are still active within double-quoted strings. |
3797 | +Xsed="${SED}"' -e 1s/^X//' |
3798 | +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' |
3799 | + |
3800 | +# Same as above, but do not quote variable references. |
3801 | +double_quote_subst='s/\(["`\\]\)/\\\1/g' |
3802 | + |
3803 | +# Re-`\' parameter expansions in output of double_quote_subst that were |
3804 | +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' |
3805 | +# in input to double_quote_subst, that '$' was protected from expansion. |
3806 | +# Since each input `\' is now two `\'s, look for any number of runs of |
3807 | +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. |
3808 | +bs='\\' |
3809 | +bs2='\\\\' |
3810 | +bs4='\\\\\\\\' |
3811 | +dollar='\$' |
3812 | +sed_double_backslash="\ |
3813 | + s/$bs4/&\\ |
3814 | +/g |
3815 | + s/^$bs2$dollar/$bs&/ |
3816 | + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g |
3817 | + s/\n//g" |
3818 | + |
3819 | +# Standard options: |
3820 | +opt_dry_run=false |
3821 | +opt_help=false |
3822 | +opt_quiet=false |
3823 | +opt_verbose=false |
3824 | +opt_warning=: |
3825 | + |
3826 | +# func_echo arg... |
3827 | +# Echo program name prefixed message, along with the current mode |
3828 | +# name if it has been set yet. |
3829 | +func_echo () |
3830 | +{ |
3831 | + $ECHO "$progname${mode+: }$mode: $*" |
3832 | +} |
3833 | + |
3834 | +# func_verbose arg... |
3835 | +# Echo program name prefixed message in verbose mode only. |
3836 | +func_verbose () |
3837 | +{ |
3838 | + $opt_verbose && func_echo ${1+"$@"} |
3839 | + |
3840 | + # A bug in bash halts the script if the last line of a function |
3841 | + # fails when set -e is in force, so we need another command to |
3842 | + # work around that: |
3843 | + : |
3844 | +} |
3845 | + |
3846 | +# func_error arg... |
3847 | +# Echo program name prefixed message to standard error. |
3848 | +func_error () |
3849 | +{ |
3850 | + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 |
3851 | +} |
3852 | + |
3853 | +# func_warning arg... |
3854 | +# Echo program name prefixed warning message to standard error. |
3855 | +func_warning () |
3856 | +{ |
3857 | + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 |
3858 | + |
3859 | + # bash bug again: |
3860 | + : |
3861 | +} |
3862 | + |
3863 | +# func_fatal_error arg... |
3864 | +# Echo program name prefixed message to standard error, and exit. |
3865 | +func_fatal_error () |
3866 | +{ |
3867 | + func_error ${1+"$@"} |
3868 | + exit $EXIT_FAILURE |
3869 | +} |
3870 | + |
3871 | +# func_fatal_help arg... |
3872 | +# Echo program name prefixed message to standard error, followed by |
3873 | +# a help hint, and exit. |
3874 | +func_fatal_help () |
3875 | +{ |
3876 | + func_error ${1+"$@"} |
3877 | + func_fatal_error "$help" |
3878 | +} |
3879 | +help="Try \`$progname --help' for more information." ## default |
3880 | + |
3881 | + |
3882 | +# func_grep expression filename |
3883 | +# Check whether EXPRESSION matches any line of FILENAME, without output. |
3884 | +func_grep () |
3885 | +{ |
3886 | + $GREP "$1" "$2" >/dev/null 2>&1 |
3887 | +} |
3888 | + |
3889 | + |
3890 | +# func_mkdir_p directory-path |
3891 | +# Make sure the entire path to DIRECTORY-PATH is available. |
3892 | +func_mkdir_p () |
3893 | +{ |
3894 | + my_directory_path="$1" |
3895 | + my_dir_list= |
3896 | + |
3897 | + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then |
3898 | + |
3899 | + # Protect directory names starting with `-' |
3900 | + case $my_directory_path in |
3901 | + -*) my_directory_path="./$my_directory_path" ;; |
3902 | + esac |
3903 | + |
3904 | + # While some portion of DIR does not yet exist... |
3905 | + while test ! -d "$my_directory_path"; do |
3906 | + # ...make a list in topmost first order. Use a colon delimited |
3907 | + # list incase some portion of path contains whitespace. |
3908 | + my_dir_list="$my_directory_path:$my_dir_list" |
3909 | + |
3910 | + # If the last portion added has no slash in it, the list is done |
3911 | + case $my_directory_path in */*) ;; *) break ;; esac |
3912 | + |
3913 | + # ...otherwise throw away the child directory and loop |
3914 | + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` |
3915 | + done |
3916 | + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` |
3917 | + |
3918 | + save_mkdir_p_IFS="$IFS"; IFS=':' |
3919 | + for my_dir in $my_dir_list; do |
3920 | + IFS="$save_mkdir_p_IFS" |
3921 | + # mkdir can fail with a `File exist' error if two processes |
3922 | + # try to create one of the directories concurrently. Don't |
3923 | + # stop in that case! |
3924 | + $MKDIR "$my_dir" 2>/dev/null || : |
3925 | + done |
3926 | + IFS="$save_mkdir_p_IFS" |
3927 | + |
3928 | + # Bail out if we (or some other process) failed to create a directory. |
3929 | + test -d "$my_directory_path" || \ |
3930 | + func_fatal_error "Failed to create \`$1'" |
3931 | + fi |
3932 | +} |
3933 | + |
3934 | + |
3935 | +# func_mktempdir [string] |
3936 | +# Make a temporary directory that won't clash with other running |
3937 | +# libtool processes, and avoids race conditions if possible. If |
3938 | +# given, STRING is the basename for that directory. |
3939 | +func_mktempdir () |
3940 | +{ |
3941 | + my_template="${TMPDIR-/tmp}/${1-$progname}" |
3942 | + |
3943 | + if test "$opt_dry_run" = ":"; then |
3944 | + # Return a directory name, but don't create it in dry-run mode |
3945 | + my_tmpdir="${my_template}-$$" |
3946 | + else |
3947 | + |
3948 | + # If mktemp works, use that first and foremost |
3949 | + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` |
3950 | + |
3951 | + if test ! -d "$my_tmpdir"; then |
3952 | + # Failing that, at least try and use $RANDOM to avoid a race |
3953 | + my_tmpdir="${my_template}-${RANDOM-0}$$" |
3954 | + |
3955 | + save_mktempdir_umask=`umask` |
3956 | + umask 0077 |
3957 | + $MKDIR "$my_tmpdir" |
3958 | + umask $save_mktempdir_umask |
3959 | + fi |
3960 | + |
3961 | + # If we're not in dry-run mode, bomb out on failure |
3962 | + test -d "$my_tmpdir" || \ |
3963 | + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" |
3964 | + fi |
3965 | + |
3966 | + $ECHO "X$my_tmpdir" | $Xsed |
3967 | +} |
3968 | + |
3969 | + |
3970 | +# func_quote_for_eval arg |
3971 | +# Aesthetically quote ARG to be evaled later. |
3972 | +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT |
3973 | +# is double-quoted, suitable for a subsequent eval, whereas |
3974 | +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters |
3975 | +# which are still active within double quotes backslashified. |
3976 | +func_quote_for_eval () |
3977 | +{ |
3978 | + case $1 in |
3979 | + *[\\\`\"\$]*) |
3980 | + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; |
3981 | + *) |
3982 | + func_quote_for_eval_unquoted_result="$1" ;; |
3983 | + esac |
3984 | + |
3985 | + case $func_quote_for_eval_unquoted_result in |
3986 | + # Double-quote args containing shell metacharacters to delay |
3987 | + # word splitting, command substitution and and variable |
3988 | + # expansion for a subsequent eval. |
3989 | + # Many Bourne shells cannot handle close brackets correctly |
3990 | + # in scan sets, so we specify it separately. |
3991 | + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
3992 | + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" |
3993 | + ;; |
3994 | + *) |
3995 | + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" |
3996 | + esac |
3997 | +} |
3998 | + |
3999 | + |
4000 | +# func_quote_for_expand arg |
4001 | +# Aesthetically quote ARG to be evaled later; same as above, |
4002 | +# but do not quote variable references. |
4003 | +func_quote_for_expand () |
4004 | +{ |
4005 | + case $1 in |
4006 | + *[\\\`\"]*) |
4007 | + my_arg=`$ECHO "X$1" | $Xsed \ |
4008 | + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; |
4009 | + *) |
4010 | + my_arg="$1" ;; |
4011 | + esac |
4012 | + |
4013 | + case $my_arg in |
4014 | + # Double-quote args containing shell metacharacters to delay |
4015 | + # word splitting and command substitution for a subsequent eval. |
4016 | + # Many Bourne shells cannot handle close brackets correctly |
4017 | + # in scan sets, so we specify it separately. |
4018 | + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
4019 | + my_arg="\"$my_arg\"" |
4020 | + ;; |
4021 | + esac |
4022 | + |
4023 | + func_quote_for_expand_result="$my_arg" |
4024 | +} |
4025 | + |
4026 | + |
4027 | +# func_show_eval cmd [fail_exp] |
4028 | +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is |
4029 | +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP |
4030 | +# is given, then evaluate it. |
4031 | +func_show_eval () |
4032 | +{ |
4033 | + my_cmd="$1" |
4034 | + my_fail_exp="${2-:}" |
4035 | + |
4036 | + ${opt_silent-false} || { |
4037 | + func_quote_for_expand "$my_cmd" |
4038 | + eval "func_echo $func_quote_for_expand_result" |
4039 | + } |
4040 | + |
4041 | + if ${opt_dry_run-false}; then :; else |
4042 | + eval "$my_cmd" |
4043 | + my_status=$? |
4044 | + if test "$my_status" -eq 0; then :; else |
4045 | + eval "(exit $my_status); $my_fail_exp" |
4046 | + fi |
4047 | + fi |
4048 | +} |
4049 | + |
4050 | + |
4051 | +# func_show_eval_locale cmd [fail_exp] |
4052 | +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is |
4053 | +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP |
4054 | +# is given, then evaluate it. Use the saved locale for evaluation. |
4055 | +func_show_eval_locale () |
4056 | +{ |
4057 | + my_cmd="$1" |
4058 | + my_fail_exp="${2-:}" |
4059 | + |
4060 | + ${opt_silent-false} || { |
4061 | + func_quote_for_expand "$my_cmd" |
4062 | + eval "func_echo $func_quote_for_expand_result" |
4063 | + } |
4064 | + |
4065 | + if ${opt_dry_run-false}; then :; else |
4066 | + eval "$lt_user_locale |
4067 | + $my_cmd" |
4068 | + my_status=$? |
4069 | + eval "$lt_safe_locale" |
4070 | + if test "$my_status" -eq 0; then :; else |
4071 | + eval "(exit $my_status); $my_fail_exp" |
4072 | + fi |
4073 | + fi |
4074 | +} |
4075 | + |
4076 | + |
4077 | + |
4078 | + |
4079 | + |
4080 | +# func_version |
4081 | +# Echo version message to standard output and exit. |
4082 | +func_version () |
4083 | +{ |
4084 | + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { |
4085 | + s/^# // |
4086 | + s/^# *$// |
4087 | + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ |
4088 | + p |
4089 | + }' < "$progpath" |
4090 | + exit $? |
4091 | +} |
4092 | + |
4093 | +# func_usage |
4094 | +# Echo short help message to standard output and exit. |
4095 | +func_usage () |
4096 | +{ |
4097 | + $SED -n '/^# Usage:/,/# -h/ { |
4098 | + s/^# // |
4099 | + s/^# *$// |
4100 | + s/\$progname/'$progname'/ |
4101 | + p |
4102 | + }' < "$progpath" |
4103 | + $ECHO |
4104 | + $ECHO "run \`$progname --help | more' for full usage" |
4105 | + exit $? |
4106 | +} |
4107 | + |
4108 | +# func_help |
4109 | +# Echo long help message to standard output and exit. |
4110 | +func_help () |
4111 | +{ |
4112 | + $SED -n '/^# Usage:/,/# Report bugs to/ { |
4113 | + s/^# // |
4114 | + s/^# *$// |
4115 | + s*\$progname*'$progname'* |
4116 | + s*\$host*'"$host"'* |
4117 | + s*\$SHELL*'"$SHELL"'* |
4118 | + s*\$LTCC*'"$LTCC"'* |
4119 | + s*\$LTCFLAGS*'"$LTCFLAGS"'* |
4120 | + s*\$LD*'"$LD"'* |
4121 | + s/\$with_gnu_ld/'"$with_gnu_ld"'/ |
4122 | + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ |
4123 | + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ |
4124 | + p |
4125 | + }' < "$progpath" |
4126 | + exit $? |
4127 | +} |
4128 | + |
4129 | +# func_missing_arg argname |
4130 | +# Echo program name prefixed message to standard error and set global |
4131 | +# exit_cmd. |
4132 | +func_missing_arg () |
4133 | +{ |
4134 | + func_error "missing argument for $1" |
4135 | + exit_cmd=exit |
4136 | +} |
4137 | + |
4138 | +exit_cmd=: |
4139 | + |
4140 | + |
4141 | + |
4142 | + |
4143 | + |
4144 | +# Check that we have a working $ECHO. |
4145 | +if test "X$1" = X--no-reexec; then |
4146 | + # Discard the --no-reexec flag, and continue. |
4147 | + shift |
4148 | +elif test "X$1" = X--fallback-echo; then |
4149 | + # Avoid inline document here, it may be left over |
4150 | + : |
4151 | +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then |
4152 | + # Yippee, $ECHO works! |
4153 | + : |
4154 | +else |
4155 | + # Restart under the correct shell, and then maybe $ECHO will work. |
4156 | + exec $SHELL "$progpath" --no-reexec ${1+"$@"} |
4157 | +fi |
4158 | + |
4159 | +if test "X$1" = X--fallback-echo; then |
4160 | + # used as fallback echo |
4161 | + shift |
4162 | + cat <<EOF |
4163 | +$* |
4164 | +EOF |
4165 | + exit $EXIT_SUCCESS |
4166 | +fi |
4167 | + |
4168 | +magic="%%%MAGIC variable%%%" |
4169 | +magic_exe="%%%MAGIC EXE variable%%%" |
4170 | + |
4171 | +# Global variables. |
4172 | +# $mode is unset |
4173 | +nonopt= |
4174 | +execute_dlfiles= |
4175 | +preserve_args= |
4176 | +lo2o="s/\\.lo\$/.${objext}/" |
4177 | +o2lo="s/\\.${objext}\$/.lo/" |
4178 | +extracted_archives= |
4179 | +extracted_serial=0 |
4180 | + |
4181 | +opt_dry_run=false |
4182 | +opt_duplicate_deps=false |
4183 | +opt_silent=false |
4184 | +opt_debug=: |
4185 | + |
4186 | +# If this variable is set in any of the actions, the command in it |
4187 | +# will be execed at the end. This prevents here-documents from being |
4188 | +# left over by shells. |
4189 | +exec_cmd= |
4190 | + |
4191 | +# func_fatal_configuration arg... |
4192 | +# Echo program name prefixed message to standard error, followed by |
4193 | +# a configuration failure hint, and exit. |
4194 | +func_fatal_configuration () |
4195 | +{ |
4196 | + func_error ${1+"$@"} |
4197 | + func_error "See the $PACKAGE documentation for more information." |
4198 | + func_fatal_error "Fatal configuration error." |
4199 | +} |
4200 | + |
4201 | + |
4202 | +# func_config |
4203 | +# Display the configuration for all the tags in this script. |
4204 | +func_config () |
4205 | +{ |
4206 | + re_begincf='^# ### BEGIN LIBTOOL' |
4207 | + re_endcf='^# ### END LIBTOOL' |
4208 | + |
4209 | + # Default configuration. |
4210 | + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" |
4211 | + |
4212 | + # Now print the configurations for the tags. |
4213 | + for tagname in $taglist; do |
4214 | + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" |
4215 | + done |
4216 | + |
4217 | + exit $? |
4218 | +} |
4219 | + |
4220 | +# func_features |
4221 | +# Display the features supported by this script. |
4222 | +func_features () |
4223 | +{ |
4224 | + $ECHO "host: $host" |
4225 | + if test "$build_libtool_libs" = yes; then |
4226 | + $ECHO "enable shared libraries" |
4227 | + else |
4228 | + $ECHO "disable shared libraries" |
4229 | + fi |
4230 | + if test "$build_old_libs" = yes; then |
4231 | + $ECHO "enable static libraries" |
4232 | + else |
4233 | + $ECHO "disable static libraries" |
4234 | + fi |
4235 | + |
4236 | + exit $? |
4237 | +} |
4238 | + |
4239 | +# func_enable_tag tagname |
4240 | +# Verify that TAGNAME is valid, and either flag an error and exit, or |
4241 | +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist |
4242 | +# variable here. |
4243 | +func_enable_tag () |
4244 | +{ |
4245 | + # Global variable: |
4246 | + tagname="$1" |
4247 | + |
4248 | + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" |
4249 | + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" |
4250 | + sed_extractcf="/$re_begincf/,/$re_endcf/p" |
4251 | + |
4252 | + # Validate tagname. |
4253 | + case $tagname in |
4254 | + *[!-_A-Za-z0-9,/]*) |
4255 | + func_fatal_error "invalid tag name: $tagname" |
4256 | + ;; |
4257 | + esac |
4258 | + |
4259 | + # Don't test for the "default" C tag, as we know it's |
4260 | + # there but not specially marked. |
4261 | + case $tagname in |
4262 | + CC) ;; |
4263 | + *) |
4264 | + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then |
4265 | + taglist="$taglist $tagname" |
4266 | + |
4267 | + # Evaluate the configuration. Be careful to quote the path |
4268 | + # and the sed script, to avoid splitting on whitespace, but |
4269 | + # also don't use non-portable quotes within backquotes within |
4270 | + # quotes we have to do it in 2 steps: |
4271 | + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` |
4272 | + eval "$extractedcf" |
4273 | + else |
4274 | + func_error "ignoring unknown tag $tagname" |
4275 | + fi |
4276 | + ;; |
4277 | + esac |
4278 | +} |
4279 | + |
4280 | +# Parse options once, thoroughly. This comes as soon as possible in |
4281 | +# the script to make things like `libtool --version' happen quickly. |
4282 | +{ |
4283 | + |
4284 | + # Shorthand for --mode=foo, only valid as the first argument |
4285 | + case $1 in |
4286 | + clean|clea|cle|cl) |
4287 | + shift; set dummy --mode clean ${1+"$@"}; shift |
4288 | + ;; |
4289 | + compile|compil|compi|comp|com|co|c) |
4290 | + shift; set dummy --mode compile ${1+"$@"}; shift |
4291 | + ;; |
4292 | + execute|execut|execu|exec|exe|ex|e) |
4293 | + shift; set dummy --mode execute ${1+"$@"}; shift |
4294 | + ;; |
4295 | + finish|finis|fini|fin|fi|f) |
4296 | + shift; set dummy --mode finish ${1+"$@"}; shift |
4297 | + ;; |
4298 | + install|instal|insta|inst|ins|in|i) |
4299 | + shift; set dummy --mode install ${1+"$@"}; shift |
4300 | + ;; |
4301 | + link|lin|li|l) |
4302 | + shift; set dummy --mode link ${1+"$@"}; shift |
4303 | + ;; |
4304 | + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
4305 | + shift; set dummy --mode uninstall ${1+"$@"}; shift |
4306 | + ;; |
4307 | + esac |
4308 | + |
4309 | + # Parse non-mode specific arguments: |
4310 | + while test "$#" -gt 0; do |
4311 | + opt="$1" |
4312 | + shift |
4313 | + |
4314 | + case $opt in |
4315 | + --config) func_config ;; |
4316 | + |
4317 | + --debug) preserve_args="$preserve_args $opt" |
4318 | + func_echo "enabling shell trace mode" |
4319 | + opt_debug='set -x' |
4320 | + $opt_debug |
4321 | + ;; |
4322 | + |
4323 | + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break |
4324 | + execute_dlfiles="$execute_dlfiles $1" |
4325 | + shift |
4326 | + ;; |
4327 | + |
4328 | + --dry-run | -n) opt_dry_run=: ;; |
4329 | + --features) func_features ;; |
4330 | + --finish) mode="finish" ;; |
4331 | + |
4332 | + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break |
4333 | + case $1 in |
4334 | + # Valid mode arguments: |
4335 | + clean) ;; |
4336 | + compile) ;; |
4337 | + execute) ;; |
4338 | + finish) ;; |
4339 | + install) ;; |
4340 | + link) ;; |
4341 | + relink) ;; |
4342 | + uninstall) ;; |
4343 | + |
4344 | + # Catch anything else as an error |
4345 | + *) func_error "invalid argument for $opt" |
4346 | + exit_cmd=exit |
4347 | + break |
4348 | + ;; |
4349 | + esac |
4350 | + |
4351 | + mode="$1" |
4352 | + shift |
4353 | + ;; |
4354 | + |
4355 | + --preserve-dup-deps) |
4356 | + opt_duplicate_deps=: ;; |
4357 | + |
4358 | + --quiet|--silent) preserve_args="$preserve_args $opt" |
4359 | + opt_silent=: |
4360 | + ;; |
4361 | + |
4362 | + --verbose| -v) preserve_args="$preserve_args $opt" |
4363 | + opt_silent=false |
4364 | + ;; |
4365 | + |
4366 | + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break |
4367 | + preserve_args="$preserve_args $opt $1" |
4368 | + func_enable_tag "$1" # tagname is set here |
4369 | + shift |
4370 | + ;; |
4371 | + |
4372 | + # Separate optargs to long options: |
4373 | + -dlopen=*|--mode=*|--tag=*) |
4374 | + func_opt_split "$opt" |
4375 | + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} |
4376 | + shift |
4377 | + ;; |
4378 | + |
4379 | + -\?|-h) func_usage ;; |
4380 | + --help) opt_help=: ;; |
4381 | + --version) func_version ;; |
4382 | + |
4383 | + -*) func_fatal_help "unrecognized option \`$opt'" ;; |
4384 | + |
4385 | + *) nonopt="$opt" |
4386 | + break |
4387 | + ;; |
4388 | + esac |
4389 | + done |
4390 | + |
4391 | + |
4392 | + case $host in |
4393 | + *cygwin* | *mingw* | *pw32* | *cegcc*) |
4394 | + # don't eliminate duplications in $postdeps and $predeps |
4395 | + opt_duplicate_compiler_generated_deps=: |
4396 | + ;; |
4397 | + *) |
4398 | + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps |
4399 | + ;; |
4400 | + esac |
4401 | + |
4402 | + # Having warned about all mis-specified options, bail out if |
4403 | + # anything was wrong. |
4404 | + $exit_cmd $EXIT_FAILURE |
4405 | +} |
4406 | + |
4407 | +# func_check_version_match |
4408 | +# Ensure that we are using m4 macros, and libtool script from the same |
4409 | +# release of libtool. |
4410 | +func_check_version_match () |
4411 | +{ |
4412 | + if test "$package_revision" != "$macro_revision"; then |
4413 | + if test "$VERSION" != "$macro_version"; then |
4414 | + if test -z "$macro_version"; then |
4415 | + cat >&2 <<_LT_EOF |
4416 | +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the |
4417 | +$progname: definition of this LT_INIT comes from an older release. |
4418 | +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION |
4419 | +$progname: and run autoconf again. |
4420 | +_LT_EOF |
4421 | + else |
4422 | + cat >&2 <<_LT_EOF |
4423 | +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the |
4424 | +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. |
4425 | +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION |
4426 | +$progname: and run autoconf again. |
4427 | +_LT_EOF |
4428 | + fi |
4429 | + else |
4430 | + cat >&2 <<_LT_EOF |
4431 | +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, |
4432 | +$progname: but the definition of this LT_INIT comes from revision $macro_revision. |
4433 | +$progname: You should recreate aclocal.m4 with macros from revision $package_revision |
4434 | +$progname: of $PACKAGE $VERSION and run autoconf again. |
4435 | +_LT_EOF |
4436 | + fi |
4437 | + |
4438 | + exit $EXIT_MISMATCH |
4439 | + fi |
4440 | +} |
4441 | + |
4442 | + |
4443 | +## ----------- ## |
4444 | +## Main. ## |
4445 | +## ----------- ## |
4446 | + |
4447 | +$opt_help || { |
4448 | + # Sanity checks first: |
4449 | + func_check_version_match |
4450 | + |
4451 | + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then |
4452 | + func_fatal_configuration "not configured to build any kind of library" |
4453 | + fi |
4454 | + |
4455 | + test -z "$mode" && func_fatal_error "error: you must specify a MODE." |
4456 | + |
4457 | + |
4458 | + # Darwin sucks |
4459 | + eval std_shrext=\"$shrext_cmds\" |
4460 | + |
4461 | + |
4462 | + # Only execute mode is allowed to have -dlopen flags. |
4463 | + if test -n "$execute_dlfiles" && test "$mode" != execute; then |
4464 | + func_error "unrecognized option \`-dlopen'" |
4465 | + $ECHO "$help" 1>&2 |
4466 | + exit $EXIT_FAILURE |
4467 | + fi |
4468 | + |
4469 | + # Change the help message to a mode-specific one. |
4470 | + generic_help="$help" |
4471 | + help="Try \`$progname --help --mode=$mode' for more information." |
4472 | +} |
4473 | + |
4474 | + |
4475 | +# func_lalib_p file |
4476 | +# True iff FILE is a libtool `.la' library or `.lo' object file. |
4477 | +# This function is only a basic sanity check; it will hardly flush out |
4478 | +# determined imposters. |
4479 | +func_lalib_p () |
4480 | +{ |
4481 | + test -f "$1" && |
4482 | + $SED -e 4q "$1" 2>/dev/null \ |
4483 | + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 |
4484 | +} |
4485 | + |
4486 | +# func_lalib_unsafe_p file |
4487 | +# True iff FILE is a libtool `.la' library or `.lo' object file. |
4488 | +# This function implements the same check as func_lalib_p without |
4489 | +# resorting to external programs. To this end, it redirects stdin and |
4490 | +# closes it afterwards, without saving the original file descriptor. |
4491 | +# As a safety measure, use it only where a negative result would be |
4492 | +# fatal anyway. Works if `file' does not exist. |
4493 | +func_lalib_unsafe_p () |
4494 | +{ |
4495 | + lalib_p=no |
4496 | + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then |
4497 | + for lalib_p_l in 1 2 3 4 |
4498 | + do |
4499 | + read lalib_p_line |
4500 | + case "$lalib_p_line" in |
4501 | + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; |
4502 | + esac |
4503 | + done |
4504 | + exec 0<&5 5<&- |
4505 | + fi |
4506 | + test "$lalib_p" = yes |
4507 | +} |
4508 | + |
4509 | +# func_ltwrapper_script_p file |
4510 | +# True iff FILE is a libtool wrapper script |
4511 | +# This function is only a basic sanity check; it will hardly flush out |
4512 | +# determined imposters. |
4513 | +func_ltwrapper_script_p () |
4514 | +{ |
4515 | + func_lalib_p "$1" |
4516 | +} |
4517 | + |
4518 | +# func_ltwrapper_executable_p file |
4519 | +# True iff FILE is a libtool wrapper executable |
4520 | +# This function is only a basic sanity check; it will hardly flush out |
4521 | +# determined imposters. |
4522 | +func_ltwrapper_executable_p () |
4523 | +{ |
4524 | + func_ltwrapper_exec_suffix= |
4525 | + case $1 in |
4526 | + *.exe) ;; |
4527 | + *) func_ltwrapper_exec_suffix=.exe ;; |
4528 | + esac |
4529 | + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 |
4530 | +} |
4531 | + |
4532 | +# func_ltwrapper_scriptname file |
4533 | +# Assumes file is an ltwrapper_executable |
4534 | +# uses $file to determine the appropriate filename for a |
4535 | +# temporary ltwrapper_script. |
4536 | +func_ltwrapper_scriptname () |
4537 | +{ |
4538 | + func_ltwrapper_scriptname_result="" |
4539 | + if func_ltwrapper_executable_p "$1"; then |
4540 | + func_dirname_and_basename "$1" "" "." |
4541 | + func_stripname '' '.exe' "$func_basename_result" |
4542 | + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" |
4543 | + fi |
4544 | +} |
4545 | + |
4546 | +# func_ltwrapper_p file |
4547 | +# True iff FILE is a libtool wrapper script or wrapper executable |
4548 | +# This function is only a basic sanity check; it will hardly flush out |
4549 | +# determined imposters. |
4550 | +func_ltwrapper_p () |
4551 | +{ |
4552 | + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" |
4553 | +} |
4554 | + |
4555 | + |
4556 | +# func_execute_cmds commands fail_cmd |
4557 | +# Execute tilde-delimited COMMANDS. |
4558 | +# If FAIL_CMD is given, eval that upon failure. |
4559 | +# FAIL_CMD may read-access the current command in variable CMD! |
4560 | +func_execute_cmds () |
4561 | +{ |
4562 | + $opt_debug |
4563 | + save_ifs=$IFS; IFS='~' |
4564 | + for cmd in $1; do |
4565 | + IFS=$save_ifs |
4566 | + eval cmd=\"$cmd\" |
4567 | + func_show_eval "$cmd" "${2-:}" |
4568 | + done |
4569 | + IFS=$save_ifs |
4570 | +} |
4571 | + |
4572 | + |
4573 | +# func_source file |
4574 | +# Source FILE, adding directory component if necessary. |
4575 | +# Note that it is not necessary on cygwin/mingw to append a dot to |
4576 | +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe |
4577 | +# behavior happens only for exec(3), not for open(2)! Also, sourcing |
4578 | +# `FILE.' does not work on cygwin managed mounts. |
4579 | +func_source () |
4580 | +{ |
4581 | + $opt_debug |
4582 | + case $1 in |
4583 | + */* | *\\*) . "$1" ;; |
4584 | + *) . "./$1" ;; |
4585 | + esac |
4586 | +} |
4587 | + |
4588 | + |
4589 | +# func_infer_tag arg |
4590 | +# Infer tagged configuration to use if any are available and |
4591 | +# if one wasn't chosen via the "--tag" command line option. |
4592 | +# Only attempt this if the compiler in the base compile |
4593 | +# command doesn't match the default compiler. |
4594 | +# arg is usually of the form 'gcc ...' |
4595 | +func_infer_tag () |
4596 | +{ |
4597 | + $opt_debug |
4598 | + if test -n "$available_tags" && test -z "$tagname"; then |
4599 | + CC_quoted= |
4600 | + for arg in $CC; do |
4601 | + func_quote_for_eval "$arg" |
4602 | + CC_quoted="$CC_quoted $func_quote_for_eval_result" |
4603 | + done |
4604 | + case $@ in |
4605 | + # Blanks in the command may have been stripped by the calling shell, |
4606 | + # but not from the CC environment variable when configure was run. |
4607 | + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; |
4608 | + # Blanks at the start of $base_compile will cause this to fail |
4609 | + # if we don't check for them as well. |
4610 | + *) |
4611 | + for z in $available_tags; do |
4612 | + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then |
4613 | + # Evaluate the configuration. |
4614 | + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" |
4615 | + CC_quoted= |
4616 | + for arg in $CC; do |
4617 | + # Double-quote args containing other shell metacharacters. |
4618 | + func_quote_for_eval "$arg" |
4619 | + CC_quoted="$CC_quoted $func_quote_for_eval_result" |
4620 | + done |
4621 | + case "$@ " in |
4622 | + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) |
4623 | + # The compiler in the base compile command matches |
4624 | + # the one in the tagged configuration. |
4625 | + # Assume this is the tagged configuration we want. |
4626 | + tagname=$z |
4627 | + break |
4628 | + ;; |
4629 | + esac |
4630 | + fi |
4631 | + done |
4632 | + # If $tagname still isn't set, then no tagged configuration |
4633 | + # was found and let the user know that the "--tag" command |
4634 | + # line option must be used. |
4635 | + if test -z "$tagname"; then |
4636 | + func_echo "unable to infer tagged configuration" |
4637 | + func_fatal_error "specify a tag with \`--tag'" |
4638 | +# else |
4639 | +# func_verbose "using $tagname tagged configuration" |
4640 | + fi |
4641 | + ;; |
4642 | + esac |
4643 | + fi |
4644 | +} |
4645 | + |
4646 | + |
4647 | + |
4648 | +# func_write_libtool_object output_name pic_name nonpic_name |
4649 | +# Create a libtool object file (analogous to a ".la" file), |
4650 | +# but don't create it if we're doing a dry run. |
4651 | +func_write_libtool_object () |
4652 | +{ |
4653 | + write_libobj=${1} |
4654 | + if test "$build_libtool_libs" = yes; then |
4655 | + write_lobj=\'${2}\' |
4656 | + else |
4657 | + write_lobj=none |
4658 | + fi |
4659 | + |
4660 | + if test "$build_old_libs" = yes; then |
4661 | + write_oldobj=\'${3}\' |
4662 | + else |
4663 | + write_oldobj=none |
4664 | + fi |
4665 | + |
4666 | + $opt_dry_run || { |
4667 | + cat >${write_libobj}T <<EOF |
4668 | +# $write_libobj - a libtool object file |
4669 | +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION |
4670 | +# |
4671 | +# Please DO NOT delete this file! |
4672 | +# It is necessary for linking the library. |
4673 | + |
4674 | +# Name of the PIC object. |
4675 | +pic_object=$write_lobj |
4676 | + |
4677 | +# Name of the non-PIC object |
4678 | +non_pic_object=$write_oldobj |
4679 | + |
4680 | +EOF |
4681 | + $MV "${write_libobj}T" "${write_libobj}" |
4682 | + } |
4683 | +} |
4684 | + |
4685 | +# func_mode_compile arg... |
4686 | +func_mode_compile () |
4687 | +{ |
4688 | + $opt_debug |
4689 | + # Get the compilation command and the source file. |
4690 | + base_compile= |
4691 | + srcfile="$nonopt" # always keep a non-empty value in "srcfile" |
4692 | + suppress_opt=yes |
4693 | + suppress_output= |
4694 | + arg_mode=normal |
4695 | + libobj= |
4696 | + later= |
4697 | + pie_flag= |
4698 | + |
4699 | + for arg |
4700 | + do |
4701 | + case $arg_mode in |
4702 | + arg ) |
4703 | + # do not "continue". Instead, add this to base_compile |
4704 | + lastarg="$arg" |
4705 | + arg_mode=normal |
4706 | + ;; |
4707 | + |
4708 | + target ) |
4709 | + libobj="$arg" |
4710 | + arg_mode=normal |
4711 | + continue |
4712 | + ;; |
4713 | + |
4714 | + normal ) |
4715 | + # Accept any command-line options. |
4716 | + case $arg in |
4717 | + -o) |
4718 | + test -n "$libobj" && \ |
4719 | + func_fatal_error "you cannot specify \`-o' more than once" |
4720 | + arg_mode=target |
4721 | + continue |
4722 | + ;; |
4723 | + |
4724 | + -pie | -fpie | -fPIE) |
4725 | + pie_flag="$pie_flag $arg" |
4726 | + continue |
4727 | + ;; |
4728 | + |
4729 | + -shared | -static | -prefer-pic | -prefer-non-pic) |
4730 | + later="$later $arg" |
4731 | + continue |
4732 | + ;; |
4733 | + |
4734 | + -no-suppress) |
4735 | + suppress_opt=no |
4736 | + continue |
4737 | + ;; |
4738 | + |
4739 | + -Xcompiler) |
4740 | + arg_mode=arg # the next one goes into the "base_compile" arg list |
4741 | + continue # The current "srcfile" will either be retained or |
4742 | + ;; # replaced later. I would guess that would be a bug. |
4743 | + |
4744 | + -Wc,*) |
4745 | + func_stripname '-Wc,' '' "$arg" |
4746 | + args=$func_stripname_result |
4747 | + lastarg= |
4748 | + save_ifs="$IFS"; IFS=',' |
4749 | + for arg in $args; do |
4750 | + IFS="$save_ifs" |
4751 | + func_quote_for_eval "$arg" |
4752 | + lastarg="$lastarg $func_quote_for_eval_result" |
4753 | + done |
4754 | + IFS="$save_ifs" |
4755 | + func_stripname ' ' '' "$lastarg" |
4756 | + lastarg=$func_stripname_result |
4757 | + |
4758 | + # Add the arguments to base_compile. |
4759 | + base_compile="$base_compile $lastarg" |
4760 | + continue |
4761 | + ;; |
4762 | + |
4763 | + *) |
4764 | + # Accept the current argument as the source file. |
4765 | + # The previous "srcfile" becomes the current argument. |
4766 | + # |
4767 | + lastarg="$srcfile" |
4768 | + srcfile="$arg" |
4769 | + ;; |
4770 | + esac # case $arg |
4771 | + ;; |
4772 | + esac # case $arg_mode |
4773 | + |
4774 | + # Aesthetically quote the previous argument. |
4775 | + func_quote_for_eval "$lastarg" |
4776 | + base_compile="$base_compile $func_quote_for_eval_result" |
4777 | + done # for arg |
4778 | + |
4779 | + case $arg_mode in |
4780 | + arg) |
4781 | + func_fatal_error "you must specify an argument for -Xcompile" |
4782 | + ;; |
4783 | + target) |
4784 | + func_fatal_error "you must specify a target with \`-o'" |
4785 | + ;; |
4786 | + *) |
4787 | + # Get the name of the library object. |
4788 | + test -z "$libobj" && { |
4789 | + func_basename "$srcfile" |
4790 | + libobj="$func_basename_result" |
4791 | + } |
4792 | + ;; |
4793 | + esac |
4794 | + |
4795 | + # Recognize several different file suffixes. |
4796 | + # If the user specifies -o file.o, it is replaced with file.lo |
4797 | + case $libobj in |
4798 | + *.[cCFSifmso] | \ |
4799 | + *.ada | *.adb | *.ads | *.asm | \ |
4800 | + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ |
4801 | + *.[fF][09]? | *.for | *.java | *.obj | *.sx) |
4802 | + func_xform "$libobj" |
4803 | + libobj=$func_xform_result |
4804 | + ;; |
4805 | + esac |
4806 | + |
4807 | + case $libobj in |
4808 | + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; |
4809 | + *) |
4810 | + func_fatal_error "cannot determine name of library object from \`$libobj'" |
4811 | + ;; |
4812 | + esac |
4813 | + |
4814 | + func_infer_tag $base_compile |
4815 | + |
4816 | + for arg in $later; do |
4817 | + case $arg in |
4818 | + -shared) |
4819 | + test "$build_libtool_libs" != yes && \ |
4820 | + func_fatal_configuration "can not build a shared library" |
4821 | + build_old_libs=no |
4822 | + continue |
4823 | + ;; |
4824 | + |
4825 | + -static) |
4826 | + build_libtool_libs=no |
4827 | + build_old_libs=yes |
4828 | + continue |
4829 | + ;; |
4830 | + |
4831 | + -prefer-pic) |
4832 | + pic_mode=yes |
4833 | + continue |
4834 | + ;; |
4835 | + |
4836 | + -prefer-non-pic) |
4837 | + pic_mode=no |
4838 | + continue |
4839 | + ;; |
4840 | + esac |
4841 | + done |
4842 | + |
4843 | + func_quote_for_eval "$libobj" |
4844 | + test "X$libobj" != "X$func_quote_for_eval_result" \ |
4845 | + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
4846 | + && func_warning "libobj name \`$libobj' may not contain shell special characters." |
4847 | + func_dirname_and_basename "$obj" "/" "" |
4848 | + objname="$func_basename_result" |
4849 | + xdir="$func_dirname_result" |
4850 | + lobj=${xdir}$objdir/$objname |
4851 | + |
4852 | + test -z "$base_compile" && \ |
4853 | + func_fatal_help "you must specify a compilation command" |
4854 | + |
4855 | + # Delete any leftover library objects. |
4856 | + if test "$build_old_libs" = yes; then |
4857 | + removelist="$obj $lobj $libobj ${libobj}T" |
4858 | + else |
4859 | + removelist="$lobj $libobj ${libobj}T" |
4860 | + fi |
4861 | + |
4862 | + # On Cygwin there's no "real" PIC flag so we must build both object types |
4863 | + case $host_os in |
4864 | + cygwin* | mingw* | pw32* | os2* | cegcc*) |
4865 | + pic_mode=default |
4866 | + ;; |
4867 | + esac |
4868 | + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then |
4869 | + # non-PIC code in shared libraries is not supported |
4870 | + pic_mode=default |
4871 | + fi |
4872 | + |
4873 | + # Calculate the filename of the output object if compiler does |
4874 | + # not support -o with -c |
4875 | + if test "$compiler_c_o" = no; then |
4876 | + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} |
4877 | + lockfile="$output_obj.lock" |
4878 | + else |
4879 | + output_obj= |
4880 | + need_locks=no |
4881 | + lockfile= |
4882 | + fi |
4883 | + |
4884 | + # Lock this critical section if it is needed |
4885 | + # We use this script file to make the link, it avoids creating a new file |
4886 | + if test "$need_locks" = yes; then |
4887 | + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do |
4888 | + func_echo "Waiting for $lockfile to be removed" |
4889 | + sleep 2 |
4890 | + done |
4891 | + elif test "$need_locks" = warn; then |
4892 | + if test -f "$lockfile"; then |
4893 | + $ECHO "\ |
4894 | +*** ERROR, $lockfile exists and contains: |
4895 | +`cat $lockfile 2>/dev/null` |
4896 | + |
4897 | +This indicates that another process is trying to use the same |
4898 | +temporary object file, and libtool could not work around it because |
4899 | +your compiler does not support \`-c' and \`-o' together. If you |
4900 | +repeat this compilation, it may succeed, by chance, but you had better |
4901 | +avoid parallel builds (make -j) in this platform, or get a better |
4902 | +compiler." |
4903 | + |
4904 | + $opt_dry_run || $RM $removelist |
4905 | + exit $EXIT_FAILURE |
4906 | + fi |
4907 | + removelist="$removelist $output_obj" |
4908 | + $ECHO "$srcfile" > "$lockfile" |
4909 | + fi |
4910 | + |
4911 | + $opt_dry_run || $RM $removelist |
4912 | + removelist="$removelist $lockfile" |
4913 | + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 |
4914 | + |
4915 | + if test -n "$fix_srcfile_path"; then |
4916 | + eval srcfile=\"$fix_srcfile_path\" |
4917 | + fi |
4918 | + func_quote_for_eval "$srcfile" |
4919 | + qsrcfile=$func_quote_for_eval_result |
4920 | + |
4921 | + # Only build a PIC object if we are building libtool libraries. |
4922 | + if test "$build_libtool_libs" = yes; then |
4923 | + # Without this assignment, base_compile gets emptied. |
4924 | + fbsd_hideous_sh_bug=$base_compile |
4925 | + |
4926 | + if test "$pic_mode" != no; then |
4927 | + command="$base_compile $qsrcfile $pic_flag" |
4928 | + else |
4929 | + # Don't build PIC code |
4930 | + command="$base_compile $qsrcfile" |
4931 | + fi |
4932 | + |
4933 | + func_mkdir_p "$xdir$objdir" |
4934 | + |
4935 | + if test -z "$output_obj"; then |
4936 | + # Place PIC objects in $objdir |
4937 | + command="$command -o $lobj" |
4938 | + fi |
4939 | + |
4940 | + func_show_eval_locale "$command" \ |
4941 | + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' |
4942 | + |
4943 | + if test "$need_locks" = warn && |
4944 | + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
4945 | + $ECHO "\ |
4946 | +*** ERROR, $lockfile contains: |
4947 | +`cat $lockfile 2>/dev/null` |
4948 | + |
4949 | +but it should contain: |
4950 | +$srcfile |
4951 | + |
4952 | +This indicates that another process is trying to use the same |
4953 | +temporary object file, and libtool could not work around it because |
4954 | +your compiler does not support \`-c' and \`-o' together. If you |
4955 | +repeat this compilation, it may succeed, by chance, but you had better |
4956 | +avoid parallel builds (make -j) in this platform, or get a better |
4957 | +compiler." |
4958 | + |
4959 | + $opt_dry_run || $RM $removelist |
4960 | + exit $EXIT_FAILURE |
4961 | + fi |
4962 | + |
4963 | + # Just move the object if needed, then go on to compile the next one |
4964 | + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then |
4965 | + func_show_eval '$MV "$output_obj" "$lobj"' \ |
4966 | + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' |
4967 | + fi |
4968 | + |
4969 | + # Allow error messages only from the first compilation. |
4970 | + if test "$suppress_opt" = yes; then |
4971 | + suppress_output=' >/dev/null 2>&1' |
4972 | + fi |
4973 | + fi |
4974 | + |
4975 | + # Only build a position-dependent object if we build old libraries. |
4976 | + if test "$build_old_libs" = yes; then |
4977 | + if test "$pic_mode" != yes; then |
4978 | + # Don't build PIC code |
4979 | + command="$base_compile $qsrcfile$pie_flag" |
4980 | + else |
4981 | + command="$base_compile $qsrcfile $pic_flag" |
4982 | + fi |
4983 | + if test "$compiler_c_o" = yes; then |
4984 | + command="$command -o $obj" |
4985 | + fi |
4986 | + |
4987 | + # Suppress compiler output if we already did a PIC compilation. |
4988 | + command="$command$suppress_output" |
4989 | + func_show_eval_locale "$command" \ |
4990 | + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' |
4991 | + |
4992 | + if test "$need_locks" = warn && |
4993 | + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
4994 | + $ECHO "\ |
4995 | +*** ERROR, $lockfile contains: |
4996 | +`cat $lockfile 2>/dev/null` |
4997 | + |
4998 | +but it should contain: |
4999 | +$srcfile |
5000 | + |
The diff has been truncated for viewing.
Looks great, Thanks Robie.
Uploaded.