OSDN Git Service

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