OSDN Git Service

PR bootstrap/12512
[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.13 
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-local-prefix=DIR specifies directory to put local include"
16 ac_help="$ac_help
17   --with-gxx-include-dir=DIR
18                           specifies directory to put g++ header files"
19 ac_help="$ac_help
20   --with-cpp-install-dir=DIR
21                           install the user visible C preprocessor in DIR
22                           (relative to PREFIX) as well as PREFIX/bin"
23 ac_help="$ac_help
24   --with-gnu-ld           arrange to work with GNU ld."
25 ac_help="$ac_help
26   --with-ld               arrange to use the specified ld (full pathname)"
27 ac_help="$ac_help
28   --with-gnu-as           arrange to work with GNU as"
29 ac_help="$ac_help
30   --with-as               arrange to use the specified as (full pathname)"
31 ac_help="$ac_help
32   --enable-werror         enable -Werror in bootstrap stage2 and later"
33 ac_help="$ac_help
34   --enable-checking[=LIST]
35                           enable expensive run-time checks.  With LIST,
36                           enable only specific categories of checks.
37                           Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
38                           default is misc,tree,gc,rtlflag"
39 ac_help="$ac_help
40   --enable-coverage[=LEVEL]
41                           enable compiler\'s code coverage collection.
42                           Use to measure compiler performance and locate
43                           unused parts of the compiler. With LEVEL, specify
44                           optimization. Values are opt, noopt,
45                           default is noopt"
46 ac_help="$ac_help
47   --with-stabs            arrange to use stabs instead of host debug format"
48 ac_help="$ac_help
49   --enable-multilib       enable library support for multiple ABIs"
50 ac_help="$ac_help
51   --enable-__cxa_atexit   enable __cxa_atexit for C++"
52 ac_help="$ac_help
53   --enable-threads        enable thread usage for target GCC
54   --enable-threads=LIB    use LIB thread package for target GCC"
55 ac_help="$ac_help
56   --enable-objc-gc        enable the use of Boehm's garbage collector with
57                           the GNU Objective-C runtime"
58 ac_help="$ac_help
59   --with-dwarf2           force the default debug format to be DWARF 2"
60 ac_help="$ac_help
61   --disable-shared        don't provide a shared libgcc"
62 ac_help="$ac_help
63   --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
64 ac_help="$ac_help
65   --enable-intermodule    build the compiler in one step"
66 ac_help="$ac_help
67   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
68 ac_help="$ac_help
69   --enable-initfini-array       use .init_array/.fini_array sections"
70 ac_help="$ac_help
71   --enable-sjlj-exceptions
72                           arrange to use setjmp/longjmp exception handling"
73 ac_help="$ac_help
74   --enable-libunwind-exceptions  force use libunwind for exceptions"
75 ac_help="$ac_help
76   --disable-win32-registry
77                           disable lookup of installation paths in the
78                           Registry on Windows hosts
79   --enable-win32-registry enable registry lookup (default)
80   --enable-win32-registry=KEY
81                           use KEY instead of GCC version as the last portion
82                           of the registry key"
83 ac_help="$ac_help
84   --with-gc={simple,page} choose the garbage collection mechanism to use
85                           with the compiler"
86 ac_help="$ac_help
87   --with-system-zlib      use installed libz"
88 ac_help="$ac_help
89   --enable-maintainer-mode
90                           enable make rules and dependencies not useful
91                           (and sometimes confusing) to the casual installer"
92 ac_help="$ac_help
93   --enable-version-specific-runtime-libs
94                           specify that runtime libraries should be
95                           installed in a compiler-specific directory"
96 ac_help="$ac_help
97   --with-slibdir=DIR      shared libraries in DIR [LIBDIR]"
98
99 # Initialize some variables set by options.
100 # The variables have the same names as the options, with
101 # dashes changed to underlines.
102 build=NONE
103 cache_file=./config.cache
104 exec_prefix=NONE
105 host=NONE
106 no_create=
107 nonopt=NONE
108 no_recursion=
109 prefix=NONE
110 program_prefix=NONE
111 program_suffix=NONE
112 program_transform_name=s,x,x,
113 silent=
114 site=
115 srcdir=
116 target=NONE
117 verbose=
118 x_includes=NONE
119 x_libraries=NONE
120 bindir='${exec_prefix}/bin'
121 sbindir='${exec_prefix}/sbin'
122 libexecdir='${exec_prefix}/libexec'
123 datadir='${prefix}/share'
124 sysconfdir='${prefix}/etc'
125 sharedstatedir='${prefix}/com'
126 localstatedir='${prefix}/var'
127 libdir='${exec_prefix}/lib'
128 includedir='${prefix}/include'
129 oldincludedir='/usr/include'
130 infodir='${prefix}/info'
131 mandir='${prefix}/man'
132
133 # Initialize some other variables.
134 subdirs=
135 MFLAGS= MAKEFLAGS=
136 SHELL=${CONFIG_SHELL-/bin/sh}
137 # Maximum number of lines to put in a shell here document.
138 ac_max_here_lines=12
139
140 ac_prev=
141 for ac_option
142 do
143
144   # If the previous option needs an argument, assign it.
145   if test -n "$ac_prev"; then
146     eval "$ac_prev=\$ac_option"
147     ac_prev=
148     continue
149   fi
150
151   case "$ac_option" in
152   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
153   *) ac_optarg= ;;
154   esac
155
156   # Accept the important Cygnus configure options, so we can diagnose typos.
157
158   case "$ac_option" in
159
160   -bindir | --bindir | --bindi | --bind | --bin | --bi)
161     ac_prev=bindir ;;
162   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
163     bindir="$ac_optarg" ;;
164
165   -build | --build | --buil | --bui | --bu)
166     ac_prev=build ;;
167   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
168     build="$ac_optarg" ;;
169
170   -cache-file | --cache-file | --cache-fil | --cache-fi \
171   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
172     ac_prev=cache_file ;;
173   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
174   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
175     cache_file="$ac_optarg" ;;
176
177   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
178     ac_prev=datadir ;;
179   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
180   | --da=*)
181     datadir="$ac_optarg" ;;
182
183   -disable-* | --disable-*)
184     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
185     # Reject names that are not valid shell variable names.
186     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
187       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
188     fi
189     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
190     eval "enable_${ac_feature}=no" ;;
191
192   -enable-* | --enable-*)
193     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
194     # Reject names that are not valid shell variable names.
195     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
196       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197     fi
198     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199     case "$ac_option" in
200       *=*) ;;
201       *) ac_optarg=yes ;;
202     esac
203     eval "enable_${ac_feature}='$ac_optarg'" ;;
204
205   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
206   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
207   | --exec | --exe | --ex)
208     ac_prev=exec_prefix ;;
209   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
210   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
211   | --exec=* | --exe=* | --ex=*)
212     exec_prefix="$ac_optarg" ;;
213
214   -gas | --gas | --ga | --g)
215     # Obsolete; use --with-gas.
216     with_gas=yes ;;
217
218   -help | --help | --hel | --he)
219     # Omit some internal or obsolete options to make the list less imposing.
220     # This message is too long to be a string in the A/UX 3.1 sh.
221     cat << EOF
222 Usage: configure [options] [host]
223 Options: [defaults in brackets after descriptions]
224 Configuration:
225   --cache-file=FILE       cache test results in FILE
226   --help                  print this message
227   --no-create             do not create output files
228   --quiet, --silent       do not print \`checking...' messages
229   --version               print the version of autoconf that created configure
230 Directory and file names:
231   --prefix=PREFIX         install architecture-independent files in PREFIX
232                           [$ac_default_prefix]
233   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
234                           [same as prefix]
235   --bindir=DIR            user executables in DIR [EPREFIX/bin]
236   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
237   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
238   --datadir=DIR           read-only architecture-independent data in DIR
239                           [PREFIX/share]
240   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
241   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
242                           [PREFIX/com]
243   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
244   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
245   --includedir=DIR        C header files in DIR [PREFIX/include]
246   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
247   --infodir=DIR           info documentation in DIR [PREFIX/info]
248   --mandir=DIR            man documentation in DIR [PREFIX/man]
249   --srcdir=DIR            find the sources in DIR [configure dir or ..]
250   --program-prefix=PREFIX prepend PREFIX to installed program names
251   --program-suffix=SUFFIX append SUFFIX to installed program names
252   --program-transform-name=PROGRAM
253                           run sed PROGRAM on installed program names
254 EOF
255     cat << EOF
256 Host type:
257   --build=BUILD           configure for building on BUILD [BUILD=HOST]
258   --host=HOST             configure for HOST [guessed]
259   --target=TARGET         configure for TARGET [TARGET=HOST]
260 Features and packages:
261   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
262   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
263   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
264   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
265   --x-includes=DIR        X include files are in DIR
266   --x-libraries=DIR       X library files are in DIR
267 EOF
268     if test -n "$ac_help"; then
269       echo "--enable and --with options recognized:$ac_help"
270     fi
271     exit 0 ;;
272
273   -host | --host | --hos | --ho)
274     ac_prev=host ;;
275   -host=* | --host=* | --hos=* | --ho=*)
276     host="$ac_optarg" ;;
277
278   -includedir | --includedir | --includedi | --included | --include \
279   | --includ | --inclu | --incl | --inc)
280     ac_prev=includedir ;;
281   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
282   | --includ=* | --inclu=* | --incl=* | --inc=*)
283     includedir="$ac_optarg" ;;
284
285   -infodir | --infodir | --infodi | --infod | --info | --inf)
286     ac_prev=infodir ;;
287   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
288     infodir="$ac_optarg" ;;
289
290   -libdir | --libdir | --libdi | --libd)
291     ac_prev=libdir ;;
292   -libdir=* | --libdir=* | --libdi=* | --libd=*)
293     libdir="$ac_optarg" ;;
294
295   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
296   | --libexe | --libex | --libe)
297     ac_prev=libexecdir ;;
298   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
299   | --libexe=* | --libex=* | --libe=*)
300     libexecdir="$ac_optarg" ;;
301
302   -localstatedir | --localstatedir | --localstatedi | --localstated \
303   | --localstate | --localstat | --localsta | --localst \
304   | --locals | --local | --loca | --loc | --lo)
305     ac_prev=localstatedir ;;
306   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
307   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
308   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
309     localstatedir="$ac_optarg" ;;
310
311   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
312     ac_prev=mandir ;;
313   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
314     mandir="$ac_optarg" ;;
315
316   -nfp | --nfp | --nf)
317     # Obsolete; use --without-fp.
318     with_fp=no ;;
319
320   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
321   | --no-cr | --no-c)
322     no_create=yes ;;
323
324   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
325   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
326     no_recursion=yes ;;
327
328   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
329   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
330   | --oldin | --oldi | --old | --ol | --o)
331     ac_prev=oldincludedir ;;
332   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
333   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
334   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
335     oldincludedir="$ac_optarg" ;;
336
337   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
338     ac_prev=prefix ;;
339   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
340     prefix="$ac_optarg" ;;
341
342   -program-prefix | --program-prefix | --program-prefi | --program-pref \
343   | --program-pre | --program-pr | --program-p)
344     ac_prev=program_prefix ;;
345   -program-prefix=* | --program-prefix=* | --program-prefi=* \
346   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
347     program_prefix="$ac_optarg" ;;
348
349   -program-suffix | --program-suffix | --program-suffi | --program-suff \
350   | --program-suf | --program-su | --program-s)
351     ac_prev=program_suffix ;;
352   -program-suffix=* | --program-suffix=* | --program-suffi=* \
353   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
354     program_suffix="$ac_optarg" ;;
355
356   -program-transform-name | --program-transform-name \
357   | --program-transform-nam | --program-transform-na \
358   | --program-transform-n | --program-transform- \
359   | --program-transform | --program-transfor \
360   | --program-transfo | --program-transf \
361   | --program-trans | --program-tran \
362   | --progr-tra | --program-tr | --program-t)
363     ac_prev=program_transform_name ;;
364   -program-transform-name=* | --program-transform-name=* \
365   | --program-transform-nam=* | --program-transform-na=* \
366   | --program-transform-n=* | --program-transform-=* \
367   | --program-transform=* | --program-transfor=* \
368   | --program-transfo=* | --program-transf=* \
369   | --program-trans=* | --program-tran=* \
370   | --progr-tra=* | --program-tr=* | --program-t=*)
371     program_transform_name="$ac_optarg" ;;
372
373   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
374   | -silent | --silent | --silen | --sile | --sil)
375     silent=yes ;;
376
377   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
378     ac_prev=sbindir ;;
379   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
380   | --sbi=* | --sb=*)
381     sbindir="$ac_optarg" ;;
382
383   -sharedstatedir | --sharedstatedir | --sharedstatedi \
384   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
385   | --sharedst | --shareds | --shared | --share | --shar \
386   | --sha | --sh)
387     ac_prev=sharedstatedir ;;
388   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
389   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
390   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
391   | --sha=* | --sh=*)
392     sharedstatedir="$ac_optarg" ;;
393
394   -site | --site | --sit)
395     ac_prev=site ;;
396   -site=* | --site=* | --sit=*)
397     site="$ac_optarg" ;;
398
399   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
400     ac_prev=srcdir ;;
401   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
402     srcdir="$ac_optarg" ;;
403
404   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
405   | --syscon | --sysco | --sysc | --sys | --sy)
406     ac_prev=sysconfdir ;;
407   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
408   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
409     sysconfdir="$ac_optarg" ;;
410
411   -target | --target | --targe | --targ | --tar | --ta | --t)
412     ac_prev=target ;;
413   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
414     target="$ac_optarg" ;;
415
416   -v | -verbose | --verbose | --verbos | --verbo | --verb)
417     verbose=yes ;;
418
419   -version | --version | --versio | --versi | --vers)
420     echo "configure generated by autoconf version 2.13"
421     exit 0 ;;
422
423   -with-* | --with-*)
424     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428     fi
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_${ac_package}='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
438     # Reject names that are not valid shell variable names.
439     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
440       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
441     fi
442     ac_package=`echo $ac_package| sed 's/-/_/g'`
443     eval "with_${ac_package}=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes="$ac_optarg" ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries="$ac_optarg" ;;
462
463   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
464     ;;
465
466   *)
467     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
468       echo "configure: warning: $ac_option: invalid host type" 1>&2
469     fi
470     if test "x$nonopt" != xNONE; then
471       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
472     fi
473     nonopt="$ac_option"
474     ;;
475
476   esac
477 done
478
479 if test -n "$ac_prev"; then
480   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
481 fi
482
483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
484
485 # File descriptor usage:
486 # 0 standard input
487 # 1 file creation
488 # 2 errors and warnings
489 # 3 some systems may open it to /dev/tty
490 # 4 used on the Kubota Titan
491 # 6 checking for... messages and results
492 # 5 compiler messages saved in config.log
493 if test "$silent" = yes; then
494   exec 6>/dev/null
495 else
496   exec 6>&1
497 fi
498 exec 5>./config.log
499
500 echo "\
501 This file contains any messages produced by compilers while
502 running configure, to aid debugging if configure makes a mistake.
503 " 1>&5
504
505 # Strip out --no-create and --no-recursion so they do not pile up.
506 # Also quote any args containing shell metacharacters.
507 ac_configure_args=
508 for ac_arg
509 do
510   case "$ac_arg" in
511   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
512   | --no-cr | --no-c) ;;
513   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
514   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
515   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
516   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
517   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
518   esac
519 done
520
521 # NLS nuisances.
522 # Only set these to C if already set.  These must not be set unconditionally
523 # because not all systems understand e.g. LANG=C (notably SCO).
524 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
525 # Non-C LC_CTYPE values break the ctype check.
526 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
527 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
528 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
529 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
530
531 # confdefs.h avoids OS command line length limits that DEFS can exceed.
532 rm -rf conftest* confdefs.h
533 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 echo > confdefs.h
535
536 # A filename unique to this package, relative to the directory that
537 # configure is in, which we can look for to find out if srcdir is correct.
538 ac_unique_file=tree.c
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
557   else
558     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
559   fi
560 fi
561 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
562
563 # Prefer explicitly selected file to automatically selected ones.
564 if test -z "$CONFIG_SITE"; then
565   if test "x$prefix" != xNONE; then
566     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
567   else
568     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
569   fi
570 fi
571 for ac_site_file in $CONFIG_SITE; do
572   if test -r "$ac_site_file"; then
573     echo "loading site script $ac_site_file"
574     . "$ac_site_file"
575   fi
576 done
577
578 if test -r "$cache_file"; then
579   echo "loading cache $cache_file"
580   . $cache_file
581 else
582   echo "creating cache $cache_file"
583   > $cache_file
584 fi
585
586 ac_ext=c
587 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
588 ac_cpp='$CPP $CPPFLAGS'
589 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
590 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
591 cross_compiling=$ac_cv_prog_cc_cross
592
593 ac_exeext=
594 ac_objext=o
595 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
596   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
597   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
598     ac_n= ac_c='
599 ' ac_t='        '
600   else
601     ac_n=-n ac_c= ac_t=
602   fi
603 else
604   ac_n= ac_c='\c' ac_t=
605 fi
606
607
608
609
610 # Determine the host, build, and target systems
611 ac_aux_dir=
612 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
613   if test -f $ac_dir/install-sh; then
614     ac_aux_dir=$ac_dir
615     ac_install_sh="$ac_aux_dir/install-sh -c"
616     break
617   elif test -f $ac_dir/install.sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install.sh -c"
620     break
621   fi
622 done
623 if test -z "$ac_aux_dir"; then
624   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
625 fi
626 ac_config_guess=$ac_aux_dir/config.guess
627 ac_config_sub=$ac_aux_dir/config.sub
628 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
629
630
631 # Do some error checking and defaulting for the host and target type.
632 # The inputs are:
633 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
634 #
635 # The rules are:
636 # 1. You are not allowed to specify --host, --target, and nonopt at the
637 #    same time.
638 # 2. Host defaults to nonopt.
639 # 3. If nonopt is not specified, then host defaults to the current host,
640 #    as determined by config.guess.
641 # 4. Target and build default to nonopt.
642 # 5. If nonopt is not specified, then target and build default to host.
643
644 # The aliases save the names the user supplied, while $host etc.
645 # will get canonicalized.
646 case $host---$target---$nonopt in
647 NONE---*---* | *---NONE---* | *---*---NONE) ;;
648 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
649 esac
650
651
652 # Make sure we can run config.sub.
653 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
654 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
655 fi
656
657 echo $ac_n "checking host system type""... $ac_c" 1>&6
658 echo "configure:659: checking host system type" >&5
659
660 host_alias=$host
661 case "$host_alias" in
662 NONE)
663   case $nonopt in
664   NONE)
665     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
666     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
667     fi ;;
668   *) host_alias=$nonopt ;;
669   esac ;;
670 esac
671
672 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
673 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
674 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
675 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
676 echo "$ac_t""$host" 1>&6
677
678 echo $ac_n "checking target system type""... $ac_c" 1>&6
679 echo "configure:680: checking target system type" >&5
680
681 target_alias=$target
682 case "$target_alias" in
683 NONE)
684   case $nonopt in
685   NONE) target_alias=$host_alias ;;
686   *) target_alias=$nonopt ;;
687   esac ;;
688 esac
689
690 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
691 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
692 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
693 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
694 echo "$ac_t""$target" 1>&6
695
696 echo $ac_n "checking build system type""... $ac_c" 1>&6
697 echo "configure:698: checking build system type" >&5
698
699 build_alias=$build
700 case "$build_alias" in
701 NONE)
702   case $nonopt in
703   NONE) build_alias=$host_alias ;;
704   *) build_alias=$nonopt ;;
705   esac ;;
706 esac
707
708 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
709 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
710 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
711 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
712 echo "$ac_t""$build" 1>&6
713
714 test "$host_alias" != "$target_alias" &&
715   test "$program_prefix$program_suffix$program_transform_name" = \
716     NONENONEs,x,x, &&
717   program_prefix=${target_alias}-
718
719
720 # Determine the target- and build-specific subdirectories
721  case ${build_alias} in
722   "") build_noncanonical=${build} ;;
723   *) build_noncanonical=${build_alias} ;;
724 esac
725
726  case ${host_alias} in
727   "") host_noncanonical=${build_noncanonical} ;;
728   *) host_noncanonical=${host_alias} ;;
729 esac
730
731  case ${target_alias} in
732   "") target_noncanonical=${host_noncanonical} ;;
733   *) target_noncanonical=${target_alias} ;;
734 esac
735
736   # Prefix 'build-' so this never conflicts with target_subdir.
737 build_subdir="build-${build_noncanonical}"
738 # Not really a subdirectory, but here for completeness.
739 host_subdir=.
740 # No prefix.
741 target_subdir=${target_noncanonical}
742    
743
744 # Set program_transform_name
745 if test "$program_transform_name" = s,x,x,; then
746   program_transform_name=
747 else
748   # Double any \ or $.  echo might interpret backslashes.
749   cat <<\EOF_SED > conftestsed
750 s,\\,\\\\,g; s,\$,$$,g
751 EOF_SED
752   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
753   rm -f conftestsed
754 fi
755 test "$program_prefix" != NONE &&
756   program_transform_name="s,^,${program_prefix},; $program_transform_name"
757 # Use a double $ so make ignores it.
758 test "$program_suffix" != NONE &&
759   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
760
761 # sed with no file args requires a program.
762 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
763
764
765 # Check for bogus environment variables.
766 # Test if LIBRARY_PATH contains the notation for the current directory
767 # since this would lead to problems installing/building glibc.
768 # LIBRARY_PATH contains the current directory if one of the following
769 # is true:
770 # - one of the terminals (":" and ";") is the first or last sign
771 # - two terminals occur directly after each other
772 # - the path contains an element with a dot in it
773 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
774 echo "configure:775: checking LIBRARY_PATH variable" >&5
775 case ${LIBRARY_PATH} in
776   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
777     library_path_setting="contains current directory"
778     ;;
779   *)
780     library_path_setting="ok"
781     ;;
782 esac
783 echo "$ac_t""$library_path_setting" 1>&6
784 if test "$library_path_setting" != "ok"; then
785 { echo "configure: error: 
786 *** LIBRARY_PATH shouldn't contain the current directory when
787 *** building gcc. Please change the environment variable
788 *** and run configure again." 1>&2; exit 1; }
789 fi
790
791 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
792 # since this would lead to problems installing/building glibc.
793 # GCC_EXEC_PREFIX contains the current directory if one of the following
794 # is true:
795 # - one of the terminals (":" and ";") is the first or last sign
796 # - two terminals occur directly after each other
797 # - the path contains an element with a dot in it
798 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
799 echo "configure:800: checking GCC_EXEC_PREFIX variable" >&5
800 case ${GCC_EXEC_PREFIX} in
801   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
802     gcc_exec_prefix_setting="contains current directory"
803     ;;
804   *)
805     gcc_exec_prefix_setting="ok"
806     ;;
807 esac
808 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
809 if test "$gcc_exec_prefix_setting" != "ok"; then
810 { echo "configure: error: 
811 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
812 *** building gcc. Please change the environment variable
813 *** and run configure again." 1>&2; exit 1; }
814 fi
815
816 # -----------
817 # Directories
818 # -----------
819
820 # Specify the local prefix
821 local_prefix=
822 # Check whether --with-local-prefix or --without-local-prefix was given.
823 if test "${with_local_prefix+set}" = set; then
824   withval="$with_local_prefix"
825   case "${withval}" in
826 yes)    { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
827 no)     ;;
828 *)      local_prefix=$with_local_prefix ;;
829 esac
830 fi
831
832
833 # Default local prefix if it is empty
834 if test x$local_prefix = x; then
835         local_prefix=/usr/local
836 fi
837
838 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
839 # passed in by the toplevel make and thus we'd get different behavior
840 # depending on where we built the sources.
841 gcc_gxx_include_dir=
842 # Specify the g++ header file directory
843 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
844 if test "${with_gxx_include_dir+set}" = set; then
845   withval="$with_gxx_include_dir"
846   case "${withval}" in
847 yes)    { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
848 no)     ;;
849 *)      gcc_gxx_include_dir=$with_gxx_include_dir ;;
850 esac
851 fi
852
853
854 if test x${gcc_gxx_include_dir} = x; then
855   if test x${enable_version_specific_runtime_libs} = xyes; then
856     gcc_gxx_include_dir='${libsubdir}/include/c++'
857   else
858     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
859     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
860   fi
861 fi
862
863 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
864 if test "${with_cpp_install_dir+set}" = set; then
865   withval="$with_cpp_install_dir"
866   if test x$withval = xyes; then
867   { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
868 elif test x$withval != xno; then
869   cpp_install_dir=$withval
870 fi
871 fi
872
873
874 # -------------------
875 # Find default linker
876 # -------------------
877
878 # With GNU ld
879 # Check whether --with-gnu-ld or --without-gnu-ld was given.
880 if test "${with_gnu_ld+set}" = set; then
881   withval="$with_gnu_ld"
882   gnu_ld_flag="$with_gnu_ld"
883 else
884   gnu_ld_flag=no
885 fi
886
887
888 # With pre-defined ld
889 # Check whether --with-ld or --without-ld was given.
890 if test "${with_ld+set}" = set; then
891   withval="$with_ld"
892   DEFAULT_LINKER="$with_ld"
893 fi
894
895 if test x"${DEFAULT_LINKER+set}" = x"set"; then
896   if test ! -x "$DEFAULT_LINKER"; then
897     echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
898   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
899     gnu_ld_flag=yes
900   fi
901   cat >> confdefs.h <<EOF
902 #define DEFAULT_LINKER "$DEFAULT_LINKER"
903 EOF
904
905 fi
906
907 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
908 echo "configure:909: checking whether a default linker was specified" >&5
909 if test x"${DEFAULT_LINKER+set}" = x"set"; then
910   if test x"$gnu_ld_flag" = x"no"; then
911     echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
912   else
913     echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
914   fi
915 else
916   echo "$ac_t""no" 1>&6
917 fi
918
919 # ----------------------
920 # Find default assembler
921 # ----------------------
922
923 # With GNU as
924 # Check whether --with-gnu-as or --without-gnu-as was given.
925 if test "${with_gnu_as+set}" = set; then
926   withval="$with_gnu_as"
927   gas_flag="$with_gnu_as"
928 else
929   gas_flag=no
930 fi
931
932
933 # Check whether --with-as or --without-as was given.
934 if test "${with_as+set}" = set; then
935   withval="$with_as"
936   DEFAULT_ASSEMBLER="$with_as"
937 fi
938
939 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
940   if test ! -x "$DEFAULT_ASSEMBLER"; then
941     echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
942   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
943     gas_flag=yes
944   fi
945   cat >> confdefs.h <<EOF
946 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
947 EOF
948
949 fi
950
951 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
952 echo "configure:953: checking whether a default assembler was specified" >&5
953 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
954   if test x"$gas_flag" = x"no"; then
955     echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
956   else
957     echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
958   fi
959 else
960   echo "$ac_t""no" 1>&6
961 fi
962
963 # ---------------
964 # Find C compiler
965 # ---------------
966
967 # Find the native compiler
968 # Extract the first word of "gcc", so it can be a program name with args.
969 set dummy gcc; ac_word=$2
970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
971 echo "configure:972: checking for $ac_word" >&5
972 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
973   echo $ac_n "(cached) $ac_c" 1>&6
974 else
975   if test -n "$CC"; then
976   ac_cv_prog_CC="$CC" # Let the user override the test.
977 else
978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
979   ac_dummy="$PATH"
980   for ac_dir in $ac_dummy; do
981     test -z "$ac_dir" && ac_dir=.
982     if test -f $ac_dir/$ac_word; then
983       ac_cv_prog_CC="gcc"
984       break
985     fi
986   done
987   IFS="$ac_save_ifs"
988 fi
989 fi
990 CC="$ac_cv_prog_CC"
991 if test -n "$CC"; then
992   echo "$ac_t""$CC" 1>&6
993 else
994   echo "$ac_t""no" 1>&6
995 fi
996
997 if test -z "$CC"; then
998   # Extract the first word of "cc", so it can be a program name with args.
999 set dummy cc; ac_word=$2
1000 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1001 echo "configure:1002: checking for $ac_word" >&5
1002 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1003   echo $ac_n "(cached) $ac_c" 1>&6
1004 else
1005   if test -n "$CC"; then
1006   ac_cv_prog_CC="$CC" # Let the user override the test.
1007 else
1008   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1009   ac_prog_rejected=no
1010   ac_dummy="$PATH"
1011   for ac_dir in $ac_dummy; do
1012     test -z "$ac_dir" && ac_dir=.
1013     if test -f $ac_dir/$ac_word; then
1014       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1015         ac_prog_rejected=yes
1016         continue
1017       fi
1018       ac_cv_prog_CC="cc"
1019       break
1020     fi
1021   done
1022   IFS="$ac_save_ifs"
1023 if test $ac_prog_rejected = yes; then
1024   # We found a bogon in the path, so make sure we never use it.
1025   set dummy $ac_cv_prog_CC
1026   shift
1027   if test $# -gt 0; then
1028     # We chose a different compiler from the bogus one.
1029     # However, it has the same basename, so the bogon will be chosen
1030     # first if we set CC to just the basename; use the full file name.
1031     shift
1032     set dummy "$ac_dir/$ac_word" "$@"
1033     shift
1034     ac_cv_prog_CC="$@"
1035   fi
1036 fi
1037 fi
1038 fi
1039 CC="$ac_cv_prog_CC"
1040 if test -n "$CC"; then
1041   echo "$ac_t""$CC" 1>&6
1042 else
1043   echo "$ac_t""no" 1>&6
1044 fi
1045
1046   if test -z "$CC"; then
1047     case "`uname -s`" in
1048     *win32* | *WIN32*)
1049       # Extract the first word of "cl", so it can be a program name with args.
1050 set dummy cl; ac_word=$2
1051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1052 echo "configure:1053: checking for $ac_word" >&5
1053 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1054   echo $ac_n "(cached) $ac_c" 1>&6
1055 else
1056   if test -n "$CC"; then
1057   ac_cv_prog_CC="$CC" # Let the user override the test.
1058 else
1059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1060   ac_dummy="$PATH"
1061   for ac_dir in $ac_dummy; do
1062     test -z "$ac_dir" && ac_dir=.
1063     if test -f $ac_dir/$ac_word; then
1064       ac_cv_prog_CC="cl"
1065       break
1066     fi
1067   done
1068   IFS="$ac_save_ifs"
1069 fi
1070 fi
1071 CC="$ac_cv_prog_CC"
1072 if test -n "$CC"; then
1073   echo "$ac_t""$CC" 1>&6
1074 else
1075   echo "$ac_t""no" 1>&6
1076 fi
1077  ;;
1078     esac
1079   fi
1080   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1081 fi
1082
1083 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1084 echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1085
1086 ac_ext=c
1087 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1088 ac_cpp='$CPP $CPPFLAGS'
1089 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1090 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1091 cross_compiling=$ac_cv_prog_cc_cross
1092
1093 cat > conftest.$ac_ext << EOF
1094
1095 #line 1096 "configure"
1096 #include "confdefs.h"
1097
1098 main(){return(0);}
1099 EOF
1100 if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1101   ac_cv_prog_cc_works=yes
1102   # If we can't run a trivial program, we are probably using a cross compiler.
1103   if (./conftest; exit) 2>/dev/null; then
1104     ac_cv_prog_cc_cross=no
1105   else
1106     ac_cv_prog_cc_cross=yes
1107   fi
1108 else
1109   echo "configure: failed program was:" >&5
1110   cat conftest.$ac_ext >&5
1111   ac_cv_prog_cc_works=no
1112 fi
1113 rm -fr conftest*
1114 ac_ext=c
1115 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1116 ac_cpp='$CPP $CPPFLAGS'
1117 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1118 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1119 cross_compiling=$ac_cv_prog_cc_cross
1120
1121 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1122 if test $ac_cv_prog_cc_works = no; then
1123   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1124 fi
1125 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1126 echo "configure:1127: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1127 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1128 cross_compiling=$ac_cv_prog_cc_cross
1129
1130 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1131 echo "configure:1132: checking whether we are using GNU C" >&5
1132 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1133   echo $ac_n "(cached) $ac_c" 1>&6
1134 else
1135   cat > conftest.c <<EOF
1136 #ifdef __GNUC__
1137   yes;
1138 #endif
1139 EOF
1140 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1141   ac_cv_prog_gcc=yes
1142 else
1143   ac_cv_prog_gcc=no
1144 fi
1145 fi
1146
1147 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1148
1149 if test $ac_cv_prog_gcc = yes; then
1150   GCC=yes
1151 else
1152   GCC=
1153 fi
1154
1155 ac_test_CFLAGS="${CFLAGS+set}"
1156 ac_save_CFLAGS="$CFLAGS"
1157 CFLAGS=
1158 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1159 echo "configure:1160: checking whether ${CC-cc} accepts -g" >&5
1160 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   echo 'void f(){}' > conftest.c
1164 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1165   ac_cv_prog_cc_g=yes
1166 else
1167   ac_cv_prog_cc_g=no
1168 fi
1169 rm -f conftest*
1170
1171 fi
1172
1173 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1174 if test "$ac_test_CFLAGS" = set; then
1175   CFLAGS="$ac_save_CFLAGS"
1176 elif test $ac_cv_prog_cc_g = yes; then
1177   if test "$GCC" = yes; then
1178     CFLAGS="-g -O2"
1179   else
1180     CFLAGS="-g"
1181   fi
1182 else
1183   if test "$GCC" = yes; then
1184     CFLAGS="-O2"
1185   else
1186     CFLAGS=
1187   fi
1188 fi
1189
1190 if test "x$CC" != xcc; then
1191   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1192 echo "configure:1193: checking whether $CC and cc understand -c and -o together" >&5
1193 else
1194   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1195 echo "configure:1196: checking whether cc understands -c and -o together" >&5
1196 fi
1197 set dummy $CC; ac_cc="`echo $2 |
1198                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1199 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   echo 'foo(){}' > conftest.c
1203 # Make sure it works both with $CC and with simple cc.
1204 # We do the test twice because some compilers refuse to overwrite an
1205 # existing .o file with -o, though they will create one.
1206 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1207 if { (eval echo configure:1208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1208    test -f conftest.o && { (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1209 then
1210   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1211   if test "x$CC" != xcc; then
1212     # Test first that cc exists at all.
1213     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1214       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1215       if { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1216          test -f conftest.o && { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1217       then
1218         # cc works too.
1219         :
1220       else
1221         # cc exists but doesn't like -o.
1222         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1223       fi
1224     fi
1225   fi
1226 else
1227   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1228 fi
1229 rm -f conftest*
1230
1231 fi
1232 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1233   echo "$ac_t""yes" 1>&6
1234 else
1235   echo "$ac_t""no" 1>&6
1236   cat >> confdefs.h <<\EOF
1237 #define NO_MINUS_C_MINUS_O 1
1238 EOF
1239
1240 fi
1241
1242 # autoconf is lame and doesn't give us any substitution variable for this.
1243 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1244   NO_MINUS_C_MINUS_O=yes
1245 else
1246   OUTPUT_OPTION='-o $@'
1247 fi
1248
1249
1250
1251 # -------------------------
1252 # Check C compiler features
1253 # -------------------------
1254
1255 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1256 echo "configure:1257: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1257 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1258   echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260   save_CFLAGS="$CFLAGS"
1261 CFLAGS="-Wno-long-long"
1262 cat > conftest.$ac_ext <<EOF
1263 #line 1264 "configure"
1264 #include "confdefs.h"
1265
1266 int main() {
1267
1268 ; return 0; }
1269 EOF
1270 if { (eval echo configure:1271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1271   rm -rf conftest*
1272   ac_cv_prog_cc_no_long_long=yes
1273 else
1274   echo "configure: failed program was:" >&5
1275   cat conftest.$ac_ext >&5
1276   rm -rf conftest*
1277   ac_cv_prog_cc_no_long_long=no
1278 fi
1279 rm -f conftest*
1280 CFLAGS="$save_CFLAGS"
1281 fi
1282
1283 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1284
1285 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1286 echo "configure:1287: checking how to run the C preprocessor" >&5
1287 # On Suns, sometimes $CPP names a directory.
1288 if test -n "$CPP" && test -d "$CPP"; then
1289   CPP=
1290 fi
1291 if test -z "$CPP"; then
1292 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1293   echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295     # This must be in double quotes, not single quotes, because CPP may get
1296   # substituted into the Makefile and "${CC-cc}" will confuse make.
1297   CPP="${CC-cc} -E"
1298   # On the NeXT, cc -E runs the code through the compiler's parser,
1299   # not just through cpp.
1300   cat > conftest.$ac_ext <<EOF
1301 #line 1302 "configure"
1302 #include "confdefs.h"
1303 #include <assert.h>
1304 Syntax Error
1305 EOF
1306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1307 { (eval echo configure:1308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1309 if test -z "$ac_err"; then
1310   :
1311 else
1312   echo "$ac_err" >&5
1313   echo "configure: failed program was:" >&5
1314   cat conftest.$ac_ext >&5
1315   rm -rf conftest*
1316   CPP="${CC-cc} -E -traditional-cpp"
1317   cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320 #include <assert.h>
1321 Syntax Error
1322 EOF
1323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1324 { (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1326 if test -z "$ac_err"; then
1327   :
1328 else
1329   echo "$ac_err" >&5
1330   echo "configure: failed program was:" >&5
1331   cat conftest.$ac_ext >&5
1332   rm -rf conftest*
1333   CPP="${CC-cc} -nologo -E"
1334   cat > conftest.$ac_ext <<EOF
1335 #line 1336 "configure"
1336 #include "confdefs.h"
1337 #include <assert.h>
1338 Syntax Error
1339 EOF
1340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1341 { (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1343 if test -z "$ac_err"; then
1344   :
1345 else
1346   echo "$ac_err" >&5
1347   echo "configure: failed program was:" >&5
1348   cat conftest.$ac_ext >&5
1349   rm -rf conftest*
1350   CPP=/lib/cpp
1351 fi
1352 rm -f conftest*
1353 fi
1354 rm -f conftest*
1355 fi
1356 rm -f conftest*
1357   ac_cv_prog_CPP="$CPP"
1358 fi
1359   CPP="$ac_cv_prog_CPP"
1360 else
1361   ac_cv_prog_CPP="$CPP"
1362 fi
1363 echo "$ac_t""$CPP" 1>&6
1364
1365 echo $ac_n "checking for inline""... $ac_c" 1>&6
1366 echo "configure:1367: checking for inline" >&5
1367 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1368   echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370   ac_cv_c_inline=no
1371 for ac_kw in inline __inline__ __inline; do
1372   cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375
1376 int main() {
1377 } $ac_kw foo() {
1378 ; return 0; }
1379 EOF
1380 if { (eval echo configure:1381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1381   rm -rf conftest*
1382   ac_cv_c_inline=$ac_kw; break
1383 else
1384   echo "configure: failed program was:" >&5
1385   cat conftest.$ac_ext >&5
1386 fi
1387 rm -f conftest*
1388 done
1389
1390 fi
1391
1392 echo "$ac_t""$ac_cv_c_inline" 1>&6
1393 case "$ac_cv_c_inline" in
1394   inline | yes) ;;
1395   no) cat >> confdefs.h <<\EOF
1396 #define inline 
1397 EOF
1398  ;;
1399   *)  cat >> confdefs.h <<EOF
1400 #define inline $ac_cv_c_inline
1401 EOF
1402  ;;
1403 esac
1404
1405
1406 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1407 echo "configure:1408: checking for long long int" >&5
1408 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1409   echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411   cat > conftest.$ac_ext <<EOF
1412 #line 1413 "configure"
1413 #include "confdefs.h"
1414
1415 int main() {
1416 long long int i;
1417 ; return 0; }
1418 EOF
1419 if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1420   rm -rf conftest*
1421   ac_cv_c_long_long=yes
1422 else
1423   echo "configure: failed program was:" >&5
1424   cat conftest.$ac_ext >&5
1425   rm -rf conftest*
1426   ac_cv_c_long_long=no
1427 fi
1428 rm -f conftest*
1429 fi
1430
1431 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1432   if test $ac_cv_c_long_long = yes; then
1433     cat >> confdefs.h <<\EOF
1434 #define HAVE_LONG_LONG 1
1435 EOF
1436
1437   fi
1438 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1439 echo "configure:1440: checking for __int64" >&5
1440 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1441   echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443   cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1446
1447 int main() {
1448 __int64 i;
1449 ; return 0; }
1450 EOF
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452   rm -rf conftest*
1453   ac_cv_c___int64=yes
1454 else
1455   echo "configure: failed program was:" >&5
1456   cat conftest.$ac_ext >&5
1457   rm -rf conftest*
1458   ac_cv_c___int64=no
1459 fi
1460 rm -f conftest*
1461 fi
1462
1463 echo "$ac_t""$ac_cv_c___int64" 1>&6
1464   if test $ac_cv_c___int64 = yes; then
1465     cat >> confdefs.h <<\EOF
1466 #define HAVE___INT64 1
1467 EOF
1468
1469   fi
1470
1471 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1472 echo "configure:1473: checking for built-in _Bool" >&5
1473 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1474   echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476   cat > conftest.$ac_ext <<EOF
1477 #line 1478 "configure"
1478 #include "confdefs.h"
1479
1480 int main() {
1481 _Bool foo;
1482 ; return 0; }
1483 EOF
1484 if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485   rm -rf conftest*
1486   gcc_cv_c__bool=yes
1487 else
1488   echo "configure: failed program was:" >&5
1489   cat conftest.$ac_ext >&5
1490   rm -rf conftest*
1491   gcc_cv_c__bool=no
1492 fi
1493 rm -f conftest*
1494
1495 fi
1496
1497 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1498 if test $gcc_cv_c__bool = yes; then
1499   cat >> confdefs.h <<\EOF
1500 #define HAVE__BOOL 1
1501 EOF
1502
1503 fi
1504
1505
1506 # sizeof(char) is 1 by definition.
1507 echo $ac_n "checking size of void *""... $ac_c" 1>&6
1508 echo "configure:1509: checking size of void *" >&5
1509 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1513   cat > conftest.$ac_ext <<EOF
1514 #line 1515 "configure"
1515 #include "confdefs.h"
1516 #include "confdefs.h"
1517 #include <sys/types.h>
1518
1519
1520 int main() {
1521 switch (0) case 0: case (sizeof (void *) == $ac_size):;
1522 ; return 0; }
1523 EOF
1524 if { (eval echo configure:1525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1525   rm -rf conftest*
1526   ac_cv_sizeof_void_p=$ac_size
1527 else
1528   echo "configure: failed program was:" >&5
1529   cat conftest.$ac_ext >&5
1530 fi
1531 rm -f conftest*
1532   if test x$ac_cv_sizeof_void_p != x ; then break; fi
1533 done
1534
1535 fi
1536
1537 if test x$ac_cv_sizeof_void_p = x ; then
1538   { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
1539 fi
1540 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
1541 cat >> confdefs.h <<EOF
1542 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
1543 EOF
1544
1545
1546 echo $ac_n "checking size of short""... $ac_c" 1>&6
1547 echo "configure:1548: checking size of short" >&5
1548 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1549   echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1552   cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 #include "confdefs.h"
1556 #include <sys/types.h>
1557
1558
1559 int main() {
1560 switch (0) case 0: case (sizeof (short) == $ac_size):;
1561 ; return 0; }
1562 EOF
1563 if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1564   rm -rf conftest*
1565   ac_cv_sizeof_short=$ac_size
1566 else
1567   echo "configure: failed program was:" >&5
1568   cat conftest.$ac_ext >&5
1569 fi
1570 rm -f conftest*
1571   if test x$ac_cv_sizeof_short != x ; then break; fi
1572 done
1573
1574 fi
1575
1576 if test x$ac_cv_sizeof_short = x ; then
1577   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1578 fi
1579 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1580 cat >> confdefs.h <<EOF
1581 #define SIZEOF_SHORT $ac_cv_sizeof_short
1582 EOF
1583
1584
1585 echo $ac_n "checking size of int""... $ac_c" 1>&6
1586 echo "configure:1587: checking size of int" >&5
1587 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1588   echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1591   cat > conftest.$ac_ext <<EOF
1592 #line 1593 "configure"
1593 #include "confdefs.h"
1594 #include "confdefs.h"
1595 #include <sys/types.h>
1596
1597
1598 int main() {
1599 switch (0) case 0: case (sizeof (int) == $ac_size):;
1600 ; return 0; }
1601 EOF
1602 if { (eval echo configure:1603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1603   rm -rf conftest*
1604   ac_cv_sizeof_int=$ac_size
1605 else
1606   echo "configure: failed program was:" >&5
1607   cat conftest.$ac_ext >&5
1608 fi
1609 rm -f conftest*
1610   if test x$ac_cv_sizeof_int != x ; then break; fi
1611 done
1612
1613 fi
1614
1615 if test x$ac_cv_sizeof_int = x ; then
1616   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1617 fi
1618 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1619 cat >> confdefs.h <<EOF
1620 #define SIZEOF_INT $ac_cv_sizeof_int
1621 EOF
1622
1623
1624 echo $ac_n "checking size of long""... $ac_c" 1>&6
1625 echo "configure:1626: checking size of long" >&5
1626 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1627   echo $ac_n "(cached) $ac_c" 1>&6
1628 else
1629   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1630   cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 #include "confdefs.h"
1634 #include <sys/types.h>
1635
1636
1637 int main() {
1638 switch (0) case 0: case (sizeof (long) == $ac_size):;
1639 ; return 0; }
1640 EOF
1641 if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1642   rm -rf conftest*
1643   ac_cv_sizeof_long=$ac_size
1644 else
1645   echo "configure: failed program was:" >&5
1646   cat conftest.$ac_ext >&5
1647 fi
1648 rm -f conftest*
1649   if test x$ac_cv_sizeof_long != x ; then break; fi
1650 done
1651
1652 fi
1653
1654 if test x$ac_cv_sizeof_long = x ; then
1655   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1656 fi
1657 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1658 cat >> confdefs.h <<EOF
1659 #define SIZEOF_LONG $ac_cv_sizeof_long
1660 EOF
1661
1662
1663 if test $ac_cv_c_long_long = yes; then
1664   echo $ac_n "checking size of long long""... $ac_c" 1>&6
1665 echo "configure:1666: checking size of long long" >&5
1666 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1667   echo $ac_n "(cached) $ac_c" 1>&6
1668 else
1669   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1670   cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include "confdefs.h"
1674 #include <sys/types.h>
1675
1676
1677 int main() {
1678 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1679 ; return 0; }
1680 EOF
1681 if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1682   rm -rf conftest*
1683   ac_cv_sizeof_long_long=$ac_size
1684 else
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687 fi
1688 rm -f conftest*
1689   if test x$ac_cv_sizeof_long_long != x ; then break; fi
1690 done
1691
1692 fi
1693
1694 if test x$ac_cv_sizeof_long_long = x ; then
1695   { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1696 fi
1697 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1698 cat >> confdefs.h <<EOF
1699 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1700 EOF
1701
1702
1703 fi
1704 if test $ac_cv_c___int64 = yes; then
1705   echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1706 echo "configure:1707: checking size of __int64" >&5
1707 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1708   echo $ac_n "(cached) $ac_c" 1>&6
1709 else
1710   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
1711   cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714 #include "confdefs.h"
1715 #include <sys/types.h>
1716
1717
1718 int main() {
1719 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1720 ; return 0; }
1721 EOF
1722 if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1723   rm -rf conftest*
1724   ac_cv_sizeof___int64=$ac_size
1725 else
1726   echo "configure: failed program was:" >&5
1727   cat conftest.$ac_ext >&5
1728 fi
1729 rm -f conftest*
1730   if test x$ac_cv_sizeof___int64 != x ; then break; fi
1731 done
1732
1733 fi
1734
1735 if test x$ac_cv_sizeof___int64 = x ; then
1736   { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1737 fi
1738 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1739 cat >> confdefs.h <<EOF
1740 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1741 EOF
1742
1743
1744 fi
1745
1746 # -----------------
1747 # Find Ada compiler
1748 # -----------------
1749
1750 # See if GNAT has been installed
1751 if test $host != $build; then
1752   ac_tool_prefix=${host_alias}-
1753 else
1754   ac_tool_prefix=
1755 fi
1756
1757
1758 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1759 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1761 echo "configure:1762: checking for $ac_word" >&5
1762 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   if test -n "$GNATBIND"; then
1766   ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1767 else
1768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1769   ac_dummy="$PATH"
1770   for ac_dir in $ac_dummy; do
1771     test -z "$ac_dir" && ac_dir=.
1772     if test -f $ac_dir/$ac_word; then
1773       ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1774       break
1775     fi
1776   done
1777   IFS="$ac_save_ifs"
1778 fi
1779 fi
1780 GNATBIND="$ac_cv_prog_GNATBIND"
1781 if test -n "$GNATBIND"; then
1782   echo "$ac_t""$GNATBIND" 1>&6
1783 else
1784   echo "$ac_t""no" 1>&6
1785 fi
1786
1787
1788 if test -z "$ac_cv_prog_GNATBIND"; then
1789 if test -n "$ac_tool_prefix"; then
1790   # Extract the first word of "gnatbind", so it can be a program name with args.
1791 set dummy gnatbind; ac_word=$2
1792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1793 echo "configure:1794: checking for $ac_word" >&5
1794 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1795   echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797   if test -n "$GNATBIND"; then
1798   ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1799 else
1800   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1801   ac_dummy="$PATH"
1802   for ac_dir in $ac_dummy; do
1803     test -z "$ac_dir" && ac_dir=.
1804     if test -f $ac_dir/$ac_word; then
1805       ac_cv_prog_GNATBIND="gnatbind"
1806       break
1807     fi
1808   done
1809   IFS="$ac_save_ifs"
1810   test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1811 fi
1812 fi
1813 GNATBIND="$ac_cv_prog_GNATBIND"
1814 if test -n "$GNATBIND"; then
1815   echo "$ac_t""$GNATBIND" 1>&6
1816 else
1817   echo "$ac_t""no" 1>&6
1818 fi
1819
1820 else
1821   GNATBIND="no"
1822 fi
1823 fi
1824
1825 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1826 echo "configure:1827: checking for compiler driver that understands Ada" >&5
1827 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1828   echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830   cat >conftest.adb <<EOF
1831 procedure conftest is begin null; end conftest;
1832 EOF
1833 gcc_cv_prog_adac=no
1834 # Have to do ac_tool_prefix and user overrides by hand.
1835 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1836             ${ac_tool_prefix}gcc        gcc             \
1837             ${ac_tool_prefix}cc         cc              \
1838             ${ac_tool_prefix}gnatgcc    gnatgcc         \
1839             ${ac_tool_prefix}gnatcc     gnatcc          \
1840             ${ac_tool_prefix}adagcc     adagcc          \
1841             ${ac_tool_prefix}adacc      adacc           ; do
1842   # There is a bug in all released versions of GCC which causes the
1843   # driver to exit successfully when the appropriate language module
1844   # has not been installed.  This is fixed in 2.95.4, 3.0.2, and 3.1.
1845   # Therefore we must check for the error message as well as an
1846   # unsuccessful exit.
1847   errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1848   if test x"$errors" = x; then
1849     gcc_cv_prog_adac=$cand
1850     break
1851   fi
1852 done
1853 rm -f conftest.*
1854 fi
1855
1856 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1857 ADAC=$gcc_cv_prog_adac
1858
1859
1860 if test x$GNATBIND != xno && test x$ADAC != xno; then
1861   have_gnat=yes
1862 else
1863   have_gnat=no
1864 fi
1865
1866
1867 if test x$have_gnat != xno ; then 
1868 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1869 echo "configure:1870: checking whether ${ADAC} accepts -Wno-long-long" >&5
1870 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1871   echo $ac_n "(cached) $ac_c" 1>&6
1872 else
1873   cat >conftest.adb <<EOF
1874 procedure conftest is begin null; end conftest;
1875 EOF
1876 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1877   ac_cv_prog_adac_no_long_long=yes
1878 else
1879   ac_cv_prog_adac_no_long_long=no
1880 fi
1881 rm -f conftest*
1882 fi
1883
1884 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1885 else
1886   ac_cv_prog_adac_no_long_long=yes
1887 fi
1888
1889 # ---------------------
1890 # Warnings and checking
1891 # ---------------------
1892
1893 strict1_warn=
1894 if test $ac_cv_prog_cc_no_long_long = yes && \
1895     test $ac_cv_prog_adac_no_long_long = yes ; then
1896   strict1_warn="-pedantic -Wno-long-long"
1897 fi
1898
1899
1900 # If the native compiler is GCC, we can enable warnings even in stage1.  
1901 # That's useful for people building cross-compilers, or just running a
1902 # quick `make'.
1903 warn_cflags=
1904 if test "x$GCC" = "xyes"; then
1905   warn_cflags='$(GCC_WARN_CFLAGS)'
1906 fi
1907
1908
1909 # Enable -Werror in bootstrap stage2 and later.
1910 # Change the default to "no" on release branches.
1911 # Check whether --enable-werror or --disable-werror was given.
1912 if test "${enable_werror+set}" = set; then
1913   enableval="$enable_werror"
1914   :
1915 else
1916   enable_werror=yes
1917 fi
1918
1919 if test x$enable_werror = xyes ; then
1920   WERROR=-Werror
1921 fi
1922
1923
1924 # Enable expensive internal checks
1925 # Check whether --enable-checking or --disable-checking was given.
1926 if test "${enable_checking+set}" = set; then
1927   enableval="$enable_checking"
1928   ac_checking=
1929 ac_tree_checking=
1930 ac_rtl_checking=
1931 ac_rtlflag_checking=
1932 ac_gc_checking=
1933 ac_gc_always_collect=
1934 ac_fold_checking=
1935 case "${enableval}" in
1936 yes)    ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1937         ac_rtlflag_checking=1 ;;
1938 no)     ;;
1939 *)      IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1940         set fnord $enableval; shift
1941         IFS="$ac_save_IFS"
1942         for check
1943         do
1944                 case $check in
1945                 misc)   ac_checking=1 ;;
1946                 tree)   ac_tree_checking=1 ;;
1947                 rtlflag)        ac_rtlflag_checking=1 ;;
1948                 rtl)    ac_rtl_checking=1 ;;
1949                 gc)     ac_gc_checking=1 ;;
1950                 gcac)   ac_gc_always_collect=1 ;;
1951                 fold)   ac_fold_checking=1 ;;
1952                 valgrind)       ac_checking_valgrind=1 ;;
1953                 *)      { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1954                 esac
1955         done
1956         ;;
1957 esac
1958
1959 else
1960   # Enable some checks by default for development versions of GCC
1961 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1962 fi
1963
1964 nocommon_flag=""
1965 if test x$ac_checking != x ; then
1966   cat >> confdefs.h <<\EOF
1967 #define ENABLE_CHECKING 1
1968 EOF
1969
1970   nocommon_flag=-fno-common
1971 fi
1972
1973 if test x$ac_tree_checking != x ; then
1974   cat >> confdefs.h <<\EOF
1975 #define ENABLE_TREE_CHECKING 1
1976 EOF
1977
1978 fi
1979 if test x$ac_rtl_checking != x ; then
1980   cat >> confdefs.h <<\EOF
1981 #define ENABLE_RTL_CHECKING 1
1982 EOF
1983
1984 fi
1985 if test x$ac_rtlflag_checking != x ; then
1986   cat >> confdefs.h <<\EOF
1987 #define ENABLE_RTL_FLAG_CHECKING 1
1988 EOF
1989
1990 fi
1991 if test x$ac_gc_checking != x ; then
1992   cat >> confdefs.h <<\EOF
1993 #define ENABLE_GC_CHECKING 1
1994 EOF
1995
1996 fi
1997 if test x$ac_gc_always_collect != x ; then
1998   cat >> confdefs.h <<\EOF
1999 #define ENABLE_GC_ALWAYS_COLLECT 1
2000 EOF
2001
2002 fi
2003 if test x$ac_fold_checking != x ; then
2004   cat >> confdefs.h <<\EOF
2005 #define ENABLE_FOLD_CHECKING 1
2006 EOF
2007
2008 fi
2009 valgrind_path_defines=
2010 valgrind_command=
2011 if test x$ac_checking_valgrind != x ; then
2012   # It is certainly possible that there's valgrind but no valgrind.h.
2013   # GCC relies on making annotations so we must have both.
2014   echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2015 echo "configure:2016: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2016   cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <memcheck.h>
2020 #ifndef VALGRIND_DISCARD
2021 #error VALGRIND_DISCARD not defined
2022 #endif
2023 EOF
2024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2025 { (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2027 if test -z "$ac_err"; then
2028   rm -rf conftest*
2029   gcc_cv_header_memcheck_h=yes
2030 else
2031   echo "$ac_err" >&5
2032   echo "configure: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   rm -rf conftest*
2035   gcc_cv_header_memcheck_h=no
2036 fi
2037 rm -f conftest*
2038   echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2039   ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2040 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2041 echo "configure:2042: checking for valgrind.h" >&5
2042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <valgrind.h>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   eval "ac_cv_header_$ac_safe=yes"
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=no"
2062 fi
2063 rm -f conftest*
2064 fi
2065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2066   echo "$ac_t""yes" 1>&6
2067   have_valgrind_h=yes
2068 else
2069   echo "$ac_t""no" 1>&6
2070 have_valgrind_h=no
2071 fi
2072
2073   
2074 # Prepare PATH_SEPARATOR.
2075 # The user is always right.
2076 if test "${PATH_SEPARATOR+set}" != set; then
2077   echo "#! /bin/sh" >conf$$.sh
2078   echo  "exit 0"   >>conf$$.sh
2079   chmod +x conf$$.sh
2080   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2081     PATH_SEPARATOR=';'
2082   else
2083     PATH_SEPARATOR=:
2084   fi
2085   rm -f conf$$.sh
2086 fi
2087
2088 # Find out how to test for executable files. Don't use a zero-byte file,
2089 # as systems may use methods other than mode bits to determine executability.
2090 cat >conf$$.file <<_ASEOF
2091 #! /bin/sh
2092 exit 0
2093 _ASEOF
2094 chmod +x conf$$.file
2095 if test -x conf$$.file >/dev/null 2>&1; then
2096   ac_executable_p="test -x"
2097 else
2098   ac_executable_p="test -f"
2099 fi
2100 rm -f conf$$.file
2101
2102 # Extract the first word of "valgrind", so it can be a program name with args.
2103 set dummy valgrind; ac_word=$2
2104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2105 echo "configure:2106: checking for $ac_word" >&5
2106 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2107   echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109   case "$valgrind_path" in
2110   [\\/]* | ?:[\\/]*)
2111     ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2112     ;;
2113   *)
2114     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2115     for ac_dir in $PATH; do
2116       IFS="$ac_save_IFS"
2117       test -z "$ac_dir" && ac_dir=.
2118       for ac_exec_ext in '' $ac_executable_extensions; do
2119         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2120           if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2121             ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
2122             break 2
2123           fi
2124         fi
2125       done
2126     done
2127     IFS="$ac_save_IFS"
2128     ;;
2129 esac
2130 fi
2131 valgrind_path="$ac_cv_path_valgrind_path"
2132 if test -n "$valgrind_path"; then
2133   echo "$ac_t""$valgrind_path" 1>&6
2134 else
2135   echo "$ac_t""no" 1>&6
2136 fi
2137
2138   if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2139         { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2140   fi
2141   valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2142   valgrind_command="$valgrind_path -q"
2143   cat >> confdefs.h <<\EOF
2144 #define ENABLE_VALGRIND_CHECKING 1
2145 EOF
2146
2147   if test $gcc_cv_header_memcheck_h = yes; then
2148     cat >> confdefs.h <<\EOF
2149 #define HAVE_MEMCHECK_H 1
2150 EOF
2151
2152   fi
2153 fi
2154
2155
2156
2157 # Enable code coverage collection
2158 # Check whether --enable-coverage or --disable-coverage was given.
2159 if test "${enable_coverage+set}" = set; then
2160   enableval="$enable_coverage"
2161   case "${enableval}" in
2162 yes|noopt)
2163         coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
2164         ;;
2165 opt)
2166         coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
2167         ;;
2168 *)
2169         { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2170         ;;
2171 esac
2172 else
2173   coverage_flags=""
2174 fi
2175
2176
2177
2178 # -------------------------------
2179 # Miscenalleous configure options
2180 # -------------------------------
2181
2182 # With stabs
2183 # Check whether --with-stabs or --without-stabs was given.
2184 if test "${with_stabs+set}" = set; then
2185   withval="$with_stabs"
2186   stabs="$with_stabs"
2187 else
2188   stabs=no
2189 fi
2190
2191
2192 # Determine whether or not multilibs are enabled.
2193 # Check whether --enable-multilib or --disable-multilib was given.
2194 if test "${enable_multilib+set}" = set; then
2195   enableval="$enable_multilib"
2196   :
2197 else
2198   enable_multilib=yes
2199 fi
2200
2201
2202
2203 # Enable __cxa_atexit for C++.
2204 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2205 if test "${enable___cxa_atexit+set}" = set; then
2206   enableval="$enable___cxa_atexit"
2207   :
2208 fi
2209
2210
2211 # Enable threads
2212 # Pass with no value to take the default
2213 # Pass with a value to specify a thread package
2214 # Check whether --enable-threads or --disable-threads was given.
2215 if test "${enable_threads+set}" = set; then
2216   enableval="$enable_threads"
2217   :
2218 else
2219   enable_threads=''
2220 fi
2221
2222
2223 enable_threads_flag=$enable_threads
2224 # Check if a valid thread package
2225 case x${enable_threads_flag} in
2226         x | xno)
2227                 # No threads
2228                 target_thread_file='single'
2229                 ;;
2230         xyes)
2231                 # default
2232                 target_thread_file=''
2233                 ;;
2234         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2235         xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2236                 target_thread_file=$enable_threads_flag
2237                 ;;
2238         *)
2239                 echo "$enable_threads is an unknown thread package" 1>&2
2240                 exit 1
2241                 ;;
2242 esac
2243
2244 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2245 if test "${enable_objc_gc+set}" = set; then
2246   enableval="$enable_objc_gc"
2247   if test x$enable_objc_gc = xno; then
2248         objc_boehm_gc=''
2249 else
2250         objc_boehm_gc=1
2251 fi
2252 else
2253   objc_boehm_gc=''
2254 fi
2255
2256
2257 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2258 if test "${with_dwarf2+set}" = set; then
2259   withval="$with_dwarf2"
2260   dwarf2="$with_dwarf2"
2261 else
2262   dwarf2=no
2263 fi
2264
2265
2266 # Check whether --enable-shared or --disable-shared was given.
2267 if test "${enable_shared+set}" = set; then
2268   enableval="$enable_shared"
2269   
2270   case $enable_shared in
2271   yes | no) ;;
2272   *)
2273     enable_shared=no
2274     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2275     for pkg in $enableval; do
2276       if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2277         enable_shared=yes
2278       fi
2279     done
2280     IFS="$ac_save_ifs"
2281     ;;
2282   esac
2283
2284 else
2285   enable_shared=yes
2286 fi
2287
2288
2289
2290 # Check whether --with-sysroot or --without-sysroot was given.
2291 if test "${with_sysroot+set}" = set; then
2292   withval="$with_sysroot"
2293   
2294  case ${with_sysroot} in
2295  yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2296  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2297  esac
2298    
2299  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2300  CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2301
2302  if test "x$exec_prefix" = xNONE; then
2303   if test "x$prefix" = xNONE; then
2304    test_prefix=/usr/local
2305   else
2306    test_prefix=$prefix
2307   fi
2308  else
2309   test_prefix=$exec_prefix
2310  fi
2311  case ${TARGET_SYSTEM_ROOT} in
2312  "${test_prefix}"|"${test_prefix}/"*|\
2313  '${exec_prefix}'|'${exec_prefix}/'*)
2314    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2315    TARGET_SYSTEM_ROOT_DEFINE="$t"
2316    ;;
2317  esac
2318
2319 else
2320   
2321  TARGET_SYSTEM_ROOT=
2322  TARGET_SYSTEM_ROOT_DEFINE=
2323  CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2324
2325 fi
2326
2327
2328
2329
2330
2331 # Build with intermodule optimisations
2332 # Check whether --enable-intermodule or --disable-intermodule was given.
2333 if test "${enable_intermodule+set}" = set; then
2334   enableval="$enable_intermodule"
2335   case ${enable_intermodule} in
2336   yes) onestep="-onestep";;
2337   *) onestep="";;
2338 esac
2339 else
2340   onestep=""
2341 fi
2342
2343
2344
2345 # -------------------------
2346 # Checks for other programs
2347 # -------------------------
2348
2349 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2350 echo "configure:2351: checking whether ${MAKE-make} sets \${MAKE}" >&5
2351 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2352 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2353   echo $ac_n "(cached) $ac_c" 1>&6
2354 else
2355   cat > conftestmake <<\EOF
2356 all:
2357         @echo 'ac_maketemp="${MAKE}"'
2358 EOF
2359 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2360 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2361 if test -n "$ac_maketemp"; then
2362   eval ac_cv_prog_make_${ac_make}_set=yes
2363 else
2364   eval ac_cv_prog_make_${ac_make}_set=no
2365 fi
2366 rm -f conftestmake
2367 fi
2368 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2369   echo "$ac_t""yes" 1>&6
2370   SET_MAKE=
2371 else
2372   echo "$ac_t""no" 1>&6
2373   SET_MAKE="MAKE=${MAKE-make}"
2374 fi
2375
2376
2377 # Find some useful tools
2378 for ac_prog in gawk mawk nawk awk
2379 do
2380 # Extract the first word of "$ac_prog", so it can be a program name with args.
2381 set dummy $ac_prog; ac_word=$2
2382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2383 echo "configure:2384: checking for $ac_word" >&5
2384 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2385   echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387   if test -n "$AWK"; then
2388   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2389 else
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2391   ac_dummy="$PATH"
2392   for ac_dir in $ac_dummy; do
2393     test -z "$ac_dir" && ac_dir=.
2394     if test -f $ac_dir/$ac_word; then
2395       ac_cv_prog_AWK="$ac_prog"
2396       break
2397     fi
2398   done
2399   IFS="$ac_save_ifs"
2400 fi
2401 fi
2402 AWK="$ac_cv_prog_AWK"
2403 if test -n "$AWK"; then
2404   echo "$ac_t""$AWK" 1>&6
2405 else
2406   echo "$ac_t""no" 1>&6
2407 fi
2408
2409 test -n "$AWK" && break
2410 done
2411
2412 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2413 echo "configure:2414: checking whether ln works" >&5
2414 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2415   echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417   rm -f conftestdata_t
2418 echo >conftestdata_f
2419 if ln conftestdata_f conftestdata_t 2>/dev/null
2420 then
2421   gcc_cv_prog_LN="ln"
2422 else
2423   if ln -s conftestdata_f conftestdata_t 2>/dev/null
2424   then
2425     gcc_cv_prog_LN="ln -s"
2426   else
2427     gcc_cv_prog_LN=cp
2428   fi
2429 fi
2430 rm -f conftestdata_f conftestdata_t
2431
2432 fi
2433 LN="$gcc_cv_prog_LN"
2434 if test "$gcc_cv_prog_LN" = "ln"; then
2435   echo "$ac_t""yes" 1>&6
2436 else
2437   if test "$gcc_cv_prog_LN" = "ln -s"; then
2438     echo "$ac_t""no, using ln -s" 1>&6
2439   else
2440     echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2441   fi
2442 fi
2443
2444 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2445 echo "configure:2446: checking whether ln -s works" >&5
2446 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2447   echo $ac_n "(cached) $ac_c" 1>&6
2448 else
2449   rm -f conftestdata_t
2450 echo >conftestdata_f
2451 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2452 then
2453   gcc_cv_prog_LN_S="ln -s"
2454 else
2455   if ln conftestdata_f conftestdata_t 2>/dev/null
2456   then
2457     gcc_cv_prog_LN_S=ln
2458   else
2459     gcc_cv_prog_LN_S=cp
2460   fi
2461 fi
2462 rm -f conftestdata_f conftestdata_t
2463
2464 fi
2465 LN_S="$gcc_cv_prog_LN_S"
2466 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2467   echo "$ac_t""yes" 1>&6
2468 else
2469   if test "$gcc_cv_prog_LN_S" = "ln"; then
2470     echo "$ac_t""no, using ln" 1>&6
2471   else
2472     echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2473   fi
2474 fi
2475
2476 # Extract the first word of "ranlib", so it can be a program name with args.
2477 set dummy ranlib; ac_word=$2
2478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2479 echo "configure:2480: checking for $ac_word" >&5
2480 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2481   echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483   if test -n "$RANLIB"; then
2484   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2485 else
2486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2487   ac_dummy="$PATH"
2488   for ac_dir in $ac_dummy; do
2489     test -z "$ac_dir" && ac_dir=.
2490     if test -f $ac_dir/$ac_word; then
2491       ac_cv_prog_RANLIB="ranlib"
2492       break
2493     fi
2494   done
2495   IFS="$ac_save_ifs"
2496   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2497 fi
2498 fi
2499 RANLIB="$ac_cv_prog_RANLIB"
2500 if test -n "$RANLIB"; then
2501   echo "$ac_t""$RANLIB" 1>&6
2502 else
2503   echo "$ac_t""no" 1>&6
2504 fi
2505
2506 # Find a good install program.  We prefer a C program (faster),
2507 # so one script is as good as another.  But avoid the broken or
2508 # incompatible versions:
2509 # SysV /etc/install, /usr/sbin/install
2510 # SunOS /usr/etc/install
2511 # IRIX /sbin/install
2512 # AIX /bin/install
2513 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2514 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2515 # ./install, which can be erroneously created by make from ./install.sh.
2516 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2517 echo "configure:2518: checking for a BSD compatible install" >&5
2518 if test -z "$INSTALL"; then
2519 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2520   echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2523   for ac_dir in $PATH; do
2524     # Account for people who put trailing slashes in PATH elements.
2525     case "$ac_dir/" in
2526     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2527     *)
2528       # OSF1 and SCO ODT 3.0 have their own names for install.
2529       for ac_prog in ginstall scoinst install; do
2530         if test -f $ac_dir/$ac_prog; then
2531           if test $ac_prog = install &&
2532             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2533             # AIX install.  It has an incompatible calling convention.
2534             # OSF/1 installbsd also uses dspmsg, but is usable.
2535             :
2536           else
2537             ac_cv_path_install="$ac_dir/$ac_prog -c"
2538             break 2
2539           fi
2540         fi
2541       done
2542       ;;
2543     esac
2544   done
2545   IFS="$ac_save_IFS"
2546
2547 fi
2548   if test "${ac_cv_path_install+set}" = set; then
2549     INSTALL="$ac_cv_path_install"
2550   else
2551     # As a last resort, use the slow shell script.  We don't cache a
2552     # path for INSTALL within a source directory, because that will
2553     # break other packages using the cache if that directory is
2554     # removed, or if the path is relative.
2555     INSTALL="$ac_install_sh"
2556   fi
2557 fi
2558 echo "$ac_t""$INSTALL" 1>&6
2559
2560 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2561 # It thinks the first close brace ends the variable substitution.
2562 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2563
2564 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2565
2566
2567 # See if cmp has --ignore-initial.
2568 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2569 echo "configure:2570: checking for cmp's capabilities" >&5
2570 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2571   echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573    echo abfoo >t1
2574   echo cdfoo >t2
2575   gcc_cv_prog_cmp_skip=slowcompare
2576   if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2577     if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2578       :
2579     else
2580       gcc_cv_prog_cmp_skip=gnucompare
2581     fi
2582   fi
2583   if test $gcc_cv_prog_cmp_skip = slowcompare ; then
2584     if cmp t1 t2 2 2 > /dev/null 2>&1; then
2585       if cmp t1 t2 1 1 > /dev/null 2>&1; then
2586         :
2587       else
2588         gcc_cv_prog_cmp_skip=fastcompare
2589       fi
2590     fi
2591   fi
2592   rm t1 t2
2593
2594 fi
2595
2596 echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2597 make_compare_target=$gcc_cv_prog_cmp_skip
2598
2599
2600
2601 # See if we have the mktemp command.
2602 # Extract the first word of "mktemp", so it can be a program name with args.
2603 set dummy mktemp; ac_word=$2
2604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2605 echo "configure:2606: checking for $ac_word" >&5
2606 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2607   echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609   if test -n "$have_mktemp_command"; then
2610   ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2611 else
2612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2613   ac_dummy="$PATH"
2614   for ac_dir in $ac_dummy; do
2615     test -z "$ac_dir" && ac_dir=.
2616     if test -f $ac_dir/$ac_word; then
2617       ac_cv_prog_have_mktemp_command="yes"
2618       break
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622   test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2623 fi
2624 fi
2625 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2626 if test -n "$have_mktemp_command"; then
2627   echo "$ac_t""$have_mktemp_command" 1>&6
2628 else
2629   echo "$ac_t""no" 1>&6
2630 fi
2631
2632
2633 # Do we have a single-tree copy of texinfo?
2634 if test -f $srcdir/../texinfo/Makefile.in; then
2635   MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2636   gcc_cv_prog_makeinfo_modern=yes
2637   echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2638 else
2639   # See if makeinfo has been installed and is modern enough
2640   # that we can use it.
2641   # Extract the first word of "makeinfo", so it can be a program name with args.
2642 set dummy makeinfo; ac_word=$2
2643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2644 echo "configure:2645: checking for $ac_word" >&5
2645 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   if test -n "$MAKEINFO"; then
2649   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2650 else
2651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2652   ac_dummy="$PATH"
2653   for ac_dir in $ac_dummy; do
2654     test -z "$ac_dir" && ac_dir=.
2655     if test -f $ac_dir/$ac_word; then
2656       ac_cv_prog_MAKEINFO="makeinfo"
2657       break
2658     fi
2659   done
2660   IFS="$ac_save_ifs"
2661 fi
2662 fi
2663 MAKEINFO="$ac_cv_prog_MAKEINFO"
2664 if test -n "$MAKEINFO"; then
2665   echo "$ac_t""$MAKEINFO" 1>&6
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669
2670 if test -n "$MAKEINFO"; then
2671   # Found it, now check the version.
2672   echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2673 echo "configure:2674: checking for modern makeinfo" >&5
2674 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677     ac_prog_version=`$MAKEINFO --version 2>&1 |
2678                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2679   echo "configure:2680: version of makeinfo is $ac_prog_version" >&5
2680   case $ac_prog_version in
2681     '')     gcc_cv_prog_makeinfo_modern=no;;
2682     4.[2-9]*)
2683             gcc_cv_prog_makeinfo_modern=yes;;
2684     *)      gcc_cv_prog_makeinfo_modern=no;;
2685   esac
2686
2687 fi
2688
2689 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2690 else
2691   gcc_cv_prog_makeinfo_modern=no
2692 fi
2693
2694 fi
2695
2696 if test $gcc_cv_prog_makeinfo_modern = no; then
2697   echo "configure: warning: 
2698 *** Makeinfo is missing or too old.
2699 *** Info documentation will not be built." 1>&2
2700   BUILD_INFO=
2701 else
2702   BUILD_INFO=info               
2703 fi
2704
2705 # Is pod2man recent enough to regenerate manpages?
2706 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2707 echo "configure:2708: checking for recent Pod::Man" >&5
2708 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2709   echo "$ac_t""yes" 1>&6
2710   GENERATED_MANPAGES=generated-manpages         
2711 else
2712   echo "$ac_t""no" 1>&6
2713   GENERATED_MANPAGES=
2714 fi
2715
2716 # How about lex?
2717 if test -f $srcdir/../flex/skel.c; then
2718   FLEX='$(objdir)/../flex/flex'
2719 else
2720   # Extract the first word of "flex", so it can be a program name with args.
2721 set dummy flex; ac_word=$2
2722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2723 echo "configure:2724: checking for $ac_word" >&5
2724 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2725   echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727   if test -n "$FLEX"; then
2728   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2729 else
2730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2731   ac_dummy="$PATH"
2732   for ac_dir in $ac_dummy; do
2733     test -z "$ac_dir" && ac_dir=.
2734     if test -f $ac_dir/$ac_word; then
2735       ac_cv_prog_FLEX="flex"
2736       break
2737     fi
2738   done
2739   IFS="$ac_save_ifs"
2740   test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2741 fi
2742 fi
2743 FLEX="$ac_cv_prog_FLEX"
2744 if test -n "$FLEX"; then
2745   echo "$ac_t""$FLEX" 1>&6
2746 else
2747   echo "$ac_t""no" 1>&6
2748 fi
2749
2750 fi
2751
2752 # Bison?
2753 # The -L switch is so bison can find its skeleton file.
2754 if test -f $srcdir/../bison/bison.simple; then
2755   BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2756 else
2757   # Extract the first word of "bison", so it can be a program name with args.
2758 set dummy bison; ac_word=$2
2759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2760 echo "configure:2761: checking for $ac_word" >&5
2761 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   if test -n "$BISON"; then
2765   ac_cv_prog_BISON="$BISON" # Let the user override the test.
2766 else
2767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2768   ac_dummy="$PATH"
2769   for ac_dir in $ac_dummy; do
2770     test -z "$ac_dir" && ac_dir=.
2771     if test -f $ac_dir/$ac_word; then
2772       ac_cv_prog_BISON="bison"
2773       break
2774     fi
2775   done
2776   IFS="$ac_save_ifs"
2777   test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2778 fi
2779 fi
2780 BISON="$ac_cv_prog_BISON"
2781 if test -n "$BISON"; then
2782   echo "$ac_t""$BISON" 1>&6
2783 else
2784   echo "$ac_t""no" 1>&6
2785 fi
2786
2787 fi
2788
2789 # --------------------
2790 # Checks for C headers
2791 # --------------------
2792
2793 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2794 echo "configure:2795: checking for GNU C library" >&5
2795 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2796   echo $ac_n "(cached) $ac_c" 1>&6
2797 else
2798   cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801 #include <features.h>
2802 int main() {
2803
2804 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2805 #error Not a GNU C library system
2806 #endif
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2810   rm -rf conftest*
2811   gcc_cv_glibc=yes
2812 else
2813   echo "configure: failed program was:" >&5
2814   cat conftest.$ac_ext >&5
2815   rm -rf conftest*
2816   gcc_cv_glibc=no
2817 fi
2818 rm -f conftest*
2819 fi
2820
2821 echo "$ac_t""$gcc_cv_glibc" 1>&6
2822 if test $gcc_cv_glibc = yes; then
2823   cat >> confdefs.h <<\EOF
2824 #define _GNU_SOURCE 1
2825 EOF
2826
2827 fi
2828
2829 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2830 echo "configure:2831: checking for ANSI C header files" >&5
2831 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2832   echo $ac_n "(cached) $ac_c" 1>&6
2833 else
2834   cat > conftest.$ac_ext <<EOF
2835 #line 2836 "configure"
2836 #include "confdefs.h"
2837 #include <stdlib.h>
2838 #include <stdarg.h>
2839 #include <string.h>
2840 #include <float.h>
2841 EOF
2842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2843 { (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2845 if test -z "$ac_err"; then
2846   rm -rf conftest*
2847   ac_cv_header_stdc=yes
2848 else
2849   echo "$ac_err" >&5
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -rf conftest*
2853   ac_cv_header_stdc=no
2854 fi
2855 rm -f conftest*
2856
2857 if test $ac_cv_header_stdc = yes; then
2858   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2859 cat > conftest.$ac_ext <<EOF
2860 #line 2861 "configure"
2861 #include "confdefs.h"
2862 #include <string.h>
2863 EOF
2864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2865   egrep "memchr" >/dev/null 2>&1; then
2866   :
2867 else
2868   rm -rf conftest*
2869   ac_cv_header_stdc=no
2870 fi
2871 rm -f conftest*
2872
2873 fi
2874
2875 if test $ac_cv_header_stdc = yes; then
2876   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2877 cat > conftest.$ac_ext <<EOF
2878 #line 2879 "configure"
2879 #include "confdefs.h"
2880 #include <stdlib.h>
2881 EOF
2882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2883   egrep "free" >/dev/null 2>&1; then
2884   :
2885 else
2886   rm -rf conftest*
2887   ac_cv_header_stdc=no
2888 fi
2889 rm -f conftest*
2890
2891 fi
2892
2893 if test $ac_cv_header_stdc = yes; then
2894   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2895 if test "$cross_compiling" = yes; then
2896   :
2897 else
2898   cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <ctype.h>
2902 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2903 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2905 int main () { int i; for (i = 0; i < 256; i++)
2906 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2907 exit (0); }
2908
2909 EOF
2910 if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2911 then
2912   :
2913 else
2914   echo "configure: failed program was:" >&5
2915   cat conftest.$ac_ext >&5
2916   rm -fr conftest*
2917   ac_cv_header_stdc=no
2918 fi
2919 rm -fr conftest*
2920 fi
2921
2922 fi
2923 fi
2924
2925 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2926 if test $ac_cv_header_stdc = yes; then
2927   cat >> confdefs.h <<\EOF
2928 #define STDC_HEADERS 1
2929 EOF
2930
2931 fi
2932
2933 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2934 echo "configure:2935: checking whether time.h and sys/time.h may both be included" >&5
2935 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2936   echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938   cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2941 #include <sys/types.h>
2942 #include <sys/time.h>
2943 #include <time.h>
2944 int main() {
2945 struct tm *tp;
2946 ; return 0; }
2947 EOF
2948 if { (eval echo configure:2949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2949   rm -rf conftest*
2950   ac_cv_header_time=yes
2951 else
2952   echo "configure: failed program was:" >&5
2953   cat conftest.$ac_ext >&5
2954   rm -rf conftest*
2955   ac_cv_header_time=no
2956 fi
2957 rm -f conftest*
2958 fi
2959
2960 echo "$ac_t""$ac_cv_header_time" 1>&6
2961 if test $ac_cv_header_time = yes; then
2962   cat >> confdefs.h <<\EOF
2963 #define TIME_WITH_SYS_TIME 1
2964 EOF
2965
2966 fi
2967
2968 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2969 echo "configure:2970: checking for working stdbool.h" >&5
2970 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   cat > conftest.$ac_ext <<EOF
2974 #line 2975 "configure"
2975 #include "confdefs.h"
2976 #include <stdbool.h>
2977 int main() {
2978 bool foo = false;
2979 ; return 0; }
2980 EOF
2981 if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2982   rm -rf conftest*
2983   ac_cv_header_stdbool_h=yes
2984 else
2985   echo "configure: failed program was:" >&5
2986   cat conftest.$ac_ext >&5
2987   rm -rf conftest*
2988   ac_cv_header_stdbool_h=no
2989 fi
2990 rm -f conftest*
2991 fi
2992
2993 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2994 if test $ac_cv_header_stdbool_h = yes; then
2995   cat >> confdefs.h <<\EOF
2996 #define HAVE_STDBOOL_H 1
2997 EOF
2998
2999 fi
3000
3001 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
3002 echo "configure:3003: checking whether string.h and strings.h may both be included" >&5
3003 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3009 #include <string.h>
3010 #include <strings.h>
3011 int main() {
3012
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3016   rm -rf conftest*
3017   gcc_cv_header_string=yes
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   gcc_cv_header_string=no
3023 fi
3024 rm -f conftest*
3025 fi
3026
3027 echo "$ac_t""$gcc_cv_header_string" 1>&6
3028 if test $gcc_cv_header_string = yes; then
3029   cat >> confdefs.h <<\EOF
3030 #define STRING_WITH_STRINGS 1
3031 EOF
3032
3033 fi
3034
3035 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3036 echo "configure:3037: checking for sys/wait.h that is POSIX.1 compatible" >&5
3037 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3038   echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040   cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043 #include <sys/types.h>
3044 #include <sys/wait.h>
3045 #ifndef WEXITSTATUS
3046 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3047 #endif
3048 #ifndef WIFEXITED
3049 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3050 #endif
3051 int main() {
3052 int s;
3053 wait (&s);
3054 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3055 ; return 0; }
3056 EOF
3057 if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3058   rm -rf conftest*
3059   ac_cv_header_sys_wait_h=yes
3060 else
3061   echo "configure: failed program was:" >&5
3062   cat conftest.$ac_ext >&5
3063   rm -rf conftest*
3064   ac_cv_header_sys_wait_h=no
3065 fi
3066 rm -f conftest*
3067 fi
3068
3069 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3070 if test $ac_cv_header_sys_wait_h = yes; then
3071   cat >> confdefs.h <<\EOF
3072 #define HAVE_SYS_WAIT_H 1
3073 EOF
3074
3075 fi
3076
3077 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3078                  fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
3079                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
3080                  direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
3081 do
3082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3084 echo "configure:3085: checking for $ac_hdr" >&5
3085 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   cat > conftest.$ac_ext <<EOF
3089 #line 3090 "configure"
3090 #include "confdefs.h"
3091 #include <$ac_hdr>
3092 EOF
3093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3094 { (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3096 if test -z "$ac_err"; then
3097   rm -rf conftest*
3098   eval "ac_cv_header_$ac_safe=yes"
3099 else
3100   echo "$ac_err" >&5
3101   echo "configure: failed program was:" >&5
3102   cat conftest.$ac_ext >&5
3103   rm -rf conftest*
3104   eval "ac_cv_header_$ac_safe=no"
3105 fi
3106 rm -f conftest*
3107 fi
3108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3109   echo "$ac_t""yes" 1>&6
3110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3111   cat >> confdefs.h <<EOF
3112 #define $ac_tr_hdr 1
3113 EOF
3114  
3115 else
3116   echo "$ac_t""no" 1>&6
3117 fi
3118 done
3119
3120
3121 # Check for thread headers.
3122 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3123 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3124 echo "configure:3125: checking for thread.h" >&5
3125 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3126   echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128   cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131 #include <thread.h>
3132 EOF
3133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3134 { (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3136 if test -z "$ac_err"; then
3137   rm -rf conftest*
3138   eval "ac_cv_header_$ac_safe=yes"
3139 else
3140   echo "$ac_err" >&5
3141   echo "configure: failed program was:" >&5
3142   cat conftest.$ac_ext >&5
3143   rm -rf conftest*
3144   eval "ac_cv_header_$ac_safe=no"
3145 fi
3146 rm -f conftest*
3147 fi
3148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3149   echo "$ac_t""yes" 1>&6
3150   have_thread_h=yes
3151 else
3152   echo "$ac_t""no" 1>&6
3153 have_thread_h=
3154 fi
3155
3156 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3157 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3158 echo "configure:3159: checking for pthread.h" >&5
3159 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3160   echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162   cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 #include <pthread.h>
3166 EOF
3167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3168 { (eval echo configure:3169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3170 if test -z "$ac_err"; then
3171   rm -rf conftest*
3172   eval "ac_cv_header_$ac_safe=yes"
3173 else
3174   echo "$ac_err" >&5
3175   echo "configure: failed program was:" >&5
3176   cat conftest.$ac_ext >&5
3177   rm -rf conftest*
3178   eval "ac_cv_header_$ac_safe=no"
3179 fi
3180 rm -f conftest*
3181 fi
3182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3183   echo "$ac_t""yes" 1>&6
3184   have_pthread_h=yes
3185 else
3186   echo "$ac_t""no" 1>&6
3187 have_pthread_h=
3188 fi
3189
3190
3191 # These tests can't be done till we know if we have limits.h.
3192 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3193 echo "configure:3194: checking for CHAR_BIT" >&5
3194 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #ifdef HAVE_LIMITS_H
3201 #include <limits.h>
3202 #endif
3203 #ifdef CHAR_BIT
3204 found
3205 #endif
3206 EOF
3207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3208   egrep "found" >/dev/null 2>&1; then
3209   rm -rf conftest*
3210   gcc_cv_decl_char_bit=yes
3211 else
3212   rm -rf conftest*
3213   gcc_cv_decl_char_bit=no
3214 fi
3215 rm -f conftest*
3216
3217
3218 fi
3219
3220 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3221 if test $gcc_cv_decl_char_bit = no; then
3222   echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3223 echo "configure:3224: checking number of bits in a byte" >&5
3224 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   i=8
3228  gcc_cv_c_nbby=
3229  while test $i -lt 65; do
3230    cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233
3234 int main() {
3235 switch(0) {
3236   case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3237   case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3238   ; }
3239 ; return 0; }
3240 EOF
3241 if { (eval echo configure:3242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3242   rm -rf conftest*
3243   gcc_cv_c_nbby=$i; break
3244 else
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247 fi
3248 rm -f conftest*
3249    i=`expr $i + 1`
3250  done
3251  test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3252
3253 fi
3254
3255 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3256 if test $gcc_cv_c_nbby = failed; then
3257   { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3258 else
3259   cat >> confdefs.h <<EOF
3260 #define CHAR_BIT $gcc_cv_c_nbby
3261 EOF
3262
3263 fi
3264 fi
3265 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3266 echo "configure:3267: checking whether byte ordering is bigendian" >&5
3267 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   ac_cv_c_bigendian=unknown
3271 # See if sys/param.h defines the BYTE_ORDER macro.
3272 cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 #include <sys/types.h>
3276 #include <sys/param.h>
3277 int main() {
3278
3279 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3280  bogus endian macros
3281 #endif
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3285   rm -rf conftest*
3286   # It does; now see whether it defined to BIG_ENDIAN or not.
3287 cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 #include <sys/types.h>
3291 #include <sys/param.h>
3292 int main() {
3293
3294 #if BYTE_ORDER != BIG_ENDIAN
3295  not big endian
3296 #endif
3297 ; return 0; }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3300   rm -rf conftest*
3301   ac_cv_c_bigendian=yes
3302 else
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   ac_cv_c_bigendian=no
3307 fi
3308 rm -f conftest*
3309 else
3310   echo "configure: failed program was:" >&5
3311   cat conftest.$ac_ext >&5
3312 fi
3313 rm -f conftest*
3314 if test $ac_cv_c_bigendian = unknown; then
3315 if test "$cross_compiling" = yes; then
3316    echo $ac_n "cross-compiling... " 2>&6 
3317 else
3318   cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 main () {
3322   /* Are we little or big endian?  From Harbison&Steele.  */
3323   union
3324   {
3325     long l;
3326     char c[sizeof (long)];
3327   } u;
3328   u.l = 1;
3329   exit (u.c[sizeof (long) - 1] == 1);
3330 }
3331 EOF
3332 if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3333 then
3334   ac_cv_c_bigendian=no
3335 else
3336   echo "configure: failed program was:" >&5
3337   cat conftest.$ac_ext >&5
3338   rm -fr conftest*
3339   ac_cv_c_bigendian=yes
3340 fi
3341 rm -fr conftest*
3342 fi
3343
3344 fi
3345 fi
3346
3347 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3348 if test $ac_cv_c_bigendian = unknown; then
3349 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3350 echo "configure:3351: checking to probe for byte ordering" >&5
3351
3352 cat >conftest.c <<EOF
3353 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3354 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3355 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3356 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3357 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3358 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3359 int main() { _ascii (); _ebcdic (); return 0; }
3360 EOF
3361  if test -f conftest.c ; then
3362      if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3363         if test `grep -l BIGenDianSyS conftest.o` ; then
3364            echo $ac_n ' big endian probe OK, ' 1>&6
3365            ac_cv_c_bigendian=yes
3366         fi
3367         if test `grep -l LiTTleEnDian conftest.o` ; then
3368            echo $ac_n ' little endian probe OK, ' 1>&6
3369            if test $ac_cv_c_bigendian = yes ; then
3370             ac_cv_c_bigendian=unknown;
3371            else
3372             ac_cv_c_bigendian=no
3373            fi
3374         fi
3375         echo $ac_n 'guessing bigendian ...  ' >&6
3376      fi
3377   fi
3378 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3379 fi
3380 if test $ac_cv_c_bigendian = yes; then
3381   cat >> confdefs.h <<\EOF
3382 #define WORDS_BIGENDIAN 1
3383 EOF
3384
3385   cat >> confdefs.h <<\EOF
3386 #define HOST_WORDS_BIG_ENDIAN 1
3387 EOF
3388
3389   BYTEORDER=4321
3390 else
3391   BYTEORDER=1234
3392 fi
3393 cat >> confdefs.h <<EOF
3394 #define BYTEORDER $BYTEORDER
3395 EOF
3396
3397 if test $ac_cv_c_bigendian = unknown; then
3398   { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3399 fi
3400
3401
3402 # --------
3403 # UNSORTED
3404 # --------
3405
3406 # Stage specific cflags for build.
3407 stage1_cflags=
3408 case $build in
3409 vax-*-*)
3410   if test x$GCC = xyes
3411   then
3412     stage1_cflags="-Wa,-J"
3413   else
3414     stage1_cflags="-J"
3415   fi
3416   ;;
3417 powerpc-*-darwin*)
3418   # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3419   # sources; use -no-cpp-precomp to get to GNU cpp.
3420   # Apple's GCC has bugs in designated initializer handling, so disable
3421   # that too.
3422   stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3423   ;;
3424 esac
3425
3426
3427 # These libraries may be used by collect2.
3428 # We may need a special search path to get them linked.
3429 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3430 echo "configure:3431: checking for collect2 libraries" >&5
3431 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   save_LIBS="$LIBS"
3435 for libs in '' -lld -lmld \
3436                 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3437                 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3438 do
3439         LIBS="$libs"
3440         cat > conftest.$ac_ext <<EOF
3441 #line 3442 "configure"
3442 #include "confdefs.h"
3443 /* Override any gcc2 internal prototype to avoid an error.  */
3444 /* We use char because int might match the return type of a gcc2
3445     builtin and then its argument prototype would still apply.  */
3446 char ldopen();
3447
3448 int main() {
3449 ldopen()
3450 ; return 0; }
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3453   rm -rf conftest*
3454   gcc_cv_collect2_libs="$libs"; break
3455 else
3456   echo "configure: failed program was:" >&5
3457   cat conftest.$ac_ext >&5
3458 fi
3459 rm -f conftest*
3460 done
3461 LIBS="$save_LIBS"
3462 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3463 fi
3464
3465 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3466 case $gcc_cv_collect2_libs in
3467         "none required")        ;;
3468         *)      COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3469 esac
3470
3471
3472 # When building Ada code on Alpha, we need exc_resume which is usually in
3473 # -lexc.  So test for it.
3474 save_LIBS="$LIBS"
3475 LIBS=
3476
3477 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3478 echo "configure:3479: checking for library containing exc_resume" >&5
3479 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   ac_func_search_save_LIBS="$LIBS"
3483 ac_cv_search_exc_resume="no"
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 /* Override any gcc2 internal prototype to avoid an error.  */
3488 /* We use char because int might match the return type of a gcc2
3489     builtin and then its argument prototype would still apply.  */
3490 char exc_resume();
3491
3492 int main() {
3493 exc_resume()
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3497   rm -rf conftest*
3498   ac_cv_search_exc_resume="none required"
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502 fi
3503 rm -f conftest*
3504 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3505 LIBS="-l$i  $ac_func_search_save_LIBS"
3506 cat > conftest.$ac_ext <<EOF
3507 #line 3508 "configure"
3508 #include "confdefs.h"
3509 /* Override any gcc2 internal prototype to avoid an error.  */
3510 /* We use char because int might match the return type of a gcc2
3511     builtin and then its argument prototype would still apply.  */
3512 char exc_resume();
3513
3514 int main() {
3515 exc_resume()
3516 ; return 0; }
3517 EOF
3518 if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3519   rm -rf conftest*
3520   ac_cv_search_exc_resume="-l$i"
3521 break
3522 else
3523   echo "configure: failed program was:" >&5
3524   cat conftest.$ac_ext >&5
3525 fi
3526 rm -f conftest*
3527 done
3528 LIBS="$ac_func_search_save_LIBS"
3529 fi
3530
3531 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3532 if test "$ac_cv_search_exc_resume" != "no"; then
3533   test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3534   
3535 else :
3536   
3537 fi
3538 GNAT_LIBEXC="$LIBS"
3539 LIBS="$save_LIBS"
3540
3541
3542 # Some systems put ldexp and frexp in libm instead of libc; assume
3543 # they're both in the same place.  jcf-dump needs them.
3544 save_LIBS="$LIBS"
3545 LIBS=
3546
3547 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3548 echo "configure:3549: checking for library containing ldexp" >&5
3549 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3550   echo $ac_n "(cached) $ac_c" 1>&6
3551 else
3552   ac_func_search_save_LIBS="$LIBS"
3553 ac_cv_search_ldexp="no"
3554 cat > conftest.$ac_ext <<EOF
3555 #line 3556 "configure"
3556 #include "confdefs.h"
3557 /* Override any gcc2 internal prototype to avoid an error.  */
3558 /* We use char because int might match the return type of a gcc2
3559     builtin and then its argument prototype would still apply.  */
3560 char ldexp();
3561
3562 int main() {
3563 ldexp()
3564 ; return 0; }
3565 EOF
3566 if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3567   rm -rf conftest*
3568   ac_cv_search_ldexp="none required"
3569 else
3570   echo "configure: failed program was:" >&5
3571   cat conftest.$ac_ext >&5
3572 fi
3573 rm -f conftest*
3574 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3575 LIBS="-l$i  $ac_func_search_save_LIBS"
3576 cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579 /* Override any gcc2 internal prototype to avoid an error.  */
3580 /* We use char because int might match the return type of a gcc2
3581     builtin and then its argument prototype would still apply.  */
3582 char ldexp();
3583
3584 int main() {
3585 ldexp()
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3589   rm -rf conftest*
3590   ac_cv_search_ldexp="-l$i"
3591 break
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595 fi
3596 rm -f conftest*
3597 done
3598 LIBS="$ac_func_search_save_LIBS"
3599 fi
3600
3601 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3602 if test "$ac_cv_search_ldexp" != "no"; then
3603   test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3604   
3605 else :
3606   
3607 fi
3608 LDEXP_LIB="$LIBS"
3609 LIBS="$save_LIBS"
3610
3611
3612 # Use <inttypes.h> only if it exists,
3613 # doesn't clash with <sys/types.h>, and declares intmax_t.
3614 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3615 echo "configure:3616: checking for inttypes.h" >&5
3616 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 #include <sys/types.h>
3623 #include <inttypes.h>
3624 int main() {
3625 intmax_t i = -1;
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   gcc_cv_header_inttypes_h=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   gcc_cv_header_inttypes_h=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3641 if test $gcc_cv_header_inttypes_h = yes; then
3642   cat >> confdefs.h <<\EOF
3643 #define HAVE_INTTYPES_H 1
3644 EOF
3645
3646 fi
3647
3648
3649 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3650         sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3651         fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
3652         scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
3653         setlocale
3654 do
3655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3656 echo "configure:3657: checking for $ac_func" >&5
3657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3658   echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660   cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 /* System header to define __stub macros and hopefully few prototypes,
3664     which can conflict with char $ac_func(); below.  */
3665 #include <assert.h>
3666 /* Override any gcc2 internal prototype to avoid an error.  */
3667 /* We use char because int might match the return type of a gcc2
3668     builtin and then its argument prototype would still apply.  */
3669 char $ac_func();
3670
3671 int main() {
3672
3673 /* The GNU C library defines this for functions which it implements
3674     to always fail with ENOSYS.  Some functions are actually named
3675     something starting with __ and the normal name is an alias.  */
3676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3677 choke me
3678 #else
3679 $ac_func();
3680 #endif
3681
3682 ; return 0; }
3683 EOF
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3685   rm -rf conftest*
3686   eval "ac_cv_func_$ac_func=yes"
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690   rm -rf conftest*
3691   eval "ac_cv_func_$ac_func=no"
3692 fi
3693 rm -f conftest*
3694 fi
3695
3696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3697   echo "$ac_t""yes" 1>&6
3698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3699   cat >> confdefs.h <<EOF
3700 #define $ac_tr_func 1
3701 EOF
3702  
3703 else
3704   echo "$ac_t""no" 1>&6
3705 fi
3706 done
3707
3708
3709 if test x$ac_cv_func_mbstowcs = xyes; then
3710   echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3711 echo "configure:3712: checking whether mbstowcs works" >&5
3712 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3713   echo $ac_n "(cached) $ac_c" 1>&6
3714 else
3715       if test "$cross_compiling" = yes; then
3716   gcc_cv_func_mbstowcs_works=yes
3717 else
3718   cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 #include <stdlib.h>
3722 int main()
3723 {
3724   mbstowcs(0, "", 0);
3725   return 0;
3726 }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3729 then
3730   gcc_cv_func_mbstowcs_works=yes
3731 else
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734   rm -fr conftest*
3735   gcc_cv_func_mbstowcs_works=no
3736 fi
3737 rm -fr conftest*
3738 fi
3739
3740 fi
3741
3742 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3743   if test x$gcc_cv_func_mbstowcs_works = xyes; then
3744     cat >> confdefs.h <<\EOF
3745 #define HAVE_WORKING_MBSTOWCS 1
3746 EOF
3747
3748   fi
3749 fi
3750
3751 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3752 echo "configure:3753: checking for ssize_t" >&5
3753 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 #include <sys/types.h>
3760 #if STDC_HEADERS
3761 #include <stdlib.h>
3762 #include <stddef.h>
3763 #endif
3764 EOF
3765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3766   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3767   rm -rf conftest*
3768   ac_cv_type_ssize_t=yes
3769 else
3770   rm -rf conftest*
3771   ac_cv_type_ssize_t=no
3772 fi
3773 rm -f conftest*
3774
3775 fi
3776 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3777 if test $ac_cv_type_ssize_t = no; then
3778   cat >> confdefs.h <<\EOF
3779 #define ssize_t int
3780 EOF
3781
3782 fi
3783
3784
3785 # Try to determine the array type of the second argument of getgroups
3786 # for the target system (int or gid_t).
3787 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3788 echo "configure:3789: checking for uid_t in sys/types.h" >&5
3789 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 #include <sys/types.h>
3796 EOF
3797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3798   egrep "uid_t" >/dev/null 2>&1; then
3799   rm -rf conftest*
3800   ac_cv_type_uid_t=yes
3801 else
3802   rm -rf conftest*
3803   ac_cv_type_uid_t=no
3804 fi
3805 rm -f conftest*
3806
3807 fi
3808
3809 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3810 if test $ac_cv_type_uid_t = no; then
3811   cat >> confdefs.h <<\EOF
3812 #define uid_t int
3813 EOF
3814
3815   cat >> confdefs.h <<\EOF
3816 #define gid_t int
3817 EOF
3818
3819 fi
3820
3821 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3822 echo "configure:3823: checking type of array argument to getgroups" >&5
3823 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   if test "$cross_compiling" = yes; then
3827   ac_cv_type_getgroups=cross
3828 else
3829   cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832
3833 /* Thanks to Mike Rendell for this test.  */
3834 #include <sys/types.h>
3835 #define NGID 256
3836 #undef MAX
3837 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3838 main()
3839 {
3840   gid_t gidset[NGID];
3841   int i, n;
3842   union { gid_t gval; long lval; }  val;
3843
3844   val.lval = -1;
3845   for (i = 0; i < NGID; i++)
3846     gidset[i] = val.gval;
3847   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3848                  gidset);
3849   /* Exit non-zero if getgroups seems to require an array of ints.  This
3850      happens when gid_t is short but getgroups modifies an array of ints.  */
3851   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3852 }
3853
3854 EOF
3855 if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3856 then
3857     ac_cv_type_getgroups=gid_t
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -fr conftest*
3862   ac_cv_type_getgroups=int
3863 fi
3864 rm -fr conftest*
3865 fi
3866
3867 if test $ac_cv_type_getgroups = cross; then
3868         cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <unistd.h>
3872 EOF
3873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3874   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3875   rm -rf conftest*
3876   ac_cv_type_getgroups=gid_t
3877 else
3878   rm -rf conftest*
3879   ac_cv_type_getgroups=int
3880 fi
3881 rm -f conftest*
3882
3883 fi
3884 fi
3885
3886 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3887 cat >> confdefs.h <<EOF
3888 #define GETGROUPS_T $ac_cv_type_getgroups
3889 EOF
3890
3891
3892 if test "${target}" = "${build}"; then
3893   TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3894 else
3895   case "${target}" in
3896         # This condition may need some tweaking.  It should include all
3897         # targets where the array type of the second argument of getgroups
3898         # is int and the type of gid_t is not equivalent to int.
3899         *-*-sunos* | *-*-ultrix*)
3900                 TARGET_GETGROUPS_T=int
3901                 ;;
3902         *)
3903                 TARGET_GETGROUPS_T=gid_t
3904                 ;;
3905   esac
3906 fi
3907
3908
3909 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3910 echo "configure:3911: checking whether the printf functions support %p" >&5
3911 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   if test "$cross_compiling" = yes; then
3915   gcc_cv_func_printf_ptr=no
3916 else
3917   cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <stdio.h>
3921
3922 int main()
3923 {
3924   char buf[64];
3925   char *p = buf, *q = NULL;
3926   sprintf(buf, "%p", p);
3927   sscanf(buf, "%p", &q);
3928   return (p != q);
3929 }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3932 then
3933   gcc_cv_func_printf_ptr=yes
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -fr conftest*
3938   gcc_cv_func_printf_ptr=no
3939 fi
3940 rm -fr conftest*
3941 fi
3942
3943 rm -f core core.* *.core
3944 fi
3945
3946 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3947 if test $gcc_cv_func_printf_ptr = yes ; then
3948   cat >> confdefs.h <<\EOF
3949 #define HAVE_PRINTF_PTR 1
3950 EOF
3951
3952 fi
3953
3954 if test $ac_cv_header_sys_mman_h != yes \
3955  || test $ac_cv_func_mmap != yes; then
3956    gcc_cv_func_mmap_file=no
3957    gcc_cv_func_mmap_dev_zero=no
3958    gcc_cv_func_mmap_anon=no
3959 else
3960    echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
3961 echo "configure:3962: checking whether read-only mmap of a plain file works" >&5
3962 if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   # Add a system to this blacklist if 
3966    # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
3967    # memory area containing the same data that you'd get if you applied
3968    # read() to the same fd.  The only system known to have a problem here
3969    # is VMS, where text files have record structure.
3970    case "$host_os" in
3971      vms*) 
3972         gcc_cv_func_mmap_file=no ;;
3973      *)
3974         gcc_cv_func_mmap_file=yes;;
3975    esac
3976 fi
3977
3978 echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
3979    echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
3980 echo "configure:3981: checking whether mmap from /dev/zero works" >&5
3981 if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3982   echo $ac_n "(cached) $ac_c" 1>&6
3983 else
3984   # Add a system to this blacklist if it has mmap() but /dev/zero
3985    # does not exist, or if mmapping /dev/zero does not give anonymous
3986    # zeroed pages with both the following properties:
3987    # 1. If you map N consecutive pages in with one call, and then
3988    #    unmap any subset of those pages, the pages that were not
3989    #    explicitly unmapped remain accessible.
3990    # 2. If you map two adjacent blocks of memory and then unmap them
3991    #    both at once, they must both go away.
3992    # Systems known to be in this category are Windows (all variants),
3993    # VMS, and Darwin.
3994    case "$host_os" in
3995      vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
3996         gcc_cv_func_mmap_dev_zero=no ;;
3997      *)
3998         gcc_cv_func_mmap_dev_zero=yes;;
3999    esac
4000 fi
4001
4002 echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
4003
4004    # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
4005    echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
4006 echo "configure:4007: checking for MAP_ANON(YMOUS)" >&5
4007 if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/types.h>
4014 #include <sys/mman.h>
4015 #include <unistd.h>
4016
4017 #ifndef MAP_ANONYMOUS
4018 #define MAP_ANONYMOUS MAP_ANON
4019 #endif
4020
4021 int main() {
4022 int n = MAP_ANONYMOUS;
4023 ; return 0; }
4024 EOF
4025 if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4026   rm -rf conftest*
4027   gcc_cv_decl_map_anon=yes
4028 else
4029   echo "configure: failed program was:" >&5
4030   cat conftest.$ac_ext >&5
4031   rm -rf conftest*
4032   gcc_cv_decl_map_anon=no
4033 fi
4034 rm -f conftest*
4035 fi
4036
4037 echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
4038
4039    if test $gcc_cv_decl_map_anon = no; then
4040      gcc_cv_func_mmap_anon=no
4041    else
4042      echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
4043 echo "configure:4044: checking whether mmap with MAP_ANON(YMOUS) works" >&5
4044 if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   # Add a system to this blacklist if it has mmap() and MAP_ANON or
4048    # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
4049    # doesn't give anonymous zeroed pages with the same properties listed
4050    # above for use of /dev/zero.
4051    # Systems known to be in this category are Windows, VMS, and SCO Unix.
4052    case "$host_os" in
4053      vms* | cygwin* | pe | mingw* | sco* | udk* )
4054         gcc_cv_func_mmap_anon=no ;;
4055      *)
4056         gcc_cv_func_mmap_anon=yes;;
4057    esac
4058 fi
4059
4060 echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6
4061    fi
4062 fi
4063
4064 if test $gcc_cv_func_mmap_file = yes; then
4065   cat >> confdefs.h <<\EOF
4066 #define HAVE_MMAP_FILE 1
4067 EOF
4068
4069 fi
4070 if test $gcc_cv_func_mmap_dev_zero = yes; then
4071   cat >> confdefs.h <<\EOF
4072 #define HAVE_MMAP_DEV_ZERO 1
4073 EOF
4074
4075 fi
4076 if test $gcc_cv_func_mmap_anon = yes; then
4077   cat >> confdefs.h <<\EOF
4078 #define HAVE_MMAP_ANON 1
4079 EOF
4080
4081 fi
4082
4083
4084 case "${host}" in
4085 *-*-uwin*)
4086   { echo "configure: error: 
4087 *** UWIN may not be used as a host platform because
4088 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4089   ;;
4090 *-*-*vms*)
4091   # Under VMS, vfork works very different than on Unix. The standard test 
4092   # won't work, and it isn't easily adaptable. It makes more sense to
4093   # just force it.
4094   ac_cv_func_vfork_works=yes
4095   ;;
4096 esac
4097 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4098 echo "configure:4099: checking for pid_t" >&5
4099 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 #include <sys/types.h>
4106 #if STDC_HEADERS
4107 #include <stdlib.h>
4108 #include <stddef.h>
4109 #endif
4110 EOF
4111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4112   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4113   rm -rf conftest*
4114   ac_cv_type_pid_t=yes
4115 else
4116   rm -rf conftest*
4117   ac_cv_type_pid_t=no
4118 fi
4119 rm -f conftest*
4120
4121 fi
4122 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4123 if test $ac_cv_type_pid_t = no; then
4124   cat >> confdefs.h <<\EOF
4125 #define pid_t int
4126 EOF
4127
4128 fi
4129
4130 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4131 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4132 echo "configure:4133: checking for vfork.h" >&5
4133 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <vfork.h>
4140 EOF
4141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4142 { (eval echo configure:4143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4144 if test -z "$ac_err"; then
4145   rm -rf conftest*
4146   eval "ac_cv_header_$ac_safe=yes"
4147 else
4148   echo "$ac_err" >&5
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   eval "ac_cv_header_$ac_safe=no"
4153 fi
4154 rm -f conftest*
4155 fi
4156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4157   echo "$ac_t""yes" 1>&6
4158   cat >> confdefs.h <<\EOF
4159 #define HAVE_VFORK_H 1
4160 EOF
4161
4162 else
4163   echo "$ac_t""no" 1>&6
4164 fi
4165
4166 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4167 echo "configure:4168: checking for working vfork" >&5
4168 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   if test "$cross_compiling" = yes; then
4172   echo $ac_n "checking for vfork""... $ac_c" 1>&6
4173 echo "configure:4174: checking for vfork" >&5
4174 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 /* System header to define __stub macros and hopefully few prototypes,
4181     which can conflict with char vfork(); below.  */
4182 #include <assert.h>
4183 /* Override any gcc2 internal prototype to avoid an error.  */
4184 /* We use char because int might match the return type of a gcc2
4185     builtin and then its argument prototype would still apply.  */
4186 char vfork();
4187
4188 int main() {
4189
4190 /* The GNU C library defines this for functions which it implements
4191     to always fail with ENOSYS.  Some functions are actually named
4192     something starting with __ and the normal name is an alias.  */
4193 #if defined (__stub_vfork) || defined (__stub___vfork)
4194 choke me
4195 #else
4196 vfork();
4197 #endif
4198
4199 ; return 0; }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4202   rm -rf conftest*
4203   eval "ac_cv_func_vfork=yes"
4204 else
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   eval "ac_cv_func_vfork=no"
4209 fi
4210 rm -f conftest*
4211 fi
4212
4213 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4214   echo "$ac_t""yes" 1>&6
4215   :
4216 else
4217   echo "$ac_t""no" 1>&6
4218 fi
4219
4220 ac_cv_func_vfork_works=$ac_cv_func_vfork
4221 else
4222   cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 /* Thanks to Paul Eggert for this test.  */
4226 #include <stdio.h>
4227 #include <sys/types.h>
4228 #include <sys/stat.h>
4229 #ifdef HAVE_UNISTD_H
4230 #include <unistd.h>
4231 #endif
4232 #ifdef HAVE_VFORK_H
4233 #include <vfork.h>
4234 #endif
4235 /* On some sparc systems, changes by the child to local and incoming
4236    argument registers are propagated back to the parent.
4237    The compiler is told about this with #include <vfork.h>,
4238    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4239    Test for this by using a static variable whose address
4240    is put into a register that is clobbered by the vfork.  */
4241 static
4242 #ifdef __cplusplus
4243 sparc_address_test (int arg)
4244 #else
4245 sparc_address_test (arg) int arg;
4246 #endif
4247 {
4248   static pid_t child;
4249   if (!child) {
4250     child = vfork ();
4251     if (child < 0) {
4252       perror ("vfork");
4253       _exit(2);
4254     }
4255     if (!child) {
4256       arg = getpid();
4257       write(-1, "", 0);
4258       _exit (arg);
4259     }
4260   }
4261 }
4262 main() {
4263   pid_t parent = getpid ();
4264   pid_t child;
4265
4266   sparc_address_test ();
4267
4268   child = vfork ();
4269
4270   if (child == 0) {
4271     /* Here is another test for sparc vfork register problems.
4272        This test uses lots of local variables, at least
4273        as many local variables as main has allocated so far
4274        including compiler temporaries.  4 locals are enough for
4275        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4276        A buggy compiler should reuse the register of parent
4277        for one of the local variables, since it will think that
4278        parent can't possibly be used any more in this routine.
4279        Assigning to the local variable will thus munge parent
4280        in the parent process.  */
4281     pid_t
4282       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4283       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4284     /* Convince the compiler that p..p7 are live; otherwise, it might
4285        use the same hardware register for all 8 local variables.  */
4286     if (p != p1 || p != p2 || p != p3 || p != p4
4287         || p != p5 || p != p6 || p != p7)
4288       _exit(1);
4289
4290     /* On some systems (e.g. IRIX 3.3),
4291        vfork doesn't separate parent from child file descriptors.
4292        If the child closes a descriptor before it execs or exits,
4293        this munges the parent's descriptor as well.
4294        Test for this by closing stdout in the child.  */
4295     _exit(close(fileno(stdout)) != 0);
4296   } else {
4297     int status;
4298     struct stat st;
4299
4300     while (wait(&status) != child)
4301       ;
4302     exit(
4303          /* Was there some problem with vforking?  */
4304          child < 0
4305
4306          /* Did the child fail?  (This shouldn't happen.)  */
4307          || status
4308
4309          /* Did the vfork/compiler bug occur?  */
4310          || parent != getpid()
4311
4312          /* Did the file descriptor bug occur?  */
4313          || fstat(fileno(stdout), &st) != 0
4314          );
4315   }
4316 }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4319 then
4320   ac_cv_func_vfork_works=yes
4321 else
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -fr conftest*
4325   ac_cv_func_vfork_works=no
4326 fi
4327 rm -fr conftest*
4328 fi
4329
4330 fi
4331
4332 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4333 if test $ac_cv_func_vfork_works = no; then
4334   cat >> confdefs.h <<\EOF
4335 #define vfork fork
4336 EOF
4337
4338 fi
4339
4340
4341
4342     
4343   am_cv_lib_iconv_ldpath=
4344   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4345 if test "${with_libiconv_prefix+set}" = set; then
4346   withval="$with_libiconv_prefix"
4347   
4348     for dir in `echo "$withval" | tr : ' '`; do
4349       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4350       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4351     done
4352    
4353 fi
4354
4355
4356   echo $ac_n "checking for iconv""... $ac_c" 1>&6
4357 echo "configure:4358: checking for iconv" >&5
4358 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4359   echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361   
4362     am_cv_func_iconv="no, consider installing GNU libiconv"
4363     am_cv_lib_iconv=no
4364     cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 #include <stdlib.h>
4368 #include <iconv.h>
4369 int main() {
4370 iconv_t cd = iconv_open("","");
4371        iconv(cd,NULL,NULL,NULL,NULL);
4372        iconv_close(cd);
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376   rm -rf conftest*
4377   am_cv_func_iconv=yes
4378 else
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381 fi
4382 rm -f conftest*
4383     if test "$am_cv_func_iconv" != yes; then
4384       am_save_LIBS="$LIBS"
4385       LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4386       cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 #include <stdlib.h>
4390 #include <iconv.h>
4391 int main() {
4392 iconv_t cd = iconv_open("","");
4393          iconv(cd,NULL,NULL,NULL,NULL);
4394          iconv_close(cd);
4395 ; return 0; }
4396 EOF
4397 if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4398   rm -rf conftest*
4399   am_cv_lib_iconv=yes
4400         am_cv_func_iconv=yes
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404 fi
4405 rm -f conftest*
4406       LIBS="$am_save_LIBS"
4407     fi
4408   
4409 fi
4410
4411 echo "$ac_t""$am_cv_func_iconv" 1>&6
4412   if test "$am_cv_func_iconv" = yes; then
4413     cat >> confdefs.h <<\EOF
4414 #define HAVE_ICONV 1
4415 EOF
4416
4417     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4418 echo "configure:4419: checking for iconv declaration" >&5
4419     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4420   echo $ac_n "(cached) $ac_c" 1>&6
4421 else
4422   
4423       cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426
4427 #include <stdlib.h>
4428 #include <iconv.h>
4429 extern
4430 #ifdef __cplusplus
4431 "C"
4432 #endif
4433 #if defined(__STDC__) || defined(__cplusplus)
4434 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4435 #else
4436 size_t iconv();
4437 #endif
4438
4439 int main() {
4440
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4444   rm -rf conftest*
4445   am_cv_proto_iconv_arg1=""
4446 else
4447   echo "configure: failed program was:" >&5
4448   cat conftest.$ac_ext >&5
4449   rm -rf conftest*
4450   am_cv_proto_iconv_arg1="const"
4451 fi
4452 rm -f conftest*
4453       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
4454 fi
4455
4456     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4457     echo "$ac_t""${ac_t:-
4458          }$am_cv_proto_iconv" 1>&6
4459     cat >> confdefs.h <<EOF
4460 #define ICONV_CONST $am_cv_proto_iconv_arg1
4461 EOF
4462
4463   fi
4464   LIBICONV=
4465   if test "$am_cv_lib_iconv" = yes; then
4466     LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4467   fi
4468   
4469
4470 # Until we have in-tree GNU iconv:
4471 LIBICONV_DEP=
4472
4473
4474
4475   echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4476 echo "configure:4477: checking for LC_MESSAGES" >&5
4477 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 #include <locale.h>
4484 int main() {
4485 return LC_MESSAGES
4486 ; return 0; }
4487 EOF
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4489   rm -rf conftest*
4490   am_cv_val_LC_MESSAGES=yes
4491 else
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   am_cv_val_LC_MESSAGES=no
4496 fi
4497 rm -f conftest*
4498 fi
4499
4500 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4501   if test $am_cv_val_LC_MESSAGES = yes; then
4502     cat >> confdefs.h <<\EOF
4503 #define HAVE_LC_MESSAGES 1
4504 EOF
4505
4506   fi
4507
4508
4509 # We will need to find libiberty.h and ansidecl.h
4510 saved_CFLAGS="$CFLAGS"
4511 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4512 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4513         strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4514         fprintf_unlocked strstr errno vasprintf \
4515         malloc realloc calloc free basename getopt clock
4516 do
4517   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4518 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4519 echo "configure:4520: checking whether $ac_func is declared" >&5
4520 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4521   echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523   cat > conftest.$ac_ext <<EOF
4524 #line 4525 "configure"
4525 #include "confdefs.h"
4526 #undef $ac_tr_decl
4527 #define $ac_tr_decl 1
4528   
4529 #include "ansidecl.h"
4530 #include "system.h"
4531
4532 int main() {
4533 #ifndef $ac_func
4534 char *(*pfn) = (char *(*)) $ac_func ;
4535 #endif
4536 ; return 0; }
4537 EOF
4538 if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4539   rm -rf conftest*
4540   eval "gcc_cv_have_decl_$ac_func=yes"
4541 else
4542   echo "configure: failed program was:" >&5
4543   cat conftest.$ac_ext >&5
4544   rm -rf conftest*
4545   eval "gcc_cv_have_decl_$ac_func=no"
4546 fi
4547 rm -f conftest*
4548 fi
4549
4550 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4552 #define $ac_tr_decl 1
4553 EOF
4554  
4555 else
4556   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4557 #define $ac_tr_decl 0
4558 EOF
4559  
4560 fi
4561
4562 done
4563 if test x = y ; then
4564   cat >> confdefs.h <<\EOF
4565 #define HAVE_DECL_GETENV 1
4566 EOF
4567  cat >> confdefs.h <<\EOF
4568 #define HAVE_DECL_ATOL 1
4569 EOF
4570  cat >> confdefs.h <<\EOF
4571 #define HAVE_DECL_SBRK 1
4572 EOF
4573  cat >> confdefs.h <<\EOF
4574 #define HAVE_DECL_ABORT 1
4575 EOF
4576  cat >> confdefs.h <<\EOF
4577 #define HAVE_DECL_ATOF 1
4578 EOF
4579  cat >> confdefs.h <<\EOF
4580 #define HAVE_DECL_GETCWD 1
4581 EOF
4582  cat >> confdefs.h <<\EOF
4583 #define HAVE_DECL_GETWD 1
4584 EOF
4585  \
4586         cat >> confdefs.h <<\EOF
4587 #define HAVE_DECL_STRSIGNAL 1
4588 EOF
4589  cat >> confdefs.h <<\EOF
4590 #define HAVE_DECL_PUTC_UNLOCKED 1
4591 EOF
4592  cat >> confdefs.h <<\EOF
4593 #define HAVE_DECL_FPUTS_UNLOCKED 1
4594 EOF
4595  cat >> confdefs.h <<\EOF
4596 #define HAVE_DECL_FWRITE_UNLOCKED 1
4597 EOF
4598  \
4599         cat >> confdefs.h <<\EOF
4600 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4601 EOF
4602  cat >> confdefs.h <<\EOF
4603 #define HAVE_DECL_STRSTR 1
4604 EOF
4605  cat >> confdefs.h <<\EOF
4606 #define HAVE_DECL_ERRNO 1
4607 EOF
4608  cat >> confdefs.h <<\EOF
4609 #define HAVE_DECL_VASPRINTF 1
4610 EOF
4611  \
4612         cat >> confdefs.h <<\EOF
4613 #define HAVE_DECL_MALLOC 1
4614 EOF
4615  cat >> confdefs.h <<\EOF
4616 #define HAVE_DECL_REALLOC 1
4617 EOF
4618  cat >> confdefs.h <<\EOF
4619 #define HAVE_DECL_CALLOC 1
4620 EOF
4621  cat >> confdefs.h <<\EOF
4622 #define HAVE_DECL_FREE 1
4623 EOF
4624  cat >> confdefs.h <<\EOF
4625 #define HAVE_DECL_BASENAME 1
4626 EOF
4627  cat >> confdefs.h <<\EOF
4628 #define HAVE_DECL_GETOPT 1
4629 EOF
4630  cat >> confdefs.h <<\EOF
4631 #define HAVE_DECL_CLOCK 1
4632 EOF
4633 fi
4634
4635
4636 for ac_func in getrlimit setrlimit getrusage
4637 do
4638   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4639 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4640 echo "configure:4641: checking whether $ac_func is declared" >&5
4641 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #undef $ac_tr_decl
4648 #define $ac_tr_decl 1
4649   
4650 #include "ansidecl.h"
4651 #include "system.h"
4652 #ifdef HAVE_SYS_RESOURCE_H
4653 #include <sys/resource.h>
4654 #endif
4655
4656
4657 int main() {
4658 #ifndef $ac_func
4659 char *(*pfn) = (char *(*)) $ac_func ;
4660 #endif
4661 ; return 0; }
4662 EOF
4663 if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4664   rm -rf conftest*
4665   eval "gcc_cv_have_decl_$ac_func=yes"
4666 else
4667   echo "configure: failed program was:" >&5
4668   cat conftest.$ac_ext >&5
4669   rm -rf conftest*
4670   eval "gcc_cv_have_decl_$ac_func=no"
4671 fi
4672 rm -f conftest*
4673 fi
4674
4675 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4676   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4677 #define $ac_tr_decl 1
4678 EOF
4679  
4680 else
4681   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4682 #define $ac_tr_decl 0
4683 EOF
4684  
4685 fi
4686
4687 done
4688 if test x = y ; then
4689   cat >> confdefs.h <<\EOF
4690 #define HAVE_DECL_GETRLIMIT 1
4691 EOF
4692  cat >> confdefs.h <<\EOF
4693 #define HAVE_DECL_SETRLIMIT 1
4694 EOF
4695  cat >> confdefs.h <<\EOF
4696 #define HAVE_DECL_GETRUSAGE 1
4697 EOF
4698 fi
4699
4700
4701 cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704
4705 #include "ansidecl.h"
4706 #include "system.h"
4707 #ifdef HAVE_SYS_RESOURCE_H
4708 #include <sys/resource.h>
4709 #endif
4710
4711 int main() {
4712 rlim_t l = 0;
4713 ; return 0; }
4714 EOF
4715 if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4716   :
4717 else
4718   echo "configure: failed program was:" >&5
4719   cat conftest.$ac_ext >&5
4720   rm -rf conftest*
4721   cat >> confdefs.h <<\EOF
4722 #define rlim_t long
4723 EOF
4724
4725 fi
4726 rm -f conftest*
4727
4728 for ac_func in ldgetname
4729 do
4730   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4731 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4732 echo "configure:4733: checking whether $ac_func is declared" >&5
4733 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 #undef $ac_tr_decl
4740 #define $ac_tr_decl 1
4741   
4742 #include "ansidecl.h"
4743 #include "system.h"
4744 #ifdef HAVE_LDFCN_H
4745 #include <ldfcn.h>
4746 #endif
4747
4748
4749 int main() {
4750 #ifndef $ac_func
4751 char *(*pfn) = (char *(*)) $ac_func ;
4752 #endif
4753 ; return 0; }
4754 EOF
4755 if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4756   rm -rf conftest*
4757   eval "gcc_cv_have_decl_$ac_func=yes"
4758 else
4759   echo "configure: failed program was:" >&5
4760   cat conftest.$ac_ext >&5
4761   rm -rf conftest*
4762   eval "gcc_cv_have_decl_$ac_func=no"
4763 fi
4764 rm -f conftest*
4765 fi
4766
4767 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4768   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4769 #define $ac_tr_decl 1
4770 EOF
4771  
4772 else
4773   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4774 #define $ac_tr_decl 0
4775 EOF
4776  
4777 fi
4778
4779 done
4780 if test x = y ; then
4781   cat >> confdefs.h <<\EOF
4782 #define HAVE_DECL_LDGETNAME 1
4783 EOF
4784 fi
4785
4786
4787 for ac_func in times
4788 do
4789   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4790 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4791 echo "configure:4792: checking whether $ac_func is declared" >&5
4792 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798 #undef $ac_tr_decl
4799 #define $ac_tr_decl 1
4800   
4801 #include "ansidecl.h"
4802 #include "system.h"
4803 #ifdef HAVE_SYS_TIMES_H
4804 #include <sys/times.h>
4805 #endif
4806
4807
4808 int main() {
4809 #ifndef $ac_func
4810 char *(*pfn) = (char *(*)) $ac_func ;
4811 #endif
4812 ; return 0; }
4813 EOF
4814 if { (eval echo configure:4815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4815   rm -rf conftest*
4816   eval "gcc_cv_have_decl_$ac_func=yes"
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   rm -rf conftest*
4821   eval "gcc_cv_have_decl_$ac_func=no"
4822 fi
4823 rm -f conftest*
4824 fi
4825
4826 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4828 #define $ac_tr_decl 1
4829 EOF
4830  
4831 else
4832   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4833 #define $ac_tr_decl 0
4834 EOF
4835  
4836 fi
4837
4838 done
4839 if test x = y ; then
4840   cat >> confdefs.h <<\EOF
4841 #define HAVE_DECL_TIMES 1
4842 EOF
4843 fi
4844
4845
4846 # More time-related stuff.
4847 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4848 echo "configure:4849: checking for struct tms" >&5
4849 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4850   echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852   
4853 cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4856
4857 #include "ansidecl.h"
4858 #include "system.h"
4859 #ifdef HAVE_SYS_TIMES_H
4860 #include <sys/times.h>
4861 #endif
4862
4863 int main() {
4864 struct tms tms;
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4868   rm -rf conftest*
4869   ac_cv_struct_tms=yes
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   ac_cv_struct_tms=no
4875 fi
4876 rm -f conftest*
4877 fi
4878
4879 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4880 if test $ac_cv_struct_tms = yes; then
4881   cat >> confdefs.h <<\EOF
4882 #define HAVE_STRUCT_TMS 1
4883 EOF
4884
4885 fi
4886
4887 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4888 # revisit after autoconf 2.50.
4889 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4890 echo "configure:4891: checking for clock_t" >&5
4891 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   
4895 cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898
4899 #include "ansidecl.h"
4900 #include "system.h"
4901
4902 int main() {
4903 clock_t x;
4904 ; return 0; }
4905 EOF
4906 if { (eval echo configure:4907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4907   rm -rf conftest*
4908   gcc_cv_type_clock_t=yes
4909 else
4910   echo "configure: failed program was:" >&5
4911   cat conftest.$ac_ext >&5
4912   rm -rf conftest*
4913   gcc_cv_type_clock_t=no
4914 fi
4915 rm -f conftest*
4916 fi
4917
4918 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4919 if test $gcc_cv_type_clock_t = yes; then
4920   cat >> confdefs.h <<\EOF
4921 #define HAVE_CLOCK_T 1
4922 EOF
4923
4924 fi
4925
4926 echo $ac_n "checking for uchar""... $ac_c" 1>&6
4927 echo "configure:4928: checking for uchar" >&5
4928 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934
4935 #include "ansidecl.h"
4936 #include "system.h"
4937
4938 int main() {
4939 if ((uchar *)0) return 0;
4940  if (sizeof(uchar)) return 0;
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4944   rm -rf conftest*
4945   ac_cv_type_uchar=yes
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   ac_cv_type_uchar=no
4951 fi
4952 rm -f conftest*
4953 fi
4954
4955 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
4956 if test $ac_cv_type_uchar = yes; then
4957   cat >> confdefs.h <<\EOF
4958 #define HAVE_UCHAR 1
4959 EOF
4960
4961 fi
4962
4963 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4964 CFLAGS="$saved_CFLAGS"
4965
4966 # Check whether --enable-initfini-array or --disable-initfini-array was given.
4967 if test "${enable_initfini_array+set}" = set; then
4968   enableval="$enable_initfini_array"
4969   :
4970 else
4971   
4972 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
4973 echo "configure:4974: checking for .preinit_array/.init_array/.fini_array support" >&5
4974 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977     if test "$cross_compiling" = yes; then
4978   gcc_cv_initfini_array=no
4979 else
4980   cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983
4984 static int x = -1;
4985 int main (void) { return x; }
4986 int foo (void) { x = 0; }
4987 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4990 then
4991   gcc_cv_initfini_array=yes
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -fr conftest*
4996   gcc_cv_initfini_array=no
4997 fi
4998 rm -fr conftest*
4999 fi
5000
5001 fi
5002
5003 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5004   enable_initfini_array=$gcc_cv_initfini_array
5005
5006 fi
5007
5008 if test $enable_initfini_array = yes; then
5009   cat >> confdefs.h <<\EOF
5010 #define HAVE_INITFINI_ARRAY 1
5011 EOF
5012
5013 fi
5014
5015 # mkdir takes a single argument on some systems. 
5016 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5017 echo "configure:5018: checking if mkdir takes one argument" >&5
5018 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021   cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024
5025 #include <sys/types.h>
5026 #ifdef HAVE_SYS_STAT_H
5027 # include <sys/stat.h>
5028 #endif
5029 #ifdef HAVE_UNISTD_H
5030 # include <unistd.h>
5031 #endif
5032 #ifdef HAVE_DIRECT_H
5033 # include <direct.h>
5034 #endif
5035 int main() {
5036 mkdir ("foo", 0);
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5040   rm -rf conftest*
5041   gcc_cv_mkdir_takes_one_arg=no
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   gcc_cv_mkdir_takes_one_arg=yes
5047 fi
5048 rm -f conftest*
5049 fi
5050
5051 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5052 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5053   cat >> confdefs.h <<\EOF
5054 #define MKDIR_TAKES_ONE_ARG 1
5055 EOF
5056
5057 fi
5058
5059
5060 # File extensions
5061 manext='.1'
5062 objext='.o'
5063
5064
5065
5066 # With Setjmp/Longjmp based exception handling.
5067 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5068 if test "${enable_sjlj_exceptions+set}" = set; then
5069   enableval="$enable_sjlj_exceptions"
5070   sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5071 cat >> confdefs.h <<EOF
5072 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5073 EOF
5074
5075 fi
5076
5077
5078 if test x$host = x$target; then
5079    echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5080 echo "configure:5081: checking for main in -lunwind" >&5
5081 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5082 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085   ac_save_LIBS="$LIBS"
5086 LIBS="-lunwind  $LIBS"
5087 cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090
5091 int main() {
5092 main()
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5096   rm -rf conftest*
5097   eval "ac_cv_lib_$ac_lib_var=yes"
5098 else
5099   echo "configure: failed program was:" >&5
5100   cat conftest.$ac_ext >&5
5101   rm -rf conftest*
5102   eval "ac_cv_lib_$ac_lib_var=no"
5103 fi
5104 rm -f conftest*
5105 LIBS="$ac_save_LIBS"
5106
5107 fi
5108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5109   echo "$ac_t""yes" 1>&6
5110   use_libunwind_default=yes
5111 else
5112   echo "$ac_t""no" 1>&6
5113 use_libunwind_default=no
5114 fi
5115
5116 else
5117    use_libunwind_default=no
5118 fi
5119 # Use libunwind based exception handling.
5120 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5121 if test "${enable_libunwind_exceptions+set}" = set; then
5122   enableval="$enable_libunwind_exceptions"
5123   use_libunwind_exceptions=$enableval
5124 else
5125   use_libunwind_exceptions=$use_libunwind_default
5126 fi
5127
5128 if test x"$use_libunwind_exceptions" = xyes; then
5129    cat >> confdefs.h <<\EOF
5130 #define USE_LIBUNWIND_EXCEPTIONS 1
5131 EOF
5132
5133 fi
5134
5135 # --------------------------------------------------------
5136 # Build, host, and target specific configuration fragments
5137 # --------------------------------------------------------
5138
5139 # Collect build-machine-specific information.
5140 . ${srcdir}/config.build
5141
5142 # Collect host-machine-specific information.
5143 . ${srcdir}/config.host
5144
5145 target_gtfiles=
5146
5147 # Collect target-machine-specific information.
5148 . ${srcdir}/config.gcc
5149
5150 extra_objs="${host_extra_objs} ${extra_objs}"
5151
5152 # Default the target-machine variables that were not explicitly set.
5153 if test x"$tm_file" = x
5154 then tm_file=$cpu_type/$cpu_type.h; fi
5155
5156 if test x"$extra_headers" = x
5157 then extra_headers=; fi
5158
5159 if test x$md_file = x
5160 then md_file=$cpu_type/$cpu_type.md; fi
5161
5162 if test x$out_file = x
5163 then out_file=$cpu_type/$cpu_type.c; fi
5164
5165 if test x"$tmake_file" = x
5166 then tmake_file=$cpu_type/t-$cpu_type
5167 fi
5168
5169 if test x"$dwarf2" = xyes
5170 then tm_file="$tm_file tm-dwarf2.h"
5171 fi
5172
5173 # Say what files are being used for the output code and MD file.
5174 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5175 echo "Using \`$srcdir/config/$md_file' as machine description file."
5176
5177 # If any of the xm_file variables contain nonexistent files, warn
5178 # about them and drop them.
5179
5180 bx=
5181 for x in $build_xm_file; do
5182   if    test -f $srcdir/config/$x
5183   then      bx="$bx $x"
5184   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5185   fi
5186 done
5187 build_xm_file="$bx"
5188
5189 hx=
5190 for x in $host_xm_file; do
5191   if    test -f $srcdir/config/$x
5192   then      hx="$hx $x"
5193   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5194   fi
5195 done
5196 host_xm_file="$hx"
5197
5198 tx=
5199 for x in $xm_file; do
5200   if    test -f $srcdir/config/$x
5201   then      tx="$tx $x"
5202   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5203   fi
5204 done
5205 xm_file="$tx"
5206
5207 count=a
5208 for f in $tm_file; do
5209         count=${count}x
5210 done
5211 if test $count = ax; then
5212         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5213 else
5214         echo "Using the following target machine macro files:"
5215         for f in $tm_file; do
5216                 echo "  $srcdir/config/$f"
5217         done
5218 fi
5219
5220 if test x$need_64bit_hwint = xyes; then
5221         cat >> confdefs.h <<\EOF
5222 #define NEED_64BIT_HOST_WIDE_INT 1
5223 EOF
5224
5225 fi
5226
5227 count=a
5228 for f in $host_xm_file; do
5229         count=${count}x
5230 done
5231 if test $count = a; then
5232         :
5233 elif test $count = ax; then
5234         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5235 else
5236         echo "Using the following host machine macro files:"
5237         for f in $host_xm_file; do
5238                 echo "  $srcdir/config/$f"
5239         done
5240 fi
5241 echo "Using ${out_host_hook_obj} for host machine hooks."
5242
5243 if test "$host_xm_file" != "$build_xm_file"; then
5244         count=a
5245         for f in $build_xm_file; do
5246                 count=${count}x
5247         done
5248         if test $count = a; then
5249                 :
5250         elif test $count = ax; then
5251                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5252         else
5253                 echo "Using the following build machine macro files:"
5254                 for f in $build_xm_file; do
5255                         echo "  $srcdir/config/$f"
5256                 done
5257         fi
5258 fi
5259
5260 if test x$thread_file = x; then
5261         if test x$target_thread_file != x; then
5262                 thread_file=$target_thread_file
5263         else
5264                 thread_file='single'
5265         fi
5266 fi
5267
5268 if test x$enable___cxa_atexit = xyes || \
5269    test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5270   cat >> confdefs.h <<\EOF
5271 #define DEFAULT_USE_CXA_ATEXIT 1
5272 EOF
5273
5274 fi
5275
5276 # Look for a file containing extra machine modes.
5277 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5278   extra_modes_file='$(srcdir)'/config/${extra_modes}
5279   
5280   cat >> confdefs.h <<EOF
5281 #define EXTRA_MODES_FILE "config/$extra_modes"
5282 EOF
5283
5284   cat >> confdefs.h <<\EOF
5285 #define EXTRA_CC_MODES 1
5286 EOF
5287
5288 fi
5289
5290 # auto-host.h is the file containing items generated by autoconf and is
5291 # the first file included by config.h.
5292 # If host=build, it is correct to have bconfig include auto-host.h
5293 # as well.  If host!=build, we are in error and need to do more 
5294 # work to find out the build config parameters.
5295 if test x$host = x$build
5296 then
5297         build_auto=auto-host.h
5298         FORBUILD=..
5299 else
5300         # We create a subdir, then run autoconf in the subdir.
5301         # To prevent recursion we set host and build for the new
5302         # invocation of configure to the build for this invocation
5303         # of configure. 
5304         tempdir=build.$$
5305         rm -rf $tempdir
5306         mkdir $tempdir
5307         cd $tempdir
5308         case ${srcdir} in
5309         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5310         *) realsrcdir=../${srcdir};;
5311         esac
5312         saved_CFLAGS="${CFLAGS}"
5313         CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5314         ${realsrcdir}/configure \
5315                 --target=$target_alias --host=$build_alias --build=$build_alias
5316         CFLAGS="${saved_CFLAGS}"
5317
5318         # We just finished tests for the build machine, so rename
5319         # the file auto-build.h in the gcc directory.
5320         mv auto-host.h ../auto-build.h
5321         cd ..
5322         rm -rf $tempdir
5323         build_auto=auto-build.h
5324         FORBUILD=../${build_subdir}
5325 fi
5326
5327
5328 tm_file="${tm_file} defaults.h"
5329 tm_p_file="${tm_p_file} tm-preds.h"
5330 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5331 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5332 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5333 # put this back in temporarily.
5334 xm_file="ansidecl.h ${xm_file}"
5335
5336 # --------
5337 # UNSORTED
5338 # --------
5339
5340 # Get the version trigger filename from the toplevel
5341 if test "${with_gcc_version_trigger+set}" = set; then
5342         gcc_version_trigger=$with_gcc_version_trigger
5343 else
5344         gcc_version_trigger=${srcdir}/version.c
5345 fi
5346 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5347 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5348
5349 # Compile in configure arguments.
5350 if test -f configargs.h ; then
5351         # Being re-configured.
5352         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5353         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5354 else
5355         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5356 fi
5357
5358 # Double all backslashes and backslash all quotes to turn
5359 # gcc_config_arguments into a C string.
5360 sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
5361 $gcc_config_arguments
5362 EOF
5363 gcc_config_arguments_str=`cat conftest.out`
5364 rm -f conftest.out
5365
5366 cat > configargs.h <<EOF
5367 /* Generated automatically. */
5368 static const char configuration_arguments[] = "$gcc_config_arguments_str";
5369 static const char thread_model[] = "$thread_file";
5370
5371 static const struct {
5372   const char *name, *value;
5373 } configure_default_options[] = $configure_default_options;
5374 EOF
5375
5376 # Internationalization
5377 PACKAGE=gcc
5378 VERSION="$gcc_version"
5379
5380
5381
5382 # If we haven't got the data from the intl directory,
5383 # assume NLS is disabled.
5384 USE_NLS=no      
5385 LIBINTL=        
5386 LIBINTL_DEP=    
5387 INCINTL=        
5388 XGETTEXT=       
5389 GMSGFMT=        
5390 POSUB=          
5391 if test -f ../intl/config.intl; then
5392   . ../intl/config.intl
5393 fi
5394 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5395 echo "configure:5396: checking whether NLS is requested" >&5
5396 if test x"$USE_NLS" != xyes; then
5397   echo "$ac_t""no" 1>&6
5398 else
5399   echo "$ac_t""yes" 1>&6
5400   cat >> confdefs.h <<\EOF
5401 #define ENABLE_NLS 1
5402 EOF
5403
5404
5405   echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5406 echo "configure:5407: checking for catalogs to be installed" >&5
5407   # Look for .po and .gmo files in the source directory.
5408   CATALOGS=  
5409   XLINGUAS=
5410   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5411     # If there aren't any .gmo files the shell will give us the
5412     # literal string "../path/to/srcdir/po/*.gmo" which has to be
5413     # weeded out.
5414     case "$cat" in *\**)
5415       continue;;
5416     esac
5417     # The quadruple backslash is collapsed to a double backslash
5418     # by the backticks, then collapsed again by the double quotes,
5419     # leaving us with one backslash in the sed expression (right
5420     # before the dot that mustn't act as a wildcard).
5421     cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
5422     lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
5423     # The user is allowed to set LINGUAS to a list of languages to
5424     # install catalogs for.  If it's empty that means "all of them."
5425     if test "x$LINGUAS" = x; then
5426       CATALOGS="$CATALOGS $cat"
5427       XLINGUAS="$XLINGUAS $lang"
5428     else
5429       case "$LINGUAS" in *$lang*)
5430         CATALOGS="$CATALOGS $cat"
5431         XLINGUAS="$XLINGUAS $lang"
5432         ;;
5433       esac
5434     fi
5435   done
5436   LINGUAS="$XLINGUAS"
5437   echo "$ac_t""$LINGUAS" 1>&6
5438 fi
5439
5440 # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
5441 # -liconv on the link line twice.
5442 case "$LIBINTL" in *$LIBICONV*)
5443         LIBICONV= ;;
5444 esac
5445
5446 # Windows32 Registry support for specifying GCC installation paths.
5447 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5448 if test "${enable_win32_registry+set}" = set; then
5449   enableval="$enable_win32_registry"
5450   :
5451 fi
5452
5453 case $host_os in
5454         win32 | pe | cygwin* | mingw32* | uwin*)
5455 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5456 echo "configure:5457: checking whether windows registry support is requested" >&5
5457 if test "x$enable_win32_registry" != xno; then
5458   cat >> confdefs.h <<\EOF
5459 #define ENABLE_WIN32_REGISTRY 1
5460 EOF
5461
5462   echo "$ac_t""yes" 1>&6
5463   
5464 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
5465 echo "configure:5466: checking for library containing RegOpenKeyExA" >&5
5466 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
5467   echo $ac_n "(cached) $ac_c" 1>&6
5468 else
5469   ac_func_search_save_LIBS="$LIBS"
5470 ac_cv_search_RegOpenKeyExA="no"
5471 cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 /* Override any gcc2 internal prototype to avoid an error.  */
5475 /* We use char because int might match the return type of a gcc2
5476     builtin and then its argument prototype would still apply.  */
5477 char RegOpenKeyExA();
5478
5479 int main() {
5480 RegOpenKeyExA()
5481 ; return 0; }
5482 EOF
5483 if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5484   rm -rf conftest*
5485   ac_cv_search_RegOpenKeyExA="none required"
5486 else
5487   echo "configure: failed program was:" >&5
5488   cat conftest.$ac_ext >&5
5489 fi
5490 rm -f conftest*
5491 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
5492 LIBS="-l$i  $ac_func_search_save_LIBS"
5493 cat > conftest.$ac_ext <<EOF
5494 #line 5495 "configure"
5495 #include "confdefs.h"
5496 /* Override any gcc2 internal prototype to avoid an error.  */
5497 /* We use char because int might match the return type of a gcc2
5498     builtin and then its argument prototype would still apply.  */
5499 char RegOpenKeyExA();
5500
5501 int main() {
5502 RegOpenKeyExA()
5503 ; return 0; }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5506   rm -rf conftest*
5507   ac_cv_search_RegOpenKeyExA="-l$i"
5508 break
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512 fi
5513 rm -f conftest*
5514 done
5515 LIBS="$ac_func_search_save_LIBS"
5516 fi
5517
5518 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
5519 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
5520   test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
5521   
5522 else :
5523   
5524 fi
5525 else
5526   echo "$ac_t""no" 1>&6
5527 fi
5528
5529 # Check if user specified a different registry key.
5530 case "x${enable_win32_registry}" in
5531 x | xyes)
5532   # default.
5533   gcc_cv_win32_registry_key="$VERSION"
5534   ;;
5535 xno)
5536   # no registry lookup.
5537   gcc_cv_win32_registry_key=''
5538   ;;
5539 *)
5540   # user-specified key.
5541   gcc_cv_win32_registry_key="$enable_win32_registry"
5542   ;;
5543 esac
5544
5545 if test "x$enable_win32_registry" != xno; then
5546   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
5547 echo "configure:5548: checking registry key on windows hosts" >&5
5548   cat >> confdefs.h <<EOF
5549 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
5550 EOF
5551
5552   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
5553 fi
5554 ;;
5555 esac
5556
5557 # Get an absolute path to the GCC top-level source directory
5558 holddir=`${PWDCMD-pwd}`
5559 cd $srcdir
5560 topdir=`${PWDCMD-pwd}`
5561 cd $holddir
5562
5563 # Conditionalize the makefile for this host machine.
5564 xmake_file=
5565 for f in ${host_xmake_file}
5566 do
5567         if test -f ${srcdir}/config/$f
5568         then
5569                 xmake_file="${xmake_file} \$(srcdir)/config/$f"
5570         fi
5571 done
5572
5573 # Conditionalize the makefile for this target machine.
5574 tmake_file_=
5575 for f in ${tmake_file}
5576 do
5577         if test -f ${srcdir}/config/$f
5578         then
5579                 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
5580         fi
5581 done
5582 tmake_file="${tmake_file_}"
5583
5584 symbolic_link='ln -s'
5585
5586 # If the host doesn't support symlinks, modify CC in
5587 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5588 # Otherwise, we can use "CC=$(CC)".
5589 rm -f symtest.tem
5590 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5591 then
5592         cc_set_by_configure="\$(CC)"
5593         quoted_cc_set_by_configure="\$(CC)"
5594         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5595         quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5596 else
5597         rm -f symtest.tem
5598         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5599         then
5600                 symbolic_link="cp -p"
5601         else
5602                 symbolic_link="cp"
5603         fi
5604         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5605         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
5606         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5607         quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
5608 fi
5609 rm -f symtest.tem
5610
5611 out_object_file=`basename $out_file .c`.o
5612
5613 tm_file_list=
5614 tm_include_list=
5615 for f in $tm_file; do
5616   case $f in
5617     defaults.h )
5618        tm_file_list="${tm_file_list} \$(srcdir)/$f"
5619        tm_include_list="${tm_include_list} $f"
5620        ;;
5621     * )
5622        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
5623        tm_include_list="${tm_include_list} config/$f"
5624        ;;
5625   esac
5626 done
5627
5628 tm_p_file_list=
5629 tm_p_include_list=
5630 for f in $tm_p_file; do
5631   case $f in
5632     tm-preds.h )
5633        tm_p_file_list="${tm_p_file_list} $f"
5634        tm_p_include_list="${tm_p_include_list} $f"
5635        ;;
5636     * )
5637        tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
5638        tm_p_include_list="${tm_p_include_list} config/$f"
5639   esac
5640 done
5641
5642 xm_file_list=
5643 xm_include_list=
5644 for f in $xm_file; do
5645   case $f in
5646     ansidecl.h )
5647        xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
5648        xm_include_list="${xm_include_list} $f"
5649        ;;
5650     auto-host.h )
5651        xm_file_list="${xm_file_list} $f"
5652        xm_include_list="${xm_include_list} $f"
5653        ;;
5654     * )
5655        xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
5656        xm_include_list="${xm_include_list} config/$f"
5657        ;;
5658   esac
5659 done
5660
5661 host_xm_file_list=
5662 host_xm_include_list=
5663 for f in $host_xm_file; do
5664   case $f in
5665     ansidecl.h )
5666        host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
5667        host_xm_include_list="${host_xm_include_list} $f"
5668        ;;
5669     auto-host.h )
5670        host_xm_file_list="${host_xm_file_list} $f"
5671        host_xm_include_list="${host_xm_include_list} $f"
5672        ;;
5673     * )
5674        host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
5675        host_xm_include_list="${host_xm_include_list} config/$f"
5676        ;;
5677   esac
5678 done
5679
5680 build_xm_file_list=
5681 for f in $build_xm_file; do
5682   case $f in
5683     ansidecl.h )
5684        build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
5685        build_xm_include_list="${build_xm_include_list} $f"
5686        ;;
5687     auto-build.h | auto-host.h )
5688        build_xm_file_list="${build_xm_file_list} $f"
5689        build_xm_include_list="${build_xm_include_list} $f"
5690        ;;
5691     * )
5692        build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
5693        build_xm_include_list="${build_xm_include_list} config/$f"
5694        ;;
5695   esac
5696 done
5697
5698 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
5699 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
5700 CROSS=                                          
5701 ALL=all.internal                                
5702 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' 
5703 if test x$host != x$target
5704 then
5705         CROSS="-DCROSS_COMPILE"
5706         ALL=all.cross
5707         SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
5708         case "$host","$target" in
5709         # Darwin crosses can use the host system's libraries and headers,
5710         # because of the fat library support.  Of course, it must be the
5711         # same version of Darwin on both sides.  Allow the user to
5712         # just say --target=foo-darwin without a version number to mean
5713         # "the version on this system".
5714             *-*-darwin*,*-*-darwin*)
5715                 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
5716                 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
5717                 if test $hostos = $targetos -o $targetos = darwin ; then
5718                     CROSS=
5719                     SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
5720                     with_headers=yes
5721                 fi
5722                 ;;
5723
5724             i?86-*-*,x86_64-*-* \
5725             | powerpc*-*-*,powerpc64*-*-*)
5726                 CROSS="$CROSS -DNATIVE_CROSS" ;;
5727         esac
5728 elif test "x$TARGET_SYSTEM_ROOT" != x; then
5729         # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
5730         SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
5731 fi
5732
5733 # If this is a cross-compiler that does not
5734 # have its own set of headers then define
5735 # inhibit_libc
5736
5737 # If this is using newlib, without having the headers available now,
5738 # then define inhibit_libc in LIBGCC2_CFLAGS.
5739 # This prevents libgcc2 from containing any code which requires libc
5740 # support.
5741 inhibit_libc=
5742 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
5743        test x$with_newlib = xyes ; } &&
5744      { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
5745        inhibit_libc=-Dinhibit_libc
5746 fi
5747
5748
5749 # When building gcc with a cross-compiler, we need to adjust things so
5750 # that the generator programs are still built with the native compiler.
5751 # Also, we cannot run fixincludes or fix-header.
5752
5753 # These are the normal (build=host) settings:
5754 BUILD_PREFIX=                   
5755 BUILD_PREFIX_1=ignore-          
5756 CC_FOR_BUILD='$(CC)'            
5757 BUILD_CFLAGS='$(ALL_CFLAGS)'    
5758
5759 STMP_FIXINC=stmp-fixinc         
5760
5761 # Possibly disable fixproto, on a per-target basis.
5762 case ${use_fixproto} in
5763   no)
5764     STMP_FIXPROTO=
5765     ;;
5766   yes)
5767     STMP_FIXPROTO=stmp-fixproto
5768     ;;
5769 esac
5770
5771
5772 # And these apply if build != host, or we are generating coverage data
5773 if test x$build != x$host || test "x$coverage_flags" != x
5774 then
5775     BUILD_PREFIX=build-
5776     BUILD_PREFIX_1=build-
5777     BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
5778
5779     if test "x$TARGET_SYSTEM_ROOT" = x; then
5780         STMP_FIXINC=
5781         STMP_FIXPROTO=
5782     fi
5783 fi
5784
5785 # Expand extra_headers to include complete path.
5786 # This substitutes for lots of t-* files.
5787 extra_headers_list=
5788 if test "x$extra_headers" = x
5789 then true
5790 else
5791         # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
5792         for file in $extra_headers;
5793         do
5794                 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
5795         done
5796 fi
5797
5798 # Add a definition of USE_COLLECT2 if system wants one.
5799 case $use_collect2 in
5800   no) use_collect2= ;;
5801   "") ;;
5802   *) 
5803     host_xm_defines="${host_xm_defines} USE_COLLECT2"
5804     xm_defines="${xm_defines} USE_COLLECT2"
5805     ;;
5806 esac
5807
5808 # Identify the assembler which will work hand-in-glove with the newly
5809 # built GCC, so that we can examine its features.  This is the assembler
5810 # which will be driven by the driver program.
5811 #
5812 # If build != host, and we aren't building gas in-tree, we identify a
5813 # build->target assembler and hope that it will have the same features
5814 # as the host->target assembler we'll be using.
5815 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
5816 echo "configure:5817: checking what assembler to use" >&5
5817 in_tree_gas=no
5818 gcc_cv_as=
5819 gcc_cv_gas_major_version=
5820 gcc_cv_gas_minor_version=
5821 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
5822 if test -x "$DEFAULT_ASSEMBLER"; then
5823         gcc_cv_as="$DEFAULT_ASSEMBLER"
5824 elif test -x "$AS"; then
5825         gcc_cv_as="$AS"
5826 elif test -x as$host_exeext; then
5827         # Build using assembler in the current directory.
5828         gcc_cv_as=./as$host_exeext
5829 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
5830      && test -f ../gas/Makefile; then
5831   # Single tree build which includes gas.
5832   in_tree_gas=yes
5833   gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
5834 for f in $gcc_cv_as_bfd_srcdir/configure \
5835          $gcc_cv_as_gas_srcdir/configure \
5836          $gcc_cv_as_gas_srcdir/configure.in \
5837          $gcc_cv_as_gas_srcdir/Makefile.in ; do
5838   gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5839   if test x$gcc_cv_gas_version != x; then
5840     break
5841   fi
5842 done
5843 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
5844 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5845 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5846 case $gcc_cv_gas_patch_version in
5847   "") gcc_cv_gas_patch_version="0" ;;
5848 esac
5849 gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
5850                             + $gcc_cv_gas_minor_version \) \* 1000 \
5851                             + $gcc_cv_gas_patch_version`
5852
5853   rm -f as$host_exeext
5854   $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5855   in_tree_gas_is_elf=no
5856   if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
5857      || (grep 'obj_format = multi' ../gas/Makefile \
5858          && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
5859   then
5860     in_tree_gas_is_elf=yes
5861   fi
5862 fi
5863
5864 if test "x$gcc_cv_as" = x; then
5865         # Search the same directories that the installed compiler will
5866         # search.  Else we may find the wrong assembler and lose.  If we
5867         # do not find a suitable assembler binary, then try the user's
5868         # path.
5869         #
5870         # Also note we have to check MD_EXEC_PREFIX before checking the
5871         # user's path.  Unfortunately, there is no good way to get at the
5872         # value of MD_EXEC_PREFIX here.  So we do a brute force search
5873         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
5874         # to be fixed as part of the make/configure rewrite too.
5875
5876         if test "x$exec_prefix" = xNONE; then
5877                 if test "x$prefix" = xNONE; then
5878                         test_prefix=/usr/local
5879                 else
5880                         test_prefix=$prefix
5881                 fi
5882         else
5883                 test_prefix=$exec_prefix
5884         fi
5885
5886         # If the loop below does not find an assembler, then use whatever
5887         # one we can find in the users's path.
5888         # user's path.
5889         if test "x$program_prefix" != xNONE; then
5890                 gcc_cv_as=${program_prefix}as$host_exeext
5891         else
5892                 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
5893         fi
5894
5895         test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
5896                    $test_prefix/lib/gcc-lib/$target_alias \
5897                    /usr/lib/gcc/$target_alias/$gcc_version \
5898                    /usr/lib/gcc/$target_alias \
5899                    $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
5900                    $test_prefix/$target_alias/bin"
5901
5902         if test x$host = x$target; then
5903             test_dirs="$test_dirs \
5904                    /usr/libexec \
5905                    /usr/ccs/gcc \
5906                    /usr/ccs/bin \
5907                    /udk/usr/ccs/bin \
5908                    /bsd43/usr/lib/cmplrs/cc \
5909                    /usr/cross64/usr/bin \
5910                    /usr/lib/cmplrs/cc \
5911                    /sysv/usr/lib/cmplrs/cc \
5912                    /svr4/usr/lib/cmplrs/cc \
5913                    /usr/bin"
5914         fi
5915
5916         for dir in $test_dirs; do
5917                 if test -x $dir/as$host_exeext; then
5918                         gcc_cv_as=$dir/as$host_exeext
5919                         break;
5920                 fi
5921         done
5922 fi
5923 case $in_tree_gas in
5924   yes)
5925     echo "$ac_t"""newly built gas"" 1>&6
5926     ;;
5927   no)
5928     echo "$ac_t""$gcc_cv_as" 1>&6
5929     ;;
5930 esac
5931
5932 # Identify the linker which will work hand-in-glove with the newly
5933 # built GCC, so that we can examine its features.  This is the linker
5934 # which will be driven by the driver program.
5935 #
5936 # If build != host, and we aren't building gas in-tree, we identify a
5937 # build->target linker and hope that it will have the same features
5938 # as the host->target linker we'll be using.
5939 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
5940 echo "configure:5941: checking what linker to use" >&5
5941 in_tree_ld=no
5942 gcc_cv_ld=
5943 gcc_cv_gld_major_version=
5944 gcc_cv_gld_minor_version=
5945 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
5946 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
5947 if test -x "$DEFAULT_LINKER"; then
5948         gcc_cv_ld="$DEFAULT_LINKER"
5949 elif test -x "$LD"; then
5950         gcc_cv_ld="$LD"
5951 elif test -x collect-ld$host_exeext; then
5952         # Build using linker in the current directory.
5953         gcc_cv_ld=./collect-ld$host_exeext
5954 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
5955      && test -f ../ld/Makefile; then
5956         # Single tree build which includes ld.
5957         in_tree_ld=yes
5958         in_tree_ld_is_elf=no
5959         if (grep 'EMUL = .*elf' ../ld/Makefile \
5960             || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
5961           in_tree_ld_is_elf=yes
5962         fi
5963         for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
5964         do
5965                 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5966                 if test x$gcc_cv_gld_version != x; then
5967                         break
5968                 fi
5969         done
5970         gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
5971         gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5972         rm -f collect-ld$host_exeext
5973         $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
5974                 2>/dev/null
5975 fi
5976
5977 if test "x$gcc_cv_ld" = x; then
5978         # Search the same directories that the installed compiler will
5979         # search.  Else we may find the wrong linker and lose.  If we
5980         # do not find a suitable linker binary, then try the user's
5981         # path.
5982         #
5983         # Also note we have to check MD_EXEC_PREFIX before checking the
5984         # user's path.  Unfortunately, there is no good way to get at the
5985         # value of MD_EXEC_PREFIX here.  So we do a brute force search
5986         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
5987         # to be fixed as part of the make/configure rewrite too.
5988
5989         if test "x$exec_prefix" = xNONE; then
5990                 if test "x$prefix" = xNONE; then
5991                         test_prefix=/usr/local
5992                 else
5993                         test_prefix=$prefix
5994                 fi
5995         else
5996                 test_prefix=$exec_prefix
5997         fi
5998
5999         # If the loop below does not find an linker, then use whatever
6000         # one we can find in the users's path.
6001         # user's path.
6002         if test "x$program_prefix" != xNONE; then
6003                 gcc_cv_ld=${program_prefix}ld$host_exeext
6004         else
6005                 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
6006         fi
6007
6008         test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6009                    $test_prefix/lib/gcc-lib/$target_alias \
6010                    /usr/lib/gcc/$target_alias/$gcc_version \
6011                    /usr/lib/gcc/$target_alias \
6012                    $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6013                    $test_prefix/$target_alias/bin"
6014
6015         if test x$host = x$target; then
6016             test_dirs="$test_dirs \
6017                    /usr/libexec \
6018                    /usr/ccs/gcc \
6019                    /usr/ccs/bin \
6020                    /udk/usr/ccs/bin \
6021                    /bsd43/usr/lib/cmplrs/cc \
6022                    /usr/cross64/usr/bin \
6023                    /usr/lib/cmplrs/cc \
6024                    /sysv/usr/lib/cmplrs/cc \
6025                    /svr4/usr/lib/cmplrs/cc \
6026                    /usr/bin"
6027         fi
6028
6029         for dir in $test_dirs; do
6030                 if test -x $dir/ld$host_exeext; then
6031                         gcc_cv_ld=$dir/ld$host_exeext
6032                         break;
6033                 fi
6034         done
6035 fi
6036 case $in_tree_ld in
6037   yes)
6038     echo "$ac_t"""newly built ld"" 1>&6
6039     ;;
6040   no)
6041     echo "$ac_t""$gcc_cv_ld" 1>&6
6042     ;;
6043 esac
6044
6045 # Figure out what nm we will be using.
6046 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
6047 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6048 echo "configure:6049: checking what nm to use" >&5
6049 in_tree_nm=no
6050 if test -x nm$host_exeext; then
6051         gcc_cv_nm=./nm$host_exeext
6052 elif test -f $gcc_cv_binutils_srcdir/configure.in \
6053      && test -f ../binutils/Makefile; then
6054         # Single tree build which includes binutils.
6055         in_tree_nm=yes
6056         gcc_cv_nm=./nm$host_exeext
6057         rm -f nm$host_exeext
6058         $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6059 elif test "x$program_prefix" != xNONE; then
6060         gcc_cv_nm=${program_prefix}nm$host_exeext
6061 else
6062         gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
6063 fi
6064 case $in_tree_nm in
6065   yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
6066   no)  echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
6067 esac
6068
6069 # Figure out what objdump we will be using.
6070 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
6071 echo "configure:6072: checking what objdump to use" >&5
6072 in_tree_objdump=no
6073 if test -x objdump$host_exeext; then
6074         gcc_cv_objdump=./objdump$host_exeext
6075 elif test -f $gcc_cv_binutils_srcdir/configure.in \
6076      && test -f ../binutils/Makefile; then
6077         # Single tree build which includes binutils.
6078         in_tree_objdump=yes
6079         gcc_cv_objdump=./objdump$host_exeext
6080         rm -f objdump$host_exeext
6081         $symbolic_link ../binutils/objdump$host_exeext \
6082                 objdump$host_exeext 2>/dev/null
6083 elif test "x$program_prefix" != xNONE; then
6084         gcc_cv_objdump=${program_prefix}objdump$host_exeext
6085 else
6086         gcc_cv_objdump=`echo objdump | \
6087                 sed ${program_transform_name}`$host_exeext
6088 fi
6089 case $in_tree_objdump in
6090   yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
6091   no)  echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
6092 esac
6093
6094 # Figure out what assembler alignment features are present.
6095 echo $ac_n "checking assembler for .balign and .p2align""... $ac_c" 1>&6
6096 echo "configure:6097: checking assembler for .balign and .p2align" >&5
6097 if eval "test \"`echo '$''{'gcc_cv_as_balign_and_p2align'+set}'`\" = set"; then
6098   echo $ac_n "(cached) $ac_c" 1>&6
6099 else
6100   gcc_cv_as_balign_and_p2align=no
6101     if test $in_tree_gas = yes; then
6102     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
6103   then gcc_cv_as_balign_and_p2align=yes
6104 fi
6105   elif test x$gcc_cv_as != x; then
6106     echo '.balign 4
6107 .p2align 2' > conftest.s
6108     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6109     then
6110         gcc_cv_as_balign_and_p2align=yes
6111     else
6112       echo "configure: failed program was" >&5
6113       cat conftest.s >&5
6114     fi
6115     rm -f conftest.o conftest.s
6116   fi
6117 fi
6118
6119 echo "$ac_t""$gcc_cv_as_balign_and_p2align" 1>&6
6120 if test $gcc_cv_as_balign_and_p2align = yes; then
6121   cat >> confdefs.h <<\EOF
6122 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6123 EOF
6124
6125 fi
6126
6127 echo $ac_n "checking assembler for .p2align with maximum skip""... $ac_c" 1>&6
6128 echo "configure:6129: checking assembler for .p2align with maximum skip" >&5
6129 if eval "test \"`echo '$''{'gcc_cv_as_max_skip_p2align'+set}'`\" = set"; then
6130   echo $ac_n "(cached) $ac_c" 1>&6
6131 else
6132   gcc_cv_as_max_skip_p2align=no
6133     if test $in_tree_gas = yes; then
6134     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
6135   then gcc_cv_as_max_skip_p2align=yes
6136 fi
6137   elif test x$gcc_cv_as != x; then
6138     echo '.p2align 4,,7' > conftest.s
6139     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6140     then
6141         gcc_cv_as_max_skip_p2align=yes
6142     else
6143       echo "configure: failed program was" >&5
6144       cat conftest.s >&5
6145     fi
6146     rm -f conftest.o conftest.s
6147   fi
6148 fi
6149
6150 echo "$ac_t""$gcc_cv_as_max_skip_p2align" 1>&6
6151 if test $gcc_cv_as_max_skip_p2align = yes; then
6152   cat >> confdefs.h <<\EOF
6153 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6154 EOF
6155
6156 fi
6157
6158 echo $ac_n "checking assembler for working .subsection -1""... $ac_c" 1>&6
6159 echo "configure:6160: checking assembler for working .subsection -1" >&5
6160 if eval "test \"`echo '$''{'gcc_cv_as_subsection_m1'+set}'`\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   gcc_cv_as_subsection_m1=no
6164     if test $in_tree_gas = yes; then
6165     if test $in_tree_gas_is_elf = yes \
6166   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
6167   then gcc_cv_as_subsection_m1=yes
6168 fi
6169   elif test x$gcc_cv_as != x; then
6170     echo 'conftest_label1: .word 0
6171 .subsection -1
6172 conftest_label2: .word 0
6173 .previous' > conftest.s
6174     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6175     then
6176         if test x$gcc_cv_nm != x; then
6177     $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6178     $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6179     if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
6180     then :
6181     else gcc_cv_as_subsection_m1=yes
6182     fi
6183     rm -f conftest.nm1 conftest.nm2
6184   fi
6185     else
6186       echo "configure: failed program was" >&5
6187       cat conftest.s >&5
6188     fi
6189     rm -f conftest.o conftest.s
6190   fi
6191 fi
6192
6193 echo "$ac_t""$gcc_cv_as_subsection_m1" 1>&6
6194 if test $gcc_cv_as_subsection_m1 = yes; then
6195   cat >> confdefs.h <<\EOF
6196 #define HAVE_GAS_SUBSECTION_ORDERING 1
6197 EOF
6198
6199 fi
6200
6201 echo $ac_n "checking assembler for .weak""... $ac_c" 1>&6
6202 echo "configure:6203: checking assembler for .weak" >&5
6203 if eval "test \"`echo '$''{'gcc_cv_as_weak'+set}'`\" = set"; then
6204   echo $ac_n "(cached) $ac_c" 1>&6
6205 else
6206   gcc_cv_as_weak=no
6207     if test $in_tree_gas = yes; then
6208     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
6209   then gcc_cv_as_weak=yes
6210 fi
6211   elif test x$gcc_cv_as != x; then
6212     echo '      .weak foobar' > conftest.s
6213     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6214     then
6215         gcc_cv_as_weak=yes
6216     else
6217       echo "configure: failed program was" >&5
6218       cat conftest.s >&5
6219     fi
6220     rm -f conftest.o conftest.s
6221   fi
6222 fi
6223
6224 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6225 if test $gcc_cv_as_weak = yes; then
6226   cat >> confdefs.h <<\EOF
6227 #define HAVE_GAS_WEAK 1
6228 EOF
6229
6230 fi
6231
6232 # .hidden needs to be supported in both the assembler and the linker,
6233 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
6234 # This is irritatingly difficult to feature test for; we have to check the
6235 # date string after the version number.  If we've got an in-tree
6236 # ld, we don't know its patchlevel version, so we set the baseline at 2.13
6237 # to be safe.
6238 # The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
6239 echo $ac_n "checking assembler for .hidden""... $ac_c" 1>&6
6240 echo "configure:6241: checking assembler for .hidden" >&5
6241 if eval "test \"`echo '$''{'gcc_cv_as_hidden'+set}'`\" = set"; then
6242   echo $ac_n "(cached) $ac_c" 1>&6
6243 else
6244   gcc_cv_as_hidden=no
6245     if test $in_tree_gas = yes; then
6246     if test $in_tree_gas_is_elf = yes \
6247   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
6248   then gcc_cv_as_hidden=yes
6249 fi
6250   elif test x$gcc_cv_as != x; then
6251     echo '      .hidden foobar
6252 foobar:' > conftest.s
6253     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6254     then
6255         gcc_cv_as_hidden=yes
6256     else
6257       echo "configure: failed program was" >&5
6258       cat conftest.s >&5
6259     fi
6260     rm -f conftest.o conftest.s
6261   fi
6262 fi
6263
6264 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6265
6266
6267 echo $ac_n "checking linker for .hidden support""... $ac_c" 1>&6
6268 echo "configure:6269: checking linker for .hidden support" >&5
6269 if eval "test \"`echo '$''{'gcc_cv_ld_hidden'+set}'`\" = set"; then
6270   echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272   if test $in_tree_ld = yes ; then
6273   gcc_cv_ld_hidden=no
6274   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \
6275      && test $in_tree_ld_is_elf = yes; then
6276      gcc_cv_ld_hidden=yes
6277   fi
6278 else
6279   gcc_cv_ld_hidden=yes
6280   ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
6281   if echo "$ld_ver" | grep GNU > /dev/null; then
6282     ld_vers=`echo $ld_ver | sed -n \
6283         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6284         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6285         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6286         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)[  ].*$,\1,p' \
6287         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[     ].*$,\1,p' \
6288         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[        ].*$,\1,p'`
6289     ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
6290     if test 0"$ld_date" -lt 20020404; then
6291       if test -n "$ld_date"; then
6292         # If there was date string, but was earlier than 2002-04-04, fail
6293         gcc_cv_ld_hidden=no
6294       elif test -z "$ld_vers"; then
6295         # If there was no date string nor ld version number, something is wrong
6296         gcc_cv_ld_hidden=no
6297       else
6298         ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
6299         ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
6300         ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
6301         test -z "$ld_vers_patch" && ld_vers_patch=0
6302         if test "$ld_vers_major" -lt 2; then
6303           gcc_cv_ld_hidden=no
6304         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
6305           gcc_cv_ld_hidden="no"
6306         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
6307           gcc_cv_ld_hidden=no
6308         fi
6309       fi
6310     fi
6311   else
6312     # non-GNU linkers don't seem to support .hidden yet
6313     gcc_cv_ld_hidden=no
6314   fi
6315 fi
6316 fi
6317
6318 echo "$ac_t""$gcc_cv_ld_hidden" 1>&6
6319 libgcc_visibility=no
6320
6321 if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
6322   libgcc_visibility=yes
6323   cat >> confdefs.h <<\EOF
6324 #define HAVE_GAS_HIDDEN 1
6325 EOF
6326
6327 fi
6328
6329 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6330 echo $ac_n "checking assembler for .sleb128 and .uleb128""... $ac_c" 1>&6
6331 echo "configure:6332: checking assembler for .sleb128 and .uleb128" >&5
6332 if eval "test \"`echo '$''{'gcc_cv_as_leb128'+set}'`\" = set"; then
6333   echo $ac_n "(cached) $ac_c" 1>&6
6334 else
6335   gcc_cv_as_leb128=no
6336     if test $in_tree_gas = yes; then
6337     if test $in_tree_gas_is_elf = yes \
6338   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
6339   then gcc_cv_as_leb128=yes
6340 fi
6341   elif test x$gcc_cv_as != x; then
6342     echo '      .data
6343         .uleb128 L2 - L1
6344 L1:
6345         .uleb128 1280
6346         .sleb128 -1010
6347 L2:' > conftest.s
6348     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6349     then
6350         # GAS versions before 2.11 do not support uleb128,
6351   # despite appearing to.
6352   # ??? There exists an elf-specific test that will crash
6353   # the assembler.  Perhaps it's better to figure out whether
6354   # arbitrary sections are supported and try the test.
6355   as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
6356   if echo "$as_ver" | grep GNU > /dev/null; then
6357     as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
6358     as_major=`echo $as_ver | sed 's/\..*//'`
6359     as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6360     if test $as_major -eq 2 && test $as_minor -lt 11
6361     then :
6362     else gcc_cv_as_leb128=yes
6363     fi
6364   fi
6365     else
6366       echo "configure: failed program was" >&5
6367       cat conftest.s >&5
6368     fi
6369     rm -f conftest.o conftest.s
6370   fi
6371 fi
6372
6373 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6374 if test $gcc_cv_as_leb128 = yes; then
6375   cat >> confdefs.h <<\EOF
6376 #define HAVE_AS_LEB128 1
6377 EOF
6378
6379 fi
6380
6381 # GAS versions up to and including 2.11.0 may mis-optimize
6382 # .eh_frame data.
6383 echo $ac_n "checking assembler for eh_frame optimization""... $ac_c" 1>&6
6384 echo "configure:6385: checking assembler for eh_frame optimization" >&5
6385 if eval "test \"`echo '$''{'gcc_cv_as_eh_frame'+set}'`\" = set"; then
6386   echo $ac_n "(cached) $ac_c" 1>&6
6387 else
6388   gcc_cv_as_eh_frame=no
6389     if test $in_tree_gas = yes; then
6390     if test $in_tree_gas_is_elf = yes \
6391   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6392   then gcc_cv_as_eh_frame=yes
6393 fi
6394   elif test x$gcc_cv_as != x; then
6395     echo '      .text
6396 .LFB1:
6397         .4byte  0
6398 .L1:
6399         .4byte  0
6400 .LFE1:
6401         .section        .eh_frame,"aw",@progbits
6402 __FRAME_BEGIN__:
6403         .4byte  .LECIE1-.LSCIE1
6404 .LSCIE1:
6405         .4byte  0x0
6406         .byte   0x1
6407         .ascii "z\0"
6408         .byte   0x1
6409         .byte   0x78
6410         .byte   0x1a
6411         .byte   0x0
6412         .byte   0x4
6413         .4byte  1
6414         .p2align 1
6415 .LECIE1:
6416 .LSFDE1:
6417         .4byte  .LEFDE1-.LASFDE1
6418 .LASFDE1:
6419         .4byte  .LASFDE1-__FRAME_BEGIN__
6420         .4byte  .LFB1
6421         .4byte  .LFE1-.LFB1
6422         .byte   0x4
6423         .4byte  .LFE1-.LFB1
6424         .byte   0x4
6425         .4byte  .L1-.LFB1
6426 .LEFDE1:' > conftest.s
6427     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6428     then
6429           cat > conftest.lit <<EOF
6430  0000 10000000 00000000 017a0001 781a0004  .........z..x...
6431  0010 01000000 12000000 18000000 00000000  ................
6432  0020 08000000 04080000 0044               .........D      
6433 EOF
6434   cat > conftest.big <<EOF
6435  0000 00000010 00000000 017a0001 781a0004  .........z..x...
6436  0010 00000001 00000012 00000018 00000000  ................
6437  0020 00000008 04000000 0844               .........D      
6438 EOF
6439   # If the assembler didn't choke, and we can objdump,
6440   # and we got the correct data, then succeed.
6441   if test x$gcc_cv_objdump != x \
6442   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
6443      | tail -3 > conftest.got \
6444   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
6445     || cmp conftest.big conftest.got > /dev/null 2>&1; }
6446   then
6447     gcc_cv_as_eh_frame=yes
6448   elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'; { (eval echo configure:6449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
6449     gcc_cv_as_eh_frame=buggy
6450   else
6451     # Uh oh, what do we do now?
6452     gcc_cv_as_eh_frame=no
6453   fi
6454     else
6455       echo "configure: failed program was" >&5
6456       cat conftest.s >&5
6457     fi
6458     rm -f conftest.o conftest.s
6459   fi
6460 fi
6461
6462 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
6463
6464
6465 if test $gcc_cv_as_eh_frame = buggy; then
6466   cat >> confdefs.h <<\EOF
6467 #define USE_AS_TRADITIONAL_FORMAT 1
6468 EOF
6469
6470 fi
6471
6472 echo $ac_n "checking assembler for section merging support""... $ac_c" 1>&6
6473 echo "configure:6474: checking assembler for section merging support" >&5
6474 if eval "test \"`echo '$''{'gcc_cv_as_shf_merge'+set}'`\" = set"; then
6475   echo $ac_n "(cached) $ac_c" 1>&6
6476 else
6477   gcc_cv_as_shf_merge=no
6478     if test $in_tree_gas = yes; then
6479     if test $in_tree_gas_is_elf = yes \
6480   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6481   then gcc_cv_as_shf_merge=yes
6482 fi
6483   elif test x$gcc_cv_as != x; then
6484     echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
6485     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6486     then
6487         gcc_cv_as_shf_merge=yes
6488     else
6489       echo "configure: failed program was" >&5
6490       cat conftest.s >&5
6491     fi
6492     rm -f conftest.o conftest.s
6493   fi
6494 fi
6495
6496 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
6497
6498 cat >> confdefs.h <<EOF
6499 #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
6500 EOF
6501
6502
6503 # Thread-local storage - the check is heavily parametrized.
6504 conftest_s=
6505 tls_first_major=
6506 tls_first_minor=
6507 tls_as_opt=
6508 case "$target" in
6509   alpha*-*-*)
6510     conftest_s='
6511         .section ".tdata","awT",@progbits
6512 foo:    .long   25
6513         .text
6514         ldq     $27,__tls_get_addr($29)         !literal!1
6515         lda     $16,foo($29)                    !tlsgd!1
6516         jsr     $26,($27),__tls_get_addr        !lituse_tlsgd!1
6517         ldq     $27,__tls_get_addr($29)         !literal!2
6518         lda     $16,foo($29)                    !tlsldm!2
6519         jsr     $26,($27),__tls_get_addr        !lituse_tlsldm!2
6520         ldq     $1,foo($29)                     !gotdtprel
6521         ldah    $2,foo($29)                     !dtprelhi
6522         lda     $3,foo($2)                      !dtprello
6523         lda     $4,foo($29)                     !dtprel
6524         ldq     $1,foo($29)                     !gottprel
6525         ldah    $2,foo($29)                     !tprelhi
6526         lda     $3,foo($2)                      !tprello
6527         lda     $4,foo($29)                     !tprel'
6528         tls_first_major=2
6529         tls_first_minor=13
6530         ;;
6531   i[34567]86-*-*)
6532     conftest_s='
6533         .section ".tdata","awT",@progbits
6534 foo:    .long   25
6535         .text
6536         movl    %gs:0, %eax
6537         leal    foo@TLSGD(,%ebx,1), %eax
6538         leal    foo@TLSLDM(%ebx), %eax
6539         leal    foo@DTPOFF(%eax), %edx
6540         movl    foo@GOTTPOFF(%ebx), %eax
6541         subl    foo@GOTTPOFF(%ebx), %eax
6542         addl    foo@GOTNTPOFF(%ebx), %eax
6543         movl    foo@INDNTPOFF, %eax
6544         movl    $foo@TPOFF, %eax
6545         subl    $foo@TPOFF, %eax
6546         leal    foo@NTPOFF(%ecx), %eax'
6547         tls_first_major=2
6548         tls_first_minor=14
6549         ;;
6550   x86_64-*-*)
6551     conftest_s='
6552         .section ".tdata","awT",@progbits
6553 foo:    .long   25
6554         .text
6555         movq    %fs:0, %rax
6556         leaq    foo@TLSGD(%rip), %rdi
6557         leaq    foo@TLSLD(%rip), %rdi
6558         leaq    foo@DTPOFF(%rax), %rdx
6559         movq    foo@GOTTPOFF(%rip), %rax
6560         movq    $foo@TPOFF, %rax'
6561         tls_first_major=2
6562         tls_first_minor=14
6563         ;;
6564   ia64-*-*)
6565     conftest_s='
6566         .section ".tdata","awT",@progbits
6567 foo:    data8   25
6568         .text
6569         addl    r16 = @ltoff(@dtpmod(foo#)), gp
6570         addl    r17 = @ltoff(@dtprel(foo#)), gp
6571         addl    r18 = @ltoff(@tprel(foo#)), gp
6572         addl    r19 = @dtprel(foo#), gp
6573         adds    r21 = @dtprel(foo#), r13
6574         movl    r23 = @dtprel(foo#)
6575         addl    r20 = @tprel(foo#), gp
6576         adds    r22 = @tprel(foo#), r13
6577         movl    r24 = @tprel(foo#)'
6578         tls_first_major=2
6579         tls_first_minor=13
6580         ;;
6581   powerpc-*-*)
6582     conftest_s='
6583         .section ".tdata","awT",@progbits
6584         .align 2
6585 ld0:    .space 4
6586 ld1:    .space 4
6587 x1:     .space 4
6588 x2:     .space 4
6589 x3:     .space 4
6590         .text
6591         addi 3,31,ld0@got@tlsgd
6592         bl __tls_get_addr
6593         addi 3,31,x1@got@tlsld
6594         bl __tls_get_addr
6595         addi 9,3,x1@dtprel
6596         addis 9,3,x2@dtprel@ha
6597         addi 9,9,x2@dtprel@l
6598         lwz 9,x3@got@tprel(31)
6599         add 9,9,x@tls
6600         addi 9,2,x1@tprel
6601         addis 9,2,x2@tprel@ha
6602         addi 9,9,x2@tprel@l'
6603         tls_first_major=2
6604         tls_first_minor=14
6605         tls_as_opt=-a32
6606         ;;
6607   powerpc64-*-*)
6608     conftest_s='
6609         .section ".tdata","awT",@progbits
6610         .align 3
6611 ld0:    .space 8
6612 ld1:    .space 8
6613 x1:     .space 8
6614 x2:     .space 8
6615 x3:     .space 8
6616         .text
6617         addi 3,2,ld0@got@tlsgd
6618         bl .__tls_get_addr
6619         nop
6620         addi 3,2,ld1@toc
6621         bl .__tls_get_addr
6622         nop
6623         addi 3,2,x1@got@tlsld
6624         bl .__tls_get_addr
6625         nop
6626         addi 9,3,x1@dtprel
6627         bl .__tls_get_addr
6628         nop
6629         addis 9,3,x2@dtprel@ha
6630         addi 9,9,x2@dtprel@l
6631         bl .__tls_get_addr
6632         nop
6633         ld 9,x3@got@dtprel(2)
6634         add 9,9,3
6635         bl .__tls_get_addr
6636         nop'
6637         tls_first_major=2
6638         tls_first_minor=14
6639         tls_as_opt=-a64
6640         ;;
6641   s390-*-*)
6642     conftest_s='
6643         .section ".tdata","awT",@progbits
6644 foo:    .long   25
6645         .text
6646         .long   foo@TLSGD
6647         .long   foo@TLSLDM
6648         .long   foo@DTPOFF
6649         .long   foo@NTPOFF
6650         .long   foo@GOTNTPOFF
6651         .long   foo@INDNTPOFF
6652         l       %r1,foo@GOTNTPOFF(%r12)
6653         l       %r1,0(%r1):tls_load:foo
6654         bas     %r14,0(%r1,%r13):tls_gdcall:foo
6655         bas     %r14,0(%r1,%r13):tls_ldcall:foo'
6656         tls_first_major=2
6657         tls_first_minor=14
6658         tls_as_opt=-m31
6659         ;;
6660   s390x-*-*)
6661     conftest_s='
6662         .section ".tdata","awT",@progbits
6663 foo:    .long   25
6664         .text
6665         .quad   foo@TLSGD
6666         .quad   foo@TLSLDM
6667         .quad   foo@DTPOFF
6668         .quad   foo@NTPOFF
6669         .quad   foo@GOTNTPOFF
6670         lg      %r1,foo@GOTNTPOFF(%r12)
6671         larl    %r1,foo@INDNTPOFF
6672         brasl   %r14,__tls_get_offset@PLT:tls_gdcall:foo
6673         brasl   %r14,__tls_get_offset@PLT:tls_ldcall:foo'
6674         tls_first_major=2
6675         tls_first_minor=14
6676         tls_as_opt="-m64 -Aesame"
6677         ;;
6678   sparc*-*-*)
6679     conftest_s='
6680         .section ".tdata","awT",@progbits
6681 foo:    .long   25
6682         .text
6683         sethi   %tgd_hi22(foo), %o0
6684         add     %o0, %tgd_lo10(foo), %o1
6685         add     %l7, %o1, %o0, %tgd_add(foo)
6686         call    __tls_get_addr, %tgd_call(foo)
6687         sethi   %tldm_hi22(foo), %l1
6688         add     %l1, %tldm_lo10(foo), %l2
6689         add     %l7, %l2, %o0, %tldm_add(foo)
6690         call    __tls_get_addr, %tldm_call(foo)
6691         sethi   %tldo_hix22(foo), %l3
6692         xor     %l3, %tldo_lox10(foo), %l4
6693         add     %o0, %l4, %l5, %tldo_add(foo)
6694         sethi   %tie_hi22(foo), %o3
6695         add     %o3, %tie_lo10(foo), %o3
6696         ld      [%l7 + %o3], %o2, %tie_ld(foo)
6697         add     %g7, %o2, %o4, %tie_add(foo)
6698         sethi   %tle_hix22(foo), %l1
6699         xor     %l1, %tle_lox10(foo), %o5
6700         ld      [%g7 + %o5], %o1'
6701         tls_first_major=2
6702         tls_first_minor=14
6703         tls_as_opt=-32
6704         ;;
6705 esac
6706 if test -z "$tls_first_major"; then
6707   : # If we don't have a check, assume no support.
6708 else
6709   echo $ac_n "checking assembler for thread-local storage support""... $ac_c" 1>&6
6710 echo "configure:6711: checking assembler for thread-local storage support" >&5
6711 if eval "test \"`echo '$''{'gcc_cv_as_tls'+set}'`\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   gcc_cv_as_tls=no
6715     if test $in_tree_gas = yes; then
6716     if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
6717   then gcc_cv_as_tls=yes
6718 fi
6719   elif test x$gcc_cv_as != x; then
6720     echo "$conftest_s" > conftest.s
6721     if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6722     then
6723         gcc_cv_as_tls=yes
6724     else
6725       echo "configure: failed program was" >&5
6726       cat conftest.s >&5
6727     fi
6728     rm -f conftest.o conftest.s
6729   fi
6730 fi
6731
6732 echo "$ac_t""$gcc_cv_as_tls" 1>&6
6733 if test $gcc_cv_as_tls = yes; then
6734   cat >> confdefs.h <<\EOF
6735 #define HAVE_AS_TLS 1
6736 EOF
6737
6738 fi
6739 fi
6740
6741 # Target-specific assembler checks.
6742
6743 case "$target" in
6744   # All TARGET_ABI_OSF targets.
6745   alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
6746     echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
6747 echo "configure:6748: checking assembler for explicit relocation support" >&5
6748 if eval "test \"`echo '$''{'gcc_cv_as_alpha_explicit_relocs'+set}'`\" = set"; then
6749   echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751   gcc_cv_as_alpha_explicit_relocs=no
6752     if test $in_tree_gas = yes; then
6753     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6754   then gcc_cv_as_alpha_explicit_relocs=yes
6755 fi
6756   elif test x$gcc_cv_as != x; then
6757     echo '      .set nomacro
6758         .text
6759         extbl   $3, $2, $3      !lituse_bytoff!1
6760         ldq     $2, a($29)      !literal!1
6761         ldq     $4, b($29)      !literal!2
6762         ldq_u   $3, 0($2)       !lituse_base!1
6763         ldq     $27, f($29)     !literal!5
6764         jsr     $26, ($27), f   !lituse_jsr!5
6765         ldah    $29, 0($26)     !gpdisp!3
6766         lda     $0, c($29)      !gprel
6767         ldah    $1, d($29)      !gprelhigh
6768         lda     $1, d($1)       !gprellow
6769         lda     $29, 0($29)     !gpdisp!3' > conftest.s
6770     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6771     then
6772         gcc_cv_as_alpha_explicit_relocs=yes
6773     else
6774       echo "configure: failed program was" >&5
6775       cat conftest.s >&5
6776     fi
6777     rm -f conftest.o conftest.s
6778   fi
6779 fi
6780
6781 echo "$ac_t""$gcc_cv_as_alpha_explicit_relocs" 1>&6
6782 if test $gcc_cv_as_alpha_explicit_relocs = yes; then
6783   cat >> confdefs.h <<\EOF
6784 #define HAVE_AS_EXPLICIT_RELOCS 1
6785 EOF
6786
6787 fi
6788     ;;
6789
6790   sparc*-*-*)
6791     echo $ac_n "checking assembler for .register""... $ac_c" 1>&6
6792 echo "configure:6793: checking assembler for .register" >&5
6793 if eval "test \"`echo '$''{'gcc_cv_as_sparc_register_op'+set}'`\" = set"; then
6794   echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796   gcc_cv_as_sparc_register_op=no
6797   if test x$gcc_cv_as != x; then
6798     echo '.register %g2, #scratch' > conftest.s
6799     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6800     then
6801         gcc_cv_as_sparc_register_op=yes
6802     else
6803       echo "configure: failed program was" >&5
6804       cat conftest.s >&5
6805     fi
6806     rm -f conftest.o conftest.s
6807   fi
6808 fi
6809
6810 echo "$ac_t""$gcc_cv_as_sparc_register_op" 1>&6
6811 if test $gcc_cv_as_sparc_register_op = yes; then
6812   cat >> confdefs.h <<\EOF
6813 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6814 EOF
6815
6816 fi
6817
6818     echo $ac_n "checking assembler for -relax option""... $ac_c" 1>&6
6819 echo "configure:6820: checking assembler for -relax option" >&5
6820 if eval "test \"`echo '$''{'gcc_cv_as_sparc_relax'+set}'`\" = set"; then
6821   echo $ac_n "(cached) $ac_c" 1>&6
6822 else
6823   gcc_cv_as_sparc_relax=no
6824   if test x$gcc_cv_as != x; then
6825     echo '.text' > conftest.s
6826     if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'; { (eval echo configure:6827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6827     then
6828         gcc_cv_as_sparc_relax=yes
6829     else
6830       echo "configure: failed program was" >&5
6831       cat conftest.s >&5
6832     fi
6833     rm -f conftest.o conftest.s
6834   fi
6835 fi
6836
6837 echo "$ac_t""$gcc_cv_as_sparc_relax" 1>&6
6838 if test $gcc_cv_as_sparc_relax = yes; then
6839   cat >> confdefs.h <<\EOF
6840 #define HAVE_AS_RELAX_OPTION 1
6841 EOF
6842
6843 fi
6844
6845     echo $ac_n "checking assembler for unaligned pcrel relocs""... $ac_c" 1>&6
6846 echo "configure:6847: checking assembler for unaligned pcrel relocs" >&5
6847 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850   gcc_cv_as_sparc_ua_pcrel=no
6851   if test x$gcc_cv_as != x; then
6852     echo '.text
6853 foo:
6854         nop
6855 .data
6856 .align 4
6857 .byte 0
6858 .uaword %r_disp32(foo)' > conftest.s
6859     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6860     then
6861         if test x$gcc_cv_ld != x \
6862        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
6863          gcc_cv_as_sparc_ua_pcrel=yes
6864        fi
6865        rm -f conftest
6866     else
6867       echo "configure: failed program was" >&5
6868       cat conftest.s >&5
6869     fi
6870     rm -f conftest.o conftest.s
6871   fi
6872 fi
6873
6874 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
6875 if test $gcc_cv_as_sparc_ua_pcrel = yes; then
6876   cat >> confdefs.h <<\EOF
6877 #define HAVE_AS_SPARC_UA_PCREL 1
6878 EOF
6879
6880
6881       echo $ac_n "checking assembler for unaligned pcrel relocs against hidden symbols""... $ac_c" 1>&6
6882 echo "configure:6883: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
6883 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
6884   echo $ac_n "(cached) $ac_c" 1>&6
6885 else
6886   gcc_cv_as_sparc_ua_pcrel_hidden=no
6887   if test x$gcc_cv_as != x; then
6888     echo '.data
6889 .align 4
6890 .byte 0x31
6891 .uaword %r_disp32(foo)
6892 .byte 0x32, 0x33, 0x34
6893 .global foo
6894 .hidden foo
6895 foo:
6896 .skip 4' > conftest.s
6897     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6898     then
6899         if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
6900          && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
6901          && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
6902             | grep ' 31000000 07323334' > /dev/null 2>&1; then
6903             if $gcc_cv_objdump -R conftest 2> /dev/null \
6904                | grep 'DISP32' > /dev/null 2>&1; then
6905                 :
6906             else
6907                 gcc_cv_as_sparc_ua_pcrel_hidden=yes
6908             fi
6909          fi
6910          rm -f conftest
6911     else
6912       echo "configure: failed program was" >&5
6913       cat conftest.s >&5
6914     fi
6915     rm -f conftest.o conftest.s
6916   fi
6917 fi
6918
6919 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
6920 if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
6921   cat >> confdefs.h <<\EOF
6922 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
6923 EOF
6924
6925 fi
6926     
6927 fi # unaligned pcrel relocs
6928
6929     echo $ac_n "checking assembler for offsetable %lo()""... $ac_c" 1>&6
6930 echo "configure:6931: checking assembler for offsetable %lo()" >&5
6931 if eval "test \"`echo '$''{'gcc_cv_as_sparc_offsetable_lo10'+set}'`\" = set"; then
6932   echo $ac_n "(cached) $ac_c" 1>&6
6933 else
6934   gcc_cv_as_sparc_offsetable_lo10=no
6935   if test x$gcc_cv_as != x; then
6936     echo '.text
6937         or %g1, %lo(ab) + 12, %g1
6938         or %g1, %lo(ab + 12), %g1' > conftest.s
6939     if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'; { (eval echo configure:6940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6940     then
6941         if test x$gcc_cv_objdump != x \
6942        && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
6943           | grep ' 82106000 82106000' > /dev/null 2>&1; then
6944          gcc_cv_as_offsetable_lo10=yes
6945        fi
6946     else
6947       echo "configure: failed program was" >&5
6948       cat conftest.s >&5
6949     fi
6950     rm -f conftest.o conftest.s
6951   fi
6952 fi
6953
6954 echo "$ac_t""$gcc_cv_as_sparc_offsetable_lo10" 1>&6
6955 if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
6956   cat >> confdefs.h <<\EOF
6957 #define HAVE_AS_OFFSETABLE_LO10 1
6958 EOF
6959
6960 fi
6961     ;;
6962
6963   i[34567]86-*-* | x86_64-*-*)
6964     echo $ac_n "checking assembler for filds and fists mnemonics""... $ac_c" 1>&6
6965 echo "configure:6966: checking assembler for filds and fists mnemonics" >&5
6966 if eval "test \"`echo '$''{'gcc_cv_as_ix86_filds_fists'+set}'`\" = set"; then
6967   echo $ac_n "(cached) $ac_c" 1>&6
6968 else
6969   gcc_cv_as_ix86_filds_fists=no
6970     if test $in_tree_gas = yes; then
6971     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
6972   then gcc_cv_as_ix86_filds_fists=yes
6973 fi
6974   elif test x$gcc_cv_as != x; then
6975     echo 'filds mem; fists mem' > conftest.s
6976     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6977     then
6978         gcc_cv_as_ix86_filds_fists=yes
6979     else
6980       echo "configure: failed program was" >&5
6981       cat conftest.s >&5
6982     fi
6983     rm -f conftest.o conftest.s
6984   fi
6985 fi
6986
6987 echo "$ac_t""$gcc_cv_as_ix86_filds_fists" 1>&6
6988 if test $gcc_cv_as_ix86_filds_fists = yes; then
6989   cat >> confdefs.h <<\EOF
6990 #define HAVE_GAS_FILDS_FISTS 1
6991 EOF
6992
6993 fi
6994
6995     echo $ac_n "checking assembler for cmov syntax""... $ac_c" 1>&6
6996 echo "configure:6997: checking assembler for cmov syntax" >&5
6997 if eval "test \"`echo '$''{'gcc_cv_as_ix86_cmov_sun_syntax'+set}'`\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000   gcc_cv_as_ix86_cmov_sun_syntax=no
7001   if test x$gcc_cv_as != x; then
7002     echo 'cmovl.l %edx, %eax' > conftest.s
7003     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7004     then
7005         gcc_cv_as_ix86_cmov_sun_syntax=yes
7006     else
7007       echo "configure: failed program was" >&5
7008       cat conftest.s >&5
7009     fi
7010     rm -f conftest.o conftest.s
7011   fi
7012 fi
7013
7014 echo "$ac_t""$gcc_cv_as_ix86_cmov_sun_syntax" 1>&6
7015 if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
7016   cat >> confdefs.h <<\EOF
7017 #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
7018 EOF
7019
7020 fi
7021
7022     # This one is used unconditionally by i386.[ch]; it is to be defined
7023     # to 1 if the feature is present, 0 otherwise.
7024     echo $ac_n "checking assembler for GOTOFF in data""... $ac_c" 1>&6
7025 echo "configure:7026: checking assembler for GOTOFF in data" >&5
7026 if eval "test \"`echo '$''{'gcc_cv_as_ix86_gotoff_in_data'+set}'`\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   gcc_cv_as_ix86_gotoff_in_data=no
7030     if test $in_tree_gas = yes; then
7031     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7032   then gcc_cv_as_ix86_gotoff_in_data=yes
7033 fi
7034   elif test x$gcc_cv_as != x; then
7035     echo '      .text
7036 .L0:
7037         nop
7038         .data
7039         .long .L0@GOTOFF' > conftest.s
7040     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7041     then
7042         gcc_cv_as_ix86_gotoff_in_data=yes
7043     else
7044       echo "configure: failed program was" >&5
7045       cat conftest.s >&5
7046     fi
7047     rm -f conftest.o conftest.s
7048   fi
7049 fi
7050
7051 echo "$ac_t""$gcc_cv_as_ix86_gotoff_in_data" 1>&6
7052
7053     cat >> confdefs.h <<EOF
7054 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7055 EOF
7056
7057     ;;
7058
7059   ia64*-*-*)
7060     echo $ac_n "checking assembler for ltoffx and ldxmov relocs""... $ac_c" 1>&6
7061 echo "configure:7062: checking assembler for ltoffx and ldxmov relocs" >&5
7062 if eval "test \"`echo '$''{'gcc_cv_as_ia64_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
7063   echo $ac_n "(cached) $ac_c" 1>&6
7064 else
7065   gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
7066     if test $in_tree_gas = yes; then
7067     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7068   then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
7069 fi
7070   elif test x$gcc_cv_as != x; then
7071     echo '      .text
7072         addl r15 = @ltoffx(x#), gp
7073         ;;
7074         ld8.mov r16 = [r15], x#' > conftest.s
7075     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7076     then
7077         gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
7078     else
7079       echo "configure: failed program was" >&5
7080       cat conftest.s >&5
7081     fi
7082     rm -f conftest.o conftest.s
7083   fi
7084 fi
7085
7086 echo "$ac_t""$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" 1>&6
7087 if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
7088   cat >> confdefs.h <<\EOF
7089 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
7090 EOF
7091
7092 fi
7093
7094     ;;
7095
7096   powerpc*-*-*)
7097     case $target in
7098       *-*-aix) conftest_s='     .csect .textPR';;
7099       *)       conftest_s='     .text';;
7100     esac
7101     conftest_s="$conftest_s
7102         mfcr 3,128"
7103
7104     echo $ac_n "checking assembler for mfcr field support""... $ac_c" 1>&6
7105 echo "configure:7106: checking assembler for mfcr field support" >&5
7106 if eval "test \"`echo '$''{'gcc_cv_as_powerpc_mfcrf'+set}'`\" = set"; then
7107   echo $ac_n "(cached) $ac_c" 1>&6
7108 else
7109   gcc_cv_as_powerpc_mfcrf=no
7110     if test $in_tree_gas = yes; then
7111     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7112   then gcc_cv_as_powerpc_mfcrf=yes
7113 fi
7114   elif test x$gcc_cv_as != x; then
7115     echo "$conftest_s" > conftest.s
7116     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7117     then
7118         gcc_cv_as_powerpc_mfcrf=yes
7119     else
7120       echo "configure: failed program was" >&5
7121       cat conftest.s >&5
7122     fi
7123     rm -f conftest.o conftest.s
7124   fi
7125 fi
7126
7127 echo "$ac_t""$gcc_cv_as_powerpc_mfcrf" 1>&6
7128 if test $gcc_cv_as_powerpc_mfcrf = yes; then
7129   cat >> confdefs.h <<\EOF
7130 #define HAVE_AS_MFCRF 1
7131 EOF
7132
7133 fi
7134     ;;
7135
7136   mips*-*-*)
7137     echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
7138 echo "configure:7139: checking assembler for explicit relocation support" >&5
7139 if eval "test \"`echo '$''{'gcc_cv_as_mips_explicit_relocs'+set}'`\" = set"; then
7140   echo $ac_n "(cached) $ac_c" 1>&6
7141 else
7142   gcc_cv_as_mips_explicit_relocs=no
7143     if test $in_tree_gas = yes; then
7144     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7145   then gcc_cv_as_mips_explicit_relocs=yes
7146 fi
7147   elif test x$gcc_cv_as != x; then
7148     echo '      lw $4,%gp_rel(foo)($4)' > conftest.s
7149     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7150     then
7151         gcc_cv_as_mips_explicit_relocs=yes
7152     else
7153       echo "configure: failed program was" >&5
7154       cat conftest.s >&5
7155     fi
7156     rm -f conftest.o conftest.s
7157   fi
7158 fi
7159
7160 echo "$ac_t""$gcc_cv_as_mips_explicit_relocs" 1>&6
7161 if test $gcc_cv_as_mips_explicit_relocs = yes; then
7162   if test x$target_cpu_default = x
7163        then target_cpu_default=MASK_EXPLICIT_RELOCS
7164        else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
7165        fi
7166 fi
7167
7168     ;;
7169 esac
7170 # ??? Not all targets support dwarf2 debug_line, even within a version
7171 # of gas.  Moreover, we need to emit a valid instruction to trigger any
7172 # info to the output file.  So, as supported targets are added to gas 2.11,
7173 # add some instruction here to (also) show we expect this might work.
7174 # ??? Once 2.11 is released, probably need to add first known working
7175 # version to the per-target configury.
7176 case "$target" in
7177   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
7178   | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
7179   | xstormy16*-*-* | cris-*-*)
7180     insn="nop"
7181     ;;
7182   ia64*-*-*)
7183     insn="nop 0"
7184     ;;
7185   mmix-*-*)
7186     insn="swym 0"
7187     ;;
7188 esac
7189 if test x"$insn" != x; then
7190  conftest_s="\
7191         .file 1 \"conftest.s\"
7192         .loc 1 3 0
7193         $insn"
7194  echo $ac_n "checking assembler for dwarf2 debug_line support""... $ac_c" 1>&6
7195 echo "configure:7196: checking assembler for dwarf2 debug_line support" >&5
7196 if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_debug_line'+set}'`\" = set"; then
7197   echo $ac_n "(cached) $ac_c" 1>&6
7198 else
7199   gcc_cv_as_dwarf2_debug_line=no
7200     if test $in_tree_gas = yes; then
7201     if test $in_tree_gas_is_elf = yes \
7202   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7203   then gcc_cv_as_dwarf2_debug_line=yes
7204 fi
7205   elif test x$gcc_cv_as != x; then
7206     echo "$conftest_s" > conftest.s
7207     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7208     then
7209         # ??? This fails with non-gnu grep.  Maybe use objdump?
7210    if grep debug_line conftest.o > /dev/null 2>&1; then
7211      gcc_cv_as_dwarf2_debug_line=yes
7212    fi
7213     else
7214       echo "configure: failed program was" >&5
7215       cat conftest.s >&5
7216     fi
7217     rm -f conftest.o conftest.s
7218   fi
7219 fi
7220
7221 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7222
7223
7224 # The .debug_line file table must be in the exact order that
7225 # we specified the files, since these indices are also used
7226 # by DW_AT_decl_file.  Approximate this test by testing if
7227 # the assembler bitches if the same index is assigned twice.
7228  echo $ac_n "checking assembler for buggy dwarf2 .file directive""... $ac_c" 1>&6
7229 echo "configure:7230: checking assembler for buggy dwarf2 .file directive" >&5
7230 if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_file_buggy'+set}'`\" = set"; then
7231   echo $ac_n "(cached) $ac_c" 1>&6
7232 else
7233   gcc_cv_as_dwarf2_file_buggy=no
7234   if test x$gcc_cv_as != x; then
7235     echo '      .file 1 "foo.s"
7236         .file 1 "bar.s"' > conftest.s
7237     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7238     then
7239         gcc_cv_as_dwarf2_file_buggy=yes
7240     else
7241       echo "configure: failed program was" >&5
7242       cat conftest.s >&5
7243     fi
7244     rm -f conftest.o conftest.s
7245   fi
7246 fi
7247
7248 echo "$ac_t""$gcc_cv_as_dwarf2_file_buggy" 1>&6
7249
7250
7251  if test $gcc_cv_as_dwarf2_debug_line = yes \
7252  && test $gcc_cv_as_dwarf2_file_buggy = no; then
7253         cat >> confdefs.h <<\EOF
7254 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7255 EOF
7256
7257  fi
7258
7259  echo $ac_n "checking assembler for --gdwarf2 option""... $ac_c" 1>&6
7260 echo "configure:7261: checking assembler for --gdwarf2 option" >&5
7261 if eval "test \"`echo '$''{'gcc_cv_as_gdwarf2_flag'+set}'`\" = set"; then
7262   echo $ac_n "(cached) $ac_c" 1>&6
7263 else
7264   gcc_cv_as_gdwarf2_flag=no
7265     if test $in_tree_gas = yes; then
7266     if test $in_tree_gas_is_elf = yes \
7267   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7268   then gcc_cv_as_gdwarf2_flag=yes
7269 fi
7270   elif test x$gcc_cv_as != x; then
7271     echo "$insn" > conftest.s
7272     if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'; { (eval echo configure:7273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7273     then
7274         gcc_cv_as_gdwarf2_flag=yes
7275     else
7276       echo "configure: failed program was" >&5
7277       cat conftest.s >&5
7278     fi
7279     rm -f conftest.o conftest.s
7280   fi
7281 fi
7282
7283 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7284 if test $gcc_cv_as_gdwarf2_flag = yes; then
7285   cat >> confdefs.h <<\EOF
7286 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7287 EOF
7288
7289 fi
7290
7291  echo $ac_n "checking assembler for --gstabs option""... $ac_c" 1>&6
7292 echo "configure:7293: checking assembler for --gstabs option" >&5
7293 if eval "test \"`echo '$''{'gcc_cv_as_gstabs_flag'+set}'`\" = set"; then
7294   echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296   gcc_cv_as_gstabs_flag=no
7297     if test $in_tree_gas = yes; then
7298     if test $in_tree_gas_is_elf = yes \
7299   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7300   then gcc_cv_as_gstabs_flag=yes
7301 fi
7302   elif test x$gcc_cv_as != x; then
7303     echo "$insn" > conftest.s
7304     if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'; { (eval echo configure:7305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7305     then
7306         # The native Solaris 9/Intel assembler doesn't understand --gstabs
7307    # and warns about it, but still exits successfully.  So check for
7308    # this.
7309    if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'; { (eval echo configure:7310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7310    then :
7311    else gcc_cv_as_gstabs_flag=yes
7312    fi
7313     else
7314       echo "configure: failed program was" >&5
7315       cat conftest.s >&5
7316     fi
7317     rm -f conftest.o conftest.s
7318   fi
7319 fi
7320
7321 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7322 if test $gcc_cv_as_gstabs_flag = yes; then
7323   cat >> confdefs.h <<\EOF
7324 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7325 EOF
7326
7327 fi
7328 fi
7329
7330 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
7331 echo "configure:7332: checking linker read-only and read-write section mixing" >&5
7332 gcc_cv_ld_ro_rw_mix=unknown
7333 if test $in_tree_ld = yes ; then
7334   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \
7335      && test $in_tree_ld_is_elf = yes; then
7336     gcc_cv_ld_ro_rw_mix=read-write
7337   fi
7338 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
7339   echo '.section myfoosect, "a"' > conftest1.s
7340   echo '.section myfoosect, "aw"' > conftest2.s
7341   echo '.byte 1' >> conftest2.s
7342   echo '.section myfoosect, "a"' > conftest3.s
7343   echo '.byte 0' >> conftest3.s
7344   if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
7345      && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
7346      && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
7347      && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
7348         conftest2.o conftest3.o > /dev/null 2>&1; then
7349     gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
7350                          | sed -e '/myfoosect/!d' -e N`
7351     if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
7352       if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
7353         gcc_cv_ld_ro_rw_mix=read-only
7354       else
7355         gcc_cv_ld_ro_rw_mix=read-write
7356       fi
7357     fi
7358   fi
7359   rm -f conftest.* conftest[123].*
7360 fi
7361 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
7362         cat >> confdefs.h <<\EOF
7363 #define HAVE_LD_RO_RW_SECTION_MIXING 1
7364 EOF
7365
7366 fi
7367 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
7368
7369 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7370 echo "configure:7371: checking linker PT_GNU_EH_FRAME support" >&5
7371 gcc_cv_ld_eh_frame_hdr=no
7372 if test $in_tree_ld = yes ; then
7373   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \
7374      && test $in_tree_ld_is_elf = yes; then
7375     gcc_cv_ld_eh_frame_hdr=yes
7376   fi
7377 elif test x$gcc_cv_ld != x; then
7378         # Check if linker supports --eh-frame-hdr option
7379         if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7380                 gcc_cv_ld_eh_frame_hdr=yes
7381         fi
7382 fi
7383 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7384         cat >> confdefs.h <<\EOF
7385 #define HAVE_LD_EH_FRAME_HDR 1
7386 EOF
7387
7388 fi
7389 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7390
7391 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
7392 echo "configure:7393: checking linker position independent executable support" >&5
7393 gcc_cv_ld_pie=no
7394 if test $in_tree_ld = yes ; then
7395   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \
7396      && test $in_tree_ld_is_elf = yes; then
7397     gcc_cv_ld_pie=yes
7398   fi
7399 elif test x$gcc_cv_ld != x; then
7400         # Check if linker supports -pie option
7401         if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
7402                 gcc_cv_ld_pie=yes
7403         fi
7404 fi
7405 if test x"$gcc_cv_ld_pie" = xyes; then
7406         cat >> confdefs.h <<\EOF
7407 #define HAVE_LD_PIE 1
7408 EOF
7409
7410 fi
7411 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
7412
7413 # Miscellaneous target-specific checks.
7414 case "$target" in
7415   mips*-*-*)
7416     echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
7417 echo "configure:7418: checking whether libgloss uses STARTUP directives consistently" >&5
7418     gcc_cv_mips_libgloss_startup=no
7419     gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
7420     if test "x$exec_prefix" = xNONE; then
7421       if test "x$prefix" = xNONE; then
7422         test_prefix=/usr/local
7423       else
7424         test_prefix=$prefix
7425       fi
7426     else
7427       test_prefix=$exec_prefix
7428     fi
7429     for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
7430     do
7431       if grep '^STARTUP' $f > /dev/null 2>&1; then
7432         gcc_cv_mips_libgloss_startup=yes
7433         break
7434       fi
7435     done
7436     if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
7437       cat >> confdefs.h <<\EOF
7438 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
7439 EOF
7440
7441     fi
7442     echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
7443     ;;
7444 esac
7445
7446 if test x$with_sysroot = x && test x$host = x$target \
7447    && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
7448   cat >> confdefs.h <<EOF
7449 #define PREFIX_INCLUDE_DIR "$prefix/include"
7450 EOF
7451
7452 fi
7453
7454 # Figure out what language subdirectories are present.
7455 # Look if the user specified --enable-languages="..."; if not, use
7456 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7457 # go away some day.
7458 # NB:  embedded tabs in this IF block -- do not untabify
7459 if test x"${enable_languages+set}" != xset; then
7460         if test x"${LANGUAGES+set}" = xset; then
7461                 enable_languages="${LANGUAGES}"
7462                 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7463
7464         else
7465                 enable_languages=all
7466         fi
7467 else
7468         if test x"${enable_languages}" = x \
7469         || test x"${enable_languages}" = xyes;
7470         then
7471                 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7472         fi
7473 fi
7474 enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/,$//'`
7475
7476 # First scan to see if an enabled language requires some other language.
7477 # We assume that a given config-lang.in will list all the language
7478 # front ends it requires, even if some are required indirectly.
7479 for lang in ${srcdir}/*/config-lang.in
7480 do
7481    case $lang in
7482     # The odd quoting in the next line works around
7483     # an apparent bug in bash 1.12 on linux.
7484     ${srcdir}/[*]/config-lang.in)
7485        ;;
7486     *)
7487        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
7488        this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
7489        for other in $this_lang_requires
7490        do
7491           case ,${enable_languages}, in
7492            *,$other,*)
7493               ;;
7494            *,all,*)
7495               ;;
7496            *,$lang_alias,*)
7497               enable_languages="$enable_languages,$other"
7498               ;;
7499           esac
7500        done
7501        ;;
7502    esac
7503 done
7504
7505 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's:  *: :g' -e 's:  *: :g' -e 's:^ ::' -e 's: $::'`
7506 found_languages=
7507 subdirs=
7508 for lang in ${srcdir}/*/config-lang.in
7509 do
7510         case $lang in
7511         # The odd quoting in the next line works around
7512         # an apparent bug in bash 1.12 on linux.
7513         ${srcdir}/[*]/config-lang.in) ;;
7514         *)
7515           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
7516           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
7517           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
7518           if test "x$lang_alias" = x
7519           then
7520                 echo "$lang doesn't set \$language." 1>&2
7521                 exit 1
7522           fi
7523           case ${build_by_default},${enable_languages}, in
7524           *,$lang_alias,*) add_this_lang=yes ;;
7525           no,*) add_this_lang=no ;;
7526           *,all,*) add_this_lang=yes ;;
7527           *) add_this_lang=no ;;
7528           esac
7529           found_languages="${found_languages} ${lang_alias}"
7530           if test x"${add_this_lang}" = xyes; then
7531                 case $lang in
7532                     ${srcdir}/ada/config-lang.in)
7533                         if test x$have_gnat = xyes ; then
7534                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7535                         fi
7536                         ;;
7537                     *)
7538                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7539                         ;;
7540                 esac
7541           fi
7542           ;;
7543         esac
7544 done
7545
7546 missing_languages=
7547 for expected_language in ${expected_languages} ..
7548 do 
7549     if test "${expected_language}" != ..; then
7550         missing_language="${expected_language}"
7551         if test "${expected_language}" = "c" \
7552            || test "${expected_language}" = "all"; then
7553                 missing_language=
7554         fi
7555         for found_language in ${found_languages} ..
7556         do 
7557             if test "${found_language}" != ..; then
7558                 if test "${expected_language}" = "${found_language}"; then
7559                     missing_language=
7560                 fi
7561             fi
7562         done
7563         if test "x${missing_language}" != x; then
7564            missing_languages="${missing_languages} ${missing_language}"
7565         fi
7566     fi
7567 done
7568
7569 if test "x$missing_languages" != x; then
7570   { echo "configure: error: 
7571 The following requested languages were not found:${missing_languages}
7572 The following languages were available: c${found_languages}" 1>&2; exit 1; }
7573 fi
7574
7575 # Make gthr-default.h if we have a thread file.
7576 gthread_flags=
7577 if test $thread_file != single; then
7578     rm -f gthr-default.h
7579     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7580     gthread_flags=-DHAVE_GTHR_DEFAULT
7581 fi
7582
7583
7584 # Find out what GC implementation we want, or may, use.
7585 # Check whether --with-gc or --without-gc was given.
7586 if test "${with_gc+set}" = set; then
7587   withval="$with_gc"
7588   case "$withval" in
7589   simple | page)
7590     GGC=ggc-$withval
7591     ;;
7592   *)
7593     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7594     ;;
7595 esac
7596 else
7597   GGC=ggc-page
7598 fi
7599
7600
7601 echo "Using $GGC for garbage collection."
7602
7603 # Use the system's zlib library.
7604 zlibdir=-L../zlib
7605 zlibinc="-I\$(srcdir)/../zlib"
7606 # Check whether --with-system-zlib or --without-system-zlib was given.
7607 if test "${with_system_zlib+set}" = set; then
7608   withval="$with_system_zlib"
7609   zlibdir=
7610 zlibinc=
7611
7612 fi
7613
7614
7615
7616
7617
7618 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7619 echo "configure:7620: checking whether to enable maintainer-specific portions of Makefiles" >&5
7620     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7621 if test "${enable_maintainer_mode+set}" = set; then
7622   enableval="$enable_maintainer_mode"
7623   maintainer_mode=$enableval
7624 else
7625   maintainer_mode=no
7626 fi
7627
7628
7629 echo "$ac_t""$maintainer_mode" 1>&6
7630
7631 if test "$maintainer_mode" = "yes"; then
7632   MAINT=''
7633 else
7634   MAINT='#'
7635 fi
7636
7637 # Make empty files to contain the specs and options for each language.
7638 # Then add #include lines to for a compiler that has specs and/or options.
7639
7640 lang_opt_files=
7641 lang_specs_files=
7642 lang_tree_files=
7643 for subdir in . $subdirs
7644 do
7645         if test -f $srcdir/$subdir/lang.opt; then
7646             lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
7647         fi
7648         if test -f $srcdir/$subdir/lang-specs.h; then
7649             lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7650         fi
7651         if test -f $srcdir/$subdir/$subdir-tree.def; then
7652             lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7653         fi
7654 done
7655
7656 # These (without "all_") are set in each config-lang.in.
7657 # `language' must be a single word so is spelled singularly.
7658 all_languages=
7659 all_boot_languages=
7660 all_compilers=
7661 all_stagestuff=
7662 all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
7663 # List of language makefile fragments.
7664 all_lang_makefrags=
7665 # List of language subdirectory makefiles.  Deprecated.
7666 all_lang_makefiles=
7667 # Files for gengtype
7668 all_gtfiles="$target_gtfiles"
7669 # Files for gengtype with language
7670 all_gtfiles_files_langs=
7671 all_gtfiles_files_files=
7672
7673 # Add the language fragments.
7674 # Languages are added via two mechanisms.  Some information must be
7675 # recorded in makefile variables, these are defined in config-lang.in.
7676 # We accumulate them and plug them into the main Makefile.
7677 # The other mechanism is a set of hooks for each of the main targets
7678 # like `clean', `install', etc.
7679
7680 language_hooks="Make-hooks"
7681
7682 for s in $subdirs
7683 do
7684                 language=
7685                 boot_language=
7686                 compilers=
7687                 stagestuff=
7688                 outputs=
7689                 gtfiles=
7690                 . ${srcdir}/$s/config-lang.in
7691                 if test "x$language" = x
7692                 then
7693                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7694                         exit 1
7695                 fi
7696                 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
7697                 if test -f ${srcdir}/$s/Makefile.in
7698                 then all_lang_makefiles="$s/Makefile"
7699                 fi
7700                 all_languages="$all_languages $language"
7701                 if test "x$boot_language" = xyes
7702                 then
7703                         all_boot_languages="$all_boot_languages $language"
7704                 fi
7705                 all_compilers="$all_compilers $compilers"
7706                 all_stagestuff="$all_stagestuff $stagestuff"
7707                 all_outputs="$all_outputs $outputs"
7708                 all_gtfiles="$all_gtfiles $gtfiles"
7709                 for f in $gtfiles
7710                 do
7711                          all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
7712                          all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
7713                 done
7714 done
7715
7716 # Pick up gtfiles for c
7717 gtfiles=
7718 s="c"
7719 . ${srcdir}/c-config-lang.in
7720 all_gtfiles="$all_gtfiles $gtfiles"
7721 for f in $gtfiles
7722 do
7723         all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
7724         all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
7725 done
7726
7727 check_languages=
7728 for language in $all_languages
7729 do
7730                 check_languages="$check_languages check-$language"
7731 done
7732
7733 # We link each language in with a set of hooks, reached indirectly via
7734 # lang.${target}.
7735
7736 rm -f Make-hooks
7737 touch Make-hooks
7738 target_list="all.build all.cross start.encap rest.encap tags \
7739         install-normal install-common install-info install-man \
7740         uninstall \
7741         mostlyclean clean distclean extraclean maintainer-clean \
7742         stage1 stage2 stage3 stage4 stageprofile stagefeedback"
7743 for t in $target_list
7744 do
7745         x=
7746         for lang in $all_languages
7747         do
7748                         x="$x $lang.$t"
7749         done
7750         echo "lang.$t: $x" >> Make-hooks
7751 done
7752
7753 # Create .gdbinit.
7754
7755 echo "dir ." > .gdbinit
7756 echo "dir ${srcdir}" >> .gdbinit
7757 if test x$gdb_needs_out_file_path = xyes
7758 then
7759         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7760 fi
7761 if test "x$subdirs" != x; then
7762         for s in $subdirs
7763         do
7764                 echo "dir ${srcdir}/$s" >> .gdbinit
7765         done
7766 fi
7767 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
7768
7769 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7770 # absolute path for gcc_tooldir based on inserting the number of up-directory
7771 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7772 # $(libsubdir)/@(unlibsubdir) based path.
7773 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7774 # make and thus we'd get different behavior depending on where we built the
7775 # sources.
7776 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7777     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7778 else
7779 # An explanation of the sed strings:
7780 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
7781 #  -e 's|/$||'            match a trailing forward slash and eliminates it
7782 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
7783 #  -e 's|/[^/]*|../|g'    replaces each occurrence of /<directory> with ../
7784 #
7785 # (*) Note this pattern overwrites the first character of the string
7786 # with a forward slash if one is not already present.  This is not a
7787 # problem because the exact names of the sub-directories concerned is
7788 # unimportant, just the number of them matters.
7789 #
7790 # The practical upshot of these patterns is like this:
7791 #
7792 #  prefix     exec_prefix        result
7793 #  ------     -----------        ------
7794 #   /foo        /foo/bar          ../
7795 #   /foo/       /foo/bar          ../
7796 #   /foo        /foo/bar/         ../
7797 #   /foo/       /foo/bar/         ../
7798 #   /foo        /foo/bar/ugg      ../../
7799 #
7800     dollar='$$'
7801     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7802 fi
7803
7804
7805
7806 # Find a directory in which to install a shared libgcc.
7807
7808 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7809 if test "${enable_version_specific_runtime_libs+set}" = set; then
7810   enableval="$enable_version_specific_runtime_libs"
7811   :
7812 fi
7813
7814
7815 # Check whether --with-slibdir or --without-slibdir was given.
7816 if test "${with_slibdir+set}" = set; then
7817   withval="$with_slibdir"
7818   slibdir="$with_slibdir"
7819 else
7820   if test "${enable_version_specific_runtime_libs+set}" = set; then
7821   slibdir='$(libsubdir)'
7822 elif test "$host" != "$target"; then
7823   slibdir='$(build_tooldir)/lib'
7824 else
7825   slibdir='$(libdir)'
7826 fi
7827 fi
7828
7829
7830
7831 objdir=`${PWDCMD-pwd}`
7832
7833
7834 # Substitute configuration variables
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903 # Echo that links are built
7904 if test x$host = x$target
7905 then
7906         str1="native "
7907 else
7908         str1="cross-"
7909         str2=" from $host"
7910 fi
7911
7912 if test x$host != x$build
7913 then
7914         str3=" on a $build system"
7915 fi
7916
7917 if test "x$str2" != x || test "x$str3" != x
7918 then
7919         str4=
7920 fi
7921
7922 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7923
7924 if test "x$str2" != x || test "x$str3" != x
7925 then
7926         echo " ${str2}${str3}." 1>&2
7927 fi
7928
7929 # Configure the subdirectories
7930 # AC_CONFIG_SUBDIRS($subdirs)
7931
7932 # Create the Makefile
7933 # and configure language subdirectories
7934 trap '' 1 2 15
7935 cat > confcache <<\EOF
7936 # This file is a shell script that caches the results of configure
7937 # tests run on this system so they can be shared between configure
7938 # scripts and configure runs.  It is not useful on other systems.
7939 # If it contains results you don't want to keep, you may remove or edit it.
7940 #
7941 # By default, configure uses ./config.cache as the cache file,
7942 # creating it if it does not exist already.  You can give configure
7943 # the --cache-file=FILE option to use a different cache file; that is
7944 # what configure does when it calls configure scripts in
7945 # subdirectories, so they share the cache.
7946 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7947 # config.status only pays attention to the cache file if you give it the
7948 # --recheck option to rerun configure.
7949 #
7950 EOF
7951 # The following way of writing the cache mishandles newlines in values,
7952 # but we know of no workaround that is simple, portable, and efficient.
7953 # So, don't put newlines in cache variables' values.
7954 # Ultrix sh set writes to stderr and can't be redirected directly,
7955 # and sets the high bit in the cache file unless we assign to the vars.
7956 (set) 2>&1 |
7957   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7958   *ac_space=\ *)
7959     # `set' does not quote correctly, so add quotes (double-quote substitution
7960     # turns \\\\ into \\, and sed turns \\ into \).
7961     sed -n \
7962       -e "s/'/'\\\\''/g" \
7963       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7964     ;;
7965   *)
7966     # `set' quotes correctly as required by POSIX, so do not add quotes.
7967     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7968     ;;
7969   esac >> confcache
7970 if cmp -s $cache_file confcache; then
7971   :
7972 else
7973   if test -w $cache_file; then
7974     echo "updating cache $cache_file"
7975     cat confcache > $cache_file
7976   else
7977     echo "not updating unwritable cache $cache_file"
7978   fi
7979 fi
7980 rm -f confcache
7981
7982 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7983
7984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7985 # Let make expand exec_prefix.
7986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7987
7988 # Any assignment to VPATH causes Sun make to only execute
7989 # the first set of double-colon rules, so remove it if not needed.
7990 # If there is a colon in the path, we need to keep it.
7991 if test "x$srcdir" = x.; then
7992   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7993 fi
7994
7995 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7996
7997 DEFS=-DHAVE_CONFIG_H
7998
7999 # Without the "./", some shells look in PATH for config.status.
8000 : ${CONFIG_STATUS=./config.status}
8001
8002 echo creating $CONFIG_STATUS
8003 rm -f $CONFIG_STATUS
8004 cat > $CONFIG_STATUS <<EOF
8005 #! /bin/sh
8006 # Generated automatically by configure.
8007 # Run this file to recreate the current configuration.
8008 # This directory was configured as follows,
8009 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8010 #
8011 # $0 $ac_configure_args
8012 #
8013 # Compiler output produced by configure, useful for debugging
8014 # configure, is in ./config.log if it exists.
8015
8016 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8017 for ac_option
8018 do
8019   case "\$ac_option" in
8020   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8021     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8022     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8023   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8024     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8025     exit 0 ;;
8026   -help | --help | --hel | --he | --h)
8027     echo "\$ac_cs_usage"; exit 0 ;;
8028   *) echo "\$ac_cs_usage"; exit 1 ;;
8029   esac
8030 done
8031
8032 ac_given_srcdir=$srcdir
8033
8034 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8035 EOF
8036 cat >> $CONFIG_STATUS <<EOF
8037
8038 # Protect against being on the right side of a sed subst in config.status.
8039 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8040  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8041 $ac_vpsub
8042 $extrasub
8043 s%@SHELL@%$SHELL%g
8044 s%@CFLAGS@%$CFLAGS%g
8045 s%@CPPFLAGS@%$CPPFLAGS%g
8046 s%@CXXFLAGS@%$CXXFLAGS%g
8047 s%@FFLAGS@%$FFLAGS%g
8048 s%@DEFS@%$DEFS%g
8049 s%@LDFLAGS@%$LDFLAGS%g
8050 s%@LIBS@%$LIBS%g
8051 s%@exec_prefix@%$exec_prefix%g
8052 s%@prefix@%$prefix%g
8053 s%@program_transform_name@%$program_transform_name%g
8054 s%@bindir@%$bindir%g
8055 s%@sbindir@%$sbindir%g
8056 s%@libexecdir@%$libexecdir%g
8057 s%@datadir@%$datadir%g
8058 s%@sysconfdir@%$sysconfdir%g
8059 s%@sharedstatedir@%$sharedstatedir%g
8060 s%@localstatedir@%$localstatedir%g
8061 s%@libdir@%$libdir%g
8062 s%@includedir@%$includedir%g
8063 s%@oldincludedir@%$oldincludedir%g
8064 s%@infodir@%$infodir%g
8065 s%@mandir@%$mandir%g
8066 s%@host@%$host%g
8067 s%@host_alias@%$host_alias%g
8068 s%@host_cpu@%$host_cpu%g
8069 s%@host_vendor@%$host_vendor%g
8070 s%@host_os@%$host_os%g
8071 s%@target@%$target%g
8072 s%@target_alias@%$target_alias%g
8073 s%@target_cpu@%$target_cpu%g
8074 s%@target_vendor@%$target_vendor%g
8075 s%@target_os@%$target_os%g
8076 s%@build@%$build%g
8077 s%@build_alias@%$build_alias%g
8078 s%@build_cpu@%$build_cpu%g
8079 s%@build_vendor@%$build_vendor%g
8080 s%@build_os@%$build_os%g
8081 s%@build_subdir@%$build_subdir%g
8082 s%@host_subdir@%$host_subdir%g
8083 s%@target_subdir@%$target_subdir%g
8084 s%@CC@%$CC%g
8085 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8086 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8087 s%@CPP@%$CPP%g
8088 s%@GNATBIND@%$GNATBIND%g
8089 s%@ADAC@%$ADAC%g
8090 s%@strict1_warn@%$strict1_warn%g
8091 s%@warn_cflags@%$warn_cflags%g
8092 s%@WERROR@%$WERROR%g
8093 s%@nocommon_flag@%$nocommon_flag%g
8094 s%@valgrind_path@%$valgrind_path%g
8095 s%@valgrind_path_defines@%$valgrind_path_defines%g
8096 s%@valgrind_command@%$valgrind_command%g
8097 s%@coverage_flags@%$coverage_flags%g
8098 s%@enable_multilib@%$enable_multilib%g
8099 s%@enable_shared@%$enable_shared%g
8100 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
8101 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
8102 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
8103 s%@onestep@%$onestep%g
8104 s%@SET_MAKE@%$SET_MAKE%g
8105 s%@AWK@%$AWK%g
8106 s%@LN@%$LN%g
8107 s%@LN_S@%$LN_S%g
8108 s%@RANLIB@%$RANLIB%g
8109 s%@INSTALL@%$INSTALL%g
8110 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8111 s%@INSTALL_DATA@%$INSTALL_DATA%g
8112 s%@make_compare_target@%$make_compare_target%g
8113 s%@have_mktemp_command@%$have_mktemp_command%g
8114 s%@MAKEINFO@%$MAKEINFO%g
8115 s%@BUILD_INFO@%$BUILD_INFO%g
8116 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8117 s%@FLEX@%$FLEX%g
8118 s%@BISON@%$BISON%g
8119 s%@stage1_cflags@%$stage1_cflags%g
8120 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8121 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8122 s%@LDEXP_LIB@%$LDEXP_LIB%g
8123 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8124 s%@LIBICONV@%$LIBICONV%g
8125 s%@LIBICONV_DEP@%$LIBICONV_DEP%g
8126 s%@manext@%$manext%g
8127 s%@objext@%$objext%g
8128 s%@extra_modes_file@%$extra_modes_file%g
8129 s%@FORBUILD@%$FORBUILD%g
8130 s%@PACKAGE@%$PACKAGE%g
8131 s%@VERSION@%$VERSION%g
8132 s%@USE_NLS@%$USE_NLS%g
8133 s%@LIBINTL@%$LIBINTL%g
8134 s%@LIBINTL_DEP@%$LIBINTL_DEP%g
8135 s%@INCINTL@%$INCINTL%g
8136 s%@XGETTEXT@%$XGETTEXT%g
8137 s%@GMSGFMT@%$GMSGFMT%g
8138 s%@POSUB@%$POSUB%g
8139 s%@CATALOGS@%$CATALOGS%g
8140 s%@CROSS@%$CROSS%g
8141 s%@ALL@%$ALL%g
8142 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8143 s%@inhibit_libc@%$inhibit_libc%g
8144 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8145 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8146 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
8147 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
8148 s%@STMP_FIXINC@%$STMP_FIXINC%g
8149 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8150 s%@libgcc_visibility@%$libgcc_visibility%g
8151 s%@gthread_flags@%$gthread_flags%g
8152 s%@GGC@%$GGC%g
8153 s%@zlibdir@%$zlibdir%g
8154 s%@zlibinc@%$zlibinc%g
8155 s%@MAINT@%$MAINT%g
8156 s%@gcc_tooldir@%$gcc_tooldir%g
8157 s%@dollar@%$dollar%g
8158 s%@slibdir@%$slibdir%g
8159 s%@objdir@%$objdir%g
8160 s%@subdirs@%$subdirs%g
8161 s%@srcdir@%$srcdir%g
8162 s%@all_boot_languages@%$all_boot_languages%g
8163 s%@all_compilers@%$all_compilers%g
8164 s%@all_gtfiles@%$all_gtfiles%g
8165 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
8166 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
8167 s%@all_lang_makefrags@%$all_lang_makefrags%g
8168 s%@all_lang_makefiles@%$all_lang_makefiles%g
8169 s%@all_languages@%$all_languages%g
8170 s%@all_stagestuff@%$all_stagestuff%g
8171 s%@build_exeext@%$build_exeext%g
8172 s%@build_install_headers_dir@%$build_install_headers_dir%g
8173 s%@build_xm_file_list@%$build_xm_file_list%g
8174 s%@build_xm_include_list@%$build_xm_include_list%g
8175 s%@build_xm_defines@%$build_xm_defines%g
8176 s%@check_languages@%$check_languages%g
8177 s%@cc_set_by_configure@%$cc_set_by_configure%g
8178 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8179 s%@cpp_install_dir@%$cpp_install_dir%g
8180 s%@xmake_file@%$xmake_file%g
8181 s%@tmake_file@%$tmake_file%g
8182 s%@extra_headers_list@%$extra_headers_list%g
8183 s%@extra_objs@%$extra_objs%g
8184 s%@extra_parts@%$extra_parts%g
8185 s%@extra_passes@%$extra_passes%g
8186 s%@extra_programs@%$extra_programs%g
8187 s%@float_h_file@%$float_h_file%g
8188 s%@gcc_config_arguments@%$gcc_config_arguments%g
8189 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8190 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8191 s%@gcc_version@%$gcc_version%g
8192 s%@gcc_version_full@%$gcc_version_full%g
8193 s%@gcc_version_trigger@%$gcc_version_trigger%g
8194 s%@host_exeext@%$host_exeext%g
8195 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8196 s%@host_xm_file_list@%$host_xm_file_list%g
8197 s%@host_xm_include_list@%$host_xm_include_list%g
8198 s%@host_xm_defines@%$host_xm_defines%g
8199 s%@out_host_hook_obj@%$out_host_hook_obj%g
8200 s%@install@%$install%g
8201 s%@lang_opt_files@%$lang_opt_files%g
8202 s%@lang_specs_files@%$lang_specs_files%g
8203 s%@lang_tree_files@%$lang_tree_files%g
8204 s%@local_prefix@%$local_prefix%g
8205 s%@md_file@%$md_file%g
8206 s%@objc_boehm_gc@%$objc_boehm_gc%g
8207 s%@out_file@%$out_file%g
8208 s%@out_object_file@%$out_object_file%g
8209 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8210 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8211 s%@symbolic_link@%$symbolic_link%g
8212 s%@thread_file@%$thread_file%g
8213 s%@tm_file_list@%$tm_file_list%g
8214 s%@tm_include_list@%$tm_include_list%g
8215 s%@tm_defines@%$tm_defines%g
8216 s%@tm_p_file_list@%$tm_p_file_list%g
8217 s%@tm_p_include_list@%$tm_p_include_list%g
8218 s%@xm_file_list@%$xm_file_list%g
8219 s%@xm_include_list@%$xm_include_list%g
8220 s%@xm_defines@%$xm_defines%g
8221 s%@c_target_objs@%$c_target_objs%g
8222 s%@cxx_target_objs@%$cxx_target_objs%g
8223 s%@target_cpu_default@%$target_cpu_default%g
8224 /@language_hooks@/r $language_hooks
8225 s%@language_hooks@%%g
8226
8227 CEOF
8228 EOF
8229
8230 cat >> $CONFIG_STATUS <<\EOF
8231
8232 # Split the substitutions into bite-sized pieces for seds with
8233 # small command number limits, like on Digital OSF/1 and HP-UX.
8234 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8235 ac_file=1 # Number of current file.
8236 ac_beg=1 # First line for current file.
8237 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8238 ac_more_lines=:
8239 ac_sed_cmds=""
8240 while $ac_more_lines; do
8241   if test $ac_beg -gt 1; then
8242     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8243   else
8244     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8245   fi
8246   if test ! -s conftest.s$ac_file; then
8247     ac_more_lines=false
8248     rm -f conftest.s$ac_file
8249   else
8250     if test -z "$ac_sed_cmds"; then
8251       ac_sed_cmds="sed -f conftest.s$ac_file"
8252     else
8253       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8254     fi
8255     ac_file=`expr $ac_file + 1`
8256     ac_beg=$ac_end
8257     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8258   fi
8259 done
8260 if test -z "$ac_sed_cmds"; then
8261   ac_sed_cmds=cat
8262 fi
8263 EOF
8264
8265 cat >> $CONFIG_STATUS <<EOF
8266
8267 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8268 EOF
8269 cat >> $CONFIG_STATUS <<\EOF
8270 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8271   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8272   case "$ac_file" in
8273   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8274        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8275   *) ac_file_in="${ac_file}.in" ;;
8276   esac
8277
8278   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8279
8280   # Remove last slash and all that follows it.  Not all systems have dirname.
8281   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8282   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8283     # The file is in a subdirectory.
8284     test ! -d "$ac_dir" && mkdir "$ac_dir"
8285     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8286     # A "../" for each directory in $ac_dir_suffix.
8287     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8288   else
8289     ac_dir_suffix= ac_dots=
8290   fi
8291
8292   case "$ac_given_srcdir" in
8293   .)  srcdir=.
8294       if test -z "$ac_dots"; then top_srcdir=.
8295       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8296   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8297   *) # Relative path.
8298     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8299     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8300   esac
8301
8302
8303   echo creating "$ac_file"
8304   rm -f "$ac_file"
8305   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8306   case "$ac_file" in
8307   *Makefile*) ac_comsub="1i\\
8308 # $configure_input" ;;
8309   *) ac_comsub= ;;
8310   esac
8311
8312   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8313   sed -e "$ac_comsub
8314 s%@configure_input@%$configure_input%g
8315 s%@srcdir@%$srcdir%g
8316 s%@top_srcdir@%$top_srcdir%g
8317 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8318 fi; done
8319 rm -f conftest.s*
8320
8321 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8322 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8323 #
8324 # ac_d sets the value in "#define NAME VALUE" lines.
8325 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8326 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8327 ac_dC='\3'
8328 ac_dD='%g'
8329 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8330 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8331 ac_uB='\([      ]\)%\1#\2define\3'
8332 ac_uC=' '
8333 ac_uD='\4%g'
8334 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8335 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8336 ac_eB='$%\1#\2define\3'
8337 ac_eC=' '
8338 ac_eD='%g'
8339
8340 if test "${CONFIG_HEADERS+set}" != set; then
8341 EOF
8342 cat >> $CONFIG_STATUS <<EOF
8343   CONFIG_HEADERS="auto-host.h:config.in"
8344 EOF
8345 cat >> $CONFIG_STATUS <<\EOF
8346 fi
8347 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8348   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8349   case "$ac_file" in
8350   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8351        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8352   *) ac_file_in="${ac_file}.in" ;;
8353   esac
8354
8355   echo creating $ac_file
8356
8357   rm -f conftest.frag conftest.in conftest.out
8358   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8359   cat $ac_file_inputs > conftest.in
8360
8361 EOF
8362
8363 # Transform confdefs.h into a sed script conftest.vals that substitutes
8364 # the proper values into config.h.in to produce config.h.  And first:
8365 # Protect against being on the right side of a sed subst in config.status.
8366 # Protect against being in an unquoted here document in config.status.
8367 rm -f conftest.vals
8368 cat > conftest.hdr <<\EOF
8369 s/[\\&%]/\\&/g
8370 s%[\\$`]%\\&%g
8371 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8372 s%ac_d%ac_u%gp
8373 s%ac_u%ac_e%gp
8374 EOF
8375 sed -n -f conftest.hdr confdefs.h > conftest.vals
8376 rm -f conftest.hdr
8377
8378 # This sed command replaces #undef with comments.  This is necessary, for
8379 # example, in the case of _POSIX_SOURCE, which is predefined and required
8380 # on some systems where configure will not decide to define it.
8381 cat >> conftest.vals <<\EOF
8382 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8383 EOF
8384
8385 # Break up conftest.vals because some shells have a limit on
8386 # the size of here documents, and old seds have small limits too.
8387
8388 rm -f conftest.tail
8389 while :
8390 do
8391   ac_lines=`grep -c . conftest.vals`
8392   # grep -c gives empty output for an empty file on some AIX systems.
8393   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8394   # Write a limited-size here document to conftest.frag.
8395   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8396   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8397   echo 'CEOF
8398   sed -f conftest.frag conftest.in > conftest.out
8399   rm -f conftest.in
8400   mv conftest.out conftest.in
8401 ' >> $CONFIG_STATUS
8402   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8403   rm -f conftest.vals
8404   mv conftest.tail conftest.vals
8405 done
8406 rm -f conftest.vals
8407
8408 cat >> $CONFIG_STATUS <<\EOF
8409   rm -f conftest.frag conftest.h
8410   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8411   cat conftest.in >> conftest.h
8412   rm -f conftest.in
8413   if cmp -s $ac_file conftest.h 2>/dev/null; then
8414     echo "$ac_file is unchanged"
8415     rm -f conftest.h
8416   else
8417     # Remove last slash and all that follows it.  Not all systems have dirname.
8418       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8419       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8420       # The file is in a subdirectory.
8421       test ! -d "$ac_dir" && mkdir "$ac_dir"
8422     fi
8423     rm -f $ac_file
8424     mv conftest.h $ac_file
8425   fi
8426 fi; done
8427
8428 EOF
8429 cat >> $CONFIG_STATUS <<EOF
8430 subdirs='$subdirs'
8431 symbolic_link='$symbolic_link'
8432
8433 EOF
8434 cat >> $CONFIG_STATUS <<\EOF
8435
8436 case x$CONFIG_HEADERS in
8437 xauto-host.h:config.in)
8438 echo > cstamp-h ;;
8439 esac
8440 # Make sure all the subdirs exist.
8441 for d in $subdirs
8442 do
8443     test -d $d || mkdir $d
8444 done
8445 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8446 # bootstrapping and the installation procedure can still use
8447 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
8448 # FLAGS_TO_PASS has been modified to solve the problem there.
8449 # This is virtually a duplicate of what happens in configure.lang; we do
8450 # an extra check to make sure this only happens if ln -s can be used.
8451 if test "$symbolic_link" = "ln -s"; then
8452  for d in ${subdirs} fixinc ; do
8453         STARTDIR=`${PWDCMD-pwd}`
8454         cd $d
8455         for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
8456         do
8457                 rm -f $t
8458                 $symbolic_link ../$t $t 2>/dev/null
8459         done
8460         cd $STARTDIR
8461  done
8462 else true ; fi
8463
8464 exit 0
8465 EOF
8466 chmod +x $CONFIG_STATUS
8467 rm -fr confdefs* $ac_clean_files
8468 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8469