home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gcc-2.6.3-src.lha / gcc-2.6.3 / configure < prev    next >
Encoding:
Text File  |  1995-01-13  |  58.4 KB  |  2,517 lines

  1. #!/bin/sh
  2. # Configuration script for GNU CC
  3. #   Copyright (C) 1988, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
  4.  
  5. #This file is part of GNU CC.
  6.  
  7. # AmigaDOS Notes:  Where "echo" can be invoked with a first arg that
  8. # starts with '-', run the external echo instead, since the pdksh builtin
  9. # version botches this case.
  10.  
  11. #GNU CC is free software; you can redistribute it and/or modify
  12. #it under the terms of the GNU General Public License as published by
  13. #the Free Software Foundation; either version 2, or (at your option)
  14. #any later version.
  15.  
  16. #GNU CC is distributed in the hope that it will be useful,
  17. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. #GNU General Public License for more details.
  20.  
  21. #You should have received a copy of the GNU General Public License
  22. #along with GNU CC; see the file COPYING.  If not, write to
  23. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25. #
  26. # Shell script to create proper links to machine-dependent files in
  27. # preparation for compiling gcc.
  28. #
  29. # Options: --srcdir=DIR        specifies directory where sources are.
  30. #        --host=HOST        specifies host configuration.
  31. #       --target=TARGET    specifies target configuration.
  32. #       --build=TARGET    specifies configuration of machine you are
  33. #                using to compile GCC.
  34. #       --prefix=DIR        specifies directory to install in.
  35. #       --local-prefix=DIR    specifies directory to put local ./include in.
  36. #       --gxx-include-dir=DIR specifies directory to put g++ header files in.
  37. #       --exec-prefix=DIR    specifies directory to install executables in.
  38. #       --with-gnu-ld    arrange to work with GNU ld.
  39. #       --with-gnu-as    arrange to work with GAS.
  40. #       --with-stabs        arrange to use stabs instead of host debug format.
  41. #       --with-elf        arrange to use elf instead of host debug format.
  42. #       --nfp        assume system has no FPU.
  43. #
  44. # If configure succeeds, it leaves its status in config.status.
  45. # If configure fails after disturbing the status quo, 
  46. #     config.status is removed.
  47. #
  48.  
  49. progname=$0
  50.  
  51. # Default --srcdir to the directory where the script is found, 
  52. # if a directory was specified.
  53. # The first sed call works around a bug in the AmigaDOS port of sksh, where
  54. # $0 has a trailing slash appended to it.  It is a NOP for other systems.
  55. # The third sed call is to convert `.//configure' to `./configure'.
  56. srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  57. if [ x$srcdir = x$0 ]
  58. then
  59. srcdir=
  60. fi
  61.  
  62. host=
  63.  
  64. # Note:  For AmigaDOS we want this to default to /gnu unless we specify
  65. # otherwise to configure.  We also don't want to have to remember to always
  66. # configure with "--prefix=/gnu".  Changing it in Makefile.in or in
  67. # config/m68k/x-amigados is ineffective since configure will always change
  68. # it back in the final generated Makefile, so we have to go to the root of
  69. # the problem, which is here.  There should be a way to do this in the
  70. # individual machine configuration files!  -fnf
  71. # here.  -fnf
  72. # Default prefix to "/gnu".
  73. prefix=/gnu
  74.  
  75. # local_prefix specifies where to find the directory /gnu/local/include
  76. # We don't use $(prefix) for this
  77. # because we always want GCC to search /gnu/local/include
  78. # even if GCC is installed somewhere other than /gnu/local.
  79. # Think THREE TIMES before specifying any other value for this!
  80. # DO NOT make this use $prefix!
  81. # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  82. # NoteII:We don't want to have yet-another-assign so we use /gnu/local
  83. local_prefix=/gnu/local
  84. # Default is to let the Makefile set exec_prefix from $(prefix)
  85. exec_prefix='$(prefix)'
  86. #
  87. # The default g++ include directory is $(libdir)/g++-include.
  88. gxx_include_dir='$(libdir)/g++-include'
  89.  
  90. remove=rm
  91. # AmigaDOS specific change.  Although we support symbolic links using
  92. # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
  93. # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
  94. # format.  This should probably be done by having GNU ln translate paths
  95. # that start with '/' to canonical AmigaDOS device:name form.
  96. hard_link=cp
  97. symbolic_link=cp
  98. copy=cp
  99.  
  100. # Record all the arguments, to write them in config.status.
  101. arguments=$*
  102.  
  103. #for Test
  104. #remove="echo rm"
  105. #hard_link="echo ln"
  106. #symbolic_link="echo ln -s"
  107.  
  108. target=
  109. host=
  110. build=
  111. name1=
  112. name2=
  113.  
  114. for arg in $*;
  115. do
  116.   case $next_arg in
  117.   --srcdir)
  118.     srcdir=$arg
  119.     next_arg=
  120.     ;;
  121.   --host)
  122.     host=$arg
  123.     next_arg=
  124.     ;;
  125.   --target)
  126.     target=$arg
  127.     next_arg=
  128.     ;;
  129.   --build)
  130.     build=$arg
  131.     next_arg=
  132.     ;;
  133.   --prefix)
  134.     prefix=$arg
  135.     next_arg=
  136.     ;;
  137.   --local-prefix)
  138.     local_prefix=$arg
  139.     next_arg=
  140.     ;;
  141.   --gxx-include-dir)
  142.     gxx_include_dir=$arg
  143.     next_arg=
  144.     ;;
  145.   --exec-prefix)
  146.     exec_prefix=$arg
  147.     next_arg=
  148.     ;;
  149.   *)
  150.     case $arg in
  151.       -*)
  152.     if [ x$name1 != x ]
  153.     then
  154.         echo "Positional arguments must be last." 1>&2
  155.         exit 1
  156.     fi
  157.     ;;
  158.     esac
  159.  
  160.     case $arg in
  161.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  162.     next_arg=--srcdir
  163.     ;;
  164.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  165.     srcdir=`/bin/echo $arg | sed 's/-*s[a-z]*=//'`
  166.     ;;
  167.      -host | --host | --hos | --ho)
  168.     next_arg=--host
  169.     ;;
  170.      -host=* | --host=* | --hos=* | --ho=*)
  171.     host=`/bin/echo $arg | sed 's/-*h[a-z]*=//'`
  172.     ;; 
  173.      -target | --target | --targe | --targ | --tar | --ta | --t)
  174.     next_arg=--target
  175.     ;;
  176.      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  177.     target=`/bin/echo $arg | sed 's/-*t[a-z]*=//'`
  178.     ;; 
  179.      -build | --build | --buil | --bui | --bu | --b)
  180.     next_arg=--build
  181.     ;;
  182.      -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  183.     build=`/bin/echo $arg | sed 's/-*b[a-z]*=//'`
  184.     ;; 
  185.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  186.     next_arg=--prefix
  187.     ;;
  188.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  189.     prefix=`/bin/echo $arg | sed 's/-*p[a-z]*=//'`
  190.     ;;
  191.      -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  192.     | --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
  193.     next_arg=--local-prefix
  194.     ;;
  195.      -local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
  196.     | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  197.     | --loc=* | --lo=* | --l=*)
  198.     local_prefix=`/bin/echo $arg | sed 's/-*l[-a-z]*=//'`
  199.     ;;
  200.      -gxx-include-dir | --gxx-include-dir | --gxx-include \
  201.     | --gxx-incl | --gxx-inc | --gxx-in | --gxx-i | --gxx- \
  202.     | --gxx | --gxx | --gx | --g)
  203.     next_arg=--gxx-include-dir
  204.     ;;
  205.      -gxx-include-dir=* | --gxx-include-dir=* | --gxx-include=* \
  206.     | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  207.     | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  208.     gxx_include_dir=`/bin/echo $arg | sed 's/-*g[-a-z]*=//'`
  209.     ;;
  210.      -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  211.     | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  212.     next_arg=--exec-prefix
  213.     ;;
  214.      -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
  215.     | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  216.     | --exe=* | --ex=* | --e=*)
  217.     exec_prefix=`/bin/echo $arg | sed 's/-*e[-a-z]*=//'`
  218.     ;;
  219.      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  220.     gnu_ld=yes
  221.     ;;
  222.      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  223.         gas=yes
  224.     ;;
  225.      -nfp | --nfp | --nf | --n)
  226.     nfp=yes
  227.     ;;
  228.      -with-stabs | -with-stab | -with-sta | -with-st | -with-s \
  229.     | --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
  230.     | -stabs | -stab | -sta | -st  \
  231.     | --stabs | --stab | --sta | --st)
  232.     stabs=yes
  233.     ;;
  234.      -with-elf | -with-el | -with-se \
  235.     | --with-elf | --with-el | --with-e \
  236.     | -elf | -el | -e \
  237.     |--elf | --el | --e)
  238.     elf=yes
  239.     ;;
  240.      -with-* | --with-*) ;; #ignored
  241.      -without-* | --without-*) ;; #ignored
  242.      -enable-* | --enable-*) ;; #ignored
  243.      -x | --x) ;; # ignored
  244.      --he*) ;; # ignored for now (--help)
  245.      --vers*) ;; # ignored for now (--version)
  246.      --verb*) ;; # ignored for now (--verbose)
  247.      --program-*) ;; #ignored (--program-prefix, --program-suffix)
  248.      --c*) ;; #ignored (--cache-file)
  249.      --q*) ;; #ignored (--quiet)
  250.      --si*) ;; #ignored (--silent)
  251.      -*)
  252.     echo "Invalid option \`$arg'" 1>&2
  253.     exit 1
  254.     ;;
  255.      *)
  256. # Allow configure HOST TARGET.  If just one name is given, it is used
  257. # as both unless a host was previously given, in which case it is
  258. # just the target.
  259.     if [ x$name1 != x ]
  260.     then
  261.         if [ x$name2 != x ]
  262.         then
  263.             echo "More than two configuration names." 1>&2
  264.             exit 1
  265.         fi
  266.         name2=$arg
  267.     elif [ x$host != x ]
  268.     then
  269.         name1=$host
  270.         name2=$arg
  271.         host=
  272.     else
  273.         name1=$arg
  274.     fi
  275.     ;;
  276.     esac
  277.   esac
  278. done
  279.  
  280. if [ x$name1 != x ]
  281. then
  282.     if [ x$name2 = x ]
  283.     then
  284.         name2=$name1
  285.     fi
  286.  
  287.     if [ x$host != x ]
  288.     then
  289.         echo "Duplicate specification of host." 1>&2
  290.         exit 1
  291.     fi
  292.  
  293.     if [ x$target != x ]
  294.     then
  295.         echo "Duplicate specification of target." 1>&2
  296.         exit 1
  297.     fi
  298.  
  299.     host=$name1
  300.     build=$name1
  301.     target=$name2
  302. fi
  303.  
  304. # Find the source files, if location was not specified.
  305. if [ x$srcdir = x ]
  306. then
  307.     srcdirdefaulted=1
  308.     srcdir=.
  309.     if [ ! -r tree.c ]
  310.     then
  311.         srcdir=..
  312.     fi
  313. fi
  314.  
  315. if [ ! -r ${srcdir}/tree.c ]
  316. then
  317.     if [ x$srcdirdefaulted = x ]
  318.     then
  319.       echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
  320.     else
  321.       echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
  322.     fi
  323.     exit 1
  324. fi
  325.  
  326. if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
  327. then
  328.     echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
  329.     exit 1
  330. fi
  331.  
  332. # Complain if an arg is missing
  333. if [ x$build = x ]
  334. then
  335.     # If host was specified, always use it for build also to avoid
  336.     # confusion.  If someone wants a cross compiler where build != host,
  337.     # then they must specify build explicitly.  Since this case is
  338.     # extremely rare, it does not matter that it is slightly inconvenient.
  339.     if [ x$host != x ]
  340.     then
  341.         build=$host
  342.     
  343.     # This way of testing the result of a command substitution is
  344.     # defined by Posix.2 (section 3.9.1) as well as traditional shells.
  345.     elif build=`${srcdir}/config.guess`
  346.     then
  347.         echo "This appears to be a ${build} system." 1>&2
  348.  
  349.     elif [ x$target != x ]
  350.     then
  351.         echo 'Config.guess failed to determine the host type.  Defaulting to target.'
  352.         build=$target
  353.     else
  354.         echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
  355.         echo "\
  356. Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  357.        [--prefix=DIR] [--gxx-include-dir=DIR] [--local-pref=DIR] [--exec-pref=DIR]
  358.        [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--nfp] TARGET" 1>&2
  359.     echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  360.         if [ -r config.status ]
  361.         then
  362.             tail +2 config.status 1>&2
  363.         fi
  364.         exit 1
  365.     fi
  366. fi
  367.  
  368. # If $host was not specified, use $build.
  369. if [ x$host = x ]
  370. then
  371.     host=$build
  372. fi
  373.  
  374. # If $target was not specified, use $host.
  375. if [ x$target = x ]
  376. then
  377.     target=$host
  378. fi
  379.  
  380. build_xm_file=
  381. host_xm_file=
  382. host_xmake_file=
  383. host_broken_install=
  384. host_install_headers_dir=install-headers-tar
  385. host_truncate_target=
  386.  
  387. # Validate the specs, and canonicalize them.
  388. canon_build=`/bin/sh $srcdir/config.sub $build` || exit 1
  389. canon_host=`/bin/sh $srcdir/config.sub $host` || exit 1
  390. canon_target=`/bin/sh $srcdir/config.sub $target` || exit 1
  391.  
  392. # Decode the host machine, then the target machine.
  393. # For the host machine, we save the xm_file variable as host_xm_file;
  394. # then we decode the target machine and forget everything else
  395. # that came from the host machine.
  396. for machine in $canon_build $canon_host $canon_target; do
  397.  
  398.     cpu_type=
  399.     xm_file=
  400.     tm_file=
  401.     out_file=
  402.     xmake_file=
  403.     tmake_file=
  404.     header_files=
  405.     extra_passes=
  406.     extra_parts=
  407.     extra_programs=
  408.     extra_objs=
  409.     # Set this to force installation and use of collect2.
  410.     use_collect2=
  411.     # Set this to override the default target model.
  412.     target_cpu_default=
  413.     # Set this to force use of install.sh (if set to 'yes')
  414.     # Set to name of installer to use a custom installer.
  415.     broken_install=
  416.     # Set this to control which fixincludes program to use.
  417.     fixincludes=fixincludes
  418.     # Set this to control how the header file directory is installed.
  419.     install_headers_dir=install-headers-tar
  420.     # Set this to a non-empty list of args to pass to cpp if the target
  421.     # wants its .md file passed through cpp.
  422.     md_cppflags=
  423.     # Set this if directory names should be truncated to 14 characters.
  424.     truncate_target=
  425.  
  426.     case $machine in
  427.     # Support site-specific machine types.
  428.     *local*)
  429.         cpu_type=`echo $machine | sed -e 's/-.*//'`
  430.         rest=`echo $machine | sed -e "s/$cpu_type-//"`
  431.         xm_file=${cpu_type}/xm-$rest.h
  432.         tm_file=${cpu_type}/$rest.h
  433.         if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \
  434.         then xmake_file=${cpu_type}/x-$rest; \
  435.         else true; \
  436.         fi
  437.         if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \
  438.         then tmake_file=${cpu_type}/t-$rest; \
  439.         else true; \
  440.         fi
  441.         ;;
  442.     1750a-*-*)
  443.         ;;
  444.     a29k-*-bsd*)
  445.         tm_file=a29k/unix.h
  446.         xm_file=a29k/xm-unix.h
  447.         xmake_file=a29k/x-unix
  448.         use_collect2=yes
  449.         ;;
  450.     a29k-*-*)            # Default a29k environment.
  451.         use_collect2=yes
  452.         ;;
  453.     alpha-dec-osf[23456789]*)
  454.         tm_file=alpha/osf2.h
  455.         if [ x$stabs = xyes ]
  456.         then
  457.             tm_file=alpha/gdb-osf2.h
  458.         fi
  459.         if [ x$gas != xyes ]
  460.         then
  461.             extra_passes="mips-tfile mips-tdump"
  462.         fi
  463.         broken_install=yes
  464.         use_collect2=yes
  465.         ;;
  466.     alpha-dec-osf1.2)
  467.         tm_file=alpha/osf12.h
  468.         if [ x$stabs = xyes ]
  469.         then
  470.             tm_file=alpha/gdb-osf12.h
  471.         fi
  472.         if [ x$gas != xyes ]
  473.         then
  474.             extra_passes="mips-tfile mips-tdump"
  475.         fi
  476.         broken_install=yes
  477.         use_collect2=yes
  478.         ;;
  479.     alpha-*-osf*)
  480.         if [ x$stabs = xyes ]
  481.         then
  482.             tm_file=alpha/gdb.h
  483.         fi
  484.         if [ x$gas != xyes ]
  485.         then
  486.             extra_passes="mips-tfile mips-tdump"
  487.         fi
  488.         broken_install=yes
  489.         use_collect2=yes
  490.         ;;
  491.     arm-*-riscix1.[01]*)        # Acorn RISC machine (early versions)
  492.         tm_file=arm/riscix1-1.h
  493.         use_collect2=yes
  494.         ;;
  495.     arm-*-riscix*)            # Acorn RISC machine
  496.         if [ x$gas = xyes ]
  497.         then
  498.             tm_file=arm/rix-gas.h
  499.         else
  500.             tm_file=arm/riscix.h
  501.         fi
  502.         xmake_file=arm/x-riscix
  503.         tmake_file=arm/t-riscix
  504.         use_collect2=yes
  505.         ;;
  506.     arm-*-*)            # generic version
  507.         ;;
  508.     c1-convex-*)            # Convex C1
  509.         cpu_type=convex
  510.         tm_file=convex/convex1.h
  511.         use_collect2=yes
  512.         fixincludes=Makefile.in
  513.         ;;
  514.     c2-convex-*)            # Convex C2
  515.         cpu_type=convex
  516.         tm_file=convex/convex2.h
  517.         use_collect2=yes
  518.         fixincludes=Makefile.in
  519.         ;;
  520.     c32-convex-*)
  521.         cpu_type=convex
  522.         tm_file=convex/convex32.h    # Convex C32xx
  523.         use_collect2=yes
  524.         fixincludes=Makefile.in
  525.         ;;
  526.     c34-convex-*)
  527.         cpu_type=convex
  528.         tm_file=convex/convex34.h    # Convex C34xx
  529.         use_collect2=yes
  530.         fixincludes=Makefile.in
  531.         ;;
  532.     c38-convex-*)
  533.         cpu_type=convex
  534.         tm_file=convex/convex38.h    # Convex C38xx
  535.         use_collect2=yes
  536.         fixincludes=Makefile.in
  537.         ;;
  538.     clipper-intergraph-clix*)
  539.         broken_install=yes
  540.         cpu_type=clipper
  541.         xm_file=clipper/xm-clix.h
  542.         tm_file=clipper/clix.h
  543.         extra_headers=va-clipper.h
  544.         extra_parts="crtbegin.o crtend.o"
  545.         xmake_file=clipper/x-clix
  546.         install_headers_dir=install-headers-cpio
  547.         ;;
  548.     dsp16xx-*)
  549.         ;;
  550.     elxsi-elxsi-*)
  551.         use_collect2=yes
  552.         ;;
  553. # This hasn't been upgraded to GCC 2.
  554. #    fx80-alliant-*)            # Alliant FX/80
  555. #        ;;
  556.     h8300-*-*)
  557.         cpu_type=h8300
  558.         ;;
  559.     hppa1.1-*-osf*)
  560.         cpu_type=pa
  561.         tm_file=pa/pa1-osf.h
  562.         use_collect2=yes
  563.         ;;
  564.     hppa1.0-*-osf*)
  565.         cpu_type=pa
  566.         tm_file=pa/pa-osf.h
  567.         use_collect2=yes
  568.         ;;
  569.     hppa1.1-*-bsd*)
  570.         cpu_type=pa
  571.         tm_file=pa/pa1.h
  572.         use_collect2=yes
  573.         ;;
  574.     hppa1.0-*-bsd*)
  575.         cpu_type=pa
  576.         use_collect2=yes
  577.         ;;
  578.     hppa1.0-*-hpux7*)
  579.         cpu_type=pa
  580.         xm_file=pa/xm-pahpux.h
  581.         xmake_file=pa/x-pa-hpux
  582.         tmake_file=pa/t-pa-hpux
  583.         if [ x$gas = xyes ]
  584.         then
  585.             tm_file=pa/pa-gux7.h
  586.         else
  587.             tm_file=pa/pa-hpux7.h
  588.         fi
  589.         broken_install=yes
  590.         install_headers_dir=install-headers-cpio
  591.         use_collect2=yes
  592.         ;;
  593.     hppa1.0-*-hpux8.0[0-2]*)
  594.         cpu_type=pa
  595.         xm_file=pa/xm-pahpux.h
  596.         xmake_file=pa/x-pa-hpux
  597.         tmake_file=pa/t-pa-hpux
  598.         if [ x$gas = xyes ]
  599.         then
  600.             tm_file=pa/pa-ghpux.h
  601.         else
  602.             tm_file=pa/pa-oldas.h
  603.         fi
  604.         broken_install=yes
  605.         install_headers_dir=install-headers-cpio
  606.         use_collect2=yes
  607.         ;;
  608.     hppa1.1-*-hpux8.0[0-2]*)
  609.         cpu_type=pa
  610.         xm_file=pa/xm-pahpux.h
  611.         xmake_file=pa/x-pa-hpux
  612.         tmake_file=pa/t-pa-hpux
  613.         if [ x$gas = xyes ]
  614.         then
  615.             tm_file=pa/pa1-ghpux.h
  616.         else
  617.             tm_file=pa/pa1-oldas.h
  618.         fi
  619.         broken_install=yes
  620.         install_headers_dir=install-headers-cpio
  621.         use_collect2=yes
  622.         ;;
  623.     hppa1.1-*-hpux*)
  624.         cpu_type=pa
  625.         xm_file=pa/xm-pahpux.h
  626.         xmake_file=pa/x-pa-hpux
  627.         tmake_file=pa/t-pa-hpux
  628.         if [ x$gas = xyes ]
  629.         then
  630.             tm_file=pa/pa1-ghpux.h
  631.         else
  632.             tm_file=pa/pa1-hpux.h
  633.         fi
  634.         broken_install=yes
  635.         install_headers_dir=install-headers-cpio
  636.         use_collect2=yes
  637.         ;;
  638.     hppa1.0-*-hpux*)
  639.         cpu_type=pa
  640.         xm_file=pa/xm-pahpux.h
  641.         xmake_file=pa/x-pa-hpux
  642.         tmake_file=pa/t-pa-hpux
  643.         if [ x$gas = xyes ]
  644.         then
  645.             tm_file=pa/pa-ghpux.h
  646.         else
  647.             tm_file=pa/pa-hpux.h
  648.         fi
  649.         broken_install=yes
  650.         install_headers_dir=install-headers-cpio
  651.         use_collect2=yes
  652.         ;;
  653.     hppa1.1-*-hiux*)
  654.         cpu_type=pa
  655.         xm_file=pa/xm-pahiux.h
  656.         xmake_file=pa/x-pa-hiux
  657.         tmake_file=pa/t-pa-hpux
  658.         if [ x$gas = xyes ]
  659.         then
  660.             tm_file=pa/pa1-ghiux.h
  661.         else
  662.             tm_file=pa/pa1-hiux.h
  663.         fi
  664.         broken_install=yes
  665.         install_headers_dir=install-headers-cpio
  666.         use_collect2=yes
  667.         ;;
  668.     hppa1.0-*-hiux*)
  669.         cpu_type=pa
  670.         xm_file=pa/xm-pahiux.h
  671.         xmake_file=pa/x-pa-hiux
  672.         tmake_file=pa/t-pa-hpux
  673.         if [ x$gas = xyes ]
  674.         then
  675.             tm_file=pa/pa-ghiux.h
  676.         else
  677.             tm_file=pa/pa-hiux.h
  678.         fi
  679.         broken_install=yes
  680.         install_headers_dir=install-headers-cpio
  681.         use_collect2=yes
  682.         ;;
  683.     i370-*-mvs*)
  684.         cpu_type=i370
  685.         tm_file=i370/mvs.h
  686.         xm_file=i370/xm-mvs.h
  687.         out_file=i370/mvs370.c
  688.         ;;
  689.     i[345]86-ibm-aix*)        # IBM PS/2 running AIX
  690.         cpu_type=i386
  691.                 if [ x$gas = xyes ]
  692.         then
  693.             tm_file=i386/aix386.h
  694.             extra_parts="crtbegin.o crtend.o"
  695.         else
  696.             tm_file=i386/aix386ng.h
  697.             use_collect2=yes
  698.         fi
  699.         xm_file=i386/xm-aix.h
  700.         xmake_file=i386/x-aix
  701.         broken_install=yes
  702.         ;;
  703.     i486-ncr-sysv4*)        # NCR 3000 - i486 running system V.4
  704.         cpu_type=i386
  705.         xm_file=i386/xm-sysv4.h
  706.         xmake_file=i386/x-ncr3000
  707.         tm_file=i386/sysv4.h
  708.         tmake_file=t-svr4
  709.         ;;
  710.     i[345]86-next-*)
  711.         cpu_type=i386
  712.         tm_file=i386/next.h
  713.         out_file=i386/next.c
  714.         xm_file=i386/xm-next.h
  715.         tmake_file=i386/t-next
  716.         xmake_file=i386/x-next
  717.         ;;
  718.     i[345]86-sequent-bsd*)         # 80386 from Sequent
  719.         cpu_type=i386
  720.         use_collect2=yes
  721.         if [ x$gas = xyes ]
  722.         then
  723.             tm_file=i386/seq-gas.h
  724.         else
  725.             tm_file=i386/sequent.h
  726.         fi
  727.         ;;
  728.     i[345]86-sequent-ptx1*)
  729.         cpu_type=i386
  730.         xm_file=i386/xm-sysv3.h
  731.         xmake_file=i386/x-sysv3
  732.         tm_file=i386/seq-sysv3.h
  733.         tmake_file=t-svr3
  734.         fixincludes=fixinc.ptx
  735.         extra_parts="crtbegin.o crtend.o"
  736.         install_headers_dir=install-headers-cpio
  737.         broken_install=yes
  738.         ;;
  739.     i[345]86-sequent-ptx2* | i[345]86-sequent-sysv*)
  740.         cpu_type=i386
  741.         xm_file=i386/xm-sysv3.h
  742.         xmake_file=i386/x-sysv3
  743.         tm_file=i386/seq2-sysv3.h
  744.         tmake_file=t-svr3
  745.         extra_parts="crtbegin.o crtend.o"
  746.         fixincludes=fixinc.ptx
  747.         install_headers_dir=install-headers-cpio
  748.         broken_install=yes
  749.         ;;
  750.     i386-sun-sunos*)        # Sun i386 roadrunner
  751.         xm_file=i386/xm-sun.h
  752.         tm_file=i386/sun.h
  753.         use_collect2=yes
  754.         ;;
  755.     i[345]86-*-bsdi* | i[345]86-*-bsd386*)
  756.         cpu_type=i386
  757.         tm_file=i386/bsd386.h
  758. #        tmake_file=t-libc-ok
  759.         ;;
  760.     i[345]86-*-bsd*)
  761.         cpu_type=i386
  762.         tm_file=i386/386bsd.h
  763. #        tmake_file=t-libc-ok
  764. # Next line turned off because both 386BSD and BSD/386 use GNU ld.
  765. #        use_collect2=yes
  766.         ;;
  767.     i[345]86-*-freebsd*)
  768.         cpu_type=i386
  769.         tm_file=i386/freebsd.h
  770.         # On FreeBSD, the headers are already ok.
  771.         fixincludes=Makefile.in
  772.         xmake_file=i386/x-freebsd
  773.         ;;
  774.     i[345]86-*-netbsd*)
  775.         cpu_type=i386
  776.         tm_file=i386/netbsd-i386.h
  777.         # On NetBSD, the headers are already okay.
  778.         fixincludes=Makefile.in
  779.         xmake_file=x-netbsd
  780.         ;;
  781.     i[345]86-*-gnu*)
  782.         cpu_type=i386
  783.         xm_file=i386/xm-gnu.h
  784.         tm_file=i386/gnu.h
  785.         tmake_file=t-libc-ok
  786.         # GNU tools are the only tools.
  787.         gnu_ld=yes
  788.         gas=yes
  789.         # On GNU, the headers are already okay.
  790.         fixincludes=Makefile.in
  791.         ;;
  792.     i[345]86-*-isc*)        # 80386 running ISC system
  793.         cpu_type=i386
  794.         xm_file=i386/xm-isc.h
  795.         case $machine in
  796.           i[345]86-*-isc[34]*)
  797.             xmake_file=i386/x-isc3
  798.             ;;
  799.           *)
  800.             xmake_file=i386/x-isc
  801.             ;;
  802.         esac
  803.         echo $xmake_file
  804.                 if [ x$gas = xyes -a x$stabs = xyes ]
  805.         then
  806.             tm_file=i386/iscdbx.h
  807.             tmake_file=i386/t-svr3dbx
  808.         else
  809.             tm_file=i386/isccoff.h
  810.             extra_parts="crtbegin.o crtend.o"
  811.         fi
  812.         install_headers_dir=install-headers-cpio
  813.         broken_install=yes
  814.         ;;
  815.     i[345]86-*-linux*)        # Intel 80386's running Linux
  816.         cpu_type=i386
  817.         xm_file=i386/xm-linux.h
  818.         xmake_file=i386/x-linux
  819.                 if [ x$elf = xyes ]
  820.         then
  821.             tm_file=i386/linuxelf.h
  822.         else
  823.             tm_file=i386/linux.h
  824.         fi
  825.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  826.         broken_install=yes
  827.         ;;
  828.     i[345]86-*-lynxos*)
  829.         cpu_type=i386
  830.         if [ x$gas = xyes ]
  831.         then
  832.             tm_file=i386/lynx.h
  833.         else
  834.             tm_file=i386/lynx-ng.h
  835.         fi
  836.         xm_file=xm-lynx.h
  837.         xmake_file=x-lynx
  838.         ;;
  839.     i[345]86-*-mach*)
  840.         cpu_type=i386
  841.         tm_file=i386/mach.h
  842. #        tmake_file=t-libc-ok
  843.         use_collect2=yes
  844.         ;;
  845.     i[345]86-*-osfrose*)        # 386 using OSF/rose
  846.         cpu_type=i386
  847.                 if [ x$elf = xyes ]
  848.         then
  849.             tm_file=i386/osfelf.h
  850.             use_collect2=
  851.         else
  852.             tm_file=i386/osfrose.h
  853.             use_collect2=yes
  854.         fi
  855.         xm_file=i386/xm-osf.h
  856.         xmake_file=i386/x-osfrose
  857.         extra_objs=halfpic.o
  858.         ;;
  859.     i[345]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
  860.         cpu_type=i386
  861.         xm_file=i386/xm-sco.h
  862.         xmake_file=i386/x-sco4
  863.         fixincludes=fixinc.sco
  864.         broken_install=yes
  865.         install_headers_dir=install-headers-cpio
  866.                 if [ x$stabs = xyes ]
  867.         then
  868.             tm_file=i386/sco4dbx.h
  869.             tmake_file=i386/t-svr3dbx
  870.         else
  871.             tm_file=i386/sco4.h
  872.             extra_parts="crtbegin.o crtend.o"
  873.         fi
  874.         ;;
  875.     i[345]86-*-sco*)         # 80386 running SCO system
  876.         cpu_type=i386
  877.         xm_file=i386/xm-sco.h
  878.         xmake_file=i386/x-sco
  879.         broken_install=yes
  880.         install_headers_dir=install-headers-cpio
  881.                 if [ x$stabs = xyes ]
  882.         then
  883.             tm_file=i386/scodbx.h
  884.             tmake_file=i386/t-svr3dbx
  885.         else
  886.             tm_file=i386/sco.h
  887.             extra_parts="crtbegin.o crtend.o"
  888.         fi
  889.         truncate_target=yes
  890.         ;;
  891.     i[345]86-*-solaris2* | i[345]86-*-sunos5*)
  892.         cpu_type=i386
  893.         xm_file=i386/xm-sysv4.h
  894.         tm_file=i386/sol2.h
  895.         tmake_file=i386/t-sol2
  896.         extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
  897.         xmake_file=x-svr4
  898.         fixincludes=fixinc.svr4
  899.         broken_install=yes
  900.         ;;
  901.     i[345]86-*-sysv4*)        # Intel 80386's running system V.4
  902.         cpu_type=i386
  903.         xm_file=i386/xm-sysv4.h
  904.         if [ x$stabs = xyes ]
  905.         then
  906.             tm_file=i386/sysv4gdb.h
  907.         else
  908.             tm_file=i386/sysv4.h
  909.         fi
  910.         tmake_file=t-svr4
  911.         xmake_file=x-svr4
  912.         ;;
  913.     i[345]86-*-sysv*)        # Intel 80386's running system V
  914.         cpu_type=i386
  915.         xm_file=i386/xm-sysv3.h
  916.         xmake_file=i386/x-sysv3
  917.         if [ x$gas = xyes ]
  918.         then
  919.             if [ x$stabs = xyes ]
  920.             then
  921.                 tm_file=i386/svr3dbx.h
  922.                 tmake_file=i386/t-svr3dbx
  923.             else
  924.                 tm_file=i386/svr3gas.h
  925.                 extra_parts="crtbegin.o crtend.o"
  926.             fi
  927.         else
  928.             tm_file=i386/sysv3.h
  929.             extra_parts="crtbegin.o crtend.o"
  930.         fi
  931.         ;;
  932.     i[345]86-*-winnt3*)
  933.         cpu_type=i386
  934.         tm_file=i386/winnt.h
  935.         out_file=i386/i386.c
  936.         xm_file=i386/xm-winnt.h
  937.         xmake_file=i386/x-winnt
  938.         if [ x$gnu_ld != xyes ]
  939.         then
  940.             extra_programs=ld
  941.         fi
  942.         ;;
  943.     i860-alliant-*)        # Alliant FX/2800
  944.         xm_file=i860/xm-fx2800.h
  945.         xmake_file=i860/x-fx2800
  946.         tm_file=i860/fx2800.h
  947.         tmake_file=i860/t-fx2800
  948.         extra_parts="crtbegin.o crtend.o"
  949.         ;;
  950.     i860-*-bsd*)
  951.         if [ x$gas = xyes ]
  952.         then
  953.             tm_file=i860/bsd-gas.h
  954.         else
  955.             tm_file=i860/bsd.h
  956.         fi
  957.         use_collect2=yes
  958.         ;;
  959.     i860-*-mach*)
  960.         xm_file=i860/xm-i860.h
  961.         tm_file=i860/mach.h
  962.         tmake_file=t-libc-ok
  963.         ;;
  964.     i860-*-osf*)            # Intel Paragon XP/S, OSF/1AD
  965.         xm_file=i860/xm-paragon.h
  966.         tm_file=i860/paragon.h
  967.         tmake_file=t-osf
  968.         broken_install=yes
  969.         ;;
  970.     i860-*-sysv3*)
  971.         xm_file=i860/xm-sysv3.h
  972.         xmake_file=i860/x-sysv3
  973.         tm_file=i860/sysv3.h
  974.         extra_parts="crtbegin.o crtend.o"
  975.         ;;
  976.     i860-*-sysv4*)
  977.         xm_file=i860/xm-sysv4.h
  978.         xmake_file=i860/x-sysv4
  979.         tm_file=i860/sysv4.h
  980.         tmake_file=t-svr4
  981.         ;;
  982.     i960-*-coff*)
  983.         tmake_file=i960/t-960bare
  984.         tm_file=i960/i960-coff.h
  985.         use_collect2=yes
  986.         ;;
  987.     i960-*-*)            # Default i960 environment.
  988.         use_collect2=yes
  989.         ;;
  990.     m68000-convergent-sysv*)
  991.         cpu_type=m68k
  992.         xm_file=m68k/xm-3b1.h
  993.         tm_file=m68k/ctix.h
  994.         use_collect2=yes
  995.         header_files=math-68881.h
  996.         ;;
  997.     m68000-hp-bsd*)            # HP 9000/200 running BSD
  998.         cpu_type=m68k
  999.         tm_file=m68k/hp2bsd.h
  1000.         xmake_file=m68k/x-hp2bsd
  1001.         use_collect2=yes
  1002.         header_files=math-68881.h
  1003.         ;;
  1004.     m68000-hp-hpux*)        # HP 9000 series 300
  1005.         cpu_type=m68k
  1006.         xm_file=m68k/xm-hp320.h
  1007.         if [ x$gas = xyes ]
  1008.         then
  1009.             xmake_file=m68k/x-hp320g
  1010.             tm_file=m68k/hp310g.h
  1011.         else
  1012.             xmake_file=m68k/x-hp320
  1013.             tm_file=m68k/hp310.h
  1014.         fi
  1015.         broken_install=yes
  1016.         install_headers_dir=install-headers-cpio
  1017.         use_collect2=yes
  1018.         header_files=math-68881.h
  1019.         ;;
  1020.     m68000-sun-sunos3*)
  1021.         cpu_type=m68k
  1022.         tm_file=m68k/sun2.h
  1023.         use_collect2=yes
  1024.         header_files=math-68881.h
  1025.         ;;
  1026.     m68000-sun-sunos4*)
  1027.         cpu_type=m68k
  1028.         tm_file=m68k/sun2o4.h
  1029.         use_collect2=yes
  1030.         header_files=math-68881.h
  1031.         ;;
  1032.     m68000-att-sysv*)
  1033.         cpu_type=m68k
  1034.         xm_file=m68k/xm-3b1.h
  1035.         if [ x$gas = xyes ]
  1036.         then
  1037.             tm_file=m68k/3b1g.h
  1038.         else
  1039.             tm_file=m68k/3b1.h
  1040.         fi
  1041.         use_collect2=yes
  1042.         header_files=math-68881.h
  1043.         ;;
  1044.     m68k-apollo-*)
  1045.         xmake_file=m68k/x-apollo68
  1046.         tm_file=m68k/apollo68.h
  1047.         use_collect2=yes
  1048.         header_files=math-68881.h
  1049.         ;;
  1050.     m68k-altos-sysv*)           # Altos 3068
  1051.         if [ x$gas = xyes ]
  1052.         then
  1053.                 xm_file=m68k/xm-altos3068.h
  1054.                 tm_file=m68k/altos3068.h
  1055.         else
  1056.             echo "The Altos is supported only with the GNU assembler" 1>&2
  1057.             exit 1
  1058.         fi
  1059.         header_files=math-68881.h
  1060.             ;;
  1061.     m68k-bull-sysv*)        # Bull DPX/2
  1062.         if [ x$gas = xyes ]
  1063.         then
  1064.             if [ x$stabs = xyes ]
  1065.             then
  1066.                 tm_file=m68k/dpx2cdbx.h
  1067.             else
  1068.                 tm_file=m68k/dpx2g.h
  1069.             fi
  1070.         else
  1071.             tm_file=m68k/dpx2.h
  1072.         fi
  1073.         xm_file=m68k/xm-m68kv.h
  1074.         xmake_file=m68k/x-dpx2
  1075.         use_collect2=yes
  1076.         header_files=math-68881.h
  1077.         ;;
  1078.     m68k-atari-sysv4*)              # Atari variant of V.4.
  1079.         tm_file=m68k/atari.h
  1080.         xm_file=m68k/xm-atari.h
  1081.         tmake_file=t-svr4
  1082.         header_files=math-68881.h
  1083.         ;;
  1084.     m68k-motorola-sysv*)
  1085.         xm_file=m68k/xm-mot3300.h
  1086.         xmake_file=m68k/x-alloca-c
  1087.         if [ x$gas = xyes ]
  1088.         then
  1089.             tm_file=m68k/mot3300g.h
  1090.         else
  1091.             tm_file=m68k/mot3300.h
  1092.         fi
  1093.         use_collect2=yes
  1094.         header_files=math-68881.h
  1095.         ;;
  1096.     m68k-ncr-sysv*)            # NCR Tower 32 SVR3
  1097.         tm_file=m68k/tower-as.h
  1098.         xm_file=m68k/xm-tower.h
  1099.         xmake_file=m68k/x-tower
  1100.         extra_parts="crtbegin.o crtend.o"
  1101.         header_files=math-68881.h
  1102.         ;;
  1103.         m68k-plexus-sysv*)
  1104.         tm_file=m68k/plexus.h
  1105.         xm_file=m68k/xm-plexus.h
  1106.         use_collect2=yes
  1107.         header_files=math-68881.h
  1108.         ;;
  1109.     m68k-tti-*)
  1110.         tm_file=m68k/pbb.h
  1111.         xm_file=m68k/xm-m68kv.h
  1112.         header_files=math-68881.h
  1113.         ;;
  1114.     m68k-crds-unos*)
  1115.         xm_file=m68k/xm-crds.h
  1116.         xmake_file=m68k/x-crds
  1117.         tm_file=m68k/crds.h
  1118.         broken_install=yes
  1119.         use_collect2=yes
  1120.         header_files=math-68881.h
  1121.         ;;
  1122.     m68k-*-amigados)
  1123.         xm_file=m68k/xm-amigados.h
  1124.         out_file=m68k/amigados.c
  1125.         tm_file=m68k/amigados.h
  1126.         tmake_file=m68k/t-amigados
  1127.         xmake_file=m68k/x-amigados
  1128.         fixincludes=Makefile.in # Headers are already fixed.
  1129.         broken_install=cp
  1130.         install_headers_dir=install-headers-cp
  1131.         ;;
  1132.     m68k-cbm-sysv4*)        # Commodore variant of V.4.
  1133.         tm_file=m68k/amix.h
  1134.         xm_file=m68k/xm-amix.h
  1135.         xmake_file=m68k/x-amix
  1136.         tmake_file=t-svr4
  1137.         header_files=math-68881.h
  1138.         ;;
  1139.     m68k-ccur-rtu)
  1140.         tm_file=m68k/ccur-GAS.h
  1141.         xmake_file=m68k/x-ccur
  1142.         header_files=math-68881.h
  1143.         use_collect2=yes
  1144.         broken_install=yes
  1145.         ;;
  1146.     m68k-hp-bsd4.4*)        # HP 9000/3xx running 4.4bsd
  1147.         tm_file=m68k/hp3bsd44.h
  1148.         xmake_file=m68k/x-hp3bsd44
  1149.         use_collect2=yes
  1150.         header_files=math-68881.h
  1151.         ;;
  1152.     m68k-hp-bsd*)            # HP 9000/3xx running Berkeley Unix
  1153.         tm_file=m68k/hp3bsd.h
  1154.         use_collect2=yes
  1155.         header_files=math-68881.h
  1156.         ;;
  1157.     m68k-isi-bsd*)
  1158.         if [ x$nfp = xyes ]
  1159.         then
  1160.             tm_file=m68k/isi-nfp.h
  1161.         else
  1162.             tm_file=m68k/isi.h
  1163.         fi
  1164.         use_collect2=yes
  1165.         header_files=math-68881.h
  1166.         ;;
  1167.     m68k-hp-hpux7*)    # HP 9000 series 300 running HPUX version 7.
  1168.         xm_file=m68k/xm-hp320.h
  1169.         if [ x$gas = xyes ]
  1170.         then
  1171.             xmake_file=m68k/x-hp320g
  1172.             tm_file=m68k/hp320g.h
  1173.         else
  1174.             xmake_file=m68k/x-hp320
  1175.             tm_file=m68k/hpux7.h
  1176.         fi
  1177.         broken_install=yes
  1178.         install_headers_dir=install-headers-cpio
  1179.         use_collect2=yes
  1180.         header_files=math-68881.h
  1181.         ;;
  1182.     m68k-hp-hpux*)    # HP 9000 series 300
  1183.         xm_file=m68k/xm-hp320.h
  1184.         if [ x$gas = xyes ]
  1185.         then
  1186.             xmake_file=m68k/x-hp320g
  1187.             tm_file=m68k/hp320g.h
  1188.         else
  1189.             xmake_file=m68k/x-hp320
  1190.             tm_file=m68k/hp320.h
  1191.         fi
  1192.         broken_install=yes
  1193.         install_headers_dir=install-headers-cpio
  1194.         use_collect2=yes
  1195.         header_files=math-68881.h
  1196.         ;;
  1197.     m68k-sun-mach*)
  1198.         tm_file=m68k/sun3mach.h
  1199.         use_collect2=yes
  1200.         header_files=math-68881.h
  1201.         ;;
  1202.     m68k-sony-newsos3*)
  1203.         if [ x$gas = xyes ]
  1204.         then
  1205.             tm_file=m68k/news3gas.h
  1206.         else
  1207.             tm_file=m68k/news3.h
  1208.         fi
  1209.         use_collect2=yes
  1210.         header_files=math-68881.h
  1211.         ;;
  1212.     m68k-sony-bsd* | m68k-sony-newsos*)
  1213.         if [ x$gas = xyes ]
  1214.         then
  1215.             tm_file=m68k/newsgas.h
  1216.         else
  1217.             tm_file=m68k/news.h
  1218.         fi
  1219.         use_collect2=yes
  1220.         header_files=math-68881.h
  1221.         ;;
  1222.     m68k-next-nextstep2*)
  1223.         tm_file=m68k/next21.h
  1224.         out_file=m68k/next.c
  1225.         xm_file=m68k/xm-next.h
  1226.         tmake_file=m68k/t-next
  1227.         xmake_file=m68k/x-next
  1228.         header_files=math-68881.h
  1229.         use_collect2=yes
  1230.                 ;;
  1231.     m68k-next-nextstep3*)
  1232.         tm_file=m68k/next.h
  1233.         out_file=m68k/next.c
  1234.         xm_file=m68k/xm-next.h
  1235.         tmake_file=m68k/t-next
  1236.         xmake_file=m68k/x-next
  1237.         header_files=math-68881.h
  1238.         ;;
  1239.     m68k-sun-sunos3*)
  1240.         if [ x$nfp = xyes ]
  1241.         then
  1242.             tm_file=m68k/sun3n3.h
  1243.         else
  1244.             tm_file=m68k/sun3o3.h
  1245.         fi
  1246.         use_collect2=yes
  1247.         header_files=math-68881.h
  1248.         ;;
  1249.     m68k-sun-sunos* | m68k-wrs-vxworks)    # For SunOS 4 (the default).
  1250.         if [ x$nfp = xyes ]
  1251.         then
  1252.             tm_file=m68k/sun3n.h
  1253.         else
  1254.             tm_file=m68k/sun3.h
  1255.         fi
  1256.         use_collect2=yes
  1257.         header_files=math-68881.h
  1258.         ;;
  1259.     m68k-*-lynxos*)
  1260.         if [ x$gas = xyes ]
  1261.         then
  1262.             tm_file=m68k/lynx.h
  1263.         else
  1264.             tm_file=m68k/lynx-ng.h
  1265.         fi
  1266.         xm_file=xm-lynx.h
  1267.         xmake_file=x-lynx
  1268.         header_files=math-68881.h
  1269.         ;;
  1270.     m68k-*-netbsd*)
  1271.         cpu_type=m68k
  1272.         tm_file=m68k/netbsd-m68k.h
  1273.         # On NetBSD, the headers are already okay.
  1274.         fixincludes=Makefile.in
  1275.         xmake_file=x-netbsd
  1276.         ;;
  1277.     m68k-*-sysv3*)            # Motorola m68k's running system V.3
  1278.         xm_file=m68k/xm-m68kv.h
  1279.         xmake_file=m68k/x-m68kv
  1280.         extra_parts="crtbegin.o crtend.o"
  1281.         header_files=math-68881.h
  1282.         ;;
  1283.     m68k-*-sysv4*)            # Motorola m68k's running system V.4
  1284.         tm_file=m68k/m68kv4.h
  1285.         xm_file=m68k/xm-m68kv.h
  1286.         tmake_file=t-svr4
  1287.         header_files=math-68881.h
  1288.         ;;
  1289.     m88k-dg-dgux*)
  1290.         case $machine in
  1291.           m88k-dg-dguxbcs*)
  1292.             tm_file=m88k/dguxbcs.h
  1293.             xmake_file=m88k/x-dguxbcs
  1294.             ;;
  1295.           *)
  1296.             tm_file=m88k/dgux.h
  1297.             xmake_file=m88k/x-dgux
  1298.             ;;
  1299.         esac
  1300.         extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
  1301.         broken_install=yes
  1302.         if [ x$gas = xyes ]
  1303.         then
  1304.             tmake_file=m88k/t-dgux-gas
  1305.         else
  1306.             tmake_file=m88k/t-dgux
  1307.         fi
  1308.         fixincludes=fixinc.dgux
  1309.         ;;
  1310.     m88k-dolphin-sysv3*)
  1311.         tm_file=m88k/dolph.h
  1312.         extra_parts="crtbegin.o crtend.o"
  1313.         xm_file=m88k/xm-sysv3.h
  1314.         xmake_file=m88k/x-dolph
  1315.         if [ x$gas = xyes ]
  1316.         then
  1317.             tmake_file=m88k/t-m88k-gas
  1318.         fi
  1319.         ;;
  1320.     m88k-tektronix-sysv3)
  1321.         tm_file=m88k/tekXD88.h
  1322.         extra_parts="crtbegin.o crtend.o"
  1323.         xm_file=m88k/xm-sysv3.h
  1324.         xmake_file=m88k/x-tekXD88
  1325.         if [ x$gas = xyes ]
  1326.         then
  1327.             tmake_file=m88k/t-m88k-gas
  1328.         fi
  1329.         ;;
  1330.     m88k-mot*-sysv4*)
  1331.         tm_file=m88k/mot-sysv4.h
  1332.         extra_parts="crtbegin.o crtend.o"
  1333.         xmake_file=m88k/x-sysv4
  1334.         tmake_file=m88k/t-sysv4
  1335.         ;;
  1336.     m88k-*-luna*)
  1337.         tm_file=m88k/luna.h
  1338.         extra_parts="crtbegin.o crtend.o"
  1339.         if [ x$gas = xyes ]
  1340.         then
  1341.             tmake_file=m88k/t-luna-gas
  1342.         else
  1343.             tmake_file=m88k/t-luna
  1344.         fi
  1345.         ;;
  1346.     m88k-*-sysv3*)
  1347.         tm_file=m88k/sysv3.h
  1348.         extra_parts="crtbegin.o crtend.o"
  1349.         xm_file=m88k/xm-sysv3.h
  1350.         xmake_file=m88k/x-sysv3
  1351.         if [ x$gas = xyes ]
  1352.         then
  1353.             tmake_file=m88k/t-m88k-gas
  1354.         fi
  1355.         ;;
  1356.     m88k-*-sysv4*)
  1357.         tm_file=m88k/sysv4.h
  1358.         extra_parts="crtbegin.o crtend.o"
  1359.         xmake_file=m88k/x-sysv4
  1360.         tmake_file=m88k/t-sysv4
  1361.         ;;
  1362.     mips-sgi-irix5*)        # SGI System V.4., IRIX 5
  1363.         if [ x$gas = xyes ]
  1364.         then
  1365.             if [ x$stabs = xyes ]
  1366.             then
  1367.                 tm_file=mips/iris5gdb.h
  1368.             else
  1369.                 tm_file=mips/iris5gas.h
  1370.             fi
  1371.         else
  1372.             tm_file=mips/iris5.h
  1373.         fi
  1374.         xm_file=mips/xm-iris5.h
  1375.         broken_install=yes
  1376.         fixincludes=Makefile.in
  1377.         xmake_file=mips/x-iris
  1378.         # mips-tfile doesn't work yet
  1379.         tmake_file=mips/t-mips-gas
  1380.         # See comment in mips/iris5.h file.
  1381.         use_collect2=yes
  1382.         ;;
  1383.     mips-sgi-irix4loser*)        # Mostly like a MIPS.
  1384.         if [ x$stabs = xyes ]; then
  1385.             tm_file=mips/iris4gl.h
  1386.         else
  1387.             tm_file=mips/iris4loser.h
  1388.         fi
  1389.         xm_file=mips/xm-iris4.h
  1390.         broken_install=yes
  1391.         xmake_file=mips/x-iris
  1392.         if [ x$gas = xyes ]
  1393.         then
  1394.             tmake_file=mips/t-mips-gas
  1395.         else
  1396.             extra_passes="mips-tfile mips-tdump"
  1397.         fi
  1398.         if [ x$gnu_ld != xyes ]
  1399.         then
  1400.             use_collect2=yes
  1401.         fi
  1402.         ;;
  1403.     mips-sgi-irix4*)        # Mostly like a MIPS.
  1404.         if [ x$stabs = xyes ]; then
  1405.             tm_file=mips/iris4-gdb.h
  1406.         else
  1407.             tm_file=mips/iris4.h
  1408.         fi
  1409.         xm_file=mips/xm-iris4.h
  1410.         broken_install=yes
  1411.         xmake_file=mips/x-iris
  1412.         if [ x$gas = xyes ]
  1413.         then
  1414.             tmake_file=mips/t-mips-gas
  1415.         else
  1416.             extra_passes="mips-tfile mips-tdump"
  1417.         fi
  1418.         if [ x$gnu_ld != xyes ]
  1419.         then
  1420.             use_collect2=yes
  1421.         fi
  1422.         ;;
  1423.     mips-sgi-*)            # Mostly like a MIPS.
  1424.         if [ x$stabs = xyes ]; then
  1425.             tm_file=mips/iris3-gdb.h
  1426.         else
  1427.             tm_file=mips/iris3.h
  1428.         fi
  1429.         xm_file=mips/xm-iris3.h
  1430.         broken_install=yes
  1431.         xmake_file=mips/x-iris3
  1432.         if [ x$gas = xyes ]
  1433.         then
  1434.             tmake_file=mips/t-mips-gas
  1435.         else
  1436.             extra_passes="mips-tfile mips-tdump"
  1437.         fi
  1438.         if [ x$gnu_ld != xyes ]
  1439.         then
  1440.             use_collect2=yes
  1441.         fi
  1442.         ;;
  1443.     mips-dec-osfrose*)        # Decstation running OSF/1 reference port with OSF/rose.
  1444.         tm_file=mips/osfrose.h
  1445.         xmake_file=mips/x-osfrose
  1446.         tmake_file=mips/t-osfrose
  1447.         extra_objs=halfpic.o
  1448.         use_collect2=yes
  1449.         ;;
  1450.     mips-dec-osf*)            # Decstation running OSF/1 as shipped by DIGITAL
  1451.         if [ x$stabs = xyes ]; then
  1452.             tm_file=mips/dec-gosf1.h
  1453.         else
  1454.             tm_file=mips/dec-osf1.h
  1455.         fi
  1456.         xmake_file=mips/x-dec-osf1
  1457.         if [ x$gas = xyes ]
  1458.         then
  1459.             tmake_file=mips/t-mips-gas
  1460.         else
  1461.             tmake_file=mips/t-ultrix
  1462.             extra_passes="mips-tfile mips-tdump"
  1463.         fi
  1464.         if [ x$gnu_ld != xyes ]
  1465.         then
  1466.             use_collect2=yes
  1467.         fi
  1468.         ;;
  1469.     mips-dec-bsd*)                  # Decstation running 4.4 BSD
  1470.               tm_file=mips/dec-bsd.h
  1471.               xmake_file=
  1472.               tmake_file=
  1473.               fixincludes=
  1474.           if [ x$gas = xyes ]
  1475.           then
  1476.                tmake_file=mips/t-mips-gas
  1477.           else
  1478.             tmake_file=mips/t-ultrix
  1479.             extra_passes="mips-tfile mips-tdump"
  1480.           fi
  1481.           if [ x$gnu_ld != xyes ]
  1482.           then
  1483.             use_collect2=yes
  1484.           fi
  1485.           ;;
  1486.     mips-sony-bsd* | mips-sony-newsos*)    # Sony NEWS 3600 or risc/news.
  1487.         if [ x$stabs = xyes ]; then
  1488.             tm_file=mips/news4-gdb.h
  1489.         else
  1490.             tm_file=mips/news4.h
  1491.         fi
  1492.         if [ x$gas = xyes ]
  1493.         then
  1494.             tmake_file=mips/t-mips-gas
  1495.         else
  1496.             extra_passes="mips-tfile mips-tdump"
  1497.         fi
  1498.         if [ x$gnu_ld != xyes ]
  1499.         then
  1500.             use_collect2=yes
  1501.         fi
  1502.         xmake_file=mips/x-sony
  1503.         ;;
  1504.     mips-sony-sysv*)        # Sony NEWS 3800 with NEWSOS5.0.
  1505.                     # That is based on svr4.
  1506.         # t-svr4 is not right because this system doesn't use ELF.
  1507.         if [ x$stabs = xyes ]; then
  1508.             tm_file=mips/news5-gdb.h
  1509.         else
  1510.             tm_file=mips/news5.h
  1511.         fi
  1512.         xm_file=mips/xm-news.h
  1513.         if [ x$gas = xyes ]
  1514.         then
  1515.             tmake_file=mips/t-mips-gas
  1516.         else
  1517.             extra_passes="mips-tfile mips-tdump"
  1518.         fi
  1519.         if [ x$gnu_ld != xyes ]
  1520.         then
  1521.             use_collect2=yes
  1522.         fi
  1523.         ;;
  1524.     mips-tandem-sysv4*)        # Tandem S2 running NonStop UX
  1525.         if [ x$stabs = xyes ]; then
  1526.             tm_file=mips/svr4-t-gdb.h
  1527.         else
  1528.             tm_file=mips/svr4-t.h
  1529.         fi
  1530.         xm_file=mips/xm-sysv4.h
  1531.         xmake_file=mips/x-sysv
  1532.         if [ x$gas = xyes ]
  1533.         then
  1534.             tmake_file=mips/t-svr4-gas
  1535.         else
  1536.             tmake_file=mips/t-svr4
  1537.             extra_passes="mips-tfile mips-tdump"
  1538.         fi
  1539.         if [ x$gnu_ld != xyes ]
  1540.         then
  1541.             use_collect2=yes
  1542.         fi
  1543.         broken_install=yes
  1544.         ;;
  1545.     mips-*-ultrix*)        # Decstation.
  1546.         if [ x$stabs = xyes ]; then
  1547.             tm_file=mips/ultrix-gdb.h
  1548.         else
  1549.             tm_file=mips/ultrix.h
  1550.         fi
  1551.         xmake_file=mips/x-ultrix
  1552.         if [ x$gas = xyes ]
  1553.         then
  1554.             tmake_file=mips/t-mips-gas
  1555.         else
  1556.             tmake_file=mips/t-ultrix
  1557.             extra_passes="mips-tfile mips-tdump"
  1558.         fi
  1559.         if [ x$gnu_ld != xyes ]
  1560.         then
  1561.             use_collect2=yes
  1562.         fi
  1563.             ;;
  1564.     mips-*-riscos[56789]bsd*)
  1565.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 5.0
  1566.             tm_file=mips/bsd-5-gdb.h
  1567.         else
  1568.             tm_file=mips/bsd-5.h
  1569.         fi
  1570.         if [ x$gas = xyes ]
  1571.         then
  1572.             tmake_file=mips/t-bsd-gas
  1573.         else
  1574.             tmake_file=mips/t-bsd
  1575.             extra_passes="mips-tfile mips-tdump"
  1576.         fi
  1577.         if [ x$gnu_ld != xyes ]
  1578.         then
  1579.             use_collect2=yes
  1580.         fi
  1581.         broken_install=yes
  1582.             ;;
  1583.     mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
  1584.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 4.0
  1585.             tm_file=mips/bsd-4-gdb.h
  1586.         else
  1587.             tm_file=mips/bsd-4.h
  1588.         fi
  1589.         if [ x$gas = xyes ]
  1590.         then
  1591.             tmake_file=mips/t-bsd-gas
  1592.         else
  1593.             tmake_file=mips/t-bsd
  1594.             extra_passes="mips-tfile mips-tdump"
  1595.         fi
  1596.         if [ x$gnu_ld != xyes ]
  1597.         then
  1598.             use_collect2=yes
  1599.         fi
  1600.         broken_install=yes
  1601.             ;;
  1602.     mips-*-riscos[56789]sysv4*)
  1603.         if [ x$stabs = xyes ]; then    # MIPS System V.4., RISC-OS 5.0
  1604.             tm_file=mips/svr4-5-gdb.h
  1605.         else
  1606.             tm_file=mips/svr4-5.h
  1607.         fi
  1608.         xm_file=mips/xm-sysv4.h
  1609.         xmake_file=mips/x-sysv
  1610.         if [ x$gas = xyes ]
  1611.         then
  1612.             tmake_file=mips/t-svr4-gas
  1613.         else
  1614.             tmake_file=mips/t-svr4
  1615.             extra_passes="mips-tfile mips-tdump"
  1616.         fi
  1617.         if [ x$gnu_ld != xyes ]
  1618.         then
  1619.             use_collect2=yes
  1620.         fi
  1621.         broken_install=yes
  1622.         ;;
  1623.     mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
  1624.         if [ x$stabs = xyes ]; then    # MIPS System V.4. RISC-OS 4.0
  1625.             tm_file=mips/svr4-4-gdb.h
  1626.         else
  1627.             tm_file=mips/svr4-4.h
  1628.         fi
  1629.         xm_file=mips/xm-sysv.h
  1630.         xmake_file=mips/x-sysv
  1631.         if [ x$gas = xyes ]
  1632.         then
  1633.             tmake_file=mips/t-svr4-gas
  1634.         else
  1635.             tmake_file=mips/t-svr4
  1636.             extra_passes="mips-tfile mips-tdump"
  1637.         fi
  1638.         if [ x$gnu_ld != xyes ]
  1639.         then
  1640.             use_collect2=yes
  1641.         fi
  1642.         broken_install=yes
  1643.         ;;
  1644.     mips-*-riscos[56789]sysv*)
  1645.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 5.0
  1646.             tm_file=mips/svr3-5-gdb.h
  1647.         else
  1648.             tm_file=mips/svr3-5.h
  1649.         fi
  1650.         xm_file=mips/xm-sysv.h
  1651.         xmake_file=mips/x-sysv
  1652.         if [ x$gas = xyes ]
  1653.         then
  1654.             tmake_file=mips/t-svr3-gas
  1655.         else
  1656.             tmake_file=mips/t-svr3
  1657.             extra_passes="mips-tfile mips-tdump"
  1658.         fi
  1659.         if [ x$gnu_ld != xyes ]
  1660.         then
  1661.             use_collect2=yes
  1662.         fi
  1663.         broken_install=yes
  1664.         ;;
  1665.     mips-*-sysv* | mips-*-riscos*sysv*)
  1666.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 4.0
  1667.             tm_file=mips/svr3-4-gdb.h
  1668.         else
  1669.             tm_file=mips/svr3-4.h
  1670.         fi
  1671.         xm_file=mips/xm-sysv.h
  1672.         xmake_file=mips/x-sysv
  1673.         if [ x$gas = xyes ]
  1674.         then
  1675.             tmake_file=mips/t-svr3-gas
  1676.         else
  1677.             tmake_file=mips/t-svr3
  1678.             extra_passes="mips-tfile mips-tdump"
  1679.         fi
  1680.         if [ x$gnu_ld != xyes ]
  1681.         then
  1682.             use_collect2=yes
  1683.         fi
  1684.         broken_install=yes
  1685.         ;;
  1686.     mips-*-riscos[56789]*)            # Default MIPS RISC-OS 5.0.
  1687.         if [ x$stabs = xyes ]; then
  1688.             tm_file=mips/mips-5-gdb.h
  1689.         else
  1690.             tm_file=mips/mips-5.h
  1691.         fi
  1692.         if [ x$gas = xyes ]
  1693.         then
  1694.             tmake_file=mips/t-mips-gas
  1695.         else
  1696.             extra_passes="mips-tfile mips-tdump"
  1697.         fi
  1698.         if [ x$gnu_ld != xyes ]
  1699.         then
  1700.             use_collect2=yes
  1701.         fi
  1702.         broken_install=yes
  1703.         ;;
  1704.     mips-*-*)                # Default MIPS RISC-OS 4.0.
  1705.         if [ x$stabs = xyes ]; then
  1706.             tm_file=mips/mips-4-gdb.h
  1707.         else
  1708.             tm_file=mips/mips.h
  1709.         fi
  1710.         if [ x$gas = xyes ]
  1711.         then
  1712.             tmake_file=mips/t-mips-gas
  1713.         else
  1714.             extra_passes="mips-tfile mips-tdump"
  1715.         fi
  1716.         if [ x$gnu_ld != xyes ]
  1717.         then
  1718.             use_collect2=yes
  1719.         fi
  1720.         ;;
  1721.     ns32k-encore-bsd*)
  1722.         tm_file=ns32k/encore.h
  1723.         use_collect2=yes
  1724.         ;;
  1725.     ns32k-sequent-bsd*)
  1726.         tm_file=ns32k/sequent.h
  1727.         use_collect2=yes
  1728.         ;;
  1729.     ns32k-tek6100-bsd*)
  1730.         tm_file=ns32k/tek6100.h
  1731.         broken_install=yes
  1732.         use_collect2=yes
  1733.         ;;
  1734.     ns32k-tek6200-bsd*)
  1735.         tm_file=ns32k/tek6200.h
  1736.         broken_install=yes
  1737.         use_collect2=yes
  1738.         ;;
  1739. # This has not been updated to GCC 2.
  1740. #    ns32k-ns-genix*)
  1741. #        xm_file=ns32k/xm-genix.h
  1742. #        xmake_file=ns32k/x-genix
  1743. #        tm_file=ns32k/genix.h
  1744. #        broken_install=yes
  1745. #        use_collect2=yes
  1746. #        ;;
  1747.     ns32k-merlin-*)
  1748.         tm_file=ns32k/merlin.h
  1749.         use_collect2=yes
  1750.         ;;
  1751.     ns32k-pc532-mach*)
  1752.         tm_file=ns32k/pc532-mach.h
  1753.         use_collect2=yes
  1754.         ;;
  1755.     ns32k-pc532-minix*)
  1756.         tm_file=ns32k/pc532-min.h
  1757.         xm_file=ns32k/xm-pc532-min.h
  1758.         use_collect2=yes
  1759.         ;;
  1760.     ns32k-pc532-netbsd*)
  1761.         tm_file=ns32k/netbsd.h
  1762.         xm_file=ns32k/xm-netbsd.h
  1763.         tmake_file=t-libc-ok
  1764.         # On NetBSD, the headers are already okay.
  1765.         fixincludes=Makefile.in
  1766.         xmake_file=x-netbsd
  1767.         ;;
  1768.     pyramid-*-*)
  1769.         cpu_type=pyr
  1770.         xmake_file=pyr/x-pyr
  1771.         use_collect2=yes
  1772.         ;;
  1773.     romp-*-aos*)
  1774.         use_collect2=yes
  1775.         ;;
  1776.     romp-*-mach*)
  1777.         xmake_file=romp/x-mach
  1778.         use_collect2=yes
  1779.         ;;
  1780.     powerpc-ibm-aix*)
  1781.         cpu_type=rs6000
  1782.         tm_file=rs6000/powerpc.h
  1783.         use_collect2=yes
  1784.         ;;
  1785.     rs6000-ibm-aix3.[01]*)
  1786.         tm_file=rs6000/aix31.h
  1787.         xmake_file=rs6000/x-aix31
  1788.         use_collect2=yes
  1789.         ;;
  1790.     rs6000-ibm-aix4.1*)
  1791.         tm_file=rs6000/aix41.h
  1792.         xmake_file=rs6000/x-aix31
  1793.         use_collect2=yes
  1794.         ;;
  1795.     rs6000-ibm-aix*)
  1796.         use_collect2=yes
  1797.         ;;
  1798.     rs6000-bull-bosx)
  1799.         use_collect2=yes
  1800.         ;;
  1801.     rs6000-*-mach*)
  1802.         xm_file=rs6000/xm-mach.h
  1803.         tm_file=rs6000/mach.h
  1804.         xmake_file=rs6000/x-mach
  1805.         use_collect2=yes
  1806.         ;;
  1807.     sh-*-*)
  1808.         cpu_type=sh
  1809.         ;;
  1810.     sparc-tti-*)
  1811.         tm_file=sparc/pbd.h
  1812.         xm_file=sparc/xm-pbd.h
  1813.         ;;
  1814.     sparc-*-netbsd)
  1815.         tm_file=sparc/netbsd.h
  1816.         # On NetBSD, the headers are already okay.
  1817.         fixincludes=Makefile.in
  1818.         xmake_file=x-netbsd
  1819.         ;;
  1820.     sparc-*-bsd*)
  1821.         tm_file=sparc/bsd.h
  1822.         ;;
  1823.     sparc-*-lynxos*)
  1824.         if [ x$gas = xyes ]
  1825.         then
  1826.             tm_file=sparc/lynx.h
  1827.         else
  1828.             tm_file=sparc/lynx-ng.h
  1829.         fi
  1830.         xm_file=xm-lynx.h
  1831.         xmake_file=x-lynx
  1832.         ;;
  1833.     sparc-*-solaris2* | sparc-*-sunos5*)
  1834.         xm_file=sparc/xm-sol2.h
  1835.         tm_file=sparc/sol2.h
  1836.         tmake_file=sparc/t-sol2
  1837.         xmake_file=sparc/x-sysv4
  1838.         extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
  1839.         fixincludes=fixinc.svr4
  1840.         broken_install=yes
  1841.         ;;
  1842.     sparc-*-sunos4.0*)
  1843.         tm_file=sparc/sparc.h
  1844.         tmake_file=sparc/t-sunos40
  1845.         use_collect2=yes
  1846.         ;;
  1847.     sparc-*-sunos4*)
  1848.         tm_file=sparc/sparc.h
  1849.         tmake_file=sparc/t-sunos41
  1850.         use_collect2=yes
  1851.         ;;
  1852.     sparc-*-sunos3*)
  1853.         tm_file=sparc/sun4o3.h
  1854.         use_collect2=yes
  1855.         ;;
  1856.     sparc-*-sysv4*)
  1857.         xm_file=sparc/xm-sysv4.h
  1858.         tm_file=sparc/sysv4.h
  1859.         tmake_file=t-svr4
  1860.         xmake_file=sparc/x-sysv4
  1861.         ;;
  1862.     sparclite-*-*)
  1863.         cpu_type=sparc
  1864.         tm_file=sparc/lite.h
  1865.         use_collect2=yes
  1866.         ;;
  1867.     sparc64-*-aout)
  1868.         cpu_type=sparc
  1869.         tmake_file=sparc/t-sp64
  1870.         tm_file=sparc/sp64-aout.h
  1871.         ;;
  1872.     sparc64-*-elf)
  1873.         cpu_type=sparc
  1874.         tmake_file=sparc/t-sp64
  1875.         tm_file=sparc/sp64-elf.h
  1876.         ;;
  1877. # This hasn't been upgraded to GCC 2.
  1878. #    tahoe-harris-*)            # Harris tahoe, using COFF.
  1879. #        tm_file=tahoe/harris.h
  1880. #        ;;
  1881. #    tahoe-*-bsd*)            # tahoe running BSD
  1882. #        ;;
  1883. # This hasn't been upgraded to GCC 2.
  1884. #    tron-*-*)
  1885. #        cpu_type=gmicro
  1886. #        use_collect2=yes
  1887. #        ;;
  1888.     vax-*-bsd*)            # vaxen running BSD
  1889.         use_collect2=yes
  1890.         ;;
  1891.     vax-*-sysv*)            # vaxen running system V
  1892.         xm_file=vax/xm-vaxv.h
  1893.         tm_file=vax/vaxv.h
  1894.         ;;
  1895.     vax-*-ultrix*)            # vaxen running ultrix
  1896.         tm_file=vax/ultrix.h
  1897.         use_collect2=yes
  1898.         ;;
  1899.     vax-*-vms*)            # vaxen running VMS
  1900.         xm_file=vax/xm-vms.h
  1901.         tm_file=vax/vms.h
  1902.         ;;
  1903.         pdp11-*-*)
  1904.         xm_file=pdp11/xm-pdp11.h
  1905.         tm_file=pdp11/pdp11.h
  1906.         ;;
  1907.     we32k-att-sysv*)
  1908.         cpu_type=we32k
  1909.         use_collect2=yes
  1910.         ;;
  1911.     *)
  1912.         echo "Configuration $machine not supported" 1>&2
  1913.         exit 1
  1914.         ;;
  1915.     esac
  1916.  
  1917.     case $machine in
  1918.     *-*-sysv4*)
  1919.         fixincludes=fixinc.svr4
  1920.         xmake_try_sysv=x-sysv
  1921.         broken_install=yes
  1922.         install_headers_dir=install-headers-cpio
  1923.         ;;
  1924.     *-*-sysv*)
  1925.         broken_install=yes
  1926.         install_headers_dir=install-headers-cpio
  1927.         ;;
  1928.     esac
  1929.  
  1930.     # Distinguish i386 from i486/i586.
  1931.     # ??? For the moment we treat i586 as an i486.
  1932.     # Also, do not run mips-tfile on MIPS if using gas.
  1933.     case $machine in
  1934.     i[45]86-*-*)
  1935.         target_cpu_default=2
  1936.         ;;
  1937.     mips-*-*)
  1938.         if [ x$gas = xyes ]
  1939.         then
  1940.             target_cpu_default=16
  1941.         fi
  1942.         ;;
  1943.     alpha-*-*)
  1944.         if [ x$gas = xyes ]
  1945.         then
  1946.             target_cpu_default=4
  1947.         fi
  1948.         ;;
  1949.     esac
  1950.  
  1951.     # No need for collect2 if we have the GNU linker.
  1952.     case x$gnu_ld in 
  1953.     xyes)
  1954.         use_collect2=
  1955.         ;;
  1956.     esac
  1957.  
  1958. # Default certain vars that apply to both host and target in turn.
  1959.     if [ x$cpu_type = x ]
  1960.     then cpu_type=`echo $machine | sed 's/-.*$//'`
  1961.     fi
  1962.  
  1963. # Save data on machine being used to compile GCC in build_xm_file.
  1964. # Save data on host machine in vars host_xm_file and host_xmake_file.
  1965.     if [ x$pass1done = x ]
  1966.     then
  1967.         if [ x$xm_file = x ]
  1968.         then build_xm_file=$cpu_type/xm-$cpu_type.h
  1969.         else build_xm_file=$xm_file
  1970.         fi
  1971.         pass1done=yes
  1972.     else
  1973.         if [ x$pass2done = x ]
  1974.         then
  1975.             if [ x$xm_file = x ]
  1976.             then host_xm_file=$cpu_type/xm-$cpu_type.h
  1977.             else host_xm_file=$xm_file
  1978.             fi
  1979.             if [ x$xmake_file = x ]
  1980.             then xmake_file=$cpu_type/x-$cpu_type
  1981.             fi
  1982.             host_xmake_file=$xmake_file
  1983.             host_broken_install=$broken_install
  1984.             host_install_headers_dir=$install_headers_dir
  1985.             host_truncate_target=$truncate_target
  1986.             pass2done=yes
  1987.         fi
  1988.     fi
  1989. done
  1990.  
  1991. # Default the target-machine variables that were not explicitly set.
  1992. if [ x$tm_file = x ]
  1993. then tm_file=$cpu_type/$cpu_type.h; fi
  1994.  
  1995. if [ x$header_files = x ]
  1996. then header_files=; fi
  1997.  
  1998. if [ x$xm_file = x ]
  1999. then xm_file=$cpu_type/xm-$cpu_type.h; fi
  2000.  
  2001. md_file=$cpu_type/$cpu_type.md
  2002.  
  2003. if [ x$out_file = x ]
  2004. then out_file=$cpu_type/$cpu_type.c; fi
  2005.  
  2006. if [ x$tmake_file = x ]
  2007. then tmake_file=$cpu_type/t-$cpu_type
  2008. fi
  2009.  
  2010. # Set up the list of links to be made.
  2011. # $links is the list of link names, and $files is the list of names to link to.
  2012. files="$host_xm_file $tm_file $out_file $xm_file $build_xm_file $md_file"
  2013. links="config.h tm.h aux-output.c tconfig.h hconfig.h"
  2014.  
  2015. if [ "x$md_cppflags" = x ]
  2016. then links="$links md"
  2017. else links="$links md.pre-cpp"
  2018. fi
  2019.  
  2020. rm -f config.bak
  2021. if [ -f config.status ]; then mv -f config.status config.bak; fi
  2022.  
  2023. # Make the links.
  2024. while [ -n "$files" ]
  2025. do
  2026.     # set file to car of files, files to cdr of files
  2027.     set $files; file=$1; shift; files=$*
  2028.     set $links; link=$1; shift; links=$*
  2029.  
  2030.     if [ ! -r ${srcdir}/config/$file ]
  2031.     then
  2032.         echo "$progname: cannot create a link \`$link'," 1>&2
  2033.         echo "since the file \`config/$file' does not exist" 1>&2
  2034.         exit 1
  2035.     fi
  2036.  
  2037.     $remove -f $link
  2038.     # Make a symlink if possible, otherwise try a hard link
  2039.     $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link
  2040.  
  2041.     if [ ! -r $link ]
  2042.     then
  2043.         echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2
  2044.         exit 1
  2045.     fi
  2046.     echo "Linked \`$link' to \`${srcdir}/config/$file'"
  2047. done
  2048.  
  2049. # Truncate the target if necessary
  2050. if [ x$host_truncate_target != x ]; then
  2051.     target=`echo $target | sed -e 's/\(..............\).*/\1/'`
  2052. fi
  2053.  
  2054. # Get the version number from the toplevel
  2055. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
  2056.  
  2057. # For the current directory and all of the language subdirectories,
  2058. # do the rest of the script ...
  2059.  
  2060. subdirs=
  2061. for lang in ${srcdir}/*/config-lang.in ..
  2062. do
  2063.     case $lang in
  2064.     ..) ;;
  2065.     # The odd quoting in the next line is an attempt to work around
  2066.     # an apparent bug in bash 1.12 on linux.  This is known to not
  2067.     # work for bash 1.12.4.  Try using ${srcdir}/[*]/config-lang.in
  2068.     # here if this doesn't work for you.
  2069.     ${srcdir}'/*/config-lang.in') ;;
  2070.     *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
  2071.     esac
  2072. done
  2073.  
  2074. savesrcdir=$srcdir
  2075. for subdir in . $subdirs
  2076. do
  2077.     oldsrcdir=$savesrcdir
  2078.  
  2079.     # Re-adjust the path
  2080.     case $oldsrcdir in
  2081.     /*)
  2082.         srcdir=$oldsrcdir/$subdir
  2083.         ;;
  2084.     *)
  2085.         case $subdir in
  2086.         .)
  2087.             ;;
  2088.         *)
  2089.             oldsrcdir=../${oldsrcdir}
  2090.             srcdir=$oldsrcdir/$subdir
  2091.             ;;
  2092.         esac
  2093.         ;;
  2094.     esac
  2095.     mainsrcdir=$oldsrcdir
  2096.     STARTDIR=`pwd`
  2097.     test -d $subdir || mkdir $subdir
  2098.     cd $subdir
  2099.  
  2100.     # Create Makefile.tem from Makefile.in.
  2101.     # Make it set VPATH if necessary so that the sources are found.
  2102.     # Also change its value of srcdir.
  2103.     # Also create a .gdbinit file which runs the one in srcdir
  2104.     # and tells GDB to look there for source files.
  2105.     case $srcdir in
  2106.     . | ./$subdir | .././$subdir)
  2107.         rm -f Makefile.tem
  2108.         cp Makefile.in Makefile.tem
  2109.         chmod +w Makefile.tem
  2110.         ;;
  2111.     *)
  2112.         rm -f Makefile.tem
  2113.         echo "VPATH = ${srcdir}" \
  2114.           | cat - ${srcdir}/Makefile.in \
  2115.           | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
  2116.         rm -f .gdbinit
  2117.         echo "dir ." > .gdbinit
  2118.         echo "dir ${srcdir}" >> .gdbinit
  2119.         if [ "x$subdirs" != x ]; then
  2120.             for s in $subdirs
  2121.             do
  2122.                 echo "dir ${srcdir}/$s" >> .gdbinit
  2123.             done
  2124.         fi
  2125.         echo "source ${srcdir}/.gdbinit" >> .gdbinit
  2126.         ;;
  2127.     esac
  2128.     
  2129.     # Conditionalize the makefile for this host machine.
  2130.     if [ -f ${mainsrcdir}/config/${host_xmake_file} ]
  2131.     then
  2132.         rm -f Makefile.xx
  2133.         sed -e "/####host/  r ${mainsrcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
  2134.         echo "Merged ${host_xmake_file}."
  2135.         rm -f Makefile.tem
  2136.         mv Makefile.xx Makefile.tem
  2137.         dep_host_xmake_file=${host_xmake_file}
  2138.     else
  2139.     # Say in the makefile that there is no host_xmake_file,
  2140.     # by using a name which (when interpreted relative to $srcdir/config)
  2141.     # will duplicate another dependency: $srcdir/Makefile.in.
  2142.         dep_host_xmake_file=../Makefile.in
  2143.     fi
  2144.  
  2145.     # Add a definition for INSTALL if system wants one.
  2146.     # This substitutes for lots of x-* files.
  2147.     if [ x$host_broken_install = x ]
  2148.     then true
  2149.     else
  2150.         rm -f Makefile.xx
  2151.          if [ x$host_broken_install = xyes ]
  2152.          then
  2153.              abssrcdir=`cd ${srcdir}; pwd`
  2154.              installer="${abssrcdir}/install.sh -c"
  2155.          else
  2156.              installer=$host_broken_install
  2157.          fi
  2158.          sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
  2159.         rm -f Makefile.tem
  2160.         mv Makefile.xx Makefile.tem
  2161.     fi
  2162.  
  2163.     # Some of the following don't make sense in the language makefiles,
  2164.     # but rather than introduce another level of nesting, we leave them
  2165.     # as is.
  2166.  
  2167.     # Set EXTRA_HEADERS according to header_files.
  2168.     # This substitutes for lots of t-* files.
  2169.     if [ "x$header_files" = x ]
  2170.     then true
  2171.     else
  2172.         # Prepend ${srcdir}/ginclude/ to every entry in header_files.
  2173.         list=
  2174.         for file in $header_files;
  2175.         do
  2176.             list="${list} ${srcdir}/ginclude/${file}"
  2177.         done
  2178.         rm -f Makefile.xx
  2179.         sed "s|^EXTRA_HEADERS =|EXTRA_HEADERS = ${list}|" Makefile.tem > Makefile.xx
  2180.         rm -f Makefile.tem
  2181.         mv Makefile.xx Makefile.tem
  2182.     fi
  2183.     
  2184.     # Set EXTRA_PASSES according to extra_passes.
  2185.     # This substitutes for lots of t-* files.
  2186.     if [ "x$extra_passes" = x ]
  2187.     then true
  2188.     else
  2189.         rm -f Makefile.xx
  2190.         sed "s/^EXTRA_PASSES =/EXTRA_PASSES = $extra_passes/" Makefile.tem > Makefile.xx
  2191.         rm -f Makefile.tem
  2192.         mv Makefile.xx Makefile.tem
  2193.     fi
  2194.     
  2195.     # Set EXTRA_PARTS according to extra_parts.
  2196.     # This substitutes for lots of t-* files.
  2197.     if [ "x$extra_parts" = x ]
  2198.     then true
  2199.     else
  2200.         rm -f Makefile.xx
  2201.         sed "s/^EXTRA_PARTS =/EXTRA_PARTS = $extra_parts/" Makefile.tem > Makefile.xx
  2202.         rm -f Makefile.tem
  2203.         mv Makefile.xx Makefile.tem
  2204.     fi
  2205.  
  2206.     # Set EXTRA_PROGRAMS according to extra_programs.
  2207.     if [ "x$extra_programs" = x ]
  2208.     then true
  2209.     else
  2210.         rm -f Makefile.xx
  2211.         sed "s/^EXTRA_PROGRAMS =/EXTRA_PROGRAMS = $extra_programs/" Makefile.tem > Makefile.xx
  2212.         rm -f Makefile.tem
  2213.         mv Makefile.xx Makefile.tem
  2214.     fi
  2215.  
  2216.     # Set EXTRA_OBJS according to extra_objs.
  2217.     # This substitutes for lots of t-* files.
  2218.     if [ "x$extra_objs" = x ]
  2219.     then true
  2220.     else
  2221.         rm -f Makefile.xx
  2222.         sed "s/^EXTRA_OBJS =/EXTRA_OBJS = $extra_objs/" Makefile.tem > Makefile.xx
  2223.         rm -f Makefile.tem
  2224.         mv Makefile.xx Makefile.tem
  2225.     fi
  2226.  
  2227.     # Add a definition of USE_COLLECT2 if system wants one.
  2228.     # Also tell toplev.c what to do.
  2229.     # This substitutes for lots of t-* files.
  2230.     if [ x$use_collect2 = x ]
  2231.     then true
  2232.     else
  2233.         rm -f Makefile.xx
  2234.         (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
  2235.             | cat - Makefile.tem > Makefile.xx
  2236.         rm -f Makefile.tem
  2237.         mv Makefile.xx Makefile.tem
  2238.     fi
  2239.     
  2240.     # Add -DTARGET_CPU_DEFAULT for toplev.c if system wants one.
  2241.     # This substitutes for lots of *.h files.
  2242.     if [ x$target_cpu_default = x ]
  2243.     then true
  2244.     else
  2245.         rm -f Makefile.xx
  2246.     # This used cat, but rfg@netcom.com said that ran into NFS bugs.
  2247.         sed -e "/^# Makefile for GNU C compiler./c\\
  2248. MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFAULT=$target_cpu_default\\
  2249. \# Makefile for GNU C compiler." Makefile.tem > Makefile.xx
  2250.         rm -f Makefile.tem
  2251.         mv Makefile.xx Makefile.tem
  2252.     fi
  2253.     
  2254.     # Set MD_DEPS if the real md file is in md.pre-cpp.
  2255.     # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
  2256.     # for line oriented comments, so we must always use a GNU cpp.  If
  2257.     # building gcc with a cross compiler, use the cross compiler just
  2258.     # built.  Otherwise, we can use the cpp just built.
  2259.     if [ "x$md_cppflags" = x ]
  2260.     then true
  2261.     else
  2262.         rm -f Makefile.xx
  2263.           (if [ x$host = x$build ] ; then
  2264.             echo "MD_DEPS = md.pre-cpp cpp" ; echo "MD_CPP = ./cpp"
  2265.         else
  2266.             echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E"
  2267.         fi
  2268.         echo "MD_CPPFLAGS = $md_cppflags") | \
  2269.           cat - Makefile.tem | sed -e "s|^MD_FILE[     ]*=.*|MD_FILE = md|" > Makefile.xx
  2270.         rm -f Makefile.tem
  2271.         mv Makefile.xx Makefile.tem
  2272.     fi
  2273.     
  2274.     # Conditionalize the makefile for this target machine.
  2275.     if [ -f ${mainsrcdir}/config/${tmake_file} ]
  2276.     then
  2277.         rm -f Makefile.xx
  2278.         sed -e "/####target/  r ${mainsrcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
  2279.         echo "Merged ${tmake_file}."
  2280.         rm -f Makefile.tem
  2281.         mv Makefile.xx Makefile.tem
  2282.         dep_tmake_file=${tmake_file}
  2283.     else
  2284.     # Say in the makefile that there is no tmake_file,
  2285.     # by using a name which (when interpreted relative to $srcdir/config)
  2286.     # will duplicate another dependency: $srcdir/Makefile.in.
  2287.         dep_tmake_file=../Makefile.in
  2288.     fi
  2289.     
  2290.     # If this is the top level Makefile, add the language fragments.
  2291.     # Languages are added via two mechanisms.  Some information must be
  2292.     # recorded in makefile variables, these are defined in config-lang.in.
  2293.     # We accumulate them and plug them into the main Makefile.
  2294.     # The other mechanism is a set of hooks for each of the main targets
  2295.     # like `clean', `install', etc.
  2296.     if [ $subdir = . ]
  2297.     then
  2298.         # These (without "all_") are set in each config-lang.in.
  2299.         # `language' must be a single word so is spelled singularly.
  2300.         all_languages=
  2301.         all_compilers=
  2302.         all_stagestuff=
  2303.         all_diff_excludes=
  2304.         # List of language makefile fragments.
  2305.         all_lang_makefiles=
  2306.  
  2307.         rm -f Makefile.xx Makefile.ll
  2308.         touch Makefile.ll
  2309.         for s in .. $subdirs
  2310.         do
  2311.             if [ $s != ".." ]
  2312.             then
  2313.                 language=
  2314.                 compilers=
  2315.                 stagestuff=
  2316.                 diff_excludes=
  2317.                 . ${mainsrcdir}/$s/config-lang.in
  2318.                 if [ "x$language" = x ]
  2319.                 then
  2320.                     echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
  2321.                     exit 1
  2322.                 fi
  2323.                 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
  2324.                 all_languages="$all_languages $language"
  2325.                 all_compilers="$all_compilers $compilers"
  2326.                 all_stagestuff="$all_stagestuff $stagestuff"
  2327.                 all_diff_excludes="$all_diff_excludes $diff_excludes"
  2328.  
  2329.                 cat ${mainsrcdir}/$s/Make-lang.in >> Makefile.ll
  2330.             fi
  2331.         done
  2332.         sed -e "/####language fragments/ r Makefile.ll" Makefile.tem > Makefile.xx
  2333.         rm -f Makefile.tem
  2334.         mv Makefile.xx Makefile.tem
  2335.         sed -e "s|^SUBDIRS[     ]*=.*$|SUBDIRS = $subdirs|" \
  2336.             -e "s|^LANGUAGES[     ]*=[     ]*\(.*\)$|LANGUAGES = \1 $all_languages|" \
  2337.             -e "s|^COMPILERS[     ]*=[     ]*\(.*\)$|COMPILERS = \1 $all_compilers|" \
  2338.             -e "s|^LANG_MAKEFILES[     ]*=.*$|LANG_MAKEFILES = $all_lang_makefiles|" \
  2339.             -e "s|^LANG_STAGESTUFF[     ]*=.*$|LANG_STAGESTUFF = $all_stagestuff|" \
  2340.             -e "s|^LANG_DIFF_EXCLUDES[     ]*=.*$|LANG_DIFF_EXCLUDES = $all_diff_excludes|" \
  2341.             Makefile.tem > Makefile.xx
  2342.         rm -f Makefile.tem
  2343.         mv Makefile.xx Makefile.tem
  2344.  
  2345.         # Since we can't use `::' targets, we link each language in
  2346.         # with a set of hooks, reached indirectly via lang.${target}.
  2347.  
  2348.         target_list="all.build all.cross start.encap rest.encap \
  2349.             info dvi \
  2350.             install-normal install-common install-info install-man \
  2351.             uninstall distdir \
  2352.             mostlyclean clean distclean extraclean realclean \
  2353.             stage1 stage2 stage3 stage4"
  2354.         rm -f Makefile.ll
  2355.         for t in $target_list
  2356.         do
  2357.             x=
  2358.             for l in .. $all_languages
  2359.             do
  2360.                 if [ $l != ".." ]; then
  2361.                     x="$x $l.$t"
  2362.                 fi
  2363.             done
  2364.             echo "lang.$t: $x" >> Makefile.ll
  2365.         done
  2366.         sed -e "/####language hooks/ r Makefile.ll" Makefile.tem > Makefile.xx
  2367.         rm -f Makefile.tem
  2368.         mv Makefile.xx Makefile.tem
  2369.         rm -f Makefile.ll
  2370.  
  2371.         # If the host doesn't support symlinks, modify CC in
  2372.         # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
  2373.         # Otherwise, we can use "CC=$(CC)".
  2374.         rm -f symtest.tem
  2375.         if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2376.         then
  2377.             sed -e 's,CC=set-by-configure,CC=\$(CC),' \
  2378.                 Makefile.tem > Makefile.xx
  2379.         else
  2380.             sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
  2381.                 Makefile.tem > Makefile.xx
  2382.         fi
  2383.         rm -f Makefile.tem
  2384.         mv Makefile.xx Makefile.tem
  2385.         rm -f symtest.tem
  2386.  
  2387.         if [ "x$all_languages" != x ]
  2388.         then
  2389.             # Missing space after `Merged' is intentional.
  2390.             echo "Merged$all_languages fragment(s)."
  2391.         fi
  2392.  
  2393.     # Otherwise, this is a language subdirectory.  If the host supports
  2394.     # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
  2395.     # installation procedure can still use CC="stage1/xgcc -Bstage1/".
  2396.     # If the host doesn't support symlinks, FLAGS_TO_PASS has been
  2397.     # modified to solve the problem there.
  2398.     else
  2399.         for t in stage1 stage2 stage3 stage4 include
  2400.         do
  2401.             rm -f $t
  2402.             $symbolic_link ../$t $t 2>/dev/null
  2403.         done
  2404.     fi
  2405.     
  2406.     # Remove all formfeeds, since some Makes get confused by them.
  2407.     # Also arrange to give the variables `target', `host_xmake_file',
  2408.     # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
  2409.     # and `INSTALL_HEADERS_DIR' values in the Makefile from the values
  2410.     # they have in this script.
  2411.     rm -f Makefile.xx
  2412.     sed -e "s/ //" -e "s/^target=.*$/target=${target}/" \
  2413.         -e "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" \
  2414.         -e "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" \
  2415.         -e "s|^version=.*$|version=${version}|" \
  2416.         -e "s|^prefix[     ]*=.*|prefix = $prefix|" \
  2417.         -e "s|^gxx_include_dir[     ]*=.*|gxx_include_dir = $gxx_include_dir|" \
  2418.         -e "s|^local_prefix[     ]*=.*|local_prefix = $local_prefix|" \
  2419.         -e "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" \
  2420.         -e "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" \
  2421.         -e "s|^INSTALL_HEADERS_DIR[     ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" \
  2422.         Makefile.tem > Makefile.xx
  2423.     rm -f Makefile.tem
  2424.     mv Makefile.xx Makefile.tem
  2425.     
  2426.     # Install Makefile for real, after making final changes.
  2427.     # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
  2428.     # Also use all.cross instead of all.internal, and add cross-make to Makefile.
  2429.     if [ x$canon_host = x$canon_target ]
  2430.     then
  2431.         rm -f Makefile
  2432.           if [ x$canon_host = x$canon_build ]
  2433.         then
  2434.             mv Makefile.tem Makefile
  2435.         else
  2436.     #        When building gcc with a cross-compiler, we need to fix a
  2437.     #        few things.
  2438.             echo "build= $build" > Makefile
  2439.                 sed -e "s|objc-runtime$||" \
  2440.                 -e "/####build/  r ${mainsrcdir}/build-make" Makefile.tem >> Makefile
  2441.             rm -f Makefile.tem Makefile.xx
  2442.         fi
  2443.     else
  2444.         rm -f Makefile
  2445.         echo "CROSS=-DCROSS_COMPILE" > Makefile
  2446.         sed -e "/####cross/  r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile
  2447.         rm -f Makefile.tem Makefile.xx
  2448.     fi
  2449.     
  2450.     echo "Created \`$subdir/Makefile'."
  2451.     
  2452.     if [ xx${vint} != xx ]
  2453.     then
  2454.         vintmsg=" (vint)"
  2455.     fi
  2456.     
  2457.     # If a subdirectory has a configure script, run it.
  2458.     if [ x$subdir != x. ]
  2459.     then
  2460.         if [ -f $srcdir/configure ]
  2461.         then
  2462.             ${CONFIG_SHELL-sh} $srcdir/configure $arguments --srcdir=$srcdir
  2463.         fi
  2464.     fi
  2465.  
  2466.     cd $STARTDIR
  2467. done   # end of current-dir SUBDIRS loop
  2468.     
  2469. srcdir=$savesrcdir
  2470.  
  2471. # Describe the chosen configuration in config.status.
  2472. # Make that file a shellscript which will reestablish the same configuration.
  2473. echo "#!/bin/sh
  2474. # GCC was configured as follows:
  2475. ${srcdir}/configure" $arguments > config.new
  2476. echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
  2477. chmod a+x config.new
  2478. if [ -f config.bak ] && cmp config.bak config.new >/dev/null 2>/dev/null;
  2479. then
  2480.     mv -f config.bak config.status
  2481.     rm -f config.new
  2482. else
  2483.     mv -f config.new config.status
  2484.     rm -f config.bak
  2485. fi
  2486.  
  2487. str2=
  2488. str3=
  2489. str4=.
  2490.  
  2491. if [ x$canon_host = x$canon_target ]
  2492. then
  2493.     str1="native "
  2494. else
  2495.     str1="cross-"
  2496.     str2=" from $canon_host"
  2497. fi
  2498.  
  2499. if [ x$canon_host != x$canon_build ]
  2500. then
  2501.     str3=" on a $canon_build system"
  2502. fi
  2503.  
  2504. if [ "x$str2" != x ] || [ "x$str3" != x ]
  2505. then
  2506.     str4=
  2507. fi
  2508.  
  2509. echo "Links are now set up to build a ${str1}compiler for ${canon_target}$str4" 1>&2
  2510.  
  2511. if [ "x$str2" != x ] || [ "x$str3" != x ]
  2512. then
  2513.     echo " ${str2}${str3}." 1>&2
  2514. fi
  2515.  
  2516. exit 0
  2517.