- architectural checkpoint for zeta-function.
[ginac.git] / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 #   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
4 # This file is (in principle) common to ALL GNU software.
5 # The presence of a machine in this file suggests that SOME GNU software
6 # can handle that machine.  It does not imply ALL GNU software can.
7 #
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
22
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28 # Configuration subroutine to validate and canonicalize a configuration type.
29 # Supply the specified configuration type as an argument.
30 # If it is invalid, we print an error message on stderr and exit with code 1.
31 # Otherwise, we print the canonical config type on stdout and succeed.
32
33 # This file is supposed to be the same for all GNU packages
34 # and recognize all the CPU types, system types and aliases
35 # that are meaningful with *any* GNU software.
36 # Each package is responsible for reporting which valid configurations
37 # it does not support.  The user should be able to distinguish
38 # a failure to support a valid configuration from a meaningless
39 # configuration.
40
41 # The goal of this file is to map all the various variations of a given
42 # machine specification into a single specification in the form:
43 #       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44 # or in some cases, the newer four-part form:
45 #       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46 # It is wrong to echo any other type of specification.
47
48 if [ x$1 = x ]
49 then
50         echo Configuration name missing. 1>&2
51         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52         echo "or     $0 ALIAS" 1>&2
53         echo where ALIAS is a recognized configuration type. 1>&2
54         exit 1
55 fi
56
57 # First pass through any local machine types.
58 case $1 in
59         *local*)
60                 echo $1
61                 exit 0
62                 ;;
63         *)
64         ;;
65 esac
66
67 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68 # Here we must recognize all the valid KERNEL-OS combinations.
69 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70 case $maybe_os in
71   linux-gnu*)
72     os=-$maybe_os
73     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
74     ;;
75   *)
76     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77     if [ $basic_machine != $1 ]
78     then os=`echo $1 | sed 's/.*-/-/'`
79     else os=; fi
80     ;;
81 esac
82
83 ### Let's recognize common machines as not being operating systems so
84 ### that things like config.sub decstation-3100 work.  We also
85 ### recognize some manufacturers as not being operating systems, so we
86 ### can provide default operating systems below.
87 case $os in
88         -sun*os*)
89                 # Prevent following clause from handling this invalid input.
90                 ;;
91         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
92         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
93         -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
94         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
95         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
96         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
97         -apple)
98                 os=
99                 basic_machine=$1
100                 ;;
101         -sim | -cisco | -oki | -wec | -winbond)
102                 os=
103                 basic_machine=$1
104                 ;;
105         -scout)
106                 ;;
107         -wrs)
108                 os=vxworks
109                 basic_machine=$1
110                 ;;
111         -hiux*)
112                 os=-hiuxwe2
113                 ;;
114         -sco5)
115                 os=-sco3.2v5
116                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
117                 ;;
118         -sco4)
119                 os=-sco3.2v4
120                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
121                 ;;
122         -sco3.2.[4-9]*)
123                 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
124                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
125                 ;;
126         -sco3.2v[4-9]*)
127                 # Don't forget version if it is 3.2v4 or newer.
128                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
129                 ;;
130         -sco*)
131                 os=-sco3.2v2
132                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133                 ;;
134         -udk*)
135                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
136                 ;;
137         -isc)
138                 os=-isc2.2
139                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
140                 ;;
141         -clix*)
142                 basic_machine=clipper-intergraph
143                 ;;
144         -isc*)
145                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
146                 ;;
147         -lynx*)
148                 os=-lynxos
149                 ;;
150         -ptx*)
151                 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
152                 ;;
153         -windowsnt*)
154                 os=`echo $os | sed -e 's/windowsnt/winnt/'`
155                 ;;
156         -psos*)
157                 os=-psos
158                 ;;
159 esac
160
161 # Decode aliases for certain CPU-COMPANY combinations.
162 case $basic_machine in
163         # Recognize the basic CPU types without company name.
164         # Some are omitted here because they have special meanings below.
165         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
166                 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
167                 | 580 | i960 | h8300 \
168                 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
169                 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
170                 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
171                 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
172                 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
173                 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
174                 | mips64vr5000 | miprs64vr5000el \
175                 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
176                 | thumb | d10v)
177                 basic_machine=$basic_machine-unknown
178                 ;;
179         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
180                 ;;
181
182         # We use `pc' rather than `unknown'
183         # because (1) that's what they normally are, and
184         # (2) the word "unknown" tends to confuse beginning users.
185         i[34567]86)
186           basic_machine=$basic_machine-pc
187           ;;
188         # Object if more than one company name word.
189         *-*-*)
190                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
191                 exit 1
192                 ;;
193         # Recognize the basic CPU types with company name.
194         vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
195               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
196               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
197               | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
198               | xmp-* | ymp-* \
199               | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
200               | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
201               | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
202               | clipper-* | orion-* \
203               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
204               | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
205               | mips64el-* | mips64orion-* | mips64orionel-* \
206               | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
207               | mipstx39-* | mipstx39el-* \
208               | f301-* | armv*-* | t3e-* \
209               | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
210               | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
211                 ;;
212         # Recognize the various machine names and aliases which stand
213         # for a CPU type and a company and sometimes even an OS.
214         386bsd)
215                 basic_machine=i386-unknown
216                 os=-bsd
217                 ;;
218         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
219                 basic_machine=m68000-att
220                 ;;
221         3b*)
222                 basic_machine=we32k-att
223                 ;;
224         a29khif)
225                 basic_machine=a29k-amd
226                 os=-udi
227                 ;;
228         adobe68k)
229                 basic_machine=m68010-adobe
230                 os=-scout
231                 ;;
232         alliant | fx80)
233                 basic_machine=fx80-alliant
234                 ;;
235         altos | altos3068)
236                 basic_machine=m68k-altos
237                 ;;
238         am29k)
239                 basic_machine=a29k-none
240                 os=-bsd
241                 ;;
242         amdahl)
243                 basic_machine=580-amdahl
244                 os=-sysv
245                 ;;
246         amiga | amiga-*)
247                 basic_machine=m68k-cbm
248                 ;;
249         amigaos | amigados)
250                 basic_machine=m68k-cbm
251                 os=-amigaos
252                 ;;
253         amigaunix | amix)
254                 basic_machine=m68k-cbm
255                 os=-sysv4
256                 ;;
257         apollo68)
258                 basic_machine=m68k-apollo
259                 os=-sysv
260                 ;;
261         apollo68bsd)
262                 basic_machine=m68k-apollo
263                 os=-bsd
264                 ;;
265         aux)
266                 basic_machine=m68k-apple
267                 os=-aux
268                 ;;
269         balance)
270                 basic_machine=ns32k-sequent
271                 os=-dynix
272                 ;;
273         convex-c1)
274                 basic_machine=c1-convex
275                 os=-bsd
276                 ;;
277         convex-c2)
278                 basic_machine=c2-convex
279                 os=-bsd
280                 ;;
281         convex-c32)
282                 basic_machine=c32-convex
283                 os=-bsd
284                 ;;
285         convex-c34)
286                 basic_machine=c34-convex
287                 os=-bsd
288                 ;;
289         convex-c38)
290                 basic_machine=c38-convex
291                 os=-bsd
292                 ;;
293         cray | ymp)
294                 basic_machine=ymp-cray
295                 os=-unicos
296                 ;;
297         cray2)
298                 basic_machine=cray2-cray
299                 os=-unicos
300                 ;;
301         [ctj]90-cray)
302                 basic_machine=c90-cray
303                 os=-unicos
304                 ;;
305         crds | unos)
306                 basic_machine=m68k-crds
307                 ;;
308         da30 | da30-*)
309                 basic_machine=m68k-da30
310                 ;;
311         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
312                 basic_machine=mips-dec
313                 ;;
314         delta | 3300 | motorola-3300 | motorola-delta \
315               | 3300-motorola | delta-motorola)
316                 basic_machine=m68k-motorola
317                 ;;
318         delta88)
319                 basic_machine=m88k-motorola
320                 os=-sysv3
321                 ;;
322         dpx20 | dpx20-*)
323                 basic_machine=rs6000-bull
324                 os=-bosx
325                 ;;
326         dpx2* | dpx2*-bull)
327                 basic_machine=m68k-bull
328                 os=-sysv3
329                 ;;
330         ebmon29k)
331                 basic_machine=a29k-amd
332                 os=-ebmon
333                 ;;
334         elxsi)
335                 basic_machine=elxsi-elxsi
336                 os=-bsd
337                 ;;
338         encore | umax | mmax)
339                 basic_machine=ns32k-encore
340                 ;;
341         es1800 | OSE68k | ose68k | ose | OSE)
342                 basic_machine=m68k-ericsson
343                 os=-ose
344                 ;;
345         fx2800)
346                 basic_machine=i860-alliant
347                 ;;
348         genix)
349                 basic_machine=ns32k-ns
350                 ;;
351         gmicro)
352                 basic_machine=tron-gmicro
353                 os=-sysv
354                 ;;
355         h3050r* | hiux*)
356                 basic_machine=hppa1.1-hitachi
357                 os=-hiuxwe2
358                 ;;
359         h8300hms)
360                 basic_machine=h8300-hitachi
361                 os=-hms
362                 ;;
363         h8300xray)
364                 basic_machine=h8300-hitachi
365                 os=-xray
366                 ;;
367         h8500hms)
368                 basic_machine=h8500-hitachi
369                 os=-hms