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