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