aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Kenner1994-07-28 23:16:20 +0000
committerRichard Kenner1994-07-28 23:16:20 +0000
commitf3ec183ee86a60681df26744e21515dd413ce022 (patch)
tree184e6866bd4b958dac35f1beccb78723c11c9cdb
parent0440cc80a4e6578b08e713e04fd06fc9eceff137 (diff)
downloademacs-f3ec183ee86a60681df26744e21515dd413ce022.tar.gz
emacs-f3ec183ee86a60681df26744e21515dd413ce022.zip
*** empty log message ***
-rwxr-xr-xconfig.guess184
1 files changed, 162 insertions, 22 deletions
diff --git a/config.guess b/config.guess
index 57d079547c1..101fcb5c85a 100755
--- a/config.guess
+++ b/config.guess
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This script attempts to guess a canonical system name. 2# This script attempts to guess a canonical system name.
3# Copyright (C) 1992, 1993 Free Software Foundation, Inc. 3# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
4# 4#
5# This file is free software; you can redistribute it and/or modify it 5# This file is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License as published by 6# under the terms of the GNU General Public License as published by
@@ -18,9 +18,8 @@
18 18
19# 19#
20# This script attempts to guess a canonical system name similar to 20# This script attempts to guess a canonical system name similar to
21# config.sub. If it succeeds, it prints the system name on stdout, and 21# config.sub. If it succeeds, it prints the system name on stdout, and
22# exits with 0. Otherwise, it prints an error message on stderr, and 22# exits with 0. Otherwise, it exits with 1.
23# exits with 1.
24# 23#
25# The plan is that this can be called by configure scripts if you 24# The plan is that this can be called by configure scripts if you
26# don't specify an explicit system type (host/target name). 25# don't specify an explicit system type (host/target name).
@@ -34,12 +33,25 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
34UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 33UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
35UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 34UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
36 35
36trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
37
37# Note: order is significant - the case branches are not exclusive. 38# Note: order is significant - the case branches are not exclusive.
38 39
39case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 40case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
41 *:NetBSD:*:*)
42 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/-.*//'`
43 exit 0 ;;
40 alpha:OSF1:1.*:*) 44 alpha:OSF1:1.*:*)
45 # 1.2 uses "1.2" for uname -r.
41 echo alpha-dec-osf${UNAME_RELEASE} 46 echo alpha-dec-osf${UNAME_RELEASE}
42 exit 0 ;; 47 exit 0 ;;
48 alpha:OSF1:V1.*:* | alpha:OSF1:V[2-9].*:*)
49 # 1.3 and later use "V1.3", etc. for uname -r.
50 echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
51 exit 0 ;;
52 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
53 echo arm-acorn-riscix${UNAME_RELEASE}
54 exit 0;;
43 sun4*:SunOS:5.*:*) 55 sun4*:SunOS:5.*:*)
44 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 56 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
45 exit 0 ;; 57 exit 0 ;;
@@ -61,12 +73,28 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
61 VAX*:ULTRIX*:*:*) 73 VAX*:ULTRIX*:*:*)
62 echo vax-dec-ultrix${UNAME_RELEASE} 74 echo vax-dec-ultrix${UNAME_RELEASE}
63 exit 0 ;; 75 exit 0 ;;
76 mips:*:5*:RISCos)
77 echo mips-mips-riscos${UNAME_RELEASE}
78 exit 0 ;;
64 m88k:*:4*:R4*) 79 m88k:*:4*:R4*)
65 echo m88k-motorola-sysv4 80 echo m88k-motorola-sysv4
66 exit 0 ;; 81 exit 0 ;;
67 m88k:*:3*:R3*) 82 m88k:*:3*:R3*)
68 echo m88k-motorola-sysv3 83 echo m88k-motorola-sysv3
69 exit 0 ;; 84 exit 0 ;;
85 AViiON:dgux:*:*)
86 echo m88k-dg-dgux${UNAME_RELEASE}
87 exit 0 ;;
88 M88*:*:R3*:*)
89 # Delta 88k system running SVR3
90 echo m88k-motorola-sysv3
91 exit 0 ;;
92 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
93 echo m88k-tektronix-sysv3
94 exit 0 ;;
95 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
96 echo m68k-tektronix-bsd
97 exit 0 ;;
70 *:IRIX:*:*) 98 *:IRIX:*:*)
71 echo mips-sgi-irix${UNAME_RELEASE} 99 echo mips-sgi-irix${UNAME_RELEASE}
72 exit 0 ;; 100 exit 0 ;;
@@ -74,7 +102,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
74 echo i386-ibm-aix 102 echo i386-ibm-aix
75 exit 0 ;; 103 exit 0 ;;
76 *:AIX:2:3) 104 *:AIX:2:3)
77 echo rs6000-ibm-aix3.2 105 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
106 echo rs6000-ibm-aix3.2.5
107 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
108 echo rs6000-ibm-aix3.2.4
109 else
110 echo rs6000-ibm-aix3.2
111 fi
78 exit 0 ;; 112 exit 0 ;;
79 *:AIX:*:*) 113 *:AIX:*:*)
80 echo rs6000-ibm-aix 114 echo rs6000-ibm-aix
@@ -82,28 +116,66 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
82 *:BOSX:*:*) 116 *:BOSX:*:*)
83 echo rs6000-bull-bosx 117 echo rs6000-bull-bosx
84 exit 0 ;; 118 exit 0 ;;
85 9000/31?:HP-UX:*:*) 119 DPX/2?00:B.O.S.:*:*)
86 echo m68000-hp-hpux 120 echo m68k-bull-sysv3
87 exit 0 ;; 121 exit 0 ;;
88 9000/3??:HP-UX:*:*) 122 9000/[34]??:4.3bsd:1.*:*)
89 echo m68k-hp-hpux 123 echo m68k-hp-bsd
90 exit 0 ;; 124 exit 0 ;;
91 9000/7??:HP-UX:*:* | 9000/8?7:HP-UX:*:* ) 125 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
92 echo hppa1.1-hp-hpux 126 echo m68k-hp-bsd4.4
93 exit 0 ;; 127 exit 0 ;;
94 9000/8??:HP-UX:*:*) 128 9000/[3478]??:HP-UX:*:* | 9000/8?7:HP-UX:*:* )
95 echo hppa1.0-hp-hpux 129 case "${UNAME_MACHINE}" in
130 9000/31? ) HP_ARCH=m68000 ;;
131 9000/[34]?? ) HP_ARCH=m68k ;;
132 9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;;
133 9000/8?? ) HP_ARCH=hppa1.0 ;;
134 esac
135 case ${UNAME_RELEASE} in
136 *.B7.* ) HPUX_REV=7 ;;
137 *.B8.* | *.08.* ) HPUX_REV=8 ;;
138 *.09.* ) HPUX_REV=9 ;;
139 esac
140 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
141 exit 0 ;;
142 3050*:HI-UX:*:*)
143 sed 's/^ //' << EOF >dummy.c
144 #include <unistd.h>
145 int
146 main ()
147 {
148 long cpu = sysconf (_SC_CPU_VERSION);
149 if (CPU_IS_HP_MC68K (cpu))
150 puts ("m68k-hitachi-hiuxwe2");
151 else if (CPU_IS_PA_RISC (cpu))
152 {
153 switch (cpu)
154 {
155 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
156 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
157 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
158 default: puts ("hppa-hitachi-hiuxwe2"); break;
159 }
160 }
161 else puts ("unknown-hitachi-hiuxwe2");
162 exit (0);
163 }
164EOF
165 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
166 rm -f dummy.c dummy
167 echo unknown-hitachi-hiuxwe2
96 exit 0 ;; 168 exit 0 ;;
97 9000/8??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* ) 169 9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
98 echo hppa1.1-hp-bsd 170 echo hppa1.1-hp-bsd
99 exit 0 ;; 171 exit 0 ;;
100 9000/8??:4.3bsd:*:*) 172 9000/8??:4.3bsd:*:*)
101 echo hppa1.0-hp-bsd 173 echo hppa1.0-hp-bsd
102 exit 0 ;; 174 exit 0 ;;
103 C1*:ConvexOS:*:*) 175 C1*:ConvexOS:*:* | convex:ConvexOS:C1:*)
104 echo c1-convex-bsd 176 echo c1-convex-bsd
105 exit 0 ;; 177 exit 0 ;;
106 C2*:ConvexOS:*:*) 178 C2*:ConvexOS:*:* | convex:ConvexOS:C2:*)
107 echo c2-convex-bsd 179 echo c2-convex-bsd
108 exit 0 ;; 180 exit 0 ;;
109 CRAY*X-MP:UNICOS:*:*) 181 CRAY*X-MP:UNICOS:*:*)
@@ -115,10 +187,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
115 CRAY-2:UNICOS:*:*) 187 CRAY-2:UNICOS:*:*)
116 echo cray2-cray-unicos 188 echo cray2-cray-unicos
117 exit 0 ;; 189 exit 0 ;;
190 i[34]86:BSD/386:*:*)
191 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
192 exit 0 ;;
193 i[34]86:FreeBSD:*:*)
194 echo ${UNAME_MACHINE}-unknown-freebsd
195 exit 0 ;;
118 i[34]86:Linux:*:*) 196 i[34]86:Linux:*:*)
119 echo ${UNAME_MACHINE}-unknown-linux 197 echo ${UNAME_MACHINE}-unknown-linux
120 exit 0 ;; 198 exit 0 ;;
121 i[34]86:UNIX_SV:4.*:*) 199 i[34]86:UNIX_SV:4.*:* | i[34]86:SYSTEM_V:4.*:*)
122 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 200 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
123 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} 201 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
124 else 202 else
@@ -130,19 +208,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
130 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` 208 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
131 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 209 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
132 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL 210 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
211 elif test -f /usr/options/cb.name; then
212 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
213 echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
133 else 214 else
134 echo ${UNAME_MACHINE}-unknown-sysv3.2 215 echo ${UNAME_MACHINE}-unknown-sysv32
216 fi
217 exit 0 ;;
218 i860:*:4.*:*) # i860-SVR4
219 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
220 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
221 else # Add other i860-SVR4 vendors below as they are discovered.
222 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
135 fi 223 fi
136 exit 0 ;; 224 exit 0 ;;
137 mini*:CTIX:SYS*5:*) 225 mini*:CTIX:SYS*5:*)
138 # "miniframe" 226 # "miniframe"
139 echo m68010-convergent-sysv 227 echo m68010-convergent-sysv
140 exit 0 ;; 228 exit 0 ;;
141 M680[234]0:*:R3V[567]*:*) 229 M680[234]0:*:R3V[567]*:*)
142 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 230 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
231 3[34]??:*:4.0:* | 3[34]??,3[34]??:*:4.0:*)
232 uname -p 2>/dev/null | grep 86 >/dev/null \
233 && echo i486-ncr-sysv4 && exit 0 ;;
234 m680[234]0:LynxOS:2.2*:*)
235 echo m68k-lynx-lynxos${UNAME_RELEASE}
236 exit 0 ;;
237 mc68030:UNIX_System_V:4.*:*)
238 echo m68k-atari-sysv4
239 exit 0 ;;
240 i[34]86:LynxOS:2.2*:*)
241 echo i386-lynx-lynxos${UNAME_RELEASE}
242 exit 0 ;;
243 TSUNAMI:LynxOS:2.2*:*)
244 echo sparc-lynx-lynxos${UNAME_RELEASE}
245 exit 0 ;;
143esac 246esac
144 247
145echo '(No uname command or uname output not recognized.)' 1>&2 248#echo '(No uname command or uname output not recognized.)' 1>&2
146#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 249#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
147 250
148cat >dummy.c <<EOF 251cat >dummy.c <<EOF
@@ -150,15 +253,40 @@ main()
150{ 253{
151#if defined (sony) 254#if defined (sony)
152#if defined (MIPSEB) 255#if defined (MIPSEB)
256 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
257 I don't know.... */
258 printf ("mips-sony-bsd\n"); exit (0);
153#else 259#else
154 printf("m68k-sony-newsos\n"); exit(0); 260 printf("m68k-sony-newsos\n"); exit(0);
155#endif 261#endif
156#endif 262#endif
157 263
264#if defined (__arm) && defined (__acorn) && defined (__unix)
265 printf("arm-acorn-riscix"); exit (0);
266#endif
267
158#if defined(hp300) && !defined(hpux) 268#if defined(hp300) && !defined(hpux)
159 printf("m68k-hp-bsd\n"); exit(0); 269 printf("m68k-hp-bsd\n"); exit(0);
160#endif 270#endif
161 271
272#if defined(NeXT)
273#if !defined(__ARCHITECTURE__)
274#define __ARCHITECTURE__ "m68k"
275#endif
276 int version;
277 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
278 if (version==2)
279 {
280 printf("%s-next-ns2\n", __ARCHITECTURE__);
281 exit(0);
282 }
283 else
284 {
285 printf("%s-next-ns3\n", __ARCHITECTURE__);
286 exit(0);
287 }
288#endif
289
162#if defined (MULTIMAX) || defined (n16) 290#if defined (MULTIMAX) || defined (n16)
163#if defined (UMAXV) 291#if defined (UMAXV)
164 printf("ns32k-encore-sysv\n"); exit(0); 292 printf("ns32k-encore-sysv\n"); exit(0);
@@ -188,13 +316,25 @@ main()
188 printf("i386-sequent-ptx\n"); exit(0); 316 printf("i386-sequent-ptx\n"); exit(0);
189#endif 317#endif
190 318
319#if defined(vax)
320#if !defined(ultrix)
321 printf("vax-dec-bsd\n"); exit(0);
322#else
323 printf("vax-dec-ultrix\n"); exit(0);
324#endif
325#endif
326
191 exit (1); 327 exit (1);
192} 328}
193EOF 329EOF
194 330
195${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 331${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
196rm -f dummy.c dummy 332rm -f dummy.c dummy
197 333
198echo '(Unable to guess system type)' 1>&2 334# Apollos put the system type in the environment.
335
336test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
337
338#echo '(Unable to guess system type)' 1>&2
199 339
200exit 1 340exit 1