2
# Configuration validation subroutine script, version 1.1.
3
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
2
# Configuration validation subroutine script.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003 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
10
# can handle that machine. It does not imply ALL GNU software can.
25
29
# configuration script generated by Autoconf, you may include it under
26
30
# the same distribution terms that you use for the rest of that program.
32
# Please send patches to <config-patches@gnu.org>. Submit a context
33
# diff and a properly formatted ChangeLog entry.
28
35
# Configuration subroutine to validate and canonicalize a configuration type.
29
36
# Supply the specified configuration type as an argument.
30
37
# If it is invalid, we print an error message on stderr and exit with code 1.
45
52
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46
53
# It is wrong to echo any other type of specification.
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
57
# First pass through any local machine types.
55
me=`echo "$0" | sed -e 's,.*/,,'`
58
Usage: $0 [OPTION] CPU-MFR-OPSYS
61
Canonicalize a configuration name.
64
-h, --help print this help, then exit
65
-t, --time-stamp print date of last modification, then exit
66
-v, --version print version number, then exit
68
Report bugs and patches to <config-patches@gnu.org>."
71
GNU config.sub ($timestamp)
73
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
74
Free Software Foundation, Inc.
76
This is free software; see the source for copying conditions. There is NO
77
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80
Try \`$me --help' for more information."
83
while test $# -gt 0 ; do
85
--time-stamp | --time* | -t )
86
echo "$timestamp" ; exit 0 ;;
88
echo "$version" ; exit 0 ;;
90
echo "$usage"; exit 0 ;;
91
-- ) # Stop option processing
93
- ) # Use stdin as input.
96
echo "$me: invalid option $1$help"
100
# First pass through any local machine types.
110
0) echo "$me: missing argument$help" >&2
113
*) echo "$me: too many arguments$help" >&2
67
117
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68
118
# Here we must recognize all the valid KERNEL-OS combinations.
69
119
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
122
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
73
124
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
166
225
case $basic_machine in
167
226
# Recognize the basic CPU types without company name.
168
227
# Some are omitted here because they have special meanings below.
169
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
170
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
171
| 580 | i960 | h8300 \
172
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
173
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
174
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
175
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
176
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
177
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
178
| mips64vr5000 | miprs64vr5000el | mcore \
179
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
180
| thumb | d10v | fr30)
181
basic_machine=$basic_machine-unknown
183
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
230
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
231
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
233
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
235
| d10v | d30v | dlx | dsp16xx \
237
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
238
| i370 | i860 | i960 | ia64 \
240
| m32r | m68000 | m68k | m88k | mcore \
241
| mips | mipsbe | mipseb | mipsel | mipsle \
243
| mips64 | mips64el \
244
| mips64vr | mips64vrel \
245
| mips64orion | mips64orionel \
246
| mips64vr4100 | mips64vr4100el \
247
| mips64vr4300 | mips64vr4300el \
248
| mips64vr5000 | mips64vr5000el \
249
| mipsisa32 | mipsisa32el \
250
| mipsisa32r2 | mipsisa32r2el \
251
| mipsisa64 | mipsisa64el \
252
| mipsisa64r2 | mipsisa64r2el \
253
| mipsisa64sb1 | mipsisa64sb1el \
254
| mipsisa64sr71k | mipsisa64sr71kel \
255
| mipstx39 | mipstx39el \
256
| mn10200 | mn10300 \
260
| pdp10 | pdp11 | pj | pjl \
261
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
263
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
265
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
267
| tahoe | thumb | tic4x | tic80 | tron \
270
| x86 | xscale | xstormy16 | xtensa \
272
basic_machine=$basic_machine-unknown
274
m6811 | m68hc11 | m6812 | m68hc12)
275
# Motorola 68HC11/12.
276
basic_machine=$basic_machine-unknown
279
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
186
282
# We use `pc' rather than `unknown'
187
283
# because (1) that's what they normally are, and
188
284
# (2) the word "unknown" tends to confuse beginning users.
190
286
basic_machine=$basic_machine-pc
192
288
# Object if more than one company name word.
197
293
# Recognize the basic CPU types with company name.
198
# FIXME: clean up the formatting here.
199
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
200
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
201
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
202
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
204
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
205
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
206
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
207
| clipper-* | orion-* \
208
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
209
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
210
| mips64el-* | mips64orion-* | mips64orionel-* \
211
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
212
| mipstx39-* | mipstx39el-* | mcore-* \
213
| f301-* | armv*-* | t3e-* \
214
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
215
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
296
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
297
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
298
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
299
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
302
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
303
| clipper-* | cydra-* \
304
| d10v-* | d30v-* | dlx-* \
306
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
307
| h8300-* | h8500-* \
308
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
309
| i*86-* | i860-* | i960-* | ia64-* \
310
| ip2k-* | iq2000-* \
312
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
313
| m88110-* | m88k-* | mcore-* \
314
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
316
| mips64-* | mips64el-* \
317
| mips64vr-* | mips64vrel-* \
318
| mips64orion-* | mips64orionel-* \
319
| mips64vr4100-* | mips64vr4100el-* \
320
| mips64vr4300-* | mips64vr4300el-* \
321
| mips64vr5000-* | mips64vr5000el-* \
322
| mipsisa32-* | mipsisa32el-* \
323
| mipsisa32r2-* | mipsisa32r2el-* \
324
| mipsisa64-* | mipsisa64el-* \
325
| mipsisa64r2-* | mipsisa64r2el-* \
326
| mipsisa64sb1-* | mipsisa64sb1el-* \
327
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
328
| mipstx39-* | mipstx39el-* \
330
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
332
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
333
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
335
| romp-* | rs6000-* \
336
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
337
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
338
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
339
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
340
| tahoe-* | thumb-* \
341
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
343
| v850-* | v850e-* | vax-* \
345
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
217
350
# Recognize the various machine names and aliases which stand
218
351
# for a CPU type and a company and sometimes even an OS.
612
774
basic_machine=m68k-tti
615
777
basic_machine=ns32k-pc532
617
pentium | p5 | k5 | k6 | nexen)
779
pentium | p5 | k5 | k6 | nexgen | viac3)
618
780
basic_machine=i586-pc
620
pentiumpro | p6 | 6x86)
621
basic_machine=i686-pc
623
pentiumii | pentium2)
782
pentiumpro | p6 | 6x86 | athlon | athlon_*)
783
basic_machine=i686-pc
785
pentiumii | pentium2 | pentiumiii | pentium3)
786
basic_machine=i686-pc
624
789
basic_machine=i786-pc
626
pentium-* | p5-* | k5-* | k6-* | nexen-*)
791
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
627
792
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
629
pentiumpro-* | p6-* | 6x86-*)
630
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
632
pentiumii-* | pentium2-*)
794
pentiumpro-* | p6-* | 6x86-* | athlon-*)
795
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
797
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
798
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
633
801
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
636
804
basic_machine=pn-gould
638
power) basic_machine=rs6000-ibm
806
power) basic_machine=power-ibm
640
808
ppc) basic_machine=powerpc-unknown
642
810
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
644
812
ppcle | powerpclittle | ppc-le | powerpc-little)
645
813
basic_machine=powerpcle-unknown
647
815
ppcle-* | powerpclittle-*)
648
816
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
818
ppc64) basic_machine=powerpc64-unknown
820
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
822
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
823
basic_machine=powerpc64le-unknown
825
ppc64le-* | powerpc64little-*)
826
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
651
829
basic_machine=i386-ibm
832
basic_machine=i586-unknown
654
836
basic_machine=m68k-rom68k
913
1144
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
914
1145
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
915
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1146
| -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
916
1147
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
917
1148
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
918
1149
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1150
| -chorusos* | -chorusrdb* \
919
1151
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
920
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
921
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
1152
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1153
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1154
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1155
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1156
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1157
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1158
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
922
1159
# Remember, each alternative MUST END IN *, to match a version number.
1162
case $basic_machine in
1173
os=`echo $os | sed -e 's|nto|nto-qnx|'`
924
1175
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
925
1176
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
926
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
1177
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
929
1180
os=`echo $os | sed -e 's|mac|macos|'`
932
1186
os=`echo $os | sed -e 's|linux|linux-gnu|'`