OSDN Git Service

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