home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gdb-4.12.tar.gz / gdb-4.12.tar / gdb-4.12 / config.sub < prev    next >
Text File  |  1994-02-03  |  19KB  |  930 lines

  1. #!/bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine.  It does not imply ALL GNU software can. 
  7.  
  8. #This file is free software; you can redistribute it and/or modify
  9. #it under the terms of the GNU General Public License as published by
  10. #the Free Software Foundation; either version 2 of the License, or
  11. #(at your option) any later version.
  12.  
  13. #This program is distributed in the hope that it will be useful,
  14. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #GNU General Public License for more details.
  17.  
  18. #You should have received a copy of the GNU General Public License
  19. #along with this program; if not, write to the Free Software
  20. #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.  
  23. # Configuration subroutine to validate and canonicalize a configuration type.
  24. # Supply the specified configuration type as an argument.
  25. # If it is invalid, we print an error message on stderr and exit with code 1.
  26. # Otherwise, we print the canonical config type on stdout and succeed.
  27.  
  28. # This file is supposed to be the same for all GNU packages
  29. # and recognize all the CPU types, system types and aliases
  30. # that are meaningful with *any* GNU software.
  31. # Each package is responsible for reporting which valid configurations
  32. # it does not support.  The user should be able to distinguish
  33. # a failure to support a valid configuration from a meaningless
  34. # configuration.
  35.  
  36. # The goal of this file is to map all the various variations of a given
  37. # machine specification into a single specification in the form:
  38. #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  39. # It is wrong to echo any other type of specification.
  40.  
  41. if [ x$1 = x ]
  42. then
  43.     echo Configuration name missing. 1>&2
  44.     echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  45.     echo "or     $0 ALIAS" 1>&2
  46.     echo where ALIAS is a recognized configuration type. 1>&2
  47.     exit 1
  48. fi
  49.  
  50. # First pass through any local machine types.
  51. case $1 in
  52.     *local*)
  53.         echo $1
  54.         exit 0
  55.         ;;
  56.     *)
  57.     ;;
  58. esac
  59.  
  60. # Separate what the user gave into CPU-COMPANY and OS (if any).
  61. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  62. if [ $basic_machine != $1 ]
  63. then os=`echo $1 | sed 's/.*-/-/'`
  64. else os=; fi
  65.  
  66. ### Let's recognize common machines as not being operating systems so
  67. ### that things like config.sub decstation-3100 work.  We also
  68. ### recognize some manufacturers as not being operating systems, so we
  69. ### can provide default operating systems below.
  70. case $os in
  71.     -sun*os*)
  72.         # Prevent following clause from handling this invalid input.
  73.         ;;
  74.     -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  75.     -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  76.     -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
  77.     -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  78.     -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  79.     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  80.     -sim)                        # CYGNUS LOCAL
  81.         os=
  82.         basic_machine=$1
  83.         ;;
  84.     -scout)                        # CYGNUS LOCAL
  85.         ;;
  86.     -wrs)                        # CYGNUS LOCAL
  87.         os=vxworks
  88.         basic_machine=$1
  89.         ;;
  90.     -unixware)                    # CYGNUS LOCAL
  91.         os=-sysv4
  92.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  93.         ;;
  94.     -hiux*)
  95.         os==-hiuxwe2
  96.         ;;
  97.     -sco4)
  98.         os=-sco3.2v4
  99.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  100.         ;;
  101.     -sco3.2.[4-9]*)
  102.         os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  103.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  104.         ;;
  105.     -sco3.2v[4-9]*)
  106.         # Don't forget version if it is 3.2v4 or newer.
  107.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  108.         ;;
  109.     -sco*)
  110.         os=-sco3.2v2
  111.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  112.         ;;
  113.     -isc)
  114.         os=-isc2.2
  115.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  116.         ;;
  117.     -clix*)
  118.         basic_machine=clipper-intergraph
  119.         ;;
  120.     -isc*)
  121.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  122.         ;;
  123.     -lynx)
  124.         os=-lynxos
  125.         ;;
  126. esac
  127.  
  128. # Decode aliases for certain CPU-COMPANY combinations.
  129. case $basic_machine in
  130.     # Recognize the basic CPU types without company name.
  131.     # Some are omitted here because they have special meanings below.
  132.     tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
  133.         | tron | a29k | 580 | i960 | hppa1.0 | hppa1.1 \
  134.         | alpha | we32k | ns16k | clipper | sparclite | i370 \
  135.         | powerpc \
  136.         | h8300 | h8300h | sh \
  137.         | m88110 | sparc | m680[01234]0 | m683?2 | z8k | v70 \
  138.         | h8500 | mips64 | mipsel | mips64el) # CYGNUS LOCAL
  139.         basic_machine=$basic_machine-unknown
  140.         ;;
  141.     # Object if more than one company name word.
  142.     *-*-*)
  143.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  144.         exit 1
  145.         ;;
  146.     # Recognize the basic CPU types with company name.
  147.     vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
  148.           | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
  149.           | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  150.           | none-* | 580-* | cray2-* | i960-* | xmp-* | ymp-* \
  151.           | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
  152.           | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
  153.           | powerpc \
  154.           | h8300-* | h8300h-* | sh-* \
  155.           | m88110-* | m680[01234]0-* | m683?2-* | z8k-* | h8500-* \
  156.           | mips64-* | mipsel-* | mips64el-*) # CYGNUS LOCAL
  157.         ;;
  158.     # Recognize the various machine names and aliases which stand
  159.     # for a CPU type and a company and sometimes even an OS.
  160.  
  161.     mips3-*)                    # CYGNUS LOCAL
  162.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  163.         ;;
  164.     mips3)                        # CYGNUS LOCAL
  165.         basic_machine=mips64-unknown
  166.         ;;
  167.     dpx20 | dpx20-*)                # CYGNUS LOCAL
  168.         basic_machine=rs6000-bull
  169.         os=-bosx
  170.         ;;
  171.     unixware)                    # CYGNUS LOCAL
  172.         os=-sysv4
  173.         basic_machine=i386-unknown
  174.         ;;
  175.     vaxv)
  176.         basic_machine=vax-dec
  177.         os=-sysv
  178.         ;;
  179.     vms)
  180.         basic_machine=vax-dec
  181.         os=-vms
  182.         ;;
  183.     i370-ibm* | ibm*)
  184.         basic_machine=i370-ibm
  185.         os=-mvs
  186.         ;;
  187.     i386mach)                    # CYGNUS LOCAL
  188.         basic_machine=i386-mach
  189.         os=-mach
  190.         ;;
  191.     i[34]86v32)
  192.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  193.         os=-sysv32
  194.         ;;
  195.     i[34]86v4*)
  196.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  197.         os=-sysv4
  198.         ;;
  199.     i[34]86v)
  200.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  201.         os=-sysv
  202.         ;;
  203.     i[34]86sol2)
  204.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  205.         os=-solaris2
  206.         ;;
  207.     vsta | i386-vsta)                # CYGNUS LOCAL
  208.         basic_machine=i386-unknown
  209.         os=-vsta
  210.         ;;
  211.     go32 | i386-go32)                # CYGNUS LOCAL
  212.         basic_machine=i386-unknown
  213.         os=-go32
  214.         ;;
  215.     i386-linux* | linux)                # CYGNUS LOCAL
  216.         basic_machine=i386-unknown
  217.         os=-linux
  218.         ;;
  219.     i386-linux*coff | linuxcoff)            # CYGNUS LOCAL
  220.         basic_machine=i386-unknown
  221.         os=-linuxcoff
  222.         ;;
  223.     i386-linux*elf | linuxelf)            # CYGNUS LOCAL
  224.         basic_machine=i386-unknown
  225.         os=-linuxelf
  226.         ;;
  227.     386bsd)                        # CYGNUS LOCAL
  228.         basic_machine=i386-unknown
  229.         os=-bsd
  230.         ;;
  231.     netbsd386)
  232.         basic_machine=i386-unknown        # CYGNUS LOCAL
  233.         os=-netbsd
  234.         ;;
  235.     spur)
  236.         basic_machine=spur-unknown
  237.         ;;
  238.     paragon)
  239.         basic_machine=i860-intel
  240.         os=-osf
  241.         ;;
  242.     alliant | fx80)
  243.         basic_machine=fx80-alliant
  244.         ;;
  245.     convex-c1)
  246.         basic_machine=c1-convex
  247.         os=-bsd
  248.         ;;
  249.     convex-c2)
  250.         basic_machine=c2-convex
  251.         os=-bsd
  252.         ;;
  253.     convex-c32)
  254.         basic_machine=c32-convex
  255.         os=-bsd
  256.         ;;
  257.     convex-c34)
  258.         basic_machine=c34-convex
  259.         os=-bsd
  260.         ;;
  261.     convex-c38)
  262.         basic_machine=c38-convex
  263.         os=-bsd
  264.         ;;
  265.     m88k-omron*)
  266.         basic_machine=m88k-omron
  267.         ;;
  268.     merlin)
  269.         basic_machine=ns32k-utek
  270.         os=-sysv
  271.         ;;
  272.     crds | unos)
  273.         basic_machine=m68k-crds
  274.         ;;
  275.     elxsi)
  276.         basic_machine=elxsi-elxsi
  277.         os=-bsd
  278.         ;;
  279.     encore | umax | mmax)
  280.         basic_machine=ns32k-encore
  281.         ;;
  282.     genix)
  283.         basic_machine=ns32k-ns
  284.         ;;
  285.     iris | iris4d | \
  286.     iris3 | iris4)                    # CYGNUS LOCAL
  287.         basic_machine=mips-sgi
  288.         case $os in
  289.             -irix*)
  290.             ;;
  291.             *)
  292.             os=-irix4
  293.             ;;
  294.         esac
  295.         ;;
  296.     news | news700 | news800 | news900)
  297.         basic_machine=m68k-sony
  298.         os=-newsos
  299.         ;;
  300.     3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  301.         basic_machine=m68000-att
  302.         ;;
  303.     3b*)
  304.         basic_machine=we32k-att
  305.         ;;
  306.     delta | 3300 | motorola-3300 | motorola-delta \
  307.           | 3300-motorola | delta-motorola)
  308.         basic_machine=m68k-motorola
  309.         ;;
  310.     balance)
  311.         basic_machine=ns32k-sequent
  312.         os=-dynix
  313.         ;;
  314.         pc532)
  315.         basic_machine=ns32k-pc532
  316.         ;;
  317.     symmetry)
  318.         basic_machine=i386-sequent
  319.         os=-dynix
  320.         ;;
  321.     sun2)
  322.         basic_machine=m68000-sun
  323.         ;;
  324.     sun2os3)
  325.         basic_machine=m68000-sun
  326.         os=-sunos3
  327.         ;;
  328.     sun2os4)
  329.         basic_machine=m68000-sun
  330.         os=-sunos4
  331.         ;;
  332.     sun3os3)
  333.         basic_machine=m68k-sun
  334.         os=-sunos3
  335.         ;;
  336.     sun3os4)
  337.         basic_machine=m68k-sun
  338.         os=-sunos4
  339.         ;;
  340.     sun4os3)
  341.         basic_machine=sparc-sun
  342.         os=-sunos3
  343.         ;;
  344.     sun4os4)
  345.         basic_machine=sparc-sun
  346.         os=-sunos4
  347.         ;;
  348.     sun4sol2)                    # CYGNUS LOCAL
  349.         basic_machine=sparc-sun
  350.         os=-solaris2
  351.         ;;
  352.     z8ksim)                        # CYGNUS LOCAL
  353.         basic_machine=z8k-zilog
  354.         os=-sim
  355.         ;;
  356.     z8k)                        # CYGNUS LOCAL
  357.         basic_machine=z8k-zilog
  358.         ;;
  359.     sun3)
  360.         basic_machine=m68k-sun
  361.         ;;
  362.     sun4)
  363.         basic_machine=sparc-sun
  364.         ;;
  365.     msdos)                        # CYGNUS LOCAL
  366.         basic_machine=i386-unknown    
  367.         os=-msdos
  368.         ;;
  369.     pbd)
  370.         basic_machine=sparc-tti
  371.         ;;
  372.     pbb)
  373.         basic_machine=m68k-tti
  374.         ;;
  375.     sun386 | sun386i | roadrunner)
  376.         basic_machine=i386-sun
  377.         ;;
  378.     ps2)
  379.         basic_machine=i386-ibm
  380.         ;;
  381.     fx2800)
  382.         basic_machine=i860-alliant
  383.         ;;
  384.     next)
  385.         basic_machine=m68k-next
  386.         os=-bsd
  387.         ;;
  388.     amiga)
  389.         basic_machine=m68k-cbm
  390.         ;;
  391.     amigados)
  392.         basic_machine=m68k-cbm
  393.         os=-amigados
  394.         ;;
  395.     amigaunix | amix)
  396.         basic_machine=m68k-cbm
  397.         os=-sysv4
  398.         ;;
  399.     hp9k3[2-9][0-9])
  400.         basic_machine=m68k-hp
  401.         ;;
  402.     hp9k31[0-9] | hp9k2[0-9][0-9])
  403.         basic_machine=m68000-hp
  404.         ;;
  405.     hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  406.         basic_machine=hppa1.1-hp
  407.         ;;
  408.     hp9k8[0-9][0-9] | hp8[0-9][0-9])
  409.         basic_machine=hppa1.0-hp
  410.         ;;
  411.     h3050r* | hppahitachi)
  412.         basic_machine=hppa1.1-hitachi
  413.         ;;
  414.     isi68 | isi)
  415.         basic_machine=m68k-isi
  416.         os=-sysv
  417.         ;;
  418.     apollo68)
  419.         basic_machine=m68k-apollo
  420.         os=-sysv
  421.         ;;
  422.     apollo68bsd)                    # CYGNUS LOCAL
  423.         basic_machine=m68k-apollo
  424.         os=-bsd
  425.         ;;
  426.     altos | altos3068)
  427.         basic_machine=m68k-altos
  428.         ;;
  429.     miniframe)
  430.         basic_machine=m68010-convergent
  431.         ;;
  432.     tower | tower-32)
  433.         basic_machine=m68k-ncr
  434.         ;;
  435.     news-3600 | risc-news)
  436.         basic_machine=mips-sony
  437.         os=-newsos
  438.         ;;
  439.     st2000)                        # CYGNUS LOCAL
  440.         basic_machine=m68k-tandem
  441.         ;;
  442.         m6*bug)                                           # CYGNUS LOCAL
  443.                 basic_machine=m68k-bug
  444.         os=-coff
  445.                 ;;
  446.         rom68k)                                         # CYGNUS LOCAL
  447.                 basic_machine=m68k-rom68k
  448.         os=-coff
  449.                 ;;
  450.         monitor)                                         # CYGNUS LOCAL
  451.                 basic_machine=m68k-rom68k
  452.         os=-coff
  453.                 ;;
  454.     decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
  455.         basic_machine=mips-dec
  456.         ;;
  457.     magnum | m3230)
  458.         basic_machine=mips-mips
  459.         os=-sysv
  460.         ;;
  461.     gmicro)
  462.         basic_machine=tron-gmicro
  463.         os=-sysv
  464.         ;;
  465.     rtpc | rtpc-*)
  466.         basic_machine=romp-ibm
  467.         ;;
  468.     am29k)
  469.         basic_machine=a29k-none
  470.         os=-bsd
  471.         ;;
  472.     amdahl)
  473.         basic_machine=580-amdahl
  474.         os=-sysv
  475.         ;;
  476.     stratus)                    # CYGNUS LOCAL
  477.         basic_machine=i860-stratus
  478.         os=-sysv4
  479.         ;;
  480.     cray | ymp)
  481.         basic_machine=ymp-cray
  482.         os=-unicos
  483.         ;;
  484.     cray2)
  485.         basic_machine=cray2-cray
  486.         os=-unicos
  487.         ;;
  488.     xmp)
  489.         basic_machine=xmp-cray
  490.         os=-unicos
  491.         ;;
  492.     delta88)
  493.         basic_machine=m88k-motorola
  494.         os=-sysv3
  495.         ;;
  496.     dpx2* | dpx2*-bull)
  497.         basic_machine=m68k-bull
  498.         os=-sysv3
  499.         ;;
  500.     ebmon29k)
  501.         basic_machine=a29k-amd
  502.         os=-ebmon
  503.         ;;
  504.     h8300hms)                    # CYGNUS LOCAL
  505.         basic_machine=h8300-hitachi
  506.         os=-hms
  507.         ;;
  508.     sh*)                        # CYGNUS LOCAL
  509.         basic_machine=sh-hitachi
  510.         os=-hms
  511.         ;;
  512.  
  513.     h8500hms)                    # CYGNUS LOCAL
  514.         basic_machine=h8500-hitachi
  515.         os=-hms
  516.         ;;
  517.     h8300xray)                    # CYGNUS LOCAL
  518.         basic_machine=h8300-hitachi
  519.         os=-xray
  520.         ;;
  521.     h8300hds)
  522.         basic_machine=h8300-hitachi
  523.         os=-hds
  524.         ;;
  525.     udi29k)                        # CYGNUS LOCAL
  526.         basic_machine=a29k-amd
  527.         os=-udi
  528.         ;;
  529.     a29khif)                    # CYGNUS LOCAL
  530.         basic_machine=a29k-amd
  531.         os=-udi
  532.         ;;
  533.     sa29200)                    # CYGNUS LOCAL
  534.         basic_machine=a29k-amd
  535.         os=-udi
  536.         ;;
  537.     harris)
  538.         basic_machine=m88k-harris
  539.         os=-sysv3
  540.         ;;
  541.     hp300bsd)
  542.         basic_machine=m68k-hp
  543.         os=-bsd
  544.         ;;
  545.     hp300hpux)
  546.         basic_machine=m68k-hp
  547.         os=-hpux
  548.         ;;
  549.     hppaosf)
  550.         basic_machine=hppa1.1-hp
  551.         os=-osf
  552.         ;;
  553.     ncr3000)
  554.         basic_machine=i486-ncr
  555.         os=-sysv4
  556.         ;;
  557.     necv70)                        # CYGNUS LOCAL
  558.         basic_machine=v70-nec
  559.         os=-sysv
  560.         ;;
  561.     news1000)
  562.         basic_machine=m68030-sony
  563.         os=-newsos
  564.         ;;
  565.     nindy960)
  566.         basic_machine=i960-intel
  567.         os=-nindy
  568.         ;;
  569.     pn)
  570.         basic_machine=pn-gould
  571.         ;;
  572.     np1)
  573.         basic_machine=np1-gould
  574.         ;;
  575.     ultra3)
  576.         basic_machine=a29k-nyu
  577.         os=-sym1
  578.         ;;
  579.     vxworks960)
  580.         basic_machine=i960-wrs
  581.         os=-vxworks
  582.         ;;
  583.     vxworks68)
  584.         basic_machine=m68k-wrs
  585.         os=-vxworks
  586.         ;;
  587.     es1800 | OSE68k | ose68k | ose | OSE)        # CYGNUS LOCAL
  588.         basic_machine=m68k-ericsson
  589.         os=-ose
  590.         ;;
  591.     OSE68000 | ose68000)                # CYGNUS LOCAL
  592.         basic_machine=m68000-ericsson
  593.         os=-ose
  594.         ;;
  595.     os68k)                        # CYGNUS LOCAL
  596.         basic_machine=m68k-none
  597.         os=-os68k
  598.         ;;
  599.     sparclite-wrs)                    # CYGNUS LOCAL
  600.         basic_machine=sparclite-wrs
  601.         os=-vxworks
  602.         ;;
  603.     sparcfrw)                    # CYGNUS LOCAL
  604.         basic_machine=sparcfrw-sun
  605.         os=-sunos4
  606.         ;;
  607.     sparcfrwcompat)                    # CYGNUS LOCAL
  608.         basic_machine=sparcfrwcompat-sun
  609.         os=-sunos4
  610.         ;;
  611.     sparclitefrw)                    # CYGNUS LOCAL
  612.         basic_machine=sparclitefrw-fujitsu
  613.         os=-none
  614.         ;;
  615.     sparclitefrwcompat)                # CYGNUS LOCAL
  616.         basic_machine=sparclitefrwcompat-fujitsu
  617.         os=-none
  618.         ;;
  619.     adobe68k)                    # CYGNUS LOCAL
  620.         basic_machine=m68010-adobe
  621.         os=-scout
  622.         ;;
  623.  
  624.         xps | xps100)
  625.         basic_machine=xps100-honeywell
  626.         ;;
  627.     none)
  628.         basic_machine=none-none
  629.         os=-none
  630.         ;;
  631.  
  632. # Here we handle the default manufacturer of certain CPU types.  It is in
  633. # some cases the only manufacturer, in others, it is the most popular.
  634.     mips)
  635.         basic_machine=mips-mips
  636.         ;;
  637.     romp)
  638.         basic_machine=romp-ibm
  639.         ;;
  640.     rs6000)
  641.         basic_machine=rs6000-ibm
  642.         ;;
  643.     vax)
  644.         basic_machine=vax-dec
  645.         ;;
  646.     we32k)
  647.         basic_machine=we32k-att
  648.         ;;
  649.     sparc)
  650.         basic_machine=sparc-sun
  651.         ;;
  652.         cydra)
  653.         basic_machine=cydra-cydrome
  654.         ;;
  655.     orion)
  656.         basic_machine=orion-highlevel
  657.         ;;
  658.     orion105)
  659.         basic_machine=clipper-highlevel
  660.         ;;
  661.     *)
  662.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  663.         exit 1
  664.         ;;
  665. esac
  666.  
  667. # Here we canonicalize certain aliases for manufacturers.
  668. case $basic_machine in
  669.     *-digital*)
  670.         basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  671.         ;;
  672.     *-commodore*)
  673.         basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  674.         ;;
  675.     *)
  676.         ;;
  677. esac
  678.  
  679. # Decode manufacturer-specific aliases for certain operating systems.
  680.  
  681. if [ x"$os" != x"" ]
  682. then
  683. case $os in
  684.     # -solaris* is a basic system type, with this one exception.
  685.     -solaris1 | -solaris1.*)
  686.         os=`echo $os | sed -e 's|solaris1|sunos4|'`
  687.         ;;
  688.     -solaris)
  689.         os=-solaris2
  690.         ;;
  691.     # First accept the basic system types.
  692.     # The portable systems comes first.
  693.     # Each alternative must end in a *, to match a version number.
  694.     # -sysv* is not here because it comes later, after sysvr4.
  695.     -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  696.           | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
  697.           | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  698.           | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  699.           | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  700.           | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  701.           | -hiux* | -386bsd* | -netbsd* | -riscix* | -lynxos* \
  702.           | -go32 | -vsta | -sim | -es1800* | -udi | -hms* | -xray | -hds* \
  703.           | -os68k* | -none* | -v88r* | -aout* | -coff | -elf* | -bosx* \
  704.           | -abug | -ecoff* | -netware* )
  705.                 # The last three lines above are CYGNUS LOCAL
  706.     ;;
  707.     -sunos5*)
  708.         os=`echo $os | sed -e 's|sunos5|solaris2|'`
  709.         ;;
  710.     -sunos6*)
  711.         os=`echo $os | sed -e 's|sunos6|solaris3|'`
  712.         ;;
  713.     -osfrose*)
  714.         os=-osfrose
  715.         ;;
  716.     -osf*)
  717.         os=-osf
  718.         ;;
  719.     -utek*)
  720.         os=-bsd
  721.         ;;
  722.     -dynix*)
  723.         os=-bsd
  724.         ;;
  725.     -acis*)
  726.         os=-aos
  727.         ;;
  728.     -386bsd)                    # CYGNUS LOCAL
  729.         os=-bsd
  730.         ;;
  731.     -ctix* | -uts*)
  732.         os=-sysv
  733.         ;;
  734.     -triton*)
  735.         os=-sysv3
  736.         ;;
  737.     -oss*)
  738.         os=-sysv3
  739.         ;;
  740.     -svr4)
  741.         os=-sysv4
  742.         ;;
  743.     -unixware)
  744.         os=-sysv4
  745.         ;;
  746.     -svr3)
  747.         os=-sysv3
  748.         ;;
  749.     -sysvr4)
  750.         os=-sysv4
  751.         ;;
  752.     # This must come after -sysvr4.
  753.     -sysv*)
  754.         ;;
  755.     -ose*)                        # CYGNUS LOCAL
  756.         os=-ose
  757.         ;;
  758.     -es1800*)                    # CYGNUS LOCAL
  759.         os=-ose
  760.         ;;
  761.     -xenix)
  762.         os=-xenix
  763.         ;;
  764.     -none)
  765.         ;;
  766.     *)
  767.         # Get rid of the `-' at the beginning of $os.
  768.         os=`echo $1 | sed 's/[^-]*-//'`
  769.         echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  770.         exit 1
  771.         ;;
  772. esac
  773. else
  774.  
  775. # Here we handle the default operating systems that come with various machines.
  776. # The value should be what the vendor currently ships out the door with their
  777. # machine or put another way, the most popular os provided with the machine.
  778.  
  779. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  780. # "-sun"), then you have to tell the case statement up towards the top
  781. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  782. # will signal an error saying that MANUFACTURER isn't an operating
  783. # system, and we'll never get to this point.
  784.  
  785. case $basic_machine in
  786.     *-acorn)
  787.         os=-riscix1.2
  788.         ;;
  789.     *-dec | vax-*)
  790.         os=-ultrix4.2
  791.         ;;
  792.     i386-sun)
  793.         os=-sunos4.0.2
  794.         ;;
  795.     m68000-sun)
  796.         os=-sunos3
  797.         # This also exists in the configure program, but was not the
  798.         # default.
  799.         # os=-sunos4
  800.         ;;
  801.     *-tti)    # must be before sparc entry or we get the wrong os.
  802.         os=-sysv3
  803.         ;;
  804.     sparc-* | *-sun)
  805.         os=-sunos4.1.1
  806.         ;;
  807.     *-ibm)
  808.         os=-aix
  809.         ;;
  810.     *-hp)
  811.         os=-hpux
  812.         ;;
  813.     *-hitachi)
  814.         os=-hiux
  815.         ;;
  816.     i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  817.         os=-sysv
  818.         ;;
  819.     *-cbm)
  820.         os=-amigados
  821.         ;;
  822.     *-dg)
  823.         os=-dgux
  824.         ;;
  825.     *-dolphin)
  826.         os=-sysv3
  827.         ;;
  828.     m88k-omron*)
  829.         os=-luna
  830.         ;;
  831.     *-sequent)
  832.         os=-bsd
  833.         ;;
  834.     *-crds)
  835.         os=-unos
  836.         ;;
  837.     *-ns)
  838.         os=-genix
  839.         ;;
  840.     i370-*)
  841.         os=-mvs
  842.         ;;
  843.     *-next)
  844.         os=-bsd
  845.         ;;
  846.     i[34]86-*)
  847.         os=-sco3.2v2
  848.         ;;
  849.         *-gould)
  850.         os=-sysv
  851.         ;;
  852.         *-highlevel)
  853.         os=-bsd
  854.         ;;
  855.     *-encore)
  856.         os=-bsd
  857.         ;;
  858.         *-sgi)
  859.         os=-irix
  860.         ;;
  861.     *-masscomp)
  862.         os=-rtu
  863.         ;;
  864.     *-rom68k)                    # CYGNUS LOCAL
  865.         os=-coff
  866.         ;;
  867.     *-*bug)                        # CYGNUS LOCAL
  868.         os=-coff
  869.         ;;
  870.     *)
  871.         os=-none
  872.         ;;
  873. esac
  874. fi
  875.  
  876. # Here we handle the case where we know the os, and the CPU type, but not the
  877. # manufacturer.  We pick the logical manufacturer.
  878. vendor=unknown
  879. case $basic_machine in
  880.     *-unknown)
  881.         case $os in
  882.             -riscix*)
  883.                 vendor=acorn
  884.                 ;;
  885.             -sunos*)
  886.                 vendor=sun
  887.                 ;;
  888.             -bosx*)            # CYGNUS LOCAL
  889.                 vendor=bull
  890.                 ;;
  891.             -lynxos*)
  892.                 vendor=lynx
  893.                 ;;
  894.             -aix*)
  895.                 vendor=ibm
  896.                 ;;
  897.             -hpux*)
  898.                 vendor=hp
  899.                 ;;
  900.             -hiux*)
  901.                 vendor=hitachi
  902.                 ;;
  903.             -unos*)
  904.                 vendor=crds
  905.                 ;;
  906.             -dgux*)
  907.                 vendor=dg
  908.                 ;;
  909.             -luna*)
  910.                 vendor=omron
  911.                 ;;
  912.             -genix*)
  913.                 vendor=ns
  914.                 ;;
  915.             -mvs*)
  916.                 vendor=ibm
  917.                 ;;
  918.             -vxworks*)
  919.                 vendor=wrs        # CYGNUS LOCAL
  920.                 ;;
  921.             -hms*)                # CYGNUS LOCAL
  922.                 vendor=hitachi
  923.                 ;;
  924.         esac
  925.         basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  926.         ;;
  927. esac
  928.  
  929. echo $basic_machine$os
  930.