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.5 by sf-exg, Tue May 31 18:41:03 2011 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-05-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 2 of the License, or
11# (at your option) any later version. 12# (at your option) any later version.
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 case ${UNAME_MACHINE} in
796 pc98)
797 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 amd64)
799 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800 *)
767 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 801 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
802 esac
768 exit ;; 803 exit ;;
769 i*:CYGWIN*:*) 804 i*:CYGWIN*:*)
770 echo ${UNAME_MACHINE}-pc-cygwin 805 echo ${UNAME_MACHINE}-pc-cygwin
771 exit ;; 806 exit ;;
772 i*:MINGW*:*) 807 *:MINGW*:*)
773 echo ${UNAME_MACHINE}-pc-mingw32 808 echo ${UNAME_MACHINE}-pc-mingw32
774 exit ;; 809 exit ;;
775 i*:windows32*:*) 810 i*:windows32*:*)
776 # uname -m includes "-pc" on this system. 811 # uname -m includes "-pc" on this system.
777 echo ${UNAME_MACHINE}-mingw32 812 echo ${UNAME_MACHINE}-mingw32
778 exit ;; 813 exit ;;
779 i*:PW*:*) 814 i*:PW*:*)
780 echo ${UNAME_MACHINE}-pc-pw32 815 echo ${UNAME_MACHINE}-pc-pw32
781 exit ;; 816 exit ;;
782 x86:Interix*:[34]*) 817 *:Interix*:*)
818 case ${UNAME_MACHINE} in
819 x86)
783 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 820 echo i586-pc-interix${UNAME_RELEASE}
784 exit ;; 821 exit ;;
822 authenticamd | genuineintel | EM64T)
823 echo x86_64-unknown-interix${UNAME_RELEASE}
824 exit ;;
825 IA64)
826 echo ia64-unknown-interix${UNAME_RELEASE}
827 exit ;;
828 esac ;;
785 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 829 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786 echo i${UNAME_MACHINE}-pc-mks 830 echo i${UNAME_MACHINE}-pc-mks
831 exit ;;
832 8664:Windows_NT:*)
833 echo x86_64-pc-mks
787 exit ;; 834 exit ;;
788 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 835 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
789 # How do we know it's Interix rather than the generic POSIX subsystem? 836 # 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 837 # 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? 838 # UNAME_MACHINE based on the output of uname instead of i386?
811 # other systems with GNU libc and userland 858 # 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 859 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
813 exit ;; 860 exit ;;
814 i*86:Minix:*:*) 861 i*86:Minix:*:*)
815 echo ${UNAME_MACHINE}-pc-minix 862 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 ;; 863 exit ;;
885 alpha:Linux:*:*) 864 alpha:Linux:*:*)
886 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 865 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
887 EV5) UNAME_MACHINE=alphaev5 ;; 866 EV5) UNAME_MACHINE=alphaev5 ;;
888 EV56) UNAME_MACHINE=alphaev56 ;; 867 EV56) UNAME_MACHINE=alphaev56 ;;
889 PCA56) UNAME_MACHINE=alphapca56 ;; 868 PCA56) UNAME_MACHINE=alphapca56 ;;
890 PCA57) UNAME_MACHINE=alphapca56 ;; 869 PCA57) UNAME_MACHINE=alphapca56 ;;
891 EV6) UNAME_MACHINE=alphaev6 ;; 870 EV6) UNAME_MACHINE=alphaev6 ;;
892 EV67) UNAME_MACHINE=alphaev67 ;; 871 EV67) UNAME_MACHINE=alphaev67 ;;
893 EV68*) UNAME_MACHINE=alphaev68 ;; 872 EV68*) UNAME_MACHINE=alphaev68 ;;
894 esac 873 esac
895 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 874 objdump --private-headers /bin/sh | grep -q ld.so.1
896 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 875 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
897 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 876 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
877 exit ;;
878 arm*:Linux:*:*)
879 eval $set_cc_for_build
880 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
881 | grep -q __ARM_EABI__
882 then
883 echo ${UNAME_MACHINE}-unknown-linux-gnu
884 else
885 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
886 | grep -q __ARM_PCS_VFP
887 then
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
889 else
890 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
891 fi
892 fi
893 exit ;;
894 avr32*:Linux:*:*)
895 echo ${UNAME_MACHINE}-unknown-linux-gnu
896 exit ;;
897 cris:Linux:*:*)
898 echo cris-axis-linux-gnu
899 exit ;;
900 crisv32:Linux:*:*)
901 echo crisv32-axis-linux-gnu
902 exit ;;
903 frv:Linux:*:*)
904 echo frv-unknown-linux-gnu
905 exit ;;
906 i*86:Linux:*:*)
907 LIBC=gnu
908 eval $set_cc_for_build
909 sed 's/^ //' << EOF >$dummy.c
910 #ifdef __dietlibc__
911 LIBC=dietlibc
912 #endif
913EOF
914 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
915 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
916 exit ;;
917 ia64:Linux:*:*)
918 echo ${UNAME_MACHINE}-unknown-linux-gnu
919 exit ;;
920 m32r*:Linux:*:*)
921 echo ${UNAME_MACHINE}-unknown-linux-gnu
922 exit ;;
923 m68*:Linux:*:*)
924 echo ${UNAME_MACHINE}-unknown-linux-gnu
925 exit ;;
926 mips:Linux:*:* | mips64:Linux:*:*)
927 eval $set_cc_for_build
928 sed 's/^ //' << EOF >$dummy.c
929 #undef CPU
930 #undef ${UNAME_MACHINE}
931 #undef ${UNAME_MACHINE}el
932 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
933 CPU=${UNAME_MACHINE}el
934 #else
935 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
936 CPU=${UNAME_MACHINE}
937 #else
938 CPU=
939 #endif
940 #endif
941EOF
942 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
943 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
944 ;;
945 or32:Linux:*:*)
946 echo or32-unknown-linux-gnu
947 exit ;;
948 padre:Linux:*:*)
949 echo sparc-unknown-linux-gnu
950 exit ;;
951 parisc64:Linux:*:* | hppa64:Linux:*:*)
952 echo hppa64-unknown-linux-gnu
898 exit ;; 953 exit ;;
899 parisc:Linux:*:* | hppa:Linux:*:*) 954 parisc:Linux:*:* | hppa:Linux:*:*)
900 # Look for CPU level 955 # Look for CPU level
901 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 956 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
902 PA7*) echo hppa1.1-unknown-linux-gnu ;; 957 PA7*) echo hppa1.1-unknown-linux-gnu ;;
903 PA8*) echo hppa2.0-unknown-linux-gnu ;; 958 PA8*) echo hppa2.0-unknown-linux-gnu ;;
904 *) echo hppa-unknown-linux-gnu ;; 959 *) echo hppa-unknown-linux-gnu ;;
905 esac 960 esac
906 exit ;; 961 exit ;;
907 parisc64:Linux:*:* | hppa64:Linux:*:*) 962 ppc64:Linux:*:*)
908 echo hppa64-unknown-linux-gnu 963 echo powerpc64-unknown-linux-gnu
964 exit ;;
965 ppc:Linux:*:*)
966 echo powerpc-unknown-linux-gnu
909 exit ;; 967 exit ;;
910 s390:Linux:*:* | s390x:Linux:*:*) 968 s390:Linux:*:* | s390x:Linux:*:*)
911 echo ${UNAME_MACHINE}-ibm-linux 969 echo ${UNAME_MACHINE}-ibm-linux
912 exit ;; 970 exit ;;
913 sh64*:Linux:*:*) 971 sh64*:Linux:*:*)
914 echo ${UNAME_MACHINE}-unknown-linux-gnu 972 echo ${UNAME_MACHINE}-unknown-linux-gnu
915 exit ;; 973 exit ;;
916 sh*:Linux:*:*) 974 sh*:Linux:*:*)
917 echo ${UNAME_MACHINE}-unknown-linux-gnu 975 echo ${UNAME_MACHINE}-unknown-linux-gnu
918 exit ;; 976 exit ;;
919 sparc:Linux:*:* | sparc64:Linux:*:*) 977 sparc:Linux:*:* | sparc64:Linux:*:*)
920 echo ${UNAME_MACHINE}-unknown-linux-gnu 978 echo ${UNAME_MACHINE}-unknown-linux-gnu
921 exit ;; 979 exit ;;
980 tile*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-gnu
982 exit ;;
983 vax:Linux:*:*)
984 echo ${UNAME_MACHINE}-dec-linux-gnu
985 exit ;;
922 x86_64:Linux:*:*) 986 x86_64:Linux:*:*)
923 echo x86_64-unknown-linux-gnu 987 echo x86_64-unknown-linux-gnu
924 exit ;; 988 exit ;;
925 i*86:Linux:*:*) 989 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" 990 echo ${UNAME_MACHINE}-unknown-linux-gnu
942 exit ;; 991 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*:*) 992 i*86:DYNIX/ptx:4*:*)
985 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 993 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
986 # earlier versions are messed up and put the nodename in both 994 # earlier versions are messed up and put the nodename in both
987 # sysname and nodename. 995 # sysname and nodename.
988 echo i386-sequent-sysv4 996 echo i386-sequent-sysv4
989 exit ;; 997 exit ;;
990 i*86:UNIX_SV:4.2MP:2.*) 998 i*86:UNIX_SV:4.2MP:2.*)
991 # Unixware is an offshoot of SVR4, but it has its own version 999 # Unixware is an offshoot of SVR4, but it has its own version
992 # number series starting with 2... 1000 # number series starting with 2...
993 # I am not positive that other SVR4 systems won't match this, 1001 # I am not positive that other SVR4 systems won't match this,
994 # I just have to hope. -- rms. 1002 # I just have to hope. -- rms.
995 # Use sysv4.2uw... so that sysv4* matches it. 1003 # Use sysv4.2uw... so that sysv4* matches it.
996 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1004 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
997 exit ;; 1005 exit ;;
998 i*86:OS/2:*:*) 1006 i*86:OS/2:*:*)
999 # If we were able to find `uname', then EMX Unix compatibility 1007 # If we were able to find `uname', then EMX Unix compatibility
1000 # is probably installed. 1008 # is probably installed.
1007 echo ${UNAME_MACHINE}-unknown-atheos 1015 echo ${UNAME_MACHINE}-unknown-atheos
1008 exit ;; 1016 exit ;;
1009 i*86:syllable:*:*) 1017 i*86:syllable:*:*)
1010 echo ${UNAME_MACHINE}-pc-syllable 1018 echo ${UNAME_MACHINE}-pc-syllable
1011 exit ;; 1019 exit ;;
1012 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1020 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1013 echo i386-unknown-lynxos${UNAME_RELEASE} 1021 echo i386-unknown-lynxos${UNAME_RELEASE}
1014 exit ;; 1022 exit ;;
1015 i*86:*DOS:*:*) 1023 i*86:*DOS:*:*)
1016 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1024 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1017 exit ;; 1025 exit ;;
1022 else 1030 else
1023 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1031 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1024 fi 1032 fi
1025 exit ;; 1033 exit ;;
1026 i*86:*:5:[678]*) 1034 i*86:*:5:[678]*)
1027 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1035 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1028 case `/bin/uname -X | grep "^Machine"` in 1036 case `/bin/uname -X | grep "^Machine"` in
1029 *486*) UNAME_MACHINE=i486 ;; 1037 *486*) UNAME_MACHINE=i486 ;;
1030 *Pentium) UNAME_MACHINE=i586 ;; 1038 *Pentium) UNAME_MACHINE=i586 ;;
1031 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1039 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1032 esac 1040 esac
1050 echo ${UNAME_MACHINE}-pc-sysv32 1058 echo ${UNAME_MACHINE}-pc-sysv32
1051 fi 1059 fi
1052 exit ;; 1060 exit ;;
1053 pc:*:*:*) 1061 pc:*:*:*)
1054 # Left here for compatibility: 1062 # Left here for compatibility:
1055 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1063 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1056 # the processor, so we play safe by assuming i386. 1064 # the processor, so we play safe by assuming i586.
1065 # Note: whatever this is, it MUST be the same as what config.sub
1066 # prints for the "djgpp" host, or else GDB configury will decide that
1067 # this is a cross-build.
1057 echo i386-pc-msdosdjgpp 1068 echo i586-pc-msdosdjgpp
1058 exit ;; 1069 exit ;;
1059 Intel:Mach:3*:*) 1070 Intel:Mach:3*:*)
1060 echo i386-pc-mach3 1071 echo i386-pc-mach3
1061 exit ;; 1072 exit ;;
1062 paragon:*:*:*) 1073 paragon:*:*:*)
1063 echo i860-intel-osf1 1074 echo i860-intel-osf1
1088 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1099 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1089 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1100 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1090 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1101 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1091 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1102 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1092 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1103 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1093 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1104 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1094 && { echo i486-ncr-sysv4; exit; } ;; 1105 && { echo i486-ncr-sysv4; exit; } ;;
1106 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1107 OS_REL='.3'
1108 test -r /etc/.relid \
1109 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1110 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1111 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1112 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1113 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1114 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1115 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1095 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1116 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1096 echo m68k-unknown-lynxos${UNAME_RELEASE} 1117 echo m68k-unknown-lynxos${UNAME_RELEASE}
1097 exit ;; 1118 exit ;;
1098 mc68030:UNIX_System_V:4.*:*) 1119 mc68030:UNIX_System_V:4.*:*)
1099 echo m68k-atari-sysv4 1120 echo m68k-atari-sysv4
1102 echo sparc-unknown-lynxos${UNAME_RELEASE} 1123 echo sparc-unknown-lynxos${UNAME_RELEASE}
1103 exit ;; 1124 exit ;;
1104 rs6000:LynxOS:2.*:*) 1125 rs6000:LynxOS:2.*:*)
1105 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1126 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1106 exit ;; 1127 exit ;;
1107 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1128 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1108 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1129 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1109 exit ;; 1130 exit ;;
1110 SM[BE]S:UNIX_SV:*:*) 1131 SM[BE]S:UNIX_SV:*:*)
1111 echo mips-dde-sysv${UNAME_RELEASE} 1132 echo mips-dde-sysv${UNAME_RELEASE}
1112 exit ;; 1133 exit ;;
1122 echo ${UNAME_MACHINE}-sni-sysv4 1143 echo ${UNAME_MACHINE}-sni-sysv4
1123 else 1144 else
1124 echo ns32k-sni-sysv 1145 echo ns32k-sni-sysv
1125 fi 1146 fi
1126 exit ;; 1147 exit ;;
1127 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1148 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1128 # says <Richard.M.Bartel@ccMail.Census.GOV> 1149 # says <Richard.M.Bartel@ccMail.Census.GOV>
1129 echo i586-unisys-sysv4 1150 echo i586-unisys-sysv4
1130 exit ;; 1151 exit ;;
1131 *:UNIX_System_V:4*:FTX*) 1152 *:UNIX_System_V:4*:FTX*)
1132 # From Gerald Hewes <hewes@openmarket.com>. 1153 # From Gerald Hewes <hewes@openmarket.com>.
1133 # How about differentiating between stratus architectures? -djm 1154 # How about differentiating between stratus architectures? -djm
1134 echo hppa1.1-stratus-sysv4 1155 echo hppa1.1-stratus-sysv4
1135 exit ;; 1156 exit ;;
1151 news*:NEWS-OS:6*:*) 1172 news*:NEWS-OS:6*:*)
1152 echo mips-sony-newsos6 1173 echo mips-sony-newsos6
1153 exit ;; 1174 exit ;;
1154 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1175 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1155 if [ -d /usr/nec ]; then 1176 if [ -d /usr/nec ]; then
1156 echo mips-nec-sysv${UNAME_RELEASE} 1177 echo mips-nec-sysv${UNAME_RELEASE}
1157 else 1178 else
1158 echo mips-unknown-sysv${UNAME_RELEASE} 1179 echo mips-unknown-sysv${UNAME_RELEASE}
1159 fi 1180 fi
1160 exit ;; 1181 exit ;;
1161 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1182 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1162 echo powerpc-be-beos 1183 echo powerpc-be-beos
1163 exit ;; 1184 exit ;;
1164 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1185 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1165 echo powerpc-apple-beos 1186 echo powerpc-apple-beos
1166 exit ;; 1187 exit ;;
1167 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1188 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1168 echo i586-pc-beos 1189 echo i586-pc-beos
1169 exit ;; 1190 exit ;;
1191 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1192 echo i586-pc-haiku
1193 exit ;;
1170 SX-4:SUPER-UX:*:*) 1194 SX-4:SUPER-UX:*:*)
1171 echo sx4-nec-superux${UNAME_RELEASE} 1195 echo sx4-nec-superux${UNAME_RELEASE}
1172 exit ;; 1196 exit ;;
1173 SX-5:SUPER-UX:*:*) 1197 SX-5:SUPER-UX:*:*)
1174 echo sx5-nec-superux${UNAME_RELEASE} 1198 echo sx5-nec-superux${UNAME_RELEASE}
1175 exit ;; 1199 exit ;;
1176 SX-6:SUPER-UX:*:*) 1200 SX-6:SUPER-UX:*:*)
1177 echo sx6-nec-superux${UNAME_RELEASE} 1201 echo sx6-nec-superux${UNAME_RELEASE}
1202 exit ;;
1203 SX-7:SUPER-UX:*:*)
1204 echo sx7-nec-superux${UNAME_RELEASE}
1205 exit ;;
1206 SX-8:SUPER-UX:*:*)
1207 echo sx8-nec-superux${UNAME_RELEASE}
1208 exit ;;
1209 SX-8R:SUPER-UX:*:*)
1210 echo sx8r-nec-superux${UNAME_RELEASE}
1178 exit ;; 1211 exit ;;
1179 Power*:Rhapsody:*:*) 1212 Power*:Rhapsody:*:*)
1180 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1213 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1181 exit ;; 1214 exit ;;
1182 *:Rhapsody:*:*) 1215 *:Rhapsody:*:*)
1183 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1216 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1184 exit ;; 1217 exit ;;
1185 *:Darwin:*:*) 1218 *:Darwin:*:*)
1186 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1219 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187 case $UNAME_PROCESSOR in 1220 case $UNAME_PROCESSOR in
1188 *86) UNAME_PROCESSOR=i686 ;; 1221 i386)
1222 eval $set_cc_for_build
1223 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1224 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1225 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1226 grep IS_64BIT_ARCH >/dev/null
1227 then
1228 UNAME_PROCESSOR="x86_64"
1229 fi
1230 fi ;;
1189 unknown) UNAME_PROCESSOR=powerpc ;; 1231 unknown) UNAME_PROCESSOR=powerpc ;;
1190 esac 1232 esac
1191 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1233 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1192 exit ;; 1234 exit ;;
1193 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1235 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1198 fi 1240 fi
1199 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1241 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1200 exit ;; 1242 exit ;;
1201 *:QNX:*:4*) 1243 *:QNX:*:4*)
1202 echo i386-pc-qnx 1244 echo i386-pc-qnx
1245 exit ;;
1246 NEO-?:NONSTOP_KERNEL:*:*)
1247 echo neo-tandem-nsk${UNAME_RELEASE}
1203 exit ;; 1248 exit ;;
1204 NSE-?:NONSTOP_KERNEL:*:*) 1249 NSE-?:NONSTOP_KERNEL:*:*)
1205 echo nse-tandem-nsk${UNAME_RELEASE} 1250 echo nse-tandem-nsk${UNAME_RELEASE}
1206 exit ;; 1251 exit ;;
1207 NSR-?:NONSTOP_KERNEL:*:*) 1252 NSR-?:NONSTOP_KERNEL:*:*)
1244 exit ;; 1289 exit ;;
1245 *:ITS:*:*) 1290 *:ITS:*:*)
1246 echo pdp10-unknown-its 1291 echo pdp10-unknown-its
1247 exit ;; 1292 exit ;;
1248 SEI:*:*:SEIUX) 1293 SEI:*:*:SEIUX)
1249 echo mips-sei-seiux${UNAME_RELEASE} 1294 echo mips-sei-seiux${UNAME_RELEASE}
1250 exit ;; 1295 exit ;;
1251 *:DragonFly:*:*) 1296 *:DragonFly:*:*)
1252 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1297 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1253 exit ;; 1298 exit ;;
1254 *:*VMS:*:*) 1299 *:*VMS:*:*)
1255 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1300 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1256 case "${UNAME_MACHINE}" in 1301 case "${UNAME_MACHINE}" in
1257 A*) echo alpha-dec-vms ; exit ;; 1302 A*) echo alpha-dec-vms ; exit ;;
1258 I*) echo ia64-dec-vms ; exit ;; 1303 I*) echo ia64-dec-vms ; exit ;;
1259 V*) echo vax-dec-vms ; exit ;; 1304 V*) echo vax-dec-vms ; exit ;;
1260 esac ;; 1305 esac ;;
1261 *:XENIX:*:SysV) 1306 *:XENIX:*:SysV)
1262 echo i386-pc-xenix 1307 echo i386-pc-xenix
1263 exit ;; 1308 exit ;;
1264 i*86:skyos:*:*) 1309 i*86:skyos:*:*)
1265 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1310 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1311 exit ;;
1312 i*86:rdos:*:*)
1313 echo ${UNAME_MACHINE}-pc-rdos
1314 exit ;;
1315 i*86:AROS:*:*)
1316 echo ${UNAME_MACHINE}-pc-aros
1266 exit ;; 1317 exit ;;
1267esac 1318esac
1268 1319
1269#echo '(No uname command or uname output not recognized.)' 1>&2 1320#echo '(No uname command or uname output not recognized.)' 1>&2
1270#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1321#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1284 printf ("mips-sony-bsd\n"); exit (0); 1335 printf ("mips-sony-bsd\n"); exit (0);
1285#else 1336#else
1286#include <sys/param.h> 1337#include <sys/param.h>
1287 printf ("m68k-sony-newsos%s\n", 1338 printf ("m68k-sony-newsos%s\n",
1288#ifdef NEWSOS4 1339#ifdef NEWSOS4
1289 "4" 1340 "4"
1290#else 1341#else
1291 "" 1342 ""
1292#endif 1343#endif
1293 ); exit (0); 1344 ); exit (0);
1294#endif 1345#endif
1295#endif 1346#endif
1296 1347
1297#if defined (__arm) && defined (__acorn) && defined (__unix) 1348#if defined (__arm) && defined (__acorn) && defined (__unix)
1298 printf ("arm-acorn-riscix\n"); exit (0); 1349 printf ("arm-acorn-riscix\n"); exit (0);
1422 1473
1423This script, last modified $timestamp, has failed to recognize 1474This script, last modified $timestamp, has failed to recognize
1424the operating system you are using. It is advised that you 1475the operating system you are using. It is advised that you
1425download the most up to date version of the config scripts from 1476download the most up to date version of the config scripts from
1426 1477
1427 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1428and 1479and
1429 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 1480 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1430 1481
1431If the version you run ($0) is already up to date, please 1482If the version you run ($0) is already up to date, please
1432send the following data and any information you think might be 1483send the following data and any information you think might be
1433pertinent to <config-patches@gnu.org> in order to provide the needed 1484pertinent to <config-patches@gnu.org> in order to provide the needed
1434information to handle your system. 1485information to handle your system.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines