OSDN Git Service

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