annotate lib/swig/swigwin-2.0.11/Tools/config/config.guess @ 2575:a76d408c5132 tip

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