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