ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/ac-tools/config.guess
Revision: 1310
Committed: Tue Oct 21 18:48:27 2008 UTC (16 years, 7 months ago) by gezelter
Original Path: trunk/ac-tools/config.guess
File size: 42080 byte(s)
Log Message:
Fixed a bug in QHULL autoconf logic

File Contents

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

Properties

Name Value
svn:executable *