home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gcc-2.4.5 / configure < prev    next >
Encoding:
Text File  |  1993-06-18  |  36.3 KB  |  1,622 lines

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