OSDN Git Service

* configure.in (HAVE_GAS_SHF_MERGE): Always define to test result.
[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 mawk gawk 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   if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2576     if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2577       gcc_cv_prog_cmp_skip=slowcompare
2578     else
2579       gcc_cv_prog_cmp_skip=gnucompare
2580     fi
2581   else
2582     gcc_cv_prog_cmp_skip=slowcompare
2583   fi
2584   rm t1 t2
2585
2586 fi
2587
2588 echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2589 make_compare_target=$gcc_cv_prog_cmp_skip
2590
2591
2592
2593 # See if we have the mktemp command.
2594 # Extract the first word of "mktemp", so it can be a program name with args.
2595 set dummy mktemp; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test -n "$have_mktemp_command"; then
2602   ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2603 else
2604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2605   ac_dummy="$PATH"
2606   for ac_dir in $ac_dummy; do
2607     test -z "$ac_dir" && ac_dir=.
2608     if test -f $ac_dir/$ac_word; then
2609       ac_cv_prog_have_mktemp_command="yes"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614   test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2615 fi
2616 fi
2617 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2618 if test -n "$have_mktemp_command"; then
2619   echo "$ac_t""$have_mktemp_command" 1>&6
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623
2624
2625 # Do we have a single-tree copy of texinfo?
2626 if test -f $srcdir/../texinfo/Makefile.in; then
2627   MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2628   gcc_cv_prog_makeinfo_modern=yes
2629   echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2630 else
2631   # See if makeinfo has been installed and is modern enough
2632   # that we can use it.
2633   # Extract the first word of "makeinfo", so it can be a program name with args.
2634 set dummy makeinfo; ac_word=$2
2635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2636 echo "configure:2637: checking for $ac_word" >&5
2637 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2638   echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640   if test -n "$MAKEINFO"; then
2641   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2642 else
2643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2644   ac_dummy="$PATH"
2645   for ac_dir in $ac_dummy; do
2646     test -z "$ac_dir" && ac_dir=.
2647     if test -f $ac_dir/$ac_word; then
2648       ac_cv_prog_MAKEINFO="makeinfo"
2649       break
2650     fi
2651   done
2652   IFS="$ac_save_ifs"
2653 fi
2654 fi
2655 MAKEINFO="$ac_cv_prog_MAKEINFO"
2656 if test -n "$MAKEINFO"; then
2657   echo "$ac_t""$MAKEINFO" 1>&6
2658 else
2659   echo "$ac_t""no" 1>&6
2660 fi
2661
2662 if test -n "$MAKEINFO"; then
2663   # Found it, now check the version.
2664   echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2665 echo "configure:2666: checking for modern makeinfo" >&5
2666 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2667   echo $ac_n "(cached) $ac_c" 1>&6
2668 else
2669     ac_prog_version=`$MAKEINFO --version 2>&1 |
2670                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2671   echo "configure:2672: version of makeinfo is $ac_prog_version" >&5
2672   case $ac_prog_version in
2673     '')     gcc_cv_prog_makeinfo_modern=no;;
2674     4.[2-9]*)
2675             gcc_cv_prog_makeinfo_modern=yes;;
2676     *)      gcc_cv_prog_makeinfo_modern=no;;
2677   esac
2678
2679 fi
2680
2681 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2682 else
2683   gcc_cv_prog_makeinfo_modern=no
2684 fi
2685
2686 fi
2687
2688 if test $gcc_cv_prog_makeinfo_modern = no; then
2689   echo "configure: warning: 
2690 *** Makeinfo is missing or too old.
2691 *** Info documentation will not be built." 1>&2
2692   BUILD_INFO=
2693 else
2694   BUILD_INFO=info               
2695 fi
2696
2697 # Is pod2man recent enough to regenerate manpages?
2698 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2699 echo "configure:2700: checking for recent Pod::Man" >&5
2700 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2701   echo "$ac_t""yes" 1>&6
2702   GENERATED_MANPAGES=generated-manpages         
2703 else
2704   echo "$ac_t""no" 1>&6
2705   GENERATED_MANPAGES=
2706 fi
2707
2708 # How about lex?
2709 if test -f $srcdir/../flex/skel.c; then
2710   FLEX='$(objdir)/../flex/flex'
2711 else
2712   # Extract the first word of "flex", so it can be a program name with args.
2713 set dummy flex; ac_word=$2
2714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2715 echo "configure:2716: checking for $ac_word" >&5
2716 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   if test -n "$FLEX"; then
2720   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2721 else
2722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2723   ac_dummy="$PATH"
2724   for ac_dir in $ac_dummy; do
2725     test -z "$ac_dir" && ac_dir=.
2726     if test -f $ac_dir/$ac_word; then
2727       ac_cv_prog_FLEX="flex"
2728       break
2729     fi
2730   done
2731   IFS="$ac_save_ifs"
2732   test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2733 fi
2734 fi
2735 FLEX="$ac_cv_prog_FLEX"
2736 if test -n "$FLEX"; then
2737   echo "$ac_t""$FLEX" 1>&6
2738 else
2739   echo "$ac_t""no" 1>&6
2740 fi
2741
2742 fi
2743
2744 # Bison?
2745 # The -L switch is so bison can find its skeleton file.
2746 if test -f $srcdir/../bison/bison.simple; then
2747   BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2748 else
2749   # Extract the first word of "bison", so it can be a program name with args.
2750 set dummy bison; ac_word=$2
2751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2752 echo "configure:2753: checking for $ac_word" >&5
2753 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   if test -n "$BISON"; then
2757   ac_cv_prog_BISON="$BISON" # Let the user override the test.
2758 else
2759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2760   ac_dummy="$PATH"
2761   for ac_dir in $ac_dummy; do
2762     test -z "$ac_dir" && ac_dir=.
2763     if test -f $ac_dir/$ac_word; then
2764       ac_cv_prog_BISON="bison"
2765       break
2766     fi
2767   done
2768   IFS="$ac_save_ifs"
2769   test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2770 fi
2771 fi
2772 BISON="$ac_cv_prog_BISON"
2773 if test -n "$BISON"; then
2774   echo "$ac_t""$BISON" 1>&6
2775 else
2776   echo "$ac_t""no" 1>&6
2777 fi
2778
2779 fi
2780
2781 # --------------------
2782 # Checks for C headers
2783 # --------------------
2784
2785 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2786 echo "configure:2787: checking for GNU C library" >&5
2787 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2788   echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790   cat > conftest.$ac_ext <<EOF
2791 #line 2792 "configure"
2792 #include "confdefs.h"
2793 #include <features.h>
2794 int main() {
2795
2796 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2797 #error Not a GNU C library system
2798 #endif
2799 ; return 0; }
2800 EOF
2801 if { (eval echo configure:2802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2802   rm -rf conftest*
2803   gcc_cv_glibc=yes
2804 else
2805   echo "configure: failed program was:" >&5
2806   cat conftest.$ac_ext >&5
2807   rm -rf conftest*
2808   gcc_cv_glibc=no
2809 fi
2810 rm -f conftest*
2811 fi
2812
2813 echo "$ac_t""$gcc_cv_glibc" 1>&6
2814 if test $gcc_cv_glibc = yes; then
2815   cat >> confdefs.h <<\EOF
2816 #define _GNU_SOURCE 1
2817 EOF
2818
2819 fi
2820
2821 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2822 echo "configure:2823: checking for ANSI C header files" >&5
2823 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   cat > conftest.$ac_ext <<EOF
2827 #line 2828 "configure"
2828 #include "confdefs.h"
2829 #include <stdlib.h>
2830 #include <stdarg.h>
2831 #include <string.h>
2832 #include <float.h>
2833 EOF
2834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2835 { (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2837 if test -z "$ac_err"; then
2838   rm -rf conftest*
2839   ac_cv_header_stdc=yes
2840 else
2841   echo "$ac_err" >&5
2842   echo "configure: failed program was:" >&5
2843   cat conftest.$ac_ext >&5
2844   rm -rf conftest*
2845   ac_cv_header_stdc=no
2846 fi
2847 rm -f conftest*
2848
2849 if test $ac_cv_header_stdc = yes; then
2850   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2851 cat > conftest.$ac_ext <<EOF
2852 #line 2853 "configure"
2853 #include "confdefs.h"
2854 #include <string.h>
2855 EOF
2856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2857   egrep "memchr" >/dev/null 2>&1; then
2858   :
2859 else
2860   rm -rf conftest*
2861   ac_cv_header_stdc=no
2862 fi
2863 rm -f conftest*
2864
2865 fi
2866
2867 if test $ac_cv_header_stdc = yes; then
2868   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2869 cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <stdlib.h>
2873 EOF
2874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2875   egrep "free" >/dev/null 2>&1; then
2876   :
2877 else
2878   rm -rf conftest*
2879   ac_cv_header_stdc=no
2880 fi
2881 rm -f conftest*
2882
2883 fi
2884
2885 if test $ac_cv_header_stdc = yes; then
2886   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2887 if test "$cross_compiling" = yes; then
2888   :
2889 else
2890   cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 #include <ctype.h>
2894 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2895 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2896 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2897 int main () { int i; for (i = 0; i < 256; i++)
2898 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2899 exit (0); }
2900
2901 EOF
2902 if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2903 then
2904   :
2905 else
2906   echo "configure: failed program was:" >&5
2907   cat conftest.$ac_ext >&5
2908   rm -fr conftest*
2909   ac_cv_header_stdc=no
2910 fi
2911 rm -fr conftest*
2912 fi
2913
2914 fi
2915 fi
2916
2917 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2918 if test $ac_cv_header_stdc = yes; then
2919   cat >> confdefs.h <<\EOF
2920 #define STDC_HEADERS 1
2921 EOF
2922
2923 fi
2924
2925 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2926 echo "configure:2927: checking whether time.h and sys/time.h may both be included" >&5
2927 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   cat > conftest.$ac_ext <<EOF
2931 #line 2932 "configure"
2932 #include "confdefs.h"
2933 #include <sys/types.h>
2934 #include <sys/time.h>
2935 #include <time.h>
2936 int main() {
2937 struct tm *tp;
2938 ; return 0; }
2939 EOF
2940 if { (eval echo configure:2941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2941   rm -rf conftest*
2942   ac_cv_header_time=yes
2943 else
2944   echo "configure: failed program was:" >&5
2945   cat conftest.$ac_ext >&5
2946   rm -rf conftest*
2947   ac_cv_header_time=no
2948 fi
2949 rm -f conftest*
2950 fi
2951
2952 echo "$ac_t""$ac_cv_header_time" 1>&6
2953 if test $ac_cv_header_time = yes; then
2954   cat >> confdefs.h <<\EOF
2955 #define TIME_WITH_SYS_TIME 1
2956 EOF
2957
2958 fi
2959
2960 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2961 echo "configure:2962: checking for working stdbool.h" >&5
2962 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2963   echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965   cat > conftest.$ac_ext <<EOF
2966 #line 2967 "configure"
2967 #include "confdefs.h"
2968 #include <stdbool.h>
2969 int main() {
2970 bool foo = false;
2971 ; return 0; }
2972 EOF
2973 if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2974   rm -rf conftest*
2975   ac_cv_header_stdbool_h=yes
2976 else
2977   echo "configure: failed program was:" >&5
2978   cat conftest.$ac_ext >&5
2979   rm -rf conftest*
2980   ac_cv_header_stdbool_h=no
2981 fi
2982 rm -f conftest*
2983 fi
2984
2985 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2986 if test $ac_cv_header_stdbool_h = yes; then
2987   cat >> confdefs.h <<\EOF
2988 #define HAVE_STDBOOL_H 1
2989 EOF
2990
2991 fi
2992
2993 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2994 echo "configure:2995: checking whether string.h and strings.h may both be included" >&5
2995 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2996   echo $ac_n "(cached) $ac_c" 1>&6
2997 else
2998   cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 #include <string.h>
3002 #include <strings.h>
3003 int main() {
3004
3005 ; return 0; }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3008   rm -rf conftest*
3009   gcc_cv_header_string=yes
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   gcc_cv_header_string=no
3015 fi
3016 rm -f conftest*
3017 fi
3018
3019 echo "$ac_t""$gcc_cv_header_string" 1>&6
3020 if test $gcc_cv_header_string = yes; then
3021   cat >> confdefs.h <<\EOF
3022 #define STRING_WITH_STRINGS 1
3023 EOF
3024
3025 fi
3026
3027 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3028 echo "configure:3029: checking for sys/wait.h that is POSIX.1 compatible" >&5
3029 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 #include <sys/types.h>
3036 #include <sys/wait.h>
3037 #ifndef WEXITSTATUS
3038 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3039 #endif
3040 #ifndef WIFEXITED
3041 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3042 #endif
3043 int main() {
3044 int s;
3045 wait (&s);
3046 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3047 ; return 0; }
3048 EOF
3049 if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3050   rm -rf conftest*
3051   ac_cv_header_sys_wait_h=yes
3052 else
3053   echo "configure: failed program was:" >&5
3054   cat conftest.$ac_ext >&5
3055   rm -rf conftest*
3056   ac_cv_header_sys_wait_h=no
3057 fi
3058 rm -f conftest*
3059 fi
3060
3061 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3062 if test $ac_cv_header_sys_wait_h = yes; then
3063   cat >> confdefs.h <<\EOF
3064 #define HAVE_SYS_WAIT_H 1
3065 EOF
3066
3067 fi
3068
3069 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3070                  fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
3071                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
3072                  direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
3073 do
3074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3076 echo "configure:3077: checking for $ac_hdr" >&5
3077 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   cat > conftest.$ac_ext <<EOF
3081 #line 3082 "configure"
3082 #include "confdefs.h"
3083 #include <$ac_hdr>
3084 EOF
3085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3086 { (eval echo configure:3087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3088 if test -z "$ac_err"; then
3089   rm -rf conftest*
3090   eval "ac_cv_header_$ac_safe=yes"
3091 else
3092   echo "$ac_err" >&5
3093   echo "configure: failed program was:" >&5
3094   cat conftest.$ac_ext >&5
3095   rm -rf conftest*
3096   eval "ac_cv_header_$ac_safe=no"
3097 fi
3098 rm -f conftest*
3099 fi
3100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3101   echo "$ac_t""yes" 1>&6
3102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3103   cat >> confdefs.h <<EOF
3104 #define $ac_tr_hdr 1
3105 EOF
3106  
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110 done
3111
3112
3113 # Check for thread headers.
3114 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3115 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3116 echo "configure:3117: checking for thread.h" >&5
3117 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 #include <thread.h>
3124 EOF
3125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3126 { (eval echo configure:3127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3128 if test -z "$ac_err"; then
3129   rm -rf conftest*
3130   eval "ac_cv_header_$ac_safe=yes"
3131 else
3132   echo "$ac_err" >&5
3133   echo "configure: failed program was:" >&5
3134   cat conftest.$ac_ext >&5
3135   rm -rf conftest*
3136   eval "ac_cv_header_$ac_safe=no"
3137 fi
3138 rm -f conftest*
3139 fi
3140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3141   echo "$ac_t""yes" 1>&6
3142   have_thread_h=yes
3143 else
3144   echo "$ac_t""no" 1>&6
3145 have_thread_h=
3146 fi
3147
3148 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3149 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3150 echo "configure:3151: checking for pthread.h" >&5
3151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3152   echo $ac_n "(cached) $ac_c" 1>&6
3153 else
3154   cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157 #include <pthread.h>
3158 EOF
3159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3160 { (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3162 if test -z "$ac_err"; then
3163   rm -rf conftest*
3164   eval "ac_cv_header_$ac_safe=yes"
3165 else
3166   echo "$ac_err" >&5
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169   rm -rf conftest*
3170   eval "ac_cv_header_$ac_safe=no"
3171 fi
3172 rm -f conftest*
3173 fi
3174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3175   echo "$ac_t""yes" 1>&6
3176   have_pthread_h=yes
3177 else
3178   echo "$ac_t""no" 1>&6
3179 have_pthread_h=
3180 fi
3181
3182
3183 # These tests can't be done till we know if we have limits.h.
3184 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3185 echo "configure:3186: checking for CHAR_BIT" >&5
3186 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192 #ifdef HAVE_LIMITS_H
3193 #include <limits.h>
3194 #endif
3195 #ifdef CHAR_BIT
3196 found
3197 #endif
3198 EOF
3199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3200   egrep "found" >/dev/null 2>&1; then
3201   rm -rf conftest*
3202   gcc_cv_decl_char_bit=yes
3203 else
3204   rm -rf conftest*
3205   gcc_cv_decl_char_bit=no
3206 fi
3207 rm -f conftest*
3208
3209
3210 fi
3211
3212 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3213 if test $gcc_cv_decl_char_bit = no; then
3214   echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3215 echo "configure:3216: checking number of bits in a byte" >&5
3216 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   i=8
3220  gcc_cv_c_nbby=
3221  while test $i -lt 65; do
3222    cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225
3226 int main() {
3227 switch(0) {
3228   case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3229   case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3230   ; }
3231 ; return 0; }
3232 EOF
3233 if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3234   rm -rf conftest*
3235   gcc_cv_c_nbby=$i; break
3236 else
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239 fi
3240 rm -f conftest*
3241    i=`expr $i + 1`
3242  done
3243  test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3244
3245 fi
3246
3247 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3248 if test $gcc_cv_c_nbby = failed; then
3249   { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3250 else
3251   cat >> confdefs.h <<EOF
3252 #define CHAR_BIT $gcc_cv_c_nbby
3253 EOF
3254
3255 fi
3256 fi
3257 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3258 echo "configure:3259: checking whether byte ordering is bigendian" >&5
3259 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3260   echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262   ac_cv_c_bigendian=unknown
3263 # See if sys/param.h defines the BYTE_ORDER macro.
3264 cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 #include <sys/types.h>
3268 #include <sys/param.h>
3269 int main() {
3270
3271 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3272  bogus endian macros
3273 #endif
3274 ; return 0; }
3275 EOF
3276 if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3277   rm -rf conftest*
3278   # It does; now see whether it defined to BIG_ENDIAN or not.
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <sys/types.h>
3283 #include <sys/param.h>
3284 int main() {
3285
3286 #if BYTE_ORDER != BIG_ENDIAN
3287  not big endian
3288 #endif
3289 ; return 0; }
3290 EOF
3291 if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3292   rm -rf conftest*
3293   ac_cv_c_bigendian=yes
3294 else
3295   echo "configure: failed program was:" >&5
3296   cat conftest.$ac_ext >&5
3297   rm -rf conftest*
3298   ac_cv_c_bigendian=no
3299 fi
3300 rm -f conftest*
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304 fi
3305 rm -f conftest*
3306 if test $ac_cv_c_bigendian = unknown; then
3307 if test "$cross_compiling" = yes; then
3308    echo $ac_n "cross-compiling... " 2>&6 
3309 else
3310   cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 main () {
3314   /* Are we little or big endian?  From Harbison&Steele.  */
3315   union
3316   {
3317     long l;
3318     char c[sizeof (long)];
3319   } u;
3320   u.l = 1;
3321   exit (u.c[sizeof (long) - 1] == 1);
3322 }
3323 EOF
3324 if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3325 then
3326   ac_cv_c_bigendian=no
3327 else
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -fr conftest*
3331   ac_cv_c_bigendian=yes
3332 fi
3333 rm -fr conftest*
3334 fi
3335
3336 fi
3337 fi
3338
3339 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3340 if test $ac_cv_c_bigendian = unknown; then
3341 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3342 echo "configure:3343: checking to probe for byte ordering" >&5
3343
3344 cat >conftest.c <<EOF
3345 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3346 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3347 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3348 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3349 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3350 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3351 int main() { _ascii (); _ebcdic (); return 0; }
3352 EOF
3353  if test -f conftest.c ; then
3354      if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3355         if test `grep -l BIGenDianSyS conftest.o` ; then
3356            echo $ac_n ' big endian probe OK, ' 1>&6
3357            ac_cv_c_bigendian=yes
3358         fi
3359         if test `grep -l LiTTleEnDian conftest.o` ; then
3360            echo $ac_n ' little endian probe OK, ' 1>&6
3361            if test $ac_cv_c_bigendian = yes ; then
3362             ac_cv_c_bigendian=unknown;
3363            else
3364             ac_cv_c_bigendian=no
3365            fi
3366         fi
3367         echo $ac_n 'guessing bigendian ...  ' >&6
3368      fi
3369   fi
3370 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3371 fi
3372 if test $ac_cv_c_bigendian = yes; then
3373   cat >> confdefs.h <<\EOF
3374 #define WORDS_BIGENDIAN 1
3375 EOF
3376
3377   cat >> confdefs.h <<\EOF
3378 #define HOST_WORDS_BIG_ENDIAN 1
3379 EOF
3380
3381   BYTEORDER=4321
3382 else
3383   BYTEORDER=1234
3384 fi
3385 cat >> confdefs.h <<EOF
3386 #define BYTEORDER $BYTEORDER
3387 EOF
3388
3389 if test $ac_cv_c_bigendian = unknown; then
3390   { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3391 fi
3392
3393
3394 # --------
3395 # UNSORTED
3396 # --------
3397
3398 # Stage specific cflags for build.
3399 stage1_cflags=
3400 case $build in
3401 vax-*-*)
3402   if test x$GCC = xyes
3403   then
3404     stage1_cflags="-Wa,-J"
3405   else
3406     stage1_cflags="-J"
3407   fi
3408   ;;
3409 powerpc-*-darwin*)
3410   # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3411   # sources; use -no-cpp-precomp to get to GNU cpp.
3412   # Apple's GCC has bugs in designated initializer handling, so disable
3413   # that too.
3414   stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3415   ;;
3416 esac
3417
3418
3419 # These libraries may be used by collect2.
3420 # We may need a special search path to get them linked.
3421 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3422 echo "configure:3423: checking for collect2 libraries" >&5
3423 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   save_LIBS="$LIBS"
3427 for libs in '' -lld -lmld \
3428                 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3429                 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3430 do
3431         LIBS="$libs"
3432         cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435 /* Override any gcc2 internal prototype to avoid an error.  */
3436 /* We use char because int might match the return type of a gcc2
3437     builtin and then its argument prototype would still apply.  */
3438 char ldopen();
3439
3440 int main() {
3441 ldopen()
3442 ; return 0; }
3443 EOF
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3445   rm -rf conftest*
3446   gcc_cv_collect2_libs="$libs"; break
3447 else
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450 fi
3451 rm -f conftest*
3452 done
3453 LIBS="$save_LIBS"
3454 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3455 fi
3456
3457 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3458 case $gcc_cv_collect2_libs in
3459         "none required")        ;;
3460         *)      COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3461 esac
3462
3463
3464 # When building Ada code on Alpha, we need exc_resume which is usually in
3465 # -lexc.  So test for it.
3466 save_LIBS="$LIBS"
3467 LIBS=
3468
3469 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3470 echo "configure:3471: checking for library containing exc_resume" >&5
3471 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   ac_func_search_save_LIBS="$LIBS"
3475 ac_cv_search_exc_resume="no"
3476 cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 /* Override any gcc2 internal prototype to avoid an error.  */
3480 /* We use char because int might match the return type of a gcc2
3481     builtin and then its argument prototype would still apply.  */
3482 char exc_resume();
3483
3484 int main() {
3485 exc_resume()
3486 ; return 0; }
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3489   rm -rf conftest*
3490   ac_cv_search_exc_resume="none required"
3491 else
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494 fi
3495 rm -f conftest*
3496 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3497 LIBS="-l$i  $ac_func_search_save_LIBS"
3498 cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501 /* Override any gcc2 internal prototype to avoid an error.  */
3502 /* We use char because int might match the return type of a gcc2
3503     builtin and then its argument prototype would still apply.  */
3504 char exc_resume();
3505
3506 int main() {
3507 exc_resume()
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3511   rm -rf conftest*
3512   ac_cv_search_exc_resume="-l$i"
3513 break
3514 else
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517 fi
3518 rm -f conftest*
3519 done
3520 LIBS="$ac_func_search_save_LIBS"
3521 fi
3522
3523 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3524 if test "$ac_cv_search_exc_resume" != "no"; then
3525   test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3526   
3527 else :
3528   
3529 fi
3530 GNAT_LIBEXC="$LIBS"
3531 LIBS="$save_LIBS"
3532
3533
3534 # Some systems put ldexp and frexp in libm instead of libc; assume
3535 # they're both in the same place.  jcf-dump needs them.
3536 save_LIBS="$LIBS"
3537 LIBS=
3538
3539 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3540 echo "configure:3541: checking for library containing ldexp" >&5
3541 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   ac_func_search_save_LIBS="$LIBS"
3545 ac_cv_search_ldexp="no"
3546 cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 /* Override any gcc2 internal prototype to avoid an error.  */
3550 /* We use char because int might match the return type of a gcc2
3551     builtin and then its argument prototype would still apply.  */
3552 char ldexp();
3553
3554 int main() {
3555 ldexp()
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3559   rm -rf conftest*
3560   ac_cv_search_ldexp="none required"
3561 else
3562   echo "configure: failed program was:" >&5
3563   cat conftest.$ac_ext >&5
3564 fi
3565 rm -f conftest*
3566 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3567 LIBS="-l$i  $ac_func_search_save_LIBS"
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* Override any gcc2 internal prototype to avoid an error.  */
3572 /* We use char because int might match the return type of a gcc2
3573     builtin and then its argument prototype would still apply.  */
3574 char ldexp();
3575
3576 int main() {
3577 ldexp()
3578 ; return 0; }
3579 EOF
3580 if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3581   rm -rf conftest*
3582   ac_cv_search_ldexp="-l$i"
3583 break
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587 fi
3588 rm -f conftest*
3589 done
3590 LIBS="$ac_func_search_save_LIBS"
3591 fi
3592
3593 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3594 if test "$ac_cv_search_ldexp" != "no"; then
3595   test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3596   
3597 else :
3598   
3599 fi
3600 LDEXP_LIB="$LIBS"
3601 LIBS="$save_LIBS"
3602
3603
3604 # Use <inttypes.h> only if it exists,
3605 # doesn't clash with <sys/types.h>, and declares intmax_t.
3606 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3607 echo "configure:3608: checking for inttypes.h" >&5
3608 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614 #include <sys/types.h>
3615 #include <inttypes.h>
3616 int main() {
3617 intmax_t i = -1;
3618 ; return 0; }
3619 EOF
3620 if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3621   rm -rf conftest*
3622   gcc_cv_header_inttypes_h=yes
3623 else
3624   echo "configure: failed program was:" >&5
3625   cat conftest.$ac_ext >&5
3626   rm -rf conftest*
3627   gcc_cv_header_inttypes_h=no
3628 fi
3629 rm -f conftest*
3630 fi
3631
3632 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3633 if test $gcc_cv_header_inttypes_h = yes; then
3634   cat >> confdefs.h <<\EOF
3635 #define HAVE_INTTYPES_H 1
3636 EOF
3637
3638 fi
3639
3640
3641 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3642         sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3643         fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
3644         scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
3645         setlocale
3646 do
3647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3648 echo "configure:3649: checking for $ac_func" >&5
3649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3650   echo $ac_n "(cached) $ac_c" 1>&6
3651 else
3652   cat > conftest.$ac_ext <<EOF
3653 #line 3654 "configure"
3654 #include "confdefs.h"
3655 /* System header to define __stub macros and hopefully few prototypes,
3656     which can conflict with char $ac_func(); below.  */
3657 #include <assert.h>
3658 /* Override any gcc2 internal prototype to avoid an error.  */
3659 /* We use char because int might match the return type of a gcc2
3660     builtin and then its argument prototype would still apply.  */
3661 char $ac_func();
3662
3663 int main() {
3664
3665 /* The GNU C library defines this for functions which it implements
3666     to always fail with ENOSYS.  Some functions are actually named
3667     something starting with __ and the normal name is an alias.  */
3668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3669 choke me
3670 #else
3671 $ac_func();
3672 #endif
3673
3674 ; return 0; }
3675 EOF
3676 if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3677   rm -rf conftest*
3678   eval "ac_cv_func_$ac_func=yes"
3679 else
3680   echo "configure: failed program was:" >&5
3681   cat conftest.$ac_ext >&5
3682   rm -rf conftest*
3683   eval "ac_cv_func_$ac_func=no"
3684 fi
3685 rm -f conftest*
3686 fi
3687
3688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3689   echo "$ac_t""yes" 1>&6
3690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3691   cat >> confdefs.h <<EOF
3692 #define $ac_tr_func 1
3693 EOF
3694  
3695 else
3696   echo "$ac_t""no" 1>&6
3697 fi
3698 done
3699
3700
3701 if test x$ac_cv_func_mbstowcs = xyes; then
3702   echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3703 echo "configure:3704: checking whether mbstowcs works" >&5
3704 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707       if test "$cross_compiling" = yes; then
3708   gcc_cv_func_mbstowcs_works=yes
3709 else
3710   cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713 #include <stdlib.h>
3714 int main()
3715 {
3716   mbstowcs(0, "", 0);
3717   return 0;
3718 }
3719 EOF
3720 if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3721 then
3722   gcc_cv_func_mbstowcs_works=yes
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -fr conftest*
3727   gcc_cv_func_mbstowcs_works=no
3728 fi
3729 rm -fr conftest*
3730 fi
3731
3732 fi
3733
3734 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3735   if test x$gcc_cv_func_mbstowcs_works = xyes; then
3736     cat >> confdefs.h <<\EOF
3737 #define HAVE_WORKING_MBSTOWCS 1
3738 EOF
3739
3740   fi
3741 fi
3742
3743 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3744 echo "configure:3745: checking for ssize_t" >&5
3745 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <sys/types.h>
3752 #if STDC_HEADERS
3753 #include <stdlib.h>
3754 #include <stddef.h>
3755 #endif
3756 EOF
3757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3759   rm -rf conftest*
3760   ac_cv_type_ssize_t=yes
3761 else
3762   rm -rf conftest*
3763   ac_cv_type_ssize_t=no
3764 fi
3765 rm -f conftest*
3766
3767 fi
3768 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3769 if test $ac_cv_type_ssize_t = no; then
3770   cat >> confdefs.h <<\EOF
3771 #define ssize_t int
3772 EOF
3773
3774 fi
3775
3776
3777 # Try to determine the array type of the second argument of getgroups
3778 # for the target system (int or gid_t).
3779 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3780 echo "configure:3781: checking for uid_t in sys/types.h" >&5
3781 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 #include <sys/types.h>
3788 EOF
3789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3790   egrep "uid_t" >/dev/null 2>&1; then
3791   rm -rf conftest*
3792   ac_cv_type_uid_t=yes
3793 else
3794   rm -rf conftest*
3795   ac_cv_type_uid_t=no
3796 fi
3797 rm -f conftest*
3798
3799 fi
3800
3801 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3802 if test $ac_cv_type_uid_t = no; then
3803   cat >> confdefs.h <<\EOF
3804 #define uid_t int
3805 EOF
3806
3807   cat >> confdefs.h <<\EOF
3808 #define gid_t int
3809 EOF
3810
3811 fi
3812
3813 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3814 echo "configure:3815: checking type of array argument to getgroups" >&5
3815 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   if test "$cross_compiling" = yes; then
3819   ac_cv_type_getgroups=cross
3820 else
3821   cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824
3825 /* Thanks to Mike Rendell for this test.  */
3826 #include <sys/types.h>
3827 #define NGID 256
3828 #undef MAX
3829 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3830 main()
3831 {
3832   gid_t gidset[NGID];
3833   int i, n;
3834   union { gid_t gval; long lval; }  val;
3835
3836   val.lval = -1;
3837   for (i = 0; i < NGID; i++)
3838     gidset[i] = val.gval;
3839   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3840                  gidset);
3841   /* Exit non-zero if getgroups seems to require an array of ints.  This
3842      happens when gid_t is short but getgroups modifies an array of ints.  */
3843   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3844 }
3845
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3848 then
3849     ac_cv_type_getgroups=gid_t
3850 else
3851   echo "configure: failed program was:" >&5
3852   cat conftest.$ac_ext >&5
3853   rm -fr conftest*
3854   ac_cv_type_getgroups=int
3855 fi
3856 rm -fr conftest*
3857 fi
3858
3859 if test $ac_cv_type_getgroups = cross; then
3860         cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 #include <unistd.h>
3864 EOF
3865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3866   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3867   rm -rf conftest*
3868   ac_cv_type_getgroups=gid_t
3869 else
3870   rm -rf conftest*
3871   ac_cv_type_getgroups=int
3872 fi
3873 rm -f conftest*
3874
3875 fi
3876 fi
3877
3878 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3879 cat >> confdefs.h <<EOF
3880 #define GETGROUPS_T $ac_cv_type_getgroups
3881 EOF
3882
3883
3884 if test "${target}" = "${build}"; then
3885   TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3886 else
3887   case "${target}" in
3888         # This condition may need some tweaking.  It should include all
3889         # targets where the array type of the second argument of getgroups
3890         # is int and the type of gid_t is not equivalent to int.
3891         *-*-sunos* | *-*-ultrix*)
3892                 TARGET_GETGROUPS_T=int
3893                 ;;
3894         *)
3895                 TARGET_GETGROUPS_T=gid_t
3896                 ;;
3897   esac
3898 fi
3899
3900
3901 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3902 echo "configure:3903: checking whether the printf functions support %p" >&5
3903 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   if test "$cross_compiling" = yes; then
3907   gcc_cv_func_printf_ptr=no
3908 else
3909   cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <stdio.h>
3913
3914 int main()
3915 {
3916   char buf[64];
3917   char *p = buf, *q = NULL;
3918   sprintf(buf, "%p", p);
3919   sscanf(buf, "%p", &q);
3920   return (p != q);
3921 }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3924 then
3925   gcc_cv_func_printf_ptr=yes
3926 else
3927   echo "configure: failed program was:" >&5
3928   cat conftest.$ac_ext >&5
3929   rm -fr conftest*
3930   gcc_cv_func_printf_ptr=no
3931 fi
3932 rm -fr conftest*
3933 fi
3934
3935 rm -f core core.* *.core
3936 fi
3937
3938 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3939 if test $gcc_cv_func_printf_ptr = yes ; then
3940   cat >> confdefs.h <<\EOF
3941 #define HAVE_PRINTF_PTR 1
3942 EOF
3943
3944 fi
3945
3946 if test $ac_cv_header_sys_mman_h != yes \
3947  || test $ac_cv_func_mmap != yes; then
3948    gcc_cv_func_mmap_file=no
3949    gcc_cv_func_mmap_dev_zero=no
3950    gcc_cv_func_mmap_anon=no
3951 else
3952    echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
3953 echo "configure:3954: checking whether read-only mmap of a plain file works" >&5
3954 if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   # Add a system to this blacklist if 
3958    # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
3959    # memory area containing the same data that you'd get if you applied
3960    # read() to the same fd.  The only system known to have a problem here
3961    # is VMS, where text files have record structure.
3962    case "$host_os" in
3963      vms*) 
3964         gcc_cv_func_mmap_file=no ;;
3965      *)
3966         gcc_cv_func_mmap_file=yes;;
3967    esac
3968 fi
3969
3970 echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
3971    echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
3972 echo "configure:3973: checking whether mmap from /dev/zero works" >&5
3973 if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   # Add a system to this blacklist if it has mmap() but /dev/zero
3977    # does not exist, or if mmapping /dev/zero does not give anonymous
3978    # zeroed pages with both the following properties:
3979    # 1. If you map N consecutive pages in with one call, and then
3980    #    unmap any subset of those pages, the pages that were not
3981    #    explicitly unmapped remain accessible.
3982    # 2. If you map two adjacent blocks of memory and then unmap them
3983    #    both at once, they must both go away.
3984    # Systems known to be in this category are Windows (all variants),
3985    # VMS, and Darwin.
3986    case "$host_os" in
3987      vms* | cygwin* | pe | mingw* | darwin*)
3988         gcc_cv_func_mmap_dev_zero=no ;;
3989      *)
3990         gcc_cv_func_mmap_dev_zero=yes;;
3991    esac
3992 fi
3993
3994 echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
3995
3996    # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
3997    echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
3998 echo "configure:3999: checking for MAP_ANON(YMOUS)" >&5
3999 if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <sys/types.h>
4006 #include <sys/mman.h>
4007 #include <unistd.h>
4008
4009 #ifndef MAP_ANONYMOUS
4010 #define MAP_ANONYMOUS MAP_ANON
4011 #endif
4012
4013 int main() {
4014 int n = MAP_ANONYMOUS;
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   gcc_cv_decl_map_anon=yes
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   gcc_cv_decl_map_anon=no
4025 fi
4026 rm -f conftest*
4027 fi
4028
4029 echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
4030
4031    if test $gcc_cv_decl_map_anon = no; then
4032      gcc_cv_func_mmap_anon=no
4033    else
4034      echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
4035 echo "configure:4036: checking whether mmap with MAP_ANON(YMOUS) works" >&5
4036 if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
4037   echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039   # Add a system to this blacklist if it has mmap() and MAP_ANON or
4040    # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
4041    # doesn't give anonymous zeroed pages with the same properties listed
4042    # above for use of /dev/zero.
4043    # Systems known to be in this category are Windows, VMS, and SCO Unix.
4044    case "$host_os" in
4045      vms* | cygwin* | pe | mingw* | sco* | udk* )
4046         gcc_cv_func_mmap_anon=no ;;
4047      *)
4048         gcc_cv_func_mmap_anon=yes;;
4049    esac
4050 fi
4051
4052 echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6
4053    fi
4054 fi
4055
4056 if test $gcc_cv_func_mmap_file = yes; then
4057   cat >> confdefs.h <<\EOF
4058 #define HAVE_MMAP_FILE 1
4059 EOF
4060
4061 fi
4062 if test $gcc_cv_func_mmap_dev_zero = yes; then
4063   cat >> confdefs.h <<\EOF
4064 #define HAVE_MMAP_DEV_ZERO 1
4065 EOF
4066
4067 fi
4068 if test $gcc_cv_func_mmap_anon = yes; then
4069   cat >> confdefs.h <<\EOF
4070 #define HAVE_MMAP_ANON 1
4071 EOF
4072
4073 fi
4074
4075
4076 case "${host}" in
4077 *-*-uwin*)
4078   { echo "configure: error: 
4079 *** UWIN may not be used as a host platform because
4080 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4081   ;;
4082 *-*-*vms*)
4083   # Under VMS, vfork works very different than on Unix. The standard test 
4084   # won't work, and it isn't easily adaptable. It makes more sense to
4085   # just force it.
4086   ac_cv_func_vfork_works=yes
4087   ;;
4088 esac
4089 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4090 echo "configure:4091: checking for pid_t" >&5
4091 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 #include <sys/types.h>
4098 #if STDC_HEADERS
4099 #include <stdlib.h>
4100 #include <stddef.h>
4101 #endif
4102 EOF
4103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4104   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4105   rm -rf conftest*
4106   ac_cv_type_pid_t=yes
4107 else
4108   rm -rf conftest*
4109   ac_cv_type_pid_t=no
4110 fi
4111 rm -f conftest*
4112
4113 fi
4114 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4115 if test $ac_cv_type_pid_t = no; then
4116   cat >> confdefs.h <<\EOF
4117 #define pid_t int
4118 EOF
4119
4120 fi
4121
4122 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4123 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4124 echo "configure:4125: checking for vfork.h" >&5
4125 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 #include <vfork.h>
4132 EOF
4133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4134 { (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4136 if test -z "$ac_err"; then
4137   rm -rf conftest*
4138   eval "ac_cv_header_$ac_safe=yes"
4139 else
4140   echo "$ac_err" >&5
4141   echo "configure: failed program was:" >&5
4142   cat conftest.$ac_ext >&5
4143   rm -rf conftest*
4144   eval "ac_cv_header_$ac_safe=no"
4145 fi
4146 rm -f conftest*
4147 fi
4148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4149   echo "$ac_t""yes" 1>&6
4150   cat >> confdefs.h <<\EOF
4151 #define HAVE_VFORK_H 1
4152 EOF
4153
4154 else
4155   echo "$ac_t""no" 1>&6
4156 fi
4157
4158 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4159 echo "configure:4160: checking for working vfork" >&5
4160 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4161   echo $ac_n "(cached) $ac_c" 1>&6
4162 else
4163   if test "$cross_compiling" = yes; then
4164   echo $ac_n "checking for vfork""... $ac_c" 1>&6
4165 echo "configure:4166: checking for vfork" >&5
4166 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4167   echo $ac_n "(cached) $ac_c" 1>&6
4168 else
4169   cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 /* System header to define __stub macros and hopefully few prototypes,
4173     which can conflict with char vfork(); below.  */
4174 #include <assert.h>
4175 /* Override any gcc2 internal prototype to avoid an error.  */
4176 /* We use char because int might match the return type of a gcc2
4177     builtin and then its argument prototype would still apply.  */
4178 char vfork();
4179
4180 int main() {
4181
4182 /* The GNU C library defines this for functions which it implements
4183     to always fail with ENOSYS.  Some functions are actually named
4184     something starting with __ and the normal name is an alias.  */
4185 #if defined (__stub_vfork) || defined (__stub___vfork)
4186 choke me
4187 #else
4188 vfork();
4189 #endif
4190
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194   rm -rf conftest*
4195   eval "ac_cv_func_vfork=yes"
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_func_vfork=no"
4201 fi
4202 rm -f conftest*
4203 fi
4204
4205 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4206   echo "$ac_t""yes" 1>&6
4207   :
4208 else
4209   echo "$ac_t""no" 1>&6
4210 fi
4211
4212 ac_cv_func_vfork_works=$ac_cv_func_vfork
4213 else
4214   cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 /* Thanks to Paul Eggert for this test.  */
4218 #include <stdio.h>
4219 #include <sys/types.h>
4220 #include <sys/stat.h>
4221 #ifdef HAVE_UNISTD_H
4222 #include <unistd.h>
4223 #endif
4224 #ifdef HAVE_VFORK_H
4225 #include <vfork.h>
4226 #endif
4227 /* On some sparc systems, changes by the child to local and incoming
4228    argument registers are propagated back to the parent.
4229    The compiler is told about this with #include <vfork.h>,
4230    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4231    Test for this by using a static variable whose address
4232    is put into a register that is clobbered by the vfork.  */
4233 static
4234 #ifdef __cplusplus
4235 sparc_address_test (int arg)
4236 #else
4237 sparc_address_test (arg) int arg;
4238 #endif
4239 {
4240   static pid_t child;
4241   if (!child) {
4242     child = vfork ();
4243     if (child < 0) {
4244       perror ("vfork");
4245       _exit(2);
4246     }
4247     if (!child) {
4248       arg = getpid();
4249       write(-1, "", 0);
4250       _exit (arg);
4251     }
4252   }
4253 }
4254 main() {
4255   pid_t parent = getpid ();
4256   pid_t child;
4257
4258   sparc_address_test ();
4259
4260   child = vfork ();
4261
4262   if (child == 0) {
4263     /* Here is another test for sparc vfork register problems.
4264        This test uses lots of local variables, at least
4265        as many local variables as main has allocated so far
4266        including compiler temporaries.  4 locals are enough for
4267        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4268        A buggy compiler should reuse the register of parent
4269        for one of the local variables, since it will think that
4270        parent can't possibly be used any more in this routine.
4271        Assigning to the local variable will thus munge parent
4272        in the parent process.  */
4273     pid_t
4274       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4275       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4276     /* Convince the compiler that p..p7 are live; otherwise, it might
4277        use the same hardware register for all 8 local variables.  */
4278     if (p != p1 || p != p2 || p != p3 || p != p4
4279         || p != p5 || p != p6 || p != p7)
4280       _exit(1);
4281
4282     /* On some systems (e.g. IRIX 3.3),
4283        vfork doesn't separate parent from child file descriptors.
4284        If the child closes a descriptor before it execs or exits,
4285        this munges the parent's descriptor as well.
4286        Test for this by closing stdout in the child.  */
4287     _exit(close(fileno(stdout)) != 0);
4288   } else {
4289     int status;
4290     struct stat st;
4291
4292     while (wait(&status) != child)
4293       ;
4294     exit(
4295          /* Was there some problem with vforking?  */
4296          child < 0
4297
4298          /* Did the child fail?  (This shouldn't happen.)  */
4299          || status
4300
4301          /* Did the vfork/compiler bug occur?  */
4302          || parent != getpid()
4303
4304          /* Did the file descriptor bug occur?  */
4305          || fstat(fileno(stdout), &st) != 0
4306          );
4307   }
4308 }
4309 EOF
4310 if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4311 then
4312   ac_cv_func_vfork_works=yes
4313 else
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -fr conftest*
4317   ac_cv_func_vfork_works=no
4318 fi
4319 rm -fr conftest*
4320 fi
4321
4322 fi
4323
4324 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4325 if test $ac_cv_func_vfork_works = no; then
4326   cat >> confdefs.h <<\EOF
4327 #define vfork fork
4328 EOF
4329
4330 fi
4331
4332
4333
4334     
4335   am_cv_lib_iconv_ldpath=
4336   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4337 if test "${with_libiconv_prefix+set}" = set; then
4338   withval="$with_libiconv_prefix"
4339   
4340     for dir in `echo "$withval" | tr : ' '`; do
4341       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4342       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4343     done
4344    
4345 fi
4346
4347
4348   echo $ac_n "checking for iconv""... $ac_c" 1>&6
4349 echo "configure:4350: checking for iconv" >&5
4350 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   
4354     am_cv_func_iconv="no, consider installing GNU libiconv"
4355     am_cv_lib_iconv=no
4356     cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 #include <stdlib.h>
4360 #include <iconv.h>
4361 int main() {
4362 iconv_t cd = iconv_open("","");
4363        iconv(cd,NULL,NULL,NULL,NULL);
4364        iconv_close(cd);
4365 ; return 0; }
4366 EOF
4367 if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4368   rm -rf conftest*
4369   am_cv_func_iconv=yes
4370 else
4371   echo "configure: failed program was:" >&5
4372   cat conftest.$ac_ext >&5
4373 fi
4374 rm -f conftest*
4375     if test "$am_cv_func_iconv" != yes; then
4376       am_save_LIBS="$LIBS"
4377       LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4378       cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <stdlib.h>
4382 #include <iconv.h>
4383 int main() {
4384 iconv_t cd = iconv_open("","");
4385          iconv(cd,NULL,NULL,NULL,NULL);
4386          iconv_close(cd);
4387 ; return 0; }
4388 EOF
4389 if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4390   rm -rf conftest*
4391   am_cv_lib_iconv=yes
4392         am_cv_func_iconv=yes
4393 else
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396 fi
4397 rm -f conftest*
4398       LIBS="$am_save_LIBS"
4399     fi
4400   
4401 fi
4402
4403 echo "$ac_t""$am_cv_func_iconv" 1>&6
4404   if test "$am_cv_func_iconv" = yes; then
4405     cat >> confdefs.h <<\EOF
4406 #define HAVE_ICONV 1
4407 EOF
4408
4409     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4410 echo "configure:4411: checking for iconv declaration" >&5
4411     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   
4415       cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418
4419 #include <stdlib.h>
4420 #include <iconv.h>
4421 extern
4422 #ifdef __cplusplus
4423 "C"
4424 #endif
4425 #if defined(__STDC__) || defined(__cplusplus)
4426 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4427 #else
4428 size_t iconv();
4429 #endif
4430
4431 int main() {
4432
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4436   rm -rf conftest*
4437   am_cv_proto_iconv_arg1=""
4438 else
4439   echo "configure: failed program was:" >&5
4440   cat conftest.$ac_ext >&5
4441   rm -rf conftest*
4442   am_cv_proto_iconv_arg1="const"
4443 fi
4444 rm -f conftest*
4445       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);"
4446 fi
4447
4448     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4449     echo "$ac_t""${ac_t:-
4450          }$am_cv_proto_iconv" 1>&6
4451     cat >> confdefs.h <<EOF
4452 #define ICONV_CONST $am_cv_proto_iconv_arg1
4453 EOF
4454
4455   fi
4456   LIBICONV=
4457   if test "$am_cv_lib_iconv" = yes; then
4458     LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4459   fi
4460   
4461
4462 # Until we have in-tree GNU iconv:
4463 LIBICONV_DEP=
4464
4465
4466
4467   echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4468 echo "configure:4469: checking for LC_MESSAGES" >&5
4469 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <locale.h>
4476 int main() {
4477 return LC_MESSAGES
4478 ; return 0; }
4479 EOF
4480 if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4481   rm -rf conftest*
4482   am_cv_val_LC_MESSAGES=yes
4483 else
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486   rm -rf conftest*
4487   am_cv_val_LC_MESSAGES=no
4488 fi
4489 rm -f conftest*
4490 fi
4491
4492 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4493   if test $am_cv_val_LC_MESSAGES = yes; then
4494     cat >> confdefs.h <<\EOF
4495 #define HAVE_LC_MESSAGES 1
4496 EOF
4497
4498   fi
4499
4500
4501 # We will need to find libiberty.h and ansidecl.h
4502 saved_CFLAGS="$CFLAGS"
4503 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4504 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4505         strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4506         fprintf_unlocked strstr errno vasprintf \
4507         malloc realloc calloc free basename getopt clock
4508 do
4509   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4510 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4511 echo "configure:4512: checking whether $ac_func is declared" >&5
4512 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4513   echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515   cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 #undef $ac_tr_decl
4519 #define $ac_tr_decl 1
4520   
4521 #include "ansidecl.h"
4522 #include "system.h"
4523
4524 int main() {
4525 #ifndef $ac_func
4526 char *(*pfn) = (char *(*)) $ac_func ;
4527 #endif
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4531   rm -rf conftest*
4532   eval "gcc_cv_have_decl_$ac_func=yes"
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   eval "gcc_cv_have_decl_$ac_func=no"
4538 fi
4539 rm -f conftest*
4540 fi
4541
4542 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4543   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4544 #define $ac_tr_decl 1
4545 EOF
4546  
4547 else
4548   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4549 #define $ac_tr_decl 0
4550 EOF
4551  
4552 fi
4553
4554 done
4555 if test x = y ; then
4556   cat >> confdefs.h <<\EOF
4557 #define HAVE_DECL_GETENV 1
4558 EOF
4559  cat >> confdefs.h <<\EOF
4560 #define HAVE_DECL_ATOL 1
4561 EOF
4562  cat >> confdefs.h <<\EOF
4563 #define HAVE_DECL_SBRK 1
4564 EOF
4565  cat >> confdefs.h <<\EOF
4566 #define HAVE_DECL_ABORT 1
4567 EOF
4568  cat >> confdefs.h <<\EOF
4569 #define HAVE_DECL_ATOF 1
4570 EOF
4571  cat >> confdefs.h <<\EOF
4572 #define HAVE_DECL_GETCWD 1
4573 EOF
4574  cat >> confdefs.h <<\EOF
4575 #define HAVE_DECL_GETWD 1
4576 EOF
4577  \
4578         cat >> confdefs.h <<\EOF
4579 #define HAVE_DECL_STRSIGNAL 1
4580 EOF
4581  cat >> confdefs.h <<\EOF
4582 #define HAVE_DECL_PUTC_UNLOCKED 1
4583 EOF
4584  cat >> confdefs.h <<\EOF
4585 #define HAVE_DECL_FPUTS_UNLOCKED 1
4586 EOF
4587  cat >> confdefs.h <<\EOF
4588 #define HAVE_DECL_FWRITE_UNLOCKED 1
4589 EOF
4590  \
4591         cat >> confdefs.h <<\EOF
4592 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4593 EOF
4594  cat >> confdefs.h <<\EOF
4595 #define HAVE_DECL_STRSTR 1
4596 EOF
4597  cat >> confdefs.h <<\EOF
4598 #define HAVE_DECL_ERRNO 1
4599 EOF
4600  cat >> confdefs.h <<\EOF
4601 #define HAVE_DECL_VASPRINTF 1
4602 EOF
4603  \
4604         cat >> confdefs.h <<\EOF
4605 #define HAVE_DECL_MALLOC 1
4606 EOF
4607  cat >> confdefs.h <<\EOF
4608 #define HAVE_DECL_REALLOC 1
4609 EOF
4610  cat >> confdefs.h <<\EOF
4611 #define HAVE_DECL_CALLOC 1
4612 EOF
4613  cat >> confdefs.h <<\EOF
4614 #define HAVE_DECL_FREE 1
4615 EOF
4616  cat >> confdefs.h <<\EOF
4617 #define HAVE_DECL_BASENAME 1
4618 EOF
4619  cat >> confdefs.h <<\EOF
4620 #define HAVE_DECL_GETOPT 1
4621 EOF
4622  cat >> confdefs.h <<\EOF
4623 #define HAVE_DECL_CLOCK 1
4624 EOF
4625 fi
4626
4627
4628 for ac_func in getrlimit setrlimit getrusage
4629 do
4630   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4631 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4632 echo "configure:4633: checking whether $ac_func is declared" >&5
4633 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4634   echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4636   cat > conftest.$ac_ext <<EOF
4637 #line 4638 "configure"
4638 #include "confdefs.h"
4639 #undef $ac_tr_decl
4640 #define $ac_tr_decl 1
4641   
4642 #include "ansidecl.h"
4643 #include "system.h"
4644 #ifdef HAVE_SYS_RESOURCE_H
4645 #include <sys/resource.h>
4646 #endif
4647
4648
4649 int main() {
4650 #ifndef $ac_func
4651 char *(*pfn) = (char *(*)) $ac_func ;
4652 #endif
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656   rm -rf conftest*
4657   eval "gcc_cv_have_decl_$ac_func=yes"
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   eval "gcc_cv_have_decl_$ac_func=no"
4663 fi
4664 rm -f conftest*
4665 fi
4666
4667 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4668   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4669 #define $ac_tr_decl 1
4670 EOF
4671  
4672 else
4673   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4674 #define $ac_tr_decl 0
4675 EOF
4676  
4677 fi
4678
4679 done
4680 if test x = y ; then
4681   cat >> confdefs.h <<\EOF
4682 #define HAVE_DECL_GETRLIMIT 1
4683 EOF
4684  cat >> confdefs.h <<\EOF
4685 #define HAVE_DECL_SETRLIMIT 1
4686 EOF
4687  cat >> confdefs.h <<\EOF
4688 #define HAVE_DECL_GETRUSAGE 1
4689 EOF
4690 fi
4691
4692
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696
4697 #include "ansidecl.h"
4698 #include "system.h"
4699 #ifdef HAVE_SYS_RESOURCE_H
4700 #include <sys/resource.h>
4701 #endif
4702
4703 int main() {
4704 rlim_t l = 0;
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4708   :
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   cat >> confdefs.h <<\EOF
4714 #define rlim_t long
4715 EOF
4716
4717 fi
4718 rm -f conftest*
4719
4720 for ac_func in ldgetname
4721 do
4722   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4723 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4724 echo "configure:4725: checking whether $ac_func is declared" >&5
4725 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4726   echo $ac_n "(cached) $ac_c" 1>&6
4727 else
4728   cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731 #undef $ac_tr_decl
4732 #define $ac_tr_decl 1
4733   
4734 #include "ansidecl.h"
4735 #include "system.h"
4736 #ifdef HAVE_LDFCN_H
4737 #include <ldfcn.h>
4738 #endif
4739
4740
4741 int main() {
4742 #ifndef $ac_func
4743 char *(*pfn) = (char *(*)) $ac_func ;
4744 #endif
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4748   rm -rf conftest*
4749   eval "gcc_cv_have_decl_$ac_func=yes"
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "gcc_cv_have_decl_$ac_func=no"
4755 fi
4756 rm -f conftest*
4757 fi
4758
4759 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4760   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4761 #define $ac_tr_decl 1
4762 EOF
4763  
4764 else
4765   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4766 #define $ac_tr_decl 0
4767 EOF
4768  
4769 fi
4770
4771 done
4772 if test x = y ; then
4773   cat >> confdefs.h <<\EOF
4774 #define HAVE_DECL_LDGETNAME 1
4775 EOF
4776 fi
4777
4778
4779 for ac_func in times
4780 do
4781   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4782 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4783 echo "configure:4784: checking whether $ac_func is declared" >&5
4784 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #undef $ac_tr_decl
4791 #define $ac_tr_decl 1
4792   
4793 #include "ansidecl.h"
4794 #include "system.h"
4795 #ifdef HAVE_SYS_TIMES_H
4796 #include <sys/times.h>
4797 #endif
4798
4799
4800 int main() {
4801 #ifndef $ac_func
4802 char *(*pfn) = (char *(*)) $ac_func ;
4803 #endif
4804 ; return 0; }
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4807   rm -rf conftest*
4808   eval "gcc_cv_have_decl_$ac_func=yes"
4809 else
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "gcc_cv_have_decl_$ac_func=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817
4818 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4819   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4820 #define $ac_tr_decl 1
4821 EOF
4822  
4823 else
4824   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4825 #define $ac_tr_decl 0
4826 EOF
4827  
4828 fi
4829
4830 done
4831 if test x = y ; then
4832   cat >> confdefs.h <<\EOF
4833 #define HAVE_DECL_TIMES 1
4834 EOF
4835 fi
4836
4837
4838 # More time-related stuff.
4839 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4840 echo "configure:4841: checking for struct tms" >&5
4841 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4842   echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844   
4845 cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848
4849 #include "ansidecl.h"
4850 #include "system.h"
4851 #ifdef HAVE_SYS_TIMES_H
4852 #include <sys/times.h>
4853 #endif
4854
4855 int main() {
4856 struct tms tms;
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4860   rm -rf conftest*
4861   ac_cv_struct_tms=yes
4862 else
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   ac_cv_struct_tms=no
4867 fi
4868 rm -f conftest*
4869 fi
4870
4871 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4872 if test $ac_cv_struct_tms = yes; then
4873   cat >> confdefs.h <<\EOF
4874 #define HAVE_STRUCT_TMS 1
4875 EOF
4876
4877 fi
4878
4879 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4880 # revisit after autoconf 2.50.
4881 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4882 echo "configure:4883: checking for clock_t" >&5
4883 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4884   echo $ac_n "(cached) $ac_c" 1>&6
4885 else
4886   
4887 cat > conftest.$ac_ext <<EOF
4888 #line 4889 "configure"
4889 #include "confdefs.h"
4890
4891 #include "ansidecl.h"
4892 #include "system.h"
4893
4894 int main() {
4895 clock_t x;
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4899   rm -rf conftest*
4900   gcc_cv_type_clock_t=yes
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   gcc_cv_type_clock_t=no
4906 fi
4907 rm -f conftest*
4908 fi
4909
4910 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4911 if test $gcc_cv_type_clock_t = yes; then
4912   cat >> confdefs.h <<\EOF
4913 #define HAVE_CLOCK_T 1
4914 EOF
4915
4916 fi
4917
4918 echo $ac_n "checking for uchar""... $ac_c" 1>&6
4919 echo "configure:4920: checking for uchar" >&5
4920 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
4921   echo $ac_n "(cached) $ac_c" 1>&6
4922 else
4923   cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4926
4927 #include "ansidecl.h"
4928 #include "system.h"
4929
4930 int main() {
4931 if ((uchar *)0) return 0;
4932  if (sizeof(uchar)) return 0;
4933 ; return 0; }
4934 EOF
4935 if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4936   rm -rf conftest*
4937   ac_cv_type_uchar=yes
4938 else
4939   echo "configure: failed program was:" >&5
4940   cat conftest.$ac_ext >&5
4941   rm -rf conftest*
4942   ac_cv_type_uchar=no
4943 fi
4944 rm -f conftest*
4945 fi
4946
4947 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
4948 if test $ac_cv_type_uchar = yes; then
4949   cat >> confdefs.h <<\EOF
4950 #define HAVE_UCHAR 1
4951 EOF
4952
4953 fi
4954
4955 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4956 CFLAGS="$saved_CFLAGS"
4957
4958 # Check whether --enable-initfini-array or --disable-initfini-array was given.
4959 if test "${enable_initfini_array+set}" = set; then
4960   enableval="$enable_initfini_array"
4961   :
4962 else
4963   
4964 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
4965 echo "configure:4966: checking for .preinit_array/.init_array/.fini_array support" >&5
4966 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
4967   echo $ac_n "(cached) $ac_c" 1>&6
4968 else
4969     if test "$cross_compiling" = yes; then
4970   gcc_cv_initfini_array=no
4971 else
4972   cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975
4976 static int x = -1;
4977 int main (void) { return x; }
4978 int foo (void) { x = 0; }
4979 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4982 then
4983   gcc_cv_initfini_array=yes
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -fr conftest*
4988   gcc_cv_initfini_array=no
4989 fi
4990 rm -fr conftest*
4991 fi
4992
4993 fi
4994
4995 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
4996   enable_initfini_array=$gcc_cv_initfini_array
4997
4998 fi
4999
5000 if test $enable_initfini_array = yes; then
5001   cat >> confdefs.h <<\EOF
5002 #define HAVE_INITFINI_ARRAY 1
5003 EOF
5004
5005 fi
5006
5007 # mkdir takes a single argument on some systems. 
5008 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5009 echo "configure:5010: checking if mkdir takes one argument" >&5
5010 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5011   echo $ac_n "(cached) $ac_c" 1>&6
5012 else
5013   cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016
5017 #include <sys/types.h>
5018 #ifdef HAVE_SYS_STAT_H
5019 # include <sys/stat.h>
5020 #endif
5021 #ifdef HAVE_UNISTD_H
5022 # include <unistd.h>
5023 #endif
5024 #ifdef HAVE_DIRECT_H
5025 # include <direct.h>
5026 #endif
5027 int main() {
5028 mkdir ("foo", 0);
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5032   rm -rf conftest*
5033   gcc_cv_mkdir_takes_one_arg=no
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   gcc_cv_mkdir_takes_one_arg=yes
5039 fi
5040 rm -f conftest*
5041 fi
5042
5043 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5044 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5045   cat >> confdefs.h <<\EOF
5046 #define MKDIR_TAKES_ONE_ARG 1
5047 EOF
5048
5049 fi
5050
5051
5052 # File extensions
5053 manext='.1'
5054 objext='.o'
5055
5056
5057
5058 # With Setjmp/Longjmp based exception handling.
5059 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5060 if test "${enable_sjlj_exceptions+set}" = set; then
5061   enableval="$enable_sjlj_exceptions"
5062   sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5063 cat >> confdefs.h <<EOF
5064 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5065 EOF
5066
5067 fi
5068
5069
5070 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5071 echo "configure:5072: checking for main in -lunwind" >&5
5072 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5073 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076   ac_save_LIBS="$LIBS"
5077 LIBS="-lunwind  $LIBS"
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081
5082 int main() {
5083 main()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=no"
5094 fi
5095 rm -f conftest*
5096 LIBS="$ac_save_LIBS"
5097
5098 fi
5099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5100   echo "$ac_t""yes" 1>&6
5101   use_libunwind_default=yes
5102 else
5103   echo "$ac_t""no" 1>&6
5104 use_libunwind_default=no
5105 fi
5106
5107 # Use libunwind based exception handling.
5108 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5109 if test "${enable_libunwind_exceptions+set}" = set; then
5110   enableval="$enable_libunwind_exceptions"
5111   use_libunwind_exceptions=$enableval
5112 else
5113   use_libunwind_exceptions=$use_libunwind_default
5114 fi
5115
5116 if test x"$use_libunwind_exceptions" = xyes; then
5117    cat >> confdefs.h <<\EOF
5118 #define USE_LIBUNWIND_EXCEPTIONS 1
5119 EOF
5120
5121 fi
5122
5123 # --------------------------------------------------------
5124 # Build, host, and target specific configuration fragments
5125 # --------------------------------------------------------
5126
5127 # Collect build-machine-specific information.
5128 . ${srcdir}/config.build
5129
5130 # Collect host-machine-specific information.
5131 . ${srcdir}/config.host
5132
5133 target_gtfiles=
5134
5135 # Collect target-machine-specific information.
5136 for machine in $target ; do
5137         . ${srcdir}/config.gcc
5138 done
5139
5140 extra_objs="${host_extra_objs} ${extra_objs}"
5141
5142 # Default the target-machine variables that were not explicitly set.
5143 if test x"$tm_file" = x
5144 then tm_file=$cpu_type/$cpu_type.h; fi
5145
5146 if test x"$extra_headers" = x
5147 then extra_headers=; fi
5148
5149 if test x$md_file = x
5150 then md_file=$cpu_type/$cpu_type.md; fi
5151
5152 if test x$out_file = x
5153 then out_file=$cpu_type/$cpu_type.c; fi
5154
5155 if test x"$tmake_file" = x
5156 then tmake_file=$cpu_type/t-$cpu_type
5157 fi
5158
5159 if test x"$dwarf2" = xyes
5160 then tm_file="$tm_file tm-dwarf2.h"
5161 fi
5162
5163 # Say what files are being used for the output code and MD file.
5164 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5165 echo "Using \`$srcdir/config/$md_file' as machine description file."
5166
5167 # If any of the xm_file variables contain nonexistent files, warn
5168 # about them and drop them.
5169
5170 bx=
5171 for x in $build_xm_file; do
5172   if    test -f $srcdir/config/$x
5173   then      bx="$bx $x"
5174   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5175   fi
5176 done
5177 build_xm_file="$bx"
5178
5179 hx=
5180 for x in $host_xm_file; do
5181   if    test -f $srcdir/config/$x
5182   then      hx="$hx $x"
5183   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5184   fi
5185 done
5186 host_xm_file="$hx"
5187
5188 tx=
5189 for x in $xm_file; do
5190   if    test -f $srcdir/config/$x
5191   then      tx="$tx $x"
5192   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5193   fi
5194 done
5195 xm_file="$tx"
5196
5197 count=a
5198 for f in $tm_file; do
5199         count=${count}x
5200 done
5201 if test $count = ax; then
5202         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5203 else
5204         echo "Using the following target machine macro files:"
5205         for f in $tm_file; do
5206                 echo "  $srcdir/config/$f"
5207         done
5208 fi
5209
5210 if test x$need_64bit_hwint = xyes; then
5211         cat >> confdefs.h <<\EOF
5212 #define NEED_64BIT_HOST_WIDE_INT 1
5213 EOF
5214
5215 fi
5216
5217 count=a
5218 for f in $host_xm_file; do
5219         count=${count}x
5220 done
5221 if test $count = a; then
5222         :
5223 elif test $count = ax; then
5224         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5225 else
5226         echo "Using the following host machine macro files:"
5227         for f in $host_xm_file; do
5228                 echo "  $srcdir/config/$f"
5229         done
5230 fi
5231 echo "Using ${out_host_hook_obj} for host machine hooks."
5232
5233 if test "$host_xm_file" != "$build_xm_file"; then
5234         count=a
5235         for f in $build_xm_file; do
5236                 count=${count}x
5237         done
5238         if test $count = a; then
5239                 :
5240         elif test $count = ax; then
5241                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5242         else
5243                 echo "Using the following build machine macro files:"
5244                 for f in $build_xm_file; do
5245                         echo "  $srcdir/config/$f"
5246                 done
5247         fi
5248 fi
5249
5250 if test x$thread_file = x; then
5251         if test x$target_thread_file != x; then
5252                 thread_file=$target_thread_file
5253         else
5254                 thread_file='single'
5255         fi
5256 fi
5257
5258 if test x$enable___cxa_atexit = xyes || \
5259    test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5260   cat >> confdefs.h <<\EOF
5261 #define DEFAULT_USE_CXA_ATEXIT 1
5262 EOF
5263
5264 fi
5265
5266 # Look for a file containing extra machine modes.
5267 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5268   extra_modes_file='$(srcdir)'/config/${extra_modes}
5269   
5270   cat >> confdefs.h <<EOF
5271 #define EXTRA_MODES_FILE "config/$extra_modes"
5272 EOF
5273
5274   cat >> confdefs.h <<\EOF
5275 #define EXTRA_CC_MODES 1
5276 EOF
5277
5278 fi
5279
5280 # auto-host.h is the file containing items generated by autoconf and is
5281 # the first file included by config.h.
5282 # If host=build, it is correct to have bconfig include auto-host.h
5283 # as well.  If host!=build, we are in error and need to do more 
5284 # work to find out the build config parameters.
5285 if test x$host = x$build
5286 then
5287         build_auto=auto-host.h
5288         FORBUILD=..
5289 else
5290         # We create a subdir, then run autoconf in the subdir.
5291         # To prevent recursion we set host and build for the new
5292         # invocation of configure to the build for this invocation
5293         # of configure. 
5294         tempdir=build.$$
5295         rm -rf $tempdir
5296         mkdir $tempdir
5297         cd $tempdir
5298         case ${srcdir} in
5299         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5300         *) realsrcdir=../${srcdir};;
5301         esac
5302         saved_CFLAGS="${CFLAGS}"
5303         CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5304         ${realsrcdir}/configure \
5305                 --target=$target_alias --host=$build_alias --build=$build_alias
5306         CFLAGS="${saved_CFLAGS}"
5307
5308         # We just finished tests for the build machine, so rename
5309         # the file auto-build.h in the gcc directory.
5310         mv auto-host.h ../auto-build.h
5311         cd ..
5312         rm -rf $tempdir
5313         build_auto=auto-build.h
5314         FORBUILD=../${build_subdir}
5315 fi
5316
5317
5318 tm_file="${tm_file} defaults.h"
5319 tm_p_file="${tm_p_file} tm-preds.h"
5320 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5321 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5322 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5323 # put this back in temporarily.
5324 xm_file="ansidecl.h ${xm_file}"
5325
5326 # --------
5327 # UNSORTED
5328 # --------
5329
5330 # Get the version trigger filename from the toplevel
5331 if test "${with_gcc_version_trigger+set}" = set; then
5332         gcc_version_trigger=$with_gcc_version_trigger
5333 else
5334         gcc_version_trigger=${srcdir}/version.c
5335 fi
5336 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5337 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5338
5339 # Compile in configure arguments.
5340 if test -f configargs.h ; then
5341         # Being re-configured.
5342         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5343         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5344 else
5345         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5346 fi
5347
5348 # Double all backslashes and backslash all quotes to turn
5349 # gcc_config_arguments into a C string.
5350 sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
5351 $gcc_config_arguments
5352 EOF
5353 gcc_config_arguments_str=`cat conftest.out`
5354 rm -f conftest.out
5355
5356 cat > configargs.h <<EOF
5357 /* Generated automatically. */
5358 static const char configuration_arguments[] = "$gcc_config_arguments_str";
5359 static const char thread_model[] = "$thread_file";
5360
5361 static const struct {
5362   const char *name, *value;
5363 } configure_default_options[] = $configure_default_options;
5364 EOF
5365
5366 # Internationalization
5367 PACKAGE=gcc
5368 VERSION="$gcc_version"
5369
5370
5371
5372 # If we haven't got the data from the intl directory,
5373 # assume NLS is disabled.
5374 USE_NLS=no      
5375 LIBINTL=        
5376 LIBINTL_DEP=    
5377 INCINTL=        
5378 XGETTEXT=       
5379 GMSGFMT=        
5380 POSUB=          
5381 if test -f ../intl/config.intl; then
5382   . ../intl/config.intl
5383 fi
5384 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5385 echo "configure:5386: checking whether NLS is requested" >&5
5386 if test x"$USE_NLS" != xyes; then
5387   echo "$ac_t""no" 1>&6
5388 else
5389   echo "$ac_t""yes" 1>&6
5390   cat >> confdefs.h <<\EOF
5391 #define ENABLE_NLS 1
5392 EOF
5393
5394
5395   echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5396 echo "configure:5397: checking for catalogs to be installed" >&5
5397   # Look for .po and .gmo files in the source directory.
5398   CATALOGS=  
5399   XLINGUAS=
5400   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5401     # If there aren't any .gmo files the shell will give us the
5402     # literal string "../path/to/srcdir/po/*.gmo" which has to be
5403     # weeded out.
5404     case "$cat" in *\**)
5405       continue;;
5406     esac
5407     # The quadruple backslash is collapsed to a double backslash
5408     # by the backticks, then collapsed again by the double quotes,
5409     # leaving us with one backslash in the sed expression (right
5410     # before the dot that mustn't act as a wildcard).
5411     cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
5412     lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
5413     # The user is allowed to set LINGUAS to a list of languages to
5414     # install catalogs for.  If it's empty that means "all of them."
5415     if test "x$LINGUAS" = x; then
5416       CATALOGS="$CATALOGS $cat"
5417       XLINGUAS="$XLINGUAS $lang"
5418     else
5419       case "$LINGUAS" in *$lang*)
5420         CATALOGS="$CATALOGS $cat"
5421         XLINGUAS="$XLINGUAS $lang"
5422         ;;
5423       esac
5424     fi
5425   done
5426   LINGUAS="$XLINGUAS"
5427   echo "$ac_t""$LINGUAS" 1>&6
5428 fi
5429
5430 # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
5431 # -liconv on the link line twice.
5432 case "$LIBINTL" in *$LIBICONV*)
5433         LIBICONV= ;;
5434 esac
5435
5436 # Windows32 Registry support for specifying GCC installation paths.
5437 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5438 if test "${enable_win32_registry+set}" = set; then
5439   enableval="$enable_win32_registry"
5440   :
5441 fi
5442
5443 case $host_os in
5444         win32 | pe | cygwin* | mingw32* | uwin*)
5445 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5446 echo "configure:5447: checking whether windows registry support is requested" >&5
5447 if test "x$enable_win32_registry" != xno; then
5448   cat >> confdefs.h <<\EOF
5449 #define ENABLE_WIN32_REGISTRY 1
5450 EOF
5451
5452   echo "$ac_t""yes" 1>&6
5453   
5454 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
5455 echo "configure:5456: checking for library containing RegOpenKeyExA" >&5
5456 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
5457   echo $ac_n "(cached) $ac_c" 1>&6
5458 else
5459   ac_func_search_save_LIBS="$LIBS"
5460 ac_cv_search_RegOpenKeyExA="no"
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 /* Override any gcc2 internal prototype to avoid an error.  */
5465 /* We use char because int might match the return type of a gcc2
5466     builtin and then its argument prototype would still apply.  */
5467 char RegOpenKeyExA();
5468
5469 int main() {
5470 RegOpenKeyExA()
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5474   rm -rf conftest*
5475   ac_cv_search_RegOpenKeyExA="none required"
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479 fi
5480 rm -f conftest*
5481 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
5482 LIBS="-l$i  $ac_func_search_save_LIBS"
5483 cat > conftest.$ac_ext <<EOF
5484 #line 5485 "configure"
5485 #include "confdefs.h"
5486 /* Override any gcc2 internal prototype to avoid an error.  */
5487 /* We use char because int might match the return type of a gcc2
5488     builtin and then its argument prototype would still apply.  */
5489 char RegOpenKeyExA();
5490
5491 int main() {
5492 RegOpenKeyExA()
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496   rm -rf conftest*
5497   ac_cv_search_RegOpenKeyExA="-l$i"
5498 break
5499 else
5500   echo "configure: failed program was:" >&5
5501   cat conftest.$ac_ext >&5
5502 fi
5503 rm -f conftest*
5504 done
5505 LIBS="$ac_func_search_save_LIBS"
5506 fi
5507
5508 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
5509 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
5510   test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
5511   
5512 else :
5513   
5514 fi
5515 else
5516   echo "$ac_t""no" 1>&6
5517 fi
5518
5519 # Check if user specified a different registry key.
5520 case "x${enable_win32_registry}" in
5521 x | xyes)
5522   # default.
5523   gcc_cv_win32_registry_key="$VERSION"
5524   ;;
5525 xno)
5526   # no registry lookup.
5527   gcc_cv_win32_registry_key=''
5528   ;;
5529 *)
5530   # user-specified key.
5531   gcc_cv_win32_registry_key="$enable_win32_registry"
5532   ;;
5533 esac
5534
5535 if test "x$enable_win32_registry" != xno; then
5536   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
5537 echo "configure:5538: checking registry key on windows hosts" >&5
5538   cat >> confdefs.h <<EOF
5539 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
5540 EOF
5541
5542   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
5543 fi
5544 ;;
5545 esac
5546
5547 # Get an absolute path to the GCC top-level source directory
5548 holddir=`${PWDCMD-pwd}`
5549 cd $srcdir
5550 topdir=`${PWDCMD-pwd}`
5551 cd $holddir
5552
5553 # Conditionalize the makefile for this host machine.
5554 xmake_file=
5555 for f in ${host_xmake_file}
5556 do
5557         if test -f ${srcdir}/config/$f
5558         then
5559                 xmake_file="${xmake_file} \$(srcdir)/config/$f"
5560         fi
5561 done
5562
5563 # Conditionalize the makefile for this target machine.
5564 tmake_file_=
5565 for f in ${tmake_file}
5566 do
5567         if test -f ${srcdir}/config/$f
5568         then
5569                 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
5570         fi
5571 done
5572 tmake_file="${tmake_file_}"
5573
5574 symbolic_link='ln -s'
5575
5576 # If the host doesn't support symlinks, modify CC in
5577 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5578 # Otherwise, we can use "CC=$(CC)".
5579 rm -f symtest.tem
5580 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5581 then
5582         cc_set_by_configure="\$(CC)"
5583         quoted_cc_set_by_configure="\$(CC)"
5584         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5585         quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5586 else
5587         rm -f symtest.tem
5588         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5589         then
5590                 symbolic_link="cp -p"
5591         else
5592                 symbolic_link="cp"
5593         fi
5594         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5595         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
5596         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5597         quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
5598 fi
5599 rm -f symtest.tem
5600
5601 out_object_file=`basename $out_file .c`.o
5602
5603 tm_file_list=
5604 tm_include_list=
5605 for f in $tm_file; do
5606   case $f in
5607     defaults.h )
5608        tm_file_list="${tm_file_list} \$(srcdir)/$f"
5609        tm_include_list="${tm_include_list} $f"
5610        ;;
5611     * )
5612        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
5613        tm_include_list="${tm_include_list} config/$f"
5614        ;;
5615   esac
5616 done
5617
5618 tm_p_file_list=
5619 tm_p_include_list=
5620 for f in $tm_p_file; do
5621   case $f in
5622     tm-preds.h )
5623        tm_p_file_list="${tm_p_file_list} $f"
5624        tm_p_include_list="${tm_p_include_list} $f"
5625        ;;
5626     * )
5627        tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
5628        tm_p_include_list="${tm_p_include_list} config/$f"
5629   esac
5630 done
5631
5632 xm_file_list=
5633 xm_include_list=
5634 for f in $xm_file; do
5635   case $f in
5636     ansidecl.h )
5637        xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
5638        xm_include_list="${xm_include_list} $f"
5639        ;;
5640     auto-host.h )
5641        xm_file_list="${xm_file_list} $f"
5642        xm_include_list="${xm_include_list} $f"
5643        ;;
5644     * )
5645        xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
5646        xm_include_list="${xm_include_list} config/$f"
5647        ;;
5648   esac
5649 done
5650
5651 host_xm_file_list=
5652 host_xm_include_list=
5653 for f in $host_xm_file; do
5654   case $f in
5655     ansidecl.h )
5656        host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
5657        host_xm_include_list="${host_xm_include_list} $f"
5658        ;;
5659     auto-host.h )
5660        host_xm_file_list="${host_xm_file_list} $f"
5661        host_xm_include_list="${host_xm_include_list} $f"
5662        ;;
5663     * )
5664        host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
5665        host_xm_include_list="${host_xm_include_list} config/$f"
5666        ;;
5667   esac
5668 done
5669
5670 build_xm_file_list=
5671 for f in $build_xm_file; do
5672   case $f in
5673     ansidecl.h )
5674        build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
5675        build_xm_include_list="${build_xm_include_list} $f"
5676        ;;
5677     auto-build.h | auto-host.h )
5678        build_xm_file_list="${build_xm_file_list} $f"
5679        build_xm_include_list="${build_xm_include_list} $f"
5680        ;;
5681     * )
5682        build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
5683        build_xm_include_list="${build_xm_include_list} config/$f"
5684        ;;
5685   esac
5686 done
5687
5688 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
5689 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
5690 CROSS=                                          
5691 ALL=all.internal                                
5692 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' 
5693 if test x$host != x$target
5694 then
5695         CROSS="-DCROSS_COMPILE"
5696         ALL=all.cross
5697         SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
5698         case "$host","$target" in
5699         # Darwin crosses can use the host system's libraries and headers,
5700         # because of the fat library support.  Of course, it must be the
5701         # same version of Darwin on both sides.  Allow the user to
5702         # just say --target=foo-darwin without a version number to mean
5703         # "the version on this system".
5704             *-*-darwin*,*-*-darwin*)
5705                 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
5706                 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
5707                 if test $hostos = $targetos -o $targetos = darwin ; then
5708                     CROSS=
5709                     SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
5710                     with_headers=yes
5711                 fi
5712                 ;;
5713
5714             i?86-*-*,x86_64-*-* \
5715             | powerpc*-*-*,powerpc64*-*-*)
5716                 CROSS="$CROSS -DNATIVE_CROSS" ;;
5717         esac
5718 elif test "x$TARGET_SYSTEM_ROOT" != x; then
5719         # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
5720         SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
5721 fi
5722
5723 # If this is a cross-compiler that does not
5724 # have its own set of headers then define
5725 # inhibit_libc
5726
5727 # If this is using newlib, without having the headers available now,
5728 # then define inhibit_libc in LIBGCC2_CFLAGS.
5729 # This prevents libgcc2 from containing any code which requires libc
5730 # support.
5731 inhibit_libc=
5732 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
5733        test x$with_newlib = xyes ; } &&
5734      { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
5735        inhibit_libc=-Dinhibit_libc
5736 fi
5737
5738
5739 # When building gcc with a cross-compiler, we need to adjust things so
5740 # that the generator programs are still built with the native compiler.
5741 # Also, we cannot run fixincludes or fix-header.
5742
5743 # These are the normal (build=host) settings:
5744 BUILD_PREFIX=                   
5745 BUILD_PREFIX_1=ignore-          
5746 CC_FOR_BUILD='$(CC)'            
5747 BUILD_CFLAGS='$(ALL_CFLAGS)'    
5748
5749 STMP_FIXINC=stmp-fixinc         
5750
5751 # Possibly disable fixproto, on a per-target basis.
5752 case ${use_fixproto} in
5753   no)
5754     STMP_FIXPROTO=
5755     ;;
5756   yes)
5757     STMP_FIXPROTO=stmp-fixproto
5758     ;;
5759 esac
5760
5761
5762 # And these apply if build != host, or we are generating coverage data
5763 if test x$build != x$host || test "x$coverage_flags" != x
5764 then
5765     BUILD_PREFIX=build-
5766     BUILD_PREFIX_1=build-
5767     BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
5768
5769     if test "x$TARGET_SYSTEM_ROOT" = x; then
5770         STMP_FIXINC=
5771         STMP_FIXPROTO=
5772     fi
5773 fi
5774
5775 # Expand extra_headers to include complete path.
5776 # This substitutes for lots of t-* files.
5777 extra_headers_list=
5778 if test "x$extra_headers" = x
5779 then true
5780 else
5781         # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
5782         for file in $extra_headers;
5783         do
5784                 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
5785         done
5786 fi
5787
5788 # Add a definition of USE_COLLECT2 if system wants one.
5789 case $use_collect2 in
5790   no) use_collect2= ;;
5791   "") ;;
5792   *) 
5793     host_xm_defines="${host_xm_defines} USE_COLLECT2"
5794     xm_defines="${xm_defines} USE_COLLECT2"
5795     ;;
5796 esac
5797
5798 # Identify the assembler which will work hand-in-glove with the newly
5799 # built GCC, so that we can examine its features.  This is the assembler
5800 # which will be driven by the driver program.
5801 #
5802 # If build != host, and we aren't building gas in-tree, we identify a
5803 # build->target assembler and hope that it will have the same features
5804 # as the host->target assembler we'll be using.
5805 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
5806 echo "configure:5807: checking what assembler to use" >&5
5807 in_tree_gas=no
5808 gcc_cv_as=
5809 gcc_cv_gas_major_version=
5810 gcc_cv_gas_minor_version=
5811 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
5812 if test -x "$DEFAULT_ASSEMBLER"; then
5813         gcc_cv_as="$DEFAULT_ASSEMBLER"
5814 elif test -x "$AS"; then
5815         gcc_cv_as="$AS"
5816 elif test -x as$host_exeext; then
5817         # Build using assembler in the current directory.
5818         gcc_cv_as=./as$host_exeext
5819 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
5820      && test -f ../gas/Makefile; then
5821   # Single tree build which includes gas.
5822   in_tree_gas=yes
5823   gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
5824 for f in $gcc_cv_as_bfd_srcdir/configure \
5825          $gcc_cv_as_gas_srcdir/configure \
5826          $gcc_cv_as_gas_srcdir/configure.in \
5827          $gcc_cv_as_gas_srcdir/Makefile.in ; do
5828   gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5829   if test x$gcc_cv_gas_version != x; then
5830     break
5831   fi
5832 done
5833 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
5834 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5835 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5836 case $gcc_cv_gas_patch_version in
5837   "") gcc_cv_gas_patch_version="0" ;;
5838 esac
5839 gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
5840                             + $gcc_cv_gas_minor_version \) \* 1000 \
5841                             + $gcc_cv_gas_patch_version`
5842
5843   rm -f as$host_exeext
5844   $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5845   in_tree_gas_is_elf=no
5846   if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
5847      || (grep 'obj_format = multi' ../gas/Makefile \
5848          && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
5849   then
5850     in_tree_gas_is_elf=yes
5851   fi
5852 fi
5853
5854 if test "x$gcc_cv_as" = x; then
5855         # Search the same directories that the installed compiler will
5856         # search.  Else we may find the wrong assembler and lose.  If we
5857         # do not find a suitable assembler binary, then try the user's
5858         # path.
5859         #
5860         # Also note we have to check MD_EXEC_PREFIX before checking the
5861         # user's path.  Unfortunately, there is no good way to get at the
5862         # value of MD_EXEC_PREFIX here.  So we do a brute force search
5863         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
5864         # to be fixed as part of the make/configure rewrite too.
5865
5866         if test "x$exec_prefix" = xNONE; then
5867                 if test "x$prefix" = xNONE; then
5868                         test_prefix=/usr/local
5869                 else
5870                         test_prefix=$prefix
5871                 fi
5872         else
5873                 test_prefix=$exec_prefix
5874         fi
5875
5876         # If the loop below does not find an assembler, then use whatever
5877         # one we can find in the users's path.
5878         # user's path.
5879         if test "x$program_prefix" != xNONE; then
5880                 gcc_cv_as=${program_prefix}as$host_exeext
5881         else
5882                 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
5883         fi
5884
5885         test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
5886                    $test_prefix/lib/gcc-lib/$target_alias \
5887                    /usr/lib/gcc/$target_alias/$gcc_version \
5888                    /usr/lib/gcc/$target_alias \
5889                    $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
5890                    $test_prefix/$target_alias/bin"
5891
5892         if test x$host = x$target; then
5893             test_dirs="$test_dirs \
5894                    /usr/libexec \
5895                    /usr/ccs/gcc \
5896                    /usr/ccs/bin \
5897                    /udk/usr/ccs/bin \
5898                    /bsd43/usr/lib/cmplrs/cc \
5899                    /usr/cross64/usr/bin \
5900                    /usr/lib/cmplrs/cc \
5901                    /sysv/usr/lib/cmplrs/cc \
5902                    /svr4/usr/lib/cmplrs/cc \
5903                    /usr/bin"
5904         fi
5905
5906         for dir in $test_dirs; do
5907                 if test -x $dir/as$host_exeext; then
5908                         gcc_cv_as=$dir/as$host_exeext
5909                         break;
5910                 fi
5911         done
5912 fi
5913 case $in_tree_gas in
5914   yes)
5915     echo "$ac_t"""newly built gas"" 1>&6
5916     ;;
5917   no)
5918     echo "$ac_t""$gcc_cv_as" 1>&6
5919     ;;
5920 esac
5921
5922 # Identify the linker which will work hand-in-glove with the newly
5923 # built GCC, so that we can examine its features.  This is the linker
5924 # which will be driven by the driver program.
5925 #
5926 # If build != host, and we aren't building gas in-tree, we identify a
5927 # build->target linker and hope that it will have the same features
5928 # as the host->target linker we'll be using.
5929 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
5930 echo "configure:5931: checking what linker to use" >&5
5931 in_tree_ld=no
5932 gcc_cv_ld=
5933 gcc_cv_gld_major_version=
5934 gcc_cv_gld_minor_version=
5935 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
5936 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
5937 if test -x "$DEFAULT_LINKER"; then
5938         gcc_cv_ld="$DEFAULT_LINKER"
5939 elif test -x "$LD"; then
5940         gcc_cv_ld="$LD"
5941 elif test -x collect-ld$host_exeext; then
5942         # Build using linker in the current directory.
5943         gcc_cv_ld=./collect-ld$host_exeext
5944 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
5945      && test -f ../ld/Makefile; then
5946         # Single tree build which includes ld.
5947         in_tree_ld=yes
5948         in_tree_ld_is_elf=no
5949         if (grep 'EMUL = .*elf' ../ld/Makefile \
5950             || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
5951           in_tree_ld_is_elf=yes
5952         fi
5953         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
5954         do
5955                 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5956                 if test x$gcc_cv_gld_version != x; then
5957                         break
5958                 fi
5959         done
5960         gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
5961         gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5962         rm -f collect-ld$host_exeext
5963         $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
5964                 2>/dev/null
5965 fi
5966
5967 if test "x$gcc_cv_ld" = x; then
5968         # Search the same directories that the installed compiler will
5969         # search.  Else we may find the wrong linker and lose.  If we
5970         # do not find a suitable linker binary, then try the user's
5971         # path.
5972         #
5973         # Also note we have to check MD_EXEC_PREFIX before checking the
5974         # user's path.  Unfortunately, there is no good way to get at the
5975         # value of MD_EXEC_PREFIX here.  So we do a brute force search
5976         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
5977         # to be fixed as part of the make/configure rewrite too.
5978
5979         if test "x$exec_prefix" = xNONE; then
5980                 if test "x$prefix" = xNONE; then
5981                         test_prefix=/usr/local
5982                 else
5983                         test_prefix=$prefix
5984                 fi
5985         else
5986                 test_prefix=$exec_prefix
5987         fi
5988
5989         # If the loop below does not find an linker, then use whatever
5990         # one we can find in the users's path.
5991         # user's path.
5992         if test "x$program_prefix" != xNONE; then
5993                 gcc_cv_ld=${program_prefix}ld$host_exeext
5994         else
5995                 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
5996         fi
5997
5998         test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
5999                    $test_prefix/lib/gcc-lib/$target_alias \
6000                    /usr/lib/gcc/$target_alias/$gcc_version \
6001                    /usr/lib/gcc/$target_alias \
6002                    $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6003                    $test_prefix/$target_alias/bin"
6004
6005         if test x$host = x$target; then
6006             test_dirs="$test_dirs \
6007                    /usr/libexec \
6008                    /usr/ccs/gcc \
6009                    /usr/ccs/bin \
6010                    /udk/usr/ccs/bin \
6011                    /bsd43/usr/lib/cmplrs/cc \
6012                    /usr/cross64/usr/bin \
6013                    /usr/lib/cmplrs/cc \
6014                    /sysv/usr/lib/cmplrs/cc \
6015                    /svr4/usr/lib/cmplrs/cc \
6016                    /usr/bin"
6017         fi
6018
6019         for dir in $test_dirs; do
6020                 if test -x $dir/ld$host_exeext; then
6021                         gcc_cv_ld=$dir/ld$host_exeext
6022                         break;
6023                 fi
6024         done
6025 fi
6026 case $in_tree_ld in
6027   yes)
6028     echo "$ac_t"""newly built ld"" 1>&6
6029     ;;
6030   no)
6031     echo "$ac_t""$gcc_cv_ld" 1>&6
6032     ;;
6033 esac
6034
6035 # Figure out what nm we will be using.
6036 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
6037 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6038 echo "configure:6039: checking what nm to use" >&5
6039 in_tree_nm=no
6040 if test -x nm$host_exeext; then
6041         gcc_cv_nm=./nm$host_exeext
6042 elif test -f $gcc_cv_binutils_srcdir/configure.in \
6043      && test -f ../binutils/Makefile; then
6044         # Single tree build which includes binutils.
6045         in_tree_nm=yes
6046         gcc_cv_nm=./nm$host_exeext
6047         rm -f nm$host_exeext
6048         $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6049 elif test "x$program_prefix" != xNONE; then
6050         gcc_cv_nm=${program_prefix}nm$host_exeext
6051 else
6052         gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
6053 fi
6054 case $in_tree_nm in
6055   yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
6056   no)  echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
6057 esac
6058
6059 # Figure out what objdump we will be using.
6060 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
6061 echo "configure:6062: checking what objdump to use" >&5
6062 in_tree_objdump=no
6063 if test -x objdump$host_exeext; then
6064         gcc_cv_objdump=./objdump$host_exeext
6065 elif test -f $gcc_cv_binutils_srcdir/configure.in \
6066      && test -f ../binutils/Makefile; then
6067         # Single tree build which includes binutils.
6068         in_tree_objdump=yes
6069         gcc_cv_objdump=./objdump$host_exeext
6070         rm -f objdump$host_exeext
6071         $symbolic_link ../binutils/objdump$host_exeext \
6072                 objdump$host_exeext 2>/dev/null
6073 elif test "x$program_prefix" != xNONE; then
6074         gcc_cv_objdump=${program_prefix}objdump$host_exeext
6075 else
6076         gcc_cv_objdump=`echo objdump | \
6077                 sed ${program_transform_name}`$host_exeext
6078 fi
6079 case $in_tree_objdump in
6080   yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
6081   no)  echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
6082 esac
6083
6084 # Figure out what assembler alignment features are present.
6085 echo $ac_n "checking assembler for .balign and .p2align""... $ac_c" 1>&6
6086 echo "configure:6087: checking assembler for .balign and .p2align" >&5
6087 if eval "test \"`echo '$''{'gcc_cv_as_balign_and_p2align'+set}'`\" = set"; then
6088   echo $ac_n "(cached) $ac_c" 1>&6
6089 else
6090   gcc_cv_as_balign_and_p2align=no
6091     if test $in_tree_gas = yes; then
6092     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
6093   then gcc_cv_as_balign_and_p2align=yes
6094 fi
6095   elif test x$gcc_cv_as != x; then
6096     echo '.balign 4
6097 .p2align 2' > conftest.s
6098     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6099     then
6100         gcc_cv_as_balign_and_p2align=yes
6101     else
6102       echo "configure: failed program was" >&5
6103       cat conftest.s >&5
6104     fi
6105     rm -f conftest.o conftest.s
6106   fi
6107 fi
6108
6109 echo "$ac_t""$gcc_cv_as_balign_and_p2align" 1>&6
6110 if test $gcc_cv_as_balign_and_p2align = yes; then
6111   cat >> confdefs.h <<\EOF
6112 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6113 EOF
6114
6115 fi
6116
6117 echo $ac_n "checking assembler for .p2align with maximum skip""... $ac_c" 1>&6
6118 echo "configure:6119: checking assembler for .p2align with maximum skip" >&5
6119 if eval "test \"`echo '$''{'gcc_cv_as_max_skip_p2align'+set}'`\" = set"; then
6120   echo $ac_n "(cached) $ac_c" 1>&6
6121 else
6122   gcc_cv_as_max_skip_p2align=no
6123     if test $in_tree_gas = yes; then
6124     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
6125   then gcc_cv_as_max_skip_p2align=yes
6126 fi
6127   elif test x$gcc_cv_as != x; then
6128     echo '.p2align 4,,7' > conftest.s
6129     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6130     then
6131         gcc_cv_as_max_skip_p2align=yes
6132     else
6133       echo "configure: failed program was" >&5
6134       cat conftest.s >&5
6135     fi
6136     rm -f conftest.o conftest.s
6137   fi
6138 fi
6139
6140 echo "$ac_t""$gcc_cv_as_max_skip_p2align" 1>&6
6141 if test $gcc_cv_as_max_skip_p2align = yes; then
6142   cat >> confdefs.h <<\EOF
6143 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6144 EOF
6145
6146 fi
6147
6148 echo $ac_n "checking assembler for working .subsection -1""... $ac_c" 1>&6
6149 echo "configure:6150: checking assembler for working .subsection -1" >&5
6150 if eval "test \"`echo '$''{'gcc_cv_as_subsection_m1'+set}'`\" = set"; then
6151   echo $ac_n "(cached) $ac_c" 1>&6
6152 else
6153   gcc_cv_as_subsection_m1=no
6154     if test $in_tree_gas = yes; then
6155     if test $in_tree_gas_is_elf = yes \
6156   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
6157   then gcc_cv_as_subsection_m1=yes
6158 fi
6159   elif test x$gcc_cv_as != x; then
6160     echo 'conftest_label1: .word 0
6161 .subsection -1
6162 conftest_label2: .word 0
6163 .previous' > conftest.s
6164     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6165     then
6166         if test x$gcc_cv_nm != x; then
6167     $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6168     $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6169     if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
6170     then :
6171     else gcc_cv_as_subsection_m1=yes
6172     fi
6173     rm -f conftest.nm1 conftest.nm2
6174   fi
6175     else
6176       echo "configure: failed program was" >&5
6177       cat conftest.s >&5
6178     fi
6179     rm -f conftest.o conftest.s
6180   fi
6181 fi
6182
6183 echo "$ac_t""$gcc_cv_as_subsection_m1" 1>&6
6184 if test $gcc_cv_as_subsection_m1 = yes; then
6185   cat >> confdefs.h <<\EOF
6186 #define HAVE_GAS_SUBSECTION_ORDERING 1
6187 EOF
6188
6189 fi
6190
6191 echo $ac_n "checking assembler for .weak""... $ac_c" 1>&6
6192 echo "configure:6193: checking assembler for .weak" >&5
6193 if eval "test \"`echo '$''{'gcc_cv_as_weak'+set}'`\" = set"; then
6194   echo $ac_n "(cached) $ac_c" 1>&6
6195 else
6196   gcc_cv_as_weak=no
6197     if test $in_tree_gas = yes; then
6198     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
6199   then gcc_cv_as_weak=yes
6200 fi
6201   elif test x$gcc_cv_as != x; then
6202     echo '      .weak foobar' > conftest.s
6203     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6204     then
6205         gcc_cv_as_weak=yes
6206     else
6207       echo "configure: failed program was" >&5
6208       cat conftest.s >&5
6209     fi
6210     rm -f conftest.o conftest.s
6211   fi
6212 fi
6213
6214 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6215 if test $gcc_cv_as_weak = yes; then
6216   cat >> confdefs.h <<\EOF
6217 #define HAVE_GAS_WEAK 1
6218 EOF
6219
6220 fi
6221
6222 # .hidden needs to be supported in both the assembler and the linker,
6223 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
6224 # This is irritatingly difficult to feature test for; we have to check the
6225 # date string after the version number.  If we've got an in-tree
6226 # ld, we don't know its patchlevel version, so we set the baseline at 2.13
6227 # to be safe.
6228 # The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
6229 echo $ac_n "checking assembler for .hidden""... $ac_c" 1>&6
6230 echo "configure:6231: checking assembler for .hidden" >&5
6231 if eval "test \"`echo '$''{'gcc_cv_as_hidden'+set}'`\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   gcc_cv_as_hidden=no
6235     if test $in_tree_gas = yes; then
6236     if test $in_tree_gas_is_elf = yes \
6237   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
6238   then gcc_cv_as_hidden=yes
6239 fi
6240   elif test x$gcc_cv_as != x; then
6241     echo '      .hidden foobar
6242 foobar:' > conftest.s
6243     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6244     then
6245         gcc_cv_as_hidden=yes
6246     else
6247       echo "configure: failed program was" >&5
6248       cat conftest.s >&5
6249     fi
6250     rm -f conftest.o conftest.s
6251   fi
6252 fi
6253
6254 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6255
6256
6257 echo $ac_n "checking linker for .hidden support""... $ac_c" 1>&6
6258 echo "configure:6259: checking linker for .hidden support" >&5
6259 if eval "test \"`echo '$''{'gcc_cv_ld_hidden'+set}'`\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   if test $in_tree_ld = yes ; then
6263   gcc_cv_ld_hidden=no
6264   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 \
6265      && test $in_tree_ld_is_elf = yes; then
6266      gcc_cv_ld_hidden=yes
6267   fi
6268 else
6269   gcc_cv_ld_hidden=yes
6270   ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
6271   if echo "$ld_ver" | grep GNU > /dev/null; then
6272     ld_vers=`echo $ld_ver | sed -n \
6273         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6274         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6275         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
6276         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)[  ].*$,\1,p' \
6277         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[     ].*$,\1,p' \
6278         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[        ].*$,\1,p'`
6279     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'`
6280     if test 0"$ld_date" -lt 20020404; then
6281       if test -n "$ld_date"; then
6282         # If there was date string, but was earlier than 2002-04-04, fail
6283         gcc_cv_ld_hidden=no
6284       elif test -z "$ld_vers"; then
6285         # If there was no date string nor ld version number, something is wrong
6286         gcc_cv_ld_hidden=no
6287       else
6288         ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
6289         ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
6290         ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
6291         test -z "$ld_vers_patch" && ld_vers_patch=0
6292         if test "$ld_vers_major" -lt 2; then
6293           gcc_cv_ld_hidden=no
6294         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
6295           gcc_cv_ld_hidden="no"
6296         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
6297           gcc_cv_ld_hidden=no
6298         fi
6299       fi
6300     fi
6301   else
6302     # non-GNU linkers don't seem to support .hidden yet
6303     gcc_cv_ld_hidden=no
6304   fi
6305 fi
6306 fi
6307
6308 echo "$ac_t""$gcc_cv_ld_hidden" 1>&6
6309 libgcc_visibility=no
6310
6311 if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
6312   libgcc_visibility=yes
6313   cat >> confdefs.h <<\EOF
6314 #define HAVE_GAS_HIDDEN 1
6315 EOF
6316
6317 fi
6318
6319 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6320 echo $ac_n "checking assembler for .sleb128 and .uleb128""... $ac_c" 1>&6
6321 echo "configure:6322: checking assembler for .sleb128 and .uleb128" >&5
6322 if eval "test \"`echo '$''{'gcc_cv_as_leb128'+set}'`\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   gcc_cv_as_leb128=no
6326     if test $in_tree_gas = yes; then
6327     if test $in_tree_gas_is_elf = yes \
6328   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
6329   then gcc_cv_as_leb128=yes
6330 fi
6331   elif test x$gcc_cv_as != x; then
6332     echo '      .data
6333         .uleb128 L2 - L1
6334 L1:
6335         .uleb128 1280
6336         .sleb128 -1010
6337 L2:' > conftest.s
6338     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6339     then
6340         # GAS versions before 2.11 do not support uleb128,
6341   # despite appearing to.
6342   # ??? There exists an elf-specific test that will crash
6343   # the assembler.  Perhaps it's better to figure out whether
6344   # arbitrary sections are supported and try the test.
6345   as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
6346   if echo "$as_ver" | grep GNU > /dev/null; then
6347     as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
6348     as_major=`echo $as_ver | sed 's/\..*//'`
6349     as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6350     if test $as_major -eq 2 && test $as_minor -lt 11
6351     then :
6352     else gcc_cv_as_leb128=yes
6353     fi
6354   fi
6355     else
6356       echo "configure: failed program was" >&5
6357       cat conftest.s >&5
6358     fi
6359     rm -f conftest.o conftest.s
6360   fi
6361 fi
6362
6363 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6364 if test $gcc_cv_as_leb128 = yes; then
6365   cat >> confdefs.h <<\EOF
6366 #define HAVE_AS_LEB128 1
6367 EOF
6368
6369 fi
6370
6371 # GAS versions up to and including 2.11.0 may mis-optimize
6372 # .eh_frame data.
6373 echo $ac_n "checking assembler for eh_frame optimization""... $ac_c" 1>&6
6374 echo "configure:6375: checking assembler for eh_frame optimization" >&5
6375 if eval "test \"`echo '$''{'gcc_cv_as_eh_frame'+set}'`\" = set"; then
6376   echo $ac_n "(cached) $ac_c" 1>&6
6377 else
6378   gcc_cv_as_eh_frame=no
6379     if test $in_tree_gas = yes; then
6380     if test $in_tree_gas_is_elf = yes \
6381   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6382   then gcc_cv_as_eh_frame=yes
6383 fi
6384   elif test x$gcc_cv_as != x; then
6385     echo '      .text
6386 .LFB1:
6387         .4byte  0
6388 .L1:
6389         .4byte  0
6390 .LFE1:
6391         .section        .eh_frame,"aw",@progbits
6392 __FRAME_BEGIN__:
6393         .4byte  .LECIE1-.LSCIE1
6394 .LSCIE1:
6395         .4byte  0x0
6396         .byte   0x1
6397         .ascii "z\0"
6398         .byte   0x1
6399         .byte   0x78
6400         .byte   0x1a
6401         .byte   0x0
6402         .byte   0x4
6403         .4byte  1
6404         .p2align 1
6405 .LECIE1:
6406 .LSFDE1:
6407         .4byte  .LEFDE1-.LASFDE1
6408 .LASFDE1:
6409         .4byte  .LASFDE1-__FRAME_BEGIN__
6410         .4byte  .LFB1
6411         .4byte  .LFE1-.LFB1
6412         .byte   0x4
6413         .4byte  .LFE1-.LFB1
6414         .byte   0x4
6415         .4byte  .L1-.LFB1
6416 .LEFDE1:' > conftest.s
6417     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6418     then
6419           cat > conftest.lit <<EOF
6420  0000 10000000 00000000 017a0001 781a0004  .........z..x...
6421  0010 01000000 12000000 18000000 00000000  ................
6422  0020 08000000 04080000 0044               .........D      
6423 EOF
6424   cat > conftest.big <<EOF
6425  0000 00000010 00000000 017a0001 781a0004  .........z..x...
6426  0010 00000001 00000012 00000018 00000000  ................
6427  0020 00000008 04000000 0844               .........D      
6428 EOF
6429   # If the assembler didn't choke, and we can objdump,
6430   # and we got the correct data, then succeed.
6431   if test x$gcc_cv_objdump != x \
6432   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
6433      | tail -3 > conftest.got \
6434   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
6435     || cmp conftest.big conftest.got > /dev/null 2>&1; }
6436   then
6437     gcc_cv_as_eh_frame=yes
6438   elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'; { (eval echo configure:6439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
6439     gcc_cv_as_eh_frame=buggy
6440   else
6441     # Uh oh, what do we do now?
6442     gcc_cv_as_eh_frame=no
6443   fi
6444     else
6445       echo "configure: failed program was" >&5
6446       cat conftest.s >&5
6447     fi
6448     rm -f conftest.o conftest.s
6449   fi
6450 fi
6451
6452 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
6453
6454
6455 if test $gcc_cv_as_eh_frame = buggy; then
6456   cat >> confdefs.h <<\EOF
6457 #define USE_AS_TRADITIONAL_FORMAT 1
6458 EOF
6459
6460 fi
6461
6462 echo $ac_n "checking assembler for section merging support""... $ac_c" 1>&6
6463 echo "configure:6464: checking assembler for section merging support" >&5
6464 if eval "test \"`echo '$''{'gcc_cv_as_shf_merge'+set}'`\" = set"; then
6465   echo $ac_n "(cached) $ac_c" 1>&6
6466 else
6467   gcc_cv_as_shf_merge=no
6468     if test $in_tree_gas = yes; then
6469     if test $in_tree_gas_is_elf = yes \
6470   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6471   then gcc_cv_as_shf_merge=yes
6472 fi
6473   elif test x$gcc_cv_as != x; then
6474     echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
6475     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6476     then
6477         gcc_cv_as_shf_merge=yes
6478     else
6479       echo "configure: failed program was" >&5
6480       cat conftest.s >&5
6481     fi
6482     rm -f conftest.o conftest.s
6483   fi
6484 fi
6485
6486 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
6487
6488 cat >> confdefs.h <<EOF
6489 #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
6490 EOF
6491
6492
6493 # Thread-local storage - the check is heavily parametrized.
6494 conftest_s=
6495 tls_first_major=
6496 tls_first_minor=
6497 tls_as_opt=
6498 case "$target" in
6499   alpha*-*-*)
6500     conftest_s='
6501         .section ".tdata","awT",@progbits
6502 foo:    .long   25
6503         .text
6504         ldq     $27,__tls_get_addr($29)         !literal!1
6505         lda     $16,foo($29)                    !tlsgd!1
6506         jsr     $26,($27),__tls_get_addr        !lituse_tlsgd!1
6507         ldq     $27,__tls_get_addr($29)         !literal!2
6508         lda     $16,foo($29)                    !tlsldm!2
6509         jsr     $26,($27),__tls_get_addr        !lituse_tlsldm!2
6510         ldq     $1,foo($29)                     !gotdtprel
6511         ldah    $2,foo($29)                     !dtprelhi
6512         lda     $3,foo($2)                      !dtprello
6513         lda     $4,foo($29)                     !dtprel
6514         ldq     $1,foo($29)                     !gottprel
6515         ldah    $2,foo($29)                     !tprelhi
6516         lda     $3,foo($2)                      !tprello
6517         lda     $4,foo($29)                     !tprel'
6518         tls_first_major=2
6519         tls_first_minor=13
6520         ;;
6521   i[34567]86-*-*)
6522     conftest_s='
6523         .section ".tdata","awT",@progbits
6524 foo:    .long   25
6525         .text
6526         movl    %gs:0, %eax
6527         leal    foo@TLSGD(,%ebx,1), %eax
6528         leal    foo@TLSLDM(%ebx), %eax
6529         leal    foo@DTPOFF(%eax), %edx
6530         movl    foo@GOTTPOFF(%ebx), %eax
6531         subl    foo@GOTTPOFF(%ebx), %eax
6532         addl    foo@GOTNTPOFF(%ebx), %eax
6533         movl    foo@INDNTPOFF, %eax
6534         movl    $foo@TPOFF, %eax
6535         subl    $foo@TPOFF, %eax
6536         leal    foo@NTPOFF(%ecx), %eax'
6537         tls_first_major=2
6538         tls_first_minor=14
6539         ;;
6540   x86_64-*-*)
6541     conftest_s='
6542         .section ".tdata","awT",@progbits
6543 foo:    .long   25
6544         .text
6545         movq    %fs:0, %rax
6546         leaq    foo@TLSGD(%rip), %rdi
6547         leaq    foo@TLSLD(%rip), %rdi
6548         leaq    foo@DTPOFF(%rax), %rdx
6549         movq    foo@GOTTPOFF(%rip), %rax
6550         movq    $foo@TPOFF, %rax'
6551         tls_first_major=2
6552         tls_first_minor=14
6553         ;;
6554   ia64-*-*)
6555     conftest_s='
6556         .section ".tdata","awT",@progbits
6557 foo:    data8   25
6558         .text
6559         addl    r16 = @ltoff(@dtpmod(foo#)), gp
6560         addl    r17 = @ltoff(@dtprel(foo#)), gp
6561         addl    r18 = @ltoff(@tprel(foo#)), gp
6562         addl    r19 = @dtprel(foo#), gp
6563         adds    r21 = @dtprel(foo#), r13
6564         movl    r23 = @dtprel(foo#)
6565         addl    r20 = @tprel(foo#), gp
6566         adds    r22 = @tprel(foo#), r13
6567         movl    r24 = @tprel(foo#)'
6568         tls_first_major=2
6569         tls_first_minor=13
6570         ;;
6571   powerpc-*-*)
6572     conftest_s='
6573         .section ".tdata","awT",@progbits
6574         .align 2
6575 ld0:    .space 4
6576 ld1:    .space 4
6577 x1:     .space 4
6578 x2:     .space 4
6579 x3:     .space 4
6580         .text
6581         addi 3,31,ld0@got@tlsgd
6582         bl __tls_get_addr
6583         addi 3,31,x1@got@tlsld
6584         bl __tls_get_addr
6585         addi 9,3,x1@dtprel
6586         addis 9,3,x2@dtprel@ha
6587         addi 9,9,x2@dtprel@l
6588         lwz 9,x3@got@tprel(31)
6589         add 9,9,x@tls
6590         addi 9,2,x1@tprel
6591         addis 9,2,x2@tprel@ha
6592         addi 9,9,x2@tprel@l'
6593         tls_first_major=2
6594         tls_first_minor=14
6595         tls_as_opt=-a32
6596         ;;
6597   powerpc64-*-*)
6598     conftest_s='
6599         .section ".tdata","awT",@progbits
6600         .align 3
6601 ld0:    .space 8
6602 ld1:    .space 8
6603 x1:     .space 8
6604 x2:     .space 8
6605 x3:     .space 8
6606         .text
6607         addi 3,2,ld0@got@tlsgd
6608         bl .__tls_get_addr
6609         nop
6610         addi 3,2,ld1@toc
6611         bl .__tls_get_addr
6612         nop
6613         addi 3,2,x1@got@tlsld
6614         bl .__tls_get_addr
6615         nop
6616         addi 9,3,x1@dtprel
6617         bl .__tls_get_addr
6618         nop
6619         addis 9,3,x2@dtprel@ha
6620         addi 9,9,x2@dtprel@l
6621         bl .__tls_get_addr
6622         nop
6623         ld 9,x3@got@dtprel(2)
6624         add 9,9,3
6625         bl .__tls_get_addr
6626         nop'
6627         tls_first_major=2
6628         tls_first_minor=14
6629         tls_as_opt=-a64
6630         ;;
6631   s390-*-*)
6632     conftest_s='
6633         .section ".tdata","awT",@progbits
6634 foo:    .long   25
6635         .text
6636         .long   foo@TLSGD
6637         .long   foo@TLSLDM
6638         .long   foo@DTPOFF
6639         .long   foo@NTPOFF
6640         .long   foo@GOTNTPOFF
6641         .long   foo@INDNTPOFF
6642         l       %r1,foo@GOTNTPOFF(%r12)
6643         l       %r1,0(%r1):tls_load:foo
6644         bas     %r14,0(%r1,%r13):tls_gdcall:foo
6645         bas     %r14,0(%r1,%r13):tls_ldcall:foo'
6646         tls_first_major=2
6647         tls_first_minor=14
6648         tls_as_opt=-m31
6649         ;;
6650   s390x-*-*)
6651     conftest_s='
6652         .section ".tdata","awT",@progbits
6653 foo:    .long   25
6654         .text
6655         .quad   foo@TLSGD
6656         .quad   foo@TLSLDM
6657         .quad   foo@DTPOFF
6658         .quad   foo@NTPOFF
6659         .quad   foo@GOTNTPOFF
6660         lg      %r1,foo@GOTNTPOFF(%r12)
6661         larl    %r1,foo@INDNTPOFF
6662         brasl   %r14,__tls_get_offset@PLT:tls_gdcall:foo
6663         brasl   %r14,__tls_get_offset@PLT:tls_ldcall:foo'
6664         tls_first_major=2
6665         tls_first_minor=14
6666         tls_as_opt="-m64 -Aesame"
6667         ;;
6668   sparc*-*-*)
6669     conftest_s='
6670         .section ".tdata","awT",@progbits
6671 foo:    .long   25
6672         .text
6673         sethi   %tgd_hi22(foo), %o0
6674         add     %o0, %tgd_lo10(foo), %o1
6675         add     %l7, %o1, %o0, %tgd_add(foo)
6676         call    __tls_get_addr, %tgd_call(foo)
6677         sethi   %tldm_hi22(foo), %l1
6678         add     %l1, %tldm_lo10(foo), %l2
6679         add     %l7, %l2, %o0, %tldm_add(foo)
6680         call    __tls_get_addr, %tldm_call(foo)
6681         sethi   %tldo_hix22(foo), %l3
6682         xor     %l3, %tldo_lox10(foo), %l4
6683         add     %o0, %l4, %l5, %tldo_add(foo)
6684         sethi   %tie_hi22(foo), %o3
6685         add     %o3, %tie_lo10(foo), %o3
6686         ld      [%l7 + %o3], %o2, %tie_ld(foo)
6687         add     %g7, %o2, %o4, %tie_add(foo)
6688         sethi   %tle_hix22(foo), %l1
6689         xor     %l1, %tle_lox10(foo), %o5
6690         ld      [%g7 + %o5], %o1'
6691         tls_first_major=2
6692         tls_first_minor=14
6693         tls_as_opt=-32
6694         ;;
6695 esac
6696 if test -z "$tls_first_major"; then
6697   : # If we don't have a check, assume no support.
6698 else
6699   echo $ac_n "checking assembler for thread-local storage support""... $ac_c" 1>&6
6700 echo "configure:6701: checking assembler for thread-local storage support" >&5
6701 if eval "test \"`echo '$''{'gcc_cv_as_tls'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   gcc_cv_as_tls=no
6705     if test $in_tree_gas = yes; then
6706     if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
6707   then gcc_cv_as_tls=yes
6708 fi
6709   elif test x$gcc_cv_as != x; then
6710     echo "$conftest_s" > conftest.s
6711     if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6712     then
6713         gcc_cv_as_tls=yes
6714     else
6715       echo "configure: failed program was" >&5
6716       cat conftest.s >&5
6717     fi
6718     rm -f conftest.o conftest.s
6719   fi
6720 fi
6721
6722 echo "$ac_t""$gcc_cv_as_tls" 1>&6
6723 if test $gcc_cv_as_tls = yes; then
6724   cat >> confdefs.h <<\EOF
6725 #define HAVE_AS_TLS 1
6726 EOF
6727
6728 fi
6729 fi
6730
6731 # Target-specific assembler checks.
6732
6733 case "$target" in
6734   # All TARGET_ABI_OSF targets.
6735   alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
6736     echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
6737 echo "configure:6738: checking assembler for explicit relocation support" >&5
6738 if eval "test \"`echo '$''{'gcc_cv_as_alpha_explicit_relocs'+set}'`\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   gcc_cv_as_alpha_explicit_relocs=no
6742     if test $in_tree_gas = yes; then
6743     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
6744   then gcc_cv_as_alpha_explicit_relocs=yes
6745 fi
6746   elif test x$gcc_cv_as != x; then
6747     echo '      .set nomacro
6748         .text
6749         extbl   $3, $2, $3      !lituse_bytoff!1
6750         ldq     $2, a($29)      !literal!1
6751         ldq     $4, b($29)      !literal!2
6752         ldq_u   $3, 0($2)       !lituse_base!1
6753         ldq     $27, f($29)     !literal!5
6754         jsr     $26, ($27), f   !lituse_jsr!5
6755         ldah    $29, 0($26)     !gpdisp!3
6756         lda     $0, c($29)      !gprel
6757         ldah    $1, d($29)      !gprelhigh
6758         lda     $1, d($1)       !gprellow
6759         lda     $29, 0($29)     !gpdisp!3' > conftest.s
6760     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6761     then
6762         gcc_cv_as_alpha_explicit_relocs=yes
6763     else
6764       echo "configure: failed program was" >&5
6765       cat conftest.s >&5
6766     fi
6767     rm -f conftest.o conftest.s
6768   fi
6769 fi
6770
6771 echo "$ac_t""$gcc_cv_as_alpha_explicit_relocs" 1>&6
6772 if test $gcc_cv_as_alpha_explicit_relocs = yes; then
6773   cat >> confdefs.h <<\EOF
6774 #define HAVE_AS_EXPLICIT_RELOCS 1
6775 EOF
6776
6777 fi
6778     ;;
6779
6780   sparc*-*-*)
6781     echo $ac_n "checking assembler for .register""... $ac_c" 1>&6
6782 echo "configure:6783: checking assembler for .register" >&5
6783 if eval "test \"`echo '$''{'gcc_cv_as_sparc_register_op'+set}'`\" = set"; then
6784   echo $ac_n "(cached) $ac_c" 1>&6
6785 else
6786   gcc_cv_as_sparc_register_op=no
6787   if test x$gcc_cv_as != x; then
6788     echo '.register %g2, #scratch' > conftest.s
6789     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6790     then
6791         gcc_cv_as_sparc_register_op=yes
6792     else
6793       echo "configure: failed program was" >&5
6794       cat conftest.s >&5
6795     fi
6796     rm -f conftest.o conftest.s
6797   fi
6798 fi
6799
6800 echo "$ac_t""$gcc_cv_as_sparc_register_op" 1>&6
6801 if test $gcc_cv_as_sparc_register_op = yes; then
6802   cat >> confdefs.h <<\EOF
6803 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6804 EOF
6805
6806 fi
6807
6808     echo $ac_n "checking assembler for -relax option""... $ac_c" 1>&6
6809 echo "configure:6810: checking assembler for -relax option" >&5
6810 if eval "test \"`echo '$''{'gcc_cv_as_sparc_relax'+set}'`\" = set"; then
6811   echo $ac_n "(cached) $ac_c" 1>&6
6812 else
6813   gcc_cv_as_sparc_relax=no
6814   if test x$gcc_cv_as != x; then
6815     echo '.text' > conftest.s
6816     if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'; { (eval echo configure:6817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6817     then
6818         gcc_cv_as_sparc_relax=yes
6819     else
6820       echo "configure: failed program was" >&5
6821       cat conftest.s >&5
6822     fi
6823     rm -f conftest.o conftest.s
6824   fi
6825 fi
6826
6827 echo "$ac_t""$gcc_cv_as_sparc_relax" 1>&6
6828 if test $gcc_cv_as_sparc_relax = yes; then
6829   cat >> confdefs.h <<\EOF
6830 #define HAVE_AS_RELAX_OPTION 1
6831 EOF
6832
6833 fi
6834
6835     echo $ac_n "checking assembler for unaligned pcrel relocs""... $ac_c" 1>&6
6836 echo "configure:6837: checking assembler for unaligned pcrel relocs" >&5
6837 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
6838   echo $ac_n "(cached) $ac_c" 1>&6
6839 else
6840   gcc_cv_as_sparc_ua_pcrel=no
6841   if test x$gcc_cv_as != x; then
6842     echo '.text
6843 foo:
6844         nop
6845 .data
6846 .align 4
6847 .byte 0
6848 .uaword %r_disp32(foo)' > conftest.s
6849     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6850     then
6851         if test x$gcc_cv_ld != x \
6852        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
6853          gcc_cv_as_sparc_ua_pcrel=yes
6854        fi
6855        rm -f conftest
6856     else
6857       echo "configure: failed program was" >&5
6858       cat conftest.s >&5
6859     fi
6860     rm -f conftest.o conftest.s
6861   fi
6862 fi
6863
6864 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
6865 if test $gcc_cv_as_sparc_ua_pcrel = yes; then
6866   cat >> confdefs.h <<\EOF
6867 #define HAVE_AS_SPARC_UA_PCREL 1
6868 EOF
6869
6870
6871       echo $ac_n "checking assembler for unaligned pcrel relocs against hidden symbols""... $ac_c" 1>&6
6872 echo "configure:6873: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
6873 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   gcc_cv_as_sparc_ua_pcrel_hidden=no
6877   if test x$gcc_cv_as != x; then
6878     echo '.data
6879 .align 4
6880 .byte 0x31
6881 .uaword %r_disp32(foo)
6882 .byte 0x32, 0x33, 0x34
6883 .global foo
6884 .hidden foo
6885 foo:
6886 .skip 4' > conftest.s
6887     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6888     then
6889         if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
6890          && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
6891          && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
6892             | grep ' 31000000 07323334' > /dev/null 2>&1; then
6893             if $gcc_cv_objdump -R conftest 2> /dev/null \
6894                | grep 'DISP32' > /dev/null 2>&1; then
6895                 :
6896             else
6897                 gcc_cv_as_sparc_ua_pcrel_hidden=yes
6898             fi
6899          fi
6900          rm -f conftest
6901     else
6902       echo "configure: failed program was" >&5
6903       cat conftest.s >&5
6904     fi
6905     rm -f conftest.o conftest.s
6906   fi
6907 fi
6908
6909 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
6910 if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
6911   cat >> confdefs.h <<\EOF
6912 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
6913 EOF
6914
6915 fi
6916     
6917 fi # unaligned pcrel relocs
6918
6919     echo $ac_n "checking assembler for offsetable %lo()""... $ac_c" 1>&6
6920 echo "configure:6921: checking assembler for offsetable %lo()" >&5
6921 if eval "test \"`echo '$''{'gcc_cv_as_sparc_offsetable_lo10'+set}'`\" = set"; then
6922   echo $ac_n "(cached) $ac_c" 1>&6
6923 else
6924   gcc_cv_as_sparc_offsetable_lo10=no
6925   if test x$gcc_cv_as != x; then
6926     echo '.text
6927         or %g1, %lo(ab) + 12, %g1
6928         or %g1, %lo(ab + 12), %g1' > conftest.s
6929     if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'; { (eval echo configure:6930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6930     then
6931         if test x$gcc_cv_objdump != x \
6932        && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
6933           | grep ' 82106000 82106000' > /dev/null 2>&1; then
6934          gcc_cv_as_offsetable_lo10=yes
6935        fi
6936     else
6937       echo "configure: failed program was" >&5
6938       cat conftest.s >&5
6939     fi
6940     rm -f conftest.o conftest.s
6941   fi
6942 fi
6943
6944 echo "$ac_t""$gcc_cv_as_sparc_offsetable_lo10" 1>&6
6945 if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
6946   cat >> confdefs.h <<\EOF
6947 #define HAVE_AS_OFFSETABLE_LO10 1
6948 EOF
6949
6950 fi
6951     ;;
6952
6953   i[34567]86-*-* | x86_64-*-*)
6954     echo $ac_n "checking assembler for filds and fists mnemonics""... $ac_c" 1>&6
6955 echo "configure:6956: checking assembler for filds and fists mnemonics" >&5
6956 if eval "test \"`echo '$''{'gcc_cv_as_ix86_filds_fists'+set}'`\" = set"; then
6957   echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959   gcc_cv_as_ix86_filds_fists=no
6960     if test $in_tree_gas = yes; then
6961     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
6962   then gcc_cv_as_ix86_filds_fists=yes
6963 fi
6964   elif test x$gcc_cv_as != x; then
6965     echo 'filds mem; fists mem' > conftest.s
6966     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6967     then
6968         gcc_cv_as_ix86_filds_fists=yes
6969     else
6970       echo "configure: failed program was" >&5
6971       cat conftest.s >&5
6972     fi
6973     rm -f conftest.o conftest.s
6974   fi
6975 fi
6976
6977 echo "$ac_t""$gcc_cv_as_ix86_filds_fists" 1>&6
6978 if test $gcc_cv_as_ix86_filds_fists = yes; then
6979   cat >> confdefs.h <<\EOF
6980 #define HAVE_GAS_FILDS_FISTS 1
6981 EOF
6982
6983 fi
6984
6985     echo $ac_n "checking assembler for cmov syntax""... $ac_c" 1>&6
6986 echo "configure:6987: checking assembler for cmov syntax" >&5
6987 if eval "test \"`echo '$''{'gcc_cv_as_ix86_cmov_sun_syntax'+set}'`\" = set"; then
6988   echo $ac_n "(cached) $ac_c" 1>&6
6989 else
6990   gcc_cv_as_ix86_cmov_sun_syntax=no
6991   if test x$gcc_cv_as != x; then
6992     echo 'cmovl.l %edx, %eax' > conftest.s
6993     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
6994     then
6995         gcc_cv_as_ix86_cmov_sun_syntax=yes
6996     else
6997       echo "configure: failed program was" >&5
6998       cat conftest.s >&5
6999     fi
7000     rm -f conftest.o conftest.s
7001   fi
7002 fi
7003
7004 echo "$ac_t""$gcc_cv_as_ix86_cmov_sun_syntax" 1>&6
7005 if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
7006   cat >> confdefs.h <<\EOF
7007 #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
7008 EOF
7009
7010 fi
7011
7012     # This one is used unconditionally by i386.[ch]; it is to be defined
7013     # to 1 if the feature is present, 0 otherwise.
7014     echo $ac_n "checking assembler for GOTOFF in data""... $ac_c" 1>&6
7015 echo "configure:7016: checking assembler for GOTOFF in data" >&5
7016 if eval "test \"`echo '$''{'gcc_cv_as_ix86_gotoff_in_data'+set}'`\" = set"; then
7017   echo $ac_n "(cached) $ac_c" 1>&6
7018 else
7019   gcc_cv_as_ix86_gotoff_in_data=no
7020     if test $in_tree_gas = yes; then
7021     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7022   then gcc_cv_as_ix86_gotoff_in_data=yes
7023 fi
7024   elif test x$gcc_cv_as != x; then
7025     echo '      .text
7026 .L0:
7027         nop
7028         .data
7029         .long .L0@GOTOFF' > conftest.s
7030     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7031     then
7032         gcc_cv_as_ix86_gotoff_in_data=yes
7033     else
7034       echo "configure: failed program was" >&5
7035       cat conftest.s >&5
7036     fi
7037     rm -f conftest.o conftest.s
7038   fi
7039 fi
7040
7041 echo "$ac_t""$gcc_cv_as_ix86_gotoff_in_data" 1>&6
7042
7043     cat >> confdefs.h <<EOF
7044 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7045 EOF
7046
7047     ;;
7048
7049   ia64*-*-*)
7050     echo $ac_n "checking assembler for ltoffx and ldxmov relocs""... $ac_c" 1>&6
7051 echo "configure:7052: checking assembler for ltoffx and ldxmov relocs" >&5
7052 if eval "test \"`echo '$''{'gcc_cv_as_ia64_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
7053   echo $ac_n "(cached) $ac_c" 1>&6
7054 else
7055   gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
7056     if test $in_tree_gas = yes; then
7057     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7058   then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
7059 fi
7060   elif test x$gcc_cv_as != x; then
7061     echo '      .text
7062         addl r15 = @ltoffx(x#), gp
7063         ;;
7064         ld8.mov r16 = [r15], x#' > conftest.s
7065     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7066     then
7067         gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
7068     else
7069       echo "configure: failed program was" >&5
7070       cat conftest.s >&5
7071     fi
7072     rm -f conftest.o conftest.s
7073   fi
7074 fi
7075
7076 echo "$ac_t""$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" 1>&6
7077 if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
7078   cat >> confdefs.h <<\EOF
7079 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
7080 EOF
7081
7082 fi
7083
7084     ;;
7085
7086   powerpc*-*-*)
7087     case $target in
7088       *-*-aix) conftest_s='     .csect .textPR';;
7089       *)       conftest_s='     .text';;
7090     esac
7091     conftest_s="$conftest_s
7092         mfcr 3,128"
7093
7094     echo $ac_n "checking assembler for mfcr field support""... $ac_c" 1>&6
7095 echo "configure:7096: checking assembler for mfcr field support" >&5
7096 if eval "test \"`echo '$''{'gcc_cv_as_powerpc_mfcrf'+set}'`\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   gcc_cv_as_powerpc_mfcrf=no
7100     if test $in_tree_gas = yes; then
7101     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7102   then gcc_cv_as_powerpc_mfcrf=yes
7103 fi
7104   elif test x$gcc_cv_as != x; then
7105     echo "$conftest_s" > conftest.s
7106     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7107     then
7108         gcc_cv_as_powerpc_mfcrf=yes
7109     else
7110       echo "configure: failed program was" >&5
7111       cat conftest.s >&5
7112     fi
7113     rm -f conftest.o conftest.s
7114   fi
7115 fi
7116
7117 echo "$ac_t""$gcc_cv_as_powerpc_mfcrf" 1>&6
7118 if test $gcc_cv_as_powerpc_mfcrf = yes; then
7119   cat >> confdefs.h <<\EOF
7120 #define HAVE_AS_MFCRF 1
7121 EOF
7122
7123 fi
7124     ;;
7125
7126   mips*-*-*)
7127     echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
7128 echo "configure:7129: checking assembler for explicit relocation support" >&5
7129 if eval "test \"`echo '$''{'gcc_cv_as_mips_explicit_relocs'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   gcc_cv_as_mips_explicit_relocs=no
7133     if test $in_tree_gas = yes; then
7134     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
7135   then gcc_cv_as_mips_explicit_relocs=yes
7136 fi
7137   elif test x$gcc_cv_as != x; then
7138     echo '      lw $4,%gp_rel(foo)($4)' > conftest.s
7139     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7140     then
7141         gcc_cv_as_mips_explicit_relocs=yes
7142     else
7143       echo "configure: failed program was" >&5
7144       cat conftest.s >&5
7145     fi
7146     rm -f conftest.o conftest.s
7147   fi
7148 fi
7149
7150 echo "$ac_t""$gcc_cv_as_mips_explicit_relocs" 1>&6
7151 if test $gcc_cv_as_mips_explicit_relocs = yes; then
7152   if test x$target_cpu_default = x
7153        then target_cpu_default=MASK_EXPLICIT_RELOCS
7154        else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
7155        fi
7156 fi
7157
7158     ;;
7159 esac
7160 # ??? Not all targets support dwarf2 debug_line, even within a version
7161 # of gas.  Moreover, we need to emit a valid instruction to trigger any
7162 # info to the output file.  So, as supported targets are added to gas 2.11,
7163 # add some instruction here to (also) show we expect this might work.
7164 # ??? Once 2.11 is released, probably need to add first known working
7165 # version to the per-target configury.
7166 case "$target" in
7167   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
7168   | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
7169   | xstormy16*-*-* | cris-*-*)
7170     insn="nop"
7171     ;;
7172   ia64*-*-*)
7173     insn="nop 0"
7174     ;;
7175   mmix-*-*)
7176     insn="swym 0"
7177     ;;
7178 esac
7179 if test x"$insn" != x; then
7180  conftest_s="\
7181         .file 1 \"conftest.s\"
7182         .loc 1 3 0
7183         $insn"
7184  echo $ac_n "checking assembler for dwarf2 debug_line support""... $ac_c" 1>&6
7185 echo "configure:7186: checking assembler for dwarf2 debug_line support" >&5
7186 if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_debug_line'+set}'`\" = set"; then
7187   echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7189   gcc_cv_as_dwarf2_debug_line=no
7190     if test $in_tree_gas = yes; then
7191     if test $in_tree_gas_is_elf = yes \
7192   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7193   then gcc_cv_as_dwarf2_debug_line=yes
7194 fi
7195   elif test x$gcc_cv_as != x; then
7196     echo "$conftest_s" > conftest.s
7197     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7198     then
7199         # ??? This fails with non-gnu grep.  Maybe use objdump?
7200    if grep debug_line conftest.o > /dev/null 2>&1; then
7201      gcc_cv_as_dwarf2_debug_line=yes
7202    fi
7203     else
7204       echo "configure: failed program was" >&5
7205       cat conftest.s >&5
7206     fi
7207     rm -f conftest.o conftest.s
7208   fi
7209 fi
7210
7211 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7212
7213
7214 # The .debug_line file table must be in the exact order that
7215 # we specified the files, since these indices are also used
7216 # by DW_AT_decl_file.  Approximate this test by testing if
7217 # the assembler bitches if the same index is assigned twice.
7218  echo $ac_n "checking assembler for buggy dwarf2 .file directive""... $ac_c" 1>&6
7219 echo "configure:7220: checking assembler for buggy dwarf2 .file directive" >&5
7220 if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_file_buggy'+set}'`\" = set"; then
7221   echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223   gcc_cv_as_dwarf2_file_buggy=no
7224   if test x$gcc_cv_as != x; then
7225     echo '      .file 1 "foo.s"
7226         .file 1 "bar.s"' > conftest.s
7227     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'; { (eval echo configure:7228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7228     then
7229         gcc_cv_as_dwarf2_file_buggy=yes
7230     else
7231       echo "configure: failed program was" >&5
7232       cat conftest.s >&5
7233     fi
7234     rm -f conftest.o conftest.s
7235   fi
7236 fi
7237
7238 echo "$ac_t""$gcc_cv_as_dwarf2_file_buggy" 1>&6
7239
7240
7241  if test $gcc_cv_as_dwarf2_debug_line = yes \
7242  && test $gcc_cv_as_dwarf2_file_buggy = no; then
7243         cat >> confdefs.h <<\EOF
7244 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7245 EOF
7246
7247  fi
7248
7249  echo $ac_n "checking assembler for --gdwarf2 option""... $ac_c" 1>&6
7250 echo "configure:7251: checking assembler for --gdwarf2 option" >&5
7251 if eval "test \"`echo '$''{'gcc_cv_as_gdwarf2_flag'+set}'`\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   gcc_cv_as_gdwarf2_flag=no
7255     if test $in_tree_gas = yes; then
7256     if test $in_tree_gas_is_elf = yes \
7257   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7258   then gcc_cv_as_gdwarf2_flag=yes
7259 fi
7260   elif test x$gcc_cv_as != x; then
7261     echo "$insn" > conftest.s
7262     if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'; { (eval echo configure:7263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7263     then
7264         gcc_cv_as_gdwarf2_flag=yes
7265     else
7266       echo "configure: failed program was" >&5
7267       cat conftest.s >&5
7268     fi
7269     rm -f conftest.o conftest.s
7270   fi
7271 fi
7272
7273 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7274 if test $gcc_cv_as_gdwarf2_flag = yes; then
7275   cat >> confdefs.h <<\EOF
7276 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7277 EOF
7278
7279 fi
7280
7281  echo $ac_n "checking assembler for --gstabs option""... $ac_c" 1>&6
7282 echo "configure:7283: checking assembler for --gstabs option" >&5
7283 if eval "test \"`echo '$''{'gcc_cv_as_gstabs_flag'+set}'`\" = set"; then
7284   echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286   gcc_cv_as_gstabs_flag=no
7287     if test $in_tree_gas = yes; then
7288     if test $in_tree_gas_is_elf = yes \
7289   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
7290   then gcc_cv_as_gstabs_flag=yes
7291 fi
7292   elif test x$gcc_cv_as != x; then
7293     echo "$insn" > conftest.s
7294     if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'; { (eval echo configure:7295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7295     then
7296         # The native Solaris 9/Intel assembler doesn't understand --gstabs
7297    # and warns about it, but still exits successfully.  So check for
7298    # this.
7299    if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'; { (eval echo configure:7300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
7300    then :
7301    else gcc_cv_as_gstabs_flag=yes
7302    fi
7303     else
7304       echo "configure: failed program was" >&5
7305       cat conftest.s >&5
7306     fi
7307     rm -f conftest.o conftest.s
7308   fi
7309 fi
7310
7311 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7312 if test $gcc_cv_as_gstabs_flag = yes; then
7313   cat >> confdefs.h <<\EOF
7314 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7315 EOF
7316
7317 fi
7318 fi
7319
7320 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
7321 echo "configure:7322: checking linker read-only and read-write section mixing" >&5
7322 gcc_cv_ld_ro_rw_mix=unknown
7323 if test $in_tree_ld = yes ; then
7324   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 \
7325      && test $in_tree_ld_is_elf = yes; then
7326     gcc_cv_ld_ro_rw_mix=read-write
7327   fi
7328 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
7329   echo '.section myfoosect, "a"' > conftest1.s
7330   echo '.section myfoosect, "aw"' > conftest2.s
7331   echo '.byte 1' >> conftest2.s
7332   echo '.section myfoosect, "a"' > conftest3.s
7333   echo '.byte 0' >> conftest3.s
7334   if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
7335      && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
7336      && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
7337      && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
7338         conftest2.o conftest3.o > /dev/null 2>&1; then
7339     gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
7340                          | sed -e '/myfoosect/!d' -e N`
7341     if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
7342       if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
7343         gcc_cv_ld_ro_rw_mix=read-only
7344       else
7345         gcc_cv_ld_ro_rw_mix=read-write
7346       fi
7347     fi
7348   fi
7349   rm -f conftest.* conftest[123].*
7350 fi
7351 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
7352         cat >> confdefs.h <<\EOF
7353 #define HAVE_LD_RO_RW_SECTION_MIXING 1
7354 EOF
7355
7356 fi
7357 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
7358
7359 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7360 echo "configure:7361: checking linker PT_GNU_EH_FRAME support" >&5
7361 gcc_cv_ld_eh_frame_hdr=no
7362 if test $in_tree_ld = yes ; then
7363   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 \
7364      && test $in_tree_ld_is_elf = yes; then
7365     gcc_cv_ld_eh_frame_hdr=yes
7366   fi
7367 elif test x$gcc_cv_ld != x; then
7368         # Check if linker supports --eh-frame-hdr option
7369         if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7370                 gcc_cv_ld_eh_frame_hdr=yes
7371         fi
7372 fi
7373 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7374         cat >> confdefs.h <<\EOF
7375 #define HAVE_LD_EH_FRAME_HDR 1
7376 EOF
7377
7378 fi
7379 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7380
7381 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
7382 echo "configure:7383: checking linker position independent executable support" >&5
7383 gcc_cv_ld_pie=no
7384 if test $in_tree_ld = yes ; then
7385   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 \
7386      && test $in_tree_ld_is_elf = yes; then
7387     gcc_cv_ld_pie=yes
7388   fi
7389 elif test x$gcc_cv_ld != x; then
7390         # Check if linker supports -pie option
7391         if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
7392                 gcc_cv_ld_pie=yes
7393         fi
7394 fi
7395 if test x"$gcc_cv_ld_pie" = xyes; then
7396         cat >> confdefs.h <<\EOF
7397 #define HAVE_LD_PIE 1
7398 EOF
7399
7400 fi
7401 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
7402
7403 # Miscellaneous target-specific checks.
7404 case "$target" in
7405   mips*-*-*)
7406     echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
7407 echo "configure:7408: checking whether libgloss uses STARTUP directives consistently" >&5
7408     gcc_cv_mips_libgloss_startup=no
7409     gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
7410     if test "x$exec_prefix" = xNONE; then
7411       if test "x$prefix" = xNONE; then
7412         test_prefix=/usr/local
7413       else
7414         test_prefix=$prefix
7415       fi
7416     else
7417       test_prefix=$exec_prefix
7418     fi
7419     for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
7420     do
7421       if grep '^STARTUP' $f > /dev/null 2>&1; then
7422         gcc_cv_mips_libgloss_startup=yes
7423         break
7424       fi
7425     done
7426     if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
7427       cat >> confdefs.h <<\EOF
7428 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
7429 EOF
7430
7431     fi
7432     echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
7433     ;;
7434 esac
7435
7436 if test x$with_sysroot = x && test x$host = x$target \
7437    && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
7438   cat >> confdefs.h <<EOF
7439 #define PREFIX_INCLUDE_DIR "$prefix/include"
7440 EOF
7441
7442 fi
7443
7444 # Figure out what language subdirectories are present.
7445 # Look if the user specified --enable-languages="..."; if not, use
7446 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7447 # go away some day.
7448 # NB:  embedded tabs in this IF block -- do not untabify
7449 if test x"${enable_languages+set}" != xset; then
7450         if test x"${LANGUAGES+set}" = xset; then
7451                 enable_languages="${LANGUAGES}"
7452                 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7453
7454         else
7455                 enable_languages=all
7456         fi
7457 else
7458         if test x"${enable_languages}" = x \
7459         || test x"${enable_languages}" = xyes;
7460         then
7461                 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7462         fi
7463 fi
7464 enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/,$//'`
7465
7466 # First scan to see if an enabled language requires some other language.
7467 # We assume that a given config-lang.in will list all the language
7468 # front ends it requires, even if some are required indirectly.
7469 for lang in ${srcdir}/*/config-lang.in
7470 do
7471    case $lang in
7472     # The odd quoting in the next line works around
7473     # an apparent bug in bash 1.12 on linux.
7474     ${srcdir}/[*]/config-lang.in)
7475        ;;
7476     *)
7477        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
7478        this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
7479        for other in $this_lang_requires
7480        do
7481           case ,${enable_languages}, in
7482            *,$other,*)
7483               ;;
7484            *,all,*)
7485               ;;
7486            *,$lang_alias,*)
7487               enable_languages="$enable_languages,$other"
7488               ;;
7489           esac
7490        done
7491        ;;
7492    esac
7493 done
7494
7495 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's:  *: :g' -e 's:  *: :g' -e 's:^ ::' -e 's: $::'`
7496 found_languages=
7497 subdirs=
7498 for lang in ${srcdir}/*/config-lang.in
7499 do
7500         case $lang in
7501         # The odd quoting in the next line works around
7502         # an apparent bug in bash 1.12 on linux.
7503         ${srcdir}/[*]/config-lang.in) ;;
7504         *)
7505           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
7506           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
7507           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
7508           if test "x$lang_alias" = x
7509           then
7510                 echo "$lang doesn't set \$language." 1>&2
7511                 exit 1
7512           fi
7513           case ${build_by_default},${enable_languages}, in
7514           *,$lang_alias,*) add_this_lang=yes ;;
7515           no,*) add_this_lang=no ;;
7516           *,all,*) add_this_lang=yes ;;
7517           *) add_this_lang=no ;;
7518           esac
7519           found_languages="${found_languages} ${lang_alias}"
7520           if test x"${add_this_lang}" = xyes; then
7521                 case $lang in
7522                     ${srcdir}/ada/config-lang.in)
7523                         if test x$have_gnat = xyes ; then
7524                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7525                         fi
7526                         ;;
7527                     *)
7528                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7529                         ;;
7530                 esac
7531           fi
7532           ;;
7533         esac
7534 done
7535
7536 missing_languages=
7537 for expected_language in ${expected_languages} ..
7538 do 
7539     if test "${expected_language}" != ..; then
7540         missing_language="${expected_language}"
7541         if test "${expected_language}" = "c" \
7542            || test "${expected_language}" = "all"; then
7543                 missing_language=
7544         fi
7545         for found_language in ${found_languages} ..
7546         do 
7547             if test "${found_language}" != ..; then
7548                 if test "${expected_language}" = "${found_language}"; then
7549                     missing_language=
7550                 fi
7551             fi
7552         done
7553         if test "x${missing_language}" != x; then
7554            missing_languages="${missing_languages} ${missing_language}"
7555         fi
7556     fi
7557 done
7558
7559 if test "x$missing_languages" != x; then
7560   { echo "configure: error: 
7561 The following requested languages were not found:${missing_languages}
7562 The following languages were available: c${found_languages}" 1>&2; exit 1; }
7563 fi
7564
7565 # Make gthr-default.h if we have a thread file.
7566 gthread_flags=
7567 if test $thread_file != single; then
7568     rm -f gthr-default.h
7569     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7570     gthread_flags=-DHAVE_GTHR_DEFAULT
7571 fi
7572
7573
7574 # Find out what GC implementation we want, or may, use.
7575 # Check whether --with-gc or --without-gc was given.
7576 if test "${with_gc+set}" = set; then
7577   withval="$with_gc"
7578   case "$withval" in
7579   simple | page)
7580     GGC=ggc-$withval
7581     ;;
7582   *)
7583     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7584     ;;
7585 esac
7586 else
7587   GGC=ggc-page
7588 fi
7589
7590
7591 echo "Using $GGC for garbage collection."
7592
7593 # Use the system's zlib library.
7594 zlibdir=-L../zlib
7595 zlibinc="-I\$(srcdir)/../zlib"
7596 # Check whether --with-system-zlib or --without-system-zlib was given.
7597 if test "${with_system_zlib+set}" = set; then
7598   withval="$with_system_zlib"
7599   zlibdir=
7600 zlibinc=
7601
7602 fi
7603
7604
7605
7606
7607
7608 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7609 echo "configure:7610: checking whether to enable maintainer-specific portions of Makefiles" >&5
7610     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7611 if test "${enable_maintainer_mode+set}" = set; then
7612   enableval="$enable_maintainer_mode"
7613   maintainer_mode=$enableval
7614 else
7615   maintainer_mode=no
7616 fi
7617
7618
7619 echo "$ac_t""$maintainer_mode" 1>&6
7620
7621 if test "$maintainer_mode" = "yes"; then
7622   MAINT=''
7623 else
7624   MAINT='#'
7625 fi
7626
7627 # Make empty files to contain the specs and options for each language.
7628 # Then add #include lines to for a compiler that has specs and/or options.
7629
7630 lang_opt_files=
7631 lang_specs_files=
7632 lang_tree_files=
7633 for subdir in . $subdirs
7634 do
7635         if test -f $srcdir/$subdir/lang.opt; then
7636             lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
7637         fi
7638         if test -f $srcdir/$subdir/lang-specs.h; then
7639             lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7640         fi
7641         if test -f $srcdir/$subdir/$subdir-tree.def; then
7642             lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7643         fi
7644 done
7645
7646 # These (without "all_") are set in each config-lang.in.
7647 # `language' must be a single word so is spelled singularly.
7648 all_languages=
7649 all_boot_languages=
7650 all_compilers=
7651 all_stagestuff=
7652 all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
7653 # List of language makefile fragments.
7654 all_lang_makefrags=
7655 # List of language subdirectory makefiles.  Deprecated.
7656 all_lang_makefiles=
7657 # Files for gengtype
7658 all_gtfiles="$target_gtfiles"
7659 # Files for gengtype with language
7660 all_gtfiles_files_langs=
7661 all_gtfiles_files_files=
7662
7663 # Add the language fragments.
7664 # Languages are added via two mechanisms.  Some information must be
7665 # recorded in makefile variables, these are defined in config-lang.in.
7666 # We accumulate them and plug them into the main Makefile.
7667 # The other mechanism is a set of hooks for each of the main targets
7668 # like `clean', `install', etc.
7669
7670 language_hooks="Make-hooks"
7671
7672 for s in $subdirs
7673 do
7674                 language=
7675                 boot_language=
7676                 compilers=
7677                 stagestuff=
7678                 outputs=
7679                 gtfiles=
7680                 . ${srcdir}/$s/config-lang.in
7681                 if test "x$language" = x
7682                 then
7683                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7684                         exit 1
7685                 fi
7686                 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
7687                 if test -f ${srcdir}/$s/Makefile.in
7688                 then all_lang_makefiles="$s/Makefile"
7689                 fi
7690                 all_languages="$all_languages $language"
7691                 if test "x$boot_language" = xyes
7692                 then
7693                         all_boot_languages="$all_boot_languages $language"
7694                 fi
7695                 all_compilers="$all_compilers $compilers"
7696                 all_stagestuff="$all_stagestuff $stagestuff"
7697                 all_outputs="$all_outputs $outputs"
7698                 all_gtfiles="$all_gtfiles $gtfiles"
7699                 for f in $gtfiles
7700                 do
7701                          all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
7702                          all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
7703                 done
7704 done
7705
7706 # Pick up gtfiles for c
7707 gtfiles=
7708 s="c"
7709 . ${srcdir}/c-config-lang.in
7710 all_gtfiles="$all_gtfiles $gtfiles"
7711 for f in $gtfiles
7712 do
7713         all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
7714         all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
7715 done
7716
7717 check_languages=
7718 for language in $all_languages
7719 do
7720                 check_languages="$check_languages check-$language"
7721 done
7722
7723 # Since we can't use `::' targets, we link each language in
7724 # with a set of hooks, reached indirectly via lang.${target}.
7725
7726 rm -f Make-hooks
7727 touch Make-hooks
7728 target_list="all.build all.cross start.encap rest.encap tags \
7729         info dvi generated-manpages \
7730         install-normal install-common install-info install-man \
7731         uninstall \
7732         mostlyclean clean distclean extraclean maintainer-clean \
7733         stage1 stage2 stage3 stage4 stageprofile stagefeedback"
7734 for t in $target_list
7735 do
7736         x=
7737         for lang in $all_languages
7738         do
7739                         x="$x $lang.$t"
7740         done
7741         echo "lang.$t: $x" >> Make-hooks
7742 done
7743
7744 # Create .gdbinit.
7745
7746 echo "dir ." > .gdbinit
7747 echo "dir ${srcdir}" >> .gdbinit
7748 if test x$gdb_needs_out_file_path = xyes
7749 then
7750         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7751 fi
7752 if test "x$subdirs" != x; then
7753         for s in $subdirs
7754         do
7755                 echo "dir ${srcdir}/$s" >> .gdbinit
7756         done
7757 fi
7758 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
7759
7760 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7761 # absolute path for gcc_tooldir based on inserting the number of up-directory
7762 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7763 # $(libsubdir)/@(unlibsubdir) based path.
7764 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7765 # make and thus we'd get different behavior depending on where we built the
7766 # sources.
7767 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7768     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7769 else
7770 # An explanation of the sed strings:
7771 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
7772 #  -e 's|/$||'            match a trailing forward slash and eliminates it
7773 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
7774 #  -e 's|/[^/]*|../|g'    replaces each occurrence of /<directory> with ../
7775 #
7776 # (*) Note this pattern overwrites the first character of the string
7777 # with a forward slash if one is not already present.  This is not a
7778 # problem because the exact names of the sub-directories concerned is
7779 # unimportant, just the number of them matters.
7780 #
7781 # The practical upshot of these patterns is like this:
7782 #
7783 #  prefix     exec_prefix        result
7784 #  ------     -----------        ------
7785 #   /foo        /foo/bar          ../
7786 #   /foo/       /foo/bar          ../
7787 #   /foo        /foo/bar/         ../
7788 #   /foo/       /foo/bar/         ../
7789 #   /foo        /foo/bar/ugg      ../../
7790 #
7791     dollar='$$'
7792     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7793 fi
7794
7795
7796
7797 # Find a directory in which to install a shared libgcc.
7798
7799 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7800 if test "${enable_version_specific_runtime_libs+set}" = set; then
7801   enableval="$enable_version_specific_runtime_libs"
7802   :
7803 fi
7804
7805
7806 # Check whether --with-slibdir or --without-slibdir was given.
7807 if test "${with_slibdir+set}" = set; then
7808   withval="$with_slibdir"
7809   slibdir="$with_slibdir"
7810 else
7811   if test "${enable_version_specific_runtime_libs+set}" = set; then
7812   slibdir='$(libsubdir)'
7813 elif test "$host" != "$target"; then
7814   slibdir='$(build_tooldir)/lib'
7815 else
7816   slibdir='$(libdir)'
7817 fi
7818 fi
7819
7820
7821
7822 objdir=`${PWDCMD-pwd}`
7823
7824
7825 # Substitute configuration variables
7826
7827
7828
7829
7830
7831
7832
7833
7834
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 # Echo that links are built
7895 if test x$host = x$target
7896 then
7897         str1="native "
7898 else
7899         str1="cross-"
7900         str2=" from $host"
7901 fi
7902
7903 if test x$host != x$build
7904 then
7905         str3=" on a $build system"
7906 fi
7907
7908 if test "x$str2" != x || test "x$str3" != x
7909 then
7910         str4=
7911 fi
7912
7913 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7914
7915 if test "x$str2" != x || test "x$str3" != x
7916 then
7917         echo " ${str2}${str3}." 1>&2
7918 fi
7919
7920 # Configure the subdirectories
7921 # AC_CONFIG_SUBDIRS($subdirs)
7922
7923 # Create the Makefile
7924 # and configure language subdirectories
7925 trap '' 1 2 15
7926 cat > confcache <<\EOF
7927 # This file is a shell script that caches the results of configure
7928 # tests run on this system so they can be shared between configure
7929 # scripts and configure runs.  It is not useful on other systems.
7930 # If it contains results you don't want to keep, you may remove or edit it.
7931 #
7932 # By default, configure uses ./config.cache as the cache file,
7933 # creating it if it does not exist already.  You can give configure
7934 # the --cache-file=FILE option to use a different cache file; that is
7935 # what configure does when it calls configure scripts in
7936 # subdirectories, so they share the cache.
7937 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7938 # config.status only pays attention to the cache file if you give it the
7939 # --recheck option to rerun configure.
7940 #
7941 EOF
7942 # The following way of writing the cache mishandles newlines in values,
7943 # but we know of no workaround that is simple, portable, and efficient.
7944 # So, don't put newlines in cache variables' values.
7945 # Ultrix sh set writes to stderr and can't be redirected directly,
7946 # and sets the high bit in the cache file unless we assign to the vars.
7947 (set) 2>&1 |
7948   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7949   *ac_space=\ *)
7950     # `set' does not quote correctly, so add quotes (double-quote substitution
7951     # turns \\\\ into \\, and sed turns \\ into \).
7952     sed -n \
7953       -e "s/'/'\\\\''/g" \
7954       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7955     ;;
7956   *)
7957     # `set' quotes correctly as required by POSIX, so do not add quotes.
7958     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7959     ;;
7960   esac >> confcache
7961 if cmp -s $cache_file confcache; then
7962   :
7963 else
7964   if test -w $cache_file; then
7965     echo "updating cache $cache_file"
7966     cat confcache > $cache_file
7967   else
7968     echo "not updating unwritable cache $cache_file"
7969   fi
7970 fi
7971 rm -f confcache
7972
7973 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7974
7975 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7976 # Let make expand exec_prefix.
7977 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7978
7979 # Any assignment to VPATH causes Sun make to only execute
7980 # the first set of double-colon rules, so remove it if not needed.
7981 # If there is a colon in the path, we need to keep it.
7982 if test "x$srcdir" = x.; then
7983   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7984 fi
7985
7986 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7987
7988 DEFS=-DHAVE_CONFIG_H
7989
7990 # Without the "./", some shells look in PATH for config.status.
7991 : ${CONFIG_STATUS=./config.status}
7992
7993 echo creating $CONFIG_STATUS
7994 rm -f $CONFIG_STATUS
7995 cat > $CONFIG_STATUS <<EOF
7996 #! /bin/sh
7997 # Generated automatically by configure.
7998 # Run this file to recreate the current configuration.
7999 # This directory was configured as follows,
8000 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8001 #
8002 # $0 $ac_configure_args
8003 #
8004 # Compiler output produced by configure, useful for debugging
8005 # configure, is in ./config.log if it exists.
8006
8007 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8008 for ac_option
8009 do
8010   case "\$ac_option" in
8011   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8012     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8013     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8014   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8015     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8016     exit 0 ;;
8017   -help | --help | --hel | --he | --h)
8018     echo "\$ac_cs_usage"; exit 0 ;;
8019   *) echo "\$ac_cs_usage"; exit 1 ;;
8020   esac
8021 done
8022
8023 ac_given_srcdir=$srcdir
8024
8025 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8026 EOF
8027 cat >> $CONFIG_STATUS <<EOF
8028
8029 # Protect against being on the right side of a sed subst in config.status.
8030 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8031  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8032 $ac_vpsub
8033 $extrasub
8034 s%@SHELL@%$SHELL%g
8035 s%@CFLAGS@%$CFLAGS%g
8036 s%@CPPFLAGS@%$CPPFLAGS%g
8037 s%@CXXFLAGS@%$CXXFLAGS%g
8038 s%@FFLAGS@%$FFLAGS%g
8039 s%@DEFS@%$DEFS%g
8040 s%@LDFLAGS@%$LDFLAGS%g
8041 s%@LIBS@%$LIBS%g
8042 s%@exec_prefix@%$exec_prefix%g
8043 s%@prefix@%$prefix%g
8044 s%@program_transform_name@%$program_transform_name%g
8045 s%@bindir@%$bindir%g
8046 s%@sbindir@%$sbindir%g
8047 s%@libexecdir@%$libexecdir%g
8048 s%@datadir@%$datadir%g
8049 s%@sysconfdir@%$sysconfdir%g
8050 s%@sharedstatedir@%$sharedstatedir%g
8051 s%@localstatedir@%$localstatedir%g
8052 s%@libdir@%$libdir%g
8053 s%@includedir@%$includedir%g
8054 s%@oldincludedir@%$oldincludedir%g
8055 s%@infodir@%$infodir%g
8056 s%@mandir@%$mandir%g
8057 s%@host@%$host%g
8058 s%@host_alias@%$host_alias%g
8059 s%@host_cpu@%$host_cpu%g
8060 s%@host_vendor@%$host_vendor%g
8061 s%@host_os@%$host_os%g
8062 s%@target@%$target%g
8063 s%@target_alias@%$target_alias%g
8064 s%@target_cpu@%$target_cpu%g
8065 s%@target_vendor@%$target_vendor%g
8066 s%@target_os@%$target_os%g
8067 s%@build@%$build%g
8068 s%@build_alias@%$build_alias%g
8069 s%@build_cpu@%$build_cpu%g
8070 s%@build_vendor@%$build_vendor%g
8071 s%@build_os@%$build_os%g
8072 s%@build_subdir@%$build_subdir%g
8073 s%@host_subdir@%$host_subdir%g
8074 s%@target_subdir@%$target_subdir%g
8075 s%@CC@%$CC%g
8076 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8077 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8078 s%@CPP@%$CPP%g
8079 s%@GNATBIND@%$GNATBIND%g
8080 s%@ADAC@%$ADAC%g
8081 s%@strict1_warn@%$strict1_warn%g
8082 s%@warn_cflags@%$warn_cflags%g
8083 s%@WERROR@%$WERROR%g
8084 s%@nocommon_flag@%$nocommon_flag%g
8085 s%@valgrind_path@%$valgrind_path%g
8086 s%@valgrind_path_defines@%$valgrind_path_defines%g
8087 s%@valgrind_command@%$valgrind_command%g
8088 s%@coverage_flags@%$coverage_flags%g
8089 s%@enable_multilib@%$enable_multilib%g
8090 s%@enable_shared@%$enable_shared%g
8091 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
8092 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
8093 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
8094 s%@onestep@%$onestep%g
8095 s%@SET_MAKE@%$SET_MAKE%g
8096 s%@AWK@%$AWK%g
8097 s%@LN@%$LN%g
8098 s%@LN_S@%$LN_S%g
8099 s%@RANLIB@%$RANLIB%g
8100 s%@INSTALL@%$INSTALL%g
8101 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8102 s%@INSTALL_DATA@%$INSTALL_DATA%g
8103 s%@make_compare_target@%$make_compare_target%g
8104 s%@have_mktemp_command@%$have_mktemp_command%g
8105 s%@MAKEINFO@%$MAKEINFO%g
8106 s%@BUILD_INFO@%$BUILD_INFO%g
8107 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8108 s%@FLEX@%$FLEX%g
8109 s%@BISON@%$BISON%g
8110 s%@stage1_cflags@%$stage1_cflags%g
8111 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8112 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8113 s%@LDEXP_LIB@%$LDEXP_LIB%g
8114 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8115 s%@LIBICONV@%$LIBICONV%g
8116 s%@LIBICONV_DEP@%$LIBICONV_DEP%g
8117 s%@manext@%$manext%g
8118 s%@objext@%$objext%g
8119 s%@extra_modes_file@%$extra_modes_file%g
8120 s%@FORBUILD@%$FORBUILD%g
8121 s%@PACKAGE@%$PACKAGE%g
8122 s%@VERSION@%$VERSION%g
8123 s%@USE_NLS@%$USE_NLS%g
8124 s%@LIBINTL@%$LIBINTL%g
8125 s%@LIBINTL_DEP@%$LIBINTL_DEP%g
8126 s%@INCINTL@%$INCINTL%g
8127 s%@XGETTEXT@%$XGETTEXT%g
8128 s%@GMSGFMT@%$GMSGFMT%g
8129 s%@POSUB@%$POSUB%g
8130 s%@CATALOGS@%$CATALOGS%g
8131 s%@CROSS@%$CROSS%g
8132 s%@ALL@%$ALL%g
8133 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8134 s%@inhibit_libc@%$inhibit_libc%g
8135 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8136 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8137 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
8138 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
8139 s%@STMP_FIXINC@%$STMP_FIXINC%g
8140 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8141 s%@libgcc_visibility@%$libgcc_visibility%g
8142 s%@gthread_flags@%$gthread_flags%g
8143 s%@GGC@%$GGC%g
8144 s%@zlibdir@%$zlibdir%g
8145 s%@zlibinc@%$zlibinc%g
8146 s%@MAINT@%$MAINT%g
8147 s%@gcc_tooldir@%$gcc_tooldir%g
8148 s%@dollar@%$dollar%g
8149 s%@slibdir@%$slibdir%g
8150 s%@objdir@%$objdir%g
8151 s%@subdirs@%$subdirs%g
8152 s%@srcdir@%$srcdir%g
8153 s%@all_boot_languages@%$all_boot_languages%g
8154 s%@all_compilers@%$all_compilers%g
8155 s%@all_gtfiles@%$all_gtfiles%g
8156 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
8157 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
8158 s%@all_lang_makefrags@%$all_lang_makefrags%g
8159 s%@all_lang_makefiles@%$all_lang_makefiles%g
8160 s%@all_languages@%$all_languages%g
8161 s%@all_stagestuff@%$all_stagestuff%g
8162 s%@build_exeext@%$build_exeext%g
8163 s%@build_install_headers_dir@%$build_install_headers_dir%g
8164 s%@build_xm_file_list@%$build_xm_file_list%g
8165 s%@build_xm_include_list@%$build_xm_include_list%g
8166 s%@build_xm_defines@%$build_xm_defines%g
8167 s%@check_languages@%$check_languages%g
8168 s%@cc_set_by_configure@%$cc_set_by_configure%g
8169 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8170 s%@cpp_install_dir@%$cpp_install_dir%g
8171 s%@xmake_file@%$xmake_file%g
8172 s%@tmake_file@%$tmake_file%g
8173 s%@extra_headers_list@%$extra_headers_list%g
8174 s%@extra_objs@%$extra_objs%g
8175 s%@extra_parts@%$extra_parts%g
8176 s%@extra_passes@%$extra_passes%g
8177 s%@extra_programs@%$extra_programs%g
8178 s%@float_h_file@%$float_h_file%g
8179 s%@gcc_config_arguments@%$gcc_config_arguments%g
8180 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8181 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8182 s%@gcc_version@%$gcc_version%g
8183 s%@gcc_version_full@%$gcc_version_full%g
8184 s%@gcc_version_trigger@%$gcc_version_trigger%g
8185 s%@host_exeext@%$host_exeext%g
8186 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8187 s%@host_xm_file_list@%$host_xm_file_list%g
8188 s%@host_xm_include_list@%$host_xm_include_list%g
8189 s%@host_xm_defines@%$host_xm_defines%g
8190 s%@out_host_hook_obj@%$out_host_hook_obj%g
8191 s%@install@%$install%g
8192 s%@lang_opt_files@%$lang_opt_files%g
8193 s%@lang_specs_files@%$lang_specs_files%g
8194 s%@lang_tree_files@%$lang_tree_files%g
8195 s%@local_prefix@%$local_prefix%g
8196 s%@md_file@%$md_file%g
8197 s%@objc_boehm_gc@%$objc_boehm_gc%g
8198 s%@out_file@%$out_file%g
8199 s%@out_object_file@%$out_object_file%g
8200 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8201 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8202 s%@symbolic_link@%$symbolic_link%g
8203 s%@thread_file@%$thread_file%g
8204 s%@tm_file_list@%$tm_file_list%g
8205 s%@tm_include_list@%$tm_include_list%g
8206 s%@tm_defines@%$tm_defines%g
8207 s%@tm_p_file_list@%$tm_p_file_list%g
8208 s%@tm_p_include_list@%$tm_p_include_list%g
8209 s%@xm_file_list@%$xm_file_list%g
8210 s%@xm_include_list@%$xm_include_list%g
8211 s%@xm_defines@%$xm_defines%g
8212 s%@c_target_objs@%$c_target_objs%g
8213 s%@cxx_target_objs@%$cxx_target_objs%g
8214 s%@target_cpu_default@%$target_cpu_default%g
8215 /@language_hooks@/r $language_hooks
8216 s%@language_hooks@%%g
8217
8218 CEOF
8219 EOF
8220
8221 cat >> $CONFIG_STATUS <<\EOF
8222
8223 # Split the substitutions into bite-sized pieces for seds with
8224 # small command number limits, like on Digital OSF/1 and HP-UX.
8225 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8226 ac_file=1 # Number of current file.
8227 ac_beg=1 # First line for current file.
8228 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8229 ac_more_lines=:
8230 ac_sed_cmds=""
8231 while $ac_more_lines; do
8232   if test $ac_beg -gt 1; then
8233     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8234   else
8235     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8236   fi
8237   if test ! -s conftest.s$ac_file; then
8238     ac_more_lines=false
8239     rm -f conftest.s$ac_file
8240   else
8241     if test -z "$ac_sed_cmds"; then
8242       ac_sed_cmds="sed -f conftest.s$ac_file"
8243     else
8244       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8245     fi
8246     ac_file=`expr $ac_file + 1`
8247     ac_beg=$ac_end
8248     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8249   fi
8250 done
8251 if test -z "$ac_sed_cmds"; then
8252   ac_sed_cmds=cat
8253 fi
8254 EOF
8255
8256 cat >> $CONFIG_STATUS <<EOF
8257
8258 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8259 EOF
8260 cat >> $CONFIG_STATUS <<\EOF
8261 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8262   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8263   case "$ac_file" in
8264   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8265        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8266   *) ac_file_in="${ac_file}.in" ;;
8267   esac
8268
8269   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8270
8271   # Remove last slash and all that follows it.  Not all systems have dirname.
8272   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8273   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8274     # The file is in a subdirectory.
8275     test ! -d "$ac_dir" && mkdir "$ac_dir"
8276     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8277     # A "../" for each directory in $ac_dir_suffix.
8278     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8279   else
8280     ac_dir_suffix= ac_dots=
8281   fi
8282
8283   case "$ac_given_srcdir" in
8284   .)  srcdir=.
8285       if test -z "$ac_dots"; then top_srcdir=.
8286       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8287   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8288   *) # Relative path.
8289     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8290     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8291   esac
8292
8293
8294   echo creating "$ac_file"
8295   rm -f "$ac_file"
8296   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8297   case "$ac_file" in
8298   *Makefile*) ac_comsub="1i\\
8299 # $configure_input" ;;
8300   *) ac_comsub= ;;
8301   esac
8302
8303   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8304   sed -e "$ac_comsub
8305 s%@configure_input@%$configure_input%g
8306 s%@srcdir@%$srcdir%g
8307 s%@top_srcdir@%$top_srcdir%g
8308 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8309 fi; done
8310 rm -f conftest.s*
8311
8312 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8313 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8314 #
8315 # ac_d sets the value in "#define NAME VALUE" lines.
8316 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8317 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8318 ac_dC='\3'
8319 ac_dD='%g'
8320 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8321 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8322 ac_uB='\([      ]\)%\1#\2define\3'
8323 ac_uC=' '
8324 ac_uD='\4%g'
8325 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8326 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8327 ac_eB='$%\1#\2define\3'
8328 ac_eC=' '
8329 ac_eD='%g'
8330
8331 if test "${CONFIG_HEADERS+set}" != set; then
8332 EOF
8333 cat >> $CONFIG_STATUS <<EOF
8334   CONFIG_HEADERS="auto-host.h:config.in"
8335 EOF
8336 cat >> $CONFIG_STATUS <<\EOF
8337 fi
8338 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8339   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8340   case "$ac_file" in
8341   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8342        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8343   *) ac_file_in="${ac_file}.in" ;;
8344   esac
8345
8346   echo creating $ac_file
8347
8348   rm -f conftest.frag conftest.in conftest.out
8349   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8350   cat $ac_file_inputs > conftest.in
8351
8352 EOF
8353
8354 # Transform confdefs.h into a sed script conftest.vals that substitutes
8355 # the proper values into config.h.in to produce config.h.  And first:
8356 # Protect against being on the right side of a sed subst in config.status.
8357 # Protect against being in an unquoted here document in config.status.
8358 rm -f conftest.vals
8359 cat > conftest.hdr <<\EOF
8360 s/[\\&%]/\\&/g
8361 s%[\\$`]%\\&%g
8362 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8363 s%ac_d%ac_u%gp
8364 s%ac_u%ac_e%gp
8365 EOF
8366 sed -n -f conftest.hdr confdefs.h > conftest.vals
8367 rm -f conftest.hdr
8368
8369 # This sed command replaces #undef with comments.  This is necessary, for
8370 # example, in the case of _POSIX_SOURCE, which is predefined and required
8371 # on some systems where configure will not decide to define it.
8372 cat >> conftest.vals <<\EOF
8373 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8374 EOF
8375
8376 # Break up conftest.vals because some shells have a limit on
8377 # the size of here documents, and old seds have small limits too.
8378
8379 rm -f conftest.tail
8380 while :
8381 do
8382   ac_lines=`grep -c . conftest.vals`
8383   # grep -c gives empty output for an empty file on some AIX systems.
8384   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8385   # Write a limited-size here document to conftest.frag.
8386   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8387   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8388   echo 'CEOF
8389   sed -f conftest.frag conftest.in > conftest.out
8390   rm -f conftest.in
8391   mv conftest.out conftest.in
8392 ' >> $CONFIG_STATUS
8393   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8394   rm -f conftest.vals
8395   mv conftest.tail conftest.vals
8396 done
8397 rm -f conftest.vals
8398
8399 cat >> $CONFIG_STATUS <<\EOF
8400   rm -f conftest.frag conftest.h
8401   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8402   cat conftest.in >> conftest.h
8403   rm -f conftest.in
8404   if cmp -s $ac_file conftest.h 2>/dev/null; then
8405     echo "$ac_file is unchanged"
8406     rm -f conftest.h
8407   else
8408     # Remove last slash and all that follows it.  Not all systems have dirname.
8409       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8410       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8411       # The file is in a subdirectory.
8412       test ! -d "$ac_dir" && mkdir "$ac_dir"
8413     fi
8414     rm -f $ac_file
8415     mv conftest.h $ac_file
8416   fi
8417 fi; done
8418
8419 EOF
8420 cat >> $CONFIG_STATUS <<EOF
8421 subdirs='$subdirs'
8422 symbolic_link='$symbolic_link'
8423
8424 EOF
8425 cat >> $CONFIG_STATUS <<\EOF
8426
8427 case x$CONFIG_HEADERS in
8428 xauto-host.h:config.in)
8429 echo > cstamp-h ;;
8430 esac
8431 # Make sure all the subdirs exist.
8432 for d in $subdirs
8433 do
8434     test -d $d || mkdir $d
8435 done
8436 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8437 # bootstrapping and the installation procedure can still use
8438 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
8439 # FLAGS_TO_PASS has been modified to solve the problem there.
8440 # This is virtually a duplicate of what happens in configure.lang; we do
8441 # an extra check to make sure this only happens if ln -s can be used.
8442 if test "$symbolic_link" = "ln -s"; then
8443  for d in ${subdirs} fixinc ; do
8444         STARTDIR=`${PWDCMD-pwd}`
8445         cd $d
8446         for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
8447         do
8448                 rm -f $t
8449                 $symbolic_link ../$t $t 2>/dev/null
8450         done
8451         cd $STARTDIR
8452  done
8453 else true ; fi
8454
8455 exit 0
8456 EOF
8457 chmod +x $CONFIG_STATUS
8458 rm -fr confdefs* $ac_clean_files
8459 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8460