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 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* | storm-chaos* | os2-emx* | windows32-*)
73
123
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
218
basic_machine=m68k-atari
161
223
# Decode aliases for certain CPU-COMPANY combinations.
162
224
case $basic_machine in
163
225
# Recognize the basic CPU types without company name.
164
226
# Some are omitted here because they have special meanings below.
165
tahoe | i860 | ia64 | 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 | mcore \
175
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
177
basic_machine=$basic_machine-unknown
179
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
229
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
230
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
231
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
233
| d10v | d30v | dsp16xx \
235
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
236
| i370 | i860 | i960 | ia64 \
237
| m32r | m68000 | m68k | m88k | mcore \
238
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
239
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
240
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
241
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
243
| mn10200 | mn10300 \
246
| pdp10 | pdp11 | pj | pjl \
247
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
249
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
250
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
252
| tahoe | thumb | tic80 | tron \
255
| x86 | xscale | xstormy16 | xtensa \
257
basic_machine=$basic_machine-unknown
259
m6811 | m68hc11 | m6812 | m68hc12)
260
# Motorola 68HC11/12.
261
basic_machine=$basic_machine-unknown
264
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
182
267
# We use `pc' rather than `unknown'
183
268
# because (1) that's what they normally are, and
184
269
# (2) the word "unknown" tends to confuse beginning users.
186
271
basic_machine=$basic_machine-pc
188
273
# Object if more than one company name word.
193
278
# Recognize the basic CPU types with company name.
194
# FIXME: clean up the formatting here.
195
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
196
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
197
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
198
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
200
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
201
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
202
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
203
| clipper-* | orion-* \
204
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
205
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
206
| mips64el-* | mips64orion-* | mips64orionel-* \
207
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
208
| mipstx39-* | mipstx39el-* | mcore-* \
209
| f301-* | armv*-* | t3e-* \
210
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
211
| thumb-* | v850-* | d30v-* | tic30-* | c30-* )
281
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
282
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
283
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
284
| arm-* | armbe-* | armle-* | armv*-* \
287
| c[123]* | c30-* | [cjt]90-* | c54x-* \
288
| clipper-* | cray2-* | cydra-* \
291
| f30[01]-* | f700-* | fr30-* | fx80-* \
292
| h8300-* | h8500-* \
293
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
294
| i*86-* | i860-* | i960-* | ia64-* \
296
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
297
| m88110-* | m88k-* | mcore-* \
298
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
299
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
300
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
301
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
302
| none-* | np1-* | ns16k-* | ns32k-* \
304
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
305
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
307
| romp-* | rs6000-* \
308
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
309
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
310
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
311
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
312
| v850-* | v850e-* | vax-* \
314
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
213
319
# Recognize the various machine names and aliases which stand
214
320
# for a CPU type and a company and sometimes even an OS.
605
744
basic_machine=ns32k-pc532
607
pentium | p5 | k5 | k6 | nexen)
746
pentium | p5 | k5 | k6 | nexgen | viac3)
608
747
basic_machine=i586-pc
610
pentiumpro | p6 | 6x86)
749
pentiumpro | p6 | 6x86 | athlon)
611
750
basic_machine=i686-pc
613
752
pentiumii | pentium2)
614
basic_machine=i786-pc
753
basic_machine=i686-pc
616
pentium-* | p5-* | k5-* | k6-* | nexen-*)
755
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
617
756
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
619
pentiumpro-* | p6-* | 6x86-*)
758
pentiumpro-* | p6-* | 6x86-* | athlon-*)
620
759
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
622
761
pentiumii-* | pentium2-*)
623
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
762
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
626
765
basic_machine=pn-gould
628
power) basic_machine=rs6000-ibm
767
power) basic_machine=power-ibm
630
769
ppc) basic_machine=powerpc-unknown
637
776
ppcle-* | powerpclittle-*)
638
777
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
779
ppc64) basic_machine=powerpc64-unknown
781
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
783
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
784
basic_machine=powerpc64le-unknown
786
ppc64le-* | powerpc64little-*)
787
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
641
790
basic_machine=i386-ibm
793
basic_machine=i586-unknown
644
797
basic_machine=m68k-rom68k
906
1094
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
907
1095
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
908
1096
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1097
| -chorusos* | -chorusrdb* \
909
1098
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
910
1099
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
911
| -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
1100
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
1101
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1102
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1103
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*)
912
1104
# Remember, each alternative MUST END IN *, to match a version number.
1107
case $basic_machine in
914
1118
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
915
1119
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
916
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
1120
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
919
1123
os=`echo $os | sed -e 's|mac|macos|'`