OSDN Git Service

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