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