home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-base.tgz / libg++-2.7.1-src.tar / fsf / libg++ / config.sub < prev    next >
Text File  |  1995-11-12  |  23KB  |  1,092 lines

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