annotate config.guess @ 1283:b04354e24d1b

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