home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / gcc-2.6.0-src.lha / GNU / src / amiga / gcc-2.6.0 / configure < prev    next >
Encoding:
Text File  |  1994-07-29  |  54.9 KB  |  2,349 lines

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