OSDN Git Service

* aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
[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 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_INIT(tree.c)
25 AC_CONFIG_HEADER(auto-host.h:config.in)
26
27 remove=rm
28 hard_link=ln
29 symbolic_link='ln -s'
30 copy=cp
31
32 # Check for additional parameters
33
34 # With GNU ld
35 AC_ARG_WITH(gnu-ld,
36 [  --with-gnu-ld           arrange to work with GNU ld.],
37 gnu_ld_flag="$with_gnu_ld",
38 gnu_ld_flag=no)
39
40 # With GNU as
41 AC_ARG_WITH(gnu-as,
42 [  --with-gnu-as           arrange to work with GNU as.],
43 gas_flag="$with_gnu_as",
44 gas_flag=no)
45
46 # With stabs
47 AC_ARG_WITH(stabs,
48 [  --with-stabs            arrange to use stabs instead of host debug format.],
49 stabs="$with_stabs",
50 stabs=no)
51
52 # With ELF
53 AC_ARG_WITH(elf,
54 [  --with-elf              arrange to use ELF instead of host debug format.],
55 elf="$with_elf",
56 elf=no)
57
58 # Specify the local prefix
59 local_prefix=
60 AC_ARG_WITH(local-prefix,
61 [  --with-local-prefix=DIR specifies directory to put local include.],
62 [case "${withval}" in
63 yes)    AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
64 no)     ;;
65 *)      local_prefix=$with_local_prefix ;;
66 esac])
67
68 # Default local prefix if it is empty
69 if test x$local_prefix = x; then
70         local_prefix=/usr/local
71 fi
72
73 gxx_include_dir=
74 # Specify the g++ header file directory
75 AC_ARG_WITH(gxx-include-dir,
76 [  --with-gxx-include-dir=DIR
77                           specifies directory to put g++ header files.],
78 [case "${withval}" in
79 yes)    AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
80 no)     ;;
81 *)      gxx_include_dir=$with_gxx_include_dir ;;
82 esac])
83
84 if test x${gxx_include_dir} = x; then
85   if test x${enable_version_specific_runtime_libs} = xyes; then
86     gxx_include_dir='${libsubdir}/include/g++'
87   else
88     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
89     gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
90   fi
91 fi
92
93 # Enable expensive internal checks
94 AC_ARG_ENABLE(checking,
95 [  --enable-checking       enable expensive run-time checks.],
96 [case "${enableval}" in
97 yes)    AC_DEFINE(ENABLE_CHECKING) ;;
98 no)     ;;
99 *)      AC_MSG_ERROR(bad value ${enableval} given for checking option) ;;
100 esac])
101
102 # Enable use of cpplib for C.
103 cpp_main=cccp
104 AC_ARG_ENABLE(c-cpplib,
105 [  --enable-c-cpplib       Use cpplib for C and C++.],
106 if test x$enable_c_cpplib != xno; then
107   extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
108   extra_c_objs="${extra_c_objs} prefix.o"
109   extra_cxx_objs="${extra_cxx_objs} ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o ../prefix.o"
110   extra_c_flags=-DUSE_CPPLIB=1
111   cpp_main=cppmain
112 fi)
113   
114 # Enable Multibyte Characters for C/C++
115 AC_ARG_ENABLE(c-mbchar,
116 [  --enable-c-mbchar       Enable multibyte characters for C and C++.],
117 if test x$enable_c_mbchar != xno; then
118   extra_c_flags=-DMULTIBYTE_CHARS=1
119 fi)
120   
121 # Enable Haifa scheduler.
122 AC_ARG_ENABLE(haifa,
123 [  --enable-haifa          Use the experimental scheduler.
124   --disable-haifa         Don't use the experimental scheduler for the
125                           targets which normally enable it.])
126 # Fast fixincludes
127 #
128 # This is a work in progress...
129 AC_ARG_WITH(fast-fixincludes,
130 [  --with-fast-fixincludes    Use a faster fixinclude program.  Experimental],
131 fast_fixinc="$with_fast_fixincludes",
132 fast_fixinc=no)
133
134 # Enable init_priority.
135 AC_ARG_ENABLE(init-priority,
136 [  --enable-init-priority  Use attributes to assign initialization order
137                           for static objects.
138   --disable-init-priority Conform to ISO C++ rules for ordering static objects
139                           (i.e. initialized in order of declaration). ],
140 if test x$enable_init_priority != xno; then
141   extra_c_flags=-DUSE_INIT_PRIORITY
142 fi)
143
144 # Enable threads
145 # Pass with no value to take the default
146 # Pass with a value to specify a thread package
147 AC_ARG_ENABLE(threads,
148 [  --enable-threads        enable thread usage for target GCC.
149   --enable-threads=LIB    use LIB thread package for target GCC.],
150 if test x$enable_threads = xno; then
151         enable_threads=''
152 fi,
153 enable_threads='')
154
155 enable_threads_flag=$enable_threads
156 # Check if a valid thread package
157 case x${enable_threads_flag} in
158         x | xno)
159                 # No threads
160                 target_thread_file='single'
161                 ;;
162         xyes)
163                 # default
164                 target_thread_file=''
165                 ;;
166         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
167         xsolaris | xwin32 | xdce | xvxworks)
168                 target_thread_file=$enable_threads_flag
169                 ;;
170         *)
171                 echo "$enable_threads is an unknown thread package" 1>&2
172                 exit 1
173                 ;;
174 esac
175
176 AC_ARG_ENABLE(objc-gc,
177 [  --enable-objc-gc       enable the use of Boehm's garbage collector with
178                           the GNU Objective-C runtime.],
179 if [[[ x$enable_objc_gc = xno ]]]; then
180         objc_boehm_gc=''
181 else
182         objc_boehm_gc=1
183 fi,
184 objc_boehm_gc='')
185
186 # Determine the host, build, and target systems
187 AC_CANONICAL_SYSTEM
188
189 # Find the native compiler
190 AC_PROG_CC
191
192 # If the native compiler is GCC, we can enable warnings even in stage1.  
193 # That's useful for people building cross-compilers, or just running a
194 # quick `make'.
195 if test "x$GCC" = "xyes"; then 
196   stage1_warn_cflags='$(WARN_CFLAGS)'
197 else
198   stage1_warn_cflags=""
199 fi
200 AC_SUBST(stage1_warn_cflags)
201
202 AC_PROG_MAKE_SET
203
204 # Find some useful tools
205 AC_PROG_AWK
206 AC_PROG_LEX
207 GCC_PROG_LN
208 GCC_PROG_LN_S
209 GCC_C_VOLATILE
210 AC_PROG_RANLIB
211 AC_PROG_YACC
212 EGCS_PROG_INSTALL
213
214 AC_HEADER_STDC
215 AC_HEADER_TIME
216 GCC_HEADER_STRING
217 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
218
219 # Check for thread headers.
220 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
221 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
222
223 # See if the system preprocessor understands the ANSI C preprocessor
224 # stringification operator.
225 AC_MSG_CHECKING(whether cpp understands the stringify operator)
226 AC_CACHE_VAL(gcc_cv_c_have_stringify,
227 [AC_TRY_COMPILE(,
228 [#define S(x)   #x
229 char *test = S(foo);],
230 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
231 AC_MSG_RESULT($gcc_cv_c_have_stringify)
232 if test $gcc_cv_c_have_stringify = yes; then
233   AC_DEFINE(HAVE_CPP_STRINGIFY)
234 fi
235
236 # Use <inttypes.h> only if it exists,
237 # doesn't clash with <sys/types.h>, and declares intmax_t.
238 AC_MSG_CHECKING(for inttypes.h)
239 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
240 [AC_TRY_COMPILE(
241   [#include <sys/types.h>
242 #include <inttypes.h>],
243   [intmax_t i = -1;],
244   [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
245    gcc_cv_header_inttypes_h=yes],
246   gcc_cv_header_inttypes_h=no)])
247 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
248
249 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
250         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
251         sysconf isascii gettimeofday)
252
253 # Make sure wchar_t is available
254 #AC_CHECK_TYPE(wchar_t, unsigned int)
255
256 GCC_FUNC_VFPRINTF_DOPRNT
257 GCC_FUNC_PRINTF_PTR
258
259 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
260         index rindex getenv atol sbrk abort atof strerror getcwd getwd)
261
262 GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
263 #include <sys/types.h>
264 #ifdef HAVE_SYS_RESOURCE_H
265 #include <sys/resource.h>
266 #endif
267 ])
268
269 AC_DECL_SYS_SIGLIST
270
271 # File extensions
272 manext='.1'
273 objext='.o'
274 AC_SUBST(manext)
275 AC_SUBST(objext)
276
277 build_xm_file=
278 build_xm_defines=
279 build_install_headers_dir=install-headers-tar
280 build_exeext=
281 host_xm_file=
282 host_xm_defines=
283 host_xmake_file=
284 host_truncate_target=
285 host_exeext=
286
287 # Decode the host machine, then the target machine.
288 # For the host machine, we save the xm_file variable as host_xm_file;
289 # then we decode the target machine and forget everything else
290 # that came from the host machine.
291 for machine in $build $host $target; do
292
293         out_file=
294         xmake_file=
295         tmake_file=
296         extra_headers=
297         extra_passes=
298         extra_parts=
299         extra_programs=
300         extra_objs=
301         extra_host_objs=
302         extra_gcc_objs=
303         xm_defines=
304         float_format=
305         # Set this to force installation and use of collect2.
306         use_collect2=
307         # Set this to override the default target model.
308         target_cpu_default=
309         # Set this to control which fixincludes program to use.
310         if test x$fast_fixinc != xyes; then
311                 fixincludes=fixincludes
312         else fixincludes=fixinc.sh ; fi
313         # Set this to control how the header file directory is installed.
314         install_headers_dir=install-headers-tar
315         # Set this to a non-empty list of args to pass to cpp if the target
316         # wants its .md file passed through cpp.
317         md_cppflags=
318         # Set this if directory names should be truncated to 14 characters.
319         truncate_target=
320         # Set this if gdb needs a dir command with `dirname $out_file`
321         gdb_needs_out_file_path=
322         # Set this if the build machine requires executables to have a
323         # file name suffix.
324         exeext=
325         # Set this to control which thread package will be used.
326         thread_file=
327         # Reinitialize these from the flag values every loop pass, since some
328         # configure entries modify them.
329         gas="$gas_flag"
330         gnu_ld="$gnu_ld_flag"
331         enable_threads=$enable_threads_flag
332
333         # Set default cpu_type, tm_file and xm_file so it can be updated in
334         # each machine entry.
335         cpu_type=`echo $machine | sed 's/-.*$//'`
336         case $machine in
337         alpha*-*-*)
338                 cpu_type=alpha
339                 ;;
340         arm*-*-*)
341                 cpu_type=arm
342                 ;;
343         c*-convex-*)
344                 cpu_type=convex
345                 ;;
346 changequote(,)dnl
347         i[34567]86-*-*)
348 changequote([,])dnl
349                 cpu_type=i386
350                 ;;
351         hppa*-*-*)
352                 cpu_type=pa
353                 ;;
354         m68000-*-*)
355                 cpu_type=m68k
356                 ;;
357         mips*-*-*)
358                 cpu_type=mips
359                 ;;
360         powerpc*-*-*)
361                 cpu_type=rs6000
362                 ;;
363         pyramid-*-*)
364                 cpu_type=pyr
365                 ;;
366         sparc*-*-*)
367                 cpu_type=sparc
368                 ;;
369         esac
370
371         tm_file=${cpu_type}/${cpu_type}.h
372         xm_file=${cpu_type}/xm-${cpu_type}.h
373         
374         # Set the default macros to define for GNU/Linux systems.
375         case $machine in
376         *-*-linux-gnu*)
377                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
378                 ;;
379         esac
380
381         case $machine in
382         # Support site-specific machine types.
383         *local*)
384                 cpu_type=`echo $machine | sed -e 's/-.*//'`
385                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
386                 xm_file=${cpu_type}/xm-$rest.h
387                 tm_file=${cpu_type}/$rest.h
388                 if test -f $srcdir/config/${cpu_type}/x-$rest; \
389                 then xmake_file=${cpu_type}/x-$rest; \
390                 else true; \
391                 fi
392                 if test -f $srcdir/config/${cpu_type}/t-$rest; \
393                 then tmake_file=${cpu_type}/t-$rest; \
394                 else true; \
395                 fi
396                 ;;
397         1750a-*-*)
398                 ;;
399         a29k-*-bsd* | a29k-*-sym1*)
400                 tm_file="${tm_file} a29k/unix.h"
401                 xm_defines=USG
402                 xmake_file=a29k/x-unix
403                 use_collect2=yes
404                 ;;
405         a29k-*-udi | a29k-*-coff)
406                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
407                 tmake_file=a29k/t-a29kbare
408                 ;;
409         a29k-wrs-vxworks*)
410                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
411                 tmake_file=a29k/t-vx29k
412                 extra_parts="crtbegin.o crtend.o"
413                 thread_file='vxworks'
414                 ;;
415         a29k-*-*)                       # Default a29k environment.
416                 use_collect2=yes
417                 ;;
418         alpha*-*-linux-gnuecoff*)
419                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
420                 target_cpu_default="MASK_GAS"
421                 gas=no
422                 xmake_file=none
423                 gas=yes gnu_ld=yes
424                 ;;
425         alpha*-*-linux-gnulibc1*)
426                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
427                 target_cpu_default="MASK_GAS"
428                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
429                 extra_parts="crtbegin.o crtend.o"
430                 fixincludes=fixinc.wrap
431                 xmake_file=none
432                 gas=yes gnu_ld=yes
433                 if test x$enable_threads = xyes; then
434                         thread_file='posix'
435                 fi
436                 ;;
437         alpha*-*-linux-gnu*)
438                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
439                 target_cpu_default="MASK_GAS"
440                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
441                 extra_parts="crtbegin.o crtend.o"
442                 xmake_file=none
443                 fixincludes=Makefile.in
444                 gas=yes gnu_ld=yes
445                 if test x$enable_threads = xyes; then
446                         thread_file='posix'
447                 fi
448                 ;;
449         alpha*-*-netbsd*)
450                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
451                 xm_file="xm-netbsd.h ${xm_file}"
452                 target_cpu_default="MASK_GAS"
453                 tmake_file="alpha/t-crtbe"
454                 extra_parts="crtbegin.o crtend.o"
455                 xmake_file=none
456                 fixincludes=fixinc.wrap
457                 gas=yes gnu_ld=yes
458                 ;;
459                 
460         alpha*-dec-osf*)
461                 if test x$stabs = xyes
462                 then
463                         tm_file="${tm_file} dbx.h"
464                 fi
465                 if test x$gas != xyes
466                 then
467                         extra_passes="mips-tfile mips-tdump"
468                 fi
469                 use_collect2=yes
470                 case $machine in
471                   *-*-osf1*)
472                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
473                     ;;
474 changequote(,)dnl
475                   *-*-osf[23]*)
476 changequote([,])dnl
477                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
478                     ;;
479                   *-*-osf4*)
480                     tm_file="${tm_file} alpha/osf.h"
481                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
482                     # a broken tar, so we use cpio instead.
483                     install_headers_dir=install-headers-cpio
484                     ;;
485                 esac
486                 case $machine in
487 changequote(,)dnl
488                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
489 changequote([,])dnl
490                     target_cpu_default=MASK_SUPPORT_ARCH
491                     ;;
492                 esac
493                 ;;
494         alpha*-*-vxworks*)
495                 tm_file="${tm_file} dbx.h alpha/vxworks.h"
496                 if [ x$gas != xyes ]
497                 then
498                         extra_passes="mips-tfile mips-tdump"
499                 fi
500                 use_collect2=yes
501                 ;;
502         alpha*-*-winnt*)
503                 tm_file="${tm_file} alpha/win-nt.h"
504                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
505                 tmake_file=t-libc-ok
506                 xmake_file=winnt/x-winnt
507                 extra_host_objs=oldnames.o
508                 extra_gcc_objs="spawnv.o oldnames.o"
509                 fixincludes=fixinc.winnt
510                 if test x$gnu_ld != xyes
511                 then
512                         extra_programs=ld.exe
513                 fi
514                 if test x$enable_threads = xyes; then
515                         thread_file='win32'
516                 fi
517                 ;;
518         alpha*-dec-vms*)
519                 tm_file=alpha/vms.h
520                 xm_file="${xm_file} alpha/xm-vms.h"
521                 tmake_file=alpha/t-vms
522                 fixincludes=Makefile.in
523                 ;;
524         arc-*-elf*)
525                 extra_parts="crtinit.o crtfini.o"
526                 ;;
527         arm-*-coff* | armel-*-coff*)
528                 tm_file=arm/coff.h
529                 tmake_file=arm/t-bare
530                 ;;
531 changequote(,)dnl
532         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
533 changequote([,])dnl
534                 tm_file=arm/riscix1-1.h
535                 use_collect2=yes
536                 ;;
537         arm-*-riscix*)                  # Acorn RISC machine
538                 if test x$gas = xyes
539                 then
540                     tm_file=arm/rix-gas.h
541                 else
542                     tm_file=arm/riscix.h
543                 fi
544                 xmake_file=arm/x-riscix
545                 tmake_file=arm/t-riscix
546                 use_collect2=yes
547                 ;;
548         arm-semi-aout | armel-semi-aout)
549                 tm_file=arm/semi.h
550                 tmake_file=arm/t-semi
551                 fixincludes=Makefile.in # There is nothing to fix
552                 ;;
553         arm-semi-aof | armel-semi-aof)
554                 tm_file=arm/semiaof.h
555                 tmake_file=arm/t-semiaof
556                 fixincludes=Makefile.in # There is nothing to fix
557                 ;;
558         arm*-*-netbsd*)
559                 tm_file=arm/netbsd.h
560                 xm_file="xm-netbsd.h ${xm_file}"
561                 tmake_file="t-netbsd arm/t-netbsd"
562                 # On NetBSD, the headers are already okay, except for math.h.
563                 fixincludes=fixinc.wrap
564                 ;;
565         arm-*-linux-gnuaout*)           # ARM GNU/Linux
566                 cpu_type=arm
567                 xmake_file=x-linux
568                 tm_file=arm/linux-gas.h
569                 tmake_file=arm/t-linux
570                 fixincludes=Makefile.in
571                 gnu_ld=yes
572                 ;;
573         arm-*-aout)
574                 tm_file=arm/aout.h
575                 tmake_file=arm/t-bare
576                 ;;
577         c1-convex-*)                    # Convex C1
578                 target_cpu_default=1
579                 use_collect2=yes
580                 fixincludes=Makefile.in
581                 ;;
582         c2-convex-*)                    # Convex C2
583                 target_cpu_default=2
584                 use_collect2=yes
585                 fixincludes=Makefile.in
586                 ;;
587         c32-convex-*)
588                 target_cpu_default=4
589                 use_collect2=yes
590                 fixincludes=Makefile.in
591                 ;;
592         c34-convex-*)
593                 target_cpu_default=8
594                 use_collect2=yes
595                 fixincludes=Makefile.in
596                 ;;
597         c38-convex-*)
598                 target_cpu_default=16           
599                 use_collect2=yes
600                 fixincludes=Makefile.in
601                 ;;
602         clipper-intergraph-clix*)
603                 tm_file="${tm_file} svr3.h clipper/clix.h"
604                 xm_file=clipper/xm-clix.h
605                 xmake_file=clipper/x-clix
606                 extra_headers=va-clipper.h
607                 extra_parts="crtbegin.o crtend.o"
608                 install_headers_dir=install-headers-cpio
609                 ;;
610         dsp16xx-*)
611                 ;;
612         elxsi-elxsi-*)
613                 use_collect2=yes
614                 ;;
615 # This hasn't been upgraded to GCC 2.
616 #       fx80-alliant-*)                 # Alliant FX/80
617 #               ;;
618         h8300-*-*)
619                 float_format=i32
620                 ;;
621         hppa1.1-*-pro*)
622                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
623                 xm_file=pa/xm-papro.h
624                 tmake_file=pa/t-pro
625                 ;;
626         hppa1.1-*-osf*)
627                 target_cpu_default=1
628                 tm_file="${tm_file} pa/pa-osf.h"
629                 use_collect2=yes
630                 fixincludes=Makefile.in
631                 ;;
632         hppa1.1-*-rtems*)
633                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
634                 xm_file=pa/xm-papro.h
635                 tmake_file=pa/t-pro
636                 ;;
637         hppa1.0-*-osf*)
638                 tm_file="${tm_file} pa/pa-osf.h"
639                 use_collect2=yes
640                 fixincludes=Makefile.in
641                 ;;
642         hppa1.1-*-bsd*)
643                 target_cpu_default=1
644                 use_collect2=yes
645                 fixincludes=Makefile.in
646                 ;;
647         hppa1.0-*-bsd*)
648                 use_collect2=yes
649                 fixincludes=Makefile.in
650                 ;;
651         hppa1.0-*-hpux7*)
652                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
653                 xm_file=pa/xm-pahpux.h
654                 xmake_file=pa/x-pa-hpux
655                 if test x$gas = xyes
656                 then
657                         tm_file="${tm_file} pa/gas.h"
658                 fi
659                 install_headers_dir=install-headers-cpio
660                 use_collect2=yes
661                 ;;
662 changequote(,)dnl
663         hppa1.0-*-hpux8.0[0-2]*)
664 changequote([,])dnl
665                 tm_file="${tm_file} pa/pa-hpux.h"
666                 xm_file=pa/xm-pahpux.h
667                 xmake_file=pa/x-pa-hpux
668                 if test x$gas = xyes
669                 then
670                         tm_file="${tm_file} pa/pa-gas.h"
671                 else
672                         tm_file="pa/pa-oldas.h ${tm_file}"
673                 fi
674                 install_headers_dir=install-headers-cpio
675                 use_collect2=yes
676                 ;;
677 changequote(,)dnl
678         hppa1.1-*-hpux8.0[0-2]*)
679 changequote([,])dnl
680                 target_cpu_default=1
681                 tm_file="${tm_file} pa/pa-hpux.h"
682                 xm_file=pa/xm-pahpux.h
683                 xmake_file=pa/x-pa-hpux
684                 if test x$gas = xyes
685                 then
686                         tm_file="${tm_file} pa/pa-gas.h"
687                 else
688                         tm_file="pa/pa-oldas.h ${tm_file}"
689                 fi
690                 install_headers_dir=install-headers-cpio
691                 use_collect2=yes
692                 ;;
693         hppa1.1-*-hpux8*)
694                 target_cpu_default=1
695                 tm_file="${tm_file} pa/pa-hpux.h"
696                 xm_file=pa/xm-pahpux.h
697                 xmake_file=pa/x-pa-hpux
698                 if test x$gas = xyes
699                 then
700                         tm_file="${tm_file} pa/pa-gas.h"
701                 fi
702                 install_headers_dir=install-headers-cpio
703                 use_collect2=yes
704                 ;;
705         hppa1.0-*-hpux8*)
706                 tm_file="${tm_file} pa/pa-hpux.h"
707                 xm_file=pa/xm-pahpux.h
708                 xmake_file=pa/x-pa-hpux
709                 if test x$gas = xyes
710                 then
711                         tm_file="${tm_file} pa/pa-gas.h"
712                 fi
713                 install_headers_dir=install-headers-cpio
714                 use_collect2=yes
715                 ;;
716         hppa1.1-*-hpux10*)
717                 target_cpu_default=1
718                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
719                 xm_file=pa/xm-pahpux.h
720                 xmake_file=pa/x-pa-hpux
721                 tmake_file=pa/t-pa
722                 if test x$gas = xyes
723                 then
724                         tm_file="${tm_file} pa/pa-gas.h"
725                 fi
726                 if test x$enable_threads = x; then
727                     enable_threads=$have_pthread_h
728                 fi
729                 if test x$enable_threads = xyes; then
730                         thread_file='dce'
731                         tmake_file="${tmake_file} pa/t-dce-thr"
732                 fi
733                 install_headers_dir=install-headers-cpio
734                 use_collect2=yes
735                 ;;
736         hppa1.0-*-hpux10*)
737                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
738                 xm_file=pa/xm-pahpux.h
739                 xmake_file=pa/x-pa-hpux
740                 if test x$gas = xyes
741                 then
742                         tm_file="${tm_file} pa/pa-gas.h"
743                 fi
744                 if test x$enable_threads = x; then
745                     enable_threads=$have_pthread_h
746                 fi
747                 if test x$enable_threads = xyes; then
748                         thread_file='dce'
749                         tmake_file="${tmake_file} pa/t-dce-thr"
750                 fi
751                 install_headers_dir=install-headers-cpio
752                 use_collect2=yes
753                 ;;
754         hppa1.1-*-hpux*)
755                 target_cpu_default=1
756                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
757                 xm_file=pa/xm-pahpux.h
758                 xmake_file=pa/x-pa-hpux
759                 if test x$gas = xyes
760                 then
761                         tm_file="${tm_file} pa/pa-gas.h"
762                 fi
763                 install_headers_dir=install-headers-cpio
764                 use_collect2=yes
765                 ;;
766         hppa1.0-*-hpux*)
767                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
768                 xm_file=pa/xm-pahpux.h
769                 xmake_file=pa/x-pa-hpux
770                 if test x$gas = xyes
771                 then
772                         tm_file="${tm_file} pa/pa-gas.h"
773                 fi
774                 install_headers_dir=install-headers-cpio
775                 use_collect2=yes
776                 ;;
777         hppa1.1-*-hiux*)
778                 target_cpu_default=1
779                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
780                 xm_file=pa/xm-pahpux.h
781                 xmake_file=pa/x-pa-hpux
782                 if test x$gas = xyes
783                 then
784                         tm_file="${tm_file} pa/pa-gas.h"
785                 fi
786                 install_headers_dir=install-headers-cpio
787                 use_collect2=yes
788                 ;;
789         hppa1.0-*-hiux*)
790                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
791                 xm_file=pa/xm-pahpux.h
792                 xmake_file=pa/x-pa-hpux
793                 if test x$gas = xyes
794                 then
795                         tm_file="${tm_file} pa/pa-gas.h"
796                 fi
797                 install_headers_dir=install-headers-cpio
798                 use_collect2=yes
799                 ;;
800         hppa*-*-lites*)
801                 target_cpu_default=1
802                 use_collect2=yes
803                 fixincludes=Makefile.in
804                 ;;
805         i370-*-mvs*)
806                 ;;
807 changequote(,)dnl
808         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
809 changequote([,])dnl
810                 if test x$gas = xyes
811                 then
812                         tm_file=i386/aix386.h
813                         extra_parts="crtbegin.o crtend.o"
814                         tmake_file=i386/t-crtstuff
815                 else
816                         tm_file=i386/aix386ng.h
817                         use_collect2=yes
818                 fi
819                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
820                 xm_defines=USG
821                 xmake_file=i386/x-aix
822                 ;;
823 changequote(,)dnl
824         i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
825 changequote([,])dnl
826                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
827                 xm_defines="USG POSIX SMALL_ARG_MAX"
828                 xmake_file=i386/x-ncr3000
829                 if test x$stabs = xyes -a x$gas = xyes
830                 then
831                         tm_file=i386/sysv4gdb.h
832                 else
833                         tm_file=i386/sysv4.h
834                 fi
835                 extra_parts="crtbegin.o crtend.o"
836                 tmake_file=i386/t-crtpic
837                 ;;
838 changequote(,)dnl
839         i[34567]86-next-*)
840 changequote([,])dnl
841                 tm_file=i386/next.h
842                 xm_file=i386/xm-next.h
843                 tmake_file=i386/t-next
844                 xmake_file=i386/x-next
845                 extra_objs=nextstep.o
846                 if test x$enable_threads = xyes; then
847                         thread_file='mach'
848                 fi
849                 ;;
850 changequote(,)dnl
851         i[34567]86-sequent-bsd*)                # 80386 from Sequent
852 changequote([,])dnl
853                 use_collect2=yes
854                 if test x$gas = xyes
855                 then
856                         tm_file=i386/seq-gas.h
857                 else
858                         tm_file=i386/sequent.h
859                 fi
860                 ;;
861 changequote(,)dnl
862         i[34567]86-sequent-ptx1*)
863 changequote([,])dnl
864                 xm_defines="USG SVR3"
865                 xmake_file=i386/x-sysv3
866                 tm_file=i386/seq-sysv3.h
867                 tmake_file=i386/t-crtstuff
868                 fixincludes=fixinc.ptx
869                 extra_parts="crtbegin.o crtend.o"
870                 install_headers_dir=install-headers-cpio
871                 ;;
872 changequote(,)dnl
873         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
874 changequote([,])dnl
875                 xm_defines="USG SVR3"
876                 xmake_file=i386/x-sysv3
877                 tm_file=i386/seq2-sysv3.h
878                 tmake_file=i386/t-crtstuff
879                 extra_parts="crtbegin.o crtend.o"
880                 fixincludes=fixinc.ptx
881                 install_headers_dir=install-headers-cpio
882                 ;;
883 changequote(,)dnl
884         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
885 changequote([,])dnl
886                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
887                 xm_defines="USG POSIX SMALL_ARG_MAX"
888                 xmake_file=x-svr4
889                 tm_file=i386/ptx4-i.h
890                 tmake_file=t-svr4
891                 extra_parts="crtbegin.o crtend.o"
892                 fixincludes=fixinc.ptx
893                 install_headers_dir=install-headers-cpio
894                 ;;
895         i386-sun-sunos*)                # Sun i386 roadrunner
896                 xm_defines=USG
897                 tm_file=i386/sun.h
898                 use_collect2=yes
899                 ;;
900 changequote(,)dnl
901         i[34567]86-wrs-vxworks*)
902 changequote([,])dnl
903                 tm_file=i386/vxi386.h
904                 tmake_file=i386/t-i386bare
905                 ;;
906 changequote(,)dnl
907         i[34567]86-*-aout*)
908 changequote([,])dnl
909                 tm_file=i386/i386-aout.h
910                 tmake_file=i386/t-i386bare
911                 ;;
912 changequote(,)dnl
913         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
914 changequote([,])dnl
915                 tm_file=i386/bsd386.h
916 #               tmake_file=t-libc-ok
917                 ;;
918 changequote(,)dnl
919         i[34567]86-*-bsd*)
920 changequote([,])dnl
921                 tm_file=i386/386bsd.h
922 #               tmake_file=t-libc-ok
923 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
924 #               use_collect2=yes
925                 ;;
926 changequote(,)dnl
927         i[34567]86-*-freebsdelf*)
928 changequote([,])dnl
929                 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
930                 # On FreeBSD, the headers are already ok, except for math.h.
931                 fixincludes=fixinc.wrap
932                 tmake_file=i386/t-freebsd
933                 gas=yes
934                 gnu_ld=yes
935                 stabs=yes
936                 ;;
937 changequote(,)dnl
938         i[34567]86-*-freebsd*)
939 changequote([,])dnl
940                 tm_file=i386/freebsd.h
941                 # On FreeBSD, the headers are already ok, except for math.h.
942                 fixincludes=fixinc.wrap
943                 tmake_file=i386/t-freebsd
944                 ;;
945 changequote(,)dnl
946         i[34567]86-*-netbsd*)
947 changequote([,])dnl
948                 tm_file=i386/netbsd.h
949                 xm_file="xm-netbsd.h ${xm_file}"
950                 # On NetBSD, the headers are already okay, except for math.h.
951                 fixincludes=fixinc.wrap
952                 tmake_file=t-netbsd
953                 ;;
954 changequote(,)dnl
955         i[34567]86-*-coff*)
956 changequote([,])dnl
957                 tm_file=i386/i386-coff.h
958                 tmake_file=i386/t-i386bare
959                 ;;
960 changequote(,)dnl
961         i[34567]86-*-isc*)              # 80386 running ISC system
962 changequote([,])dnl
963                 xm_file="${xm_file} i386/xm-isc.h"
964                 xm_defines="USG SVR3"
965                 case $machine in
966 changequote(,)dnl
967                   i[34567]86-*-isc[34]*)
968 changequote([,])dnl
969                     xmake_file=i386/x-isc3
970                     ;;
971                   *)
972                     xmake_file=i386/x-isc
973                     ;;
974                 esac
975                 if test x$gas = xyes -a x$stabs = xyes
976                 then
977                         tm_file=i386/iscdbx.h
978                         tmake_file=i386/t-svr3dbx
979                         extra_parts="svr3.ifile svr3z.ifile"
980                 else
981                         tm_file=i386/isccoff.h
982                         tmake_file=i386/t-crtstuff
983                         extra_parts="crtbegin.o crtend.o"
984                 fi
985                 install_headers_dir=install-headers-cpio
986                 ;;
987 changequote(,)dnl
988         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
989 changequote([,])dnl                     # with a.out format using
990                                         # pre BFD linkers
991                 xmake_file=x-linux-aout
992                 tmake_file="t-linux-aout i386/t-crtstuff"
993                 tm_file=i386/linux-oldld.h
994                 fixincludes=Makefile.in #On Linux, the headers are ok already.
995                 gnu_ld=yes
996                 float_format=i386
997                 ;;
998 changequote(,)dnl
999         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
1000 changequote([,])dnl                     # with a.out format
1001                 xmake_file=x-linux-aout
1002                 tmake_file="t-linux-aout i386/t-crtstuff"
1003                 tm_file=i386/linux-aout.h
1004                 fixincludes=Makefile.in #On Linux, the headers are ok already.
1005                 gnu_ld=yes
1006                 float_format=i386
1007                 ;;
1008 changequote(,)dnl
1009         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
1010 changequote([,])dnl                     # with ELF format using the
1011                                         # GNU/Linux C library 5
1012                 xmake_file=x-linux      
1013                 tm_file=i386/linux.h    
1014                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1015                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1016                 fixincludes=Makefile.in #On Linux, the headers are ok already.
1017                 gnu_ld=yes
1018                 float_format=i386
1019                 if test x$enable_threads = xyes; then
1020                         thread_file='single'
1021                 fi
1022                 ;;
1023 changequote(,)dnl
1024         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
1025 changequote([,])dnl                     # with ELF format using glibc 2
1026                                         # aka GNU/Linux C library 6
1027                 xmake_file=x-linux
1028                 tm_file=i386/linux.h
1029                 tmake_file="t-linux i386/t-crtstuff"
1030                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1031                 fixincludes=Makefile.in #On Linux, the headers are ok already.
1032                 gnu_ld=yes
1033                 float_format=i386
1034                 if test x$enable_threads = xyes; then
1035                         thread_file='posix'
1036                 fi
1037                 ;;
1038 changequote(,)dnl
1039         i[34567]86-*-gnu*)
1040 changequote([,])dnl
1041                 ;;
1042 changequote(,)dnl
1043         i[34567]86-go32-msdos | i[34567]86-*-go32*)
1044 changequote([,])dnl
1045                 xm_file=i386/xm-go32.h
1046                 tm_file=i386/go32.h
1047                 tmake_file=i386/t-go32
1048                 ;;
1049 changequote(,)dnl
1050         i[34567]86-pc-msdosdjgpp*)
1051 changequote([,])dnl
1052                 xm_file=i386/xm-go32.h
1053                 tm_file=i386/go32.h
1054                 tmake_file=i386/t-go32
1055                 gnu_ld=yes
1056                 gas=yes
1057                 ;;
1058 changequote(,)dnl
1059         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1060 changequote([,])dnl
1061                 tm_file=i386/moss.h
1062                 tmake_file=t-libc-ok
1063                 fixincludes=Makefile.in
1064                 gnu_ld=yes
1065                 gas=yes
1066                 ;;
1067 changequote(,)dnl
1068         i[34567]86-*-lynxos*)
1069 changequote([,])dnl
1070                 if test x$gas = xyes
1071                 then
1072                         tm_file=i386/lynx.h
1073                 else
1074                         tm_file=i386/lynx-ng.h
1075                 fi
1076                 xm_file=i386/xm-lynx.h
1077                 tmake_file=i386/t-i386bare
1078                 xmake_file=x-lynx
1079                 ;;
1080 changequote(,)dnl
1081         i[34567]86-*-mach*)
1082 changequote([,])dnl
1083                 tm_file=i386/mach.h
1084 #               tmake_file=t-libc-ok
1085                 use_collect2=yes
1086                 ;;
1087 changequote(,)dnl
1088         i[34567]86-*-osfrose*)          # 386 using OSF/rose
1089 changequote([,])dnl
1090                 if test x$elf = xyes
1091                 then
1092                         tm_file=i386/osfelf.h
1093                         use_collect2=
1094                 else
1095                         tm_file=i386/osfrose.h
1096                         use_collect2=yes
1097                 fi
1098                 xm_file="i386/xm-osf.h ${xm_file}"
1099                 xmake_file=i386/x-osfrose
1100                 tmake_file=i386/t-osf
1101                 extra_objs=halfpic.o
1102                 ;;
1103 changequote(,)dnl
1104         i[34567]86-go32-rtems*)
1105 changequote([,])dnl
1106                 cpu_type=i386
1107                 xm_file=i386/xm-go32.h
1108                 tm_file=i386/go32-rtems.h
1109                 tmake_file="i386/t-go32 t-rtems"
1110                 ;;
1111 changequote(,)dnl
1112         i[34567]86-*-rtemself*)
1113 changequote([,])dnl
1114                 cpu_type=i386
1115                 tm_file=i386/rtemself.h
1116                 tmake_file="i386/t-i386bare t-rtems"
1117                 ;;
1118 changequote(,)dnl
1119         i[34567]86-*-rtems*)
1120 changequote([,])dnl
1121                 cpu_type=i386
1122                 tm_file=i386/rtems.h
1123                 tmake_file="i386/t-i386bare t-rtems"
1124                 ;;
1125 changequote(,)dnl
1126         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1127 changequote([,])dnl
1128                 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
1129                 xm_defines="USG SVR3"
1130                 xmake_file=i386/x-sco5
1131                 fixincludes=fixinc.sco
1132                 install_headers_dir=install-headers-cpio
1133                 tm_file=i386/sco5.h
1134                 if test x$gas = xyes
1135                 then
1136                         tm_file="i386/sco5gas.h ${tm_file}"
1137                         tmake_file=i386/t-sco5gas
1138                 else
1139                         tmake_file=i386/t-sco5
1140                 fi
1141                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
1142                 ;;
1143 changequote(,)dnl
1144         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
1145 changequote([,])dnl
1146                 xm_file="${xm_file} i386/xm-sco.h"
1147                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
1148                 xmake_file=i386/x-sco4
1149                 fixincludes=fixinc.sco
1150                 install_headers_dir=install-headers-cpio
1151                 if test x$stabs = xyes
1152                 then
1153                         tm_file=i386/sco4dbx.h
1154                         tmake_file=i386/t-svr3dbx
1155                         extra_parts="svr3.ifile svr3z.rfile"
1156                 else
1157                         tm_file=i386/sco4.h
1158                         tmake_file=i386/t-crtstuff
1159                         extra_parts="crtbegin.o crtend.o"
1160                 fi
1161                 truncate_target=yes
1162                 ;;
1163 changequote(,)dnl
1164         i[34567]86-*-sco*)              # 80386 running SCO system
1165 changequote([,])dnl
1166                 xm_file=i386/xm-sco.h
1167                 xmake_file=i386/x-sco
1168                 install_headers_dir=install-headers-cpio
1169                 if test x$stabs = xyes
1170                 then
1171                         tm_file=i386/scodbx.h
1172                         tmake_file=i386/t-svr3dbx
1173                         extra_parts="svr3.ifile svr3z.rfile"
1174                 else
1175                         tm_file=i386/sco.h
1176                         extra_parts="crtbegin.o crtend.o"
1177                         tmake_file=i386/t-crtstuff
1178                 fi
1179                 truncate_target=yes
1180                 ;;
1181 changequote(,)dnl
1182         i[34567]86-*-solaris2*)
1183 changequote([,])dnl
1184                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1185                 xm_defines="USG POSIX SMALL_ARG_MAX"
1186                 if test x$stabs = xyes
1187                 then
1188                         tm_file=i386/sol2dbg.h
1189                 else
1190                         tm_file=i386/sol2.h
1191                 fi
1192                 tmake_file=i386/t-sol2
1193                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1194                 xmake_file=x-svr4
1195                 case $machine in
1196 changequote(,)dnl
1197                 *-*-solaris2.[0-4])
1198 changequote([,])dnl
1199                         fixincludes=fixinc.svr4;;
1200                 *)
1201                         fixincludes=fixinc.wrap;;
1202                 esac
1203                 if test x$enable_threads = xyes; then
1204                         thread_file='solaris'
1205                 fi
1206                 ;;
1207 changequote(,)dnl
1208        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
1209 changequote([,])dnl
1210                xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1211                xm_defines="USG POSIX"
1212                tm_file=i386/sysv4.h
1213                if test x$stabs = xyes
1214                then
1215                        tm_file="${tm_file} dbx.h"
1216                fi
1217                tmake_file=i386/t-crtpic
1218                xmake_file=x-svr4
1219                extra_parts="crtbegin.o crtend.o"
1220                fixincludes=Makefile.in # The headers are just fine, thank you.
1221                ;;
1222 changequote(,)dnl
1223         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
1224 changequote([,])dnl
1225                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1226                 xm_defines="USG POSIX SMALL_ARG_MAX"
1227                 tm_file=i386/sysv4.h
1228                 if test x$stabs = xyes
1229                 then
1230                         tm_file="${tm_file} dbx.h"
1231                 fi
1232                 tmake_file=i386/t-crtpic
1233                 xmake_file=x-svr4
1234                 extra_parts="crtbegin.o crtend.o"
1235                 ;;
1236 changequote(,)dnl
1237         i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
1238 changequote([,])dnl
1239                 cpu_type=i386
1240                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1241                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1242                 fixincludes=Makefile.in #Don't do it on OSF/1
1243                 if test x$stabs = xyes
1244                 then
1245                         tm_file=i386/osf1elfgdb.h
1246                 else
1247                         tm_file=i386/osf1elf.h
1248                 fi
1249                 tmake_file=i386/t-osf1elf
1250                 xmake_file=i386/x-osf1elf
1251                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1252                 ;;
1253 changequote(,)dnl
1254         i[34567]86-*-sysv*)             # Intel 80386's running system V
1255 changequote([,])dnl
1256                 xm_defines="USG SVR3"
1257                 xmake_file=i386/x-sysv3
1258                 if test x$gas = xyes
1259                 then
1260                         if test x$stabs = xyes
1261                         then
1262                                 tm_file=i386/svr3dbx.h
1263                                 tmake_file=i386/t-svr3dbx
1264                                 extra_parts="svr3.ifile svr3z.rfile"
1265                         else
1266                                 tm_file=i386/svr3gas.h
1267                                 extra_parts="crtbegin.o crtend.o"
1268                                 tmake_file=i386/t-crtstuff
1269                         fi
1270                 else
1271                         tm_file=i386/sysv3.h
1272                         extra_parts="crtbegin.o crtend.o"
1273                         tmake_file=i386/t-crtstuff
1274                 fi
1275                 ;;
1276         i386-*-vsta)                    # Intel 80386's running VSTa kernel
1277                 xm_file="${xm_file} i386/xm-vsta.h"
1278                 tm_file=i386/vsta.h
1279                 tmake_file=i386/t-vsta
1280                 xmake_file=i386/x-vsta
1281                 ;;
1282 changequote(,)dnl
1283         i[34567]86-*-win32)
1284 changequote([,])dnl
1285                 xm_file="${xm_file} i386/xm-cygwin32.h"
1286                 tmake_file=i386/t-cygwin32
1287                 tm_file=i386/win32.h
1288                 xmake_file=i386/x-cygwin32
1289                 extra_objs=winnt.o
1290                 fixincludes=Makefile.in
1291                 if test x$enable_threads = xyes; then
1292                         thread_file='win32'
1293                 fi
1294                 exeext=.exe
1295                 ;;
1296 changequote(,)dnl
1297         i[34567]86-*-pe | i[34567]86-*-cygwin32)
1298 changequote([,])dnl
1299                 xm_file="${xm_file} i386/xm-cygwin32.h"
1300                 tmake_file=i386/t-cygwin32
1301                 tm_file=i386/cygwin32.h
1302                 xmake_file=i386/x-cygwin32
1303                 extra_objs=winnt.o
1304                 fixincludes=Makefile.in
1305                 if test x$enable_threads = xyes; then
1306                         thread_file='win32'
1307                 fi
1308                 exeext=.exe
1309                 ;;
1310 changequote(,)dnl
1311         i[34567]86-*-mingw32*)
1312 changequote([,])dnl
1313                 tm_file=i386/mingw32.h
1314                 xm_file="${xm_file} i386/xm-mingw32.h"
1315                 tmake_file="i386/t-cygwin32 i386/t-mingw32"
1316                 extra_objs=winnt.o
1317                 xmake_file=i386/x-cygwin32
1318                 fixincludes=Makefile.in
1319                 if test x$enable_threads = xyes; then
1320                         thread_file='win32'
1321                 fi
1322                 exeext=.exe
1323                 case $machine in
1324                         *mingw32msv*)
1325                                 ;;
1326                         *minwg32crt* | *mingw32*)
1327                                 tm_file="${tm_file} i386/crtdll.h"
1328                                 ;;
1329                 esac
1330                 ;;
1331 changequote(,)dnl
1332         i[34567]86-*-winnt3*)
1333 changequote([,])dnl
1334                 tm_file=i386/win-nt.h
1335                 out_file=i386/i386.c
1336                 xm_file="xm-winnt.h ${xm_file}"
1337                 xmake_file=winnt/x-winnt
1338                 tmake_file=i386/t-winnt
1339                 extra_host_objs="winnt.o oldnames.o"
1340                 extra_gcc_objs="spawnv.o oldnames.o"
1341                 fixincludes=fixinc.winnt
1342                 if test x$gnu_ld != xyes
1343                 then
1344                         extra_programs=ld.exe
1345                 fi
1346                 if test x$enable_threads = xyes; then
1347                         thread_file='win32'
1348                 fi
1349                 ;;
1350 changequote(,)dnl
1351         i[34567]86-dg-dgux*)
1352 changequote([,])dnl
1353                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1354                 xm_defines="USG POSIX"
1355                 out_file=i386/dgux.c
1356                 tm_file=i386/dgux.h
1357                 tmake_file=i386/t-dgux
1358                 xmake_file=i386/x-dgux
1359                 fixincludes=fixinc.dgux
1360                 install_headers_dir=install-headers-cpio
1361               ;;
1362         i860-alliant-*)         # Alliant FX/2800
1363                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1364                 xm_file="${xm_file}"
1365                 xmake_file=i860/x-fx2800
1366                 tmake_file=i860/t-fx2800
1367                 extra_parts="crtbegin.o crtend.o"
1368                 ;;
1369         i860-*-bsd*)
1370                 tm_file="${tm_file} i860/bsd.h"
1371                 if test x$gas = xyes
1372                 then
1373                         tm_file="${tm_file} i860/bsd-gas.h"
1374                 fi
1375                 use_collect2=yes
1376                 ;;
1377         i860-*-mach*)
1378                 tm_file="${tm_file} i860/mach.h"
1379                 tmake_file=t-libc-ok
1380                 ;;
1381         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
1382                 tm_file="${tm_file} svr3.h i860/paragon.h"
1383                 xm_defines="USG SVR3"
1384                 tmake_file=t-osf
1385                 ;;
1386         i860-*-sysv3*)
1387                 tm_file="${tm_file} svr3.h i860/sysv3.h"
1388                 xm_defines="USG SVR3"
1389                 xmake_file=i860/x-sysv3
1390                 extra_parts="crtbegin.o crtend.o"
1391                 ;;
1392         i860-*-sysv4*)
1393                 tm_file="${tm_file} svr4.h i860/sysv4.h"
1394                 xm_defines="USG SVR3"
1395                 xmake_file=i860/x-sysv4
1396                 tmake_file=t-svr4
1397                 extra_parts="crtbegin.o crtend.o"
1398                 ;;
1399         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1400                 tm_file="${tm_file} i960/vx960.h"
1401                 tmake_file=i960/t-vxworks960
1402                 use_collect2=yes
1403                 thread_file='vxworks'
1404                 ;;
1405         i960-wrs-vxworks5* | i960-wrs-vxworks)
1406                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1407                 tmake_file=i960/t-vxworks960
1408                 use_collect2=yes
1409                 thread_file='vxworks'
1410                 ;;
1411         i960-wrs-vxworks*)
1412                 tm_file="${tm_file} i960/vx960.h"
1413                 tmake_file=i960/t-vxworks960
1414                 use_collect2=yes
1415                 thread_file='vxworks'
1416                 ;;
1417         i960-*-coff*)
1418                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1419                 tmake_file=i960/t-960bare
1420                 use_collect2=yes
1421                 ;;
1422         i960-*-rtems)
1423                 tmake_file="i960/t-960bare t-rtems"
1424                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1425                 use_collect2=yes
1426                 ;;
1427         i960-*-*)                       # Default i960 environment.
1428                 use_collect2=yes
1429                 ;;
1430         m32r-*-elf*)
1431                 extra_parts="crtinit.o crtfini.o"
1432                 ;;
1433         m68000-convergent-sysv*)
1434                 tm_file=m68k/ctix.h
1435                 xm_file="m68k/xm-3b1.h ${xm_file}"
1436                 xm_defines=USG
1437                 use_collect2=yes
1438                 extra_headers=math-68881.h
1439                 ;;
1440         m68000-hp-bsd*)                 # HP 9000/200 running BSD
1441                 tm_file=m68k/hp2bsd.h
1442                 xmake_file=m68k/x-hp2bsd
1443                 use_collect2=yes
1444                 extra_headers=math-68881.h
1445                 ;;
1446         m68000-hp-hpux*)                # HP 9000 series 300
1447                 xm_file="xm_alloca.h ${xm_file}"
1448                 xm_defines="USG NO_SYS_SIGLIST"
1449                 if test x$gas = xyes
1450                 then
1451                         xmake_file=m68k/x-hp320g
1452                         tm_file=m68k/hp310g.h
1453                 else
1454                         xmake_file=m68k/x-hp320
1455                         tm_file=m68k/hp310.h
1456                 fi
1457                 install_headers_dir=install-headers-cpio
1458                 use_collect2=yes
1459                 extra_headers=math-68881.h
1460                 ;;
1461         m68000-sun-sunos3*)
1462                 tm_file=m68k/sun2.h
1463                 use_collect2=yes
1464                 extra_headers=math-68881.h
1465                 ;;
1466         m68000-sun-sunos4*)
1467                 tm_file=m68k/sun2o4.h
1468                 use_collect2=yes
1469                 extra_headers=math-68881.h
1470                 ;;
1471         m68000-att-sysv*)
1472                 xm_file="m68k/xm-3b1.h ${xm_file}"
1473                 xm_defines=USG
1474                 if test x$gas = xyes
1475                 then
1476                         tm_file=m68k/3b1g.h
1477                 else
1478                         tm_file=m68k/3b1.h
1479                 fi
1480                 use_collect2=yes
1481                 extra_headers=math-68881.h
1482                 ;;
1483         m68k-apple-aux*)                # Apple Macintosh running A/UX
1484                 xm_defines="USG AUX"
1485                 tmake_file=m68k/t-aux
1486                 install_headers_dir=install-headers-cpio
1487                 extra_headers=math-68881.h
1488                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1489                 tm_file=
1490                 if test "$gnu_ld" = yes
1491                 then
1492                         tm_file="${tm_file} m68k/auxgld.h"
1493                 else
1494                         tm_file="${tm_file} m68k/auxld.h"
1495                 fi
1496                 if test "$gas" = yes
1497                 then
1498                         tm_file="${tm_file} m68k/auxgas.h"
1499                 else
1500                         tm_file="${tm_file} m68k/auxas.h"
1501                 fi
1502                 tm_file="${tm_file} m68k/a-ux.h"
1503                 float_format=m68k
1504                 ;;
1505         m68k-apollo-*)
1506                 tm_file=m68k/apollo68.h
1507                 xmake_file=m68k/x-apollo68
1508                 use_collect2=yes
1509                 extra_headers=math-68881.h
1510                 float_format=m68k
1511                 ;;
1512         m68k-altos-sysv*)                  # Altos 3068
1513                 if test x$gas = xyes
1514                 then
1515                         tm_file=m68k/altos3068.h
1516                         xm_defines=USG
1517                 else
1518                         echo "The Altos is supported only with the GNU assembler" 1>&2
1519                         exit 1
1520                 fi
1521                 extra_headers=math-68881.h
1522                 ;;
1523         m68k-bull-sysv*)                # Bull DPX/2
1524                 if test x$gas = xyes
1525                 then
1526                         if test x$stabs = xyes
1527                         then
1528                                 tm_file=m68k/dpx2cdbx.h
1529                         else
1530                                 tm_file=m68k/dpx2g.h
1531                         fi
1532                 else
1533                         tm_file=m68k/dpx2.h
1534                 fi
1535                 xm_file="xm-alloca.h ${xm_file}"
1536                 xm_defines=USG
1537                 xmake_file=m68k/x-dpx2
1538                 use_collect2=yes
1539                 extra_headers=math-68881.h
1540                 ;;
1541         m68k-atari-sysv4*)              # Atari variant of V.4.
1542                 tm_file=m68k/atari.h
1543                 xm_file="xm-alloca.h ${xm_file}"
1544                 xm_defines="USG FULL_PROTOTYPES"
1545                 tmake_file=t-svr4
1546                 extra_parts="crtbegin.o crtend.o"
1547                 extra_headers=math-68881.h
1548                 float_format=m68k
1549                 ;;
1550         m68k-motorola-sysv*)
1551                 tm_file=m68k/mot3300.h
1552                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1553                 xm_defines=NO_SYS_SIGLIST
1554                 if test x$gas = xyes
1555                 then
1556                         xmake_file=m68k/x-mot3300-gas
1557                         if test x$gnu_ld = xyes
1558                         then
1559                                 tmake_file=m68k/t-mot3300-gald
1560                         else
1561                                 tmake_file=m68k/t-mot3300-gas
1562                                 use_collect2=yes
1563                         fi
1564                 else
1565                         xmake_file=m68k/x-mot3300
1566                         if test x$gnu_ld = xyes
1567                         then
1568                                 tmake_file=m68k/t-mot3300-gld
1569                         else
1570                                 tmake_file=m68k/t-mot3300
1571                                 use_collect2=yes
1572                         fi
1573                 fi
1574                 gdb_needs_out_file_path=yes
1575                 extra_parts="crt0.o mcrt0.o"
1576                 extra_headers=math-68881.h
1577                 float_format=m68k
1578                 ;;
1579         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
1580                 tm_file=m68k/tower-as.h
1581                 xm_defines="USG SVR3"
1582                 xmake_file=m68k/x-tower
1583                 extra_parts="crtbegin.o crtend.o"
1584                 extra_headers=math-68881.h
1585                 ;;
1586         m68k-plexus-sysv*)
1587                 tm_file=m68k/plexus.h
1588                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1589                 xm_defines=USG
1590                 use_collect2=yes
1591                 extra_headers=math-68881.h
1592                 ;;
1593         m68k-tti-*)
1594                 tm_file=m68k/pbb.h
1595                 xm_file="xm-alloca.h ${xm_file}"
1596                 xm_defines=USG
1597                 extra_headers=math-68881.h
1598                 ;;
1599         m68k-crds-unos*)
1600                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1601                 xm_defines="USG unos"
1602                 xmake_file=m68k/x-crds
1603                 tm_file=m68k/crds.h
1604                 use_collect2=yes
1605                 extra_headers=math-68881.h
1606                 ;;
1607         m68k-cbm-sysv4*)                # Commodore variant of V.4.
1608                 tm_file=m68k/amix.h
1609                 xm_file="xm-alloca.h ${xm_file}"
1610                 xm_defines="USG FULL_PROTOTYPES"
1611                 xmake_file=m68k/x-amix
1612                 tmake_file=t-svr4
1613                 extra_parts="crtbegin.o crtend.o"
1614                 extra_headers=math-68881.h
1615                 float_format=m68k
1616                 ;;
1617         m68k-ccur-rtu)
1618                 tm_file=m68k/ccur-GAS.h
1619                 xmake_file=m68k/x-ccur
1620                 extra_headers=math-68881.h
1621                 use_collect2=yes
1622                 float_format=m68k
1623                 ;;
1624         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
1625                 tm_file=m68k/hp3bsd44.h
1626                 xmake_file=m68k/x-hp3bsd44
1627                 use_collect2=yes
1628                 extra_headers=math-68881.h
1629                 float_format=m68k
1630                 ;;
1631         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
1632                 tm_file=m68k/hp3bsd.h
1633                 use_collect2=yes
1634                 extra_headers=math-68881.h
1635                 float_format=m68k
1636                 ;;
1637         m68k-isi-bsd*)
1638                 if test x$with_fp = xno
1639                 then
1640                         tm_file=m68k/isi-nfp.h
1641                 else
1642                         tm_file=m68k/isi.h
1643                         float_format=m68k
1644                 fi
1645                 use_collect2=yes
1646                 extra_headers=math-68881.h
1647                 ;;
1648         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1649                 xm_file="xm_alloca.h ${xm_file}"
1650                 xm_defines="USG NO_SYS_SIGLIST"
1651                 if test x$gas = xyes
1652                 then
1653                         xmake_file=m68k/x-hp320g
1654                         tm_file=m68k/hp320g.h
1655                 else
1656                         xmake_file=m68k/x-hp320
1657                         tm_file=m68k/hpux7.h
1658                 fi
1659                 install_headers_dir=install-headers-cpio
1660                 use_collect2=yes
1661                 extra_headers=math-68881.h
1662                 float_format=m68k
1663                 ;;
1664         m68k-hp-hpux*)  # HP 9000 series 300
1665                 xm_file="xm_alloca.h ${xm_file}"
1666                 xm_defines="USG NO_SYS_SIGLIST"
1667                 if test x$gas = xyes
1668                 then
1669                         xmake_file=m68k/x-hp320g
1670                         tm_file=m68k/hp320g.h
1671                 else
1672                         xmake_file=m68k/x-hp320
1673                         tm_file=m68k/hp320.h
1674                 fi
1675                 install_headers_dir=install-headers-cpio
1676                 use_collect2=yes
1677                 extra_headers=math-68881.h
1678                 float_format=m68k
1679                 ;;
1680         m68k-sun-mach*)
1681                 tm_file=m68k/sun3mach.h
1682                 use_collect2=yes
1683                 extra_headers=math-68881.h
1684                 float_format=m68k
1685                 ;;
1686         m68k-sony-newsos3*)
1687                 if test x$gas = xyes
1688                 then
1689                         tm_file=m68k/news3gas.h
1690                 else
1691                         tm_file=m68k/news3.h
1692                 fi
1693                 use_collect2=yes
1694                 extra_headers=math-68881.h
1695                 float_format=m68k
1696                 ;;
1697         m68k-sony-bsd* | m68k-sony-newsos*)
1698                 if test x$gas = xyes
1699                 then
1700                         tm_file=m68k/newsgas.h
1701                 else
1702                         tm_file=m68k/news.h
1703                 fi
1704                 use_collect2=yes
1705                 extra_headers=math-68881.h
1706                 float_format=m68k
1707                 ;;
1708         m68k-next-nextstep2*)
1709                 tm_file=m68k/next21.h
1710                 xm_file="m68k/xm-next.h ${xm_file}"
1711                 tmake_file=m68k/t-next
1712                 xmake_file=m68k/x-next
1713                 extra_objs=nextstep.o
1714                 extra_headers=math-68881.h
1715                 use_collect2=yes
1716                 float_format=m68k
1717                 ;;
1718         m68k-next-nextstep3*)
1719                 tm_file=m68k/next.h
1720                 xm_file="m68k/xm-next.h ${xm_file}"
1721                 tmake_file=m68k/t-next
1722                 xmake_file=m68k/x-next
1723                 extra_objs=nextstep.o
1724                 extra_headers=math-68881.h
1725                 float_format=m68k
1726                 if test x$enable_threads = xyes; then
1727                         thread_file='mach'
1728                 fi
1729                 ;;
1730         m68k-sun-sunos3*)
1731                 if test x$with_fp = xno
1732                 then
1733                         tm_file=m68k/sun3n3.h
1734                 else
1735                         tm_file=m68k/sun3o3.h
1736                         float_format=m68k
1737                 fi
1738                 use_collect2=yes
1739                 extra_headers=math-68881.h
1740                 ;;
1741         m68k-sun-sunos*)                        # For SunOS 4 (the default).
1742                 if test x$with_fp = xno
1743                 then
1744                         tm_file=m68k/sun3n.h
1745                 else
1746                         tm_file=m68k/sun3.h
1747                         float_format=m68k
1748                 fi
1749                 use_collect2=yes
1750                 extra_headers=math-68881.h
1751                 ;;
1752         m68k-wrs-vxworks*)
1753                 tm_file=m68k/vxm68k.h
1754                 tmake_file=m68k/t-vxworks68
1755                 extra_headers=math-68881.h
1756                 thread_file='vxworks'
1757                 float_format=m68k
1758                 ;;
1759         m68k-*-aout*)
1760                 tmake_file=m68k/t-m68kbare
1761                 tm_file="m68k/m68k-aout.h libgloss.h"
1762                 extra_headers=math-68881.h
1763                 float_format=m68k
1764                 ;;
1765         m68k-*-coff*)
1766                 tmake_file=m68k/t-m68kbare
1767                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1768                 extra_headers=math-68881.h
1769                 float_format=m68k
1770                 ;;
1771         m68k-*-lynxos*)
1772                 if test x$gas = xyes
1773                 then
1774                         tm_file=m68k/lynx.h
1775                 else
1776                         tm_file=m68k/lynx-ng.h
1777                 fi
1778                 xm_file=m68k/xm-lynx.h
1779                 xmake_file=x-lynx
1780                 tmake_file=m68k/t-lynx
1781                 extra_headers=math-68881.h
1782                 float_format=m68k
1783                 ;;
1784         m68k*-*-netbsd*)
1785                 tm_file=m68k/netbsd.h
1786                 xm_file="xm-netbsd.h ${xm_file}"
1787                 # On NetBSD, the headers are already okay, except for math.h.
1788                 fixincludes=fixinc.wrap
1789                 tmake_file=t-netbsd
1790                 float_format=m68k
1791                 ;;
1792         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
1793                 xm_file="xm-alloca.h ${xm_file}"
1794                 xm_defines=USG
1795                 xmake_file=m68k/x-m68kv
1796                 extra_parts="crtbegin.o crtend.o"
1797                 extra_headers=math-68881.h
1798                 float_format=m68k
1799                 ;;
1800         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
1801                 tm_file=m68k/m68kv4.h
1802                 xm_file="xm-alloca.h ${xm_file}"
1803                 xm_defines=USG
1804                 tmake_file=t-svr4
1805                 extra_parts="crtbegin.o crtend.o"
1806                 extra_headers=math-68881.h
1807                 float_format=m68k
1808                 ;;
1809         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
1810                                         # with a.out format
1811                 xmake_file=x-linux
1812                 tm_file=m68k/linux-aout.h
1813                 tmake_file="t-linux-aout m68k/t-linux-aout"
1814                 fixincludes=Makefile.in # The headers are ok already.
1815                 extra_headers=math-68881.h
1816                 float_format=m68k
1817                 gnu_ld=yes
1818                 ;;
1819         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
1820                                         # with ELF format using the
1821                                         # GNU/Linux C library 5
1822                 xmake_file=x-linux
1823                 tm_file=m68k/linux.h
1824                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1825                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1826                 fixincludes=Makefile.in # The headers are ok already.
1827                 extra_headers=math-68881.h
1828                 float_format=m68k
1829                 gnu_ld=yes
1830                 ;;
1831         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
1832                                         # with ELF format using glibc 2
1833                                         # aka the GNU/Linux C library 6.
1834                 xmake_file=x-linux
1835                 tm_file=m68k/linux.h
1836                 tmake_file="t-linux m68k/t-linux"
1837                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1838                 fixincludes=Makefile.in # The headers are ok already.
1839                 extra_headers=math-68881.h
1840                 float_format=m68k
1841                 gnu_ld=yes
1842                 if test x$enable_threads = xyes; then
1843                         thread_file='posix'
1844                 fi
1845                 ;;
1846         m68k-*-psos*)
1847                 tmake_file=m68k/t-m68kbare
1848                 tm_file=m68k/m68k-psos.h
1849                 extra_headers=math-68881.h
1850                 float_format=m68k
1851                 ;;
1852         m68k-*-rtems*)
1853                 tmake_file="m68k/t-m68kbare t-rtems"
1854                 tm_file=m68k/rtems.h
1855                 extra_headers=math-68881.h
1856                 float_format=m68k
1857                 ;;
1858
1859         m88k-dg-dgux*)
1860                 case $machine in
1861                   m88k-dg-dguxbcs*)
1862                     tm_file=m88k/dguxbcs.h
1863                     tmake_file=m88k/t-dguxbcs
1864                     ;;
1865                   *)
1866                     tm_file=m88k/dgux.h
1867                     tmake_file=m88k/t-dgux
1868                     ;;
1869                 esac
1870                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1871                 xmake_file=m88k/x-dgux
1872                 if test x$gas = xyes
1873                 then
1874                         tmake_file=m88k/t-dgux-gas
1875                 fi
1876                 fixincludes=fixinc.dgux
1877                 ;;
1878         m88k-dolphin-sysv3*)
1879                 tm_file=m88k/dolph.h
1880                 extra_parts="crtbegin.o crtend.o"
1881                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1882                 xmake_file=m88k/x-dolph
1883                 if test x$gas = xyes
1884                 then
1885                         tmake_file=m88k/t-m88k-gas
1886                 fi
1887                 ;;
1888         m88k-tektronix-sysv3)
1889                 tm_file=m88k/tekXD88.h
1890                 extra_parts="crtbegin.o crtend.o"
1891                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1892                 xmake_file=m88k/x-tekXD88
1893                 if test x$gas = xyes
1894                 then
1895                         tmake_file=m88k/t-m88k-gas
1896                 fi
1897                 ;;
1898         m88k-*-aout*)
1899                 tm_file=m88k/m88k-aout.h
1900                 ;;
1901         m88k-*-coff*)
1902                 tm_file=m88k/m88k-coff.h
1903                 tmake_file=m88k/t-bug
1904                 ;;
1905         m88k-*-luna*)
1906                 tm_file=m88k/luna.h
1907                 extra_parts="crtbegin.o crtend.o"
1908                 if test x$gas = xyes
1909                 then
1910                         tmake_file=m88k/t-luna-gas
1911                 else
1912                         tmake_file=m88k/t-luna
1913                 fi
1914                 ;;
1915         m88k-*-sysv3*)
1916                 tm_file=m88k/sysv3.h
1917                 extra_parts="crtbegin.o crtend.o"
1918                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1919                 xmake_file=m88k/x-sysv3
1920                 if test x$gas = xyes
1921                 then
1922                         tmake_file=m88k/t-m88k-gas
1923                 fi
1924                 ;;
1925         m88k-*-sysv4*)
1926                 tm_file=m88k/sysv4.h
1927                 extra_parts="crtbegin.o crtend.o"
1928                 xmake_file=m88k/x-sysv4
1929                 tmake_file=m88k/t-sysv4
1930                 ;;
1931         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
1932                 tm_file=mips/iris6.h
1933                 xm_file=mips/xm-iris6.h
1934                 fixincludes=fixinc.irix
1935                 xmake_file=mips/x-iris6
1936                 tmake_file=mips/t-iris6
1937 #               if test x$enable_threads = xyes; then
1938 #                       thread_file='irix'
1939 #               fi
1940                 ;;
1941         mips-wrs-vxworks)
1942                 tm_file="mips/elf.h libgloss.h"
1943                 tmake_file=mips/t-ecoff
1944                 gas=yes
1945                 gnu_ld=yes
1946                 extra_parts="crtbegin.o crtend.o"
1947 #               thread_file='vxworks'
1948                 ;;
1949         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
1950                 tm_file="mips/iris6.h mips/cross64.h"
1951                 xm_defines=USG
1952                 xm_file="mips/xm-iris5.h"
1953                 fixincludes=Makefile.in
1954                 xmake_file=mips/x-iris
1955                 tmake_file=mips/t-cross64
1956                 # See comment in mips/iris[56].h files.
1957                 use_collect2=yes
1958 #               if test x$enable_threads = xyes; then
1959 #                       thread_file='irix'
1960 #               fi
1961                 ;;
1962         mips-sni-sysv4)
1963                 if test x$gas = xyes
1964                 then
1965                         if test x$stabs = xyes
1966                         then
1967                                 tm_file=mips/iris5gdb.h
1968                         else
1969                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
1970                         fi
1971                 else
1972                         tm_file=mips/sni-svr4.h
1973                 fi
1974                 xm_defines=USG
1975                 xmake_file=mips/x-sni-svr4
1976                 tmake_file=mips/t-mips-gas
1977                 if test x$gnu_ld != xyes
1978                 then
1979                         use_collect2=yes
1980                 fi
1981                 ;;
1982         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
1983                 if test x$gas = xyes
1984                 then
1985                         tm_file="mips/iris5.h mips/iris5gas.h"
1986                         if test x$stabs = xyes
1987                         then
1988                                 tm_file="${tm_file} dbx.h"
1989                         fi
1990                 else
1991                         tm_file=mips/iris5.h
1992                 fi
1993                 xm_defines=USG
1994                 xm_file="mips/xm-iris5.h"
1995                 fixincludes=fixinc.irix
1996                 xmake_file=mips/x-iris
1997                 # mips-tfile doesn't work yet
1998                 tmake_file=mips/t-mips-gas
1999                 # See comment in mips/iris5.h file.
2000                 use_collect2=yes
2001 #               if test x$enable_threads = xyes; then
2002 #                       thread_file='irix'
2003 #               fi
2004                 ;;
2005         mips-sgi-irix4loser*)           # Mostly like a MIPS.
2006                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
2007                 if test x$stabs = xyes; then
2008                         tm_file="${tm_file} dbx.h"
2009                 fi
2010                 xm_defines=USG
2011                 xmake_file=mips/x-iris
2012                 if test x$gas = xyes
2013                 then
2014                         tmake_file=mips/t-mips-gas
2015                 else
2016                         extra_passes="mips-tfile mips-tdump"
2017                 fi
2018                 if test x$gnu_ld != xyes
2019                 then
2020                         use_collect2=yes
2021                 fi
2022 #               if test x$enable_threads = xyes; then
2023 #                       thread_file='irix'
2024 #               fi
2025                 ;;
2026         mips-sgi-irix4*)                # Mostly like a MIPS.
2027                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
2028                 if test x$stabs = xyes; then
2029                         tm_file="${tm_file} dbx.h"
2030                 fi
2031                 xm_defines=USG
2032                 xmake_file=mips/x-iris
2033                 if test x$gas = xyes
2034                 then
2035                         tmake_file=mips/t-mips-gas
2036                 else
2037                         extra_passes="mips-tfile mips-tdump"
2038                 fi
2039                 if test x$gnu_ld != xyes
2040                 then
2041                         use_collect2=yes
2042                 fi
2043 #               if test x$enable_threads = xyes; then
2044 #                       thread_file='irix'
2045 #               fi
2046                 ;;
2047         mips-sgi-*)                     # Mostly like a MIPS.
2048                 tm_file="mips/iris3.h ${tm_file}"
2049                 if test x$stabs = xyes; then
2050                         tm_file="${tm_file} dbx.h"
2051                 fi
2052                 xm_defines=USG
2053                 xmake_file=mips/x-iris3
2054                 if test x$gas = xyes
2055                 then
2056                         tmake_file=mips/t-mips-gas
2057                 else
2058                         extra_passes="mips-tfile mips-tdump"
2059                 fi
2060                 if test x$gnu_ld != xyes
2061                 then
2062                         use_collect2=yes
2063                 fi
2064                 ;;
2065         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
2066                 tm_file="mips/osfrose.h ${tm_file}"
2067                 xmake_file=mips/x-osfrose
2068                 tmake_file=mips/t-osfrose
2069                 extra_objs=halfpic.o
2070                 use_collect2=yes
2071                 ;;
2072         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
2073                 tm_file=mips/dec-osf1.h
2074                 if test x$stabs = xyes; then
2075                         tm_file="${tm_file} dbx.h"
2076                 fi
2077                 xmake_file=mips/x-dec-osf1
2078                 if test x$gas = xyes
2079                 then
2080                         tmake_file=mips/t-mips-gas
2081                 else
2082                         tmake_file=mips/t-ultrix
2083                         extra_passes="mips-tfile mips-tdump"
2084                 fi
2085                 if test x$gnu_ld != xyes
2086                 then
2087                         use_collect2=yes
2088                 fi
2089                 ;;
2090         mips-dec-bsd*)                  # Decstation running 4.4 BSD
2091               tm_file=mips/dec-bsd.h
2092               fixincludes=
2093               if test x$gas = xyes
2094               then
2095                         tmake_file=mips/t-mips-gas
2096               else
2097                         tmake_file=mips/t-ultrix
2098                         extra_passes="mips-tfile mips-tdump"
2099               fi
2100               if test x$gnu_ld != xyes
2101               then
2102                         use_collect2=yes
2103               fi
2104               ;;
2105         mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
2106                 tm_file=mips/netbsd.h
2107                 xm_file="xm-netbsd.h ${xm_file}"
2108                 # On NetBSD, the headers are already okay, except for math.h.
2109                 fixincludes=fixinc.wrap
2110                 tmake_file=t-netbsd
2111                 ;;
2112         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
2113                 tm_file="mips/news4.h ${tm_file}"
2114                 if test x$stabs = xyes; then
2115                         tm_file="${tm_file} dbx.h"
2116                 fi
2117                 if test x$gas = xyes
2118                 then
2119                         tmake_file=mips/t-mips-gas
2120                 else
2121                         extra_passes="mips-tfile mips-tdump"
2122                 fi
2123                 if test x$gnu_ld != xyes
2124                 then
2125                         use_collect2=yes
2126                 fi
2127                 xmake_file=mips/x-sony
2128                 ;;
2129         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
2130                                         # That is based on svr4.
2131                 # t-svr4 is not right because this system doesn't use ELF.
2132                 tm_file="mips/news5.h ${tm_file}"
2133                 if test x$stabs = xyes; then
2134                         tm_file="${tm_file} dbx.h"
2135                 fi
2136                 xm_file="xm-siglist.h ${xm_file}"
2137                 xm_defines=USG
2138                 if test x$gas = xyes
2139                 then
2140                         tmake_file=mips/t-mips-gas
2141                 else
2142                         extra_passes="mips-tfile mips-tdump"
2143                 fi
2144                 if test x$gnu_ld != xyes
2145                 then
2146                         use_collect2=yes
2147                 fi
2148                 ;;
2149         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
2150                 tm_file="mips/svr4-5.h mips/svr4-t.h"
2151                 if test x$stabs = xyes; then
2152                         tm_file="${tm_file} dbx.h"
2153                 fi
2154                 xm_file="xm-siglist.h ${xm_file}"
2155                 xm_defines=USG
2156                 xmake_file=mips/x-sysv
2157                 if test x$gas = xyes
2158                 then
2159                         tmake_file=mips/t-mips-gas
2160                         extra_parts="crtbegin.o crtend.o"
2161                 else
2162                         tmake_file=mips/t-mips
2163                         extra_passes="mips-tfile mips-tdump"
2164                 fi
2165                 if test x$gnu_ld != xyes
2166                 then
2167                         use_collect2=yes
2168                 fi
2169                 ;;
2170         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
2171                 tm_file="mips/ultrix.h ${tm_file}"
2172                 if test x$stabs = xyes; then
2173                         tm_file="${tm_file} dbx.h"
2174                 fi
2175                 xmake_file=mips/x-ultrix
2176                 if test x$gas = xyes
2177                 then
2178                         tmake_file=mips/t-mips-gas
2179                 else
2180                         tmake_file=mips/t-ultrix
2181                         extra_passes="mips-tfile mips-tdump"
2182                 fi
2183                 if test x$gnu_ld != xyes
2184                 then
2185                         use_collect2=yes
2186                 fi
2187                 ;;
2188 changequote(,)dnl
2189         mips-*-riscos[56789]bsd*)
2190 changequote([,])dnl
2191                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
2192                 if test x$stabs = xyes; then
2193                         tm_file="${tm_file} dbx.h"
2194                 fi
2195                 if test x$gas = xyes
2196                 then
2197                         tmake_file=mips/t-bsd-gas
2198                 else
2199                         tmake_file=mips/t-bsd
2200                         extra_passes="mips-tfile mips-tdump"
2201                 fi
2202                 if test x$gnu_ld != xyes
2203                 then
2204                         use_collect2=yes
2205                 fi
2206                 ;;
2207 changequote(,)dnl
2208         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2209 changequote([,])dnl
2210                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2211                 if test x$stabs = xyes; then
2212                         tm_file="${tm_file} dbx.h"
2213                 fi
2214                 if test x$gas = xyes
2215                 then
2216                         tmake_file=mips/t-bsd-gas
2217                 else
2218                         tmake_file=mips/t-bsd
2219                         extra_passes="mips-tfile mips-tdump"
2220                 fi
2221                 if test x$gnu_ld != xyes
2222                 then
2223                         use_collect2=yes
2224                 fi
2225                 ;;
2226 changequote(,)dnl
2227         mips-*-riscos[56789]sysv4*)
2228 changequote([,])dnl
2229                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
2230                 if test x$stabs = xyes; then
2231                         tm_file="${tm_file} dbx.h"
2232                 fi
2233                 xm_file="xm-siglist.h ${xm_file}"
2234                 xmake_file=mips/x-sysv
2235                 if test x$gas = xyes
2236                 then
2237                         tmake_file=mips/t-svr4-gas
2238                 else
2239                         tmake_file=mips/t-svr4
2240                         extra_passes="mips-tfile mips-tdump"
2241                 fi
2242                 if test x$gnu_ld != xyes
2243                 then
2244                         use_collect2=yes
2245                 fi
2246                 ;;
2247 changequote(,)dnl
2248         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2249 changequote([,])dnl
2250                 tm_file="mips/svr4-4.h ${tm_file}"
2251                 if test x$stabs = xyes; then
2252                         tm_file="${tm_file} dbx.h"
2253                 fi
2254                 xm_defines=USG
2255                 xmake_file=mips/x-sysv
2256                 if test x$gas = xyes
2257                 then
2258                         tmake_file=mips/t-svr4-gas
2259                 else
2260                         tmake_file=mips/t-svr4
2261                         extra_passes="mips-tfile mips-tdump"
2262                 fi
2263                 if test x$gnu_ld != xyes
2264                 then
2265                         use_collect2=yes
2266                 fi
2267                 ;;
2268 changequote(,)dnl
2269         mips-*-riscos[56789]sysv*)
2270 changequote([,])dnl
2271                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
2272                 if test x$stabs = xyes; then
2273                         tm_file="${tm_file} dbx.h"
2274                 fi
2275                 xm_defines=USG
2276                 xmake_file=mips/x-sysv
2277                 if test x$gas = xyes
2278                 then
2279                         tmake_file=mips/t-svr3-gas
2280                 else
2281                         tmake_file=mips/t-svr3
2282                         extra_passes="mips-tfile mips-tdump"
2283                 fi
2284                 if test x$gnu_ld != xyes
2285                 then
2286                         use_collect2=yes
2287                 fi
2288                 ;;
2289         mips-*-sysv* | mips-*-riscos*sysv*)
2290                 tm_file="mips/svr3-4.h ${tm_file}"
2291                 if test x$stabs = xyes; then
2292                         tm_file="${tm_file} dbx.h"
2293                 fi
2294                 xm_defines=USG
2295                 xmake_file=mips/x-sysv
2296                 if test x$gas = xyes
2297                 then
2298                         tmake_file=mips/t-svr3-gas
2299                 else
2300                         tmake_file=mips/t-svr3
2301                         extra_passes="mips-tfile mips-tdump"
2302                 fi
2303                 if test x$gnu_ld != xyes
2304                 then
2305                         use_collect2=yes
2306                 fi
2307                 ;;
2308 changequote(,)dnl
2309         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
2310 changequote([,])dnl
2311                 tm_file=mips/mips-5.h
2312                 if test x$stabs = xyes; then
2313                         tm_file="${tm_file} dbx.h"
2314                 fi
2315                 if test x$gas = xyes
2316                 then
2317                         tmake_file=mips/t-mips-gas
2318                 else
2319                         extra_passes="mips-tfile mips-tdump"
2320                 fi
2321                 if test x$gnu_ld != xyes
2322                 then
2323                         use_collect2=yes
2324                 fi
2325                 ;;
2326         mips-*-gnu*)
2327                 ;;
2328         mipsel-*-ecoff*)
2329                 tm_file=mips/ecoffl.h
2330                 if test x$stabs = xyes; then
2331                         tm_file="${tm_file} dbx.h"
2332                 fi
2333                 tmake_file=mips/t-ecoff
2334                 ;;
2335         mips-*-ecoff*)
2336                 tm_file="gofast.h mips/ecoff.h"
2337                 if test x$stabs = xyes; then
2338                         tm_file="${tm_file} dbx.h"
2339                 fi
2340                 tmake_file=mips/t-ecoff
2341                 ;;
2342         mipsel-*-elf*)
2343                 tm_file="mips/elfl.h libgloss.h"
2344                 tmake_file=mips/t-ecoff
2345                 ;;
2346         mips-*-elf*)
2347                 tm_file="mips/elf.h libgloss.h"
2348                 tmake_file=mips/t-ecoff
2349                 ;;
2350         mips64el-*-elf*)
2351                 tm_file="mips/elfl64.h libgloss.h"
2352                 tmake_file=mips/t-ecoff
2353                 ;;
2354         mips64orionel-*-elf*)
2355                 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
2356                 tmake_file=mips/t-ecoff
2357                 ;;
2358         mips64-*-elf*)
2359                 tm_file="mips/elf64.h libgloss.h"
2360                 tmake_file=mips/t-ecoff
2361                 ;;
2362         mips64orion-*-elf*)
2363                 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
2364                 tmake_file=mips/t-ecoff
2365                 ;;
2366         mips64orion-*-rtems*)
2367                 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
2368                 tmake_file="mips/t-ecoff t-rtems"
2369                 ;;
2370         mipstx39el-*-elf*)
2371                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2372                 tmake_file=mips/t-r3900
2373                 ;;
2374         mipstx39-*-elf*)
2375                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2376                 tmake_file=mips/t-r3900
2377                 # FIXME mips-elf should be fixed to use crtstuff.
2378                 use_collect2=yes
2379                 ;;
2380         mips-*-*)                               # Default MIPS RISC-OS 4.0.
2381                 if test x$stabs = xyes; then
2382                         tm_file="${tm_file} dbx.h"
2383                 fi
2384                 if test x$gas = xyes
2385                 then
2386                         tmake_file=mips/t-mips-gas
2387                 else
2388                         extra_passes="mips-tfile mips-tdump"
2389                 fi
2390                 if test x$gnu_ld != xyes
2391                 then
2392                         use_collect2=yes
2393                 fi
2394                 ;;
2395         mn10200-*-*)
2396                 cpu_type=mn10200
2397                 tm_file="mn10200/mn10200.h"
2398                 if test x$stabs = xyes
2399                 then
2400                         tm_file="${tm_file} dbx.h"
2401                 fi
2402                 use_collect2=no
2403                 ;;
2404         mn10300-*-*)
2405                 cpu_type=mn10300
2406                 tm_file="mn10300/mn10300.h"
2407                 if test x$stabs = xyes
2408                 then
2409                         tm_file="${tm_file} dbx.h"
2410                 fi
2411                 use_collect2=no
2412                 ;;
2413         ns32k-encore-bsd*)
2414                 tm_file=ns32k/encore.h
2415                 use_collect2=yes
2416                 ;;
2417         ns32k-sequent-bsd*)
2418                 tm_file=ns32k/sequent.h
2419                 use_collect2=yes
2420                 ;;
2421         ns32k-tek6100-bsd*)
2422                 tm_file=ns32k/tek6100.h
2423                 use_collect2=yes
2424                 ;;
2425         ns32k-tek6200-bsd*)
2426                 tm_file=ns32k/tek6200.h
2427                 use_collect2=yes
2428                 ;;
2429 # This has not been updated to GCC 2.
2430 #       ns32k-ns-genix*)
2431 #               xm_defines=USG
2432 #               xmake_file=ns32k/x-genix
2433 #               tm_file=ns32k/genix.h
2434 #               use_collect2=yes
2435 #               ;;
2436         ns32k-merlin-*)
2437                 tm_file=ns32k/merlin.h
2438                 use_collect2=yes
2439                 ;;
2440         ns32k-pc532-mach*)
2441                 tm_file=ns32k/pc532-mach.h
2442                 use_collect2=yes
2443                 ;;
2444         ns32k-pc532-minix*)
2445                 tm_file=ns32k/pc532-min.h
2446                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2447                 xm_defines=USG
2448                 use_collect2=yes
2449                 ;;
2450         ns32k-*-netbsd*)
2451                 tm_file=ns32k/netbsd.h
2452                 xm_file="xm-netbsd.h ${xm_file}"
2453                 # On NetBSD, the headers are already okay, except for math.h.
2454                 fixincludes=fixinc.wrap
2455                 tmake_file=t-netbsd
2456                 ;;
2457         pdp11-*-bsd)
2458                 tm_file="${tm_file} pdp11/2bsd.h"
2459                 ;;
2460         pdp11-*-*)
2461                 ;;
2462         pyramid-*-*)
2463                 cpu_type=pyr
2464                 xmake_file=pyr/x-pyr
2465                 use_collect2=yes
2466                 ;;
2467         romp-*-aos*)
2468                 use_collect2=yes
2469                 ;;
2470         romp-*-mach*)
2471                 xmake_file=romp/x-mach
2472                 use_collect2=yes
2473                 ;;
2474         powerpc-*-beos*)
2475                 cpu_type=rs6000
2476                 tm_file=rs6000/beos.h
2477                 xm_file=rs6000/xm-beos.h
2478                 tmake_file=rs6000/t-beos
2479                 xmake_file=rs6000/x-beos
2480                 ;;
2481         powerpc-*-sysv* | powerpc-*-elf*)
2482                 tm_file=rs6000/sysv4.h
2483                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2484                 xm_defines="USG POSIX"
2485                 extra_headers=ppc-asm.h
2486                 if test x$gas = xyes
2487                 then
2488                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2489                 else
2490                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2491                 fi
2492                 xmake_file=rs6000/x-sysv4
2493                 ;;
2494         powerpc-*-eabiaix*)
2495                 tm_file=rs6000/eabiaix.h
2496                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2497                 fixincludes=Makefile.in
2498                 extra_headers=ppc-asm.h
2499                 ;;
2500         powerpc-*-eabisim*)
2501                 tm_file=rs6000/eabisim.h
2502                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2503                 fixincludes=Makefile.in
2504                 extra_headers=ppc-asm.h
2505                 ;;
2506         powerpc-*-eabi*)
2507                 tm_file=rs6000/eabi.h
2508                 if test x$gas = xyes
2509                 then
2510                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2511                 else
2512                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2513                 fi
2514                 fixincludes=Makefile.in
2515                 extra_headers=ppc-asm.h
2516                 ;;
2517         powerpc-*-rtems*)
2518                 tm_file=rs6000/rtems.h
2519                 if test x$gas = xyes
2520                 then
2521                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2522                 else
2523                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2524                 fi
2525                 fixincludes=Makefile.in
2526                 extra_headers=ppc-asm.h
2527                 ;;
2528         powerpc-*-linux-gnulibc1)
2529                 tm_file=rs6000/linux.h
2530                 xm_file=rs6000/xm-sysv4.h
2531                 out_file=rs6000/rs6000.c
2532                 if test x$gas = xyes
2533                 then
2534                         tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2535                 else
2536                         tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2537                 fi
2538                 xmake_file=x-linux
2539                 fixincludes=Makefile.in
2540                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2541                 extra_headers=ppc-asm.h
2542                 if test x$enable_threads = xyes; then
2543                         thread_file='posix'
2544                 fi
2545                 ;;
2546         powerpc-*-linux-gnu*)
2547                 tm_file=rs6000/linux.h
2548                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2549                 xm_defines="USG ${xm_defines}"
2550                 out_file=rs6000/rs6000.c
2551                 if test x$gas = xyes
2552                 then
2553                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2554                 else
2555                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2556                 fi
2557                 xmake_file=x-linux
2558                 fixincludes=Makefile.in
2559                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2560                 extra_headers=ppc-asm.h
2561                 if test x$enable_threads = xyes; then
2562                         thread_file='posix'
2563                 fi
2564                 ;;
2565         powerpc-wrs-vxworks*)
2566                 cpu_type=rs6000
2567                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2568                 xm_defines="USG POSIX"
2569                 tm_file=rs6000/vxppc.h
2570                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2571                 extra_headers=ppc-asm.h
2572                 thread_file='vxworks'
2573                 ;;
2574         powerpcle-*-sysv* | powerpcle-*-elf*)
2575                 tm_file=rs6000/sysv4le.h
2576                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2577                 xm_defines="USG POSIX"
2578                 if test x$gas = xyes
2579                 then
2580                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2581                 else
2582                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2583                 fi
2584                 xmake_file=rs6000/x-sysv4
2585                 extra_headers=ppc-asm.h
2586                 ;;
2587         powerpcle-*-eabisim*)
2588                 tm_file=rs6000/eabilesim.h
2589                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2590                 fixincludes=Makefile.in
2591                 extra_headers=ppc-asm.h
2592                 ;;
2593         powerpcle-*-eabi*)
2594                 tm_file=rs6000/eabile.h
2595                 if test x$gas = xyes
2596                 then
2597                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2598                 else
2599                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2600                 fi
2601                 fixincludes=Makefile.in
2602                 extra_headers=ppc-asm.h
2603                 ;;
2604         powerpcle-*-winnt* )
2605                 tm_file=rs6000/win-nt.h
2606                 tmake_file=rs6000/t-winnt
2607 #               extra_objs=pe.o
2608                 fixincludes=Makefile.in
2609                 if test x$enable_threads = xyes; then
2610                         thread_file='win32'
2611                 fi
2612                 extra_headers=ppc-asm.h
2613                 ;;
2614         powerpcle-*-pe | powerpcle-*-cygwin32)
2615                 tm_file=rs6000/cygwin32.h
2616                 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
2617                 tmake_file=rs6000/t-winnt
2618                 xmake_file=rs6000/x-cygwin32
2619 #               extra_objs=pe.o
2620                 fixincludes=Makefile.in
2621                 if test x$enable_threads = xyes; then
2622                         thread_file='win32'
2623                 fi
2624                 exeext=.exe
2625                 extra_headers=ppc-asm.h
2626                 ;;
2627         powerpcle-*-solaris2*)
2628                 tm_file=rs6000/sol2.h
2629                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2630                 xm_defines="USG POSIX"
2631                 if test x$gas = xyes
2632                 then
2633                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2634                 else
2635                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2636                 fi
2637                 xmake_file=rs6000/x-sysv4
2638                 case $machine in
2639 changequote(,)dnl
2640                 *-*-solaris2.[0-4])
2641 changequote([,])dnl
2642                         fixincludes=fixinc.svr4;;
2643                 *)
2644                         fixincludes=fixinc.wrap;;
2645                 esac
2646                 extra_headers=ppc-asm.h
2647                 ;;
2648 changequote(,)dnl
2649         rs6000-ibm-aix3.[01]*)
2650 changequote([,])dnl
2651                 tm_file=rs6000/aix31.h
2652                 xmake_file=rs6000/x-aix31
2653                 use_collect2=yes
2654                 ;;
2655 changequote(,)dnl
2656         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
2657 changequote([,])dnl
2658                 tm_file=rs6000/aix3newas.h
2659                 if test x$host != x$target
2660                 then
2661                         tmake_file=rs6000/t-xnewas
2662                 else
2663                         tmake_file=rs6000/t-newas
2664                 fi
2665                 use_collect2=yes
2666                 ;;
2667 changequote(,)dnl
2668         rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
2669 changequote([,])dnl
2670                 tm_file=rs6000/aix41.h
2671                 if test x$host != x$target
2672                 then
2673                         tmake_file=rs6000/t-xnewas
2674                 else
2675                         tmake_file=rs6000/t-newas
2676                 fi
2677                 xmake_file=rs6000/x-aix41
2678                 use_collect2=yes
2679                 ;;
2680 changequote(,)dnl
2681         rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
2682 changequote([,])dnl
2683                 tm_file=rs6000/aix43.h
2684                 if test x$host != x$target
2685                 then
2686                         tmake_file=rs6000/t-xaix43
2687                 else
2688                         tmake_file=rs6000/t-aix43
2689                 fi
2690                 xmake_file=rs6000/x-aix43
2691                 use_collect2=yes
2692                 ;;
2693 changequote(,)dnl
2694         rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
2695 changequote([,])dnl
2696                 tm_file=rs6000/aix43.h
2697                 if test x$host != x$target
2698                 then
2699                         tmake_file=rs6000/t-xaix43
2700                 else
2701                         tmake_file=rs6000/t-aix43
2702                 fi
2703                 xmake_file=rs6000/x-aix43
2704                 use_collect2=yes
2705                 ;;
2706         rs6000-ibm-aix*)
2707                 use_collect2=yes
2708                 ;;
2709         rs6000-bull-bosx)
2710                 use_collect2=yes
2711                 ;;
2712         rs6000-*-mach*)
2713                 tm_file=rs6000/mach.h
2714                 xm_file="${xm_file} rs6000/xm-mach.h"
2715                 xmake_file=rs6000/x-mach
2716                 use_collect2=yes
2717                 ;;
2718         rs6000-*-lynxos*)
2719                 tm_file=rs6000/lynx.h
2720                 xm_file=rs6000/xm-lynx.h
2721                 tmake_file=rs6000/t-rs6000
2722                 xmake_file=rs6000/x-lynx
2723                 use_collect2=yes
2724                 ;;
2725         sh-*-elf*)
2726                 tm_file=sh/elf.h
2727                 float_format=sh
2728                 ;;
2729         sh-*-rtemself*)
2730                 tmake_file="sh/t-sh t-rtems"
2731                 tm_file=sh/rtemself.h
2732                 float_format=sh
2733                 ;;
2734         sh-*-rtems*)
2735                 tmake_file="sh/t-sh t-rtems"
2736                 tm_file=sh/rtems.h
2737                 float_format=sh
2738                 ;;
2739         sh-*-*)
2740                 float_format=sh
2741                 ;;
2742         sparc-tti-*)
2743                 tm_file=sparc/pbd.h
2744                 xm_file="xm-alloca.h ${xm_file}"
2745                 xm_defines=USG
2746                 ;;
2747         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2748                 tm_file=sparc/vxsparc.h
2749                 tmake_file=sparc/t-vxsparc
2750                 use_collect2=yes
2751                 thread_file='vxworks'
2752                 ;;
2753         sparc-*-aout*)
2754                 tmake_file=sparc/t-sparcbare
2755                 tm_file="sparc/aout.h libgloss.h"
2756                 ;;
2757         sparc-*-netbsd*)
2758                 tm_file=sparc/netbsd.h
2759                 xm_file="xm-netbsd.h ${xm_file}"
2760                 # On NetBSD, the headers are already okay, except for math.h.
2761                 fixincludes=fixinc.wrap
2762                 tmake_file=t-netbsd
2763                 ;;
2764         sparc-*-bsd*)
2765                 tm_file=sparc/bsd.h
2766                 ;;
2767         sparc-*-elf*)
2768                 tm_file=sparc/elf.h
2769                 tmake_file=sparc/t-elf
2770                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2771                 #float_format=i128
2772                 float_format=i64
2773                 ;;
2774         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
2775                 xm_file="${xm_file} sparc/xm-linux.h"
2776                 tm_file=sparc/linux-aout.h
2777                 xmake_file=x-linux
2778                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2779                 gnu_ld=yes
2780                 ;;
2781         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
2782                 xm_file="${xm_file} sparc/xm-linux.h"
2783                 xmake_file=x-linux
2784                 tm_file=sparc/linux.h
2785                 tmake_file="t-linux t-linux-gnulibc1"
2786                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2787                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2788                 gnu_ld=yes
2789                 ;;
2790         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
2791                 xm_file="${xm_file} sparc/xm-linux.h"
2792                 xmake_file=x-linux
2793                 tm_file=sparc/linux.h
2794                 tmake_file="t-linux"
2795                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2796                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2797                 gnu_ld=yes
2798                 if test x$enable_threads = xyes; then
2799                         thread_file='posix'
2800                 fi
2801                 ;;
2802         sparc-*-lynxos*)
2803                 if test x$gas = xyes
2804                 then
2805                         tm_file=sparc/lynx.h
2806                 else
2807                         tm_file=sparc/lynx-ng.h
2808                 fi
2809                 xm_file=sparc/xm-lynx.h
2810                 tmake_file=sparc/t-sunos41
2811                 xmake_file=x-lynx
2812                 ;;
2813         sparc-*-rtems*)
2814                 tmake_file="sparc/t-sparcbare t-rtems"
2815                 tm_file=sparc/rtems.h
2816                 ;;
2817         sparc-*-solaris2*)
2818                 if test x$gnu_ld = xyes
2819                 then
2820                         tm_file=sparc/sol2.h
2821                 else
2822                         tm_file=sparc/sol2-sld.h
2823                 fi
2824                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2825                 xm_defines="USG POSIX"
2826                 tmake_file=sparc/t-sol2
2827                 xmake_file=sparc/x-sysv4
2828                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2829                 case $machine in
2830 changequote(,)dnl
2831                 *-*-solaris2.[0-4])
2832 changequote([,])dnl
2833                         fixincludes=fixinc.svr4;;
2834                 *)
2835                         fixincludes=fixinc.wrap;;
2836                 esac
2837                 float_format=i128
2838                 if test x${enable_threads} = x; then
2839                     enable_threads=$have_pthread_h
2840                     if test x${enable_threads} = x; then
2841                         enable_threads=$have_thread_h
2842                     fi
2843                 fi
2844                 if test x${enable_threads} = xyes; then
2845                     if test x${have_pthread_h} = xyes; then
2846                         thread_file='posix'
2847                     else
2848                         thread_file='solaris'
2849                     fi
2850                 fi
2851                 ;;
2852         sparc-*-sunos4.0*)
2853                 tm_file=sparc/sunos4.h
2854                 tmake_file=sparc/t-sunos40
2855                 use_collect2=yes
2856                 ;;
2857         sparc-*-sunos4*)
2858                 tm_file=sparc/sunos4.h
2859                 tmake_file=sparc/t-sunos41
2860                 use_collect2=yes
2861                 if test x$gas = xyes; then
2862                         tm_file="${tm_file} sparc/sun4gas.h"
2863                 fi
2864                 ;;
2865         sparc-*-sunos3*)
2866                 tm_file=sparc/sun4o3.h
2867                 use_collect2=yes
2868                 ;;
2869         sparc-*-sysv4*)
2870                 tm_file=sparc/sysv4.h
2871                 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2872                 xm_defines="USG POSIX"
2873                 tmake_file=t-svr4
2874                 xmake_file=sparc/x-sysv4
2875                 extra_parts="crtbegin.o crtend.o"
2876                 ;;
2877         sparc-*-vxsim*)
2878                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2879                 xm_defines="USG POSIX"
2880                 tm_file=sparc/vxsim.h
2881                 tmake_file=sparc/t-vxsparc
2882                 xmake_file=sparc/x-sysv4
2883                 ;;
2884         sparclet-*-aout*)
2885                 tm_file="sparc/splet.h libgloss.h"
2886                 tmake_file=sparc/t-splet
2887                 ;;
2888         sparclite-*-coff*)
2889                 tm_file="sparc/litecoff.h libgloss.h"
2890                 tmake_file=sparc/t-sparclite
2891                 ;;
2892         sparclite-*-aout*)
2893                 tm_file="sparc/lite.h aoutos.h libgloss.h"
2894                 tmake_file=sparc/t-sparclite
2895                 ;;
2896         sparc64-*-aout*)
2897                 tmake_file=sparc/t-sp64
2898                 tm_file=sparc/sp64-aout.h
2899                 ;;
2900         sparc64-*-elf*)
2901                 tmake_file=sparc/t-sp64
2902                 tm_file=sparc/sp64-elf.h
2903                 extra_parts="crtbegin.o crtend.o"
2904                 ;;
2905         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
2906                 tmake_file=sparc/t-sp64
2907                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2908                 tm_file=sparc/linux64.h
2909                 xmake_file=x-linux
2910                 fixincludes=Makefile.in # The headers are ok already.
2911                 gnu_ld=yes
2912                 ;;
2913 # This hasn't been upgraded to GCC 2.
2914 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
2915 #               tm_file=tahoe/harris.h
2916 #               ;;
2917 #       tahoe-*-bsd*)                   # tahoe running BSD
2918 #               ;;
2919         thumb-*-coff* | thumbel-*-coff*)
2920                 tm_file=arm/tcoff.h
2921                 out_file=arm/thumb.c
2922                 xm_file=arm/xm-thumb.h
2923                 md_file=arm/thumb.md
2924                 tmake_file=arm/t-thumb
2925                 fixincludes=Makefile.in # There is nothing to fix
2926                 ;;
2927 # This hasn't been upgraded to GCC 2.
2928 #       tron-*-*)
2929 #               cpu_type=gmicro
2930 #               use_collect2=yes
2931 #               ;;
2932         v850-*-*)
2933                 cpu_type=v850
2934                 tm_file="v850/v850.h"
2935                 xm_file="v850/xm-v850.h"
2936                 tmake_file=v850/t-v850
2937                 if test x$stabs = xyes
2938                 then
2939                         tm_file="${tm_file} dbx.h"
2940                 fi
2941                 use_collect2=no
2942                 ;;
2943         vax-*-bsd*)                     # vaxen running BSD
2944                 use_collect2=yes
2945                 float_format=vax
2946                 ;;
2947         vax-*-sysv*)                    # vaxen running system V
2948                 tm_file="${tm_file} vax/vaxv.h"
2949                 xm_defines=USG
2950                 float_format=vax
2951                 ;;
2952         vax-*-netbsd*)
2953                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2954                 xm_file="xm-netbsd.h ${xm_file}"
2955                 # On NetBSD, the headers are already okay, except for math.h.
2956                 fixincludes=fixinc.wrap
2957                 tmake_file=t-netbsd
2958                 float_format=vax
2959                 ;;
2960         vax-*-ultrix*)                  # vaxen running ultrix
2961                 tm_file="${tm_file} vax/ultrix.h"
2962                 use_collect2=yes
2963                 float_format=vax
2964                 ;;
2965         vax-*-vms*)                     # vaxen running VMS
2966                 xm_file=vax/xm-vms.h
2967                 tm_file=vax/vms.h
2968                 float_format=vax
2969                 ;;
2970         vax-*-*)                        # vax default entry
2971                 float_format=vax
2972                 ;;
2973         we32k-att-sysv*)
2974                 xm_file="${xm_file} xm-svr3"
2975                 use_collect2=yes
2976                 ;;
2977         *)
2978                 echo "Configuration $machine not supported" 1>&2
2979                 exit 1
2980                 ;;
2981         esac
2982
2983         case $machine in
2984         *-*-linux-gnu*)
2985                 ;; # Existing GNU/Linux systems do not use the GNU setup.
2986         *-*-gnu*)
2987                 # On the GNU system, the setup is just about the same on
2988                 # each different CPU.  The specific machines that GNU
2989                 # supports are matched above and just set $cpu_type.
2990                 xm_file="xm-gnu.h ${xm_file}"
2991                 tm_file=${cpu_type}/gnu.h
2992                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2993                 # GNU always uses ELF.
2994                 elf=yes
2995                 # GNU tools are the only tools.
2996                 gnu_ld=yes
2997                 gas=yes
2998                 # On GNU, the headers are already okay.
2999                 fixincludes=Makefile.in
3000                 xmake_file=x-linux      # These details are the same as Linux.
3001                 tmake_file=t-gnu        # These are not.
3002                 ;;
3003         *-*-sysv4*)
3004                 fixincludes=fixinc.svr4
3005                 xmake_try_sysv=x-sysv
3006                 install_headers_dir=install-headers-cpio
3007                 ;;
3008         *-*-sysv*)
3009                 install_headers_dir=install-headers-cpio
3010                 ;;
3011         esac
3012
3013         # Distinguish i[34567]86
3014         # Also, do not run mips-tfile on MIPS if using gas.
3015         # Process --with-cpu= for PowerPC/rs6000
3016         target_cpu_default2=
3017         case $machine in
3018         i486-*-*)
3019                 target_cpu_default2=1
3020                 ;;
3021         i586-*-*)
3022                 target_cpu_default2=2
3023                 ;;
3024         i686-*-* | i786-*-*)
3025                 target_cpu_default2=3
3026                 ;;
3027         alpha*-*-*)
3028                 case $machine in
3029                         alphaev6*)
3030                                 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
3031                                 ;;
3032                         alphapca56*)
3033                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
3034                                 ;;
3035                         alphaev56*)
3036                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
3037                                 ;;
3038                         alphaev5*)
3039                                 target_cpu_default2="MASK_CPU_EV5"
3040                                 ;;
3041                 esac
3042                                 
3043                 if test x$gas = xyes
3044                 then
3045                         if test "$target_cpu_default2" = ""
3046                         then
3047                                 target_cpu_default2="MASK_GAS"
3048                         else
3049                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
3050                         fi
3051                 fi
3052                 ;;
3053         arm*-*-*)
3054                 case "x$with_cpu" in
3055                         x)
3056                                 # The most generic
3057                                 target_cpu_default2="TARGET_CPU_generic"
3058                                 ;;
3059
3060                         # Distinguish cores, and major variants
3061                         # arm7m doesn't exist, but D & I don't affect code
3062                         xarm[23678] | xarm250 | xarm[67][01]0 \
3063                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3064                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
3065                         | xstrongarm | xstrongarm110)
3066                                 target_cpu_default2="TARGET_CPU_$with_cpu"
3067                                 ;;
3068
3069                         xyes | xno)
3070                                 echo "--with-cpu must be passed a value" 1>&2
3071                                 exit 1
3072                                 ;;
3073
3074                         *)
3075                                 if test x$pass2done = xyes
3076                                 then
3077                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3078                                         exit 1
3079                                 fi
3080                                 ;;
3081                 esac
3082                 ;;
3083
3084         mips*-*-ecoff* | mips*-*-elf*)
3085                 if test x$gas = xyes
3086                 then
3087                         if test x$gnu_ld = xyes
3088                         then
3089                                 target_cpu_default2=20
3090                         else
3091                                 target_cpu_default2=16
3092                         fi
3093                 fi
3094                 ;;
3095         mips*-*-*)
3096                 if test x$gas = xyes
3097                 then
3098                         target_cpu_default2=16
3099                 fi
3100                 ;;
3101         powerpc*-*-* | rs6000-*-*)
3102                 case "x$with_cpu" in
3103                         x)
3104                                 ;;
3105
3106                         xcommon | xpower | xpower2 | xpowerpc | xrios \
3107                           | xrios1 | xrios2 | xrsc | xrsc1 \
3108                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
3109                           | x403 | x505 | x801 | x821 | x823 | x860)
3110                                 target_cpu_default2="\"$with_cpu\""
3111                                 ;;
3112
3113                         xyes | xno)
3114                                 echo "--with-cpu must be passed a value" 1>&2
3115                                 exit 1
3116                                 ;;
3117
3118                         *)
3119                                 if test x$pass2done = xyes
3120                                 then
3121                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3122                                         exit 1
3123                                 fi
3124                                 ;;
3125                 esac
3126                 ;;
3127         sparc*-*-*)
3128                 case ".$with_cpu" in
3129                         .)
3130                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3131                                 ;;
3132                         .supersparc | .ultrasparc | .v7 | .v8 | .v9)
3133                                 target_cpu_default2="TARGET_CPU_$with_cpu"
3134                                 ;;
3135                         *)
3136                                 if test x$pass2done = xyes
3137                                 then
3138                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3139                                         exit 1
3140                                 fi
3141                                 ;;
3142                 esac
3143                 ;;
3144         esac
3145
3146         if test "$target_cpu_default2" != ""
3147         then
3148                 if test "$target_cpu_default" != ""
3149                 then
3150                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3151                 else
3152                         target_cpu_default=$target_cpu_default2
3153                 fi
3154         fi
3155
3156         # No need for collect2 if we have the GNU linker.
3157         # Actually, there is now; GNU ld doesn't handle the EH info or
3158         # collecting for shared libraries.
3159         #case x$gnu_ld in
3160         #xyes)
3161         #       use_collect2=
3162         #       ;;
3163         #esac
3164
3165 # Save data on machine being used to compile GCC in build_xm_file.
3166 # Save data on host machine in vars host_xm_file and host_xmake_file.
3167         if test x$pass1done = x
3168         then
3169                 if test x"$xm_file" = x
3170                 then build_xm_file=$cpu_type/xm-$cpu_type.h
3171                 else build_xm_file=$xm_file
3172                 fi
3173                 build_xm_defines=$xm_defines
3174                 build_install_headers_dir=$install_headers_dir
3175                 build_exeext=$exeext
3176                 pass1done=yes
3177         else
3178                 if test x$pass2done = x
3179                 then
3180                         if test x"$xm_file" = x
3181                         then host_xm_file=$cpu_type/xm-$cpu_type.h
3182                         else host_xm_file=$xm_file
3183                         fi
3184                         host_xm_defines=$xm_defines
3185                         if test x"$xmake_file" = x
3186                         then xmake_file=$cpu_type/x-$cpu_type
3187                         fi
3188                         host_xmake_file="$xmake_file"
3189                         host_truncate_target=$truncate_target
3190                         host_extra_gcc_objs=$extra_gcc_objs
3191                         host_extra_objs=$extra_host_objs
3192                         host_exeext=$exeext
3193                         pass2done=yes
3194                 fi
3195         fi
3196 done
3197
3198 extra_objs="${host_extra_objs} ${extra_objs}"
3199
3200 # Default the target-machine variables that were not explicitly set.
3201 if test x"$tm_file" = x
3202 then tm_file=$cpu_type/$cpu_type.h; fi
3203
3204 if test x$extra_headers = x
3205 then extra_headers=; fi
3206
3207 if test x"$xm_file" = x
3208 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3209
3210 if test x$md_file = x
3211 then md_file=$cpu_type/$cpu_type.md; fi
3212
3213 if test x$out_file = x
3214 then out_file=$cpu_type/$cpu_type.c; fi
3215
3216 if test x"$tmake_file" = x
3217 then tmake_file=$cpu_type/t-$cpu_type
3218 fi
3219
3220 if test x$float_format = x
3221 then float_format=i64
3222 fi
3223
3224 if test x$enable_haifa = x
3225 then
3226   case $target in
3227     alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc*-* | m32r*-*)
3228       enable_haifa=yes;;
3229   esac
3230 fi
3231
3232 # Say what files are being used for the output code and MD file.
3233 echo "Using \`$srcdir/config/$out_file' to output insns."
3234 echo "Using \`$srcdir/config/$md_file' as machine description file."
3235
3236 count=a
3237 for f in $tm_file; do
3238         count=${count}x
3239 done
3240 if test $count = ax; then
3241         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3242 else
3243         echo "Using the following target machine macro files:"
3244         for f in $tm_file; do
3245                 echo "  $srcdir/config/$f"
3246         done
3247 fi
3248
3249 count=a
3250 for f in $host_xm_file; do
3251         count=${count}x
3252 done
3253 if test $count = ax; then
3254         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3255 else
3256         echo "Using the following host machine macro files:"
3257         for f in $host_xm_file; do
3258                 echo "  $srcdir/config/$f"
3259         done
3260 fi
3261
3262 if test "$host_xm_file" != "$build_xm_file"; then
3263         count=a
3264         for f in $build_xm_file; do
3265                 count=${count}x
3266         done
3267         if test $count = ax; then
3268                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3269         else
3270                 echo "Using the following build machine macro files:"
3271                 for f in $build_xm_file; do
3272                         echo "  $srcdir/config/$f"
3273                 done
3274         fi
3275 fi
3276
3277 if test x$thread_file = x; then
3278         if test x$target_thread_file != x; then
3279                 thread_file=$target_thread_file
3280         else
3281                 thread_file='single'
3282         fi
3283 fi
3284
3285 # Set up the header files.
3286 # $links is the list of header files to create.
3287 # $vars is the list of shell variables with file names to include.
3288 # auto-host.h is the file containing items generated by autoconf and is
3289 # the first file included by config.h.
3290 null_defines=
3291 host_xm_file="auto-host.h ${host_xm_file}"
3292
3293 # If host=build, it is correct to have hconfig include auto-host.h
3294 # as well.  If host!=build, we are in error and need to do more 
3295 # work to find out the build config parameters.
3296 if test x$host = x$build
3297 then
3298         build_xm_file="auto-host.h ${build_xm_file}"
3299 else
3300         # We create a subdir, then run autoconf in the subdir.
3301         # To prevent recursion we set host and build for the new
3302         # invocation of configure to the build for this invocation
3303         # of configure. 
3304         tempdir=build.$$
3305         rm -rf $tempdir
3306         mkdir $tempdir
3307         cd $tempdir
3308         case ${srcdir} in
3309         /*) realsrcdir=${srcdir};;
3310         *) realsrcdir=../${srcdir};;
3311         esac
3312         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
3313                 --target=$target --host=$build --build=$build
3314
3315         # We just finished tests for the build machine, so rename
3316         # the file auto-build.h in the gcc directory.
3317         mv auto-host.h ../auto-build.h
3318         cd ..
3319         rm -rf $tempdir
3320         build_xm_file="auto-build.h ${build_xm_file}"
3321 fi
3322
3323 vars="host_xm_file tm_file xm_file build_xm_file"
3324 links="config.h tm.h tconfig.h hconfig.h"
3325 defines="host_xm_defines null_defines xm_defines build_xm_defines"
3326
3327 rm -f config.bak
3328 if test -f config.status; then mv -f config.status config.bak; fi
3329
3330 # Make the links.
3331 while test -n "$vars"
3332 do
3333         set $vars; var=$1; shift; vars=$*
3334         set $links; link=$1; shift; links=$*
3335         set $defines; define=$1; shift; defines=$*
3336
3337         rm -f $link
3338
3339         # Define TARGET_CPU_DEFAULT if the system wants one.
3340         # This substitutes for lots of *.h files.
3341         if test "$target_cpu_default" != "" -a $link = tm.h
3342         then
3343                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
3344         fi
3345
3346         for file in `eval echo '$'$var`; do
3347                 echo "#include \"$file\"" >>$link
3348         done
3349
3350         for def in `eval echo '$'$define`; do
3351                 echo "#ifndef $def" >>$link
3352                 echo "#define $def" >>$link
3353                 echo "#endif" >>$link
3354         done
3355 done
3356
3357 # Truncate the target if necessary
3358 if test x$host_truncate_target != x; then
3359         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3360 fi
3361
3362 # Get the version trigger filename from the toplevel
3363 if test "${with_gcc_version_trigger+set}" = set; then
3364         gcc_version_trigger=$with_gcc_version_trigger
3365 else
3366         gcc_version_trigger=${srcdir}/version.c
3367 fi
3368 changequote(,)dnl
3369 gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
3370 changequote([,])dnl
3371
3372 # Get an absolute path to the GCC top-level source directory
3373 holddir=`pwd`
3374 cd $srcdir
3375 topdir=`pwd`
3376 cd $holddir
3377
3378 # Conditionalize the makefile for this host machine.
3379 # Make-host contains the concatenation of all host makefile fragments
3380 # [there can be more than one].  This file is built by configure.frag.
3381 host_overrides=Make-host
3382 dep_host_xmake_file=
3383 for f in .. ${host_xmake_file}
3384 do
3385         if test -f ${srcdir}/config/$f
3386         then
3387                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3388         fi
3389 done
3390
3391 # Conditionalize the makefile for this target machine.
3392 # Make-target contains the concatenation of all host makefile fragments
3393 # [there can be more than one].  This file is built by configure.frag.
3394 target_overrides=Make-target
3395 dep_tmake_file=
3396 for f in .. ${tmake_file}
3397 do
3398         if test -f ${srcdir}/config/$f
3399         then
3400                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3401         fi
3402 done
3403
3404 # If the host doesn't support symlinks, modify CC in
3405 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3406 # Otherwise, we can use "CC=$(CC)".
3407 rm -f symtest.tem
3408 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
3409 then
3410         cc_set_by_configure="\$(CC)"
3411         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3412 else
3413         rm -f symtest.tem
3414         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3415         then
3416                 symbolic_link="cp -p"
3417         else
3418                 symbolic_link="cp"
3419         fi
3420         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3421         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3422 fi
3423 rm -f symtest.tem
3424
3425 out_object_file=`basename $out_file .c`.o
3426
3427 tm_file_list=
3428 for f in $tm_file; do
3429         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3430 done
3431
3432 host_xm_file_list=
3433 for f in $host_xm_file; do
3434         if test $f != "auto-host.h"; then
3435                 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3436         else
3437                 host_xm_file_list="${host_xm_file_list} auto-host.h"
3438         fi
3439 done
3440
3441 build_xm_file_list=
3442 for f in $build_xm_file; do
3443         if test $f != "auto-build.h"; then
3444                 if test $f != "auto-host.h"; then
3445                         build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3446                 else
3447                         build_xm_file_list="${build_xm_file_list} auto-host.h"
3448                 fi
3449         else
3450                 build_xm_file_list="${build_xm_file_list} auto-build.h"
3451         fi
3452 done
3453
3454 # Define macro CROSS_COMPILE in compilation
3455 # if this is a cross-compiler.
3456 # Also use all.cross instead of all.internal
3457 # and add cross-make to Makefile.
3458 cross_overrides="/dev/null"
3459 if test x$host != x$target
3460 then
3461         cross_defines="CROSS=-DCROSS_COMPILE"
3462         cross_overrides="${topdir}/cross-make"
3463 fi
3464
3465 # When building gcc with a cross-compiler, we need to fix a few things.
3466 # This must come after cross-make as we want all.build to override
3467 # all.cross.
3468 build_overrides="/dev/null"
3469 if test x$build != x$host
3470 then
3471         build_overrides="${topdir}/build-make"
3472 fi
3473
3474 # Expand extra_headers to include complete path.
3475 # This substitutes for lots of t-* files.
3476 extra_headers_list=
3477 if test "x$extra_headers" = x
3478 then true
3479 else
3480         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3481         for file in $extra_headers;
3482         do
3483                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3484         done
3485 fi
3486
3487 if test x$use_collect2 = xno; then
3488         use_collect2=
3489 fi
3490
3491 # Add a definition of USE_COLLECT2 if system wants one.
3492 # Also tell toplev.c what to do.
3493 # This substitutes for lots of t-* files.
3494 if test x$use_collect2 = x
3495 then
3496         will_use_collect2=
3497         maybe_use_collect2=
3498 else
3499         will_use_collect2="collect2"
3500         maybe_use_collect2="-DUSE_COLLECT2"
3501 fi
3502
3503 # NEED TO CONVERT
3504 # Set MD_DEPS if the real md file is in md.pre-cpp.
3505 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
3506 # for line oriented comments, so we must always use a GNU cpp.  If
3507 # building gcc with a cross compiler, use the cross compiler just
3508 # built.  Otherwise, we can use the cpp just built.
3509 md_file_sub=
3510 if test "x$md_cppflags" = x
3511 then
3512         md_file_sub=$srcdir/config/$md_file
3513 else
3514         md_file=md
3515 fi
3516
3517 # If we have gas in the build tree, make a link to it.
3518 if test -f ../gas/Makefile; then
3519         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3520 fi
3521
3522 # If we have nm in the build tree, make a link to it.
3523 if test -f ../binutils/Makefile; then
3524         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
3525 fi
3526
3527 # If we have ld in the build tree, make a link to it.
3528 if test -f ../ld/Makefile; then
3529 #       if test x$use_collect2 = x; then
3530 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3531 #       else
3532                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3533 #       fi
3534 fi
3535
3536 # Figure out what assembler alignment features are present.
3537 AC_MSG_CHECKING(assembler alignment features)
3538 gcc_cv_as=
3539 gcc_cv_as_alignment_features=
3540 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'`
3541 if test -x as$host_exeext; then
3542         # Build using assembler in the current directory.
3543         gcc_cv_as=./as$host_exeext
3544 elif test -f $gcc_cv_as_gas_srcdir/configure.in; then
3545         # Single tree build which includes gas.
3546         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
3547         do
3548 changequote(,)dnl
3549                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
3550 changequote([,])dnl
3551                 if test x$gcc_cv_gas_version != x; then
3552                         break
3553                 fi
3554         done
3555 changequote(,)dnl
3556         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
3557         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
3558 changequote([,])dnl
3559         if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
3560                 # Gas version 2.6 and later support for .balign and .p2align.
3561                 # bytes to skip when using .p2align.
3562                 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
3563                         gcc_cv_as_alignment_features=".balign and .p2align"
3564                         AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
3565                 fi
3566                 # Gas version 2.8 and later support specifying the maximum
3567                 # bytes to skip when using .p2align.
3568                 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
3569                         gcc_cv_as_alignment_features=".p2align including maximum skip"
3570                         AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3571                 fi
3572         fi
3573 elif test x$host = x$target; then
3574         # Native build.
3575         gcc_cv_as=as$host_exeext
3576 fi
3577 if test x$gcc_cv_as != x; then
3578         # Check if we have .balign and .p2align
3579         echo ".balign  4" > conftest.s
3580         echo ".p2align  2" >> conftest.s
3581         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3582                 gcc_cv_as_alignment_features=".balign and .p2align"
3583                 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
3584         fi
3585         rm -f conftest.s conftest.o
3586         # Check if specifying the maximum bytes to skip when
3587         # using .p2align is supported.
3588         echo ".p2align 4,,7" > conftest.s
3589         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3590                 gcc_cv_as_alignment_features=".p2align including maximum skip"
3591                 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3592         fi
3593         rm -f conftest.s conftest.o
3594 fi
3595 AC_MSG_RESULT($gcc_cv_as_alignment_features)
3596
3597 # Figure out what language subdirectories are present.
3598 subdirs=
3599 for lang in ${srcdir}/*/config-lang.in ..
3600 do
3601         case $lang in
3602         ..) ;;
3603         # The odd quoting in the next line works around
3604         # an apparent bug in bash 1.12 on linux.
3605 changequote(,)dnl
3606         ${srcdir}/[*]/config-lang.in) ;;
3607         *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
3608 changequote([,])dnl
3609         esac
3610 done
3611
3612 # Make gthr-default.h if we have a thread file.
3613 gthread_flags=
3614 if test $thread_file != single; then
3615     rm -f gthr-default.h
3616     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3617     gthread_flags=-DHAVE_GTHR_DEFAULT
3618 fi
3619 AC_SUBST(gthread_flags)
3620
3621 # Make empty files to contain the specs and options for each language.
3622 # Then add #include lines to for a compiler that has specs and/or options.
3623
3624 lang_specs_files=
3625 lang_options_files=
3626 lang_tree_files=
3627 rm -f specs.h options.h gencheck.h
3628 touch specs.h options.h gencheck.h
3629 for subdir in . $subdirs
3630 do
3631         if test -f $srcdir/$subdir/lang-specs.h; then
3632                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3633                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3634         fi
3635         if test -f $srcdir/$subdir/lang-options.h; then
3636                 echo "#include \"$subdir/lang-options.h\"" >>options.h
3637                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3638         fi
3639         if test -f $srcdir/$subdir/$subdir-tree.def; then
3640                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
3641                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3642         fi
3643 done
3644
3645 # These (without "all_") are set in each config-lang.in.
3646 # `language' must be a single word so is spelled singularly.
3647 all_languages=
3648 all_boot_languages=
3649 all_compilers=
3650 all_stagestuff=
3651 all_diff_excludes=
3652 all_outputs=Makefile
3653 # List of language makefile fragments.
3654 all_lang_makefiles=
3655 all_headers=
3656 all_lib2funcs=
3657
3658 # Add the language fragments.
3659 # Languages are added via two mechanisms.  Some information must be
3660 # recorded in makefile variables, these are defined in config-lang.in.
3661 # We accumulate them and plug them into the main Makefile.
3662 # The other mechanism is a set of hooks for each of the main targets
3663 # like `clean', `install', etc.
3664
3665 language_fragments="Make-lang"
3666 language_hooks="Make-hooks"
3667 oldstyle_subdirs=
3668
3669 for s in .. $subdirs
3670 do
3671         if test $s != ".."
3672         then
3673                 language=
3674                 boot_language=
3675                 compilers=
3676                 stagestuff=
3677                 diff_excludes=
3678                 headers=
3679                 outputs=
3680                 lib2funcs=
3681                 . ${srcdir}/$s/config-lang.in
3682                 if test "x$language" = x
3683                 then
3684                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3685                         exit 1
3686                 fi
3687                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3688                 all_languages="$all_languages $language"
3689                 if test "x$boot_language" = xyes
3690                 then
3691                         all_boot_languages="$all_boot_languages $language"
3692                 fi
3693                 all_compilers="$all_compilers $compilers"
3694                 all_stagestuff="$all_stagestuff $stagestuff"
3695                 all_diff_excludes="$all_diff_excludes $diff_excludes"
3696                 all_headers="$all_headers $headers"
3697                 all_outputs="$all_outputs $outputs"
3698                 if test x$outputs = x
3699                 then
3700                         oldstyle_subdirs="$oldstyle_subdirs $s"
3701                 fi
3702                 all_lib2funcs="$all_lib2funcs $lib2funcs"
3703         fi
3704 done
3705
3706 # Since we can't use `::' targets, we link each language in
3707 # with a set of hooks, reached indirectly via lang.${target}.
3708
3709 rm -f Make-hooks
3710 touch Make-hooks
3711 target_list="all.build all.cross start.encap rest.encap \
3712         info dvi \
3713         install-normal install-common install-info install-man \
3714         uninstall distdir \
3715         mostlyclean clean distclean extraclean maintainer-clean \
3716         stage1 stage2 stage3 stage4"
3717 for t in $target_list
3718 do
3719         x=
3720         for l in .. $all_languages
3721         do
3722                 if test $l != ".."; then
3723                         x="$x $l.$t"
3724                 fi
3725         done
3726         echo "lang.$t: $x" >> Make-hooks
3727 done
3728
3729 # If we're not building in srcdir, create .gdbinit.
3730
3731 if test ! -f Makefile.in; then
3732         echo "dir ." > .gdbinit
3733         echo "dir ${srcdir}" >> .gdbinit
3734         if test x$gdb_needs_out_file_path = xyes
3735         then
3736                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3737         fi
3738         if test "x$subdirs" != x; then
3739                 for s in $subdirs
3740                 do
3741                         echo "dir ${srcdir}/$s" >> .gdbinit
3742                 done
3743         fi
3744         echo "source ${srcdir}/.gdbinit" >> .gdbinit
3745 fi
3746
3747 # Define variables host_canonical and build_canonical
3748 # because some Cygnus local changes in the Makefile depend on them.
3749 build_canonical=${build}
3750 host_canonical=${host}
3751 target_subdir=
3752 if test "${host}" != "${target}" ; then
3753     target_subdir=${target}/
3754 fi
3755 AC_SUBST(build_canonical)
3756 AC_SUBST(host_canonical)
3757 AC_SUBST(target_subdir)
3758         
3759 # If this is using newlib, then define inhibit_libc in
3760 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
3761 # libgcc.a, but that's OK because newib should have its own version of
3762 # assert.h.
3763 inhibit_libc=
3764 if test x$with_newlib = xyes; then
3765         inhibit_libc=-Dinhibit_libc
3766 fi
3767 AC_SUBST(inhibit_libc)
3768
3769 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3770 sched_prefix=
3771 sched_cflags=
3772 if test x$enable_haifa = xyes; then
3773     echo "Using the Haifa scheduler."
3774     sched_prefix=haifa-
3775     sched_cflags=-DHAIFA
3776 fi
3777 AC_SUBST(sched_prefix)
3778 AC_SUBST(sched_cflags)
3779 if test x$enable_haifa != x; then
3780     # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3781     for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3782         if test -f $x; then
3783             echo "Removing $x"
3784             rm -f $x
3785         fi
3786     done
3787 fi
3788
3789 # Warn if using init_priority.
3790 AC_MSG_CHECKING(whether to enable init_priority by default)
3791 if test x$enable_init_priority != xyes; then
3792   enable_init_priority=no
3793 fi
3794 AC_MSG_RESULT($enable_init_priority)
3795
3796 # Nothing to do for FLOAT_H, float_format already handled.
3797 objdir=`pwd`
3798 AC_SUBST(objdir)
3799
3800 # Process the language and host/target makefile fragments.
3801 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3802
3803 # Substitute configuration variables
3804 AC_SUBST(subdirs)
3805 AC_SUBST(all_languages)
3806 AC_SUBST(all_boot_languages)
3807 AC_SUBST(all_compilers)
3808 AC_SUBST(all_lang_makefiles)
3809 AC_SUBST(all_stagestuff)
3810 AC_SUBST(all_diff_excludes)
3811 AC_SUBST(all_lib2funcs)
3812 AC_SUBST(all_headers)
3813 AC_SUBST(cpp_main)
3814 AC_SUBST(extra_passes)
3815 AC_SUBST(extra_programs)
3816 AC_SUBST(extra_parts)
3817 AC_SUBST(extra_c_objs)
3818 AC_SUBST(extra_cxx_objs)
3819 AC_SUBST(extra_cpp_objs)
3820 AC_SUBST(extra_c_flags)
3821 AC_SUBST(extra_objs)
3822 AC_SUBST(host_extra_gcc_objs)
3823 AC_SUBST(extra_headers_list)
3824 AC_SUBST(dep_host_xmake_file)
3825 AC_SUBST(dep_tmake_file)
3826 AC_SUBST(out_file)
3827 AC_SUBST(out_object_file)
3828 AC_SUBST(md_file)
3829 AC_SUBST(tm_file_list)
3830 AC_SUBST(build_xm_file_list)
3831 AC_SUBST(host_xm_file_list)
3832 AC_SUBST(lang_specs_files)
3833 AC_SUBST(lang_options_files)
3834 AC_SUBST(lang_tree_files)
3835 AC_SUBST(thread_file)
3836 AC_SUBST(objc_boehm_gc)
3837 AC_SUBST(gcc_version)
3838 AC_SUBST(gcc_version_trigger)
3839 AC_SUBST(local_prefix)
3840 AC_SUBST(gxx_include_dir)
3841 AC_SUBST(fixincludes)
3842 AC_SUBST(build_install_headers_dir)
3843 AC_SUBST(build_exeext)
3844 AC_SUBST(host_exeext)
3845 AC_SUBST(float_format)
3846 AC_SUBST(will_use_collect2)
3847 AC_SUBST(maybe_use_collect2)
3848 AC_SUBST(cc_set_by_configure)
3849 AC_SUBST(stage_prefix_set_by_configure)
3850 AC_SUBST(install)
3851 AC_SUBST(symbolic_link)
3852
3853 AC_SUBST_FILE(target_overrides)
3854 AC_SUBST_FILE(host_overrides)
3855 AC_SUBST(cross_defines)
3856 AC_SUBST_FILE(cross_overrides)
3857 AC_SUBST_FILE(build_overrides)
3858 AC_SUBST_FILE(language_fragments)
3859 AC_SUBST_FILE(language_hooks)
3860
3861 # Echo that links are built
3862 if test x$host = x$target
3863 then
3864         str1="native "
3865 else
3866         str1="cross-"
3867         str2=" from $host"
3868 fi
3869
3870 if test x$host != x$build
3871 then
3872         str3=" on a $build system"
3873 fi
3874
3875 if test "x$str2" != x || test "x$str3" != x
3876 then
3877         str4=
3878 fi
3879
3880 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3881
3882 if test "x$str2" != x || test "x$str3" != x
3883 then
3884         echo " ${str2}${str3}." 1>&2
3885 fi
3886
3887 # Truncate the target if necessary
3888 if test x$host_truncate_target != x; then
3889         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3890 fi
3891
3892 # Configure the subdirectories
3893 # AC_CONFIG_SUBDIRS($subdirs)
3894
3895 # Create the Makefile
3896 # and configure language subdirectories
3897 AC_OUTPUT($all_outputs,
3898 [
3899 . $srcdir/configure.lang
3900 case x$CONFIG_HEADERS in
3901 xauto-host.h:config.in)
3902 echo > cstamp-h ;;
3903 esac
3904 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3905 # bootstrapping and the installation procedure can still use
3906 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
3907 # FLAGS_TO_PASS has been modified to solve the problem there.
3908 # This is virtually a duplicate of what happens in configure.lang; we do
3909 # an extra check to make sure this only happens if ln -s can be used.
3910 if test "$symbolic_link" = "ln -s"; then
3911  for d in .. ${subdirs} ; do
3912    if test $d != ..; then
3913         STARTDIR=`pwd`
3914         cd $d
3915         for t in stage1 stage2 stage3 stage4 include
3916         do
3917                 rm -f $t
3918                 $symbolic_link ../$t $t 2>/dev/null
3919         done
3920         cd $STARTDIR
3921    fi
3922  done
3923 else true ; fi
3924 ],
3925 [
3926 host='${host}'
3927 build='${build}'
3928 target='${target}'
3929 target_alias='${target_alias}'
3930 srcdir='${srcdir}'
3931 subdirs='${subdirs}'
3932 oldstyle_subdirs='${oldstyle_subdirs}'
3933 symbolic_link='${symbolic_link}'
3934 program_transform_set='${program_transform_set}'
3935 program_transform_name='${program_transform_name}'
3936 dep_host_xmake_file='${dep_host_xmake_file}'
3937 host_xmake_file='${host_xmake_file}'
3938 dep_tmake_file='${dep_tmake_file}'
3939 tmake_file='${tmake_file}'
3940 thread_file='${thread_file}'
3941 gcc_version='${gcc_version}'
3942 gcc_version_trigger='${gcc_version_trigger}'
3943 local_prefix='${local_prefix}'
3944 build_install_headers_dir='${build_install_headers_dir}'
3945 build_exeext='${build_exeext}'
3946 host_exeext='${host_exeext}'
3947 out_file='${out_file}'
3948 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3949 SET_MAKE='${SET_MAKE}'
3950 target_list='${target_list}'
3951 target_overrides='${target_overrides}'
3952 host_overrides='${host_overrides}'
3953 cross_defines='${cross_defines}'
3954 cross_overrides='${cross_overrides}'
3955 build_overrides='${build_overrides}'
3956 ])