memory/jemalloc/src/config.guess

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial