home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / d / gcc / gcc-2.7 / gcc-2 / gcc-2.7.0 / configure < prev    next >
Encoding:
Text File  |  1995-06-15  |  71.5 KB  |  3,011 lines

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