1991-08-22 03:21:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
|
|
|
# Supply the specified configuration type as an argument.
|
|
|
|
# If it is invalid, we print an error message on stderr and exit with code 1.
|
|
|
|
# Otherwise, we print the canonical config type on stdout and succeed.
|
|
|
|
|
|
|
|
# This file is supposed to be the same for all GNU packages
|
|
|
|
# and recognize all the CPU types, system types and aliases
|
|
|
|
# that are meaningful with *any* GNU software.
|
|
|
|
# Each package is responsible for reporting which valid configurations
|
|
|
|
# it does not support. The user should be able to distinguish
|
|
|
|
# a failure to support a valid configuration from a meaningless
|
|
|
|
# configuration.
|
|
|
|
|
1991-08-22 07:07:58 +00:00
|
|
|
# Separate what the user gave into CPU-company and OS (if any).
|
1991-08-22 03:21:53 +00:00
|
|
|
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
|
|
|
if [ $basic_machine != $1 ]
|
1991-08-22 07:07:58 +00:00
|
|
|
then os=`echo $1 | sed 's/^.*-/-/'`
|
1991-08-22 03:21:53 +00:00
|
|
|
else os=; fi
|
|
|
|
|
1991-08-22 07:07:58 +00:00
|
|
|
# Decode aliases for certain machine-company combinations.
|
1991-08-22 03:21:53 +00:00
|
|
|
case $basic_machine in
|
|
|
|
# Recognize the basic CPU types without company name.
|
|
|
|
vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
|
|
|
|
| alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
|
|
|
|
| rtpc | rs6000 | i960 | none)
|
|
|
|
;;
|
|
|
|
# Recognize the basic CPU types with company name.
|
1991-08-22 07:07:58 +00:00
|
|
|
vax-* | tahoe-* | i386-* | i860-* | m68k-* | m68000-* | m88k-* \
|
|
|
|
| sparc-* | ns32k-* | alliant-* | arm-* | c1-* | c2-* \
|
|
|
|
| mips-* | pyramid-* | tron-* | a29k-* | rtpc-* \
|
|
|
|
| rs6000-* | i960-*)
|
1991-08-22 03:21:53 +00:00
|
|
|
;;
|
|
|
|
# Recognize the machine names
|
|
|
|
# which stand for a CPU time and a company.
|
|
|
|
nindy960)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i960-intel
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-nindy
|
|
|
|
;;
|
|
|
|
vxworks68)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-wrs
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-vxworks
|
|
|
|
;;
|
|
|
|
vxworks960)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i960-wrs
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-vxworks
|
|
|
|
;;
|
|
|
|
am29k)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=a29k-unknown
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
umax)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=ns32k-umax
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
pn)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=pn-gould
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
np1)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=np1-gould
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
merlin)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=merlin-utek
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
iris | iris4d)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=mips-sgi
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
news1000)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68030-sony
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
news | news700 | news800 | news900)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-sony
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
1991-08-22 07:07:58 +00:00
|
|
|
unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
|
|
|
|
basic_machine=m68k-att
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
delta | 3300 | motorola-3300 | motorola-delta \
|
1991-08-22 07:07:58 +00:00
|
|
|
| 3300-motorola | delta-motorola)
|
|
|
|
basic_machine=m68k-motorola
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
1991-08-22 07:07:58 +00:00
|
|
|
vax-dec)
|
1991-08-22 03:21:53 +00:00
|
|
|
basic_machine=vax
|
|
|
|
os=-ultrix # maybe?
|
|
|
|
;;
|
|
|
|
balance)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=ns32k-sequent
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-dynix
|
|
|
|
;;
|
|
|
|
mmax)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=ns32k-encore
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
symmetry)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-sequent
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-dynix
|
|
|
|
;;
|
|
|
|
sun2)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68000-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
sun2os3)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68000-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos3
|
|
|
|
;;
|
|
|
|
sun2os4)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68000-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
sun3)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
sun3os3)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos3
|
|
|
|
;;
|
|
|
|
sun3os4)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
sun4)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=sparc-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
sun4os3)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=sparc-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos3
|
|
|
|
;;
|
|
|
|
sun4os4)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=sparc-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos4
|
|
|
|
;;
|
|
|
|
pbd)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=sparc-unicom
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv
|
|
|
|
;;
|
|
|
|
roadrunner | sun386 | sun386i)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-sun
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sunos
|
|
|
|
;;
|
|
|
|
ps2)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-ibm
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
i386sco)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-sco
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
i386v)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-unknown
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv
|
|
|
|
;;
|
|
|
|
i386v32)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=i386-unknown
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv32
|
|
|
|
;;
|
|
|
|
next)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-next
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
hp300bsd)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-hp
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
hp300hpux | hpux | hp9k3[2-9][0-9])
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-hp
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-hpux
|
|
|
|
;;
|
|
|
|
hp9k31[0-9] | hp9k2[0-9][0-9])
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68000-hp
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-hpux
|
|
|
|
;;
|
|
|
|
isi | isi68)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-isi
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
apollo68)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-apollo
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
altos | altos3068)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-altos
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
altosgas)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-altos
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-gas
|
|
|
|
;;
|
|
|
|
miniframe)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68000-convergent
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
tower | tower-32)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=m68k-ncr
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
bigmips | news-3600 | risc-news)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=mips-sony
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-newsos # maybe?
|
|
|
|
;;
|
|
|
|
littlemips)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=mips-little
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
dec3100 | decstatn | decstation | decstation-3100 | pmax)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=mips-dec
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-ultrix
|
|
|
|
;;
|
|
|
|
magnum | m3230)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=mips-mips
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
gmicro)
|
|
|
|
basic_machine=tron
|
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
convex-c1)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=c1-convex
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
convex-c2)
|
1991-08-22 07:07:58 +00:00
|
|
|
basic_machine=c2-convex
|
1991-08-22 03:21:53 +00:00
|
|
|
os=-sysv # maybe?
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Decode manufacturer-specific aliases for certain operating systems.
|
|
|
|
|
|
|
|
case $os in
|
|
|
|
# First accept the basic system types.
|
|
|
|
# The portable systems comes first.
|
|
|
|
-bsd* | -sysv* | -mach* \
|
|
|
|
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos* | -hpux* \
|
|
|
|
| -unos* | -osf* | -v88r* | -aout | -coff | -bout \
|
|
|
|
| -nindy | -vxworks)
|
|
|
|
;;
|
|
|
|
-newsos*)
|
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
-ultrix*)
|
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
-osfrose*)
|
|
|
|
os=-osf
|
|
|
|
;;
|
|
|
|
-osf*)
|
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
-dynix*)
|
|
|
|
os=-bsd
|
|
|
|
;;
|
|
|
|
-ctix*)
|
|
|
|
os=-sysv
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# Get rid of the `-' at the beginning of $os.
|
|
|
|
os=`echo $1 | sed 's/[^-]*-//'`
|
|
|
|
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1991-08-22 07:07:58 +00:00
|
|
|
echo ${basic_machine}${os}
|