OSDN Git Service

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