OSDN Git Service

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