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 # Please email any bugs, comments, and/or additions to this file to:
19 # decode aliases into canonical names
22 # cpu alone is a valid alias for cpu-none-none.
23 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
24 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
25 | rtpc | rs6000 | i960)
80 dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin)
85 delta | 3300 | motorola-3300 | motorola-delta \
86 | 3300-motorola | delta-motorola)
112 sparc64-v7 | sparc64v7)
123 hp300hpux | hpux | hp9k3[2-9][0-9])
128 hp9k31[0-9] | hp9k2[0-9][0-9])
183 news | news700 | news800 | news900)
193 news-3600 | bigmips | risc-news)
263 sun386 | roadrunner | sun386i)
298 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
323 # not an alias. parse what we expect to be a canonical name.
325 cpu=`echo $1 | sed 's/-.*$//'`
327 if [ "${cpu}" = "$1" ] ; then
328 # no vendor so this is an invalid name.
329 echo '***' No vendor: configuration \`$1\' not recognized 1>&2
333 rest=`echo $1 | sed "s/${cpu}-//"`
334 vendor=`echo ${rest} | sed 's/-.*$//'`
336 if [ "${vendor}" = "${rest}" ] ; then
337 # a missing os is acceptable
340 os=`echo ${rest} | sed "s/${vendor}-//"`
346 # At this point we should have three parts of a canonical name in cpu,
349 # verify that the cpu is known.
352 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
353 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
354 | a29k | rtpc | rs6000 | i960 | xmp | ymp | cray2 | 580)
362 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
367 # verify that the vendor is known.
370 none | convex | mips | dec | little | sony | ncr | convergent \
371 | altos | apollo | isi | hp | next | sco | ibm | sun \
372 | unicom | sequent | encore | motorola | att | sgi | utek \
373 | gould | wrs | intel | aout | bout | coff | bcs | amdahl \
381 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
386 # verify that the os is known, if it exists.
389 aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* | irix* \
390 | isc* | mach* | newsos* | nindy* | none | osf* | osf* | sco* \
391 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks* \
396 hal32 | hal64 | v7 | v9) ;;
400 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
405 echo ${cpu}-${vendor}-${os}