llvm.org GIT mirror llvm / 0674f4b
Update to latest versions of config.guess and config.sub from http://savannah.gnu.org/projects/config git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82229 91177308-0d34-0410-b5e6-96231b3b80d8 Mike Stump 10 years ago
2 changed file(s) with 642 addition(s) and 451 deletion(s). Raw diff Collapse all Expand all
0 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4
5 timestamp='2004-09-07'
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-09-18'
67
78 # This file is free software; you can redistribute it and/or modify it
89 # under the terms of the GNU General Public License as published by
1617 #
1718 # You should have received a copy of the GNU General Public License
1819 # along with this program; if not, write to the Free Software
19 # 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.
2022 #
2123 # As a special exception to the GNU General Public License, if you
2224 # distribute this file as part of a program that contains a
2325 # configuration script generated by Autoconf, you may include it under
2426 # the same distribution terms that you use for the rest of that program.
2527
26 # Originally written by Per Bothner .
27 # Please send patches to . Submit a context
28 # diff and a properly formatted ChangeLog entry.
28
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to and include a ChangeLog
31 # entry.
2932 #
3033 # This script attempts to guess a canonical system name similar to
3134 # config.sub. If it succeeds, it prints the system name on stdout, and
3235 # exits with 0. Otherwise, it exits with 1.
3336 #
34 # The plan is that this can be called by configure scripts if you
35 # don't specify an explicit build system type.
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3639
3740 me=`echo "$0" | sed -e 's,.*/,,'`
3841
5255 GNU config.guess ($timestamp)
5356
5457 Originally written by Per Bothner.
55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
56 Free Software Foundation, Inc.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
59 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5760
5861 This is free software; see the source for copying conditions. There is NO
5962 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6568 while test $# -gt 0 ; do
6669 case $1 in
6770 --time-stamp | --time* | -t )
68 echo "$timestamp" ; exit 0 ;;
71 echo "$timestamp" ; exit ;;
6972 --version | -v )
70 echo "$version" ; exit 0 ;;
73 echo "$version" ; exit ;;
7174 --help | --h* | -h )
72 echo "$usage"; exit 0 ;;
75 echo "$usage"; exit ;;
7376 -- ) # Stop option processing
7477 shift; break ;;
7578 - ) # Use stdin as input.
103106 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
104107 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
105108 : ${TMPDIR=/tmp} ;
106 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
109 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
107110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
108111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
109112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
122125 ;;
123126 ,,*) CC_FOR_BUILD=$CC ;;
124127 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
125 esac ;'
128 esac ; set_cc_for_build= ;'
126129
127130 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
128131 # (ghazi@noc.rutgers.edu 1994-08-24)
157160 arm*) machine=arm-unknown ;;
158161 sh3el) machine=shl-unknown ;;
159162 sh3eb) machine=sh-unknown ;;
163 sh5el) machine=sh5le-unknown ;;
160164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
161165 esac
162166 # The Operating System including object format, if it has switched
165169 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
166170 eval $set_cc_for_build
167171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
168 | grep __ELF__ >/dev/null
172 | grep -q __ELF__
169173 then
170174 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
171175 # Return netbsd for either. FIX?
195199 # contains redundant information, the shorter form:
196200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
197201 echo "${machine}-${os}${release}"
198 exit 0 ;;
199 amd64:OpenBSD:*:*)
200 echo x86_64-unknown-openbsd${UNAME_RELEASE}
201 exit 0 ;;
202 amiga:OpenBSD:*:*)
203 echo m68k-unknown-openbsd${UNAME_RELEASE}
204 exit 0 ;;
205 cats:OpenBSD:*:*)
206 echo arm-unknown-openbsd${UNAME_RELEASE}
207 exit 0 ;;
208 hp300:OpenBSD:*:*)
209 echo m68k-unknown-openbsd${UNAME_RELEASE}
210 exit 0 ;;
211 luna88k:OpenBSD:*:*)
212 echo m88k-unknown-openbsd${UNAME_RELEASE}
213 exit 0 ;;
214 mac68k:OpenBSD:*:*)
215 echo m68k-unknown-openbsd${UNAME_RELEASE}
216 exit 0 ;;
217 macppc:OpenBSD:*:*)
218 echo powerpc-unknown-openbsd${UNAME_RELEASE}
219 exit 0 ;;
220 mvme68k:OpenBSD:*:*)
221 echo m68k-unknown-openbsd${UNAME_RELEASE}
222 exit 0 ;;
223 mvme88k:OpenBSD:*:*)
224 echo m88k-unknown-openbsd${UNAME_RELEASE}
225 exit 0 ;;
226 mvmeppc:OpenBSD:*:*)
227 echo powerpc-unknown-openbsd${UNAME_RELEASE}
228 exit 0 ;;
229 sgi:OpenBSD:*:*)
230 echo mips64-unknown-openbsd${UNAME_RELEASE}
231 exit 0 ;;
232 sun3:OpenBSD:*:*)
233 echo m68k-unknown-openbsd${UNAME_RELEASE}
234 exit 0 ;;
202 exit ;;
235203 *:OpenBSD:*:*)
236 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
237 exit 0 ;;
204 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206 exit ;;
238207 *:ekkoBSD:*:*)
239208 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
240 exit 0 ;;
209 exit ;;
210 *:SolidBSD:*:*)
211 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212 exit ;;
241213 macppc:MirBSD:*:*)
242 echo powerppc-unknown-mirbsd${UNAME_RELEASE}
243 exit 0 ;;
214 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215 exit ;;
244216 *:MirBSD:*:*)
245217 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
246 exit 0 ;;
218 exit ;;
247219 alpha:OSF1:*:*)
248220 case $UNAME_RELEASE in
249221 *4.0)
296268 # A Xn.n version is an unreleased experimental baselevel.
297269 # 1.2 uses "1.2" for uname -r.
298270 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
299 exit 0 ;;
271 exit ;;
300272 Alpha\ *:Windows_NT*:*)
301273 # How do we know it's Interix rather than the generic POSIX subsystem?
302274 # Should we change UNAME_MACHINE based on the output of uname instead
303275 # of the specific Alpha model?
304276 echo alpha-pc-interix
305 exit 0 ;;
277 exit ;;
306278 21064:Windows_NT:50:3)
307279 echo alpha-dec-winnt3.5
308 exit 0 ;;
280 exit ;;
309281 Amiga*:UNIX_System_V:4.0:*)
310282 echo m68k-unknown-sysv4
311 exit 0;;
283 exit ;;
312284 *:[Aa]miga[Oo][Ss]:*:*)
313285 echo ${UNAME_MACHINE}-unknown-amigaos
314 exit 0 ;;
286 exit ;;
315287 *:[Mm]orph[Oo][Ss]:*:*)
316288 echo ${UNAME_MACHINE}-unknown-morphos
317 exit 0 ;;
289 exit ;;
318290 *:OS/390:*:*)
319291 echo i370-ibm-openedition
320 exit 0 ;;
292 exit ;;
293 *:z/VM:*:*)
294 echo s390-ibm-zvmoe
295 exit ;;
321296 *:OS400:*:*)
322297 echo powerpc-ibm-os400
323 exit 0 ;;
298 exit ;;
324299 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
325300 echo arm-acorn-riscix${UNAME_RELEASE}
326 exit 0;;
301 exit ;;
302 arm:riscos:*:*|arm:RISCOS:*:*)
303 echo arm-unknown-riscos
304 exit ;;
327305 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
328306 echo hppa1.1-hitachi-hiuxmpp
329 exit 0;;
307 exit ;;
330308 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
331309 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
332310 if test "`(/bin/universe) 2>/dev/null`" = att ; then
334312 else
335313 echo pyramid-pyramid-bsd
336314 fi
337 exit 0 ;;
315 exit ;;
338316 NILE*:*:*:dcosx)
339317 echo pyramid-pyramid-svr4
340 exit 0 ;;
318 exit ;;
341319 DRS?6000:unix:4.0:6*)
342320 echo sparc-icl-nx6
343 exit 0 ;;
344 DRS?6000:UNIX_SV:4.2*:7*)
321 exit ;;
322 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
345323 case `/usr/bin/uname -p` in
346 sparc) echo sparc-icl-nx7 && exit 0 ;;
324 sparc) echo sparc-icl-nx7; exit ;;
347325 esac ;;
326 s390x:SunOS:*:*)
327 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328 exit ;;
348329 sun4H:SunOS:5.*:*)
349330 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
350 exit 0 ;;
331 exit ;;
351332 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
352333 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
353 exit 0 ;;
354 i86pc:SunOS:5.*:*)
355 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
356 exit 0 ;;
334 exit ;;
335 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336 eval $set_cc_for_build
337 SUN_ARCH="i386"
338 # If there is a compiler, see if it is configured for 64-bit objects.
339 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
340 # This test works for both compilers.
341 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
342 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
343 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
344 grep IS_64BIT_ARCH >/dev/null
345 then
346 SUN_ARCH="x86_64"
347 fi
348 fi
349 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
350 exit ;;
357351 sun4*:SunOS:6*:*)
358352 # According to config.sub, this is the proper way to canonicalize
359353 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
360354 # it's likely to be more like Solaris than SunOS4.
361355 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
362 exit 0 ;;
356 exit ;;
363357 sun4*:SunOS:*:*)
364358 case "`/usr/bin/arch -k`" in
365359 Series*|S4*)
368362 esac
369363 # Japanese Language versions have a version number like `4.1.3-JL'.
370364 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
371 exit 0 ;;
365 exit ;;
372366 sun3*:SunOS:*:*)
373367 echo m68k-sun-sunos${UNAME_RELEASE}
374 exit 0 ;;
368 exit ;;
375369 sun*:*:4.2BSD:*)
376370 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
377371 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
383377 echo sparc-sun-sunos${UNAME_RELEASE}
384378 ;;
385379 esac
386 exit 0 ;;
380 exit ;;
387381 aushp:SunOS:*:*)
388382 echo sparc-auspex-sunos${UNAME_RELEASE}
389 exit 0 ;;
383 exit ;;
390384 # The situation for MiNT is a little confusing. The machine name
391385 # can be virtually everything (everything which is not
392386 # "atarist" or "atariste" at least should have a processor
397391 # be no problem.
398392 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
399393 echo m68k-atari-mint${UNAME_RELEASE}
400 exit 0 ;;
394 exit ;;
401395 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
402396 echo m68k-atari-mint${UNAME_RELEASE}
403 exit 0 ;;
397 exit ;;
404398 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
405399 echo m68k-atari-mint${UNAME_RELEASE}
406 exit 0 ;;
400 exit ;;
407401 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
408402 echo m68k-milan-mint${UNAME_RELEASE}
409 exit 0 ;;
403 exit ;;
410404 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
411405 echo m68k-hades-mint${UNAME_RELEASE}
412 exit 0 ;;
406 exit ;;
413407 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
414408 echo m68k-unknown-mint${UNAME_RELEASE}
415 exit 0 ;;
409 exit ;;
416410 m68k:machten:*:*)
417411 echo m68k-apple-machten${UNAME_RELEASE}
418 exit 0 ;;
412 exit ;;
419413 powerpc:machten:*:*)
420414 echo powerpc-apple-machten${UNAME_RELEASE}
421 exit 0 ;;
415 exit ;;
422416 RISC*:Mach:*:*)
423417 echo mips-dec-mach_bsd4.3
424 exit 0 ;;
418 exit ;;
425419 RISC*:ULTRIX:*:*)
426420 echo mips-dec-ultrix${UNAME_RELEASE}
427 exit 0 ;;
421 exit ;;
428422 VAX*:ULTRIX*:*:*)
429423 echo vax-dec-ultrix${UNAME_RELEASE}
430 exit 0 ;;
424 exit ;;
431425 2020:CLIX:*:* | 2430:CLIX:*:*)
432426 echo clipper-intergraph-clix${UNAME_RELEASE}
433 exit 0 ;;
427 exit ;;
434428 mips:*:*:UMIPS | mips:*:*:RISCos)
435429 eval $set_cc_for_build
436430 sed 's/^ //' << EOF >$dummy.c
454448 exit (-1);
455449 }
456450 EOF
457 $CC_FOR_BUILD -o $dummy $dummy.c \
458 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
459 && exit 0
451 $CC_FOR_BUILD -o $dummy $dummy.c &&
452 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
453 SYSTEM_NAME=`$dummy $dummyarg` &&
454 { echo "$SYSTEM_NAME"; exit; }
460455 echo mips-mips-riscos${UNAME_RELEASE}
461 exit 0 ;;
456 exit ;;
462457 Motorola:PowerMAX_OS:*:*)
463458 echo powerpc-motorola-powermax
464 exit 0 ;;
459 exit ;;
465460 Motorola:*:4.3:PL8-*)
466461 echo powerpc-harris-powermax
467 exit 0 ;;
462 exit ;;
468463 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469464 echo powerpc-harris-powermax
470 exit 0 ;;
465 exit ;;
471466 Night_Hawk:Power_UNIX:*:*)
472467 echo powerpc-harris-powerunix
473 exit 0 ;;
468 exit ;;
474469 m88k:CX/UX:7*:*)
475470 echo m88k-harris-cxux7
476 exit 0 ;;
471 exit ;;
477472 m88k:*:4*:R4*)
478473 echo m88k-motorola-sysv4
479 exit 0 ;;
474 exit ;;
480475 m88k:*:3*:R3*)
481476 echo m88k-motorola-sysv3
482 exit 0 ;;
477 exit ;;
483478 AViiON:dgux:*:*)
484479 # DG/UX returns AViiON for all architectures
485480 UNAME_PROCESSOR=`/usr/bin/uname -p`
495490 else
496491 echo i586-dg-dgux${UNAME_RELEASE}
497492 fi
498 exit 0 ;;
493 exit ;;
499494 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500495 echo m88k-dolphin-sysv3
501 exit 0 ;;
496 exit ;;
502497 M88*:*:R3*:*)
503498 # Delta 88k system running SVR3
504499 echo m88k-motorola-sysv3
505 exit 0 ;;
500 exit ;;
506501 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507502 echo m88k-tektronix-sysv3
508 exit 0 ;;
503 exit ;;
509504 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510505 echo m68k-tektronix-bsd
511 exit 0 ;;
506 exit ;;
512507 *:IRIX*:*:*)
513508 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514 exit 0 ;;
509 exit ;;
515510 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
517 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
511 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
512 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518513 i*86:AIX:*:*)
519514 echo i386-ibm-aix
520 exit 0 ;;
515 exit ;;
521516 ia64:AIX:*:*)
522517 if [ -x /usr/bin/oslevel ] ; then
523518 IBM_REV=`/usr/bin/oslevel`
525520 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526521 fi
527522 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528 exit 0 ;;
523 exit ;;
529524 *:AIX:2:3)
530525 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531526 eval $set_cc_for_build
540535 exit(0);
541536 }
542537 EOF
543 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
544 echo rs6000-ibm-aix3.2.5
538 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
539 then
540 echo "$SYSTEM_NAME"
541 else
542 echo rs6000-ibm-aix3.2.5
543 fi
545544 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
546545 echo rs6000-ibm-aix3.2.4
547546 else
548547 echo rs6000-ibm-aix3.2
549548 fi
550 exit 0 ;;
551 *:AIX:*:[45])
549 exit ;;
550 *:AIX:*:[456])
552551 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
553552 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
554553 IBM_ARCH=rs6000
561560 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
562561 fi
563562 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
564 exit 0 ;;
563 exit ;;
565564 *:AIX:*:*)
566565 echo rs6000-ibm-aix
567 exit 0 ;;
566 exit ;;
568567 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
569568 echo romp-ibm-bsd4.4
570 exit 0 ;;
569 exit ;;
571570 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
572571 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
573 exit 0 ;; # report: romp-ibm BSD 4.3
572 exit ;; # report: romp-ibm BSD 4.3
574573 *:BOSX:*:*)
575574 echo rs6000-bull-bosx
576 exit 0 ;;
575 exit ;;
577576 DPX/2?00:B.O.S.:*:*)
578577 echo m68k-bull-sysv3
579 exit 0 ;;
578 exit ;;
580579 9000/[34]??:4.3bsd:1.*:*)
581580 echo m68k-hp-bsd
582 exit 0 ;;
581 exit ;;
583582 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
584583 echo m68k-hp-bsd4.4
585 exit 0 ;;
584 exit ;;
586585 9000/[34678]??:HP-UX:*:*)
587586 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
588587 case "${UNAME_MACHINE}" in
644643 esac
645644 if [ ${HP_ARCH} = "hppa2.0w" ]
646645 then
647 # avoid double evaluation of $set_cc_for_build
648 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
649 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
646 eval $set_cc_for_build
647
648 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
649 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
650 # generating 64-bit code. GNU and HP use different nomenclature:
651 #
652 # $ CC_FOR_BUILD=cc ./config.guess
653 # => hppa2.0w-hp-hpux11.23
654 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
655 # => hppa64-hp-hpux11.23
656
657 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
658 grep -q __LP64__
650659 then
651660 HP_ARCH="hppa2.0w"
652661 else
654663 fi
655664 fi
656665 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
657 exit 0 ;;
666 exit ;;
658667 ia64:HP-UX:*:*)
659668 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
660669 echo ia64-hp-hpux${HPUX_REV}
661 exit 0 ;;
670 exit ;;
662671 3050*:HI-UX:*:*)
663672 eval $set_cc_for_build
664673 sed 's/^ //' << EOF >$dummy.c
686695 exit (0);
687696 }
688697 EOF
689 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
698 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
699 { echo "$SYSTEM_NAME"; exit; }
690700 echo unknown-hitachi-hiuxwe2
691 exit 0 ;;
701 exit ;;
692702 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
693703 echo hppa1.1-hp-bsd
694 exit 0 ;;
704 exit ;;
695705 9000/8??:4.3bsd:*:*)
696706 echo hppa1.0-hp-bsd
697 exit 0 ;;
707 exit ;;
698708 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
699709 echo hppa1.0-hp-mpeix
700 exit 0 ;;
710 exit ;;
701711 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
702712 echo hppa1.1-hp-osf
703 exit 0 ;;
713 exit ;;
704714 hp8??:OSF1:*:*)
705715 echo hppa1.0-hp-osf
706 exit 0 ;;
716 exit ;;
707717 i*86:OSF1:*:*)
708718 if [ -x /usr/sbin/sysversion ] ; then
709719 echo ${UNAME_MACHINE}-unknown-osf1mk
710720 else
711721 echo ${UNAME_MACHINE}-unknown-osf1
712722 fi
713 exit 0 ;;
723 exit ;;
714724 parisc*:Lites*:*:*)
715725 echo hppa1.1-hp-lites
716 exit 0 ;;
726 exit ;;
717727 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
718728 echo c1-convex-bsd
719 exit 0 ;;
729 exit ;;
720730 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
721731 if getsysinfo -f scalar_acc
722732 then echo c32-convex-bsd
723733 else echo c2-convex-bsd
724734 fi
725 exit 0 ;;
735 exit ;;
726736 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
727737 echo c34-convex-bsd
728 exit 0 ;;
738 exit ;;
729739 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
730740 echo c38-convex-bsd
731 exit 0 ;;
741 exit ;;
732742 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
733743 echo c4-convex-bsd
734 exit 0 ;;
744 exit ;;
735745 CRAY*Y-MP:*:*:*)
736746 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
737 exit 0 ;;
747 exit ;;
738748 CRAY*[A-Z]90:*:*:*)
739749 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
740750 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
741751 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
742752 -e 's/\.[^.]*$/.X/'
743 exit 0 ;;
753 exit ;;
744754 CRAY*TS:*:*:*)
745755 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
746 exit 0 ;;
756 exit ;;
747757 CRAY*T3E:*:*:*)
748758 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
749 exit 0 ;;
759 exit ;;
750760 CRAY*SV1:*:*:*)
751761 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit 0 ;;
762 exit ;;
753763 *:UNICOS/mp:*:*)
754764 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
755 exit 0 ;;
765 exit ;;
756766 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
757767 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
758768 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
759769 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
760770 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
761 exit 0 ;;
771 exit ;;
762772 5000:UNIX_System_V:4.*:*)
763773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
764774 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
765775 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
766 exit 0 ;;
776 exit ;;
767777 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
768778 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
769 exit 0 ;;
779 exit ;;
770780 sparc*:BSD/OS:*:*)
771781 echo sparc-unknown-bsdi${UNAME_RELEASE}
772 exit 0 ;;
782 exit ;;
773783 *:BSD/OS:*:*)
774784 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
775 exit 0 ;;
785 exit ;;
776786 *:FreeBSD:*:*)
777 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
778 exit 0 ;;
787 case ${UNAME_MACHINE} in
788 pc98)
789 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
790 amd64)
791 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
792 *)
793 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
794 esac
795 exit ;;
779796 i*:CYGWIN*:*)
780797 echo ${UNAME_MACHINE}-pc-cygwin
781 exit 0 ;;
782 i*:MINGW*:*)
798 exit ;;
799 *:MINGW*:*)
783800 echo ${UNAME_MACHINE}-pc-mingw32
784 exit 0 ;;
801 exit ;;
802 i*:windows32*:*)
803 # uname -m includes "-pc" on this system.
804 echo ${UNAME_MACHINE}-mingw32
805 exit ;;
785806 i*:PW*:*)
786807 echo ${UNAME_MACHINE}-pc-pw32
787 exit 0 ;;
788 x86:Interix*:[34]*)
789 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
790 exit 0 ;;
808 exit ;;
809 *:Interix*:[3456]*)
810 case ${UNAME_MACHINE} in
811 x86)
812 echo i586-pc-interix${UNAME_RELEASE}
813 exit ;;
814 EM64T | authenticamd | genuineintel)
815 echo x86_64-unknown-interix${UNAME_RELEASE}
816 exit ;;
817 IA64)
818 echo ia64-unknown-interix${UNAME_RELEASE}
819 exit ;;
820 esac ;;
791821 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
792822 echo i${UNAME_MACHINE}-pc-mks
793 exit 0 ;;
823 exit ;;
824 8664:Windows_NT:*)
825 echo x86_64-pc-mks
826 exit ;;
794827 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
795828 # How do we know it's Interix rather than the generic POSIX subsystem?
796829 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
797830 # UNAME_MACHINE based on the output of uname instead of i386?
798831 echo i586-pc-interix
799 exit 0 ;;
832 exit ;;
800833 i*:UWIN*:*)
801834 echo ${UNAME_MACHINE}-pc-uwin
802 exit 0 ;;
835 exit ;;
836 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
837 echo x86_64-unknown-cygwin
838 exit ;;
803839 p*:CYGWIN*:*)
804840 echo powerpcle-unknown-cygwin
805 exit 0 ;;
841 exit ;;
806842 prep*:SunOS:5.*:*)
807843 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
808 exit 0 ;;
844 exit ;;
809845 *:GNU:*:*)
810846 # the GNU system
811847 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
812 exit 0 ;;
848 exit ;;
813849 *:GNU/*:*:*)
814850 # other systems with GNU libc and userland
815851 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
816 exit 0 ;;
852 exit ;;
817853 i*86:Minix:*:*)
818854 echo ${UNAME_MACHINE}-pc-minix
819 exit 0 ;;
820 arm*:Linux:*:*)
821 echo ${UNAME_MACHINE}-unknown-linux-gnu
822 exit 0 ;;
823 cris:Linux:*:*)
824 echo cris-axis-linux-gnu
825 exit 0 ;;
826 crisv32:Linux:*:*)
827 echo crisv32-axis-linux-gnu
828 exit 0 ;;
829 frv:Linux:*:*)
830 echo frv-unknown-linux-gnu
831 exit 0 ;;
832 ia64:Linux:*:*)
833 echo ${UNAME_MACHINE}-unknown-linux-gnu
834 exit 0 ;;
835 m32r*:Linux:*:*)
836 echo ${UNAME_MACHINE}-unknown-linux-gnu
837 exit 0 ;;
838 m68*:Linux:*:*)
839 echo ${UNAME_MACHINE}-unknown-linux-gnu
840 exit 0 ;;
841 mips:Linux:*:*)
842 eval $set_cc_for_build
843 sed 's/^ //' << EOF >$dummy.c
844 #undef CPU
845 #undef mips
846 #undef mipsel
847 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
848 CPU=mipsel
849 #else
850 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
851 CPU=mips
852 #else
853 CPU=
854 #endif
855 #endif
856 EOF
857 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
858 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
859 ;;
860 mips64:Linux:*:*)
861 eval $set_cc_for_build
862 sed 's/^ //' << EOF >$dummy.c
863 #undef CPU
864 #undef mips64
865 #undef mips64el
866 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
867 CPU=mips64el
868 #else
869 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
870 CPU=mips64
871 #else
872 CPU=
873 #endif
874 #endif
875 EOF
876 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
877 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
878 ;;
879 ppc:Linux:*:*)
880 echo powerpc-unknown-linux-gnu
881 exit 0 ;;
882 ppc64:Linux:*:*)
883 echo powerpc64-unknown-linux-gnu
884 exit 0 ;;
855 exit ;;
885856 alpha:Linux:*:*)
886857 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
887858 EV5) UNAME_MACHINE=alphaev5 ;;
892863 EV67) UNAME_MACHINE=alphaev67 ;;
893864 EV68*) UNAME_MACHINE=alphaev68 ;;
894865 esac
895 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
866 objdump --private-headers /bin/sh | grep -q ld.so.1
896867 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
897868 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
898 exit 0 ;;
869 exit ;;
870 arm*:Linux:*:*)
871 eval $set_cc_for_build
872 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
873 | grep -q __ARM_EABI__
874 then
875 echo ${UNAME_MACHINE}-unknown-linux-gnu
876 else
877 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
878 fi
879 exit ;;
880 avr32*:Linux:*:*)
881 echo ${UNAME_MACHINE}-unknown-linux-gnu
882 exit ;;
883 cris:Linux:*:*)
884 echo cris-axis-linux-gnu
885 exit ;;
886 crisv32:Linux:*:*)
887 echo crisv32-axis-linux-gnu
888 exit ;;
889 frv:Linux:*:*)
890 echo frv-unknown-linux-gnu
891 exit ;;
892 i*86:Linux:*:*)
893 echo ${UNAME_MACHINE}-pc-linux-gnu
894 exit ;;
895 ia64:Linux:*:*)
896 echo ${UNAME_MACHINE}-unknown-linux-gnu
897 exit ;;
898 m32r*:Linux:*:*)
899 echo ${UNAME_MACHINE}-unknown-linux-gnu
900 exit ;;
901 m68*:Linux:*:*)
902 echo ${UNAME_MACHINE}-unknown-linux-gnu
903 exit ;;
904 mips:Linux:*:* | mips64:Linux:*:*)
905 eval $set_cc_for_build
906 sed 's/^ //' << EOF >$dummy.c
907 #undef CPU
908 #undef ${UNAME_MACHINE}
909 #undef ${UNAME_MACHINE}el
910 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
911 CPU=${UNAME_MACHINE}el
912 #else
913 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
914 CPU=${UNAME_MACHINE}
915 #else
916 CPU=
917 #endif
918 #endif
919 EOF
920 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
921 /^CPU/{
922 s: ::g
923 p
924 }'`"
925 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
926 ;;
927 or32:Linux:*:*)
928 echo or32-unknown-linux-gnu
929 exit ;;
930 padre:Linux:*:*)
931 echo sparc-unknown-linux-gnu
932 exit ;;
933 parisc64:Linux:*:* | hppa64:Linux:*:*)
934 echo hppa64-unknown-linux-gnu
935 exit ;;
899936 parisc:Linux:*:* | hppa:Linux:*:*)
900937 # Look for CPU level
901938 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
903940 PA8*) echo hppa2.0-unknown-linux-gnu ;;
904941 *) echo hppa-unknown-linux-gnu ;;
905942 esac
906 exit 0 ;;
907 parisc64:Linux:*:* | hppa64:Linux:*:*)
908 echo hppa64-unknown-linux-gnu
909 exit 0 ;;
943 exit ;;
944 ppc64:Linux:*:*)
945 echo powerpc64-unknown-linux-gnu
946 exit ;;
947 ppc:Linux:*:*)
948 echo powerpc-unknown-linux-gnu
949 exit ;;
910950 s390:Linux:*:* | s390x:Linux:*:*)
911951 echo ${UNAME_MACHINE}-ibm-linux
912 exit 0 ;;
952 exit ;;
913953 sh64*:Linux:*:*)
914954 echo ${UNAME_MACHINE}-unknown-linux-gnu
915 exit 0 ;;
955 exit ;;
916956 sh*:Linux:*:*)
917957 echo ${UNAME_MACHINE}-unknown-linux-gnu
918 exit 0 ;;
958 exit ;;
919959 sparc:Linux:*:* | sparc64:Linux:*:*)
920960 echo ${UNAME_MACHINE}-unknown-linux-gnu
921 exit 0 ;;
961 exit ;;
962 vax:Linux:*:*)
963 echo ${UNAME_MACHINE}-dec-linux-gnu
964 exit ;;
922965 x86_64:Linux:*:*)
923966 echo x86_64-unknown-linux-gnu
924 exit 0 ;;
925 i*86:Linux:*:*)
926 # The BFD linker knows what the default object file format is, so
927 # first see if it will tell us. cd to the root directory to prevent
928 # problems with other programs or directories called `ld' in the path.
929 # Set LC_ALL=C to ensure ld outputs messages in English.
930 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
931 | sed -ne '/supported targets:/!d
932 s/[ ][ ]*/ /g
933 s/.*supported targets: *//
934 s/ .*//
935 p'`
936 case "$ld_supported_targets" in
937 elf32-i386)
938 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
939 ;;
940 a.out-i386-linux)
941 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
942 exit 0 ;;
943 coff-i386)
944 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
945 exit 0 ;;
946 "")
947 # Either a pre-BFD a.out linker (linux-gnuoldld) or
948 # one that does not give us useful --help.
949 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
950 exit 0 ;;
951 esac
952 # Determine whether the default compiler is a.out or elf
953 eval $set_cc_for_build
954 sed 's/^ //' << EOF >$dummy.c
955 #include
956 #ifdef __ELF__
957 # ifdef __GLIBC__
958 # if __GLIBC__ >= 2
959 LIBC=gnu
960 # else
961 LIBC=gnulibc1
962 # endif
963 # else
964 LIBC=gnulibc1
965 # endif
966 #else
967 #ifdef __INTEL_COMPILER
968 LIBC=gnu
969 #else
970 LIBC=gnuaout
971 #endif
972 #endif
973 #ifdef __dietlibc__
974 LIBC=dietlibc
975 #endif
976 EOF
977 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
978 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
979 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
980 ;;
967 exit ;;
968 xtensa*:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;;
981971 i*86:DYNIX/ptx:4*:*)
982972 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
983973 # earlier versions are messed up and put the nodename in both
984974 # sysname and nodename.
985975 echo i386-sequent-sysv4
986 exit 0 ;;
976 exit ;;
987977 i*86:UNIX_SV:4.2MP:2.*)
988978 # Unixware is an offshoot of SVR4, but it has its own version
989979 # number series starting with 2...
991981 # I just have to hope. -- rms.
992982 # Use sysv4.2uw... so that sysv4* matches it.
993983 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
994 exit 0 ;;
984 exit ;;
995985 i*86:OS/2:*:*)
996986 # If we were able to find `uname', then EMX Unix compatibility
997987 # is probably installed.
998988 echo ${UNAME_MACHINE}-pc-os2-emx
999 exit 0 ;;
989 exit ;;
1000990 i*86:XTS-300:*:STOP)
1001991 echo ${UNAME_MACHINE}-unknown-stop
1002 exit 0 ;;
992 exit ;;
1003993 i*86:atheos:*:*)
1004994 echo ${UNAME_MACHINE}-unknown-atheos
1005 exit 0 ;;
1006 i*86:syllable:*:*)
995 exit ;;
996 i*86:syllable:*:*)
1007997 echo ${UNAME_MACHINE}-pc-syllable
1008 exit 0 ;;
1009 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
998 exit ;;
999 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
10101000 echo i386-unknown-lynxos${UNAME_RELEASE}
1011 exit 0 ;;
1001 exit ;;
10121002 i*86:*DOS:*:*)
10131003 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1014 exit 0 ;;
1004 exit ;;
10151005 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10161006 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
10171007 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10191009 else
10201010 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
10211011 fi
1022 exit 0 ;;
1023 i*86:*:5:[78]*)
1012 exit ;;
1013 i*86:*:5:[678]*)
1014 # UnixWare 7.x, OpenUNIX and OpenServer 6.
10241015 case `/bin/uname -X | grep "^Machine"` in
10251016 *486*) UNAME_MACHINE=i486 ;;
10261017 *Pentium) UNAME_MACHINE=i586 ;;
10271018 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10281019 esac
10291020 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1030 exit 0 ;;
1021 exit ;;
10311022 i*86:*:3.2:*)
10321023 if test -f /usr/options/cb.name; then
10331024 UNAME_REL=`sed -n 's/.*Version //p'
10451036 else
10461037 echo ${UNAME_MACHINE}-pc-sysv32
10471038 fi
1048 exit 0 ;;
1039 exit ;;
10491040 pc:*:*:*)
10501041 # Left here for compatibility:
10511042 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1052 # the processor, so we play safe by assuming i386.
1053 echo i386-pc-msdosdjgpp
1054 exit 0 ;;
1043 # the processor, so we play safe by assuming i586.
1044 # Note: whatever this is, it MUST be the same as what config.sub
1045 # prints for the "djgpp" host, or else GDB configury will decide that
1046 # this is a cross-build.
1047 echo i586-pc-msdosdjgpp
1048 exit ;;
10551049 Intel:Mach:3*:*)
10561050 echo i386-pc-mach3
1057 exit 0 ;;
1051 exit ;;
10581052 paragon:*:*:*)
10591053 echo i860-intel-osf1
1060 exit 0 ;;
1054 exit ;;
10611055 i860:*:4.*:*) # i860-SVR4
10621056 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10631057 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
10641058 else # Add other i860-SVR4 vendors below as they are discovered.
10651059 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
10661060 fi
1067 exit 0 ;;
1061 exit ;;
10681062 mini*:CTIX:SYS*5:*)
10691063 # "miniframe"
10701064 echo m68010-convergent-sysv
1071 exit 0 ;;
1065 exit ;;
10721066 mc68k:UNIX:SYSTEM5:3.51m)
10731067 echo m68k-convergent-sysv
1074 exit 0 ;;
1068 exit ;;
10751069 M680?0:D-NIX:5.3:*)
10761070 echo m68k-diab-dnix
1077 exit 0 ;;
1071 exit ;;
10781072 M68*:*:R3V[5678]*:*)
1079 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1073 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
10801074 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)
10811075 OS_REL=''
10821076 test -r /etc/.relid \
10831077 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
10841078 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1085 && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1079 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
10861080 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1087 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1081 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10881082 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
10891083 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1090 && echo i486-ncr-sysv4 && exit 0 ;;
1084 && { echo i486-ncr-sysv4; exit; } ;;
1085 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1086 OS_REL='.3'
1087 test -r /etc/.relid \
1088 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1089 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1090 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1091 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1092 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1093 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1094 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10911095 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
10921096 echo m68k-unknown-lynxos${UNAME_RELEASE}
1093 exit 0 ;;
1097 exit ;;
10941098 mc68030:UNIX_System_V:4.*:*)
10951099 echo m68k-atari-sysv4
1096 exit 0 ;;
1100 exit ;;
10971101 TSUNAMI:LynxOS:2.*:*)
10981102 echo sparc-unknown-lynxos${UNAME_RELEASE}
1099 exit 0 ;;
1103 exit ;;
11001104 rs6000:LynxOS:2.*:*)
11011105 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1102 exit 0 ;;
1103 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1106 exit ;;
1107 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
11041108 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1105 exit 0 ;;
1109 exit ;;
11061110 SM[BE]S:UNIX_SV:*:*)
11071111 echo mips-dde-sysv${UNAME_RELEASE}
1108 exit 0 ;;
1112 exit ;;
11091113 RM*:ReliantUNIX-*:*:*)
11101114 echo mips-sni-sysv4
1111 exit 0 ;;
1115 exit ;;
11121116 RM*:SINIX-*:*:*)
11131117 echo mips-sni-sysv4
1114 exit 0 ;;
1118 exit ;;
11151119 *:SINIX-*:*:*)
11161120 if uname -p 2>/dev/null >/dev/null ; then
11171121 UNAME_MACHINE=`(uname -p) 2>/dev/null`
11191123 else
11201124 echo ns32k-sni-sysv
11211125 fi
1122 exit 0 ;;
1126 exit ;;
11231127 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11241128 # says
11251129 echo i586-unisys-sysv4
1126 exit 0 ;;
1130 exit ;;
11271131 *:UNIX_System_V:4*:FTX*)
11281132 # From Gerald Hewes .
11291133 # How about differentiating between stratus architectures? -djm
11301134 echo hppa1.1-stratus-sysv4
1131 exit 0 ;;
1135 exit ;;
11321136 *:*:*:FTX*)
11331137 # From seanf@swdc.stratus.com.
11341138 echo i860-stratus-sysv4
1135 exit 0 ;;
1139 exit ;;
1140 i*86:VOS:*:*)
1141 # From Paul.Green@stratus.com.
1142 echo ${UNAME_MACHINE}-stratus-vos
1143 exit ;;
11361144 *:VOS:*:*)
11371145 # From Paul.Green@stratus.com.
11381146 echo hppa1.1-stratus-vos
1139 exit 0 ;;
1147 exit ;;
11401148 mc68*:A/UX:*:*)
11411149 echo m68k-apple-aux${UNAME_RELEASE}
1142 exit 0 ;;
1150 exit ;;
11431151 news*:NEWS-OS:6*:*)
11441152 echo mips-sony-newsos6
1145 exit 0 ;;
1153 exit ;;
11461154 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11471155 if [ -d /usr/nec ]; then
11481156 echo mips-nec-sysv${UNAME_RELEASE}
11491157 else
11501158 echo mips-unknown-sysv${UNAME_RELEASE}
11511159 fi
1152 exit 0 ;;
1160 exit ;;
11531161 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
11541162 echo powerpc-be-beos
1155 exit 0 ;;
1163 exit ;;
11561164 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
11571165 echo powerpc-apple-beos
1158 exit 0 ;;
1166 exit ;;
11591167 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
11601168 echo i586-pc-beos
1161 exit 0 ;;
1169 exit ;;
1170 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1171 echo i586-pc-haiku
1172 exit ;;
11621173 SX-4:SUPER-UX:*:*)
11631174 echo sx4-nec-superux${UNAME_RELEASE}
1164 exit 0 ;;
1175 exit ;;
11651176 SX-5:SUPER-UX:*:*)
11661177 echo sx5-nec-superux${UNAME_RELEASE}
1167 exit 0 ;;
1178 exit ;;
11681179 SX-6:SUPER-UX:*:*)
11691180 echo sx6-nec-superux${UNAME_RELEASE}
1170 exit 0 ;;
1181 exit ;;
1182 SX-7:SUPER-UX:*:*)
1183 echo sx7-nec-superux${UNAME_RELEASE}
1184 exit ;;
1185 SX-8:SUPER-UX:*:*)
1186 echo sx8-nec-superux${UNAME_RELEASE}
1187 exit ;;
1188 SX-8R:SUPER-UX:*:*)
1189 echo sx8r-nec-superux${UNAME_RELEASE}
1190 exit ;;
11711191 Power*:Rhapsody:*:*)
11721192 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1173 exit 0 ;;
1193 exit ;;
11741194 *:Rhapsody:*:*)
11751195 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1176 exit 0 ;;
1196 exit ;;
11771197 *:Darwin:*:*)
11781198 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
11791199 case $UNAME_PROCESSOR in
1180 *86) UNAME_PROCESSOR=i686 ;;
1200 i386)
1201 eval $set_cc_for_build
1202 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1203 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1204 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1205 grep IS_64BIT_ARCH >/dev/null
1206 then
1207 UNAME_PROCESSOR="x86_64"
1208 fi
1209 fi ;;
11811210 unknown) UNAME_PROCESSOR=powerpc ;;
11821211 esac
11831212 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1184 exit 0 ;;
1213 exit ;;
11851214 *:procnto*:*:* | *:QNX:[0123456789]*:*)
11861215 UNAME_PROCESSOR=`uname -p`
11871216 if test "$UNAME_PROCESSOR" = "x86"; then
11891218 UNAME_MACHINE=pc
11901219 fi
11911220 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1192 exit 0 ;;
1221 exit ;;
11931222 *:QNX:*:4*)
11941223 echo i386-pc-qnx
1195 exit 0 ;;
1224 exit ;;
1225 NSE-?:NONSTOP_KERNEL:*:*)
1226 echo nse-tandem-nsk${UNAME_RELEASE}
1227 exit ;;
11961228 NSR-?:NONSTOP_KERNEL:*:*)
11971229 echo nsr-tandem-nsk${UNAME_RELEASE}
1198 exit 0 ;;
1230 exit ;;
11991231 *:NonStop-UX:*:*)
12001232 echo mips-compaq-nonstopux
1201 exit 0 ;;
1233 exit ;;
12021234 BS2000:POSIX*:*:*)
12031235 echo bs2000-siemens-sysv
1204 exit 0 ;;
1236 exit ;;
12051237 DS/*:UNIX_System_V:*:*)
12061238 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1207 exit 0 ;;
1239 exit ;;
12081240 *:Plan9:*:*)
12091241 # "uname -m" is not consistent, so use $cputype instead. 386
12101242 # is converted to i386 for consistency with other x86
12151247 UNAME_MACHINE="$cputype"
12161248 fi
12171249 echo ${UNAME_MACHINE}-unknown-plan9
1218 exit 0 ;;
1250 exit ;;
12191251 *:TOPS-10:*:*)
12201252 echo pdp10-unknown-tops10
1221 exit 0 ;;
1253 exit ;;
12221254 *:TENEX:*:*)
12231255 echo pdp10-unknown-tenex
1224 exit 0 ;;
1256 exit ;;
12251257 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
12261258 echo pdp10-dec-tops20
1227 exit 0 ;;
1259 exit ;;
12281260 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
12291261 echo pdp10-xkl-tops20
1230 exit 0 ;;
1262 exit ;;
12311263 *:TOPS-20:*:*)
12321264 echo pdp10-unknown-tops20
1233 exit 0 ;;
1265 exit ;;
12341266 *:ITS:*:*)
12351267 echo pdp10-unknown-its
1236 exit 0 ;;
1268 exit ;;
12371269 SEI:*:*:SEIUX)
12381270 echo mips-sei-seiux${UNAME_RELEASE}
1239 exit 0 ;;
1271 exit ;;
12401272 *:DragonFly:*:*)
12411273 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1242 exit 0 ;;
1274 exit ;;
12431275 *:*VMS:*:*)
12441276 UNAME_MACHINE=`(uname -p) 2>/dev/null`
12451277 case "${UNAME_MACHINE}" in
1246 A*) echo alpha-dec-vms && exit 0 ;;
1247 I*) echo ia64-dec-vms && exit 0 ;;
1248 V*) echo vax-dec-vms && exit 0 ;;
1249 esac
1278 A*) echo alpha-dec-vms ; exit ;;
1279 I*) echo ia64-dec-vms ; exit ;;
1280 V*) echo vax-dec-vms ; exit ;;
1281 esac ;;
1282 *:XENIX:*:SysV)
1283 echo i386-pc-xenix
1284 exit ;;
1285 i*86:skyos:*:*)
1286 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1287 exit ;;
1288 i*86:rdos:*:*)
1289 echo ${UNAME_MACHINE}-pc-rdos
1290 exit ;;
1291 i*86:AROS:*:*)
1292 echo ${UNAME_MACHINE}-pc-aros
1293 exit ;;
12501294 esac
12511295
12521296 #echo '(No uname command or uname output not recognized.)' 1>&2
12781322 #endif
12791323
12801324 #if defined (__arm) && defined (__acorn) && defined (__unix)
1281 printf ("arm-acorn-riscix"); exit (0);
1325 printf ("arm-acorn-riscix\n"); exit (0);
12821326 #endif
12831327
12841328 #if defined (hp300) && !defined (hpux)
13671411 }
13681412 EOF
13691413
1370 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1414 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1415 { echo "$SYSTEM_NAME"; exit; }
13711416
13721417 # Apollos put the system type in the environment.
13731418
1374 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1419 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
13751420
13761421 # Convex versions that predate uname can use getsysinfo(1)
13771422
13801425 case `getsysinfo -f cpu_type` in
13811426 c1*)
13821427 echo c1-convex-bsd
1383 exit 0 ;;
1428 exit ;;
13841429 c2*)
13851430 if getsysinfo -f scalar_acc
13861431 then echo c32-convex-bsd
13871432 else echo c2-convex-bsd
13881433 fi
1389 exit 0 ;;
1434 exit ;;
13901435 c34*)
13911436 echo c34-convex-bsd
1392 exit 0 ;;
1437 exit ;;
13931438 c38*)
13941439 echo c38-convex-bsd
1395 exit 0 ;;
1440 exit ;;
13961441 c4*)
13971442 echo c4-convex-bsd
1398 exit 0 ;;
1443 exit ;;
13991444 esac
14001445 fi
14011446
14061451 the operating system you are using. It is advised that you
14071452 download the most up to date version of the config scripts from
14081453
1409 ftp://ftp.gnu.org/pub/gnu/config/
1454 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1455 and
1456 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
14101457
14111458 If the version you run ($0) is already up to date, please
14121459 send the following data and any information you think might be
0 #! /bin/sh
11 # Configuration validation subroutine script.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4
5 timestamp='2004-08-29'
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 # Free Software Foundation, Inc.
5
6 timestamp='2009-08-19'
67
78 # This file is (in principle) common to ALL GNU software.
89 # The presence of a machine in this file suggests that SOME GNU software
2021 #
2122 # You should have received a copy of the GNU General Public License
2223 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330,
24 # Boston, MA 02111-1307, USA.
25
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
2627 # As a special exception to the GNU General Public License, if you
2728 # distribute this file as part of a program that contains a
2829 # configuration script generated by Autoconf, you may include it under
2930 # the same distribution terms that you use for the rest of that program.
3031
32
3133 # Please send patches to . Submit a context
32 # diff and a properly formatted ChangeLog entry.
34 # diff and a properly formatted GNU ChangeLog entry.
3335 #
3436 # Configuration subroutine to validate and canonicalize a configuration type.
3537 # Supply the specified configuration type as an argument.
3638 # If it is invalid, we print an error message on stderr and exit with code 1.
3739 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # You can get the latest version of this script from:
42 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
3843
3944 # This file is supposed to be the same for all GNU packages
4045 # and recognize all the CPU types, system types and aliases
6974 version="\
7075 GNU config.sub ($timestamp)
7176
72 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
73 Free Software Foundation, Inc.
77 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
78 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7479
7580 This is free software; see the source for copying conditions. There is NO
7681 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8287 while test $# -gt 0 ; do
8388 case $1 in
8489 --time-stamp | --time* | -t )
85 echo "$timestamp" ; exit 0 ;;
90 echo "$timestamp" ; exit ;;
8691 --version | -v )
87 echo "$version" ; exit 0 ;;
92 echo "$version" ; exit ;;
8893 --help | --h* | -h )
89 echo "$usage"; exit 0 ;;
94 echo "$usage"; exit ;;
9095 -- ) # Stop option processing
9196 shift; break ;;
9297 - ) # Use stdin as input.
98103 *local*)
99104 # First pass through any local machine types.
100105 echo $1
101 exit 0;;
106 exit ;;
102107
103108 * )
104109 break ;;
117122 # Here we must recognize all the valid KERNEL-OS combinations.
118123 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
119124 case $maybe_os in
120 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
121 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
125 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
126 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
127 kopensolaris*-gnu* | \
128 storm-chaos* | os2-emx* | rtmk-nova*)
122129 os=-$maybe_os
123130 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124131 ;;
144151 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
145152 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
146153 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
147 -apple | -axis | -knuth | -cray)
154 -apple | -axis | -knuth | -cray | -microblaze)
148155 os=
149156 basic_machine=$1
157 ;;
158 -bluegene*)
159 os=-cnk
150160 ;;
151161 -sim | -cisco | -oki | -wec | -winbond)
152162 os=
169179 -hiux*)
170180 os=-hiuxwe2
171181 ;;
182 -sco6)
183 os=-sco5v6
184 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 ;;
172186 -sco5)
173187 os=-sco3.2v5
174188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183197 ;;
184198 -sco3.2v[4-9]*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco5v6*)
185203 # Don't forget version if it is 3.2v4 or newer.
186204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187205 ;;
229247 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
230248 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
231249 | am33_2.0 \
232 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
250 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
251 | bfin \
233252 | c4x | clipper \
234253 | d10v | d30v | dlx | dsp16xx \
235 | fr30 | frv \
254 | fido | fr30 | frv \
236255 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
237256 | i370 | i860 | i960 | ia64 \
238257 | ip2k | iq2000 \
239 | m32r | m32rle | m68000 | m68k | m88k | mcore \
258 | lm32 \
259 | m32c | m32r | m32rle | m68000 | m68k | m88k \
260 | maxq | mb | microblaze | mcore | mep | metag \
240261 | mips | mipsbe | mipseb | mipsel | mipsle \
241262 | mips16 \
242263 | mips64 | mips64el \
264 | mips64octeon | mips64octeonel \
265 | mips64orion | mips64orionel \
266 | mips64r5900 | mips64r5900el \
243267 | mips64vr | mips64vrel \
244 | mips64orion | mips64orionel \
245268 | mips64vr4100 | mips64vr4100el \
246269 | mips64vr4300 | mips64vr4300el \
247270 | mips64vr5000 | mips64vr5000el \
271 | mips64vr5900 | mips64vr5900el \
248272 | mipsisa32 | mipsisa32el \
249273 | mipsisa32r2 | mipsisa32r2el \
250274 | mipsisa64 | mipsisa64el \
253277 | mipsisa64sr71k | mipsisa64sr71kel \
254278 | mipstx39 | mipstx39el \
255279 | mn10200 | mn10300 \
280 | moxie \
281 | mt \
256282 | msp430 \
283 | nios | nios2 \
257284 | ns16k | ns32k \
258 | openrisc | or32 \
285 | or32 \
259286 | pdp10 | pdp11 | pj | pjl \
260287 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
261288 | pyramid \
262 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
289 | score \
290 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
263291 | sh64 | sh64le \
264 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
265 | strongarm \
292 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
293 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
294 | spu | strongarm \
266295 | tahoe | thumb | tic4x | tic80 | tron \
267296 | v850 | v850e \
268297 | we32k \
269 | x86 | xscale | xstormy16 | xtensa \
270 | z8k)
298 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
299 | z8k | z80)
271300 basic_machine=$basic_machine-unknown
272301 ;;
273302 m6811 | m68hc11 | m6812 | m68hc12)
276305 os=-none
277306 ;;
278307 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
308 ;;
309 ms1)
310 basic_machine=mt-unknown
279311 ;;
280312
281313 # We use `pc' rather than `unknown'
296328 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
297329 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
298330 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
299 | avr-* \
300 | bs2000-* \
331 | avr-* | avr32-* \
332 | bfin-* | bs2000-* \
301333 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
302334 | clipper-* | craynv-* | cydra-* \
303335 | d10v-* | d30v-* | dlx-* \
304336 | elxsi-* \
305 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
337 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
306338 | h8300-* | h8500-* \
307339 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
308340 | i*86-* | i860-* | i960-* | ia64-* \
309341 | ip2k-* | iq2000-* \
310 | m32r-* | m32rle-* \
342 | lm32-* \
343 | m32c-* | m32r-* | m32rle-* \
311344 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
312 | m88110-* | m88k-* | mcore-* \
345 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
313346 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
314347 | mips16-* \
315348 | mips64-* | mips64el-* \
349 | mips64octeon-* | mips64octeonel-* \
350 | mips64orion-* | mips64orionel-* \
351 | mips64r5900-* | mips64r5900el-* \
316352 | mips64vr-* | mips64vrel-* \
317 | mips64orion-* | mips64orionel-* \
318353 | mips64vr4100-* | mips64vr4100el-* \
319354 | mips64vr4300-* | mips64vr4300el-* \
320355 | mips64vr5000-* | mips64vr5000el-* \
356 | mips64vr5900-* | mips64vr5900el-* \
321357 | mipsisa32-* | mipsisa32el-* \
322358 | mipsisa32r2-* | mipsisa32r2el-* \
323359 | mipsisa64-* | mipsisa64el-* \
326362 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
327363 | mipstx39-* | mipstx39el-* \
328364 | mmix-* \
365 | mt-* \
329366 | msp430-* \
367 | nios-* | nios2-* \
330368 | none-* | np1-* | ns16k-* | ns32k-* \
331369 | orion-* \
332370 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
333371 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
334372 | pyramid-* \
335373 | romp-* | rs6000-* \
336 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
374 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
337375 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
338 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
339 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
376 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
377 | sparclite-* \
378 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
340379 | tahoe-* | thumb-* \
341 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
380 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
342381 | tron-* \
343382 | v850-* | v850e-* | vax-* \
344383 | we32k-* \
345 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
346 | xtensa-* \
384 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
385 | xstormy16-* | xtensa*-* \
347386 | ymp-* \
348 | z8k-*)
387 | z8k-* | z80-*)
388 ;;
389 # Recognize the basic CPU types without company name, with glob match.
390 xtensa*)
391 basic_machine=$basic_machine-unknown
349392 ;;
350393 # Recognize the various machine names and aliases which stand
351394 # for a CPU type and a company and sometimes even an OS.
409452 basic_machine=m68k-apollo
410453 os=-bsd
411454 ;;
455 aros)
456 basic_machine=i386-pc
457 os=-aros
458 ;;
412459 aux)
413460 basic_machine=m68k-apple
414461 os=-aux
417464 basic_machine=ns32k-sequent
418465 os=-dynix
419466 ;;
467 blackfin)
468 basic_machine=bfin-unknown
469 os=-linux
470 ;;
471 blackfin-*)
472 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
473 os=-linux
474 ;;
475 bluegene*)
476 basic_machine=powerpc-ibm
477 os=-cnk
478 ;;
420479 c90)
421480 basic_machine=c90-cray
422481 os=-unicos
423482 ;;
483 cegcc)
484 basic_machine=arm-unknown
485 os=-cegcc
486 ;;
424487 convex-c1)
425488 basic_machine=c1-convex
426489 os=-bsd
449512 basic_machine=craynv-cray
450513 os=-unicosmp
451514 ;;
452 cr16c)
453 basic_machine=cr16c-unknown
515 cr16)
516 basic_machine=cr16-unknown
454517 os=-elf
455518 ;;
456519 crds | unos)
487550 delta88)
488551 basic_machine=m88k-motorola
489552 os=-sysv3
553 ;;
554 dicos)
555 basic_machine=i686-pc
556 os=-dicos
557 ;;
558 djgpp)
559 basic_machine=i586-pc
560 os=-msdosdjgpp
490561 ;;
491562 dpx20 | dpx20-*)
492563 basic_machine=rs6000-bull
638709 basic_machine=m68k-isi
639710 os=-sysv
640711 ;;
712 m68knommu)
713 basic_machine=m68k-unknown
714 os=-linux
715 ;;
716 m68knommu-*)
717 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
718 os=-linux
719 ;;
641720 m88k-omron*)
642721 basic_machine=m88k-omron
643722 ;;
649728 basic_machine=ns32k-utek
650729 os=-sysv
651730 ;;
731 microblaze)
732 basic_machine=microblaze-xilinx
733 ;;
652734 mingw32)
653735 basic_machine=i386-pc
654736 os=-mingw32
655737 ;;
738 mingw32ce)
739 basic_machine=arm-unknown
740 os=-mingw32ce
741 ;;
656742 miniframe)
657743 basic_machine=m68000-convergent
658744 ;;
677763 msdos)
678764 basic_machine=i386-pc
679765 os=-msdos
766 ;;
767 ms1-*)
768 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
680769 ;;
681770 mvs)
682771 basic_machine=i370-ibm
753842 basic_machine=hppa1.1-oki
754843 os=-proelf
755844 ;;
756 or32 | or32-*)
845 openrisc | openrisc-*)
757846 basic_machine=or32-unknown
758 os=-coff
759847 ;;
760848 os400)
761849 basic_machine=powerpc-ibm
777865 basic_machine=i860-intel
778866 os=-osf
779867 ;;
868 parisc)
869 basic_machine=hppa-unknown
870 os=-linux
871 ;;
872 parisc-*)
873 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
874 os=-linux
875 ;;
780876 pbd)
781877 basic_machine=sparc-tti
782878 ;;
785881 ;;
786882 pc532 | pc532-*)
787883 basic_machine=ns32k-pc532
884 ;;
885 pc98)
886 basic_machine=i386-pc
887 ;;
888 pc98-*)
889 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
788890 ;;
789891 pentium | p5 | k5 | k6 | nexgen | viac3)
790892 basic_machine=i586-pc
842944 basic_machine=i586-unknown
843945 os=-pw32
844946 ;;
947 rdos)
948 basic_machine=i386-pc
949 os=-rdos
950 ;;
845951 rom68k)
846952 basic_machine=m68k-rom68k
847953 os=-coff
868974 sb1el)
869975 basic_machine=mipsisa64sb1el-unknown
870976 ;;
977 sde)
978 basic_machine=mipsisa32-sde
979 os=-elf
980 ;;
871981 sei)
872982 basic_machine=mips-sei
873983 os=-seiux
879989 basic_machine=sh-hitachi
880990 os=-hms
881991 ;;
992 sh5el)
993 basic_machine=sh5le-unknown
994 ;;
882995 sh64)
883996 basic_machine=sh64-unknown
884997 ;;
9681081 basic_machine=tic6x-unknown
9691082 os=-coff
9701083 ;;
1084 tile*)
1085 basic_machine=tile-unknown
1086 os=-linux-gnu
1087 ;;
9711088 tx39)
9721089 basic_machine=mipstx39-unknown
9731090 ;;
10281145 basic_machine=hppa1.1-winbond
10291146 os=-proelf
10301147 ;;
1148 xbox)
1149 basic_machine=i686-pc
1150 os=-mingw32
1151 ;;
10311152 xps | xps100)
10321153 basic_machine=xps100-honeywell
10331154 ;;
10371158 ;;
10381159 z8k-*-coff)
10391160 basic_machine=z8k-unknown
1161 os=-sim
1162 ;;
1163 z80-*-coff)
1164 basic_machine=z80-unknown
10401165 os=-sim
10411166 ;;
10421167 none)
10771202 we32k)
10781203 basic_machine=we32k-att
10791204 ;;
1080 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1205 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
10811206 basic_machine=sh-unknown
10821207 ;;
1083 sh64)
1084 basic_machine=sh64-unknown
1085 ;;
1086 sparc | sparcv8 | sparcv9 | sparcv9b)
1208 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
10871209 basic_machine=sparc-sun
10881210 ;;
10891211 cydra)
11501272 # Each alternative MUST END IN A *, to match a version number.
11511273 # -sysv* is not here because it comes later, after sysvr4.
11521274 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1153 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1275 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
11541276 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1277 | -kopensolaris* \
11551278 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1156 | -aos* \
1279 | -aos* | -aros* \
11571280 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
11581281 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1159 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1282 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1283 | -openbsd* | -solidbsd* \
11601284 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
11611285 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
11621286 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
11631287 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1164 | -chorusos* | -chorusrdb* \
1288 | -chorusos* | -chorusrdb* | -cegcc* \
11651289 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1166 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1290 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1291 | -uxpv* | -beos* | -mpeix* | -udk* \
11671292 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
11681293 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
11691294 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
11701295 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
11711296 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1172 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
1297 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1298 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
11731299 # Remember, each alternative MUST END IN *, to match a version number.
11741300 ;;
11751301 -qnx*)
11871313 os=`echo $os | sed -e 's|nto|nto-qnx|'`
11881314 ;;
11891315 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1190 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1316 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
11911317 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
11921318 ;;
11931319 -mac*)
12951421 ;;
12961422 -kaos*)
12971423 os=-kaos
1424 ;;
1425 -zvmoe)
1426 os=-zvmoe
1427 ;;
1428 -dicos*)
1429 os=-dicos
12981430 ;;
12991431 -none)
13001432 ;;
13181450 # system, and we'll never get to this point.
13191451
13201452 case $basic_machine in
1453 score-*)
1454 os=-elf
1455 ;;
1456 spu-*)
1457 os=-elf
1458 ;;
13211459 *-acorn)
13221460 os=-riscix1.2
13231461 ;;
13271465 arm*-semi)
13281466 os=-aout
13291467 ;;
1330 c4x-* | tic4x-*)
1331 os=-coff
1332 ;;
1468 c4x-* | tic4x-*)
1469 os=-coff
1470 ;;
13331471 # This must come before the *-dec entry.
13341472 pdp10-*)
13351473 os=-tops20
13551493 m68*-cisco)
13561494 os=-aout
13571495 ;;
1496 mep-*)
1497 os=-elf
1498 ;;
13581499 mips*-cisco)
13591500 os=-elf
13601501 ;;
13721513 ;;
13731514 *-be)
13741515 os=-beos
1516 ;;
1517 *-haiku)
1518 os=-haiku
13751519 ;;
13761520 *-ibm)
13771521 os=-aix
14811625 -sunos*)
14821626 vendor=sun
14831627 ;;
1484 -aix*)
1628 -cnk*|-aix*)
14851629 vendor=ibm
14861630 ;;
14871631 -beos*)
15441688 esac
15451689
15461690 echo $basic_machine$os
1547 exit 0
1691 exit
15481692
15491693 # Local variables:
15501694 # eval: (add-hook 'write-file-hooks 'time-stamp)