OSDN Git Service

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