2
# Configuration validation subroutine script, version 1.1.
3
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
2
# Configuration validation subroutine script.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
# Free Software Foundation, Inc.
4
8
# This file is (in principle) common to ALL GNU software.
5
9
# 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.
10
# can handle that machine. It does not imply ALL GNU software can.
8
12
# This file is free software; you can redistribute it and/or modify
9
13
# it under the terms of the GNU General Public License as published by
18
22
# You should have received a copy of the GNU General Public License
19
23
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
# Foundation, Inc., 59 Temple Place - Suite 330,
25
# Boston, MA 02111-1307, USA.
22
27
# As a special exception to the GNU General Public License, if you
23
28
# distribute this file as part of a program that contains a
24
29
# configuration script generated by Autoconf, you may include it under
25
30
# the same distribution terms that you use for the rest of that program.
32
# Please send patches to <config-patches@gnu.org>.
27
34
# Configuration subroutine to validate and canonicalize a configuration type.
28
35
# Supply the specified configuration type as an argument.
29
36
# If it is invalid, we print an error message on stderr and exit with code 1.
40
47
# The goal of this file is to map all the various variations of a given
41
48
# machine specification into a single specification in the form:
42
49
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
50
# or in some cases, the newer four-part form:
51
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
43
52
# It is wrong to echo any other type of specification.
45
# First pass through any local machine types.
55
# Separate what the user gave into CPU-COMPANY and OS (if any).
56
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
57
if [ $basic_machine != $1 ]
58
then os=`echo $1 | sed 's/.*-/-/'`
54
me=`echo "$0" | sed -e 's,.*/,,'`
57
Usage: $0 [OPTION] CPU-MFR-OPSYS
60
Canonicalize a configuration name.
63
-h, --help print this help, then exit
64
-t, --time-stamp print date of last modification, then exit
65
-v, --version print version number, then exit
67
Report bugs and patches to <config-patches@gnu.org>."
70
GNU config.sub ($timestamp)
72
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
73
Free Software Foundation, Inc.
75
This is free software; see the source for copying conditions. There is NO
76
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79
Try \`$me --help' for more information."
82
while test $# -gt 0 ; do
84
--time-stamp | --time* | -t )
85
echo "$timestamp" ; exit 0 ;;
87
echo "$version" ; exit 0 ;;
89
echo "$usage"; exit 0 ;;
90
-- ) # Stop option processing
92
- ) # Use stdin as input.
95
echo "$me: invalid option $1$help"
99
# First pass through any local machine types.
109
0) echo "$me: missing argument$help" >&2
112
*) echo "$me: too many arguments$help" >&2
116
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
117
# Here we must recognize all the valid KERNEL-OS combinations.
118
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
122
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
126
if [ $basic_machine != $1 ]
127
then os=`echo $1 | sed 's/.*-/-/'`
61
132
### Let's recognize common machines as not being operating systems so
62
133
### that things like config.sub decstation-3100 work. We also
71
142
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
72
143
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
73
144
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
74
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
145
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150
-sim | -cisco | -oki | -wec | -winbond)
165
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
83
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
169
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
86
172
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
87
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
173
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
90
176
# Don't forget version if it is 3.2v4 or newer.
91
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
177
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
95
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
181
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
99
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
188
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
102
191
basic_machine=clipper-intergraph
105
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
194
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
114
203
os=`echo $os | sed -e 's/windowsnt/winnt/'`
209
basic_machine=m68k-atari
118
214
# Decode aliases for certain CPU-COMPANY combinations.
119
215
case $basic_machine in
120
216
# Recognize the basic CPU types without company name.
121
217
# Some are omitted here because they have special meanings below.
122
tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
123
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
124
| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
125
| powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
126
| pdp11 | mips64el | mips64orion | mips64orionel )
127
basic_machine=$basic_machine-unknown
218
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
219
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
220
| pyramid | mn10200 | mn10300 | tron | a29k \
221
| 580 | i960 | h8300 \
222
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
223
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
225
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
227
| we32k | ns16k | clipper | i370 | sh | sh[34] \
228
| powerpc | powerpcle \
229
| 1750a | dsp16xx | pdp10 | pdp11 \
230
| mips16 | mips64 | mipsel | mips64el \
231
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
232
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
233
| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
234
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
235
| thumb | d10v | d30v | fr30 | avr | openrisc)
236
basic_machine=$basic_machine-unknown
238
m6811 | m68hc11 | m6812 | m68hc12)
239
# Motorola 68HC11/12.
240
basic_machine=$basic_machine-unknown
243
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
246
# We use `pc' rather than `unknown'
247
# because (1) that's what they normally are, and
248
# (2) the word "unknown" tends to confuse beginning users.
249
i[234567]86 | x86_64)
250
basic_machine=$basic_machine-pc
129
252
# Object if more than one company name word.
131
254
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
134
257
# Recognize the basic CPU types with company name.
135
vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
136
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* | ia64-* \
258
# FIXME: clean up the formatting here.
259
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
260
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
261
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
137
262
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
138
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
139
| hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
140
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
141
| pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
142
| mips64el-* | mips64orion-* | mips64orionel-* | S370-* )
263
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
265
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
266
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
267
| hppa2.0n-* | hppa64-* \
268
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
270
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
271
| clipper-* | orion-* \
272
| sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
273
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
274
| mips64el-* | mips64orion-* | mips64orionel-* \
275
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
276
| mipstx39-* | mipstx39el-* | mcore-* \
277
| f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
279
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
280
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
281
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
144
283
# Recognize the various machine names and aliases which stand
145
284
# for a CPU type and a company and sometimes even an OS.
286
basic_machine=i386-unknown
146
289
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
147
290
basic_machine=m68000-att
150
293
basic_machine=we32k-att
296
basic_machine=a29k-amd
300
basic_machine=m68010-adobe
153
304
basic_machine=fx80-alliant
287
461
basic_machine=m68k-hp
464
hp3k9[0-9][0-9] | hp9[0-9][0-9])
465
basic_machine=hppa1.0-hp
290
467
hp9k2[0-9][0-9] | hp9k31[0-9])
291
468
basic_machine=m68000-hp
294
471
basic_machine=m68k-hp
296
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
473
hp9k6[0-9][0-9] | hp6[0-9][0-9])
474
basic_machine=hppa1.0-hp
476
hp9k7[0-79][0-9] | hp7[0-79][0-9])
477
basic_machine=hppa1.1-hp
479
hp9k78[0-9] | hp78[0-9])
480
# FIXME: really hppa2.0-hp
481
basic_machine=hppa1.1-hp
483
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
484
# FIXME: really hppa2.0-hp
485
basic_machine=hppa1.1-hp
487
hp9k8[0-9][13679] | hp8[0-9][13679])
297
488
basic_machine=hppa1.1-hp
299
490
hp9k8[0-9][0-9] | hp8[0-9][0-9])
300
491
basic_machine=hppa1.0-hp
497
basic_machine=hppa1.1-hp
501
basic_machine=hppa1.1-hp
302
504
i370-ibm* | ibm*)
303
505
basic_machine=i370-ibm
306
507
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
308
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
509
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
312
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
513
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
316
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
517
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
320
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
521
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
525
basic_machine=i386-mach
529
basic_machine=i386-unknown
324
533
basic_machine=mips-sgi
424
692
basic_machine=ns32k-pc532
427
# We will change tis to say i586 once there has been
428
# time for various packages to start to recognize that.
429
basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
694
pentium | p5 | k5 | k6 | nexgen)
695
basic_machine=i586-pc
697
pentiumpro | p6 | 6x86 | athlon)
698
basic_machine=i686-pc
700
pentiumii | pentium2)
701
basic_machine=i686-pc
703
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
704
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
706
pentiumpro-* | p6-* | 6x86-* | athlon-*)
707
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
709
pentiumii-* | pentium2-*)
710
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
432
713
basic_machine=pn-gould
715
power) basic_machine=power-ibm
717
ppc) basic_machine=powerpc-unknown
719
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
721
ppcle | powerpclittle | ppc-le | powerpc-little)
722
basic_machine=powerpcle-unknown
724
ppcle-* | powerpclittle-*)
725
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
435
728
basic_machine=i386-ibm
731
basic_machine=i586-unknown
735
basic_machine=m68k-rom68k
739
basic_machine=mips-siemens
438
742
basic_machine=romp-ibm
441
basic_machine=vp-fujitsu
745
basic_machine=a29k-amd
445
749
basic_machine=i386-sequent
604
os=`echo $os | sed -e 's|gnu/linux|linux|'`
998
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
606
1000
# First accept the basic system types.
607
1001
# The portable systems comes first.
608
# Each alternative must end in a *, to match a version number.
1002
# Each alternative MUST END IN A *, to match a version number.
609
1003
# -sysv* is not here because it comes later, after sysvr4.
610
1004
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
611
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
1005
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
612
1006
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
613
| -amigados* | -msdos* | -newsos* | -unicos* | -craympp | -aos* \
614
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
615
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
616
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
617
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
618
| -ptx* | -coff* | -winnt*)
1007
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1009
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1010
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1011
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1012
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1013
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1014
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1015
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1016
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1017
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
1018
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1019
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
1020
# Remember, each alternative MUST END IN *, to match a version number.
1023
case $basic_machine in
1024
x86-* | i[34567]86-*)
1034
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1035
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1036
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1039
os=`echo $os | sed -e 's|mac|macos|'`
1042
os=`echo $os | sed -e 's|linux|linux-gnu|'`
621
1045
os=`echo $os | sed -e 's|sunos5|solaris2|'`