summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess586
1 files changed, 326 insertions, 260 deletions
diff --git a/config.guess b/config.guess
index bb9d7aee4..6d71f752f 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6timestamp='2004-01-05' 6timestamp='2005-05-27'
7 7
8# This file is free software; you can redistribute it and/or modify it 8# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by 9# under the terms of the GNU General Public License as published by
@@ -17,13 +17,15 @@ timestamp='2004-01-05'
17# 17#
18# You should have received a copy of the GNU General Public License 18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software 19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21# 02110-1301, USA.
21# 22#
22# As a special exception to the GNU General Public License, if you 23# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a 24# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under 25# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program. 26# the same distribution terms that you use for the rest of that program.
26 27
28
27# Originally written by Per Bothner <per@bothner.com>. 29# Originally written by Per Bothner <per@bothner.com>.
28# Please send patches to <config-patches@gnu.org>. Submit a context 30# Please send patches to <config-patches@gnu.org>. Submit a context
29# diff and a properly formatted ChangeLog entry. 31# diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@ version="\
53GNU config.guess ($timestamp) 55GNU config.guess ($timestamp)
54 56
55Originally written by Per Bothner. 57Originally written by Per Bothner.
56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 58Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
57Free Software Foundation, Inc. 59Free Software Foundation, Inc.
58 60
59This is free software; see the source for copying conditions. There is NO 61This is free software; see the source for copying conditions. There is NO
@@ -66,11 +68,11 @@ Try \`$me --help' for more information."
66while test $# -gt 0 ; do 68while test $# -gt 0 ; do
67 case $1 in 69 case $1 in
68 --time-stamp | --time* | -t ) 70 --time-stamp | --time* | -t )
69 echo "$timestamp" ; exit 0 ;; 71 echo "$timestamp" ; exit ;;
70 --version | -v ) 72 --version | -v )
71 echo "$version" ; exit 0 ;; 73 echo "$version" ; exit ;;
72 --help | --h* | -h ) 74 --help | --h* | -h )
73 echo "$usage"; exit 0 ;; 75 echo "$usage"; exit ;;
74 -- ) # Stop option processing 76 -- ) # Stop option processing
75 shift; break ;; 77 shift; break ;;
76 - ) # Use stdin as input. 78 - ) # Use stdin as input.
@@ -196,53 +198,64 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
196 # contains redundant information, the shorter form: 198 # contains redundant information, the shorter form:
197 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 199 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
198 echo "${machine}-${os}${release}" 200 echo "${machine}-${os}${release}"
199 exit 0 ;; 201 exit ;;
202 amd64:OpenBSD:*:*)
203 echo x86_64-unknown-openbsd${UNAME_RELEASE}
204 exit ;;
200 amiga:OpenBSD:*:*) 205 amiga:OpenBSD:*:*)
201 echo m68k-unknown-openbsd${UNAME_RELEASE} 206 echo m68k-unknown-openbsd${UNAME_RELEASE}
202 exit 0 ;; 207 exit ;;
203 arc:OpenBSD:*:*) 208 cats:OpenBSD:*:*)
204 echo mipsel-unknown-openbsd${UNAME_RELEASE} 209 echo arm-unknown-openbsd${UNAME_RELEASE}
205 exit 0 ;; 210 exit ;;
206 hp300:OpenBSD:*:*) 211 hp300:OpenBSD:*:*)
207 echo m68k-unknown-openbsd${UNAME_RELEASE} 212 echo m68k-unknown-openbsd${UNAME_RELEASE}
208 exit 0 ;; 213 exit ;;
214 luna88k:OpenBSD:*:*)
215 echo m88k-unknown-openbsd${UNAME_RELEASE}
216 exit ;;
209 mac68k:OpenBSD:*:*) 217 mac68k:OpenBSD:*:*)
210 echo m68k-unknown-openbsd${UNAME_RELEASE} 218 echo m68k-unknown-openbsd${UNAME_RELEASE}
211 exit 0 ;; 219 exit ;;
212 macppc:OpenBSD:*:*) 220 macppc:OpenBSD:*:*)
213 echo powerpc-unknown-openbsd${UNAME_RELEASE} 221 echo powerpc-unknown-openbsd${UNAME_RELEASE}
214 exit 0 ;; 222 exit ;;
215 mvme68k:OpenBSD:*:*) 223 mvme68k:OpenBSD:*:*)
216 echo m68k-unknown-openbsd${UNAME_RELEASE} 224 echo m68k-unknown-openbsd${UNAME_RELEASE}
217 exit 0 ;; 225 exit ;;
218 mvme88k:OpenBSD:*:*) 226 mvme88k:OpenBSD:*:*)
219 echo m88k-unknown-openbsd${UNAME_RELEASE} 227 echo m88k-unknown-openbsd${UNAME_RELEASE}
220 exit 0 ;; 228 exit ;;
221 mvmeppc:OpenBSD:*:*) 229 mvmeppc:OpenBSD:*:*)
222 echo powerpc-unknown-openbsd${UNAME_RELEASE} 230 echo powerpc-unknown-openbsd${UNAME_RELEASE}
223 exit 0 ;; 231 exit ;;
224 pegasos:OpenBSD:*:*)
225 echo powerpc-unknown-openbsd${UNAME_RELEASE}
226 exit 0 ;;
227 pmax:OpenBSD:*:*)
228 echo mipsel-unknown-openbsd${UNAME_RELEASE}
229 exit 0 ;;
230 sgi:OpenBSD:*:*) 232 sgi:OpenBSD:*:*)
231 echo mipseb-unknown-openbsd${UNAME_RELEASE} 233 echo mips64-unknown-openbsd${UNAME_RELEASE}
232 exit 0 ;; 234 exit ;;
233 sun3:OpenBSD:*:*) 235 sun3:OpenBSD:*:*)
234 echo m68k-unknown-openbsd${UNAME_RELEASE} 236 echo m68k-unknown-openbsd${UNAME_RELEASE}
235 exit 0 ;; 237 exit ;;
236 wgrisc:OpenBSD:*:*)
237 echo mipsel-unknown-openbsd${UNAME_RELEASE}
238 exit 0 ;;
239 *:OpenBSD:*:*) 238 *:OpenBSD:*:*)
240 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 239 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
241 exit 0 ;; 240 exit ;;
241 *:ekkoBSD:*:*)
242 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
243 exit ;;
244 macppc:MirBSD:*:*)
245 echo powerppc-unknown-mirbsd${UNAME_RELEASE}
246 exit ;;
247 *:MirBSD:*:*)
248 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
249 exit ;;
242 alpha:OSF1:*:*) 250 alpha:OSF1:*:*)
243 if test $UNAME_RELEASE = "V4.0"; then 251 case $UNAME_RELEASE in
252 *4.0)
244 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 253 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
245 fi 254 ;;
255 *5.*)
256 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
257 ;;
258 esac
246 # According to Compaq, /usr/sbin/psrinfo has been available on 259 # According to Compaq, /usr/sbin/psrinfo has been available on
247 # OSF/1 and Tru64 systems produced since 1995. I hope that 260 # OSF/1 and Tru64 systems produced since 1995. I hope that
248 # covers most systems running today. This code pipes the CPU 261 # covers most systems running today. This code pipes the CPU
@@ -280,45 +293,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
280 "EV7.9 (21364A)") 293 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;; 294 UNAME_MACHINE="alphaev79" ;;
282 esac 295 esac
296 # A Pn.n version is a patched version.
283 # A Vn.n version is a released version. 297 # A Vn.n version is a released version.
284 # A Tn.n version is a released field test version. 298 # A Tn.n version is a released field test version.
285 # A Xn.n version is an unreleased experimental baselevel. 299 # A Xn.n version is an unreleased experimental baselevel.
286 # 1.2 uses "1.2" for uname -r. 300 # 1.2 uses "1.2" for uname -r.
287 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 301 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
288 exit 0 ;; 302 exit ;;
289 Alpha*:OpenVMS:*:*)
290 echo alpha-hp-vms
291 exit 0 ;;
292 Alpha\ *:Windows_NT*:*) 303 Alpha\ *:Windows_NT*:*)
293 # How do we know it's Interix rather than the generic POSIX subsystem? 304 # How do we know it's Interix rather than the generic POSIX subsystem?
294 # Should we change UNAME_MACHINE based on the output of uname instead 305 # Should we change UNAME_MACHINE based on the output of uname instead
295 # of the specific Alpha model? 306 # of the specific Alpha model?
296 echo alpha-pc-interix 307 echo alpha-pc-interix
297 exit 0 ;; 308 exit ;;
298 21064:Windows_NT:50:3) 309 21064:Windows_NT:50:3)
299 echo alpha-dec-winnt3.5 310 echo alpha-dec-winnt3.5
300 exit 0 ;; 311 exit ;;
301 Amiga*:UNIX_System_V:4.0:*) 312 Amiga*:UNIX_System_V:4.0:*)
302 echo m68k-unknown-sysv4 313 echo m68k-unknown-sysv4
303 exit 0;; 314 exit ;;
304 *:[Aa]miga[Oo][Ss]:*:*) 315 *:[Aa]miga[Oo][Ss]:*:*)
305 echo ${UNAME_MACHINE}-unknown-amigaos 316 echo ${UNAME_MACHINE}-unknown-amigaos
306 exit 0 ;; 317 exit ;;
307 *:[Mm]orph[Oo][Ss]:*:*) 318 *:[Mm]orph[Oo][Ss]:*:*)
308 echo ${UNAME_MACHINE}-unknown-morphos 319 echo ${UNAME_MACHINE}-unknown-morphos
309 exit 0 ;; 320 exit ;;
310 *:OS/390:*:*) 321 *:OS/390:*:*)
311 echo i370-ibm-openedition 322 echo i370-ibm-openedition
312 exit 0 ;; 323 exit ;;
324 *:z/VM:*:*)
325 echo s390-ibm-zvmoe
326 exit ;;
313 *:OS400:*:*) 327 *:OS400:*:*)
314 echo powerpc-ibm-os400 328 echo powerpc-ibm-os400
315 exit 0 ;; 329 exit ;;
316 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 330 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
317 echo arm-acorn-riscix${UNAME_RELEASE} 331 echo arm-acorn-riscix${UNAME_RELEASE}
318 exit 0;; 332 exit ;;
333 arm:riscos:*:*|arm:RISCOS:*:*)
334 echo arm-unknown-riscos
335 exit ;;
319 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 336 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
320 echo hppa1.1-hitachi-hiuxmpp 337 echo hppa1.1-hitachi-hiuxmpp
321 exit 0;; 338 exit ;;
322 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 339 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
323 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 340 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
324 if test "`(/bin/universe) 2>/dev/null`" = att ; then 341 if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -326,32 +343,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
326 else 343 else
327 echo pyramid-pyramid-bsd 344 echo pyramid-pyramid-bsd
328 fi 345 fi
329 exit 0 ;; 346 exit ;;
330 NILE*:*:*:dcosx) 347 NILE*:*:*:dcosx)
331 echo pyramid-pyramid-svr4 348 echo pyramid-pyramid-svr4
332 exit 0 ;; 349 exit ;;
333 DRS?6000:unix:4.0:6*) 350 DRS?6000:unix:4.0:6*)
334 echo sparc-icl-nx6 351 echo sparc-icl-nx6
335 exit 0 ;; 352 exit ;;
336 DRS?6000:UNIX_SV:4.2*:7*) 353 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
337 case `/usr/bin/uname -p` in 354 case `/usr/bin/uname -p` in
338 sparc) echo sparc-icl-nx7 && exit 0 ;; 355 sparc) echo sparc-icl-nx7; exit ;;
339 esac ;; 356 esac ;;
340 sun4H:SunOS:5.*:*) 357 sun4H:SunOS:5.*:*)
341 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 358 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
342 exit 0 ;; 359 exit ;;
343 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 360 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
344 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 361 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
345 exit 0 ;; 362 exit ;;
346 i86pc:SunOS:5.*:*) 363 i86pc:SunOS:5.*:*)
347 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 364 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
348 exit 0 ;; 365 exit ;;
349 sun4*:SunOS:6*:*) 366 sun4*:SunOS:6*:*)
350 # According to config.sub, this is the proper way to canonicalize 367 # According to config.sub, this is the proper way to canonicalize
351 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 368 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
352 # it's likely to be more like Solaris than SunOS4. 369 # it's likely to be more like Solaris than SunOS4.
353 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 370 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
354 exit 0 ;; 371 exit ;;
355 sun4*:SunOS:*:*) 372 sun4*:SunOS:*:*)
356 case "`/usr/bin/arch -k`" in 373 case "`/usr/bin/arch -k`" in
357 Series*|S4*) 374 Series*|S4*)
@@ -360,10 +377,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
360 esac 377 esac
361 # Japanese Language versions have a version number like `4.1.3-JL'. 378 # Japanese Language versions have a version number like `4.1.3-JL'.
362 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 379 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
363 exit 0 ;; 380 exit ;;
364 sun3*:SunOS:*:*) 381 sun3*:SunOS:*:*)
365 echo m68k-sun-sunos${UNAME_RELEASE} 382 echo m68k-sun-sunos${UNAME_RELEASE}
366 exit 0 ;; 383 exit ;;
367 sun*:*:4.2BSD:*) 384 sun*:*:4.2BSD:*)
368 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 385 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
369 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 386 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -375,10 +392,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
375 echo sparc-sun-sunos${UNAME_RELEASE} 392 echo sparc-sun-sunos${UNAME_RELEASE}
376 ;; 393 ;;
377 esac 394 esac
378 exit 0 ;; 395 exit ;;
379 aushp:SunOS:*:*) 396 aushp:SunOS:*:*)
380 echo sparc-auspex-sunos${UNAME_RELEASE} 397 echo sparc-auspex-sunos${UNAME_RELEASE}
381 exit 0 ;; 398 exit ;;
382 # The situation for MiNT is a little confusing. The machine name 399 # The situation for MiNT is a little confusing. The machine name
383 # can be virtually everything (everything which is not 400 # can be virtually everything (everything which is not
384 # "atarist" or "atariste" at least should have a processor 401 # "atarist" or "atariste" at least should have a processor
@@ -389,37 +406,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
389 # be no problem. 406 # be no problem.
390 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 407 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
391 echo m68k-atari-mint${UNAME_RELEASE} 408 echo m68k-atari-mint${UNAME_RELEASE}
392 exit 0 ;; 409 exit ;;
393 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 410 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
394 echo m68k-atari-mint${UNAME_RELEASE} 411 echo m68k-atari-mint${UNAME_RELEASE}
395 exit 0 ;; 412 exit ;;
396 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 413 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
397 echo m68k-atari-mint${UNAME_RELEASE} 414 echo m68k-atari-mint${UNAME_RELEASE}
398 exit 0 ;; 415 exit ;;
399 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 416 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
400 echo m68k-milan-mint${UNAME_RELEASE} 417 echo m68k-milan-mint${UNAME_RELEASE}
401 exit 0 ;; 418 exit ;;
402 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 419 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
403 echo m68k-hades-mint${UNAME_RELEASE} 420 echo m68k-hades-mint${UNAME_RELEASE}
404 exit 0 ;; 421 exit ;;
405 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 422 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
406 echo m68k-unknown-mint${UNAME_RELEASE} 423 echo m68k-unknown-mint${UNAME_RELEASE}
407 exit 0 ;; 424 exit ;;
425 m68k:machten:*:*)
426 echo m68k-apple-machten${UNAME_RELEASE}
427 exit ;;
408 powerpc:machten:*:*) 428 powerpc:machten:*:*)
409 echo powerpc-apple-machten${UNAME_RELEASE} 429 echo powerpc-apple-machten${UNAME_RELEASE}
410 exit 0 ;; 430 exit ;;
411 RISC*:Mach:*:*) 431 RISC*:Mach:*:*)
412 echo mips-dec-mach_bsd4.3 432 echo mips-dec-mach_bsd4.3
413 exit 0 ;; 433 exit ;;
414 RISC*:ULTRIX:*:*) 434 RISC*:ULTRIX:*:*)
415 echo mips-dec-ultrix${UNAME_RELEASE} 435 echo mips-dec-ultrix${UNAME_RELEASE}
416 exit 0 ;; 436 exit ;;
417 VAX*:ULTRIX*:*:*) 437 VAX*:ULTRIX*:*:*)
418 echo vax-dec-ultrix${UNAME_RELEASE} 438 echo vax-dec-ultrix${UNAME_RELEASE}
419 exit 0 ;; 439 exit ;;
420 2020:CLIX:*:* | 2430:CLIX:*:*) 440 2020:CLIX:*:* | 2430:CLIX:*:*)
421 echo clipper-intergraph-clix${UNAME_RELEASE} 441 echo clipper-intergraph-clix${UNAME_RELEASE}
422 exit 0 ;; 442 exit ;;
423 mips:*:*:UMIPS | mips:*:*:RISCos) 443 mips:*:*:UMIPS | mips:*:*:RISCos)
424 eval $set_cc_for_build 444 eval $set_cc_for_build
425 sed 's/^ //' << EOF >$dummy.c 445 sed 's/^ //' << EOF >$dummy.c
@@ -443,32 +463,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
443 exit (-1); 463 exit (-1);
444 } 464 }
445EOF 465EOF
446 $CC_FOR_BUILD -o $dummy $dummy.c \ 466 $CC_FOR_BUILD -o $dummy $dummy.c &&
447 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 467 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
448 && exit 0 468 SYSTEM_NAME=`$dummy $dummyarg` &&
469 { echo "$SYSTEM_NAME"; exit; }
449 echo mips-mips-riscos${UNAME_RELEASE} 470 echo mips-mips-riscos${UNAME_RELEASE}
450 exit 0 ;; 471 exit ;;
451 Motorola:PowerMAX_OS:*:*) 472 Motorola:PowerMAX_OS:*:*)
452 echo powerpc-motorola-powermax 473 echo powerpc-motorola-powermax
453 exit 0 ;; 474 exit ;;
454 Motorola:*:4.3:PL8-*) 475 Motorola:*:4.3:PL8-*)
455 echo powerpc-harris-powermax 476 echo powerpc-harris-powermax
456 exit 0 ;; 477 exit ;;
457 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 478 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
458 echo powerpc-harris-powermax 479 echo powerpc-harris-powermax
459 exit 0 ;; 480 exit ;;
460 Night_Hawk:Power_UNIX:*:*) 481 Night_Hawk:Power_UNIX:*:*)
461 echo powerpc-harris-powerunix 482 echo powerpc-harris-powerunix
462 exit 0 ;; 483 exit ;;
463 m88k:CX/UX:7*:*) 484 m88k:CX/UX:7*:*)
464 echo m88k-harris-cxux7 485 echo m88k-harris-cxux7
465 exit 0 ;; 486 exit ;;
466 m88k:*:4*:R4*) 487 m88k:*:4*:R4*)
467 echo m88k-motorola-sysv4 488 echo m88k-motorola-sysv4
468 exit 0 ;; 489 exit ;;
469 m88k:*:3*:R3*) 490 m88k:*:3*:R3*)
470 echo m88k-motorola-sysv3 491 echo m88k-motorola-sysv3
471 exit 0 ;; 492 exit ;;
472 AViiON:dgux:*:*) 493 AViiON:dgux:*:*)
473 # DG/UX returns AViiON for all architectures 494 # DG/UX returns AViiON for all architectures
474 UNAME_PROCESSOR=`/usr/bin/uname -p` 495 UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -484,29 +505,29 @@ EOF
484 else 505 else
485 echo i586-dg-dgux${UNAME_RELEASE} 506 echo i586-dg-dgux${UNAME_RELEASE}
486 fi 507 fi
487 exit 0 ;; 508 exit ;;
488 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 509 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
489 echo m88k-dolphin-sysv3 510 echo m88k-dolphin-sysv3
490 exit 0 ;; 511 exit ;;
491 M88*:*:R3*:*) 512 M88*:*:R3*:*)
492 # Delta 88k system running SVR3 513 # Delta 88k system running SVR3
493 echo m88k-motorola-sysv3 514 echo m88k-motorola-sysv3
494 exit 0 ;; 515 exit ;;
495 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 516 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
496 echo m88k-tektronix-sysv3 517 echo m88k-tektronix-sysv3
497 exit 0 ;; 518 exit ;;
498 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 519 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
499 echo m68k-tektronix-bsd 520 echo m68k-tektronix-bsd
500 exit 0 ;; 521 exit ;;
501 *:IRIX*:*:*) 522 *:IRIX*:*:*)
502 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 523 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
503 exit 0 ;; 524 exit ;;
504 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 525 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
505 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 526 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
506 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 527 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
507 i*86:AIX:*:*) 528 i*86:AIX:*:*)
508 echo i386-ibm-aix 529 echo i386-ibm-aix
509 exit 0 ;; 530 exit ;;
510 ia64:AIX:*:*) 531 ia64:AIX:*:*)
511 if [ -x /usr/bin/oslevel ] ; then 532 if [ -x /usr/bin/oslevel ] ; then
512 IBM_REV=`/usr/bin/oslevel` 533 IBM_REV=`/usr/bin/oslevel`
@@ -514,7 +535,7 @@ EOF
514 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 535 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
515 fi 536 fi
516 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 537 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
517 exit 0 ;; 538 exit ;;
518 *:AIX:2:3) 539 *:AIX:2:3)
519 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 540 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
520 eval $set_cc_for_build 541 eval $set_cc_for_build
@@ -529,14 +550,18 @@ EOF
529 exit(0); 550 exit(0);
530 } 551 }
531EOF 552EOF
532 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 553 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
533 echo rs6000-ibm-aix3.2.5 554 then
555 echo "$SYSTEM_NAME"
556 else
557 echo rs6000-ibm-aix3.2.5
558 fi
534 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 559 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
535 echo rs6000-ibm-aix3.2.4 560 echo rs6000-ibm-aix3.2.4
536 else 561 else
537 echo rs6000-ibm-aix3.2 562 echo rs6000-ibm-aix3.2
538 fi 563 fi
539 exit 0 ;; 564 exit ;;
540 *:AIX:*:[45]) 565 *:AIX:*:[45])
541 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 566 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
542 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 567 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -550,28 +575,28 @@ EOF
550 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 575 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
551 fi 576 fi
552 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 577 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
553 exit 0 ;; 578 exit ;;
554 *:AIX:*:*) 579 *:AIX:*:*)
555 echo rs6000-ibm-aix 580 echo rs6000-ibm-aix
556 exit 0 ;; 581 exit ;;
557 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 582 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
558 echo romp-ibm-bsd4.4 583 echo romp-ibm-bsd4.4
559 exit 0 ;; 584 exit ;;
560 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 585 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
561 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 586 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
562 exit 0 ;; # report: romp-ibm BSD 4.3 587 exit ;; # report: romp-ibm BSD 4.3
563 *:BOSX:*:*) 588 *:BOSX:*:*)
564 echo rs6000-bull-bosx 589 echo rs6000-bull-bosx
565 exit 0 ;; 590 exit ;;
566 DPX/2?00:B.O.S.:*:*) 591 DPX/2?00:B.O.S.:*:*)
567 echo m68k-bull-sysv3 592 echo m68k-bull-sysv3
568 exit 0 ;; 593 exit ;;
569 9000/[34]??:4.3bsd:1.*:*) 594 9000/[34]??:4.3bsd:1.*:*)
570 echo m68k-hp-bsd 595 echo m68k-hp-bsd
571 exit 0 ;; 596 exit ;;
572 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 597 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
573 echo m68k-hp-bsd4.4 598 echo m68k-hp-bsd4.4
574 exit 0 ;; 599 exit ;;
575 9000/[34678]??:HP-UX:*:*) 600 9000/[34678]??:HP-UX:*:*)
576 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 601 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
577 case "${UNAME_MACHINE}" in 602 case "${UNAME_MACHINE}" in
@@ -635,7 +660,18 @@ EOF
635 then 660 then
636 # avoid double evaluation of $set_cc_for_build 661 # avoid double evaluation of $set_cc_for_build
637 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 662 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
638 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 663
664 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
665 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
666 # generating 64-bit code. GNU and HP use different nomenclature:
667 #
668 # $ CC_FOR_BUILD=cc ./config.guess
669 # => hppa2.0w-hp-hpux11.23
670 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
671 # => hppa64-hp-hpux11.23
672
673 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
674 grep __LP64__ >/dev/null
639 then 675 then
640 HP_ARCH="hppa2.0w" 676 HP_ARCH="hppa2.0w"
641 else 677 else
@@ -643,11 +679,11 @@ EOF
643 fi 679 fi
644 fi 680 fi
645 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 681 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
646 exit 0 ;; 682 exit ;;
647 ia64:HP-UX:*:*) 683 ia64:HP-UX:*:*)
648 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 684 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
649 echo ia64-hp-hpux${HPUX_REV} 685 echo ia64-hp-hpux${HPUX_REV}
650 exit 0 ;; 686 exit ;;
651 3050*:HI-UX:*:*) 687 3050*:HI-UX:*:*)
652 eval $set_cc_for_build 688 eval $set_cc_for_build
653 sed 's/^ //' << EOF >$dummy.c 689 sed 's/^ //' << EOF >$dummy.c
@@ -675,163 +711,166 @@ EOF
675 exit (0); 711 exit (0);
676 } 712 }
677EOF 713EOF
678 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 714 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
715 { echo "$SYSTEM_NAME"; exit; }
679 echo unknown-hitachi-hiuxwe2 716 echo unknown-hitachi-hiuxwe2
680 exit 0 ;; 717 exit ;;
681 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 718 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
682 echo hppa1.1-hp-bsd 719 echo hppa1.1-hp-bsd
683 exit 0 ;; 720 exit ;;
684 9000/8??:4.3bsd:*:*) 721 9000/8??:4.3bsd:*:*)
685 echo hppa1.0-hp-bsd 722 echo hppa1.0-hp-bsd
686 exit 0 ;; 723 exit ;;
687 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 724 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
688 echo hppa1.0-hp-mpeix 725 echo hppa1.0-hp-mpeix
689 exit 0 ;; 726 exit ;;
690 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 727 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
691 echo hppa1.1-hp-osf 728 echo hppa1.1-hp-osf
692 exit 0 ;; 729 exit ;;
693 hp8??:OSF1:*:*) 730 hp8??:OSF1:*:*)
694 echo hppa1.0-hp-osf 731 echo hppa1.0-hp-osf
695 exit 0 ;; 732 exit ;;
696 i*86:OSF1:*:*) 733 i*86:OSF1:*:*)
697 if [ -x /usr/sbin/sysversion ] ; then 734 if [ -x /usr/sbin/sysversion ] ; then
698 echo ${UNAME_MACHINE}-unknown-osf1mk 735 echo ${UNAME_MACHINE}-unknown-osf1mk
699 else 736 else
700 echo ${UNAME_MACHINE}-unknown-osf1 737 echo ${UNAME_MACHINE}-unknown-osf1
701 fi 738 fi
702 exit 0 ;; 739 exit ;;
703 parisc*:Lites*:*:*) 740 parisc*:Lites*:*:*)
704 echo hppa1.1-hp-lites 741 echo hppa1.1-hp-lites
705 exit 0 ;; 742 exit ;;
706 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 743 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
707 echo c1-convex-bsd 744 echo c1-convex-bsd
708 exit 0 ;; 745 exit ;;
709 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 746 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
710 if getsysinfo -f scalar_acc 747 if getsysinfo -f scalar_acc
711 then echo c32-convex-bsd 748 then echo c32-convex-bsd
712 else echo c2-convex-bsd 749 else echo c2-convex-bsd
713 fi 750 fi
714 exit 0 ;; 751 exit ;;
715 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 752 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
716 echo c34-convex-bsd 753 echo c34-convex-bsd
717 exit 0 ;; 754 exit ;;
718 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 755 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
719 echo c38-convex-bsd 756 echo c38-convex-bsd
720 exit 0 ;; 757 exit ;;
721 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 758 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
722 echo c4-convex-bsd 759 echo c4-convex-bsd
723 exit 0 ;; 760 exit ;;
724 CRAY*Y-MP:*:*:*) 761 CRAY*Y-MP:*:*:*)
725 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 762 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
726 exit 0 ;; 763 exit ;;
727 CRAY*[A-Z]90:*:*:*) 764 CRAY*[A-Z]90:*:*:*)
728 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 765 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
729 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 766 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
730 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 767 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
731 -e 's/\.[^.]*$/.X/' 768 -e 's/\.[^.]*$/.X/'
732 exit 0 ;; 769 exit ;;
733 CRAY*TS:*:*:*) 770 CRAY*TS:*:*:*)
734 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 771 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
735 exit 0 ;; 772 exit ;;
736 CRAY*T3E:*:*:*) 773 CRAY*T3E:*:*:*)
737 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 774 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
738 exit 0 ;; 775 exit ;;
739 CRAY*SV1:*:*:*) 776 CRAY*SV1:*:*:*)
740 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 777 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
741 exit 0 ;; 778 exit ;;
742 *:UNICOS/mp:*:*) 779 *:UNICOS/mp:*:*)
743 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 780 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
744 exit 0 ;; 781 exit ;;
745 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 782 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
746 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 783 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
747 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 784 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
748 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 785 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
749 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 786 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
750 exit 0 ;; 787 exit ;;
751 5000:UNIX_System_V:4.*:*) 788 5000:UNIX_System_V:4.*:*)
752 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 789 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
753 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 790 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
754 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 791 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
755 exit 0 ;; 792 exit ;;
756 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 793 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
757 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 794 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
758 exit 0 ;; 795 exit ;;
759 sparc*:BSD/OS:*:*) 796 sparc*:BSD/OS:*:*)
760 echo sparc-unknown-bsdi${UNAME_RELEASE} 797 echo sparc-unknown-bsdi${UNAME_RELEASE}
761 exit 0 ;; 798 exit ;;
762 *:BSD/OS:*:*) 799 *:BSD/OS:*:*)
763 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 800 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
764 exit 0 ;; 801 exit ;;
765 *:FreeBSD:*:*) 802 *:FreeBSD:*:*)
766 # Determine whether the default compiler uses glibc. 803 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
767 eval $set_cc_for_build 804 exit ;;
768 sed 's/^ //' << EOF >$dummy.c
769 #include <features.h>
770 #if __GLIBC__ >= 2
771 LIBC=gnu
772 #else
773 LIBC=
774 #endif
775EOF
776 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
777 # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
778 # FreeBSD's kernel, but not the complete OS.
779 case ${LIBC} in gnu) kernel_only='k' ;; esac
780 echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
781 exit 0 ;;
782 i*:CYGWIN*:*) 805 i*:CYGWIN*:*)
783 echo ${UNAME_MACHINE}-pc-cygwin 806 echo ${UNAME_MACHINE}-pc-cygwin
784 exit 0 ;; 807 exit ;;
785 i*:MINGW*:*) 808 i*:MINGW*:*)
786 echo ${UNAME_MACHINE}-pc-mingw32 809 echo ${UNAME_MACHINE}-pc-mingw32
787 exit 0 ;; 810 exit ;;
811 i*:windows32*:*)
812 # uname -m includes "-pc" on this system.
813 echo ${UNAME_MACHINE}-mingw32
814 exit ;;
788 i*:PW*:*) 815 i*:PW*:*)
789 echo ${UNAME_MACHINE}-pc-pw32 816 echo ${UNAME_MACHINE}-pc-pw32
790 exit 0 ;; 817 exit ;;
791 x86:Interix*:[34]*) 818 x86:Interix*:[34]*)
792 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 819 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
793 exit 0 ;; 820 exit ;;
794 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 821 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
795 echo i${UNAME_MACHINE}-pc-mks 822 echo i${UNAME_MACHINE}-pc-mks
796 exit 0 ;; 823 exit ;;
797 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 824 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
798 # How do we know it's Interix rather than the generic POSIX subsystem? 825 # How do we know it's Interix rather than the generic POSIX subsystem?
799 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 826 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
800 # UNAME_MACHINE based on the output of uname instead of i386? 827 # UNAME_MACHINE based on the output of uname instead of i386?
801 echo i586-pc-interix 828 echo i586-pc-interix
802 exit 0 ;; 829 exit ;;
803 i*:UWIN*:*) 830 i*:UWIN*:*)
804 echo ${UNAME_MACHINE}-pc-uwin 831 echo ${UNAME_MACHINE}-pc-uwin
805 exit 0 ;; 832 exit ;;
833 amd64:CYGWIN*:*:*)
834 echo x86_64-unknown-cygwin
835 exit ;;
806 p*:CYGWIN*:*) 836 p*:CYGWIN*:*)
807 echo powerpcle-unknown-cygwin 837 echo powerpcle-unknown-cygwin
808 exit 0 ;; 838 exit ;;
809 prep*:SunOS:5.*:*) 839 prep*:SunOS:5.*:*)
810 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 840 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
811 exit 0 ;; 841 exit ;;
812 *:GNU:*:*) 842 *:GNU:*:*)
813 # the GNU system 843 # the GNU system
814 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 844 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
815 exit 0 ;; 845 exit ;;
816 *:GNU/*:*:*) 846 *:GNU/*:*:*)
817 # other systems with GNU libc and userland 847 # other systems with GNU libc and userland
818 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 848 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
819 exit 0 ;; 849 exit ;;
820 i*86:Minix:*:*) 850 i*86:Minix:*:*)
821 echo ${UNAME_MACHINE}-pc-minix 851 echo ${UNAME_MACHINE}-pc-minix
822 exit 0 ;; 852 exit ;;
823 arm*:Linux:*:*) 853 arm*:Linux:*:*)
824 echo ${UNAME_MACHINE}-unknown-linux-gnu 854 echo ${UNAME_MACHINE}-unknown-linux-gnu
825 exit 0 ;; 855 exit ;;
826 cris:Linux:*:*) 856 cris:Linux:*:*)
827 echo cris-axis-linux-gnu 857 echo cris-axis-linux-gnu
828 exit 0 ;; 858 exit ;;
859 crisv32:Linux:*:*)
860 echo crisv32-axis-linux-gnu
861 exit ;;
862 frv:Linux:*:*)
863 echo frv-unknown-linux-gnu
864 exit ;;
829 ia64:Linux:*:*) 865 ia64:Linux:*:*)
830 echo ${UNAME_MACHINE}-unknown-linux-gnu 866 echo ${UNAME_MACHINE}-unknown-linux-gnu
831 exit 0 ;; 867 exit ;;
868 m32r*:Linux:*:*)
869 echo ${UNAME_MACHINE}-unknown-linux-gnu
870 exit ;;
832 m68*:Linux:*:*) 871 m68*:Linux:*:*)
833 echo ${UNAME_MACHINE}-unknown-linux-gnu 872 echo ${UNAME_MACHINE}-unknown-linux-gnu
834 exit 0 ;; 873 exit ;;
835 mips:Linux:*:*) 874 mips:Linux:*:*)
836 eval $set_cc_for_build 875 eval $set_cc_for_build
837 sed 's/^ //' << EOF >$dummy.c 876 sed 's/^ //' << EOF >$dummy.c
@@ -849,7 +888,7 @@ EOF
849 #endif 888 #endif
850EOF 889EOF
851 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 890 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
852 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 891 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
853 ;; 892 ;;
854 mips64:Linux:*:*) 893 mips64:Linux:*:*)
855 eval $set_cc_for_build 894 eval $set_cc_for_build
@@ -868,14 +907,14 @@ EOF
868 #endif 907 #endif
869EOF 908EOF
870 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 909 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
871 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 910 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
872 ;; 911 ;;
873 ppc:Linux:*:*) 912 ppc:Linux:*:*)
874 echo powerpc-unknown-linux-gnu 913 echo powerpc-unknown-linux-gnu
875 exit 0 ;; 914 exit ;;
876 ppc64:Linux:*:*) 915 ppc64:Linux:*:*)
877 echo powerpc64-unknown-linux-gnu 916 echo powerpc64-unknown-linux-gnu
878 exit 0 ;; 917 exit ;;
879 alpha:Linux:*:*) 918 alpha:Linux:*:*)
880 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 919 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
881 EV5) UNAME_MACHINE=alphaev5 ;; 920 EV5) UNAME_MACHINE=alphaev5 ;;
@@ -889,7 +928,7 @@ EOF
889 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 928 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
890 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 929 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
891 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 930 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
892 exit 0 ;; 931 exit ;;
893 parisc:Linux:*:* | hppa:Linux:*:*) 932 parisc:Linux:*:* | hppa:Linux:*:*)
894 # Look for CPU level 933 # Look for CPU level
895 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 934 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -897,25 +936,25 @@ EOF
897 PA8*) echo hppa2.0-unknown-linux-gnu ;; 936 PA8*) echo hppa2.0-unknown-linux-gnu ;;
898 *) echo hppa-unknown-linux-gnu ;; 937 *) echo hppa-unknown-linux-gnu ;;
899 esac 938 esac
900 exit 0 ;; 939 exit ;;
901 parisc64:Linux:*:* | hppa64:Linux:*:*) 940 parisc64:Linux:*:* | hppa64:Linux:*:*)
902 echo hppa64-unknown-linux-gnu 941 echo hppa64-unknown-linux-gnu
903 exit 0 ;; 942 exit ;;
904 s390:Linux:*:* | s390x:Linux:*:*) 943 s390:Linux:*:* | s390x:Linux:*:*)
905 echo ${UNAME_MACHINE}-ibm-linux 944 echo ${UNAME_MACHINE}-ibm-linux
906 exit 0 ;; 945 exit ;;
907 sh64*:Linux:*:*) 946 sh64*:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-gnu 947 echo ${UNAME_MACHINE}-unknown-linux-gnu
909 exit 0 ;; 948 exit ;;
910 sh*:Linux:*:*) 949 sh*:Linux:*:*)
911 echo ${UNAME_MACHINE}-unknown-linux-gnu 950 echo ${UNAME_MACHINE}-unknown-linux-gnu
912 exit 0 ;; 951 exit ;;
913 sparc:Linux:*:* | sparc64:Linux:*:*) 952 sparc:Linux:*:* | sparc64:Linux:*:*)
914 echo ${UNAME_MACHINE}-unknown-linux-gnu 953 echo ${UNAME_MACHINE}-unknown-linux-gnu
915 exit 0 ;; 954 exit ;;
916 x86_64:Linux:*:*) 955 x86_64:Linux:*:*)
917 echo x86_64-unknown-linux-gnu 956 echo x86_64-unknown-linux-gnu
918 exit 0 ;; 957 exit ;;
919 i*86:Linux:*:*) 958 i*86:Linux:*:*)
920 # The BFD linker knows what the default object file format is, so 959 # The BFD linker knows what the default object file format is, so
921 # first see if it will tell us. cd to the root directory to prevent 960 # first see if it will tell us. cd to the root directory to prevent
@@ -933,15 +972,15 @@ EOF
933 ;; 972 ;;
934 a.out-i386-linux) 973 a.out-i386-linux)
935 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 974 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
936 exit 0 ;; 975 exit ;;
937 coff-i386) 976 coff-i386)
938 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 977 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
939 exit 0 ;; 978 exit ;;
940 "") 979 "")
941 # Either a pre-BFD a.out linker (linux-gnuoldld) or 980 # Either a pre-BFD a.out linker (linux-gnuoldld) or
942 # one that does not give us useful --help. 981 # one that does not give us useful --help.
943 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 982 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
944 exit 0 ;; 983 exit ;;
945 esac 984 esac
946 # Determine whether the default compiler is a.out or elf 985 # Determine whether the default compiler is a.out or elf
947 eval $set_cc_for_build 986 eval $set_cc_for_build
@@ -969,15 +1008,18 @@ EOF
969 #endif 1008 #endif
970EOF 1009EOF
971 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 1010 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
972 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 1011 test x"${LIBC}" != x && {
973 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 1012 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1013 exit
1014 }
1015 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
974 ;; 1016 ;;
975 i*86:DYNIX/ptx:4*:*) 1017 i*86:DYNIX/ptx:4*:*)
976 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1018 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
977 # earlier versions are messed up and put the nodename in both 1019 # earlier versions are messed up and put the nodename in both
978 # sysname and nodename. 1020 # sysname and nodename.
979 echo i386-sequent-sysv4 1021 echo i386-sequent-sysv4
980 exit 0 ;; 1022 exit ;;
981 i*86:UNIX_SV:4.2MP:2.*) 1023 i*86:UNIX_SV:4.2MP:2.*)
982 # Unixware is an offshoot of SVR4, but it has its own version 1024 # Unixware is an offshoot of SVR4, but it has its own version
983 # number series starting with 2... 1025 # number series starting with 2...
@@ -985,27 +1027,27 @@ EOF
985 # I just have to hope. -- rms. 1027 # I just have to hope. -- rms.
986 # Use sysv4.2uw... so that sysv4* matches it. 1028 # Use sysv4.2uw... so that sysv4* matches it.
987 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1029 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
988 exit 0 ;; 1030 exit ;;
989 i*86:OS/2:*:*) 1031 i*86:OS/2:*:*)
990 # If we were able to find `uname', then EMX Unix compatibility 1032 # If we were able to find `uname', then EMX Unix compatibility
991 # is probably installed. 1033 # is probably installed.
992 echo ${UNAME_MACHINE}-pc-os2-emx 1034 echo ${UNAME_MACHINE}-pc-os2-emx
993 exit 0 ;; 1035 exit ;;
994 i*86:XTS-300:*:STOP) 1036 i*86:XTS-300:*:STOP)
995 echo ${UNAME_MACHINE}-unknown-stop 1037 echo ${UNAME_MACHINE}-unknown-stop
996 exit 0 ;; 1038 exit ;;
997 i*86:atheos:*:*) 1039 i*86:atheos:*:*)
998 echo ${UNAME_MACHINE}-unknown-atheos 1040 echo ${UNAME_MACHINE}-unknown-atheos
999 exit 0 ;; 1041 exit ;;
1000 i*86:syllable:*:*) 1042 i*86:syllable:*:*)
1001 echo ${UNAME_MACHINE}-pc-syllable 1043 echo ${UNAME_MACHINE}-pc-syllable
1002 exit 0 ;; 1044 exit ;;
1003 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1045 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1004 echo i386-unknown-lynxos${UNAME_RELEASE} 1046 echo i386-unknown-lynxos${UNAME_RELEASE}
1005 exit 0 ;; 1047 exit ;;
1006 i*86:*DOS:*:*) 1048 i*86:*DOS:*:*)
1007 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1049 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1008 exit 0 ;; 1050 exit ;;
1009 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1051 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1010 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1052 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1011 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1053 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1013,16 +1055,16 @@ EOF
1013 else 1055 else
1014 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1056 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1015 fi 1057 fi
1016 exit 0 ;; 1058 exit ;;
1017 i*86:*:5:[678]*) 1059 i*86:*:5:[678]*)
1018 # Unixware 7.x, OpenUNIX 8, & OpenServer 6 1060 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1019 case `/bin/uname -X | grep "^Machine"` in 1061 case `/bin/uname -X | grep "^Machine"` in
1020 *486*) UNAME_MACHINE=i486 ;; 1062 *486*) UNAME_MACHINE=i486 ;;
1021 *Pentium) UNAME_MACHINE=i586 ;; 1063 *Pentium) UNAME_MACHINE=i586 ;;
1022 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1064 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1023 esac 1065 esac
1024 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1066 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1025 exit 0 ;; 1067 exit ;;
1026 i*86:*:3.2:*) 1068 i*86:*:3.2:*)
1027 if test -f /usr/options/cb.name; then 1069 if test -f /usr/options/cb.name; then
1028 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1070 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1040,73 +1082,73 @@ EOF
1040 else 1082 else
1041 echo ${UNAME_MACHINE}-pc-sysv32 1083 echo ${UNAME_MACHINE}-pc-sysv32
1042 fi 1084 fi
1043 exit 0 ;; 1085 exit ;;
1044 pc:*:*:*) 1086 pc:*:*:*)
1045 # Left here for compatibility: 1087 # Left here for compatibility:
1046 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1088 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1047 # the processor, so we play safe by assuming i386. 1089 # the processor, so we play safe by assuming i386.
1048 echo i386-pc-msdosdjgpp 1090 echo i386-pc-msdosdjgpp
1049 exit 0 ;; 1091 exit ;;
1050 Intel:Mach:3*:*) 1092 Intel:Mach:3*:*)
1051 echo i386-pc-mach3 1093 echo i386-pc-mach3
1052 exit 0 ;; 1094 exit ;;
1053 paragon:*:*:*) 1095 paragon:*:*:*)
1054 echo i860-intel-osf1 1096 echo i860-intel-osf1
1055 exit 0 ;; 1097 exit ;;
1056 i860:*:4.*:*) # i860-SVR4 1098 i860:*:4.*:*) # i860-SVR4
1057 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1099 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1058 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1100 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1059 else # Add other i860-SVR4 vendors below as they are discovered. 1101 else # Add other i860-SVR4 vendors below as they are discovered.
1060 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1102 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1061 fi 1103 fi
1062 exit 0 ;; 1104 exit ;;
1063 mini*:CTIX:SYS*5:*) 1105 mini*:CTIX:SYS*5:*)
1064 # "miniframe" 1106 # "miniframe"
1065 echo m68010-convergent-sysv 1107 echo m68010-convergent-sysv
1066 exit 0 ;; 1108 exit ;;
1067 mc68k:UNIX:SYSTEM5:3.51m) 1109 mc68k:UNIX:SYSTEM5:3.51m)
1068 echo m68k-convergent-sysv 1110 echo m68k-convergent-sysv
1069 exit 0 ;; 1111 exit ;;
1070 M680?0:D-NIX:5.3:*) 1112 M680?0:D-NIX:5.3:*)
1071 echo m68k-diab-dnix 1113 echo m68k-diab-dnix
1072 exit 0 ;; 1114 exit ;;
1073 M68*:*:R3V[567]*:*) 1115 M68*:*:R3V[5678]*:*)
1074 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1116 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1075 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) 1117 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)
1076 OS_REL='' 1118 OS_REL=''
1077 test -r /etc/.relid \ 1119 test -r /etc/.relid \
1078 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1120 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1079 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1121 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1080 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 1122 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1081 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1123 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1082 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 1124 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1083 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1125 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1084 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1126 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1085 && echo i486-ncr-sysv4 && exit 0 ;; 1127 && { echo i486-ncr-sysv4; exit; } ;;
1086 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1128 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1087 echo m68k-unknown-lynxos${UNAME_RELEASE} 1129 echo m68k-unknown-lynxos${UNAME_RELEASE}
1088 exit 0 ;; 1130 exit ;;
1089 mc68030:UNIX_System_V:4.*:*) 1131 mc68030:UNIX_System_V:4.*:*)
1090 echo m68k-atari-sysv4 1132 echo m68k-atari-sysv4
1091 exit 0 ;; 1133 exit ;;
1092 TSUNAMI:LynxOS:2.*:*) 1134 TSUNAMI:LynxOS:2.*:*)
1093 echo sparc-unknown-lynxos${UNAME_RELEASE} 1135 echo sparc-unknown-lynxos${UNAME_RELEASE}
1094 exit 0 ;; 1136 exit ;;
1095 rs6000:LynxOS:2.*:*) 1137 rs6000:LynxOS:2.*:*)
1096 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1138 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1097 exit 0 ;; 1139 exit ;;
1098 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1140 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1099 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1141 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1100 exit 0 ;; 1142 exit ;;
1101 SM[BE]S:UNIX_SV:*:*) 1143 SM[BE]S:UNIX_SV:*:*)
1102 echo mips-dde-sysv${UNAME_RELEASE} 1144 echo mips-dde-sysv${UNAME_RELEASE}
1103 exit 0 ;; 1145 exit ;;
1104 RM*:ReliantUNIX-*:*:*) 1146 RM*:ReliantUNIX-*:*:*)
1105 echo mips-sni-sysv4 1147 echo mips-sni-sysv4
1106 exit 0 ;; 1148 exit ;;
1107 RM*:SINIX-*:*:*) 1149 RM*:SINIX-*:*:*)
1108 echo mips-sni-sysv4 1150 echo mips-sni-sysv4
1109 exit 0 ;; 1151 exit ;;
1110 *:SINIX-*:*:*) 1152 *:SINIX-*:*:*)
1111 if uname -p 2>/dev/null >/dev/null ; then 1153 if uname -p 2>/dev/null >/dev/null ; then
1112 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1154 UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1114,68 +1156,73 @@ EOF
1114 else 1156 else
1115 echo ns32k-sni-sysv 1157 echo ns32k-sni-sysv
1116 fi 1158 fi
1117 exit 0 ;; 1159 exit ;;
1118 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1160 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1119 # says <Richard.M.Bartel@ccMail.Census.GOV> 1161 # says <Richard.M.Bartel@ccMail.Census.GOV>
1120 echo i586-unisys-sysv4 1162 echo i586-unisys-sysv4
1121 exit 0 ;; 1163 exit ;;
1122 *:UNIX_System_V:4*:FTX*) 1164 *:UNIX_System_V:4*:FTX*)
1123 # From Gerald Hewes <hewes@openmarket.com>. 1165 # From Gerald Hewes <hewes@openmarket.com>.
1124 # How about differentiating between stratus architectures? -djm 1166 # How about differentiating between stratus architectures? -djm
1125 echo hppa1.1-stratus-sysv4 1167 echo hppa1.1-stratus-sysv4
1126 exit 0 ;; 1168 exit ;;
1127 *:*:*:FTX*) 1169 *:*:*:FTX*)
1128 # From seanf@swdc.stratus.com. 1170 # From seanf@swdc.stratus.com.
1129 echo i860-stratus-sysv4 1171 echo i860-stratus-sysv4
1130 exit 0 ;; 1172 exit ;;
1173 i*86:VOS:*:*)
1174 # From Paul.Green@stratus.com.
1175 echo ${UNAME_MACHINE}-stratus-vos
1176 exit ;;
1131 *:VOS:*:*) 1177 *:VOS:*:*)
1132 # From Paul.Green@stratus.com. 1178 # From Paul.Green@stratus.com.
1133 echo hppa1.1-stratus-vos 1179 echo hppa1.1-stratus-vos
1134 exit 0 ;; 1180 exit ;;
1135 mc68*:A/UX:*:*) 1181 mc68*:A/UX:*:*)
1136 echo m68k-apple-aux${UNAME_RELEASE} 1182 echo m68k-apple-aux${UNAME_RELEASE}
1137 exit 0 ;; 1183 exit ;;
1138 news*:NEWS-OS:6*:*) 1184 news*:NEWS-OS:6*:*)
1139 echo mips-sony-newsos6 1185 echo mips-sony-newsos6
1140 exit 0 ;; 1186 exit ;;
1141 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1187 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1142 if [ -d /usr/nec ]; then 1188 if [ -d /usr/nec ]; then
1143 echo mips-nec-sysv${UNAME_RELEASE} 1189 echo mips-nec-sysv${UNAME_RELEASE}
1144 else 1190 else
1145 echo mips-unknown-sysv${UNAME_RELEASE} 1191 echo mips-unknown-sysv${UNAME_RELEASE}
1146 fi 1192 fi
1147 exit 0 ;; 1193 exit ;;
1148 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1194 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1149 echo powerpc-be-beos 1195 echo powerpc-be-beos
1150 exit 0 ;; 1196 exit ;;
1151 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1197 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1152 echo powerpc-apple-beos 1198 echo powerpc-apple-beos
1153 exit 0 ;; 1199 exit ;;
1154 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1200 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1155 echo i586-pc-beos 1201 echo i586-pc-beos
1156 exit 0 ;; 1202 exit ;;
1157 SX-4:SUPER-UX:*:*) 1203 SX-4:SUPER-UX:*:*)
1158 echo sx4-nec-superux${UNAME_RELEASE} 1204 echo sx4-nec-superux${UNAME_RELEASE}
1159 exit 0 ;; 1205 exit ;;
1160 SX-5:SUPER-UX:*:*) 1206 SX-5:SUPER-UX:*:*)
1161 echo sx5-nec-superux${UNAME_RELEASE} 1207 echo sx5-nec-superux${UNAME_RELEASE}
1162 exit 0 ;; 1208 exit ;;
1163 SX-6:SUPER-UX:*:*) 1209 SX-6:SUPER-UX:*:*)
1164 echo sx6-nec-superux${UNAME_RELEASE} 1210 echo sx6-nec-superux${UNAME_RELEASE}
1165 exit 0 ;; 1211 exit ;;
1166 Power*:Rhapsody:*:*) 1212 Power*:Rhapsody:*:*)
1167 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1213 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1168 exit 0 ;; 1214 exit ;;
1169 *:Rhapsody:*:*) 1215 *:Rhapsody:*:*)
1170 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1216 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1171 exit 0 ;; 1217 exit ;;
1172 *:Darwin:*:*) 1218 *:Darwin:*:*)
1173 case `uname -p` in 1219 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1220 case $UNAME_PROCESSOR in
1174 *86) UNAME_PROCESSOR=i686 ;; 1221 *86) UNAME_PROCESSOR=i686 ;;
1175 powerpc) UNAME_PROCESSOR=powerpc ;; 1222 unknown) UNAME_PROCESSOR=powerpc ;;
1176 esac 1223 esac
1177 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1224 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1178 exit 0 ;; 1225 exit ;;
1179 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1226 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1180 UNAME_PROCESSOR=`uname -p` 1227 UNAME_PROCESSOR=`uname -p`
1181 if test "$UNAME_PROCESSOR" = "x86"; then 1228 if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1183,22 +1230,25 @@ EOF
1183 UNAME_MACHINE=pc 1230 UNAME_MACHINE=pc
1184 fi 1231 fi
1185 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1232 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1186 exit 0 ;; 1233 exit ;;
1187 *:QNX:*:4*) 1234 *:QNX:*:4*)
1188 echo i386-pc-qnx 1235 echo i386-pc-qnx
1189 exit 0 ;; 1236 exit ;;
1237 NSE-?:NONSTOP_KERNEL:*:*)
1238 echo nse-tandem-nsk${UNAME_RELEASE}
1239 exit ;;
1190 NSR-?:NONSTOP_KERNEL:*:*) 1240 NSR-?:NONSTOP_KERNEL:*:*)
1191 echo nsr-tandem-nsk${UNAME_RELEASE} 1241 echo nsr-tandem-nsk${UNAME_RELEASE}
1192 exit 0 ;; 1242 exit ;;
1193 *:NonStop-UX:*:*) 1243 *:NonStop-UX:*:*)
1194 echo mips-compaq-nonstopux 1244 echo mips-compaq-nonstopux
1195 exit 0 ;; 1245 exit ;;
1196 BS2000:POSIX*:*:*) 1246 BS2000:POSIX*:*:*)
1197 echo bs2000-siemens-sysv 1247 echo bs2000-siemens-sysv
1198 exit 0 ;; 1248 exit ;;
1199 DS/*:UNIX_System_V:*:*) 1249 DS/*:UNIX_System_V:*:*)
1200 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1250 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1201 exit 0 ;; 1251 exit ;;
1202 *:Plan9:*:*) 1252 *:Plan9:*:*)
1203 # "uname -m" is not consistent, so use $cputype instead. 386 1253 # "uname -m" is not consistent, so use $cputype instead. 386
1204 # is converted to i386 for consistency with other x86 1254 # is converted to i386 for consistency with other x86
@@ -1209,31 +1259,44 @@ EOF
1209 UNAME_MACHINE="$cputype" 1259 UNAME_MACHINE="$cputype"
1210 fi 1260 fi
1211 echo ${UNAME_MACHINE}-unknown-plan9 1261 echo ${UNAME_MACHINE}-unknown-plan9
1212 exit 0 ;; 1262 exit ;;
1213 *:TOPS-10:*:*) 1263 *:TOPS-10:*:*)
1214 echo pdp10-unknown-tops10 1264 echo pdp10-unknown-tops10
1215 exit 0 ;; 1265 exit ;;
1216 *:TENEX:*:*) 1266 *:TENEX:*:*)
1217 echo pdp10-unknown-tenex 1267 echo pdp10-unknown-tenex
1218 exit 0 ;; 1268 exit ;;
1219 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1269 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1220 echo pdp10-dec-tops20 1270 echo pdp10-dec-tops20
1221 exit 0 ;; 1271 exit ;;
1222 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1272 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1223 echo pdp10-xkl-tops20 1273 echo pdp10-xkl-tops20
1224 exit 0 ;; 1274 exit ;;
1225 *:TOPS-20:*:*) 1275 *:TOPS-20:*:*)
1226 echo pdp10-unknown-tops20 1276 echo pdp10-unknown-tops20
1227 exit 0 ;; 1277 exit ;;
1228 *:ITS:*:*) 1278 *:ITS:*:*)
1229 echo pdp10-unknown-its 1279 echo pdp10-unknown-its
1230 exit 0 ;; 1280 exit ;;
1231 SEI:*:*:SEIUX) 1281 SEI:*:*:SEIUX)
1232 echo mips-sei-seiux${UNAME_RELEASE} 1282 echo mips-sei-seiux${UNAME_RELEASE}
1233 exit 0 ;; 1283 exit ;;
1234 *:DRAGONFLY:*:*) 1284 *:DragonFly:*:*)
1235 echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE} 1285 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1236 exit 0 ;; 1286 exit ;;
1287 *:*VMS:*:*)
1288 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1289 case "${UNAME_MACHINE}" in
1290 A*) echo alpha-dec-vms ; exit ;;
1291 I*) echo ia64-dec-vms ; exit ;;
1292 V*) echo vax-dec-vms ; exit ;;
1293 esac ;;
1294 *:XENIX:*:SysV)
1295 echo i386-pc-xenix
1296 exit ;;
1297 i*86:skyos:*:*)
1298 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1299 exit ;;
1237esac 1300esac
1238 1301
1239#echo '(No uname command or uname output not recognized.)' 1>&2 1302#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1265,7 +1328,7 @@ main ()
1265#endif 1328#endif
1266 1329
1267#if defined (__arm) && defined (__acorn) && defined (__unix) 1330#if defined (__arm) && defined (__acorn) && defined (__unix)
1268 printf ("arm-acorn-riscix"); exit (0); 1331 printf ("arm-acorn-riscix\n"); exit (0);
1269#endif 1332#endif
1270 1333
1271#if defined (hp300) && !defined (hpux) 1334#if defined (hp300) && !defined (hpux)
@@ -1354,11 +1417,12 @@ main ()
1354} 1417}
1355EOF 1418EOF
1356 1419
1357$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 1420$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1421 { echo "$SYSTEM_NAME"; exit; }
1358 1422
1359# Apollos put the system type in the environment. 1423# Apollos put the system type in the environment.
1360 1424
1361test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1425test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1362 1426
1363# Convex versions that predate uname can use getsysinfo(1) 1427# Convex versions that predate uname can use getsysinfo(1)
1364 1428
@@ -1367,22 +1431,22 @@ then
1367 case `getsysinfo -f cpu_type` in 1431 case `getsysinfo -f cpu_type` in
1368 c1*) 1432 c1*)
1369 echo c1-convex-bsd 1433 echo c1-convex-bsd
1370 exit 0 ;; 1434 exit ;;
1371 c2*) 1435 c2*)
1372 if getsysinfo -f scalar_acc 1436 if getsysinfo -f scalar_acc
1373 then echo c32-convex-bsd 1437 then echo c32-convex-bsd
1374 else echo c2-convex-bsd 1438 else echo c2-convex-bsd
1375 fi 1439 fi
1376 exit 0 ;; 1440 exit ;;
1377 c34*) 1441 c34*)
1378 echo c34-convex-bsd 1442 echo c34-convex-bsd
1379 exit 0 ;; 1443 exit ;;
1380 c38*) 1444 c38*)
1381 echo c38-convex-bsd 1445 echo c38-convex-bsd
1382 exit 0 ;; 1446 exit ;;
1383 c4*) 1447 c4*)
1384 echo c4-convex-bsd 1448 echo c4-convex-bsd
1385 exit 0 ;; 1449 exit ;;
1386 esac 1450 esac
1387fi 1451fi
1388 1452
@@ -1393,7 +1457,9 @@ This script, last modified $timestamp, has failed to recognize
1393the operating system you are using. It is advised that you 1457the operating system you are using. It is advised that you
1394download the most up to date version of the config scripts from 1458download the most up to date version of the config scripts from
1395 1459
1396 ftp://ftp.gnu.org/pub/gnu/config/ 1460 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1461and
1462 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1397 1463
1398If the version you run ($0) is already up to date, please 1464If the version you run ($0) is already up to date, please
1399send the following data and any information you think might be 1465send the following data and any information you think might be