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