ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/config.guess
(Generate patch)

Comparing rxvt-unicode/config.guess (file contents):
Revision 1.1 by ayin, Tue Jan 17 12:19:46 2006 UTC vs.
Revision 1.7 by root, Thu May 22 18:54:32 2014 UTC

1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011 Free Software Foundation, Inc.
5 6
6timestamp='2005-08-03' 7timestamp='2011-11-11'
7 8
8# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or 11# the Free Software Foundation; either version 3 of the License, or
11# (at your option) any later version. 12# (at your option) any later version.
12# 13#
13# This program is distributed in the hope that it will be useful, but 14# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of 15# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24# distribute this file as part of a program that contains a 25# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under 26# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program. 27# the same distribution terms that you use for the rest of that program.
27 28
28 29
29# Originally written by Per Bothner <per@bothner.com>. 30# Originally written by Per Bothner. Please send patches (context
30# Please send patches to <config-patches@gnu.org>. Submit a context 31# diff format) to <config-patches@gnu.org> and include a ChangeLog
31# diff and a properly formatted ChangeLog entry. 32# entry.
32# 33#
33# This script attempts to guess a canonical system name similar to 34# This script attempts to guess a canonical system name similar to
34# config.sub. If it succeeds, it prints the system name on stdout, and 35# config.sub. If it succeeds, it prints the system name on stdout, and
35# exits with 0. Otherwise, it exits with 1. 36# exits with 0. Otherwise, it exits with 1.
36# 37#
37# The plan is that this can be called by configure scripts if you 38# You can get the latest version of this script from:
38# don't specify an explicit build system type. 39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
39 40
40me=`echo "$0" | sed -e 's,.*/,,'` 41me=`echo "$0" | sed -e 's,.*/,,'`
41 42
42usage="\ 43usage="\
43Usage: $0 [OPTION] 44Usage: $0 [OPTION]
53 54
54version="\ 55version="\
55GNU config.guess ($timestamp) 56GNU config.guess ($timestamp)
56 57
57Originally written by Per Bothner. 58Originally written by Per Bothner.
58Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
59Free Software Foundation, Inc. 61Software Foundation, Inc.
60 62
61This is free software; see the source for copying conditions. There is NO 63This is free software; see the source for copying conditions. There is NO
62warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63 65
64help=" 66help="
104 106
105set_cc_for_build=' 107set_cc_for_build='
106trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108: ${TMPDIR=/tmp} ; 110: ${TMPDIR=/tmp} ;
109 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113dummy=$tmp/dummy ; 115dummy=$tmp/dummy ;
114tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 116tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
158 case "${UNAME_MACHINE_ARCH}" in 160 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;; 161 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;; 162 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;; 163 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;; 164 sh3eb) machine=sh-unknown ;;
165 sh5el) machine=sh5le-unknown ;;
163 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
164 esac 167 esac
165 # The Operating System including object format, if it has switched 168 # The Operating System including object format, if it has switched
166 # to ELF recently, or will in the future. 169 # to ELF recently, or will in the future.
167 case "${UNAME_MACHINE_ARCH}" in 170 case "${UNAME_MACHINE_ARCH}" in
168 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 171 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
169 eval $set_cc_for_build 172 eval $set_cc_for_build
170 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 173 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
171 | grep __ELF__ >/dev/null 174 | grep -q __ELF__
172 then 175 then
173 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 176 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
174 # Return netbsd for either. FIX? 177 # Return netbsd for either. FIX?
175 os=netbsd 178 os=netbsd
176 else 179 else
177 os=netbsdelf 180 os=netbsdelf
178 fi 181 fi
179 ;; 182 ;;
180 *) 183 *)
181 os=netbsd 184 os=netbsd
182 ;; 185 ;;
183 esac 186 esac
184 # The OS release 187 # The OS release
185 # Debian GNU/NetBSD machines have a different userland, and 188 # Debian GNU/NetBSD machines have a different userland, and
186 # thus, need a distinct triplet. However, they do not need 189 # thus, need a distinct triplet. However, they do not need
204 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
205 exit ;; 208 exit ;;
206 *:ekkoBSD:*:*) 209 *:ekkoBSD:*:*)
207 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 210 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208 exit ;; 211 exit ;;
212 *:SolidBSD:*:*)
213 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214 exit ;;
209 macppc:MirBSD:*:*) 215 macppc:MirBSD:*:*)
210 echo powerppc-unknown-mirbsd${UNAME_RELEASE} 216 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
211 exit ;; 217 exit ;;
212 *:MirBSD:*:*) 218 *:MirBSD:*:*)
213 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 219 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
214 exit ;; 220 exit ;;
215 alpha:OSF1:*:*) 221 alpha:OSF1:*:*)
216 case $UNAME_RELEASE in 222 case $UNAME_RELEASE in
217 *4.0) 223 *4.0)
218 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
219 ;; 225 ;;
220 *5.*) 226 *5.*)
221 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
222 ;; 228 ;;
223 esac 229 esac
224 # According to Compaq, /usr/sbin/psrinfo has been available on 230 # According to Compaq, /usr/sbin/psrinfo has been available on
225 # OSF/1 and Tru64 systems produced since 1995. I hope that 231 # OSF/1 and Tru64 systems produced since 1995. I hope that
226 # covers most systems running today. This code pipes the CPU 232 # covers most systems running today. This code pipes the CPU
262 # A Vn.n version is a released version. 268 # A Vn.n version is a released version.
263 # A Tn.n version is a released field test version. 269 # A Tn.n version is a released field test version.
264 # A Xn.n version is an unreleased experimental baselevel. 270 # A Xn.n version is an unreleased experimental baselevel.
265 # 1.2 uses "1.2" for uname -r. 271 # 1.2 uses "1.2" for uname -r.
266 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
267 exit ;; 273 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
274 exitcode=$?
275 trap '' 0
276 exit $exitcode ;;
268 Alpha\ *:Windows_NT*:*) 277 Alpha\ *:Windows_NT*:*)
269 # How do we know it's Interix rather than the generic POSIX subsystem? 278 # How do we know it's Interix rather than the generic POSIX subsystem?
270 # Should we change UNAME_MACHINE based on the output of uname instead 279 # Should we change UNAME_MACHINE based on the output of uname instead
271 # of the specific Alpha model? 280 # of the specific Alpha model?
272 echo alpha-pc-interix 281 echo alpha-pc-interix
288 exit ;; 297 exit ;;
289 *:z/VM:*:*) 298 *:z/VM:*:*)
290 echo s390-ibm-zvmoe 299 echo s390-ibm-zvmoe
291 exit ;; 300 exit ;;
292 *:OS400:*:*) 301 *:OS400:*:*)
293 echo powerpc-ibm-os400 302 echo powerpc-ibm-os400
294 exit ;; 303 exit ;;
295 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 304 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
296 echo arm-acorn-riscix${UNAME_RELEASE} 305 echo arm-acorn-riscix${UNAME_RELEASE}
297 exit ;; 306 exit ;;
298 arm:riscos:*:*|arm:RISCOS:*:*) 307 arm:riscos:*:*|arm:RISCOS:*:*)
317 exit ;; 326 exit ;;
318 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 327 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
319 case `/usr/bin/uname -p` in 328 case `/usr/bin/uname -p` in
320 sparc) echo sparc-icl-nx7; exit ;; 329 sparc) echo sparc-icl-nx7; exit ;;
321 esac ;; 330 esac ;;
331 s390x:SunOS:*:*)
332 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
322 sun4H:SunOS:5.*:*) 334 sun4H:SunOS:5.*:*)
323 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
324 exit ;; 336 exit ;;
325 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 337 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
326 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 338 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
327 exit ;; 339 exit ;;
328 i86pc:SunOS:5.*:*) 340 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
341 echo i386-pc-auroraux${UNAME_RELEASE}
342 exit ;;
343 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
344 eval $set_cc_for_build
345 SUN_ARCH="i386"
346 # If there is a compiler, see if it is configured for 64-bit objects.
347 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
348 # This test works for both compilers.
349 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
350 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
351 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
352 grep IS_64BIT_ARCH >/dev/null
353 then
354 SUN_ARCH="x86_64"
355 fi
356 fi
329 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 357 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;; 358 exit ;;
331 sun4*:SunOS:6*:*) 359 sun4*:SunOS:6*:*)
332 # According to config.sub, this is the proper way to canonicalize 360 # According to config.sub, this is the proper way to canonicalize
333 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 361 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
334 # it's likely to be more like Solaris than SunOS4. 362 # it's likely to be more like Solaris than SunOS4.
368 # to the lowercase version "mint" (or "freemint"). Finally 396 # to the lowercase version "mint" (or "freemint"). Finally
369 # the system name "TOS" denotes a system which is actually not 397 # the system name "TOS" denotes a system which is actually not
370 # MiNT. But MiNT is downward compatible to TOS, so this should 398 # MiNT. But MiNT is downward compatible to TOS, so this should
371 # be no problem. 399 # be no problem.
372 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 400 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
373 echo m68k-atari-mint${UNAME_RELEASE} 401 echo m68k-atari-mint${UNAME_RELEASE}
374 exit ;; 402 exit ;;
375 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 403 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
376 echo m68k-atari-mint${UNAME_RELEASE} 404 echo m68k-atari-mint${UNAME_RELEASE}
377 exit ;; 405 exit ;;
378 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 406 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
379 echo m68k-atari-mint${UNAME_RELEASE} 407 echo m68k-atari-mint${UNAME_RELEASE}
380 exit ;; 408 exit ;;
381 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 409 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
382 echo m68k-milan-mint${UNAME_RELEASE} 410 echo m68k-milan-mint${UNAME_RELEASE}
383 exit ;; 411 exit ;;
384 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 412 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
385 echo m68k-hades-mint${UNAME_RELEASE} 413 echo m68k-hades-mint${UNAME_RELEASE}
386 exit ;; 414 exit ;;
387 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 415 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
388 echo m68k-unknown-mint${UNAME_RELEASE} 416 echo m68k-unknown-mint${UNAME_RELEASE}
389 exit ;; 417 exit ;;
390 m68k:machten:*:*) 418 m68k:machten:*:*)
391 echo m68k-apple-machten${UNAME_RELEASE} 419 echo m68k-apple-machten${UNAME_RELEASE}
392 exit ;; 420 exit ;;
393 powerpc:machten:*:*) 421 powerpc:machten:*:*)
394 echo powerpc-apple-machten${UNAME_RELEASE} 422 echo powerpc-apple-machten${UNAME_RELEASE}
454 exit ;; 482 exit ;;
455 m88k:*:3*:R3*) 483 m88k:*:3*:R3*)
456 echo m88k-motorola-sysv3 484 echo m88k-motorola-sysv3
457 exit ;; 485 exit ;;
458 AViiON:dgux:*:*) 486 AViiON:dgux:*:*)
459 # DG/UX returns AViiON for all architectures 487 # DG/UX returns AViiON for all architectures
460 UNAME_PROCESSOR=`/usr/bin/uname -p` 488 UNAME_PROCESSOR=`/usr/bin/uname -p`
461 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 489 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
462 then 490 then
463 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 491 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
464 [ ${TARGET_BINARY_INTERFACE}x = x ] 492 [ ${TARGET_BINARY_INTERFACE}x = x ]
465 then 493 then
468 echo m88k-dg-dguxbcs${UNAME_RELEASE} 496 echo m88k-dg-dguxbcs${UNAME_RELEASE}
469 fi 497 fi
470 else 498 else
471 echo i586-dg-dgux${UNAME_RELEASE} 499 echo i586-dg-dgux${UNAME_RELEASE}
472 fi 500 fi
473 exit ;; 501 exit ;;
474 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 502 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
475 echo m88k-dolphin-sysv3 503 echo m88k-dolphin-sysv3
476 exit ;; 504 exit ;;
477 M88*:*:R3*:*) 505 M88*:*:R3*:*)
478 # Delta 88k system running SVR3 506 # Delta 88k system running SVR3
525 echo rs6000-ibm-aix3.2.4 553 echo rs6000-ibm-aix3.2.4
526 else 554 else
527 echo rs6000-ibm-aix3.2 555 echo rs6000-ibm-aix3.2
528 fi 556 fi
529 exit ;; 557 exit ;;
530 *:AIX:*:[45]) 558 *:AIX:*:[4567])
531 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 559 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
532 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 560 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
533 IBM_ARCH=rs6000 561 IBM_ARCH=rs6000
534 else 562 else
535 IBM_ARCH=powerpc 563 IBM_ARCH=powerpc
568 9000/31? ) HP_ARCH=m68000 ;; 596 9000/31? ) HP_ARCH=m68000 ;;
569 9000/[34]?? ) HP_ARCH=m68k ;; 597 9000/[34]?? ) HP_ARCH=m68k ;;
570 9000/[678][0-9][0-9]) 598 9000/[678][0-9][0-9])
571 if [ -x /usr/bin/getconf ]; then 599 if [ -x /usr/bin/getconf ]; then
572 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 600 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
573 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 601 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
574 case "${sc_cpu_version}" in 602 case "${sc_cpu_version}" in
575 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 603 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
576 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 604 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
577 532) # CPU_PA_RISC2_0 605 532) # CPU_PA_RISC2_0
578 case "${sc_kernel_bits}" in 606 case "${sc_kernel_bits}" in
579 32) HP_ARCH="hppa2.0n" ;; 607 32) HP_ARCH="hppa2.0n" ;;
580 64) HP_ARCH="hppa2.0w" ;; 608 64) HP_ARCH="hppa2.0w" ;;
581 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 609 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
582 esac ;; 610 esac ;;
583 esac 611 esac
584 fi 612 fi
585 if [ "${HP_ARCH}" = "" ]; then 613 if [ "${HP_ARCH}" = "" ]; then
586 eval $set_cc_for_build 614 eval $set_cc_for_build
587 sed 's/^ //' << EOF >$dummy.c 615 sed 's/^ //' << EOF >$dummy.c
588 616
589 #define _HPUX_SOURCE 617 #define _HPUX_SOURCE
590 #include <stdlib.h> 618 #include <stdlib.h>
591 #include <unistd.h> 619 #include <unistd.h>
592 620
593 int main () 621 int main ()
594 { 622 {
595 #if defined(_SC_KERNEL_BITS) 623 #if defined(_SC_KERNEL_BITS)
596 long bits = sysconf(_SC_KERNEL_BITS); 624 long bits = sysconf(_SC_KERNEL_BITS);
597 #endif 625 #endif
598 long cpu = sysconf (_SC_CPU_VERSION); 626 long cpu = sysconf (_SC_CPU_VERSION);
599 627
600 switch (cpu) 628 switch (cpu)
601 { 629 {
602 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 630 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
603 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 631 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
604 case CPU_PA_RISC2_0: 632 case CPU_PA_RISC2_0:
605 #if defined(_SC_KERNEL_BITS) 633 #if defined(_SC_KERNEL_BITS)
606 switch (bits) 634 switch (bits)
607 { 635 {
608 case 64: puts ("hppa2.0w"); break; 636 case 64: puts ("hppa2.0w"); break;
609 case 32: puts ("hppa2.0n"); break; 637 case 32: puts ("hppa2.0n"); break;
610 default: puts ("hppa2.0"); break; 638 default: puts ("hppa2.0"); break;
611 } break; 639 } break;
612 #else /* !defined(_SC_KERNEL_BITS) */ 640 #else /* !defined(_SC_KERNEL_BITS) */
613 puts ("hppa2.0"); break; 641 puts ("hppa2.0"); break;
614 #endif 642 #endif
615 default: puts ("hppa1.0"); break; 643 default: puts ("hppa1.0"); break;
616 } 644 }
617 exit (0); 645 exit (0);
618 } 646 }
619EOF 647EOF
620 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 648 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
621 test -z "$HP_ARCH" && HP_ARCH=hppa 649 test -z "$HP_ARCH" && HP_ARCH=hppa
622 fi ;; 650 fi ;;
623 esac 651 esac
633 # => hppa2.0w-hp-hpux11.23 661 # => hppa2.0w-hp-hpux11.23
634 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 662 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
635 # => hppa64-hp-hpux11.23 663 # => hppa64-hp-hpux11.23
636 664
637 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 665 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
638 grep __LP64__ >/dev/null 666 grep -q __LP64__
639 then 667 then
640 HP_ARCH="hppa2.0w" 668 HP_ARCH="hppa2.0w"
641 else 669 else
642 HP_ARCH="hppa64" 670 HP_ARCH="hppa64"
643 fi 671 fi
704 parisc*:Lites*:*:*) 732 parisc*:Lites*:*:*)
705 echo hppa1.1-hp-lites 733 echo hppa1.1-hp-lites
706 exit ;; 734 exit ;;
707 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 735 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
708 echo c1-convex-bsd 736 echo c1-convex-bsd
709 exit ;; 737 exit ;;
710 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 738 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
711 if getsysinfo -f scalar_acc 739 if getsysinfo -f scalar_acc
712 then echo c32-convex-bsd 740 then echo c32-convex-bsd
713 else echo c2-convex-bsd 741 else echo c2-convex-bsd
714 fi 742 fi
715 exit ;; 743 exit ;;
716 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 744 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
717 echo c34-convex-bsd 745 echo c34-convex-bsd
718 exit ;; 746 exit ;;
719 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 747 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
720 echo c38-convex-bsd 748 echo c38-convex-bsd
721 exit ;; 749 exit ;;
722 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 750 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
723 echo c4-convex-bsd 751 echo c4-convex-bsd
724 exit ;; 752 exit ;;
725 CRAY*Y-MP:*:*:*) 753 CRAY*Y-MP:*:*:*)
726 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 754 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
727 exit ;; 755 exit ;;
728 CRAY*[A-Z]90:*:*:*) 756 CRAY*[A-Z]90:*:*:*)
729 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 757 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
743 *:UNICOS/mp:*:*) 771 *:UNICOS/mp:*:*)
744 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 772 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
745 exit ;; 773 exit ;;
746 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 774 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
747 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 775 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
748 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 776 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
749 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 777 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
750 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 778 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
751 exit ;; 779 exit ;;
752 5000:UNIX_System_V:4.*:*) 780 5000:UNIX_System_V:4.*:*)
753 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 781 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 782 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
755 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 783 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
756 exit ;; 784 exit ;;
757 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 785 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
758 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 786 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
759 exit ;; 787 exit ;;
760 sparc*:BSD/OS:*:*) 788 sparc*:BSD/OS:*:*)
762 exit ;; 790 exit ;;
763 *:BSD/OS:*:*) 791 *:BSD/OS:*:*)
764 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 792 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
765 exit ;; 793 exit ;;
766 *:FreeBSD:*:*) 794 *:FreeBSD:*:*)
795 UNAME_PROCESSOR=`/usr/bin/uname -p`
796 case ${UNAME_PROCESSOR} in
797 amd64)
798 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799 *)
767 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 800 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
801 esac
768 exit ;; 802 exit ;;
769 i*:CYGWIN*:*) 803 i*:CYGWIN*:*)
770 echo ${UNAME_MACHINE}-pc-cygwin 804 echo ${UNAME_MACHINE}-pc-cygwin
771 exit ;; 805 exit ;;
772 i*:MINGW*:*) 806 *:MINGW*:*)
773 echo ${UNAME_MACHINE}-pc-mingw32 807 echo ${UNAME_MACHINE}-pc-mingw32
774 exit ;; 808 exit ;;
809 i*:MSYS*:*)
810 echo ${UNAME_MACHINE}-pc-msys
811 exit ;;
775 i*:windows32*:*) 812 i*:windows32*:*)
776 # uname -m includes "-pc" on this system. 813 # uname -m includes "-pc" on this system.
777 echo ${UNAME_MACHINE}-mingw32 814 echo ${UNAME_MACHINE}-mingw32
778 exit ;; 815 exit ;;
779 i*:PW*:*) 816 i*:PW*:*)
780 echo ${UNAME_MACHINE}-pc-pw32 817 echo ${UNAME_MACHINE}-pc-pw32
781 exit ;; 818 exit ;;
782 x86:Interix*:[34]*) 819 *:Interix*:*)
820 case ${UNAME_MACHINE} in
821 x86)
783 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 822 echo i586-pc-interix${UNAME_RELEASE}
784 exit ;; 823 exit ;;
824 authenticamd | genuineintel | EM64T)
825 echo x86_64-unknown-interix${UNAME_RELEASE}
826 exit ;;
827 IA64)
828 echo ia64-unknown-interix${UNAME_RELEASE}
829 exit ;;
830 esac ;;
785 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 831 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786 echo i${UNAME_MACHINE}-pc-mks 832 echo i${UNAME_MACHINE}-pc-mks
833 exit ;;
834 8664:Windows_NT:*)
835 echo x86_64-pc-mks
787 exit ;; 836 exit ;;
788 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 837 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
789 # How do we know it's Interix rather than the generic POSIX subsystem? 838 # How do we know it's Interix rather than the generic POSIX subsystem?
790 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 839 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
791 # UNAME_MACHINE based on the output of uname instead of i386? 840 # UNAME_MACHINE based on the output of uname instead of i386?
811 # other systems with GNU libc and userland 860 # other systems with GNU libc and userland
812 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 861 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
813 exit ;; 862 exit ;;
814 i*86:Minix:*:*) 863 i*86:Minix:*:*)
815 echo ${UNAME_MACHINE}-pc-minix 864 echo ${UNAME_MACHINE}-pc-minix
816 exit ;;
817 arm*:Linux:*:*)
818 echo ${UNAME_MACHINE}-unknown-linux-gnu
819 exit ;;
820 cris:Linux:*:*)
821 echo cris-axis-linux-gnu
822 exit ;;
823 crisv32:Linux:*:*)
824 echo crisv32-axis-linux-gnu
825 exit ;;
826 frv:Linux:*:*)
827 echo frv-unknown-linux-gnu
828 exit ;;
829 ia64:Linux:*:*)
830 echo ${UNAME_MACHINE}-unknown-linux-gnu
831 exit ;;
832 m32r*:Linux:*:*)
833 echo ${UNAME_MACHINE}-unknown-linux-gnu
834 exit ;;
835 m68*:Linux:*:*)
836 echo ${UNAME_MACHINE}-unknown-linux-gnu
837 exit ;;
838 mips:Linux:*:*)
839 eval $set_cc_for_build
840 sed 's/^ //' << EOF >$dummy.c
841 #undef CPU
842 #undef mips
843 #undef mipsel
844 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
845 CPU=mipsel
846 #else
847 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
848 CPU=mips
849 #else
850 CPU=
851 #endif
852 #endif
853EOF
854 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
856 ;;
857 mips64:Linux:*:*)
858 eval $set_cc_for_build
859 sed 's/^ //' << EOF >$dummy.c
860 #undef CPU
861 #undef mips64
862 #undef mips64el
863 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
864 CPU=mips64el
865 #else
866 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
867 CPU=mips64
868 #else
869 CPU=
870 #endif
871 #endif
872EOF
873 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
874 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
875 ;;
876 or32:Linux:*:*)
877 echo or32-unknown-linux-gnu
878 exit ;;
879 ppc:Linux:*:*)
880 echo powerpc-unknown-linux-gnu
881 exit ;;
882 ppc64:Linux:*:*)
883 echo powerpc64-unknown-linux-gnu
884 exit ;; 865 exit ;;
885 alpha:Linux:*:*) 866 alpha:Linux:*:*)
886 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 867 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
887 EV5) UNAME_MACHINE=alphaev5 ;; 868 EV5) UNAME_MACHINE=alphaev5 ;;
888 EV56) UNAME_MACHINE=alphaev56 ;; 869 EV56) UNAME_MACHINE=alphaev56 ;;
889 PCA56) UNAME_MACHINE=alphapca56 ;; 870 PCA56) UNAME_MACHINE=alphapca56 ;;
890 PCA57) UNAME_MACHINE=alphapca56 ;; 871 PCA57) UNAME_MACHINE=alphapca56 ;;
891 EV6) UNAME_MACHINE=alphaev6 ;; 872 EV6) UNAME_MACHINE=alphaev6 ;;
892 EV67) UNAME_MACHINE=alphaev67 ;; 873 EV67) UNAME_MACHINE=alphaev67 ;;
893 EV68*) UNAME_MACHINE=alphaev68 ;; 874 EV68*) UNAME_MACHINE=alphaev68 ;;
894 esac 875 esac
895 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 876 objdump --private-headers /bin/sh | grep -q ld.so.1
896 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 877 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
897 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 878 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
879 exit ;;
880 arm*:Linux:*:*)
881 eval $set_cc_for_build
882 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
883 | grep -q __ARM_EABI__
884 then
885 echo ${UNAME_MACHINE}-unknown-linux-gnu
886 else
887 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
888 | grep -q __ARM_PCS_VFP
889 then
890 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
891 else
892 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
893 fi
894 fi
895 exit ;;
896 avr32*:Linux:*:*)
897 echo ${UNAME_MACHINE}-unknown-linux-gnu
898 exit ;;
899 cris:Linux:*:*)
900 echo cris-axis-linux-gnu
901 exit ;;
902 crisv32:Linux:*:*)
903 echo crisv32-axis-linux-gnu
904 exit ;;
905 frv:Linux:*:*)
906 echo frv-unknown-linux-gnu
907 exit ;;
908 hexagon:Linux:*:*)
909 echo hexagon-unknown-linux-gnu
910 exit ;;
911 i*86:Linux:*:*)
912 LIBC=gnu
913 eval $set_cc_for_build
914 sed 's/^ //' << EOF >$dummy.c
915 #ifdef __dietlibc__
916 LIBC=dietlibc
917 #endif
918EOF
919 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
920 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
921 exit ;;
922 ia64:Linux:*:*)
923 echo ${UNAME_MACHINE}-unknown-linux-gnu
924 exit ;;
925 m32r*:Linux:*:*)
926 echo ${UNAME_MACHINE}-unknown-linux-gnu
927 exit ;;
928 m68*:Linux:*:*)
929 echo ${UNAME_MACHINE}-unknown-linux-gnu
930 exit ;;
931 mips:Linux:*:* | mips64:Linux:*:*)
932 eval $set_cc_for_build
933 sed 's/^ //' << EOF >$dummy.c
934 #undef CPU
935 #undef ${UNAME_MACHINE}
936 #undef ${UNAME_MACHINE}el
937 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
938 CPU=${UNAME_MACHINE}el
939 #else
940 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
941 CPU=${UNAME_MACHINE}
942 #else
943 CPU=
944 #endif
945 #endif
946EOF
947 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
948 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
949 ;;
950 or32:Linux:*:*)
951 echo or32-unknown-linux-gnu
952 exit ;;
953 padre:Linux:*:*)
954 echo sparc-unknown-linux-gnu
955 exit ;;
956 parisc64:Linux:*:* | hppa64:Linux:*:*)
957 echo hppa64-unknown-linux-gnu
898 exit ;; 958 exit ;;
899 parisc:Linux:*:* | hppa:Linux:*:*) 959 parisc:Linux:*:* | hppa:Linux:*:*)
900 # Look for CPU level 960 # Look for CPU level
901 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 961 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
902 PA7*) echo hppa1.1-unknown-linux-gnu ;; 962 PA7*) echo hppa1.1-unknown-linux-gnu ;;
903 PA8*) echo hppa2.0-unknown-linux-gnu ;; 963 PA8*) echo hppa2.0-unknown-linux-gnu ;;
904 *) echo hppa-unknown-linux-gnu ;; 964 *) echo hppa-unknown-linux-gnu ;;
905 esac 965 esac
906 exit ;; 966 exit ;;
907 parisc64:Linux:*:* | hppa64:Linux:*:*) 967 ppc64:Linux:*:*)
908 echo hppa64-unknown-linux-gnu 968 echo powerpc64-unknown-linux-gnu
969 exit ;;
970 ppc:Linux:*:*)
971 echo powerpc-unknown-linux-gnu
909 exit ;; 972 exit ;;
910 s390:Linux:*:* | s390x:Linux:*:*) 973 s390:Linux:*:* | s390x:Linux:*:*)
911 echo ${UNAME_MACHINE}-ibm-linux 974 echo ${UNAME_MACHINE}-ibm-linux
912 exit ;; 975 exit ;;
913 sh64*:Linux:*:*) 976 sh64*:Linux:*:*)
914 echo ${UNAME_MACHINE}-unknown-linux-gnu 977 echo ${UNAME_MACHINE}-unknown-linux-gnu
915 exit ;; 978 exit ;;
916 sh*:Linux:*:*) 979 sh*:Linux:*:*)
917 echo ${UNAME_MACHINE}-unknown-linux-gnu 980 echo ${UNAME_MACHINE}-unknown-linux-gnu
918 exit ;; 981 exit ;;
919 sparc:Linux:*:* | sparc64:Linux:*:*) 982 sparc:Linux:*:* | sparc64:Linux:*:*)
920 echo ${UNAME_MACHINE}-unknown-linux-gnu 983 echo ${UNAME_MACHINE}-unknown-linux-gnu
921 exit ;; 984 exit ;;
985 tile*:Linux:*:*)
986 echo ${UNAME_MACHINE}-unknown-linux-gnu
987 exit ;;
988 vax:Linux:*:*)
989 echo ${UNAME_MACHINE}-dec-linux-gnu
990 exit ;;
922 x86_64:Linux:*:*) 991 x86_64:Linux:*:*)
923 echo x86_64-unknown-linux-gnu 992 echo x86_64-unknown-linux-gnu
924 exit ;; 993 exit ;;
925 i*86:Linux:*:*) 994 xtensa*: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" 995 echo ${UNAME_MACHINE}-unknown-linux-gnu
942 exit ;; 996 exit ;;
943 coff-i386)
944 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
945 exit ;;
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 ;;
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 <features.h>
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
976EOF
977 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
978 test x"${LIBC}" != x && {
979 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
980 exit
981 }
982 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
983 ;;
984 i*86:DYNIX/ptx:4*:*) 997 i*86:DYNIX/ptx:4*:*)
985 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 998 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
986 # earlier versions are messed up and put the nodename in both 999 # earlier versions are messed up and put the nodename in both
987 # sysname and nodename. 1000 # sysname and nodename.
988 echo i386-sequent-sysv4 1001 echo i386-sequent-sysv4
989 exit ;; 1002 exit ;;
990 i*86:UNIX_SV:4.2MP:2.*) 1003 i*86:UNIX_SV:4.2MP:2.*)
991 # Unixware is an offshoot of SVR4, but it has its own version 1004 # Unixware is an offshoot of SVR4, but it has its own version
992 # number series starting with 2... 1005 # number series starting with 2...
993 # I am not positive that other SVR4 systems won't match this, 1006 # I am not positive that other SVR4 systems won't match this,
994 # I just have to hope. -- rms. 1007 # I just have to hope. -- rms.
995 # Use sysv4.2uw... so that sysv4* matches it. 1008 # Use sysv4.2uw... so that sysv4* matches it.
996 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1009 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
997 exit ;; 1010 exit ;;
998 i*86:OS/2:*:*) 1011 i*86:OS/2:*:*)
999 # If we were able to find `uname', then EMX Unix compatibility 1012 # If we were able to find `uname', then EMX Unix compatibility
1000 # is probably installed. 1013 # is probably installed.
1007 echo ${UNAME_MACHINE}-unknown-atheos 1020 echo ${UNAME_MACHINE}-unknown-atheos
1008 exit ;; 1021 exit ;;
1009 i*86:syllable:*:*) 1022 i*86:syllable:*:*)
1010 echo ${UNAME_MACHINE}-pc-syllable 1023 echo ${UNAME_MACHINE}-pc-syllable
1011 exit ;; 1024 exit ;;
1012 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1025 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1013 echo i386-unknown-lynxos${UNAME_RELEASE} 1026 echo i386-unknown-lynxos${UNAME_RELEASE}
1014 exit ;; 1027 exit ;;
1015 i*86:*DOS:*:*) 1028 i*86:*DOS:*:*)
1016 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1029 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1017 exit ;; 1030 exit ;;
1022 else 1035 else
1023 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1036 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1024 fi 1037 fi
1025 exit ;; 1038 exit ;;
1026 i*86:*:5:[678]*) 1039 i*86:*:5:[678]*)
1027 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1040 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1028 case `/bin/uname -X | grep "^Machine"` in 1041 case `/bin/uname -X | grep "^Machine"` in
1029 *486*) UNAME_MACHINE=i486 ;; 1042 *486*) UNAME_MACHINE=i486 ;;
1030 *Pentium) UNAME_MACHINE=i586 ;; 1043 *Pentium) UNAME_MACHINE=i586 ;;
1031 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1044 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1032 esac 1045 esac
1050 echo ${UNAME_MACHINE}-pc-sysv32 1063 echo ${UNAME_MACHINE}-pc-sysv32
1051 fi 1064 fi
1052 exit ;; 1065 exit ;;
1053 pc:*:*:*) 1066 pc:*:*:*)
1054 # Left here for compatibility: 1067 # Left here for compatibility:
1055 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1068 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1056 # the processor, so we play safe by assuming i386. 1069 # the processor, so we play safe by assuming i586.
1070 # Note: whatever this is, it MUST be the same as what config.sub
1071 # prints for the "djgpp" host, or else GDB configury will decide that
1072 # this is a cross-build.
1057 echo i386-pc-msdosdjgpp 1073 echo i586-pc-msdosdjgpp
1058 exit ;; 1074 exit ;;
1059 Intel:Mach:3*:*) 1075 Intel:Mach:3*:*)
1060 echo i386-pc-mach3 1076 echo i386-pc-mach3
1061 exit ;; 1077 exit ;;
1062 paragon:*:*:*) 1078 paragon:*:*:*)
1063 echo i860-intel-osf1 1079 echo i860-intel-osf1
1088 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1104 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1089 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1105 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1090 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1106 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1091 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1107 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1092 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1108 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1093 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1109 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1094 && { echo i486-ncr-sysv4; exit; } ;; 1110 && { echo i486-ncr-sysv4; exit; } ;;
1111 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1112 OS_REL='.3'
1113 test -r /etc/.relid \
1114 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1115 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1116 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1117 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1118 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1119 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1120 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1095 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1121 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1096 echo m68k-unknown-lynxos${UNAME_RELEASE} 1122 echo m68k-unknown-lynxos${UNAME_RELEASE}
1097 exit ;; 1123 exit ;;
1098 mc68030:UNIX_System_V:4.*:*) 1124 mc68030:UNIX_System_V:4.*:*)
1099 echo m68k-atari-sysv4 1125 echo m68k-atari-sysv4
1102 echo sparc-unknown-lynxos${UNAME_RELEASE} 1128 echo sparc-unknown-lynxos${UNAME_RELEASE}
1103 exit ;; 1129 exit ;;
1104 rs6000:LynxOS:2.*:*) 1130 rs6000:LynxOS:2.*:*)
1105 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1131 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1106 exit ;; 1132 exit ;;
1107 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1133 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1108 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1134 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1109 exit ;; 1135 exit ;;
1110 SM[BE]S:UNIX_SV:*:*) 1136 SM[BE]S:UNIX_SV:*:*)
1111 echo mips-dde-sysv${UNAME_RELEASE} 1137 echo mips-dde-sysv${UNAME_RELEASE}
1112 exit ;; 1138 exit ;;
1122 echo ${UNAME_MACHINE}-sni-sysv4 1148 echo ${UNAME_MACHINE}-sni-sysv4
1123 else 1149 else
1124 echo ns32k-sni-sysv 1150 echo ns32k-sni-sysv
1125 fi 1151 fi
1126 exit ;; 1152 exit ;;
1127 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1153 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1128 # says <Richard.M.Bartel@ccMail.Census.GOV> 1154 # says <Richard.M.Bartel@ccMail.Census.GOV>
1129 echo i586-unisys-sysv4 1155 echo i586-unisys-sysv4
1130 exit ;; 1156 exit ;;
1131 *:UNIX_System_V:4*:FTX*) 1157 *:UNIX_System_V:4*:FTX*)
1132 # From Gerald Hewes <hewes@openmarket.com>. 1158 # From Gerald Hewes <hewes@openmarket.com>.
1133 # How about differentiating between stratus architectures? -djm 1159 # How about differentiating between stratus architectures? -djm
1134 echo hppa1.1-stratus-sysv4 1160 echo hppa1.1-stratus-sysv4
1135 exit ;; 1161 exit ;;
1151 news*:NEWS-OS:6*:*) 1177 news*:NEWS-OS:6*:*)
1152 echo mips-sony-newsos6 1178 echo mips-sony-newsos6
1153 exit ;; 1179 exit ;;
1154 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1180 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1155 if [ -d /usr/nec ]; then 1181 if [ -d /usr/nec ]; then
1156 echo mips-nec-sysv${UNAME_RELEASE} 1182 echo mips-nec-sysv${UNAME_RELEASE}
1157 else 1183 else
1158 echo mips-unknown-sysv${UNAME_RELEASE} 1184 echo mips-unknown-sysv${UNAME_RELEASE}
1159 fi 1185 fi
1160 exit ;; 1186 exit ;;
1161 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1187 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1162 echo powerpc-be-beos 1188 echo powerpc-be-beos
1163 exit ;; 1189 exit ;;
1164 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1190 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1165 echo powerpc-apple-beos 1191 echo powerpc-apple-beos
1166 exit ;; 1192 exit ;;
1167 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1193 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1168 echo i586-pc-beos 1194 echo i586-pc-beos
1169 exit ;; 1195 exit ;;
1196 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1197 echo i586-pc-haiku
1198 exit ;;
1170 SX-4:SUPER-UX:*:*) 1199 SX-4:SUPER-UX:*:*)
1171 echo sx4-nec-superux${UNAME_RELEASE} 1200 echo sx4-nec-superux${UNAME_RELEASE}
1172 exit ;; 1201 exit ;;
1173 SX-5:SUPER-UX:*:*) 1202 SX-5:SUPER-UX:*:*)
1174 echo sx5-nec-superux${UNAME_RELEASE} 1203 echo sx5-nec-superux${UNAME_RELEASE}
1175 exit ;; 1204 exit ;;
1176 SX-6:SUPER-UX:*:*) 1205 SX-6:SUPER-UX:*:*)
1177 echo sx6-nec-superux${UNAME_RELEASE} 1206 echo sx6-nec-superux${UNAME_RELEASE}
1207 exit ;;
1208 SX-7:SUPER-UX:*:*)
1209 echo sx7-nec-superux${UNAME_RELEASE}
1210 exit ;;
1211 SX-8:SUPER-UX:*:*)
1212 echo sx8-nec-superux${UNAME_RELEASE}
1213 exit ;;
1214 SX-8R:SUPER-UX:*:*)
1215 echo sx8r-nec-superux${UNAME_RELEASE}
1178 exit ;; 1216 exit ;;
1179 Power*:Rhapsody:*:*) 1217 Power*:Rhapsody:*:*)
1180 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1218 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1181 exit ;; 1219 exit ;;
1182 *:Rhapsody:*:*) 1220 *:Rhapsody:*:*)
1183 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1221 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1184 exit ;; 1222 exit ;;
1185 *:Darwin:*:*) 1223 *:Darwin:*:*)
1186 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1224 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187 case $UNAME_PROCESSOR in 1225 case $UNAME_PROCESSOR in
1188 *86) UNAME_PROCESSOR=i686 ;; 1226 i386)
1227 eval $set_cc_for_build
1228 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1229 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1230 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1231 grep IS_64BIT_ARCH >/dev/null
1232 then
1233 UNAME_PROCESSOR="x86_64"
1234 fi
1235 fi ;;
1189 unknown) UNAME_PROCESSOR=powerpc ;; 1236 unknown) UNAME_PROCESSOR=powerpc ;;
1190 esac 1237 esac
1191 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1238 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1192 exit ;; 1239 exit ;;
1193 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1240 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1198 fi 1245 fi
1199 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1246 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1200 exit ;; 1247 exit ;;
1201 *:QNX:*:4*) 1248 *:QNX:*:4*)
1202 echo i386-pc-qnx 1249 echo i386-pc-qnx
1250 exit ;;
1251 NEO-?:NONSTOP_KERNEL:*:*)
1252 echo neo-tandem-nsk${UNAME_RELEASE}
1203 exit ;; 1253 exit ;;
1204 NSE-?:NONSTOP_KERNEL:*:*) 1254 NSE-?:NONSTOP_KERNEL:*:*)
1205 echo nse-tandem-nsk${UNAME_RELEASE} 1255 echo nse-tandem-nsk${UNAME_RELEASE}
1206 exit ;; 1256 exit ;;
1207 NSR-?:NONSTOP_KERNEL:*:*) 1257 NSR-?:NONSTOP_KERNEL:*:*)
1244 exit ;; 1294 exit ;;
1245 *:ITS:*:*) 1295 *:ITS:*:*)
1246 echo pdp10-unknown-its 1296 echo pdp10-unknown-its
1247 exit ;; 1297 exit ;;
1248 SEI:*:*:SEIUX) 1298 SEI:*:*:SEIUX)
1249 echo mips-sei-seiux${UNAME_RELEASE} 1299 echo mips-sei-seiux${UNAME_RELEASE}
1250 exit ;; 1300 exit ;;
1251 *:DragonFly:*:*) 1301 *:DragonFly:*:*)
1252 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1302 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1253 exit ;; 1303 exit ;;
1254 *:*VMS:*:*) 1304 *:*VMS:*:*)
1255 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1305 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1256 case "${UNAME_MACHINE}" in 1306 case "${UNAME_MACHINE}" in
1257 A*) echo alpha-dec-vms ; exit ;; 1307 A*) echo alpha-dec-vms ; exit ;;
1258 I*) echo ia64-dec-vms ; exit ;; 1308 I*) echo ia64-dec-vms ; exit ;;
1259 V*) echo vax-dec-vms ; exit ;; 1309 V*) echo vax-dec-vms ; exit ;;
1260 esac ;; 1310 esac ;;
1261 *:XENIX:*:SysV) 1311 *:XENIX:*:SysV)
1262 echo i386-pc-xenix 1312 echo i386-pc-xenix
1263 exit ;; 1313 exit ;;
1264 i*86:skyos:*:*) 1314 i*86:skyos:*:*)
1265 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1315 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1316 exit ;;
1317 i*86:rdos:*:*)
1318 echo ${UNAME_MACHINE}-pc-rdos
1319 exit ;;
1320 i*86:AROS:*:*)
1321 echo ${UNAME_MACHINE}-pc-aros
1266 exit ;; 1322 exit ;;
1267esac 1323esac
1268 1324
1269#echo '(No uname command or uname output not recognized.)' 1>&2 1325#echo '(No uname command or uname output not recognized.)' 1>&2
1270#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1326#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1284 printf ("mips-sony-bsd\n"); exit (0); 1340 printf ("mips-sony-bsd\n"); exit (0);
1285#else 1341#else
1286#include <sys/param.h> 1342#include <sys/param.h>
1287 printf ("m68k-sony-newsos%s\n", 1343 printf ("m68k-sony-newsos%s\n",
1288#ifdef NEWSOS4 1344#ifdef NEWSOS4
1289 "4" 1345 "4"
1290#else 1346#else
1291 "" 1347 ""
1292#endif 1348#endif
1293 ); exit (0); 1349 ); exit (0);
1294#endif 1350#endif
1295#endif 1351#endif
1296 1352
1297#if defined (__arm) && defined (__acorn) && defined (__unix) 1353#if defined (__arm) && defined (__acorn) && defined (__unix)
1298 printf ("arm-acorn-riscix\n"); exit (0); 1354 printf ("arm-acorn-riscix\n"); exit (0);
1422 1478
1423This script, last modified $timestamp, has failed to recognize 1479This script, last modified $timestamp, has failed to recognize
1424the operating system you are using. It is advised that you 1480the operating system you are using. It is advised that you
1425download the most up to date version of the config scripts from 1481download the most up to date version of the config scripts from
1426 1482
1427 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 1483 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1428and 1484and
1429 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 1485 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1430 1486
1431If the version you run ($0) is already up to date, please 1487If the version you run ($0) is already up to date, please
1432send the following data and any information you think might be 1488send the following data and any information you think might be
1433pertinent to <config-patches@gnu.org> in order to provide the needed 1489pertinent to <config-patches@gnu.org> in order to provide the needed
1434information to handle your system. 1490information to handle your system.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines