OSDN Git Service

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