OSDN Git Service

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