1#! /bin/sh 2# Attempt to guess a canonical system name. 3# Copyright 1992-2013 Free Software Foundation, Inc. 4 5timestamp='2013-06-10' 6 7# This file is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 3 of the License, or 10# (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, but 13# WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, see <http://www.gnu.org/licenses/>. 19# 20# As a special exception to the GNU General Public License, if you 21# distribute this file as part of a program that contains a 22# configuration script generated by Autoconf, you may include it under 23# the same distribution terms that you use for the rest of that 24# program. This Exception is an additional permission under section 7 25# of the GNU General Public License, version 3 ("GPLv3"). 26# 27# Originally written by Per Bothner. 28# 29# You can get the latest version of this script from: 30# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31# 32# Please send patches with a ChangeLog entry to config-patches@gnu.org. 33 34 35me=`echo "$0" | sed -e 's,.*/,,'` 36 37usage="\ 38Usage: $0 [OPTION] 39 40Output the configuration name of the system \`$me' is run on. 41 42Operation modes: 43 -h, --help print this help, then exit 44 -t, --time-stamp print date of last modification, then exit 45 -v, --version print version number, then exit 46 47Report bugs and patches to <config-patches@gnu.org>." 48 49version="\ 50GNU config.guess ($timestamp) 51 52Originally written by Per Bothner. 53Copyright 1992-2013 Free Software Foundation, Inc. 54 55This is free software; see the source for copying conditions. There is NO 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57 58help=" 59Try \`$me --help' for more information." 60 61# Parse command line 62while test $# -gt 0 ; do 63 case $1 in 64 --time-stamp | --time* | -t ) 65 echo "$timestamp" ; exit ;; 66 --version | -v ) 67 echo "$version" ; exit ;; 68 --help | --h* | -h ) 69 echo "$usage"; exit ;; 70 -- ) # Stop option processing 71 shift; break ;; 72 - ) # Use stdin as input. 73 break ;; 74 -* ) 75 echo "$me: invalid option $1$help" >&2 76 exit 1 ;; 77 * ) 78 break ;; 79 esac 80done 81 82if test $# != 0; then 83 echo "$me: too many arguments$help" >&2 84 exit 1 85fi 86 87trap 'exit 1' 1 2 15 88 89# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90# compiler to aid in system detection is discouraged as it requires 91# temporary files to be created and, as you can see below, it is a 92# headache to deal with in a portable fashion. 93 94# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95# use `HOST_CC' if defined, but it is deprecated. 96 97# Portable tmp directory creation inspired by the Autoconf team. 98 99set_cc_for_build=' 100trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102: ${TMPDIR=/tmp} ; 103 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107dummy=$tmp/dummy ; 108tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109case $CC_FOR_BUILD,$HOST_CC,$CC in 110 ,,) echo "int x;" > $dummy.c ; 111 for c in cc gcc c89 c99 ; do 112 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113 CC_FOR_BUILD="$c"; break ; 114 fi ; 115 done ; 116 if test x"$CC_FOR_BUILD" = x ; then 117 CC_FOR_BUILD=no_compiler_found ; 118 fi 119 ;; 120 ,,*) CC_FOR_BUILD=$CC ;; 121 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122esac ; set_cc_for_build= ;' 123 124# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125# (ghazi@noc.rutgers.edu 1994-08-24) 126if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127 PATH=$PATH:/.attbin ; export PATH 128fi 129 130UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134 135case "${UNAME_SYSTEM}" in 136Linux|GNU|GNU/*) 137 # If the system lacks a compiler, then just pick glibc. 138 # We could probably try harder. 139 LIBC=gnu 140 141 eval $set_cc_for_build 142 cat <<-EOF > $dummy.c 143 #include <features.h> 144 #if defined(__UCLIBC__) 145 LIBC=uclibc 146 #elif defined(__dietlibc__) 147 LIBC=dietlibc 148 #else 149 LIBC=gnu 150 #endif 151 EOF 152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 153 ;; 154esac 155 156# Note: order is significant - the case branches are not exclusive. 157 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159 *:NetBSD:*:*) 160 # NetBSD (nbsd) targets should (where applicable) match one or 161 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163 # switched to ELF, *-*-netbsd* would select the old 164 # object file format. This provides both forward 165 # compatibility and a consistent mechanism for selecting the 166 # object file format. 167 # 168 # Note: NetBSD doesn't particularly care about the vendor 169 # portion of the name. We always set it to "unknown". 170 sysctl="sysctl -n hw.machine_arch" 171 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173 case "${UNAME_MACHINE_ARCH}" in 174 earm*eb*) machine=armeb-unknown ;; 175 earm*) machine=arm-unknown ;; 176 armeb) machine=armeb-unknown ;; 177 arm*) machine=arm-unknown ;; 178 coldfire) machine=m5407-unknown ;; 179 earm*eb*) machine=armeb-unknown ;; 180 earm*) machine=arm-unknown ;; 181 sh3el) machine=shl-unknown ;; 182 sh3eb) machine=sh-unknown ;; 183 sh5el) machine=sh5le-unknown ;; 184 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 185 esac 186 # The Operating System including object format, if it has switched 187 # to ELF recently, or will in the future and ABI. 188 case "${UNAME_MACHINE_ARCH}" in 189 coldfire) os=netbsdelf ;; 190 earm*) 191 eval $set_cc_for_build 192 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 193 | grep -q __ARM_PCS_VFP 194 then 195 os=netbsdelf-eabi 196 else 197 os=netbsdelf-eabihf 198 fi 199 ;; 200 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 201 eval $set_cc_for_build 202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 203 | grep -q __ELF__ 204 then 205 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 206 # Return netbsd for either. FIX? 207 os=netbsd 208 else 209 os=netbsdelf 210 fi 211 ;; 212 *) 213 os=netbsd 214 ;; 215 esac 216 # The OS release 217 # Debian GNU/NetBSD machines have a different userland, and 218 # thus, need a distinct triplet. However, they do not need 219 # kernel version information, so it can be replaced with a 220 # suitable tag, in the style of linux-gnu. 221 case "${UNAME_VERSION}" in 222 Debian*) 223 release='-gnu' 224 ;; 225 *) 226 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 227 ;; 228 esac 229 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 230 # contains redundant information, the shorter form: 231 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 232 echo "${machine}-${os}${release}" 233 exit ;; 234 *:Bitrig:*:*) 235 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 236 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 237 exit ;; 238 *:OpenBSD:*:*) 239 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 240 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 241 exit ;; 242 *:ekkoBSD:*:*) 243 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 244 exit ;; 245 *:SolidBSD:*:*) 246 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 247 exit ;; 248 macppc:MirBSD:*:*) 249 echo powerpc-unknown-mirbsd${UNAME_RELEASE} 250 exit ;; 251 *:MirBSD:*:*) 252 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 253 exit ;; 254 alpha:OSF1:*:*) 255 case $UNAME_RELEASE in 256 *4.0) 257 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 258 ;; 259 *5.*) 260 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 261 ;; 262 esac 263 # According to Compaq, /usr/sbin/psrinfo has been available on 264 # OSF/1 and Tru64 systems produced since 1995. I hope that 265 # covers most systems running today. This code pipes the CPU 266 # types through head -n 1, so we only detect the type of CPU 0. 267 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 268 case "$ALPHA_CPU_TYPE" in 269 "EV4 (21064)") 270 UNAME_MACHINE="alpha" ;; 271 "EV4.5 (21064)") 272 UNAME_MACHINE="alpha" ;; 273 "LCA4 (21066/21068)") 274 UNAME_MACHINE="alpha" ;; 275 "EV5 (21164)") 276 UNAME_MACHINE="alphaev5" ;; 277 "EV5.6 (21164A)") 278 UNAME_MACHINE="alphaev56" ;; 279 "EV5.6 (21164PC)") 280 UNAME_MACHINE="alphapca56" ;; 281 "EV5.7 (21164PC)") 282 UNAME_MACHINE="alphapca57" ;; 283 "EV6 (21264)") 284 UNAME_MACHINE="alphaev6" ;; 285 "EV6.7 (21264A)") 286 UNAME_MACHINE="alphaev67" ;; 287 "EV6.8CB (21264C)") 288 UNAME_MACHINE="alphaev68" ;; 289 "EV6.8AL (21264B)") 290 UNAME_MACHINE="alphaev68" ;; 291 "EV6.8CX (21264D)") 292 UNAME_MACHINE="alphaev68" ;; 293 "EV6.9A (21264/EV69A)") 294 UNAME_MACHINE="alphaev69" ;; 295 "EV7 (21364)") 296 UNAME_MACHINE="alphaev7" ;; 297 "EV7.9 (21364A)") 298 UNAME_MACHINE="alphaev79" ;; 299 esac 300 # A Pn.n version is a patched version. 301 # A Vn.n version is a released version. 302 # A Tn.n version is a released field test version. 303 # A Xn.n version is an unreleased experimental baselevel. 304 # 1.2 uses "1.2" for uname -r. 305 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 306 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 307 exitcode=$? 308 trap '' 0 309 exit $exitcode ;; 310 Alpha\ *:Windows_NT*:*) 311 # How do we know it's Interix rather than the generic POSIX subsystem? 312 # Should we change UNAME_MACHINE based on the output of uname instead 313 # of the specific Alpha model? 314 echo alpha-pc-interix 315 exit ;; 316 21064:Windows_NT:50:3) 317 echo alpha-dec-winnt3.5 318 exit ;; 319 Amiga*:UNIX_System_V:4.0:*) 320 echo m68k-unknown-sysv4 321 exit ;; 322 *:[Aa]miga[Oo][Ss]:*:*) 323 echo ${UNAME_MACHINE}-unknown-amigaos 324 exit ;; 325 *:[Mm]orph[Oo][Ss]:*:*) 326 echo ${UNAME_MACHINE}-unknown-morphos 327 exit ;; 328 *:OS/390:*:*) 329 echo i370-ibm-openedition 330 exit ;; 331 *:z/VM:*:*) 332 echo s390-ibm-zvmoe 333 exit ;; 334 *:OS400:*:*) 335 echo powerpc-ibm-os400 336 exit ;; 337 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 338 echo arm-acorn-riscix${UNAME_RELEASE} 339 exit ;; 340 arm*:riscos:*:*|arm*:RISCOS:*:*) 341 echo arm-unknown-riscos 342 exit ;; 343 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 344 echo hppa1.1-hitachi-hiuxmpp 345 exit ;; 346 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 347 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 348 if test "`(/bin/universe) 2>/dev/null`" = att ; then 349 echo pyramid-pyramid-sysv3 350 else 351 echo pyramid-pyramid-bsd 352 fi 353 exit ;; 354 NILE*:*:*:dcosx) 355 echo pyramid-pyramid-svr4 356 exit ;; 357 DRS?6000:unix:4.0:6*) 358 echo sparc-icl-nx6 359 exit ;; 360 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 361 case `/usr/bin/uname -p` in 362 sparc) echo sparc-icl-nx7; exit ;; 363 esac ;; 364 s390x:SunOS:*:*) 365 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 366 exit ;; 367 sun4H:SunOS:5.*:*) 368 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 369 exit ;; 370 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 371 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 372 exit ;; 373 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 374 echo i386-pc-auroraux${UNAME_RELEASE} 375 exit ;; 376 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 377 eval $set_cc_for_build 378 SUN_ARCH="i386" 379 # If there is a compiler, see if it is configured for 64-bit objects. 380 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 381 # This test works for both compilers. 382 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 383 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 384 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 385 grep IS_64BIT_ARCH >/dev/null 386 then 387 SUN_ARCH="x86_64" 388 fi 389 fi 390 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 391 exit ;; 392 sun4*:SunOS:6*:*) 393 # According to config.sub, this is the proper way to canonicalize 394 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 395 # it's likely to be more like Solaris than SunOS4. 396 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 397 exit ;; 398 sun4*:SunOS:*:*) 399 case "`/usr/bin/arch -k`" in 400 Series*|S4*) 401 UNAME_RELEASE=`uname -v` 402 ;; 403 esac 404 # Japanese Language versions have a version number like `4.1.3-JL'. 405 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 406 exit ;; 407 sun3*:SunOS:*:*) 408 echo m68k-sun-sunos${UNAME_RELEASE} 409 exit ;; 410 sun*:*:4.2BSD:*) 411 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 412 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 413 case "`/bin/arch`" in 414 sun3) 415 echo m68k-sun-sunos${UNAME_RELEASE} 416 ;; 417 sun4) 418 echo sparc-sun-sunos${UNAME_RELEASE} 419 ;; 420 esac 421 exit ;; 422 aushp:SunOS:*:*) 423 echo sparc-auspex-sunos${UNAME_RELEASE} 424 exit ;; 425 # The situation for MiNT is a little confusing. The machine name 426 # can be virtually everything (everything which is not 427 # "atarist" or "atariste" at least should have a processor 428 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 429 # to the lowercase version "mint" (or "freemint"). Finally 430 # the system name "TOS" denotes a system which is actually not 431 # MiNT. But MiNT is downward compatible to TOS, so this should 432 # be no problem. 433 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 434 echo m68k-atari-mint${UNAME_RELEASE} 435 exit ;; 436 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 437 echo m68k-atari-mint${UNAME_RELEASE} 438 exit ;; 439 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 440 echo m68k-atari-mint${UNAME_RELEASE} 441 exit ;; 442 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 443 echo m68k-milan-mint${UNAME_RELEASE} 444 exit ;; 445 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 446 echo m68k-hades-mint${UNAME_RELEASE} 447 exit ;; 448 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 449 echo m68k-unknown-mint${UNAME_RELEASE} 450 exit ;; 451 m68k:machten:*:*) 452 echo m68k-apple-machten${UNAME_RELEASE} 453 exit ;; 454 powerpc:machten:*:*) 455 echo powerpc-apple-machten${UNAME_RELEASE} 456 exit ;; 457 RISC*:Mach:*:*) 458 echo mips-dec-mach_bsd4.3 459 exit ;; 460 RISC*:ULTRIX:*:*) 461 echo mips-dec-ultrix${UNAME_RELEASE} 462 exit ;; 463 VAX*:ULTRIX*:*:*) 464 echo vax-dec-ultrix${UNAME_RELEASE} 465 exit ;; 466 2020:CLIX:*:* | 2430:CLIX:*:*) 467 echo clipper-intergraph-clix${UNAME_RELEASE} 468 exit ;; 469 mips:*:*:UMIPS | mips:*:*:RISCos) 470 eval $set_cc_for_build 471 sed 's/^ //' << EOF >$dummy.c 472#ifdef __cplusplus 473#include <stdio.h> /* for printf() prototype */ 474 int main (int argc, char *argv[]) { 475#else 476 int main (argc, argv) int argc; char *argv[]; { 477#endif 478 #if defined (host_mips) && defined (MIPSEB) 479 #if defined (SYSTYPE_SYSV) 480 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 481 #endif 482 #if defined (SYSTYPE_SVR4) 483 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 484 #endif 485 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 486 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 487 #endif 488 #endif 489 exit (-1); 490 } 491EOF 492 $CC_FOR_BUILD -o $dummy $dummy.c && 493 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 494 SYSTEM_NAME=`$dummy $dummyarg` && 495 { echo "$SYSTEM_NAME"; exit; } 496 echo mips-mips-riscos${UNAME_RELEASE} 497 exit ;; 498 Motorola:PowerMAX_OS:*:*) 499 echo powerpc-motorola-powermax 500 exit ;; 501 Motorola:*:4.3:PL8-*) 502 echo powerpc-harris-powermax 503 exit ;; 504 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 505 echo powerpc-harris-powermax 506 exit ;; 507 Night_Hawk:Power_UNIX:*:*) 508 echo powerpc-harris-powerunix 509 exit ;; 510 m88k:CX/UX:7*:*) 511 echo m88k-harris-cxux7 512 exit ;; 513 m88k:*:4*:R4*) 514 echo m88k-motorola-sysv4 515 exit ;; 516 m88k:*:3*:R3*) 517 echo m88k-motorola-sysv3 518 exit ;; 519 AViiON:dgux:*:*) 520 # DG/UX returns AViiON for all architectures 521 UNAME_PROCESSOR=`/usr/bin/uname -p` 522 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 523 then 524 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 525 [ ${TARGET_BINARY_INTERFACE}x = x ] 526 then 527 echo m88k-dg-dgux${UNAME_RELEASE} 528 else 529 echo m88k-dg-dguxbcs${UNAME_RELEASE} 530 fi 531 else 532 echo i586-dg-dgux${UNAME_RELEASE} 533 fi 534 exit ;; 535 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 536 echo m88k-dolphin-sysv3 537 exit ;; 538 M88*:*:R3*:*) 539 # Delta 88k system running SVR3 540 echo m88k-motorola-sysv3 541 exit ;; 542 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 543 echo m88k-tektronix-sysv3 544 exit ;; 545 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 546 echo m68k-tektronix-bsd 547 exit ;; 548 *:IRIX*:*:*) 549 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 550 exit ;; 551 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 552 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 553 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 554 i*86:AIX:*:*) 555 echo i386-ibm-aix 556 exit ;; 557 ia64:AIX:*:*) 558 if [ -x /usr/bin/oslevel ] ; then 559 IBM_REV=`/usr/bin/oslevel` 560 else 561 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 562 fi 563 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 564 exit ;; 565 *:AIX:2:3) 566 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 567 eval $set_cc_for_build 568 sed 's/^ //' << EOF >$dummy.c 569 #include <sys/systemcfg.h> 570 571 main() 572 { 573 if (!__power_pc()) 574 exit(1); 575 puts("powerpc-ibm-aix3.2.5"); 576 exit(0); 577 } 578EOF 579 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 580 then 581 echo "$SYSTEM_NAME" 582 else 583 echo rs6000-ibm-aix3.2.5 584 fi 585 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 586 echo rs6000-ibm-aix3.2.4 587 else 588 echo rs6000-ibm-aix3.2 589 fi 590 exit ;; 591 *:AIX:*:[4567]) 592 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 593 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 594 IBM_ARCH=rs6000 595 else 596 IBM_ARCH=powerpc 597 fi 598 if [ -x /usr/bin/oslevel ] ; then 599 IBM_REV=`/usr/bin/oslevel` 600 else 601 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 602 fi 603 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 604 exit ;; 605 *:AIX:*:*) 606 echo rs6000-ibm-aix 607 exit ;; 608 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 609 echo romp-ibm-bsd4.4 610 exit ;; 611 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 612 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 613 exit ;; # report: romp-ibm BSD 4.3 614 *:BOSX:*:*) 615 echo rs6000-bull-bosx 616 exit ;; 617 DPX/2?00:B.O.S.:*:*) 618 echo m68k-bull-sysv3 619 exit ;; 620 9000/[34]??:4.3bsd:1.*:*) 621 echo m68k-hp-bsd 622 exit ;; 623 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 624 echo m68k-hp-bsd4.4 625 exit ;; 626 9000/[34678]??:HP-UX:*:*) 627 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 628 case "${UNAME_MACHINE}" in 629 9000/31? ) HP_ARCH=m68000 ;; 630 9000/[34]?? ) HP_ARCH=m68k ;; 631 9000/[678][0-9][0-9]) 632 if [ -x /usr/bin/getconf ]; then 633 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 634 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 635 case "${sc_cpu_version}" in 636 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 637 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 638 532) # CPU_PA_RISC2_0 639 case "${sc_kernel_bits}" in 640 32) HP_ARCH="hppa2.0n" ;; 641 64) HP_ARCH="hppa2.0w" ;; 642 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 643 esac ;; 644 esac 645 fi 646 if [ "${HP_ARCH}" = "" ]; then 647 eval $set_cc_for_build 648 sed 's/^ //' << EOF >$dummy.c 649 650 #define _HPUX_SOURCE 651 #include <stdlib.h> 652 #include <unistd.h> 653 654 int main () 655 { 656 #if defined(_SC_KERNEL_BITS) 657 long bits = sysconf(_SC_KERNEL_BITS); 658 #endif 659 long cpu = sysconf (_SC_CPU_VERSION); 660 661 switch (cpu) 662 { 663 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 664 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 665 case CPU_PA_RISC2_0: 666 #if defined(_SC_KERNEL_BITS) 667 switch (bits) 668 { 669 case 64: puts ("hppa2.0w"); break; 670 case 32: puts ("hppa2.0n"); break; 671 default: puts ("hppa2.0"); break; 672 } break; 673 #else /* !defined(_SC_KERNEL_BITS) */ 674 puts ("hppa2.0"); break; 675 #endif 676 default: puts ("hppa1.0"); break; 677 } 678 exit (0); 679 } 680EOF 681 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 682 test -z "$HP_ARCH" && HP_ARCH=hppa 683 fi ;; 684 esac 685 if [ ${HP_ARCH} = "hppa2.0w" ] 686 then 687 eval $set_cc_for_build 688 689 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 690 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 691 # generating 64-bit code. GNU and HP use different nomenclature: 692 # 693 # $ CC_FOR_BUILD=cc ./config.guess 694 # => hppa2.0w-hp-hpux11.23 695 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 696 # => hppa64-hp-hpux11.23 697 698 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 699 grep -q __LP64__ 700 then 701 HP_ARCH="hppa2.0w" 702 else 703 HP_ARCH="hppa64" 704 fi 705 fi 706 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 707 exit ;; 708 ia64:HP-UX:*:*) 709 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 710 echo ia64-hp-hpux${HPUX_REV} 711 exit ;; 712 3050*:HI-UX:*:*) 713 eval $set_cc_for_build 714 sed 's/^ //' << EOF >$dummy.c 715 #include <unistd.h> 716 int 717 main () 718 { 719 long cpu = sysconf (_SC_CPU_VERSION); 720 /* The order matters, because CPU_IS_HP_MC68K erroneously returns 721 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 722 results, however. */ 723 if (CPU_IS_PA_RISC (cpu)) 724 { 725 switch (cpu) 726 { 727 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 728 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 729 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 730 default: puts ("hppa-hitachi-hiuxwe2"); break; 731 } 732 } 733 else if (CPU_IS_HP_MC68K (cpu)) 734 puts ("m68k-hitachi-hiuxwe2"); 735 else puts ("unknown-hitachi-hiuxwe2"); 736 exit (0); 737 } 738EOF 739 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 740 { echo "$SYSTEM_NAME"; exit; } 741 echo unknown-hitachi-hiuxwe2 742 exit ;; 743 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 744 echo hppa1.1-hp-bsd 745 exit ;; 746 9000/8??:4.3bsd:*:*) 747 echo hppa1.0-hp-bsd 748 exit ;; 749 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 750 echo hppa1.0-hp-mpeix 751 exit ;; 752 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 753 echo hppa1.1-hp-osf 754 exit ;; 755 hp8??:OSF1:*:*) 756 echo hppa1.0-hp-osf 757 exit ;; 758 i*86:OSF1:*:*) 759 if [ -x /usr/sbin/sysversion ] ; then 760 echo ${UNAME_MACHINE}-unknown-osf1mk 761 else 762 echo ${UNAME_MACHINE}-unknown-osf1 763 fi 764 exit ;; 765 parisc*:Lites*:*:*) 766 echo hppa1.1-hp-lites 767 exit ;; 768 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 769 echo c1-convex-bsd 770 exit ;; 771 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 772 if getsysinfo -f scalar_acc 773 then echo c32-convex-bsd 774 else echo c2-convex-bsd 775 fi 776 exit ;; 777 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 778 echo c34-convex-bsd 779 exit ;; 780 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 781 echo c38-convex-bsd 782 exit ;; 783 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 784 echo c4-convex-bsd 785 exit ;; 786 CRAY*Y-MP:*:*:*) 787 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 788 exit ;; 789 CRAY*[A-Z]90:*:*:*) 790 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 791 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 792 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 793 -e 's/\.[^.]*$/.X/' 794 exit ;; 795 CRAY*TS:*:*:*) 796 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 797 exit ;; 798 CRAY*T3E:*:*:*) 799 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 800 exit ;; 801 CRAY*SV1:*:*:*) 802 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 803 exit ;; 804 *:UNICOS/mp:*:*) 805 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 806 exit ;; 807 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 808 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 809 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 810 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 811 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 812 exit ;; 813 5000:UNIX_System_V:4.*:*) 814 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 815 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 816 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 817 exit ;; 818 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 819 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 820 exit ;; 821 sparc*:BSD/OS:*:*) 822 echo sparc-unknown-bsdi${UNAME_RELEASE} 823 exit ;; 824 *:BSD/OS:*:*) 825 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 826 exit ;; 827 *:FreeBSD:*:*) 828 UNAME_PROCESSOR=`/usr/bin/uname -p` 829 case ${UNAME_PROCESSOR} in 830 amd64) 831 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 832 *) 833 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 834 esac 835 exit ;; 836 i*:CYGWIN*:*) 837 echo ${UNAME_MACHINE}-pc-cygwin 838 exit ;; 839 *:MINGW64*:*) 840 echo ${UNAME_MACHINE}-pc-mingw64 841 exit ;; 842 *:MINGW*:*) 843 echo ${UNAME_MACHINE}-pc-mingw32 844 exit ;; 845 i*:MSYS*:*) 846 echo ${UNAME_MACHINE}-pc-msys 847 exit ;; 848 i*:windows32*:*) 849 # uname -m includes "-pc" on this system. 850 echo ${UNAME_MACHINE}-mingw32 851 exit ;; 852 i*:PW*:*) 853 echo ${UNAME_MACHINE}-pc-pw32 854 exit ;; 855 *:Interix*:*) 856 case ${UNAME_MACHINE} in 857 x86) 858 echo i586-pc-interix${UNAME_RELEASE} 859 exit ;; 860 authenticamd | genuineintel | EM64T) 861 echo x86_64-unknown-interix${UNAME_RELEASE} 862 exit ;; 863 IA64) 864 echo ia64-unknown-interix${UNAME_RELEASE} 865 exit ;; 866 esac ;; 867 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 868 echo i${UNAME_MACHINE}-pc-mks 869 exit ;; 870 8664:Windows_NT:*) 871 echo x86_64-pc-mks 872 exit ;; 873 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 874 # How do we know it's Interix rather than the generic POSIX subsystem? 875 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 876 # UNAME_MACHINE based on the output of uname instead of i386? 877 echo i586-pc-interix 878 exit ;; 879 i*:UWIN*:*) 880 echo ${UNAME_MACHINE}-pc-uwin 881 exit ;; 882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 883 echo x86_64-unknown-cygwin 884 exit ;; 885 p*:CYGWIN*:*) 886 echo powerpcle-unknown-cygwin 887 exit ;; 888 prep*:SunOS:5.*:*) 889 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 890 exit ;; 891 *:GNU:*:*) 892 # the GNU system 893 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 894 exit ;; 895 *:GNU/*:*:*) 896 # other systems with GNU libc and userland 897 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 898 exit ;; 899 i*86:Minix:*:*) 900 echo ${UNAME_MACHINE}-pc-minix 901 exit ;; 902 aarch64:Linux:*:*) 903 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 904 exit ;; 905 aarch64_be:Linux:*:*) 906 UNAME_MACHINE=aarch64_be 907 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 908 exit ;; 909 alpha:Linux:*:*) 910 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 911 EV5) UNAME_MACHINE=alphaev5 ;; 912 EV56) UNAME_MACHINE=alphaev56 ;; 913 PCA56) UNAME_MACHINE=alphapca56 ;; 914 PCA57) UNAME_MACHINE=alphapca56 ;; 915 EV6) UNAME_MACHINE=alphaev6 ;; 916 EV67) UNAME_MACHINE=alphaev67 ;; 917 EV68*) UNAME_MACHINE=alphaev68 ;; 918 esac 919 objdump --private-headers /bin/sh | grep -q ld.so.1 920 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 921 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 922 exit ;; 923 arc:Linux:*:* | arceb:Linux:*:*) 924 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 925 exit ;; 926 arm*:Linux:*:*) 927 eval $set_cc_for_build 928 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 929 | grep -q __ARM_EABI__ 930 then 931 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 932 else 933 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 934 | grep -q __ARM_PCS_VFP 935 then 936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 937 else 938 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 939 fi 940 fi 941 exit ;; 942 avr32*:Linux:*:*) 943 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 944 exit ;; 945 cris:Linux:*:*) 946 echo ${UNAME_MACHINE}-axis-linux-${LIBC} 947 exit ;; 948 crisv32:Linux:*:*) 949 echo ${UNAME_MACHINE}-axis-linux-${LIBC} 950 exit ;; 951 frv:Linux:*:*) 952 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 953 exit ;; 954 hexagon:Linux:*:*) 955 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 956 exit ;; 957 i*86:Linux:*:*) 958 echo ${UNAME_MACHINE}-pc-linux-${LIBC} 959 exit ;; 960 ia64:Linux:*:*) 961 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 962 exit ;; 963 m32r*:Linux:*:*) 964 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 965 exit ;; 966 m68*:Linux:*:*) 967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 968 exit ;; 969 mips:Linux:*:* | mips64:Linux:*:*) 970 eval $set_cc_for_build 971 sed 's/^ //' << EOF >$dummy.c 972 #undef CPU 973 #undef ${UNAME_MACHINE} 974 #undef ${UNAME_MACHINE}el 975 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 976 CPU=${UNAME_MACHINE}el 977 #else 978 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 979 CPU=${UNAME_MACHINE} 980 #else 981 CPU= 982 #endif 983 #endif 984EOF 985 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 986 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 987 ;; 988 or1k:Linux:*:*) 989 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 990 exit ;; 991 or32:Linux:*:*) 992 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 993 exit ;; 994 padre:Linux:*:*) 995 echo sparc-unknown-linux-${LIBC} 996 exit ;; 997 parisc64:Linux:*:* | hppa64:Linux:*:*) 998 echo hppa64-unknown-linux-${LIBC} 999 exit ;; 1000 parisc:Linux:*:* | hppa:Linux:*:*) 1001 # Look for CPU level 1002 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1003 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 1004 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 1005 *) echo hppa-unknown-linux-${LIBC} ;; 1006 esac 1007 exit ;; 1008 ppc64:Linux:*:*) 1009 echo powerpc64-unknown-linux-${LIBC} 1010 exit ;; 1011 ppc:Linux:*:*) 1012 echo powerpc-unknown-linux-${LIBC} 1013 exit ;; 1014 ppc64le:Linux:*:*) 1015 echo powerpc64le-unknown-linux-${LIBC} 1016 exit ;; 1017 ppcle:Linux:*:*) 1018 echo powerpcle-unknown-linux-${LIBC} 1019 exit ;; 1020 s390:Linux:*:* | s390x:Linux:*:*) 1021 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1022 exit ;; 1023 sh64*:Linux:*:*) 1024 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1025 exit ;; 1026 sh*:Linux:*:*) 1027 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028 exit ;; 1029 sparc:Linux:*:* | sparc64:Linux:*:*) 1030 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1031 exit ;; 1032 tile*:Linux:*:*) 1033 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1034 exit ;; 1035 vax:Linux:*:*) 1036 echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1037 exit ;; 1038 x86_64:Linux:*:*) 1039 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1040 exit ;; 1041 xtensa*:Linux:*:*) 1042 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1043 exit ;; 1044 i*86:DYNIX/ptx:4*:*) 1045 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1046 # earlier versions are messed up and put the nodename in both 1047 # sysname and nodename. 1048 echo i386-sequent-sysv4 1049 exit ;; 1050 i*86:UNIX_SV:4.2MP:2.*) 1051 # Unixware is an offshoot of SVR4, but it has its own version 1052 # number series starting with 2... 1053 # I am not positive that other SVR4 systems won't match this, 1054 # I just have to hope. -- rms. 1055 # Use sysv4.2uw... so that sysv4* matches it. 1056 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1057 exit ;; 1058 i*86:OS/2:*:*) 1059 # If we were able to find `uname', then EMX Unix compatibility 1060 # is probably installed. 1061 echo ${UNAME_MACHINE}-pc-os2-emx 1062 exit ;; 1063 i*86:XTS-300:*:STOP) 1064 echo ${UNAME_MACHINE}-unknown-stop 1065 exit ;; 1066 i*86:atheos:*:*) 1067 echo ${UNAME_MACHINE}-unknown-atheos 1068 exit ;; 1069 i*86:syllable:*:*) 1070 echo ${UNAME_MACHINE}-pc-syllable 1071 exit ;; 1072 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1073 echo i386-unknown-lynxos${UNAME_RELEASE} 1074 exit ;; 1075 i*86:*DOS:*:*) 1076 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1077 exit ;; 1078 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1079 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1080 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1081 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1082 else 1083 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1084 fi 1085 exit ;; 1086 i*86:*:5:[678]*) 1087 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1088 case `/bin/uname -X | grep "^Machine"` in 1089 *486*) UNAME_MACHINE=i486 ;; 1090 *Pentium) UNAME_MACHINE=i586 ;; 1091 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1092 esac 1093 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1094 exit ;; 1095 i*86:*:3.2:*) 1096 if test -f /usr/options/cb.name; then 1097 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1098 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1099 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1100 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1101 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1102 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1103 && UNAME_MACHINE=i586 1104 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1105 && UNAME_MACHINE=i686 1106 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1107 && UNAME_MACHINE=i686 1108 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1109 else 1110 echo ${UNAME_MACHINE}-pc-sysv32 1111 fi 1112 exit ;; 1113 pc:*:*:*) 1114 # Left here for compatibility: 1115 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1116 # the processor, so we play safe by assuming i586. 1117 # Note: whatever this is, it MUST be the same as what config.sub 1118 # prints for the "djgpp" host, or else GDB configury will decide that 1119 # this is a cross-build. 1120 echo i586-pc-msdosdjgpp 1121 exit ;; 1122 Intel:Mach:3*:*) 1123 echo i386-pc-mach3 1124 exit ;; 1125 paragon:*:*:*) 1126 echo i860-intel-osf1 1127 exit ;; 1128 i860:*:4.*:*) # i860-SVR4 1129 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1130 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1131 else # Add other i860-SVR4 vendors below as they are discovered. 1132 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1133 fi 1134 exit ;; 1135 mini*:CTIX:SYS*5:*) 1136 # "miniframe" 1137 echo m68010-convergent-sysv 1138 exit ;; 1139 mc68k:UNIX:SYSTEM5:3.51m) 1140 echo m68k-convergent-sysv 1141 exit ;; 1142 M680?0:D-NIX:5.3:*) 1143 echo m68k-diab-dnix 1144 exit ;; 1145 M68*:*:R3V[5678]*:*) 1146 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1147 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 1148 OS_REL='' 1149 test -r /etc/.relid \ 1150 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1151 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1152 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1153 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1154 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1155 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1156 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1157 && { echo i486-ncr-sysv4; exit; } ;; 1158 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1159 OS_REL='.3' 1160 test -r /etc/.relid \ 1161 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1162 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1163 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1164 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1165 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1166 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1167 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1168 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1169 echo m68k-unknown-lynxos${UNAME_RELEASE} 1170 exit ;; 1171 mc68030:UNIX_System_V:4.*:*) 1172 echo m68k-atari-sysv4 1173 exit ;; 1174 TSUNAMI:LynxOS:2.*:*) 1175 echo sparc-unknown-lynxos${UNAME_RELEASE} 1176 exit ;; 1177 rs6000:LynxOS:2.*:*) 1178 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1179 exit ;; 1180 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1181 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1182 exit ;; 1183 SM[BE]S:UNIX_SV:*:*) 1184 echo mips-dde-sysv${UNAME_RELEASE} 1185 exit ;; 1186 RM*:ReliantUNIX-*:*:*) 1187 echo mips-sni-sysv4 1188 exit ;; 1189 RM*:SINIX-*:*:*) 1190 echo mips-sni-sysv4 1191 exit ;; 1192 *:SINIX-*:*:*) 1193 if uname -p 2>/dev/null >/dev/null ; then 1194 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1195 echo ${UNAME_MACHINE}-sni-sysv4 1196 else 1197 echo ns32k-sni-sysv 1198 fi 1199 exit ;; 1200 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1201 # says <Richard.M.Bartel@ccMail.Census.GOV> 1202 echo i586-unisys-sysv4 1203 exit ;; 1204 *:UNIX_System_V:4*:FTX*) 1205 # From Gerald Hewes <hewes@openmarket.com>. 1206 # How about differentiating between stratus architectures? -djm 1207 echo hppa1.1-stratus-sysv4 1208 exit ;; 1209 *:*:*:FTX*) 1210 # From seanf@swdc.stratus.com. 1211 echo i860-stratus-sysv4 1212 exit ;; 1213 i*86:VOS:*:*) 1214 # From Paul.Green@stratus.com. 1215 echo ${UNAME_MACHINE}-stratus-vos 1216 exit ;; 1217 *:VOS:*:*) 1218 # From Paul.Green@stratus.com. 1219 echo hppa1.1-stratus-vos 1220 exit ;; 1221 mc68*:A/UX:*:*) 1222 echo m68k-apple-aux${UNAME_RELEASE} 1223 exit ;; 1224 news*:NEWS-OS:6*:*) 1225 echo mips-sony-newsos6 1226 exit ;; 1227 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1228 if [ -d /usr/nec ]; then 1229 echo mips-nec-sysv${UNAME_RELEASE} 1230 else 1231 echo mips-unknown-sysv${UNAME_RELEASE} 1232 fi 1233 exit ;; 1234 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1235 echo powerpc-be-beos 1236 exit ;; 1237 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1238 echo powerpc-apple-beos 1239 exit ;; 1240 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1241 echo i586-pc-beos 1242 exit ;; 1243 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1244 echo i586-pc-haiku 1245 exit ;; 1246 x86_64:Haiku:*:*) 1247 echo x86_64-unknown-haiku 1248 exit ;; 1249 SX-4:SUPER-UX:*:*) 1250 echo sx4-nec-superux${UNAME_RELEASE} 1251 exit ;; 1252 SX-5:SUPER-UX:*:*) 1253 echo sx5-nec-superux${UNAME_RELEASE} 1254 exit ;; 1255 SX-6:SUPER-UX:*:*) 1256 echo sx6-nec-superux${UNAME_RELEASE} 1257 exit ;; 1258 SX-7:SUPER-UX:*:*) 1259 echo sx7-nec-superux${UNAME_RELEASE} 1260 exit ;; 1261 SX-8:SUPER-UX:*:*) 1262 echo sx8-nec-superux${UNAME_RELEASE} 1263 exit ;; 1264 SX-8R:SUPER-UX:*:*) 1265 echo sx8r-nec-superux${UNAME_RELEASE} 1266 exit ;; 1267 Power*:Rhapsody:*:*) 1268 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1269 exit ;; 1270 *:Rhapsody:*:*) 1271 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1272 exit ;; 1273 *:Darwin:*:*) 1274 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1275 eval $set_cc_for_build 1276 if test "$UNAME_PROCESSOR" = unknown ; then 1277 UNAME_PROCESSOR=powerpc 1278 fi 1279 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1280 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1281 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1282 grep IS_64BIT_ARCH >/dev/null 1283 then 1284 case $UNAME_PROCESSOR in 1285 i386) UNAME_PROCESSOR=x86_64 ;; 1286 powerpc) UNAME_PROCESSOR=powerpc64 ;; 1287 esac 1288 fi 1289 fi 1290 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1291 exit ;; 1292 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1293 UNAME_PROCESSOR=`uname -p` 1294 if test "$UNAME_PROCESSOR" = "x86"; then 1295 UNAME_PROCESSOR=i386 1296 UNAME_MACHINE=pc 1297 fi 1298 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1299 exit ;; 1300 *:QNX:*:4*) 1301 echo i386-pc-qnx 1302 exit ;; 1303 NEO-?:NONSTOP_KERNEL:*:*) 1304 echo neo-tandem-nsk${UNAME_RELEASE} 1305 exit ;; 1306 NSE-*:NONSTOP_KERNEL:*:*) 1307 echo nse-tandem-nsk${UNAME_RELEASE} 1308 exit ;; 1309 NSR-?:NONSTOP_KERNEL:*:*) 1310 echo nsr-tandem-nsk${UNAME_RELEASE} 1311 exit ;; 1312 *:NonStop-UX:*:*) 1313 echo mips-compaq-nonstopux 1314 exit ;; 1315 BS2000:POSIX*:*:*) 1316 echo bs2000-siemens-sysv 1317 exit ;; 1318 DS/*:UNIX_System_V:*:*) 1319 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1320 exit ;; 1321 *:Plan9:*:*) 1322 # "uname -m" is not consistent, so use $cputype instead. 386 1323 # is converted to i386 for consistency with other x86 1324 # operating systems. 1325 if test "$cputype" = "386"; then 1326 UNAME_MACHINE=i386 1327 else 1328 UNAME_MACHINE="$cputype" 1329 fi 1330 echo ${UNAME_MACHINE}-unknown-plan9 1331 exit ;; 1332 *:TOPS-10:*:*) 1333 echo pdp10-unknown-tops10 1334 exit ;; 1335 *:TENEX:*:*) 1336 echo pdp10-unknown-tenex 1337 exit ;; 1338 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1339 echo pdp10-dec-tops20 1340 exit ;; 1341 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1342 echo pdp10-xkl-tops20 1343 exit ;; 1344 *:TOPS-20:*:*) 1345 echo pdp10-unknown-tops20 1346 exit ;; 1347 *:ITS:*:*) 1348 echo pdp10-unknown-its 1349 exit ;; 1350 SEI:*:*:SEIUX) 1351 echo mips-sei-seiux${UNAME_RELEASE} 1352 exit ;; 1353 *:DragonFly:*:*) 1354 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1355 exit ;; 1356 *:*VMS:*:*) 1357 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1358 case "${UNAME_MACHINE}" in 1359 A*) echo alpha-dec-vms ; exit ;; 1360 I*) echo ia64-dec-vms ; exit ;; 1361 V*) echo vax-dec-vms ; exit ;; 1362 esac ;; 1363 *:XENIX:*:SysV) 1364 echo i386-pc-xenix 1365 exit ;; 1366 i*86:skyos:*:*) 1367 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1368 exit ;; 1369 i*86:rdos:*:*) 1370 echo ${UNAME_MACHINE}-pc-rdos 1371 exit ;; 1372 i*86:AROS:*:*) 1373 echo ${UNAME_MACHINE}-pc-aros 1374 exit ;; 1375 x86_64:VMkernel:*:*) 1376 echo ${UNAME_MACHINE}-unknown-esx 1377 exit ;; 1378esac 1379 1380eval $set_cc_for_build 1381cat >$dummy.c <<EOF 1382#ifdef _SEQUENT_ 1383# include <sys/types.h> 1384# include <sys/utsname.h> 1385#endif 1386main () 1387{ 1388#if defined (sony) 1389#if defined (MIPSEB) 1390 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1391 I don't know.... */ 1392 printf ("mips-sony-bsd\n"); exit (0); 1393#else 1394#include <sys/param.h> 1395 printf ("m68k-sony-newsos%s\n", 1396#ifdef NEWSOS4 1397 "4" 1398#else 1399 "" 1400#endif 1401 ); exit (0); 1402#endif 1403#endif 1404 1405#if defined (__arm) && defined (__acorn) && defined (__unix) 1406 printf ("arm-acorn-riscix\n"); exit (0); 1407#endif 1408 1409#if defined (hp300) && !defined (hpux) 1410 printf ("m68k-hp-bsd\n"); exit (0); 1411#endif 1412 1413#if defined (NeXT) 1414#if !defined (__ARCHITECTURE__) 1415#define __ARCHITECTURE__ "m68k" 1416#endif 1417 int version; 1418 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1419 if (version < 4) 1420 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1421 else 1422 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1423 exit (0); 1424#endif 1425 1426#if defined (MULTIMAX) || defined (n16) 1427#if defined (UMAXV) 1428 printf ("ns32k-encore-sysv\n"); exit (0); 1429#else 1430#if defined (CMU) 1431 printf ("ns32k-encore-mach\n"); exit (0); 1432#else 1433 printf ("ns32k-encore-bsd\n"); exit (0); 1434#endif 1435#endif 1436#endif 1437 1438#if defined (__386BSD__) 1439 printf ("i386-pc-bsd\n"); exit (0); 1440#endif 1441 1442#if defined (sequent) 1443#if defined (i386) 1444 printf ("i386-sequent-dynix\n"); exit (0); 1445#endif 1446#if defined (ns32000) 1447 printf ("ns32k-sequent-dynix\n"); exit (0); 1448#endif 1449#endif 1450 1451#if defined (_SEQUENT_) 1452 struct utsname un; 1453 1454 uname(&un); 1455 1456 if (strncmp(un.version, "V2", 2) == 0) { 1457 printf ("i386-sequent-ptx2\n"); exit (0); 1458 } 1459 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1460 printf ("i386-sequent-ptx1\n"); exit (0); 1461 } 1462 printf ("i386-sequent-ptx\n"); exit (0); 1463 1464#endif 1465 1466#if defined (vax) 1467# if !defined (ultrix) 1468# include <sys/param.h> 1469# if defined (BSD) 1470# if BSD == 43 1471 printf ("vax-dec-bsd4.3\n"); exit (0); 1472# else 1473# if BSD == 199006 1474 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1475# else 1476 printf ("vax-dec-bsd\n"); exit (0); 1477# endif 1478# endif 1479# else 1480 printf ("vax-dec-bsd\n"); exit (0); 1481# endif 1482# else 1483 printf ("vax-dec-ultrix\n"); exit (0); 1484# endif 1485#endif 1486 1487#if defined (alliant) && defined (i860) 1488 printf ("i860-alliant-bsd\n"); exit (0); 1489#endif 1490 1491 exit (1); 1492} 1493EOF 1494 1495$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1496 { echo "$SYSTEM_NAME"; exit; } 1497 1498# Apollos put the system type in the environment. 1499 1500test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1501 1502# Convex versions that predate uname can use getsysinfo(1) 1503 1504if [ -x /usr/convex/getsysinfo ] 1505then 1506 case `getsysinfo -f cpu_type` in 1507 c1*) 1508 echo c1-convex-bsd 1509 exit ;; 1510 c2*) 1511 if getsysinfo -f scalar_acc 1512 then echo c32-convex-bsd 1513 else echo c2-convex-bsd 1514 fi 1515 exit ;; 1516 c34*) 1517 echo c34-convex-bsd 1518 exit ;; 1519 c38*) 1520 echo c38-convex-bsd 1521 exit ;; 1522 c4*) 1523 echo c4-convex-bsd 1524 exit ;; 1525 esac 1526fi 1527 1528cat >&2 <<EOF 1529$0: unable to guess system type 1530 1531This script, last modified $timestamp, has failed to recognize 1532the operating system you are using. It is advised that you 1533download the most up to date version of the config scripts from 1534 1535 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1536and 1537 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1538 1539If the version you run ($0) is already up to date, please 1540send the following data and any information you think might be 1541pertinent to <config-patches@gnu.org> in order to provide the needed 1542information to handle your system. 1543 1544config.guess timestamp = $timestamp 1545 1546uname -m = `(uname -m) 2>/dev/null || echo unknown` 1547uname -r = `(uname -r) 2>/dev/null || echo unknown` 1548uname -s = `(uname -s) 2>/dev/null || echo unknown` 1549uname -v = `(uname -v) 2>/dev/null || echo unknown` 1550 1551/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1552/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1553 1554hostinfo = `(hostinfo) 2>/dev/null` 1555/bin/universe = `(/bin/universe) 2>/dev/null` 1556/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1557/bin/arch = `(/bin/arch) 2>/dev/null` 1558/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1559/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1560 1561UNAME_MACHINE = ${UNAME_MACHINE} 1562UNAME_RELEASE = ${UNAME_RELEASE} 1563UNAME_SYSTEM = ${UNAME_SYSTEM} 1564UNAME_VERSION = ${UNAME_VERSION} 1565EOF 1566 1567exit 1 1568 1569# Local variables: 1570# eval: (add-hook 'write-file-hooks 'time-stamp) 1571# time-stamp-start: "timestamp='" 1572# time-stamp-format: "%:y-%02m-%02d" 1573# time-stamp-end: "'" 1574# End: 1575