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