OSDN Git Service

Switch to strrchr if available instead of rindex
[pf3gnuchains/gcc-fork.git] / gcc / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-gnu-ld           arrange to work with GNU ld."
16 ac_help="$ac_help
17   --with-gnu-as           arrange to work with GNU as."
18 ac_help="$ac_help
19   --with-stabs            arrange to use stabs instead of host debug format."
20 ac_help="$ac_help
21   --with-elf              arrange to use ELF instead of host debug format."
22 ac_help="$ac_help
23   --with-local-prefix=DIR specifies directory to put local include."
24 ac_help="$ac_help
25   --with-gxx-include-dir=DIR
26                           specifies directory to put g++ header files."
27 ac_help="$ac_help
28   --enable-c-cpplib       Use cpplib for C."
29 ac_help="$ac_help
30   --enable-haifa          Use the experimental scheduler.
31   --disable-haifa         Don't use the experimental scheduler for the
32                           targets which normally enable it."
33 ac_help="$ac_help
34   --with-fast-fixincludes    Use a faster fixinclude program.  Experimental"
35 ac_help="$ac_help
36   --enable-threads        enable thread usage for target GCC.
37   --enable-threads=LIB    use LIB thread package for target GCC."
38
39 # Initialize some variables set by options.
40 # The variables have the same names as the options, with
41 # dashes changed to underlines.
42 build=NONE
43 cache_file=./config.cache
44 exec_prefix=NONE
45 host=NONE
46 no_create=
47 nonopt=NONE
48 no_recursion=
49 prefix=NONE
50 program_prefix=NONE
51 program_suffix=NONE
52 program_transform_name=s,x,x,
53 silent=
54 site=
55 srcdir=
56 target=NONE
57 verbose=
58 x_includes=NONE
59 x_libraries=NONE
60 bindir='${exec_prefix}/bin'
61 sbindir='${exec_prefix}/sbin'
62 libexecdir='${exec_prefix}/libexec'
63 datadir='${prefix}/share'
64 sysconfdir='${prefix}/etc'
65 sharedstatedir='${prefix}/com'
66 localstatedir='${prefix}/var'
67 libdir='${exec_prefix}/lib'
68 includedir='${prefix}/include'
69 oldincludedir='/usr/include'
70 infodir='${prefix}/info'
71 mandir='${prefix}/man'
72
73 # Initialize some other variables.
74 subdirs=
75 MFLAGS= MAKEFLAGS=
76 SHELL=${CONFIG_SHELL-/bin/sh}
77 # Maximum number of lines to put in a shell here document.
78 ac_max_here_lines=12
79
80 ac_prev=
81 for ac_option
82 do
83
84   # If the previous option needs an argument, assign it.
85   if test -n "$ac_prev"; then
86     eval "$ac_prev=\$ac_option"
87     ac_prev=
88     continue
89   fi
90
91   case "$ac_option" in
92   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93   *) ac_optarg= ;;
94   esac
95
96   # Accept the important Cygnus configure options, so we can diagnose typos.
97
98   case "$ac_option" in
99
100   -bindir | --bindir | --bindi | --bind | --bin | --bi)
101     ac_prev=bindir ;;
102   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
103     bindir="$ac_optarg" ;;
104
105   -build | --build | --buil | --bui | --bu)
106     ac_prev=build ;;
107   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
108     build="$ac_optarg" ;;
109
110   -cache-file | --cache-file | --cache-fil | --cache-fi \
111   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112     ac_prev=cache_file ;;
113   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
115     cache_file="$ac_optarg" ;;
116
117   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118     ac_prev=datadir ;;
119   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120   | --da=*)
121     datadir="$ac_optarg" ;;
122
123   -disable-* | --disable-*)
124     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
125     # Reject names that are not valid shell variable names.
126     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128     fi
129     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130     eval "enable_${ac_feature}=no" ;;
131
132   -enable-* | --enable-*)
133     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
134     # Reject names that are not valid shell variable names.
135     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
137     fi
138     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139     case "$ac_option" in
140       *=*) ;;
141       *) ac_optarg=yes ;;
142     esac
143     eval "enable_${ac_feature}='$ac_optarg'" ;;
144
145   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147   | --exec | --exe | --ex)
148     ac_prev=exec_prefix ;;
149   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151   | --exec=* | --exe=* | --ex=*)
152     exec_prefix="$ac_optarg" ;;
153
154   -gas | --gas | --ga | --g)
155     # Obsolete; use --with-gas.
156     with_gas=yes ;;
157
158   -help | --help | --hel | --he)
159     # Omit some internal or obsolete options to make the list less imposing.
160     # This message is too long to be a string in the A/UX 3.1 sh.
161     cat << EOF
162 Usage: configure [options] [host]
163 Options: [defaults in brackets after descriptions]
164 Configuration:
165   --cache-file=FILE       cache test results in FILE
166   --help                  print this message
167   --no-create             do not create output files
168   --quiet, --silent       do not print \`checking...' messages
169   --version               print the version of autoconf that created configure
170 Directory and file names:
171   --prefix=PREFIX         install architecture-independent files in PREFIX
172                           [$ac_default_prefix]
173   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
174                           [same as prefix]
175   --bindir=DIR            user executables in DIR [EPREFIX/bin]
176   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
177   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
178   --datadir=DIR           read-only architecture-independent data in DIR
179                           [PREFIX/share]
180   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
181   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
182                           [PREFIX/com]
183   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
184   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
185   --includedir=DIR        C header files in DIR [PREFIX/include]
186   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
187   --infodir=DIR           info documentation in DIR [PREFIX/info]
188   --mandir=DIR            man documentation in DIR [PREFIX/man]
189   --srcdir=DIR            find the sources in DIR [configure dir or ..]
190   --program-prefix=PREFIX prepend PREFIX to installed program names
191   --program-suffix=SUFFIX append SUFFIX to installed program names
192   --program-transform-name=PROGRAM
193                           run sed PROGRAM on installed program names
194 EOF
195     cat << EOF
196 Host type:
197   --build=BUILD           configure for building on BUILD [BUILD=HOST]
198   --host=HOST             configure for HOST [guessed]
199   --target=TARGET         configure for TARGET [TARGET=HOST]
200 Features and packages:
201   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
202   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
203   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
204   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
205   --x-includes=DIR        X include files are in DIR
206   --x-libraries=DIR       X library files are in DIR
207 EOF
208     if test -n "$ac_help"; then
209       echo "--enable and --with options recognized:$ac_help"
210     fi
211     exit 0 ;;
212
213   -host | --host | --hos | --ho)
214     ac_prev=host ;;
215   -host=* | --host=* | --hos=* | --ho=*)
216     host="$ac_optarg" ;;
217
218   -includedir | --includedir | --includedi | --included | --include \
219   | --includ | --inclu | --incl | --inc)
220     ac_prev=includedir ;;
221   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
222   | --includ=* | --inclu=* | --incl=* | --inc=*)
223     includedir="$ac_optarg" ;;
224
225   -infodir | --infodir | --infodi | --infod | --info | --inf)
226     ac_prev=infodir ;;
227   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
228     infodir="$ac_optarg" ;;
229
230   -libdir | --libdir | --libdi | --libd)
231     ac_prev=libdir ;;
232   -libdir=* | --libdir=* | --libdi=* | --libd=*)
233     libdir="$ac_optarg" ;;
234
235   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
236   | --libexe | --libex | --libe)
237     ac_prev=libexecdir ;;
238   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
239   | --libexe=* | --libex=* | --libe=*)
240     libexecdir="$ac_optarg" ;;
241
242   -localstatedir | --localstatedir | --localstatedi | --localstated \
243   | --localstate | --localstat | --localsta | --localst \
244   | --locals | --local | --loca | --loc | --lo)
245     ac_prev=localstatedir ;;
246   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
247   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
248   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
249     localstatedir="$ac_optarg" ;;
250
251   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
252     ac_prev=mandir ;;
253   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
254     mandir="$ac_optarg" ;;
255
256   -nfp | --nfp | --nf)
257     # Obsolete; use --without-fp.
258     with_fp=no ;;
259
260   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
261   | --no-cr | --no-c)
262     no_create=yes ;;
263
264   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
265   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
266     no_recursion=yes ;;
267
268   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
269   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
270   | --oldin | --oldi | --old | --ol | --o)
271     ac_prev=oldincludedir ;;
272   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
273   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
274   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
275     oldincludedir="$ac_optarg" ;;
276
277   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
278     ac_prev=prefix ;;
279   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
280     prefix="$ac_optarg" ;;
281
282   -program-prefix | --program-prefix | --program-prefi | --program-pref \
283   | --program-pre | --program-pr | --program-p)
284     ac_prev=program_prefix ;;
285   -program-prefix=* | --program-prefix=* | --program-prefi=* \
286   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
287     program_prefix="$ac_optarg" ;;
288
289   -program-suffix | --program-suffix | --program-suffi | --program-suff \
290   | --program-suf | --program-su | --program-s)
291     ac_prev=program_suffix ;;
292   -program-suffix=* | --program-suffix=* | --program-suffi=* \
293   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
294     program_suffix="$ac_optarg" ;;
295
296   -program-transform-name | --program-transform-name \
297   | --program-transform-nam | --program-transform-na \
298   | --program-transform-n | --program-transform- \
299   | --program-transform | --program-transfor \
300   | --program-transfo | --program-transf \
301   | --program-trans | --program-tran \
302   | --progr-tra | --program-tr | --program-t)
303     ac_prev=program_transform_name ;;
304   -program-transform-name=* | --program-transform-name=* \
305   | --program-transform-nam=* | --program-transform-na=* \
306   | --program-transform-n=* | --program-transform-=* \
307   | --program-transform=* | --program-transfor=* \
308   | --program-transfo=* | --program-transf=* \
309   | --program-trans=* | --program-tran=* \
310   | --progr-tra=* | --program-tr=* | --program-t=*)
311     program_transform_name="$ac_optarg" ;;
312
313   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
314   | -silent | --silent | --silen | --sile | --sil)
315     silent=yes ;;
316
317   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
318     ac_prev=sbindir ;;
319   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
320   | --sbi=* | --sb=*)
321     sbindir="$ac_optarg" ;;
322
323   -sharedstatedir | --sharedstatedir | --sharedstatedi \
324   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
325   | --sharedst | --shareds | --shared | --share | --shar \
326   | --sha | --sh)
327     ac_prev=sharedstatedir ;;
328   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
329   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
330   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
331   | --sha=* | --sh=*)
332     sharedstatedir="$ac_optarg" ;;
333
334   -site | --site | --sit)
335     ac_prev=site ;;
336   -site=* | --site=* | --sit=*)
337     site="$ac_optarg" ;;
338
339   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
340     ac_prev=srcdir ;;
341   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
342     srcdir="$ac_optarg" ;;
343
344   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
345   | --syscon | --sysco | --sysc | --sys | --sy)
346     ac_prev=sysconfdir ;;
347   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
348   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
349     sysconfdir="$ac_optarg" ;;
350
351   -target | --target | --targe | --targ | --tar | --ta | --t)
352     ac_prev=target ;;
353   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
354     target="$ac_optarg" ;;
355
356   -v | -verbose | --verbose | --verbos | --verbo | --verb)
357     verbose=yes ;;
358
359   -version | --version | --versio | --versi | --vers)
360     echo "configure generated by autoconf version 2.12.1"
361     exit 0 ;;
362
363   -with-* | --with-*)
364     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
365     # Reject names that are not valid shell variable names.
366     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
367       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368     fi
369     ac_package=`echo $ac_package| sed 's/-/_/g'`
370     case "$ac_option" in
371       *=*) ;;
372       *) ac_optarg=yes ;;
373     esac
374     eval "with_${ac_package}='$ac_optarg'" ;;
375
376   -without-* | --without-*)
377     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
378     # Reject names that are not valid shell variable names.
379     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
380       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
381     fi
382     ac_package=`echo $ac_package| sed 's/-/_/g'`
383     eval "with_${ac_package}=no" ;;
384
385   --x)
386     # Obsolete; use --with-x.
387     with_x=yes ;;
388
389   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
390   | --x-incl | --x-inc | --x-in | --x-i)
391     ac_prev=x_includes ;;
392   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
393   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
394     x_includes="$ac_optarg" ;;
395
396   -x-libraries | --x-libraries | --x-librarie | --x-librari \
397   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
398     ac_prev=x_libraries ;;
399   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
400   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
401     x_libraries="$ac_optarg" ;;
402
403   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
404     ;;
405
406   *)
407     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
408       echo "configure: warning: $ac_option: invalid host type" 1>&2
409     fi
410     if test "x$nonopt" != xNONE; then
411       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
412     fi
413     nonopt="$ac_option"
414     ;;
415
416   esac
417 done
418
419 if test -n "$ac_prev"; then
420   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
421 fi
422
423 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
424
425 # File descriptor usage:
426 # 0 standard input
427 # 1 file creation
428 # 2 errors and warnings
429 # 3 some systems may open it to /dev/tty
430 # 4 used on the Kubota Titan
431 # 6 checking for... messages and results
432 # 5 compiler messages saved in config.log
433 if test "$silent" = yes; then
434   exec 6>/dev/null
435 else
436   exec 6>&1
437 fi
438 exec 5>./config.log
439
440 echo "\
441 This file contains any messages produced by compilers while
442 running configure, to aid debugging if configure makes a mistake.
443 " 1>&5
444
445 # Strip out --no-create and --no-recursion so they do not pile up.
446 # Also quote any args containing shell metacharacters.
447 ac_configure_args=
448 for ac_arg
449 do
450   case "$ac_arg" in
451   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
452   | --no-cr | --no-c) ;;
453   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
454   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
455   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
456   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
457   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
458   esac
459 done
460
461 # NLS nuisances.
462 # Only set these to C if already set.  These must not be set unconditionally
463 # because not all systems understand e.g. LANG=C (notably SCO).
464 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
465 # Non-C LC_CTYPE values break the ctype check.
466 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
467 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
468 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
469 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
470
471 # confdefs.h avoids OS command line length limits that DEFS can exceed.
472 rm -rf conftest* confdefs.h
473 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
474 echo > confdefs.h
475
476 # A filename unique to this package, relative to the directory that
477 # configure is in, which we can look for to find out if srcdir is correct.
478 ac_unique_file=tree.c
479
480 # Find the source files, if location was not specified.
481 if test -z "$srcdir"; then
482   ac_srcdir_defaulted=yes
483   # Try the directory containing this script, then its parent.
484   ac_prog=$0
485   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
486   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
487   srcdir=$ac_confdir
488   if test ! -r $srcdir/$ac_unique_file; then
489     srcdir=..
490   fi
491 else
492   ac_srcdir_defaulted=no
493 fi
494 if test ! -r $srcdir/$ac_unique_file; then
495   if test "$ac_srcdir_defaulted" = yes; then
496     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
497   else
498     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
499   fi
500 fi
501 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
502
503 # Prefer explicitly selected file to automatically selected ones.
504 if test -z "$CONFIG_SITE"; then
505   if test "x$prefix" != xNONE; then
506     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
507   else
508     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
509   fi
510 fi
511 for ac_site_file in $CONFIG_SITE; do
512   if test -r "$ac_site_file"; then
513     echo "loading site script $ac_site_file"
514     . "$ac_site_file"
515   fi
516 done
517
518 if test -r "$cache_file"; then
519   echo "loading cache $cache_file"
520   . $cache_file
521 else
522   echo "creating cache $cache_file"
523   > $cache_file
524 fi
525
526 ac_ext=c
527 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
528 ac_cpp='$CPP $CPPFLAGS'
529 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
530 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
531 cross_compiling=$ac_cv_prog_cc_cross
532
533 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
534   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
535   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
536     ac_n= ac_c='
537 ' ac_t='        '
538   else
539     ac_n=-n ac_c= ac_t=
540   fi
541 else
542   ac_n= ac_c='\c' ac_t=
543 fi
544
545
546
547
548 remove=rm
549 hard_link=ln
550 symbolic_link='ln -s'
551 copy=cp
552
553 # Check for additional parameters
554
555 # With GNU ld
556 # Check whether --with-gnu-ld or --without-gnu-ld was given.
557 if test "${with_gnu_ld+set}" = set; then
558   withval="$with_gnu_ld"
559   gnu_ld_flag="$with_gnu_ld"
560 else
561   gnu_ld_flag=no
562 fi
563
564
565 # With GNU as
566 # Check whether --with-gnu-as or --without-gnu-as was given.
567 if test "${with_gnu_as+set}" = set; then
568   withval="$with_gnu_as"
569   gas_flag="$with_gnu_as"
570 else
571   gas_flag=no
572 fi
573
574
575 # With stabs
576 # Check whether --with-stabs or --without-stabs was given.
577 if test "${with_stabs+set}" = set; then
578   withval="$with_stabs"
579   stabs="$with_stabs"
580 else
581   stabs=no
582 fi
583
584
585 # With ELF
586 # Check whether --with-elf or --without-elf was given.
587 if test "${with_elf+set}" = set; then
588   withval="$with_elf"
589   elf="$with_elf"
590 else
591   elf=no
592 fi
593
594
595 # Specify the local prefix
596 # Check whether --with-local-prefix or --without-local-prefix was given.
597 if test "${with_local_prefix+set}" = set; then
598   withval="$with_local_prefix"
599   local_prefix=$with_local_prefix
600 else
601   local_prefix=/usr/local
602 fi
603
604
605 # Default local prefix if it is empty
606 if [ x$local_prefix = x ]; then
607         local_prefix=/usr/local
608 fi
609
610 # Specify the g++ header file directory
611 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
612 if test "${with_gxx_include_dir+set}" = set; then
613   withval="$with_gxx_include_dir"
614   gxx_include_dir=$with_gxx_include_dir
615 else
616   gxx_include_dir='${prefix}/include/g++'
617 fi
618
619
620 # Default g++ header file directory if it is empty
621 if [ x$gxx_include_dir = x ]; then
622         gxx_include_dir='${prefix}/include/g++'
623 fi
624
625 # Enable use of cpplib for C.
626 # Check whether --enable-c-cpplib or --disable-c-cpplib was given.
627 if test "${enable_c_cpplib+set}" = set; then
628   enableval="$enable_c_cpplib"
629   if [ x$enable_c_cpplib != xno ]; then
630   extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
631   extra_c_flags=-DUSE_CPPLIB=1
632 fi
633 fi
634
635   
636 # Enable Haifa scheduler.
637 # Check whether --enable-haifa or --disable-haifa was given.
638 if test "${enable_haifa+set}" = set; then
639   enableval="$enable_haifa"
640   :
641 fi
642
643 # Fast fixincludes
644 #
645 # This is a work in progress...
646 # Check whether --with-fast-fixincludes or --without-fast-fixincludes was given.
647 if test "${with_fast_fixincludes+set}" = set; then
648   withval="$with_fast_fixincludes"
649   fast_fixinc="$with_fast_fixincludes"
650 else
651   fast_fixinc=no
652 fi
653
654
655 # Enable threads
656 # Pass with no value to take the default
657 # Pass with a value to specify a thread package
658 # Check whether --enable-threads or --disable-threads was given.
659 if test "${enable_threads+set}" = set; then
660   enableval="$enable_threads"
661   if [ x$enable_threads = xno ]; then
662         enable_threads=''
663 fi
664 else
665   enable_threads=''
666 fi
667
668
669 # Check if a valid thread package
670 case x${enable_threads} in
671         x | xno)
672                 # No threads
673                 target_thread_file='single'
674                 ;;
675         xyes)
676                 # default
677                 target_thread_file=''
678                 ;;
679         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
680         xsolaris | xwin32 | xdce | xvxworks)
681                 target_thread_file=$enable_threads
682                 ;;
683         *)
684                 echo "$enable_threads is an unknown thread package" 1>&2
685                 exit 1
686                 ;;
687 esac
688
689 # Determine the host, build, and target systems
690 ac_aux_dir=
691 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
692   if test -f $ac_dir/install-sh; then
693     ac_aux_dir=$ac_dir
694     ac_install_sh="$ac_aux_dir/install-sh -c"
695     break
696   elif test -f $ac_dir/install.sh; then
697     ac_aux_dir=$ac_dir
698     ac_install_sh="$ac_aux_dir/install.sh -c"
699     break
700   fi
701 done
702 if test -z "$ac_aux_dir"; then
703   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
704 fi
705 ac_config_guess=$ac_aux_dir/config.guess
706 ac_config_sub=$ac_aux_dir/config.sub
707 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
708
709
710 # Do some error checking and defaulting for the host and target type.
711 # The inputs are:
712 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
713 #
714 # The rules are:
715 # 1. You are not allowed to specify --host, --target, and nonopt at the
716 #    same time.
717 # 2. Host defaults to nonopt.
718 # 3. If nonopt is not specified, then host defaults to the current host,
719 #    as determined by config.guess.
720 # 4. Target and build default to nonopt.
721 # 5. If nonopt is not specified, then target and build default to host.
722
723 # The aliases save the names the user supplied, while $host etc.
724 # will get canonicalized.
725 case $host---$target---$nonopt in
726 NONE---*---* | *---NONE---* | *---*---NONE) ;;
727 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
728 esac
729
730
731 # Make sure we can run config.sub.
732 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
733 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734 fi
735
736 echo $ac_n "checking host system type""... $ac_c" 1>&6
737 echo "configure:738: checking host system type" >&5
738
739 host_alias=$host
740 case "$host_alias" in
741 NONE)
742   case $nonopt in
743   NONE)
744     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
745     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
746     fi ;;
747   *) host_alias=$nonopt ;;
748   esac ;;
749 esac
750
751 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
752 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
753 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
754 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
755 echo "$ac_t""$host" 1>&6
756
757 echo $ac_n "checking target system type""... $ac_c" 1>&6
758 echo "configure:759: checking target system type" >&5
759
760 target_alias=$target
761 case "$target_alias" in
762 NONE)
763   case $nonopt in
764   NONE) target_alias=$host_alias ;;
765   *) target_alias=$nonopt ;;
766   esac ;;
767 esac
768
769 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
770 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
771 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
772 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
773 echo "$ac_t""$target" 1>&6
774
775 echo $ac_n "checking build system type""... $ac_c" 1>&6
776 echo "configure:777: checking build system type" >&5
777
778 build_alias=$build
779 case "$build_alias" in
780 NONE)
781   case $nonopt in
782   NONE) build_alias=$host_alias ;;
783   *) build_alias=$nonopt ;;
784   esac ;;
785 esac
786
787 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
788 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 echo "$ac_t""$build" 1>&6
792
793 test "$host_alias" != "$target_alias" &&
794   test "$program_prefix$program_suffix$program_transform_name" = \
795     NONENONEs,x,x, &&
796   program_prefix=${target_alias}-
797
798
799 # Find the native compiler
800 # Extract the first word of "gcc", so it can be a program name with args.
801 set dummy gcc; ac_word=$2
802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
803 echo "configure:804: checking for $ac_word" >&5
804 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
805   echo $ac_n "(cached) $ac_c" 1>&6
806 else
807   if test -n "$CC"; then
808   ac_cv_prog_CC="$CC" # Let the user override the test.
809 else
810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
811   for ac_dir in $PATH; do
812     test -z "$ac_dir" && ac_dir=.
813     if test -f $ac_dir/$ac_word; then
814       ac_cv_prog_CC="gcc"
815       break
816     fi
817   done
818   IFS="$ac_save_ifs"
819 fi
820 fi
821 CC="$ac_cv_prog_CC"
822 if test -n "$CC"; then
823   echo "$ac_t""$CC" 1>&6
824 else
825   echo "$ac_t""no" 1>&6
826 fi
827
828 if test -z "$CC"; then
829   # Extract the first word of "cc", so it can be a program name with args.
830 set dummy cc; ac_word=$2
831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
832 echo "configure:833: checking for $ac_word" >&5
833 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836   if test -n "$CC"; then
837   ac_cv_prog_CC="$CC" # Let the user override the test.
838 else
839   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
840   ac_prog_rejected=no
841   for ac_dir in $PATH; do
842     test -z "$ac_dir" && ac_dir=.
843     if test -f $ac_dir/$ac_word; then
844       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
845         ac_prog_rejected=yes
846         continue
847       fi
848       ac_cv_prog_CC="cc"
849       break
850     fi
851   done
852   IFS="$ac_save_ifs"
853 if test $ac_prog_rejected = yes; then
854   # We found a bogon in the path, so make sure we never use it.
855   set dummy $ac_cv_prog_CC
856   shift
857   if test $# -gt 0; then
858     # We chose a different compiler from the bogus one.
859     # However, it has the same basename, so the bogon will be chosen
860     # first if we set CC to just the basename; use the full file name.
861     shift
862     set dummy "$ac_dir/$ac_word" "$@"
863     shift
864     ac_cv_prog_CC="$@"
865   fi
866 fi
867 fi
868 fi
869 CC="$ac_cv_prog_CC"
870 if test -n "$CC"; then
871   echo "$ac_t""$CC" 1>&6
872 else
873   echo "$ac_t""no" 1>&6
874 fi
875
876   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
877 fi
878
879 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
880 echo "configure:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
881
882 ac_ext=c
883 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
884 ac_cpp='$CPP $CPPFLAGS'
885 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
886 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
887 cross_compiling=$ac_cv_prog_cc_cross
888
889 cat > conftest.$ac_ext <<EOF
890 #line 891 "configure"
891 #include "confdefs.h"
892 main(){return(0);}
893 EOF
894 if { (eval echo configure:895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
895   ac_cv_prog_cc_works=yes
896   # If we can't run a trivial program, we are probably using a cross compiler.
897   if (./conftest; exit) 2>/dev/null; then
898     ac_cv_prog_cc_cross=no
899   else
900     ac_cv_prog_cc_cross=yes
901   fi
902 else
903   echo "configure: failed program was:" >&5
904   cat conftest.$ac_ext >&5
905   ac_cv_prog_cc_works=no
906 fi
907 rm -fr conftest*
908
909 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
910 if test $ac_cv_prog_cc_works = no; then
911   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
912 fi
913 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
914 echo "configure:915: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
915 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
916 cross_compiling=$ac_cv_prog_cc_cross
917
918 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
919 echo "configure:920: checking whether we are using GNU C" >&5
920 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
921   echo $ac_n "(cached) $ac_c" 1>&6
922 else
923   cat > conftest.c <<EOF
924 #ifdef __GNUC__
925   yes;
926 #endif
927 EOF
928 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
929   ac_cv_prog_gcc=yes
930 else
931   ac_cv_prog_gcc=no
932 fi
933 fi
934
935 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
936
937 if test $ac_cv_prog_gcc = yes; then
938   GCC=yes
939   ac_test_CFLAGS="${CFLAGS+set}"
940   ac_save_CFLAGS="$CFLAGS"
941   CFLAGS=
942   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
943 echo "configure:944: checking whether ${CC-cc} accepts -g" >&5
944 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
945   echo $ac_n "(cached) $ac_c" 1>&6
946 else
947   echo 'void f(){}' > conftest.c
948 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
949   ac_cv_prog_cc_g=yes
950 else
951   ac_cv_prog_cc_g=no
952 fi
953 rm -f conftest*
954
955 fi
956
957 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
958   if test "$ac_test_CFLAGS" = set; then
959     CFLAGS="$ac_save_CFLAGS"
960   elif test $ac_cv_prog_cc_g = yes; then
961     CFLAGS="-g -O2"
962   else
963     CFLAGS="-O2"
964   fi
965 else
966   GCC=
967   test "${CFLAGS+set}" = set || CFLAGS="-g"
968 fi
969
970 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
971 echo "configure:972: checking whether ${MAKE-make} sets \${MAKE}" >&5
972 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
973 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
974   echo $ac_n "(cached) $ac_c" 1>&6
975 else
976   cat > conftestmake <<\EOF
977 all:
978         @echo 'ac_maketemp="${MAKE}"'
979 EOF
980 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
981 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
982 if test -n "$ac_maketemp"; then
983   eval ac_cv_prog_make_${ac_make}_set=yes
984 else
985   eval ac_cv_prog_make_${ac_make}_set=no
986 fi
987 rm -f conftestmake
988 fi
989 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
990   echo "$ac_t""yes" 1>&6
991   SET_MAKE=
992 else
993   echo "$ac_t""no" 1>&6
994   SET_MAKE="MAKE=${MAKE-make}"
995 fi
996
997
998 # Find some useful tools
999 for ac_prog in mawk gawk nawk awk
1000 do
1001 # Extract the first word of "$ac_prog", so it can be a program name with args.
1002 set dummy $ac_prog; ac_word=$2
1003 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1004 echo "configure:1005: checking for $ac_word" >&5
1005 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1006   echo $ac_n "(cached) $ac_c" 1>&6
1007 else
1008   if test -n "$AWK"; then
1009   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1010 else
1011   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1012   for ac_dir in $PATH; do
1013     test -z "$ac_dir" && ac_dir=.
1014     if test -f $ac_dir/$ac_word; then
1015       ac_cv_prog_AWK="$ac_prog"
1016       break
1017     fi
1018   done
1019   IFS="$ac_save_ifs"
1020 fi
1021 fi
1022 AWK="$ac_cv_prog_AWK"
1023 if test -n "$AWK"; then
1024   echo "$ac_t""$AWK" 1>&6
1025 else
1026   echo "$ac_t""no" 1>&6
1027 fi
1028
1029 test -n "$AWK" && break
1030 done
1031
1032 # Extract the first word of "flex", so it can be a program name with args.
1033 set dummy flex; ac_word=$2
1034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1035 echo "configure:1036: checking for $ac_word" >&5
1036 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039   if test -n "$LEX"; then
1040   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1041 else
1042   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1043   for ac_dir in $PATH; do
1044     test -z "$ac_dir" && ac_dir=.
1045     if test -f $ac_dir/$ac_word; then
1046       ac_cv_prog_LEX="flex"
1047       break
1048     fi
1049   done
1050   IFS="$ac_save_ifs"
1051   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1052 fi
1053 fi
1054 LEX="$ac_cv_prog_LEX"
1055 if test -n "$LEX"; then
1056   echo "$ac_t""$LEX" 1>&6
1057 else
1058   echo "$ac_t""no" 1>&6
1059 fi
1060
1061 if test -z "$LEXLIB"
1062 then
1063   case "$LEX" in
1064   flex*) ac_lib=fl ;;
1065   *) ac_lib=l ;;
1066   esac
1067   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1068 echo "configure:1069: checking for yywrap in -l$ac_lib" >&5
1069 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073   ac_save_LIBS="$LIBS"
1074 LIBS="-l$ac_lib  $LIBS"
1075 cat > conftest.$ac_ext <<EOF
1076 #line 1077 "configure"
1077 #include "confdefs.h"
1078 /* Override any gcc2 internal prototype to avoid an error.  */
1079 /* We use char because int might match the return type of a gcc2
1080     builtin and then its argument prototype would still apply.  */
1081 char yywrap();
1082
1083 int main() {
1084 yywrap()
1085 ; return 0; }
1086 EOF
1087 if { (eval echo configure:1088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1088   rm -rf conftest*
1089   eval "ac_cv_lib_$ac_lib_var=yes"
1090 else
1091   echo "configure: failed program was:" >&5
1092   cat conftest.$ac_ext >&5
1093   rm -rf conftest*
1094   eval "ac_cv_lib_$ac_lib_var=no"
1095 fi
1096 rm -f conftest*
1097 LIBS="$ac_save_LIBS"
1098
1099 fi
1100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1101   echo "$ac_t""yes" 1>&6
1102   LEXLIB="-l$ac_lib"
1103 else
1104   echo "$ac_t""no" 1>&6
1105 fi
1106
1107 fi
1108
1109 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1110 echo "configure:1111: checking whether ln works" >&5
1111 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1112   echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114   rm -f conftestdata_t
1115 echo >conftestdata_f
1116 if ln conftestdata_f conftestdata_t 2>/dev/null
1117 then
1118   gcc_cv_prog_LN="ln"
1119 else
1120   if ln -s conftestdata_f conftestdata_t 2>/dev/null
1121   then
1122     gcc_cv_prog_LN="ln -s"
1123   else
1124     gcc_cv_prog_LN=cp
1125   fi
1126 fi
1127 rm -f conftestdata_f conftestdata_t
1128
1129 fi
1130 LN="$gcc_cv_prog_LN"
1131 if test "$gcc_cv_prog_LN" = "ln"; then
1132   echo "$ac_t""yes" 1>&6
1133 else
1134   if test "$gcc_cv_prog_LN" = "ln -s"; then
1135     echo "$ac_t""no, using ln -s" 1>&6
1136   else
1137     echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1138   fi
1139 fi
1140
1141 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1142 echo "configure:1143: checking whether ln -s works" >&5
1143 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1144   echo $ac_n "(cached) $ac_c" 1>&6
1145 else
1146   rm -f conftestdata_t
1147 echo >conftestdata_f
1148 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1149 then
1150   gcc_cv_prog_LN_S="ln -s"
1151 else
1152   if ln conftestdata_f conftestdata_t 2>/dev/null
1153   then
1154     gcc_cv_prog_LN_S=ln
1155   else
1156     gcc_cv_prog_LN_S=cp
1157   fi
1158 fi
1159 rm -f conftestdata_f conftestdata_t
1160
1161 fi
1162 LN_S="$gcc_cv_prog_LN_S"
1163 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1164   echo "$ac_t""yes" 1>&6
1165 else
1166   if test "$gcc_cv_prog_LN_S" = "ln"; then
1167     echo "$ac_t""no, using ln" 1>&6
1168   else
1169     echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1170   fi
1171 fi
1172
1173 # Extract the first word of "ranlib", so it can be a program name with args.
1174 set dummy ranlib; ac_word=$2
1175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1176 echo "configure:1177: checking for $ac_word" >&5
1177 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1178   echo $ac_n "(cached) $ac_c" 1>&6
1179 else
1180   if test -n "$RANLIB"; then
1181   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1182 else
1183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1184   for ac_dir in $PATH; do
1185     test -z "$ac_dir" && ac_dir=.
1186     if test -f $ac_dir/$ac_word; then
1187       ac_cv_prog_RANLIB="ranlib"
1188       break
1189     fi
1190   done
1191   IFS="$ac_save_ifs"
1192   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1193 fi
1194 fi
1195 RANLIB="$ac_cv_prog_RANLIB"
1196 if test -n "$RANLIB"; then
1197   echo "$ac_t""$RANLIB" 1>&6
1198 else
1199   echo "$ac_t""no" 1>&6
1200 fi
1201
1202 for ac_prog in 'bison -y' byacc
1203 do
1204 # Extract the first word of "$ac_prog", so it can be a program name with args.
1205 set dummy $ac_prog; ac_word=$2
1206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1207 echo "configure:1208: checking for $ac_word" >&5
1208 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   if test -n "$YACC"; then
1212   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1213 else
1214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1215   for ac_dir in $PATH; do
1216     test -z "$ac_dir" && ac_dir=.
1217     if test -f $ac_dir/$ac_word; then
1218       ac_cv_prog_YACC="$ac_prog"
1219       break
1220     fi
1221   done
1222   IFS="$ac_save_ifs"
1223 fi
1224 fi
1225 YACC="$ac_cv_prog_YACC"
1226 if test -n "$YACC"; then
1227   echo "$ac_t""$YACC" 1>&6
1228 else
1229   echo "$ac_t""no" 1>&6
1230 fi
1231
1232 test -n "$YACC" && break
1233 done
1234 test -n "$YACC" || YACC="yacc"
1235
1236 # Find a good install program.  We prefer a C program (faster),
1237 # so one script is as good as another.  But avoid the broken or
1238 # incompatible versions:
1239 # SysV /etc/install, /usr/sbin/install
1240 # SunOS /usr/etc/install
1241 # IRIX /sbin/install
1242 # AIX /bin/install
1243 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1244 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1245 # ./install, which can be erroneously created by make from ./install.sh.
1246 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1247 echo "configure:1248: checking for a BSD compatible install" >&5
1248 if test -z "$INSTALL"; then
1249 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1250   echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1253   for ac_dir in $PATH; do
1254     # Account for people who put trailing slashes in PATH elements.
1255     case "$ac_dir/" in
1256     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1257     *)
1258       # OSF1 and SCO ODT 3.0 have their own names for install.
1259       for ac_prog in ginstall scoinst install; do
1260         if test -f $ac_dir/$ac_prog; then
1261           if test $ac_prog = install &&
1262             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1263             # AIX install.  It has an incompatible calling convention.
1264             # OSF/1 installbsd also uses dspmsg, but is usable.
1265             :
1266           else
1267             ac_cv_path_install="$ac_dir/$ac_prog -c"
1268             break 2
1269           fi
1270         fi
1271       done
1272       ;;
1273     esac
1274   done
1275   IFS="$ac_save_IFS"
1276
1277 fi
1278   if test "${ac_cv_path_install+set}" = set; then
1279     INSTALL="$ac_cv_path_install"
1280   else
1281     # As a last resort, use the slow shell script.  We don't cache a
1282     # path for INSTALL within a source directory, because that will
1283     # break other packages using the cache if that directory is
1284     # removed, or if the path is relative.
1285     INSTALL="$ac_install_sh"
1286   fi
1287 fi
1288 echo "$ac_t""$INSTALL" 1>&6
1289
1290 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1291 # It thinks the first close brace ends the variable substitution.
1292 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1293
1294 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1295
1296
1297 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1298 echo "configure:1299: checking how to run the C preprocessor" >&5
1299 # On Suns, sometimes $CPP names a directory.
1300 if test -n "$CPP" && test -d "$CPP"; then
1301   CPP=
1302 fi
1303 if test -z "$CPP"; then
1304 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307     # This must be in double quotes, not single quotes, because CPP may get
1308   # substituted into the Makefile and "${CC-cc}" will confuse make.
1309   CPP="${CC-cc} -E"
1310   # On the NeXT, cc -E runs the code through the compiler's parser,
1311   # not just through cpp.
1312   cat > conftest.$ac_ext <<EOF
1313 #line 1314 "configure"
1314 #include "confdefs.h"
1315 #include <assert.h>
1316 Syntax Error
1317 EOF
1318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1319 { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1320 ac_err=`grep -v '^ *+' conftest.out`
1321 if test -z "$ac_err"; then
1322   :
1323 else
1324   echo "$ac_err" >&5
1325   echo "configure: failed program was:" >&5
1326   cat conftest.$ac_ext >&5
1327   rm -rf conftest*
1328   CPP="${CC-cc} -E -traditional-cpp"
1329   cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1332 #include <assert.h>
1333 Syntax Error
1334 EOF
1335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1336 { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1337 ac_err=`grep -v '^ *+' conftest.out`
1338 if test -z "$ac_err"; then
1339   :
1340 else
1341   echo "$ac_err" >&5
1342   echo "configure: failed program was:" >&5
1343   cat conftest.$ac_ext >&5
1344   rm -rf conftest*
1345   CPP=/lib/cpp
1346 fi
1347 rm -f conftest*
1348 fi
1349 rm -f conftest*
1350   ac_cv_prog_CPP="$CPP"
1351 fi
1352   CPP="$ac_cv_prog_CPP"
1353 else
1354   ac_cv_prog_CPP="$CPP"
1355 fi
1356 echo "$ac_t""$CPP" 1>&6
1357
1358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1359 echo "configure:1360: checking for ANSI C header files" >&5
1360 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1361   echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363   cat > conftest.$ac_ext <<EOF
1364 #line 1365 "configure"
1365 #include "confdefs.h"
1366 #include <stdlib.h>
1367 #include <stdarg.h>
1368 #include <string.h>
1369 #include <float.h>
1370 EOF
1371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1372 { (eval echo configure:1373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1373 ac_err=`grep -v '^ *+' conftest.out`
1374 if test -z "$ac_err"; then
1375   rm -rf conftest*
1376   ac_cv_header_stdc=yes
1377 else
1378   echo "$ac_err" >&5
1379   echo "configure: failed program was:" >&5
1380   cat conftest.$ac_ext >&5
1381   rm -rf conftest*
1382   ac_cv_header_stdc=no
1383 fi
1384 rm -f conftest*
1385
1386 if test $ac_cv_header_stdc = yes; then
1387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1388 cat > conftest.$ac_ext <<EOF
1389 #line 1390 "configure"
1390 #include "confdefs.h"
1391 #include <string.h>
1392 EOF
1393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1394   egrep "memchr" >/dev/null 2>&1; then
1395   :
1396 else
1397   rm -rf conftest*
1398   ac_cv_header_stdc=no
1399 fi
1400 rm -f conftest*
1401
1402 fi
1403
1404 if test $ac_cv_header_stdc = yes; then
1405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1406 cat > conftest.$ac_ext <<EOF
1407 #line 1408 "configure"
1408 #include "confdefs.h"
1409 #include <stdlib.h>
1410 EOF
1411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1412   egrep "free" >/dev/null 2>&1; then
1413   :
1414 else
1415   rm -rf conftest*
1416   ac_cv_header_stdc=no
1417 fi
1418 rm -f conftest*
1419
1420 fi
1421
1422 if test $ac_cv_header_stdc = yes; then
1423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1424 if test "$cross_compiling" = yes; then
1425   :
1426 else
1427   cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 #include <ctype.h>
1431 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1432 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1433 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1434 int main () { int i; for (i = 0; i < 256; i++)
1435 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1436 exit (0); }
1437
1438 EOF
1439 if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1440 then
1441   :
1442 else
1443   echo "configure: failed program was:" >&5
1444   cat conftest.$ac_ext >&5
1445   rm -fr conftest*
1446   ac_cv_header_stdc=no
1447 fi
1448 rm -fr conftest*
1449 fi
1450
1451 fi
1452 fi
1453
1454 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1455 if test $ac_cv_header_stdc = yes; then
1456   cat >> confdefs.h <<\EOF
1457 #define STDC_HEADERS 1
1458 EOF
1459
1460 fi
1461
1462 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1463 echo "configure:1464: checking whether time.h and sys/time.h may both be included" >&5
1464 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1465   echo $ac_n "(cached) $ac_c" 1>&6
1466 else
1467   cat > conftest.$ac_ext <<EOF
1468 #line 1469 "configure"
1469 #include "confdefs.h"
1470 #include <sys/types.h>
1471 #include <sys/time.h>
1472 #include <time.h>
1473 int main() {
1474 struct tm *tp;
1475 ; return 0; }
1476 EOF
1477 if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1478   rm -rf conftest*
1479   ac_cv_header_time=yes
1480 else
1481   echo "configure: failed program was:" >&5
1482   cat conftest.$ac_ext >&5
1483   rm -rf conftest*
1484   ac_cv_header_time=no
1485 fi
1486 rm -f conftest*
1487 fi
1488
1489 echo "$ac_t""$ac_cv_header_time" 1>&6
1490 if test $ac_cv_header_time = yes; then
1491   cat >> confdefs.h <<\EOF
1492 #define TIME_WITH_SYS_TIME 1
1493 EOF
1494
1495 fi
1496
1497 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h wait.h sys/wait.h
1498 do
1499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1501 echo "configure:1502: checking for $ac_hdr" >&5
1502 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508 #include <$ac_hdr>
1509 EOF
1510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1511 { (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1512 ac_err=`grep -v '^ *+' conftest.out`
1513 if test -z "$ac_err"; then
1514   rm -rf conftest*
1515   eval "ac_cv_header_$ac_safe=yes"
1516 else
1517   echo "$ac_err" >&5
1518   echo "configure: failed program was:" >&5
1519   cat conftest.$ac_ext >&5
1520   rm -rf conftest*
1521   eval "ac_cv_header_$ac_safe=no"
1522 fi
1523 rm -f conftest*
1524 fi
1525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1526   echo "$ac_t""yes" 1>&6
1527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1528   cat >> confdefs.h <<EOF
1529 #define $ac_tr_hdr 1
1530 EOF
1531  
1532 else
1533   echo "$ac_t""no" 1>&6
1534 fi
1535 done
1536
1537
1538 # Check for thread headers.
1539 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
1540 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
1541 echo "configure:1542: checking for thread.h" >&5
1542 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1543   echo $ac_n "(cached) $ac_c" 1>&6
1544 else
1545   cat > conftest.$ac_ext <<EOF
1546 #line 1547 "configure"
1547 #include "confdefs.h"
1548 #include <thread.h>
1549 EOF
1550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1551 { (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1552 ac_err=`grep -v '^ *+' conftest.out`
1553 if test -z "$ac_err"; then
1554   rm -rf conftest*
1555   eval "ac_cv_header_$ac_safe=yes"
1556 else
1557   echo "$ac_err" >&5
1558   echo "configure: failed program was:" >&5
1559   cat conftest.$ac_ext >&5
1560   rm -rf conftest*
1561   eval "ac_cv_header_$ac_safe=no"
1562 fi
1563 rm -f conftest*
1564 fi
1565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1566   echo "$ac_t""yes" 1>&6
1567   have_thread_h=yes
1568 else
1569   echo "$ac_t""no" 1>&6
1570 have_thread_h=
1571 fi
1572
1573 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
1574 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
1575 echo "configure:1576: checking for pthread.h" >&5
1576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1577   echo $ac_n "(cached) $ac_c" 1>&6
1578 else
1579   cat > conftest.$ac_ext <<EOF
1580 #line 1581 "configure"
1581 #include "confdefs.h"
1582 #include <pthread.h>
1583 EOF
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out`
1587 if test -z "$ac_err"; then
1588   rm -rf conftest*
1589   eval "ac_cv_header_$ac_safe=yes"
1590 else
1591   echo "$ac_err" >&5
1592   echo "configure: failed program was:" >&5
1593   cat conftest.$ac_ext >&5
1594   rm -rf conftest*
1595   eval "ac_cv_header_$ac_safe=no"
1596 fi
1597 rm -f conftest*
1598 fi
1599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1600   echo "$ac_t""yes" 1>&6
1601   have_pthread_h=yes
1602 else
1603   echo "$ac_t""no" 1>&6
1604 have_pthread_h=
1605 fi
1606
1607
1608 # See if the system preprocessor understands the ANSI C preprocessor
1609 # stringification operator.
1610 echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
1611 echo "configure:1612: checking whether cpp understands the stringify operator" >&5
1612 if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
1613   echo $ac_n "(cached) $ac_c" 1>&6
1614 else
1615   cat > conftest.$ac_ext <<EOF
1616 #line 1617 "configure"
1617 #include "confdefs.h"
1618
1619 int main() {
1620 #define S(x)   #x
1621 char *test = S(foo);
1622 ; return 0; }
1623 EOF
1624 if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1625   rm -rf conftest*
1626   gcc_cv_c_have_stringify=yes
1627 else
1628   echo "configure: failed program was:" >&5
1629   cat conftest.$ac_ext >&5
1630   rm -rf conftest*
1631   gcc_cv_c_have_stringify=no
1632 fi
1633 rm -f conftest*
1634 fi
1635
1636 echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
1637 if test $gcc_cv_c_have_stringify = yes; then
1638   cat >> confdefs.h <<\EOF
1639 #define HAVE_CPP_STRINGIFY 1
1640 EOF
1641
1642 fi
1643
1644 # Use <inttypes.h> only if it exists,
1645 # doesn't clash with <sys/types.h>, and declares intmax_t.
1646 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
1647 echo "configure:1648: checking for inttypes.h" >&5
1648 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
1649   echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651   cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654 #include <sys/types.h>
1655 #include <inttypes.h>
1656 int main() {
1657 intmax_t i = -1;
1658 ; return 0; }
1659 EOF
1660 if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1661   rm -rf conftest*
1662   cat >> confdefs.h <<EOF
1663 #define HAVE_INTTYPES_H 1
1664 EOF
1665
1666    gcc_cv_header_inttypes_h=yes
1667 else
1668   echo "configure: failed program was:" >&5
1669   cat conftest.$ac_ext >&5
1670   rm -rf conftest*
1671   gcc_cv_header_inttypes_h=no
1672 fi
1673 rm -f conftest*
1674 fi
1675
1676 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
1677
1678 for ac_func in strtoul bsearch strerror putenv popen vprintf bcopy bzero bcmp \
1679         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq sysconf
1680 do
1681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1682 echo "configure:1683: checking for $ac_func" >&5
1683 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1684   echo $ac_n "(cached) $ac_c" 1>&6
1685 else
1686   cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 /* System header to define __stub macros and hopefully few prototypes,
1690     which can conflict with char $ac_func(); below.  */
1691 #include <assert.h>
1692 /* Override any gcc2 internal prototype to avoid an error.  */
1693 /* We use char because int might match the return type of a gcc2
1694     builtin and then its argument prototype would still apply.  */
1695 char $ac_func();
1696
1697 int main() {
1698
1699 /* The GNU C library defines this for functions which it implements
1700     to always fail with ENOSYS.  Some functions are actually named
1701     something starting with __ and the normal name is an alias.  */
1702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1703 choke me
1704 #else
1705 $ac_func();
1706 #endif
1707
1708 ; return 0; }
1709 EOF
1710 if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1711   rm -rf conftest*
1712   eval "ac_cv_func_$ac_func=yes"
1713 else
1714   echo "configure: failed program was:" >&5
1715   cat conftest.$ac_ext >&5
1716   rm -rf conftest*
1717   eval "ac_cv_func_$ac_func=no"
1718 fi
1719 rm -f conftest*
1720 fi
1721
1722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1723   echo "$ac_t""yes" 1>&6
1724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1725   cat >> confdefs.h <<EOF
1726 #define $ac_tr_func 1
1727 EOF
1728  
1729 else
1730   echo "$ac_t""no" 1>&6
1731 fi
1732 done
1733
1734
1735 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
1736 echo "configure:1737: checking whether the printf functions support %p" >&5
1737 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
1738   echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740   if test "$cross_compiling" = yes; then
1741   gcc_cv_func_printf_ptr=no
1742 else
1743   cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 #include <stdio.h>
1747
1748 main()
1749 {
1750   char buf[64];
1751   char *p = buf, *q = NULL;
1752   sprintf(buf, "%p", p);
1753   sscanf(buf, "%p", &q);
1754   exit (p != q);
1755 }
1756 EOF
1757 if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1758 then
1759   gcc_cv_func_printf_ptr=yes
1760 else
1761   echo "configure: failed program was:" >&5
1762   cat conftest.$ac_ext >&5
1763   rm -fr conftest*
1764   gcc_cv_func_printf_ptr=no
1765 fi
1766 rm -fr conftest*
1767 fi
1768
1769 rm -f core core.* *.core
1770 fi
1771
1772 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
1773 if test $gcc_cv_func_printf_ptr = yes ; then
1774   cat >> confdefs.h <<\EOF
1775 #define HOST_PTR_PRINTF "%p"
1776 EOF
1777
1778 fi
1779
1780
1781 for ac_func in malloc realloc calloc free bcopy bzero bcmp \
1782         index rindex getenv atol sbrk abort
1783 do
1784 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
1785 echo "configure:1786: checking whether $ac_func must be declared" >&5
1786 if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
1787   echo $ac_n "(cached) $ac_c" 1>&6
1788 else
1789   cat > conftest.$ac_ext <<EOF
1790 #line 1791 "configure"
1791 #include "confdefs.h"
1792
1793 #include <stdio.h>
1794 #ifdef HAVE_STRING_H
1795 #include <string.h>
1796 #else
1797 #ifdef HAVE_STRINGS_H
1798 #include <strings.h>
1799 #endif
1800 #endif
1801 #ifdef HAVE_STDLIB_H
1802 #include <stdlib.h>
1803 #endif
1804 #ifdef HAVE_UNISTD_H
1805 #include <unistd.h>
1806 #endif
1807 #ifndef HAVE_RINDEX
1808 #define rindex strrchr
1809 #endif
1810 #ifndef HAVE_INDEX
1811 #define index strchr
1812 #endif
1813 int main() {
1814 char *(*pfn) = (char *(*)) $ac_func
1815 ; return 0; }
1816 EOF
1817 if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1818   rm -rf conftest*
1819   eval "gcc_cv_decl_needed_$ac_func=no"
1820 else
1821   echo "configure: failed program was:" >&5
1822   cat conftest.$ac_ext >&5
1823   rm -rf conftest*
1824   eval "gcc_cv_decl_needed_$ac_func=yes"
1825 fi
1826 rm -f conftest*
1827 fi
1828
1829 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
1830   echo "$ac_t""yes" 1>&6
1831   gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1832   cat >> confdefs.h <<EOF
1833 #define $gcc_tr_decl 1
1834 EOF
1835
1836 else
1837   echo "$ac_t""no" 1>&6
1838 fi
1839
1840 done
1841
1842
1843 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
1844 echo "configure:1845: checking for sys_siglist declaration in signal.h or unistd.h" >&5
1845 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
1846   echo $ac_n "(cached) $ac_c" 1>&6
1847 else
1848   cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <sys/types.h>
1852 #include <signal.h>
1853 /* NetBSD declares sys_siglist in unistd.h.  */
1854 #ifdef HAVE_UNISTD_H
1855 #include <unistd.h>
1856 #endif
1857 int main() {
1858 char *msg = *(sys_siglist + 1);
1859 ; return 0; }
1860 EOF
1861 if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1862   rm -rf conftest*
1863   ac_cv_decl_sys_siglist=yes
1864 else
1865   echo "configure: failed program was:" >&5
1866   cat conftest.$ac_ext >&5
1867   rm -rf conftest*
1868   ac_cv_decl_sys_siglist=no
1869 fi
1870 rm -f conftest*
1871 fi
1872
1873 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
1874 if test $ac_cv_decl_sys_siglist = yes; then
1875   cat >> confdefs.h <<\EOF
1876 #define SYS_SIGLIST_DECLARED 1
1877 EOF
1878
1879 fi
1880
1881
1882 # File extensions
1883 manext='.1'
1884 objext='.o'
1885
1886
1887
1888 build_xm_file=
1889 build_xm_defines=
1890 build_install_headers_dir=install-headers-tar
1891 build_exeext=
1892 host_xm_file=
1893 host_xm_defines=
1894 host_xmake_file=
1895 host_truncate_target=
1896 host_exeext=
1897
1898 # Decode the host machine, then the target machine.
1899 # For the host machine, we save the xm_file variable as host_xm_file;
1900 # then we decode the target machine and forget everything else
1901 # that came from the host machine.
1902 for machine in $build $host $target; do
1903
1904         out_file=
1905         xmake_file=
1906         tmake_file=
1907         extra_headers=
1908         extra_passes=
1909         extra_parts=
1910         extra_programs=
1911         extra_objs=
1912         extra_host_objs=
1913         extra_gcc_objs=
1914         xm_defines=
1915         float_format=
1916         # Set this to force installation and use of collect2.
1917         use_collect2=
1918         # Set this to override the default target model.
1919         target_cpu_default=
1920         # Set this to control which fixincludes program to use.
1921         if [ x$fast_fixinc != xyes ] ; then
1922                 fixincludes=fixincludes
1923         else fixincludes=fixinc.sh ; fi
1924         # Set this to control how the header file directory is installed.
1925         install_headers_dir=install-headers-tar
1926         # Set this to a non-empty list of args to pass to cpp if the target
1927         # wants its .md file passed through cpp.
1928         md_cppflags=
1929         # Set this if directory names should be truncated to 14 characters.
1930         truncate_target=
1931         # Set this if gdb needs a dir command with `dirname $out_file`
1932         gdb_needs_out_file_path=
1933         # Set this if the build machine requires executables to have a
1934         # file name suffix.
1935         exeext=
1936         # Set this to control which thread package will be used.
1937         thread_file=
1938         # Reinitialize these from the flag values every loop pass, since some
1939         # configure entries modify them.
1940         gas="$gas_flag"
1941         gnu_ld="$gnu_ld_flag"
1942
1943         # Set default cpu_type, tm_file and xm_file so it can be updated in
1944         # each machine entry.
1945         cpu_type=`echo $machine | sed 's/-.*$//'`
1946         case $machine in
1947         alpha*-*-*)
1948                 cpu_type=alpha
1949                 ;;
1950         arm*-*-*)
1951                 cpu_type=arm
1952                 ;;
1953         c*-convex-*)
1954                 cpu_type=convex
1955                 ;;
1956         i[34567]86-*-*)
1957                 cpu_type=i386
1958                 ;;
1959         hppa*-*-*)
1960                 cpu_type=pa
1961                 ;;
1962         m68000-*-*)
1963                 cpu_type=m68k
1964                 ;;
1965         mips*-*-*)
1966                 cpu_type=mips
1967                 ;;
1968         powerpc*-*-*)
1969                 cpu_type=rs6000
1970                 ;;
1971         pyramid-*-*)
1972                 cpu_type=pyr
1973                 ;;
1974         sparc*-*-*)
1975                 cpu_type=sparc
1976                 ;;
1977         esac
1978
1979         tm_file=${cpu_type}/${cpu_type}.h
1980         xm_file=${cpu_type}/xm-${cpu_type}.h
1981         
1982         # Set the default macros to define for GNU/Linux systems.
1983         case $machine in
1984         *-*-linux-gnu*)
1985                 xm_defines="HAVE_ATEXIT POSIX NO_STAB_H BSTRING"
1986                 ;;
1987         esac
1988
1989         case $machine in
1990         # Support site-specific machine types.
1991         *local*)
1992                 cpu_type=`echo $machine | sed -e 's/-.*//'`
1993                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
1994                 xm_file=${cpu_type}/xm-$rest.h
1995                 tm_file=${cpu_type}/$rest.h
1996                 if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \
1997                 then xmake_file=${cpu_type}/x-$rest; \
1998                 else true; \
1999                 fi
2000                 if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \
2001                 then tmake_file=${cpu_type}/t-$rest; \
2002                 else true; \
2003                 fi
2004                 ;;
2005         1750a-*-*)
2006                 ;;
2007         a29k-*-bsd* | a29k-*-sym1*)
2008                 tm_file="${tm_file} a29k/unix.h"
2009                 xm_defines=USG
2010                 xmake_file=a29k/x-unix
2011                 use_collect2=yes
2012                 ;;
2013         a29k-*-udi | a29k-*-coff)
2014                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
2015                 tmake_file=a29k/t-a29kbare
2016                 ;;
2017         a29k-wrs-vxworks*)
2018                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
2019                 tmake_file=a29k/t-vx29k
2020                 extra_parts="crtbegin.o crtend.o"
2021                 thread_file='vxworks'
2022                 ;;
2023         a29k-*-*)                       # Default a29k environment.
2024                 use_collect2=yes
2025                 ;;
2026         alpha*-*-linux-gnuecoff*)
2027                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
2028                 xm_defines=USE_BFD
2029                 target_cpu_default="MASK_GAS"
2030                 gas=no
2031                 xmake_file=none
2032                 gas=yes gnu_ld=yes
2033                 ;;
2034         alpha*-*-linux-gnulibc1*)
2035                 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
2036                 xm_defines=USE_BFD
2037                 target_cpu_default="MASK_GAS"
2038                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
2039                 extra_parts="crtbegin.o crtend.o"
2040                 xmake_file=none
2041                 gas=yes gnu_ld=yes
2042                 if [ x$enable_threads = xyes ]; then
2043                         thread_file='posix'
2044                 fi
2045                 ;;
2046         alpha*-*-linux-gnu*)
2047                 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
2048                 xm_defines=USE_BFD
2049                 target_cpu_default="MASK_GAS"
2050                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
2051                 extra_parts="crtbegin.o crtend.o"
2052                 xmake_file=none
2053                 fixincludes=Makefile.in
2054                 gas=yes gnu_ld=yes
2055                 if [ x$enable_threads = xyes ]; then
2056                         thread_file='posix'
2057                 fi
2058                 ;;
2059         alpha*-dec-osf*)
2060                 if [ x$stabs = xyes ]
2061                 then
2062                         tm_file="${tm_file} dbx.h"
2063                 fi
2064                 if [ x$gas != xyes ]
2065                 then
2066                         extra_passes="mips-tfile mips-tdump"
2067                 fi
2068                 use_collect2=yes
2069                 case $machine in
2070                   *-*-osf1*)
2071                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
2072                     ;;
2073                   *-*-osf[23]*)
2074                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
2075                     ;;
2076                   *-*-osf4*)
2077                     tm_file="${tm_file} alpha/osf.h"
2078                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
2079                     # a broken tar, so we use cpio instead.
2080                     install_headers_dir=install-headers-cpio
2081                     ;;
2082                 esac
2083                 case $machine in
2084                   *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
2085                     target_cpu_default=MASK_SUPPORT_ARCH
2086                     ;;
2087                 esac
2088                 ;;
2089         alpha*-*-winnt*)
2090                 tm_file="${tm_file} alpha/win-nt.h"
2091                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
2092                 tmake_file=t-libc-ok
2093                 xmake_file=winnt/x-winnt
2094                 extra_host_objs=oldnames.o
2095                 extra_gcc_objs="spawnv.o oldnames.o"
2096                 fixincludes=fixinc.winnt
2097                 if [ x$gnu_ld != xyes ]
2098                 then
2099                         extra_programs=ld.exe
2100                 fi
2101                 if [ x$enable_threads = xyes ]; then
2102                         thread_file='win32'
2103                 fi
2104                 ;;
2105         alpha*-dec-vms*)
2106                 tm_file=alpha/vms.h
2107                 xm_file="${xm_file} alpha/xm-vms.h"
2108                 tmake_file=alpha/t-vms
2109                 fixincludes=Makefile.in
2110                 ;;
2111         arc-*-elf*)
2112                 extra_parts="crtinit.o crtfini.o"
2113                 ;;
2114         arm-*-coff* | armel-*-coff*)
2115                 tm_file=arm/coff.h
2116                 tmake_file=arm/t-bare
2117                 ;;
2118         arm-*-riscix1.[01]*)            # Acorn RISC machine (early versions)
2119                 tm_file=arm/riscix1-1.h
2120                 use_collect2=yes
2121                 ;;
2122         arm-*-riscix*)                  # Acorn RISC machine
2123                 if [ x$gas = xyes ]
2124                 then
2125                     tm_file=arm/rix-gas.h
2126                 else
2127                     tm_file=arm/riscix.h
2128                 fi
2129                 xmake_file=arm/x-riscix
2130                 tmake_file=arm/t-riscix
2131                 use_collect2=yes
2132                 ;;
2133         arm-semi-aout | armel-semi-aout)
2134                 tm_file=arm/semi.h
2135                 tmake_file=arm/t-semi
2136                 fixincludes=Makefile.in # There is nothing to fix
2137                 ;;
2138         arm-semi-aof | armel-semi-aof)
2139                 tm_file=arm/semiaof.h
2140                 tmake_file=arm/t-semiaof
2141                 fixincludes=Makefile.in # There is nothing to fix
2142                 ;;
2143         arm-*-netbsd*)
2144                 tm_file=arm/netbsd.h
2145                 xm_file="xm-siglist.h ${xm_file}"
2146                 tmake_file="t-netbsd arm/t-netbsd"
2147                 # On NetBSD, the headers are already okay, except for math.h.
2148                 fixincludes=fixinc.math
2149                 ;;
2150         arm-*-linux-gnuaout*)           # ARM GNU/Linux
2151                 cpu_type=arm
2152                 xmake_file=x-linux
2153                 tm_file=arm/linux-gas.h
2154                 tmake_file=arm/t-linux
2155                 fixincludes=Makefile.in
2156                 gnu_ld=yes
2157                 ;;
2158         arm-*-aout)
2159                 tm_file=arm/aout.h
2160                 tmake_file=arm/t-bare
2161                 ;;
2162         c1-convex-*)                    # Convex C1
2163                 target_cpu_default=1
2164                 use_collect2=yes
2165                 fixincludes=Makefile.in
2166                 ;;
2167         c2-convex-*)                    # Convex C2
2168                 target_cpu_default=2
2169                 use_collect2=yes
2170                 fixincludes=Makefile.in
2171                 ;;
2172         c32-convex-*)
2173                 target_cpu_default=4
2174                 use_collect2=yes
2175                 fixincludes=Makefile.in
2176                 ;;
2177         c34-convex-*)
2178                 target_cpu_default=8
2179                 use_collect2=yes
2180                 fixincludes=Makefile.in
2181                 ;;
2182         c38-convex-*)
2183                 target_cpu_default=16           
2184                 use_collect2=yes
2185                 fixincludes=Makefile.in
2186                 ;;
2187         clipper-intergraph-clix*)
2188                 tm_file="${tm_file} svr3.h clipper/clix.h"
2189                 xm_file=clipper/xm-clix.h
2190                 xmake_file=clipper/x-clix
2191                 extra_headers=va-clipper.h
2192                 extra_parts="crtbegin.o crtend.o"
2193                 install_headers_dir=install-headers-cpio
2194                 ;;
2195         dsp16xx-*)
2196                 ;;
2197         elxsi-elxsi-*)
2198                 use_collect2=yes
2199                 ;;
2200 # This hasn't been upgraded to GCC 2.
2201 #       fx80-alliant-*)                 # Alliant FX/80
2202 #               ;;
2203         h8300-*-*)
2204                 float_format=i32
2205                 ;;
2206         hppa1.1-*-pro*)
2207                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
2208                 xm_file=pa/xm-papro.h
2209                 tmake_file=pa/t-pro
2210                 ;;
2211         hppa1.1-*-osf*)
2212                 target_cpu_default=1
2213                 tm_file="${tm_file} pa/pa-osf.h"
2214                 use_collect2=yes
2215                 fixincludes=Makefile.in
2216                 ;;
2217         hppa1.1-*-rtems*)
2218                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
2219                 xm_file=pa/xm-papro.h
2220                 tmake_file=pa/t-pro
2221                 ;;
2222         hppa1.0-*-osf*)
2223                 tm_file="${tm_file} pa/pa-osf.h"
2224                 use_collect2=yes
2225                 fixincludes=Makefile.in
2226                 ;;
2227         hppa1.1-*-bsd*)
2228                 target_cpu_default=1
2229                 use_collect2=yes
2230                 fixincludes=Makefile.in
2231                 ;;
2232         hppa1.0-*-bsd*)
2233                 use_collect2=yes
2234                 fixincludes=Makefile.in
2235                 ;;
2236         hppa1.0-*-hpux7*)
2237                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
2238                 xm_file=pa/xm-pahpux.h
2239                 xmake_file=pa/x-pa-hpux
2240                 if [ x$gas = xyes ]
2241                 then
2242                         tm_file="${tm_file} pa/gas.h"
2243                 fi
2244                 install_headers_dir=install-headers-cpio
2245                 use_collect2=yes
2246                 ;;
2247         hppa1.0-*-hpux8.0[0-2]*)
2248                 tm_file="${tm_file} pa/pa-hpux.h"
2249                 xm_file=pa/xm-pahpux.h
2250                 xmake_file=pa/x-pa-hpux
2251                 if [ x$gas = xyes ]
2252                 then
2253                         tm_file="${tm_file} pa/pa-gas.h"
2254                 else
2255                         tm_file="pa/pa-oldas.h ${tm_file}"
2256                 fi
2257                 install_headers_dir=install-headers-cpio
2258                 use_collect2=yes
2259                 ;;
2260         hppa1.1-*-hpux8.0[0-2]*)
2261                 target_cpu_default=1
2262                 tm_file="${tm_file} pa/pa-hpux.h"
2263                 xm_file=pa/xm-pahpux.h
2264                 xmake_file=pa/x-pa-hpux
2265                 if [ x$gas = xyes ]
2266                 then
2267                         tm_file="${tm_file} pa/pa-gas.h"
2268                 else
2269                         tm_file="pa/pa-oldas.h ${tm_file}"
2270                 fi
2271                 install_headers_dir=install-headers-cpio
2272                 use_collect2=yes
2273                 ;;
2274         hppa1.1-*-hpux8*)
2275                 target_cpu_default=1
2276                 tm_file="${tm_file} pa/pa-hpux.h"
2277                 xm_file=pa/xm-pahpux.h
2278                 xmake_file=pa/x-pa-hpux
2279                 if [ x$gas = xyes ]
2280                 then
2281                         tm_file="${tm_file} pa/pa-gas.h"
2282                 fi
2283                 install_headers_dir=install-headers-cpio
2284                 use_collect2=yes
2285                 ;;
2286         hppa1.0-*-hpux8*)
2287                 tm_file="${tm_file} pa/pa-hpux.h"
2288                 xm_file=pa/xm-pahpux.h
2289                 xmake_file=pa/x-pa-hpux
2290                 if [ x$gas = xyes ]
2291                 then
2292                         tm_file="${tm_file} pa/pa-gas.h"
2293                 fi
2294                 install_headers_dir=install-headers-cpio
2295                 use_collect2=yes
2296                 ;;
2297         hppa1.1-*-hpux10*)
2298                 target_cpu_default=1
2299                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
2300                 xm_file=pa/xm-pahpux.h
2301                 xmake_file=pa/x-pa-hpux
2302                 tmake_file=pa/t-pa
2303                 if [ x$gas = xyes ]
2304                 then
2305                         tm_file="${tm_file} pa/pa-gas.h"
2306                 fi
2307                 if [ x$enable_threads = x ]; then
2308                     enable_threads=$have_pthread_h
2309                 fi
2310                 if [ x$enable_threads = xyes ]; then
2311                         thread_file='dce'
2312                         tmake_file="${tmake_file} pa/t-dce-thr"
2313                 fi
2314                 install_headers_dir=install-headers-cpio
2315                 use_collect2=yes
2316                 ;;
2317         hppa1.0-*-hpux10*)
2318                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
2319                 xm_file=pa/xm-pahpux.h
2320                 xmake_file=pa/x-pa-hpux
2321                 if [ x$gas = xyes ]
2322                 then
2323                         tm_file="${tm_file} pa/pa-gas.h"
2324                 fi
2325                 if [ x$enable_threads = x ]; then
2326                     enable_threads=$have_pthread_h
2327                 fi
2328                 if [ x$enable_threads = xyes ]; then
2329                         thread_file='dce'
2330                         tmake_file="${tmake_file} pa/t-dce-thr"
2331                 fi
2332                 install_headers_dir=install-headers-cpio
2333                 use_collect2=yes
2334                 ;;
2335         hppa1.1-*-hpux*)
2336                 target_cpu_default=1
2337                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
2338                 xm_file=pa/xm-pahpux.h
2339                 xmake_file=pa/x-pa-hpux
2340                 if [ x$gas = xyes ]
2341                 then
2342                         tm_file="${tm_file} pa/pa-gas.h"
2343                 fi
2344                 install_headers_dir=install-headers-cpio
2345                 use_collect2=yes
2346                 ;;
2347         hppa1.0-*-hpux*)
2348                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
2349                 xm_file=pa/xm-pahpux.h
2350                 xmake_file=pa/x-pa-hpux
2351                 if [ x$gas = xyes ]
2352                 then
2353                         tm_file="${tm_file} pa/pa-gas.h"
2354                 fi
2355                 install_headers_dir=install-headers-cpio
2356                 use_collect2=yes
2357                 ;;
2358         hppa1.1-*-hiux*)
2359                 target_cpu_default=1
2360                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
2361                 xm_file=pa/xm-pahpux.h
2362                 xmake_file=pa/x-pa-hpux
2363                 if [ x$gas = xyes ]
2364                 then
2365                         tm_file="${tm_file} pa/pa-gas.h"
2366                 fi
2367                 install_headers_dir=install-headers-cpio
2368                 use_collect2=yes
2369                 ;;
2370         hppa1.0-*-hiux*)
2371                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
2372                 xm_file=pa/xm-pahpux.h
2373                 xmake_file=pa/x-pa-hpux
2374                 if [ x$gas = xyes ]
2375                 then
2376                         tm_file="${tm_file} pa/pa-gas.h"
2377                 fi
2378                 install_headers_dir=install-headers-cpio
2379                 use_collect2=yes
2380                 ;;
2381         hppa*-*-lites*)
2382                 target_cpu_default=1
2383                 use_collect2=yes
2384                 fixincludes=Makefile.in
2385                 ;;
2386         i370-*-mvs*)
2387                 ;;
2388         i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
2389                 if [ x$gas = xyes ]
2390                 then
2391                         tm_file=i386/aix386.h
2392                         extra_parts="crtbegin.o crtend.o"
2393                         tmake_file=i386/t-crtstuff
2394                 else
2395                         tm_file=i386/aix386ng.h
2396                         use_collect2=yes
2397                 fi
2398                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
2399                 xm_defines=USG
2400                 xmake_file=i386/x-aix
2401                 ;;
2402         i[34567]86-ncr-sysv4*)  # NCR 3000 - ix86 running system V.4
2403                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
2404                 xm_defines="USG POSIX SMALL_ARG_MAX"
2405                 xmake_file=i386/x-ncr3000
2406                 if [ x$stabs = xyes -a x$gas = xyes ]
2407                 then
2408                         tm_file=i386/sysv4gdb.h
2409                 else
2410                         tm_file=i386/sysv4.h
2411                 fi
2412                 extra_parts="crtbegin.o crtend.o"
2413                 tmake_file=i386/t-crtpic
2414                 ;;
2415         i[34567]86-next-*)
2416                 tm_file=i386/next.h
2417                 xm_file=i386/xm-next.h
2418                 tmake_file=i386/t-next
2419                 xmake_file=i386/x-next
2420                 extra_objs=nextstep.o
2421                 if [ x$enable_threads = xyes ]; then
2422                         thread_file='mach'
2423                 fi
2424                 ;;
2425         i[34567]86-sequent-bsd*)                # 80386 from Sequent
2426                 use_collect2=yes
2427                 if [ x$gas = xyes ]
2428                 then
2429                         tm_file=i386/seq-gas.h
2430                 else
2431                         tm_file=i386/sequent.h
2432                 fi
2433                 ;;
2434         i[34567]86-sequent-ptx1*)
2435                 xm_defines="USG SVR3"
2436                 xmake_file=i386/x-sysv3
2437                 tm_file=i386/seq-sysv3.h
2438                 tmake_file=i386/t-crtstuff
2439                 fixincludes=fixinc.ptx
2440                 extra_parts="crtbegin.o crtend.o"
2441                 install_headers_dir=install-headers-cpio
2442                 ;;
2443         i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
2444                 xm_defines="USG SVR3"
2445                 xmake_file=i386/x-sysv3
2446                 tm_file=i386/seq2-sysv3.h
2447                 tmake_file=i386/t-crtstuff
2448                 extra_parts="crtbegin.o crtend.o"
2449                 fixincludes=fixinc.ptx
2450                 install_headers_dir=install-headers-cpio
2451                 ;;
2452         i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
2453                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
2454                 xm_defines="USG POSIX SMALL_ARG_MAX"
2455                 xmake_file=x-svr4
2456                 tm_file=i386/ptx4-i.h
2457                 tmake_file=t-svr4
2458                 extra_parts="crtbegin.o crtend.o"
2459                 fixincludes=fixinc.ptx
2460                 install_headers_dir=install-headers-cpio
2461                 ;;
2462         i386-sun-sunos*)                # Sun i386 roadrunner
2463                 xm_defines=USG
2464                 tm_file=i386/sun.h
2465                 use_collect2=yes
2466                 ;;
2467         i[34567]86-wrs-vxworks*)
2468                 tm_file=i386/vxi386.h
2469                 tmake_file=i386/t-i386bare
2470                 ;;
2471         i[34567]86-*-aout*)
2472                 tm_file=i386/i386-aout.h
2473                 tmake_file=i386/t-i386bare
2474                 ;;
2475         i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
2476                 tm_file=i386/bsd386.h
2477 #               tmake_file=t-libc-ok
2478                 ;;
2479         i[34567]86-*-bsd*)
2480                 tm_file=i386/386bsd.h
2481 #               tmake_file=t-libc-ok
2482 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
2483 #               use_collect2=yes
2484                 ;;
2485         i[34567]86-*-freebsdelf*)
2486                 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
2487                 # On FreeBSD, the headers are already ok, except for math.h.
2488                 fixincludes=fixinc.math
2489                 tmake_file=i386/t-freebsd
2490                 gas=yes
2491                 gnu_ld=yes
2492                 stabs=yes
2493                 ;;
2494         i[34567]86-*-freebsd*)
2495                 tm_file=i386/freebsd.h
2496                 # On FreeBSD, the headers are already ok, except for math.h.
2497                 fixincludes=fixinc.math
2498                 tmake_file=i386/t-freebsd
2499                 ;;
2500         i[34567]86-*-netbsd*)
2501                 tm_file=i386/netbsd.h
2502                 # On NetBSD, the headers are already okay, except for math.h.
2503                 fixincludes=fixinc.math
2504                 tmake_file=t-netbsd
2505                 ;;
2506         i[34567]86-*-coff*)
2507                 tm_file=i386/i386-coff.h
2508                 tmake_file=i386/t-i386bare
2509                 ;;
2510         i[34567]86-*-isc*)              # 80386 running ISC system
2511                 xm_file="${xm_file} i386/xm-isc.h"
2512                 xm_defines="USG SVR3"
2513                 case $machine in
2514                   i[34567]86-*-isc[34]*)
2515                     xmake_file=i386/x-isc3
2516                     ;;
2517                   *)
2518                     xmake_file=i386/x-isc
2519                     ;;
2520                 esac
2521                 if [ x$gas = xyes -a x$stabs = xyes ]
2522                 then
2523                         tm_file=i386/iscdbx.h
2524                         tmake_file=i386/t-svr3dbx
2525                         extra_parts="svr3.ifile svr3z.ifile"
2526                 else
2527                         tm_file=i386/isccoff.h
2528                         tmake_file=i386/t-crtstuff
2529                         extra_parts="crtbegin.o crtend.o"
2530                 fi
2531                 install_headers_dir=install-headers-cpio
2532                 ;;
2533         i[34567]86-*-linux-gnuoldld*)   # Intel 80386's running GNU/Linux
2534                                         # with a.out format using
2535                                         # pre BFD linkers
2536                 xmake_file=x-linux-aout
2537                 tmake_file="t-linux-aout i386/t-crtstuff"
2538                 tm_file=i386/linux-oldld.h
2539                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2540                 gnu_ld=yes
2541                 ;;
2542         i[34567]86-*-linux-gnuaout*)    # Intel 80386's running GNU/Linux
2543                                         # with a.out format
2544                 xmake_file=x-linux-aout
2545                 tmake_file="t-linux-aout i386/t-crtstuff"
2546                 tm_file=i386/linux-aout.h
2547                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2548                 gnu_ld=yes
2549                 ;;
2550         i[34567]86-*-linux-gnulibc1)    # Intel 80386's running GNU/Linux
2551                                         # with ELF format using the
2552                                         # GNU/Linux C library 5
2553                 xmake_file=x-linux      
2554                 tm_file=i386/linux.h    
2555                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
2556                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2557                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2558                 gnu_ld=yes
2559                 if [ x$enable_threads = xyes ]; then
2560                         thread_file='single'
2561                 fi
2562                 ;;
2563         i[34567]86-*-linux-gnu*)        # Intel 80386's running GNU/Linux
2564                                         # with ELF format using glibc 2
2565                                         # aka GNU/Linux C library 6
2566                 xmake_file=x-linux
2567                 tm_file=i386/linux.h
2568                 tmake_file="t-linux i386/t-crtstuff"
2569                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2570                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2571                 gnu_ld=yes
2572                 if [ x$enable_threads = xyes ]; then
2573                         thread_file='posix'
2574                 fi
2575                 ;;
2576         i[34567]86-*-gnu*)
2577                 ;;
2578         i[34567]86-go32-msdos | i[34567]86-*-go32*)
2579                 xm_file=i386/xm-go32.h
2580                 tm_file=i386/go32.h
2581                 tmake_file=i386/t-go32
2582                 ;;
2583         i[34567]86-pc-msdosdjgpp*)
2584                 xm_file=i386/xm-go32.h
2585                 tm_file=i386/go32.h
2586                 tmake_file=i386/t-go32
2587                 gnu_ld=yes
2588                 gas=yes
2589                 ;;
2590         i[34567]86-moss-msdos* | i[34567]86-*-moss*)
2591                 tm_file=i386/moss.h
2592                 tmake_file=t-libc-ok
2593                 fixincludes=Makefile.in
2594                 gnu_ld=yes
2595                 gas=yes
2596                 ;;
2597         i[34567]86-*-lynxos*)
2598                 if [ x$gas = xyes ]
2599                 then
2600                         tm_file=i386/lynx.h
2601                 else
2602                         tm_file=i386/lynx-ng.h
2603                 fi
2604                 xm_file=i386/xm-lynx.h
2605                 tmake_file=i386/t-i386bare
2606                 xmake_file=x-lynx
2607                 ;;
2608         i[34567]86-*-mach*)
2609                 tm_file=i386/mach.h
2610 #               tmake_file=t-libc-ok
2611                 use_collect2=yes
2612                 ;;
2613         i[34567]86-*-osfrose*)          # 386 using OSF/rose
2614                 if [ x$elf = xyes ]
2615                 then
2616                         tm_file=i386/osfelf.h
2617                         use_collect2=
2618                 else
2619                         tm_file=i386/osfrose.h
2620                         use_collect2=yes
2621                 fi
2622                 xm_file="i386/xm-osf.h ${xm_file}"
2623                 xmake_file=i386/x-osfrose
2624                 tmake_file=i386/t-osf
2625                 extra_objs=halfpic.o
2626                 ;;
2627         i[34567]86-go32-rtems*)
2628                 cpu_type=i386
2629                 xm_file=i386/xm-go32.h
2630                 tm_file=i386/go32-rtems.h
2631                 tmake_file="i386/t-go32 t-rtems"
2632                 ;;
2633         i[34567]86-*-rtems*)
2634                 cpu_type=i386
2635                 tm_file=i386/rtems.h
2636                 tmake_file="i386/t-i386bare t-rtems"
2637                 ;;
2638         i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
2639                 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
2640                 xm_defines="USG SVR3"
2641                 xmake_file=i386/x-sco5
2642                 fixincludes=fixinc.sco
2643                 install_headers_dir=install-headers-cpio
2644                 tm_file=i386/sco5.h
2645                 tmake_file=i386/t-sco5
2646                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2647                 ;;
2648         i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
2649                 xm_file="${xm_file} i386/xm-sco.h"
2650                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
2651                 xmake_file=i386/x-sco4
2652                 fixincludes=fixinc.sco
2653                 install_headers_dir=install-headers-cpio
2654                 if [ x$stabs = xyes ]
2655                 then
2656                         tm_file=i386/sco4dbx.h
2657                         tmake_file=i386/t-svr3dbx
2658                         extra_parts="svr3.ifile svr3z.rfile"
2659                 else
2660                         tm_file=i386/sco4.h
2661                         tmake_file=i386/t-crtstuff
2662                         extra_parts="crtbegin.o crtend.o"
2663                 fi
2664                 truncate_target=yes
2665                 ;;
2666         i[34567]86-*-sco*)              # 80386 running SCO system
2667                 xm_file=i386/xm-sco.h
2668                 xmake_file=i386/x-sco
2669                 install_headers_dir=install-headers-cpio
2670                 if [ x$stabs = xyes ]
2671                 then
2672                         tm_file=i386/scodbx.h
2673                         tmake_file=i386/t-svr3dbx
2674                         extra_parts="svr3.ifile svr3z.rfile"
2675                 else
2676                         tm_file=i386/sco.h
2677                         extra_parts="crtbegin.o crtend.o"
2678                         tmake_file=i386/t-crtstuff
2679                 fi
2680                 truncate_target=yes
2681                 ;;
2682         i[34567]86-*-solaris2*)
2683                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
2684                 xm_defines="USG POSIX SMALL_ARG_MAX"
2685                 if [ x$stabs = xyes ]
2686                 then
2687                         tm_file=i386/sol2dbg.h
2688                 else
2689                         tm_file=i386/sol2.h
2690                 fi
2691                 tmake_file=i386/t-sol2
2692                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2693                 xmake_file=x-svr4
2694                 case $machine in
2695                 *-*-solaris2.[0-4])
2696                         fixincludes=fixinc.svr4;;
2697                 *)
2698                         fixincludes=fixinc.math;;
2699                 esac
2700                 if [ x$enable_threads = xyes ]; then
2701                         thread_file='solaris'
2702                 fi
2703                 ;;
2704        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
2705                xm_file=i386/xm-sysv4.h
2706                tm_file=i386/sysv4.h
2707                if [ x$stabs = xyes ]
2708                then
2709                        tm_file="${tm_file} dbx.h"
2710                fi
2711                tmake_file=i386/t-crtpic
2712                xmake_file=x-svr4
2713                extra_parts="crtbegin.o crtend.o"
2714                fixincludes=Makefile.in # The headers are just fine, thank you.
2715                ;;
2716         i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
2717                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
2718                 xm_defines="USG POSIX SMALL_ARG_MAX"
2719                 tm_file=i386/sysv4.h
2720                 if [ x$stabs = xyes ]
2721                 then
2722                         tm_file="${tm_file} dbx.h"
2723                 fi
2724                 tmake_file=i386/t-crtpic
2725                 xmake_file=x-svr4
2726                 extra_parts="crtbegin.o crtend.o"
2727                 ;;
2728         i[34567]86-*-sysv*)             # Intel 80386's running system V
2729                 xm_defines="USG SVR3"
2730                 xmake_file=i386/x-sysv3
2731                 if [ x$gas = xyes ]
2732                 then
2733                         if [ x$stabs = xyes ]
2734                         then
2735                                 tm_file=i386/svr3dbx.h
2736                                 tmake_file=i386/t-svr3dbx
2737                                 extra_parts="svr3.ifile svr3z.rfile"
2738                         else
2739                                 tm_file=i386/svr3gas.h
2740                                 extra_parts="crtbegin.o crtend.o"
2741                                 tmake_file=i386/t-crtstuff
2742                         fi
2743                 else
2744                         tm_file=i386/sysv3.h
2745                         extra_parts="crtbegin.o crtend.o"
2746                         tmake_file=i386/t-crtstuff
2747                 fi
2748                 ;;
2749         i386-*-vsta)                    # Intel 80386's running VSTa kernel
2750                 xm_file=i386/xm-vsta.h
2751                 tm_file=i386/vsta.h
2752                 tmake_file=i386/t-vsta
2753                 xmake_file=i386/x-vsta
2754                 ;;
2755         i[34567]86-*-pe | i[34567]86-*-cygwin32)
2756                 xm_file="${xm_file} i386/xm-cygwin32.h"
2757                 tmake_file=i386/t-cygwin32
2758                 tm_file=i386/cygwin32.h
2759                 xmake_file=i386/x-cygwin32
2760                 extra_objs=winnt.o
2761                 fixincludes=Makefile.in
2762                 if [ x$enable_threads = xyes ]; then
2763                         thread_file='win32'
2764                 fi
2765                 exeext=.exe
2766                 ;;
2767         i[34567]86-*-mingw32*)
2768                 tm_file=i386/mingw32.h
2769                 xm_file="${xm_file} i386/xm-mingw32.h"
2770                 tmake_file=i386/t-cygwin32
2771                 extra_objs=winnt.o
2772                 xmake_file=i386/x-cygwin32
2773                 fixincludes=Makefile.in
2774                 if [ x$enable_threads = xyes ]; then
2775                         thread_file='win32'
2776                 fi
2777                 exeext=.exe
2778                 case $machine in
2779                         *mingw32msv*)
2780                                 ;;
2781                         *minwg32crt* | *mingw32*)
2782                                 tm_file="${tm_file} i386/crtdll.h"
2783                                 ;;
2784                 esac
2785                 ;;
2786         i[34567]86-*-winnt3*)
2787                 tm_file=i386/win-nt.h
2788                 out_file=i386/i386.c
2789                 xm_file="xm-winnt.h ${xm_file}"
2790                 xmake_file=winnt/x-winnt
2791                 tmake_file=i386/t-winnt
2792                 extra_host_objs="winnt.o oldnames.o"
2793                 extra_gcc_objs="spawnv.o oldnames.o"
2794                 fixincludes=fixinc.winnt
2795                 if [ x$gnu_ld != xyes ]
2796                 then
2797                         extra_programs=ld.exe
2798                 fi
2799                 if [ x$enable_threads = xyes ]; then
2800                         thread_file='win32'
2801                 fi
2802                 ;;
2803         i[34567]86-dg-dgux*)
2804                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
2805                 xm_defines="USG POSIX"
2806                 out_file=i386/dgux.c
2807                 tm_file=i386/dgux.h
2808                 tmake_file=i386/t-dgux
2809                 xmake_file=i386/x-dgux
2810                 fixincludes=fixinc.dgux
2811                 install_headers_dir=install-headers-cpio
2812               ;;
2813         i860-alliant-*)         # Alliant FX/2800
2814                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
2815                 xm_file="${xm_file}"
2816                 xmake_file=i860/x-fx2800
2817                 tmake_file=i860/t-fx2800
2818                 extra_parts="crtbegin.o crtend.o"
2819                 ;;
2820         i860-*-bsd*)
2821                 tm_file="${tm_file} i860/bsd.h"
2822                 if [ x$gas = xyes ]
2823                 then
2824                         tm_file="${tm_file} i860/bsd-gas.h"
2825                 fi
2826                 use_collect2=yes
2827                 ;;
2828         i860-*-mach*)
2829                 tm_file="${tm_file} i860/mach.h"
2830                 tmake_file=t-libc-ok
2831                 ;;
2832         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
2833                 tm_file="${tm_file} svr3.h i860/paragon.h"
2834                 xm_defines="USG SVR3"
2835                 tmake_file=t-osf
2836                 ;;
2837         i860-*-sysv3*)
2838                 tm_file="${tm_file} svr3.h i860/sysv3.h"
2839                 xm_defines="USG SVR3"
2840                 xmake_file=i860/x-sysv3
2841                 extra_parts="crtbegin.o crtend.o"
2842                 ;;
2843         i860-*-sysv4*)
2844                 tm_file="${tm_file} svr4.h i860/sysv4.h"
2845                 xm_defines="USG SVR3"
2846                 xmake_file=i860/x-sysv4
2847                 tmake_file=t-svr4
2848                 extra_parts="crtbegin.o crtend.o"
2849                 ;;
2850         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
2851                 tm_file="${tm_file} i960/vx960.h"
2852                 tmake_file=i960/t-vxworks960
2853                 use_collect2=yes
2854                 thread_file='vxworks'
2855                 ;;
2856         i960-wrs-vxworks5* | i960-wrs-vxworks)
2857                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
2858                 tmake_file=i960/t-vxworks960
2859                 use_collect2=yes
2860                 thread_file='vxworks'
2861                 ;;
2862         i960-wrs-vxworks*)
2863                 tm_file="${tm_file} i960/vx960.h"
2864                 tmake_file=i960/t-vxworks960
2865                 use_collect2=yes
2866                 thread_file='vxworks'
2867                 ;;
2868         i960-*-coff*)
2869                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
2870                 tmake_file=i960/t-960bare
2871                 use_collect2=yes
2872                 ;;
2873         i960-*-rtems)
2874                 tmake_file="i960/t-960bare t-rtems"
2875                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
2876                 use_collect2=yes
2877                 ;;
2878         i960-*-*)                       # Default i960 environment.
2879                 use_collect2=yes
2880                 ;;
2881         m32r-*-elf*)
2882                 extra_parts="crtinit.o crtfini.o"
2883                 ;;
2884         m68000-convergent-sysv*)
2885                 tm_file=m68k/ctix.h
2886                 xm_file="m68k/xm-3b1.h ${xm_file}"
2887                 xm_defines=USG
2888                 use_collect2=yes
2889                 extra_headers=math-68881.h
2890                 ;;
2891         m68000-hp-bsd*)                 # HP 9000/200 running BSD
2892                 tm_file=m68k/hp2bsd.h
2893                 xmake_file=m68k/x-hp2bsd
2894                 use_collect2=yes
2895                 extra_headers=math-68881.h
2896                 ;;
2897         m68000-hp-hpux*)                # HP 9000 series 300
2898                 xm_file="xm_alloca.h ${xm_file}"
2899                 xm_defines="USG NO_SYS_SIGLIST"
2900                 if [ x$gas = xyes ]
2901                 then
2902                         xmake_file=m68k/x-hp320g
2903                         tm_file=m68k/hp310g.h
2904                 else
2905                         xmake_file=m68k/x-hp320
2906                         tm_file=m68k/hp310.h
2907                 fi
2908                 install_headers_dir=install-headers-cpio
2909                 use_collect2=yes
2910                 extra_headers=math-68881.h
2911                 ;;
2912         m68000-sun-sunos3*)
2913                 tm_file=m68k/sun2.h
2914                 use_collect2=yes
2915                 extra_headers=math-68881.h
2916                 ;;
2917         m68000-sun-sunos4*)
2918                 tm_file=m68k/sun2o4.h
2919                 use_collect2=yes
2920                 extra_headers=math-68881.h
2921                 ;;
2922         m68000-att-sysv*)
2923                 xm_file="m68k/xm-3b1.h ${xm_file}"
2924                 xm_defines=USG
2925                 if [ x$gas = xyes ]
2926                 then
2927                         tm_file=m68k/3b1g.h
2928                 else
2929                         tm_file=m68k/3b1.h
2930                 fi
2931                 use_collect2=yes
2932                 extra_headers=math-68881.h
2933                 ;;
2934         m68k-apple-aux*)                # Apple Macintosh running A/UX
2935                 xm_defines="USG AUX"
2936                 tmake_file=m68k/t-aux
2937                 install_headers_dir=install-headers-cpio
2938                 extra_headers=math-68881.h
2939                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
2940                 tm_file=
2941                 if [ "$gnu_ld" = yes ]
2942                 then
2943                         tm_file="${tm_file} m68k/auxgld.h"
2944                 else
2945                         tm_file="${tm_file} m68k/auxld.h"
2946                 fi
2947                 if [ "$gas" = yes ]
2948                 then
2949                         tm_file="${tm_file} m68k/auxgas.h"
2950                 else
2951                         tm_file="${tm_file} m68k/auxas.h"
2952                 fi
2953                 tm_file="${tm_file} m68k/a-ux.h"
2954                 ;;
2955         m68k-apollo-*)
2956                 tm_file=m68k/apollo68.h
2957                 xmake_file=m68k/x-apollo68
2958                 use_collect2=yes
2959                 extra_headers=math-68881.h
2960                 ;;
2961         m68k-altos-sysv*)                  # Altos 3068
2962                 if [ x$gas = xyes ]
2963                 then
2964                         tm_file=m68k/altos3068.h
2965                         xm_defines=USG
2966                 else
2967                         echo "The Altos is supported only with the GNU assembler" 1>&2
2968                         exit 1
2969                 fi
2970                 extra_headers=math-68881.h
2971                 ;;
2972         m68k-bull-sysv*)                # Bull DPX/2
2973                 if [ x$gas = xyes ]
2974                 then
2975                         if [ x$stabs = xyes ]
2976                         then
2977                                 tm_file=m68k/dpx2cdbx.h
2978                         else
2979                                 tm_file=m68k/dpx2g.h
2980                         fi
2981                 else
2982                         tm_file=m68k/dpx2.h
2983                 fi
2984                 xm_file="xm-alloca.h ${xm_file}"
2985                 xm_defines=USG
2986                 xmake_file=m68k/x-dpx2
2987                 use_collect2=yes
2988                 extra_headers=math-68881.h
2989                 ;;
2990         m68k-atari-sysv4*)              # Atari variant of V.4.
2991                 tm_file=m68k/atari.h
2992                 xm_file="xm-alloca.h ${xm_file}"
2993                 xm_defines="USG FULL_PROTOTYPES"
2994                 tmake_file=t-svr4
2995                 extra_parts="crtbegin.o crtend.o"
2996                 extra_headers=math-68881.h
2997                 ;;
2998         m68k-motorola-sysv*)
2999                 tm_file=m68k/mot3300.h
3000                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
3001                 xm_defines=NO_SYS_SIGLIST
3002                 if [ x$gas = xyes ]
3003                 then
3004                         xmake_file=m68k/x-mot3300-gas
3005                         if [ x$gnu_ld = xyes ]
3006                         then
3007                                 tmake_file=m68k/t-mot3300-gald
3008                         else
3009                                 tmake_file=m68k/t-mot3300-gas
3010                                 use_collect2=yes
3011                         fi
3012                 else
3013                         xmake_file=m68k/x-mot3300
3014                         if [ x$gnu_ld = xyes ]
3015                         then
3016                                 tmake_file=m68k/t-mot3300-gld
3017                         else
3018                                 tmake_file=m68k/t-mot3300
3019                                 use_collect2=yes
3020                         fi
3021                 fi
3022                 gdb_needs_out_file_path=yes
3023                 extra_parts="crt0.o mcrt0.o"
3024                 extra_headers=math-68881.h
3025                 ;;
3026         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
3027                 tm_file=m68k/tower-as.h
3028                 xm_defines="USG SVR3"
3029                 xmake_file=m68k/x-tower
3030                 extra_parts="crtbegin.o crtend.o"
3031                 extra_headers=math-68881.h
3032                 ;;
3033         m68k-plexus-sysv*)
3034                 tm_file=m68k/plexus.h
3035                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
3036                 xm_defines=USG
3037                 use_collect2=yes
3038                 extra_headers=math-68881.h
3039                 ;;
3040         m68k-tti-*)
3041                 tm_file=m68k/pbb.h
3042                 xm_file="xm-alloca.h ${xm_file}"
3043                 xm_defines=USG
3044                 extra_headers=math-68881.h
3045                 ;;
3046         m68k-crds-unos*)
3047                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
3048                 xm_defines="USG unos"
3049                 xmake_file=m68k/x-crds
3050                 tm_file=m68k/crds.h
3051                 use_collect2=yes
3052                 extra_headers=math-68881.h
3053                 ;;
3054         m68k-cbm-sysv4*)                # Commodore variant of V.4.
3055                 tm_file=m68k/amix.h
3056                 xm_file="xm-alloca.h ${xm_file}"
3057                 xm_defines="USG FULL_PROTOTYPES"
3058                 xmake_file=m68k/x-amix
3059                 tmake_file=t-svr4
3060                 extra_parts="crtbegin.o crtend.o"
3061                 extra_headers=math-68881.h
3062                 ;;
3063         m68k-ccur-rtu)
3064                 tm_file=m68k/ccur-GAS.h
3065                 xmake_file=m68k/x-ccur
3066                 extra_headers=math-68881.h
3067                 use_collect2=yes
3068                 ;;
3069         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
3070                 tm_file=m68k/hp3bsd44.h
3071                 xmake_file=m68k/x-hp3bsd44
3072                 use_collect2=yes
3073                 extra_headers=math-68881.h
3074                 ;;
3075         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
3076                 tm_file=m68k/hp3bsd.h
3077                 use_collect2=yes
3078                 extra_headers=math-68881.h
3079                 ;;
3080         m68k-isi-bsd*)
3081                 if [ x$with_fp = xno ]
3082                 then
3083                         tm_file=m68k/isi-nfp.h
3084                 else
3085                         tm_file=m68k/isi.h
3086                 fi
3087                 use_collect2=yes
3088                 extra_headers=math-68881.h
3089                 ;;
3090         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
3091                 xm_file="xm_alloca.h ${xm_file}"
3092                 xm_defines="USG NO_SYS_SIGLIST"
3093                 if [ x$gas = xyes ]
3094                 then
3095                         xmake_file=m68k/x-hp320g
3096                         tm_file=m68k/hp320g.h
3097                 else
3098                         xmake_file=m68k/x-hp320
3099                         tm_file=m68k/hpux7.h
3100                 fi
3101                 install_headers_dir=install-headers-cpio
3102                 use_collect2=yes
3103                 extra_headers=math-68881.h
3104                 ;;
3105         m68k-hp-hpux*)  # HP 9000 series 300
3106                 xm_file="xm_alloca.h ${xm_file}"
3107                 xm_defines="USG NO_SYS_SIGLIST"
3108                 if [ x$gas = xyes ]
3109                 then
3110                         xmake_file=m68k/x-hp320g
3111                         tm_file=m68k/hp320g.h
3112                 else
3113                         xmake_file=m68k/x-hp320
3114                         tm_file=m68k/hp320.h
3115                 fi
3116                 install_headers_dir=install-headers-cpio
3117                 use_collect2=yes
3118                 extra_headers=math-68881.h
3119                 ;;
3120         m68k-sun-mach*)
3121                 tm_file=m68k/sun3mach.h
3122                 use_collect2=yes
3123                 extra_headers=math-68881.h
3124                 ;;
3125         m68k-sony-newsos3*)
3126                 if [ x$gas = xyes ]
3127                 then
3128                         tm_file=m68k/news3gas.h
3129                 else
3130                         tm_file=m68k/news3.h
3131                 fi
3132                 use_collect2=yes
3133                 extra_headers=math-68881.h
3134                 ;;
3135         m68k-sony-bsd* | m68k-sony-newsos*)
3136                 if [ x$gas = xyes ]
3137                 then
3138                         tm_file=m68k/newsgas.h
3139                 else
3140                         tm_file=m68k/news.h
3141                 fi
3142                 use_collect2=yes
3143                 extra_headers=math-68881.h
3144                 ;;
3145         m68k-next-nextstep2*)
3146                 tm_file=m68k/next21.h
3147                 xm_file="m68k/xm-next.h ${xm_file}"
3148                 tmake_file=m68k/t-next
3149                 xmake_file=m68k/x-next
3150                 extra_objs=nextstep.o
3151                 extra_headers=math-68881.h
3152                 use_collect2=yes
3153                 ;;
3154         m68k-next-nextstep3*)
3155                 tm_file=m68k/next.h
3156                 xm_file="m68k/xm-next.h ${xm_file}"
3157                 tmake_file=m68k/t-next
3158                 xmake_file=m68k/x-next
3159                 extra_objs=nextstep.o
3160                 extra_headers=math-68881.h
3161                 if [ x$enable_threads = xyes ]; then
3162                         thread_file='mach'
3163                 fi
3164                 ;;
3165         m68k-sun-sunos3*)
3166                 if [ x$with_fp = xno ]
3167                 then
3168                         tm_file=m68k/sun3n3.h
3169                 else
3170                         tm_file=m68k/sun3o3.h
3171                 fi
3172                 use_collect2=yes
3173                 extra_headers=math-68881.h
3174                 ;;
3175         m68k-sun-sunos*)                        # For SunOS 4 (the default).
3176                 if [ x$with_fp = xno ]
3177                 then
3178                         tm_file=m68k/sun3n.h
3179                 else
3180                         tm_file=m68k/sun3.h
3181                 fi
3182                 use_collect2=yes
3183                 extra_headers=math-68881.h
3184                 ;;
3185         m68k-wrs-vxworks*)
3186                 tm_file=m68k/vxm68k.h
3187                 tmake_file=m68k/t-vxworks68
3188                 extra_headers=math-68881.h
3189                 thread_file='vxworks'
3190                 ;;
3191         m68k-*-aout*)
3192                 tmake_file=m68k/t-m68kbare
3193                 tm_file="m68k/m68k-aout.h libgloss.h"
3194                 extra_headers=math-68881.h
3195                 ;;
3196         m68k-*-coff*)
3197                 tmake_file=m68k/t-m68kbare
3198                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
3199                 extra_headers=math-68881.h
3200                 ;;
3201         m68k-*-lynxos*)
3202                 if [ x$gas = xyes ]
3203                 then
3204                         tm_file=m68k/lynx.h
3205                 else
3206                         tm_file=m68k/lynx-ng.h
3207                 fi
3208                 xm_file=m68k/xm-lynx.h
3209                 xmake_file=x-lynx
3210                 tmake_file=m68k/t-lynx
3211                 extra_headers=math-68881.h
3212                 ;;
3213         m68k-*-netbsd*)
3214                 tm_file=m68k/netbsd.h
3215                 # On NetBSD, the headers are already okay, except for math.h.
3216                 fixincludes=fixinc.math
3217                 tmake_file=t-netbsd
3218                 ;;
3219         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
3220                 xm_file="xm-alloca.h ${xm_file}"
3221                 xm_defines=USG
3222                 xmake_file=m68k/x-m68kv
3223                 extra_parts="crtbegin.o crtend.o"
3224                 extra_headers=math-68881.h
3225                 ;;
3226         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
3227                 tm_file=m68k/m68kv4.h
3228                 xm_file="xm-alloca.h ${xm_file}"
3229                 xm_defines=USG
3230                 tmake_file=t-svr4
3231                 extra_parts="crtbegin.o crtend.o"
3232                 extra_headers=math-68881.h
3233                 ;;
3234         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
3235                                         # with a.out format
3236                 xmake_file=x-linux
3237                 tm_file=m68k/linux-aout.h
3238                 tmake_file="t-linux-aout m68k/t-linux-aout"
3239                 fixincludes=Makefile.in # The headers are ok already.
3240                 extra_headers=math-68881.h
3241                 gnu_ld=yes
3242                 ;;
3243         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
3244                                         # with ELF format using the
3245                                         # GNU/Linux C library 5
3246                 xmake_file=x-linux
3247                 tm_file=m68k/linux.h
3248                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
3249                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3250                 fixincludes=Makefile.in # The headers are ok already.
3251                 extra_headers=math-68881.h
3252                 gnu_ld=yes
3253                 ;;
3254         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
3255                                         # with ELF format using glibc 2
3256                                         # aka the GNU/Linux C library 6.
3257                 xmake_file=x-linux
3258                 tm_file=m68k/linux.h
3259                 tmake_file="t-linux m68k/t-linux"
3260                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3261                 fixincludes=Makefile.in # The headers are ok already.
3262                 extra_headers=math-68881.h
3263                 gnu_ld=yes
3264                 if [ x$enable_threads = xyes ]; then
3265                         thread_file='posix'
3266                 fi
3267                 ;;
3268         m68k-*-psos*)
3269                 tmake_file=m68k/t-m68kbare
3270                 tm_file=m68k/m68k-psos.h
3271                 extra_headers=math-68881.h
3272                 ;;
3273         m68k-*-rtems*)
3274                 tmake_file="m68k/t-m68kbare t-rtems"
3275                 tm_file=m68k/rtems.h
3276                 extra_headers=math-68881.h
3277                 ;;
3278
3279         m88k-dg-dgux*)
3280                 case $machine in
3281                   m88k-dg-dguxbcs*)
3282                     tm_file=m88k/dguxbcs.h
3283                     tmake_file=m88k/t-dguxbcs
3284                     ;;
3285                   *)
3286                     tm_file=m88k/dgux.h
3287                     tmake_file=m88k/t-dgux
3288                     ;;
3289                 esac
3290                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
3291                 xmake_file=m88k/x-dgux
3292                 if [ x$gas = xyes ]
3293                 then
3294                         tmake_file=m88k/t-dgux-gas
3295                 fi
3296                 fixincludes=fixinc.dgux
3297                 ;;
3298         m88k-dolphin-sysv3*)
3299                 tm_file=m88k/dolph.h
3300                 extra_parts="crtbegin.o crtend.o"
3301                 xm_file="m88k/xm-sysv3.h ${xm_file}"
3302                 xmake_file=m88k/x-dolph
3303                 if [ x$gas = xyes ]
3304                 then
3305                         tmake_file=m88k/t-m88k-gas
3306                 fi
3307                 ;;
3308         m88k-tektronix-sysv3)
3309                 tm_file=m88k/tekXD88.h
3310                 extra_parts="crtbegin.o crtend.o"
3311                 xm_file="m88k/xm-sysv3.h ${xm_file}"
3312                 xmake_file=m88k/x-tekXD88
3313                 if [ x$gas = xyes ]
3314                 then
3315                         tmake_file=m88k/t-m88k-gas
3316                 fi
3317                 ;;
3318         m88k-*-aout*)
3319                 tm_file=m88k/m88k-aout.h
3320                 ;;
3321         m88k-*-coff*)
3322                 tm_file=m88k/m88k-coff.h
3323                 tmake_file=m88k/t-bug
3324                 ;;
3325         m88k-*-luna*)
3326                 tm_file=m88k/luna.h
3327                 extra_parts="crtbegin.o crtend.o"
3328                 if [ x$gas = xyes ]
3329                 then
3330                         tmake_file=m88k/t-luna-gas
3331                 else
3332                         tmake_file=m88k/t-luna
3333                 fi
3334                 ;;
3335         m88k-*-sysv3*)
3336                 tm_file=m88k/sysv3.h
3337                 extra_parts="crtbegin.o crtend.o"
3338                 xm_file="m88k/xm-sysv3.h ${xm_file}"
3339                 xmake_file=m88k/x-sysv3
3340                 if [ x$gas = xyes ]
3341                 then
3342                         tmake_file=m88k/t-m88k-gas
3343                 fi
3344                 ;;
3345         m88k-*-sysv4*)
3346                 tm_file=m88k/sysv4.h
3347                 extra_parts="crtbegin.o crtend.o"
3348                 xmake_file=m88k/x-sysv4
3349                 tmake_file=m88k/t-sysv4
3350                 ;;
3351         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
3352                 tm_file=mips/iris6.h
3353                 xm_file=mips/xm-iris6.h
3354                 fixincludes=fixinc.irix
3355                 xmake_file=mips/x-iris6
3356                 tmake_file=mips/t-iris6
3357                 if [ x$enable_threads = xyes ]; then
3358                         thread_file='irix'
3359                 fi
3360                 ;;
3361         mips-wrs-vxworks)
3362                 tm_file="mips/elf.h libgloss.h"
3363                 tmake_file=mips/t-ecoff
3364                 gas=yes
3365                 gnu_ld=yes
3366                 extra_parts="crtbegin.o crtend.o"
3367 #               thread_file='vxworks'
3368                 ;;
3369         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
3370                 tm_file="mips/iris6.h mips/cross64.h"
3371                 xm_defines="USG HAVE_INTTYPES_H"
3372                 fixincludes=Makefile.in
3373                 xmake_file=mips/x-iris
3374                 tmake_file=mips/t-cross64
3375                 # See comment in mips/iris[56].h files.
3376                 use_collect2=yes
3377                 if [ x$enable_threads = xyes ]; then
3378                         thread_file='irix'
3379                 fi
3380                 ;;
3381         mips-sni-sysv4)
3382                 if [ x$gas = xyes ]
3383                 then
3384                         if [ x$stabs = xyes ]
3385                         then
3386                                 tm_file=mips/iris5gdb.h
3387                         else
3388                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
3389                         fi
3390                 else
3391                         tm_file=mips/sni-svr4.h
3392                 fi
3393                 xm_defines=USG
3394                 xmake_file=mips/x-sni-svr4
3395                 tmake_file=mips/t-mips-gas
3396                 if [ x$gnu_ld != xyes ]
3397                 then
3398                         use_collect2=yes
3399                 fi
3400                 ;;
3401         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
3402                 if [ x$gas = xyes ]
3403                 then
3404                         tm_file="mips/iris5.h mips/iris5gas.h"
3405                         if [ x$stabs = xyes ]
3406                         then
3407                                 tm_file="${tm_file} dbx.h"
3408                         fi
3409                 else
3410                         tm_file=mips/iris5.h
3411                 fi
3412                 xm_defines="USG HAVE_INTTYPES_H"
3413                 fixincludes=fixinc.irix
3414                 xmake_file=mips/x-iris
3415                 # mips-tfile doesn't work yet
3416                 tmake_file=mips/t-mips-gas
3417                 # See comment in mips/iris5.h file.
3418                 use_collect2=yes
3419                 if [ x$enable_threads = xyes ]; then
3420                         thread_file='irix'
3421                 fi
3422                 ;;
3423         mips-sgi-irix4loser*)           # Mostly like a MIPS.
3424                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
3425                 if [ x$stabs = xyes ]; then
3426                         tm_file="${tm_file} dbx.h"
3427                 fi
3428                 xm_defines=USG
3429                 xmake_file=mips/x-iris
3430                 if [ x$gas = xyes ]
3431                 then
3432                         tmake_file=mips/t-mips-gas
3433                 else
3434                         extra_passes="mips-tfile mips-tdump"
3435                 fi
3436                 if [ x$gnu_ld != xyes ]
3437                 then
3438                         use_collect2=yes
3439                 fi
3440                 if [ x$enable_threads = xyes ]; then
3441                         thread_file='irix'
3442                 fi
3443                 ;;
3444         mips-sgi-irix4*)                # Mostly like a MIPS.
3445                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
3446                 if [ x$stabs = xyes ]; then
3447                         tm_file="${tm_file} dbx.h"
3448                 fi
3449                 xm_defines=USG
3450                 xmake_file=mips/x-iris
3451                 if [ x$gas = xyes ]
3452                 then
3453                         tmake_file=mips/t-mips-gas
3454                 else
3455                         extra_passes="mips-tfile mips-tdump"
3456                 fi
3457                 if [ x$gnu_ld != xyes ]
3458                 then
3459                         use_collect2=yes
3460                 fi
3461                 if [ x$enable_threads = xyes ]; then
3462                         thread_file='irix'
3463                 fi
3464                 ;;
3465         mips-sgi-*)                     # Mostly like a MIPS.
3466                 tm_file="mips/iris3.h ${tm_file}"
3467                 if [ x$stabs = xyes ]; then
3468                         tm_file="${tm_file} dbx.h"
3469                 fi
3470                 xm_defines=USG
3471                 xmake_file=mips/x-iris3
3472                 if [ x$gas = xyes ]
3473                 then
3474                         tmake_file=mips/t-mips-gas
3475                 else
3476                         extra_passes="mips-tfile mips-tdump"
3477                 fi
3478                 if [ x$gnu_ld != xyes ]
3479                 then
3480                         use_collect2=yes
3481                 fi
3482                 ;;
3483         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
3484                 tm_file="mips/osfrose.h ${tm_file}"
3485                 xmake_file=mips/x-osfrose
3486                 tmake_file=mips/t-osfrose
3487                 extra_objs=halfpic.o
3488                 use_collect2=yes
3489                 ;;
3490         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
3491                 tm_file=mips/dec-osf1.h
3492                 if [ x$stabs = xyes ]; then
3493                         tm_file="${tm_file} dbx.h"
3494                 fi
3495                 xmake_file=mips/x-dec-osf1
3496                 if [ x$gas = xyes ]
3497                 then
3498                         tmake_file=mips/t-mips-gas
3499                 else
3500                         tmake_file=mips/t-ultrix
3501                         extra_passes="mips-tfile mips-tdump"
3502                 fi
3503                 if [ x$gnu_ld != xyes ]
3504                 then
3505                         use_collect2=yes
3506                 fi
3507                 ;;
3508         mips-dec-bsd*)                  # Decstation running 4.4 BSD
3509               tm_file=mips/dec-bsd.h
3510               fixincludes=
3511               if [ x$gas = xyes ]
3512               then
3513                         tmake_file=mips/t-mips-gas
3514               else
3515                         tmake_file=mips/t-ultrix
3516                         extra_passes="mips-tfile mips-tdump"
3517               fi
3518               if [ x$gnu_ld != xyes ]
3519               then
3520                         use_collect2=yes
3521               fi
3522               ;;
3523         mips-dec-netbsd*)                  # Decstation running NetBSD
3524                 tm_file=mips/netbsd.h
3525                 # On NetBSD, the headers are already okay, except for math.h.
3526                 fixincludes=fixinc.math
3527                 tmake_file=t-netbsd
3528                 ;;
3529         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
3530                 tm_file="mips/news4.h ${tm_file}"
3531                 if [ x$stabs = xyes ]; then
3532                         tm_file="${tm_file} dbx.h"
3533                 fi
3534                 if [ x$gas = xyes ]
3535                 then
3536                         tmake_file=mips/t-mips-gas
3537                 else
3538                         extra_passes="mips-tfile mips-tdump"
3539                 fi
3540                 if [ x$gnu_ld != xyes ]
3541                 then
3542                         use_collect2=yes
3543                 fi
3544                 xmake_file=mips/x-sony
3545                 ;;
3546         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
3547                                         # That is based on svr4.
3548                 # t-svr4 is not right because this system doesn't use ELF.
3549                 tm_file="mips/news5.h ${tm_file}"
3550                 if [ x$stabs = xyes ]; then
3551                         tm_file="${tm_file} dbx.h"
3552                 fi
3553                 xm_file="xm-siglist.h ${xm_file}"
3554                 xm_defines=USG
3555                 if [ x$gas = xyes ]
3556                 then
3557                         tmake_file=mips/t-mips-gas
3558                 else
3559                         extra_passes="mips-tfile mips-tdump"
3560                 fi
3561                 if [ x$gnu_ld != xyes ]
3562                 then
3563                         use_collect2=yes
3564                 fi
3565                 ;;
3566         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
3567                 tm_file="mips/svr4-5.h mips/svr4-t.h"
3568                 if [ x$stabs = xyes ]; then
3569                         tm_file="${tm_file} dbx.h"
3570                 fi
3571                 xm_file="xm-siglist.h ${xm_file}"
3572                 xm_defines=USG
3573                 xmake_file=mips/x-sysv
3574                 if [ x$gas = xyes ]
3575                 then
3576                         tmake_file=mips/t-mips-gas
3577                         extra_parts="crtbegin.o crtend.o"
3578                 else
3579                         tmake_file=mips/t-mips
3580                         extra_passes="mips-tfile mips-tdump"
3581                 fi
3582                 if [ x$gnu_ld != xyes ]
3583                 then
3584                         use_collect2=yes
3585                 fi
3586                 ;;
3587         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
3588                 tm_file="mips/ultrix.h ${tm_file}"
3589                 if [ x$stabs = xyes ]; then
3590                         tm_file="${tm_file} dbx.h"
3591                 fi
3592                 xmake_file=mips/x-ultrix
3593                 if [ x$gas = xyes ]
3594                 then
3595                         tmake_file=mips/t-mips-gas
3596                 else
3597                         tmake_file=mips/t-ultrix
3598                         extra_passes="mips-tfile mips-tdump"
3599                 fi
3600                 if [ x$gnu_ld != xyes ]
3601                 then
3602                         use_collect2=yes
3603                 fi
3604                 ;;
3605         mips-*-riscos[56789]bsd*)
3606                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
3607                 if [ x$stabs = xyes ]; then
3608                         tm_file="${tm_file} dbx.h"
3609                 fi
3610                 if [ x$gas = xyes ]
3611                 then
3612                         tmake_file=mips/t-bsd-gas
3613                 else
3614                         tmake_file=mips/t-bsd
3615                         extra_passes="mips-tfile mips-tdump"
3616                 fi
3617                 if [ x$gnu_ld != xyes ]
3618                 then
3619                         use_collect2=yes
3620                 fi
3621                 ;;
3622         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
3623                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
3624                 if [ x$stabs = xyes ]; then
3625                         tm_file="${tm_file} dbx.h"
3626                 fi
3627                 if [ x$gas = xyes ]
3628                 then
3629                         tmake_file=mips/t-bsd-gas
3630                 else
3631                         tmake_file=mips/t-bsd
3632                         extra_passes="mips-tfile mips-tdump"
3633                 fi
3634                 if [ x$gnu_ld != xyes ]
3635                 then
3636                         use_collect2=yes
3637                 fi
3638                 ;;
3639         mips-*-riscos[56789]sysv4*)
3640                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
3641                 if [ x$stabs = xyes ]; then
3642                         tm_file="${tm_file} dbx.h"
3643                 fi
3644                 xm_file="xm-siglist.h ${xm_file}"
3645                 xmake_file=mips/x-sysv
3646                 if [ x$gas = xyes ]
3647                 then
3648                         tmake_file=mips/t-svr4-gas
3649                 else
3650                         tmake_file=mips/t-svr4
3651                         extra_passes="mips-tfile mips-tdump"
3652                 fi
3653                 if [ x$gnu_ld != xyes ]
3654                 then
3655                         use_collect2=yes
3656                 fi
3657                 ;;
3658         mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
3659                 tm_file="mips/svr4-4.h ${tm_file}"
3660                 if [ x$stabs = xyes ]; then
3661                         tm_file="${tm_file} dbx.h"
3662                 fi
3663                 xm_defines=USG
3664                 xmake_file=mips/x-sysv
3665                 if [ x$gas = xyes ]
3666                 then
3667                         tmake_file=mips/t-svr4-gas
3668                 else
3669                         tmake_file=mips/t-svr4
3670                         extra_passes="mips-tfile mips-tdump"
3671                 fi
3672                 if [ x$gnu_ld != xyes ]
3673                 then
3674                         use_collect2=yes
3675                 fi
3676                 ;;
3677         mips-*-riscos[56789]sysv*)
3678                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
3679                 if [ x$stabs = xyes ]; then
3680                         tm_file="${tm_file} dbx.h"
3681                 fi
3682                 xm_defines=USG
3683                 xmake_file=mips/x-sysv
3684                 if [ x$gas = xyes ]
3685                 then
3686                         tmake_file=mips/t-svr3-gas
3687                 else
3688                         tmake_file=mips/t-svr3
3689                         extra_passes="mips-tfile mips-tdump"
3690                 fi
3691                 if [ x$gnu_ld != xyes ]
3692                 then
3693                         use_collect2=yes
3694                 fi
3695                 ;;
3696         mips-*-sysv* | mips-*-riscos*sysv*)
3697                 tm_file="mips/svr3-4.h ${tm_file}"
3698                 if [ x$stabs = xyes ]; then
3699                         tm_file="${tm_file} dbx.h"
3700                 fi
3701                 xm_defines=USG
3702                 xmake_file=mips/x-sysv
3703                 if [ x$gas = xyes ]
3704                 then
3705                         tmake_file=mips/t-svr3-gas
3706                 else
3707                         tmake_file=mips/t-svr3
3708                         extra_passes="mips-tfile mips-tdump"
3709                 fi
3710                 if [ x$gnu_ld != xyes ]
3711                 then
3712                         use_collect2=yes
3713                 fi
3714                 ;;
3715         mips-*-riscos[56789]*)          # Default MIPS RISC-OS 5.0.
3716                 tm_file=mips/mips-5.h
3717                 if [ x$stabs = xyes ]; then
3718                         tm_file="${tm_file} dbx.h"
3719                 fi
3720                 if [ x$gas = xyes ]
3721                 then
3722                         tmake_file=mips/t-mips-gas
3723                 else
3724                         extra_passes="mips-tfile mips-tdump"
3725                 fi
3726                 if [ x$gnu_ld != xyes ]
3727                 then
3728                         use_collect2=yes
3729                 fi
3730                 ;;
3731         mips-*-gnu*)
3732                 ;;
3733         mipsel-*-ecoff*)
3734                 tm_file=mips/ecoffl.h
3735                 if [ x$stabs = xyes ]; then
3736                         tm_file="${tm_file} dbx.h"
3737                 fi
3738                 tmake_file=mips/t-ecoff
3739                 ;;
3740         mips-*-ecoff*)
3741                 tm_file="gofast.h mips/ecoff.h"
3742                 if [ x$stabs = xyes ]; then
3743                         tm_file="${tm_file} dbx.h"
3744                 fi
3745                 tmake_file=mips/t-ecoff
3746                 ;;
3747         mipsel-*-elf*)
3748                 tm_file="mips/elfl.h libgloss.h"
3749                 tmake_file=mips/t-ecoff
3750                 ;;
3751         mips-*-elf*)
3752                 tm_file="mips/elf.h libgloss.h"
3753                 tmake_file=mips/t-ecoff
3754                 ;;
3755         mips64el-*-elf*)
3756                 tm_file="mips/elfl64.h libgloss.h"
3757                 tmake_file=mips/t-ecoff
3758                 ;;
3759         mips64orionel-*-elf*)
3760                 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
3761                 tmake_file=mips/t-ecoff
3762                 ;;
3763         mips64-*-elf*)
3764                 tm_file="mips/elf64.h libgloss.h"
3765                 tmake_file=mips/t-ecoff
3766                 ;;
3767         mips64orion-*-elf*)
3768                 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
3769                 tmake_file=mips/t-ecoff
3770                 ;;
3771         mips64orion-*-rtems*)
3772                 tm_file="mips/elforion.h mips/elfl64.h mips/rtems64.h"
3773                 tmake_file="mips/t-ecoff t-rtems"
3774                 ;;
3775         mipstx39el-*-elf*)
3776                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
3777                 tmake_file=mips/t-r3900
3778                 ;;
3779         mipstx39-*-elf*)
3780                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
3781                 tmake_file=mips/t-r3900
3782                 ;;
3783         mips-*-*)                               # Default MIPS RISC-OS 4.0.
3784                 if [ x$stabs = xyes ]; then
3785                         tm_file="${tm_file} dbx.h"
3786                 fi
3787                 if [ x$gas = xyes ]
3788                 then
3789                         tmake_file=mips/t-mips-gas
3790                 else
3791                         extra_passes="mips-tfile mips-tdump"
3792                 fi
3793                 if [ x$gnu_ld != xyes ]
3794                 then
3795                         use_collect2=yes
3796                 fi
3797                 ;;
3798         mn10200-*-*)
3799                 cpu_type=mn10200
3800                 tm_file="mn10200/mn10200.h"
3801                 if [ x$stabs = xyes ]
3802                 then
3803                         tm_file="${tm_file} dbx.h"
3804                 fi
3805                 use_collect2=no
3806                 ;;
3807         mn10300-*-*)
3808                 cpu_type=mn10300
3809                 tm_file="mn10300/mn10300.h"
3810                 if [ x$stabs = xyes ]
3811                 then
3812                         tm_file="${tm_file} dbx.h"
3813                 fi
3814                 use_collect2=no
3815                 ;;
3816         ns32k-encore-bsd*)
3817                 tm_file=ns32k/encore.h
3818                 use_collect2=yes
3819                 ;;
3820         ns32k-sequent-bsd*)
3821                 tm_file=ns32k/sequent.h
3822                 use_collect2=yes
3823                 ;;
3824         ns32k-tek6100-bsd*)
3825                 tm_file=ns32k/tek6100.h
3826                 use_collect2=yes
3827                 ;;
3828         ns32k-tek6200-bsd*)
3829                 tm_file=ns32k/tek6200.h
3830                 use_collect2=yes
3831                 ;;
3832 # This has not been updated to GCC 2.
3833 #       ns32k-ns-genix*)
3834 #               xm_defines=USG
3835 #               xmake_file=ns32k/x-genix
3836 #               tm_file=ns32k/genix.h
3837 #               use_collect2=yes
3838 #               ;;
3839         ns32k-merlin-*)
3840                 tm_file=ns32k/merlin.h
3841                 use_collect2=yes
3842                 ;;
3843         ns32k-pc532-mach*)
3844                 tm_file=ns32k/pc532-mach.h
3845                 use_collect2=yes
3846                 ;;
3847         ns32k-pc532-minix*)
3848                 tm_file=ns32k/pc532-min.h
3849                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3850                 xm_defines=USG
3851                 use_collect2=yes
3852                 ;;
3853         ns32k-pc532-netbsd*)
3854                 tm_file=ns32k/netbsd.h
3855                 # On NetBSD, the headers are already okay, except for math.h.
3856                 fixincludes=fixinc.math
3857                 tmake_file=t-netbsd
3858                 ;;
3859         pdp11-*-bsd)
3860                 tm_file="${tm_file} pdp11/2bsd.h"
3861                 ;;
3862         pdp11-*-*)
3863                 ;;
3864         pyramid-*-*)
3865                 cpu_type=pyr
3866                 xmake_file=pyr/x-pyr
3867                 use_collect2=yes
3868                 ;;
3869         romp-*-aos*)
3870                 use_collect2=yes
3871                 ;;
3872         romp-*-mach*)
3873                 xmake_file=romp/x-mach
3874                 use_collect2=yes
3875                 ;;
3876         powerpc-*-beos*)
3877                 cpu_type=rs6000
3878                 tm_file=rs6000/beos.h
3879                 xm_file=rs6000/xm-beos.h
3880                 tmake_file=rs6000/t-beos
3881                 xmake_file=rs6000/x-beos
3882                 ;;
3883         powerpc-*-sysv* | powerpc-*-elf*)
3884                 tm_file=rs6000/sysv4.h
3885                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
3886                 xm_defines="USG POSIX"
3887                 extra_headers=ppc-asm.h
3888                 if [ x$gas = xyes ]
3889                 then
3890                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3891                 else
3892                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
3893                 fi
3894                 xmake_file=rs6000/x-sysv4
3895                 ;;
3896         powerpc-*-eabiaix*)
3897                 tm_file=rs6000/eabiaix.h
3898                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3899                 fixincludes=Makefile.in
3900                 extra_headers=ppc-asm.h
3901                 ;;
3902         powerpc-*-eabisim*)
3903                 tm_file=rs6000/eabisim.h
3904                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3905                 fixincludes=Makefile.in
3906                 extra_headers=ppc-asm.h
3907                 ;;
3908         powerpc-*-eabi*)
3909                 tm_file=rs6000/eabi.h
3910                 if [ x$gas = xyes ]
3911                 then
3912                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3913                 else
3914                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
3915                 fi
3916                 fixincludes=Makefile.in
3917                 extra_headers=ppc-asm.h
3918                 ;;
3919         powerpc-*-rtems*)
3920                 tm_file=rs6000/rtems.h
3921                 if [ x$gas = xyes ]
3922                 then
3923                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
3924                 else
3925                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
3926                 fi
3927                 fixincludes=Makefile.in
3928                 extra_headers=ppc-asm.h
3929                 ;;
3930         powerpc-*-linux-gnulibc1)
3931                 tm_file=rs6000/linux.h
3932                 xm_file=rs6000/xm-sysv4.h
3933                 out_file=rs6000/rs6000.c
3934                 if [ x$gas = xyes ]
3935                 then
3936                         tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3937                 else
3938                         tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3939                 fi
3940                 xmake_file=x-linux
3941                 fixincludes=Makefile.in
3942                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3943                 extra_headers=ppc-asm.h
3944                 if [ x$enable_threads = xyes ]; then
3945                         thread_file='posix'
3946                 fi
3947                 ;;
3948         powerpc-*-linux-gnu*)
3949                 tm_file=rs6000/linux.h
3950                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
3951                 xm_defines="USG ${xm_defines}"
3952                 out_file=rs6000/rs6000.c
3953                 if [ x$gas = xyes ]
3954                 then
3955                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
3956                 else
3957                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
3958                 fi
3959                 xmake_file=x-linux
3960                 fixincludes=Makefile.in
3961                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3962                 extra_headers=ppc-asm.h
3963                 if [ x$enable_threads = xyes ]; then
3964                         thread_file='posix'
3965                 fi
3966                 ;;
3967         powerpc-wrs-vxworks*)
3968                 cpu_type=rs6000
3969                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
3970                 xm_defines="USG POSIX"
3971                 tm_file=rs6000/vxppc.h
3972                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3973                 extra_headers=ppc-asm.h
3974                 thread_file='vxworks'
3975                 ;;
3976         powerpcle-*-sysv* | powerpcle-*-elf*)
3977                 tm_file=rs6000/sysv4le.h
3978                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
3979                 xm_defines="USG POSIX"
3980                 if [ x$gas = xyes ]
3981                 then
3982                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3983                 else
3984                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
3985                 fi
3986                 xmake_file=rs6000/x-sysv4
3987                 extra_headers=ppc-asm.h
3988                 ;;
3989         powerpcle-*-eabisim*)
3990                 tm_file=rs6000/eabilesim.h
3991                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3992                 fixincludes=Makefile.in
3993                 extra_headers=ppc-asm.h
3994                 ;;
3995         powerpcle-*-eabi*)
3996                 tm_file=rs6000/eabile.h
3997                 if [ x$gas = xyes ]
3998                 then
3999                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
4000                 else
4001                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4002                 fi
4003                 fixincludes=Makefile.in
4004                 extra_headers=ppc-asm.h
4005                 ;;
4006         powerpcle-*-winnt* )
4007                 tm_file=rs6000/win-nt.h
4008                 tmake_file=rs6000/t-winnt
4009 #               extra_objs=pe.o
4010                 fixincludes=Makefile.in
4011                 if [ x$enable_threads = xyes ]; then
4012                         thread_file='win32'
4013                 fi
4014                 extra_headers=ppc-asm.h
4015                 ;;
4016         powerpcle-*-pe | powerpcle-*-cygwin32)
4017                 tm_file=rs6000/cygwin32.h
4018                 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
4019                 xm_defines=NO_STAB_H
4020                 tmake_file=rs6000/t-winnt
4021                 xmake_file=rs6000/x-cygwin32
4022 #               extra_objs=pe.o
4023                 fixincludes=Makefile.in
4024                 if [ x$enable_threads = xyes ]; then
4025                         thread_file='win32'
4026                 fi
4027                 exeext=.exe
4028                 extra_headers=ppc-asm.h
4029                 ;;
4030         powerpcle-*-solaris2*)
4031                 tm_file=rs6000/sol2.h
4032                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
4033                 xm_defines="USG POSIX"
4034                 if [ x$gas = xyes ]
4035                 then
4036                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
4037                 else
4038                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
4039                 fi
4040                 xmake_file=rs6000/x-sysv4
4041                 case $machine in
4042                 *-*-solaris2.[0-4])
4043                         fixincludes=fixinc.svr4;;
4044                 *)
4045                         fixincludes=fixinc.math;;
4046                 esac
4047                 extra_headers=ppc-asm.h
4048                 ;;
4049         rs6000-ibm-aix3.[01]*)
4050                 tm_file=rs6000/aix31.h
4051                 xmake_file=rs6000/x-aix31
4052                 use_collect2=yes
4053                 ;;
4054         rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
4055                 tm_file=rs6000/aix3newas.h
4056                 if [ x$host != x$target ]
4057                 then
4058                         tmake_file=rs6000/t-xnewas
4059                 else
4060                         tmake_file=rs6000/t-newas
4061                 fi
4062                 use_collect2=yes
4063                 ;;
4064         rs6000-ibm-aix[456789].* | powerpc-ibm-aix[456789].*)
4065                 tm_file=rs6000/aix41.h
4066                 if [ x$host != x$target ]
4067                 then
4068                         tmake_file=rs6000/t-xnewas
4069                 else
4070                         tmake_file=rs6000/t-newas
4071                 fi
4072                 xmake_file=rs6000/x-aix31
4073                 use_collect2=yes
4074                 ;;
4075         rs6000-ibm-aix*)
4076                 use_collect2=yes
4077                 ;;
4078         rs6000-bull-bosx)
4079                 use_collect2=yes
4080                 ;;
4081         rs6000-*-mach*)
4082                 tm_file=rs6000/mach.h
4083                 xm_file="${xm_file} rs6000/xm-mach.h"
4084                 xmake_file=rs6000/x-mach
4085                 use_collect2=yes
4086                 ;;
4087         rs6000-*-lynxos*)
4088                 tm_file=rs6000/lynx.h
4089                 xm_file=rs6000/xm-lynx.h
4090                 tmake_file=rs6000/t-rs6000
4091                 xmake_file=rs6000/x-lynx
4092                 use_collect2=yes
4093                 ;;
4094         sh-*-elf*)
4095                 tm_file=sh/elf.h
4096                 float_format=sh
4097                 ;;
4098         sh-*-rtems*)
4099                 tmake_file="sh/t-sh t-rtems"
4100                 tm_file=sh/rtems.h
4101                 float_format=sh
4102                 ;;
4103         sh-*-*)
4104                 float_format=sh
4105                 ;;
4106         sparc-tti-*)
4107                 tm_file=sparc/pbd.h
4108                 xm_file="xm-alloca.h ${xm_file}"
4109                 xm_defines=USG
4110                 ;;
4111         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
4112                 tm_file=sparc/vxsparc.h
4113                 tmake_file=sparc/t-vxsparc
4114                 use_collect2=yes
4115                 thread_file='vxworks'
4116                 ;;
4117         sparc-*-aout*)
4118                 tmake_file=sparc/t-sparcbare
4119                 tm_file="sparc/aout.h libgloss.h"
4120                 ;;
4121         sparc-*-netbsd*)
4122                 tm_file=sparc/netbsd.h
4123                 # On NetBSD, the headers are already okay, except for math.h.
4124                 fixincludes=fixinc.math
4125                 tmake_file=t-netbsd
4126                 ;;
4127         sparc-*-bsd*)
4128                 tm_file=sparc/bsd.h
4129                 ;;
4130         sparc-*-elf*)
4131                 tm_file=sparc/elf.h
4132                 tmake_file=sparc/t-elf
4133                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
4134                 #float_format=i128
4135                 float_format=i64
4136                 ;;
4137         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
4138                 xm_file="${xm_file} sparc/xm-linux.h"
4139                 tm_file=sparc/linux-aout.h
4140                 xmake_file=x-linux
4141                 fixincludes=Makefile.in #On Linux, the headers are ok already.
4142                 gnu_ld=yes
4143                 ;;
4144         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
4145                 xm_file="${xm_file} sparc/xm-linux.h"
4146                 xmake_file=x-linux
4147                 tm_file=sparc/linux.h
4148                 tmake_file="t-linux t-linux-gnulibc1"
4149                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4150                 fixincludes=Makefile.in #On Linux, the headers are ok already.
4151                 gnu_ld=yes
4152                 ;;
4153         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
4154                 xm_file="${xm_file} sparc/xm-linux.h"
4155                 xmake_file=x-linux
4156                 tm_file=sparc/linux.h
4157                 tmake_file="t-linux"
4158                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
4159                 fixincludes=Makefile.in #On Linux, the headers are ok already.
4160                 gnu_ld=yes
4161                 if [ x$enable_threads = xyes ]; then
4162                         thread_file='posix'
4163                 fi
4164                 ;;
4165         sparc-*-lynxos*)
4166                 if [ x$gas = xyes ]
4167                 then
4168                         tm_file=sparc/lynx.h
4169                 else
4170                         tm_file=sparc/lynx-ng.h
4171                 fi
4172                 xm_file=sparc/xm-lynx.h
4173                 tmake_file=sparc/t-sunos41
4174                 xmake_file=x-lynx
4175                 ;;
4176         sparc-*-rtems*)
4177                 tmake_file="sparc/t-sparcbare t-rtems"
4178                 tm_file=sparc/rtems.h
4179                 ;;
4180         sparc-*-solaris2*)
4181                 if [ x$gnu_ld = xyes ]
4182                 then
4183                         tm_file=sparc/sol2.h
4184                 else
4185                         tm_file=sparc/sol2-sld.h
4186                 fi
4187                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
4188                 xm_defines="USG POSIX"
4189                 tmake_file=sparc/t-sol2
4190                 xmake_file=sparc/x-sysv4
4191                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
4192                 case $machine in
4193                 *-*-solaris2.[0-4])
4194                         fixincludes=fixinc.svr4;;
4195                 *)
4196                         fixincludes=fixinc.math;;
4197                 esac
4198                 float_format=i128
4199                 if [ x${enable_threads} = x ]; then
4200                     enable_threads=$have_pthread_h
4201                     if [ x${enable_threads} = x ]; then
4202                         enable_threads=$have_thread_h
4203                     fi
4204                 fi
4205                 if [ x${enable_threads} = xyes ]; then
4206                     if [ x${have_pthread_h} = xyes ]; then
4207                         thread_file='posix'
4208                     else
4209                         thread_file='solaris'
4210                     fi
4211                 fi
4212                 ;;
4213         sparc-*-sunos4.0*)
4214                 tm_file=sparc/sunos4.h
4215                 tmake_file=sparc/t-sunos40
4216                 use_collect2=yes
4217                 ;;
4218         sparc-*-sunos4*)
4219                 tm_file=sparc/sunos4.h
4220                 tmake_file=sparc/t-sunos41
4221                 use_collect2=yes
4222                 if [ x$gas = xyes ]; then
4223                         tm_file="${tm_file} sparc/sun4gas.h"
4224                 fi
4225                 ;;
4226         sparc-*-sunos3*)
4227                 tm_file=sparc/sun4o3.h
4228                 use_collect2=yes
4229                 ;;
4230         sparc-*-sysv4*)
4231                 tm_file=sparc/sysv4.h
4232                 xm_file="xm-siglist.h sparc/xm-sysv4.h"
4233                 xm_defines="USG POSIX"
4234                 tmake_file=t-svr4
4235                 xmake_file=sparc/x-sysv4
4236                 extra_parts="crtbegin.o crtend.o"
4237                 ;;
4238         sparc-*-vxsim*)
4239                 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
4240                 tm_file=sparc/vxsim.h
4241                 tmake_file=sparc/t-vxsparc
4242                 xmake_file=sparc/x-sysv4
4243                 ;;
4244         sparclet-*-aout*)
4245                 tm_file="sparc/splet.h libgloss.h"
4246                 tmake_file=sparc/t-splet
4247                 ;;
4248         sparclite-*-coff*)
4249                 tm_file="sparc/litecoff.h libgloss.h"
4250                 tmake_file=sparc/t-sparclite
4251                 ;;
4252         sparclite-*-aout*)
4253                 tm_file="sparc/lite.h aoutos.h libgloss.h"
4254                 tmake_file=sparc/t-sparclite
4255                 ;;
4256         sparc64-*-aout*)
4257                 tmake_file=sparc/t-sp64
4258                 tm_file=sparc/sp64-aout.h
4259                 ;;
4260         sparc64-*-elf*)
4261                 tmake_file=sparc/t-sp64
4262                 tm_file=sparc/sp64-elf.h
4263                 extra_parts="crtbegin.o crtend.o"
4264                 ;;
4265         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
4266                 tmake_file=sparc/t-sp64
4267                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
4268                 tm_file=sparc/linux64.h
4269                 xmake_file=x-linux
4270                 fixincludes=Makefile.in # The headers are ok already.
4271                 gnu_ld=yes
4272                 ;;
4273 # This hasn't been upgraded to GCC 2.
4274 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
4275 #               tm_file=tahoe/harris.h
4276 #               ;;
4277 #       tahoe-*-bsd*)                   # tahoe running BSD
4278 #               ;;
4279         thumb-*-coff* | thumbel-*-coff*)
4280                 tm_file=arm/tcoff.h
4281                 out_file=arm/thumb.c
4282                 xm_file=arm/xm-thumb.h
4283                 md_file=arm/thumb.md
4284                 tmake_file=arm/t-thumb
4285                 ;;
4286 # This hasn't been upgraded to GCC 2.
4287 #       tron-*-*)
4288 #               cpu_type=gmicro
4289 #               use_collect2=yes
4290 #               ;;
4291         v850-*-*)
4292                 cpu_type=v850
4293                 tm_file="v850/v850.h"
4294                 xm_file="v850/xm-v850.h"
4295                 tmake_file=v850/t-v850
4296                 if [ x$stabs = xyes ]
4297                 then
4298                         tm_file="${tm_file} dbx.h"
4299                 fi
4300                 use_collect2=no
4301                 ;;
4302         vax-*-bsd*)                     # vaxen running BSD
4303                 use_collect2=yes
4304                 float_format=vax
4305                 ;;
4306         vax-*-sysv*)                    # vaxen running system V
4307                 tm_file="${tm_file} vax/vaxv.h"
4308                 xm_defines=USG
4309                 float_format=vax
4310                 ;;
4311         vax-*-netbsd*)
4312                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
4313                 # On NetBSD, the headers are already okay, except for math.h.
4314                 fixincludes=fixinc.math
4315                 tmake_file=t-netbsd
4316                 float_format=vax
4317                 ;;
4318         vax-*-ultrix*)                  # vaxen running ultrix
4319                 tm_file="${tm_file} vax/ultrix.h"
4320                 use_collect2=yes
4321                 float_format=vax
4322                 ;;
4323         vax-*-vms*)                     # vaxen running VMS
4324                 xm_file=vax/xm-vms.h
4325                 tm_file=vax/vms.h
4326                 float_format=vax
4327                 ;;
4328         vax-*-*)                        # vax default entry
4329                 float_format=vax
4330                 ;;
4331         we32k-att-sysv*)
4332                 xm_file="${xm_file} xm-svr3"
4333                 use_collect2=yes
4334                 ;;
4335         *)
4336                 echo "Configuration $machine not supported" 1>&2
4337                 exit 1
4338                 ;;
4339         esac
4340
4341         case $machine in
4342         *-*-linux-gnu*)
4343                 ;; # Existing GNU/Linux systems do not use the GNU setup.
4344         *-*-gnu*)
4345                 # On the GNU system, the setup is just about the same on
4346                 # each different CPU.  The specific machines that GNU
4347                 # supports are matched above and just set $cpu_type.
4348                 xm_file="xm-gnu.h ${xm_file}"
4349                 tm_file=${cpu_type}/gnu.h
4350                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
4351                 # GNU always uses ELF.
4352                 elf=yes
4353                 # GNU tools are the only tools.
4354                 gnu_ld=yes
4355                 gas=yes
4356                 # On GNU, the headers are already okay.
4357                 fixincludes=Makefile.in
4358                 xmake_file=x-linux      # These details are the same as Linux.
4359                 tmake_file=t-gnu        # These are not.
4360                 ;;
4361         *-*-sysv4*)
4362                 fixincludes=fixinc.svr4
4363                 xmake_try_sysv=x-sysv
4364                 install_headers_dir=install-headers-cpio
4365                 ;;
4366         *-*-sysv*)
4367                 install_headers_dir=install-headers-cpio
4368                 ;;
4369         esac
4370
4371         # Distinguish i[34567]86
4372         # Also, do not run mips-tfile on MIPS if using gas.
4373         # Process --with-cpu= for PowerPC/rs6000
4374         target_cpu_default2=
4375         case $machine in
4376         i486-*-*)
4377                 target_cpu_default2=1
4378                 ;;
4379         i586-*-*)
4380                 target_cpu_default2=2
4381                 ;;
4382         i686-*-* | i786-*-*)
4383                 target_cpu_default2=3
4384                 ;;
4385         alpha*-*-*)
4386                 case $machine in
4387                         alphaev6*)
4388                                 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
4389                                 ;;
4390                         alphapca56*)
4391                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
4392                                 ;;
4393                         alphaev56*)
4394                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
4395                                 ;;
4396                         alphaev5*)
4397                                 target_cpu_default2="MASK_CPU_EV5"
4398                                 ;;
4399                 esac
4400                                 
4401                 if [ x$gas = xyes ]
4402                 then
4403                         if [ "$target_cpu_default2" = "" ]
4404                         then
4405                                 target_cpu_default2="MASK_GAS"
4406                         else
4407                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
4408                         fi
4409                 fi
4410                 ;;
4411         arm*-*-*)
4412                 case "x$with_cpu" in
4413                         x)
4414                                 # The most generic
4415                                 target_cpu_default2="TARGET_CPU_generic"
4416                                 ;;
4417
4418                         # Distinguish cores, and major variants
4419                         # arm7m doesn't exist, but D & I don't affect code
4420                         xarm23678 | xarm250 | xarm67010 \
4421                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
4422                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
4423                         | xstrongarm | xstrongarm110)
4424                                 target_cpu_default2="TARGET_CPU_$with_cpu"
4425                                 ;;
4426
4427                         xyes | xno)
4428                                 echo "--with-cpu must be passed a value" 1>&2
4429                                 exit 1
4430                                 ;;
4431
4432                         *)
4433                                 if [ x$pass2done = xyes ]
4434                                 then
4435                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
4436                                         exit 1
4437                                 fi
4438                                 ;;
4439                 esac
4440                 ;;
4441
4442         mips*-*-ecoff* | mips*-*-elf*)
4443                 if [ x$gas = xyes ]
4444                 then
4445                         if [ x$gnu_ld = xyes ]
4446                         then
4447                                 target_cpu_default2=20
4448                         else
4449                                 target_cpu_default2=16
4450                         fi
4451                 fi
4452                 ;;
4453         mips*-*-*)
4454                 if [ x$gas = xyes ]
4455                 then
4456                         target_cpu_default2=16
4457                 fi
4458                 ;;
4459         powerpc*-*-* | rs6000-*-*)
4460                 case "x$with_cpu" in
4461                         x)
4462                                 ;;
4463
4464                         xcommon | xpower | xpower2 | xpowerpc | xrios \
4465                           | xrios1 | xrios2 | xrsc | xrsc1 \
4466                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
4467                           | x403 | x505 | x801 | x821 | x823 | x860)
4468                                 target_cpu_default2="\"$with_cpu\""
4469                                 ;;
4470
4471                         xyes | xno)
4472                                 echo "--with-cpu must be passed a value" 1>&2
4473                                 exit 1
4474                                 ;;
4475
4476                         *)
4477                                 if [ x$pass2done = xyes ]
4478                                 then
4479                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
4480                                         exit 1
4481                                 fi
4482                                 ;;
4483                 esac
4484                 ;;
4485         sparc*-*-*)
4486                 case ".$with_cpu" in
4487                         .)
4488                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
4489                                 ;;
4490                         .supersparc | .ultrasparc | .v7 | .v8 | .v9)
4491                                 target_cpu_default2="TARGET_CPU_$with_cpu"
4492                                 ;;
4493                         *)
4494                                 if [ x$pass2done = xyes ]
4495                                 then
4496                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
4497                                         exit 1
4498                                 fi
4499                                 ;;
4500                 esac
4501                 ;;
4502         esac
4503
4504         if [ "$target_cpu_default2" != "" ]
4505         then
4506                 if [ "$target_cpu_default" != "" ]
4507                 then
4508                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
4509                 else
4510                         target_cpu_default=$target_cpu_default2
4511                 fi
4512         fi
4513
4514         # No need for collect2 if we have the GNU linker.
4515         case x$gnu_ld in
4516         xyes)
4517                 use_collect2=
4518                 ;;
4519         esac
4520
4521 # Save data on machine being used to compile GCC in build_xm_file.
4522 # Save data on host machine in vars host_xm_file and host_xmake_file.
4523         if [ x$pass1done = x ]
4524         then
4525                 if [ x"$xm_file" = x ]
4526                 then build_xm_file=$cpu_type/xm-$cpu_type.h
4527                 else build_xm_file=$xm_file
4528                 fi
4529                 build_xm_defines=$xm_defines
4530                 build_install_headers_dir=$install_headers_dir
4531                 build_exeext=$exeext
4532                 pass1done=yes
4533         else
4534                 if [ x$pass2done = x ]
4535                 then
4536                         if [ x"$xm_file" = x ]
4537                         then host_xm_file=$cpu_type/xm-$cpu_type.h
4538                         else host_xm_file=$xm_file
4539                         fi
4540                         host_xm_defines=$xm_defines
4541                         if [ x"$xmake_file" = x ]
4542                         then xmake_file=$cpu_type/x-$cpu_type
4543                         fi
4544                         host_xmake_file="$xmake_file"
4545                         host_truncate_target=$truncate_target
4546                         host_extra_gcc_objs=$extra_gcc_objs
4547                         host_extra_objs=$extra_host_objs
4548                         host_exeext=$exeext
4549                         pass2done=yes
4550                 fi
4551         fi
4552 done
4553
4554 extra_objs="${host_extra_objs} ${extra_objs}"
4555
4556 # Default the target-machine variables that were not explicitly set.
4557 if [ x"$tm_file" = x ]
4558 then tm_file=$cpu_type/$cpu_type.h; fi
4559
4560 if [ x$extra_headers = x ]
4561 then extra_headers=; fi
4562
4563 if [ x"$xm_file" = x ]
4564 then xm_file=$cpu_type/xm-$cpu_type.h; fi
4565
4566 if [ x$md_file = x ]
4567 then md_file=$cpu_type/$cpu_type.md; fi
4568
4569 if [ x$out_file = x ]
4570 then out_file=$cpu_type/$cpu_type.c; fi
4571
4572 if [ x"$tmake_file" = x ]
4573 then tmake_file=$cpu_type/t-$cpu_type
4574 fi
4575
4576 if [ x$float_format = x ]
4577 then float_format=i64
4578 fi
4579
4580 if [ x$enable_haifa = x ]
4581 then
4582   case $target in
4583     alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
4584       enable_haifa=yes;;
4585   esac
4586 fi
4587
4588 # Say what files are being used for the output code and MD file.
4589 echo "Using \`$srcdir/config/$out_file' to output insns."
4590 echo "Using \`$srcdir/config/$md_file' as machine description file."
4591
4592 count=a
4593 for f in $tm_file; do
4594         count=${count}x
4595 done
4596 if [ $count = ax ]; then
4597         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4598 else
4599         echo "Using the following target machine macro files:"
4600         for f in $tm_file; do
4601                 echo "  $srcdir/config/$f"
4602         done
4603 fi
4604
4605 count=a
4606 for f in $host_xm_file; do
4607         count=${count}x
4608 done
4609 if [ $count = ax ]; then
4610         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4611 else
4612         echo "Using the following host machine macro files:"
4613         for f in $host_xm_file; do
4614                 echo "  $srcdir/config/$f"
4615         done
4616 fi
4617
4618 if [ "$host_xm_file" != "$build_xm_file" ]; then
4619         count=a
4620         for f in $build_xm_file; do
4621                 count=${count}x
4622         done
4623         if [ $count = ax ]; then
4624                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4625         else
4626                 echo "Using the following build machine macro files:"
4627                 for f in $build_xm_file; do
4628                         echo "  $srcdir/config/$f"
4629                 done
4630         fi
4631 fi
4632
4633 if [ x$thread_file = x ]; then
4634         if [ x$target_thread_file != x ]; then
4635                 thread_file=$target_thread_file
4636         else
4637                 thread_file='single'
4638         fi
4639 fi
4640
4641 # Set up the header files.
4642 # $links is the list of header files to create.
4643 # $vars is the list of shell variables with file names to include.
4644 # auto-host.h is the file containing items generated by autoconf and is
4645 # the first file included by config.h.
4646 null_defines=
4647 host_xm_file="auto-host.h ${host_xm_file}"
4648
4649 # If host=build, it is correct to have hconfig include auto-host.h
4650 # as well.  If host!=build, we are in error and need to do more 
4651 # work to find out the build config parameters.
4652 if [ x$host = x$build ]
4653 then
4654         build_xm_file="auto-host.h ${build_xm_file}"
4655 else
4656         # We create a subdir, then run autoconf in the subdir.
4657         # To prevent recursion we set host and build for the new
4658         # invocation of configure to the build for this invocation
4659         # of configure. 
4660         tempdir=build.$$
4661         rm -rf $tempdir
4662         mkdir $tempdir
4663         cd $tempdir
4664         case ${srcdir} in
4665         /*) realsrcdir=${srcdir};;
4666         *) realsrcdir=../${srcdir};;
4667         esac
4668         CC=${BUILD_CC-cc} ${realsrcdir}/configure \
4669                 --target=$target --host=$build --build=$build
4670
4671         # We just finished tests for the build machine, so rename
4672         # the file auto-build.h in the gcc directory.
4673         mv auto-host.h ../auto-build.h
4674         cd ..
4675         rm -rf $tempdir
4676         build_xm_file="auto-build.h ${build_xm_file}"
4677 fi
4678
4679 vars="host_xm_file tm_file xm_file build_xm_file"
4680 links="config.h tm.h tconfig.h hconfig.h"
4681 defines="host_xm_defines null_defines xm_defines build_xm_defines"
4682
4683 rm -f config.bak
4684 if [ -f config.status ]; then mv -f config.status config.bak; fi
4685
4686 # Make the links.
4687 while [ -n "$vars" ]
4688 do
4689         set $vars; var=$1; shift; vars=$*
4690         set $links; link=$1; shift; links=$*
4691         set $defines; define=$1; shift; defines=$*
4692
4693         rm -f $link
4694
4695         # Define TARGET_CPU_DEFAULT if the system wants one.
4696         # This substitutes for lots of *.h files.
4697         if [ "$target_cpu_default" != "" -a $link = tm.h ]
4698         then
4699                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
4700         fi
4701
4702         for file in `eval echo '$'$var`; do
4703                 echo "#include \"$file\"" >>$link
4704         done
4705
4706         for def in `eval echo '$'$define`; do
4707                 echo "#ifndef $def" >>$link
4708                 echo "#define $def" >>$link
4709                 echo "#endif" >>$link
4710         done
4711 done
4712
4713 # Truncate the target if necessary
4714 if [ x$host_truncate_target != x ]; then
4715         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4716 fi
4717
4718 # Get the version number from the toplevel
4719 version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
4720
4721 # Get an absolute path to the GCC top-level source directory
4722 holddir=`pwd`
4723 cd $srcdir
4724 topdir=`pwd`
4725 cd $holddir
4726
4727 # Conditionalize the makefile for this host machine.
4728 # Make-host contains the concatenation of all host makefile fragments
4729 # [there can be more than one].  This file is built by configure.frag.
4730 host_overrides=Make-host
4731 dep_host_xmake_file=
4732 for f in .. ${host_xmake_file}
4733 do
4734         if [ -f ${srcdir}/config/$f ]
4735         then
4736                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4737         fi
4738 done
4739
4740 # Conditionalize the makefile for this target machine.
4741 # Make-target contains the concatenation of all host makefile fragments
4742 # [there can be more than one].  This file is built by configure.frag.
4743 target_overrides=Make-target
4744 dep_tmake_file=
4745 for f in .. ${tmake_file}
4746 do
4747         if [ -f ${srcdir}/config/$f ]
4748         then
4749                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4750         fi
4751 done
4752
4753 # If the host doesn't support symlinks, modify CC in
4754 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4755 # Otherwise, we can use "CC=$(CC)".
4756 rm -f symtest.tem
4757 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
4758 then
4759         cc_set_by_configure="\$(CC)"
4760         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4761 else
4762         rm -f symtest.tem
4763         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4764         then
4765                 symbolic_link="cp -p"
4766         else
4767                 symbolic_link="cp"
4768         fi
4769         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
4770         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4771 fi
4772 rm -f symtest.tem
4773
4774 out_object_file=`basename $out_file .c`.o
4775
4776 tm_file_list=
4777 for f in $tm_file; do
4778         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
4779 done
4780
4781 host_xm_file_list=
4782 for f in $host_xm_file; do
4783         if test $f != "auto-host.h"; then
4784                 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
4785         else
4786                 host_xm_file_list="${host_xm_file_list} auto-host.h"
4787         fi
4788 done
4789
4790 build_xm_file_list=
4791 for f in $build_xm_file; do
4792         if test $f != "auto-build.h"; then
4793                 if test $f != "auto-host.h"; then
4794                         build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
4795                 else
4796                         build_xm_file_list="${build_xm_file_list} auto-host.h"
4797                 fi
4798         else
4799                 build_xm_file_list="${build_xm_file_list} auto-build.h"
4800         fi
4801 done
4802
4803 # Define macro CROSS_COMPILE in compilation
4804 # if this is a cross-compiler.
4805 # Also use all.cross instead of all.internal
4806 # and add cross-make to Makefile.
4807 cross_overrides="/dev/null"
4808 if [ x$host != x$target ]
4809 then
4810         cross_defines="CROSS=-DCROSS_COMPILE"
4811         cross_overrides="${topdir}/cross-make"
4812 fi
4813
4814 # When building gcc with a cross-compiler, we need to fix a few things.
4815 # This must come after cross-make as we want all.build to override
4816 # all.cross.
4817 build_overrides="/dev/null"
4818 if [ x$build != x$host ]
4819 then
4820         build_overrides="${topdir}/build-make"
4821 fi
4822
4823 # Expand extra_headers to include complete path.
4824 # This substitutes for lots of t-* files.
4825 extra_headers_list=
4826 if [ "x$extra_headers" = x ]
4827 then true
4828 else
4829         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4830         for file in $extra_headers;
4831         do
4832                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4833         done
4834 fi
4835
4836 # Add a definition of USE_COLLECT2 if system wants one.
4837 # Also tell toplev.c what to do.
4838 # This substitutes for lots of t-* files.
4839 if [ x$use_collect2 = x ]
4840 then
4841         will_use_collect2=
4842         maybe_use_collect2=
4843 else
4844         will_use_collect2="collect2"
4845         maybe_use_collect2="-DUSE_COLLECT2"
4846 fi
4847
4848 # NEED TO CONVERT
4849 # Set MD_DEPS if the real md file is in md.pre-cpp.
4850 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
4851 # for line oriented comments, so we must always use a GNU cpp.  If
4852 # building gcc with a cross compiler, use the cross compiler just
4853 # built.  Otherwise, we can use the cpp just built.
4854 md_file_sub=
4855 if [ "x$md_cppflags" = x ]
4856 then
4857         md_file_sub=$srcdir/config/$md_file
4858 else
4859         md_file=md
4860 fi
4861
4862 # If we have gas in the build tree, make a link to it.
4863 if [ -f ../gas/Makefile ]; then
4864         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
4865 fi
4866
4867 # If we have ld in the build tree, make a link to it.
4868 if [ -f ../ld/Makefile ]; then
4869 #       if [[ x$use_collect2 = x ]]; then
4870 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
4871 #       else
4872                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
4873 #       fi
4874 fi
4875
4876 # Figure out what language subdirectories are present.
4877 subdirs=
4878 for lang in ${srcdir}/*/config-lang.in ..
4879 do
4880         case $lang in
4881         ..) ;;
4882         # The odd quoting in the next line works around
4883         # an apparent bug in bash 1.12 on linux.
4884         ${srcdir}/[*]/config-lang.in) ;;
4885         *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
4886         esac
4887 done
4888
4889 # Make gthr-default.h if we have a thread file.
4890 gthread_flags=
4891 if [ $thread_file != single ]; then
4892     rm -f gthr-default.h
4893     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
4894     gthread_flags=-DHAVE_GTHR_DEFAULT
4895 fi
4896
4897
4898 # Make empty files to contain the specs and options for each language.
4899 # Then add #include lines to for a compiler that has specs and/or options.
4900
4901 lang_specs_files=
4902 lang_options_files=
4903 rm -f specs.h options.h
4904 touch specs.h options.h
4905 for subdir in . $subdirs
4906 do
4907         if [ -f $srcdir/$subdir/lang-specs.h ]; then
4908                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4909                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4910         fi
4911         if [ -f $srcdir/$subdir/lang-options.h ]; then
4912                 echo "#include \"$subdir/lang-options.h\"" >>options.h
4913                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4914         fi
4915 done
4916
4917 # These (without "all_") are set in each config-lang.in.
4918 # `language' must be a single word so is spelled singularly.
4919 all_languages=
4920 all_boot_languages=
4921 all_compilers=
4922 all_stagestuff=
4923 all_diff_excludes=
4924 all_outputs=Makefile
4925 # List of language makefile fragments.
4926 all_lang_makefiles=
4927 all_headers=
4928 all_lib2funcs=
4929
4930 # Add the language fragments.
4931 # Languages are added via two mechanisms.  Some information must be
4932 # recorded in makefile variables, these are defined in config-lang.in.
4933 # We accumulate them and plug them into the main Makefile.
4934 # The other mechanism is a set of hooks for each of the main targets
4935 # like `clean', `install', etc.
4936
4937 language_fragments="Make-lang"
4938 language_hooks="Make-hooks"
4939 oldstyle_subdirs=
4940
4941 for s in .. $subdirs
4942 do
4943         if [ $s != ".." ]
4944         then
4945                 language=
4946                 boot_language=
4947                 compilers=
4948                 stagestuff=
4949                 diff_excludes=
4950                 headers=
4951                 outputs=
4952                 lib2funcs=
4953                 . ${srcdir}/$s/config-lang.in
4954                 if [ "x$language" = x ]
4955                 then
4956                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4957                         exit 1
4958                 fi
4959                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4960                 all_languages="$all_languages $language"
4961                 if [ "x$boot_language" = xyes ]
4962                 then
4963                         all_boot_languages="$all_boot_languages $language"
4964                 fi
4965                 all_compilers="$all_compilers $compilers"
4966                 all_stagestuff="$all_stagestuff $stagestuff"
4967                 all_diff_excludes="$all_diff_excludes $diff_excludes"
4968                 all_headers="$all_headers $headers"
4969                 all_outputs="$all_outputs $outputs"
4970                 if [ x$outputs = x ]
4971                 then
4972                         oldstyle_subdirs="$oldstyle_subdirs $s"
4973                 fi
4974                 all_lib2funcs="$all_lib2funcs $lib2funcs"
4975         fi
4976 done
4977
4978 # Since we can't use `::' targets, we link each language in
4979 # with a set of hooks, reached indirectly via lang.${target}.
4980
4981 rm -f Make-hooks
4982 touch Make-hooks
4983 target_list="all.build all.cross start.encap rest.encap \
4984         info dvi \
4985         install-normal install-common install-info install-man \
4986         uninstall distdir \
4987         mostlyclean clean distclean extraclean maintainer-clean \
4988         stage1 stage2 stage3 stage4"
4989 for t in $target_list
4990 do
4991         x=
4992         for l in .. $all_languages
4993         do
4994                 if [ $l != ".." ]; then
4995                         x="$x $l.$t"
4996                 fi
4997         done
4998         echo "lang.$t: $x" >> Make-hooks
4999 done
5000
5001 # If we're not building in srcdir, create .gdbinit.
5002
5003 if [ ! -f Makefile.in ]; then
5004         echo "dir ." > .gdbinit
5005         echo "dir ${srcdir}" >> .gdbinit
5006         if [ x$gdb_needs_out_file_path = xyes ]
5007         then
5008                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
5009         fi
5010         if [ "x$subdirs" != x ]; then
5011                 for s in $subdirs
5012                 do
5013                         echo "dir ${srcdir}/$s" >> .gdbinit
5014                 done
5015         fi
5016         echo "source ${srcdir}/.gdbinit" >> .gdbinit
5017 fi
5018
5019 # If this is using newlib, then define inhibit_libc in
5020 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
5021 # libgcc.a, but that's OK because newib should have its own version of
5022 # assert.h.
5023 inhibit_libc=
5024 if [ x$with_newlib = xyes ]; then
5025         inhibit_libc=-Dinhibit_libc
5026 fi
5027
5028
5029 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
5030 sched_prefix=
5031 sched_cflags=
5032 if [ x$enable_haifa = xyes ]; then
5033     echo "Using the Haifa scheduler."
5034     sched_prefix=haifa-
5035     sched_cflags=-DHAIFA
5036 fi
5037
5038
5039 if [ x$enable_haifa != x ]; then
5040     # Explicitly remove files that need to be recompiled for the Haifa scheduler.
5041     for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
5042         if [ -f $x ]; then
5043             echo "Removing $x"
5044             rm -f $x
5045         fi
5046     done
5047 fi
5048
5049 # Process the language and host/target makefile fragments.
5050 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
5051
5052 # Substitute configuration variables
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104 # Echo that links are built
5105 if [ x$host = x$target ]
5106 then
5107         str1="native "
5108 else
5109         str1="cross-"
5110         str2=" from $host"
5111 fi
5112
5113 if [ x$host != x$build ]
5114 then
5115         str3=" on a $build system"
5116 fi
5117
5118 if [ "x$str2" != x ] || [ "x$str3" != x ]
5119 then
5120         str4=
5121 fi
5122
5123 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
5124
5125 if [ "x$str2" != x ] || [ "x$str3" != x ]
5126 then
5127         echo " ${str2}${str3}." 1>&2
5128 fi
5129
5130 # Truncate the target if necessary
5131 if [ x$host_truncate_target != x ]; then
5132         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5133 fi
5134
5135 # Configure the subdirectories
5136 # AC_CONFIG_SUBDIRS($subdirs)
5137
5138 # Create the Makefile
5139 # and configure language subdirectories
5140 trap '' 1 2 15
5141 cat > confcache <<\EOF
5142 # This file is a shell script that caches the results of configure
5143 # tests run on this system so they can be shared between configure
5144 # scripts and configure runs.  It is not useful on other systems.
5145 # If it contains results you don't want to keep, you may remove or edit it.
5146 #
5147 # By default, configure uses ./config.cache as the cache file,
5148 # creating it if it does not exist already.  You can give configure
5149 # the --cache-file=FILE option to use a different cache file; that is
5150 # what configure does when it calls configure scripts in
5151 # subdirectories, so they share the cache.
5152 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5153 # config.status only pays attention to the cache file if you give it the
5154 # --recheck option to rerun configure.
5155 #
5156 EOF
5157 # The following way of writing the cache mishandles newlines in values,
5158 # but we know of no workaround that is simple, portable, and efficient.
5159 # So, don't put newlines in cache variables' values.
5160 # Ultrix sh set writes to stderr and can't be redirected directly,
5161 # and sets the high bit in the cache file unless we assign to the vars.
5162 (set) 2>&1 |
5163   case `(ac_space=' '; set) 2>&1 | grep ac_space` in
5164   *ac_space=\ *)
5165     # `set' does not quote correctly, so add quotes (double-quote substitution
5166     # turns \\\\ into \\, and sed turns \\ into \).
5167     sed -n \
5168       -e "s/'/'\\\\''/g" \
5169       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5170     ;;
5171   *)
5172     # `set' quotes correctly as required by POSIX, so do not add quotes.
5173     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5174     ;;
5175   esac >> confcache
5176 if cmp -s $cache_file confcache; then
5177   :
5178 else
5179   if test -w $cache_file; then
5180     echo "updating cache $cache_file"
5181     cat confcache > $cache_file
5182   else
5183     echo "not updating unwritable cache $cache_file"
5184   fi
5185 fi
5186 rm -f confcache
5187
5188 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5189
5190 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5191 # Let make expand exec_prefix.
5192 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5193
5194 # Any assignment to VPATH causes Sun make to only execute
5195 # the first set of double-colon rules, so remove it if not needed.
5196 # If there is a colon in the path, we need to keep it.
5197 if test "x$srcdir" = x.; then
5198   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5199 fi
5200
5201 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5202
5203 DEFS=-DHAVE_CONFIG_H
5204
5205 # Without the "./", some shells look in PATH for config.status.
5206 : ${CONFIG_STATUS=./config.status}
5207
5208 echo creating $CONFIG_STATUS
5209 rm -f $CONFIG_STATUS
5210 cat > $CONFIG_STATUS <<EOF
5211 #! /bin/sh
5212 # Generated automatically by configure.
5213 # Run this file to recreate the current configuration.
5214 # This directory was configured as follows,
5215 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5216 #
5217 # $0 $ac_configure_args
5218 #
5219 # Compiler output produced by configure, useful for debugging
5220 # configure, is in ./config.log if it exists.
5221
5222 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5223 for ac_option
5224 do
5225   case "\$ac_option" in
5226   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5227     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5228     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5229   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5230     echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
5231     exit 0 ;;
5232   -help | --help | --hel | --he | --h)
5233     echo "\$ac_cs_usage"; exit 0 ;;
5234   *) echo "\$ac_cs_usage"; exit 1 ;;
5235   esac
5236 done
5237
5238 ac_given_srcdir=$srcdir
5239
5240 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5241 EOF
5242 cat >> $CONFIG_STATUS <<EOF
5243
5244 # Protect against being on the right side of a sed subst in config.status.
5245 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5246  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5247 $ac_vpsub
5248 $extrasub
5249 s%@SHELL@%$SHELL%g
5250 s%@CFLAGS@%$CFLAGS%g
5251 s%@CPPFLAGS@%$CPPFLAGS%g
5252 s%@CXXFLAGS@%$CXXFLAGS%g
5253 s%@DEFS@%$DEFS%g
5254 s%@LDFLAGS@%$LDFLAGS%g
5255 s%@LIBS@%$LIBS%g
5256 s%@exec_prefix@%$exec_prefix%g
5257 s%@prefix@%$prefix%g
5258 s%@program_transform_name@%$program_transform_name%g
5259 s%@bindir@%$bindir%g
5260 s%@sbindir@%$sbindir%g
5261 s%@libexecdir@%$libexecdir%g
5262 s%@datadir@%$datadir%g
5263 s%@sysconfdir@%$sysconfdir%g
5264 s%@sharedstatedir@%$sharedstatedir%g
5265 s%@localstatedir@%$localstatedir%g
5266 s%@libdir@%$libdir%g
5267 s%@includedir@%$includedir%g
5268 s%@oldincludedir@%$oldincludedir%g
5269 s%@infodir@%$infodir%g
5270 s%@mandir@%$mandir%g
5271 s%@host@%$host%g
5272 s%@host_alias@%$host_alias%g
5273 s%@host_cpu@%$host_cpu%g
5274 s%@host_vendor@%$host_vendor%g
5275 s%@host_os@%$host_os%g
5276 s%@target@%$target%g
5277 s%@target_alias@%$target_alias%g
5278 s%@target_cpu@%$target_cpu%g
5279 s%@target_vendor@%$target_vendor%g
5280 s%@target_os@%$target_os%g
5281 s%@build@%$build%g
5282 s%@build_alias@%$build_alias%g
5283 s%@build_cpu@%$build_cpu%g
5284 s%@build_vendor@%$build_vendor%g
5285 s%@build_os@%$build_os%g
5286 s%@CC@%$CC%g
5287 s%@SET_MAKE@%$SET_MAKE%g
5288 s%@AWK@%$AWK%g
5289 s%@LEX@%$LEX%g
5290 s%@LEXLIB@%$LEXLIB%g
5291 s%@LN@%$LN%g
5292 s%@LN_S@%$LN_S%g
5293 s%@RANLIB@%$RANLIB%g
5294 s%@YACC@%$YACC%g
5295 s%@INSTALL@%$INSTALL%g
5296 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5297 s%@INSTALL_DATA@%$INSTALL_DATA%g
5298 s%@CPP@%$CPP%g
5299 s%@manext@%$manext%g
5300 s%@objext@%$objext%g
5301 s%@gthread_flags@%$gthread_flags%g
5302 s%@inhibit_libc@%$inhibit_libc%g
5303 s%@sched_prefix@%$sched_prefix%g
5304 s%@sched_cflags@%$sched_cflags%g
5305 s%@subdirs@%$subdirs%g
5306 s%@all_languages@%$all_languages%g
5307 s%@all_boot_languages@%$all_boot_languages%g
5308 s%@all_compilers@%$all_compilers%g
5309 s%@all_lang_makefiles@%$all_lang_makefiles%g
5310 s%@all_stagestuff@%$all_stagestuff%g
5311 s%@all_diff_excludes@%$all_diff_excludes%g
5312 s%@all_lib2funcs@%$all_lib2funcs%g
5313 s%@all_headers@%$all_headers%g
5314 s%@extra_passes@%$extra_passes%g
5315 s%@extra_programs@%$extra_programs%g
5316 s%@extra_parts@%$extra_parts%g
5317 s%@extra_c_objs@%$extra_c_objs%g
5318 s%@extra_c_flags@%$extra_c_flags%g
5319 s%@extra_objs@%$extra_objs%g
5320 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
5321 s%@extra_headers_list@%$extra_headers_list%g
5322 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
5323 s%@dep_tmake_file@%$dep_tmake_file%g
5324 s%@out_file@%$out_file%g
5325 s%@out_object_file@%$out_object_file%g
5326 s%@md_file@%$md_file%g
5327 s%@tm_file_list@%$tm_file_list%g
5328 s%@build_xm_file_list@%$build_xm_file_list%g
5329 s%@host_xm_file_list@%$host_xm_file_list%g
5330 s%@lang_specs_files@%$lang_specs_files%g
5331 s%@lang_options_files@%$lang_options_files%g
5332 s%@thread_file@%$thread_file%g
5333 s%@version@%$version%g
5334 s%@local_prefix@%$local_prefix%g
5335 s%@gxx_include_dir@%$gxx_include_dir%g
5336 s%@fixincludes@%$fixincludes%g
5337 s%@build_install_headers_dir@%$build_install_headers_dir%g
5338 s%@build_exeext@%$build_exeext%g
5339 s%@host_exeext@%$host_exeext%g
5340 s%@float_format@%$float_format%g
5341 s%@will_use_collect2@%$will_use_collect2%g
5342 s%@maybe_use_collect2@%$maybe_use_collect2%g
5343 s%@cc_set_by_configure@%$cc_set_by_configure%g
5344 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
5345 s%@install@%$install%g
5346 s%@symbolic_link@%$symbolic_link%g
5347 /@target_overrides@/r $target_overrides
5348 s%@target_overrides@%%g
5349 /@host_overrides@/r $host_overrides
5350 s%@host_overrides@%%g
5351 s%@cross_defines@%$cross_defines%g
5352 /@cross_overrides@/r $cross_overrides
5353 s%@cross_overrides@%%g
5354 /@build_overrides@/r $build_overrides
5355 s%@build_overrides@%%g
5356 /@language_fragments@/r $language_fragments
5357 s%@language_fragments@%%g
5358 /@language_hooks@/r $language_hooks
5359 s%@language_hooks@%%g
5360
5361 CEOF
5362 EOF
5363
5364 cat >> $CONFIG_STATUS <<\EOF
5365
5366 # Split the substitutions into bite-sized pieces for seds with
5367 # small command number limits, like on Digital OSF/1 and HP-UX.
5368 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5369 ac_file=1 # Number of current file.
5370 ac_beg=1 # First line for current file.
5371 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5372 ac_more_lines=:
5373 ac_sed_cmds=""
5374 while $ac_more_lines; do
5375   if test $ac_beg -gt 1; then
5376     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5377   else
5378     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5379   fi
5380   if test ! -s conftest.s$ac_file; then
5381     ac_more_lines=false
5382     rm -f conftest.s$ac_file
5383   else
5384     if test -z "$ac_sed_cmds"; then
5385       ac_sed_cmds="sed -f conftest.s$ac_file"
5386     else
5387       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5388     fi
5389     ac_file=`expr $ac_file + 1`
5390     ac_beg=$ac_end
5391     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5392   fi
5393 done
5394 if test -z "$ac_sed_cmds"; then
5395   ac_sed_cmds=cat
5396 fi
5397 EOF
5398
5399 cat >> $CONFIG_STATUS <<EOF
5400
5401 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
5402 EOF
5403 cat >> $CONFIG_STATUS <<\EOF
5404 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5405   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5406   case "$ac_file" in
5407   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5408        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5409   *) ac_file_in="${ac_file}.in" ;;
5410   esac
5411
5412   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5413
5414   # Remove last slash and all that follows it.  Not all systems have dirname.
5415   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5416   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5417     # The file is in a subdirectory.
5418     test ! -d "$ac_dir" && mkdir "$ac_dir"
5419     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5420     # A "../" for each directory in $ac_dir_suffix.
5421     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5422   else
5423     ac_dir_suffix= ac_dots=
5424   fi
5425
5426   case "$ac_given_srcdir" in
5427   .)  srcdir=.
5428       if test -z "$ac_dots"; then top_srcdir=.
5429       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5430   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5431   *) # Relative path.
5432     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5433     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5434   esac
5435
5436
5437   echo creating "$ac_file"
5438   rm -f "$ac_file"
5439   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5440   case "$ac_file" in
5441   *Makefile*) ac_comsub="1i\\
5442 # $configure_input" ;;
5443   *) ac_comsub= ;;
5444   esac
5445
5446   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5447   sed -e "$ac_comsub
5448 s%@configure_input@%$configure_input%g
5449 s%@srcdir@%$srcdir%g
5450 s%@top_srcdir@%$top_srcdir%g
5451 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5452 fi; done
5453 rm -f conftest.s*
5454
5455 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5456 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5457 #
5458 # ac_d sets the value in "#define NAME VALUE" lines.
5459 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5460 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5461 ac_dC='\3'
5462 ac_dD='%g'
5463 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5464 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5465 ac_uB='\([      ]\)%\1#\2define\3'
5466 ac_uC=' '
5467 ac_uD='\4%g'
5468 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5469 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5470 ac_eB='$%\1#\2define\3'
5471 ac_eC=' '
5472 ac_eD='%g'
5473
5474 if test "${CONFIG_HEADERS+set}" != set; then
5475 EOF
5476 cat >> $CONFIG_STATUS <<EOF
5477   CONFIG_HEADERS="auto-host.h:config.in"
5478 EOF
5479 cat >> $CONFIG_STATUS <<\EOF
5480 fi
5481 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5482   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5483   case "$ac_file" in
5484   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5485        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5486   *) ac_file_in="${ac_file}.in" ;;
5487   esac
5488
5489   echo creating $ac_file
5490
5491   rm -f conftest.frag conftest.in conftest.out
5492   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5493   cat $ac_file_inputs > conftest.in
5494
5495 EOF
5496
5497 # Transform confdefs.h into a sed script conftest.vals that substitutes
5498 # the proper values into config.h.in to produce config.h.  And first:
5499 # Protect against being on the right side of a sed subst in config.status.
5500 # Protect against being in an unquoted here document in config.status.
5501 rm -f conftest.vals
5502 cat > conftest.hdr <<\EOF
5503 s/[\\&%]/\\&/g
5504 s%[\\$`]%\\&%g
5505 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5506 s%ac_d%ac_u%gp
5507 s%ac_u%ac_e%gp
5508 EOF
5509 sed -n -f conftest.hdr confdefs.h > conftest.vals
5510 rm -f conftest.hdr
5511
5512 # This sed command replaces #undef with comments.  This is necessary, for
5513 # example, in the case of _POSIX_SOURCE, which is predefined and required
5514 # on some systems where configure will not decide to define it.
5515 cat >> conftest.vals <<\EOF
5516 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5517 EOF
5518
5519 # Break up conftest.vals because some shells have a limit on
5520 # the size of here documents, and old seds have small limits too.
5521
5522 rm -f conftest.tail
5523 while :
5524 do
5525   ac_lines=`grep -c . conftest.vals`
5526   # grep -c gives empty output for an empty file on some AIX systems.
5527   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5528   # Write a limited-size here document to conftest.frag.
5529   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5530   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5531   echo 'CEOF
5532   sed -f conftest.frag conftest.in > conftest.out
5533   rm -f conftest.in
5534   mv conftest.out conftest.in
5535 ' >> $CONFIG_STATUS
5536   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5537   rm -f conftest.vals
5538   mv conftest.tail conftest.vals
5539 done
5540 rm -f conftest.vals
5541
5542 cat >> $CONFIG_STATUS <<\EOF
5543   rm -f conftest.frag conftest.h
5544   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5545   cat conftest.in >> conftest.h
5546   rm -f conftest.in
5547   if cmp -s $ac_file conftest.h 2>/dev/null; then
5548     echo "$ac_file is unchanged"
5549     rm -f conftest.h
5550   else
5551     # Remove last slash and all that follows it.  Not all systems have dirname.
5552       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5553       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5554       # The file is in a subdirectory.
5555       test ! -d "$ac_dir" && mkdir "$ac_dir"
5556     fi
5557     rm -f $ac_file
5558     mv conftest.h $ac_file
5559   fi
5560 fi; done
5561
5562 EOF
5563 cat >> $CONFIG_STATUS <<EOF
5564
5565 host='${host}'
5566 build='${build}'
5567 target='${target}'
5568 target_alias='${target_alias}'
5569 srcdir='${srcdir}'
5570 subdirs='${subdirs}'
5571 oldstyle_subdirs='${oldstyle_subdirs}'
5572 symbolic_link='${symbolic_link}'
5573 program_transform_set='${program_transform_set}'
5574 program_transform_name='${program_transform_name}'
5575 dep_host_xmake_file='${dep_host_xmake_file}'
5576 host_xmake_file='${host_xmake_file}'
5577 dep_tmake_file='${dep_tmake_file}'
5578 tmake_file='${tmake_file}'
5579 thread_file='${thread_file}'
5580 version='${version}'
5581 local_prefix='${local_prefix}'
5582 build_install_headers_dir='${build_install_headers_dir}'
5583 build_exeext='${build_exeext}'
5584 host_exeext='${host_exeext}'
5585 out_file='${out_file}'
5586 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5587 SET_MAKE='${SET_MAKE}'
5588 target_list='${target_list}'
5589 target_overrides='${target_overrides}'
5590 host_overrides='${host_overrides}'
5591 cross_defines='${cross_defines}'
5592 cross_overrides='${cross_overrides}'
5593 build_overrides='${build_overrides}'
5594
5595 EOF
5596 cat >> $CONFIG_STATUS <<\EOF
5597
5598 . $srcdir/configure.lang
5599 case x$CONFIG_HEADERS in
5600 xauto-host.h:config.in)
5601 echo > cstamp-h ;;
5602 esac
5603 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
5604 # bootstrapping and the installation procedure can still use
5605 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
5606 # FLAGS_TO_PASS has been modified to solve the problem there.
5607 # This is virtually a duplicate of what happens in configure.lang; we do
5608 # an extra check to make sure this only happens if ln -s can be used.
5609 if [ "$symbolic_link" = "ln -s" ]; then
5610  for d in .. ${subdirs} ; do
5611    if [ $d != .. ]; then
5612         STARTDIR=`pwd`
5613         cd $d
5614         for t in stage1 stage2 stage3 stage4 include
5615         do
5616                 rm -f $t
5617                 $symbolic_link ../$t $t 2>/dev/null
5618         done
5619         cd $STARTDIR
5620    fi
5621  done
5622 else true ; fi
5623
5624 exit 0
5625 EOF
5626 chmod +x $CONFIG_STATUS
5627 rm -fr confdefs* $ac_clean_files
5628 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5629