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