OSDN Git Service

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