3 # Configuration subroutine to validate and canonicalize a configuration type.
4 # Supply the specified configuration type as an argument.
5 # If it is invalid, we print an error message on stderr and exit with code 1.
6 # Otherwise, we print the canonical config type on stdout and succeed.
8 # This file is supposed to be the same for all GNU packages
9 # and recognize all the CPU types, system types and aliases
10 # that are meaningful with *any* GNU software.
11 # Each package is responsible for reporting which valid configurations
12 # it does not support. The user should be able to distinguish
13 # a failure to support a valid configuration from a meaningless
16 # Separate what the user gave into CPU-company and OS (if any).
17 basic_machine
=`echo $1 | sed 's/-[^-]*$//'`
18 if [ $basic_machine != $1 ]
19 then os
=`echo $1 | sed 's/^.*-/-/'`
22 # Decode aliases for certain machine-company combinations.
23 case $basic_machine in
24 # Recognize the basic CPU types without company name.
25 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
26 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
27 | rtpc | rs6000 | i960 | none
)
29 # Recognize the basic CPU types with company name.
30 vax-
* | tahoe-
* | i386-
* | i860-
* | m68k-
* | m68000-
* | m88k-
* \
31 | sparc-
* | ns32k-
* | alliant-
* | arm-
* | c1-
* | c2-
* \
32 | mips-
* | pyramid-
* | tron-
* | a29k-
* | rtpc-
* \
35 # Recognize the machine names
36 # which stand for a CPU time and a company.
38 basic_machine
=i960-intel
42 basic_machine
=m68k-wrs
46 basic_machine
=i960-wrs
50 basic_machine
=a29k-unknown
54 basic_machine
=ns32k-umax
58 basic_machine
=pn-gould
62 basic_machine
=np1-gould
66 basic_machine
=merlin-utek
70 basic_machine
=mips-sgi
74 basic_machine
=m68030-sony
77 news | news700 | news800 | news900
)
78 basic_machine
=m68k-sony
81 unixpc | safari | pc7300 |
3b1 |
7300 |
7300-att | att-7300
)
82 basic_machine
=m68k-att
85 delta |
3300 | motorola-3300 | motorola-delta \
86 |
3300-motorola | delta-motorola
)
87 basic_machine
=m68k-motorola
95 basic_machine
=ns32k-sequent
99 basic_machine
=ns32k-encore
103 basic_machine
=i386-sequent
107 basic_machine
=m68000-sun
111 basic_machine
=m68000-sun
115 basic_machine
=m68000-sun
119 basic_machine
=m68k-sun
123 basic_machine
=m68k-sun
127 basic_machine
=m68k-sun
131 basic_machine
=sparc-sun
135 basic_machine
=sparc-sun
139 basic_machine
=sparc-sun
143 basic_machine
=sparc-unicom
146 roadrunner | sun386 | sun386i
)
147 basic_machine
=i386-sun
151 basic_machine
=i386-ibm
155 basic_machine
=i386-sco
159 basic_machine
=i386-unknown
163 basic_machine
=i386-unknown
167 basic_machine
=m68k-next
171 basic_machine
=m68k-hp
174 hp300hpux | hpux | hp9k3
[2-9][0-9])
175 basic_machine
=m68k-hp
178 hp9k31
[0-9] | hp9k2
[0-9][0-9])
179 basic_machine
=m68000-hp
183 basic_machine
=m68k-isi
187 basic_machine
=m68k-apollo
191 basic_machine
=m68k-altos
195 basic_machine
=m68k-altos
199 basic_machine
=m68000-convergent
203 basic_machine
=m68k-ncr
206 bigmips | news-3600 | risc-news
)
207 basic_machine
=mips-sony
211 basic_machine
=mips-little
214 dec3100 | decstatn | decstation | decstation-3100 | pmax
)
215 basic_machine
=mips-dec
219 basic_machine
=mips-mips
227 basic_machine
=c1-convex
231 basic_machine
=c2-convex
235 echo Invalid configuration \
`$1\': machine \`$basic_machine\' not recognized
1>&2
240 # Decode manufacturer-specific aliases for certain operating systems.
243 # First accept the basic system types.
244 # The portable systems comes first.
245 -bsd* |
-sysv* |
-mach* \
246 |
-vms* |
-sco* |
-esix* |
-isc* |
-aix* |
-sunos* |
-hpux* \
247 |
-unos* |
-osf* |
-v88r* |
-aout |
-coff |
-bout \
269 # Get rid of the `-' at the beginning of $os.
270 os
=`echo $1 | sed 's/[^-]*-//'`
271 echo Invalid configuration \
`$1\': system \`$os\' not recognized
1>&2
276 echo ${basic_machine}${os}