OSDN Git Service

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