OSDN Git Service

* configure.in: Use --enable-checking=misc,tree,gc by default if
[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, 1999, 2000 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.13)
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 gcc. 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 gcc. 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 $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
102     gnu_ld_flag=yes
103   fi
104   AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER",
105         [Define to enable the use of a default linker.])
106 fi
107
108 # With GNU as
109 AC_ARG_WITH(gnu-as,
110 [  --with-gnu-as           arrange to work with GNU as.],
111 gas_flag="$with_gnu_as",
112 gas_flag=no)
113
114 AC_ARG_WITH(as,
115 [  --with-as               arrange to use the specified as (full pathname).],
116 DEFAULT_ASSEMBLER="$with_as")
117 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
118   if test ! -x "$DEFAULT_ASSEMBLER"; then
119     AC_MSG_WARN([cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER])
120   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
121     gas_flag=yes
122   fi
123   AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER",
124         [Define to enable the use of a default assembler.])
125 fi
126
127 # With stabs
128 AC_ARG_WITH(stabs,
129 [  --with-stabs            arrange to use stabs instead of host debug format.],
130 stabs="$with_stabs",
131 stabs=no)
132
133 # With ELF
134 AC_ARG_WITH(elf,
135 [  --with-elf              arrange to use ELF instead of host debug format.],
136 elf="$with_elf",
137 elf=no)
138
139 # Specify the local prefix
140 local_prefix=
141 AC_ARG_WITH(local-prefix,
142 [  --with-local-prefix=DIR specifies directory to put local include.],
143 [case "${withval}" in
144 yes)    AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
145 no)     ;;
146 *)      local_prefix=$with_local_prefix ;;
147 esac])
148
149 # Default local prefix if it is empty
150 if test x$local_prefix = x; then
151         local_prefix=/usr/local
152 fi
153
154 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
155 # passed in by the toplevel make and thus we'd get different behavior
156 # depending on where we built the sources.
157 gcc_gxx_include_dir=
158 # Specify the g++ header file directory
159 AC_ARG_WITH(gxx-include-dir,
160 [  --with-gxx-include-dir=DIR
161                           specifies directory to put g++ header files.],
162 [case "${withval}" in
163 yes)    AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
164 no)     ;;
165 *)      gcc_gxx_include_dir=$with_gxx_include_dir ;;
166 esac])
167
168 if test x${gcc_gxx_include_dir} = x; then
169   if test x${enable_version_specific_runtime_libs} = xyes; then
170     gcc_gxx_include_dir='${libsubdir}/include/g++'
171   else
172     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
173 changequote(<<, >>)dnl
174     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
175 changequote([, ])dnl
176   fi
177 fi
178
179 # Enable expensive internal checks
180 AC_ARG_ENABLE(checking,
181 [  --enable-checking[=LIST]
182                           enable expensive run-time checks.  With LIST,
183                           enable only specific categories of checks.
184                           Categories are: misc,tree,rtl,gc,gcac; default
185                           is misc,tree,rtl],
186 [ac_checking=
187 ac_tree_checking=
188 ac_rtl_checking=
189 ac_gc_checking=
190 ac_gc_always_collect=
191 case "${enableval}" in
192 yes)    ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
193 no)     ;;
194 *)      IFS="${IFS=     }"; ac_save_IFS="$IFS" IFS="$IFS,"
195         set fnord $enableval; shift
196         IFS="$ac_save_IFS"
197         for check
198         do
199                 case $check in
200                 misc)   ac_checking=1 ;;
201                 tree)   ac_tree_checking=1 ;;
202                 rtl)    ac_rtl_checking=1 ;;
203                 gc)     ac_gc_checking=1 ;;
204                 gcac)   ac_gc_always_collect=1 ;;
205                 *)      AC_MSG_ERROR(unknown check category $check) ;;
206                 esac
207         done
208         ;;
209 esac
210 ], 
211 # Enable some checks by default for development versions of GCC
212 [ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;])
213 if test x$ac_checking != x ; then
214   AC_DEFINE(ENABLE_CHECKING, 1,
215 [Define if you want more run-time sanity checks.  This one gets a grab
216    bag of miscellaneous but relatively cheap checks.])
217 fi
218 if test x$ac_tree_checking != x ; then
219   AC_DEFINE(ENABLE_TREE_CHECKING, 1,
220 [Define if you want all operations on trees (the basic data
221    structure of the front ends) to be checked for dynamic type safety
222    at runtime.  This is moderately expensive.])
223 fi
224 if test x$ac_rtl_checking != x ; then
225   AC_DEFINE(ENABLE_RTL_CHECKING, 1,
226 [Define if you want all operations on RTL (the basic data structure
227    of the optimizer and back end) to be checked for dynamic type safety
228    at runtime.  This is quite expensive.])
229 fi
230 if test x$ac_gc_checking != x ; then
231   AC_DEFINE(ENABLE_GC_CHECKING, 1,
232 [Define if you want the garbage collector to do object poisoning and
233    other memory allocation checks.  This is quite expensive.])
234 fi
235 if test x$ac_gc_always_collect != x ; then
236   AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT, 1,
237 [Define if you want the garbage collector to operate in maximally
238    paranoid mode, validating the entire heap and collecting garbage at
239    every opportunity.  This is extremely expensive.])
240 fi
241
242
243 AC_ARG_ENABLE(cpp,
244 [  --disable-cpp           don't provide a user-visible C preprocessor.],
245 [], [enable_cpp=yes])
246
247 AC_ARG_WITH(cpp_install_dir,
248 [  --with-cpp-install-dir=DIR
249                           install the user visible C preprocessor in DIR
250                           (relative to PREFIX) as well as PREFIX/bin.],
251 [if test x$withval = xyes; then
252   AC_MSG_ERROR([option --with-cpp-install-dir requires an argument])
253 elif test x$withval != xno; then
254   cpp_install_dir=$withval
255 fi])
256
257 dnl Disable this for the moment; the library interface is changing.
258 dnl # Link cpplib into the compiler proper, for C/C++/ObjC.
259 dnl AC_ARG_ENABLE(c-cpplib,
260 dnl [  --enable-c-cpplib       link cpplib directly into C and C++ compilers
261 dnl                           (EXPERIMENTAL) (implies --enable-cpplib).],
262 dnl if test x$enable_c_cpplib != xno; then
263 dnl  extra_c_objs="${extra_c_objs} libcpp.a"
264 dnl  extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
265 dnl  extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
266 dnl fi)
267
268 # Enable Multibyte Characters for C/C++
269 AC_ARG_ENABLE(c-mbchar,
270 [  --enable-c-mbchar       Enable multibyte characters for C and C++.],
271 if test x$enable_c_mbchar != xno; then
272   extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
273 fi)
274   
275 # Enable threads
276 # Pass with no value to take the default
277 # Pass with a value to specify a thread package
278 AC_ARG_ENABLE(threads,
279 [  --enable-threads        enable thread usage for target GCC.
280   --enable-threads=LIB    use LIB thread package for target GCC.],
281 if test x$enable_threads = xno; then
282         enable_threads=''
283 fi,
284 enable_threads='')
285
286 enable_threads_flag=$enable_threads
287 # Check if a valid thread package
288 case x${enable_threads_flag} in
289         x | xno)
290                 # No threads
291                 target_thread_file='single'
292                 ;;
293         xyes)
294                 # default
295                 target_thread_file=''
296                 ;;
297         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
298         xsolaris | xwin32 | xdce | xvxworks)
299                 target_thread_file=$enable_threads_flag
300                 ;;
301         *)
302                 echo "$enable_threads is an unknown thread package" 1>&2
303                 exit 1
304                 ;;
305 esac
306
307 AC_ARG_ENABLE(objc-gc,
308 [  --enable-objc-gc       enable the use of Boehm's garbage collector with
309                           the GNU Objective-C runtime.],
310 if test x$enable_objc_gc = xno; then
311         objc_boehm_gc=''
312 else
313         objc_boehm_gc=1
314 fi,
315 objc_boehm_gc='')
316
317 AC_ARG_WITH(dwarf2,
318 [  --with-dwarf2          force the default debug format to be DWARF2.],
319 dwarf2="$with_dwarf2",
320 dwarf2=no)
321
322 # Determine the host, build, and target systems
323 AC_CANONICAL_SYSTEM
324
325 # Find the native compiler
326 AC_PROG_CC
327 AC_PROG_CC_C_O
328 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
329   NO_MINUS_C_MINUS_O=yes
330 fi
331 AC_SUBST(NO_MINUS_C_MINUS_O)
332
333 gcc_AC_C_LONG_DOUBLE
334
335 AC_MSG_CHECKING(whether ${CC-cc} accepts -Wno-long-long)
336 echo 'void f(){}' > conftest.c
337 if test -z "`${CC-cc} -Wno-long-long -c conftest.c 2>&1`"; then
338   ac_cv_prog_cc_no_long_long=yes
339 else
340   ac_cv_prog_cc_no_long_long=no
341 fi
342 rm -f conftest*
343 echo "$ac_t"$ac_cv_prog_cc_no_long_long 1>&6
344
345 # If the native compiler is GCC, we can enable warnings even in stage1.  
346 # That's useful for people building cross-compilers, or just running a
347 # quick `make'.
348 stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
349 stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
350 if test "x$GCC" = "xyes"; then 
351   if test $ac_cv_prog_cc_no_long_long = yes; then
352     stage1_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
353   fi
354 else
355   stage1_warn_cflags=""
356 fi
357 AC_SUBST(stage1_warn_cflags)
358 AC_SUBST(stage2_warn_cflags)
359
360 AC_PROG_MAKE_SET
361
362 AC_MSG_CHECKING([whether a default assembler was specified])
363 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
364     if test x"$gas_flag" = x"no"; then
365         AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
366     else
367         AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
368     fi
369 else
370     AC_MSG_RESULT(no)
371 fi
372
373 AC_MSG_CHECKING([whether a default linker was specified])
374 if test x"${DEFAULT_LINKER+set}" = x"set"; then
375     if test x"$gnu_ld_flag" = x"no"; then
376         AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
377     else
378         AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
379     fi
380 else
381     AC_MSG_RESULT(no)
382 fi
383
384 AC_C_INLINE
385
386 # Find some useful tools
387 AC_PROG_AWK
388 AC_PROG_LEX
389 gcc_AC_PROG_LN
390 gcc_AC_PROG_LN_S
391 gcc_AC_C_VOLATILE
392 AC_PROG_RANLIB
393 AC_PROG_YACC
394 gcc_AC_PROG_INSTALL
395
396 AC_HEADER_STDC
397 AC_HEADER_TIME
398 gcc_AC_HEADER_STRING
399 AC_HEADER_SYS_WAIT
400 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
401                  fcntl.h unistd.h stab.h sys/file.h sys/time.h \
402                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
403                  direct.h malloc.h)
404
405 # Check for thread headers.
406 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
407 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
408
409 # See if GNAT has been installed
410 AC_CHECK_PROG(gnat, gnatbind, yes, no)
411
412 # Do we have a single-tree copy of texinfo?
413 if test -f $srcdir/../texinfo/Makefile.in; then
414   MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
415   gcc_cv_prog_makeinfo_modern=yes
416   AC_MSG_RESULT([Using makeinfo from the unified source tree.])
417 else
418   # See if makeinfo has been installed and is modern enough
419   # that we can use it.
420   gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
421   [GNU texinfo.* \([0-9][0-9.]*\)],
422   [3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]])
423 fi
424
425 if test $gcc_cv_prog_makeinfo_modern = no; then
426   AC_MSG_WARN([
427 *** Makeinfo is missing or too old.
428 *** Info documentation will not be built or installed.])
429   BUILD_INFO=
430   INSTALL_INFO=
431 else
432   BUILD_INFO=info               AC_SUBST(BUILD_INFO)
433   INSTALL_INFO=install-info     AC_SUBST(INSTALL_INFO)
434 fi
435
436 # See if the stage1 system preprocessor understands the ANSI C
437 # preprocessor stringification operator.
438 AC_C_STRINGIZE
439
440 # Use <inttypes.h> only if it exists,
441 # doesn't clash with <sys/types.h>, and declares intmax_t.
442 AC_MSG_CHECKING(for inttypes.h)
443 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
444 [AC_TRY_COMPILE(
445   [#include <sys/types.h>
446 #include <inttypes.h>],
447   [intmax_t i = -1;],
448   [gcc_cv_header_inttypes_h=yes],
449   gcc_cv_header_inttypes_h=no)])
450 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
451 if test $gcc_cv_header_inttypes_h = yes; then
452   AC_DEFINE(HAVE_INTTYPES_H, 1,
453         [Define if you have a working <inttypes.h> header file.])
454 fi
455
456 #
457 # Determine if enumerated bitfields are unsigned.   ISO C says they can 
458 # be either signed or unsigned.
459 #
460 AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
461 [AC_TRY_RUN(#include <stdlib.h>
462 enum t { BLAH = 128 } ;
463 struct s_t { enum t member : 8; } s ;
464 int main(void)
465 {            
466         s.member = BLAH;
467         if (s.member < 0) exit(1);
468         exit(0);
469
470 }, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
471 if test $gcc_cv_enum_bf_unsigned = yes; then
472   AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
473     [Define if enumerated bitfields are treated as unsigned values.])
474 fi
475
476 AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
477         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
478         sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
479         fputs_unlocked getrusage valloc)
480
481 AC_CHECK_TYPE(ssize_t, int)
482
483 AC_TYPE_GETGROUPS
484
485 gcc_AC_FUNC_VFPRINTF_DOPRNT
486 gcc_AC_FUNC_PRINTF_PTR
487
488 case "${host}" in
489 *-*-uwin*)
490   # Under some versions of uwin, vfork is notoriously buggy and the test 
491   # can hang configure; on other versions, vfork exists just as a stub.
492   # FIXME: This should be removed once vfork in uwin's runtime is fixed.
493   ac_cv_func_vfork_works=no
494   ;;
495 esac
496 AC_FUNC_VFORK
497 AC_FUNC_MMAP_ANYWHERE
498 AC_FUNC_MMAP_FILE
499
500 # We will need to find libiberty.h and ansidecl.h
501 saved_CFLAGS="$CFLAGS"
502 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
503 gcc_AC_CHECK_DECLS(bcopy bzero bcmp \
504         index rindex getenv atol sbrk abort atof getcwd getwd \
505         strsignal putc_unlocked fputs_unlocked strstr environ \
506         malloc realloc calloc free basename getopt, , ,[
507 #include "gansidecl.h"
508 #include "system.h"])
509
510 gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[
511 #include "gansidecl.h"
512 #include "system.h"
513 #ifdef HAVE_SYS_RESOURCE_H
514 #include <sys/resource.h>
515 #endif
516 ])
517
518 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
519 CFLAGS="$saved_CFLAGS"
520
521 # mkdir takes a single argument on some systems. 
522 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
523
524 # File extensions
525 manext='.1'
526 objext='.o'
527 AC_SUBST(manext)
528 AC_SUBST(objext)
529
530 build_xm_file=
531 build_xm_defines=
532 build_install_headers_dir=install-headers-tar
533 build_exeext=
534 host_xm_file=
535 host_xm_defines=
536 host_xmake_file=
537 host_truncate_target=
538 host_exeext=
539
540 # Decode the host machine, then the target machine.
541 # For the host machine, we save the xm_file variable as host_xm_file;
542 # then we decode the target machine and forget everything else
543 # that came from the host machine.
544 for machine in $build $host $target; do
545
546         out_file=
547         xmake_file=
548         tmake_file=
549         extra_headers=
550         extra_passes=
551         extra_parts=
552         extra_programs=
553         extra_objs=
554         extra_host_objs=
555         extra_gcc_objs=
556         xm_defines=
557         float_format=
558         # Set this to force installation and use of collect2.
559         use_collect2=
560         # Set this to override the default target model.
561         target_cpu_default=
562         # Set this to control how the header file directory is installed.
563         install_headers_dir=install-headers-tar
564         # Set this to a non-empty list of args to pass to cpp if the target
565         # wants its .md file passed through cpp.
566         md_cppflags=
567         # Set this if directory names should be truncated to 14 characters.
568         truncate_target=
569         # Set this if gdb needs a dir command with `dirname $out_file`
570         gdb_needs_out_file_path=
571         # Set this if the build machine requires executables to have a
572         # file name suffix.
573         exeext=
574         # Set this to control which thread package will be used.
575         thread_file=
576         # Reinitialize these from the flag values every loop pass, since some
577         # configure entries modify them.
578         gas="$gas_flag"
579         gnu_ld="$gnu_ld_flag"
580         enable_threads=$enable_threads_flag
581
582         # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
583         # updated in each machine entry.
584         tm_p_file=
585         cpu_type=`echo $machine | sed 's/-.*$//'`
586         case $machine in
587         alpha*-*-*)
588                 cpu_type=alpha
589                 ;;
590         strongarm*-*-*)
591                 cpu_type=arm
592                 ;;
593         arm*-*-*)
594                 cpu_type=arm
595                 ;;
596         c*-convex-*)
597                 cpu_type=convex
598                 ;;
599 changequote(,)dnl
600         i[34567]86-*-*)
601 changequote([,])dnl
602                 cpu_type=i386
603                 ;;
604         hppa*-*-*)
605                 cpu_type=pa
606                 ;;
607         m68000-*-*)
608                 cpu_type=m68k
609                 ;;
610         mips*-*-*)
611                 cpu_type=mips
612                 ;;
613         pj*-*-*)
614                 cpu_type=pj
615                 ;;
616         powerpc*-*-*)
617                 cpu_type=rs6000
618                 ;;
619         pyramid-*-*)
620                 cpu_type=pyr
621                 ;;
622         sparc*-*-*)
623                 cpu_type=sparc
624                 ;;
625         esac
626
627         tm_file=${cpu_type}/${cpu_type}.h
628         xm_file=${cpu_type}/xm-${cpu_type}.h
629         if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
630         then
631                 tm_p_file=${cpu_type}/${cpu_type}-protos.h;
632         fi
633         # On a.out targets, we need to use collect2.
634         case $machine in
635         *-*-*aout*)
636                 use_collect2=yes
637                 ;;
638         esac    
639
640         # Common parts for linux-gnu and openbsd systems
641         case $machine in
642         *-*-linux-gnu*)
643                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
644                 ;;
645         *-*-openbsd*)
646                 tm_file=${cpu_type}/openbsd.h
647                 tmake_file="t-libc-ok t-openbsd"
648                 # avoid surprises, always provide an xm-openbsd file 
649                 xm_file=${cpu_type}/xm-openbsd.h
650                 # don't depend on processor x-fragments as well
651                 xmake_file=none
652                 if test x$enable_threads = xyes; then
653                         thread_file='posix'
654                         tmake_file="${tmake_file} t-openbsd-thread"
655                 fi
656                 ;;
657         esac
658
659         case $machine in
660         # Support site-specific machine types.
661         *local*)
662                 cpu_type=`echo $machine | sed -e 's/-.*//'`
663                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
664                 xm_file=${cpu_type}/xm-$rest.h
665                 tm_file=${cpu_type}/$rest.h
666                 if test -f $srcdir/config/${cpu_type}/x-$rest; \
667                 then xmake_file=${cpu_type}/x-$rest; \
668                 else true; \
669                 fi
670                 if test -f $srcdir/config/${cpu_type}/t-$rest; \
671                 then tmake_file=${cpu_type}/t-$rest; \
672                 else true; \
673                 fi
674                 ;;
675         1750a-*-*)
676                 ;;
677         a29k-*-bsd* | a29k-*-sym1*)
678                 tm_file="${tm_file} a29k/unix.h"
679                 xm_defines=USG
680                 xmake_file=a29k/x-unix
681                 use_collect2=yes
682                 ;;
683         a29k-*-udi | a29k-*-coff)
684                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
685                 tmake_file=a29k/t-a29kbare
686                 ;;
687         a29k-wrs-vxworks*)
688                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
689                 tmake_file=a29k/t-vx29k
690                 extra_parts="crtbegin.o crtend.o"
691                 thread_file='vxworks'
692                 ;;
693         a29k-*-*)                       # Default a29k environment.
694                 use_collect2=yes
695                 ;;
696         alpha-*-interix)
697                 tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
698
699                 # GAS + IEEE_CONFORMANT+IEEE (no inexact);
700                 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
701
702                 # GAS + IEEE_CONFORMANT
703                 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
704
705                 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
706                 xmake_file="x-interix alpha/t-pe"
707                 tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
708                 if test x$enable_threads = xyes ; then
709                         thread_file='posix'
710                 fi
711                 if test x$stabs = xyes ; then
712                         tm_file="${tm_file} dbxcoff.h"
713                 fi
714                 #prefix='$$INTERIX_ROOT'/usr/contrib
715                 #local_prefix='$$INTERIX_ROOT'/usr/contrib
716                 ;;
717         alpha*-*-linux-gnuecoff*)
718                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
719                 target_cpu_default="MASK_GAS"
720                 tmake_file="alpha/t-alpha alpha/t-ieee"
721                 gas=no
722                 xmake_file=none
723                 gas=yes gnu_ld=yes
724                 ;;
725         alpha*-*-linux-gnulibc1*)
726                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
727                 target_cpu_default="MASK_GAS"
728                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-ieee"
729                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
730                 xmake_file=none
731                 gas=yes gnu_ld=yes
732                 if test x$enable_threads = xyes; then
733                         thread_file='posix'
734                 fi
735                 ;;
736         alpha*-*-linux-gnu*)
737                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
738                 target_cpu_default="MASK_GAS"
739                 tmake_file="t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
740                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
741                 xmake_file=none
742                 gas=yes gnu_ld=yes
743                 if test x$enable_threads = xyes; then
744                         thread_file='posix'
745                 fi
746                 ;;
747         alpha*-*-netbsd*)
748                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
749                 target_cpu_default="MASK_GAS"
750                 tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
751                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
752                 xmake_file=none
753                 gas=yes gnu_ld=yes
754                 ;;
755
756         alpha*-*-openbsd*)
757                 # default x-alpha is only appropriate for dec-osf.
758                 target_cpu_default="MASK_GAS"
759                 tmake_file="alpha/t-alpha alpha/t-ieee"
760                 ;;
761                 
762         alpha*-dec-osf*)
763                 if test x$stabs = xyes
764                 then
765                         tm_file="${tm_file} dbx.h"
766                 fi
767                 if test x$gas != xyes
768                 then
769                         extra_passes="mips-tfile mips-tdump"
770                 fi
771                 use_collect2=yes
772                 tmake_file="alpha/t-alpha alpha/t-ieee"
773                 case $machine in
774                   *-*-osf1*)
775                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
776                     ;;
777 changequote(,)dnl
778                   *-*-osf[23]*)
779 changequote([,])dnl
780                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
781                     ;;
782                   *-*-osf4*)
783                     tm_file="${tm_file} alpha/osf.h"
784                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
785                     # a broken tar, so we use cpio instead.
786                     install_headers_dir=install-headers-cpio
787                     ;;
788                   *-*-osf5*)
789                     tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
790                     ;;
791                 esac
792                 case $machine in
793 changequote(,)dnl
794                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
795 changequote([,])dnl
796                     target_cpu_default=MASK_SUPPORT_ARCH
797                     ;;
798                 esac
799                 ;;
800         alpha*-*-vxworks*)
801                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
802                 tmake_file="alpha/t-alpha alpha/t-ieee"
803                 if [ x$gas != xyes ]
804                 then
805                         extra_passes="mips-tfile mips-tdump"
806                 fi
807                 use_collect2=yes
808                 thread_file='vxworks'
809                 ;;
810         alpha*-*-winnt*)
811                 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
812                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
813                 tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
814                 xmake_file=winnt/x-winnt
815                 extra_host_objs=oldnames.o
816                 extra_gcc_objs="spawnv.o oldnames.o"
817                 if test x$gnu_ld != xyes
818                 then
819                         extra_programs=ld.exe
820                 fi
821                 if test x$enable_threads = xyes; then
822                         thread_file='win32'
823                 fi
824                 ;;
825         alpha*-dec-vms*)
826                 tm_file=alpha/vms.h
827                 xm_file="${xm_file} alpha/xm-vms.h"
828                 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
829                 ;;
830         arc-*-elf*)
831                 extra_parts="crtinit.o crtfini.o"
832                 ;;
833         arm-*-coff* | armel-*-coff*)
834                 tm_file=arm/coff.h
835                 tmake_file=arm/t-arm-coff
836                 ;;
837         arm-*-vxworks*)
838                 tm_file=arm/vxarm.h
839                 tmake_file=arm/t-arm-coff
840                 thread_file='vxworks'
841                 ;;
842 changequote(,)dnl
843         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
844 changequote([,])dnl
845                 tm_file=arm/riscix1-1.h
846                 use_collect2=yes
847                 ;;
848         arm-*-riscix*)                  # Acorn RISC machine
849                 if test x$gas = xyes
850                 then
851                     tm_file=arm/rix-gas.h
852                 else
853                     tm_file=arm/riscix.h
854                 fi
855                 xmake_file=arm/x-riscix
856                 tmake_file=arm/t-riscix
857                 use_collect2=yes
858                 ;;
859         arm-semi-aout | armel-semi-aout)
860                 tm_file=arm/semi.h
861                 tmake_file=arm/t-semi
862                 ;;
863         arm-semi-aof | armel-semi-aof)
864                 tm_file=arm/semiaof.h
865                 tmake_file=arm/t-semiaof
866                 ;;
867         arm*-*-netbsd*)
868                 tm_file=arm/netbsd.h
869                 tmake_file="t-netbsd arm/t-netbsd"
870                 use_collect2=yes
871                 ;;
872         arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
873                 cpu_type=arm
874                 xmake_file=x-linux
875                 tm_file=arm/linux-aout.h
876                 tmake_file=arm/t-linux
877                 gnu_ld=yes
878                 ;;
879         arm*-*-linux-gnuoldld*)         # ARM GNU/Linux with old ELF linker
880                 xm_file=arm/xm-linux.h
881                 xmake_file=x-linux
882                 tm_file="arm/linux-oldld.h arm/linux-elf.h"
883                 case $machine in
884                 armv2*-*-*)
885                         tm_file="arm/linux-elf26.h $tm_file"
886                         ;;
887                 esac
888                 tmake_file="t-linux arm/t-linux"
889                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
890                 gnu_ld=yes
891                 case x${enable_threads} in
892                 x | xyes | xpthreads | xposix)
893                         thread_file='posix'
894                         ;;
895                 esac
896                 ;;
897         arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
898                 xm_file=arm/xm-linux.h
899                 xmake_file=x-linux
900                 tm_file="arm/linux-elf.h"
901                 case $machine in
902                 armv2*-*-*)
903                         tm_file="arm/linux-elf26.h $tm_file"
904                         ;;
905                 esac
906                 tmake_file="t-linux arm/t-linux"
907                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
908                 gnu_ld=yes
909                 case x${enable_threads} in
910                 x | xyes | xpthreads | xposix)
911                         thread_file='posix'
912                         ;;
913                 esac
914                 ;;
915         arm*-*-uclinux*)                # ARM ucLinux
916                 tm_file=arm/uclinux-elf.h
917                 tmake_file=arm/t-arm-elf
918                 ;;
919         arm*-*-aout)
920                 tm_file=arm/aout.h
921                 tmake_file=arm/t-arm-aout
922                 ;;
923         arm*-*-ecos-elf)
924                 tm_file=arm/ecos-elf.h
925                 tmake_file=arm/t-arm-elf
926                 ;; 
927         arm*-*-elf)
928                 tm_file=arm/unknown-elf.h
929                 tmake_file=arm/t-arm-elf
930                 ;;
931         arm*-*-conix*)
932                 tm_file=arm/conix-elf.h
933                 tmake_file=arm/t-arm-elf
934                 ;;
935         arm*-*-oabi)
936                 tm_file=arm/unknown-elf-oabi.h
937                 tmake_file=arm/t-arm-elf
938                 ;;
939         arm-*-pe*)
940                 tm_file=arm/pe.h
941                 tmake_file=arm/t-pe
942                 extra_objs="pe.o"
943                 ;;
944         avr-*-*)
945                 ;;
946         c1-convex-*)                    # Convex C1
947                 target_cpu_default=1
948                 use_collect2=yes
949                 ;;
950         c2-convex-*)                    # Convex C2
951                 target_cpu_default=2
952                 use_collect2=yes
953                 ;;
954         c32-convex-*)
955                 target_cpu_default=4
956                 use_collect2=yes
957                 ;;
958         c34-convex-*)
959                 target_cpu_default=8
960                 use_collect2=yes
961                 ;;
962         c38-convex-*)
963                 target_cpu_default=16           
964                 use_collect2=yes
965                 ;;
966         c4x-*)
967                 cpu_type=c4x
968                 tmake_file=c4x/t-c4x
969                 ;;
970         clipper-intergraph-clix*)
971                 tm_file="${tm_file} svr3.h clipper/clix.h"
972                 xm_file=clipper/xm-clix.h
973                 xmake_file=clipper/x-clix
974                 extra_headers=va-clipper.h
975                 extra_parts="crtbegin.o crtend.o"
976                 install_headers_dir=install-headers-cpio
977                 ;;
978         d30v-*)
979                 float_format=i64
980                 ;;
981         dsp16xx-*)
982                 ;;
983         elxsi-elxsi-*)
984                 use_collect2=yes
985                 ;;
986         fr30-*-elf)
987                 tm_file="fr30/fr30.h"
988                 tmake_file=fr30/t-fr30
989                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
990                 ;;
991 # This hasn't been upgraded to GCC 2.
992 #       fx80-alliant-*)                 # Alliant FX/80
993 #               ;;
994         h8300-*-*)
995                 float_format=i32
996                 ;;
997         hppa*-*-linux*)
998                 target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
999                 tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
1000                 tmake_file="t-linux pa/t-linux"
1001                 extra_parts="crtbegin.o crtend.o"
1002                 xmake_file=none
1003                 gas=yes gnu_ld=yes
1004                 if test x$enable_threads = xyes; then
1005                         thread_file='posix'
1006                 fi
1007                 ;;
1008         hppa*-*-openbsd*)
1009                 target_cpu_default="MASK_PA_11"
1010                 tmake_file=pa/t-openbsd
1011                 ;;
1012         hppa1.1-*-pro*)
1013                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
1014                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
1015                 xm_file=pa/xm-papro.h
1016                 tmake_file=pa/t-pro
1017                 ;;
1018         hppa1.1-*-osf*)
1019                 target_cpu_default="MASK_PA_11"
1020                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
1021                 use_collect2=yes
1022                 ;;
1023         hppa1.1-*-rtems*)
1024                 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
1025                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
1026                 xm_file=pa/xm-papro.h
1027                 tmake_file=pa/t-pro
1028                 ;;
1029         hppa1.0-*-osf*)
1030                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
1031                 use_collect2=yes
1032                 ;;
1033         hppa1.1-*-bsd*)
1034                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
1035                 target_cpu_default="MASK_PA_11"
1036                 use_collect2=yes
1037                 ;;
1038         hppa1.0-*-bsd*)
1039                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
1040                 use_collect2=yes
1041                 ;;
1042         hppa1.0-*-hpux7*)
1043                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
1044                 xm_file=pa/xm-pahpux.h
1045                 xmake_file=pa/x-pa-hpux
1046                 if test x$gas = xyes
1047                 then
1048                         tm_file="${tm_file} pa/gas.h"
1049                 fi
1050                 install_headers_dir=install-headers-cpio
1051                 use_collect2=yes
1052                 ;;
1053 changequote(,)dnl
1054         hppa1.0-*-hpux8.0[0-2]*)
1055 changequote([,])dnl
1056                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1057                 xm_file=pa/xm-pahpux.h
1058                 xmake_file=pa/x-pa-hpux
1059                 if test x$gas = xyes
1060                 then
1061                         tm_file="${tm_file} pa/pa-gas.h"
1062                 else
1063                         tm_file="pa/pa-oldas.h ${tm_file}"
1064                 fi
1065                 install_headers_dir=install-headers-cpio
1066                 use_collect2=yes
1067                 ;;
1068 changequote(,)dnl
1069         hppa1.1-*-hpux8.0[0-2]*)
1070 changequote([,])dnl
1071                 target_cpu_default="MASK_PA_11"
1072                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1073                 xm_file=pa/xm-pahpux.h
1074                 xmake_file=pa/x-pa-hpux
1075                 if test x$gas = xyes
1076                 then
1077                         tm_file="${tm_file} pa/pa-gas.h"
1078                 else
1079                         tm_file="pa/pa-oldas.h ${tm_file}"
1080                 fi
1081                 install_headers_dir=install-headers-cpio
1082                 use_collect2=yes
1083                 ;;
1084         hppa1.1-*-hpux8*)
1085                 target_cpu_default="MASK_PA_11"
1086                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1087                 xm_file=pa/xm-pahpux.h
1088                 xmake_file=pa/x-pa-hpux
1089                 if test x$gas = xyes
1090                 then
1091                         tm_file="${tm_file} pa/pa-gas.h"
1092                 fi
1093                 install_headers_dir=install-headers-cpio
1094                 use_collect2=yes
1095                 ;;
1096         hppa1.0-*-hpux8*)
1097                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1098                 xm_file=pa/xm-pahpux.h
1099                 xmake_file=pa/x-pa-hpux
1100                 if test x$gas = xyes
1101                 then
1102                         tm_file="${tm_file} pa/pa-gas.h"
1103                 fi
1104                 install_headers_dir=install-headers-cpio
1105                 use_collect2=yes
1106                 ;;
1107         hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
1108                 target_cpu_default="MASK_PA_11"
1109                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1110                 float_format=i128
1111                 xm_file=pa/xm-pahpux.h
1112                 xmake_file=pa/x-pa-hpux
1113                 tmake_file=pa/t-pa
1114                 if test x$gas = xyes
1115                 then
1116                         tm_file="${tm_file} pa/pa-gas.h"
1117                 fi
1118                 if test x$enable_threads = x; then
1119                     enable_threads=$have_pthread_h
1120                 fi
1121                 if test x$enable_threads = xyes; then
1122                         thread_file='dce'
1123                         tmake_file="${tmake_file} pa/t-dce-thr"
1124                 fi
1125                 install_headers_dir=install-headers-cpio
1126                 use_collect2=yes
1127                 ;;
1128         hppa1.0-*-hpux10*)
1129                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1130                 float_format=i128
1131                 xm_file=pa/xm-pahpux.h
1132                 xmake_file=pa/x-pa-hpux
1133                 tmake_file=pa/t-pa
1134                 if test x$gas = xyes
1135                 then
1136                         tm_file="${tm_file} pa/pa-gas.h"
1137                 fi
1138                 if test x$enable_threads = x; then
1139                     enable_threads=$have_pthread_h
1140                 fi
1141                 if test x$enable_threads = xyes; then
1142                         thread_file='dce'
1143                         tmake_file="${tmake_file} pa/t-dce-thr"
1144                 fi
1145                 install_headers_dir=install-headers-cpio
1146                 use_collect2=yes
1147                 ;;
1148         hppa*64*-*-hpux11*)
1149                 target_cpu_default="MASK_PA_11"
1150                 xm_file=pa/xm-pa64hpux.h
1151                 xmake_file=pa/x-pa-hpux
1152                 tmake_file=pa/t-pa
1153                 tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h"
1154                 float_format=i128
1155                 tmake_file=pa/t-pa64
1156                 target_cpu_default="(MASK_PA_11|MASK_PA_20)"
1157
1158                 if [[ x$gas = xyes ]]
1159                 then
1160                         tm_file="${tm_file} pa/pa-gas.h"
1161                 fi
1162 #               if [[ x$enable_threads = x ]]; then
1163 #                   enable_threads=$have_pthread_h
1164 #               fi
1165 #               if [[ x$enable_threads = xyes ]]; then
1166 #                       thread_file='dce'
1167 #                       tmake_file="${tmake_file} pa/t-dce-thr"
1168 #               fi
1169                 install_headers_dir=install-headers-cpio
1170                 use_collect2=yes
1171                 ;;
1172         hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
1173                 target_cpu_default="MASK_PA_11"
1174                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1175                 float_format=i128
1176                 xm_file=pa/xm-pahpux.h
1177                 xmake_file=pa/x-pa-hpux
1178                 tmake_file=pa/t-pa
1179                 if test x$gas = xyes
1180                 then
1181                         tm_file="${tm_file} pa/pa-gas.h"
1182                 fi
1183 #               if test x$enable_threads = x; then
1184 #                   enable_threads=$have_pthread_h
1185 #               fi
1186 #               if test x$enable_threads = xyes; then
1187 #                       thread_file='dce'
1188 #                       tmake_file="${tmake_file} pa/t-dce-thr"
1189 #               fi
1190                 install_headers_dir=install-headers-cpio
1191                 use_collect2=yes
1192                 ;;
1193         hppa1.0-*-hpux11*)
1194                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1195                 float_format=i128
1196                 xm_file=pa/xm-pahpux.h
1197                 xmake_file=pa/x-pa-hpux
1198                 if test x$gas = xyes
1199                 then
1200                         tm_file="${tm_file} pa/pa-gas.h"
1201                 fi
1202 #               if test x$enable_threads = x; then
1203 #                   enable_threads=$have_pthread_h
1204 #               fi
1205 #               if test x$enable_threads = xyes; then
1206 #                       thread_file='dce'
1207 #                       tmake_file="${tmake_file} pa/t-dce-thr"
1208 #               fi
1209                 install_headers_dir=install-headers-cpio
1210                 use_collect2=yes
1211                 ;;
1212         hppa1.1-*-hpux* | hppa2*-*-hpux*)
1213                 target_cpu_default="MASK_PA_11"
1214                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1215                 xm_file=pa/xm-pahpux.h
1216                 xmake_file=pa/x-pa-hpux
1217                 if test x$gas = xyes
1218                 then
1219                         tm_file="${tm_file} pa/pa-gas.h"
1220                 fi
1221                 install_headers_dir=install-headers-cpio
1222                 use_collect2=yes
1223                 ;;
1224         hppa1.0-*-hpux*)
1225                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1226                 xm_file=pa/xm-pahpux.h
1227                 xmake_file=pa/x-pa-hpux
1228                 if test x$gas = xyes
1229                 then
1230                         tm_file="${tm_file} pa/pa-gas.h"
1231                 fi
1232                 install_headers_dir=install-headers-cpio
1233                 use_collect2=yes
1234                 ;;
1235         hppa1.1-*-hiux* | hppa2*-*-hiux*)
1236                 target_cpu_default="MASK_PA_11"
1237                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1238                 xm_file=pa/xm-pahpux.h
1239                 xmake_file=pa/x-pa-hpux
1240                 if test x$gas = xyes
1241                 then
1242                         tm_file="${tm_file} pa/pa-gas.h"
1243                 fi
1244                 install_headers_dir=install-headers-cpio
1245                 use_collect2=yes
1246                 ;;
1247         hppa1.0-*-hiux*)
1248                 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1249                 xm_file=pa/xm-pahpux.h
1250                 xmake_file=pa/x-pa-hpux
1251                 if test x$gas = xyes
1252                 then
1253                         tm_file="${tm_file} pa/pa-gas.h"
1254                 fi
1255                 install_headers_dir=install-headers-cpio
1256                 use_collect2=yes
1257                 ;;
1258         hppa*-*-lites*)
1259                 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h"
1260                 target_cpu_default="MASK_PA_11"
1261                 use_collect2=yes
1262                 ;;
1263         hppa*-*-mpeix*)
1264                 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-mpeix.h"
1265                 xm_file=pa/xm-pampeix.h 
1266                 xmake_file=pa/x-pa-mpeix 
1267                 echo "You must use gas. Assuming it is already installed." 
1268                 install_headers_dir=install-headers-tar
1269                 use_collect2=yes 
1270                 ;; 
1271         i370-*-opened*)                  # IBM 360/370/390 Architecture
1272                 xm_file=i370/xm-oe.h
1273                 tm_file=i370/oe.h
1274                 xmake_file=i370/x-oe
1275                 tmake_file=i370/t-oe
1276                 ;;
1277         i370-*-mvs*)
1278                 xm_file=i370/xm-mvs.h
1279                 tm_file=i370/mvs.h
1280                 tmake_file=i370/t-mvs
1281                 ;;
1282         i370-*-linux*)
1283                 xm_file="xm-linux.h i370/xm-linux.h"
1284                 xmake_file=x-linux
1285                 tm_file="i370/linux.h ${tm_file}"
1286                 tmake_file="t-linux i370/t-linux"
1287                 # broken_install=yes
1288                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1289                 # extra_parts="crtbegin.o crtend.o"
1290                 gnu_ld=yes
1291                 gas=yes
1292                 elf=yes
1293                 if test x$enable_threads = xyes; then
1294                         thread_file='posix'
1295                 fi
1296                 ;;
1297 changequote(,)dnl
1298         i[34567]86-*-elf*)
1299 changequote([,])dnl
1300                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
1301                 tm_file=i386/i386elf.h
1302                 tmake_file=i386/t-i386elf
1303                 xmake_file=x-svr4
1304                 ;;
1305 changequote(,)dnl
1306         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
1307 changequote([,])dnl
1308                 if test x$gas = xyes
1309                 then
1310                         tm_file=i386/aix386.h
1311                         extra_parts="crtbegin.o crtend.o"
1312                         tmake_file=i386/t-crtstuff
1313                 else
1314                         tm_file=i386/aix386ng.h
1315                         use_collect2=yes
1316                 fi
1317                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
1318                 xm_defines=USG
1319                 xmake_file=i386/x-aix
1320                 ;;
1321 changequote(,)dnl
1322         i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
1323 changequote([,])dnl
1324                 xm_file="xm-alloca.h ${xm_file}"
1325                 xm_defines="USG POSIX SMALL_ARG_MAX"
1326                 xmake_file=i386/x-ncr3000
1327                 if test x$stabs = xyes -a x$gas = xyes
1328                 then
1329                         tm_file=i386/sysv4gdb.h
1330                 else
1331                         tm_file=i386/sysv4.h
1332                 fi
1333                 extra_parts="crtbegin.o crtend.o"
1334                 tmake_file=i386/t-crtpic
1335                 ;;
1336 changequote(,)dnl
1337         i[34567]86-next-*)
1338 changequote([,])dnl
1339                 tm_file=i386/next.h
1340                 xm_file=i386/xm-next.h
1341                 tmake_file=i386/t-next
1342                 xmake_file=i386/x-next
1343                 extra_objs=nextstep.o
1344                 extra_parts="crtbegin.o crtend.o"
1345                 if test x$enable_threads = xyes; then
1346                         thread_file='mach'
1347                 fi
1348                 ;;
1349 changequote(,)dnl
1350         i[34567]86-sequent-bsd*)                # 80386 from Sequent
1351 changequote([,])dnl
1352                 use_collect2=yes
1353                 if test x$gas = xyes
1354                 then
1355                         tm_file=i386/seq-gas.h
1356                 else
1357                         tm_file=i386/sequent.h
1358                 fi
1359                 ;;
1360 changequote(,)dnl
1361         i[34567]86-sequent-ptx1*)
1362 changequote([,])dnl
1363                 xm_defines="USG SVR3"
1364                 xmake_file=i386/x-sysv3
1365                 tm_file=i386/seq-sysv3.h
1366                 tmake_file=i386/t-crtstuff
1367                 extra_parts="crtbegin.o crtend.o"
1368                 install_headers_dir=install-headers-cpio
1369                 ;;
1370 changequote(,)dnl
1371         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
1372 changequote([,])dnl
1373                 xm_defines="USG SVR3"
1374                 xmake_file=i386/x-sysv3
1375                 tm_file=i386/seq2-sysv3.h
1376                 tmake_file=i386/t-crtstuff
1377                 extra_parts="crtbegin.o crtend.o"
1378                 install_headers_dir=install-headers-cpio
1379                 ;;
1380 changequote(,)dnl
1381         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
1382 changequote([,])dnl
1383                 xm_file="xm-alloca.h ${xm_file}"
1384                 xm_defines="USG POSIX SMALL_ARG_MAX"
1385                 xmake_file=x-svr4
1386                 tm_file=i386/ptx4-i.h
1387                 tmake_file=t-svr4
1388                 extra_parts="crtbegin.o crtend.o"
1389                 install_headers_dir=install-headers-cpio
1390                 ;;
1391         i386-sun-sunos*)                # Sun i386 roadrunner
1392                 xm_defines=USG
1393                 tm_file=i386/sun.h
1394                 use_collect2=yes
1395                 ;;
1396 changequote(,)dnl
1397         i[34567]86-wrs-vxworks*)
1398 changequote([,])dnl
1399                 tm_file=i386/vxi386.h
1400                 tmake_file=i386/t-i386bare
1401                 thread_file='vxworks'
1402                 ;;
1403 changequote(,)dnl
1404         i[34567]86-*-aout*)
1405 changequote([,])dnl
1406                 tm_file=i386/i386-aout.h
1407                 tmake_file=i386/t-i386bare
1408                 ;;
1409 changequote(,)dnl
1410         i[34567]86-*-beospe*)
1411 changequote([,])dnl
1412                 xm_file=i386/xm-beos.h
1413                 xm_defines="USE_C_ALLOCA"
1414                 tmake_file=i386/t-beos
1415                 tm_file=i386/beos-pe.h
1416                 xmake_file=i386/x-beos
1417                 extra_objs=winnt.o
1418                 ;;
1419 changequote(,)dnl
1420         i[34567]86-*-beoself* | i[34567]86-*-beos*)
1421 changequote([,])dnl
1422                 xm_file=i386/xm-beos.h
1423                 tmake_file='i386/t-beos i386/t-crtpic'
1424                 tm_file=i386/beos-elf.h
1425                 xmake_file=i386/x-beos
1426                 extra_objs=winnt.o
1427                 extra_parts='crtbegin.o crtend.o'
1428                 ;;
1429 changequote(,)dnl
1430         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
1431 changequote([,])dnl
1432                 tm_file=i386/bsd386.h
1433 #               tmake_file=t-libc-ok
1434                 ;;
1435 changequote(,)dnl
1436         i[34567]86-*-bsd*)
1437 changequote([,])dnl
1438                 tm_file=i386/386bsd.h
1439 #               tmake_file=t-libc-ok
1440 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
1441 #               use_collect2=yes
1442                 ;;
1443 changequote(,)dnl
1444         i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*)
1445 changequote([,])dnl
1446                 tm_file="i386/freebsd.h i386/perform.h"
1447                 tmake_file=t-freebsd
1448                 ;;
1449 changequote(,)dnl
1450         i[34567]86-*-freebsd*)
1451 changequote([,])dnl
1452                 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
1453                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1454                 tmake_file=t-freebsd
1455                 gas=yes
1456                 gnu_ld=yes
1457                 stabs=yes
1458                 case x${enable_threads} in
1459                 xyes | xpthreads | xposix)
1460                         thread_file='posix'
1461                         tmake_file="${tmake_file} t-freebsd-thread"
1462                         ;;
1463                 esac
1464                 ;;
1465 changequote(,)dnl
1466         i[34567]86-*-netbsd*)
1467 changequote([,])dnl
1468                 tm_file=i386/netbsd.h
1469                 tmake_file=t-netbsd
1470                 use_collect2=yes
1471                 ;;
1472 changequote(,)dnl
1473         i[34567]86-*-openbsd*)
1474 changequote([,])dnl
1475                 # we need collect2 until our bug is fixed...
1476                 use_collect2=yes
1477                 ;;
1478 changequote(,)dnl
1479         i[34567]86-*-coff*)
1480 changequote([,])dnl
1481                 tm_file=i386/i386-coff.h
1482                 tmake_file=i386/t-i386bare
1483                 ;;
1484 changequote(,)dnl
1485         i[34567]86-*-isc*)              # 80386 running ISC system
1486 changequote([,])dnl
1487                 xm_file="${xm_file} i386/xm-isc.h"
1488                 xm_defines="USG SVR3"
1489                 case $machine in
1490 changequote(,)dnl
1491                   i[34567]86-*-isc[34]*)
1492 changequote([,])dnl
1493                     xmake_file=i386/x-isc3
1494                     ;;
1495                   *)
1496                     xmake_file=i386/x-isc
1497                     ;;
1498                 esac
1499                 if test x$gas = xyes -a x$stabs = xyes
1500                 then
1501                         tm_file=i386/iscdbx.h
1502                         tmake_file=i386/t-svr3dbx
1503                         extra_parts="svr3.ifile svr3z.ifile"
1504                 else
1505                         tm_file=i386/isccoff.h
1506                         tmake_file=i386/t-crtstuff
1507                         extra_parts="crtbegin.o crtend.o"
1508                 fi
1509                 tmake_file="$tmake_file i386/t-i386bare"
1510                 install_headers_dir=install-headers-cpio
1511                 ;;
1512 changequote(,)dnl
1513         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
1514 changequote([,])dnl                     # with a.out format using
1515                                         # pre BFD linkers
1516                 xmake_file=x-linux-aout
1517                 tmake_file="t-linux-aout i386/t-crtstuff"
1518                 tm_file=i386/linux-oldld.h
1519                 gnu_ld=yes
1520                 float_format=i386
1521                 ;;
1522 changequote(,)dnl
1523         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
1524 changequote([,])dnl                     # with a.out format
1525                 xmake_file=x-linux-aout
1526                 tmake_file="t-linux-aout i386/t-crtstuff"
1527                 tm_file=i386/linux-aout.h
1528                 gnu_ld=yes
1529                 float_format=i386
1530                 ;;
1531 changequote(,)dnl
1532         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
1533 changequote([,])dnl                     # with ELF format using the
1534                                         # GNU/Linux C library 5
1535                 xmake_file=x-linux      
1536                 tm_file=i386/linux.h    
1537                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1538                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1539                 gnu_ld=yes
1540                 float_format=i386
1541                 if test x$enable_threads = xyes; then
1542                         thread_file='single'
1543                 fi
1544                 ;;
1545 changequote(,)dnl
1546         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
1547 changequote([,])dnl                     # with ELF format using glibc 2
1548                                         # aka GNU/Linux C library 6
1549                 xmake_file=x-linux
1550                 tm_file=i386/linux.h
1551                 tmake_file="t-linux i386/t-crtstuff"
1552                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1553                 gnu_ld=yes
1554                 float_format=i386
1555                 if test x$enable_threads = xyes; then
1556                         thread_file='posix'
1557                 fi
1558                 ;;
1559 changequote(,)dnl
1560         i[34567]86-*-gnu*)
1561                 float_format=i386
1562 changequote([,])dnl
1563                 ;;
1564 changequote(,)dnl
1565         i[34567]86-go32-msdos | i[34567]86-*-go32*)
1566 changequote([,])dnl
1567                 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
1568                 exit 1
1569                 ;;
1570 changequote(,)dnl
1571         i[34567]86-pc-msdosdjgpp*)
1572 changequote([,])dnl
1573                 xm_file=i386/xm-djgpp.h
1574                 tm_file=i386/djgpp.h
1575                 tmake_file=i386/t-djgpp
1576                 xmake_file=i386/x-djgpp
1577                 gnu_ld=yes
1578                 gas=yes
1579                 exeext=.exe
1580                 float_format=none
1581                 case $host in *pc-msdosdjgpp*)
1582                         target_alias=djgpp
1583                         ;;
1584                 esac
1585                 ;;
1586 changequote(,)dnl
1587         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1588 changequote([,])dnl
1589                 tm_file=i386/moss.h
1590                 tmake_file=t-libc-ok
1591                 gnu_ld=yes
1592                 gas=yes
1593                 ;;
1594 changequote(,)dnl
1595         i[34567]86-*-lynxos*)
1596 changequote([,])dnl
1597                 if test x$gas = xyes
1598                 then
1599                         tm_file=i386/lynx.h
1600                 else
1601                         tm_file=i386/lynx-ng.h
1602                 fi
1603                 xm_file=i386/xm-lynx.h
1604                 tmake_file=i386/t-i386bare
1605                 xmake_file=x-lynx
1606                 ;;
1607 changequote(,)dnl
1608         i[34567]86-*-mach*)
1609 changequote([,])dnl
1610                 tm_file=i386/mach.h
1611 #               tmake_file=t-libc-ok
1612                 use_collect2=yes
1613                 ;;
1614 changequote(,)dnl
1615         i[34567]86-*-osfrose*)          # 386 using OSF/rose
1616 changequote([,])dnl
1617                 if test x$elf = xyes
1618                 then
1619                         tm_file=i386/osfelf.h
1620                         use_collect2=
1621                 else
1622                         tm_file=i386/osfrose.h
1623                         use_collect2=yes
1624                 fi
1625                 xm_file="i386/xm-osf.h ${xm_file}"
1626                 xmake_file=i386/x-osfrose
1627                 tmake_file=i386/t-osf
1628                 extra_objs=halfpic.o
1629                 ;;
1630 changequote(,)dnl
1631         i[34567]86-go32-rtems*)
1632 changequote([,])dnl
1633                 cpu_type=i386
1634                 xm_file=i386/xm-go32.h
1635                 tm_file=i386/go32-rtems.h
1636                 tmake_file="i386/t-go32 t-rtems"
1637                 ;;
1638 changequote(,)dnl
1639         i[34567]86-*-rtemscoff*)
1640 changequote([,])dnl
1641                 cpu_type=i386
1642                 tm_file=i386/rtems.h
1643                 tmake_file="i386/t-i386bare t-rtems"
1644                 ;;
1645 changequote(,)dnl
1646         i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
1647 changequote([,])dnl
1648                 cpu_type=i386
1649                 tm_file=i386/rtemself.h
1650                 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1651                 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1652                 ;;
1653 changequote(,)dnl
1654         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1655 changequote([,])dnl
1656                 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
1657                 xm_defines="USG SVR3"
1658                 xmake_file=i386/x-sco5
1659                 install_headers_dir=install-headers-cpio
1660                 tm_file=i386/sco5.h
1661                 if test x$gas = xyes
1662                 then
1663                         tm_file="i386/sco5gas.h ${tm_file}"
1664                         tmake_file=i386/t-sco5gas
1665                 else
1666                         tmake_file=i386/t-sco5
1667                 fi
1668                 tmake_file="$tmake_file i386/t-i386bare"
1669                 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
1670                 ;;
1671 changequote(,)dnl
1672         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
1673 changequote([,])dnl
1674                 xm_file="${xm_file} i386/xm-sco.h"
1675                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
1676                 xmake_file=i386/x-sco4
1677                 install_headers_dir=install-headers-cpio
1678                 if test x$stabs = xyes
1679                 then
1680                         tm_file=i386/sco4dbx.h
1681                         tmake_file=i386/t-svr3dbx
1682                         extra_parts="svr3.ifile svr3z.rfile"
1683                 else
1684                         tm_file=i386/sco4.h
1685                         tmake_file=i386/t-crtstuff
1686                         extra_parts="crtbegin.o crtend.o"
1687                 fi
1688                 tmake_file="$tmake_file i386/t-i386bare"
1689                 # The default EAFS filesystem supports long file names.
1690                 # Truncating the target makes $host != $target which
1691                 # makes gcc think it is doing a cross-compile.
1692                 # truncate_target=yes
1693                 ;;
1694 changequote(,)dnl
1695         i[34567]86-*-sco*)              # 80386 running SCO system
1696 changequote([,])dnl
1697                 xm_file=i386/xm-sco.h
1698                 xmake_file=i386/x-sco
1699                 install_headers_dir=install-headers-cpio
1700                 if test x$stabs = xyes
1701                 then
1702                         tm_file=i386/scodbx.h
1703                         tmake_file=i386/t-svr3dbx
1704                         extra_parts="svr3.ifile svr3z.rfile"
1705                 else
1706                         tm_file=i386/sco.h
1707                         extra_parts="crtbegin.o crtend.o"
1708                         tmake_file=i386/t-crtstuff
1709                 fi
1710                 tmake_file="$tmake_file i386/t-i386bare"
1711                 truncate_target=yes
1712                 ;;
1713 changequote(,)dnl
1714         i[34567]86-*-solaris2*)
1715 changequote([,])dnl
1716                 xm_file="xm-alloca.h ${xm_file}"
1717                 xm_defines="USG POSIX SMALL_ARG_MAX"
1718                 tm_file=i386/sol2.h
1719                 if test x$gas = xyes; then
1720                         # Only needed if gas does not support -s
1721                         tm_file="i386/sol2gas.h ${tm_file}"
1722                 fi
1723                 tmake_file="i386/t-i386bare i386/t-sol2"
1724                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1725                 xmake_file=x-svr4
1726                 if test x${enable_threads} = x; then
1727                     enable_threads=$have_pthread_h
1728                     if test x${enable_threads} = x; then
1729                         enable_threads=$have_thread_h
1730                     fi
1731                 fi
1732                 if test x${enable_threads} = xyes; then
1733                     if test x${have_pthread_h} = xyes; then
1734                         thread_file='posix'
1735                     else
1736                         thread_file='solaris'
1737                     fi
1738                 fi
1739                 ;;
1740 changequote(,)dnl
1741        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
1742 changequote([,])dnl
1743                xm_file="xm-alloca.h ${xm_file}"
1744                xm_defines="USG POSIX"
1745                tm_file=i386/sysv5.h
1746                if test x$stabs = xyes
1747                then
1748                        tm_file="${tm_file} dbx.h"
1749                fi
1750                tmake_file="i386/t-i386bare i386/t-crtpic"
1751                xmake_file=x-svr4
1752                extra_parts="crtbegin.o crtend.o"
1753                if test x$enable_threads = xyes; then
1754                        thread_file='posix'
1755                fi
1756                ;;
1757 changequote(,)dnl
1758         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
1759 changequote([,])dnl
1760                 xm_file="xm-alloca.h ${xm_file}"
1761                 xm_defines="USG POSIX SMALL_ARG_MAX"
1762                 tm_file=i386/sysv4.h
1763                 if test x$stabs = xyes
1764                 then
1765                         tm_file="${tm_file} dbx.h"
1766                 fi
1767                 tmake_file="i386/t-i386bare i386/t-crtpic"
1768                 xmake_file=x-svr4
1769                 extra_parts="crtbegin.o crtend.o"
1770                 ;;
1771 changequote(,)dnl
1772         i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
1773 changequote([,])dnl
1774                 xm_file="xm-alloca.h ${xm_file}"
1775                 xm_defines="USG POSIX"
1776                 tm_file=i386/udk.h
1777                 tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
1778                 xmake_file=x-svr4
1779                 extra_parts="crtbegin.o crtend.o"
1780                 install_headers_dir=install-headers-cpio
1781                 ;;
1782 changequote(,)dnl
1783         i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
1784 changequote([,])dnl
1785                 cpu_type=i386
1786                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1787                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1788                 if test x$stabs = xyes
1789                 then
1790                         tm_file=i386/osf1elfgdb.h
1791                 else
1792                         tm_file=i386/osf1elf.h
1793                 fi
1794                 tmake_file=i386/t-osf1elf
1795                 xmake_file=i386/x-osf1elf
1796                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1797                 ;;
1798 changequote(,)dnl
1799         i[34567]86-*-sysv*)             # Intel 80386's running system V
1800 changequote([,])dnl
1801                 xm_defines="USG SVR3"
1802                 xmake_file=i386/x-sysv3
1803                 if test x$gas = xyes
1804                 then
1805                         if test x$stabs = xyes
1806                         then
1807                                 tm_file=i386/svr3dbx.h
1808                                 tmake_file=i386/t-svr3dbx
1809                                 extra_parts="svr3.ifile svr3z.rfile"
1810                         else
1811                                 tm_file=i386/svr3gas.h
1812                                 extra_parts="crtbegin.o crtend.o"
1813                                 tmake_file=i386/t-crtstuff
1814                         fi
1815                 else
1816                         tm_file=i386/sysv3.h
1817                         extra_parts="crtbegin.o crtend.o"
1818                         tmake_file=i386/t-crtstuff
1819                 fi
1820                 tmake_file="$tmake_file i386/t-crtpic"
1821                 ;;
1822         i386-*-vsta)                    # Intel 80386's running VSTa kernel
1823                 xm_file="${xm_file} i386/xm-vsta.h"
1824                 tm_file=i386/vsta.h
1825                 tmake_file=i386/t-vsta
1826                 xmake_file=i386/x-vsta
1827                 ;;
1828 changequote(,)dnl
1829         i[34567]86-*-win32)
1830 changequote([,])dnl
1831                 xm_file="${xm_file} i386/xm-cygwin.h"
1832                 tmake_file=i386/t-cygwin
1833                 tm_file=i386/win32.h
1834                 xmake_file=i386/x-cygwin
1835                 extra_objs=winnt.o
1836                 if test x$enable_threads = xyes; then
1837                         thread_file='win32'
1838                 fi
1839                 exeext=.exe
1840                 ;;
1841 changequote(,)dnl
1842         i[34567]86-*-pe | i[34567]86-*-cygwin*)
1843 changequote([,])dnl
1844                 xm_file="${xm_file} i386/xm-cygwin.h"
1845                 tmake_file=i386/t-cygwin
1846                 tm_file=i386/cygwin.h
1847                 xmake_file=i386/x-cygwin
1848                 extra_objs=winnt.o
1849                 if test x$enable_threads = xyes; then
1850                         thread_file='win32'
1851                 fi
1852                 exeext=.exe
1853                 ;;
1854 changequote(,)dnl
1855         i[34567]86-*-mingw32*)
1856 changequote([,])dnl
1857                 tm_file=i386/mingw32.h
1858                 xm_file="${xm_file} i386/xm-mingw32.h"
1859                 tmake_file="i386/t-cygwin i386/t-mingw32"
1860                 extra_objs=winnt.o
1861                 xmake_file=i386/x-cygwin
1862                 if test x$enable_threads = xyes; then
1863                         thread_file='win32'
1864                 fi
1865                 exeext=.exe
1866                 case $machine in
1867                         *mingw32msv*)
1868                                 ;;
1869                         *minwg32crt* | *mingw32*)
1870                                 tm_file="${tm_file} i386/crtdll.h"
1871                                 ;;
1872                 esac
1873                 ;;
1874 changequote(,)dnl
1875         i[34567]86-*-uwin*)
1876 changequote([,])dnl
1877                 tm_file=i386/uwin.h
1878                 xm_file="${xm_file} i386/xm-uwin.h"
1879                 xm_defines="USG NO_STAB_H"
1880                 tmake_file="i386/t-cygwin i386/t-uwin"
1881                 extra_objs=winnt.o
1882                 xmake_file=i386/x-cygwin
1883                 if test x$enable_threads = xyes; then
1884                         thread_file='win32'
1885                 fi
1886                 exeext=.exe
1887                 ;;
1888 changequote(,)dnl
1889         i[34567]86-*-interix*)
1890 changequote([,])dnl
1891                 tm_file="i386/i386-interix.h interix.h"
1892                 xm_file="i386/xm-i386-interix.h xm-interix.h"
1893                 xm_defines="USG"
1894                 tmake_file="i386/t-interix"
1895                 extra_objs=interix.o
1896                 xmake_file=x-interix
1897                 if test x$enable_threads = xyes ; then
1898                         thread_file='posix'
1899                 fi
1900                 if test x$stabs = xyes ; then
1901                         tm_file="${tm_file} dbxcoff.h"
1902                 fi
1903                 ;;
1904 changequote(,)dnl
1905         i[34567]86-*-winnt3*)
1906 changequote([,])dnl
1907                 tm_file=i386/win-nt.h
1908                 out_file=i386/i386.c
1909                 xm_file="xm-winnt.h ${xm_file}"
1910                 xmake_file=winnt/x-winnt
1911                 tmake_file=i386/t-winnt
1912                 extra_host_objs="winnt.o oldnames.o"
1913                 extra_gcc_objs="spawnv.o oldnames.o"
1914                 if test x$gnu_ld != xyes
1915                 then
1916                         extra_programs=ld.exe
1917                 fi
1918                 if test x$enable_threads = xyes; then
1919                         thread_file='win32'
1920                 fi
1921                 ;;
1922 changequote(,)dnl
1923         i[34567]86-dg-dgux*)
1924 changequote([,])dnl
1925                 xm_file="xm-alloca.h ${xm_file}"
1926                 xm_defines="USG POSIX"
1927                 out_file=i386/dgux.c
1928                 tm_file=i386/dgux.h
1929                 tmake_file=i386/t-dgux
1930                 xmake_file=i386/x-dgux
1931                 install_headers_dir=install-headers-cpio
1932               ;;
1933         i860-alliant-*)         # Alliant FX/2800
1934                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1935                 xm_file="${xm_file}"
1936                 xmake_file=i860/x-fx2800
1937                 tmake_file=i860/t-fx2800
1938                 extra_parts="crtbegin.o crtend.o"
1939                 ;;
1940         i860-*-bsd*)
1941                 tm_file="${tm_file} i860/bsd.h"
1942                 if test x$gas = xyes
1943                 then
1944                         tm_file="${tm_file} i860/bsd-gas.h"
1945                 fi
1946                 use_collect2=yes
1947                 ;;
1948         i860-*-mach*)
1949                 tm_file="${tm_file} i860/mach.h"
1950                 tmake_file=t-libc-ok
1951                 ;;
1952         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
1953                 tm_file="${tm_file} svr3.h i860/paragon.h"
1954                 xm_defines="USG SVR3"
1955                 tmake_file=t-osf
1956                 ;;
1957         i860-*-sysv3*)
1958                 tm_file="${tm_file} svr3.h i860/sysv3.h"
1959                 xm_defines="USG SVR3"
1960                 xmake_file=i860/x-sysv3
1961                 extra_parts="crtbegin.o crtend.o"
1962                 ;;
1963         i860-*-sysv4*)
1964                 tm_file="${tm_file} svr4.h i860/sysv4.h"
1965                 xm_defines="USG SVR3"
1966                 xmake_file=i860/x-sysv4
1967                 tmake_file=t-svr4
1968                 extra_parts="crtbegin.o crtend.o"
1969                 ;;
1970         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1971                 tm_file="${tm_file} i960/vx960.h"
1972                 tmake_file=i960/t-vxworks960
1973                 use_collect2=yes
1974                 thread_file='vxworks'
1975                 ;;
1976         i960-wrs-vxworks5* | i960-wrs-vxworks)
1977                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1978                 tmake_file=i960/t-vxworks960
1979                 use_collect2=yes
1980                 thread_file='vxworks'
1981                 ;;
1982         i960-wrs-vxworks*)
1983                 tm_file="${tm_file} i960/vx960.h"
1984                 tmake_file=i960/t-vxworks960
1985                 use_collect2=yes
1986                 thread_file='vxworks'
1987                 ;;
1988         i960-*-coff*)
1989                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1990                 tmake_file=i960/t-960bare
1991                 use_collect2=yes
1992                 ;;
1993         i960-*-rtems)
1994                 tmake_file="i960/t-960bare t-rtems"
1995                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1996                 use_collect2=yes
1997                 ;;
1998         i960-*-*)                       # Default i960 environment.
1999                 use_collect2=yes
2000                 ;;
2001         ia64*-*-elf*)
2002                 tm_file=ia64/elf.h
2003                 tmake_file="ia64/t-ia64"
2004                 target_cpu_default="0"
2005                 if test x$gas = xyes
2006                 then
2007                         target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2008                 fi
2009                 if test x$gnu_ld = xyes
2010                 then
2011                         target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
2012                 fi
2013                 ;;
2014         ia64*-*-linux*)
2015                 tm_file=ia64/linux.h
2016                 tmake_file="t-linux ia64/t-ia64"
2017                 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2018                 if test x$enable_threads = xyes; then
2019                         thread_file='posix'
2020                 fi
2021                 ;;
2022         m32r-*-elf*)
2023                 extra_parts="crtinit.o crtfini.o"
2024                 ;;
2025         m68000-convergent-sysv*)
2026                 tm_file=m68k/ctix.h
2027                 xm_file="m68k/xm-3b1.h ${xm_file}"
2028                 xm_defines=USG
2029                 use_collect2=yes
2030                 extra_headers=math-68881.h
2031                 ;;
2032         m68000-hp-bsd*)                 # HP 9000/200 running BSD
2033                 tm_file=m68k/hp2bsd.h
2034                 xmake_file=m68k/x-hp2bsd
2035                 use_collect2=yes
2036                 extra_headers=math-68881.h
2037                 ;;
2038         m68000-hp-hpux*)                # HP 9000 series 300
2039                 xm_file="xm-alloca.h ${xm_file}"
2040                 xm_defines="USG"
2041                 if test x$gas = xyes
2042                 then
2043                         xmake_file=m68k/x-hp320g
2044                         tm_file=m68k/hp310g.h
2045                 else
2046                         xmake_file=m68k/x-hp320
2047                         tm_file=m68k/hp310.h
2048                 fi
2049                 install_headers_dir=install-headers-cpio
2050                 use_collect2=yes
2051                 extra_headers=math-68881.h
2052                 ;;
2053         m68000-sun-sunos3*)
2054                 tm_file=m68k/sun2.h
2055                 use_collect2=yes
2056                 extra_headers=math-68881.h
2057                 ;;
2058         m68000-sun-sunos4*)
2059                 tm_file=m68k/sun2o4.h
2060                 use_collect2=yes
2061                 extra_headers=math-68881.h
2062                 ;;
2063         m68000-att-sysv*)
2064                 xm_file="m68k/xm-3b1.h ${xm_file}"
2065                 xm_defines=USG
2066                 if test x$gas = xyes
2067                 then
2068                         tm_file=m68k/3b1g.h
2069                 else
2070                         tm_file=m68k/3b1.h
2071                 fi
2072                 use_collect2=yes
2073                 extra_headers=math-68881.h
2074                 ;;
2075         m68k-apple-aux*)                # Apple Macintosh running A/UX
2076                 xm_defines="USG AUX"
2077                 tmake_file=m68k/t-aux
2078                 install_headers_dir=install-headers-cpio
2079                 extra_headers=math-68881.h
2080                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
2081                 tm_file=
2082                 if test "$gnu_ld" = yes
2083                 then
2084                         tm_file="${tm_file} m68k/auxgld.h"
2085                 else
2086                         tm_file="${tm_file} m68k/auxld.h"
2087                 fi
2088                 if test "$gas" = yes
2089                 then
2090                         tm_file="${tm_file} m68k/auxgas.h"
2091                 else
2092                         tm_file="${tm_file} m68k/auxas.h"
2093                 fi
2094                 tm_file="${tm_file} m68k/a-ux.h"
2095                 float_format=m68k
2096                 ;;
2097         m68k-apollo-*)
2098                 tm_file=m68k/apollo68.h
2099                 xmake_file=m68k/x-apollo68
2100                 use_collect2=yes
2101                 extra_headers=math-68881.h
2102                 float_format=m68k
2103                 ;;
2104         m68k-altos-sysv*)                  # Altos 3068
2105                 if test x$gas = xyes
2106                 then
2107                         tm_file=m68k/altos3068.h
2108                         xm_defines=USG
2109                 else
2110                         echo "The Altos is supported only with the GNU assembler" 1>&2
2111                         exit 1
2112                 fi
2113                 extra_headers=math-68881.h
2114                 ;;
2115         m68k-bull-sysv*)                # Bull DPX/2
2116                 if test x$gas = xyes
2117                 then
2118                         if test x$stabs = xyes
2119                         then
2120                                 tm_file=m68k/dpx2cdbx.h
2121                         else
2122                                 tm_file=m68k/dpx2g.h
2123                         fi
2124                 else
2125                         tm_file=m68k/dpx2.h
2126                 fi
2127                 xm_file="xm-alloca.h ${xm_file}"
2128                 xm_defines=USG
2129                 xmake_file=m68k/x-dpx2
2130                 use_collect2=yes
2131                 extra_headers=math-68881.h
2132                 ;;
2133         m68k-atari-sysv4*)              # Atari variant of V.4.
2134                 tm_file=m68k/atari.h
2135                 xm_file="xm-alloca.h ${xm_file}"
2136                 xm_defines="USG FULL_PROTOTYPES"
2137                 tmake_file=t-svr4
2138                 extra_parts="crtbegin.o crtend.o"
2139                 extra_headers=math-68881.h
2140                 float_format=m68k
2141                 ;;
2142         m68k-motorola-sysv*)
2143                 tm_file=m68k/mot3300.h
2144                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
2145                 if test x$gas = xyes
2146                 then
2147                         xmake_file=m68k/x-mot3300-gas
2148                         if test x$gnu_ld = xyes
2149                         then
2150                                 tmake_file=m68k/t-mot3300-gald
2151                         else
2152                                 tmake_file=m68k/t-mot3300-gas
2153                                 use_collect2=yes
2154                         fi
2155                 else
2156                         xmake_file=m68k/x-mot3300
2157                         if test x$gnu_ld = xyes
2158                         then
2159                                 tmake_file=m68k/t-mot3300-gld
2160                         else
2161                                 tmake_file=m68k/t-mot3300
2162                                 use_collect2=yes
2163                         fi
2164                 fi
2165                 gdb_needs_out_file_path=yes
2166                 extra_parts="crt0.o mcrt0.o"
2167                 extra_headers=math-68881.h
2168                 float_format=m68k
2169                 ;;
2170         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
2171                 tm_file=m68k/tower-as.h
2172                 xm_defines="USG SVR3"
2173                 xmake_file=m68k/x-tower
2174                 extra_parts="crtbegin.o crtend.o"
2175                 extra_headers=math-68881.h
2176                 ;;
2177         m68k-plexus-sysv*)
2178                 tm_file=m68k/plexus.h
2179                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2180                 xm_defines=USG
2181                 use_collect2=yes
2182                 extra_headers=math-68881.h
2183                 ;;
2184         m68k-tti-*)
2185                 tm_file=m68k/pbb.h
2186                 xm_file="xm-alloca.h ${xm_file}"
2187                 xm_defines=USG
2188                 extra_headers=math-68881.h
2189                 ;;
2190         m68k-crds-unos*)
2191                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2192                 xm_defines="USG unos"
2193                 xmake_file=m68k/x-crds
2194                 tm_file=m68k/crds.h
2195                 use_collect2=yes
2196                 extra_headers=math-68881.h
2197                 ;;
2198         m68k-cbm-sysv4*)                # Commodore variant of V.4.
2199                 tm_file=m68k/amix.h
2200                 xm_file="xm-alloca.h ${xm_file}"
2201                 xm_defines="USG FULL_PROTOTYPES"
2202                 xmake_file=m68k/x-amix
2203                 tmake_file=t-svr4
2204                 extra_parts="crtbegin.o crtend.o"
2205                 extra_headers=math-68881.h
2206                 float_format=m68k
2207                 ;;
2208         m68k-ccur-rtu)
2209                 tm_file=m68k/ccur-GAS.h
2210                 xmake_file=m68k/x-ccur
2211                 extra_headers=math-68881.h
2212                 use_collect2=yes
2213                 float_format=m68k
2214                 ;;
2215         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
2216                 tm_file=m68k/hp3bsd44.h
2217                 xmake_file=m68k/x-hp3bsd44
2218                 use_collect2=yes
2219                 extra_headers=math-68881.h
2220                 float_format=m68k
2221                 ;;
2222         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
2223                 tm_file=m68k/hp3bsd.h
2224                 use_collect2=yes
2225                 extra_headers=math-68881.h
2226                 float_format=m68k
2227                 ;;
2228         m68k-isi-bsd*)
2229                 if test x$with_fp = xno
2230                 then
2231                         tm_file=m68k/isi-nfp.h
2232                 else
2233                         tm_file=m68k/isi.h
2234                         float_format=m68k
2235                 fi
2236                 use_collect2=yes
2237                 extra_headers=math-68881.h
2238                 ;;
2239         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
2240                 xm_file="xm-alloca.h ${xm_file}"
2241                 xm_defines="USG"
2242                 if test x$gas = xyes
2243                 then
2244                         xmake_file=m68k/x-hp320g
2245                         tm_file=m68k/hp320g.h
2246                 else
2247                         xmake_file=m68k/x-hp320
2248                         tm_file=m68k/hpux7.h
2249                 fi
2250                 install_headers_dir=install-headers-cpio
2251                 use_collect2=yes
2252                 extra_headers=math-68881.h
2253                 float_format=m68k
2254                 ;;
2255         m68k-hp-hpux*)  # HP 9000 series 300
2256                 xm_file="xm-alloca.h ${xm_file}"
2257                 xm_defines="USG"
2258                 if test x$gas = xyes
2259                 then
2260                         xmake_file=m68k/x-hp320g
2261                         tm_file=m68k/hp320g.h
2262                 else
2263                         xmake_file=m68k/x-hp320
2264                         tm_file=m68k/hp320.h
2265                 fi
2266                 install_headers_dir=install-headers-cpio
2267                 use_collect2=yes
2268                 extra_headers=math-68881.h
2269                 float_format=m68k
2270                 ;;
2271         m68k-sun-mach*)
2272                 tm_file=m68k/sun3mach.h
2273                 use_collect2=yes
2274                 extra_headers=math-68881.h
2275                 float_format=m68k
2276                 ;;
2277         m68k-sony-newsos3*)
2278                 if test x$gas = xyes
2279                 then
2280                         tm_file=m68k/news3gas.h
2281                 else
2282                         tm_file=m68k/news3.h
2283                 fi
2284                 use_collect2=yes
2285                 extra_headers=math-68881.h
2286                 float_format=m68k
2287                 ;;
2288         m68k-sony-bsd* | m68k-sony-newsos*)
2289                 if test x$gas = xyes
2290                 then
2291                         tm_file=m68k/newsgas.h
2292                 else
2293                         tm_file=m68k/news.h
2294                 fi
2295                 use_collect2=yes
2296                 extra_headers=math-68881.h
2297                 float_format=m68k
2298                 ;;
2299         m68k-next-nextstep2*)
2300                 tm_file=m68k/next21.h
2301                 xm_file="m68k/xm-next.h ${xm_file}"
2302                 tmake_file=m68k/t-next
2303                 xmake_file=m68k/x-next
2304                 extra_objs=nextstep.o
2305                 extra_headers=math-68881.h
2306                 use_collect2=yes
2307                 float_format=m68k
2308                 ;;
2309 changequote(,)dnl
2310         m68k-next-nextstep[34]*)
2311 changequote([,])dnl
2312                 tm_file=m68k/next.h
2313                 xm_file="m68k/xm-next.h ${xm_file}"
2314                 tmake_file=m68k/t-next
2315                 xmake_file=m68k/x-next
2316                 extra_objs=nextstep.o
2317                 extra_parts="crtbegin.o crtend.o"
2318                 extra_headers=math-68881.h
2319                 float_format=m68k
2320                 if test x$enable_threads = xyes; then
2321                         thread_file='mach'
2322                 fi
2323                 ;;
2324         m68k-sun-sunos3*)
2325                 if test x$with_fp = xno
2326                 then
2327                         tm_file=m68k/sun3n3.h
2328                 else
2329                         tm_file=m68k/sun3o3.h
2330                         float_format=m68k
2331                 fi
2332                 use_collect2=yes
2333                 extra_headers=math-68881.h
2334                 ;;
2335         m68k-sun-sunos*)                        # For SunOS 4 (the default).
2336                 if test x$with_fp = xno
2337                 then
2338                         tm_file=m68k/sun3n.h
2339                 else
2340                         tm_file=m68k/sun3.h
2341                         float_format=m68k
2342                 fi
2343                 use_collect2=yes
2344                 extra_headers=math-68881.h
2345                 ;;
2346         m68k-wrs-vxworks*)
2347                 tm_file=m68k/vxm68k.h
2348                 tmake_file=m68k/t-vxworks68
2349                 extra_headers=math-68881.h
2350                 thread_file='vxworks'
2351                 float_format=m68k
2352                 ;;
2353         m68k-*-aout*)
2354                 tmake_file=m68k/t-m68kbare
2355                 tm_file="m68k/m68k-aout.h libgloss.h"
2356                 extra_headers=math-68881.h
2357                 float_format=m68k
2358                 ;;
2359         m68k-*-coff*)
2360                 tmake_file=m68k/t-m68kbare
2361                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
2362                 extra_headers=math-68881.h
2363                 float_format=m68k
2364                 ;;
2365         m68020-*-elf* | m68k-*-elf*)
2366                 tm_file="m68k/m68020-elf.h"
2367                 xm_file=m68k/xm-m68kv.h
2368                 tmake_file=m68k/t-m68kelf
2369                 header_files=math-68881.h
2370                 ;;
2371         m68k-*-lynxos*)
2372                 if test x$gas = xyes
2373                 then
2374                         tm_file=m68k/lynx.h
2375                 else
2376                         tm_file=m68k/lynx-ng.h
2377                 fi
2378                 xm_file=m68k/xm-lynx.h
2379                 xmake_file=x-lynx
2380                 tmake_file=m68k/t-lynx
2381                 extra_headers=math-68881.h
2382                 float_format=m68k
2383                 ;;
2384         m68k*-*-netbsd*)
2385                 tm_file=m68k/netbsd.h
2386                 tmake_file=t-netbsd
2387                 float_format=m68k
2388                 use_collect2=yes
2389                 ;;
2390         m68k*-*-openbsd*)
2391                 float_format=m68k
2392                 # we need collect2 until our bug is fixed...
2393                 use_collect2=yes
2394                 ;;
2395         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
2396                 xm_file="xm-alloca.h ${xm_file}"
2397                 xm_defines=USG
2398                 xmake_file=m68k/x-m68kv
2399                 extra_parts="crtbegin.o crtend.o"
2400                 extra_headers=math-68881.h
2401                 float_format=m68k
2402                 ;;
2403         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
2404                 tm_file=m68k/m68kv4.h
2405                 xm_file="xm-alloca.h ${xm_file}"
2406                 xm_defines=USG
2407                 tmake_file=t-svr4
2408                 extra_parts="crtbegin.o crtend.o"
2409                 extra_headers=math-68881.h
2410                 float_format=m68k
2411                 ;;
2412         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
2413                                         # with a.out format
2414                 xmake_file=x-linux
2415                 tm_file=m68k/linux-aout.h
2416                 tmake_file="t-linux-aout m68k/t-linux-aout"
2417                 extra_headers=math-68881.h
2418                 float_format=m68k
2419                 gnu_ld=yes
2420                 ;;
2421         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
2422                                         # with ELF format using the
2423                                         # GNU/Linux C library 5
2424                 xmake_file=x-linux
2425                 tm_file=m68k/linux.h
2426                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
2427                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2428                 extra_headers=math-68881.h
2429                 float_format=m68k
2430                 gnu_ld=yes
2431                 ;;
2432         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
2433                                         # with ELF format using glibc 2
2434                                         # aka the GNU/Linux C library 6.
2435                 xmake_file=x-linux
2436                 tm_file=m68k/linux.h
2437                 tmake_file="t-linux m68k/t-linux"
2438                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2439                 extra_headers=math-68881.h
2440                 float_format=m68k
2441                 gnu_ld=yes
2442                 if test x$enable_threads = xyes; then
2443                         thread_file='posix'
2444                 fi
2445                 ;;
2446         m68k-*-psos*)
2447                 tmake_file=m68k/t-m68kbare
2448                 tm_file=m68k/m68k-psos.h
2449                 extra_headers=math-68881.h
2450                 float_format=m68k
2451                 ;;
2452         m68k-*-rtemscoff*)
2453                 tmake_file="m68k/t-m68kbare t-rtems"
2454                 tm_file=m68k/rtems.h
2455                 extra_headers=math-68881.h
2456                 float_format=m68k
2457                 ;;
2458         m68k-*-rtemself*|m68k-*-rtems*)
2459                 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
2460                 tm_file=m68k/rtemself.h
2461                 extra_headers=math-68881.h
2462                 float_format=m68k
2463                 ;;
2464         m88k-dg-dgux*)
2465                 case $machine in
2466                   m88k-dg-dguxbcs*)
2467                     tm_file=m88k/dguxbcs.h
2468                     tmake_file=m88k/t-dguxbcs
2469                     ;;
2470                   *)
2471                     tm_file=m88k/dgux.h
2472                     tmake_file=m88k/t-dgux
2473                     ;;
2474                 esac
2475                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
2476                 xmake_file=m88k/x-dgux
2477                 if test x$gas = xyes
2478                 then
2479                         tmake_file=m88k/t-dgux-gas
2480                 fi
2481                 ;;
2482         m88k-dolphin-sysv3*)
2483                 tm_file=m88k/dolph.h
2484                 extra_parts="crtbegin.o crtend.o"
2485                 xm_file="m88k/xm-sysv3.h ${xm_file}"
2486                 xmake_file=m88k/x-dolph
2487                 if test x$gas = xyes
2488                 then
2489                         tmake_file=m88k/t-m88k-gas
2490                 fi
2491                 ;;
2492         m88k-tektronix-sysv3)
2493                 tm_file=m88k/tekXD88.h
2494                 extra_parts="crtbegin.o crtend.o"
2495                 xm_file="m88k/xm-sysv3.h ${xm_file}"
2496                 xmake_file=m88k/x-tekXD88
2497                 if test x$gas = xyes
2498                 then
2499                         tmake_file=m88k/t-m88k-gas
2500                 fi
2501                 ;;
2502         m88k-*-aout*)
2503                 tm_file=m88k/m88k-aout.h
2504                 ;;
2505         m88k-*-coff*)
2506                 tm_file=m88k/m88k-coff.h
2507                 tmake_file=m88k/t-bug
2508                 ;;
2509         m88k-*-luna*)
2510                 tm_file=m88k/luna.h
2511                 extra_parts="crtbegin.o crtend.o"
2512                 if test x$gas = xyes
2513                 then
2514                         tmake_file=m88k/t-luna-gas
2515                 else
2516                         tmake_file=m88k/t-luna
2517                 fi
2518                 ;;
2519         m88k-*-openbsd*)
2520                 tmake_file="${tmake_file} m88k/t-luna-gas"
2521                 ;;
2522         m88k-*-sysv3*)
2523                 tm_file=m88k/sysv3.h
2524                 extra_parts="crtbegin.o crtend.o"
2525                 xm_file="m88k/xm-sysv3.h ${xm_file}"
2526                 xmake_file=m88k/x-sysv3
2527                 if test x$gas = xyes
2528                 then
2529                         tmake_file=m88k/t-m88k-gas
2530                 fi
2531                 ;;
2532         m88k-*-sysv4*)
2533                 tm_file=m88k/sysv4.h
2534                 extra_parts="crtbegin.o crtend.o"
2535                 xmake_file=m88k/x-sysv4
2536                 tmake_file=m88k/t-sysv4
2537                 ;;
2538         mcore-*-elf)
2539                 tm_file=mcore/mcore-elf.h
2540                 tmake_file=mcore/t-mcore
2541                 ;;
2542         mcore-*-pe*)
2543                 tm_file=mcore/mcore-pe.h
2544                 tmake_file=mcore/t-mcore-pe
2545                 ;;
2546         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
2547                 if test "x$gnu_ld" = xyes
2548                 then
2549                         tm_file="mips/iris6.h mips/iris6gld.h"
2550                 else
2551                         tm_file=mips/iris6.h
2552                 fi
2553                 tmake_file=mips/t-iris6
2554                 xm_file=mips/xm-iris6.h
2555                 xmake_file=mips/x-iris6
2556 #               if test x$enable_threads = xyes; then
2557 #                       thread_file='irix'
2558 #               fi
2559                 ;;
2560         mips-wrs-vxworks)
2561                 tm_file="mips/elf.h mips/vxworks.h"
2562                 tmake_file=mips/t-ecoff
2563                 gas=yes
2564                 gnu_ld=yes
2565                 extra_parts="crtbegin.o crtend.o"
2566                 thread_file='vxworks'
2567                 ;;
2568         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
2569                 tm_file="mips/iris6.h mips/cross64.h"
2570                 xm_defines=USG
2571                 xm_file="mips/xm-iris5.h"
2572                 xmake_file=mips/x-iris
2573                 tmake_file=mips/t-cross64
2574                 # See comment in mips/iris[56].h files.
2575                 use_collect2=yes
2576 #               if test x$enable_threads = xyes; then
2577 #                       thread_file='irix'
2578 #               fi
2579                 ;;
2580         mips-sni-sysv4)
2581                 if test x$gas = xyes
2582                 then
2583                         if test x$stabs = xyes
2584                         then
2585                                 tm_file=mips/iris5gdb.h
2586                         else
2587                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
2588                         fi
2589                 else
2590                         tm_file=mips/sni-svr4.h
2591                 fi
2592                 xm_defines=USG
2593                 xmake_file=mips/x-sni-svr4
2594                 tmake_file=mips/t-mips-gas
2595                 if test x$gnu_ld != xyes
2596                 then
2597                         use_collect2=yes
2598                 fi
2599                 ;;
2600         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
2601                 if test x$gas = xyes
2602                 then
2603                         tm_file="mips/iris5.h mips/iris5gas.h"
2604                         if test x$stabs = xyes
2605                         then
2606                                 tm_file="${tm_file} dbx.h"
2607                         fi
2608                 else
2609                         tm_file=mips/iris5.h
2610                 fi
2611                 xm_defines=USG
2612                 xm_file="mips/xm-iris5.h"
2613                 xmake_file=mips/x-iris
2614                 # mips-tfile doesn't work yet
2615                 tmake_file=mips/t-mips-gas
2616                 # See comment in mips/iris5.h file.
2617                 use_collect2=yes
2618 #               if test x$enable_threads = xyes; then
2619 #                       thread_file='irix'
2620 #               fi
2621                 ;;
2622         mips-sgi-irix4loser*)           # Mostly like a MIPS.
2623                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
2624                 if test x$stabs = xyes; then
2625                         tm_file="${tm_file} dbx.h"
2626                 fi
2627                 xm_defines=USG
2628                 xmake_file=mips/x-iris
2629                 if test x$gas = xyes
2630                 then
2631                         tmake_file=mips/t-mips-gas
2632                 else
2633                         extra_passes="mips-tfile mips-tdump"
2634                 fi
2635                 if test x$gnu_ld != xyes
2636                 then
2637                         use_collect2=yes
2638                 fi
2639 #               if test x$enable_threads = xyes; then
2640 #                       thread_file='irix'
2641 #               fi
2642                 ;;
2643         mips-sgi-irix4*)                # Mostly like a MIPS.
2644                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
2645                 if test x$stabs = xyes; then
2646                         tm_file="${tm_file} dbx.h"
2647                 fi
2648                 xm_defines=USG
2649                 xmake_file=mips/x-iris
2650                 if test x$gas = xyes
2651                 then
2652                         tmake_file=mips/t-mips-gas
2653                 else
2654                         extra_passes="mips-tfile mips-tdump"
2655                 fi
2656                 if test x$gnu_ld != xyes
2657                 then
2658                         use_collect2=yes
2659                 fi
2660 #               if test x$enable_threads = xyes; then
2661 #                       thread_file='irix'
2662 #               fi
2663                 ;;
2664         mips-sgi-*)                     # Mostly like a MIPS.
2665                 tm_file="mips/iris3.h ${tm_file}"
2666                 if test x$stabs = xyes; then
2667                         tm_file="${tm_file} dbx.h"
2668                 fi
2669                 xm_defines=USG
2670                 xmake_file=mips/x-iris3
2671                 if test x$gas = xyes
2672                 then
2673                         tmake_file=mips/t-mips-gas
2674                 else
2675                         extra_passes="mips-tfile mips-tdump"
2676                 fi
2677                 if test x$gnu_ld != xyes
2678                 then
2679                         use_collect2=yes
2680                 fi
2681                 ;;
2682         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
2683                 tm_file="mips/osfrose.h ${tm_file}"
2684                 xmake_file=mips/x-osfrose
2685                 tmake_file=mips/t-osfrose
2686                 extra_objs=halfpic.o
2687                 use_collect2=yes
2688                 ;;
2689         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
2690                 tm_file=mips/dec-osf1.h
2691                 if test x$stabs = xyes; then
2692                         tm_file="${tm_file} dbx.h"
2693                 fi
2694                 xmake_file=mips/x-dec-osf1
2695                 if test x$gas = xyes
2696                 then
2697                         tmake_file=mips/t-mips-gas
2698                 else
2699                         tmake_file=mips/t-ultrix
2700                         extra_passes="mips-tfile mips-tdump"
2701                 fi
2702                 if test x$gnu_ld != xyes
2703                 then
2704                         use_collect2=yes
2705                 fi
2706                 ;;
2707         mips-dec-bsd*)                  # Decstation running 4.4 BSD
2708               tm_file=mips/dec-bsd.h
2709               if test x$gas = xyes
2710               then
2711                         tmake_file=mips/t-mips-gas
2712               else
2713                         tmake_file=mips/t-ultrix
2714                         extra_passes="mips-tfile mips-tdump"
2715               fi
2716               if test x$gnu_ld != xyes
2717               then
2718                         use_collect2=yes
2719               fi
2720               ;;
2721         mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
2722                 tm_file=mips/netbsd.h
2723                 # On NetBSD, the headers are already okay, except for math.h.
2724                 tmake_file=t-netbsd
2725                 ;;
2726        mips*-*-linux*)                         # Linux MIPS, either endian.
2727                 xmake_file=x-linux
2728                case $machine in
2729                        mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
2730                        *)         tm_file="mips/elf.h mips/linux.h" ;;
2731                esac
2732                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2733                 gnu_ld=yes
2734                 gas=yes
2735                 if test x$enable_threads = xyes; then
2736                         thread_file='posix'
2737                 fi
2738                 ;;
2739         mips*el-*-openbsd*)     # mips little endian
2740                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2741                 ;;
2742         mips*-*-openbsd*)               # mips big endian
2743                 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2744                 tm_file="mips/openbsd-be.h ${tm_file}"
2745                 ;;
2746         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
2747                 tm_file="mips/news4.h ${tm_file}"
2748                 if test x$stabs = xyes; then
2749                         tm_file="${tm_file} dbx.h"
2750                 fi
2751                 if test x$gas = xyes
2752                 then
2753                         tmake_file=mips/t-mips-gas
2754                 else
2755                         extra_passes="mips-tfile mips-tdump"
2756                 fi
2757                 if test x$gnu_ld != xyes
2758                 then
2759                         use_collect2=yes
2760                 fi
2761                 xmake_file=mips/x-sony
2762                 ;;
2763         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
2764                                         # That is based on svr4.
2765                 # t-svr4 is not right because this system doesn't use ELF.
2766                 tm_file="mips/news5.h ${tm_file}"
2767                 if test x$stabs = xyes; then
2768                         tm_file="${tm_file} dbx.h"
2769                 fi
2770                 xm_defines=USG
2771                 if test x$gas = xyes
2772                 then
2773                         tmake_file=mips/t-mips-gas
2774                 else
2775                         extra_passes="mips-tfile mips-tdump"
2776                 fi
2777                 if test x$gnu_ld != xyes
2778                 then
2779                         use_collect2=yes
2780                 fi
2781                 ;;
2782         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
2783                 tm_file="mips/svr4-5.h mips/svr4-t.h"
2784                 if test x$stabs = xyes; then
2785                         tm_file="${tm_file} dbx.h"
2786                 fi
2787                 xm_defines=USG
2788                 xmake_file=mips/x-sysv
2789                 if test x$gas = xyes
2790                 then
2791                         tmake_file=mips/t-mips-gas
2792                         extra_parts="crtbegin.o crtend.o"
2793                 else
2794                         tmake_file=mips/t-mips
2795                         extra_passes="mips-tfile mips-tdump"
2796                 fi
2797                 if test x$gnu_ld != xyes
2798                 then
2799                         use_collect2=yes
2800                 fi
2801                 ;;
2802         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
2803                 tm_file="mips/ultrix.h ${tm_file}"
2804                 if test x$stabs = xyes; then
2805                         tm_file="${tm_file} dbx.h"
2806                 fi
2807                 xmake_file=mips/x-ultrix
2808                 if test x$gas = xyes
2809                 then
2810                         tmake_file=mips/t-mips-gas
2811                 else
2812                         tmake_file=mips/t-ultrix
2813                         extra_passes="mips-tfile mips-tdump"
2814                 fi
2815                 if test x$gnu_ld != xyes
2816                 then
2817                         use_collect2=yes
2818                 fi
2819                 ;;
2820 changequote(,)dnl
2821         mips-*-riscos[56789]bsd*)
2822 changequote([,])dnl
2823                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
2824                 if test x$stabs = xyes; then
2825                         tm_file="${tm_file} dbx.h"
2826                 fi
2827                 if test x$gas = xyes
2828                 then
2829                         tmake_file=mips/t-bsd-gas
2830                 else
2831                         tmake_file=mips/t-bsd
2832                         extra_passes="mips-tfile mips-tdump"
2833                 fi
2834                 if test x$gnu_ld != xyes
2835                 then
2836                         use_collect2=yes
2837                 fi
2838                 ;;
2839 changequote(,)dnl
2840         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2841 changequote([,])dnl
2842                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2843                 if test x$stabs = xyes; then
2844                         tm_file="${tm_file} dbx.h"
2845                 fi
2846                 if test x$gas = xyes
2847                 then
2848                         tmake_file=mips/t-bsd-gas
2849                 else
2850                         tmake_file=mips/t-bsd
2851                         extra_passes="mips-tfile mips-tdump"
2852                 fi
2853                 if test x$gnu_ld != xyes
2854                 then
2855                         use_collect2=yes
2856                 fi
2857                 ;;
2858 changequote(,)dnl
2859         mips-*-riscos[56789]sysv4*)
2860 changequote([,])dnl
2861                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
2862                 if test x$stabs = xyes; then
2863                         tm_file="${tm_file} dbx.h"
2864                 fi
2865                 xmake_file=mips/x-sysv
2866                 if test x$gas = xyes
2867                 then
2868                         tmake_file=mips/t-svr4-gas
2869                 else
2870                         tmake_file=mips/t-svr4
2871                         extra_passes="mips-tfile mips-tdump"
2872                 fi
2873                 if test x$gnu_ld != xyes
2874                 then
2875                         use_collect2=yes
2876                 fi
2877                 ;;
2878 changequote(,)dnl
2879         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2880 changequote([,])dnl
2881                 tm_file="mips/svr4-4.h ${tm_file}"
2882                 if test x$stabs = xyes; then
2883                         tm_file="${tm_file} dbx.h"
2884                 fi
2885                 xm_defines=USG
2886                 xmake_file=mips/x-sysv
2887                 if test x$gas = xyes
2888                 then
2889                         tmake_file=mips/t-svr4-gas
2890                 else
2891                         tmake_file=mips/t-svr4
2892                         extra_passes="mips-tfile mips-tdump"
2893                 fi
2894                 if test x$gnu_ld != xyes
2895                 then
2896                         use_collect2=yes
2897                 fi
2898                 ;;
2899 changequote(,)dnl
2900         mips-*-riscos[56789]sysv*)
2901 changequote([,])dnl
2902                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
2903                 if test x$stabs = xyes; then
2904                         tm_file="${tm_file} dbx.h"
2905                 fi
2906                 xm_defines=USG
2907                 xmake_file=mips/x-sysv
2908                 if test x$gas = xyes
2909                 then
2910                         tmake_file=mips/t-svr3-gas
2911                 else
2912                         tmake_file=mips/t-svr3
2913                         extra_passes="mips-tfile mips-tdump"
2914                 fi
2915                 if test x$gnu_ld != xyes
2916                 then
2917                         use_collect2=yes
2918                 fi
2919                 ;;
2920         mips-*-sysv* | mips-*-riscos*sysv*)
2921                 tm_file="mips/svr3-4.h ${tm_file}"
2922                 if test x$stabs = xyes; then
2923                         tm_file="${tm_file} dbx.h"
2924                 fi
2925                 xm_defines=USG
2926                 xmake_file=mips/x-sysv
2927                 if test x$gas = xyes
2928                 then
2929                         tmake_file=mips/t-svr3-gas
2930                 else
2931                         tmake_file=mips/t-svr3
2932                         extra_passes="mips-tfile mips-tdump"
2933                 fi
2934                 if test x$gnu_ld != xyes
2935                 then
2936                         use_collect2=yes
2937                 fi
2938                 ;;
2939 changequote(,)dnl
2940         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
2941 changequote([,])dnl
2942                 tm_file=mips/mips-5.h
2943                 if test x$stabs = xyes; then
2944                         tm_file="${tm_file} dbx.h"
2945                 fi
2946                 if test x$gas = xyes
2947                 then
2948                         tmake_file=mips/t-mips-gas
2949                 else
2950                         extra_passes="mips-tfile mips-tdump"
2951                 fi
2952                 if test x$gnu_ld != xyes
2953                 then
2954                         use_collect2=yes
2955                 fi
2956                 ;;
2957         mips-*-gnu*)
2958                 ;;
2959         mipsel-*-ecoff*)
2960                 tm_file=mips/ecoffl.h
2961                 if test x$stabs = xyes; then
2962                         tm_file="${tm_file} dbx.h"
2963                 fi
2964                 tmake_file=mips/t-ecoff
2965                 ;;
2966         mips-*-ecoff*)
2967                 tm_file="gofast.h mips/ecoff.h"
2968                 if test x$stabs = xyes; then
2969                         tm_file="${tm_file} dbx.h"
2970                 fi
2971                 tmake_file=mips/t-ecoff
2972                 ;;
2973         mipsel-*-elf*)
2974                 tm_file="mips/elfl.h"
2975                 tmake_file=mips/t-elf
2976                 ;;
2977         mips-*-elf*)
2978                 tm_file="mips/elf.h"
2979                 tmake_file=mips/t-elf
2980                 ;;
2981         mips64el-*-elf*)
2982                 tm_file="mips/elfl64.h"
2983                 tmake_file=mips/t-elf
2984                 ;;
2985         mips64orionel-*-elf*)
2986                 tm_file="mips/elforion.h mips/elfl64.h"
2987                 tmake_file=mips/t-elf
2988                 ;;
2989         mips64-*-elf*)
2990                 tm_file="mips/elf64.h"
2991                 tmake_file=mips/t-elf
2992                 ;;
2993         mips64orion-*-elf*)
2994                 tm_file="mips/elforion.h mips/elf64.h"
2995                 tmake_file=mips/t-elf
2996                 ;;
2997         mips64orion-*-rtems*)
2998                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
2999                 tmake_file="mips/t-elf t-rtems"
3000                 ;;
3001         mipstx39el-*-elf*)
3002                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
3003                 tmake_file=mips/t-r3900
3004                 ;;
3005         mipstx39-*-elf*)
3006                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
3007                 tmake_file=mips/t-r3900
3008                 ;;
3009         mips-*-*)                               # Default MIPS RISC-OS 4.0.
3010                 if test x$stabs = xyes; then
3011                         tm_file="${tm_file} dbx.h"
3012                 fi
3013                 if test x$gas = xyes
3014                 then
3015                         tmake_file=mips/t-mips-gas
3016                 else
3017                         extra_passes="mips-tfile mips-tdump"
3018                 fi
3019                 if test x$gnu_ld != xyes
3020                 then
3021                         use_collect2=yes
3022                 fi
3023                 ;;
3024         mn10200-*-*)
3025                 float_format=i32
3026                 cpu_type=mn10200
3027                 tm_file="mn10200/mn10200.h"
3028                 if test x$stabs = xyes
3029                 then
3030                         tm_file="${tm_file} dbx.h"
3031                 fi
3032                 use_collect2=no
3033                 ;;
3034         mn10300-*-*)
3035                 cpu_type=mn10300
3036                 tm_file="mn10300/mn10300.h"
3037                 if test x$stabs = xyes
3038                 then
3039                         tm_file="${tm_file} dbx.h"
3040                 fi
3041                 use_collect2=no
3042                 ;;
3043         ns32k-encore-bsd*)
3044                 tm_file=ns32k/encore.h
3045                 use_collect2=yes
3046                 ;;
3047         ns32k-sequent-bsd*)
3048                 tm_file=ns32k/sequent.h
3049                 use_collect2=yes
3050                 ;;
3051         ns32k-tek6100-bsd*)
3052                 tm_file=ns32k/tek6100.h
3053                 use_collect2=yes
3054                 ;;
3055         ns32k-tek6200-bsd*)
3056                 tm_file=ns32k/tek6200.h
3057                 use_collect2=yes
3058                 ;;
3059 # This has not been updated to GCC 2.
3060 #       ns32k-ns-genix*)
3061 #               xm_defines=USG
3062 #               xmake_file=ns32k/x-genix
3063 #               tm_file=ns32k/genix.h
3064 #               use_collect2=yes
3065 #               ;;
3066         ns32k-merlin-*)
3067                 tm_file=ns32k/merlin.h
3068                 use_collect2=yes
3069                 ;;
3070         ns32k-pc532-mach*)
3071                 tm_file=ns32k/pc532-mach.h
3072                 use_collect2=yes
3073                 ;;
3074         ns32k-pc532-minix*)
3075                 tm_file=ns32k/pc532-min.h
3076                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3077                 xm_defines=USG
3078                 use_collect2=yes
3079                 ;;
3080         ns32k-*-netbsd*)
3081                 tm_file=ns32k/netbsd.h
3082                 xm_file="ns32k/xm-netbsd.h ${xm_file}"
3083                 # On NetBSD, the headers are already okay, except for math.h.
3084                 tmake_file=t-netbsd
3085                 use_collect2=yes
3086                 ;;
3087         pdp11-*-bsd)
3088                 tm_file="${tm_file} pdp11/2bsd.h"
3089                 ;;
3090         pdp11-*-*)
3091                 ;;
3092         avr-*-*)
3093                 ;;
3094         ns32k-*-openbsd*)
3095                 # Nothing special
3096                 ;;
3097 # This has not been updated to GCC 2.
3098 #       pyramid-*-*)
3099 #               cpu_type=pyr
3100 #               xmake_file=pyr/x-pyr
3101 #               use_collect2=yes
3102 #               ;;
3103
3104         pj*-linux*)
3105                 tm_file="svr4.h pj/linux.h ${tm_file}"
3106                 ;;
3107         pj-*)
3108                 ;;
3109         pjl-*)
3110                 tm_file="svr4.h pj/pjl.h ${tm_file}"
3111                 ;;
3112
3113         romp-*-aos*)
3114                 use_collect2=yes
3115                 ;;
3116         romp-*-mach*)
3117                 xmake_file=romp/x-mach
3118                 use_collect2=yes
3119                 ;;
3120         romp-*-openbsd*)
3121                 # Nothing special
3122                 ;;
3123         powerpc-*-openbsd*)
3124                 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
3125                 ;;
3126         powerpc-*-beos*)
3127                 cpu_type=rs6000
3128                 tm_file=rs6000/beos.h
3129                 xm_file=rs6000/xm-beos.h
3130                 tmake_file=rs6000/t-beos
3131                 xmake_file=rs6000/x-beos
3132                 ;;
3133         powerpc-*-sysv*)
3134                 tm_file=rs6000/sysv4.h
3135                 xm_file="rs6000/xm-sysv4.h"
3136                 xm_defines="USG POSIX"
3137                 extra_headers=ppc-asm.h
3138                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3139                 xmake_file=rs6000/x-sysv4
3140                 ;;
3141         powerpc-*-eabiaix*)
3142                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
3143                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3144                 extra_headers=ppc-asm.h
3145                 ;;
3146         powerpc-*-eabisim*)
3147                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
3148                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3149                 extra_headers=ppc-asm.h
3150                 ;;
3151         powerpc-*-elf*)
3152                 tm_file="rs6000/sysv4.h"
3153                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3154                 extra_headers=ppc-asm.h
3155                 ;;
3156         powerpc-*-eabi*)
3157                 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3158                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3159                 extra_headers=ppc-asm.h
3160                 ;;
3161         powerpc-*-rtems*)
3162                 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3163                 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
3164                 extra_headers=ppc-asm.h
3165                 ;;
3166         powerpc-*-linux-gnulibc1)
3167                 tm_file="rs6000/sysv4.h rs6000/linux.h"
3168                 xm_file=rs6000/xm-sysv4.h
3169                 out_file=rs6000/rs6000.c
3170                 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3171                 xmake_file=x-linux
3172                 extra_headers=ppc-asm.h
3173                 if test x$enable_threads = xyes; then
3174                         thread_file='posix'
3175                 fi
3176                 ;;
3177         powerpc-*-linux-gnu*)
3178                 tm_file="rs6000/sysv4.h rs6000/linux.h"
3179                 xm_file="rs6000/xm-sysv4.h"
3180                 xm_defines="USG ${xm_defines}"
3181                 out_file=rs6000/rs6000.c
3182                 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
3183                 xmake_file=x-linux
3184                 extra_headers=ppc-asm.h
3185                 if test x$enable_threads = xyes; then
3186                         thread_file='posix'
3187                 fi
3188                 ;;
3189         powerpc-wrs-vxworks*)
3190                 cpu_type=rs6000
3191                 xm_file="rs6000/xm-sysv4.h"
3192                 xm_defines="USG POSIX"
3193                 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
3194                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3195                 extra_headers=ppc-asm.h
3196                 thread_file='vxworks'
3197                 ;;
3198         powerpcle-wrs-vxworks*)
3199                 cpu_type=rs6000
3200                 xm_file="rs6000/xm-sysv4.h"
3201                 xm_defines="USG POSIX"
3202                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
3203                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3204                 extra_headers=ppc-asm.h
3205                 thread_file='vxworks'
3206                 ;;
3207         powerpcle-*-sysv*)
3208                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3209                 xm_file="rs6000/xm-sysv4.h"
3210                 xm_defines="USG POSIX"
3211                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3212                 xmake_file=rs6000/x-sysv4
3213                 extra_headers=ppc-asm.h
3214                 ;;
3215         powerpcle-*-elf*)
3216                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3217                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3218                 extra_headers=ppc-asm.h
3219                 ;;
3220         powerpcle-*-eabisim*)
3221                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
3222                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3223                 extra_headers=ppc-asm.h
3224                 ;;
3225         powerpcle-*-eabi*)
3226                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3227                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3228                 extra_headers=ppc-asm.h
3229                 ;;
3230         powerpcle-*-solaris2*)
3231                 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
3232                 xm_file="rs6000/xm-sysv4.h"
3233                 xm_defines="USG POSIX"
3234                 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3235                 xmake_file=rs6000/x-sysv4
3236                 extra_headers=ppc-asm.h
3237                 ;;
3238 changequote(,)dnl
3239         rs6000-ibm-aix3.[01]*)
3240 changequote([,])dnl
3241                 tm_file=rs6000/aix31.h
3242                 xmake_file=rs6000/x-aix31
3243                 float_format=none
3244                 use_collect2=yes
3245                 ;;
3246 changequote(,)dnl
3247         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3248 changequote([,])dnl
3249                 tm_file=rs6000/aix3newas.h
3250                 if test x$host != x$target
3251                 then
3252                         tmake_file=rs6000/t-xnewas
3253                 else
3254                         tmake_file=rs6000/t-newas
3255                 fi
3256                 float_format=none
3257                 use_collect2=yes
3258                 ;;
3259 changequote(,)dnl
3260         rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
3261 changequote([,])dnl
3262                 tm_file=rs6000/aix41.h
3263                 if test x$host != x$target
3264                 then
3265                         tmake_file=rs6000/t-xnewas
3266                 else
3267                         tmake_file=rs6000/t-newas
3268                 fi
3269                 if test "$gnu_ld" = yes
3270                 then
3271                         xmake_file=rs6000/x-aix41-gld
3272                 else
3273                         tmake_file="rs6000/t-newas rs6000/t-aix41"
3274                 fi
3275                 xmake_file=rs6000/x-aix41
3276                 float_format=none
3277                 use_collect2=yes
3278                 ;;
3279 changequote(,)dnl
3280         rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
3281 changequote([,])dnl
3282                 tm_file=rs6000/aix43.h
3283                 tmake_file=rs6000/t-aix43
3284                 xmake_file=rs6000/x-aix41
3285                 float_format=none
3286                 use_collect2=yes
3287                 ;;
3288 changequote(,)dnl
3289         rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3290 changequote([,])dnl
3291                 tm_file=rs6000/aix43.h
3292                 tmake_file=rs6000/t-aix43
3293                 xmake_file=rs6000/x-aix41
3294                 float_format=none
3295                 use_collect2=yes
3296                 ;;
3297         rs6000-ibm-aix*)
3298                 float_format=none
3299                 use_collect2=yes
3300                 ;;
3301         rs6000-bull-bosx)
3302                 float_format=none
3303                 use_collect2=yes
3304                 ;;
3305         rs6000-*-mach*)
3306                 tm_file=rs6000/mach.h
3307                 xm_file="${xm_file} rs6000/xm-mach.h"
3308                 xmake_file=rs6000/x-mach
3309                 use_collect2=yes
3310                 ;;
3311         rs6000-*-lynxos*)
3312                 tm_file=rs6000/lynx.h
3313                 xm_file=rs6000/xm-lynx.h
3314                 tmake_file=rs6000/t-rs6000
3315                 xmake_file=rs6000/x-lynx
3316                 use_collect2=yes
3317                 ;;
3318         sh-*-elf*)
3319                 tm_file=sh/elf.h
3320                 float_format=sh
3321                 ;;
3322         sh-*-rtemself*)
3323                 tmake_file="sh/t-sh t-rtems"
3324                 tm_file=sh/rtemself.h
3325                 float_format=sh
3326                 ;;
3327         sh-*-rtems*)
3328                 tmake_file="sh/t-sh t-rtems"
3329                 tm_file=sh/rtems.h
3330                 float_format=sh
3331                 ;;
3332         sh-*-*)
3333                 float_format=sh
3334                 ;;
3335         sparc-tti-*)
3336                 tm_file=sparc/pbd.h
3337                 xm_file="xm-alloca.h ${xm_file}"
3338                 xm_defines=USG
3339                 ;;
3340         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3341                 tm_file=sparc/vxsparc.h
3342                 tmake_file=sparc/t-vxsparc
3343                 use_collect2=yes
3344                 thread_file='vxworks'
3345                 ;;
3346         sparc-*-aout*)
3347                 tmake_file=sparc/t-sparcbare
3348                 tm_file="sparc/aout.h libgloss.h"
3349                 ;;
3350         sparc-*-netbsd*)
3351                 tm_file=sparc/netbsd.h
3352                 tmake_file=t-netbsd
3353                 use_collect2=yes
3354                 ;;
3355         sparc-*-openbsd*)
3356                 # we need collect2 until our bug is fixed...
3357                 use_collect2=yes
3358                 ;;
3359         sparc-*-bsd*)
3360                 tm_file=sparc/bsd.h
3361                 ;;
3362         sparc-*-elf*)
3363                 tm_file=sparc/elf.h
3364                 tmake_file=sparc/t-elf
3365                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3366                 #float_format=i128
3367                 float_format=i64
3368                 ;;
3369         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
3370                 xm_file="${xm_file} sparc/xm-linux.h"
3371                 tm_file=sparc/linux-aout.h
3372                 xmake_file=x-linux
3373                 gnu_ld=yes
3374                 ;;
3375         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
3376                 xm_file="${xm_file} sparc/xm-linux.h"
3377                 xmake_file=x-linux
3378                 tm_file=sparc/linux.h
3379                 tmake_file="t-linux t-linux-gnulibc1"
3380                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3381                 gnu_ld=yes
3382                 float_format=sparc
3383                 ;;
3384         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
3385                 xm_file="${xm_file} sparc/xm-linux.h"
3386                 xmake_file=x-linux
3387                 tm_file=sparc/linux.h
3388                 tmake_file="t-linux"
3389                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3390                 gnu_ld=yes
3391                 if test x$enable_threads = xyes; then
3392                         thread_file='posix'
3393                 fi
3394                 float_format=sparc
3395                 ;;
3396         sparc-*-lynxos*)
3397                 if test x$gas = xyes
3398                 then
3399                         tm_file=sparc/lynx.h
3400                 else
3401                         tm_file=sparc/lynx-ng.h
3402                 fi
3403                 xm_file=sparc/xm-lynx.h
3404                 tmake_file=sparc/t-sunos41
3405                 xmake_file=x-lynx
3406                 ;;
3407         sparc-*-rtemsaout*)
3408                 tmake_file="sparc/t-sparcbare t-rtems"
3409                 tm_file=sparc/rtems.h
3410                 ;;
3411         sparc-*-rtems*|sparc-*-rtemself*)
3412                 tm_file="sparc/rtemself.h"
3413                 tmake_file="sparc/t-elf t-rtems"
3414                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3415                 #float_format=i128
3416                 float_format=i64
3417                 ;;
3418         sparcv9-*-solaris2*)
3419                 if test x$gnu_ld = xyes
3420                 then
3421                         tm_file=sparc/sol2-64.h
3422                 else
3423                         tm_file=sparc/sol2-sld-64.h
3424                 fi
3425                 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3426                 xm_defines="USG POSIX"
3427                 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
3428                 xmake_file=sparc/x-sysv4
3429                 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
3430                 float_format=none
3431                 if test x${enable_threads} = x ; then
3432                     enable_threads=$have_pthread_h
3433                     if test x${enable_threads} = x ; then
3434                         enable_threads=$have_thread_h
3435                     fi
3436                 fi
3437                 if test x${enable_threads} = xyes ; then
3438                     if test x${have_pthread_h} = xyes ; then
3439                         thread_file='posix'
3440                     else
3441                         thread_file='solaris'
3442                     fi
3443                 fi
3444                 ;;
3445         sparc-hal-solaris2*)
3446                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3447                 xm_defines="USG POSIX"
3448                 tm_file="sparc/sol2.h sparc/hal.h"
3449                 tmake_file="sparc/t-halos sparc/t-sol2"
3450                 xmake_file=sparc/x-sysv4
3451                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
3452                 case $machine in
3453 changequote(,)dnl
3454                 *-*-solaris2.[0-4])
3455 changequote([,])dnl
3456                         float_format=i128
3457                 ;;
3458                 *)
3459                         float_format=none
3460                         ;;
3461                 esac
3462                 thread_file='solaris'
3463                 ;;
3464         sparc-*-solaris2*)
3465                 if test x$gnu_ld = xyes
3466                 then
3467                         tm_file=sparc/sol2.h
3468                 else
3469                         tm_file=sparc/sol2-sld.h
3470                 fi
3471                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3472                 xm_defines="USG POSIX"
3473                 tmake_file=sparc/t-sol2
3474                 xmake_file=sparc/x-sysv4
3475                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
3476                 case $machine in
3477 changequote(,)dnl
3478                 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
3479 changequote([,])dnl
3480                 *-*-solaris2*)
3481                         if test x$gnu_ld = xyes
3482                         then
3483                                 tm_file=sparc/sol2-64.h
3484                         else
3485                                 tm_file=sparc/sol2-sld-64.h
3486                         fi
3487                         tmake_file="$tmake_file sparc/t-sol2-64"
3488                         ;;
3489                 esac
3490                 case $machine in
3491 changequote(,)dnl
3492                 *-*-solaris2.[0-4])
3493 changequote([,])dnl
3494                         float_format=i128
3495                         ;;
3496                 *)
3497                         float_format=none
3498                         ;;
3499                 esac
3500                 if test x${enable_threads} = x; then
3501                     enable_threads=$have_pthread_h
3502                     if test x${enable_threads} = x; then
3503                         enable_threads=$have_thread_h
3504                     fi
3505                 fi
3506                 if test x${enable_threads} = xyes; then
3507                     if test x${have_pthread_h} = xyes; then
3508                         thread_file='posix'
3509                     else
3510                         thread_file='solaris'
3511                     fi
3512                 fi
3513                 ;;
3514         sparc-*-sunos4.0*)
3515                 tm_file=sparc/sunos4.h
3516                 tmake_file=sparc/t-sunos40
3517                 use_collect2=yes
3518                 ;;
3519         sparc-*-sunos4*)
3520                 tm_file=sparc/sunos4.h
3521                 tmake_file=sparc/t-sunos41
3522                 use_collect2=yes
3523                 if test x$gas = xyes; then
3524                         tm_file="${tm_file} sparc/sun4gas.h"
3525                 fi
3526                 ;;
3527         sparc-*-sunos3*)
3528                 tm_file=sparc/sun4o3.h
3529                 use_collect2=yes
3530                 ;;
3531         sparc-*-sysv4*)
3532                 tm_file=sparc/sysv4.h
3533                 xm_file="sparc/xm-sysv4.h"
3534                 xm_defines="USG POSIX"
3535                 tmake_file=t-svr4
3536                 xmake_file=sparc/x-sysv4
3537                 extra_parts="crtbegin.o crtend.o"
3538                 ;;
3539         sparc-*-vxsim*)
3540                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3541                 xm_defines="USG POSIX"
3542                 tm_file=sparc/vxsim.h
3543                 tmake_file=sparc/t-vxsparc
3544                 xmake_file=sparc/x-sysv4
3545                 ;;
3546         sparclet-*-aout*)
3547                 tm_file="sparc/splet.h libgloss.h"
3548                 tmake_file=sparc/t-splet
3549                 ;;
3550         sparclite-*-coff*)
3551                 tm_file="sparc/litecoff.h libgloss.h"
3552                 tmake_file=sparc/t-sparclite
3553                 ;;
3554         sparclite-*-aout*)
3555                 tm_file="sparc/lite.h aoutos.h libgloss.h"
3556                 tmake_file=sparc/t-sparclite
3557                 ;;
3558         sparclite-*-elf*)
3559                 tm_file="sparc/liteelf.h"
3560                 tmake_file=sparc/t-sparclite
3561                 extra_parts="crtbegin.o crtend.o"
3562                 ;;
3563         sparc86x-*-aout*)
3564                 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
3565                 tmake_file=sparc/t-sp86x
3566                 ;;
3567         sparc86x-*-elf*)        
3568                 tm_file="sparc/sp86x-elf.h"
3569                 tmake_file=sparc/t-sp86x
3570                 extra_parts="crtbegin.o crtend.o"
3571                 ;;
3572         sparc64-*-aout*)
3573                 tmake_file=sparc/t-sp64
3574                 tm_file=sparc/sp64-aout.h
3575                 ;;
3576         sparc64-*-elf*)
3577                 tmake_file=sparc/t-sp64
3578                 tm_file=sparc/sp64-elf.h
3579                 extra_parts="crtbegin.o crtend.o"
3580                 ;;
3581         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
3582                 tmake_file="t-linux sparc/t-linux64"
3583                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3584                 tm_file=sparc/linux64.h
3585                 xmake_file=x-linux
3586                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3587                 gnu_ld=yes
3588                 if test x$enable_threads = xyes; then
3589                         thread_file='posix'
3590                 fi
3591                 float_format=sparc
3592                 ;;
3593 # This hasn't been upgraded to GCC 2.
3594 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
3595 #               tm_file=tahoe/harris.h
3596 #               ;;
3597 #       tahoe-*-bsd*)                   # tahoe running BSD
3598 #               ;;
3599
3600         thumb*-*-*)
3601                 AC_MSG_ERROR([
3602 *** The Thumb targets have been depreciated.  The equivalent
3603 *** ARM based toolchain can now generated Thumb instructions
3604 *** when the -mthumb switch is given to the compiler.])
3605                 ;;
3606 # This hasn't been upgraded to GCC 2.
3607 #       tron-*-*)
3608 #               cpu_type=gmicro
3609 #               use_collect2=yes
3610 #               ;;
3611         v850-*-rtems*)
3612                 cpu_type=v850
3613                 tm_file="v850/rtems.h"
3614                 xm_file="v850/xm-v850.h"
3615                 tmake_file="v850/t-v850 t-rtems"
3616                 if test x$stabs = xyes
3617                 then
3618                         tm_file="${tm_file} dbx.h"
3619                 fi
3620                 use_collect2=no
3621                 ;;
3622         v850-*-*)
3623                 target_cpu_default="TARGET_CPU_generic"
3624                 cpu_type=v850
3625                 tm_file="v850/v850.h"
3626                 xm_file="v850/xm-v850.h"
3627                 tmake_file=v850/t-v850
3628                 if test x$stabs = xyes
3629                 then
3630                         tm_file="${tm_file} dbx.h"
3631                 fi
3632                 use_collect2=no
3633                 ;;
3634         vax-*-bsd*)                     # vaxen running BSD
3635                 use_collect2=yes
3636                 float_format=vax
3637                 ;;
3638         vax-*-sysv*)                    # vaxen running system V
3639                 tm_file="${tm_file} vax/vaxv.h"
3640                 xm_defines=USG
3641                 float_format=vax
3642                 ;;
3643         vax-*-netbsd*)
3644                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
3645                 tmake_file=t-netbsd
3646                 float_format=vax
3647                 use_collect2=yes
3648                 ;;
3649         vax-*-openbsd*)
3650                 tmake_file="${tmake_file} vax/t-openbsd"
3651                 ;;
3652         vax-*-ultrix*)                  # vaxen running ultrix
3653                 tm_file="${tm_file} vax/ultrix.h"
3654                 use_collect2=yes
3655                 float_format=vax
3656                 ;;
3657         vax-*-vms*)                     # vaxen running VMS
3658                 xm_file=vax/xm-vms.h
3659                 tm_file=vax/vms.h
3660                 float_format=vax
3661                 ;;
3662         vax-*-*)                        # vax default entry
3663                 float_format=vax
3664                 ;;
3665         we32k-att-sysv*)
3666                 xm_file="${xm_file} xm-svr3"
3667                 use_collect2=yes
3668                 ;;
3669         *)
3670                 echo "Configuration $machine not supported" 1>&2
3671                 exit 1
3672                 ;;
3673         esac
3674
3675         case $machine in
3676         *-*-linux-gnu*)
3677                 ;; # Existing GNU/Linux systems do not use the GNU setup.
3678         *-*-gnu*)
3679                 # On the GNU system, the setup is just about the same on
3680                 # each different CPU.  The specific machines that GNU
3681                 # supports are matched above and just set $cpu_type.
3682                 xm_file="xm-gnu.h ${xm_file}"
3683                 tm_file=${cpu_type}/gnu.h
3684                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3685                 # GNU always uses ELF.
3686                 elf=yes
3687                 # GNU tools are the only tools.
3688                 gnu_ld=yes
3689                 gas=yes
3690                 xmake_file=x-linux      # These details are the same as Linux.
3691                 tmake_file=t-gnu        # These are not.
3692                 ;;
3693         *-*-sysv4*)
3694                 xmake_try_sysv=x-sysv
3695                 install_headers_dir=install-headers-cpio
3696                 ;;
3697         *-*-sysv*)
3698                 install_headers_dir=install-headers-cpio
3699                 ;;
3700         esac
3701
3702         # Distinguish i[34567]86
3703         # Also, do not run mips-tfile on MIPS if using gas.
3704         # Process --with-cpu= for PowerPC/rs6000
3705         target_cpu_default2=
3706         case $machine in
3707         i486-*-*)
3708                 target_cpu_default2=1
3709                 ;;
3710         i586-*-*)
3711                 case $target_alias in
3712                         k6-*)
3713                                 target_cpu_default2=4
3714                                 ;;
3715                         *)
3716                                 target_cpu_default2=2
3717                                 ;;
3718                 esac
3719                 ;;
3720         i686-*-* | i786-*-*)
3721                 target_cpu_default2=3
3722                 ;;
3723         alpha*-*-*)
3724                 case $machine in
3725 changequote(,)dnl
3726                         alphaev6[78]*)
3727 changequote([,])dnl
3728                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3729                                 ;;
3730                         alphaev6*)
3731                                 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
3732                                 ;;
3733                         alphapca56*)
3734                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
3735                                 ;;
3736                         alphaev56*)
3737                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
3738                                 ;;
3739                         alphaev5*)
3740                                 target_cpu_default2="MASK_CPU_EV5"
3741                                 ;;
3742                 esac
3743                                 
3744                 if test x$gas = xyes
3745                 then
3746                         if test "$target_cpu_default2" = ""
3747                         then
3748                                 target_cpu_default2="MASK_GAS"
3749                         else
3750                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
3751                         fi
3752                 fi
3753                 ;;
3754         arm*-*-*)
3755                 case "x$with_cpu" in
3756                         x)
3757                                 # The most generic
3758                                 target_cpu_default2="TARGET_CPU_generic"
3759                                 ;;
3760
3761                         # Distinguish cores, and major variants
3762                         # arm7m doesn't exist, but D & I don't affect code
3763 changequote(,)dnl
3764                         xarm[23678] | xarm250 | xarm[67][01]0 \
3765                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3766                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
3767                         | xstrongarm | xstrongarm110 | xstrongarm1100)
3768 changequote([,])dnl
3769                                 target_cpu_default2="TARGET_CPU_$with_cpu"
3770                                 ;;
3771
3772                         xyes | xno)
3773                                 echo "--with-cpu must be passed a value" 1>&2
3774                                 exit 1
3775                                 ;;
3776
3777                         *)
3778                                 if test x$pass2done = xyes
3779                                 then
3780                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3781                                         exit 1
3782                                 fi
3783                                 ;;
3784                 esac
3785                 ;;
3786
3787         mips*-*-ecoff* | mips*-*-elf*)
3788                 if test x$gas = xyes
3789                 then
3790                         if test x$gnu_ld = xyes
3791                         then
3792                                 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
3793                         else
3794                                 target_cpu_default2="MASK_GAS"
3795                         fi
3796                 fi
3797                 ;;
3798         mips*-*-*)
3799                 if test x$gas = xyes
3800                 then
3801                         target_cpu_default2="MASK_GAS"
3802                 fi
3803                 ;;
3804         powerpc*-*-* | rs6000-*-*)
3805                 case "x$with_cpu" in
3806                         x)
3807                                 ;;
3808
3809                         xcommon | xpower | xpower2 | xpowerpc | xrios \
3810                           | xrios1 | xrios2 | xrsc | xrsc1 \
3811                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
3812                           | xec603e | x740 | x750 | x401 \
3813                           | x403 | x505 | x801 | x821 | x823 | x860)
3814                                 target_cpu_default2="\"$with_cpu\""
3815                                 ;;
3816
3817                         xyes | xno)
3818                                 echo "--with-cpu must be passed a value" 1>&2
3819                                 exit 1
3820                                 ;;
3821
3822                         *)
3823                                 if test x$pass2done = xyes
3824                                 then
3825                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3826                                         exit 1
3827                                 fi
3828                                 ;;
3829                 esac
3830                 ;;
3831         sparc*-*-*)
3832                 case ".$with_cpu" in
3833                         .)
3834                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3835                                 ;;
3836                         .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
3837                                 target_cpu_default2="TARGET_CPU_$with_cpu"
3838                                 ;;
3839                         *)
3840                                 if test x$pass2done = xyes
3841                                 then
3842                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3843                                         exit 1
3844                                 fi
3845                                 ;;
3846                 esac
3847                 ;;
3848         esac
3849
3850         if test "$target_cpu_default2" != ""
3851         then
3852                 if test "$target_cpu_default" != ""
3853                 then
3854                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3855                 else
3856                         target_cpu_default=$target_cpu_default2
3857                 fi
3858         fi
3859
3860         # No need for collect2 if we have the GNU linker.
3861         # Actually, there is now; GNU ld doesn't handle the EH info or
3862         # collecting for shared libraries.
3863         #case x$gnu_ld in
3864         #xyes)
3865         #       use_collect2=
3866         #       ;;
3867         #esac
3868
3869 # Save data on machine being used to compile GCC in build_xm_file.
3870 # Save data on host machine in vars host_xm_file and host_xmake_file.
3871         if test x$pass1done = x
3872         then
3873                 if test x"$xm_file" = x
3874                 then build_xm_file=$cpu_type/xm-$cpu_type.h
3875                 else build_xm_file=$xm_file
3876                 fi
3877                 build_xm_defines=$xm_defines
3878                 build_install_headers_dir=$install_headers_dir
3879                 build_exeext=$exeext
3880                 pass1done=yes
3881         else
3882                 if test x$pass2done = x
3883                 then
3884                         if test x"$xm_file" = x
3885                         then host_xm_file=$cpu_type/xm-$cpu_type.h
3886                         else host_xm_file=$xm_file
3887                         fi
3888                         host_xm_defines=$xm_defines
3889                         if test x"$xmake_file" = x
3890                         then xmake_file=$cpu_type/x-$cpu_type
3891                         fi
3892                         host_xmake_file="$xmake_file"
3893                         host_truncate_target=$truncate_target
3894                         host_extra_gcc_objs=$extra_gcc_objs
3895                         host_extra_objs=$extra_host_objs
3896                         host_exeext=$exeext
3897                         pass2done=yes
3898                 fi
3899         fi
3900 done
3901
3902 extra_objs="${host_extra_objs} ${extra_objs}"
3903
3904 # Default the target-machine variables that were not explicitly set.
3905 if test x"$tm_file" = x
3906 then tm_file=$cpu_type/$cpu_type.h; fi
3907
3908 if test x$extra_headers = x
3909 then extra_headers=; fi
3910
3911 if test x"$xm_file" = x
3912 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3913
3914 if test x$md_file = x
3915 then md_file=$cpu_type/$cpu_type.md; fi
3916
3917 if test x$out_file = x
3918 then out_file=$cpu_type/$cpu_type.c; fi
3919
3920 if test x"$tmake_file" = x
3921 then tmake_file=$cpu_type/t-$cpu_type
3922 fi
3923
3924 if test x"$dwarf2" = xyes
3925 then tm_file="$tm_file tm-dwarf2.h"
3926 fi
3927
3928 if test x$float_format = x
3929 then float_format=i64
3930 fi
3931
3932 if test $float_format = none
3933 then float_h_file=Makefile.in
3934 else float_h_file=float-$float_format.h
3935 fi
3936
3937 # Handle cpp installation.
3938 if test x$enable_cpp != xno
3939 then
3940   tmake_file="$tmake_file t-install-cpp"
3941 fi
3942
3943 # Say what files are being used for the output code and MD file.
3944 echo "Using \`$srcdir/config/$out_file' to output insns."
3945 echo "Using \`$srcdir/config/$md_file' as machine description file."
3946
3947 count=a
3948 for f in $tm_file; do
3949         count=${count}x
3950 done
3951 if test $count = ax; then
3952         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3953 else
3954         echo "Using the following target machine macro files:"
3955         for f in $tm_file; do
3956                 echo "  $srcdir/config/$f"
3957         done
3958 fi
3959
3960 count=a
3961 for f in $host_xm_file; do
3962         count=${count}x
3963 done
3964 if test $count = ax; then
3965         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3966 else
3967         echo "Using the following host machine macro files:"
3968         for f in $host_xm_file; do
3969                 echo "  $srcdir/config/$f"
3970         done
3971 fi
3972
3973 if test "$host_xm_file" != "$build_xm_file"; then
3974         count=a
3975         for f in $build_xm_file; do
3976                 count=${count}x
3977         done
3978         if test $count = ax; then
3979                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3980         else
3981                 echo "Using the following build machine macro files:"
3982                 for f in $build_xm_file; do
3983                         echo "  $srcdir/config/$f"
3984                 done
3985         fi
3986 fi
3987
3988 if test x$thread_file = x; then
3989         if test x$target_thread_file != x; then
3990                 thread_file=$target_thread_file
3991         else
3992                 thread_file='single'
3993         fi
3994 fi
3995
3996 # Set up the header files.
3997 # $links is the list of header files to create.
3998 # $vars is the list of shell variables with file names to include.
3999 # auto-host.h is the file containing items generated by autoconf and is
4000 # the first file included by config.h.
4001 null_defines=
4002 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
4003
4004 # If host=build, it is correct to have hconfig include auto-host.h
4005 # as well.  If host!=build, we are in error and need to do more 
4006 # work to find out the build config parameters.
4007 if test x$host = x$build
4008 then
4009         build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
4010 else
4011         # We create a subdir, then run autoconf in the subdir.
4012         # To prevent recursion we set host and build for the new
4013         # invocation of configure to the build for this invocation
4014         # of configure. 
4015         tempdir=build.$$
4016         rm -rf $tempdir
4017         mkdir $tempdir
4018         cd $tempdir
4019         case ${srcdir} in
4020         /*) realsrcdir=${srcdir};;
4021         *) realsrcdir=../${srcdir};;
4022         esac
4023         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4024                 --target=$target --host=$build --build=$build
4025
4026         # We just finished tests for the build machine, so rename
4027         # the file auto-build.h in the gcc directory.
4028         mv auto-host.h ../auto-build.h
4029         cd ..
4030         rm -rf $tempdir
4031         build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
4032 fi
4033
4034 xm_file="gansidecl.h ${xm_file}"
4035 tm_file="gansidecl.h ${tm_file}"
4036
4037 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
4038 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
4039 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
4040
4041 rm -f config.bak
4042 if test -f config.status; then mv -f config.status config.bak; fi
4043
4044 # Make the links.
4045 while test -n "$vars"
4046 do
4047         set $vars; var=$1; shift; vars=$*
4048         set $links; link=$1; shift; links=$*
4049         set $defines; define=$1; shift; defines=$*
4050
4051         rm -f $link
4052         # Make sure the file is created, even if it is empty.
4053         echo >$link
4054
4055         # Define TARGET_CPU_DEFAULT if the system wants one.
4056         # This substitutes for lots of *.h files.
4057         if test "$target_cpu_default" != "" -a $link = tm.h
4058         then
4059                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
4060         fi
4061
4062         for file in `eval echo '$'$var`; do
4063                 case $file in
4064                 auto-host.h | auto-build.h )
4065                         ;;
4066                 *)
4067                         echo '#ifdef IN_GCC' >>$link
4068                         ;;
4069                 esac
4070                 echo "#include \"$file\"" >>$link
4071                 case $file in
4072                 auto-host.h | auto-build.h )
4073                         ;;
4074                 *)
4075                         echo '#endif' >>$link
4076                         ;;
4077                 esac
4078         done
4079
4080         for def in `eval echo '$'$define`; do
4081                 echo "#ifndef $def" >>$link
4082                 echo "#define $def" >>$link
4083                 echo "#endif" >>$link
4084         done
4085 done
4086
4087 # Truncate the target if necessary
4088 if test x$host_truncate_target != x; then
4089         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4090 fi
4091
4092 # Get the version trigger filename from the toplevel
4093 if test "${with_gcc_version_trigger+set}" = set; then
4094         gcc_version_trigger=$with_gcc_version_trigger
4095 else
4096         gcc_version_trigger=${srcdir}/version.c
4097 fi
4098 changequote(,)dnl
4099 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
4100 changequote([,])dnl
4101
4102 # Internationalization
4103 PACKAGE=gcc
4104 VERSION="$gcc_version"
4105 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
4106         [Define to the name of the distribution.])
4107 AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
4108         [Define to the version of the distribution.])
4109 AC_SUBST(PACKAGE)
4110 AC_SUBST(VERSION)
4111
4112 ALL_LINGUAS="en_GB"
4113
4114 # Enable NLS support by default
4115 AC_ARG_ENABLE(nls,
4116   [  --enable-nls            use Native Language Support (default)],
4117   , enable_nls=yes)
4118
4119 # if cross compiling, disable NLS support.
4120 # It's not worth the trouble, at least for now.
4121
4122 if test "${build}" != "${host}" && test "x$enable_nls" == "xyes"; then
4123   AC_MSG_WARN(Disabling NLS support for canadian cross compiler.)
4124   enable_nls=no
4125 fi
4126
4127 AM_GNU_GETTEXT
4128 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
4129
4130 # Windows32 Registry support for specifying GCC installation paths.
4131 AC_ARG_ENABLE(win32-registry,
4132 [  --disable-win32-registry
4133                           Disable lookup of installation paths in the
4134                          Registry on Windows hosts.
4135   --enable-win32-registry Enable registry lookup (default).
4136   --enable-win32-registry=KEY
4137                           Use KEY instead of GCC version as the last portion
4138                          of the registry key.],,)
4139
4140 AC_MSG_CHECKING(whether windows registry support is requested)
4141 if test x$enable_win32_registry != xno; then
4142   AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
4143 [Define to 1 if installation paths should be looked up in Windows32
4144    Registry. Ignored on non windows32 hosts.])
4145   AC_MSG_RESULT(yes)
4146 else
4147   AC_MSG_RESULT(no)
4148 fi
4149
4150 # Check if user specified a different registry key.
4151 case x${enable_win32_registry} in
4152 x | xyes)
4153   # default.
4154   gcc_cv_win32_registry_key="$VERSION"
4155   ;;
4156 xno)
4157   # no registry lookup.
4158   gcc_cv_win32_registry_key=''
4159   ;;
4160 *)
4161   # user-specified key.
4162   gcc_cv_win32_registry_key="$enable_win32_registry"
4163   ;;
4164 esac
4165
4166 if test x$enable_win32_registry != xno; then
4167   AC_MSG_CHECKING(registry key on windows hosts)
4168   AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
4169         [Define to be the last portion of registry key on windows hosts.])
4170   AC_MSG_RESULT($gcc_cv_win32_registry_key)
4171 fi
4172
4173 # Get an absolute path to the GCC top-level source directory
4174 holddir=`pwd`
4175 cd $srcdir
4176 topdir=`pwd`
4177 cd $holddir
4178
4179 # Conditionalize the makefile for this host machine.
4180 # Make-host contains the concatenation of all host makefile fragments
4181 # [there can be more than one].  This file is built by configure.frag.
4182 host_overrides=Make-host
4183 dep_host_xmake_file=
4184 for f in .. ${host_xmake_file}
4185 do
4186         if test -f ${srcdir}/config/$f
4187         then
4188                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4189         fi
4190 done
4191
4192 # Conditionalize the makefile for this target machine.
4193 # Make-target contains the concatenation of all host makefile fragments
4194 # [there can be more than one].  This file is built by configure.frag.
4195 target_overrides=Make-target
4196 dep_tmake_file=
4197 for f in .. ${tmake_file}
4198 do
4199         if test -f ${srcdir}/config/$f
4200         then
4201                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4202         fi
4203 done
4204
4205 # If the host doesn't support symlinks, modify CC in
4206 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4207 # Otherwise, we can use "CC=$(CC)".
4208 rm -f symtest.tem
4209 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
4210 then
4211         cc_set_by_configure="\$(CC)"
4212         quoted_cc_set_by_configure="\$(CC)"
4213         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4214 else
4215         rm -f symtest.tem
4216         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4217         then
4218                 symbolic_link="cp -p"
4219         else
4220                 symbolic_link="cp"
4221         fi
4222         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
4223         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
4224         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4225 fi
4226 rm -f symtest.tem
4227
4228 out_object_file=`basename $out_file .c`.o
4229
4230 tm_file_list=
4231 for f in $tm_file; do
4232   case $f in
4233     gansidecl.h )
4234        tm_file_list="${tm_file_list} $f" ;;
4235     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
4236   esac
4237 done
4238
4239 host_xm_file_list=
4240 for f in $host_xm_file; do
4241   case $f in
4242     auto-host.h | gansidecl.h | hwint.h )
4243        host_xm_file_list="${host_xm_file_list} $f" ;;
4244     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
4245   esac
4246 done
4247
4248 build_xm_file_list=
4249 for f in $build_xm_file; do
4250   case $f in
4251     auto-build.h | auto-host.h | gansidecl.h | hwint.h )
4252        build_xm_file_list="${build_xm_file_list} $f" ;;
4253     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
4254   esac
4255 done
4256
4257 # Define macro CROSS_COMPILE in compilation
4258 # if this is a cross-compiler.
4259 # Also use all.cross instead of all.internal
4260 # and add cross-make to Makefile.
4261 cross_overrides="/dev/null"
4262 if test x$host != x$target
4263 then
4264         cross_defines="CROSS=-DCROSS_COMPILE"
4265         cross_overrides="${topdir}/cross-make"
4266 fi
4267
4268 # If this is a cross-compiler that does not
4269 # have its own set of headers then define
4270 # inhibit_libc
4271
4272 # If this is using newlib, then define inhibit_libc in
4273 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
4274 # libgcc.a, but that's OK because newlib should have its own version of
4275 # assert.h.
4276 inhibit_libc=
4277 if [test x$host != x$target] && [test x$with_headers = x]; then
4278        inhibit_libc=-Dinhibit_libc
4279 else
4280        if [test x$with_newlib = xyes]; then
4281                inhibit_libc=-Dinhibit_libc
4282        fi
4283 fi
4284 AC_SUBST(inhibit_libc)
4285
4286 # When building gcc with a cross-compiler, we need to fix a few things.
4287 # This must come after cross-make as we want all.build to override
4288 # all.cross.
4289 build_overrides="/dev/null"
4290 if test x$build != x$host
4291 then
4292         build_overrides="${topdir}/build-make"
4293 fi
4294
4295 # Expand extra_headers to include complete path.
4296 # This substitutes for lots of t-* files.
4297 extra_headers_list=
4298 if test "x$extra_headers" = x
4299 then true
4300 else
4301         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4302         for file in $extra_headers;
4303         do
4304                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4305         done
4306 fi
4307
4308 if test x$use_collect2 = xno; then
4309         use_collect2=
4310 fi
4311
4312 # Add a definition of USE_COLLECT2 if system wants one.
4313 # Also tell toplev.c what to do.
4314 # This substitutes for lots of t-* files.
4315 if test x$use_collect2 = x
4316 then
4317         will_use_collect2=
4318         maybe_use_collect2=
4319 else
4320         will_use_collect2="collect2"
4321         maybe_use_collect2="-DUSE_COLLECT2"
4322 fi
4323
4324 # NEED TO CONVERT
4325 # Set MD_DEPS if the real md file is in md.pre-cpp.
4326 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
4327 # for line oriented comments, so we must always use a GNU cpp.  If
4328 # building gcc with a cross compiler, use the cross compiler just
4329 # built.  Otherwise, we can use the cpp just built.
4330 md_file_sub=
4331 if test "x$md_cppflags" = x
4332 then
4333         md_file_sub=$srcdir/config/$md_file
4334 else
4335         md_file=md
4336 fi
4337
4338 # If we have gas in the build tree, make a link to it.
4339 if test -f ../gas/Makefile; then
4340         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
4341 fi
4342
4343 # If we have nm in the build tree, make a link to it.
4344 if test -f ../binutils/Makefile; then
4345         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4346 fi
4347
4348 # If we have ld in the build tree, make a link to it.
4349 if test -f ../ld/Makefile; then
4350 #       if test x$use_collect2 = x; then
4351 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
4352 #       else
4353                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
4354 #       fi
4355 fi
4356
4357 # Figure out what assembler alignment features are present.
4358 AC_MSG_CHECKING(assembler alignment features)
4359 gcc_cv_as=
4360 gcc_cv_as_alignment_features=
4361 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
4362 if test -x "$DEFAULT_ASSEMBLER"; then
4363         gcc_cv_as="$DEFAULT_ASSEMBLER"
4364 elif test -x "$AS"; then
4365         gcc_cv_as="$AS"
4366 elif test -x as$host_exeext; then
4367         # Build using assembler in the current directory.
4368         gcc_cv_as=./as$host_exeext
4369 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
4370         # Single tree build which includes gas.
4371         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
4372         do
4373 changequote(,)dnl
4374                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
4375 changequote([,])dnl
4376                 if test x$gcc_cv_gas_version != x; then
4377                         break
4378                 fi
4379         done
4380 changequote(,)dnl
4381         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
4382         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
4383 changequote([,])dnl
4384         if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4385                 # Gas version 2.6 and later support for .balign and .p2align.
4386                 # bytes to skip when using .p2align.
4387                 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
4388                         gcc_cv_as_alignment_features=".balign and .p2align"
4389                         AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4390                 fi
4391                 # Gas version 2.8 and later support specifying the maximum
4392                 # bytes to skip when using .p2align.
4393                 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
4394                         gcc_cv_as_alignment_features=".p2align including maximum skip"
4395                         AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4396                 fi
4397         fi
4398 elif test x$host = x$target; then
4399         # Native build.
4400         # Search the same directories that the installed compiler will
4401         # search.  Else we may find the wrong assembler and lose.  If we
4402         # do not find a suitable assembler binary, then try the user's
4403         # path.
4404         #
4405         # Also note we have to check MD_EXEC_PREFIX before checking the
4406         # user's path.  Unfortunately, there is no good way to get at the
4407         # value of MD_EXEC_PREFIX here.  So we do a brute force search
4408         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
4409         # to be fixed as part of the make/configure rewrite too.
4410
4411         if test "x$exec_prefix" = xNONE; then
4412                 if test "x$prefix" = xNONE; then
4413                         test_prefix=/usr/local
4414                 else
4415                         test_prefix=$prefix
4416                 fi
4417         else
4418                 test_prefix=$exec_prefix
4419         fi
4420
4421         # If the loop below does not find an assembler, then use whatever
4422         # one we can find in the users's path.
4423         # user's path.
4424         as=as$host_exeext
4425
4426         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
4427                    $test_prefix/lib/gcc-lib/$target \
4428                    /usr/lib/gcc/$target/$gcc_version \
4429                    /usr/lib/gcc/$target \
4430                    $test_prefix/$target/bin/$target/$gcc_version \
4431                    $test_prefix/$target/bin \
4432                    /usr/libexec \
4433                    /usr/ccs/gcc \
4434                    /usr/ccs/bin \
4435                    /udk/usr/ccs/bin \
4436                    /bsd43/usr/lib/cmplrs/cc \
4437                    /usr/cross64/usr/bin \
4438                    /usr/lib/cmplrs/cc \
4439                    /sysv/usr/lib/cmplrs/cc \
4440                    /svr4/usr/lib/cmplrs/cc \
4441                    /usr/bin"
4442
4443         for dir in $test_dirs; do
4444                 if test -f $dir/as$host_exeext; then
4445                         gcc_cv_as=$dir/as$host_exeext
4446                         break;
4447                 fi
4448         done
4449 fi
4450 if test x$gcc_cv_as != x; then
4451         # Check if we have .balign and .p2align
4452         echo ".balign  4" > conftest.s
4453         echo ".p2align  2" >> conftest.s
4454         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4455                 gcc_cv_as_alignment_features=".balign and .p2align"
4456                 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4457         fi
4458         rm -f conftest.s conftest.o
4459         # Check if specifying the maximum bytes to skip when
4460         # using .p2align is supported.
4461         echo ".p2align 4,,7" > conftest.s
4462         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4463                 gcc_cv_as_alignment_features=".p2align including maximum skip"
4464                 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4465         fi
4466         rm -f conftest.s conftest.o
4467 fi
4468 AC_MSG_RESULT($gcc_cv_as_alignment_features)
4469
4470 AC_MSG_CHECKING(assembler subsection support)
4471 gcc_cv_as_subsections=
4472 if test x$gcc_cv_as != x; then
4473         # Check if we have .subsection
4474         echo ".subsection 1" > conftest.s
4475         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4476                 gcc_cv_as_subsections=".subsection"
4477                 if test -x nm$host_exeext; then
4478                         gcc_cv_nm=./nm$host_exeext
4479                 elif test x$host = x$target; then
4480                         # Native build.
4481                         gcc_cv_nm=nm$host_exeext
4482                 fi
4483                 if test x$gcc_cv_nm != x; then
4484                         cat > conftest.s <<EOF
4485 conftest_label1: .word 0
4486 .subsection -1
4487 conftest_label2: .word 0
4488 .previous
4489 EOF
4490                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4491                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
4492                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
4493                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4494                                         :
4495                                 else
4496                                         gcc_cv_as_subsections="working .subsection -1"
4497                                         AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
4498 [Define if your assembler supports .subsection and .subsection -1 starts
4499    emitting at the beginning of your section.])
4500                                 fi
4501                         fi
4502                 fi
4503         fi
4504         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4505 fi
4506 AC_MSG_RESULT($gcc_cv_as_subsections)
4507
4508 AC_MSG_CHECKING(assembler weak support)
4509 gcc_cv_as_weak=
4510 if test x$gcc_cv_as != x; then
4511         # Check if we have .weak
4512         echo "  .weak foobar" > conftest.s
4513         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4514                 AC_DEFINE(HAVE_GAS_WEAK, 1,
4515                         [Define if your assembler supports .weak.])
4516                 gcc_cv_as_weak="yes"
4517         fi
4518         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4519 fi
4520 AC_MSG_RESULT($gcc_cv_as_weak)
4521
4522 AC_MSG_CHECKING(assembler hidden support)
4523 gcc_cv_as_hidden=
4524 if test x$gcc_cv_as != x; then
4525         # Check if we have .hidden
4526         echo "  .hidden foobar" > conftest.s
4527         echo "foobar:" >> conftest.s
4528         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4529                 AC_DEFINE(HAVE_GAS_HIDDEN, 1,
4530                         [Define if your assembler supports .hidden.])
4531                 gcc_cv_as_hidden="yes"
4532         fi
4533         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4534 fi
4535 AC_MSG_RESULT($gcc_cv_as_hidden)
4536
4537 case "$target" in 
4538   sparc*-*-*)
4539     AC_CACHE_CHECK([assembler .register pseudo-op support],
4540         gcc_cv_as_register_pseudo_op, [
4541         gcc_cv_as_register_pseudo_op=unknown
4542         if test x$gcc_cv_as != x; then
4543             # Check if we have .register
4544             echo ".register %g2, #scratch" > conftest.s
4545             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4546                 gcc_cv_as_register_pseudo_op=yes
4547             else
4548                 gcc_cv_as_register_pseudo_op=no
4549             fi
4550             rm -f conftest.s conftest.o
4551         fi
4552     ])
4553     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
4554         AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
4555                 [Define if your assembler supports .register.])
4556     fi
4557
4558     AC_CACHE_CHECK([assembler supports -relax],
4559         gcc_cv_as_relax_opt, [
4560         gcc_cv_as_relax_opt=unknown
4561         if test x$gcc_cv_as != x; then
4562             # Check if gas supports -relax
4563             echo ".text" > conftest.s
4564             if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
4565                 gcc_cv_as_relax_opt=yes
4566             else
4567                 gcc_cv_as_relax_opt=no
4568             fi
4569             rm -f conftest.s conftest.o
4570         fi
4571     ])
4572     if test "x$gcc_cv_as_relax_opt" = xyes; then
4573         AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
4574                 [Define if your assembler supports -relax option.])
4575     fi
4576
4577     case "$tm_file" in
4578     *64*)
4579         AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
4580             gcc_cv_as_flags64, [
4581                 if test -n "$gcc_cv_as"; then
4582                     echo ".xword foo" > conftest.s
4583                     gcc_cv_as_flags64=no
4584                     for flag in "-xarch=v9" "-64 -Av9"; do
4585                         if $gcc_cv_as $flag -o conftest.o conftest.s \
4586                             > /dev/null 2>&1; then
4587                             gcc_cv_as_flags64=$flag
4588                             break
4589                         fi
4590                     done
4591                     rm -f conftest.s conftest.o
4592                 else
4593                     if test "$gas" = yes; then
4594                         gcc_cv_as_flags64="-64 -Av9"
4595                     else
4596                         gcc_cv_as_flags64="-xarch=v9"
4597                     fi
4598                 fi
4599         ])
4600         if test "x$gcc_cv_as_flags64" = xno; then
4601 changequote(, )
4602             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4603             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4604 changequote([, ])
4605         else
4606             AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
4607                         [Define if the assembler supports 64bit sparc.])
4608         fi
4609         ;;
4610     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
4611         ;;
4612     esac
4613
4614     if test "x$gcc_cv_as_flags64" != xno; then
4615         AC_CACHE_CHECK([for assembler offsetable %lo() support],
4616             gcc_cv_as_offsetable_lo10, [
4617             gcc_cv_as_offsetable_lo10=unknown
4618             if test "x$gcc_cv_as" != x; then
4619                 # Check if assembler has offsetable %lo()
4620                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
4621                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
4622                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
4623                         > /dev/null 2>&1 &&
4624                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
4625                         > /dev/null 2>&1; then
4626                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
4627                         gcc_cv_as_offsetable_lo10=no
4628                     else
4629                         gcc_cv_as_offsetable_lo10=yes
4630                     fi
4631                 else
4632                     gcc_cv_as_offsetable_lo10=no
4633                 fi
4634                 rm -f conftest.s conftest.o conftest1.s conftest1.o
4635             fi
4636         ])
4637         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
4638             AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
4639                 [Define if your assembler supports offsetable %lo().])
4640         fi
4641     fi
4642     ;;
4643
4644 changequote(,)dnl
4645   i[34567]86-*-*)
4646 changequote([,])dnl
4647     AC_MSG_CHECKING(assembler instructions)
4648     gcc_cv_as_instructions=
4649     if test x$gcc_cv_as != x; then
4650         set "filds fists" "filds mem; fists mem"
4651         while test $# -gt 0
4652         do
4653                 echo "$2" > conftest.s
4654                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4655                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
4656                         AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
4657                 fi
4658                 shift 2
4659         done
4660         rm -f conftest.s conftest.o
4661     fi
4662     AC_MSG_RESULT($gcc_cv_as_instructions)
4663     ;;
4664 esac
4665
4666 # Figure out what language subdirectories are present.
4667 # Look if the user specified --enable-languages="..."; if not, use
4668 # the environment variable $LANGUAGES if defined. $LANGUAGES might
4669 # go away some day.
4670 if test x"${enable_languages+set}" != xset; then
4671         if test x"${LANGUAGES+set}" = xset; then
4672                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
4673         else
4674                 enable_languages=all
4675         fi
4676 else
4677         if test x"${enable_languages}" = x; then
4678                 AC_MSG_ERROR([--enable-languages needs at least one argument])
4679         fi
4680 fi
4681 subdirs=
4682 for lang in ${srcdir}/*/config-lang.in ..
4683 do
4684         case $lang in
4685         ..) ;;
4686         # The odd quoting in the next line works around
4687         # an apparent bug in bash 1.12 on linux.
4688 changequote(,)dnl
4689         ${srcdir}/[*]/config-lang.in) ;;
4690         *)
4691           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
4692           if test "x$lang_alias" = x
4693           then
4694                 echo "$lang doesn't set \$language." 1>&2
4695                 exit 1
4696           fi
4697           if test x"${enable_languages}" = xall; then
4698                 add_this_lang=yes
4699           else
4700                 case "${enable_languages}" in
4701                     ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
4702                         add_this_lang=yes
4703                         ;;
4704                     * )
4705                         add_this_lang=no
4706                         ;;
4707                 esac
4708           fi
4709           if test x"${add_this_lang}" = xyes; then
4710                 case $lang in
4711                     ${srcdir}/ada/config-lang.in)
4712                         if test x$gnat = xyes ; then
4713                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4714                         fi
4715                         ;;
4716                     *)
4717                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4718                         ;;
4719                 esac
4720           fi
4721           ;;
4722 changequote([,])dnl
4723         esac
4724 done
4725
4726 # Make gthr-default.h if we have a thread file.
4727 gthread_flags=
4728 if test $thread_file != single; then
4729     rm -f gthr-default.h
4730     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
4731     gthread_flags=-DHAVE_GTHR_DEFAULT
4732 fi
4733 AC_SUBST(gthread_flags)
4734
4735 # Find out what GC implementation we want, or may, use.
4736 AC_ARG_WITH(gc,
4737 [  --with-gc={simple,page} Choose the garbage collection mechanism to use
4738                            with the compiler.],
4739 [case "$withval" in
4740   simple | page)
4741     GGC=ggc-$withval
4742     ;;
4743   *)
4744     AC_MSG_ERROR([$withval is an invalid option to --with-gc])
4745     ;;
4746 esac],
4747 [if test $ac_cv_func_mmap_anywhere = yes \
4748     || test $ac_cv_func_valloc = yes; then
4749   GGC=ggc-page
4750 else
4751   GGC=ggc-simple
4752 fi])
4753 AC_SUBST(GGC)
4754 echo "Using $GGC for garbage collection."
4755
4756 # Build a new-abi (c++) system
4757 AC_ARG_ENABLE(new-gxx-abi,
4758 [  --enable-new-gxx-abi
4759                           select the new abi for g++. You must select an ABI
4760                           at configuration time, so that the correct runtime
4761                           support is built. You cannot mix ABIs.],
4762 [AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
4763         [Define if you want to always select the new-abi for g++.])
4764 GXX_ABI_FLAG='-fnew-abi'
4765 echo "Building a new-abi g++ compiler."
4766 ])
4767 AC_SUBST(GXX_ABI_FLAG)
4768
4769 # Build a new-libstdc++ system (ie libstdc++-v3)
4770 AC_MSG_CHECKING([for libstdc++ to install])
4771 AC_ARG_ENABLE(libstdcxx-v3,
4772 [  --enable-libstdcxx-v3 
4773                           enable libstdc++-v3 for building and installation],
4774   [enable_libstdcxx_v3=yes], [enable_libstdcxx_v3=no])
4775
4776 if test x$enable_libstdcxx_v3 = xyes; then
4777   AC_MSG_RESULT(v3)
4778   ac_esn=1
4779 else
4780   AC_MSG_RESULT(v2)
4781   ac_esn=0
4782 fi
4783 AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
4784   [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
4785
4786 dnl Very limited version of automake's enable-maintainer-mode
4787
4788 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
4789   dnl maintainer-mode is disabled by default
4790   AC_ARG_ENABLE(maintainer-mode,
4791 [  --enable-maintainer-mode enable make rules and dependencies not useful
4792                           (and sometimes confusing) to the casual installer],
4793       maintainer_mode=$enableval,
4794       maintainer_mode=no)
4795
4796 AC_MSG_RESULT($maintainer_mode)
4797
4798 if test "$maintainer_mode" = "yes"; then
4799   MAINT=''
4800 else
4801   MAINT='#'
4802 fi
4803 AC_SUBST(MAINT)dnl
4804
4805 # Make empty files to contain the specs and options for each language.
4806 # Then add #include lines to for a compiler that has specs and/or options.
4807
4808 lang_specs_files=
4809 lang_options_files=
4810 lang_tree_files=
4811 rm -f specs.h options.h gencheck.h
4812 touch specs.h options.h gencheck.h
4813 for subdir in . $subdirs
4814 do
4815         if test -f $srcdir/$subdir/lang-specs.h; then
4816                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4817                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4818         fi
4819         if test -f $srcdir/$subdir/lang-options.h; then
4820                 echo "#include \"$subdir/lang-options.h\"" >>options.h
4821                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4822         fi
4823         if test -f $srcdir/$subdir/$subdir-tree.def; then
4824                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
4825                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
4826         fi
4827 done
4828
4829 # These (without "all_") are set in each config-lang.in.
4830 # `language' must be a single word so is spelled singularly.
4831 all_languages=
4832 all_boot_languages=
4833 all_compilers=
4834 all_stagestuff=
4835 all_diff_excludes=
4836 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
4837 # List of language makefile fragments.
4838 all_lang_makefiles=
4839 all_headers=
4840 all_lib2funcs=
4841
4842 # Add the language fragments.
4843 # Languages are added via two mechanisms.  Some information must be
4844 # recorded in makefile variables, these are defined in config-lang.in.
4845 # We accumulate them and plug them into the main Makefile.
4846 # The other mechanism is a set of hooks for each of the main targets
4847 # like `clean', `install', etc.
4848
4849 language_fragments="Make-lang"
4850 language_hooks="Make-hooks"
4851 oldstyle_subdirs=
4852
4853 for s in .. $subdirs
4854 do
4855         if test $s != ".."
4856         then
4857                 language=
4858                 boot_language=
4859                 compilers=
4860                 stagestuff=
4861                 diff_excludes=
4862                 headers=
4863                 outputs=
4864                 lib2funcs=
4865                 . ${srcdir}/$s/config-lang.in
4866                 if test "x$language" = x
4867                 then
4868                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4869                         exit 1
4870                 fi
4871                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4872                 all_languages="$all_languages $language"
4873                 if test "x$boot_language" = xyes
4874                 then
4875                         all_boot_languages="$all_boot_languages $language"
4876                 fi
4877                 all_compilers="$all_compilers $compilers"
4878                 all_stagestuff="$all_stagestuff $stagestuff"
4879                 all_diff_excludes="$all_diff_excludes $diff_excludes"
4880                 all_headers="$all_headers $headers"
4881                 all_outputs="$all_outputs $outputs"
4882                 if test x$outputs = x
4883                 then
4884                         oldstyle_subdirs="$oldstyle_subdirs $s"
4885                 fi
4886                 all_lib2funcs="$all_lib2funcs $lib2funcs"
4887         fi
4888 done
4889
4890 # Since we can't use `::' targets, we link each language in
4891 # with a set of hooks, reached indirectly via lang.${target}.
4892
4893 rm -f Make-hooks
4894 touch Make-hooks
4895 target_list="all.build all.cross start.encap rest.encap \
4896         info dvi \
4897         install-normal install-common install-info install-man \
4898         uninstall distdir \
4899         mostlyclean clean distclean extraclean maintainer-clean \
4900         stage1 stage2 stage3 stage4"
4901 for t in $target_list
4902 do
4903         x=
4904         for lang in .. $all_languages
4905         do
4906                 if test $lang != ".."; then
4907                         x="$x $lang.$t"
4908                 fi
4909         done
4910         echo "lang.$t: $x" >> Make-hooks
4911 done
4912
4913 # If we're not building in srcdir, create .gdbinit.
4914
4915 if test ! -f Makefile.in; then
4916         echo "dir ." > .gdbinit
4917         echo "dir ${srcdir}" >> .gdbinit
4918         if test x$gdb_needs_out_file_path = xyes
4919         then
4920                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
4921         fi
4922         if test "x$subdirs" != x; then
4923                 for s in $subdirs
4924                 do
4925                         echo "dir ${srcdir}/$s" >> .gdbinit
4926                 done
4927         fi
4928         echo "source ${srcdir}/.gdbinit" >> .gdbinit
4929 fi
4930
4931 # Define variables host_canonical and build_canonical
4932 # because some Cygnus local changes in the Makefile depend on them.
4933 build_canonical=${build}
4934 host_canonical=${host}
4935 target_subdir=
4936 if test "${host}" != "${target}" ; then
4937     target_subdir=${target}/
4938 fi
4939 AC_SUBST(build_canonical)
4940 AC_SUBST(host_canonical)
4941 AC_SUBST(target_subdir)
4942         
4943 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
4944 # absolute path for gcc_tooldir based on inserting the number of up-directory
4945 # movements required to get from $(exec_prefix) to $(prefix) into the basic
4946 # $(libsubdir)/@(unlibsubdir) based path.
4947 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
4948 # make and thus we'd get different behavior depending on where we built the
4949 # sources.
4950 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
4951     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
4952 else
4953 changequote(<<, >>)dnl
4954 # An explanation of the sed strings:
4955 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
4956 #  -e 's|/$||'            match a trailing forward slash and eliminates it
4957 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
4958 #  -e 's|/[^/]*|../|g'    replaces each occurance of /<directory> with ../
4959 #
4960 # (*) Note this pattern overwrites the first character of the string
4961 # with a forward slash if one is not already present.  This is not a
4962 # problem because the exact names of the sub-directories concerned is
4963 # unimportant, just the number of them matters.
4964 #
4965 # The practical upshot of these patterns is like this:
4966 #
4967 #  prefix     exec_prefix        result
4968 #  ------     -----------        ------
4969 #   /foo        /foo/bar          ../
4970 #   /foo/       /foo/bar          ../
4971 #   /foo        /foo/bar/         ../
4972 #   /foo/       /foo/bar/         ../
4973 #   /foo        /foo/bar/ugg      ../../
4974 #
4975     dollar='$$'
4976     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
4977 changequote([, ])dnl
4978 fi
4979 AC_SUBST(gcc_tooldir)
4980 AC_SUBST(dollar)
4981
4982 # Nothing to do for FLOAT_H, float_format already handled.
4983 objdir=`pwd`
4984 AC_SUBST(objdir)
4985
4986 # Process the language and host/target makefile fragments.
4987 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
4988
4989 # Substitute configuration variables
4990 AC_SUBST(subdirs)
4991 AC_SUBST(all_boot_languages)
4992 AC_SUBST(all_compilers)
4993 AC_SUBST(all_diff_excludes)
4994 AC_SUBST(all_headers)
4995 AC_SUBST(all_lang_makefiles)
4996 AC_SUBST(all_languages)
4997 AC_SUBST(all_lib2funcs)
4998 AC_SUBST(all_stagestuff)
4999 AC_SUBST(build_exeext)
5000 AC_SUBST(build_install_headers_dir)
5001 AC_SUBST(build_xm_file_list)
5002 AC_SUBST(cc_set_by_configure)
5003 AC_SUBST(quoted_cc_set_by_configure)
5004 AC_SUBST(cpp_install_dir)
5005 AC_SUBST(dep_host_xmake_file)
5006 AC_SUBST(dep_tmake_file)
5007 AC_SUBST(extra_c_flags)
5008 AC_SUBST(extra_c_objs)
5009 AC_SUBST(extra_cpp_objs)
5010 AC_SUBST(extra_cxx_objs)
5011 AC_SUBST(extra_headers_list)
5012 AC_SUBST(extra_objs)
5013 AC_SUBST(extra_parts)
5014 AC_SUBST(extra_passes)
5015 AC_SUBST(extra_programs)
5016 AC_SUBST(float_h_file)
5017 AC_SUBST(gcc_gxx_include_dir)
5018 AC_SUBST(gcc_version)
5019 AC_SUBST(gcc_version_trigger)
5020 AC_SUBST(host_exeext)
5021 AC_SUBST(host_extra_gcc_objs)
5022 AC_SUBST(host_xm_file_list)
5023 AC_SUBST(install)
5024 AC_SUBST(lang_options_files)
5025 AC_SUBST(lang_specs_files)
5026 AC_SUBST(lang_tree_files)
5027 AC_SUBST(local_prefix)
5028 AC_SUBST(maybe_use_collect2)
5029 AC_SUBST(md_file)
5030 AC_SUBST(objc_boehm_gc)
5031 AC_SUBST(out_file)
5032 AC_SUBST(out_object_file)
5033 AC_SUBST(stage_prefix_set_by_configure)
5034 AC_SUBST(symbolic_link)
5035 AC_SUBST(thread_file)
5036 AC_SUBST(tm_file_list)
5037 AC_SUBST(will_use_collect2)
5038
5039
5040 AC_SUBST_FILE(target_overrides)
5041 AC_SUBST_FILE(host_overrides)
5042 AC_SUBST(cross_defines)
5043 AC_SUBST_FILE(cross_overrides)
5044 AC_SUBST_FILE(build_overrides)
5045 AC_SUBST_FILE(language_fragments)
5046 AC_SUBST_FILE(language_hooks)
5047
5048 # Echo that links are built
5049 if test x$host = x$target
5050 then
5051         str1="native "
5052 else
5053         str1="cross-"
5054         str2=" from $host"
5055 fi
5056
5057 if test x$host != x$build
5058 then
5059         str3=" on a $build system"
5060 fi
5061
5062 if test "x$str2" != x || test "x$str3" != x
5063 then
5064         str4=
5065 fi
5066
5067 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
5068
5069 if test "x$str2" != x || test "x$str3" != x
5070 then
5071         echo " ${str2}${str3}." 1>&2
5072 fi
5073
5074 # Truncate the target if necessary
5075 if test x$host_truncate_target != x; then
5076         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5077 fi
5078
5079 # Configure the subdirectories
5080 # AC_CONFIG_SUBDIRS($subdirs)
5081
5082 # Create the Makefile
5083 # and configure language subdirectories
5084 AC_OUTPUT($all_outputs,
5085 [
5086 . $srcdir/configure.lang
5087 case x$CONFIG_HEADERS in
5088 xauto-host.h:config.in)
5089 echo > cstamp-h ;;
5090 esac
5091 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
5092 # bootstrapping and the installation procedure can still use
5093 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
5094 # FLAGS_TO_PASS has been modified to solve the problem there.
5095 # This is virtually a duplicate of what happens in configure.lang; we do
5096 # an extra check to make sure this only happens if ln -s can be used.
5097 if test "$symbolic_link" = "ln -s"; then
5098  for d in .. ${subdirs} ; do
5099    if test $d != ..; then
5100         STARTDIR=`pwd`
5101         cd $d
5102         for t in stage1 stage2 stage3 stage4 include
5103         do
5104                 rm -f $t
5105                 $symbolic_link ../$t $t 2>/dev/null
5106         done
5107         cd $STARTDIR
5108    fi
5109  done
5110 else true ; fi
5111 # Avoid having to add intl to our include paths.
5112 if test -f intl/libintl.h; then
5113   echo creating libintl.h
5114   echo '#include "intl/libintl.h"' >libintl.h
5115 fi
5116 ],
5117 [
5118 host='${host}'
5119 build='${build}'
5120 target='${target}'
5121 target_alias='${target_alias}'
5122 srcdir='${srcdir}'
5123 subdirs='${subdirs}'
5124 oldstyle_subdirs='${oldstyle_subdirs}'
5125 symbolic_link='${symbolic_link}'
5126 program_transform_set='${program_transform_set}'
5127 program_transform_name='${program_transform_name}'
5128 dep_host_xmake_file='${dep_host_xmake_file}'
5129 host_xmake_file='${host_xmake_file}'
5130 dep_tmake_file='${dep_tmake_file}'
5131 tmake_file='${tmake_file}'
5132 thread_file='${thread_file}'
5133 gcc_version='${gcc_version}'
5134 gcc_version_trigger='${gcc_version_trigger}'
5135 local_prefix='${local_prefix}'
5136 build_install_headers_dir='${build_install_headers_dir}'
5137 build_exeext='${build_exeext}'
5138 host_exeext='${host_exeext}'
5139 out_file='${out_file}'
5140 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5141 SET_MAKE='${SET_MAKE}'
5142 target_list='${target_list}'
5143 target_overrides='${target_overrides}'
5144 host_overrides='${host_overrides}'
5145 cross_defines='${cross_defines}'
5146 cross_overrides='${cross_overrides}'
5147 build_overrides='${build_overrides}'
5148 cpp_install_dir='${cpp_install_dir}'
5149 ])