home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / gcc-2.5.8-src.lha / src / amiga / gcc-2.5.8 / configure < prev    next >
Encoding:
Text File  |  1994-02-22  |  44.7 KB  |  1,946 lines

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