Import final gcc2 snapshot (990109)
[official-gcc.git] / gcc / configure.in
bloba6d751be87b0115fac6cc002fa93ac1f8fdd8736
1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
11 #any later version.
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING.  If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
24 AC_INIT(tree.c)
25 AC_CONFIG_HEADER(auto-config.h:config.in)
27 native_prefix=/usr
28 remove=rm
29 hard_link=ln
30 symbolic_link='ln -s'
31 copy=cp
33 # Check for additional parameters
35 # With GNU ld
36 AC_ARG_WITH(gnu-ld,
37 [  --with-gnu-ld           arrange to work with GNU ld.],
38 gnu_ld=yes,
39 gnu_ld=no)
41 # With GNU as
42 AC_ARG_WITH(gnu-as,
43 [  --with-gnu-as           arrange to work with GNU as.],
44 gas=yes,
45 gas=no)
47 # With stabs
48 AC_ARG_WITH(stabs,
49 [  --with-stabs            arrange to use stabs instead of host debug format.],
50 stabs=yes,
51 stabs=no)
53 # With ELF
54 AC_ARG_WITH(elf,
55 [  --with-elf              arrange to use ELF instead of host debug format.],
56 elf=yes,
57 elf=no)
59 # Specify the local prefix
60 AC_ARG_WITH(local-prefix,
61 [  --with-local-prefix=DIR specifies directory to put local include.],
62 local_prefix=$with_local_prefix,
63 local_prefix=/usr/local)
65 # Default local prefix if it is empty
66 if [[ x$local_prefix = x ]]; then
67         local_prefix=/usr/local
70 # Specify the g++ header file directory
71 AC_ARG_WITH(gxx-include-dir,
72 [  --with-gxx-include-dir=DIR
73                           specifies directory to put g++ header files.],
74 gxx_include_dir=$with_gxx_include_dir,
75 gxx_include_dir='${prefix}/include/g++')
77 # Default g++ header file directory if it is empty
78 if [[ x$gxx_include_dir = x ]]; then
79         gxx_include_dir='${prefix}/include/g++'
82 # Enable expensive internal checks
83 AC_ARG_ENABLE(checking,
84 [  --enable-checking       enable expensive run-time checks.],
85 AC_DEFINE(ENABLE_CHECKING)
88 # Enable use of cpplib for C.
89 AC_ARG_ENABLE(c-cpplib,
90 [  --enable-c-cpplib       Use cpplib for C.],
91 if [[[ x$enable_c_cpplib != xno ]]]; then
92   extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
93   extra_c_flags=-DUSE_CPPLIB=1
94 fi)
96 # Enable Multibyte Characters for C/C++
97 AC_ARG_ENABLE(c-mbchar,
98 [  --enable-c-mbchar       Enable multibyte characters for C and C++.],
99 if [[[ x$enable_c_mbchar != xno ]]]; then
100   extra_c_flags=-DMULTIBYTE_CHARS=1
102   
103 # Enable threads
104 # Pass with no value to take the default
105 # Pass with a value to specify a thread package
106 AC_ARG_ENABLE(threads,
107 [  --enable-threads        enable thread usage for target GCC.
108   --enable-threads=LIB    use LIB thread package for target GCC.],
109 if [[[ x$enable_threads = xno ]]]; then
110         enable_threads=''
112 enable_threads='')
114 # Check if a valid thread package
115 case x${enable_threads} in
116         x | xno)
117                 # No threads
118                 thread_file='single'
119                 ;;
120         xyes)
121                 # default
122                 thread_file=''
123                 ;;
124         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
125         xsolaris | xwin32)
126                 thread_file=$enable_threads
127                 ;;
128         *)
129                 echo "$enable_threads is an unknown thread package" 1>&2
130                 exit 1
131                 ;;
132 esac
134 # Determine the host, build, and target systems
135 AC_CANONICAL_SYSTEM
137 # Find the native compiler
138 AC_PROG_CC
139 AC_PROG_MAKE_SET
141 # Find some useful tools
142 AC_PROG_AWK
143 AC_PROG_LEX
144 GCC_C_VOLATILE
145 AC_PROG_RANLIB
146 AC_PROG_YACC
147 AC_PROG_INSTALL
149 AC_HEADER_STDC
150 AC_HEADER_TIME
151 GCC_HEADER_STRING
152 GCC_HEADER_INTTYPES
153 AC_HEADER_SYS_WAIT
154 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
155                  fcntl.h unistd.h stab.h sys/file.h sys/time.h malloc.h \
156                  sys/resource.h sys/param.h sys/times.h sys/types.h sys/stat.h)
158 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp index \
159                rindex kill getrlimit setrlimit atoll atoq sysconf isascii \
160                gettimeofday strsignal)
163 GCC_FUNC_VFPRINTF_DOPRNT
164 GCC_FUNC_PRINTF_PTR
165 AC_FUNC_VFORK
167 GCC_NEED_DECLARATIONS(bcopy bzero bcmp index rindex getenv atol sbrk abort \
168                       strerror getcwd getwd strsignal)
170 GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
171 #include <sys/types.h>
172 #ifdef HAVE_SYS_RESOURCE_H
173 #include <sys/resource.h>
174 #endif
177 GCC_NEED_DECLARATIONS(malloc realloc calloc free, [
178 #ifdef HAVE_MALLOC_H
179 #include <malloc.h>
180 #endif
183 GCC_CHECK_STRINGIFY
184 AC_DECL_SYS_SIGLIST
186 # File extensions
187 manext='.1'
188 objext='.o'
189 AC_SUBST(manext)
190 AC_SUBST(objext)
192 build_xm_file=
193 build_xm_defines=
194 build_broken_install=
195 build_install_headers_dir=install-headers-tar
196 build_exeext=
197 host_xm_file=
198 host_xm_defines=
199 host_xmake_file=
200 host_truncate_target=
202 # Decode the host machine, then the target machine.
203 # For the host machine, we save the xm_file variable as host_xm_file;
204 # then we decode the target machine and forget everything else
205 # that came from the host machine.
206 for machine in $build $host $target; do
208         out_file=
209         xmake_file=
210         tmake_file=
211         extra_headers=
212         extra_passes=
213         extra_parts=
214         extra_programs=
215         extra_objs=
216         extra_host_objs=
217         extra_gcc_objs=
218         xm_defines=
219         float_format=
220         # Set this to force installation and use of collect2.
221         use_collect2=
222         # Set this to override the default target model.
223         target_cpu_default=
224         # Set this to force use of install.sh.
225         broken_install=
226         # Set this to control which fixincludes program to use.
227         fixincludes=fixincludes
228         # Set this to control how the header file directory is installed.
229         install_headers_dir=install-headers-tar
230         # Set this to a non-empty list of args to pass to cpp if the target
231         # wants its .md file passed through cpp.
232         md_cppflags=
233         # Set this if directory names should be truncated to 14 characters.
234         truncate_target=
235         # Set this if gdb needs a dir command with `dirname $out_file`
236         gdb_needs_out_file_path=
237         # Set this if the build machine requires executables to have a
238         # file name suffix.
239         exeext=
241         # Set default cpu_type, tm_file and xm_file so it can be updated in
242         # each machine entry.
243         cpu_type=`echo $machine | sed 's/-.*$//'`
244         case $machine in
245         alpha*-*-*)
246                 cpu_type=alpha
247                 ;;
248         arm*-*-*)
249                 cpu_type=arm
250                 ;;
251         c*-convex-*)
252                 cpu_type=convex
253                 ;;
254         i[[34567]]86-*-*)
255                 cpu_type=i386
256                 ;;
257         hppa*-*-*)
258                 cpu_type=pa
259                 ;;
260         m68000-*-*)
261                 cpu_type=m68k
262                 ;;
263         mips*-*-*)
264                 cpu_type=mips
265                 ;;
266         powerpc*-*-*)
267                 cpu_type=rs6000
268                 ;;
269         pyramid-*-*)
270                 cpu_type=pyr
271                 ;;
272         sparc*-*-*)
273                 cpu_type=sparc
274                 ;;
275         esac
277         tm_file=${cpu_type}/${cpu_type}.h
278         xm_file=${cpu_type}/xm-${cpu_type}.h
279         
280         # Set the default macros to define for GNU/Linux systems.
281         case $machine in
282         *-*-linux-gnu*)
283                 xm_defines="HAVE_ATEXIT POSIX NO_STAB_H BSTRING"
284                 ;;
285         esac
287         case $machine in
288         # Support site-specific machine types.
289         *local*)
290                 cpu_type=`echo $machine | sed -e 's/-.*//'`
291                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
292                 xm_file=${cpu_type}/xm-$rest.h
293                 tm_file=${cpu_type}/$rest.h
294                 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
295                 then xmake_file=${cpu_type}/x-$rest; \
296                 else true; \
297                 fi
298                 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
299                 then tmake_file=${cpu_type}/t-$rest; \
300                 else true; \
301                 fi
302                 ;;
303         1750a-*-*)
304                 ;;
305         a29k-*-bsd* | a29k-*-sym1*)
306                 tm_file="${tm_file} a29k/unix.h"
307                 xm_defines=USG
308                 xmake_file=a29k/x-unix
309                 use_collect2=yes
310                 ;;
311         a29k-*-udi | a29k-*-coff)
312                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
313                 tmake_file=a29k/t-a29kbare
314                 ;;
315         a29k-*-vxworks*)
316                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
317                 tmake_file=a29k/t-vx29k
318                 extra_parts="crtbegin.o crtend.o"
319                 ;;
320         a29k-*-*)                       # Default a29k environment.
321                 use_collect2=yes
322                 ;;
323         alpha*-*-linux-gnuecoff*)
324                 tm_file="${tm_file} alpha/linux.h"
325                 xm_defines=USE_BFD
326                 target_cpu_default="MASK_GAS"
327                 gas=no
328                 xmake_file=none
329                 fixincludes=Makefile.in
330                 gas=yes gnu_ld=yes
331                 ;;
332         alpha*-*-linux-gnulibc1*)
333                 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
334                 xm_defines=USE_BFD
335                 target_cpu_default="MASK_GAS"
336                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
337                 extra_parts="crtbegin.o crtend.o"
338                 xmake_file=none
339                 fixincludes=Makefile.in
340                 gas=yes gnu_ld=yes
341                 if [[ x$enable_threads = xyes ]]; then
342                         thread_file='posix'
343                 fi
344                 ;;
345         alpha*-*-linux-gnu*)
346                 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
347                 xm_defines=USE_BFD
348                 target_cpu_default="MASK_GAS"
349                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
350                 extra_parts="crtbegin.o crtend.o"
351                 xmake_file=none
352                 fixincludes=Makefile.in
353                 gas=yes gnu_ld=yes
354                 if [[ x$enable_threads = xyes ]]; then
355                         thread_file='posix'
356                 fi
357                 ;;
358         alpha*-dec-osf*)
359                 if [[ x$stabs = xyes ]]
360                 then
361                         tm_file="${tm_file} dbx.h"
362                 fi
363                 if [[ x$gas != xyes ]]
364                 then
365                         extra_passes="mips-tfile mips-tdump"
366                 fi
367                 broken_install=yes
368                 use_collect2=yes
369                 case $machine in
370                   *-*-osf1.2)
371                     tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
372                     ;;
373                   *-*-osf[[23]]*)
374                     tm_file="${tm_file} alpha/osf2or3.h"
375                     ;;
376                   *-*-osf4*)
377                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
378                     # a broken tar, so we use cpio instead.
379                     install_headers_dir=install-headers-cpio
380                     ;;
381                 esac
382                 case $machine in
383                   *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
384                     target_cpu_default=MASK_SUPPORT_ARCH
385                     ;;
386                 esac
387                 ;;
388         alpha*-*-vxworks*)
389                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
390                 # If we're on an Alpha, we assume we use the system assembler,
391                 # so check it to see if we should put in .arch lines.
392                 case $host in
393                   *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
394                     target_cpu_default=MASK_SUPPORT_ARCH
395                     ;;
396                 esac
397                 if [ x$gas != xyes ]
398                 then
399                         extra_passes="mips-tfile mips-tdump"
400                 fi
401                 broken_install=yes
402                 use_collect2=yes
403                 ;;
404         alpha*-*-winnt3*)
405                 tm_file="${tm_file} alpha/win-nt.h"
406                 target_cpu_default=MASK_WINDOWS_NT
407                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
408                 tmake_file=t-libc-ok
409                 xmake_file=winnt/x-winnt
410                 extra_host_objs=oldnames.o
411                 extra_gcc_objs="spawnv.o oldnames.o"
412                 fixincludes=fixinc.winnt
413                 if [[ x$gnu_ld != xyes ]]
414                 then
415                         extra_programs=ld.exe
416                 fi
417                 if [[ x$enable_threads = xyes ]]; then
418                         thread_file='win32'
419                 fi
420                 ;;
421         alpha*-dec-vms*)
422                 tm_file=alpha/vms.h
423                 xm_file="${xm_file} alpha/xm-vms.h"
424                 tmake_file=alpha/t-vms
425                 fixincludes=Makefile.in
426                 ;;
427         arc-*-elf*)
428                 extra_parts="crtinit.o crtfini.o"
429                 ;;
430         arm-*-coff* | armel-*-coff*)
431                 tm_file=arm/coff.h
432                 tmake_file=arm/t-bare
433                 ;;
434         arm-*-riscix1.[[01]]*)          # Acorn RISC machine (early versions)
435                 tm_file=arm/riscix1-1.h
436                 use_collect2=yes
437                 ;;
438         arm-*-riscix*)                  # Acorn RISC machine
439                 if [[ x$gas = xyes ]]
440                 then
441                     tm_file=arm/rix-gas.h
442                 else
443                     tm_file=arm/riscix.h
444                 fi
445                 xmake_file=arm/x-riscix
446                 tmake_file=arm/t-riscix
447                 use_collect2=yes
448                 ;;
449         arm-semi-aout | armel-semi-aout)
450                 tm_file=arm/semi.h
451                 tmake_file=arm/t-semi
452                 fixincludes=Makefile.in # There is nothing to fix
453                 ;;
454         arm-semi-aof | armel-semi-aof)
455                 tm_file=arm/semiaof.h
456                 tmake_file=arm/t-semiaof
457                 fixincludes=Makefile.in # There is nothing to fix
458                 ;;
459         arm-*-netbsd*)
460                 tm_file=arm/netbsd.h
461                 xm_file="xm-siglist.h ${xm_file}"
462                 tmake_file="t-netbsd arm/t-netbsd"
463                 # On NetBSD, the headers are already okay, except for math.h.
464                 fixincludes=fixinc.wrap
465                 ;;
466         arm-*-linux-gnuaout*)           # ARM GNU/Linux
467                 cpu_type=arm
468                 xmake_file=x-linux
469                 tm_file=arm/linux-gas.h
470                 tmake_file=arm/t-linux
471                 fixincludes=Makefile.in
472                 broken_install=yes
473                 gnu_ld=yes
474                 ;;
475         arm-*-aout)
476                 tm_file=arm/aout.h
477                 tmake_file=arm/t-bare
478                 ;;
479         c1-convex-*)                    # Convex C1
480                 target_cpu_default=1
481                 use_collect2=yes
482                 fixincludes=Makefile.in
483                 ;;
484         c2-convex-*)                    # Convex C2
485                 target_cpu_default=2
486                 use_collect2=yes
487                 fixincludes=Makefile.in
488                 ;;
489         c32-convex-*)
490                 target_cpu_default=4
491                 use_collect2=yes
492                 fixincludes=Makefile.in
493                 ;;
494         c34-convex-*)
495                 target_cpu_default=8
496                 use_collect2=yes
497                 fixincludes=Makefile.in
498                 ;;
499         c38-convex-*)
500                 target_cpu_default=16           
501                 use_collect2=yes
502                 fixincludes=Makefile.in
503                 ;;
504         clipper-intergraph-clix*)
505                 tm_file="${tm_file} svr3.h clipper/clix.h"
506                 xm_file=clipper/xm-clix.h
507                 xmake_file=clipper/x-clix
508                 extra_headers=va-clipper.h
509                 extra_parts="crtbegin.o crtend.o"
510                 install_headers_dir=install-headers-cpio
511                 broken_install=yes
512                 ;;
513         dsp16xx-*)
514                 ;;
515         elxsi-elxsi-*)
516                 use_collect2=yes
517                 ;;
518 # This hasn't been upgraded to GCC 2.
519 #       fx80-alliant-*)                 # Alliant FX/80
520 #               ;;
521         h8300-*-*)
522                 float_format=i32
523                 ;;
524         hppa1.1-*-pro*)
525                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
526                 xm_file=pa/xm-papro.h
527                 tmake_file=pa/t-pro
528                 ;;
529         hppa1.1-*-osf*)
530                 target_cpu_default=1
531                 tm_file="${tm_file} pa/pa-osf.h"
532                 use_collect2=yes
533                 fixincludes=Makefile.in
534                 ;;
535         hppa1.1-*-rtems*)
536                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
537                 xm_file=pa/xm-papro.h
538                 tmake_file=pa/t-pro
539                 ;;
540         hppa1.0-*-osf*)
541                 tm_file="${tm_file} pa/pa-osf.h"
542                 use_collect2=yes
543                 fixincludes=Makefile.in
544                 ;;
545         hppa1.1-*-bsd*)
546                 target_cpu_default=1
547                 use_collect2=yes
548                 fixincludes=Makefile.in
549                 ;;
550         hppa1.0-*-bsd*)
551                 use_collect2=yes
552                 fixincludes=Makefile.in
553                 ;;
554         hppa1.0-*-hpux7*)
555                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
556                 xm_file=pa/xm-pahpux.h
557                 xmake_file=pa/x-pa-hpux
558                 if [[ x$gas = xyes ]]
559                 then
560                         tm_file="${tm_file} pa/gas.h"
561                 fi
562                 broken_install=yes
563                 install_headers_dir=install-headers-cpio
564                 use_collect2=yes
565                 ;;
566         hppa1.0-*-hpux8.0[[0-2]]*)
567                 tm_file="${tm_file} pa/pa-hpux.h"
568                 xm_file=pa/xm-pahpux.h
569                 xmake_file=pa/x-pa-hpux
570                 if [[ x$gas = xyes ]]
571                 then
572                         tm_file="${tm_file} pa/pa-gas.h"
573                 else
574                         tm_file="pa/pa-oldas.h ${tm_file}"
575                 fi
576                 broken_install=yes
577                 install_headers_dir=install-headers-cpio
578                 use_collect2=yes
579                 ;;
580         hppa1.1-*-hpux8.0[[0-2]]*)
581                 target_cpu_default=1
582                 tm_file="${tm_file} pa/pa-hpux.h"
583                 xm_file=pa/xm-pahpux.h
584                 xmake_file=pa/x-pa-hpux
585                 if [[ x$gas = xyes ]]
586                 then
587                         tm_file="${tm_file} pa/pa-gas.h"
588                 else
589                         tm_file="pa/pa-oldas.h ${tm_file}"
590                 fi
591                 broken_install=yes
592                 install_headers_dir=install-headers-cpio
593                 use_collect2=yes
594                 ;;
595         hppa1.1-*-hpux8*)
596                 target_cpu_default=1
597                 tm_file="${tm_file} pa/pa-hpux.h"
598                 xm_file=pa/xm-pahpux.h
599                 xmake_file=pa/x-pa-hpux
600                 if [[ x$gas = xyes ]]
601                 then
602                         tm_file="${tm_file} pa/pa-gas.h"
603                 fi
604                 broken_install=yes
605                 install_headers_dir=install-headers-cpio
606                 use_collect2=yes
607                 ;;
608         hppa1.0-*-hpux8*)
609                 tm_file="${tm_file} pa/pa-hpux.h"
610                 xm_file=pa/xm-pahpux.h
611                 xmake_file=pa/x-pa-hpux
612                 if [[ x$gas = xyes ]]
613                 then
614                         tm_file="${tm_file} pa/pa-gas.h"
615                 fi
616                 broken_install=yes
617                 install_headers_dir=install-headers-cpio
618                 use_collect2=yes
619                 ;;
620         hppa1.1-*-hpux10*)
621                 target_cpu_default=1
622                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
623                 xm_file=pa/xm-pahpux.h
624                 xmake_file=pa/x-pa-hpux
625                 if [[ x$gas = xyes ]]
626                 then
627                         tm_file="${tm_file} pa/pa-gas.h"
628                 fi
629                 broken_install=yes
630                 install_headers_dir=install-headers-cpio
631                 use_collect2=yes
632                 ;;
633         hppa1.0-*-hpux10*)
634                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
635                 xm_file=pa/xm-pahpux.h
636                 xmake_file=pa/x-pa-hpux
637                 if [[ x$gas = xyes ]]
638                 then
639                         tm_file="${tm_file} pa/pa-gas.h"
640                 fi
641                 broken_install=yes
642                 install_headers_dir=install-headers-cpio
643                 use_collect2=yes
644                 ;;
645         hppa1.1-*-hpux*)
646                 target_cpu_default=1
647                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
648                 xm_file=pa/xm-pahpux.h
649                 xmake_file=pa/x-pa-hpux
650                 if [[ x$gas = xyes ]]
651                 then
652                         tm_file="${tm_file} pa/pa-gas.h"
653                 fi
654                 broken_install=yes
655                 install_headers_dir=install-headers-cpio
656                 use_collect2=yes
657                 ;;
658         hppa1.0-*-hpux*)
659                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
660                 xm_file=pa/xm-pahpux.h
661                 xmake_file=pa/x-pa-hpux
662                 if [[ x$gas = xyes ]]
663                 then
664                         tm_file="${tm_file} pa/pa-gas.h"
665                 fi
666                 broken_install=yes
667                 install_headers_dir=install-headers-cpio
668                 use_collect2=yes
669                 ;;
670         hppa1.1-*-hiux*)
671                 target_cpu_default=1
672                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
673                 xm_file=pa/xm-pahpux.h
674                 xmake_file=pa/x-pa-hpux
675                 if [[ x$gas = xyes ]]
676                 then
677                         tm_file="${tm_file} pa/pa-gas.h"
678                 fi
679                 broken_install=yes
680                 install_headers_dir=install-headers-cpio
681                 use_collect2=yes
682                 ;;
683         hppa1.0-*-hiux*)
684                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
685                 xm_file=pa/xm-pahpux.h
686                 xmake_file=pa/x-pa-hpux
687                 if [[ x$gas = xyes ]]
688                 then
689                         tm_file="${tm_file} pa/pa-gas.h"
690                 fi
691                 broken_install=yes
692                 install_headers_dir=install-headers-cpio
693                 use_collect2=yes
694                 ;;
695         hppa*-*-lites*)
696                 target_cpu_default=1
697                 use_collect2=yes
698                 fixincludes=Makefile.in
699                 ;;
700         i370-*-mvs*)
701                 ;;
702         i[[34567]]86-ibm-aix*)          # IBM PS/2 running AIX
703                 if [[ x$gas = xyes ]]
704                 then
705                         tm_file=i386/aix386.h
706                         extra_parts="crtbegin.o crtend.o"
707                         tmake_file=i386/t-crtstuff
708                 else
709                         tm_file=i386/aix386ng.h
710                         use_collect2=yes
711                 fi
712                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
713                 xm_defines=USG
714                 xmake_file=i386/x-aix
715                 broken_install=yes
716                 ;;
717         i486-ncr-sysv4*)                # NCR 3000 - i486 running system V.4
718                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
719                 xm_defines="USG POSIX SMALL_ARG_MAX"
720                 xmake_file=i386/x-ncr3000
721                 if [[ x$stabs = xyes -a x$gas = xyes ]]
722                 then
723                         tm_file=i386/sysv4gdb.h
724                 else
725                         tm_file=i386/sysv4.h
726                 fi
727                 extra_parts="crtbegin.o crtend.o"
728                 tmake_file=i386/t-crtpic
729                 ;;
730         i[[34567]]86-next-*)
731                 tm_file=i386/next.h
732                 xm_file=i386/xm-next.h
733                 tmake_file=i386/t-next
734                 xmake_file=i386/x-next
735                 extra_objs=nextstep.o
736                 if [[ x$enable_threads = xyes ]]; then
737                         thread_file='mach'
738                 fi
739                 ;;
740         i[[34567]]86-sequent-bsd*)              # 80386 from Sequent
741                 use_collect2=yes
742                 if [[ x$gas = xyes ]]
743                 then
744                         tm_file=i386/seq-gas.h
745                 else
746                         tm_file=i386/sequent.h
747                 fi
748                 ;;
749         i[[34567]]86-sequent-ptx1*)
750                 xm_defines="USG SVR3"
751                 xmake_file=i386/x-sysv3
752                 tm_file=i386/seq-sysv3.h
753                 tmake_file=i386/t-crtstuff
754                 fixincludes=fixinc.ptx
755                 extra_parts="crtbegin.o crtend.o"
756                 install_headers_dir=install-headers-cpio
757                 broken_install=yes
758                 ;;
759         i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
760                 xm_defines="USG SVR3"
761                 xmake_file=i386/x-sysv3
762                 tm_file=i386/seq2-sysv3.h
763                 tmake_file=i386/t-crtstuff
764                 extra_parts="crtbegin.o crtend.o"
765                 fixincludes=fixinc.ptx
766                 install_headers_dir=install-headers-cpio
767                 broken_install=yes
768                 ;;
769         i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
770                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
771                 xm_defines="USG POSIX SMALL_ARG_MAX"
772                 xmake_file=x-svr4
773                 tm_file=i386/ptx4-i.h
774                 tmake_file=t-svr4
775                 extra_parts="crtbegin.o crtend.o"
776                 fixincludes=fixinc.ptx
777                 install_headers_dir=install-headers-cpio
778                 broken_install=yes
779                 ;;
780         i386-sun-sunos*)                # Sun i386 roadrunner
781                 xm_defines=USG
782                 tm_file=i386/sun.h
783                 use_collect2=yes
784                 ;;
785         i[[34567]]86-*-aout*)
786                 tm_file=i386/i386-aout.h
787                 tmake_file=i386/t-i386bare
788                 ;;
789         i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
790                 tm_file=i386/bsd386.h
791 #               tmake_file=t-libc-ok
792                 ;;
793         i[[34567]]86-*-bsd*)
794                 tm_file=i386/386bsd.h
795 #               tmake_file=t-libc-ok
796 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
797 #               use_collect2=yes
798                 ;;
799         i[[34567]]86-*-freebsdelf*)
800                 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
801                 # On FreeBSD, the headers are already ok, except for math.h.
802                 fixincludes=fixinc.wrap
803                 tmake_file=i386/t-freebsd
804                 gas=yes
805                 gnu_ld=yes
806                 stabs=yes
807                 ;;
808         i[[34567]]86-*-freebsd*)
809                 tm_file=i386/freebsd.h
810                 # On FreeBSD, the headers are already ok, except for math.h.
811                 fixincludes=fixinc.wrap
812                 tmake_file=i386/t-freebsd
813                 ;;
814         i[[34567]]86-*-netbsd*)
815                 tm_file=i386/netbsd.h
816                 # On NetBSD, the headers are already okay, except for math.h.
817                 fixincludes=fixinc.wrap
818                 tmake_file=t-netbsd
819                 ;;
820         i[[34567]]86-*-coff*)
821                 tm_file=i386/i386-coff.h
822                 tmake_file=i386/t-i386bare
823                 ;;
824         i[[34567]]86-*-isc*)            # 80386 running ISC system
825                 xm_file="${xm_file} i386/xm-isc.h"
826                 xm_defines="USG SVR3"
827                 case $machine in
828                   i[[34567]]86-*-isc[[34]]*)
829                     xmake_file=i386/x-isc3
830                     ;;
831                   *)
832                     xmake_file=i386/x-isc
833                     ;;
834                 esac
835                 if [[ x$gas = xyes -a x$stabs = xyes ]]
836                 then
837                         tm_file=i386/iscdbx.h
838                         tmake_file=i386/t-svr3dbx
839                         extra_parts="svr3.ifile svr3z.ifile"
840                 else
841                         tm_file=i386/isccoff.h
842                         tmake_file=i386/t-crtstuff
843                         extra_parts="crtbegin.o crtend.o"
844                 fi
845                 install_headers_dir=install-headers-cpio
846                 broken_install=yes
847                 ;;
848         i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
849                                         # with a.out format using
850                                         # pre BFD linkers
851                 xmake_file=x-linux-aout
852                 tmake_file="t-linux-aout i386/t-crtstuff"
853                 tm_file=i386/linux-oldld.h
854                 fixincludes=Makefile.in
855                 broken_install=yes
856                 gnu_ld=yes
857                 ;;
858         i[[34567]]86-*-linux-gnuaout*)  # Intel 80386's running GNU/Linux
859                                         # with a.out format
860                 xmake_file=x-linux-aout
861                 tmake_file="t-linux-aout i386/t-crtstuff"
862                 tm_file=i386/linux-aout.h
863                 fixincludes=Makefile.in #The headers are ok already.
864                 broken_install=yes
865                 gnu_ld=yes
866                 ;;
867         i[[34567]]86-*-linux-gnulibc1)  # Intel 80386's running GNU/Linux
868                                         # with ELF format using the
869                                         # GNU/Linux C library 5
870                 xmake_file=x-linux      
871                 tm_file=i386/linux.h    
872                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
873                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
874                 fixincludes=Makefile.in # The headers are ok already.
875                 broken_install=yes
876                 gnu_ld=yes
877                 if [[ x$enable_threads = xyes ]]; then
878                         thread_file='single'
879                 fi
880                 ;;
881         i[[34567]]86-*-linux-gnu*)      # Intel 80386's running GNU/Linux
882                                         # with ELF format using glibc 2
883                                         # aka GNU/Linux C library 6
884                 xmake_file=x-linux
885                 tm_file=i386/linux.h
886                 tmake_file="t-linux i386/t-crtstuff"
887                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
888                 fixincludes=Makefile.in # The headers are ok already.
889                 broken_install=yes
890                 gnu_ld=yes
891                 if [[ x$enable_threads = xyes ]]; then
892                         thread_file='posix'
893                 fi
894                 ;;
895         i[[34567]]86-*-gnu*)
896                 ;;
897         i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
898                 xm_file=i386/xm-go32.h
899                 tm_file=i386/go32.h
900                 tmake_file=i386/t-go32
901                 ;;
902         i[[34567]]86-pc-msdosdjgpp*)
903                 xm_file=i386/xm-go32.h
904                 tm_file=i386/go32.h
905                 tmake_file=i386/t-go32
906                 gnu_ld=yes
907                 gas=yes
908                 ;;
909         i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
910                 tm_file=i386/moss.h
911                 tmake_file=t-libc-ok
912                 fixincludes=Makefile.in
913                 gnu_ld=yes
914                 gas=yes
915                 ;;
916         i[[34567]]86-*-lynxos*)
917                 if [[ x$gas = xyes ]]
918                 then
919                         tm_file=i386/lynx.h
920                 else
921                         tm_file=i386/lynx-ng.h
922                 fi
923                 xm_file=i386/xm-lynx.h
924                 tmake_file=i386/t-i386bare
925                 xmake_file=x-lynx
926                 ;;
927         i[[34567]]86-*-mach*)
928                 tm_file=i386/mach.h
929 #               tmake_file=t-libc-ok
930                 use_collect2=yes
931                 ;;
932         i[[34567]]86-*-osfrose*)                # 386 using OSF/rose
933                 if [[ x$elf = xyes ]]
934                 then
935                         tm_file=i386/osfelf.h
936                         use_collect2=
937                 else
938                         tm_file=i386/osfrose.h
939                         use_collect2=yes
940                 fi
941                 xm_file="i386/xm-osf.h ${xm_file}"
942                 xmake_file=i386/x-osfrose
943                 tmake_file=i386/t-osf
944                 extra_objs=halfpic.o
945                 ;;
946         i[[34567]]86-go32-rtems*)
947                 cpu_type=i386
948                 xm_file=i386/xm-go32.h
949                 tm_file=i386/go32-rtems.h
950                 tmake_file="i386/t-go32 t-rtems"
951                 ;;
952         i[[34567]]86-*-rtemself*)
953                 cpu_type=i386
954                 tm_file=i386/rtemself.h
955                 tmake_file="i386/t-i386bare t-rtems"
956                 ;;
957         i[[34567]]86-*-rtems*)
958                 cpu_type=i386
959                 tm_file=i386/rtems.h
960                 tmake_file="i386/t-i386bare t-rtems"
961                 ;;
962         i[[34567]]86-*-sco3.2v5*)       # 80386 running SCO Open Server 5
963                 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
964                 xm_defines="USG SVR3"
965                 xmake_file=i386/x-sco5
966                 fixincludes=fixinc.sco
967                 broken_install=yes
968                 install_headers_dir=install-headers-cpio
969                 tm_file=i386/sco5.h
970                 tmake_file=i386/t-sco5
971                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
972                 ;;
973         i[[34567]]86-*-sco3.2v4*)       # 80386 running SCO 3.2v4 system
974                 xm_file="${xm_file} i386/xm-sco.h"
975                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
976                 xmake_file=i386/x-sco4
977                 fixincludes=fixinc.sco
978                 broken_install=yes
979                 install_headers_dir=install-headers-cpio
980                 if [[ x$stabs = xyes ]]
981                 then
982                         tm_file=i386/sco4dbx.h
983                         tmake_file=i386/t-svr3dbx
984                         extra_parts="svr3.ifile svr3z.rfile"
985                 else
986                         tm_file=i386/sco4.h
987                         tmake_file=i386/t-crtstuff
988                         extra_parts="crtbegin.o crtend.o"
989                 fi
990                 truncate_target=yes
991                 ;;
992         i[[34567]]86-*-sco*)            # 80386 running SCO system
993                 xm_file=i386/xm-sco.h
994                 xmake_file=i386/x-sco
995                 broken_install=yes
996                 install_headers_dir=install-headers-cpio
997                 if [[ x$stabs = xyes ]]
998                 then
999                         tm_file=i386/scodbx.h
1000                         tmake_file=i386/t-svr3dbx
1001                         extra_parts="svr3.ifile svr3z.rfile"
1002                 else
1003                         tm_file=i386/sco.h
1004                         extra_parts="crtbegin.o crtend.o"
1005                         tmake_file=i386/t-crtstuff
1006                 fi
1007                 truncate_target=yes
1008                 ;;
1009         i[[34567]]86-*-solaris2*)
1010                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1011                 xm_defines="USG POSIX SMALL_ARG_MAX"
1012                 if [[ x$stabs = xyes ]]
1013                 then
1014                         tm_file=i386/sol2dbg.h
1015                 else
1016                         tm_file=i386/sol2.h
1017                 fi
1018                 tmake_file=i386/t-sol2
1019                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1020                 xmake_file=x-svr4
1021                 case $machine in
1022                 *-*-solaris2.[[0-4]])
1023                         fixincludes=fixinc.svr4;;
1024                 *)
1025                         fixincludes=fixinc.wrap;;
1026                 esac
1027                 broken_install=yes
1028                 if [[ x$enable_threads = xyes ]]; then
1029                         thread_file='solaris'
1030                 fi
1031                 ;;
1032         i[[34567]]86-*-sysv4*)          # Intel 80386's running system V.4
1033                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1034                 xm_defines="USG POSIX SMALL_ARG_MAX"
1035                 tm_file=i386/sysv4.h
1036                 if [[ x$stabs = xyes ]]
1037                 then
1038                         tm_file="${tm_file} dbx.h"
1039                 fi
1040                 tmake_file=i386/t-crtpic
1041                 xmake_file=x-svr4
1042                 extra_parts="crtbegin.o crtend.o"
1043                 ;;
1044         i[[34567]]86-*-osf1*)           # Intel 80386's running OSF/1 1.3+
1045                 cpu_type=i386
1046                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1047                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1048                 fixincludes=Makefile.in #Don't do it on OSF/1
1049                 if [[ x$stabs = xyes ]]
1050                 then
1051                         tm_file=i386/osf1elfgdb.h
1052                 else
1053                         tm_file=i386/osf1elf.h
1054                 fi
1055                 tmake_file=i386/t-osf1elf
1056                 xmake_file=i386/x-osf1elf
1057                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1058                 ;;
1059         i[[34567]]86-*-sysv*)           # Intel 80386's running system V
1060                 xm_defines="USG SVR3"
1061                 xmake_file=i386/x-sysv3
1062                 if [[ x$gas = xyes ]]
1063                 then
1064                         if [[ x$stabs = xyes ]]
1065                         then
1066                                 tm_file=i386/svr3dbx.h
1067                                 tmake_file=i386/t-svr3dbx
1068                                 extra_parts="svr3.ifile svr3z.rfile"
1069                         else
1070                                 tm_file=i386/svr3gas.h
1071                                 extra_parts="crtbegin.o crtend.o"
1072                                 tmake_file=i386/t-crtstuff
1073                         fi
1074                 else
1075                         tm_file=i386/sysv3.h
1076                         extra_parts="crtbegin.o crtend.o"
1077                         tmake_file=i386/t-crtstuff
1078                 fi
1079                 ;;
1080         i386-*-vsta)                    # Intel 80386's running VSTa kernel
1081                 xm_file="${xm_file} i386/xm-vsta.h"
1082                 tm_file=i386/vsta.h
1083                 tmake_file=i386/t-vsta
1084                 xmake_file=i386/x-vsta
1085                 ;;
1086         i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
1087                 xm_file="${xm_file} i386/xm-cygwin32.h"
1088                 tmake_file=i386/t-cygwin32
1089                 tm_file=i386/cygwin32.h
1090                 xmake_file=i386/x-cygwin32
1091                 extra_objs=winnt.o
1092                 fixincludes=Makefile.in
1093                 if [[ x$enable_threads = xyes ]]; then
1094                         thread_file='win32'
1095                 fi
1096                 exeext=.exe
1097                 ;;
1098         i[[34567]]86-*-mingw32*)
1099                 tm_file=i386/mingw32.h
1100                 xm_file="${xm_file} i386/xm-mingw32.h"
1101                 tmake_file=i386/t-cygwin32
1102                 extra_objs=winnt.o
1103                 xmake_file=i386/x-cygwin32
1104                 fixincludes=Makefile.in
1105                 if [[ x$enable_threads = xyes ]]; then
1106                         thread_file='win32'
1107                 fi
1108                 exeext=.exe
1109                 case $machine in
1110                         *mingw32msv*)
1111                                 ;;
1112                         *minwg32crt* | *mingw32*)
1113                                 tm_file="${tm_file} i386/crtdll.h"
1114                                 ;;
1115                 esac
1116                 ;;
1117         i[[34567]]86-*-winnt3*)
1118                 tm_file=i386/win-nt.h
1119                 out_file=i386/i386.c
1120                 xm_file="xm-winnt.h ${xm_file}"
1121                 xmake_file=winnt/x-winnt
1122                 tmake_file=i386/t-winnt
1123                 extra_host_objs="winnt.o oldnames.o"
1124                 extra_gcc_objs="spawnv.o oldnames.o"
1125                 fixincludes=fixinc.winnt
1126                 if [[ x$gnu_ld != xyes ]]
1127                 then
1128                         extra_programs=ld.exe
1129                 fi
1130                 if [[ x$enable_threads = xyes ]]; then
1131                         thread_file='win32'
1132                 fi
1133                 ;;
1134         i[[34567]]86-dg-dgux*)
1135                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1136                 xm_defines="USG POSIX"
1137                 out_file=i386/dgux.c
1138                 tm_file=i386/dgux.h
1139                 tmake_file=i386/t-dgux
1140                 xmake_file=i386/x-dgux
1141                 fixincludes=Makefile.in # There is nothing to fix
1142                 install_headers_dir=install-headers-cpio
1143               ;;
1144         i860-alliant-*)         # Alliant FX/2800
1145                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1146                 xm_file="${xm_file}"
1147                 xmake_file=i860/x-fx2800
1148                 tmake_file=i860/t-fx2800
1149                 extra_parts="crtbegin.o crtend.o"
1150                 ;;
1151         i860-*-bsd*)
1152                 tm_file="${tm_file} i860/bsd.h"
1153                 if [[ x$gas = xyes ]]
1154                 then
1155                         tm_file="${tm_file} i860/bsd-gas.h"
1156                 fi
1157                 use_collect2=yes
1158                 ;;
1159         i860-*-mach*)
1160                 tm_file="${tm_file} i860/mach.h"
1161                 tmake_file=t-libc-ok
1162                 ;;
1163         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
1164                 tm_file="${tm_file} svr3.h i860/paragon.h"
1165                 xm_defines="USG SVR3"
1166                 tmake_file=t-osf
1167                 broken_install=yes
1168                 ;;
1169         i860-*-sysv3*)
1170                 tm_file="${tm_file} svr3.h i860/sysv3.h"
1171                 xm_defines="USG SVR3"
1172                 xmake_file=i860/x-sysv3
1173                 extra_parts="crtbegin.o crtend.o"
1174                 ;;
1175         i860-*-sysv4*)
1176                 tm_file="${tm_file} svr4.h i860/sysv4.h"
1177                 xm_defines="USG SVR3"
1178                 xmake_file=i860/x-sysv4
1179                 tmake_file=t-svr4
1180                 extra_parts="crtbegin.o crtend.o"
1181                 ;;
1182         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1183                 tm_file="${tm_file} i960/vx960.h"
1184                 tmake_file=i960/t-vxworks960
1185                 use_collect2=yes
1186                 ;;
1187         i960-wrs-vxworks5* | i960-wrs-vxworks)
1188                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1189                 tmake_file=i960/t-vxworks960
1190                 use_collect2=yes
1191                 ;;
1192         i960-wrs-vxworks*)
1193                 tm_file="${tm_file} i960/vx960.h"
1194                 tmake_file=i960/t-vxworks960
1195                 use_collect2=yes
1196                 ;;
1197         i960-*-coff*)
1198                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1199                 tmake_file=i960/t-960bare
1200                 use_collect2=yes
1201                 ;;
1202         i960-*-rtems)
1203                 tmake_file="i960/t-960bare t-rtems"
1204                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1205                 use_collect2=yes
1206                 ;;
1207         i960-*-*)                       # Default i960 environment.
1208                 use_collect2=yes
1209                 ;;
1210         m32r-*-elf*)
1211                 extra_parts="crtinit.o crtfini.o"
1212                 ;;
1213         m68000-convergent-sysv*)
1214                 tm_file=m68k/ctix.h
1215                 xm_file="m68k/xm-3b1.h ${xm_file}"
1216                 xm_defines=USG
1217                 use_collect2=yes
1218                 extra_headers=math-68881.h
1219                 ;;
1220         m68000-hp-bsd*)                 # HP 9000/200 running BSD
1221                 tm_file=m68k/hp2bsd.h
1222                 xmake_file=m68k/x-hp2bsd
1223                 use_collect2=yes
1224                 extra_headers=math-68881.h
1225                 ;;
1226         m68000-hp-hpux*)                # HP 9000 series 300
1227                 xm_file="xm_alloca.h ${xm_file}"
1228                 xm_defines="USG NO_SYS_SIGLIST"
1229                 if [[ x$gas = xyes ]]
1230                 then
1231                         xmake_file=m68k/x-hp320g
1232                         tm_file=m68k/hp310g.h
1233                 else
1234                         xmake_file=m68k/x-hp320
1235                         tm_file=m68k/hp310.h
1236                 fi
1237                 broken_install=yes
1238                 install_headers_dir=install-headers-cpio
1239                 use_collect2=yes
1240                 extra_headers=math-68881.h
1241                 ;;
1242         m68000-sun-sunos3*)
1243                 tm_file=m68k/sun2.h
1244                 use_collect2=yes
1245                 extra_headers=math-68881.h
1246                 ;;
1247         m68000-sun-sunos4*)
1248                 tm_file=m68k/sun2o4.h
1249                 use_collect2=yes
1250                 extra_headers=math-68881.h
1251                 ;;
1252         m68000-att-sysv*)
1253                 xm_file="m68k/xm-3b1.h ${xm_file}"
1254                 xm_defines=USG
1255                 if [[ x$gas = xyes ]]
1256                 then
1257                         tm_file=m68k/3b1g.h
1258                 else
1259                         tm_file=m68k/3b1.h
1260                 fi
1261                 use_collect2=yes
1262                 extra_headers=math-68881.h
1263                 ;;
1264         m68k-apple-aux*)                # Apple Macintosh running A/UX
1265                 xm_defines="USG AUX"
1266                 tmake_file=m68k/t-aux
1267                 broken_install=yes
1268                 install_headers_dir=install-headers-cpio
1269                 extra_headers=math-68881.h
1270                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1271                 tm_file=
1272                 if [[ "$gnu_ld" = yes ]]
1273                 then
1274                         tm_file="${tm_file} m68k/auxgld.h"
1275                 else
1276                         tm_file="${tm_file} m68k/auxld.h"
1277                 fi
1278                 if [[ "$gas" = yes ]]
1279                 then
1280                         tm_file="${tm_file} m68k/auxgas.h"
1281                 else
1282                         tm_file="${tm_file} m68k/auxas.h"
1283                 fi
1284                 tm_file="${tm_file} m68k/a-ux.h"
1285                 ;;
1286         m68k-apollo-*)
1287                 tm_file=m68k/apollo68.h
1288                 xmake_file=m68k/x-apollo68
1289                 use_collect2=yes
1290                 extra_headers=math-68881.h
1291                 ;;
1292         m68k-altos-sysv*)                  # Altos 3068
1293                 if [[ x$gas = xyes ]]
1294                 then
1295                         tm_file=m68k/altos3068.h
1296                         xm_defines=USG
1297                 else
1298                         echo "The Altos is supported only with the GNU assembler" 1>&2
1299                         exit 1
1300                 fi
1301                 extra_headers=math-68881.h
1302                 ;;
1303         m68k-bull-sysv*)                # Bull DPX/2
1304                 if [[ x$gas = xyes ]]
1305                 then
1306                         if [[ x$stabs = xyes ]]
1307                         then
1308                                 tm_file=m68k/dpx2cdbx.h
1309                         else
1310                                 tm_file=m68k/dpx2g.h
1311                         fi
1312                 else
1313                         tm_file=m68k/dpx2.h
1314                 fi
1315                 xm_file="xm-alloca.h ${xm_file}"
1316                 xm_defines=USG
1317                 xmake_file=m68k/x-dpx2
1318                 use_collect2=yes
1319                 extra_headers=math-68881.h
1320                 ;;
1321         m68k-atari-sysv4*)              # Atari variant of V.4.
1322                 tm_file=m68k/atari.h
1323                 xm_file="xm-alloca.h ${xm_file}"
1324                 xm_defines="USG FULL_PROTOTYPES"
1325                 tmake_file=t-svr4
1326                 extra_parts="crtbegin.o crtend.o"
1327                 extra_headers=math-68881.h
1328                 ;;
1329         m68k-motorola-sysv*)
1330                 tm_file=m68k/mot3300.h
1331                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1332                 xm_defines=NO_SYS_SIGLIST
1333                 if [[ x$gas = xyes ]]
1334                 then
1335                         xmake_file=m68k/x-mot3300-gas
1336                         if [[ x$gnu_ld = xyes ]]
1337                         then
1338                                 tmake_file=m68k/t-mot3300-gald
1339                         else
1340                                 tmake_file=m68k/t-mot3300-gas
1341                                 use_collect2=yes
1342                         fi
1343                 else
1344                         xmake_file=m68k/x-mot3300
1345                         if [[ x$gnu_ld = xyes ]]
1346                         then
1347                                 tmake_file=m68k/t-mot3300-gld
1348                         else
1349                                 tmake_file=m68k/t-mot3300
1350                                 use_collect2=yes
1351                         fi
1352                 fi
1353                 gdb_needs_out_file_path=yes
1354                 extra_parts="crt0.o mcrt0.o"
1355                 extra_headers=math-68881.h
1356                 ;;
1357         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
1358                 tm_file=m68k/tower-as.h
1359                 xm_defines="USG SVR3"
1360                 xmake_file=m68k/x-tower
1361                 extra_parts="crtbegin.o crtend.o"
1362                 extra_headers=math-68881.h
1363                 ;;
1364         m68k-plexus-sysv*)
1365                 tm_file=m68k/plexus.h
1366                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1367                 xm_defines=USG
1368                 use_collect2=yes
1369                 extra_headers=math-68881.h
1370                 ;;
1371         m68k-tti-*)
1372                 tm_file=m68k/pbb.h
1373                 xm_file="xm-alloca.h ${xm_file}"
1374                 xm_defines=USG
1375                 extra_headers=math-68881.h
1376                 ;;
1377         m68k-crds-unos*)
1378                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1379                 xm_defines="USG unos"
1380                 xmake_file=m68k/x-crds
1381                 tm_file=m68k/crds.h
1382                 broken_install=yes
1383                 use_collect2=yes
1384                 extra_headers=math-68881.h
1385                 ;;
1386         m68k-cbm-sysv4*)                # Commodore variant of V.4.
1387                 tm_file=m68k/amix.h
1388                 xm_file="xm-alloca.h ${xm_file}"
1389                 xm_defines="USG FULL_PROTOTYPES"
1390                 xmake_file=m68k/x-amix
1391                 tmake_file=t-svr4
1392                 extra_parts="crtbegin.o crtend.o"
1393                 extra_headers=math-68881.h
1394                 ;;
1395         m68k-ccur-rtu)
1396                 tm_file=m68k/ccur-GAS.h
1397                 xmake_file=m68k/x-ccur
1398                 extra_headers=math-68881.h
1399                 use_collect2=yes
1400                 broken_install=yes
1401                 ;;
1402         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
1403                 tm_file=m68k/hp3bsd44.h
1404                 xmake_file=m68k/x-hp3bsd44
1405                 use_collect2=yes
1406                 extra_headers=math-68881.h
1407                 ;;
1408         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
1409                 tm_file=m68k/hp3bsd.h
1410                 use_collect2=yes
1411                 extra_headers=math-68881.h
1412                 ;;
1413         m68k-isi-bsd*)
1414                 if [[ x$with_fp = xno ]]
1415                 then
1416                         tm_file=m68k/isi-nfp.h
1417                 else
1418                         tm_file=m68k/isi.h
1419                 fi
1420                 use_collect2=yes
1421                 extra_headers=math-68881.h
1422                 ;;
1423         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1424                 xm_file="xm_alloca.h ${xm_file}"
1425                 xm_defines="USG NO_SYS_SIGLIST"
1426                 if [[ x$gas = xyes ]]
1427                 then
1428                         xmake_file=m68k/x-hp320g
1429                         tm_file=m68k/hp320g.h
1430                 else
1431                         xmake_file=m68k/x-hp320
1432                         tm_file=m68k/hpux7.h
1433                 fi
1434                 broken_install=yes
1435                 install_headers_dir=install-headers-cpio
1436                 use_collect2=yes
1437                 extra_headers=math-68881.h
1438                 ;;
1439         m68k-hp-hpux*)  # HP 9000 series 300
1440                 xm_file="xm_alloca.h ${xm_file}"
1441                 xm_defines="USG NO_SYS_SIGLIST"
1442                 if [[ x$gas = xyes ]]
1443                 then
1444                         xmake_file=m68k/x-hp320g
1445                         tm_file=m68k/hp320g.h
1446                 else
1447                         xmake_file=m68k/x-hp320
1448                         tm_file=m68k/hp320.h
1449                 fi
1450                 broken_install=yes
1451                 install_headers_dir=install-headers-cpio
1452                 use_collect2=yes
1453                 extra_headers=math-68881.h
1454                 ;;
1455         m68k-sun-mach*)
1456                 tm_file=m68k/sun3mach.h
1457                 use_collect2=yes
1458                 extra_headers=math-68881.h
1459                 ;;
1460         m68k-sony-newsos3*)
1461                 if [[ x$gas = xyes ]]
1462                 then
1463                         tm_file=m68k/news3gas.h
1464                 else
1465                         tm_file=m68k/news3.h
1466                 fi
1467                 use_collect2=yes
1468                 extra_headers=math-68881.h
1469                 ;;
1470         m68k-sony-bsd* | m68k-sony-newsos*)
1471                 if [[ x$gas = xyes ]]
1472                 then
1473                         tm_file=m68k/newsgas.h
1474                 else
1475                         tm_file=m68k/news.h
1476                 fi
1477                 use_collect2=yes
1478                 extra_headers=math-68881.h
1479                 ;;
1480         m68k-next-nextstep2*)
1481                 tm_file=m68k/next21.h
1482                 xm_file="m68k/xm-next.h ${xm_file}"
1483                 tmake_file=m68k/t-next
1484                 xmake_file=m68k/x-next
1485                 extra_objs=nextstep.o
1486                 extra_headers=math-68881.h
1487                 use_collect2=yes
1488                 ;;
1489         m68k-next-nextstep3*)
1490                 tm_file=m68k/next.h
1491                 xm_file="m68k/xm-next.h ${xm_file}"
1492                 tmake_file=m68k/t-next
1493                 xmake_file=m68k/x-next
1494                 extra_objs=nextstep.o
1495                 extra_headers=math-68881.h
1496                 if [[ x$enable_threads = xyes ]]; then
1497                         thread_file='mach'
1498                 fi
1499                 ;;
1500         m68k-sun-sunos3*)
1501                 if [[ x$with_fp = xno ]]
1502                 then
1503                         tm_file=m68k/sun3n3.h
1504                 else
1505                         tm_file=m68k/sun3o3.h
1506                 fi
1507                 use_collect2=yes
1508                 extra_headers=math-68881.h
1509                 ;;
1510         m68k-sun-sunos*)                        # For SunOS 4 (the default).
1511                 if [[ x$with_fp = xno ]]
1512                 then
1513                         tm_file=m68k/sun3n.h
1514                 else
1515                         tm_file=m68k/sun3.h
1516                 fi
1517                 use_collect2=yes
1518                 extra_headers=math-68881.h
1519                 ;;
1520         m68k-wrs-vxworks*)
1521                 tm_file=m68k/vxm68k.h
1522                 tmake_file=m68k/t-vxworks68
1523                 extra_headers=math-68881.h
1524                 ;;
1525         m68k-*-aout*)
1526                 tmake_file=m68k/t-m68kbare
1527                 tm_file="m68k/m68k-aout.h libgloss.h"
1528                 extra_headers=math-68881.h
1529                 ;;
1530         m68k-*-coff*)
1531                 tmake_file=m68k/t-m68kbare
1532                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1533                 extra_headers=math-68881.h
1534                 ;;
1535         m68k-*-lynxos*)
1536                 if [[ x$gas = xyes ]]
1537                 then
1538                         tm_file=m68k/lynx.h
1539                 else
1540                         tm_file=m68k/lynx-ng.h
1541                 fi
1542                 xm_file=m68k/xm-lynx.h
1543                 xmake_file=x-lynx
1544                 tmake_file=m68k/t-lynx
1545                 extra_headers=math-68881.h
1546                 ;;
1547         m68k-*-netbsd*)
1548                 tm_file=m68k/netbsd.h
1549                 # On NetBSD, the headers are already okay, except for math.h.
1550                 fixincludes=fixinc.wrap
1551                 tmake_file=t-netbsd
1552                 ;;
1553         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
1554                 xm_file="xm-alloca.h ${xm_file}"
1555                 xm_defines=USG
1556                 xmake_file=m68k/x-m68kv
1557                 extra_parts="crtbegin.o crtend.o"
1558                 extra_headers=math-68881.h
1559                 ;;
1560         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
1561                 tm_file=m68k/m68kv4.h
1562                 xm_file="xm-alloca.h ${xm_file}"
1563                 xm_defines=USG
1564                 tmake_file=t-svr4
1565                 extra_parts="crtbegin.o crtend.o"
1566                 extra_headers=math-68881.h
1567                 ;;
1568         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
1569                                         # with a.out format
1570                 xmake_file=x-linux
1571                 tm_file=m68k/linux-aout.h
1572                 tmake_file="t-linux-aout m68k/t-linux-aout"
1573                 fixincludes=Makefile.in # The headers are ok already.
1574                 extra_headers=math-68881.h
1575                 gnu_ld=yes
1576                 ;;
1577         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
1578                                         # with ELF format using the
1579                                         # GNU/Linux C library 5
1580                 xmake_file=x-linux
1581                 tm_file=m68k/linux.h
1582                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1583                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1584                 fixincludes=Makefile.in # The headers are ok already.
1585                 extra_headers=math-68881.h
1586                 gnu_ld=yes
1587                 ;;
1588         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
1589                                         # with ELF format using glibc 2
1590                                         # aka the GNU/Linux C library 6.
1591                 xmake_file=x-linux
1592                 tm_file=m68k/linux.h
1593                 tmake_file="t-linux m68k/t-linux"
1594                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1595                 fixincludes=Makefile.in # The headers are ok already.
1596                 extra_headers=math-68881.h
1597                 gnu_ld=yes
1598                 if [[ x$enable_threads = xyes ]]; then
1599                         thread_file='posix'
1600                 fi
1601                 ;;
1602         m68k-*-psos*)
1603                 tmake_file=m68k/t-m68kbare
1604                 tm_file=m68k/m68k-psos.h
1605                 extra_headers=math-68881.h
1606                 ;;
1607         m68k-*-rtems*)
1608                 tmake_file="m68k/t-m68kbare t-rtems"
1609                 tm_file=m68k/rtems.h
1610                 extra_headers=math-68881.h
1611                 ;;
1613         m88k-dg-dgux*)
1614                 case $machine in
1615                   m88k-dg-dguxbcs*)
1616                     tm_file=m88k/dguxbcs.h
1617                     tmake_file=m88k/t-dguxbcs
1618                     ;;
1619                   *)
1620                     tm_file=m88k/dgux.h
1621                     tmake_file=m88k/t-dgux
1622                     ;;
1623                 esac
1624                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1625                 broken_install=yes
1626                 xmake_file=m88k/x-dgux
1627                 if [[ x$gas = xyes ]]
1628                 then
1629                         tmake_file=m88k/t-dgux-gas
1630                 fi
1631                 fixincludes=fixinc.dgux
1632                 ;;
1633         m88k-dolphin-sysv3*)
1634                 tm_file=m88k/dolph.h
1635                 extra_parts="crtbegin.o crtend.o"
1636                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1637                 xmake_file=m88k/x-dolph
1638                 if [[ x$gas = xyes ]]
1639                 then
1640                         tmake_file=m88k/t-m88k-gas
1641                 fi
1642                 ;;
1643         m88k-tektronix-sysv3)
1644                 tm_file=m88k/tekXD88.h
1645                 extra_parts="crtbegin.o crtend.o"
1646                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1647                 xmake_file=m88k/x-tekXD88
1648                 if [[ x$gas = xyes ]]
1649                 then
1650                         tmake_file=m88k/t-m88k-gas
1651                 fi
1652                 ;;
1653         m88k-*-aout*)
1654                 tm_file=m88k/m88k-aout.h
1655                 ;;
1656         m88k-*-coff*)
1657                 tm_file=m88k/m88k-coff.h
1658                 tmake_file=m88k/t-bug
1659                 ;;
1660         m88k-*-luna*)
1661                 tm_file=m88k/luna.h
1662                 extra_parts="crtbegin.o crtend.o"
1663                 if [[ x$gas = xyes ]]
1664                 then
1665                         tmake_file=m88k/t-luna-gas
1666                 else
1667                         tmake_file=m88k/t-luna
1668                 fi
1669                 ;;
1670         m88k-*-sysv3*)
1671                 tm_file=m88k/sysv3.h
1672                 extra_parts="crtbegin.o crtend.o"
1673                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1674                 xmake_file=m88k/x-sysv3
1675                 if [[ x$gas = xyes ]]
1676                 then
1677                         tmake_file=m88k/t-m88k-gas
1678                 fi
1679                 ;;
1680         m88k-*-sysv4*)
1681                 tm_file=m88k/sysv4.h
1682                 extra_parts="crtbegin.o crtend.o"
1683                 xmake_file=m88k/x-sysv4
1684                 tmake_file=m88k/t-sysv4
1685                 ;;
1686         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
1687                 tm_file=mips/iris6.h
1688                 xm_file=mips/xm-iris6.h
1689                 broken_install=yes
1690                 fixincludes=fixinc.irix
1691                 xmake_file=mips/x-iris6
1692                 tmake_file=mips/t-iris6
1693                 if [[ x$enable_threads = xyes ]]; then
1694                         thread_file='irix'
1695                 fi
1696                 ;;
1697         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
1698                 tm_file="mips/iris6.h mips/cross64.h"
1699                 xm_defines="USG HAVE_INTTYPES_H"
1700                 broken_install=yes
1701                 fixincludes=Makefile.in
1702                 xmake_file=mips/x-iris
1703                 tmake_file=mips/t-cross64
1704                 # See comment in mips/iris[56].h files.
1705                 use_collect2=yes
1706                 if [[ x$enable_threads = xyes ]]; then
1707                         thread_file='irix'
1708                 fi
1709                 ;;
1710         mips-sni-sysv4)
1711                 if [[ x$gas = xyes ]]
1712                 then
1713                         if [[ x$stabs = xyes ]]
1714                         then
1715                                 tm_file=mips/iris5gdb.h
1716                         else
1717                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
1718                         fi
1719                 else
1720                         tm_file=mips/sni-svr4.h
1721                 fi
1722                 xm_defines=USG
1723                 xmake_file=mips/x-sni-svr4
1724                 tmake_file=mips/t-mips-gas
1725                 if [[ x$gnu_ld != xyes ]]
1726                 then
1727                         use_collect2=yes
1728                 fi
1729                 broken_install=yes
1730                 ;;
1731         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
1732                 if [[ x$gas = xyes ]]
1733                 then
1734                         tm_file="mips/iris5.h mips/iris5gas.h"
1735                         if [[ x$stabs = xyes ]]
1736                         then
1737                                 tm_file="${tm_file} dbx.h"
1738                         fi
1739                 else
1740                         tm_file=mips/iris5.h
1741                 fi
1742                 xm_defines="USG HAVE_INTTYPES_H"
1743                 broken_install=yes
1744                 fixincludes=fixinc.irix
1745                 xmake_file=mips/x-iris
1746                 # mips-tfile doesn't work yet
1747                 tmake_file=mips/t-mips-gas
1748                 # See comment in mips/iris5.h file.
1749                 use_collect2=yes
1750                 if [[ x$enable_threads = xyes ]]; then
1751                         thread_file='irix'
1752                 fi
1753                 ;;
1754         mips-sgi-irix4loser*)           # Mostly like a MIPS.
1755                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
1756                 if [[ x$stabs = xyes ]]; then
1757                         tm_file="${tm_file} dbx.h"
1758                 fi
1759                 xm_defines=USG
1760                 broken_install=yes
1761                 xmake_file=mips/x-iris
1762                 if [[ x$gas = xyes ]]
1763                 then
1764                         tmake_file=mips/t-mips-gas
1765                 else
1766                         extra_passes="mips-tfile mips-tdump"
1767                 fi
1768                 if [[ x$gnu_ld != xyes ]]
1769                 then
1770                         use_collect2=yes
1771                 fi
1772                 if [[ x$enable_threads = xyes ]]; then
1773                         thread_file='irix'
1774                 fi
1775                 ;;
1776         mips-sgi-irix4*)                # Mostly like a MIPS.
1777                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
1778                 if [[ x$stabs = xyes ]]; then
1779                         tm_file="${tm_file} dbx.h"
1780                 fi
1781                 xm_defines=USG
1782                 broken_install=yes
1783                 xmake_file=mips/x-iris
1784                 if [[ x$gas = xyes ]]
1785                 then
1786                         tmake_file=mips/t-mips-gas
1787                 else
1788                         extra_passes="mips-tfile mips-tdump"
1789                 fi
1790                 if [[ x$gnu_ld != xyes ]]
1791                 then
1792                         use_collect2=yes
1793                 fi
1794                 if [[ x$enable_threads = xyes ]]; then
1795                         thread_file='irix'
1796                 fi
1797                 ;;
1798         mips-sgi-*)                     # Mostly like a MIPS.
1799                 tm_file="mips/iris3.h ${tm_file}"
1800                 if [[ x$stabs = xyes ]]; then
1801                         tm_file="${tm_file} dbx.h"
1802                 fi
1803                 xm_defines=USG
1804                 broken_install=yes
1805                 xmake_file=mips/x-iris3
1806                 if [[ x$gas = xyes ]]
1807                 then
1808                         tmake_file=mips/t-mips-gas
1809                 else
1810                         extra_passes="mips-tfile mips-tdump"
1811                 fi
1812                 if [[ x$gnu_ld != xyes ]]
1813                 then
1814                         use_collect2=yes
1815                 fi
1816                 ;;
1817         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
1818                 tm_file="mips/osfrose.h ${tm_file}"
1819                 xmake_file=mips/x-osfrose
1820                 tmake_file=mips/t-osfrose
1821                 extra_objs=halfpic.o
1822                 use_collect2=yes
1823                 ;;
1824         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
1825                 tm_file=mips/dec-osf1.h
1826                 if [[ x$stabs = xyes ]]; then
1827                         tm_file="${tm_file} dbx.h"
1828                 fi
1829                 xmake_file=mips/x-dec-osf1
1830                 if [[ x$gas = xyes ]]
1831                 then
1832                         tmake_file=mips/t-mips-gas
1833                 else
1834                         tmake_file=mips/t-ultrix
1835                         extra_passes="mips-tfile mips-tdump"
1836                 fi
1837                 if [[ x$gnu_ld != xyes ]]
1838                 then
1839                         use_collect2=yes
1840                 fi
1841                 ;;
1842         mips-dec-bsd*)                  # Decstation running 4.4 BSD
1843               tm_file=mips/dec-bsd.h
1844               fixincludes=
1845               if [[ x$gas = xyes ]]
1846               then
1847                         tmake_file=mips/t-mips-gas
1848               else
1849                         tmake_file=mips/t-ultrix
1850                         extra_passes="mips-tfile mips-tdump"
1851               fi
1852               if [[ x$gnu_ld != xyes ]]
1853               then
1854                         use_collect2=yes
1855               fi
1856               ;;
1857         mips-dec-netbsd*)                  # Decstation running NetBSD
1858                 tm_file=mips/netbsd.h
1859                 # On NetBSD, the headers are already okay, except for math.h.
1860                 fixincludes=fixinc.wrap
1861                 tmake_file=t-netbsd
1862                 if [[ x$prefix = xNONE ]]; then
1863                         prefix=$native_prefix
1864                 fi
1865                 ;;
1866         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
1867                 tm_file="mips/news4.h ${tm_file}"
1868                 if [[ x$stabs = xyes ]]; then
1869                         tm_file="${tm_file} dbx.h"
1870                 fi
1871                 if [[ x$gas = xyes ]]
1872                 then
1873                         tmake_file=mips/t-mips-gas
1874                 else
1875                         extra_passes="mips-tfile mips-tdump"
1876                 fi
1877                 if [[ x$gnu_ld != xyes ]]
1878                 then
1879                         use_collect2=yes
1880                 fi
1881                 xmake_file=mips/x-sony
1882                 ;;
1883         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
1884                                         # That is based on svr4.
1885                 # t-svr4 is not right because this system doesn't use ELF.
1886                 tm_file="mips/news5.h ${tm_file}"
1887                 if [[ x$stabs = xyes ]]; then
1888                         tm_file="${tm_file} dbx.h"
1889                 fi
1890                 xm_file="xm-siglist.h ${xm_file}"
1891                 xm_defines=USG
1892                 if [[ x$gas = xyes ]]
1893                 then
1894                         tmake_file=mips/t-mips-gas
1895                 else
1896                         extra_passes="mips-tfile mips-tdump"
1897                 fi
1898                 if [[ x$gnu_ld != xyes ]]
1899                 then
1900                         use_collect2=yes
1901                 fi
1902                 ;;
1903         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
1904                 tm_file="mips/svr4-5.h mips/svr4-t.h"
1905                 if [[ x$stabs = xyes ]]; then
1906                         tm_file="${tm_file} dbx.h"
1907                 fi
1908                 xm_file="xm-siglist.h ${xm_file}"
1909                 xm_defines=USG
1910                 xmake_file=mips/x-sysv
1911                 if [[ x$gas = xyes ]]
1912                 then
1913                         tmake_file=mips/t-mips-gas
1914                         extra_parts="crtbegin.o crtend.o"
1915                 else
1916                         tmake_file=mips/t-mips
1917                         extra_passes="mips-tfile mips-tdump"
1918                 fi
1919                 if [[ x$gnu_ld != xyes ]]
1920                 then
1921                         use_collect2=yes
1922                 fi
1923                 broken_install=yes
1924                 ;;
1925         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
1926                 tm_file="mips/ultrix.h ${tm_file}"
1927                 if [[ x$stabs = xyes ]]; then
1928                         tm_file="${tm_file} dbx.h"
1929                 fi
1930                 xmake_file=mips/x-ultrix
1931                 if [[ x$gas = xyes ]]
1932                 then
1933                         tmake_file=mips/t-mips-gas
1934                 else
1935                         tmake_file=mips/t-ultrix
1936                         extra_passes="mips-tfile mips-tdump"
1937                 fi
1938                 if [[ x$gnu_ld != xyes ]]
1939                 then
1940                         use_collect2=yes
1941                 fi
1942                 ;;
1943         mips-*-riscos[[56789]]bsd*)
1944                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
1945                 if [[ x$stabs = xyes ]]; then
1946                         tm_file="${tm_file} dbx.h"
1947                 fi
1948                 if [[ x$gas = xyes ]]
1949                 then
1950                         tmake_file=mips/t-bsd-gas
1951                 else
1952                         tmake_file=mips/t-bsd
1953                         extra_passes="mips-tfile mips-tdump"
1954                 fi
1955                 if [[ x$gnu_ld != xyes ]]
1956                 then
1957                         use_collect2=yes
1958                 fi
1959                 broken_install=yes
1960                 ;;
1961         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1962                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
1963                 if [[ x$stabs = xyes ]]; then
1964                         tm_file="${tm_file} dbx.h"
1965                 fi
1966                 if [[ x$gas = xyes ]]
1967                 then
1968                         tmake_file=mips/t-bsd-gas
1969                 else
1970                         tmake_file=mips/t-bsd
1971                         extra_passes="mips-tfile mips-tdump"
1972                 fi
1973                 if [[ x$gnu_ld != xyes ]]
1974                 then
1975                         use_collect2=yes
1976                 fi
1977                 broken_install=yes
1978                 ;;
1979         mips-*-riscos[[56789]]sysv4*)
1980                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
1981                 if [[ x$stabs = xyes ]]; then
1982                         tm_file="${tm_file} dbx.h"
1983                 fi
1984                 xm_file="xm-siglist.h ${xm_file}"
1985                 xmake_file=mips/x-sysv
1986                 if [[ x$gas = xyes ]]
1987                 then
1988                         tmake_file=mips/t-svr4-gas
1989                 else
1990                         tmake_file=mips/t-svr4
1991                         extra_passes="mips-tfile mips-tdump"
1992                 fi
1993                 if [[ x$gnu_ld != xyes ]]
1994                 then
1995                         use_collect2=yes
1996                 fi
1997                 broken_install=yes
1998                 ;;
1999         mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
2000                 tm_file="mips/svr4-4.h ${tm_file}"
2001                 if [[ x$stabs = xyes ]]; then
2002                         tm_file="${tm_file} dbx.h"
2003                 fi
2004                 xm_defines=USG
2005                 xmake_file=mips/x-sysv
2006                 if [[ x$gas = xyes ]]
2007                 then
2008                         tmake_file=mips/t-svr4-gas
2009                 else
2010                         tmake_file=mips/t-svr4
2011                         extra_passes="mips-tfile mips-tdump"
2012                 fi
2013                 if [[ x$gnu_ld != xyes ]]
2014                 then
2015                         use_collect2=yes
2016                 fi
2017                 broken_install=yes
2018                 ;;
2019         mips-*-riscos[[56789]]sysv*)
2020                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
2021                 if [[ x$stabs = xyes ]]; then
2022                         tm_file="${tm_file} dbx.h"
2023                 fi
2024                 xm_defines=USG
2025                 xmake_file=mips/x-sysv
2026                 if [[ x$gas = xyes ]]
2027                 then
2028                         tmake_file=mips/t-svr3-gas
2029                 else
2030                         tmake_file=mips/t-svr3
2031                         extra_passes="mips-tfile mips-tdump"
2032                 fi
2033                 if [[ x$gnu_ld != xyes ]]
2034                 then
2035                         use_collect2=yes
2036                 fi
2037                 broken_install=yes
2038                 ;;
2039         mips-*-sysv* | mips-*-riscos*sysv*)
2040                 tm_file="mips/svr3-4.h ${tm_file}"
2041                 if [[ x$stabs = xyes ]]; then
2042                         tm_file="${tm_file} dbx.h"
2043                 fi
2044                 xm_defines=USG
2045                 xmake_file=mips/x-sysv
2046                 if [[ x$gas = xyes ]]
2047                 then
2048                         tmake_file=mips/t-svr3-gas
2049                 else
2050                         tmake_file=mips/t-svr3
2051                         extra_passes="mips-tfile mips-tdump"
2052                 fi
2053                 if [[ x$gnu_ld != xyes ]]
2054                 then
2055                         use_collect2=yes
2056                 fi
2057                 broken_install=yes
2058                 ;;
2059         mips-*-riscos[[56789]]*)                # Default MIPS RISC-OS 5.0.
2060                 tm_file=mips/mips-5.h
2061                 if [[ x$stabs = xyes ]]; then
2062                         tm_file="${tm_file} dbx.h"
2063                 fi
2064                 if [[ x$gas = xyes ]]
2065                 then
2066                         tmake_file=mips/t-mips-gas
2067                 else
2068                         extra_passes="mips-tfile mips-tdump"
2069                 fi
2070                 if [[ x$gnu_ld != xyes ]]
2071                 then
2072                         use_collect2=yes
2073                 fi
2074                 broken_install=yes
2075                 ;;
2076         mips-*-gnu*)
2077                 ;;
2078         mipsel-*-ecoff*)
2079                 tm_file=mips/ecoffl.h
2080                 if [[ x$stabs = xyes ]]; then
2081                         tm_file="${tm_file} dbx.h"
2082                 fi
2083                 tmake_file=mips/t-ecoff
2084                 ;;
2085         mips-*-ecoff*)
2086                 tm_file="${tm_file} gofast.h mips/ecoff.h"
2087                 if [[ x$stabs = xyes ]]; then
2088                         tm_file="${tm_file} dbx.h"
2089                 fi
2090                 tmake_file=mips/t-ecoff
2091                 broken_install=yes
2092                 ;;
2093         mipsel-*-elf*)
2094                 tm_file="mips/elfl.h libgloss.h"
2095                 tmake_file=mips/t-ecoff
2096                 ;;
2097         mips-*-elf*)
2098                 tm_file="mips/elf.h libgloss.h"
2099                 tmake_file=mips/t-ecoff
2100                 ;;
2101         mips64el-*-elf*)
2102                 tm_file="mips/elfl64.h libgloss.h"
2103                 tmake_file=mips/t-ecoff
2104                 ;;
2105         mips64orionel-*-elf*)
2106                 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
2107                 tmake_file=mips/t-ecoff
2108                 ;;
2109         mips64-*-elf*)
2110                 tm_file="mips/elf64.h libgloss.h"
2111                 tmake_file=mips/t-ecoff
2112                 ;;
2113         mips64orion-*-elf*)
2114                 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
2115                 tmake_file=mips/t-ecoff
2116                 ;;
2117         mips64orion-*-rtems*)
2118                 tm_file="mips/elforion.h mips/elfl64.h mips/rtems64.h"
2119                 tmake_file="mips/t-ecoff t-rtems"
2120                 ;;
2121         mipstx39el-*-elf*)
2122                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2123                 tmake_file=mips/t-ecoff
2124                 ;;
2125         mipstx39-*-elf*)
2126                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2127                 tmake_file=mips/t-ecoff
2128                 ;;
2129         mips-*-*)                               # Default MIPS RISC-OS 4.0.
2130                 if [[ x$stabs = xyes ]]; then
2131                         tm_file="${tm_file} dbx.h"
2132                 fi
2133                 if [[ x$gas = xyes ]]
2134                 then
2135                         tmake_file=mips/t-mips-gas
2136                 else
2137                         extra_passes="mips-tfile mips-tdump"
2138                 fi
2139                 if [[ x$gnu_ld != xyes ]]
2140                 then
2141                         use_collect2=yes
2142                 fi
2143                 ;;
2144         mn10200-*-*)
2145                 cpu_type=mn10200
2146                 tm_file="mn10200/mn10200.h"
2147                 if [[ x$stabs = xyes ]]
2148                 then
2149                         tm_file="${tm_file} dbx.h"
2150                 fi
2151                 use_collect2=no
2152                 ;;
2153         mn10300-*-*)
2154                 cpu_type=mn10300
2155                 tm_file="mn10300/mn10300.h"
2156                 if [[ x$stabs = xyes ]]
2157                 then
2158                         tm_file="${tm_file} dbx.h"
2159                 fi
2160                 use_collect2=no
2161                 ;;
2162         ns32k-encore-bsd*)
2163                 tm_file=ns32k/encore.h
2164                 use_collect2=yes
2165                 ;;
2166         ns32k-sequent-bsd*)
2167                 tm_file=ns32k/sequent.h
2168                 use_collect2=yes
2169                 ;;
2170         ns32k-tek6100-bsd*)
2171                 tm_file=ns32k/tek6100.h
2172                 broken_install=yes
2173                 use_collect2=yes
2174                 ;;
2175         ns32k-tek6200-bsd*)
2176                 tm_file=ns32k/tek6200.h
2177                 broken_install=yes
2178                 use_collect2=yes
2179                 ;;
2180 # This has not been updated to GCC 2.
2181 #       ns32k-ns-genix*)
2182 #               xm_defines=USG
2183 #               xmake_file=ns32k/x-genix
2184 #               tm_file=ns32k/genix.h
2185 #               broken_install=yes
2186 #               use_collect2=yes
2187 #               ;;
2188         ns32k-merlin-*)
2189                 tm_file=ns32k/merlin.h
2190                 use_collect2=yes
2191                 ;;
2192         ns32k-pc532-mach*)
2193                 tm_file=ns32k/pc532-mach.h
2194                 use_collect2=yes
2195                 ;;
2196         ns32k-pc532-minix*)
2197                 tm_file=ns32k/pc532-min.h
2198                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2199                 xm_defines=USG
2200                 use_collect2=yes
2201                 ;;
2202         ns32k-pc532-netbsd*)
2203                 tm_file=ns32k/netbsd.h
2204                 # On NetBSD, the headers are already okay, except for math.h.
2205                 fixincludes=fixinc.wrap
2206                 tmake_file=t-netbsd
2207                 ;;
2208         pdp11-*-bsd)
2209                 tm_file="${tm_file} pdp11/2bsd.h"
2210                 ;;
2211         pdp11-*-*)
2212                 ;;
2213         pyramid-*-*)
2214                 cpu_type=pyr
2215                 xmake_file=pyr/x-pyr
2216                 use_collect2=yes
2217                 ;;
2218         romp-*-aos*)
2219                 use_collect2=yes
2220                 ;;
2221         romp-*-mach*)
2222                 xmake_file=romp/x-mach
2223                 use_collect2=yes
2224                 ;;
2225         powerpc-*-sysv* | powerpc-*-elf*)
2226                 tm_file=rs6000/sysv4.h
2227                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2228                 xm_defines="USG POSIX"
2229                 extra_headers=ppc-asm.h
2230                 if [[ x$gas = xyes ]]
2231                 then
2232                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2233                 else
2234                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2235                 fi
2236                 xmake_file=rs6000/x-sysv4
2237                 ;;
2238         powerpc-*-eabiaix*)
2239                 tm_file=rs6000/eabiaix.h
2240                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2241                 fixincludes=Makefile.in
2242                 extra_headers=ppc-asm.h
2243                 ;;
2244         powerpc-*-eabisim*)
2245                 tm_file=rs6000/eabisim.h
2246                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2247                 fixincludes=Makefile.in
2248                 extra_headers=ppc-asm.h
2249                 ;;
2250         powerpc-*-eabi*)
2251                 tm_file=rs6000/eabi.h
2252                 if [[ x$gas = xyes ]]
2253                 then
2254                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2255                 else
2256                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2257                 fi
2258                 fixincludes=Makefile.in
2259                 extra_headers=ppc-asm.h
2260                 ;;
2261         powerpc-*-rtems*)
2262                 tm_file=rs6000/rtems.h
2263                 if [[ x$gas = xyes ]]
2264                 then
2265                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2266                 else
2267                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2268                 fi
2269                 fixincludes=Makefile.in
2270                 extra_headers=ppc-asm.h
2271                 ;;
2272         powerpc-*-linux-gnu*)
2273                 tm_file=rs6000/linux.h
2274                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2275                 xm_defines="USG ${xm_defines}"
2276                 out_file=rs6000/rs6000.c
2277                 if [[ x$gas = xyes ]]
2278                 then
2279                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2280                 else
2281                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2282                 fi
2283                 xmake_file=x-linux
2284                 fixincludes=Makefile.in
2285                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2286                 extra_headers=ppc-asm.h
2287                 if [[ x$enable_threads = xyes ]]; then
2288                         thread_file='posix'
2289                 fi
2290                 ;;
2291         powerpc-*-vxworks*)
2292                 cpu_type=rs6000
2293                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2294                 xm_defines="USG POSIX"
2295                 tm_file=rs6000/vxppc.h
2296                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2297                 extra_headers=ppc-asm.h
2298                 ;;
2299         powerpcle-*-sysv* | powerpcle-*-elf*)
2300                 tm_file=rs6000/sysv4le.h
2301                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2302                 xm_defines="USG POSIX"
2303                 if [[ x$gas = xyes ]]
2304                 then
2305                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2306                 else
2307                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2308                 fi
2309                 xmake_file=rs6000/x-sysv4
2310                 extra_headers=ppc-asm.h
2311                 ;;
2312         powerpcle-*-eabisim*)
2313                 tm_file=rs6000/eabilesim.h
2314                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2315                 fixincludes=Makefile.in
2316                 extra_headers=ppc-asm.h
2317                 ;;
2318         powerpcle-*-eabi*)
2319                 tm_file=rs6000/eabile.h
2320                 if [[ x$gas = xyes ]]
2321                 then
2322                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2323                 else
2324                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2325                 fi
2326                 fixincludes=Makefile.in
2327                 extra_headers=ppc-asm.h
2328                 ;;
2329         powerpcle-*-winnt* )
2330                 tm_file=rs6000/win-nt.h
2331                 tmake_file=rs6000/t-winnt
2332 #               extra_objs=pe.o
2333                 fixincludes=Makefile.in
2334                 if [[ x$enable_threads = xyes ]]; then
2335                         thread_file='win32'
2336                 fi
2337                 extra_headers=ppc-asm.h
2338                 ;;
2339         powerpcle-*-pe | powerpcle-*-cygwin32)
2340                 tm_file=rs6000/cygwin32.h
2341                 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
2342                 xm_defines=NO_STAB_H
2343                 tmake_file=rs6000/t-winnt
2344                 xmake_file=rs6000/x-cygwin32
2345 #               extra_objs=pe.o
2346                 fixincludes=Makefile.in
2347                 if [[ x$enable_threads = xyes ]]; then
2348                         thread_file='win32'
2349                 fi
2350                 exeext=.exe
2351                 extra_headers=ppc-asm.h
2352                 ;;
2353         powerpcle-*-solaris2*)
2354                 tm_file=rs6000/sol2.h
2355                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2356                 xm_defines="USG POSIX"
2357                 if [[ x$gas = xyes ]]
2358                 then
2359                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2360                 else
2361                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2362                 fi
2363                 xmake_file=rs6000/x-sysv4
2364                 case $machine in
2365                 *-*-solaris2.[[0-4]])
2366                         fixincludes=fixinc.svr4;;
2367                 *)
2368                         fixincludes=fixinc.wrap;;
2369                 esac
2370                 extra_headers=ppc-asm.h
2371                 ;;
2372         rs6000-ibm-aix3.[[01]]*)
2373                 tm_file=rs6000/aix31.h
2374                 xmake_file=rs6000/x-aix31
2375                 use_collect2=yes
2376                 ;;
2377         rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2378                 tm_file=rs6000/aix3newas.h
2379                 if [[ x$host != x$target ]]
2380                 then
2381                         tmake_file=rs6000/t-xnewas
2382                 else
2383                         tmake_file=rs6000/t-newas
2384                 fi
2385                 use_collect2=yes
2386                 ;;
2387         rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2388                 tm_file=rs6000/aix41.h
2389                 if [[ x$host != x$target ]]
2390                 then
2391                         tmake_file=rs6000/t-xnewas
2392                 else
2393                         tmake_file=rs6000/t-newas
2394                 fi
2395                 xmake_file=rs6000/x-aix31
2396                 use_collect2=yes
2397                 ;;
2398         rs6000-ibm-aix*)
2399                 use_collect2=yes
2400                 ;;
2401         rs6000-bull-bosx)
2402                 use_collect2=yes
2403                 ;;
2404         rs6000-*-mach*)
2405                 tm_file=rs6000/mach.h
2406                 xm_file="${xm_file} rs6000/xm-mach.h"
2407                 xmake_file=rs6000/x-mach
2408                 use_collect2=yes
2409                 ;;
2410         rs6000-*-lynxos*)
2411                 tm_file=rs6000/lynx.h
2412                 xm_file=rs6000/xm-lynx.h
2413                 tmake_file=rs6000/t-rs6000
2414                 xmake_file=rs6000/x-lynx
2415                 use_collect2=yes
2416                 ;;
2417         sh-*-elf*)
2418                 tm_file=sh/elf.h
2419                 float_format=sh
2420                 ;;
2421         sh-*-rtems*)
2422                 tmake_file="sh/t-sh t-rtems"
2423                 tm_file=sh/rtems.h
2424                 float_format=sh
2425                 ;;
2426         sh-*-*)
2427                 float_format=sh
2428                 ;;
2429         sparc-tti-*)
2430                 tm_file=sparc/pbd.h
2431                 xm_file="xm-alloca.h ${xm_file}"
2432                 xm_defines=USG
2433                 ;;
2434         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2435                 tm_file=sparc/vxsparc.h
2436                 tmake_file=sparc/t-vxsparc
2437                 use_collect2=yes
2438                 ;;
2439         sparc-*-aout*)
2440                 tmake_file=sparc/t-sparcbare
2441                 tm_file="sparc/aout.h libgloss.h"
2442                 ;;
2443         sparc-*-netbsd*)
2444                 tm_file=sparc/netbsd.h
2445                 # On NetBSD, the headers are already okay, except for math.h.
2446                 fixincludes=fixinc.wrap
2447                 tmake_file=t-netbsd
2448                 ;;
2449         sparc-*-bsd*)
2450                 tm_file=sparc/bsd.h
2451                 ;;
2452         sparc-*-elf*)
2453                 tm_file=sparc/elf.h
2454                 tmake_file=sparc/t-elf
2455                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2456                 #float_format=i128
2457                 float_format=i64
2458                 ;;
2459         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
2460                 xm_file="${xm_file} sparc/xm-linux.h"
2461                 tm_file=sparc/linux-aout.h
2462                 xmake_file=x-linux
2463                 fixincludes=Makefile.in # The headers are ok already.
2464                 broken_install=yes
2465                 gnu_ld=yes
2466                 ;;
2467         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
2468                 xm_file="${xm_file} sparc/xm-linux.h"
2469                 xmake_file=x-linux
2470                 tm_file=sparc/linux.h
2471                 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2472                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2473                 fixincludes=Makefile.in # The headers are ok already.
2474                 broken_install=yes
2475                 gnu_ld=yes
2476                 ;;
2477         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
2478                 xm_file="${xm_file} sparc/xm-linux.h"
2479                 xmake_file=x-linux
2480                 tm_file=sparc/linux.h
2481                 tmake_file="t-linux sparc/t-linux"
2482                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2483                 fixincludes=Makefile.in # The headers are ok already.
2484                 broken_install=yes
2485                 gnu_ld=yes
2486                 if [[ x$enable_threads = xyes ]]; then
2487                         thread_file='posix'
2488                 fi
2489                 ;;
2490         sparc-*-lynxos*)
2491                 if [[ x$gas = xyes ]]
2492                 then
2493                         tm_file=sparc/lynx.h
2494                 else
2495                         tm_file=sparc/lynx-ng.h
2496                 fi
2497                 xm_file=sparc/xm-lynx.h
2498                 tmake_file=sparc/t-sunos41
2499                 xmake_file=x-lynx
2500                 ;;
2501         sparc-*-rtems*)
2502                 tmake_file="sparc/t-sparcbare t-rtems"
2503                 tm_file=sparc/rtems.h
2504                 ;;
2505         sparc-hal-solaris2*)
2506                 xm_file=sparc/xm-sol2.h
2507                 tm_file="sparc/sol2.h sparc/hal.h"
2508                 tmake_file="sparc/t-halos sparc/t-sol2"
2509                 xmake_file=sparc/x-sysv4
2510                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
2511                 fixincludes=fixinc.svr4
2512                 broken_install=yes
2513                 ;;
2514         sparc-*-solaris2*)
2515                 if [[ x$gnu_ld = xyes ]]
2516                 then
2517                         tm_file=sparc/sol2.h
2518                 else
2519                         tm_file=sparc/sol2-sld.h
2520                 fi
2521                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2522                 xm_defines="USG POSIX"
2523                 tmake_file=sparc/t-sol2
2524                 xmake_file=sparc/x-sysv4
2525                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2526                 case $machine in
2527                 *-*-solaris2.[[0-4]])
2528                         fixincludes=fixinc.svr4;;
2529                 *)
2530                         fixincludes=fixinc.wrap;;
2531                 esac
2532                 float_format=i128
2533                 broken_install=yes
2534                 if [[ x$enable_threads = xyes ]]; then
2535                         thread_file='solaris'
2536                 fi
2537                 ;;
2538         sparc-*-sunos4.0*)
2539                 tm_file=sparc/sunos4.h
2540                 tmake_file=sparc/t-sunos40
2541                 use_collect2=yes
2542                 ;;
2543         sparc-*-sunos4*)
2544                 tm_file=sparc/sunos4.h
2545                 tmake_file=sparc/t-sunos41
2546                 use_collect2=yes
2547                 if [[ x$gas = xyes ]]; then
2548                         tm_file="${tm_file} sparc/sun4gas.h"
2549                 fi
2550                 ;;
2551         sparc-*-sunos3*)
2552                 tm_file=sparc/sun4o3.h
2553                 use_collect2=yes
2554                 ;;
2555         sparc-*-sysv4*)
2556                 tm_file=sparc/sysv4.h
2557                 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2558                 xm_defines="USG POSIX"
2559                 tmake_file=t-svr4
2560                 xmake_file=sparc/x-sysv4
2561                 extra_parts="crtbegin.o crtend.o"
2562                 ;;
2563         sparc-*-vxsim*)
2564                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2565                 xm_defines="USG POSIX"
2566                 tm_file=sparc/vxsim.h
2567                 tmake_file=sparc/t-vxsparc
2568                 xmake_file=sparc/x-sysv4
2569                 ;;
2570         sparclet-*-aout*)
2571                 tm_file="sparc/splet.h libgloss.h"
2572                 tmake_file=sparc/t-splet
2573                 ;;
2574         sparclite-*-coff*)
2575                 tm_file="sparc/litecoff.h libgloss.h"
2576                 tmake_file=sparc/t-sparclite
2577                 ;;
2578         sparclite-*-aout*)
2579                 tm_file="sparc/lite.h aoutos.h libgloss.h"
2580                 tmake_file=sparc/t-sparclite
2581                 ;;
2582         sparc64-*-aout*)
2583                 tmake_file=sparc/t-sp64
2584                 tm_file=sparc/sp64-aout.h
2585                 ;;
2586         sparc64-*-elf*)
2587                 tmake_file=sparc/t-sp64
2588                 tm_file=sparc/sp64-elf.h
2589                 extra_parts="crtbegin.o crtend.o"
2590                 ;;
2591         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
2592                 tmake_file=sparc/t-sp64
2593                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2594                 tm_file=sparc/linux64.h
2595                 xmake_file=x-linux
2596                 fixincludes=Makefile.in # The headers are ok already.
2597                 gnu_ld=yes
2598                 ;;
2599 # This hasn't been upgraded to GCC 2.
2600 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
2601 #               tm_file=tahoe/harris.h
2602 #               ;;
2603 #       tahoe-*-bsd*)                   # tahoe running BSD
2604 #               ;;
2605 # This hasn't been upgraded to GCC 2.
2606 #       tron-*-*)
2607 #               cpu_type=gmicro
2608 #               use_collect2=yes
2609 #               ;;
2610         v850-*-*)
2611                 cpu_type=v850
2612                 tm_file="v850/v850.h"
2613                 xm_file="v850/xm-v850.h"
2614                 if [[ x$stabs = xyes ]]
2615                 then
2616                         tm_file="${tm_file} dbx.h"
2617                 fi
2618                 use_collect2=no
2619                 ;;
2620         vax-*-bsd*)                     # vaxen running BSD
2621                 use_collect2=yes
2622                 float_format=vax
2623                 ;;
2624         vax-*-sysv*)                    # vaxen running system V
2625                 tm_file="${tm_file} vax/vaxv.h"
2626                 xm_defines=USG
2627                 float_format=vax
2628                 ;;
2629         vax-*-netbsd*)
2630                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2631                 # On NetBSD, the headers are already okay, except for math.h.
2632                 fixincludes=fixinc.wrap
2633                 tmake_file=t-netbsd
2634                 float_format=vax
2635                 ;;
2636         vax-*-ultrix*)                  # vaxen running ultrix
2637                 tm_file="${tm_file} vax/ultrix.h"
2638                 use_collect2=yes
2639                 float_format=vax
2640                 ;;
2641         vax-*-vms*)                     # vaxen running VMS
2642                 xm_file=vax/xm-vms.h
2643                 tm_file=vax/vms.h
2644                 float_format=vax
2645                 ;;
2646         vax-*-*)                        # vax default entry
2647                 float_format=vax
2648                 ;;
2649         we32k-att-sysv*)
2650                 xm_file="${xm_file} xm-svr3"
2651                 use_collect2=yes
2652                 ;;
2653         *)
2654                 echo "Configuration $machine not supported" 1>&2
2655                 exit 1
2656                 ;;
2657         esac
2659         case $machine in
2660         *-*-linux-gnu*)
2661                 ;; # Existing GNU/Linux systems do not use the GNU setup.
2662         *-*-gnu*)
2663                 # On the GNU system, the setup is just about the same on
2664                 # each different CPU.  The specific machines that GNU
2665                 # supports are matched above and just set $cpu_type.
2666                 xm_file="xm-gnu.h ${xm_file}"
2667                 tm_file=${cpu_type}/gnu.h
2668                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2669                 # GNU always uses ELF.
2670                 elf=yes
2671                 # GNU tools are the only tools.
2672                 gnu_ld=yes
2673                 gas=yes
2674                 # On GNU, the headers are already okay.
2675                 fixincludes=Makefile.in
2676                 xmake_file=x-linux      # These details are the same as Linux.
2677                 tmake_file=t-gnu        # These are not.
2678                 ;;
2679         *-*-sysv4*)
2680                 fixincludes=fixinc.svr4
2681                 xmake_try_sysv=x-sysv
2682                 broken_install=yes
2683                 install_headers_dir=install-headers-cpio
2684                 ;;
2685         *-*-sysv*)
2686                 broken_install=yes
2687                 install_headers_dir=install-headers-cpio
2688                 ;;
2689         esac
2691         # Distinguish i[34567]86
2692         # Also, do not run mips-tfile on MIPS if using gas.
2693         # Process --with-cpu= for PowerPC/rs6000
2694         target_cpu_default2=
2695         case $machine in
2696         i486-*-*)
2697                 target_cpu_default2=1
2698                 ;;
2699         i586-*-*)
2700                 target_cpu_default2=2
2701                 ;;
2702         i686-*-* | i786-*-*)
2703                 target_cpu_default2=3
2704                 ;;
2705         alpha*-*-*)
2706                 case $machine in
2707                         alphaev6*)
2708                                 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2709                                 ;;
2710                         alphapca56*)
2711                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2712                                 ;;
2713                         alphaev56*)
2714                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2715                                 ;;
2716                         alphaev5*)
2717                                 target_cpu_default2="MASK_CPU_EV5"
2718                                 ;;
2719                 esac
2720                                 
2721                 if [[ x$gas = xyes ]]
2722                 then
2723                         if [[ x$target_cpu_default2 = x ]]
2724                         then
2725                                 target_cpu_default2="MASK_GAS"
2726                         else
2727                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2728                         fi
2729                 fi
2730                 ;;
2731         arm*-*-*)
2732                 case "x$with_cpu" in
2733                         x)
2734                                 # The most generic
2735                                 target_cpu_default2="TARGET_CPU_generic"
2736                                 ;;
2738                         # Distinguish cores, and major variants
2739                         # arm7m doesn't exist, but D & I don't affect code
2740                         xarm[23678] | xarm250 | xarm[67][01]0 \
2741                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2742                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2743                         | xstrongarm | xstrongarm110)
2744                                 target_cpu_default2="TARGET_CPU_$with_cpu"
2745                                 ;;
2747                         xyes | xno)
2748                                 echo "--with-cpu must be passed a value" 1>&2
2749                                 exit 1
2750                                 ;;
2752                         *)
2753                                 if [[ x$pass2done = xyes ]]
2754                                 then
2755                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2756                                         exit 1
2757                                 fi
2758                                 ;;
2759                 esac
2760                 ;;
2762         mips*-*-ecoff* | mips*-*-elf*)
2763                 if [[ x$gas = xyes ]]
2764                 then
2765                         if [[ x$gnu_ld = xyes ]]
2766                         then
2767                                 target_cpu_default2=20
2768                         else
2769                                 target_cpu_default2=16
2770                         fi
2771                 fi
2772                 ;;
2773         mips*-*-*)
2774                 if [[ x$gas = xyes ]]
2775                 then
2776                         target_cpu_default2=16
2777                 fi
2778                 ;;
2779         powerpc*-*-* | rs6000-*-*)
2780                 case "x$with_cpu" in
2781                         x)
2782                                 ;;
2784                         xcommon | xpower | xpower2 | xpowerpc | xrios \
2785                           | xrios1 | xrios2 | xrsc | xrsc1 \
2786                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2787                           | x403 | x505 | x801 | x821 | x823 | x860)
2788                                 target_cpu_default2="\"$with_cpu\""
2789                                 ;;
2791                         xyes | xno)
2792                                 echo "--with-cpu must be passed a value" 1>&2
2793                                 exit 1
2794                                 ;;
2796                         *)
2797                                 if [[ x$pass2done = xyes ]]
2798                                 then
2799                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2800                                         exit 1
2801                                 fi
2802                                 ;;
2803                 esac
2804                 ;;
2805         sparc*-*-*)
2806                 case ".$with_cpu" in
2807                         .)
2808                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2809                                 ;;
2810                         .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2811                                 target_cpu_default2="TARGET_CPU_$with_cpu"
2812                                 ;;
2813                         *)
2814                                 if [[ x$pass2done = xyes ]]
2815                                 then
2816                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2817                                         exit 1
2818                                 fi
2819                                 ;;
2820                 esac
2821                 ;;
2822         esac
2824         if [[ x$target_cpu_default2 != x ]]
2825         then
2826                 if [[ x$target_cpu_default != x ]]
2827                 then
2828                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2829                 else
2830                         target_cpu_default=$target_cpu_default2
2831                 fi
2832         fi
2834         # No need for collect2 if we have the GNU linker.
2835         case x$gnu_ld in
2836         xyes)
2837                 use_collect2=
2838                 ;;
2839         esac
2841 # Save data on machine being used to compile GCC in build_xm_file.
2842 # Save data on host machine in vars host_xm_file and host_xmake_file.
2843         if [[ x$pass1done = x ]]
2844         then
2845                 if [[ x"$xm_file" = x ]]
2846                 then build_xm_file=$cpu_type/xm-$cpu_type.h
2847                 else build_xm_file=$xm_file
2848                 fi
2849                 build_xm_defines=$xm_defines
2850                 build_broken_install=$broken_install
2851                 build_install_headers_dir=$install_headers_dir
2852                 build_exeext=$exeext
2853                 pass1done=yes
2854         else
2855                 if [[ x$pass2done = x ]]
2856                 then
2857                         if [[ x"$xm_file" = x ]]
2858                         then host_xm_file=$cpu_type/xm-$cpu_type.h
2859                         else host_xm_file=$xm_file
2860                         fi
2861                         host_xm_defines=$xm_defines
2862                         if [[ x"$xmake_file" = x ]]
2863                         then xmake_file=$cpu_type/x-$cpu_type
2864                         fi
2865                         host_xmake_file="$xmake_file"
2866                         host_truncate_target=$truncate_target
2867                         host_extra_gcc_objs=$extra_gcc_objs
2868                         host_extra_objs=$extra_host_objs
2869                         pass2done=yes
2870                 fi
2871         fi
2872 done
2874 extra_objs="${host_extra_objs} ${extra_objs}"
2876 # Default the target-machine variables that were not explicitly set.
2877 if [[ x"$tm_file" = x ]]
2878 then tm_file=$cpu_type/$cpu_type.h; fi
2880 if [[ x$extra_headers = x ]]
2881 then extra_headers=; fi
2883 if [[ x"$xm_file" = x ]]
2884 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2886 md_file=$cpu_type/$cpu_type.md
2888 if [[ x$out_file = x ]]
2889 then out_file=$cpu_type/$cpu_type.c; fi
2891 if [[ x"$tmake_file" = x ]]
2892 then tmake_file=$cpu_type/t-$cpu_type
2895 if [[ x$float_format = x ]]
2896 then float_format=i64
2899 # Say what files are being used for the output code and MD file.
2900 echo "Using \`$srcdir/config/$out_file' to output insns."
2901 echo "Using \`$srcdir/config/$md_file' as machine description file."
2903 count=a
2904 for f in $tm_file; do
2905         count=${count}x
2906 done
2907 if [[ $count = ax ]]; then
2908         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2909 else
2910         echo "Using the following target machine macro files:"
2911         for f in $tm_file; do
2912                 echo "  $srcdir/config/$f"
2913         done
2916 count=a
2917 for f in $host_xm_file; do
2918         count=${count}x
2919 done
2920 if [[ $count = ax ]]; then
2921         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2922 else
2923         echo "Using the following host machine macro files:"
2924         for f in $host_xm_file; do
2925                 echo "  $srcdir/config/$f"
2926         done
2929 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2930         count=a
2931         for f in $build_xm_file; do
2932                 count=${count}x
2933         done
2934         if [[ $count = ax ]]; then
2935                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2936         else
2937                 echo "Using the following build machine macro files:"
2938                 for f in $build_xm_file; do
2939                         echo "  $srcdir/config/$f"
2940                 done
2941         fi
2944 if [[ x$thread_file = x ]]
2945 then thread_file='single'
2948 # Set up the header files.
2949 # $links is the list of header files to create.
2950 # $vars is the list of shell variables with file names to include.
2951 # auto-config.h is the file containing items generated by autoconf and is
2952 # the first file included by config.h.
2953 null_defines=
2954 host_xm_file="auto-config.h ${host_xm_file}"
2956 # If host=build, it is correct to have hconfig include auto-config.h
2957 # as well.  If host!=build, we are in error and need to do more 
2958 # work to find out the build config parameters.
2959 if test x$host = x$build
2960 then
2961         build_xm_file="auto-config.h ${build_xm_file}"
2962 else
2963         # We create a subdir, then run autoconf in the subdir.
2964         # To prevent recursion we set host and build for the new
2965         # invocation of configure to the build for this invocation
2966         # of configure. 
2967         tempdir=build.$$
2968         rm -rf $tempdir
2969         mkdir $tempdir
2970         cd $tempdir
2971         case ${srcdir} in
2972         /*) realsrcdir=${srcdir};;
2973         *) realsrcdir=../${srcdir};;
2974         esac
2975         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
2976                 --target=$target --host=$build --build=$build
2978         # We just finished tests for the build machine, so rename
2979         # the file auto-build.h in the gcc directory.
2980         mv auto-config.h ../auto-build.h
2981         cd ..
2982         rm -rf $tempdir
2983         build_xm_file="auto-build.h ${build_xm_file}"
2986 vars="host_xm_file tm_file xm_file build_xm_file"
2987 links="config.h tm.h tconfig.h hconfig.h"
2988 defines="host_xm_defines null_defines xm_defines build_xm_defines"
2990 rm -f config.bak
2991 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2993 # Make the links.
2994 while [[ -n "$vars" ]]
2996         set $vars; var=$1; shift; vars=$*
2997         set $links; link=$1; shift; links=$*
2998         set $defines; define=$1; shift; defines=$*
3000         rm -f $link
3002         # Define TARGET_CPU_DEFAULT if the system wants one.
3003         # This substitutes for lots of *.h files.
3004         if [[ x$target_cpu_default != x -a $link = tm.h ]]
3005         then
3006                 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
3007         fi
3009         for file in `eval echo '$'$var`; do
3010                 case $file in
3011                 auto-config.h)
3012                         ;;
3013                 *)
3014                         echo '#ifdef IN_GCC' >>$link
3015                         ;;
3016                 esac
3017                 echo "#include \"$file\"" >>$link
3018                 case $file in
3019                 auto-config.h)
3020                         ;;
3021                 *)
3022                         echo '#endif' >>$link
3023                         ;;
3024                 esac
3025         done
3027         for def in `eval echo '$'$define`; do
3028                 echo "#ifndef $def" >>$link
3029                 echo "#define $def" >>$link
3030                 echo "#endif" >>$link
3031         done
3032 done
3034 # If we have a CVS directory, set up a rule so verion.c will be made
3035 # from CVS tag information and use a dummy version number here if we
3036 # don't have version.c.
3038 version_dep=
3039 if [[ -d $srcdir/CVS ]]; then
3040         version_dep=ChangeLog
3043 if [[ ! -f $srcdir/version.c -a -d $srcdir/CVS ]]
3044 then
3045         version=unknown
3046 else
3047         # Get the version number from the toplevel
3048         version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
3051 # Internationalization
3052 PACKAGE=gcc
3053 VERSION="$version"
3054 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
3055 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
3056 AC_SUBST(PACKAGE)
3057 AC_SUBST(VERSION)
3059 ALL_LINGUAS="en_UK"
3061 # NLS support is still experimental, so disable it by default for now.
3062 AC_ARG_ENABLE(nls,
3063   [  --enable-nls            use Native Language Support (disabled by default)],
3064   , enable_nls=no)
3066 AM_GNU_GETTEXT
3067 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
3069 # Are we using gcc as the native compiler?
3070 case $host in
3071 *linux* | *cygwin32* | *mingw32*)
3072         if [[ x$prefix = xNONE ]]; then
3073                 prefix=$native_prefix
3074         fi
3075         ;;
3076 esac
3078 # Get an absolute path to the GCC top-level source directory
3079 holddir=`pwd`
3080 cd $srcdir
3081 topdir=`pwd`
3082 cd $holddir
3084 # Conditionalize the makefile for this host machine.
3085 # Make-host contains the concatenation of all host makefile fragments
3086 # [there can be more than one].  This file is built by configure.frag.
3087 host_overrides=Make-host
3088 dep_host_xmake_file=
3089 for f in .. ${host_xmake_file}
3091         if [[ -f ${srcdir}/config/$f ]]
3092         then
3093                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3094         fi
3095 done
3097 # Conditionalize the makefile for this target machine.
3098 # Make-target contains the concatenation of all host makefile fragments
3099 # [there can be more than one].  This file is built by configure.frag.
3100 target_overrides=Make-target
3101 dep_tmake_file=
3102 for f in .. ${tmake_file}
3104         if [[ -f ${srcdir}/config/$f ]]
3105         then
3106                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3107         fi
3108 done
3110 # If the host doesn't support symlinks, modify CC in
3111 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3112 # Otherwise, we can use "CC=$(CC)".
3113 rm -f symtest.tem
3114 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
3115 then
3116         cc_set_by_configure="\$(CC)"
3117         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3118 else
3119         rm -f symtest.tem
3120         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3121         then
3122                 symbolic_link="cp -p"
3123         else
3124                 symbolic_link="cp"
3125         fi
3126         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3127         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3129 rm -f symtest.tem
3131 out_object_file=`basename $out_file .c`.o
3133 tm_file_list=
3134 for f in $tm_file; do
3135         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3136 done
3138 host_xm_file_list=
3139 for f in $host_xm_file; do
3140         if [[ $f != "auto-config.h" ]]; then
3141                 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3142         else
3143                 host_xm_file_list="${host_xm_file_list} $f"
3144         fi
3145 done
3147 build_xm_file_list=
3148 for f in $build_xm_file; do
3149         if [[ $f != "auto-config.h" -a $f != "auto-build.h" ]]; then
3150                 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3151         else
3152                 build_xm_file_list="${build_xm_file_list} $f"
3153         fi
3154 done
3156 # Define macro CROSS_COMPILE in compilation
3157 # if this is a cross-compiler.
3158 # Also use all.cross instead of all.internal
3159 # and add cross-make to Makefile.
3160 cross_overrides="/dev/null"
3161 if [[ x$host != x$target ]]
3162 then
3163         cross_defines="CROSS=-DCROSS_COMPILE"
3164         cross_overrides="${topdir}/cross-make"
3167 # When building gcc with a cross-compiler, we need to fix a few things.
3168 # This must come after cross-make as we want all.build to override
3169 # all.cross.
3170 build_overrides="/dev/null"
3171 if [[ x$build != x$host ]]
3172 then
3173         build_overrides="${topdir}/build-make"
3176 # Expand extra_headers to include complete path.
3177 # This substitutes for lots of t-* files.
3178 extra_headers_list=
3179 if [[ "x$extra_headers" = x ]]
3180 then true
3181 else
3182         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3183         for file in $extra_headers;
3184         do
3185                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3186         done
3189 # Add a definition of USE_COLLECT2 if system wants one.
3190 # Also tell toplev.c what to do.
3191 # This substitutes for lots of t-* files.
3192 if [[ x$use_collect2 = x ]]
3193 then
3194         will_use_collect2=
3195         maybe_use_collect2=
3196 else
3197         will_use_collect2="ld"
3198         maybe_use_collect2="-DUSE_COLLECT2"
3201 # NEED TO CONVERT
3202 # Set MD_DEPS if the real md file is in md.pre-cpp.
3203 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
3204 # for line oriented comments, so we must always use a GNU cpp.  If
3205 # building gcc with a cross compiler, use the cross compiler just
3206 # built.  Otherwise, we can use the cpp just built.
3207 md_file_sub=
3208 if [[ "x$md_cppflags" = x ]]
3209 then
3210         md_file_sub=$srcdir/config/$md_file
3211 else
3212         md_file=md
3215 # If we have gas in the build tree, make a link to it.
3216 if [[ -f ../gas/Makefile ]]; then
3217         rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
3220 # If we have ld in the build tree, make a link to it.
3221 if [[ -f ../ld/Makefile ]]; then
3222         if [[ x$use_collect2 = x ]]; then
3223                 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
3224         else
3225                 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
3226         fi
3229 # Figure out what language subdirectories are present.
3230 subdirs=
3231 for lang in ${srcdir}/*/config-lang.in ..
3233         case $lang in
3234         ..) ;;
3235         # The odd quoting in the next line works around
3236         # an apparent bug in bash 1.12 on linux.
3237         ${srcdir}/[[*]]/config-lang.in) ;;
3238         *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3239         esac
3240 done
3242 # Make empty files to contain the specs and options for each language.
3243 # Then add #include lines to for a compiler that has specs and/or options.
3245 lang_specs_files=
3246 lang_options_files=
3247 rm -f specs.h options.h
3248 touch specs.h options.h
3249 for subdir in . $subdirs
3251         if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3252                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3253                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3254         fi
3255         if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3256                 echo "#include \"$subdir/lang-options.h\"" >>options.h
3257                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3258         fi
3259 done
3261 # These (without "all_") are set in each config-lang.in.
3262 # `language' must be a single word so is spelled singularly.
3263 all_languages=
3264 all_boot_languages=
3265 all_compilers=
3266 all_stagestuff=
3267 all_diff_excludes=
3268 all_outputs='Makefile intl/Makefile po/Makefile.in'
3269 # List of language makefile fragments.
3270 all_lang_makefiles=
3271 all_headers=
3272 all_lib2funcs=
3274 # Add the language fragments.
3275 # Languages are added via two mechanisms.  Some information must be
3276 # recorded in makefile variables, these are defined in config-lang.in.
3277 # We accumulate them and plug them into the main Makefile.
3278 # The other mechanism is a set of hooks for each of the main targets
3279 # like `clean', `install', etc.
3281 language_fragments="Make-lang"
3282 language_hooks="Make-hooks"
3283 oldstyle_subdirs=
3285 for s in .. $subdirs
3287         if [[ $s != ".." ]]
3288         then
3289                 language=
3290                 boot_language=
3291                 compilers=
3292                 stagestuff=
3293                 diff_excludes=
3294                 headers=
3295                 outputs=
3296                 lib2funcs=
3297                 . ${srcdir}/$s/config-lang.in
3298                 if [[ "x$language" = x ]]
3299                 then
3300                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3301                         exit 1
3302                 fi
3303                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3304                 all_languages="$all_languages $language"
3305                 if [[ "x$boot_language" = xyes ]]
3306                 then
3307                         all_boot_languages="$all_boot_languages $language"
3308                 fi
3309                 all_compilers="$all_compilers $compilers"
3310                 all_stagestuff="$all_stagestuff $stagestuff"
3311                 all_diff_excludes="$all_diff_excludes $diff_excludes"
3312                 all_headers="$all_headers $headers"
3313                 all_outputs="$all_outputs $outputs"
3314                 if [[ x$outputs = x ]]
3315                 then
3316                         oldstyle_subdirs="$oldstyle_subdirs $s"
3317                 fi
3318                 all_lib2funcs="$all_lib2funcs $lib2funcs"
3319         fi
3320 done
3322 # Since we can't use `::' targets, we link each language in
3323 # with a set of hooks, reached indirectly via lang.${target}.
3325 rm -f Make-hooks
3326 touch Make-hooks
3327 target_list="all.build all.cross start.encap rest.encap \
3328         info dvi \
3329         install-normal install-common install-info install-man \
3330         uninstall distdir \
3331         mostlyclean clean distclean extraclean maintainer-clean \
3332         stage1 stage2 stage3 stage4"
3333 for t in $target_list
3335         x=
3336         for lang in .. $all_languages
3337         do
3338                 if [[ $lang != ".." ]]; then
3339                         x="$x $lang.$t"
3340                 fi
3341         done
3342         echo "lang.$t: $x" >> Make-hooks
3343 done
3345 # If we're not building in srcdir, create .gdbinit.
3347 if [[ ! -f Makefile.in ]]; then
3348         echo "dir ." > .gdbinit
3349         echo "dir ${srcdir}" >> .gdbinit
3350         if [[ x$gdb_needs_out_file_path = xyes ]]
3351         then
3352                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3353         fi
3354         if [[ "x$subdirs" != x ]]; then
3355                 for s in $subdirs
3356                 do
3357                         echo "dir ${srcdir}/$s" >> .gdbinit
3358                 done
3359         fi
3360         echo "source ${srcdir}/.gdbinit" >> .gdbinit
3363 # Process the language and host/target makefile fragments.
3364 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3366 # Substitute configuration variables
3367 AC_SUBST(subdirs)
3368 AC_SUBST(all_languages)
3369 AC_SUBST(all_boot_languages)
3370 AC_SUBST(all_compilers)
3371 AC_SUBST(all_lang_makefiles)
3372 AC_SUBST(all_stagestuff)
3373 AC_SUBST(all_diff_excludes)
3374 AC_SUBST(all_lib2funcs)
3375 AC_SUBST(all_headers)
3376 AC_SUBST(extra_passes)
3377 AC_SUBST(extra_programs)
3378 AC_SUBST(extra_parts)
3379 AC_SUBST(extra_c_objs)
3380 AC_SUBST(extra_c_flags)
3381 AC_SUBST(extra_objs)
3382 AC_SUBST(host_extra_gcc_objs)
3383 AC_SUBST(extra_headers_list)
3384 AC_SUBST(dep_host_xmake_file)
3385 AC_SUBST(dep_tmake_file)
3386 AC_SUBST(out_file)
3387 AC_SUBST(out_object_file)
3388 AC_SUBST(md_file)
3389 AC_SUBST(tm_file_list)
3390 AC_SUBST(build_xm_file_list)
3391 AC_SUBST(host_xm_file_list)
3392 AC_SUBST(lang_specs_files)
3393 AC_SUBST(lang_options_files)
3394 AC_SUBST(thread_file)
3395 AC_SUBST(version)
3396 AC_SUBST(local_prefix)
3397 AC_SUBST(gxx_include_dir)
3398 AC_SUBST(fixincludes)
3399 AC_SUBST(build_install_headers_dir)
3400 AC_SUBST(build_exeext)
3401 AC_SUBST(float_format)
3402 AC_SUBST(will_use_collect2)
3403 AC_SUBST(maybe_use_collect2)
3404 AC_SUBST(cc_set_by_configure)
3405 AC_SUBST(stage_prefix_set_by_configure)
3406 AC_SUBST(symbolic_link)
3407 AC_SUBST(version_dep)
3409 AC_SUBST_FILE(target_overrides)
3410 AC_SUBST_FILE(host_overrides)
3411 AC_SUBST(cross_defines)
3412 AC_SUBST_FILE(cross_overrides)
3413 AC_SUBST_FILE(build_overrides)
3414 AC_SUBST_FILE(language_fragments)
3415 AC_SUBST_FILE(language_hooks)
3417 # Echo that links are built
3418 if [[ x$host = x$target ]]
3419 then
3420         str1="native "
3421 else
3422         str1="cross-"
3423         str2=" from $host"
3426 if [[ x$host != x$build ]]
3427 then
3428         str3=" on a $build system"
3431 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3432 then
3433         str4=
3436 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3438 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3439 then
3440         echo " ${str2}${str3}." 1>&2
3443 # Truncate the target if necessary
3444 if [[ x$host_truncate_target != x ]]; then
3445         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3448 # Configure the subdirectories
3449 # AC_CONFIG_SUBDIRS($subdirs)
3451 # Create the Makefile
3452 # and configure language subdirectories
3453 AC_OUTPUT($all_outputs,
3455 . $srcdir/configure.lang
3456 case x$CONFIG_HEADERS in
3457 xauto-config.h:config.in)
3458 echo > cstamp-h ;;
3459 esac
3460 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3461 # bootstrapping and the installation procedure can still use
3462 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
3463 # FLAGS_TO_PASS has been modified to solve the problem there.
3464 # This is virtually a duplicate of what happens in configure.lang; we do
3465 # an extra check to make sure this only happens if ln -s can be used.
3466 if [[ "$symbolic_link" = "ln -s" ]]; then
3467  for d in .. ${subdirs} ; do
3468    if [[ $d != .. ]]; then
3469         STARTDIR=`pwd`
3470         cd $d
3471         for t in stage1 stage2 stage3 stage4 include
3472         do
3473                 rm -f $t
3474                 $symbolic_link ../$t $t 2>/dev/null
3475         done
3476         cd $STARTDIR
3477    fi
3478  done
3479 else true ; fi
3480 # Avoid having to add intl to our include paths.
3481 if test -f intl/libintl.h; then
3482   echo creating libintl.h
3483   echo '#include "intl/libintl.h"' >libintl.h
3487 host='${host}'
3488 build='${build}'
3489 target='${target}'
3490 target_alias='${target_alias}'
3491 srcdir='${srcdir}'
3492 subdirs='${subdirs}'
3493 oldstyle_subdirs='${oldstyle_subdirs}'
3494 symbolic_link='${symbolic_link}'
3495 version_dep='${version_dep}'
3496 program_transform_set='${program_transform_set}'
3497 program_transform_name='${program_transform_name}'
3498 dep_host_xmake_file='${dep_host_xmake_file}'
3499 host_xmake_file='${host_xmake_file}'
3500 dep_tmake_file='${dep_tmake_file}'
3501 tmake_file='${tmake_file}'
3502 thread_file='${thread_file}'
3503 version='${version}'
3504 local_prefix='${local_prefix}'
3505 build_install_headers_dir='${build_install_headers_dir}'
3506 build_exeext='${build_exeext}'
3507 out_file='${out_file}'
3508 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3509 SET_MAKE='${SET_MAKE}'
3510 build_broken_install='${build_broken_install}'
3511 target_list='${target_list}'
3512 target_overrides='${target_overrides}'
3513 host_overrides='${host_overrides}'
3514 cross_defines='${cross_defines}'
3515 cross_overrides='${cross_overrides}'
3516 build_overrides='${build_overrides}'