OSDN Git Service

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