OSDN Git Service

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