OSDN Git Service

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