OSDN Git Service

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