comparison config.guess @ 792:239ede24d54f

Update config.guess and config.sub
author Matt Johnston <matt@ucc.asn.au>
date Mon, 13 May 2013 21:06:35 +0800
parents 5587d151d5a2
children 4891acd7ab4f
comparison
equal deleted inserted replaced
791:0bf76f54de6f 792:239ede24d54f
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 1992-2013 Free Software Foundation, Inc.
4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 4
5 # Inc. 5 timestamp='2013-04-24'
6
7 timestamp='2007-01-15'
8 6
9 # This file is free software; you can redistribute it and/or modify it 7 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by 8 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or 9 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version. 10 # (at your option) any later version.
13 # 11 #
14 # This program is distributed in the hope that it will be useful, but 12 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of 13 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details. 15 # General Public License for more details.
18 # 16 #
19 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software 18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22 # 02110-1301, USA.
23 # 19 #
24 # As a special exception to the GNU General Public License, if you 20 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a 21 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under 22 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program. 23 # the same distribution terms that you use for the rest of that
28 24 # program. This Exception is an additional permission under section 7
29 25 # of the GNU General Public License, version 3 ("GPLv3").
30 # Originally written by Per Bothner <[email protected]>.
31 # Please send patches to <[email protected]>. Submit a context
32 # diff and a properly formatted ChangeLog entry.
33 # 26 #
34 # This script attempts to guess a canonical system name similar to 27 # Originally written by Per Bothner.
35 # config.sub. If it succeeds, it prints the system name on stdout, and
36 # exits with 0. Otherwise, it exits with 1.
37 # 28 #
38 # The plan is that this can be called by configure scripts if you 29 # You can get the latest version of this script from:
39 # don't specify an explicit build system type. 30 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31 #
32 # Please send patches with a ChangeLog entry to [email protected].
33
40 34
41 me=`echo "$0" | sed -e 's,.*/,,'` 35 me=`echo "$0" | sed -e 's,.*/,,'`
42 36
43 usage="\ 37 usage="\
44 Usage: $0 [OPTION] 38 Usage: $0 [OPTION]
54 48
55 version="\ 49 version="\
56 GNU config.guess ($timestamp) 50 GNU config.guess ($timestamp)
57 51
58 Originally written by Per Bothner. 52 Originally written by Per Bothner.
59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 53 Copyright 1992-2013 Free Software Foundation, Inc.
60 Free Software Foundation, Inc.
61 54
62 This is free software; see the source for copying conditions. There is NO 55 This is free software; see the source for copying conditions. There is NO
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64 57
65 help=" 58 help="
142 # Note: order is significant - the case branches are not exclusive. 135 # Note: order is significant - the case branches are not exclusive.
143 136
144 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 137 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*) 138 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or 139 # NetBSD (nbsd) targets should (where applicable) match one or
147 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 140 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 141 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old 142 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward 143 # object file format. This provides both forward
151 # compatibility and a consistent mechanism for selecting the 144 # compatibility and a consistent mechanism for selecting the
152 # object file format. 145 # object file format.
168 # to ELF recently, or will in the future. 161 # to ELF recently, or will in the future.
169 case "${UNAME_MACHINE_ARCH}" in 162 case "${UNAME_MACHINE_ARCH}" in
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 163 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build 164 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 165 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep __ELF__ >/dev/null 166 | grep -q __ELF__
174 then 167 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 168 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX? 169 # Return netbsd for either. FIX?
177 os=netbsd 170 os=netbsd
178 else 171 else
179 os=netbsdelf 172 os=netbsdelf
180 fi 173 fi
181 ;; 174 ;;
182 *) 175 *)
183 os=netbsd 176 os=netbsd
184 ;; 177 ;;
185 esac 178 esac
186 # The OS release 179 # The OS release
187 # Debian GNU/NetBSD machines have a different userland, and 180 # Debian GNU/NetBSD machines have a different userland, and
188 # thus, need a distinct triplet. However, they do not need 181 # thus, need a distinct triplet. However, they do not need
199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 192 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200 # contains redundant information, the shorter form: 193 # contains redundant information, the shorter form:
201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 194 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 echo "${machine}-${os}${release}" 195 echo "${machine}-${os}${release}"
203 exit ;; 196 exit ;;
197 *:Bitrig:*:*)
198 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
199 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
200 exit ;;
204 *:OpenBSD:*:*) 201 *:OpenBSD:*:*)
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 202 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 203 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;; 204 exit ;;
208 *:ekkoBSD:*:*) 205 *:ekkoBSD:*:*)
221 case $UNAME_RELEASE in 218 case $UNAME_RELEASE in
222 *4.0) 219 *4.0)
223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 220 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 ;; 221 ;;
225 *5.*) 222 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;; 224 ;;
228 esac 225 esac
229 # According to Compaq, /usr/sbin/psrinfo has been available on 226 # According to Compaq, /usr/sbin/psrinfo has been available on
230 # OSF/1 and Tru64 systems produced since 1995. I hope that 227 # OSF/1 and Tru64 systems produced since 1995. I hope that
231 # covers most systems running today. This code pipes the CPU 228 # covers most systems running today. This code pipes the CPU
267 # A Vn.n version is a released version. 264 # A Vn.n version is a released version.
268 # A Tn.n version is a released field test version. 265 # A Tn.n version is a released field test version.
269 # A Xn.n version is an unreleased experimental baselevel. 266 # A Xn.n version is an unreleased experimental baselevel.
270 # 1.2 uses "1.2" for uname -r. 267 # 1.2 uses "1.2" for uname -r.
271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 268 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272 exit ;; 269 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
270 exitcode=$?
271 trap '' 0
272 exit $exitcode ;;
273 Alpha\ *:Windows_NT*:*) 273 Alpha\ *:Windows_NT*:*)
274 # How do we know it's Interix rather than the generic POSIX subsystem? 274 # How do we know it's Interix rather than the generic POSIX subsystem?
275 # Should we change UNAME_MACHINE based on the output of uname instead 275 # Should we change UNAME_MACHINE based on the output of uname instead
276 # of the specific Alpha model? 276 # of the specific Alpha model?
277 echo alpha-pc-interix 277 echo alpha-pc-interix
293 exit ;; 293 exit ;;
294 *:z/VM:*:*) 294 *:z/VM:*:*)
295 echo s390-ibm-zvmoe 295 echo s390-ibm-zvmoe
296 exit ;; 296 exit ;;
297 *:OS400:*:*) 297 *:OS400:*:*)
298 echo powerpc-ibm-os400 298 echo powerpc-ibm-os400
299 exit ;; 299 exit ;;
300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301 echo arm-acorn-riscix${UNAME_RELEASE} 301 echo arm-acorn-riscix${UNAME_RELEASE}
302 exit ;; 302 exit ;;
303 arm:riscos:*:*|arm:RISCOS:*:*) 303 arm*:riscos:*:*|arm*:RISCOS:*:*)
304 echo arm-unknown-riscos 304 echo arm-unknown-riscos
305 exit ;; 305 exit ;;
306 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 306 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307 echo hppa1.1-hitachi-hiuxmpp 307 echo hppa1.1-hitachi-hiuxmpp
308 exit ;; 308 exit ;;
322 exit ;; 322 exit ;;
323 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 323 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
324 case `/usr/bin/uname -p` in 324 case `/usr/bin/uname -p` in
325 sparc) echo sparc-icl-nx7; exit ;; 325 sparc) echo sparc-icl-nx7; exit ;;
326 esac ;; 326 esac ;;
327 s390x:SunOS:*:*)
328 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;;
327 sun4H:SunOS:5.*:*) 330 sun4H:SunOS:5.*:*)
328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 331 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;; 332 exit ;;
330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;; 335 exit ;;
333 i86pc:SunOS:5.*:*) 336 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 337 echo i386-pc-auroraux${UNAME_RELEASE}
338 exit ;;
339 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
340 eval $set_cc_for_build
341 SUN_ARCH="i386"
342 # If there is a compiler, see if it is configured for 64-bit objects.
343 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
344 # This test works for both compilers.
345 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
346 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
347 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
348 grep IS_64BIT_ARCH >/dev/null
349 then
350 SUN_ARCH="x86_64"
351 fi
352 fi
353 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 354 exit ;;
336 sun4*:SunOS:6*:*) 355 sun4*:SunOS:6*:*)
337 # According to config.sub, this is the proper way to canonicalize 356 # According to config.sub, this is the proper way to canonicalize
338 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 357 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
339 # it's likely to be more like Solaris than SunOS4. 358 # it's likely to be more like Solaris than SunOS4.
373 # to the lowercase version "mint" (or "freemint"). Finally 392 # to the lowercase version "mint" (or "freemint"). Finally
374 # the system name "TOS" denotes a system which is actually not 393 # the system name "TOS" denotes a system which is actually not
375 # MiNT. But MiNT is downward compatible to TOS, so this should 394 # MiNT. But MiNT is downward compatible to TOS, so this should
376 # be no problem. 395 # be no problem.
377 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 396 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
378 echo m68k-atari-mint${UNAME_RELEASE} 397 echo m68k-atari-mint${UNAME_RELEASE}
379 exit ;; 398 exit ;;
380 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 399 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
381 echo m68k-atari-mint${UNAME_RELEASE} 400 echo m68k-atari-mint${UNAME_RELEASE}
382 exit ;; 401 exit ;;
383 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 402 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
384 echo m68k-atari-mint${UNAME_RELEASE} 403 echo m68k-atari-mint${UNAME_RELEASE}
385 exit ;; 404 exit ;;
386 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 405 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
387 echo m68k-milan-mint${UNAME_RELEASE} 406 echo m68k-milan-mint${UNAME_RELEASE}
388 exit ;; 407 exit ;;
389 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 408 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
390 echo m68k-hades-mint${UNAME_RELEASE} 409 echo m68k-hades-mint${UNAME_RELEASE}
391 exit ;; 410 exit ;;
392 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 411 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
393 echo m68k-unknown-mint${UNAME_RELEASE} 412 echo m68k-unknown-mint${UNAME_RELEASE}
394 exit ;; 413 exit ;;
395 m68k:machten:*:*) 414 m68k:machten:*:*)
396 echo m68k-apple-machten${UNAME_RELEASE} 415 echo m68k-apple-machten${UNAME_RELEASE}
397 exit ;; 416 exit ;;
398 powerpc:machten:*:*) 417 powerpc:machten:*:*)
399 echo powerpc-apple-machten${UNAME_RELEASE} 418 echo powerpc-apple-machten${UNAME_RELEASE}
459 exit ;; 478 exit ;;
460 m88k:*:3*:R3*) 479 m88k:*:3*:R3*)
461 echo m88k-motorola-sysv3 480 echo m88k-motorola-sysv3
462 exit ;; 481 exit ;;
463 AViiON:dgux:*:*) 482 AViiON:dgux:*:*)
464 # DG/UX returns AViiON for all architectures 483 # DG/UX returns AViiON for all architectures
465 UNAME_PROCESSOR=`/usr/bin/uname -p` 484 UNAME_PROCESSOR=`/usr/bin/uname -p`
466 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 485 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
467 then 486 then
468 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 487 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
469 [ ${TARGET_BINARY_INTERFACE}x = x ] 488 [ ${TARGET_BINARY_INTERFACE}x = x ]
470 then 489 then
473 echo m88k-dg-dguxbcs${UNAME_RELEASE} 492 echo m88k-dg-dguxbcs${UNAME_RELEASE}
474 fi 493 fi
475 else 494 else
476 echo i586-dg-dgux${UNAME_RELEASE} 495 echo i586-dg-dgux${UNAME_RELEASE}
477 fi 496 fi
478 exit ;; 497 exit ;;
479 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 498 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
480 echo m88k-dolphin-sysv3 499 echo m88k-dolphin-sysv3
481 exit ;; 500 exit ;;
482 M88*:*:R3*:*) 501 M88*:*:R3*:*)
483 # Delta 88k system running SVR3 502 # Delta 88k system running SVR3
530 echo rs6000-ibm-aix3.2.4 549 echo rs6000-ibm-aix3.2.4
531 else 550 else
532 echo rs6000-ibm-aix3.2 551 echo rs6000-ibm-aix3.2
533 fi 552 fi
534 exit ;; 553 exit ;;
535 *:AIX:*:[45]) 554 *:AIX:*:[4567])
536 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 555 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 556 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538 IBM_ARCH=rs6000 557 IBM_ARCH=rs6000
539 else 558 else
540 IBM_ARCH=powerpc 559 IBM_ARCH=powerpc
573 9000/31? ) HP_ARCH=m68000 ;; 592 9000/31? ) HP_ARCH=m68000 ;;
574 9000/[34]?? ) HP_ARCH=m68k ;; 593 9000/[34]?? ) HP_ARCH=m68k ;;
575 9000/[678][0-9][0-9]) 594 9000/[678][0-9][0-9])
576 if [ -x /usr/bin/getconf ]; then 595 if [ -x /usr/bin/getconf ]; then
577 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 596 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
578 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 597 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
579 case "${sc_cpu_version}" in 598 case "${sc_cpu_version}" in
580 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 599 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
581 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 600 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
582 532) # CPU_PA_RISC2_0 601 532) # CPU_PA_RISC2_0
583 case "${sc_kernel_bits}" in 602 case "${sc_kernel_bits}" in
584 32) HP_ARCH="hppa2.0n" ;; 603 32) HP_ARCH="hppa2.0n" ;;
585 64) HP_ARCH="hppa2.0w" ;; 604 64) HP_ARCH="hppa2.0w" ;;
586 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 605 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
587 esac ;; 606 esac ;;
588 esac 607 esac
589 fi 608 fi
590 if [ "${HP_ARCH}" = "" ]; then 609 if [ "${HP_ARCH}" = "" ]; then
591 eval $set_cc_for_build 610 eval $set_cc_for_build
592 sed 's/^ //' << EOF >$dummy.c 611 sed 's/^ //' << EOF >$dummy.c
593 612
594 #define _HPUX_SOURCE 613 #define _HPUX_SOURCE
595 #include <stdlib.h> 614 #include <stdlib.h>
596 #include <unistd.h> 615 #include <unistd.h>
597 616
598 int main () 617 int main ()
599 { 618 {
600 #if defined(_SC_KERNEL_BITS) 619 #if defined(_SC_KERNEL_BITS)
601 long bits = sysconf(_SC_KERNEL_BITS); 620 long bits = sysconf(_SC_KERNEL_BITS);
602 #endif 621 #endif
603 long cpu = sysconf (_SC_CPU_VERSION); 622 long cpu = sysconf (_SC_CPU_VERSION);
604 623
605 switch (cpu) 624 switch (cpu)
606 { 625 {
607 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 626 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
608 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 627 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
609 case CPU_PA_RISC2_0: 628 case CPU_PA_RISC2_0:
610 #if defined(_SC_KERNEL_BITS) 629 #if defined(_SC_KERNEL_BITS)
611 switch (bits) 630 switch (bits)
612 { 631 {
613 case 64: puts ("hppa2.0w"); break; 632 case 64: puts ("hppa2.0w"); break;
614 case 32: puts ("hppa2.0n"); break; 633 case 32: puts ("hppa2.0n"); break;
615 default: puts ("hppa2.0"); break; 634 default: puts ("hppa2.0"); break;
616 } break; 635 } break;
617 #else /* !defined(_SC_KERNEL_BITS) */ 636 #else /* !defined(_SC_KERNEL_BITS) */
618 puts ("hppa2.0"); break; 637 puts ("hppa2.0"); break;
619 #endif 638 #endif
620 default: puts ("hppa1.0"); break; 639 default: puts ("hppa1.0"); break;
621 } 640 }
622 exit (0); 641 exit (0);
623 } 642 }
624 EOF 643 EOF
625 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 644 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
626 test -z "$HP_ARCH" && HP_ARCH=hppa 645 test -z "$HP_ARCH" && HP_ARCH=hppa
627 fi ;; 646 fi ;;
628 esac 647 esac
638 # => hppa2.0w-hp-hpux11.23 657 # => hppa2.0w-hp-hpux11.23
639 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 658 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
640 # => hppa64-hp-hpux11.23 659 # => hppa64-hp-hpux11.23
641 660
642 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 661 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643 grep __LP64__ >/dev/null 662 grep -q __LP64__
644 then 663 then
645 HP_ARCH="hppa2.0w" 664 HP_ARCH="hppa2.0w"
646 else 665 else
647 HP_ARCH="hppa64" 666 HP_ARCH="hppa64"
648 fi 667 fi
709 parisc*:Lites*:*:*) 728 parisc*:Lites*:*:*)
710 echo hppa1.1-hp-lites 729 echo hppa1.1-hp-lites
711 exit ;; 730 exit ;;
712 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 731 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
713 echo c1-convex-bsd 732 echo c1-convex-bsd
714 exit ;; 733 exit ;;
715 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 734 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
716 if getsysinfo -f scalar_acc 735 if getsysinfo -f scalar_acc
717 then echo c32-convex-bsd 736 then echo c32-convex-bsd
718 else echo c2-convex-bsd 737 else echo c2-convex-bsd
719 fi 738 fi
720 exit ;; 739 exit ;;
721 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 740 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
722 echo c34-convex-bsd 741 echo c34-convex-bsd
723 exit ;; 742 exit ;;
724 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 743 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
725 echo c38-convex-bsd 744 echo c38-convex-bsd
726 exit ;; 745 exit ;;
727 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 746 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
728 echo c4-convex-bsd 747 echo c4-convex-bsd
729 exit ;; 748 exit ;;
730 CRAY*Y-MP:*:*:*) 749 CRAY*Y-MP:*:*:*)
731 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 750 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
732 exit ;; 751 exit ;;
733 CRAY*[A-Z]90:*:*:*) 752 CRAY*[A-Z]90:*:*:*)
734 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 753 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
748 *:UNICOS/mp:*:*) 767 *:UNICOS/mp:*:*)
749 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 768 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
750 exit ;; 769 exit ;;
751 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 770 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
752 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 771 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
753 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 772 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 773 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
755 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 774 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
756 exit ;; 775 exit ;;
757 5000:UNIX_System_V:4.*:*) 776 5000:UNIX_System_V:4.*:*)
758 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 777 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
759 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 778 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
760 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 779 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
761 exit ;; 780 exit ;;
762 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 781 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
763 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 782 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
764 exit ;; 783 exit ;;
765 sparc*:BSD/OS:*:*) 784 sparc*:BSD/OS:*:*)
767 exit ;; 786 exit ;;
768 *:BSD/OS:*:*) 787 *:BSD/OS:*:*)
769 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 788 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
770 exit ;; 789 exit ;;
771 *:FreeBSD:*:*) 790 *:FreeBSD:*:*)
772 case ${UNAME_MACHINE} in 791 UNAME_PROCESSOR=`/usr/bin/uname -p`
773 pc98) 792 case ${UNAME_PROCESSOR} in
774 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
775 amd64) 793 amd64)
776 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 794 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
777 *) 795 *)
778 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 796 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
779 esac 797 esac
780 exit ;; 798 exit ;;
781 i*:CYGWIN*:*) 799 i*:CYGWIN*:*)
782 echo ${UNAME_MACHINE}-pc-cygwin 800 echo ${UNAME_MACHINE}-pc-cygwin
783 exit ;; 801 exit ;;
802 *:MINGW64*:*)
803 echo ${UNAME_MACHINE}-pc-mingw64
804 exit ;;
784 *:MINGW*:*) 805 *:MINGW*:*)
785 echo ${UNAME_MACHINE}-pc-mingw32 806 echo ${UNAME_MACHINE}-pc-mingw32
786 exit ;; 807 exit ;;
808 i*:MSYS*:*)
809 echo ${UNAME_MACHINE}-pc-msys
810 exit ;;
787 i*:windows32*:*) 811 i*:windows32*:*)
788 # uname -m includes "-pc" on this system. 812 # uname -m includes "-pc" on this system.
789 echo ${UNAME_MACHINE}-mingw32 813 echo ${UNAME_MACHINE}-mingw32
790 exit ;; 814 exit ;;
791 i*:PW*:*) 815 i*:PW*:*)
792 echo ${UNAME_MACHINE}-pc-pw32 816 echo ${UNAME_MACHINE}-pc-pw32
793 exit ;; 817 exit ;;
794 x86:Interix*:[3456]*) 818 *:Interix*:*)
795 echo i586-pc-interix${UNAME_RELEASE} 819 case ${UNAME_MACHINE} in
796 exit ;; 820 x86)
797 EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*) 821 echo i586-pc-interix${UNAME_RELEASE}
798 echo x86_64-unknown-interix${UNAME_RELEASE} 822 exit ;;
799 exit ;; 823 authenticamd | genuineintel | EM64T)
824 echo x86_64-unknown-interix${UNAME_RELEASE}
825 exit ;;
826 IA64)
827 echo ia64-unknown-interix${UNAME_RELEASE}
828 exit ;;
829 esac ;;
800 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 830 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
801 echo i${UNAME_MACHINE}-pc-mks 831 echo i${UNAME_MACHINE}-pc-mks
832 exit ;;
833 8664:Windows_NT:*)
834 echo x86_64-pc-mks
802 exit ;; 835 exit ;;
803 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 836 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
804 # How do we know it's Interix rather than the generic POSIX subsystem? 837 # How do we know it's Interix rather than the generic POSIX subsystem?
805 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 838 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
806 # UNAME_MACHINE based on the output of uname instead of i386? 839 # UNAME_MACHINE based on the output of uname instead of i386?
827 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 860 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
828 exit ;; 861 exit ;;
829 i*86:Minix:*:*) 862 i*86:Minix:*:*)
830 echo ${UNAME_MACHINE}-pc-minix 863 echo ${UNAME_MACHINE}-pc-minix
831 exit ;; 864 exit ;;
832 arm*:Linux:*:*) 865 aarch64:Linux:*:*)
833 echo ${UNAME_MACHINE}-unknown-linux-gnu 866 echo ${UNAME_MACHINE}-unknown-linux-gnu
834 exit ;; 867 exit ;;
835 avr32*:Linux:*:*) 868 aarch64_be:Linux:*:*)
869 UNAME_MACHINE=aarch64_be
836 echo ${UNAME_MACHINE}-unknown-linux-gnu 870 echo ${UNAME_MACHINE}-unknown-linux-gnu
837 exit ;;
838 cris:Linux:*:*)
839 echo cris-axis-linux-gnu
840 exit ;;
841 crisv32:Linux:*:*)
842 echo crisv32-axis-linux-gnu
843 exit ;;
844 frv:Linux:*:*)
845 echo frv-unknown-linux-gnu
846 exit ;;
847 ia64:Linux:*:*)
848 echo ${UNAME_MACHINE}-unknown-linux-gnu
849 exit ;;
850 m32r*:Linux:*:*)
851 echo ${UNAME_MACHINE}-unknown-linux-gnu
852 exit ;;
853 m68*:Linux:*:*)
854 echo ${UNAME_MACHINE}-unknown-linux-gnu
855 exit ;;
856 mips:Linux:*:*)
857 eval $set_cc_for_build
858 sed 's/^ //' << EOF >$dummy.c
859 #undef CPU
860 #undef mips
861 #undef mipsel
862 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
863 CPU=mipsel
864 #else
865 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
866 CPU=mips
867 #else
868 CPU=
869 #endif
870 #endif
871 EOF
872 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
873 /^CPU/{
874 s: ::g
875 p
876 }'`"
877 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
878 ;;
879 mips64:Linux:*:*)
880 eval $set_cc_for_build
881 sed 's/^ //' << EOF >$dummy.c
882 #undef CPU
883 #undef mips64
884 #undef mips64el
885 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
886 CPU=mips64el
887 #else
888 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
889 CPU=mips64
890 #else
891 CPU=
892 #endif
893 #endif
894 EOF
895 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
896 /^CPU/{
897 s: ::g
898 p
899 }'`"
900 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
901 ;;
902 or32:Linux:*:*)
903 echo or32-unknown-linux-gnu
904 exit ;;
905 ppc:Linux:*:*)
906 echo powerpc-unknown-linux-gnu
907 exit ;;
908 ppc64:Linux:*:*)
909 echo powerpc64-unknown-linux-gnu
910 exit ;; 871 exit ;;
911 alpha:Linux:*:*) 872 alpha:Linux:*:*)
912 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 873 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
913 EV5) UNAME_MACHINE=alphaev5 ;; 874 EV5) UNAME_MACHINE=alphaev5 ;;
914 EV56) UNAME_MACHINE=alphaev56 ;; 875 EV56) UNAME_MACHINE=alphaev56 ;;
915 PCA56) UNAME_MACHINE=alphapca56 ;; 876 PCA56) UNAME_MACHINE=alphapca56 ;;
916 PCA57) UNAME_MACHINE=alphapca56 ;; 877 PCA57) UNAME_MACHINE=alphapca56 ;;
917 EV6) UNAME_MACHINE=alphaev6 ;; 878 EV6) UNAME_MACHINE=alphaev6 ;;
918 EV67) UNAME_MACHINE=alphaev67 ;; 879 EV67) UNAME_MACHINE=alphaev67 ;;
919 EV68*) UNAME_MACHINE=alphaev68 ;; 880 EV68*) UNAME_MACHINE=alphaev68 ;;
920 esac 881 esac
921 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 882 objdump --private-headers /bin/sh | grep -q ld.so.1
922 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 883 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
923 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 884 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
885 exit ;;
886 arc:Linux:*:* | arceb:Linux:*:*)
887 echo ${UNAME_MACHINE}-unknown-linux-gnu
888 exit ;;
889 arm*:Linux:*:*)
890 eval $set_cc_for_build
891 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
892 | grep -q __ARM_EABI__
893 then
894 echo ${UNAME_MACHINE}-unknown-linux-gnu
895 else
896 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
897 | grep -q __ARM_PCS_VFP
898 then
899 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
900 else
901 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
902 fi
903 fi
904 exit ;;
905 avr32*:Linux:*:*)
906 echo ${UNAME_MACHINE}-unknown-linux-gnu
907 exit ;;
908 cris:Linux:*:*)
909 echo ${UNAME_MACHINE}-axis-linux-gnu
910 exit ;;
911 crisv32:Linux:*:*)
912 echo ${UNAME_MACHINE}-axis-linux-gnu
913 exit ;;
914 frv:Linux:*:*)
915 echo ${UNAME_MACHINE}-unknown-linux-gnu
916 exit ;;
917 hexagon:Linux:*:*)
918 echo ${UNAME_MACHINE}-unknown-linux-gnu
919 exit ;;
920 i*86:Linux:*:*)
921 LIBC=gnu
922 eval $set_cc_for_build
923 sed 's/^ //' << EOF >$dummy.c
924 #ifdef __dietlibc__
925 LIBC=dietlibc
926 #endif
927 #else
928 #include <features.h>
929 #ifdef __UCLIBC__
930 LIBC=uclibc
931 #endif
932 EOF
933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
934 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
935 exit ;;
936 ia64:Linux:*:*)
937 echo ${UNAME_MACHINE}-unknown-linux-gnu
938 exit ;;
939 m32r*:Linux:*:*)
940 echo ${UNAME_MACHINE}-unknown-linux-gnu
941 exit ;;
942 m68*:Linux:*:*)
943 echo ${UNAME_MACHINE}-unknown-linux-gnu
944 exit ;;
945 mips:Linux:*:* | mips64:Linux:*:*)
946 eval $set_cc_for_build
947 sed 's/^ //' << EOF >$dummy.c
948 #undef CPU
949 #undef ${UNAME_MACHINE}
950 #undef ${UNAME_MACHINE}el
951 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
952 CPU=${UNAME_MACHINE}el
953 #else
954 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
955 CPU=${UNAME_MACHINE}
956 #else
957 CPU=
958 #endif
959 #endif
960 EOF
961 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
962 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
963 ;;
964 or1k:Linux:*:*)
965 echo ${UNAME_MACHINE}-unknown-linux-gnu
966 exit ;;
967 or32:Linux:*:*)
968 echo ${UNAME_MACHINE}-unknown-linux-gnu
969 exit ;;
970 padre:Linux:*:*)
971 echo sparc-unknown-linux-gnu
972 exit ;;
973 parisc64:Linux:*:* | hppa64:Linux:*:*)
974 echo hppa64-unknown-linux-gnu
924 exit ;; 975 exit ;;
925 parisc:Linux:*:* | hppa:Linux:*:*) 976 parisc:Linux:*:* | hppa:Linux:*:*)
926 # Look for CPU level 977 # Look for CPU level
927 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 978 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
928 PA7*) echo hppa1.1-unknown-linux-gnu ;; 979 PA7*) echo hppa1.1-unknown-linux-gnu ;;
929 PA8*) echo hppa2.0-unknown-linux-gnu ;; 980 PA8*) echo hppa2.0-unknown-linux-gnu ;;
930 *) echo hppa-unknown-linux-gnu ;; 981 *) echo hppa-unknown-linux-gnu ;;
931 esac 982 esac
932 exit ;; 983 exit ;;
933 parisc64:Linux:*:* | hppa64:Linux:*:*) 984 ppc64:Linux:*:*)
934 echo hppa64-unknown-linux-gnu 985 echo powerpc64-unknown-linux-gnu
986 exit ;;
987 ppc:Linux:*:*)
988 echo powerpc-unknown-linux-gnu
935 exit ;; 989 exit ;;
936 s390:Linux:*:* | s390x:Linux:*:*) 990 s390:Linux:*:* | s390x:Linux:*:*)
937 echo ${UNAME_MACHINE}-ibm-linux 991 echo ${UNAME_MACHINE}-ibm-linux
938 exit ;; 992 exit ;;
939 sh64*:Linux:*:*) 993 sh64*:Linux:*:*)
940 echo ${UNAME_MACHINE}-unknown-linux-gnu 994 echo ${UNAME_MACHINE}-unknown-linux-gnu
941 exit ;; 995 exit ;;
942 sh*:Linux:*:*) 996 sh*:Linux:*:*)
943 echo ${UNAME_MACHINE}-unknown-linux-gnu 997 echo ${UNAME_MACHINE}-unknown-linux-gnu
944 exit ;; 998 exit ;;
945 sparc:Linux:*:* | sparc64:Linux:*:*) 999 sparc:Linux:*:* | sparc64:Linux:*:*)
946 echo ${UNAME_MACHINE}-unknown-linux-gnu 1000 echo ${UNAME_MACHINE}-unknown-linux-gnu
947 exit ;; 1001 exit ;;
1002 tile*:Linux:*:*)
1003 echo ${UNAME_MACHINE}-unknown-linux-gnu
1004 exit ;;
948 vax:Linux:*:*) 1005 vax:Linux:*:*)
949 echo ${UNAME_MACHINE}-dec-linux-gnu 1006 echo ${UNAME_MACHINE}-dec-linux-gnu
950 exit ;; 1007 exit ;;
951 x86_64:Linux:*:*) 1008 x86_64:Linux:*:*)
952 echo x86_64-unknown-linux-gnu
953 exit ;;
954 xtensa:Linux:*:*)
955 echo xtensa-unknown-linux-gnu
956 exit ;;
957 i*86:Linux:*:*)
958 # The BFD linker knows what the default object file format is, so
959 # first see if it will tell us. cd to the root directory to prevent
960 # problems with other programs or directories called `ld' in the path.
961 # Set LC_ALL=C to ensure ld outputs messages in English.
962 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
963 | sed -ne '/supported targets:/!d
964 s/[ ][ ]*/ /g
965 s/.*supported targets: *//
966 s/ .*//
967 p'`
968 case "$ld_supported_targets" in
969 elf32-i386)
970 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
971 ;;
972 a.out-i386-linux)
973 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
974 exit ;;
975 coff-i386)
976 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
977 exit ;;
978 "")
979 # Either a pre-BFD a.out linker (linux-gnuoldld) or
980 # one that does not give us useful --help.
981 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
982 exit ;;
983 esac
984 # Determine whether the default compiler is a.out or elf
985 eval $set_cc_for_build
986 sed 's/^ //' << EOF >$dummy.c
987 #include <features.h>
988 #ifdef __ELF__
989 # ifdef __GLIBC__
990 # if __GLIBC__ >= 2
991 LIBC=gnu 1009 LIBC=gnu
992 # else 1010 test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc
993 LIBC=gnulibc1 1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
994 # endif 1012 exit ;;
995 # else 1013 xtensa*:Linux:*:*)
996 LIBC=gnulibc1 1014 echo ${UNAME_MACHINE}-unknown-linux-gnu
997 # endif 1015 exit ;;
998 #else
999 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1000 LIBC=gnu
1001 #else
1002 LIBC=gnuaout
1003 #endif
1004 #endif
1005 #ifdef __dietlibc__
1006 LIBC=dietlibc
1007 #endif
1008 EOF
1009 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1010 /^LIBC/{
1011 s: ::g
1012 p
1013 }'`"
1014 test x"${LIBC}" != x && {
1015 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1016 exit
1017 }
1018 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1019 ;;
1020 i*86:DYNIX/ptx:4*:*) 1016 i*86:DYNIX/ptx:4*:*)
1021 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1017 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1022 # earlier versions are messed up and put the nodename in both 1018 # earlier versions are messed up and put the nodename in both
1023 # sysname and nodename. 1019 # sysname and nodename.
1024 echo i386-sequent-sysv4 1020 echo i386-sequent-sysv4
1025 exit ;; 1021 exit ;;
1026 i*86:UNIX_SV:4.2MP:2.*) 1022 i*86:UNIX_SV:4.2MP:2.*)
1027 # Unixware is an offshoot of SVR4, but it has its own version 1023 # Unixware is an offshoot of SVR4, but it has its own version
1028 # number series starting with 2... 1024 # number series starting with 2...
1029 # I am not positive that other SVR4 systems won't match this, 1025 # I am not positive that other SVR4 systems won't match this,
1030 # I just have to hope. -- rms. 1026 # I just have to hope. -- rms.
1031 # Use sysv4.2uw... so that sysv4* matches it. 1027 # Use sysv4.2uw... so that sysv4* matches it.
1032 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1028 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1033 exit ;; 1029 exit ;;
1034 i*86:OS/2:*:*) 1030 i*86:OS/2:*:*)
1035 # If we were able to find `uname', then EMX Unix compatibility 1031 # If we were able to find `uname', then EMX Unix compatibility
1036 # is probably installed. 1032 # is probably installed.
1043 echo ${UNAME_MACHINE}-unknown-atheos 1039 echo ${UNAME_MACHINE}-unknown-atheos
1044 exit ;; 1040 exit ;;
1045 i*86:syllable:*:*) 1041 i*86:syllable:*:*)
1046 echo ${UNAME_MACHINE}-pc-syllable 1042 echo ${UNAME_MACHINE}-pc-syllable
1047 exit ;; 1043 exit ;;
1048 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1044 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1049 echo i386-unknown-lynxos${UNAME_RELEASE} 1045 echo i386-unknown-lynxos${UNAME_RELEASE}
1050 exit ;; 1046 exit ;;
1051 i*86:*DOS:*:*) 1047 i*86:*DOS:*:*)
1052 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1048 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1053 exit ;; 1049 exit ;;
1058 else 1054 else
1059 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1055 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1060 fi 1056 fi
1061 exit ;; 1057 exit ;;
1062 i*86:*:5:[678]*) 1058 i*86:*:5:[678]*)
1063 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1059 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1064 case `/bin/uname -X | grep "^Machine"` in 1060 case `/bin/uname -X | grep "^Machine"` in
1065 *486*) UNAME_MACHINE=i486 ;; 1061 *486*) UNAME_MACHINE=i486 ;;
1066 *Pentium) UNAME_MACHINE=i586 ;; 1062 *Pentium) UNAME_MACHINE=i586 ;;
1067 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1063 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1068 esac 1064 esac
1086 echo ${UNAME_MACHINE}-pc-sysv32 1082 echo ${UNAME_MACHINE}-pc-sysv32
1087 fi 1083 fi
1088 exit ;; 1084 exit ;;
1089 pc:*:*:*) 1085 pc:*:*:*)
1090 # Left here for compatibility: 1086 # Left here for compatibility:
1091 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1087 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1092 # the processor, so we play safe by assuming i386. 1088 # the processor, so we play safe by assuming i586.
1093 echo i386-pc-msdosdjgpp 1089 # Note: whatever this is, it MUST be the same as what config.sub
1094 exit ;; 1090 # prints for the "djgpp" host, or else GDB configury will decide that
1091 # this is a cross-build.
1092 echo i586-pc-msdosdjgpp
1093 exit ;;
1095 Intel:Mach:3*:*) 1094 Intel:Mach:3*:*)
1096 echo i386-pc-mach3 1095 echo i386-pc-mach3
1097 exit ;; 1096 exit ;;
1098 paragon:*:*:*) 1097 paragon:*:*:*)
1099 echo i860-intel-osf1 1098 echo i860-intel-osf1
1124 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1123 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1125 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1124 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1126 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1125 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1127 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1126 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1128 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1127 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1129 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1128 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1130 && { echo i486-ncr-sysv4; exit; } ;; 1129 && { echo i486-ncr-sysv4; exit; } ;;
1130 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1131 OS_REL='.3'
1132 test -r /etc/.relid \
1133 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1134 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1135 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1136 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1137 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1138 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1139 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1131 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1140 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1132 echo m68k-unknown-lynxos${UNAME_RELEASE} 1141 echo m68k-unknown-lynxos${UNAME_RELEASE}
1133 exit ;; 1142 exit ;;
1134 mc68030:UNIX_System_V:4.*:*) 1143 mc68030:UNIX_System_V:4.*:*)
1135 echo m68k-atari-sysv4 1144 echo m68k-atari-sysv4
1138 echo sparc-unknown-lynxos${UNAME_RELEASE} 1147 echo sparc-unknown-lynxos${UNAME_RELEASE}
1139 exit ;; 1148 exit ;;
1140 rs6000:LynxOS:2.*:*) 1149 rs6000:LynxOS:2.*:*)
1141 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1150 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1142 exit ;; 1151 exit ;;
1143 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1152 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1144 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1153 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1145 exit ;; 1154 exit ;;
1146 SM[BE]S:UNIX_SV:*:*) 1155 SM[BE]S:UNIX_SV:*:*)
1147 echo mips-dde-sysv${UNAME_RELEASE} 1156 echo mips-dde-sysv${UNAME_RELEASE}
1148 exit ;; 1157 exit ;;
1158 echo ${UNAME_MACHINE}-sni-sysv4 1167 echo ${UNAME_MACHINE}-sni-sysv4
1159 else 1168 else
1160 echo ns32k-sni-sysv 1169 echo ns32k-sni-sysv
1161 fi 1170 fi
1162 exit ;; 1171 exit ;;
1163 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1172 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1164 # says <[email protected]> 1173 # says <[email protected]>
1165 echo i586-unisys-sysv4 1174 echo i586-unisys-sysv4
1166 exit ;; 1175 exit ;;
1167 *:UNIX_System_V:4*:FTX*) 1176 *:UNIX_System_V:4*:FTX*)
1168 # From Gerald Hewes <[email protected]>. 1177 # From Gerald Hewes <[email protected]>.
1169 # How about differentiating between stratus architectures? -djm 1178 # How about differentiating between stratus architectures? -djm
1170 echo hppa1.1-stratus-sysv4 1179 echo hppa1.1-stratus-sysv4
1171 exit ;; 1180 exit ;;
1187 news*:NEWS-OS:6*:*) 1196 news*:NEWS-OS:6*:*)
1188 echo mips-sony-newsos6 1197 echo mips-sony-newsos6
1189 exit ;; 1198 exit ;;
1190 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1199 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1191 if [ -d /usr/nec ]; then 1200 if [ -d /usr/nec ]; then
1192 echo mips-nec-sysv${UNAME_RELEASE} 1201 echo mips-nec-sysv${UNAME_RELEASE}
1193 else 1202 else
1194 echo mips-unknown-sysv${UNAME_RELEASE} 1203 echo mips-unknown-sysv${UNAME_RELEASE}
1195 fi 1204 fi
1196 exit ;; 1205 exit ;;
1197 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1206 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1198 echo powerpc-be-beos 1207 echo powerpc-be-beos
1199 exit ;; 1208 exit ;;
1200 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1209 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1201 echo powerpc-apple-beos 1210 echo powerpc-apple-beos
1202 exit ;; 1211 exit ;;
1203 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1212 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1204 echo i586-pc-beos 1213 echo i586-pc-beos
1214 exit ;;
1215 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1216 echo i586-pc-haiku
1217 exit ;;
1218 x86_64:Haiku:*:*)
1219 echo x86_64-unknown-haiku
1205 exit ;; 1220 exit ;;
1206 SX-4:SUPER-UX:*:*) 1221 SX-4:SUPER-UX:*:*)
1207 echo sx4-nec-superux${UNAME_RELEASE} 1222 echo sx4-nec-superux${UNAME_RELEASE}
1208 exit ;; 1223 exit ;;
1209 SX-5:SUPER-UX:*:*) 1224 SX-5:SUPER-UX:*:*)
1228 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1243 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1229 exit ;; 1244 exit ;;
1230 *:Darwin:*:*) 1245 *:Darwin:*:*)
1231 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1246 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1232 case $UNAME_PROCESSOR in 1247 case $UNAME_PROCESSOR in
1248 i386)
1249 eval $set_cc_for_build
1250 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1251 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1252 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1253 grep IS_64BIT_ARCH >/dev/null
1254 then
1255 UNAME_PROCESSOR="x86_64"
1256 fi
1257 fi ;;
1233 unknown) UNAME_PROCESSOR=powerpc ;; 1258 unknown) UNAME_PROCESSOR=powerpc ;;
1234 esac 1259 esac
1235 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1260 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1236 exit ;; 1261 exit ;;
1237 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1262 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1243 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1268 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1244 exit ;; 1269 exit ;;
1245 *:QNX:*:4*) 1270 *:QNX:*:4*)
1246 echo i386-pc-qnx 1271 echo i386-pc-qnx
1247 exit ;; 1272 exit ;;
1248 NSE-?:NONSTOP_KERNEL:*:*) 1273 NEO-?:NONSTOP_KERNEL:*:*)
1274 echo neo-tandem-nsk${UNAME_RELEASE}
1275 exit ;;
1276 NSE-*:NONSTOP_KERNEL:*:*)
1249 echo nse-tandem-nsk${UNAME_RELEASE} 1277 echo nse-tandem-nsk${UNAME_RELEASE}
1250 exit ;; 1278 exit ;;
1251 NSR-?:NONSTOP_KERNEL:*:*) 1279 NSR-?:NONSTOP_KERNEL:*:*)
1252 echo nsr-tandem-nsk${UNAME_RELEASE} 1280 echo nsr-tandem-nsk${UNAME_RELEASE}
1253 exit ;; 1281 exit ;;
1288 exit ;; 1316 exit ;;
1289 *:ITS:*:*) 1317 *:ITS:*:*)
1290 echo pdp10-unknown-its 1318 echo pdp10-unknown-its
1291 exit ;; 1319 exit ;;
1292 SEI:*:*:SEIUX) 1320 SEI:*:*:SEIUX)
1293 echo mips-sei-seiux${UNAME_RELEASE} 1321 echo mips-sei-seiux${UNAME_RELEASE}
1294 exit ;; 1322 exit ;;
1295 *:DragonFly:*:*) 1323 *:DragonFly:*:*)
1296 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1324 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1297 exit ;; 1325 exit ;;
1298 *:*VMS:*:*) 1326 *:*VMS:*:*)
1299 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1327 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1300 case "${UNAME_MACHINE}" in 1328 case "${UNAME_MACHINE}" in
1301 A*) echo alpha-dec-vms ; exit ;; 1329 A*) echo alpha-dec-vms ; exit ;;
1302 I*) echo ia64-dec-vms ; exit ;; 1330 I*) echo ia64-dec-vms ; exit ;;
1303 V*) echo vax-dec-vms ; exit ;; 1331 V*) echo vax-dec-vms ; exit ;;
1304 esac ;; 1332 esac ;;
1309 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1337 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1310 exit ;; 1338 exit ;;
1311 i*86:rdos:*:*) 1339 i*86:rdos:*:*)
1312 echo ${UNAME_MACHINE}-pc-rdos 1340 echo ${UNAME_MACHINE}-pc-rdos
1313 exit ;; 1341 exit ;;
1342 i*86:AROS:*:*)
1343 echo ${UNAME_MACHINE}-pc-aros
1344 exit ;;
1345 x86_64:VMkernel:*:*)
1346 echo ${UNAME_MACHINE}-unknown-esx
1347 exit ;;
1314 esac 1348 esac
1315
1316 #echo '(No uname command or uname output not recognized.)' 1>&2
1317 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1318 1349
1319 eval $set_cc_for_build 1350 eval $set_cc_for_build
1320 cat >$dummy.c <<EOF 1351 cat >$dummy.c <<EOF
1321 #ifdef _SEQUENT_ 1352 #ifdef _SEQUENT_
1322 # include <sys/types.h> 1353 # include <sys/types.h>
1331 printf ("mips-sony-bsd\n"); exit (0); 1362 printf ("mips-sony-bsd\n"); exit (0);
1332 #else 1363 #else
1333 #include <sys/param.h> 1364 #include <sys/param.h>
1334 printf ("m68k-sony-newsos%s\n", 1365 printf ("m68k-sony-newsos%s\n",
1335 #ifdef NEWSOS4 1366 #ifdef NEWSOS4
1336 "4" 1367 "4"
1337 #else 1368 #else
1338 "" 1369 ""
1339 #endif 1370 #endif
1340 ); exit (0); 1371 ); exit (0);
1341 #endif 1372 #endif
1342 #endif 1373 #endif
1343 1374
1344 #if defined (__arm) && defined (__acorn) && defined (__unix) 1375 #if defined (__arm) && defined (__acorn) && defined (__unix)
1345 printf ("arm-acorn-riscix\n"); exit (0); 1376 printf ("arm-acorn-riscix\n"); exit (0);
1469 1500
1470 This script, last modified $timestamp, has failed to recognize 1501 This script, last modified $timestamp, has failed to recognize
1471 the operating system you are using. It is advised that you 1502 the operating system you are using. It is advised that you
1472 download the most up to date version of the config scripts from 1503 download the most up to date version of the config scripts from
1473 1504
1474 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 1505 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1475 and 1506 and
1476 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 1507 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1477 1508
1478 If the version you run ($0) is already up to date, please 1509 If the version you run ($0) is already up to date, please
1479 send the following data and any information you think might be 1510 send the following data and any information you think might be
1480 pertinent to <[email protected]> in order to provide the needed 1511 pertinent to <[email protected]> in order to provide the needed
1481 information to handle your system. 1512 information to handle your system.