OSDN Git Service

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