common/autoconf/build-aux/config.guess

Tue, 10 Apr 2012 08:18:28 -0700

author
ohair
date
Tue, 10 Apr 2012 08:18:28 -0700
changeset 425
e1830598f0b7
child 458
c8d320b48626
permissions
-rw-r--r--

7074397: Build infrastructure changes (makefile re-write)
Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: ohrstrom <fredrik.ohrstrom@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>

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

mercurial