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