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