home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 400_01 / socketpp-1.5 / config.sub < prev    next >
Encoding:
Text File  |  1993-06-06  |  16.7 KB  |  838 lines

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