OSDN Git Service

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