# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# 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.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
;;
*)
if [ $basic_machine != $1 ]
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
# Prevent following clause from handling this invalid input.
;;
-apple)
os=
;;
-hiux*)
;;
-sco5)
;;
-sco4)
;;
;;
# Don't forget version if it is 3.2v4 or newer.
;;
-sco*)
;;
-isc)
;;
-clix*)
;;
-isc*)
;;
-lynx*)
;;
-ptx*)
;;
-windowsnt*)
;;
-psos*)
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
;;
# Object if more than one company name word.
*-*-*)
exit 1
;;
# Recognize the basic CPU types with company name.
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
;;
3b*)
;;
;;
;;
;;
;;
;;
;;
;;
;;
aux)
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
hp300-*)
;;
;;
;;
;;
;;
;;
;;
hppa-next)
;;
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
;;
;;
i[3456]86v)
;;
;;
-irix*)
;;
*)
;;
esac
;;
;;
;;
;;
;;
;;
mips3*-*)
;;
mips3*)
;;
;;
;;
;;
;;
next | m*-next )
basic_machine=m68k-next
-nextstep* )
;;
-ns2*)
;;
*)
;;
esac
;;
;;
;;
;;
np1)
;;
;;
;;
pbd)
;;
pbb)
;;
;;
;;
pentiumpro | p6)
;;
;;
pentiumpro-* | p6-*)
;;
k5)
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
;;
# We don't have specific support for Nexgen yet, so just call it a Pentium
;;
pn)
;;
;;
;;
;;
;;
ppcle-* | powerpclittle-*)
;;
ps2)
;;
;;
;;
;;
sh)
;;
sps7)
;;
spur)
;;
sun2)
;;
;;
;;
;;
;;
;;
;;
;;
;;
sun4)
;;
;;
;;
;;
;;
;;
vaxv)
;;
vms)
;;
;;
;;
;;
;;
xmp)
;;
;;
none)
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
;;
romp)
;;
;;
vax)
;;
;;
;;
;;
;;
;;
;;
*)
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
;;
*-commodore*)
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
;;
-solaris)
;;
;;
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
;;
-sunos5*)
;;
-sunos6*)
;;
-osfrose*)
;;
-osf*)
;;
-utek*)
;;
-dynix*)
;;
-acis*)
;;
;;
-ns2 )
;;
# Preserve the version number of sinix5.
-sinix5.*)
;;
-sinix*)
;;
-triton*)
;;
-oss*)
;;
-svr4)
;;
-svr3)
;;
-sysvr4)
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
;;
;;
pdp11-*)
;;
;;
;;
;;
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
;;
;;
*-ibm)
;;
*-hp)
;;
*-hitachi)
;;
;;
*-cbm)
;;
*-dg)
;;
*-dolphin)
;;
;;
;;
*-next )
;;
*-sequent)
;;
*-crds)
;;
*-ns)
;;
i370-*)
;;
*-next)
;;
*-gould)
;;
*-highlevel)
;;
*-encore)
;;
*-sgi)
;;
*-siemens)
;;
*-masscomp)
;;
;;
*)
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
case $basic_machine in
*-unknown)
-riscix*)
;;
-sunos*)
;;
-aix*)
;;
-hpux*)
;;
-hiux*)
;;
-unos*)
;;
-dgux*)
;;
-luna*)
;;
-genix*)
;;
-mvs*)
;;
-ptx*)
;;
;;
-aux*)
;;
esac
;;
esac
echo $basic_machine$os