summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-08-02 10:48:04 +1000
committerDamien Miller <djm@mindrot.org>2016-08-02 10:48:04 +1000
commit23902e31dfd18c6d7bb41ccd73de3b5358a377da (patch)
tree9a4e939b4404a75ad3fa93fac63000dc73c9153d /config.guess
parentdd1031b78b83083615b68d7163c44f4408635be2 (diff)
update config.guess and config.sub to current
upstream commit 562f3512b3911ba0c77a7f68214881d1f241f46e
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess475
1 files changed, 194 insertions, 281 deletions
diff --git a/config.guess b/config.guess
index c5636280d..c4bd827a7 100755
--- a/config.guess
+++ b/config.guess
@@ -1,14 +1,12 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright 1992-2016 Free Software Foundation, Inc.
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011, 2012, 2013 Free Software Foundation, Inc.
6 4
7timestamp='2012-12-23' 5timestamp='2016-05-15'
8 6
9# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or 9# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version. 10# (at your option) any later version.
13# 11#
14# This program is distributed in the hope that it will be useful, but 12# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-12-23'
22# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
26 24# program. This Exception is an additional permission under section 7
27 25# of the GNU General Public License, version 3 ("GPLv3").
28# Originally written by Per Bothner. Please send patches (context
29# diff format) to <config-patches@gnu.org> and include a ChangeLog
30# entry.
31# 26#
32# This script attempts to guess a canonical system name similar to 27# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
33# config.sub. If it succeeds, it prints the system name on stdout, and
34# exits with 0. Otherwise, it exits with 1.
35# 28#
36# You can get the latest version of this script from: 29# You can get the latest version of this script from:
37# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 30# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31#
32# Please send patches to <config-patches@gnu.org>.
33
38 34
39me=`echo "$0" | sed -e 's,.*/,,'` 35me=`echo "$0" | sed -e 's,.*/,,'`
40 36
@@ -54,9 +50,7 @@ version="\
54GNU config.guess ($timestamp) 50GNU config.guess ($timestamp)
55 51
56Originally written by Per Bothner. 52Originally written by Per Bothner.
57Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 53Copyright 1992-2016 Free Software Foundation, Inc.
582001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
592012, 2013 Free Software Foundation, Inc.
60 54
61This is free software; see the source for copying conditions. There is NO 55This is free software; see the source for copying conditions. There is NO
62warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140 134
135case "${UNAME_SYSTEM}" in
136Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval $set_cc_for_build
142 cat <<-EOF > $dummy.c
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
150 #endif
151 EOF
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153 ;;
154esac
155
141# Note: order is significant - the case branches are not exclusive. 156# Note: order is significant - the case branches are not exclusive.
142 157
143case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
153 # Note: NetBSD doesn't particularly care about the vendor 168 # Note: NetBSD doesn't particularly care about the vendor
154 # portion of the name. We always set it to "unknown". 169 # portion of the name. We always set it to "unknown".
155 sysctl="sysctl -n hw.machine_arch" 170 sysctl="sysctl -n hw.machine_arch"
156 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 171 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
157 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 172 /sbin/$sysctl 2>/dev/null || \
173 /usr/sbin/$sysctl 2>/dev/null || \
174 echo unknown)`
158 case "${UNAME_MACHINE_ARCH}" in 175 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;; 176 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;; 177 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;; 178 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;; 179 sh3eb) machine=sh-unknown ;;
163 sh5el) machine=sh5le-unknown ;; 180 sh5el) machine=sh5le-unknown ;;
181 earmv*)
182 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184 machine=${arch}${endian}-unknown
185 ;;
164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 186 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165 esac 187 esac
166 # The Operating System including object format, if it has switched 188 # The Operating System including object format, if it has switched
167 # to ELF recently, or will in the future. 189 # to ELF recently (or will in the future) and ABI.
168 case "${UNAME_MACHINE_ARCH}" in 190 case "${UNAME_MACHINE_ARCH}" in
191 earm*)
192 os=netbsdelf
193 ;;
169 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 194 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170 eval $set_cc_for_build 195 eval $set_cc_for_build
171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 196 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
182 os=netbsd 207 os=netbsd
183 ;; 208 ;;
184 esac 209 esac
210 # Determine ABI tags.
211 case "${UNAME_MACHINE_ARCH}" in
212 earm*)
213 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
215 ;;
216 esac
185 # The OS release 217 # The OS release
186 # Debian GNU/NetBSD machines have a different userland, and 218 # Debian GNU/NetBSD machines have a different userland, and
187 # thus, need a distinct triplet. However, they do not need 219 # thus, need a distinct triplet. However, they do not need
@@ -192,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
192 release='-gnu' 224 release='-gnu'
193 ;; 225 ;;
194 *) 226 *)
195 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 227 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
196 ;; 228 ;;
197 esac 229 esac
198 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 230 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199 # contains redundant information, the shorter form: 231 # contains redundant information, the shorter form:
200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 232 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 echo "${machine}-${os}${release}" 233 echo "${machine}-${os}${release}${abi}"
202 exit ;; 234 exit ;;
203 *:Bitrig:*:*) 235 *:Bitrig:*:*)
204 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 236 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -208,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
208 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 240 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
209 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 241 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
210 exit ;; 242 exit ;;
243 *:LibertyBSD:*:*)
244 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
246 exit ;;
211 *:ekkoBSD:*:*) 247 *:ekkoBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 248 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
213 exit ;; 249 exit ;;
@@ -220,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
220 *:MirBSD:*:*) 256 *:MirBSD:*:*)
221 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 257 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
222 exit ;; 258 exit ;;
259 *:Sortix:*:*)
260 echo ${UNAME_MACHINE}-unknown-sortix
261 exit ;;
223 alpha:OSF1:*:*) 262 alpha:OSF1:*:*)
224 case $UNAME_RELEASE in 263 case $UNAME_RELEASE in
225 *4.0) 264 *4.0)
@@ -236,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
236 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 275 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
237 case "$ALPHA_CPU_TYPE" in 276 case "$ALPHA_CPU_TYPE" in
238 "EV4 (21064)") 277 "EV4 (21064)")
239 UNAME_MACHINE="alpha" ;; 278 UNAME_MACHINE=alpha ;;
240 "EV4.5 (21064)") 279 "EV4.5 (21064)")
241 UNAME_MACHINE="alpha" ;; 280 UNAME_MACHINE=alpha ;;
242 "LCA4 (21066/21068)") 281 "LCA4 (21066/21068)")
243 UNAME_MACHINE="alpha" ;; 282 UNAME_MACHINE=alpha ;;
244 "EV5 (21164)") 283 "EV5 (21164)")
245 UNAME_MACHINE="alphaev5" ;; 284 UNAME_MACHINE=alphaev5 ;;
246 "EV5.6 (21164A)") 285 "EV5.6 (21164A)")
247 UNAME_MACHINE="alphaev56" ;; 286 UNAME_MACHINE=alphaev56 ;;
248 "EV5.6 (21164PC)") 287 "EV5.6 (21164PC)")
249 UNAME_MACHINE="alphapca56" ;; 288 UNAME_MACHINE=alphapca56 ;;
250 "EV5.7 (21164PC)") 289 "EV5.7 (21164PC)")
251 UNAME_MACHINE="alphapca57" ;; 290 UNAME_MACHINE=alphapca57 ;;
252 "EV6 (21264)") 291 "EV6 (21264)")
253 UNAME_MACHINE="alphaev6" ;; 292 UNAME_MACHINE=alphaev6 ;;
254 "EV6.7 (21264A)") 293 "EV6.7 (21264A)")
255 UNAME_MACHINE="alphaev67" ;; 294 UNAME_MACHINE=alphaev67 ;;
256 "EV6.8CB (21264C)") 295 "EV6.8CB (21264C)")
257 UNAME_MACHINE="alphaev68" ;; 296 UNAME_MACHINE=alphaev68 ;;
258 "EV6.8AL (21264B)") 297 "EV6.8AL (21264B)")
259 UNAME_MACHINE="alphaev68" ;; 298 UNAME_MACHINE=alphaev68 ;;
260 "EV6.8CX (21264D)") 299 "EV6.8CX (21264D)")
261 UNAME_MACHINE="alphaev68" ;; 300 UNAME_MACHINE=alphaev68 ;;
262 "EV6.9A (21264/EV69A)") 301 "EV6.9A (21264/EV69A)")
263 UNAME_MACHINE="alphaev69" ;; 302 UNAME_MACHINE=alphaev69 ;;
264 "EV7 (21364)") 303 "EV7 (21364)")
265 UNAME_MACHINE="alphaev7" ;; 304 UNAME_MACHINE=alphaev7 ;;
266 "EV7.9 (21364A)") 305 "EV7.9 (21364A)")
267 UNAME_MACHINE="alphaev79" ;; 306 UNAME_MACHINE=alphaev79 ;;
268 esac 307 esac
269 # A Pn.n version is a patched version. 308 # A Pn.n version is a patched version.
270 # A Vn.n version is a released version. 309 # A Vn.n version is a released version.
271 # A Tn.n version is a released field test version. 310 # A Tn.n version is a released field test version.
272 # A Xn.n version is an unreleased experimental baselevel. 311 # A Xn.n version is an unreleased experimental baselevel.
273 # 1.2 uses "1.2" for uname -r. 312 # 1.2 uses "1.2" for uname -r.
274 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 313 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
275 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 314 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
276 exitcode=$? 315 exitcode=$?
277 trap '' 0 316 trap '' 0
@@ -344,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
344 exit ;; 383 exit ;;
345 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 384 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
346 eval $set_cc_for_build 385 eval $set_cc_for_build
347 SUN_ARCH="i386" 386 SUN_ARCH=i386
348 # If there is a compiler, see if it is configured for 64-bit objects. 387 # If there is a compiler, see if it is configured for 64-bit objects.
349 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 388 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
350 # This test works for both compilers. 389 # This test works for both compilers.
351 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 390 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
352 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 391 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
353 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 392 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
354 grep IS_64BIT_ARCH >/dev/null 393 grep IS_64BIT_ARCH >/dev/null
355 then 394 then
356 SUN_ARCH="x86_64" 395 SUN_ARCH=x86_64
357 fi 396 fi
358 fi 397 fi
359 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 398 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -378,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
378 exit ;; 417 exit ;;
379 sun*:*:4.2BSD:*) 418 sun*:*:4.2BSD:*)
380 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 419 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
381 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 420 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
382 case "`/bin/arch`" in 421 case "`/bin/arch`" in
383 sun3) 422 sun3)
384 echo m68k-sun-sunos${UNAME_RELEASE} 423 echo m68k-sun-sunos${UNAME_RELEASE}
@@ -564,8 +603,9 @@ EOF
564 else 603 else
565 IBM_ARCH=powerpc 604 IBM_ARCH=powerpc
566 fi 605 fi
567 if [ -x /usr/bin/oslevel ] ; then 606 if [ -x /usr/bin/lslpp ] ; then
568 IBM_REV=`/usr/bin/oslevel` 607 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
608 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
569 else 609 else
570 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 610 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
571 fi 611 fi
@@ -602,13 +642,13 @@ EOF
602 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 642 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
603 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 643 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
604 case "${sc_cpu_version}" in 644 case "${sc_cpu_version}" in
605 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 645 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
606 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 646 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
607 532) # CPU_PA_RISC2_0 647 532) # CPU_PA_RISC2_0
608 case "${sc_kernel_bits}" in 648 case "${sc_kernel_bits}" in
609 32) HP_ARCH="hppa2.0n" ;; 649 32) HP_ARCH=hppa2.0n ;;
610 64) HP_ARCH="hppa2.0w" ;; 650 64) HP_ARCH=hppa2.0w ;;
611 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 651 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
612 esac ;; 652 esac ;;
613 esac 653 esac
614 fi 654 fi
@@ -647,11 +687,11 @@ EOF
647 exit (0); 687 exit (0);
648 } 688 }
649EOF 689EOF
650 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 690 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
651 test -z "$HP_ARCH" && HP_ARCH=hppa 691 test -z "$HP_ARCH" && HP_ARCH=hppa
652 fi ;; 692 fi ;;
653 esac 693 esac
654 if [ ${HP_ARCH} = "hppa2.0w" ] 694 if [ ${HP_ARCH} = hppa2.0w ]
655 then 695 then
656 eval $set_cc_for_build 696 eval $set_cc_for_build
657 697
@@ -664,12 +704,12 @@ EOF
664 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 704 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
665 # => hppa64-hp-hpux11.23 705 # => hppa64-hp-hpux11.23
666 706
667 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 707 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
668 grep -q __LP64__ 708 grep -q __LP64__
669 then 709 then
670 HP_ARCH="hppa2.0w" 710 HP_ARCH=hppa2.0w
671 else 711 else
672 HP_ARCH="hppa64" 712 HP_ARCH=hppa64
673 fi 713 fi
674 fi 714 fi
675 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 715 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -774,14 +814,14 @@ EOF
774 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 814 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
775 exit ;; 815 exit ;;
776 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 816 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
777 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 817 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 818 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 819 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
780 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 820 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;; 821 exit ;;
782 5000:UNIX_System_V:4.*:*) 822 5000:UNIX_System_V:4.*:*)
783 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 823 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
784 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 824 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
785 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 825 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
786 exit ;; 826 exit ;;
787 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 827 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -811,7 +851,7 @@ EOF
811 *:MINGW*:*) 851 *:MINGW*:*)
812 echo ${UNAME_MACHINE}-pc-mingw32 852 echo ${UNAME_MACHINE}-pc-mingw32
813 exit ;; 853 exit ;;
814 i*:MSYS*:*) 854 *:MSYS*:*)
815 echo ${UNAME_MACHINE}-pc-msys 855 echo ${UNAME_MACHINE}-pc-msys
816 exit ;; 856 exit ;;
817 i*:windows32*:*) 857 i*:windows32*:*)
@@ -859,21 +899,21 @@ EOF
859 exit ;; 899 exit ;;
860 *:GNU:*:*) 900 *:GNU:*:*)
861 # the GNU system 901 # the GNU system
862 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 902 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
863 exit ;; 903 exit ;;
864 *:GNU/*:*:*) 904 *:GNU/*:*:*)
865 # other systems with GNU libc and userland 905 # other systems with GNU libc and userland
866 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 906 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
867 exit ;; 907 exit ;;
868 i*86:Minix:*:*) 908 i*86:Minix:*:*)
869 echo ${UNAME_MACHINE}-pc-minix 909 echo ${UNAME_MACHINE}-pc-minix
870 exit ;; 910 exit ;;
871 aarch64:Linux:*:*) 911 aarch64:Linux:*:*)
872 echo ${UNAME_MACHINE}-unknown-linux-gnu 912 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
873 exit ;; 913 exit ;;
874 aarch64_be:Linux:*:*) 914 aarch64_be:Linux:*:*)
875 UNAME_MACHINE=aarch64_be 915 UNAME_MACHINE=aarch64_be
876 echo ${UNAME_MACHINE}-unknown-linux-gnu 916 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
877 exit ;; 917 exit ;;
878 alpha:Linux:*:*) 918 alpha:Linux:*:*)
879 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 919 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -886,59 +926,60 @@ EOF
886 EV68*) UNAME_MACHINE=alphaev68 ;; 926 EV68*) UNAME_MACHINE=alphaev68 ;;
887 esac 927 esac
888 objdump --private-headers /bin/sh | grep -q ld.so.1 928 objdump --private-headers /bin/sh | grep -q ld.so.1
889 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 929 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
890 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
931 exit ;;
932 arc:Linux:*:* | arceb:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 exit ;; 934 exit ;;
892 arm*:Linux:*:*) 935 arm*:Linux:*:*)
893 eval $set_cc_for_build 936 eval $set_cc_for_build
894 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 937 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
895 | grep -q __ARM_EABI__ 938 | grep -q __ARM_EABI__
896 then 939 then
897 echo ${UNAME_MACHINE}-unknown-linux-gnu 940 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
898 else 941 else
899 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 942 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
900 | grep -q __ARM_PCS_VFP 943 | grep -q __ARM_PCS_VFP
901 then 944 then
902 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
903 else 946 else
904 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
905 fi 948 fi
906 fi 949 fi
907 exit ;; 950 exit ;;
908 avr32*:Linux:*:*) 951 avr32*:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu 952 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
910 exit ;; 953 exit ;;
911 cris:Linux:*:*) 954 cris:Linux:*:*)
912 echo ${UNAME_MACHINE}-axis-linux-gnu 955 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
913 exit ;; 956 exit ;;
914 crisv32:Linux:*:*) 957 crisv32:Linux:*:*)
915 echo ${UNAME_MACHINE}-axis-linux-gnu 958 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
959 exit ;;
960 e2k:Linux:*:*)
961 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916 exit ;; 962 exit ;;
917 frv:Linux:*:*) 963 frv:Linux:*:*)
918 echo ${UNAME_MACHINE}-unknown-linux-gnu 964 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
919 exit ;; 965 exit ;;
920 hexagon:Linux:*:*) 966 hexagon:Linux:*:*)
921 echo ${UNAME_MACHINE}-unknown-linux-gnu 967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
922 exit ;; 968 exit ;;
923 i*86:Linux:*:*) 969 i*86:Linux:*:*)
924 LIBC=gnu 970 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
925 eval $set_cc_for_build
926 sed 's/^ //' << EOF >$dummy.c
927 #ifdef __dietlibc__
928 LIBC=dietlibc
929 #endif
930EOF
931 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
932 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
933 exit ;; 971 exit ;;
934 ia64:Linux:*:*) 972 ia64:Linux:*:*)
935 echo ${UNAME_MACHINE}-unknown-linux-gnu 973 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974 exit ;;
975 k1om:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
936 exit ;; 977 exit ;;
937 m32r*:Linux:*:*) 978 m32r*:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-gnu 979 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
939 exit ;; 980 exit ;;
940 m68*:Linux:*:*) 981 m68*:Linux:*:*)
941 echo ${UNAME_MACHINE}-unknown-linux-gnu 982 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
942 exit ;; 983 exit ;;
943 mips:Linux:*:* | mips64:Linux:*:*) 984 mips:Linux:*:* | mips64:Linux:*:*)
944 eval $set_cc_for_build 985 eval $set_cc_for_build
@@ -957,60 +998,63 @@ EOF
957 #endif 998 #endif
958EOF 999EOF
959 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 1000 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
960 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 1001 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
961 ;; 1002 ;;
962 or32:Linux:*:*) 1003 openrisc*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu 1004 echo or1k-unknown-linux-${LIBC}
1005 exit ;;
1006 or32:Linux:*:* | or1k*:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 exit ;; 1008 exit ;;
965 padre:Linux:*:*) 1009 padre:Linux:*:*)
966 echo sparc-unknown-linux-gnu 1010 echo sparc-unknown-linux-${LIBC}
967 exit ;; 1011 exit ;;
968 parisc64:Linux:*:* | hppa64:Linux:*:*) 1012 parisc64:Linux:*:* | hppa64:Linux:*:*)
969 echo hppa64-unknown-linux-gnu 1013 echo hppa64-unknown-linux-${LIBC}
970 exit ;; 1014 exit ;;
971 parisc:Linux:*:* | hppa:Linux:*:*) 1015 parisc:Linux:*:* | hppa:Linux:*:*)
972 # Look for CPU level 1016 # Look for CPU level
973 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1017 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
974 PA7*) echo hppa1.1-unknown-linux-gnu ;; 1018 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
975 PA8*) echo hppa2.0-unknown-linux-gnu ;; 1019 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
976 *) echo hppa-unknown-linux-gnu ;; 1020 *) echo hppa-unknown-linux-${LIBC} ;;
977 esac 1021 esac
978 exit ;; 1022 exit ;;
979 ppc64:Linux:*:*) 1023 ppc64:Linux:*:*)
980 echo powerpc64-unknown-linux-gnu 1024 echo powerpc64-unknown-linux-${LIBC}
981 exit ;; 1025 exit ;;
982 ppc:Linux:*:*) 1026 ppc:Linux:*:*)
983 echo powerpc-unknown-linux-gnu 1027 echo powerpc-unknown-linux-${LIBC}
984 exit ;; 1028 exit ;;
985 ppc64le:Linux:*:*) 1029 ppc64le:Linux:*:*)
986 echo powerpc64le-unknown-linux-gnu 1030 echo powerpc64le-unknown-linux-${LIBC}
987 exit ;; 1031 exit ;;
988 ppcle:Linux:*:*) 1032 ppcle:Linux:*:*)
989 echo powerpcle-unknown-linux-gnu 1033 echo powerpcle-unknown-linux-${LIBC}
990 exit ;; 1034 exit ;;
991 s390:Linux:*:* | s390x:Linux:*:*) 1035 s390:Linux:*:* | s390x:Linux:*:*)
992 echo ${UNAME_MACHINE}-ibm-linux 1036 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
993 exit ;; 1037 exit ;;
994 sh64*:Linux:*:*) 1038 sh64*:Linux:*:*)
995 echo ${UNAME_MACHINE}-unknown-linux-gnu 1039 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
996 exit ;; 1040 exit ;;
997 sh*:Linux:*:*) 1041 sh*:Linux:*:*)
998 echo ${UNAME_MACHINE}-unknown-linux-gnu 1042 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
999 exit ;; 1043 exit ;;
1000 sparc:Linux:*:* | sparc64:Linux:*:*) 1044 sparc:Linux:*:* | sparc64:Linux:*:*)
1001 echo ${UNAME_MACHINE}-unknown-linux-gnu 1045 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1002 exit ;; 1046 exit ;;
1003 tile*:Linux:*:*) 1047 tile*:Linux:*:*)
1004 echo ${UNAME_MACHINE}-unknown-linux-gnu 1048 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1005 exit ;; 1049 exit ;;
1006 vax:Linux:*:*) 1050 vax:Linux:*:*)
1007 echo ${UNAME_MACHINE}-dec-linux-gnu 1051 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1008 exit ;; 1052 exit ;;
1009 x86_64:Linux:*:*) 1053 x86_64:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-gnu 1054 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1011 exit ;; 1055 exit ;;
1012 xtensa*:Linux:*:*) 1056 xtensa*:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-gnu 1057 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1014 exit ;; 1058 exit ;;
1015 i*86:DYNIX/ptx:4*:*) 1059 i*86:DYNIX/ptx:4*:*)
1016 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1060 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1086,7 +1130,7 @@ EOF
1086 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1130 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1087 # the processor, so we play safe by assuming i586. 1131 # the processor, so we play safe by assuming i586.
1088 # Note: whatever this is, it MUST be the same as what config.sub 1132 # Note: whatever this is, it MUST be the same as what config.sub
1089 # prints for the "djgpp" host, or else GDB configury will decide that 1133 # prints for the "djgpp" host, or else GDB configure will decide that
1090 # this is a cross-build. 1134 # this is a cross-build.
1091 echo i586-pc-msdosdjgpp 1135 echo i586-pc-msdosdjgpp
1092 exit ;; 1136 exit ;;
@@ -1235,6 +1279,9 @@ EOF
1235 SX-8R:SUPER-UX:*:*) 1279 SX-8R:SUPER-UX:*:*)
1236 echo sx8r-nec-superux${UNAME_RELEASE} 1280 echo sx8r-nec-superux${UNAME_RELEASE}
1237 exit ;; 1281 exit ;;
1282 SX-ACE:SUPER-UX:*:*)
1283 echo sxace-nec-superux${UNAME_RELEASE}
1284 exit ;;
1238 Power*:Rhapsody:*:*) 1285 Power*:Rhapsody:*:*)
1239 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1286 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1240 exit ;; 1287 exit ;;
@@ -1243,24 +1290,36 @@ EOF
1243 exit ;; 1290 exit ;;
1244 *:Darwin:*:*) 1291 *:Darwin:*:*)
1245 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1292 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1246 case $UNAME_PROCESSOR in 1293 eval $set_cc_for_build
1247 i386) 1294 if test "$UNAME_PROCESSOR" = unknown ; then
1248 eval $set_cc_for_build 1295 UNAME_PROCESSOR=powerpc
1249 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1296 fi
1250 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1297 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1251 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1298 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1252 grep IS_64BIT_ARCH >/dev/null 1299 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1253 then 1300 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1254 UNAME_PROCESSOR="x86_64" 1301 grep IS_64BIT_ARCH >/dev/null
1255 fi 1302 then
1256 fi ;; 1303 case $UNAME_PROCESSOR in
1257 unknown) UNAME_PROCESSOR=powerpc ;; 1304 i386) UNAME_PROCESSOR=x86_64 ;;
1258 esac 1305 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1306 esac
1307 fi
1308 fi
1309 elif test "$UNAME_PROCESSOR" = i386 ; then
1310 # Avoid executing cc on OS X 10.9, as it ships with a stub
1311 # that puts up a graphical alert prompting to install
1312 # developer tools. Any system running Mac OS X 10.7 or
1313 # later (Darwin 11 and later) is required to have a 64-bit
1314 # processor. This is not true of the ARM version of Darwin
1315 # that Apple uses in portable devices.
1316 UNAME_PROCESSOR=x86_64
1317 fi
1259 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1318 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1260 exit ;; 1319 exit ;;
1261 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1320 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1262 UNAME_PROCESSOR=`uname -p` 1321 UNAME_PROCESSOR=`uname -p`
1263 if test "$UNAME_PROCESSOR" = "x86"; then 1322 if test "$UNAME_PROCESSOR" = x86; then
1264 UNAME_PROCESSOR=i386 1323 UNAME_PROCESSOR=i386
1265 UNAME_MACHINE=pc 1324 UNAME_MACHINE=pc
1266 fi 1325 fi
@@ -1291,7 +1350,7 @@ EOF
1291 # "uname -m" is not consistent, so use $cputype instead. 386 1350 # "uname -m" is not consistent, so use $cputype instead. 386
1292 # is converted to i386 for consistency with other x86 1351 # is converted to i386 for consistency with other x86
1293 # operating systems. 1352 # operating systems.
1294 if test "$cputype" = "386"; then 1353 if test "$cputype" = 386; then
1295 UNAME_MACHINE=i386 1354 UNAME_MACHINE=i386
1296 else 1355 else
1297 UNAME_MACHINE="$cputype" 1356 UNAME_MACHINE="$cputype"
@@ -1333,7 +1392,7 @@ EOF
1333 echo i386-pc-xenix 1392 echo i386-pc-xenix
1334 exit ;; 1393 exit ;;
1335 i*86:skyos:*:*) 1394 i*86:skyos:*:*)
1336 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1395 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1337 exit ;; 1396 exit ;;
1338 i*86:rdos:*:*) 1397 i*86:rdos:*:*)
1339 echo ${UNAME_MACHINE}-pc-rdos 1398 echo ${UNAME_MACHINE}-pc-rdos
@@ -1344,171 +1403,25 @@ EOF
1344 x86_64:VMkernel:*:*) 1403 x86_64:VMkernel:*:*)
1345 echo ${UNAME_MACHINE}-unknown-esx 1404 echo ${UNAME_MACHINE}-unknown-esx
1346 exit ;; 1405 exit ;;
1347esac 1406 amd64:Isilon\ OneFS:*:*)
1348 1407 echo x86_64-unknown-onefs
1349eval $set_cc_for_build
1350cat >$dummy.c <<EOF
1351#ifdef _SEQUENT_
1352# include <sys/types.h>
1353# include <sys/utsname.h>
1354#endif
1355main ()
1356{
1357#if defined (sony)
1358#if defined (MIPSEB)
1359 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1360 I don't know.... */
1361 printf ("mips-sony-bsd\n"); exit (0);
1362#else
1363#include <sys/param.h>
1364 printf ("m68k-sony-newsos%s\n",
1365#ifdef NEWSOS4
1366 "4"
1367#else
1368 ""
1369#endif
1370 ); exit (0);
1371#endif
1372#endif
1373
1374#if defined (__arm) && defined (__acorn) && defined (__unix)
1375 printf ("arm-acorn-riscix\n"); exit (0);
1376#endif
1377
1378#if defined (hp300) && !defined (hpux)
1379 printf ("m68k-hp-bsd\n"); exit (0);
1380#endif
1381
1382#if defined (NeXT)
1383#if !defined (__ARCHITECTURE__)
1384#define __ARCHITECTURE__ "m68k"
1385#endif
1386 int version;
1387 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1388 if (version < 4)
1389 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1390 else
1391 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1392 exit (0);
1393#endif
1394
1395#if defined (MULTIMAX) || defined (n16)
1396#if defined (UMAXV)
1397 printf ("ns32k-encore-sysv\n"); exit (0);
1398#else
1399#if defined (CMU)
1400 printf ("ns32k-encore-mach\n"); exit (0);
1401#else
1402 printf ("ns32k-encore-bsd\n"); exit (0);
1403#endif
1404#endif
1405#endif
1406
1407#if defined (__386BSD__)
1408 printf ("i386-pc-bsd\n"); exit (0);
1409#endif
1410
1411#if defined (sequent)
1412#if defined (i386)
1413 printf ("i386-sequent-dynix\n"); exit (0);
1414#endif
1415#if defined (ns32000)
1416 printf ("ns32k-sequent-dynix\n"); exit (0);
1417#endif
1418#endif
1419
1420#if defined (_SEQUENT_)
1421 struct utsname un;
1422
1423 uname(&un);
1424
1425 if (strncmp(un.version, "V2", 2) == 0) {
1426 printf ("i386-sequent-ptx2\n"); exit (0);
1427 }
1428 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1429 printf ("i386-sequent-ptx1\n"); exit (0);
1430 }
1431 printf ("i386-sequent-ptx\n"); exit (0);
1432
1433#endif
1434
1435#if defined (vax)
1436# if !defined (ultrix)
1437# include <sys/param.h>
1438# if defined (BSD)
1439# if BSD == 43
1440 printf ("vax-dec-bsd4.3\n"); exit (0);
1441# else
1442# if BSD == 199006
1443 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1444# else
1445 printf ("vax-dec-bsd\n"); exit (0);
1446# endif
1447# endif
1448# else
1449 printf ("vax-dec-bsd\n"); exit (0);
1450# endif
1451# else
1452 printf ("vax-dec-ultrix\n"); exit (0);
1453# endif
1454#endif
1455
1456#if defined (alliant) && defined (i860)
1457 printf ("i860-alliant-bsd\n"); exit (0);
1458#endif
1459
1460 exit (1);
1461}
1462EOF
1463
1464$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1465 { echo "$SYSTEM_NAME"; exit; }
1466
1467# Apollos put the system type in the environment.
1468
1469test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1470
1471# Convex versions that predate uname can use getsysinfo(1)
1472
1473if [ -x /usr/convex/getsysinfo ]
1474then
1475 case `getsysinfo -f cpu_type` in
1476 c1*)
1477 echo c1-convex-bsd
1478 exit ;; 1408 exit ;;
1479 c2*) 1409esac
1480 if getsysinfo -f scalar_acc
1481 then echo c32-convex-bsd
1482 else echo c2-convex-bsd
1483 fi
1484 exit ;;
1485 c34*)
1486 echo c34-convex-bsd
1487 exit ;;
1488 c38*)
1489 echo c38-convex-bsd
1490 exit ;;
1491 c4*)
1492 echo c4-convex-bsd
1493 exit ;;
1494 esac
1495fi
1496 1410
1497cat >&2 <<EOF 1411cat >&2 <<EOF
1498$0: unable to guess system type 1412$0: unable to guess system type
1499 1413
1500This script, last modified $timestamp, has failed to recognize 1414This script (version $timestamp), has failed to recognize the
1501the operating system you are using. It is advised that you 1415operating system you are using. If your script is old, overwrite
1502download the most up to date version of the config scripts from 1416config.guess and config.sub with the latest versions from:
1503 1417
1504 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1418 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1505and 1419and
1506 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1420 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1507 1421
1508If the version you run ($0) is already up to date, please 1422If $0 has already been updated, send the following data and any
1509send the following data and any information you think might be 1423information you think might be pertinent to config-patches@gnu.org to
1510pertinent to <config-patches@gnu.org> in order to provide the needed 1424provide the necessary information to handle your system.
1511information to handle your system.
1512 1425
1513config.guess timestamp = $timestamp 1426config.guess timestamp = $timestamp
1514 1427