common/autoconf/build-aux/autoconf-config.guess

Mon, 14 Sep 2020 16:42:03 +0100

author
andrew
date
Mon, 14 Sep 2020 16:42:03 +0100
changeset 2554
7f60c2d9823e
parent 794
8dadd26c2a58
child 1133
50aaf272884f
permissions
-rw-r--r--

Added tag jdk8u272-b08 for changeset 34c6baf21464

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

mercurial