home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gnat-2.06-src.tgz / tar.out / fsf / gnat / configure < prev    next >
Text File  |  1996-09-28  |  60KB  |  2,507 lines

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