annotate src/opus-1.3/config.guess @ 169:223a55898ab9 tip default

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