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
14 # configuration (e.g. a typo).
16 # Please email any bugs, comments, and/or additions to this file to:
17 # configure@cygnus.com
19 # decode aliases into canonical names
20 # Note that aliases MUST fit into 12 characters or less otherwise the
21 # install targets and subdir builds all die on machines that support
22 # only 14 char file names. They die miserably on machines that rudely
23 # enforce the 14 character limit.
26 # cpu alone is a valid alias for cpu-none-none.
27 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
28 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
29 | romp | rs6000 | i960 | h8300
)
57 os
=amigados
# Native AmigaDOS
62 os
=svr4
# System V Release 4 (svr4 is an industry recognized acronym)
94 dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin
)
99 delta |
3300 | motorola-3300 | motorola-delta \
100 |
3300-motorola | delta-motorola
)
129 # start-sanitize-life
153 sparc64-v7 | sparc64v7
)
164 hp300hpux | hpux | hp9k3
[2-9][0-9])
169 hp9k31
[0-9] | hp9k2
[0-9][0-9])
230 news | news700 | news800 | news900
)
233 os
=newsos
# newsos3c or newsos4c, c stands for cisc. Based on bsd-4.3.
240 news-3600 | bigmips | risc-news
)
243 os
=newsos
# Presumably newsos4r, r stands for risc. Based on bsd-4.3.
320 sun386 | roadrunner | sun386i
)
360 unixpc | safari | pc7300 |
3b1 |
7300 |
7300-att | att-7300
)
385 # not an alias. parse what we expect to be a canonical name.
387 cpu
=`echo $1 | sed 's/-.*$//'`
389 if [ "${cpu}" = "$1" ] ; then
390 # no vendor so this is an invalid name.
391 echo '***' Configuration
\"$1\" not recognized
1>&2
395 rest
=`echo $1 | sed "s/${cpu}-//"`
396 vendor
=`echo ${rest} | sed 's/-.*$//'`
398 if [ "${vendor}" = "${rest}" ] ; then
399 # a missing os is acceptable
402 os
=`echo ${rest} | sed "s/${vendor}-//"`
408 # At this point we should have three parts of a canonical name in cpu,
411 # verify that the cpu is known.
414 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
415 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
416 | a29k | romp | rs6000 | i960 | xmp | ymp | cray2 |
580 | h8300
)
419 # start-sanitize-life
428 echo '***' Invalid cpu \
`${cpu}\': configuration \`$1\' not recognized
1>&2
433 # verify that the vendor is known.
436 altos | amd | amdahl | aout | apollo | att | bcs | bout |\
437 cbm | convergent | convex | coff | cray | dec | encore |\
438 gould | hitachi | intel | isi | hp | ibm | little | mips | motorola |\
439 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
440 unicom | utek | wrs | bull
) ;;
442 # start-sanitize-life
451 echo '***' Invalid vendor \
`${vendor}\': configuration \`$1\' not recognized
1>&2
456 # verify that the os is known, if it exists.
459 aix
* | aout | bout | bsd
* | coff | ctix
* | dgux
* | dynix
* | esix
* \
461 | hds | irix
* | isc
* | kern | mach
* | msdos
* | newsos
* | nindy
* | none \
462 | osf
* | sco
* | sunos
* | sysv
* | ultrix
* | unos
* | v88r
* \
463 | vms
* | vxworks
* | sym
[1-9]* | unicos
* | uts | svr4 \
468 hal32 | hal64 | v7 | v9
) ;;
472 echo '***' Invalid os \
`${os}\': configuration \`$1\' not recognized
1>&2
477 echo ${cpu}-${vendor}-${os}