1238104Sdes#! /bin/sh 2238104Sdes# Attempt to guess a canonical system name. 3238104Sdes# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4238104Sdes# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 5238104Sdes# 2011, 2012 Free Software Foundation, Inc. 6238104Sdes 7238104Sdestimestamp='2012-02-10' 8238104Sdes 9238104Sdes# This file is free software; you can redistribute it and/or modify it 10238104Sdes# under the terms of the GNU General Public License as published by 11238104Sdes# the Free Software Foundation; either version 2 of the License, or 12238104Sdes# (at your option) any later version. 13238104Sdes# 14238104Sdes# This program is distributed in the hope that it will be useful, but 15238104Sdes# WITHOUT ANY WARRANTY; without even the implied warranty of 16238104Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17238104Sdes# General Public License for more details. 18238104Sdes# 19238104Sdes# You should have received a copy of the GNU General Public License 20238104Sdes# along with this program; if not, see <http://www.gnu.org/licenses/>. 21238104Sdes# 22238104Sdes# As a special exception to the GNU General Public License, if you 23238104Sdes# distribute this file as part of a program that contains a 24238104Sdes# configuration script generated by Autoconf, you may include it under 25238104Sdes# the same distribution terms that you use for the rest of that program. 26238104Sdes 27238104Sdes 28238104Sdes# Originally written by Per Bothner. Please send patches (context 29238104Sdes# diff format) to <config-patches@gnu.org> and include a ChangeLog 30238104Sdes# entry. 31238104Sdes# 32238104Sdes# This script attempts to guess a canonical system name similar to 33238104Sdes# config.sub. If it succeeds, it prints the system name on stdout, and 34238104Sdes# exits with 0. Otherwise, it exits with 1. 35238104Sdes# 36238104Sdes# You can get the latest version of this script from: 37238104Sdes# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 38238104Sdes 39238104Sdesme=`echo "$0" | sed -e 's,.*/,,'` 40238104Sdes 41238104Sdesusage="\ 42238104SdesUsage: $0 [OPTION] 43238104Sdes 44238104SdesOutput the configuration name of the system \`$me' is run on. 45238104Sdes 46238104SdesOperation modes: 47238104Sdes -h, --help print this help, then exit 48238104Sdes -t, --time-stamp print date of last modification, then exit 49238104Sdes -v, --version print version number, then exit 50238104Sdes 51238104SdesReport bugs and patches to <config-patches@gnu.org>." 52238104Sdes 53238104Sdesversion="\ 54238104SdesGNU config.guess ($timestamp) 55238104Sdes 56238104SdesOriginally written by Per Bothner. 57238104SdesCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 58238104Sdes2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 59238104SdesFree Software Foundation, Inc. 60238104Sdes 61238104SdesThis is free software; see the source for copying conditions. There is NO 62238104Sdeswarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 63238104Sdes 64238104Sdeshelp=" 65238104SdesTry \`$me --help' for more information." 66238104Sdes 67238104Sdes# Parse command line 68238104Sdeswhile test $# -gt 0 ; do 69238104Sdes case $1 in 70238104Sdes --time-stamp | --time* | -t ) 71238104Sdes echo "$timestamp" ; exit ;; 72238104Sdes --version | -v ) 73238104Sdes echo "$version" ; exit ;; 74238104Sdes --help | --h* | -h ) 75238104Sdes echo "$usage"; exit ;; 76238104Sdes -- ) # Stop option processing 77238104Sdes shift; break ;; 78238104Sdes - ) # Use stdin as input. 79238104Sdes break ;; 80238104Sdes -* ) 81238104Sdes echo "$me: invalid option $1$help" >&2 82238104Sdes exit 1 ;; 83238104Sdes * ) 84238104Sdes break ;; 85238104Sdes esac 86238104Sdesdone 87238104Sdes 88238104Sdesif test $# != 0; then 89238104Sdes echo "$me: too many arguments$help" >&2 90238104Sdes exit 1 91238104Sdesfi 92238104Sdes 93238104Sdestrap 'exit 1' 1 2 15 94238104Sdes 95238104Sdes# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 96238104Sdes# compiler to aid in system detection is discouraged as it requires 97238104Sdes# temporary files to be created and, as you can see below, it is a 98238104Sdes# headache to deal with in a portable fashion. 99238104Sdes 100238104Sdes# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 101238104Sdes# use `HOST_CC' if defined, but it is deprecated. 102238104Sdes 103238104Sdes# Portable tmp directory creation inspired by the Autoconf team. 104238104Sdes 105238104Sdesset_cc_for_build=' 106238104Sdestrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 107238104Sdestrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 108238104Sdes: ${TMPDIR=/tmp} ; 109238104Sdes { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 110238104Sdes { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 111238104Sdes { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 112238104Sdes { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 113238104Sdesdummy=$tmp/dummy ; 114238104Sdestmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 115238104Sdescase $CC_FOR_BUILD,$HOST_CC,$CC in 116238104Sdes ,,) echo "int x;" > $dummy.c ; 117238104Sdes for c in cc gcc c89 c99 ; do 118238104Sdes if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 119238104Sdes CC_FOR_BUILD="$c"; break ; 120238104Sdes fi ; 121238104Sdes done ; 122238104Sdes if test x"$CC_FOR_BUILD" = x ; then 123238104Sdes CC_FOR_BUILD=no_compiler_found ; 124238104Sdes fi 125238104Sdes ;; 126238104Sdes ,,*) CC_FOR_BUILD=$CC ;; 127238104Sdes ,*,*) CC_FOR_BUILD=$HOST_CC ;; 128238104Sdesesac ; set_cc_for_build= ;' 129238104Sdes 130238104Sdes# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 131238104Sdes# (ghazi@noc.rutgers.edu 1994-08-24) 132238104Sdesif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 133238104Sdes PATH=$PATH:/.attbin ; export PATH 134238104Sdesfi 135238104Sdes 136238104SdesUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 137238104SdesUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 138238104SdesUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 139238104SdesUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 140238104Sdes 141238104Sdes# Note: order is significant - the case branches are not exclusive. 142238104Sdes 143238104Sdescase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 144238104Sdes *:NetBSD:*:*) 145238104Sdes # NetBSD (nbsd) targets should (where applicable) match one or 146238104Sdes # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 147238104Sdes # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 148238104Sdes # switched to ELF, *-*-netbsd* would select the old 149238104Sdes # object file format. This provides both forward 150238104Sdes # compatibility and a consistent mechanism for selecting the 151238104Sdes # object file format. 152238104Sdes # 153238104Sdes # Note: NetBSD doesn't particularly care about the vendor 154238104Sdes # portion of the name. We always set it to "unknown". 155238104Sdes sysctl="sysctl -n hw.machine_arch" 156238104Sdes UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 157238104Sdes /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 158238104Sdes case "${UNAME_MACHINE_ARCH}" in 159238104Sdes armeb) machine=armeb-unknown ;; 160238104Sdes arm*) machine=arm-unknown ;; 161238104Sdes sh3el) machine=shl-unknown ;; 162238104Sdes sh3eb) machine=sh-unknown ;; 163238104Sdes sh5el) machine=sh5le-unknown ;; 164238104Sdes *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 165238104Sdes esac 166238104Sdes # The Operating System including object format, if it has switched 167238104Sdes # to ELF recently, or will in the future. 168238104Sdes case "${UNAME_MACHINE_ARCH}" in 169238104Sdes arm*|i386|m68k|ns32k|sh3*|sparc|vax) 170238104Sdes eval $set_cc_for_build 171238104Sdes if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 172238104Sdes | grep -q __ELF__ 173238104Sdes then 174238104Sdes # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 175238104Sdes # Return netbsd for either. FIX? 176238104Sdes os=netbsd 177238104Sdes else 178238104Sdes os=netbsdelf 179238104Sdes fi 180238104Sdes ;; 181238104Sdes *) 182238104Sdes os=netbsd 183238104Sdes ;; 184238104Sdes esac 185238104Sdes # The OS release 186238104Sdes # Debian GNU/NetBSD machines have a different userland, and 187238104Sdes # thus, need a distinct triplet. However, they do not need 188238104Sdes # kernel version information, so it can be replaced with a 189238104Sdes # suitable tag, in the style of linux-gnu. 190238104Sdes case "${UNAME_VERSION}" in 191238104Sdes Debian*) 192238104Sdes release='-gnu' 193238104Sdes ;; 194238104Sdes *) 195238104Sdes release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 196238104Sdes ;; 197238104Sdes esac 198238104Sdes # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 199238104Sdes # contains redundant information, the shorter form: 200238104Sdes # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 201238104Sdes echo "${machine}-${os}${release}" 202238104Sdes exit ;; 203238104Sdes *:OpenBSD:*:*) 204238104Sdes UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 205238104Sdes echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 206238104Sdes exit ;; 207238104Sdes *:ekkoBSD:*:*) 208238104Sdes echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 209238104Sdes exit ;; 210238104Sdes *:SolidBSD:*:*) 211238104Sdes echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 212238104Sdes exit ;; 213238104Sdes macppc:MirBSD:*:*) 214238104Sdes echo powerpc-unknown-mirbsd${UNAME_RELEASE} 215238104Sdes exit ;; 216238104Sdes *:MirBSD:*:*) 217238104Sdes echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 218238104Sdes exit ;; 219238104Sdes alpha:OSF1:*:*) 220238104Sdes case $UNAME_RELEASE in 221238104Sdes *4.0) 222238104Sdes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 223238104Sdes ;; 224238104Sdes *5.*) 225238104Sdes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 226238104Sdes ;; 227238104Sdes esac 228238104Sdes # According to Compaq, /usr/sbin/psrinfo has been available on 229238104Sdes # OSF/1 and Tru64 systems produced since 1995. I hope that 230238104Sdes # covers most systems running today. This code pipes the CPU 231238104Sdes # types through head -n 1, so we only detect the type of CPU 0. 232238104Sdes ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 233238104Sdes case "$ALPHA_CPU_TYPE" in 234238104Sdes "EV4 (21064)") 235238104Sdes UNAME_MACHINE="alpha" ;; 236238104Sdes "EV4.5 (21064)") 237238104Sdes UNAME_MACHINE="alpha" ;; 238238104Sdes "LCA4 (21066/21068)") 239238104Sdes UNAME_MACHINE="alpha" ;; 240238104Sdes "EV5 (21164)") 241238104Sdes UNAME_MACHINE="alphaev5" ;; 242238104Sdes "EV5.6 (21164A)") 243238104Sdes UNAME_MACHINE="alphaev56" ;; 244238104Sdes "EV5.6 (21164PC)") 245238104Sdes UNAME_MACHINE="alphapca56" ;; 246238104Sdes "EV5.7 (21164PC)") 247238104Sdes UNAME_MACHINE="alphapca57" ;; 248238104Sdes "EV6 (21264)") 249238104Sdes UNAME_MACHINE="alphaev6" ;; 250238104Sdes "EV6.7 (21264A)") 251238104Sdes UNAME_MACHINE="alphaev67" ;; 252238104Sdes "EV6.8CB (21264C)") 253238104Sdes UNAME_MACHINE="alphaev68" ;; 254238104Sdes "EV6.8AL (21264B)") 255238104Sdes UNAME_MACHINE="alphaev68" ;; 256238104Sdes "EV6.8CX (21264D)") 257238104Sdes UNAME_MACHINE="alphaev68" ;; 258238104Sdes "EV6.9A (21264/EV69A)") 259238104Sdes UNAME_MACHINE="alphaev69" ;; 260238104Sdes "EV7 (21364)") 261238104Sdes UNAME_MACHINE="alphaev7" ;; 262238104Sdes "EV7.9 (21364A)") 263238104Sdes UNAME_MACHINE="alphaev79" ;; 264238104Sdes esac 265238104Sdes # A Pn.n version is a patched version. 266238104Sdes # A Vn.n version is a released version. 267238104Sdes # A Tn.n version is a released field test version. 268238104Sdes # A Xn.n version is an unreleased experimental baselevel. 269238104Sdes # 1.2 uses "1.2" for uname -r. 270238104Sdes echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 271238104Sdes # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 272238104Sdes exitcode=$? 273238104Sdes trap '' 0 274238104Sdes exit $exitcode ;; 275238104Sdes Alpha\ *:Windows_NT*:*) 276238104Sdes # How do we know it's Interix rather than the generic POSIX subsystem? 277238104Sdes # Should we change UNAME_MACHINE based on the output of uname instead 278238104Sdes # of the specific Alpha model? 279238104Sdes echo alpha-pc-interix 280238104Sdes exit ;; 281238104Sdes 21064:Windows_NT:50:3) 282238104Sdes echo alpha-dec-winnt3.5 283238104Sdes exit ;; 284238104Sdes Amiga*:UNIX_System_V:4.0:*) 285238104Sdes echo m68k-unknown-sysv4 286238104Sdes exit ;; 287238104Sdes *:[Aa]miga[Oo][Ss]:*:*) 288238104Sdes echo ${UNAME_MACHINE}-unknown-amigaos 289238104Sdes exit ;; 290238104Sdes *:[Mm]orph[Oo][Ss]:*:*) 291238104Sdes echo ${UNAME_MACHINE}-unknown-morphos 292238104Sdes exit ;; 293238104Sdes *:OS/390:*:*) 294238104Sdes echo i370-ibm-openedition 295238104Sdes exit ;; 296238104Sdes *:z/VM:*:*) 297238104Sdes echo s390-ibm-zvmoe 298238104Sdes exit ;; 299238104Sdes *:OS400:*:*) 300238104Sdes echo powerpc-ibm-os400 301238104Sdes exit ;; 302238104Sdes arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 303238104Sdes echo arm-acorn-riscix${UNAME_RELEASE} 304238104Sdes exit ;; 305238104Sdes arm:riscos:*:*|arm:RISCOS:*:*) 306238104Sdes echo arm-unknown-riscos 307238104Sdes exit ;; 308238104Sdes SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 309238104Sdes echo hppa1.1-hitachi-hiuxmpp 310238104Sdes exit ;; 311238104Sdes Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 312238104Sdes # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 313238104Sdes if test "`(/bin/universe) 2>/dev/null`" = att ; then 314238104Sdes echo pyramid-pyramid-sysv3 315238104Sdes else 316238104Sdes echo pyramid-pyramid-bsd 317238104Sdes fi 318238104Sdes exit ;; 319238104Sdes NILE*:*:*:dcosx) 320238104Sdes echo pyramid-pyramid-svr4 321238104Sdes exit ;; 322238104Sdes DRS?6000:unix:4.0:6*) 323238104Sdes echo sparc-icl-nx6 324238104Sdes exit ;; 325238104Sdes DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 326238104Sdes case `/usr/bin/uname -p` in 327238104Sdes sparc) echo sparc-icl-nx7; exit ;; 328238104Sdes esac ;; 329238104Sdes s390x:SunOS:*:*) 330238104Sdes echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 331238104Sdes exit ;; 332238104Sdes sun4H:SunOS:5.*:*) 333238104Sdes echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 334238104Sdes exit ;; 335238104Sdes sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 336238104Sdes echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 337238104Sdes exit ;; 338238104Sdes i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 339238104Sdes echo i386-pc-auroraux${UNAME_RELEASE} 340238104Sdes exit ;; 341238104Sdes i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 342238104Sdes eval $set_cc_for_build 343238104Sdes SUN_ARCH="i386" 344238104Sdes # If there is a compiler, see if it is configured for 64-bit objects. 345238104Sdes # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 346238104Sdes # This test works for both compilers. 347238104Sdes if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 348238104Sdes if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 349238104Sdes (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 350238104Sdes grep IS_64BIT_ARCH >/dev/null 351238104Sdes then 352238104Sdes SUN_ARCH="x86_64" 353238104Sdes fi 354238104Sdes fi 355238104Sdes echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 356238104Sdes exit ;; 357238104Sdes sun4*:SunOS:6*:*) 358238104Sdes # According to config.sub, this is the proper way to canonicalize 359238104Sdes # SunOS6. Hard to guess exactly what SunOS6 will be like, but 360238104Sdes # it's likely to be more like Solaris than SunOS4. 361238104Sdes echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 362238104Sdes exit ;; 363238104Sdes sun4*:SunOS:*:*) 364238104Sdes case "`/usr/bin/arch -k`" in 365238104Sdes Series*|S4*) 366238104Sdes UNAME_RELEASE=`uname -v` 367238104Sdes ;; 368238104Sdes esac 369238104Sdes # Japanese Language versions have a version number like `4.1.3-JL'. 370238104Sdes echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 371238104Sdes exit ;; 372238104Sdes sun3*:SunOS:*:*) 373238104Sdes echo m68k-sun-sunos${UNAME_RELEASE} 374238104Sdes exit ;; 375238104Sdes sun*:*:4.2BSD:*) 376238104Sdes UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 377238104Sdes test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 378238104Sdes case "`/bin/arch`" in 379238104Sdes sun3) 380238104Sdes echo m68k-sun-sunos${UNAME_RELEASE} 381238104Sdes ;; 382238104Sdes sun4) 383238104Sdes echo sparc-sun-sunos${UNAME_RELEASE} 384238104Sdes ;; 385238104Sdes esac 386238104Sdes exit ;; 387238104Sdes aushp:SunOS:*:*) 388238104Sdes echo sparc-auspex-sunos${UNAME_RELEASE} 389238104Sdes exit ;; 390238104Sdes # The situation for MiNT is a little confusing. The machine name 391238104Sdes # can be virtually everything (everything which is not 392238104Sdes # "atarist" or "atariste" at least should have a processor 393238104Sdes # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 394238104Sdes # to the lowercase version "mint" (or "freemint"). Finally 395238104Sdes # the system name "TOS" denotes a system which is actually not 396238104Sdes # MiNT. But MiNT is downward compatible to TOS, so this should 397238104Sdes # be no problem. 398238104Sdes atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 399238104Sdes echo m68k-atari-mint${UNAME_RELEASE} 400238104Sdes exit ;; 401238104Sdes atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 402238104Sdes echo m68k-atari-mint${UNAME_RELEASE} 403238104Sdes exit ;; 404238104Sdes *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 405238104Sdes echo m68k-atari-mint${UNAME_RELEASE} 406238104Sdes exit ;; 407238104Sdes milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 408238104Sdes echo m68k-milan-mint${UNAME_RELEASE} 409238104Sdes exit ;; 410238104Sdes hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 411238104Sdes echo m68k-hades-mint${UNAME_RELEASE} 412238104Sdes exit ;; 413238104Sdes *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 414238104Sdes echo m68k-unknown-mint${UNAME_RELEASE} 415238104Sdes exit ;; 416238104Sdes m68k:machten:*:*) 417238104Sdes echo m68k-apple-machten${UNAME_RELEASE} 418238104Sdes exit ;; 419238104Sdes powerpc:machten:*:*) 420238104Sdes echo powerpc-apple-machten${UNAME_RELEASE} 421238104Sdes exit ;; 422238104Sdes RISC*:Mach:*:*) 423238104Sdes echo mips-dec-mach_bsd4.3 424238104Sdes exit ;; 425238104Sdes RISC*:ULTRIX:*:*) 426238104Sdes echo mips-dec-ultrix${UNAME_RELEASE} 427238104Sdes exit ;; 428238104Sdes VAX*:ULTRIX*:*:*) 429238104Sdes echo vax-dec-ultrix${UNAME_RELEASE} 430238104Sdes exit ;; 431238104Sdes 2020:CLIX:*:* | 2430:CLIX:*:*) 432238104Sdes echo clipper-intergraph-clix${UNAME_RELEASE} 433238104Sdes exit ;; 434238104Sdes mips:*:*:UMIPS | mips:*:*:RISCos) 435238104Sdes eval $set_cc_for_build 436238104Sdes sed 's/^ //' << EOF >$dummy.c 437238104Sdes#ifdef __cplusplus 438238104Sdes#include <stdio.h> /* for printf() prototype */ 439238104Sdes int main (int argc, char *argv[]) { 440238104Sdes#else 441238104Sdes int main (argc, argv) int argc; char *argv[]; { 442238104Sdes#endif 443238104Sdes #if defined (host_mips) && defined (MIPSEB) 444238104Sdes #if defined (SYSTYPE_SYSV) 445238104Sdes printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 446238104Sdes #endif 447238104Sdes #if defined (SYSTYPE_SVR4) 448238104Sdes printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 449238104Sdes #endif 450238104Sdes #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 451238104Sdes printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 452238104Sdes #endif 453238104Sdes #endif 454238104Sdes exit (-1); 455238104Sdes } 456238104SdesEOF 457238104Sdes $CC_FOR_BUILD -o $dummy $dummy.c && 458238104Sdes dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 459238104Sdes SYSTEM_NAME=`$dummy $dummyarg` && 460238104Sdes { echo "$SYSTEM_NAME"; exit; } 461238104Sdes echo mips-mips-riscos${UNAME_RELEASE} 462238104Sdes exit ;; 463238104Sdes Motorola:PowerMAX_OS:*:*) 464238104Sdes echo powerpc-motorola-powermax 465238104Sdes exit ;; 466238104Sdes Motorola:*:4.3:PL8-*) 467238104Sdes echo powerpc-harris-powermax 468238104Sdes exit ;; 469238104Sdes Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 470238104Sdes echo powerpc-harris-powermax 471238104Sdes exit ;; 472238104Sdes Night_Hawk:Power_UNIX:*:*) 473238104Sdes echo powerpc-harris-powerunix 474238104Sdes exit ;; 475238104Sdes m88k:CX/UX:7*:*) 476238104Sdes echo m88k-harris-cxux7 477238104Sdes exit ;; 478238104Sdes m88k:*:4*:R4*) 479238104Sdes echo m88k-motorola-sysv4 480238104Sdes exit ;; 481238104Sdes m88k:*:3*:R3*) 482238104Sdes echo m88k-motorola-sysv3 483238104Sdes exit ;; 484238104Sdes AViiON:dgux:*:*) 485238104Sdes # DG/UX returns AViiON for all architectures 486238104Sdes UNAME_PROCESSOR=`/usr/bin/uname -p` 487238104Sdes if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 488238104Sdes then 489238104Sdes if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 490238104Sdes [ ${TARGET_BINARY_INTERFACE}x = x ] 491238104Sdes then 492238104Sdes echo m88k-dg-dgux${UNAME_RELEASE} 493238104Sdes else 494238104Sdes echo m88k-dg-dguxbcs${UNAME_RELEASE} 495238104Sdes fi 496238104Sdes else 497238104Sdes echo i586-dg-dgux${UNAME_RELEASE} 498238104Sdes fi 499238104Sdes exit ;; 500238104Sdes M88*:DolphinOS:*:*) # DolphinOS (SVR3) 501238104Sdes echo m88k-dolphin-sysv3 502238104Sdes exit ;; 503238104Sdes M88*:*:R3*:*) 504238104Sdes # Delta 88k system running SVR3 505238104Sdes echo m88k-motorola-sysv3 506238104Sdes exit ;; 507238104Sdes XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 508238104Sdes echo m88k-tektronix-sysv3 509238104Sdes exit ;; 510238104Sdes Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 511238104Sdes echo m68k-tektronix-bsd 512238104Sdes exit ;; 513238104Sdes *:IRIX*:*:*) 514238104Sdes echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 515238104Sdes exit ;; 516238104Sdes ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 517238104Sdes echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 518238104Sdes exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 519238104Sdes i*86:AIX:*:*) 520238104Sdes echo i386-ibm-aix 521238104Sdes exit ;; 522238104Sdes ia64:AIX:*:*) 523238104Sdes if [ -x /usr/bin/oslevel ] ; then 524238104Sdes IBM_REV=`/usr/bin/oslevel` 525238104Sdes else 526238104Sdes IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 527238104Sdes fi 528238104Sdes echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 529238104Sdes exit ;; 530238104Sdes *:AIX:2:3) 531238104Sdes if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 532238104Sdes eval $set_cc_for_build 533238104Sdes sed 's/^ //' << EOF >$dummy.c 534238104Sdes #include <sys/systemcfg.h> 535238104Sdes 536238104Sdes main() 537238104Sdes { 538238104Sdes if (!__power_pc()) 539238104Sdes exit(1); 540238104Sdes puts("powerpc-ibm-aix3.2.5"); 541238104Sdes exit(0); 542238104Sdes } 543238104SdesEOF 544238104Sdes if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 545238104Sdes then 546238104Sdes echo "$SYSTEM_NAME" 547238104Sdes else 548238104Sdes echo rs6000-ibm-aix3.2.5 549238104Sdes fi 550238104Sdes elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 551238104Sdes echo rs6000-ibm-aix3.2.4 552238104Sdes else 553238104Sdes echo rs6000-ibm-aix3.2 554238104Sdes fi 555238104Sdes exit ;; 556238104Sdes *:AIX:*:[4567]) 557238104Sdes IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 558238104Sdes if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 559238104Sdes IBM_ARCH=rs6000 560238104Sdes else 561238104Sdes IBM_ARCH=powerpc 562238104Sdes fi 563238104Sdes if [ -x /usr/bin/oslevel ] ; then 564238104Sdes IBM_REV=`/usr/bin/oslevel` 565238104Sdes else 566238104Sdes IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 567238104Sdes fi 568238104Sdes echo ${IBM_ARCH}-ibm-aix${IBM_REV} 569238104Sdes exit ;; 570238104Sdes *:AIX:*:*) 571238104Sdes echo rs6000-ibm-aix 572238104Sdes exit ;; 573238104Sdes ibmrt:4.4BSD:*|romp-ibm:BSD:*) 574238104Sdes echo romp-ibm-bsd4.4 575238104Sdes exit ;; 576238104Sdes ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 577238104Sdes echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 578238104Sdes exit ;; # report: romp-ibm BSD 4.3 579238104Sdes *:BOSX:*:*) 580238104Sdes echo rs6000-bull-bosx 581238104Sdes exit ;; 582238104Sdes DPX/2?00:B.O.S.:*:*) 583238104Sdes echo m68k-bull-sysv3 584238104Sdes exit ;; 585238104Sdes 9000/[34]??:4.3bsd:1.*:*) 586238104Sdes echo m68k-hp-bsd 587238104Sdes exit ;; 588238104Sdes hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 589238104Sdes echo m68k-hp-bsd4.4 590238104Sdes exit ;; 591238104Sdes 9000/[34678]??:HP-UX:*:*) 592238104Sdes HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 593238104Sdes case "${UNAME_MACHINE}" in 594238104Sdes 9000/31? ) HP_ARCH=m68000 ;; 595238104Sdes 9000/[34]?? ) HP_ARCH=m68k ;; 596238104Sdes 9000/[678][0-9][0-9]) 597238104Sdes if [ -x /usr/bin/getconf ]; then 598238104Sdes sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 599238104Sdes sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 600238104Sdes case "${sc_cpu_version}" in 601238104Sdes 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 602238104Sdes 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 603238104Sdes 532) # CPU_PA_RISC2_0 604238104Sdes case "${sc_kernel_bits}" in 605238104Sdes 32) HP_ARCH="hppa2.0n" ;; 606238104Sdes 64) HP_ARCH="hppa2.0w" ;; 607238104Sdes '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 608238104Sdes esac ;; 609238104Sdes esac 610238104Sdes fi 611238104Sdes if [ "${HP_ARCH}" = "" ]; then 612238104Sdes eval $set_cc_for_build 613238104Sdes sed 's/^ //' << EOF >$dummy.c 614238104Sdes 615238104Sdes #define _HPUX_SOURCE 616238104Sdes #include <stdlib.h> 617238104Sdes #include <unistd.h> 618238104Sdes 619238104Sdes int main () 620238104Sdes { 621238104Sdes #if defined(_SC_KERNEL_BITS) 622238104Sdes long bits = sysconf(_SC_KERNEL_BITS); 623238104Sdes #endif 624238104Sdes long cpu = sysconf (_SC_CPU_VERSION); 625238104Sdes 626238104Sdes switch (cpu) 627238104Sdes { 628238104Sdes case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 629238104Sdes case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 630238104Sdes case CPU_PA_RISC2_0: 631238104Sdes #if defined(_SC_KERNEL_BITS) 632238104Sdes switch (bits) 633238104Sdes { 634238104Sdes case 64: puts ("hppa2.0w"); break; 635238104Sdes case 32: puts ("hppa2.0n"); break; 636238104Sdes default: puts ("hppa2.0"); break; 637238104Sdes } break; 638238104Sdes #else /* !defined(_SC_KERNEL_BITS) */ 639238104Sdes puts ("hppa2.0"); break; 640238104Sdes #endif 641238104Sdes default: puts ("hppa1.0"); break; 642238104Sdes } 643238104Sdes exit (0); 644238104Sdes } 645238104SdesEOF 646238104Sdes (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 647238104Sdes test -z "$HP_ARCH" && HP_ARCH=hppa 648238104Sdes fi ;; 649238104Sdes esac 650238104Sdes if [ ${HP_ARCH} = "hppa2.0w" ] 651238104Sdes then 652238104Sdes eval $set_cc_for_build 653238104Sdes 654238104Sdes # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 655238104Sdes # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 656238104Sdes # generating 64-bit code. GNU and HP use different nomenclature: 657238104Sdes # 658238104Sdes # $ CC_FOR_BUILD=cc ./config.guess 659238104Sdes # => hppa2.0w-hp-hpux11.23 660238104Sdes # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 661238104Sdes # => hppa64-hp-hpux11.23 662238104Sdes 663238104Sdes if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 664238104Sdes grep -q __LP64__ 665238104Sdes then 666238104Sdes HP_ARCH="hppa2.0w" 667238104Sdes else 668238104Sdes HP_ARCH="hppa64" 669238104Sdes fi 670238104Sdes fi 671238104Sdes echo ${HP_ARCH}-hp-hpux${HPUX_REV} 672238104Sdes exit ;; 673238104Sdes ia64:HP-UX:*:*) 674238104Sdes HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 675238104Sdes echo ia64-hp-hpux${HPUX_REV} 676238104Sdes exit ;; 677238104Sdes 3050*:HI-UX:*:*) 678238104Sdes eval $set_cc_for_build 679238104Sdes sed 's/^ //' << EOF >$dummy.c 680238104Sdes #include <unistd.h> 681238104Sdes int 682238104Sdes main () 683238104Sdes { 684238104Sdes long cpu = sysconf (_SC_CPU_VERSION); 685238104Sdes /* The order matters, because CPU_IS_HP_MC68K erroneously returns 686238104Sdes true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 687238104Sdes results, however. */ 688238104Sdes if (CPU_IS_PA_RISC (cpu)) 689238104Sdes { 690238104Sdes switch (cpu) 691238104Sdes { 692238104Sdes case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 693238104Sdes case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 694238104Sdes case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 695238104Sdes default: puts ("hppa-hitachi-hiuxwe2"); break; 696238104Sdes } 697238104Sdes } 698238104Sdes else if (CPU_IS_HP_MC68K (cpu)) 699238104Sdes puts ("m68k-hitachi-hiuxwe2"); 700238104Sdes else puts ("unknown-hitachi-hiuxwe2"); 701238104Sdes exit (0); 702238104Sdes } 703238104SdesEOF 704238104Sdes $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 705238104Sdes { echo "$SYSTEM_NAME"; exit; } 706238104Sdes echo unknown-hitachi-hiuxwe2 707238104Sdes exit ;; 708238104Sdes 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 709238104Sdes echo hppa1.1-hp-bsd 710238104Sdes exit ;; 711238104Sdes 9000/8??:4.3bsd:*:*) 712238104Sdes echo hppa1.0-hp-bsd 713238104Sdes exit ;; 714238104Sdes *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 715238104Sdes echo hppa1.0-hp-mpeix 716238104Sdes exit ;; 717238104Sdes hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 718238104Sdes echo hppa1.1-hp-osf 719238104Sdes exit ;; 720238104Sdes hp8??:OSF1:*:*) 721238104Sdes echo hppa1.0-hp-osf 722238104Sdes exit ;; 723238104Sdes i*86:OSF1:*:*) 724238104Sdes if [ -x /usr/sbin/sysversion ] ; then 725238104Sdes echo ${UNAME_MACHINE}-unknown-osf1mk 726238104Sdes else 727238104Sdes echo ${UNAME_MACHINE}-unknown-osf1 728238104Sdes fi 729238104Sdes exit ;; 730238104Sdes parisc*:Lites*:*:*) 731238104Sdes echo hppa1.1-hp-lites 732238104Sdes exit ;; 733238104Sdes C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 734238104Sdes echo c1-convex-bsd 735238104Sdes exit ;; 736238104Sdes C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 737238104Sdes if getsysinfo -f scalar_acc 738238104Sdes then echo c32-convex-bsd 739238104Sdes else echo c2-convex-bsd 740238104Sdes fi 741238104Sdes exit ;; 742238104Sdes C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 743238104Sdes echo c34-convex-bsd 744238104Sdes exit ;; 745238104Sdes C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 746238104Sdes echo c38-convex-bsd 747238104Sdes exit ;; 748238104Sdes C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 749238104Sdes echo c4-convex-bsd 750238104Sdes exit ;; 751238104Sdes CRAY*Y-MP:*:*:*) 752238104Sdes echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 753238104Sdes exit ;; 754238104Sdes CRAY*[A-Z]90:*:*:*) 755238104Sdes echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 756238104Sdes | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 757238104Sdes -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 758238104Sdes -e 's/\.[^.]*$/.X/' 759238104Sdes exit ;; 760238104Sdes CRAY*TS:*:*:*) 761238104Sdes echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 762238104Sdes exit ;; 763238104Sdes CRAY*T3E:*:*:*) 764238104Sdes echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 765238104Sdes exit ;; 766238104Sdes CRAY*SV1:*:*:*) 767238104Sdes echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 768238104Sdes exit ;; 769238104Sdes *:UNICOS/mp:*:*) 770238104Sdes echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 771238104Sdes exit ;; 772238104Sdes F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 773238104Sdes FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 774238104Sdes FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 775238104Sdes FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 776238104Sdes echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 777238104Sdes exit ;; 778238104Sdes 5000:UNIX_System_V:4.*:*) 779238104Sdes FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 780238104Sdes FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 781238104Sdes echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 782238104Sdes exit ;; 783238104Sdes i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 784238104Sdes echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 785238104Sdes exit ;; 786238104Sdes sparc*:BSD/OS:*:*) 787238104Sdes echo sparc-unknown-bsdi${UNAME_RELEASE} 788238104Sdes exit ;; 789238104Sdes *:BSD/OS:*:*) 790238104Sdes echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 791238104Sdes exit ;; 792238104Sdes *:FreeBSD:*:*) 793238104Sdes UNAME_PROCESSOR=`/usr/bin/uname -p` 794238104Sdes case ${UNAME_PROCESSOR} in 795238104Sdes amd64) 796238104Sdes echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 797238104Sdes *) 798238104Sdes echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 799238104Sdes esac 800238104Sdes exit ;; 801238104Sdes i*:CYGWIN*:*) 802238104Sdes echo ${UNAME_MACHINE}-pc-cygwin 803238104Sdes exit ;; 804238104Sdes *:MINGW*:*) 805238104Sdes echo ${UNAME_MACHINE}-pc-mingw32 806238104Sdes exit ;; 807238104Sdes i*:MSYS*:*) 808238104Sdes echo ${UNAME_MACHINE}-pc-msys 809238104Sdes exit ;; 810238104Sdes i*:windows32*:*) 811238104Sdes # uname -m includes "-pc" on this system. 812238104Sdes echo ${UNAME_MACHINE}-mingw32 813238104Sdes exit ;; 814238104Sdes i*:PW*:*) 815238104Sdes echo ${UNAME_MACHINE}-pc-pw32 816238104Sdes exit ;; 817238104Sdes *:Interix*:*) 818238104Sdes case ${UNAME_MACHINE} in 819238104Sdes x86) 820238104Sdes echo i586-pc-interix${UNAME_RELEASE} 821238104Sdes exit ;; 822238104Sdes authenticamd | genuineintel | EM64T) 823238104Sdes echo x86_64-unknown-interix${UNAME_RELEASE} 824238104Sdes exit ;; 825238104Sdes IA64) 826238104Sdes echo ia64-unknown-interix${UNAME_RELEASE} 827238104Sdes exit ;; 828238104Sdes esac ;; 829238104Sdes [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 830238104Sdes echo i${UNAME_MACHINE}-pc-mks 831238104Sdes exit ;; 832238104Sdes 8664:Windows_NT:*) 833238104Sdes echo x86_64-pc-mks 834238104Sdes exit ;; 835238104Sdes i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 836238104Sdes # How do we know it's Interix rather than the generic POSIX subsystem? 837238104Sdes # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 838238104Sdes # UNAME_MACHINE based on the output of uname instead of i386? 839238104Sdes echo i586-pc-interix 840238104Sdes exit ;; 841238104Sdes i*:UWIN*:*) 842238104Sdes echo ${UNAME_MACHINE}-pc-uwin 843238104Sdes exit ;; 844238104Sdes amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 845238104Sdes echo x86_64-unknown-cygwin 846238104Sdes exit ;; 847238104Sdes p*:CYGWIN*:*) 848238104Sdes echo powerpcle-unknown-cygwin 849238104Sdes exit ;; 850238104Sdes prep*:SunOS:5.*:*) 851238104Sdes echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 852238104Sdes exit ;; 853238104Sdes *:GNU:*:*) 854238104Sdes # the GNU system 855238104Sdes echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 856238104Sdes exit ;; 857238104Sdes *:GNU/*:*:*) 858238104Sdes # other systems with GNU libc and userland 859238104Sdes echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 860238104Sdes exit ;; 861238104Sdes i*86:Minix:*:*) 862238104Sdes echo ${UNAME_MACHINE}-pc-minix 863238104Sdes exit ;; 864238104Sdes aarch64:Linux:*:*) 865238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 866238104Sdes exit ;; 867238104Sdes aarch64_be:Linux:*:*) 868238104Sdes UNAME_MACHINE=aarch64_be 869238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 870238104Sdes exit ;; 871238104Sdes alpha:Linux:*:*) 872238104Sdes case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 873238104Sdes EV5) UNAME_MACHINE=alphaev5 ;; 874238104Sdes EV56) UNAME_MACHINE=alphaev56 ;; 875238104Sdes PCA56) UNAME_MACHINE=alphapca56 ;; 876238104Sdes PCA57) UNAME_MACHINE=alphapca56 ;; 877238104Sdes EV6) UNAME_MACHINE=alphaev6 ;; 878238104Sdes EV67) UNAME_MACHINE=alphaev67 ;; 879238104Sdes EV68*) UNAME_MACHINE=alphaev68 ;; 880238104Sdes esac 881238104Sdes objdump --private-headers /bin/sh | grep -q ld.so.1 882238104Sdes if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 883238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 884238104Sdes exit ;; 885238104Sdes arm*:Linux:*:*) 886238104Sdes eval $set_cc_for_build 887238104Sdes if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 888238104Sdes | grep -q __ARM_EABI__ 889238104Sdes then 890238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 891238104Sdes else 892238104Sdes if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 893238104Sdes | grep -q __ARM_PCS_VFP 894238104Sdes then 895238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnueabi 896238104Sdes else 897238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 898238104Sdes fi 899238104Sdes fi 900238104Sdes exit ;; 901238104Sdes avr32*:Linux:*:*) 902238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 903238104Sdes exit ;; 904238104Sdes cris:Linux:*:*) 905238104Sdes echo ${UNAME_MACHINE}-axis-linux-gnu 906238104Sdes exit ;; 907238104Sdes crisv32:Linux:*:*) 908238104Sdes echo ${UNAME_MACHINE}-axis-linux-gnu 909238104Sdes exit ;; 910238104Sdes frv:Linux:*:*) 911238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 912238104Sdes exit ;; 913238104Sdes hexagon:Linux:*:*) 914238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 915238104Sdes exit ;; 916238104Sdes i*86:Linux:*:*) 917238104Sdes LIBC=gnu 918238104Sdes eval $set_cc_for_build 919238104Sdes sed 's/^ //' << EOF >$dummy.c 920238104Sdes #ifdef __dietlibc__ 921238104Sdes LIBC=dietlibc 922238104Sdes #endif 923238104SdesEOF 924238104Sdes eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 925238104Sdes echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 926238104Sdes exit ;; 927238104Sdes ia64:Linux:*:*) 928238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 929238104Sdes exit ;; 930238104Sdes m32r*:Linux:*:*) 931238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 932238104Sdes exit ;; 933238104Sdes m68*:Linux:*:*) 934238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 935238104Sdes exit ;; 936238104Sdes mips:Linux:*:* | mips64:Linux:*:*) 937238104Sdes eval $set_cc_for_build 938238104Sdes sed 's/^ //' << EOF >$dummy.c 939238104Sdes #undef CPU 940238104Sdes #undef ${UNAME_MACHINE} 941238104Sdes #undef ${UNAME_MACHINE}el 942238104Sdes #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 943238104Sdes CPU=${UNAME_MACHINE}el 944238104Sdes #else 945238104Sdes #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 946238104Sdes CPU=${UNAME_MACHINE} 947238104Sdes #else 948238104Sdes CPU= 949238104Sdes #endif 950238104Sdes #endif 951238104SdesEOF 952238104Sdes eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 953238104Sdes test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 954238104Sdes ;; 955238104Sdes or32:Linux:*:*) 956238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 957238104Sdes exit ;; 958238104Sdes padre:Linux:*:*) 959238104Sdes echo sparc-unknown-linux-gnu 960238104Sdes exit ;; 961238104Sdes parisc64:Linux:*:* | hppa64:Linux:*:*) 962238104Sdes echo hppa64-unknown-linux-gnu 963238104Sdes exit ;; 964238104Sdes parisc:Linux:*:* | hppa:Linux:*:*) 965238104Sdes # Look for CPU level 966238104Sdes case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 967238104Sdes PA7*) echo hppa1.1-unknown-linux-gnu ;; 968238104Sdes PA8*) echo hppa2.0-unknown-linux-gnu ;; 969238104Sdes *) echo hppa-unknown-linux-gnu ;; 970238104Sdes esac 971238104Sdes exit ;; 972238104Sdes ppc64:Linux:*:*) 973238104Sdes echo powerpc64-unknown-linux-gnu 974238104Sdes exit ;; 975238104Sdes ppc:Linux:*:*) 976238104Sdes echo powerpc-unknown-linux-gnu 977238104Sdes exit ;; 978238104Sdes s390:Linux:*:* | s390x:Linux:*:*) 979238104Sdes echo ${UNAME_MACHINE}-ibm-linux 980238104Sdes exit ;; 981238104Sdes sh64*:Linux:*:*) 982238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 983238104Sdes exit ;; 984238104Sdes sh*:Linux:*:*) 985238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 986238104Sdes exit ;; 987238104Sdes sparc:Linux:*:* | sparc64:Linux:*:*) 988238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 989238104Sdes exit ;; 990238104Sdes tile*:Linux:*:*) 991238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 992238104Sdes exit ;; 993238104Sdes vax:Linux:*:*) 994238104Sdes echo ${UNAME_MACHINE}-dec-linux-gnu 995238104Sdes exit ;; 996238104Sdes x86_64:Linux:*:*) 997238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 998238104Sdes exit ;; 999238104Sdes xtensa*:Linux:*:*) 1000238104Sdes echo ${UNAME_MACHINE}-unknown-linux-gnu 1001238104Sdes exit ;; 1002238104Sdes i*86:DYNIX/ptx:4*:*) 1003238104Sdes # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1004238104Sdes # earlier versions are messed up and put the nodename in both 1005238104Sdes # sysname and nodename. 1006238104Sdes echo i386-sequent-sysv4 1007238104Sdes exit ;; 1008238104Sdes i*86:UNIX_SV:4.2MP:2.*) 1009238104Sdes # Unixware is an offshoot of SVR4, but it has its own version 1010238104Sdes # number series starting with 2... 1011238104Sdes # I am not positive that other SVR4 systems won't match this, 1012238104Sdes # I just have to hope. -- rms. 1013238104Sdes # Use sysv4.2uw... so that sysv4* matches it. 1014238104Sdes echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1015238104Sdes exit ;; 1016238104Sdes i*86:OS/2:*:*) 1017238104Sdes # If we were able to find `uname', then EMX Unix compatibility 1018238104Sdes # is probably installed. 1019238104Sdes echo ${UNAME_MACHINE}-pc-os2-emx 1020238104Sdes exit ;; 1021238104Sdes i*86:XTS-300:*:STOP) 1022238104Sdes echo ${UNAME_MACHINE}-unknown-stop 1023238104Sdes exit ;; 1024238104Sdes i*86:atheos:*:*) 1025238104Sdes echo ${UNAME_MACHINE}-unknown-atheos 1026238104Sdes exit ;; 1027238104Sdes i*86:syllable:*:*) 1028238104Sdes echo ${UNAME_MACHINE}-pc-syllable 1029238104Sdes exit ;; 1030238104Sdes i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1031238104Sdes echo i386-unknown-lynxos${UNAME_RELEASE} 1032238104Sdes exit ;; 1033238104Sdes i*86:*DOS:*:*) 1034238104Sdes echo ${UNAME_MACHINE}-pc-msdosdjgpp 1035238104Sdes exit ;; 1036238104Sdes i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1037238104Sdes UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1038238104Sdes if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1039238104Sdes echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1040238104Sdes else 1041238104Sdes echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1042238104Sdes fi 1043238104Sdes exit ;; 1044238104Sdes i*86:*:5:[678]*) 1045238104Sdes # UnixWare 7.x, OpenUNIX and OpenServer 6. 1046238104Sdes case `/bin/uname -X | grep "^Machine"` in 1047238104Sdes *486*) UNAME_MACHINE=i486 ;; 1048238104Sdes *Pentium) UNAME_MACHINE=i586 ;; 1049238104Sdes *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1050238104Sdes esac 1051238104Sdes echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1052238104Sdes exit ;; 1053238104Sdes i*86:*:3.2:*) 1054238104Sdes if test -f /usr/options/cb.name; then 1055238104Sdes UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1056238104Sdes echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1057238104Sdes elif /bin/uname -X 2>/dev/null >/dev/null ; then 1058238104Sdes UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1059238104Sdes (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1060238104Sdes (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1061238104Sdes && UNAME_MACHINE=i586 1062238104Sdes (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1063238104Sdes && UNAME_MACHINE=i686 1064238104Sdes (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1065238104Sdes && UNAME_MACHINE=i686 1066238104Sdes echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1067238104Sdes else 1068238104Sdes echo ${UNAME_MACHINE}-pc-sysv32 1069238104Sdes fi 1070238104Sdes exit ;; 1071238104Sdes pc:*:*:*) 1072238104Sdes # Left here for compatibility: 1073238104Sdes # uname -m prints for DJGPP always 'pc', but it prints nothing about 1074238104Sdes # the processor, so we play safe by assuming i586. 1075238104Sdes # Note: whatever this is, it MUST be the same as what config.sub 1076238104Sdes # prints for the "djgpp" host, or else GDB configury will decide that 1077238104Sdes # this is a cross-build. 1078238104Sdes echo i586-pc-msdosdjgpp 1079238104Sdes exit ;; 1080238104Sdes Intel:Mach:3*:*) 1081238104Sdes echo i386-pc-mach3 1082238104Sdes exit ;; 1083238104Sdes paragon:*:*:*) 1084238104Sdes echo i860-intel-osf1 1085238104Sdes exit ;; 1086238104Sdes i860:*:4.*:*) # i860-SVR4 1087238104Sdes if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1088238104Sdes echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1089238104Sdes else # Add other i860-SVR4 vendors below as they are discovered. 1090238104Sdes echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1091238104Sdes fi 1092238104Sdes exit ;; 1093238104Sdes mini*:CTIX:SYS*5:*) 1094238104Sdes # "miniframe" 1095238104Sdes echo m68010-convergent-sysv 1096238104Sdes exit ;; 1097238104Sdes mc68k:UNIX:SYSTEM5:3.51m) 1098238104Sdes echo m68k-convergent-sysv 1099238104Sdes exit ;; 1100238104Sdes M680?0:D-NIX:5.3:*) 1101238104Sdes echo m68k-diab-dnix 1102238104Sdes exit ;; 1103238104Sdes M68*:*:R3V[5678]*:*) 1104238104Sdes test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1105238104Sdes 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) 1106238104Sdes OS_REL='' 1107238104Sdes test -r /etc/.relid \ 1108238104Sdes && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1109238104Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1110238104Sdes && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1111238104Sdes /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1112238104Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1113238104Sdes 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1114238104Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1115238104Sdes && { echo i486-ncr-sysv4; exit; } ;; 1116238104Sdes NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1117238104Sdes OS_REL='.3' 1118238104Sdes test -r /etc/.relid \ 1119238104Sdes && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1120238104Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1121238104Sdes && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1122238104Sdes /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1123238104Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1124238104Sdes /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1125238104Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1126238104Sdes m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1127238104Sdes echo m68k-unknown-lynxos${UNAME_RELEASE} 1128238104Sdes exit ;; 1129238104Sdes mc68030:UNIX_System_V:4.*:*) 1130238104Sdes echo m68k-atari-sysv4 1131238104Sdes exit ;; 1132238104Sdes TSUNAMI:LynxOS:2.*:*) 1133238104Sdes echo sparc-unknown-lynxos${UNAME_RELEASE} 1134238104Sdes exit ;; 1135238104Sdes rs6000:LynxOS:2.*:*) 1136238104Sdes echo rs6000-unknown-lynxos${UNAME_RELEASE} 1137238104Sdes exit ;; 1138238104Sdes PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1139238104Sdes echo powerpc-unknown-lynxos${UNAME_RELEASE} 1140238104Sdes exit ;; 1141238104Sdes SM[BE]S:UNIX_SV:*:*) 1142238104Sdes echo mips-dde-sysv${UNAME_RELEASE} 1143238104Sdes exit ;; 1144238104Sdes RM*:ReliantUNIX-*:*:*) 1145238104Sdes echo mips-sni-sysv4 1146238104Sdes exit ;; 1147238104Sdes RM*:SINIX-*:*:*) 1148238104Sdes echo mips-sni-sysv4 1149238104Sdes exit ;; 1150238104Sdes *:SINIX-*:*:*) 1151238104Sdes if uname -p 2>/dev/null >/dev/null ; then 1152238104Sdes UNAME_MACHINE=`(uname -p) 2>/dev/null` 1153238104Sdes echo ${UNAME_MACHINE}-sni-sysv4 1154238104Sdes else 1155238104Sdes echo ns32k-sni-sysv 1156238104Sdes fi 1157238104Sdes exit ;; 1158238104Sdes PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1159238104Sdes # says <Richard.M.Bartel@ccMail.Census.GOV> 1160238104Sdes echo i586-unisys-sysv4 1161238104Sdes exit ;; 1162238104Sdes *:UNIX_System_V:4*:FTX*) 1163238104Sdes # From Gerald Hewes <hewes@openmarket.com>. 1164238104Sdes # How about differentiating between stratus architectures? -djm 1165238104Sdes echo hppa1.1-stratus-sysv4 1166238104Sdes exit ;; 1167238104Sdes *:*:*:FTX*) 1168238104Sdes # From seanf@swdc.stratus.com. 1169238104Sdes echo i860-stratus-sysv4 1170238104Sdes exit ;; 1171238104Sdes i*86:VOS:*:*) 1172238104Sdes # From Paul.Green@stratus.com. 1173238104Sdes echo ${UNAME_MACHINE}-stratus-vos 1174238104Sdes exit ;; 1175238104Sdes *:VOS:*:*) 1176238104Sdes # From Paul.Green@stratus.com. 1177238104Sdes echo hppa1.1-stratus-vos 1178238104Sdes exit ;; 1179238104Sdes mc68*:A/UX:*:*) 1180238104Sdes echo m68k-apple-aux${UNAME_RELEASE} 1181238104Sdes exit ;; 1182238104Sdes news*:NEWS-OS:6*:*) 1183238104Sdes echo mips-sony-newsos6 1184238104Sdes exit ;; 1185238104Sdes R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1186238104Sdes if [ -d /usr/nec ]; then 1187238104Sdes echo mips-nec-sysv${UNAME_RELEASE} 1188238104Sdes else 1189238104Sdes echo mips-unknown-sysv${UNAME_RELEASE} 1190238104Sdes fi 1191238104Sdes exit ;; 1192238104Sdes BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1193238104Sdes echo powerpc-be-beos 1194238104Sdes exit ;; 1195238104Sdes BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1196238104Sdes echo powerpc-apple-beos 1197238104Sdes exit ;; 1198238104Sdes BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1199238104Sdes echo i586-pc-beos 1200238104Sdes exit ;; 1201238104Sdes BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1202238104Sdes echo i586-pc-haiku 1203238104Sdes exit ;; 1204238104Sdes SX-4:SUPER-UX:*:*) 1205238104Sdes echo sx4-nec-superux${UNAME_RELEASE} 1206238104Sdes exit ;; 1207238104Sdes SX-5:SUPER-UX:*:*) 1208238104Sdes echo sx5-nec-superux${UNAME_RELEASE} 1209238104Sdes exit ;; 1210238104Sdes SX-6:SUPER-UX:*:*) 1211238104Sdes echo sx6-nec-superux${UNAME_RELEASE} 1212238104Sdes exit ;; 1213238104Sdes SX-7:SUPER-UX:*:*) 1214238104Sdes echo sx7-nec-superux${UNAME_RELEASE} 1215238104Sdes exit ;; 1216238104Sdes SX-8:SUPER-UX:*:*) 1217238104Sdes echo sx8-nec-superux${UNAME_RELEASE} 1218238104Sdes exit ;; 1219238104Sdes SX-8R:SUPER-UX:*:*) 1220238104Sdes echo sx8r-nec-superux${UNAME_RELEASE} 1221238104Sdes exit ;; 1222238104Sdes Power*:Rhapsody:*:*) 1223238104Sdes echo powerpc-apple-rhapsody${UNAME_RELEASE} 1224238104Sdes exit ;; 1225238104Sdes *:Rhapsody:*:*) 1226238104Sdes echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1227238104Sdes exit ;; 1228238104Sdes *:Darwin:*:*) 1229238104Sdes UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1230238104Sdes case $UNAME_PROCESSOR in 1231238104Sdes i386) 1232238104Sdes eval $set_cc_for_build 1233238104Sdes if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1234238104Sdes if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1235238104Sdes (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1236238104Sdes grep IS_64BIT_ARCH >/dev/null 1237238104Sdes then 1238238104Sdes UNAME_PROCESSOR="x86_64" 1239238104Sdes fi 1240238104Sdes fi ;; 1241238104Sdes unknown) UNAME_PROCESSOR=powerpc ;; 1242238104Sdes esac 1243238104Sdes echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1244238104Sdes exit ;; 1245238104Sdes *:procnto*:*:* | *:QNX:[0123456789]*:*) 1246238104Sdes UNAME_PROCESSOR=`uname -p` 1247238104Sdes if test "$UNAME_PROCESSOR" = "x86"; then 1248238104Sdes UNAME_PROCESSOR=i386 1249238104Sdes UNAME_MACHINE=pc 1250238104Sdes fi 1251238104Sdes echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1252238104Sdes exit ;; 1253238104Sdes *:QNX:*:4*) 1254238104Sdes echo i386-pc-qnx 1255238104Sdes exit ;; 1256238104Sdes NEO-?:NONSTOP_KERNEL:*:*) 1257238104Sdes echo neo-tandem-nsk${UNAME_RELEASE} 1258238104Sdes exit ;; 1259238104Sdes NSE-?:NONSTOP_KERNEL:*:*) 1260238104Sdes echo nse-tandem-nsk${UNAME_RELEASE} 1261238104Sdes exit ;; 1262238104Sdes NSR-?:NONSTOP_KERNEL:*:*) 1263238104Sdes echo nsr-tandem-nsk${UNAME_RELEASE} 1264238104Sdes exit ;; 1265238104Sdes *:NonStop-UX:*:*) 1266238104Sdes echo mips-compaq-nonstopux 1267238104Sdes exit ;; 1268238104Sdes BS2000:POSIX*:*:*) 1269238104Sdes echo bs2000-siemens-sysv 1270238104Sdes exit ;; 1271238104Sdes DS/*:UNIX_System_V:*:*) 1272238104Sdes echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1273238104Sdes exit ;; 1274238104Sdes *:Plan9:*:*) 1275238104Sdes # "uname -m" is not consistent, so use $cputype instead. 386 1276238104Sdes # is converted to i386 for consistency with other x86 1277238104Sdes # operating systems. 1278238104Sdes if test "$cputype" = "386"; then 1279238104Sdes UNAME_MACHINE=i386 1280238104Sdes else 1281238104Sdes UNAME_MACHINE="$cputype" 1282238104Sdes fi 1283238104Sdes echo ${UNAME_MACHINE}-unknown-plan9 1284238104Sdes exit ;; 1285238104Sdes *:TOPS-10:*:*) 1286238104Sdes echo pdp10-unknown-tops10 1287238104Sdes exit ;; 1288238104Sdes *:TENEX:*:*) 1289238104Sdes echo pdp10-unknown-tenex 1290238104Sdes exit ;; 1291238104Sdes KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1292238104Sdes echo pdp10-dec-tops20 1293238104Sdes exit ;; 1294238104Sdes XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1295238104Sdes echo pdp10-xkl-tops20 1296238104Sdes exit ;; 1297238104Sdes *:TOPS-20:*:*) 1298238104Sdes echo pdp10-unknown-tops20 1299238104Sdes exit ;; 1300238104Sdes *:ITS:*:*) 1301238104Sdes echo pdp10-unknown-its 1302238104Sdes exit ;; 1303238104Sdes SEI:*:*:SEIUX) 1304238104Sdes echo mips-sei-seiux${UNAME_RELEASE} 1305238104Sdes exit ;; 1306238104Sdes *:DragonFly:*:*) 1307238104Sdes echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1308238104Sdes exit ;; 1309238104Sdes *:*VMS:*:*) 1310238104Sdes UNAME_MACHINE=`(uname -p) 2>/dev/null` 1311238104Sdes case "${UNAME_MACHINE}" in 1312238104Sdes A*) echo alpha-dec-vms ; exit ;; 1313238104Sdes I*) echo ia64-dec-vms ; exit ;; 1314238104Sdes V*) echo vax-dec-vms ; exit ;; 1315238104Sdes esac ;; 1316238104Sdes *:XENIX:*:SysV) 1317238104Sdes echo i386-pc-xenix 1318238104Sdes exit ;; 1319238104Sdes i*86:skyos:*:*) 1320238104Sdes echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1321238104Sdes exit ;; 1322238104Sdes i*86:rdos:*:*) 1323238104Sdes echo ${UNAME_MACHINE}-pc-rdos 1324238104Sdes exit ;; 1325238104Sdes i*86:AROS:*:*) 1326238104Sdes echo ${UNAME_MACHINE}-pc-aros 1327238104Sdes exit ;; 1328238104Sdes x86_64:VMkernel:*:*) 1329238104Sdes echo ${UNAME_MACHINE}-unknown-esx 1330238104Sdes exit ;; 1331238104Sdesesac 1332238104Sdes 1333238104Sdes#echo '(No uname command or uname output not recognized.)' 1>&2 1334238104Sdes#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1335238104Sdes 1336238104Sdeseval $set_cc_for_build 1337238104Sdescat >$dummy.c <<EOF 1338238104Sdes#ifdef _SEQUENT_ 1339238104Sdes# include <sys/types.h> 1340238104Sdes# include <sys/utsname.h> 1341238104Sdes#endif 1342238104Sdesmain () 1343238104Sdes{ 1344238104Sdes#if defined (sony) 1345238104Sdes#if defined (MIPSEB) 1346238104Sdes /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1347238104Sdes I don't know.... */ 1348238104Sdes printf ("mips-sony-bsd\n"); exit (0); 1349238104Sdes#else 1350238104Sdes#include <sys/param.h> 1351238104Sdes printf ("m68k-sony-newsos%s\n", 1352238104Sdes#ifdef NEWSOS4 1353238104Sdes "4" 1354238104Sdes#else 1355238104Sdes "" 1356238104Sdes#endif 1357238104Sdes ); exit (0); 1358238104Sdes#endif 1359238104Sdes#endif 1360238104Sdes 1361238104Sdes#if defined (__arm) && defined (__acorn) && defined (__unix) 1362238104Sdes printf ("arm-acorn-riscix\n"); exit (0); 1363238104Sdes#endif 1364238104Sdes 1365238104Sdes#if defined (hp300) && !defined (hpux) 1366238104Sdes printf ("m68k-hp-bsd\n"); exit (0); 1367238104Sdes#endif 1368238104Sdes 1369238104Sdes#if defined (NeXT) 1370238104Sdes#if !defined (__ARCHITECTURE__) 1371238104Sdes#define __ARCHITECTURE__ "m68k" 1372238104Sdes#endif 1373238104Sdes int version; 1374238104Sdes version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1375238104Sdes if (version < 4) 1376238104Sdes printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1377238104Sdes else 1378238104Sdes printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1379238104Sdes exit (0); 1380238104Sdes#endif 1381238104Sdes 1382238104Sdes#if defined (MULTIMAX) || defined (n16) 1383238104Sdes#if defined (UMAXV) 1384238104Sdes printf ("ns32k-encore-sysv\n"); exit (0); 1385238104Sdes#else 1386238104Sdes#if defined (CMU) 1387238104Sdes printf ("ns32k-encore-mach\n"); exit (0); 1388238104Sdes#else 1389238104Sdes printf ("ns32k-encore-bsd\n"); exit (0); 1390238104Sdes#endif 1391238104Sdes#endif 1392238104Sdes#endif 1393238104Sdes 1394238104Sdes#if defined (__386BSD__) 1395238104Sdes printf ("i386-pc-bsd\n"); exit (0); 1396238104Sdes#endif 1397238104Sdes 1398238104Sdes#if defined (sequent) 1399238104Sdes#if defined (i386) 1400238104Sdes printf ("i386-sequent-dynix\n"); exit (0); 1401238104Sdes#endif 1402238104Sdes#if defined (ns32000) 1403238104Sdes printf ("ns32k-sequent-dynix\n"); exit (0); 1404238104Sdes#endif 1405238104Sdes#endif 1406238104Sdes 1407238104Sdes#if defined (_SEQUENT_) 1408238104Sdes struct utsname un; 1409238104Sdes 1410238104Sdes uname(&un); 1411238104Sdes 1412238104Sdes if (strncmp(un.version, "V2", 2) == 0) { 1413238104Sdes printf ("i386-sequent-ptx2\n"); exit (0); 1414238104Sdes } 1415238104Sdes if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1416238104Sdes printf ("i386-sequent-ptx1\n"); exit (0); 1417238104Sdes } 1418238104Sdes printf ("i386-sequent-ptx\n"); exit (0); 1419238104Sdes 1420238104Sdes#endif 1421238104Sdes 1422238104Sdes#if defined (vax) 1423238104Sdes# if !defined (ultrix) 1424238104Sdes# include <sys/param.h> 1425238104Sdes# if defined (BSD) 1426238104Sdes# if BSD == 43 1427238104Sdes printf ("vax-dec-bsd4.3\n"); exit (0); 1428238104Sdes# else 1429238104Sdes# if BSD == 199006 1430238104Sdes printf ("vax-dec-bsd4.3reno\n"); exit (0); 1431238104Sdes# else 1432238104Sdes printf ("vax-dec-bsd\n"); exit (0); 1433238104Sdes# endif 1434238104Sdes# endif 1435238104Sdes# else 1436238104Sdes printf ("vax-dec-bsd\n"); exit (0); 1437238104Sdes# endif 1438238104Sdes# else 1439238104Sdes printf ("vax-dec-ultrix\n"); exit (0); 1440238104Sdes# endif 1441238104Sdes#endif 1442238104Sdes 1443238104Sdes#if defined (alliant) && defined (i860) 1444238104Sdes printf ("i860-alliant-bsd\n"); exit (0); 1445238104Sdes#endif 1446238104Sdes 1447238104Sdes exit (1); 1448238104Sdes} 1449238104SdesEOF 1450238104Sdes 1451238104Sdes$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1452238104Sdes { echo "$SYSTEM_NAME"; exit; } 1453238104Sdes 1454238104Sdes# Apollos put the system type in the environment. 1455238104Sdes 1456238104Sdestest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1457238104Sdes 1458238104Sdes# Convex versions that predate uname can use getsysinfo(1) 1459238104Sdes 1460238104Sdesif [ -x /usr/convex/getsysinfo ] 1461238104Sdesthen 1462238104Sdes case `getsysinfo -f cpu_type` in 1463238104Sdes c1*) 1464238104Sdes echo c1-convex-bsd 1465238104Sdes exit ;; 1466238104Sdes c2*) 1467238104Sdes if getsysinfo -f scalar_acc 1468238104Sdes then echo c32-convex-bsd 1469238104Sdes else echo c2-convex-bsd 1470238104Sdes fi 1471238104Sdes exit ;; 1472238104Sdes c34*) 1473238104Sdes echo c34-convex-bsd 1474238104Sdes exit ;; 1475238104Sdes c38*) 1476238104Sdes echo c38-convex-bsd 1477238104Sdes exit ;; 1478238104Sdes c4*) 1479238104Sdes echo c4-convex-bsd 1480238104Sdes exit ;; 1481238104Sdes esac 1482238104Sdesfi 1483238104Sdes 1484238104Sdescat >&2 <<EOF 1485238104Sdes$0: unable to guess system type 1486238104Sdes 1487238104SdesThis script, last modified $timestamp, has failed to recognize 1488238104Sdesthe operating system you are using. It is advised that you 1489238104Sdesdownload the most up to date version of the config scripts from 1490238104Sdes 1491238104Sdes http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1492238104Sdesand 1493238104Sdes http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1494238104Sdes 1495238104SdesIf the version you run ($0) is already up to date, please 1496238104Sdessend the following data and any information you think might be 1497238104Sdespertinent to <config-patches@gnu.org> in order to provide the needed 1498238104Sdesinformation to handle your system. 1499238104Sdes 1500238104Sdesconfig.guess timestamp = $timestamp 1501238104Sdes 1502238104Sdesuname -m = `(uname -m) 2>/dev/null || echo unknown` 1503238104Sdesuname -r = `(uname -r) 2>/dev/null || echo unknown` 1504238104Sdesuname -s = `(uname -s) 2>/dev/null || echo unknown` 1505238104Sdesuname -v = `(uname -v) 2>/dev/null || echo unknown` 1506238104Sdes 1507238104Sdes/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1508238104Sdes/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1509238104Sdes 1510238104Sdeshostinfo = `(hostinfo) 2>/dev/null` 1511238104Sdes/bin/universe = `(/bin/universe) 2>/dev/null` 1512238104Sdes/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1513238104Sdes/bin/arch = `(/bin/arch) 2>/dev/null` 1514238104Sdes/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1515238104Sdes/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1516238104Sdes 1517238104SdesUNAME_MACHINE = ${UNAME_MACHINE} 1518238104SdesUNAME_RELEASE = ${UNAME_RELEASE} 1519238104SdesUNAME_SYSTEM = ${UNAME_SYSTEM} 1520238104SdesUNAME_VERSION = ${UNAME_VERSION} 1521238104SdesEOF 1522238104Sdes 1523238104Sdesexit 1 1524238104Sdes 1525238104Sdes# Local variables: 1526238104Sdes# eval: (add-hook 'write-file-hooks 'time-stamp) 1527238104Sdes# time-stamp-start: "timestamp='" 1528238104Sdes# time-stamp-format: "%:y-%02m-%02d" 1529238104Sdes# time-stamp-end: "'" 1530238104Sdes# End: 1531