home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gdb-4.14-src.lha / gdb-4.14 / config.sub < prev    next >
Encoding:
Text File  |  1995-03-04  |  20.4 KB  |  1,017 lines

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