OSDN Git Service

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