OSDN Git Service

* configure.in: Probe for times, clock, struct tms, and clock_t.
[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
1656 # sizeof(char) is 1 by definition.
1657 echo $ac_n "checking size of short""... $ac_c" 1>&6
1658 echo "configure:1659: checking size of short" >&5
1659 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1660   echo $ac_n "(cached) $ac_c" 1>&6
1661 else
1662   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
1663   cat > conftest.$ac_ext <<EOF
1664 #line 1665 "configure"
1665 #include "confdefs.h"
1666 #include "confdefs.h"
1667 #include <sys/types.h>
1668
1669
1670 int main() {
1671 switch (0) case 0: case (sizeof (short) == $ac_size):;
1672 ; return 0; }
1673 EOF
1674 if { (eval echo configure:1675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1675   rm -rf conftest*
1676   ac_cv_sizeof_short=$ac_size
1677 else
1678   echo "configure: failed program was:" >&5
1679   cat conftest.$ac_ext >&5
1680 fi
1681 rm -f conftest*
1682   if test x$ac_cv_sizeof_short != x ; then break; fi
1683 done
1684
1685 fi
1686
1687 if test x$ac_cv_sizeof_short = x ; then
1688   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1689 fi
1690 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1691 cat >> confdefs.h <<EOF
1692 #define SIZEOF_SHORT $ac_cv_sizeof_short
1693 EOF
1694
1695
1696 echo $ac_n "checking size of int""... $ac_c" 1>&6
1697 echo "configure:1698: checking size of int" >&5
1698 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
1702   cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include "confdefs.h"
1706 #include <sys/types.h>
1707
1708
1709 int main() {
1710 switch (0) case 0: case (sizeof (int) == $ac_size):;
1711 ; return 0; }
1712 EOF
1713 if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1714   rm -rf conftest*
1715   ac_cv_sizeof_int=$ac_size
1716 else
1717   echo "configure: failed program was:" >&5
1718   cat conftest.$ac_ext >&5
1719 fi
1720 rm -f conftest*
1721   if test x$ac_cv_sizeof_int != x ; then break; fi
1722 done
1723
1724 fi
1725
1726 if test x$ac_cv_sizeof_int = x ; then
1727   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1728 fi
1729 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1730 cat >> confdefs.h <<EOF
1731 #define SIZEOF_INT $ac_cv_sizeof_int
1732 EOF
1733
1734
1735 echo $ac_n "checking size of long""... $ac_c" 1>&6
1736 echo "configure:1737: checking size of long" >&5
1737 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1738   echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
1741   cat > conftest.$ac_ext <<EOF
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744 #include "confdefs.h"
1745 #include <sys/types.h>
1746
1747
1748 int main() {
1749 switch (0) case 0: case (sizeof (long) == $ac_size):;
1750 ; return 0; }
1751 EOF
1752 if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1753   rm -rf conftest*
1754   ac_cv_sizeof_long=$ac_size
1755 else
1756   echo "configure: failed program was:" >&5
1757   cat conftest.$ac_ext >&5
1758 fi
1759 rm -f conftest*
1760   if test x$ac_cv_sizeof_long != x ; then break; fi
1761 done
1762
1763 fi
1764
1765 if test x$ac_cv_sizeof_long = x ; then
1766   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1767 fi
1768 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1769 cat >> confdefs.h <<EOF
1770 #define SIZEOF_LONG $ac_cv_sizeof_long
1771 EOF
1772
1773
1774 if test $ac_cv_c_long_long = yes; then
1775   echo $ac_n "checking size of long long""... $ac_c" 1>&6
1776 echo "configure:1777: checking size of long long" >&5
1777 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1778   echo $ac_n "(cached) $ac_c" 1>&6
1779 else
1780   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
1781   cat > conftest.$ac_ext <<EOF
1782 #line 1783 "configure"
1783 #include "confdefs.h"
1784 #include "confdefs.h"
1785 #include <sys/types.h>
1786
1787
1788 int main() {
1789 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1790 ; return 0; }
1791 EOF
1792 if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1793   rm -rf conftest*
1794   ac_cv_sizeof_long_long=$ac_size
1795 else
1796   echo "configure: failed program was:" >&5
1797   cat conftest.$ac_ext >&5
1798 fi
1799 rm -f conftest*
1800   if test x$ac_cv_sizeof_long_long != x ; then break; fi
1801 done
1802
1803 fi
1804
1805 if test x$ac_cv_sizeof_long_long = x ; then
1806   { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1807 fi
1808 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1809 cat >> confdefs.h <<EOF
1810 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1811 EOF
1812
1813
1814 fi
1815 if test $ac_cv_c___int64 = yes; then
1816   echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1817 echo "configure:1818: checking size of __int64" >&5
1818 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1819   echo $ac_n "(cached) $ac_c" 1>&6
1820 else
1821   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
1822   cat > conftest.$ac_ext <<EOF
1823 #line 1824 "configure"
1824 #include "confdefs.h"
1825 #include "confdefs.h"
1826 #include <sys/types.h>
1827
1828
1829 int main() {
1830 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1834   rm -rf conftest*
1835   ac_cv_sizeof___int64=$ac_size
1836 else
1837   echo "configure: failed program was:" >&5
1838   cat conftest.$ac_ext >&5
1839 fi
1840 rm -f conftest*
1841   if test x$ac_cv_sizeof___int64 != x ; then break; fi
1842 done
1843
1844 fi
1845
1846 if test x$ac_cv_sizeof___int64 = x ; then
1847   { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1848 fi
1849 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1850 cat >> confdefs.h <<EOF
1851 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1852 EOF
1853
1854
1855 fi
1856
1857 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1858 echo "configure:1859: checking execution character set" >&5
1859 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1860   echo $ac_n "(cached) $ac_c" 1>&6
1861 else
1862   cat > conftest.$ac_ext <<EOF
1863 #line 1864 "configure"
1864 #include "confdefs.h"
1865 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1866    && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1867 ASCII
1868 #endif
1869 EOF
1870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1871   egrep "ASCII" >/dev/null 2>&1; then
1872   rm -rf conftest*
1873   ac_cv_c_charset=ASCII
1874 fi
1875 rm -f conftest*
1876
1877   if test x${ac_cv_c_charset+set} != xset; then
1878     cat > conftest.$ac_ext <<EOF
1879 #line 1880 "configure"
1880 #include "confdefs.h"
1881 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1882    && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1883 EBCDIC
1884 #endif
1885 EOF
1886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1887   egrep "EBCDIC" >/dev/null 2>&1; then
1888   rm -rf conftest*
1889   ac_cv_c_charset=EBCDIC
1890 fi
1891 rm -f conftest*
1892
1893   fi
1894   if test x${ac_cv_c_charset+set} != xset; then
1895     ac_cv_c_charset=unknown
1896   fi
1897 fi
1898
1899 echo "$ac_t""$ac_cv_c_charset" 1>&6
1900 if test $ac_cv_c_charset = unknown; then
1901   { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1902 elif test $ac_cv_c_charset = EBCDIC; then
1903   cat >> confdefs.h <<\EOF
1904 #define HOST_EBCDIC 1
1905 EOF
1906
1907 fi
1908
1909 # If the native compiler is GCC, we can enable warnings even in stage1.  
1910 # That's useful for people building cross-compilers, or just running a
1911 # quick `make'.
1912 warn_cflags=
1913 if test "x$GCC" = "xyes"; then
1914   warn_cflags='$(GCC_WARN_CFLAGS)'
1915 fi
1916
1917
1918 # Stage specific cflags for build.
1919 stage1_cflags=
1920 case $build in
1921 vax-*-*)
1922   if test x$GCC = xyes
1923   then
1924     stage1_cflags="-Wa,-J"
1925   else
1926     stage1_cflags="-J"
1927   fi
1928   ;;
1929 esac
1930
1931
1932 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1933 echo "configure:1934: checking whether ${MAKE-make} sets \${MAKE}" >&5
1934 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1935 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1936   echo $ac_n "(cached) $ac_c" 1>&6
1937 else
1938   cat > conftestmake <<\EOF
1939 all:
1940         @echo 'ac_maketemp="${MAKE}"'
1941 EOF
1942 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1943 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1944 if test -n "$ac_maketemp"; then
1945   eval ac_cv_prog_make_${ac_make}_set=yes
1946 else
1947   eval ac_cv_prog_make_${ac_make}_set=no
1948 fi
1949 rm -f conftestmake
1950 fi
1951 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1952   echo "$ac_t""yes" 1>&6
1953   SET_MAKE=
1954 else
1955   echo "$ac_t""no" 1>&6
1956   SET_MAKE="MAKE=${MAKE-make}"
1957 fi
1958
1959
1960 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether a default assembler was specified" >&5
1962 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1963     if test x"$gas_flag" = x"no"; then
1964         echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1965     else
1966         echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1967     fi
1968 else
1969     echo "$ac_t""no" 1>&6
1970 fi
1971
1972 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1973 echo "configure:1974: checking whether a default linker was specified" >&5
1974 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1975     if test x"$gnu_ld_flag" = x"no"; then
1976         echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1977     else
1978         echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1979     fi
1980 else
1981     echo "$ac_t""no" 1>&6
1982 fi
1983
1984 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
1985 echo "configure:1986: checking for GNU C library" >&5
1986 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
1987   echo $ac_n "(cached) $ac_c" 1>&6
1988 else
1989   cat > conftest.$ac_ext <<EOF
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992 #include <features.h>
1993 int main() {
1994
1995 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
1996 #error Not a GNU C library system
1997 #endif
1998 ; return 0; }
1999 EOF
2000 if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2001   rm -rf conftest*
2002   gcc_cv_glibc=yes
2003 else
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   rm -rf conftest*
2007   gcc_cv_glibc=no
2008 fi
2009 rm -f conftest*
2010 fi
2011
2012 echo "$ac_t""$gcc_cv_glibc" 1>&6
2013 if test $gcc_cv_glibc = yes; then
2014   cat >> confdefs.h <<\EOF
2015 #define _GNU_SOURCE 1
2016 EOF
2017
2018 fi
2019
2020 # Find some useful tools
2021 for ac_prog in mawk gawk nawk awk
2022 do
2023 # Extract the first word of "$ac_prog", so it can be a program name with args.
2024 set dummy $ac_prog; ac_word=$2
2025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2026 echo "configure:2027: checking for $ac_word" >&5
2027 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2028   echo $ac_n "(cached) $ac_c" 1>&6
2029 else
2030   if test -n "$AWK"; then
2031   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2032 else
2033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2034   ac_dummy="$PATH"
2035   for ac_dir in $ac_dummy; do
2036     test -z "$ac_dir" && ac_dir=.
2037     if test -f $ac_dir/$ac_word; then
2038       ac_cv_prog_AWK="$ac_prog"
2039       break
2040     fi
2041   done
2042   IFS="$ac_save_ifs"
2043 fi
2044 fi
2045 AWK="$ac_cv_prog_AWK"
2046 if test -n "$AWK"; then
2047   echo "$ac_t""$AWK" 1>&6
2048 else
2049   echo "$ac_t""no" 1>&6
2050 fi
2051
2052 test -n "$AWK" && break
2053 done
2054
2055 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2056 echo "configure:2057: checking whether ln works" >&5
2057 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2058   echo $ac_n "(cached) $ac_c" 1>&6
2059 else
2060   rm -f conftestdata_t
2061 echo >conftestdata_f
2062 if ln conftestdata_f conftestdata_t 2>/dev/null
2063 then
2064   gcc_cv_prog_LN="ln"
2065 else
2066   if ln -s conftestdata_f conftestdata_t 2>/dev/null
2067   then
2068     gcc_cv_prog_LN="ln -s"
2069   else
2070     gcc_cv_prog_LN=cp
2071   fi
2072 fi
2073 rm -f conftestdata_f conftestdata_t
2074
2075 fi
2076 LN="$gcc_cv_prog_LN"
2077 if test "$gcc_cv_prog_LN" = "ln"; then
2078   echo "$ac_t""yes" 1>&6
2079 else
2080   if test "$gcc_cv_prog_LN" = "ln -s"; then
2081     echo "$ac_t""no, using ln -s" 1>&6
2082   else
2083     echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2084   fi
2085 fi
2086
2087 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2088 echo "configure:2089: checking whether ln -s works" >&5
2089 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2090   echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092   rm -f conftestdata_t
2093 echo >conftestdata_f
2094 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2095 then
2096   gcc_cv_prog_LN_S="ln -s"
2097 else
2098   if ln conftestdata_f conftestdata_t 2>/dev/null
2099   then
2100     gcc_cv_prog_LN_S=ln
2101   else
2102     gcc_cv_prog_LN_S=cp
2103   fi
2104 fi
2105 rm -f conftestdata_f conftestdata_t
2106
2107 fi
2108 LN_S="$gcc_cv_prog_LN_S"
2109 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2110   echo "$ac_t""yes" 1>&6
2111 else
2112   if test "$gcc_cv_prog_LN_S" = "ln"; then
2113     echo "$ac_t""no, using ln" 1>&6
2114   else
2115     echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2116   fi
2117 fi
2118
2119 # Extract the first word of "ranlib", so it can be a program name with args.
2120 set dummy ranlib; ac_word=$2
2121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_word" >&5
2123 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2124   echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126   if test -n "$RANLIB"; then
2127   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2128 else
2129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2130   ac_dummy="$PATH"
2131   for ac_dir in $ac_dummy; do
2132     test -z "$ac_dir" && ac_dir=.
2133     if test -f $ac_dir/$ac_word; then
2134       ac_cv_prog_RANLIB="ranlib"
2135       break
2136     fi
2137   done
2138   IFS="$ac_save_ifs"
2139   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2140 fi
2141 fi
2142 RANLIB="$ac_cv_prog_RANLIB"
2143 if test -n "$RANLIB"; then
2144   echo "$ac_t""$RANLIB" 1>&6
2145 else
2146   echo "$ac_t""no" 1>&6
2147 fi
2148
2149 # Find a good install program.  We prefer a C program (faster),
2150 # so one script is as good as another.  But avoid the broken or
2151 # incompatible versions:
2152 # SysV /etc/install, /usr/sbin/install
2153 # SunOS /usr/etc/install
2154 # IRIX /sbin/install
2155 # AIX /bin/install
2156 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2157 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2158 # ./install, which can be erroneously created by make from ./install.sh.
2159 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2160 echo "configure:2161: checking for a BSD compatible install" >&5
2161 if test -z "$INSTALL"; then
2162 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2163   echo $ac_n "(cached) $ac_c" 1>&6
2164 else
2165     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2166   for ac_dir in $PATH; do
2167     # Account for people who put trailing slashes in PATH elements.
2168     case "$ac_dir/" in
2169     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2170     *)
2171       # OSF1 and SCO ODT 3.0 have their own names for install.
2172       for ac_prog in ginstall scoinst install; do
2173         if test -f $ac_dir/$ac_prog; then
2174           if test $ac_prog = install &&
2175             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2176             # AIX install.  It has an incompatible calling convention.
2177             # OSF/1 installbsd also uses dspmsg, but is usable.
2178             :
2179           else
2180             ac_cv_path_install="$ac_dir/$ac_prog -c"
2181             break 2
2182           fi
2183         fi
2184       done
2185       ;;
2186     esac
2187   done
2188   IFS="$ac_save_IFS"
2189
2190 fi
2191   if test "${ac_cv_path_install+set}" = set; then
2192     INSTALL="$ac_cv_path_install"
2193   else
2194     # As a last resort, use the slow shell script.  We don't cache a
2195     # path for INSTALL within a source directory, because that will
2196     # break other packages using the cache if that directory is
2197     # removed, or if the path is relative.
2198     INSTALL="$ac_install_sh"
2199   fi
2200 fi
2201 echo "$ac_t""$INSTALL" 1>&6
2202
2203 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2204 # It thinks the first close brace ends the variable substitution.
2205 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2206
2207 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2208
2209
2210 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2211 echo "configure:2212: checking for ANSI C header files" >&5
2212 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2213   echo $ac_n "(cached) $ac_c" 1>&6
2214 else
2215   cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <stdlib.h>
2219 #include <stdarg.h>
2220 #include <string.h>
2221 #include <float.h>
2222 EOF
2223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2224 { (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2226 if test -z "$ac_err"; then
2227   rm -rf conftest*
2228   ac_cv_header_stdc=yes
2229 else
2230   echo "$ac_err" >&5
2231   echo "configure: failed program was:" >&5
2232   cat conftest.$ac_ext >&5
2233   rm -rf conftest*
2234   ac_cv_header_stdc=no
2235 fi
2236 rm -f conftest*
2237
2238 if test $ac_cv_header_stdc = yes; then
2239   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2240 cat > conftest.$ac_ext <<EOF
2241 #line 2242 "configure"
2242 #include "confdefs.h"
2243 #include <string.h>
2244 EOF
2245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2246   egrep "memchr" >/dev/null 2>&1; then
2247   :
2248 else
2249   rm -rf conftest*
2250   ac_cv_header_stdc=no
2251 fi
2252 rm -f conftest*
2253
2254 fi
2255
2256 if test $ac_cv_header_stdc = yes; then
2257   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2258 cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 #include <stdlib.h>
2262 EOF
2263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2264   egrep "free" >/dev/null 2>&1; then
2265   :
2266 else
2267   rm -rf conftest*
2268   ac_cv_header_stdc=no
2269 fi
2270 rm -f conftest*
2271
2272 fi
2273
2274 if test $ac_cv_header_stdc = yes; then
2275   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2276 if test "$cross_compiling" = yes; then
2277   :
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <ctype.h>
2283 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2284 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2285 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2286 int main () { int i; for (i = 0; i < 256; i++)
2287 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2288 exit (0); }
2289
2290 EOF
2291 if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2292 then
2293   :
2294 else
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -fr conftest*
2298   ac_cv_header_stdc=no
2299 fi
2300 rm -fr conftest*
2301 fi
2302
2303 fi
2304 fi
2305
2306 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2307 if test $ac_cv_header_stdc = yes; then
2308   cat >> confdefs.h <<\EOF
2309 #define STDC_HEADERS 1
2310 EOF
2311
2312 fi
2313
2314 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2315 echo "configure:2316: checking whether time.h and sys/time.h may both be included" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <sys/types.h>
2323 #include <sys/time.h>
2324 #include <time.h>
2325 int main() {
2326 struct tm *tp;
2327 ; return 0; }
2328 EOF
2329 if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2330   rm -rf conftest*
2331   ac_cv_header_time=yes
2332 else
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   ac_cv_header_time=no
2337 fi
2338 rm -f conftest*
2339 fi
2340
2341 echo "$ac_t""$ac_cv_header_time" 1>&6
2342 if test $ac_cv_header_time = yes; then
2343   cat >> confdefs.h <<\EOF
2344 #define TIME_WITH_SYS_TIME 1
2345 EOF
2346
2347 fi
2348
2349 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2350 echo "configure:2351: checking whether string.h and strings.h may both be included" >&5
2351 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2352   echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354   cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #include <string.h>
2358 #include <strings.h>
2359 int main() {
2360
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   gcc_cv_header_string=yes
2366 else
2367   echo "configure: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   rm -rf conftest*
2370   gcc_cv_header_string=no
2371 fi
2372 rm -f conftest*
2373 fi
2374
2375 echo "$ac_t""$gcc_cv_header_string" 1>&6
2376 if test $gcc_cv_header_string = yes; then
2377   cat >> confdefs.h <<\EOF
2378 #define STRING_WITH_STRINGS 1
2379 EOF
2380
2381 fi
2382
2383 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2384 echo "configure:2385: checking for sys/wait.h that is POSIX.1 compatible" >&5
2385 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_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 <sys/types.h>
2392 #include <sys/wait.h>
2393 #ifndef WEXITSTATUS
2394 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2395 #endif
2396 #ifndef WIFEXITED
2397 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2398 #endif
2399 int main() {
2400 int s;
2401 wait (&s);
2402 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2403 ; return 0; }
2404 EOF
2405 if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2406   rm -rf conftest*
2407   ac_cv_header_sys_wait_h=yes
2408 else
2409   echo "configure: failed program was:" >&5
2410   cat conftest.$ac_ext >&5
2411   rm -rf conftest*
2412   ac_cv_header_sys_wait_h=no
2413 fi
2414 rm -f conftest*
2415 fi
2416
2417 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2418 if test $ac_cv_header_sys_wait_h = yes; then
2419   cat >> confdefs.h <<\EOF
2420 #define HAVE_SYS_WAIT_H 1
2421 EOF
2422
2423 fi
2424
2425 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2426                  fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2427                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
2428                  direct.h malloc.h langinfo.h iconv.h stdbool.h
2429 do
2430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2432 echo "configure:2433: checking for $ac_hdr" >&5
2433 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2434   echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436   cat > conftest.$ac_ext <<EOF
2437 #line 2438 "configure"
2438 #include "confdefs.h"
2439 #include <$ac_hdr>
2440 EOF
2441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2442 { (eval echo configure:2443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2444 if test -z "$ac_err"; then
2445   rm -rf conftest*
2446   eval "ac_cv_header_$ac_safe=yes"
2447 else
2448   echo "$ac_err" >&5
2449   echo "configure: failed program was:" >&5
2450   cat conftest.$ac_ext >&5
2451   rm -rf conftest*
2452   eval "ac_cv_header_$ac_safe=no"
2453 fi
2454 rm -f conftest*
2455 fi
2456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2457   echo "$ac_t""yes" 1>&6
2458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2459   cat >> confdefs.h <<EOF
2460 #define $ac_tr_hdr 1
2461 EOF
2462  
2463 else
2464   echo "$ac_t""no" 1>&6
2465 fi
2466 done
2467
2468
2469 # Check for thread headers.
2470 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2471 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2472 echo "configure:2473: checking for thread.h" >&5
2473 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   cat > conftest.$ac_ext <<EOF
2477 #line 2478 "configure"
2478 #include "confdefs.h"
2479 #include <thread.h>
2480 EOF
2481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2482 { (eval echo configure:2483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2484 if test -z "$ac_err"; then
2485   rm -rf conftest*
2486   eval "ac_cv_header_$ac_safe=yes"
2487 else
2488   echo "$ac_err" >&5
2489   echo "configure: failed program was:" >&5
2490   cat conftest.$ac_ext >&5
2491   rm -rf conftest*
2492   eval "ac_cv_header_$ac_safe=no"
2493 fi
2494 rm -f conftest*
2495 fi
2496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2497   echo "$ac_t""yes" 1>&6
2498   have_thread_h=yes
2499 else
2500   echo "$ac_t""no" 1>&6
2501 have_thread_h=
2502 fi
2503
2504 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2505 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2506 echo "configure:2507: checking for pthread.h" >&5
2507 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #include <pthread.h>
2514 EOF
2515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516 { (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518 if test -z "$ac_err"; then
2519   rm -rf conftest*
2520   eval "ac_cv_header_$ac_safe=yes"
2521 else
2522   echo "$ac_err" >&5
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -rf conftest*
2526   eval "ac_cv_header_$ac_safe=no"
2527 fi
2528 rm -f conftest*
2529 fi
2530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2531   echo "$ac_t""yes" 1>&6
2532   have_pthread_h=yes
2533 else
2534   echo "$ac_t""no" 1>&6
2535 have_pthread_h=
2536 fi
2537
2538
2539 # These tests can't be done till we know if we have limits.h.
2540 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2541 echo "configure:2542: checking for CHAR_BIT" >&5
2542 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   cat > conftest.$ac_ext <<EOF
2546 #line 2547 "configure"
2547 #include "confdefs.h"
2548 #ifdef HAVE_LIMITS_H
2549 #include <limits.h>
2550 #endif
2551 #ifdef CHAR_BIT
2552 found
2553 #endif
2554 EOF
2555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2556   egrep "found" >/dev/null 2>&1; then
2557   rm -rf conftest*
2558   gcc_cv_decl_char_bit=yes
2559 else
2560   rm -rf conftest*
2561   gcc_cv_decl_char_bit=no
2562 fi
2563 rm -f conftest*
2564
2565
2566 fi
2567
2568 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2569 if test $gcc_cv_decl_char_bit = no; then
2570   echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2571 echo "configure:2572: checking number of bits in a byte" >&5
2572 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2573   echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575   i=8
2576  gcc_cv_c_nbby=
2577  while test $i -lt 65; do
2578    cat > conftest.$ac_ext <<EOF
2579 #line 2580 "configure"
2580 #include "confdefs.h"
2581
2582 int main() {
2583 switch(0) { case 0: case (char)(1 << $i) && (char)(1 << $i) != 1: ; }
2584 ; return 0; }
2585 EOF
2586 if { (eval echo configure:2587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2587   rm -rf conftest*
2588   gcc_cv_c_nbby=$i
2589          break
2590 else
2591   echo "configure: failed program was:" >&5
2592   cat conftest.$ac_ext >&5
2593 fi
2594 rm -f conftest*
2595    i=`expr $i + 1`
2596  done
2597  test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2598
2599 fi
2600
2601 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2602 if test $gcc_cv_c_nbby = failed; then
2603   { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2604 else
2605   cat >> confdefs.h <<EOF
2606 #define CHAR_BIT $gcc_cv_c_nbby
2607 EOF
2608
2609 fi
2610 fi
2611 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2612 echo "configure:2613: checking byte ordering" >&5
2613 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2614   echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616   ac_cv_c_compile_endian=unknown
2617
2618 ac_ext=c
2619 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2620 ac_cpp='$CPP $CPPFLAGS'
2621 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2622 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2623 cross_compiling=$ac_cv_prog_cc_cross
2624
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628
2629 #ifdef HAVE_LIMITS_H
2630 # include <limits.h>
2631 #endif
2632 /* This structure must have no internal padding.  */
2633   struct {
2634     char prefix[sizeof "\nendian:" - 1];
2635     short word;
2636     char postfix[2];
2637  } tester = {
2638     "\nendian:",
2639 #if SIZEOF_SHORT == 4
2640     ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2641 #endif
2642     ('A' << CHAR_BIT) | 'B',
2643     'X', '\n'
2644 };
2645 EOF
2646 if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2647   od -c conftest.o |
2648     sed 's/^[0-7]*[     ]*/ /
2649           s/\*/./g
2650           s/ \\n/*/g
2651           s/ [0-9][0-9][0-9]/./g
2652           s/  \\[^ ]/./g' |
2653     tr -d '
2654  ' | tr -s '*' '
2655 ' | fold | sed '$a\
2656 ' > conftest.dmp
2657   if   grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2658     ac_cv_c_compile_endian=big-endian
2659   elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2660     ac_cv_c_compile_endian=little-endian
2661   fi
2662 fi
2663 rm -rf conftest*
2664 ac_ext=c
2665 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2666 ac_cpp='$CPP $CPPFLAGS'
2667 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2668 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2669 cross_compiling=$ac_cv_prog_cc_cross
2670
2671
2672 fi
2673
2674 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2675 if test $ac_cv_c_compile_endian = unknown; then
2676   { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2677 elif test $ac_cv_c_compile_endian = big-endian; then
2678   cat >> confdefs.h <<\EOF
2679 #define HOST_WORDS_BIG_ENDIAN 1
2680 EOF
2681
2682 fi
2683
2684 echo $ac_n "checking floating point format""... $ac_c" 1>&6
2685 echo "configure:2686: checking floating point format" >&5
2686 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2687   echo $ac_n "(cached) $ac_c" 1>&6
2688 else
2689   
2690 ac_ext=c
2691 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2692 ac_cpp='$CPP $CPPFLAGS'
2693 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2694 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2695 cross_compiling=$ac_cv_prog_cc_cross
2696
2697 cat > conftest.$ac_ext <<EOF
2698 #line 2699 "configure"
2699 #include "confdefs.h"
2700 /* This will not work unless sizeof(double) == 8.  */
2701 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2702
2703 /* This structure must have no internal padding.  */
2704 struct possibility {
2705   char prefix[8];
2706   double candidate;
2707   char postfix[8];
2708 };
2709
2710 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
2711 struct possibility table [] =
2712 {
2713   C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
2714   C( 3.53802595280598432000e+18), /* D__float - VAX */
2715   C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
2716   C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
2717   C(-5.22995989424860458374e+10)  /* IBMHEXFP - s/390 format, EBCDIC */
2718 };
2719 EOF
2720 if { (eval echo configure:2721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2721   od -c conftest.o |
2722     sed 's/^[0-7]*[     ]*/ /
2723           s/\*/./g
2724           s/ \\n/*/g
2725           s/ [0-9][0-9][0-9]/./g
2726           s/  \\[^ ]/./g' |
2727     tr -d '
2728  ' | tr -s '*' '
2729 ' | fold | sed '$a\
2730 ' > conftest.dmp
2731   if   grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2732     ac_cv_c_float_format='IEEE (big-endian)'
2733   elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
2734     ac_cv_c_float_format='IEEE (big-endian)'
2735   elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
2736     ac_cv_c_float_format='IEEE (little-endian)'
2737   elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
2738     ac_cv_c_float_format='IEEE (little-endian)'
2739   elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
2740     ac_cv_c_float_format='VAX D-float'
2741   elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
2742     ac_cv_c_float_format='PDP-10'
2743   elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2744     ac_cv_c_float_format='IBM 370 hex'
2745   else
2746     { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
2747   fi
2748 else
2749   { echo "configure: error: compile failed" 1>&2; exit 1; }
2750 fi
2751 rm -rf conftest*
2752 ac_ext=c
2753 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2754 ac_cpp='$CPP $CPPFLAGS'
2755 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2756 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2757 cross_compiling=$ac_cv_prog_cc_cross
2758
2759
2760 fi
2761
2762 echo "$ac_t""$ac_cv_c_float_format" 1>&6
2763 # IEEE is the default format.  If the float endianness isn't the same
2764 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
2765 # (which is a tristate: yes, no, default).  This is only an issue with
2766 # IEEE; the other formats are only supported by a few machines each,
2767 # all with the same endianness.
2768 format=
2769 fbigend=
2770 case $ac_cv_c_float_format in
2771     'IEEE (big-endian)' )
2772         if test $ac_cv_c_compile_endian = little-endian; then
2773             fbigend=1
2774         fi
2775         ;;
2776     'IEEE (little-endian)' )
2777         if test $ac_cv_c_compile_endian = big-endian; then
2778             fbigend=0
2779         fi
2780         ;;
2781     'VAX D-float' )
2782         format=VAX_FLOAT_FORMAT
2783         ;;
2784     'PDP-10' )
2785         format=PDP10_FLOAT_FORMAT
2786         ;;
2787     'IBM 370 hex' )
2788         format=IBM_FLOAT_FORMAT
2789         ;;
2790 esac
2791 if test -n "$format"; then
2792         cat >> confdefs.h <<EOF
2793 #define HOST_FLOAT_FORMAT $format
2794 EOF
2795
2796 fi
2797 if test -n "$fbigend"; then
2798         cat >> confdefs.h <<EOF
2799 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
2800 EOF
2801
2802 fi
2803
2804
2805 # See if GNAT has been installed
2806 # Extract the first word of "gnatbind", so it can be a program name with args.
2807 set dummy gnatbind; ac_word=$2
2808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2809 echo "configure:2810: checking for $ac_word" >&5
2810 if eval "test \"`echo '$''{'ac_cv_prog_have_gnat'+set}'`\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   if test -n "$have_gnat"; then
2814   ac_cv_prog_have_gnat="$have_gnat" # Let the user override the test.
2815 else
2816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2817   ac_dummy="$PATH"
2818   for ac_dir in $ac_dummy; do
2819     test -z "$ac_dir" && ac_dir=.
2820     if test -f $ac_dir/$ac_word; then
2821       ac_cv_prog_have_gnat="yes"
2822       break
2823     fi
2824   done
2825   IFS="$ac_save_ifs"
2826   test -z "$ac_cv_prog_have_gnat" && ac_cv_prog_have_gnat="no"
2827 fi
2828 fi
2829 have_gnat="$ac_cv_prog_have_gnat"
2830 if test -n "$have_gnat"; then
2831   echo "$ac_t""$have_gnat" 1>&6
2832 else
2833   echo "$ac_t""no" 1>&6
2834 fi
2835
2836
2837 # See if we have the mktemp command.
2838 # Extract the first word of "mktemp", so it can be a program name with args.
2839 set dummy mktemp; ac_word=$2
2840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2841 echo "configure:2842: checking for $ac_word" >&5
2842 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2843   echo $ac_n "(cached) $ac_c" 1>&6
2844 else
2845   if test -n "$have_mktemp_command"; then
2846   ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2847 else
2848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2849   ac_dummy="$PATH"
2850   for ac_dir in $ac_dummy; do
2851     test -z "$ac_dir" && ac_dir=.
2852     if test -f $ac_dir/$ac_word; then
2853       ac_cv_prog_have_mktemp_command="yes"
2854       break
2855     fi
2856   done
2857   IFS="$ac_save_ifs"
2858   test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2859 fi
2860 fi
2861 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2862 if test -n "$have_mktemp_command"; then
2863   echo "$ac_t""$have_mktemp_command" 1>&6
2864 else
2865   echo "$ac_t""no" 1>&6
2866 fi
2867
2868
2869 # Do we have a single-tree copy of texinfo?
2870 if test -f $srcdir/../texinfo/Makefile.in; then
2871   MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2872   gcc_cv_prog_makeinfo_modern=yes
2873   echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2874 else
2875   # See if makeinfo has been installed and is modern enough
2876   # that we can use it.
2877   # Extract the first word of "makeinfo", so it can be a program name with args.
2878 set dummy makeinfo; ac_word=$2
2879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2880 echo "configure:2881: checking for $ac_word" >&5
2881 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   if test -n "$MAKEINFO"; then
2885   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2886 else
2887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2888   ac_dummy="$PATH"
2889   for ac_dir in $ac_dummy; do
2890     test -z "$ac_dir" && ac_dir=.
2891     if test -f $ac_dir/$ac_word; then
2892       ac_cv_prog_MAKEINFO="makeinfo"
2893       break
2894     fi
2895   done
2896   IFS="$ac_save_ifs"
2897 fi
2898 fi
2899 MAKEINFO="$ac_cv_prog_MAKEINFO"
2900 if test -n "$MAKEINFO"; then
2901   echo "$ac_t""$MAKEINFO" 1>&6
2902 else
2903   echo "$ac_t""no" 1>&6
2904 fi
2905
2906 if test -n "$MAKEINFO"; then
2907   # Found it, now check the version.
2908   echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2909 echo "configure:2910: checking for modern makeinfo" >&5
2910 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913     ac_prog_version=`$MAKEINFO --version 2>&1 |
2914                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2915   echo "configure:2916: version of makeinfo is $ac_prog_version" >&5
2916   case $ac_prog_version in
2917     '')     gcc_cv_prog_makeinfo_modern=no;;
2918     4.*)
2919             gcc_cv_prog_makeinfo_modern=yes;;
2920     *)      gcc_cv_prog_makeinfo_modern=no;;
2921   esac
2922
2923 fi
2924
2925 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2926 else
2927   gcc_cv_prog_makeinfo_modern=no
2928 fi
2929
2930 fi
2931
2932 if test $gcc_cv_prog_makeinfo_modern = no; then
2933   echo "configure: warning: 
2934 *** Makeinfo is missing or too old.
2935 *** Info documentation will not be built." 1>&2
2936   BUILD_INFO=
2937 else
2938   BUILD_INFO=info               
2939 fi
2940
2941 # Is pod2man recent enough to regenerate manpages?
2942 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2943 echo "configure:2944: checking for recent Pod::Man" >&5
2944 if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
2945   echo "$ac_t""yes" 1>&6
2946   GENERATED_MANPAGES=generated-manpages         
2947 else
2948   echo "$ac_t""no" 1>&6
2949   GENERATED_MANPAGES=
2950 fi
2951
2952 # How about lex?
2953 if test -f $srcdir/../flex/skel.c; then
2954   FLEX='$(objdir)/../flex/flex'
2955 else
2956   # Extract the first word of "flex", so it can be a program name with args.
2957 set dummy flex; ac_word=$2
2958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2959 echo "configure:2960: checking for $ac_word" >&5
2960 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2961   echo $ac_n "(cached) $ac_c" 1>&6
2962 else
2963   if test -n "$FLEX"; then
2964   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2965 else
2966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2967   ac_dummy="$PATH"
2968   for ac_dir in $ac_dummy; do
2969     test -z "$ac_dir" && ac_dir=.
2970     if test -f $ac_dir/$ac_word; then
2971       ac_cv_prog_FLEX="flex"
2972       break
2973     fi
2974   done
2975   IFS="$ac_save_ifs"
2976   test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2977 fi
2978 fi
2979 FLEX="$ac_cv_prog_FLEX"
2980 if test -n "$FLEX"; then
2981   echo "$ac_t""$FLEX" 1>&6
2982 else
2983   echo "$ac_t""no" 1>&6
2984 fi
2985
2986 fi
2987
2988 # Bison?
2989 # The -L switch is so bison can find its skeleton file.
2990 if test -f $srcdir/../bison/bison.simple; then
2991   BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2992 else
2993   # Extract the first word of "bison", so it can be a program name with args.
2994 set dummy bison; ac_word=$2
2995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $ac_word" >&5
2997 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   if test -n "$BISON"; then
3001   ac_cv_prog_BISON="$BISON" # Let the user override the test.
3002 else
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH"
3005   for ac_dir in $ac_dummy; do
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_prog_BISON="bison"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013   test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3014 fi
3015 fi
3016 BISON="$ac_cv_prog_BISON"
3017 if test -n "$BISON"; then
3018   echo "$ac_t""$BISON" 1>&6
3019 else
3020   echo "$ac_t""no" 1>&6
3021 fi
3022
3023 fi
3024
3025 # See if the stage1 system preprocessor understands the ANSI C
3026 # preprocessor stringification operator.  (Used by symcat.h.)
3027
3028
3029 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3030 echo "configure:3031: checking for preprocessor stringizing operator" >&5
3031 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   cat > conftest.$ac_ext <<EOF
3035 #line 3036 "configure"
3036 #include "confdefs.h"
3037
3038 #define x(y) #y
3039
3040 char *s = x(teststring);
3041
3042 EOF
3043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3044   egrep "#teststring" >/dev/null 2>&1; then
3045   rm -rf conftest*
3046   ac_cv_c_stringize=no
3047 else
3048   rm -rf conftest*
3049   ac_cv_c_stringize=yes
3050 fi
3051 rm -f conftest*
3052
3053 fi
3054
3055 if test "${ac_cv_c_stringize}" = yes
3056 then
3057         cat >> confdefs.h <<\EOF
3058 #define HAVE_STRINGIZE 1
3059 EOF
3060
3061 fi
3062 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3063
3064
3065 # Use <inttypes.h> only if it exists,
3066 # doesn't clash with <sys/types.h>, and declares intmax_t.
3067 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3068 echo "configure:3069: checking for inttypes.h" >&5
3069 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 #include <sys/types.h>
3076 #include <inttypes.h>
3077 int main() {
3078 intmax_t i = -1;
3079 ; return 0; }
3080 EOF
3081 if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3082   rm -rf conftest*
3083   gcc_cv_header_inttypes_h=yes
3084 else
3085   echo "configure: failed program was:" >&5
3086   cat conftest.$ac_ext >&5
3087   rm -rf conftest*
3088   gcc_cv_header_inttypes_h=no
3089 fi
3090 rm -f conftest*
3091 fi
3092
3093 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3094 if test $gcc_cv_header_inttypes_h = yes; then
3095   cat >> confdefs.h <<\EOF
3096 #define HAVE_INTTYPES_H 1
3097 EOF
3098
3099 fi
3100
3101
3102 for ac_func in strtoul bsearch popen times clock \
3103         strchr strrchr kill getrlimit setrlimit atoll atoq \
3104         sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
3105         fputs_unlocked getrusage iconv nl_langinfo lstat
3106 do
3107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3108 echo "configure:3109: checking for $ac_func" >&5
3109 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 /* System header to define __stub macros and hopefully few prototypes,
3116     which can conflict with char $ac_func(); below.  */
3117 #include <assert.h>
3118 /* Override any gcc2 internal prototype to avoid an error.  */
3119 /* We use char because int might match the return type of a gcc2
3120     builtin and then its argument prototype would still apply.  */
3121 char $ac_func();
3122
3123 int main() {
3124
3125 /* The GNU C library defines this for functions which it implements
3126     to always fail with ENOSYS.  Some functions are actually named
3127     something starting with __ and the normal name is an alias.  */
3128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3129 choke me
3130 #else
3131 $ac_func();
3132 #endif
3133
3134 ; return 0; }
3135 EOF
3136 if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3137   rm -rf conftest*
3138   eval "ac_cv_func_$ac_func=yes"
3139 else
3140   echo "configure: failed program was:" >&5
3141   cat conftest.$ac_ext >&5
3142   rm -rf conftest*
3143   eval "ac_cv_func_$ac_func=no"
3144 fi
3145 rm -f conftest*
3146 fi
3147
3148 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3149   echo "$ac_t""yes" 1>&6
3150     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3151   cat >> confdefs.h <<EOF
3152 #define $ac_tr_func 1
3153 EOF
3154  
3155 else
3156   echo "$ac_t""no" 1>&6
3157 fi
3158 done
3159
3160
3161 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3162 echo "configure:3163: checking for ssize_t" >&5
3163 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166   cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169 #include <sys/types.h>
3170 #if STDC_HEADERS
3171 #include <stdlib.h>
3172 #include <stddef.h>
3173 #endif
3174 EOF
3175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3176   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3177   rm -rf conftest*
3178   ac_cv_type_ssize_t=yes
3179 else
3180   rm -rf conftest*
3181   ac_cv_type_ssize_t=no
3182 fi
3183 rm -f conftest*
3184
3185 fi
3186 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3187 if test $ac_cv_type_ssize_t = no; then
3188   cat >> confdefs.h <<\EOF
3189 #define ssize_t int
3190 EOF
3191
3192 fi
3193
3194
3195 # Try to determine the array type of the second argument of getgroups
3196 # for the target system (int or gid_t).
3197 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3198 echo "configure:3199: checking for uid_t in sys/types.h" >&5
3199 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #include <sys/types.h>
3206 EOF
3207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3208   egrep "uid_t" >/dev/null 2>&1; then
3209   rm -rf conftest*
3210   ac_cv_type_uid_t=yes
3211 else
3212   rm -rf conftest*
3213   ac_cv_type_uid_t=no
3214 fi
3215 rm -f conftest*
3216
3217 fi
3218
3219 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3220 if test $ac_cv_type_uid_t = no; then
3221   cat >> confdefs.h <<\EOF
3222 #define uid_t int
3223 EOF
3224
3225   cat >> confdefs.h <<\EOF
3226 #define gid_t int
3227 EOF
3228
3229 fi
3230
3231 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3232 echo "configure:3233: checking type of array argument to getgroups" >&5
3233 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   if test "$cross_compiling" = yes; then
3237   ac_cv_type_getgroups=cross
3238 else
3239   cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242
3243 /* Thanks to Mike Rendell for this test.  */
3244 #include <sys/types.h>
3245 #define NGID 256
3246 #undef MAX
3247 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3248 main()
3249 {
3250   gid_t gidset[NGID];
3251   int i, n;
3252   union { gid_t gval; long lval; }  val;
3253
3254   val.lval = -1;
3255   for (i = 0; i < NGID; i++)
3256     gidset[i] = val.gval;
3257   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3258                  gidset);
3259   /* Exit non-zero if getgroups seems to require an array of ints.  This
3260      happens when gid_t is short but getgroups modifies an array of ints.  */
3261   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3262 }
3263
3264 EOF
3265 if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3266 then
3267     ac_cv_type_getgroups=gid_t
3268 else
3269   echo "configure: failed program was:" >&5
3270   cat conftest.$ac_ext >&5
3271   rm -fr conftest*
3272   ac_cv_type_getgroups=int
3273 fi
3274 rm -fr conftest*
3275 fi
3276
3277 if test $ac_cv_type_getgroups = cross; then
3278         cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 #include <unistd.h>
3282 EOF
3283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3284   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3285   rm -rf conftest*
3286   ac_cv_type_getgroups=gid_t
3287 else
3288   rm -rf conftest*
3289   ac_cv_type_getgroups=int
3290 fi
3291 rm -f conftest*
3292
3293 fi
3294 fi
3295
3296 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3297 cat >> confdefs.h <<EOF
3298 #define GETGROUPS_T $ac_cv_type_getgroups
3299 EOF
3300
3301
3302 if test "${target}" = "${build}"; then
3303   TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3304 else
3305   case "${target}" in
3306         # This condition may need some tweaking.  It should include all
3307         # targets where the array type of the second argument of getgroups
3308         # is int and the type of gid_t is not equivalent to int.
3309         *-*-sunos* | *-*-ultrix*)
3310                 TARGET_GETGROUPS_T=int
3311                 ;;
3312         *)
3313                 TARGET_GETGROUPS_T=gid_t
3314                 ;;
3315   esac
3316 fi
3317
3318
3319 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3320 echo "configure:3321: checking for vprintf" >&5
3321 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 /* System header to define __stub macros and hopefully few prototypes,
3328     which can conflict with char vprintf(); below.  */
3329 #include <assert.h>
3330 /* Override any gcc2 internal prototype to avoid an error.  */
3331 /* We use char because int might match the return type of a gcc2
3332     builtin and then its argument prototype would still apply.  */
3333 char vprintf();
3334
3335 int main() {
3336
3337 /* The GNU C library defines this for functions which it implements
3338     to always fail with ENOSYS.  Some functions are actually named
3339     something starting with __ and the normal name is an alias.  */
3340 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3341 choke me
3342 #else
3343 vprintf();
3344 #endif
3345
3346 ; return 0; }
3347 EOF
3348 if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3349   rm -rf conftest*
3350   eval "ac_cv_func_vprintf=yes"
3351 else
3352   echo "configure: failed program was:" >&5
3353   cat conftest.$ac_ext >&5
3354   rm -rf conftest*
3355   eval "ac_cv_func_vprintf=no"
3356 fi
3357 rm -f conftest*
3358 fi
3359
3360 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3361   echo "$ac_t""yes" 1>&6
3362   cat >> confdefs.h <<\EOF
3363 #define HAVE_VPRINTF 1
3364 EOF
3365
3366 else
3367   echo "$ac_t""no" 1>&6
3368 fi
3369
3370 if test "$ac_cv_func_vprintf" != yes; then
3371 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3372 echo "configure:3373: checking for _doprnt" >&5
3373 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 /* System header to define __stub macros and hopefully few prototypes,
3380     which can conflict with char _doprnt(); below.  */
3381 #include <assert.h>
3382 /* Override any gcc2 internal prototype to avoid an error.  */
3383 /* We use char because int might match the return type of a gcc2
3384     builtin and then its argument prototype would still apply.  */
3385 char _doprnt();
3386
3387 int main() {
3388
3389 /* The GNU C library defines this for functions which it implements
3390     to always fail with ENOSYS.  Some functions are actually named
3391     something starting with __ and the normal name is an alias.  */
3392 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3393 choke me
3394 #else
3395 _doprnt();
3396 #endif
3397
3398 ; return 0; }
3399 EOF
3400 if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3401   rm -rf conftest*
3402   eval "ac_cv_func__doprnt=yes"
3403 else
3404   echo "configure: failed program was:" >&5
3405   cat conftest.$ac_ext >&5
3406   rm -rf conftest*
3407   eval "ac_cv_func__doprnt=no"
3408 fi
3409 rm -f conftest*
3410 fi
3411
3412 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3413   echo "$ac_t""yes" 1>&6
3414   cat >> confdefs.h <<\EOF
3415 #define HAVE_DOPRNT 1
3416 EOF
3417
3418 else
3419   echo "$ac_t""no" 1>&6
3420 fi
3421
3422 fi
3423
3424 vfprintf=
3425 doprint=
3426 if test $ac_cv_func_vprintf != yes ; then
3427   vfprintf=vfprintf.o
3428   if test $ac_cv_func__doprnt != yes ; then
3429     doprint=doprint.o
3430   fi
3431 fi
3432
3433
3434
3435 for ac_func in strstr
3436 do
3437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3438 echo "configure:3439: checking for $ac_func" >&5
3439 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445 /* System header to define __stub macros and hopefully few prototypes,
3446     which can conflict with char $ac_func(); below.  */
3447 #include <assert.h>
3448 /* Override any gcc2 internal prototype to avoid an error.  */
3449 /* We use char because int might match the return type of a gcc2
3450     builtin and then its argument prototype would still apply.  */
3451 char $ac_func();
3452
3453 int main() {
3454
3455 /* The GNU C library defines this for functions which it implements
3456     to always fail with ENOSYS.  Some functions are actually named
3457     something starting with __ and the normal name is an alias.  */
3458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3459 choke me
3460 #else
3461 $ac_func();
3462 #endif
3463
3464 ; return 0; }
3465 EOF
3466 if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3467   rm -rf conftest*
3468   eval "ac_cv_func_$ac_func=yes"
3469 else
3470   echo "configure: failed program was:" >&5
3471   cat conftest.$ac_ext >&5
3472   rm -rf conftest*
3473   eval "ac_cv_func_$ac_func=no"
3474 fi
3475 rm -f conftest*
3476 fi
3477
3478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3479   echo "$ac_t""yes" 1>&6
3480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3481   cat >> confdefs.h <<EOF
3482 #define $ac_tr_func 1
3483 EOF
3484  strstr=
3485 else
3486   echo "$ac_t""no" 1>&6
3487 strstr=strstr.o
3488 fi
3489 done
3490
3491    
3492 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3493 echo "configure:3494: checking whether the printf functions support %p" >&5
3494 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   if test "$cross_compiling" = yes; then
3498   gcc_cv_func_printf_ptr=no
3499 else
3500   cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 #include <stdio.h>
3504
3505 int main()
3506 {
3507   char buf[64];
3508   char *p = buf, *q = NULL;
3509   sprintf(buf, "%p", p);
3510   sscanf(buf, "%p", &q);
3511   return (p != q);
3512 }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3515 then
3516   gcc_cv_func_printf_ptr=yes
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520   rm -fr conftest*
3521   gcc_cv_func_printf_ptr=no
3522 fi
3523 rm -fr conftest*
3524 fi
3525
3526 rm -f core core.* *.core
3527 fi
3528
3529 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3530 if test $gcc_cv_func_printf_ptr = yes ; then
3531   cat >> confdefs.h <<\EOF
3532 #define HAVE_PRINTF_PTR 1
3533 EOF
3534
3535 fi
3536
3537
3538 case "${host}" in
3539 *-*-uwin*)
3540   { echo "configure: error: 
3541 *** UWIN may not be used as a host platform because
3542 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3543   ;;
3544 esac
3545 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3546 echo "configure:3547: checking for pid_t" >&5
3547 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 #include <sys/types.h>
3554 #if STDC_HEADERS
3555 #include <stdlib.h>
3556 #include <stddef.h>
3557 #endif
3558 EOF
3559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3560   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3561   rm -rf conftest*
3562   ac_cv_type_pid_t=yes
3563 else
3564   rm -rf conftest*
3565   ac_cv_type_pid_t=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3571 if test $ac_cv_type_pid_t = no; then
3572   cat >> confdefs.h <<\EOF
3573 #define pid_t int
3574 EOF
3575
3576 fi
3577
3578 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3579 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3580 echo "configure:3581: checking for vfork.h" >&5
3581 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 #include <vfork.h>
3588 EOF
3589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3590 { (eval echo configure:3591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3592 if test -z "$ac_err"; then
3593   rm -rf conftest*
3594   eval "ac_cv_header_$ac_safe=yes"
3595 else
3596   echo "$ac_err" >&5
3597   echo "configure: failed program was:" >&5
3598   cat conftest.$ac_ext >&5
3599   rm -rf conftest*
3600   eval "ac_cv_header_$ac_safe=no"
3601 fi
3602 rm -f conftest*
3603 fi
3604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3605   echo "$ac_t""yes" 1>&6
3606   cat >> confdefs.h <<\EOF
3607 #define HAVE_VFORK_H 1
3608 EOF
3609
3610 else
3611   echo "$ac_t""no" 1>&6
3612 fi
3613
3614 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3615 echo "configure:3616: checking for working vfork" >&5
3616 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   if test "$cross_compiling" = yes; then
3620   echo $ac_n "checking for vfork""... $ac_c" 1>&6
3621 echo "configure:3622: checking for vfork" >&5
3622 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3623   echo $ac_n "(cached) $ac_c" 1>&6
3624 else
3625   cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 /* System header to define __stub macros and hopefully few prototypes,
3629     which can conflict with char vfork(); below.  */
3630 #include <assert.h>
3631 /* Override any gcc2 internal prototype to avoid an error.  */
3632 /* We use char because int might match the return type of a gcc2
3633     builtin and then its argument prototype would still apply.  */
3634 char vfork();
3635
3636 int main() {
3637
3638 /* The GNU C library defines this for functions which it implements
3639     to always fail with ENOSYS.  Some functions are actually named
3640     something starting with __ and the normal name is an alias.  */
3641 #if defined (__stub_vfork) || defined (__stub___vfork)
3642 choke me
3643 #else
3644 vfork();
3645 #endif
3646
3647 ; return 0; }
3648 EOF
3649 if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3650   rm -rf conftest*
3651   eval "ac_cv_func_vfork=yes"
3652 else
3653   echo "configure: failed program was:" >&5
3654   cat conftest.$ac_ext >&5
3655   rm -rf conftest*
3656   eval "ac_cv_func_vfork=no"
3657 fi
3658 rm -f conftest*
3659 fi
3660
3661 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3662   echo "$ac_t""yes" 1>&6
3663   :
3664 else
3665   echo "$ac_t""no" 1>&6
3666 fi
3667
3668 ac_cv_func_vfork_works=$ac_cv_func_vfork
3669 else
3670   cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 /* Thanks to Paul Eggert for this test.  */
3674 #include <stdio.h>
3675 #include <sys/types.h>
3676 #include <sys/stat.h>
3677 #ifdef HAVE_UNISTD_H
3678 #include <unistd.h>
3679 #endif
3680 #ifdef HAVE_VFORK_H
3681 #include <vfork.h>
3682 #endif
3683 /* On some sparc systems, changes by the child to local and incoming
3684    argument registers are propagated back to the parent.
3685    The compiler is told about this with #include <vfork.h>,
3686    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3687    Test for this by using a static variable whose address
3688    is put into a register that is clobbered by the vfork.  */
3689 static
3690 #ifdef __cplusplus
3691 sparc_address_test (int arg)
3692 #else
3693 sparc_address_test (arg) int arg;
3694 #endif
3695 {
3696   static pid_t child;
3697   if (!child) {
3698     child = vfork ();
3699     if (child < 0) {
3700       perror ("vfork");
3701       _exit(2);
3702     }
3703     if (!child) {
3704       arg = getpid();
3705       write(-1, "", 0);
3706       _exit (arg);
3707     }
3708   }
3709 }
3710 main() {
3711   pid_t parent = getpid ();
3712   pid_t child;
3713
3714   sparc_address_test ();
3715
3716   child = vfork ();
3717
3718   if (child == 0) {
3719     /* Here is another test for sparc vfork register problems.
3720        This test uses lots of local variables, at least
3721        as many local variables as main has allocated so far
3722        including compiler temporaries.  4 locals are enough for
3723        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3724        A buggy compiler should reuse the register of parent
3725        for one of the local variables, since it will think that
3726        parent can't possibly be used any more in this routine.
3727        Assigning to the local variable will thus munge parent
3728        in the parent process.  */
3729     pid_t
3730       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3731       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3732     /* Convince the compiler that p..p7 are live; otherwise, it might
3733        use the same hardware register for all 8 local variables.  */
3734     if (p != p1 || p != p2 || p != p3 || p != p4
3735         || p != p5 || p != p6 || p != p7)
3736       _exit(1);
3737
3738     /* On some systems (e.g. IRIX 3.3),
3739        vfork doesn't separate parent from child file descriptors.
3740        If the child closes a descriptor before it execs or exits,
3741        this munges the parent's descriptor as well.
3742        Test for this by closing stdout in the child.  */
3743     _exit(close(fileno(stdout)) != 0);
3744   } else {
3745     int status;
3746     struct stat st;
3747
3748     while (wait(&status) != child)
3749       ;
3750     exit(
3751          /* Was there some problem with vforking?  */
3752          child < 0
3753
3754          /* Did the child fail?  (This shouldn't happen.)  */
3755          || status
3756
3757          /* Did the vfork/compiler bug occur?  */
3758          || parent != getpid()
3759
3760          /* Did the file descriptor bug occur?  */
3761          || fstat(fileno(stdout), &st) != 0
3762          );
3763   }
3764 }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3767 then
3768   ac_cv_func_vfork_works=yes
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -fr conftest*
3773   ac_cv_func_vfork_works=no
3774 fi
3775 rm -fr conftest*
3776 fi
3777
3778 fi
3779
3780 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3781 if test $ac_cv_func_vfork_works = no; then
3782   cat >> confdefs.h <<\EOF
3783 #define vfork fork
3784 EOF
3785
3786 fi
3787
3788 for ac_func in getpagesize
3789 do
3790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3791 echo "configure:3792: checking for $ac_func" >&5
3792 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 /* System header to define __stub macros and hopefully few prototypes,
3799     which can conflict with char $ac_func(); below.  */
3800 #include <assert.h>
3801 /* Override any gcc2 internal prototype to avoid an error.  */
3802 /* We use char because int might match the return type of a gcc2
3803     builtin and then its argument prototype would still apply.  */
3804 char $ac_func();
3805
3806 int main() {
3807
3808 /* The GNU C library defines this for functions which it implements
3809     to always fail with ENOSYS.  Some functions are actually named
3810     something starting with __ and the normal name is an alias.  */
3811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3812 choke me
3813 #else
3814 $ac_func();
3815 #endif
3816
3817 ; return 0; }
3818 EOF
3819 if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3820   rm -rf conftest*
3821   eval "ac_cv_func_$ac_func=yes"
3822 else
3823   echo "configure: failed program was:" >&5
3824   cat conftest.$ac_ext >&5
3825   rm -rf conftest*
3826   eval "ac_cv_func_$ac_func=no"
3827 fi
3828 rm -f conftest*
3829 fi
3830
3831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3832   echo "$ac_t""yes" 1>&6
3833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3834   cat >> confdefs.h <<EOF
3835 #define $ac_tr_func 1
3836 EOF
3837  
3838 else
3839   echo "$ac_t""no" 1>&6
3840 fi
3841 done
3842
3843 # The test program for the next two tests is the same except for one
3844 # set of ifdefs.
3845 cat >ct-mmap.inc <<'EOF'
3846 #include <sys/types.h>
3847 #include <sys/mman.h>
3848 #include <fcntl.h>
3849 #include <signal.h>
3850 #include <setjmp.h>
3851 #include <stdio.h>
3852
3853 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3854 # define MAP_ANONYMOUS MAP_ANON
3855 #endif
3856
3857 /* This mess was copied from the GNU getpagesize.h.  */
3858 #ifndef HAVE_GETPAGESIZE
3859 # ifdef HAVE_UNISTD_H
3860 #  include <unistd.h>
3861 # endif
3862
3863 /* Assume that all systems that can run configure have sys/param.h.  */
3864 # ifndef HAVE_SYS_PARAM_H
3865 #  define HAVE_SYS_PARAM_H 1
3866 # endif
3867
3868 # ifdef _SC_PAGESIZE
3869 #  define getpagesize() sysconf(_SC_PAGESIZE)
3870 # else /* no _SC_PAGESIZE */
3871 #  ifdef HAVE_SYS_PARAM_H
3872 #   include <sys/param.h>
3873 #   ifdef EXEC_PAGESIZE
3874 #    define getpagesize() EXEC_PAGESIZE
3875 #   else /* no EXEC_PAGESIZE */
3876 #    ifdef NBPG
3877 #     define getpagesize() NBPG * CLSIZE
3878 #     ifndef CLSIZE
3879 #      define CLSIZE 1
3880 #     endif /* no CLSIZE */
3881 #    else /* no NBPG */
3882 #     ifdef NBPC
3883 #      define getpagesize() NBPC
3884 #     else /* no NBPC */
3885 #      ifdef PAGESIZE
3886 #       define getpagesize() PAGESIZE
3887 #      endif /* PAGESIZE */
3888 #     endif /* no NBPC */
3889 #    endif /* no NBPG */
3890 #   endif /* no EXEC_PAGESIZE */
3891 #  else /* no HAVE_SYS_PARAM_H */
3892 #   define getpagesize() 8192   /* punt totally */
3893 #  endif /* no HAVE_SYS_PARAM_H */
3894 # endif /* no _SC_PAGESIZE */
3895
3896 #endif /* no HAVE_GETPAGESIZE */
3897
3898 #ifndef MAP_FAILED
3899 # define MAP_FAILED -1
3900 #endif
3901
3902 #undef perror_exit
3903 #define perror_exit(str, val) \
3904   do { perror(str); exit(val); } while (0)
3905
3906 /* Some versions of cygwin mmap require that munmap is called with the
3907    same parameters as mmap.  GCC expects that this is not the case.
3908    Test for various forms of this problem.  Warning - icky signal games.  */
3909
3910 static sigset_t unblock_sigsegv;
3911 static jmp_buf r;
3912 static size_t pg;
3913 static int devzero;
3914
3915 static char *
3916 anonmap (size)
3917      size_t size;
3918 {
3919 #ifdef USE_MAP_ANON
3920   return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3921                         MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3922 #else
3923   return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3924                         MAP_PRIVATE, devzero, 0);
3925 #endif
3926 }
3927
3928 static void
3929 sigsegv (unused)
3930      int unused;
3931 {
3932   sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3933   longjmp (r, 1);
3934 }
3935
3936 /* Basic functionality test.  */
3937 void
3938 test_0 ()
3939 {
3940   char *x = anonmap (pg);
3941   if (x == (char *) MAP_FAILED)
3942     perror_exit("test 0 mmap", 2);
3943
3944   *(int *)x += 1;
3945
3946   if (munmap(x, pg) < 0)
3947     perror_exit("test 0 munmap", 3);
3948 }
3949
3950 /* 1. If we map a 2-page region and unmap its second page, the first page
3951    must remain.  */
3952 static void
3953 test_1 ()
3954 {
3955   char *x = anonmap (pg * 2);
3956   if (x == (char *)MAP_FAILED)
3957     perror_exit ("test 1 mmap", 4);
3958
3959   signal (SIGSEGV, sigsegv);
3960   if (setjmp (r))
3961     perror_exit ("test 1 fault", 5);
3962
3963   x[0] = 1;
3964   x[pg] = 1;
3965
3966   if (munmap (x + pg, pg) < 0)
3967     perror_exit ("test 1 munmap 1", 6);
3968   x[0] = 2;
3969
3970   if (setjmp (r) == 0)
3971     {
3972       x[pg] = 1;
3973       perror_exit ("test 1 no fault", 7);
3974     }
3975   if (munmap (x, pg) < 0)
3976     perror_exit ("test 1 munmap 2", 8);
3977 }
3978
3979 /* 2. If we map a 2-page region and unmap its first page, the second
3980    page must remain.  */
3981 static void
3982 test_2 ()
3983 {
3984   char *x = anonmap (pg * 2);
3985   if (x == (char *)MAP_FAILED)
3986     perror_exit ("test 2 mmap", 9);
3987
3988   signal (SIGSEGV, sigsegv);
3989   if (setjmp (r))
3990     perror_exit ("test 2 fault", 10);
3991
3992   x[0] = 1;
3993   x[pg] = 1;
3994
3995   if (munmap (x, pg) < 0)
3996     perror_exit ("test 2 munmap 1", 11);
3997
3998   x[pg] = 2;
3999
4000   if (setjmp (r) == 0)
4001     {
4002       x[0] = 1;
4003       perror_exit ("test 2 no fault", 12);
4004     }
4005
4006   if (munmap (x+pg, pg) < 0)
4007     perror_exit ("test 2 munmap 2", 13);
4008 }
4009
4010 /* 3. If we map two adjacent 1-page regions and unmap them both with
4011    one munmap, both must go away.
4012
4013    Getting two adjacent 1-page regions with two mmap calls is slightly
4014    tricky.  All OS's tested skip over already-allocated blocks; therefore
4015    we have been careful to unmap all allocated regions in previous tests.
4016    HP/UX allocates pages backward in memory.  No OS has yet been observed
4017    to be so perverse as to leave unmapped space between consecutive calls
4018    to mmap.  */
4019
4020 static void
4021 test_3 ()
4022 {
4023   char *x, *y, *z;
4024
4025   x = anonmap (pg);
4026   if (x == (char *)MAP_FAILED)
4027     perror_exit ("test 3 mmap 1", 14);
4028   y = anonmap (pg);
4029   if (y == (char *)MAP_FAILED)
4030     perror_exit ("test 3 mmap 2", 15);
4031
4032   if (y != x + pg)
4033     {
4034       if (y == x - pg)
4035         z = y, y = x, x = z;
4036       else
4037         {
4038           fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4039                    (unsigned long)x, (unsigned long)y);
4040           exit (16);
4041         }
4042     }
4043
4044   signal (SIGSEGV, sigsegv);
4045   if (setjmp (r))
4046     perror_exit ("test 3 fault", 17);
4047
4048   x[0] = 1;
4049   y[0] = 1;
4050
4051   if (munmap (x, pg*2) < 0)
4052     perror_exit ("test 3 munmap", 18);
4053
4054   if (setjmp (r) == 0)
4055     {
4056       x[0] = 1;
4057       perror_exit ("test 3 no fault 1", 19);
4058     }
4059   
4060   signal (SIGSEGV, sigsegv);
4061   if (setjmp (r) == 0)
4062     {
4063       y[0] = 1;
4064       perror_exit ("test 3 no fault 2", 20);
4065     }
4066 }
4067
4068 int
4069 main ()
4070 {
4071   sigemptyset (&unblock_sigsegv);
4072   sigaddset (&unblock_sigsegv, SIGSEGV);
4073   pg = getpagesize ();
4074 #ifndef USE_MAP_ANON
4075   devzero = open ("/dev/zero", O_RDWR);
4076   if (devzero < 0)
4077     perror_exit ("open /dev/zero", 1);
4078 #endif
4079
4080   test_0();
4081   test_1();
4082   test_2();
4083   test_3();
4084
4085   exit(0);
4086 }
4087 EOF
4088
4089 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4090 echo "configure:4091: checking for working mmap from /dev/zero" >&5
4091 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   if test "$cross_compiling" = yes; then
4095   # If this is not cygwin, and /dev/zero is a character device, it's probably
4096  # safe to assume it works.
4097  case "$host_os" in
4098    cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4099    * ) if test -c /dev/zero
4100        then ac_cv_func_mmap_dev_zero=yes
4101        else ac_cv_func_mmap_dev_zero=no
4102        fi ;;
4103   esac
4104 else
4105   cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 #include "ct-mmap.inc"
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4111 then
4112   ac_cv_func_mmap_dev_zero=yes
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -fr conftest*
4117   if test $? -lt 4
4118  then ac_cv_func_mmap_dev_zero=no
4119  else ac_cv_func_mmap_dev_zero=buggy
4120  fi
4121 fi
4122 rm -fr conftest*
4123 fi
4124
4125
4126 fi
4127
4128 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4129 if test $ac_cv_func_mmap_dev_zero = yes; then
4130   cat >> confdefs.h <<\EOF
4131 #define HAVE_MMAP_DEV_ZERO 1
4132 EOF
4133
4134 fi
4135
4136 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4137 echo "configure:4138: checking for working mmap with MAP_ANON(YMOUS)" >&5
4138 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4139   echo $ac_n "(cached) $ac_c" 1>&6
4140 else
4141   if test "$cross_compiling" = yes; then
4142   # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4143  # just because it's there. Some SCO Un*xen define it but don't implement it.
4144  ac_cv_func_mmap_anon=no
4145 else
4146   cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #define USE_MAP_ANON
4150 #include "ct-mmap.inc"
4151 EOF
4152 if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4153 then
4154   ac_cv_func_mmap_anon=yes
4155 else
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -fr conftest*
4159   if test $? -lt 4
4160  then ac_cv_func_mmap_anon=no
4161  else ac_cv_func_mmap_anon=buggy
4162  fi
4163 fi
4164 rm -fr conftest*
4165 fi
4166
4167
4168 fi
4169
4170 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4171 if test $ac_cv_func_mmap_anon = yes; then
4172   cat >> confdefs.h <<\EOF
4173 #define HAVE_MMAP_ANON 1
4174 EOF
4175
4176 fi
4177 rm -f ct-mmap.inc
4178
4179 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4180 echo "configure:4181: checking for working mmap of a file" >&5
4181 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   # Create a file one thousand bytes long.
4185 for i in 1 2 3 4 5 6 7 8 9 0
4186 do for j in 1 2 3 4 5 6 7 8 9 0
4187 do echo $i $j xxxxx
4188 done
4189 done > conftestdata$$
4190
4191 if test "$cross_compiling" = yes; then
4192   ac_cv_func_mmap_file=no
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197
4198 /* Test by Zack Weinberg.  Modified from MMAP_ANYWHERE test by
4199    Richard Henderson and Alexandre Oliva.
4200    Check whether read-only mmap of a plain file works. */
4201 #include <sys/types.h>
4202 #include <sys/stat.h>
4203 #include <fcntl.h>
4204 #include <sys/mman.h>
4205
4206 int main()
4207 {
4208   char *x;
4209   int fd;
4210   struct stat st;
4211
4212   fd = open("conftestdata$$", O_RDONLY);
4213   if (fd < 0)
4214     exit(1);
4215
4216   if (fstat (fd, &st))
4217     exit(2);
4218
4219   x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4220   if (x == (char *) -1)
4221     exit(3);
4222
4223   if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4224     exit(4);
4225
4226   if (munmap(x, st.st_size) < 0)
4227     exit(5);
4228
4229   exit(0);
4230 }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4233 then
4234   ac_cv_func_mmap_file=yes
4235 else
4236   echo "configure: failed program was:" >&5
4237   cat conftest.$ac_ext >&5
4238   rm -fr conftest*
4239   ac_cv_func_mmap_file=no
4240 fi
4241 rm -fr conftest*
4242 fi
4243
4244 fi
4245
4246 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4247 if test $ac_cv_func_mmap_file = yes; then
4248   cat >> confdefs.h <<\EOF
4249 #define HAVE_MMAP_FILE 1
4250 EOF
4251
4252 fi
4253
4254
4255 # We will need to find libiberty.h and ansidecl.h
4256 saved_CFLAGS="$CFLAGS"
4257 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4258 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4259         strsignal putc_unlocked fputs_unlocked strstr environ errno \
4260         malloc realloc calloc free basename getopt clock
4261 do
4262   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4263 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4264 echo "configure:4265: checking whether $ac_func is declared" >&5
4265 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4266   echo $ac_n "(cached) $ac_c" 1>&6
4267 else
4268   cat > conftest.$ac_ext <<EOF
4269 #line 4270 "configure"
4270 #include "confdefs.h"
4271 #undef $ac_tr_decl
4272 #define $ac_tr_decl 1
4273   
4274 #include "ansidecl.h"
4275 #include "system.h"
4276
4277 int main() {
4278 #ifndef $ac_func
4279 char *(*pfn) = (char *(*)) $ac_func ;
4280 #endif
4281 ; return 0; }
4282 EOF
4283 if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4284   rm -rf conftest*
4285   eval "gcc_cv_have_decl_$ac_func=yes"
4286 else
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   eval "gcc_cv_have_decl_$ac_func=no"
4291 fi
4292 rm -f conftest*
4293 fi
4294
4295 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4296   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4297 #define $ac_tr_decl 1
4298 EOF
4299  
4300 else
4301   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4302 #define $ac_tr_decl 0
4303 EOF
4304  
4305 fi
4306
4307 done
4308 if test x = y ; then
4309   cat >> confdefs.h <<EOF
4310 #define HAVE_DECL_GETENV 1
4311 EOF
4312  cat >> confdefs.h <<EOF
4313 #define HAVE_DECL_ATOL 1
4314 EOF
4315  cat >> confdefs.h <<EOF
4316 #define HAVE_DECL_SBRK 1
4317 EOF
4318  cat >> confdefs.h <<EOF
4319 #define HAVE_DECL_ABORT 1
4320 EOF
4321  cat >> confdefs.h <<EOF
4322 #define HAVE_DECL_ATOF 1
4323 EOF
4324  cat >> confdefs.h <<EOF
4325 #define HAVE_DECL_GETCWD 1
4326 EOF
4327  cat >> confdefs.h <<EOF
4328 #define HAVE_DECL_GETWD 1
4329 EOF
4330  \
4331         cat >> confdefs.h <<EOF
4332 #define HAVE_DECL_STRSIGNAL 1
4333 EOF
4334  cat >> confdefs.h <<EOF
4335 #define HAVE_DECL_PUTC_UNLOCKED 1
4336 EOF
4337  cat >> confdefs.h <<EOF
4338 #define HAVE_DECL_FPUTS_UNLOCKED 1
4339 EOF
4340  cat >> confdefs.h <<EOF
4341 #define HAVE_DECL_STRSTR 1
4342 EOF
4343  cat >> confdefs.h <<EOF
4344 #define HAVE_DECL_ENVIRON 1
4345 EOF
4346  cat >> confdefs.h <<EOF
4347 #define HAVE_DECL_ERRNO 1
4348 EOF
4349  \
4350         cat >> confdefs.h <<EOF
4351 #define HAVE_DECL_MALLOC 1
4352 EOF
4353  cat >> confdefs.h <<EOF
4354 #define HAVE_DECL_REALLOC 1
4355 EOF
4356  cat >> confdefs.h <<EOF
4357 #define HAVE_DECL_CALLOC 1
4358 EOF
4359  cat >> confdefs.h <<EOF
4360 #define HAVE_DECL_FREE 1
4361 EOF
4362  cat >> confdefs.h <<EOF
4363 #define HAVE_DECL_BASENAME 1
4364 EOF
4365  cat >> confdefs.h <<EOF
4366 #define HAVE_DECL_GETOPT 1
4367 EOF
4368  cat >> confdefs.h <<EOF
4369 #define HAVE_DECL_CLOCK 1
4370 EOF
4371 fi
4372
4373
4374 for ac_func in getrlimit setrlimit getrusage
4375 do
4376   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4377 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4378 echo "configure:4379: checking whether $ac_func is declared" >&5
4379 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4380   echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382   cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #undef $ac_tr_decl
4386 #define $ac_tr_decl 1
4387   
4388 #include "ansidecl.h"
4389 #include "system.h"
4390 #ifdef HAVE_SYS_RESOURCE_H
4391 #include <sys/resource.h>
4392 #endif
4393
4394
4395 int main() {
4396 #ifndef $ac_func
4397 char *(*pfn) = (char *(*)) $ac_func ;
4398 #endif
4399 ; return 0; }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4402   rm -rf conftest*
4403   eval "gcc_cv_have_decl_$ac_func=yes"
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   eval "gcc_cv_have_decl_$ac_func=no"
4409 fi
4410 rm -f conftest*
4411 fi
4412
4413 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4414   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4415 #define $ac_tr_decl 1
4416 EOF
4417  
4418 else
4419   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4420 #define $ac_tr_decl 0
4421 EOF
4422  
4423 fi
4424
4425 done
4426 if test x = y ; then
4427   cat >> confdefs.h <<EOF
4428 #define HAVE_DECL_GETRLIMIT 1
4429 EOF
4430  cat >> confdefs.h <<EOF
4431 #define HAVE_DECL_SETRLIMIT 1
4432 EOF
4433  cat >> confdefs.h <<EOF
4434 #define HAVE_DECL_GETRUSAGE 1
4435 EOF
4436 fi
4437
4438
4439 for ac_func in times
4440 do
4441   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4442 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4443 echo "configure:4444: checking whether $ac_func is declared" >&5
4444 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 #undef $ac_tr_decl
4451 #define $ac_tr_decl 1
4452   
4453 #include "ansidecl.h"
4454 #include "system.h"
4455 #ifdef HAVE_SYS_TIMES_H
4456 #include <sys/times.h>
4457 #endif
4458
4459
4460 int main() {
4461 #ifndef $ac_func
4462 char *(*pfn) = (char *(*)) $ac_func ;
4463 #endif
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4467   rm -rf conftest*
4468   eval "gcc_cv_have_decl_$ac_func=yes"
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   eval "gcc_cv_have_decl_$ac_func=no"
4474 fi
4475 rm -f conftest*
4476 fi
4477
4478 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4479   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4480 #define $ac_tr_decl 1
4481 EOF
4482  
4483 else
4484   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4485 #define $ac_tr_decl 0
4486 EOF
4487  
4488 fi
4489
4490 done
4491 if test x = y ; then
4492   cat >> confdefs.h <<EOF
4493 #define HAVE_DECL_TIMES 1
4494 EOF
4495 fi
4496
4497
4498 # More time-related stuff.
4499 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4500 echo "configure:4501: checking for struct tms" >&5
4501 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4502   echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504   
4505 cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4508
4509 #include "ansidecl.h"
4510 #include "system.h"
4511 #ifdef HAVE_SYS_TIMES_H
4512 #include <sys/times.h>
4513 #endif
4514
4515 int main() {
4516 struct tms tms;
4517 ; return 0; }
4518 EOF
4519 if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4520   rm -rf conftest*
4521   ac_cv_struct_tms=yes
4522 else
4523   echo "configure: failed program was:" >&5
4524   cat conftest.$ac_ext >&5
4525   rm -rf conftest*
4526   ac_cv_struct_tms=no
4527 fi
4528 rm -f conftest*
4529 fi
4530
4531 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4532 if test $ac_cv_struct_tms = yes; then
4533   cat >> confdefs.h <<\EOF
4534 #define HAVE_STRUCT_TMS 1
4535 EOF
4536
4537 fi
4538
4539 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4540 # revisit after autoconf 2.50.
4541 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4542 echo "configure:4543: checking for clock_t" >&5
4543 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4544   echo $ac_n "(cached) $ac_c" 1>&6
4545 else
4546   
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550
4551 #include "ansidecl.h"
4552 #include "system.h"
4553
4554 int main() {
4555 clock_t x;
4556 ; return 0; }
4557 EOF
4558 if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4559   rm -rf conftest*
4560   gcc_cv_type_clock_t=yes
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -rf conftest*
4565   gcc_cv_type_clock_t=no
4566 fi
4567 rm -f conftest*
4568 fi
4569
4570 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4571 if test $gcc_cv_type_clock_t = yes; then
4572   cat >> confdefs.h <<\EOF
4573 #define HAVE_CLOCK_T 1
4574 EOF
4575
4576 fi
4577
4578 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4579 CFLAGS="$saved_CFLAGS"
4580
4581 # mkdir takes a single argument on some systems. 
4582 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4583 echo "configure:4584: checking if mkdir takes one argument" >&5
4584 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   cat > conftest.$ac_ext <<EOF
4588 #line 4589 "configure"
4589 #include "confdefs.h"
4590
4591 #include <sys/types.h>
4592 #ifdef HAVE_SYS_STAT_H
4593 # include <sys/stat.h>
4594 #endif
4595 #ifdef HAVE_UNISTD_H
4596 # include <unistd.h>
4597 #endif
4598 #ifdef HAVE_DIRECT_H
4599 # include <direct.h>
4600 #endif
4601 int main() {
4602 mkdir ("foo", 0);
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4606   rm -rf conftest*
4607   gcc_cv_mkdir_takes_one_arg=no
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   gcc_cv_mkdir_takes_one_arg=yes
4613 fi
4614 rm -f conftest*
4615 fi
4616
4617 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4618 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4619   cat >> confdefs.h <<\EOF
4620 #define MKDIR_TAKES_ONE_ARG 1
4621 EOF
4622
4623 fi
4624
4625
4626 # File extensions
4627 manext='.1'
4628 objext='.o'
4629
4630
4631
4632 build_xm_file=
4633 build_xm_defines=
4634 build_install_headers_dir=install-headers-tar
4635 build_exeext=
4636 host_xm_file=
4637 host_xm_defines=
4638 host_xmake_file=
4639 host_truncate_target=
4640 host_exeext=
4641
4642 # Decode the host machine, then the target machine.
4643 # For the host machine, we save the xm_file variable as host_xm_file;
4644 # then we decode the target machine and forget everything else
4645 # that came from the host machine.
4646 for machine in $build $host $target; do
4647         . ${srcdir}/config.gcc
4648 done
4649
4650 extra_objs="${host_extra_objs} ${extra_objs}"
4651
4652 # Default the target-machine variables that were not explicitly set.
4653 if test x"$tm_file" = x
4654 then tm_file=$cpu_type/$cpu_type.h; fi
4655
4656 if test x"$extra_headers" = x
4657 then extra_headers=; fi
4658
4659 if test x$md_file = x
4660 then md_file=$cpu_type/$cpu_type.md; fi
4661
4662 if test x$out_file = x
4663 then out_file=$cpu_type/$cpu_type.c; fi
4664
4665 if test x"$tmake_file" = x
4666 then tmake_file=$cpu_type/t-$cpu_type
4667 fi
4668
4669 if test x"$dwarf2" = xyes
4670 then tm_file="$tm_file tm-dwarf2.h"
4671 fi
4672
4673 if test x$float_format = x
4674 then float_format=i64
4675 fi
4676
4677 if test $float_format = none
4678 then float_h_file=Makefile.in
4679 else float_h_file=float-$float_format.h
4680 fi
4681
4682 # Handle cpp installation.
4683 if test x$enable_cpp != xno
4684 then
4685   tmake_file="$tmake_file t-install-cpp"
4686 fi
4687
4688 # Say what files are being used for the output code and MD file.
4689 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4690 echo "Using \`$srcdir/config/$md_file' as machine description file."
4691
4692 # If any of the xm_file variables contain nonexistent files, warn
4693 # about them and drop them.
4694
4695 bx=
4696 for x in $build_xm_file; do
4697   if    test -f $srcdir/config/$x
4698   then      bx="$bx $x"
4699   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4700   fi
4701 done
4702 build_xm_file="$bx"
4703
4704 hx=
4705 for x in $host_xm_file; do
4706   if    test -f $srcdir/config/$x
4707   then      hx="$hx $x"
4708   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4709   fi
4710 done
4711 host_xm_file="$hx"
4712
4713 tx=
4714 for x in $xm_file; do
4715   if    test -f $srcdir/config/$x
4716   then      tx="$tx $x"
4717   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4718   fi
4719 done
4720 xm_file="$tx"
4721
4722 count=a
4723 for f in $tm_file; do
4724         count=${count}x
4725 done
4726 if test $count = ax; then
4727         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4728 else
4729         echo "Using the following target machine macro files:"
4730         for f in $tm_file; do
4731                 echo "  $srcdir/config/$f"
4732         done
4733 fi
4734
4735 count=a
4736 for f in $host_xm_file; do
4737         count=${count}x
4738 done
4739 if test $count = a; then
4740         :
4741 elif test $count = ax; then
4742         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4743 else
4744         echo "Using the following host machine macro files:"
4745         for f in $host_xm_file; do
4746                 echo "  $srcdir/config/$f"
4747         done
4748 fi
4749
4750 if test "$host_xm_file" != "$build_xm_file"; then
4751         count=a
4752         for f in $build_xm_file; do
4753                 count=${count}x
4754         done
4755         if test $count = a; then
4756                 :
4757         elif test $count = ax; then
4758                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4759         else
4760                 echo "Using the following build machine macro files:"
4761                 for f in $build_xm_file; do
4762                         echo "  $srcdir/config/$f"
4763                 done
4764         fi
4765 fi
4766
4767 if test x$thread_file = x; then
4768         if test x$target_thread_file != x; then
4769                 thread_file=$target_thread_file
4770         else
4771                 thread_file='single'
4772         fi
4773 fi
4774
4775 # auto-host.h is the file containing items generated by autoconf and is
4776 # the first file included by config.h.
4777 # If host=build, it is correct to have hconfig include auto-host.h
4778 # as well.  If host!=build, we are in error and need to do more 
4779 # work to find out the build config parameters.
4780 if test x$host = x$build
4781 then
4782         build_auto=auto-host.h
4783 else
4784         # We create a subdir, then run autoconf in the subdir.
4785         # To prevent recursion we set host and build for the new
4786         # invocation of configure to the build for this invocation
4787         # of configure. 
4788         tempdir=build.$$
4789         rm -rf $tempdir
4790         mkdir $tempdir
4791         cd $tempdir
4792         case ${srcdir} in
4793         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4794         *) realsrcdir=../${srcdir};;
4795         esac
4796         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4797                 --target=$target --host=$build --build=$build
4798
4799         # We just finished tests for the build machine, so rename
4800         # the file auto-build.h in the gcc directory.
4801         mv auto-host.h ../auto-build.h
4802         cd ..
4803         rm -rf $tempdir
4804         build_auto=auto-build.h
4805 fi
4806
4807 tm_file="${tm_file} defaults.h"
4808 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
4809 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
4810 xm_file="ansidecl.h ${xm_file} ${tm_file}"
4811
4812 # Truncate the target if necessary
4813 if test x$host_truncate_target != x; then
4814         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4815 fi
4816
4817 # Get the version trigger filename from the toplevel
4818 if test "${with_gcc_version_trigger+set}" = set; then
4819         gcc_version_trigger=$with_gcc_version_trigger
4820 else
4821         gcc_version_trigger=${srcdir}/version.c
4822 fi
4823 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4824 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4825
4826 # Compile in configure arguments.
4827 if test -f configargs.h ; then
4828         # Being re-configured.
4829         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4830         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4831 else
4832         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4833 fi
4834 cat > configargs.h <<EOF
4835 /* Generated automatically. */
4836 static const char configuration_arguments[] = "$gcc_config_arguments";
4837 EOF
4838
4839 # Internationalization
4840 PACKAGE=gcc
4841 VERSION="$gcc_version"
4842 cat >> confdefs.h <<EOF
4843 #define PACKAGE "$PACKAGE"
4844 EOF
4845
4846 cat >> confdefs.h <<EOF
4847 #define VERSION "$VERSION"
4848 EOF
4849
4850
4851
4852
4853 ALL_LINGUAS="sv"
4854
4855 # Enable NLS support by default
4856 # Check whether --enable-nls or --disable-nls was given.
4857 if test "${enable_nls+set}" = set; then
4858   enableval="$enable_nls"
4859   :
4860 else
4861   enable_nls=yes
4862 fi
4863
4864
4865 # if cross compiling, disable NLS support.
4866 # It's not worth the trouble, at least for now.
4867
4868 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4869   echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4870   enable_nls=no
4871 fi
4872
4873 # if NLS is enabled, also enable check in po subdir
4874 if test $enable_nls = yes; then
4875   CHECK_PO=check-po
4876 else
4877   CHECK_PO=""
4878 fi
4879
4880
4881
4882
4883         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4884 echo "configure:4885: checking for strerror in -lcposix" >&5
4885 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4886 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   ac_save_LIBS="$LIBS"
4890 LIBS="-lcposix  $LIBS"
4891 cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 /* Override any gcc2 internal prototype to avoid an error.  */
4895 /* We use char because int might match the return type of a gcc2
4896     builtin and then its argument prototype would still apply.  */
4897 char strerror();
4898
4899 int main() {
4900 strerror()
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=yes"
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=no"
4911 fi
4912 rm -f conftest*
4913 LIBS="$ac_save_LIBS"
4914
4915 fi
4916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918   LIBS="$LIBS -lcposix"
4919 else
4920   echo "$ac_t""no" 1>&6
4921 fi
4922
4923   
4924
4925 echo $ac_n "checking for working const""... $ac_c" 1>&6
4926 echo "configure:4927: checking for working const" >&5
4927 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930   cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933
4934 int main() {
4935
4936 /* Ultrix mips cc rejects this.  */
4937 typedef int charset[2]; const charset x;
4938 /* SunOS 4.1.1 cc rejects this.  */
4939 char const *const *ccp;
4940 char **p;
4941 /* NEC SVR4.0.2 mips cc rejects this.  */
4942 struct point {int x, y;};
4943 static struct point const zero = {0,0};
4944 /* AIX XL C 1.02.0.0 rejects this.
4945    It does not let you subtract one const X* pointer from another in an arm
4946    of an if-expression whose if-part is not a constant expression */
4947 const char *g = "string";
4948 ccp = &g + (g ? g-g : 0);
4949 /* HPUX 7.0 cc rejects these. */
4950 ++ccp;
4951 p = (char**) ccp;
4952 ccp = (char const *const *) p;
4953 { /* SCO 3.2v4 cc rejects this.  */
4954   char *t;
4955   char const *s = 0 ? (char *) 0 : (char const *) 0;
4956
4957   *t++ = 0;
4958 }
4959 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4960   int x[] = {25, 17};
4961   const int *foo = &x[0];
4962   ++foo;
4963 }
4964 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4965   typedef const int *iptr;
4966   iptr p = 0;
4967   ++p;
4968 }
4969 { /* AIX XL C 1.02.0.0 rejects this saying
4970      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4971   struct s { int j; const int *ap[3]; };
4972   struct s *b; b->j = 5;
4973 }
4974 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4975   const int foo = 10;
4976 }
4977
4978 ; return 0; }
4979 EOF
4980 if { (eval echo configure:4981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4981   rm -rf conftest*
4982   ac_cv_c_const=yes
4983 else
4984   echo "configure: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   rm -rf conftest*
4987   ac_cv_c_const=no
4988 fi
4989 rm -f conftest*
4990 fi
4991
4992 echo "$ac_t""$ac_cv_c_const" 1>&6
4993 if test $ac_cv_c_const = no; then
4994   cat >> confdefs.h <<\EOF
4995 #define const 
4996 EOF
4997
4998 fi
4999
5000 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5001 echo "configure:5002: checking for off_t" >&5
5002 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5003   echo $ac_n "(cached) $ac_c" 1>&6
5004 else
5005   cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 #include <sys/types.h>
5009 #if STDC_HEADERS
5010 #include <stdlib.h>
5011 #include <stddef.h>
5012 #endif
5013 EOF
5014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5015   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5016   rm -rf conftest*
5017   ac_cv_type_off_t=yes
5018 else
5019   rm -rf conftest*
5020   ac_cv_type_off_t=no
5021 fi
5022 rm -f conftest*
5023
5024 fi
5025 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5026 if test $ac_cv_type_off_t = no; then
5027   cat >> confdefs.h <<\EOF
5028 #define off_t long
5029 EOF
5030
5031 fi
5032
5033 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5034 echo "configure:5035: checking for size_t" >&5
5035 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5036   echo $ac_n "(cached) $ac_c" 1>&6
5037 else
5038   cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041 #include <sys/types.h>
5042 #if STDC_HEADERS
5043 #include <stdlib.h>
5044 #include <stddef.h>
5045 #endif
5046 EOF
5047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5048   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5049   rm -rf conftest*
5050   ac_cv_type_size_t=yes
5051 else
5052   rm -rf conftest*
5053   ac_cv_type_size_t=no
5054 fi
5055 rm -f conftest*
5056
5057 fi
5058 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5059 if test $ac_cv_type_size_t = no; then
5060   cat >> confdefs.h <<\EOF
5061 #define size_t unsigned
5062 EOF
5063
5064 fi
5065
5066                         
5067    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
5068 unistd.h sys/param.h
5069 do
5070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5072 echo "configure:5073: checking for $ac_hdr" >&5
5073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076   cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079 #include <$ac_hdr>
5080 EOF
5081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5082 { (eval echo configure:5083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5084 if test -z "$ac_err"; then
5085   rm -rf conftest*
5086   eval "ac_cv_header_$ac_safe=yes"
5087 else
5088   echo "$ac_err" >&5
5089   echo "configure: failed program was:" >&5
5090   cat conftest.$ac_ext >&5
5091   rm -rf conftest*
5092   eval "ac_cv_header_$ac_safe=no"
5093 fi
5094 rm -f conftest*
5095 fi
5096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5097   echo "$ac_t""yes" 1>&6
5098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5099   cat >> confdefs.h <<EOF
5100 #define $ac_tr_hdr 1
5101 EOF
5102  
5103 else
5104   echo "$ac_t""no" 1>&6
5105 fi
5106 done
5107
5108    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
5109 strdup __argz_count __argz_stringify __argz_next
5110 do
5111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5112 echo "configure:5113: checking for $ac_func" >&5
5113 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5114   echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116   cat > conftest.$ac_ext <<EOF
5117 #line 5118 "configure"
5118 #include "confdefs.h"
5119 /* System header to define __stub macros and hopefully few prototypes,
5120     which can conflict with char $ac_func(); below.  */
5121 #include <assert.h>
5122 /* Override any gcc2 internal prototype to avoid an error.  */
5123 /* We use char because int might match the return type of a gcc2
5124     builtin and then its argument prototype would still apply.  */
5125 char $ac_func();
5126
5127 int main() {
5128
5129 /* The GNU C library defines this for functions which it implements
5130     to always fail with ENOSYS.  Some functions are actually named
5131     something starting with __ and the normal name is an alias.  */
5132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5133 choke me
5134 #else
5135 $ac_func();
5136 #endif
5137
5138 ; return 0; }
5139 EOF
5140 if { (eval echo configure:5141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5141   rm -rf conftest*
5142   eval "ac_cv_func_$ac_func=yes"
5143 else
5144   echo "configure: failed program was:" >&5
5145   cat conftest.$ac_ext >&5
5146   rm -rf conftest*
5147   eval "ac_cv_func_$ac_func=no"
5148 fi
5149 rm -f conftest*
5150 fi
5151
5152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5153   echo "$ac_t""yes" 1>&6
5154     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5155   cat >> confdefs.h <<EOF
5156 #define $ac_tr_func 1
5157 EOF
5158  
5159 else
5160   echo "$ac_t""no" 1>&6
5161 fi
5162 done
5163
5164
5165    if test "${ac_cv_func_stpcpy+set}" != "set"; then
5166      for ac_func in stpcpy
5167 do
5168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5169 echo "configure:5170: checking for $ac_func" >&5
5170 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5171   echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5173   cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176 /* System header to define __stub macros and hopefully few prototypes,
5177     which can conflict with char $ac_func(); below.  */
5178 #include <assert.h>
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 /* We use char because int might match the return type of a gcc2
5181     builtin and then its argument prototype would still apply.  */
5182 char $ac_func();
5183
5184 int main() {
5185
5186 /* The GNU C library defines this for functions which it implements
5187     to always fail with ENOSYS.  Some functions are actually named
5188     something starting with __ and the normal name is an alias.  */
5189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5190 choke me
5191 #else
5192 $ac_func();
5193 #endif
5194
5195 ; return 0; }
5196 EOF
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198   rm -rf conftest*
5199   eval "ac_cv_func_$ac_func=yes"
5200 else
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   eval "ac_cv_func_$ac_func=no"
5205 fi
5206 rm -f conftest*
5207 fi
5208
5209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5210   echo "$ac_t""yes" 1>&6
5211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5212   cat >> confdefs.h <<EOF
5213 #define $ac_tr_func 1
5214 EOF
5215  
5216 else
5217   echo "$ac_t""no" 1>&6
5218 fi
5219 done
5220
5221    fi
5222    if test "${ac_cv_func_stpcpy}" = "yes"; then
5223      cat >> confdefs.h <<\EOF
5224 #define HAVE_STPCPY 1
5225 EOF
5226
5227    fi
5228
5229    if test $ac_cv_header_locale_h = yes; then
5230     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5231 echo "configure:5232: checking for LC_MESSAGES" >&5
5232 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5233   echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235   cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238 #include <locale.h>
5239 int main() {
5240 return LC_MESSAGES
5241 ; return 0; }
5242 EOF
5243 if { (eval echo configure:5244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5244   rm -rf conftest*
5245   am_cv_val_LC_MESSAGES=yes
5246 else
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249   rm -rf conftest*
5250   am_cv_val_LC_MESSAGES=no
5251 fi
5252 rm -f conftest*
5253 fi
5254
5255 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5256     if test $am_cv_val_LC_MESSAGES = yes; then
5257       cat >> confdefs.h <<\EOF
5258 #define HAVE_LC_MESSAGES 1
5259 EOF
5260
5261     fi
5262   fi
5263    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5264 echo "configure:5265: checking whether NLS is requested" >&5
5265         # Check whether --enable-nls or --disable-nls was given.
5266 if test "${enable_nls+set}" = set; then
5267   enableval="$enable_nls"
5268   USE_NLS=$enableval
5269 else
5270   USE_NLS=yes
5271 fi
5272
5273     echo "$ac_t""$USE_NLS" 1>&6
5274     
5275
5276     USE_INCLUDED_LIBINTL=no
5277
5278         if test "$USE_NLS" = "yes"; then
5279       cat >> confdefs.h <<\EOF
5280 #define ENABLE_NLS 1
5281 EOF
5282
5283       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5284 echo "configure:5285: checking whether included gettext is requested" >&5
5285       # Check whether --with-included-gettext or --without-included-gettext was given.
5286 if test "${with_included_gettext+set}" = set; then
5287   withval="$with_included_gettext"
5288   nls_cv_force_use_gnu_gettext=$withval
5289 else
5290   nls_cv_force_use_gnu_gettext=no
5291 fi
5292
5293       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5294
5295       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5296       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5297                                         nls_cv_header_intl=
5298         nls_cv_header_libgt=
5299         CATOBJEXT=NONE
5300
5301         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5302 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5303 echo "configure:5304: checking for libintl.h" >&5
5304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5305   echo $ac_n "(cached) $ac_c" 1>&6
5306 else
5307   cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310 #include <libintl.h>
5311 EOF
5312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5313 { (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5315 if test -z "$ac_err"; then
5316   rm -rf conftest*
5317   eval "ac_cv_header_$ac_safe=yes"
5318 else
5319   echo "$ac_err" >&5
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322   rm -rf conftest*
5323   eval "ac_cv_header_$ac_safe=no"
5324 fi
5325 rm -f conftest*
5326 fi
5327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5328   echo "$ac_t""yes" 1>&6
5329   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5330 echo "configure:5331: checking for gettext in libc" >&5
5331 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
5332   echo $ac_n "(cached) $ac_c" 1>&6
5333 else
5334   cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337 #include <libintl.h>
5338 int main() {
5339 return (int) gettext ("")
5340 ; return 0; }
5341 EOF
5342 if { (eval echo configure:5343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5343   rm -rf conftest*
5344   gt_cv_func_gettext_libc=yes
5345 else
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   gt_cv_func_gettext_libc=no
5350 fi
5351 rm -f conftest*
5352 fi
5353
5354 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
5355
5356            if test "$gt_cv_func_gettext_libc" != "yes"; then
5357              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5358 echo "configure:5359: checking for bindtextdomain in -lintl" >&5
5359 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   ac_save_LIBS="$LIBS"
5364 LIBS="-lintl  $LIBS"
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* Override any gcc2 internal prototype to avoid an error.  */
5369 /* We use char because int might match the return type of a gcc2
5370     builtin and then its argument prototype would still apply.  */
5371 char bindtextdomain();
5372
5373 int main() {
5374 bindtextdomain()
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=yes"
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=no"
5385 fi
5386 rm -f conftest*
5387 LIBS="$ac_save_LIBS"
5388
5389 fi
5390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5391   echo "$ac_t""yes" 1>&6
5392   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5393 echo "configure:5394: checking for gettext in libintl" >&5
5394 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
5398 echo "configure:5399: checking for gettext in -lintl" >&5
5399 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5400 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   ac_save_LIBS="$LIBS"
5404 LIBS="-lintl  $LIBS"
5405 cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5408 /* Override any gcc2 internal prototype to avoid an error.  */
5409 /* We use char because int might match the return type of a gcc2
5410     builtin and then its argument prototype would still apply.  */
5411 char gettext();
5412
5413 int main() {
5414 gettext()
5415 ; return 0; }
5416 EOF
5417 if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=yes"
5420 else
5421   echo "configure: failed program was:" >&5
5422   cat conftest.$ac_ext >&5
5423   rm -rf conftest*
5424   eval "ac_cv_lib_$ac_lib_var=no"
5425 fi
5426 rm -f conftest*
5427 LIBS="$ac_save_LIBS"
5428
5429 fi
5430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5431   echo "$ac_t""yes" 1>&6
5432   gt_cv_func_gettext_libintl=yes
5433 else
5434   echo "$ac_t""no" 1>&6
5435 gt_cv_func_gettext_libintl=no
5436 fi
5437
5438 fi
5439
5440 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5441 else
5442   echo "$ac_t""no" 1>&6
5443 fi
5444
5445            fi
5446
5447            if test "$gt_cv_func_gettext_libintl" = "yes"; then
5448              LIBS="-lintl $LIBS"
5449            fi
5450
5451            if test "$gt_cv_func_gettext_libc" = "yes" \
5452               || test "$gt_cv_func_gettext_libintl" = "yes"; then
5453               cat >> confdefs.h <<\EOF
5454 #define HAVE_GETTEXT 1
5455 EOF
5456
5457               # Extract the first word of "msgfmt", so it can be a program name with args.
5458 set dummy msgfmt; ac_word=$2
5459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5460 echo "configure:5461: checking for $ac_word" >&5
5461 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5462   echo $ac_n "(cached) $ac_c" 1>&6
5463 else
5464   case "$MSGFMT" in
5465   /*)
5466   gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5467   ;;
5468   *)
5469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5470   for ac_dir in $PATH; do
5471     test -z "$ac_dir" && ac_dir=.
5472     if test -f $ac_dir/$ac_word; then
5473       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5474         gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5475         break
5476       fi
5477     fi
5478   done
5479   IFS="$ac_save_ifs"
5480   test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
5481   ;;
5482 esac
5483 fi
5484 MSGFMT="$gcc_cv_path_MSGFMT"
5485 if test -n "$MSGFMT"; then
5486   echo "$ac_t""$MSGFMT" 1>&6
5487 else
5488   echo "$ac_t""no" 1>&6
5489 fi
5490               if test "$MSGFMT" != "no"; then
5491                 for ac_func in dcgettext
5492 do
5493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5494 echo "configure:5495: checking for $ac_func" >&5
5495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 /* System header to define __stub macros and hopefully few prototypes,
5502     which can conflict with char $ac_func(); below.  */
5503 #include <assert.h>
5504 /* Override any gcc2 internal prototype to avoid an error.  */
5505 /* We use char because int might match the return type of a gcc2
5506     builtin and then its argument prototype would still apply.  */
5507 char $ac_func();
5508
5509 int main() {
5510
5511 /* The GNU C library defines this for functions which it implements
5512     to always fail with ENOSYS.  Some functions are actually named
5513     something starting with __ and the normal name is an alias.  */
5514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5515 choke me
5516 #else
5517 $ac_func();
5518 #endif
5519
5520 ; return 0; }
5521 EOF
5522 if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5523   rm -rf conftest*
5524   eval "ac_cv_func_$ac_func=yes"
5525 else
5526   echo "configure: failed program was:" >&5
5527   cat conftest.$ac_ext >&5
5528   rm -rf conftest*
5529   eval "ac_cv_func_$ac_func=no"
5530 fi
5531 rm -f conftest*
5532 fi
5533
5534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5535   echo "$ac_t""yes" 1>&6
5536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5537   cat >> confdefs.h <<EOF
5538 #define $ac_tr_func 1
5539 EOF
5540  
5541 else
5542   echo "$ac_t""no" 1>&6
5543 fi
5544 done
5545
5546                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5547 set dummy gmsgfmt; ac_word=$2
5548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5549 echo "configure:5550: checking for $ac_word" >&5
5550 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5551   echo $ac_n "(cached) $ac_c" 1>&6
5552 else
5553   case "$GMSGFMT" in
5554   /*)
5555   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5556   ;;
5557   ?:/*)                  
5558   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5559   ;;
5560   *)
5561   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5562   ac_dummy="$PATH"
5563   for ac_dir in $ac_dummy; do 
5564     test -z "$ac_dir" && ac_dir=.
5565     if test -f $ac_dir/$ac_word; then
5566       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5567       break
5568     fi
5569   done
5570   IFS="$ac_save_ifs"
5571   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5572   ;;
5573 esac
5574 fi
5575 GMSGFMT="$gcc_cv_path_GMSGFMT"
5576 if test -n "$GMSGFMT"; then
5577   echo "$ac_t""$GMSGFMT" 1>&6
5578 else
5579   echo "$ac_t""no" 1>&6
5580 fi
5581
5582                 # Extract the first word of "xgettext", so it can be a program name with args.
5583 set dummy xgettext; ac_word=$2
5584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5585 echo "configure:5586: checking for $ac_word" >&5
5586 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   case "$XGETTEXT" in
5590   /*)
5591   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5592   ;;
5593   *)
5594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5595   for ac_dir in $PATH; do
5596     test -z "$ac_dir" && ac_dir=.
5597     if test -f $ac_dir/$ac_word; then
5598       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5599         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5600         break
5601       fi
5602     fi
5603   done
5604   IFS="$ac_save_ifs"
5605   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5606   ;;
5607 esac
5608 fi
5609 XGETTEXT="$gcc_cv_path_XGETTEXT"
5610 if test -n "$XGETTEXT"; then
5611   echo "$ac_t""$XGETTEXT" 1>&6
5612 else
5613   echo "$ac_t""no" 1>&6
5614 fi
5615
5616                 cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619
5620 int main() {
5621 extern int _nl_msg_cat_cntr;
5622                                return _nl_msg_cat_cntr
5623 ; return 0; }
5624 EOF
5625 if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5626   rm -rf conftest*
5627   CATOBJEXT=.gmo
5628                    DATADIRNAME=share
5629 else
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   CATOBJEXT=.mo
5634                    DATADIRNAME=lib
5635 fi
5636 rm -f conftest*
5637                 INSTOBJEXT=.mo
5638               else
5639                 create_catalogs="no"
5640               fi
5641             fi
5642         
5643 else
5644   echo "$ac_t""no" 1>&6
5645 fi
5646
5647
5648         if test "$CATOBJEXT" = "NONE"; then
5649           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
5650 echo "configure:5651: checking whether catgets can be used" >&5
5651           # Check whether --with-catgets or --without-catgets was given.
5652 if test "${with_catgets+set}" = set; then
5653   withval="$with_catgets"
5654   nls_cv_use_catgets=$withval
5655 else
5656   nls_cv_use_catgets=no
5657 fi
5658
5659           echo "$ac_t""$nls_cv_use_catgets" 1>&6
5660
5661           if test "$nls_cv_use_catgets" = "yes"; then
5662                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
5663 echo "configure:5664: checking for main in -li" >&5
5664 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5665 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5666   echo $ac_n "(cached) $ac_c" 1>&6
5667 else
5668   ac_save_LIBS="$LIBS"
5669 LIBS="-li  $LIBS"
5670 cat > conftest.$ac_ext <<EOF
5671 #line 5672 "configure"
5672 #include "confdefs.h"
5673
5674 int main() {
5675 main()
5676 ; return 0; }
5677 EOF
5678 if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5679   rm -rf conftest*
5680   eval "ac_cv_lib_$ac_lib_var=yes"
5681 else
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_lib_$ac_lib_var=no"
5686 fi
5687 rm -f conftest*
5688 LIBS="$ac_save_LIBS"
5689
5690 fi
5691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5692   echo "$ac_t""yes" 1>&6
5693     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5694     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5695   cat >> confdefs.h <<EOF
5696 #define $ac_tr_lib 1
5697 EOF
5698
5699   LIBS="-li $LIBS"
5700
5701 else
5702   echo "$ac_t""no" 1>&6
5703 fi
5704
5705             echo $ac_n "checking for catgets""... $ac_c" 1>&6
5706 echo "configure:5707: checking for catgets" >&5
5707 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5708   echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710   cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 /* System header to define __stub macros and hopefully few prototypes,
5714     which can conflict with char catgets(); below.  */
5715 #include <assert.h>
5716 /* Override any gcc2 internal prototype to avoid an error.  */
5717 /* We use char because int might match the return type of a gcc2
5718     builtin and then its argument prototype would still apply.  */
5719 char catgets();
5720
5721 int main() {
5722
5723 /* The GNU C library defines this for functions which it implements
5724     to always fail with ENOSYS.  Some functions are actually named
5725     something starting with __ and the normal name is an alias.  */
5726 #if defined (__stub_catgets) || defined (__stub___catgets)
5727 choke me
5728 #else
5729 catgets();
5730 #endif
5731
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5735   rm -rf conftest*
5736   eval "ac_cv_func_catgets=yes"
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_func_catgets=no"
5742 fi
5743 rm -f conftest*
5744 fi
5745
5746 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5747   echo "$ac_t""yes" 1>&6
5748   cat >> confdefs.h <<\EOF
5749 #define HAVE_CATGETS 1
5750 EOF
5751
5752                INTLOBJS="\$(CATOBJS)"
5753                # Extract the first word of "gencat", so it can be a program name with args.
5754 set dummy gencat; ac_word=$2
5755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5756 echo "configure:5757: checking for $ac_word" >&5
5757 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5758   echo $ac_n "(cached) $ac_c" 1>&6
5759 else
5760   case "$GENCAT" in
5761   /*)
5762   gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5763   ;;
5764   ?:/*)                  
5765   gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5766   ;;
5767   *)
5768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5769   ac_dummy="$PATH"
5770   for ac_dir in $ac_dummy; do 
5771     test -z "$ac_dir" && ac_dir=.
5772     if test -f $ac_dir/$ac_word; then
5773       gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5774       break
5775     fi
5776   done
5777   IFS="$ac_save_ifs"
5778   test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5779   ;;
5780 esac
5781 fi
5782 GENCAT="$gcc_cv_path_GENCAT"
5783 if test -n "$GENCAT"; then
5784   echo "$ac_t""$GENCAT" 1>&6
5785 else
5786   echo "$ac_t""no" 1>&6
5787 fi
5788                if test "$GENCAT" != "no"; then
5789                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
5790 set dummy gmsgfmt; ac_word=$2
5791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5792 echo "configure:5793: checking for $ac_word" >&5
5793 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5794   echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796   case "$GMSGFMT" in
5797   /*)
5798   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5799   ;;
5800   ?:/*)                  
5801   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5802   ;;
5803   *)
5804   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5805   ac_dummy="$PATH"
5806   for ac_dir in $ac_dummy; do 
5807     test -z "$ac_dir" && ac_dir=.
5808     if test -f $ac_dir/$ac_word; then
5809       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5810       break
5811     fi
5812   done
5813   IFS="$ac_save_ifs"
5814   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5815   ;;
5816 esac
5817 fi
5818 GMSGFMT="$gcc_cv_path_GMSGFMT"
5819 if test -n "$GMSGFMT"; then
5820   echo "$ac_t""$GMSGFMT" 1>&6
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825                  if test "$GMSGFMT" = "no"; then
5826                    # Extract the first word of "msgfmt", so it can be a program name with args.
5827 set dummy msgfmt; ac_word=$2
5828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5829 echo "configure:5830: checking for $ac_word" >&5
5830 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   case "$GMSGFMT" in
5834   /*)
5835   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5836   ;;
5837   *)
5838   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5839   for ac_dir in $PATH; do
5840     test -z "$ac_dir" && ac_dir=.
5841     if test -f $ac_dir/$ac_word; then
5842       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5843         gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5844         break
5845       fi
5846     fi
5847   done
5848   IFS="$ac_save_ifs"
5849   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5850   ;;
5851 esac
5852 fi
5853 GMSGFMT="$gcc_cv_path_GMSGFMT"
5854 if test -n "$GMSGFMT"; then
5855   echo "$ac_t""$GMSGFMT" 1>&6
5856 else
5857   echo "$ac_t""no" 1>&6
5858 fi
5859
5860                    if test "$GMSGFMT" = "msgfmt"; then
5861                      create_catalogs="no"
5862                    fi
5863                  fi
5864                  # Extract the first word of "xgettext", so it can be a program name with args.
5865 set dummy xgettext; ac_word=$2
5866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5867 echo "configure:5868: checking for $ac_word" >&5
5868 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   case "$XGETTEXT" in
5872   /*)
5873   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5874   ;;
5875   *)
5876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5877   for ac_dir in $PATH; do
5878     test -z "$ac_dir" && ac_dir=.
5879     if test -f $ac_dir/$ac_word; then
5880       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5881         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5882         break
5883       fi
5884     fi
5885   done
5886   IFS="$ac_save_ifs"
5887   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5888   ;;
5889 esac
5890 fi
5891 XGETTEXT="$gcc_cv_path_XGETTEXT"
5892 if test -n "$XGETTEXT"; then
5893   echo "$ac_t""$XGETTEXT" 1>&6
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897
5898                  USE_INCLUDED_LIBINTL=yes
5899                  CATOBJEXT=.cat
5900                  INSTOBJEXT=.cat
5901                  DATADIRNAME=lib
5902                  INTLDEPS='$(top_builddir)/intl/libintl.a'
5903                  INTLLIBS=$INTLDEPS
5904                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5905                  nls_cv_header_intl=intl/libintl.h
5906                  nls_cv_header_libgt=intl/libgettext.h
5907                fi
5908 else
5909   echo "$ac_t""no" 1>&6
5910 fi
5911
5912           fi
5913         fi
5914
5915         if test "$CATOBJEXT" = "NONE"; then
5916                           nls_cv_use_gnu_gettext=yes
5917         fi
5918       fi
5919
5920       if test "$nls_cv_use_gnu_gettext" = "yes"; then
5921                 INTLOBJS="\$(GETTOBJS)"
5922         # Extract the first word of "msgfmt", so it can be a program name with args.
5923 set dummy msgfmt; ac_word=$2
5924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5925 echo "configure:5926: checking for $ac_word" >&5
5926 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5927   echo $ac_n "(cached) $ac_c" 1>&6
5928 else
5929   case "$MSGFMT" in
5930   /*)
5931   gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5932   ;;
5933   *)
5934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5935   for ac_dir in $PATH; do
5936     test -z "$ac_dir" && ac_dir=.
5937     if test -f $ac_dir/$ac_word; then
5938       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5939         gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5940         break
5941       fi
5942     fi
5943   done
5944   IFS="$ac_save_ifs"
5945   test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5946   ;;
5947 esac
5948 fi
5949 MSGFMT="$gcc_cv_path_MSGFMT"
5950 if test -n "$MSGFMT"; then
5951   echo "$ac_t""$MSGFMT" 1>&6
5952 else
5953   echo "$ac_t""no" 1>&6
5954 fi
5955
5956         # Extract the first word of "gmsgfmt", so it can be a program name with args.
5957 set dummy gmsgfmt; ac_word=$2
5958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5959 echo "configure:5960: checking for $ac_word" >&5
5960 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5961   echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963   case "$GMSGFMT" in
5964   /*)
5965   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5966   ;;
5967   ?:/*)                  
5968   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5969   ;;
5970   *)
5971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5972   ac_dummy="$PATH"
5973   for ac_dir in $ac_dummy; do 
5974     test -z "$ac_dir" && ac_dir=.
5975     if test -f $ac_dir/$ac_word; then
5976       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5977       break
5978     fi
5979   done
5980   IFS="$ac_save_ifs"
5981   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5982   ;;
5983 esac
5984 fi
5985 GMSGFMT="$gcc_cv_path_GMSGFMT"
5986 if test -n "$GMSGFMT"; then
5987   echo "$ac_t""$GMSGFMT" 1>&6
5988 else
5989   echo "$ac_t""no" 1>&6
5990 fi
5991
5992                         if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5993           create_catalogs="no"
5994         fi
5995         # Extract the first word of "xgettext", so it can be a program name with args.
5996 set dummy xgettext; ac_word=$2
5997 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5998 echo "configure:5999: checking for $ac_word" >&5
5999 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
6000   echo $ac_n "(cached) $ac_c" 1>&6
6001 else
6002   case "$XGETTEXT" in
6003   /*)
6004   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6005   ;;
6006   *)
6007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6008   for ac_dir in $PATH; do
6009     test -z "$ac_dir" && ac_dir=.
6010     if test -f $ac_dir/$ac_word; then
6011       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
6012         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
6013         break
6014       fi
6015     fi
6016   done
6017   IFS="$ac_save_ifs"
6018   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
6019   ;;
6020 esac
6021 fi
6022 XGETTEXT="$gcc_cv_path_XGETTEXT"
6023 if test -n "$XGETTEXT"; then
6024   echo "$ac_t""$XGETTEXT" 1>&6
6025 else
6026   echo "$ac_t""no" 1>&6
6027 fi
6028
6029         
6030         USE_INCLUDED_LIBINTL=yes
6031         CATOBJEXT=.gmo
6032         INSTOBJEXT=.mo
6033         DATADIRNAME=share
6034         INTLDEPS='$(top_builddir)/intl/libintl.a'
6035         INTLLIBS=$INTLDEPS
6036         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
6037         nls_cv_header_intl=intl/libintl.h
6038         nls_cv_header_libgt=intl/libgettext.h
6039       fi
6040
6041             if test "$XGETTEXT" != ":"; then
6042                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
6043           : ;
6044         else
6045           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6046           XGETTEXT=":"
6047         fi
6048       fi
6049
6050
6051
6052       # We need to process the po/ directory.
6053       POSUB=po
6054     else
6055       DATADIRNAME=share
6056       nls_cv_header_intl=intl/libintl.h
6057       nls_cv_header_libgt=intl/libgettext.h
6058     fi
6059     
6060     
6061
6062
6063     # If this is used in GNU gettext we have to set USE_NLS to `yes'
6064     # because some of the sources are only built for this goal.
6065     if test "$PACKAGE" = gettext; then
6066       USE_NLS=yes
6067       USE_INCLUDED_LIBINTL=yes
6068     fi
6069
6070                 for lang in $ALL_LINGUAS; do
6071       GMOFILES="$GMOFILES $lang.gmo"
6072       POFILES="$POFILES $lang.po"
6073     done
6074
6075         
6076     
6077     
6078     
6079     
6080     
6081     
6082     
6083     
6084     
6085     
6086   
6087
6088    if test "x$create_catalogs" = "xno"; then
6089      echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
6090    fi
6091
6092    if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
6093      if test "x$ALL_LINGUAS" = "x"; then
6094        LINGUAS=
6095      else
6096        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6097 echo "configure:6098: checking for catalogs to be installed" >&5
6098        if test "x$LINGUAS" = "x"; then
6099          LINGUAS=$ALL_LINGUAS
6100        else
6101          NEW_LINGUAS=
6102          for lang in $ALL_LINGUAS; do
6103            case " $LINGUAS " in
6104              *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
6105            esac
6106          done
6107          LINGUAS=$NEW_LINGUAS
6108        fi
6109        echo "$ac_t""$LINGUAS" 1>&6
6110      fi
6111
6112           if test -n "$LINGUAS"; then
6113        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
6114      fi
6115    fi
6116
6117             if test $ac_cv_header_locale_h = yes; then
6118      INCLUDE_LOCALE_H="#include <locale.h>"
6119    else
6120      INCLUDE_LOCALE_H="\
6121 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
6122    fi
6123    
6124
6125             test -d intl || mkdir intl
6126    if test "$CATOBJEXT" = ".cat"; then
6127      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
6128 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
6129 echo "configure:6130: checking for linux/version.h" >&5
6130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6131   echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133   cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 #include <linux/version.h>
6137 EOF
6138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6139 { (eval echo configure:6140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6141 if test -z "$ac_err"; then
6142   rm -rf conftest*
6143   eval "ac_cv_header_$ac_safe=yes"
6144 else
6145   echo "$ac_err" >&5
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_header_$ac_safe=no"
6150 fi
6151 rm -f conftest*
6152 fi
6153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   msgformat=linux
6156 else
6157   echo "$ac_t""no" 1>&6
6158 msgformat=xopen
6159 fi
6160
6161
6162                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
6163    fi
6164       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
6165      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
6166
6167             if test "$PACKAGE" = "gettext"; then
6168      GT_NO="#NO#"
6169      GT_YES=
6170    else
6171      GT_NO=
6172      GT_YES="#YES#"
6173    fi
6174    
6175    
6176
6177             MKINSTALLDIRS=
6178    if test -n "$ac_aux_dir"; then
6179      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6180    fi
6181    if test -z "$MKINSTALLDIRS"; then
6182      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6183    fi
6184    
6185
6186       l=
6187    
6188
6189          test -d po || mkdir po
6190    if test "x$srcdir" != "x."; then
6191      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
6192        posrcprefix="$srcdir/"
6193      else
6194        posrcprefix="../$srcdir/"
6195      fi
6196    else
6197      posrcprefix="../"
6198    fi
6199    rm -f po/POTFILES
6200    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
6201         < $srcdir/po/POTFILES.in > po/POTFILES
6202   
6203 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
6204
6205 # Windows32 Registry support for specifying GCC installation paths.
6206 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6207 if test "${enable_win32_registry+set}" = set; then
6208   enableval="$enable_win32_registry"
6209   :
6210 fi
6211
6212
6213 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6214 echo "configure:6215: checking whether windows registry support is requested" >&5
6215 if test x$enable_win32_registry != xno; then
6216   cat >> confdefs.h <<\EOF
6217 #define ENABLE_WIN32_REGISTRY 1
6218 EOF
6219
6220   echo "$ac_t""yes" 1>&6
6221 else
6222   echo "$ac_t""no" 1>&6
6223 fi
6224
6225 # Check if user specified a different registry key.
6226 case x${enable_win32_registry} in
6227 x | xyes)
6228   # default.
6229   gcc_cv_win32_registry_key="$VERSION"
6230   ;;
6231 xno)
6232   # no registry lookup.
6233   gcc_cv_win32_registry_key=''
6234   ;;
6235 *)
6236   # user-specified key.
6237   gcc_cv_win32_registry_key="$enable_win32_registry"
6238   ;;
6239 esac
6240
6241 if test x$enable_win32_registry != xno; then
6242   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6243 echo "configure:6244: checking registry key on windows hosts" >&5
6244   cat >> confdefs.h <<EOF
6245 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6246 EOF
6247
6248   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6249 fi
6250
6251 # Get an absolute path to the GCC top-level source directory
6252 holddir=`pwd`
6253 cd $srcdir
6254 topdir=`pwd`
6255 cd $holddir
6256
6257 # Conditionalize the makefile for this host machine.
6258 # Make-host contains the concatenation of all host makefile fragments
6259 # [there can be more than one].  This file is built by configure.frag.
6260 host_overrides=Make-host
6261 dep_host_xmake_file=
6262 for f in .. ${host_xmake_file}
6263 do
6264         if test -f ${srcdir}/config/$f
6265         then
6266                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6267         fi
6268 done
6269
6270 # Conditionalize the makefile for this target machine.
6271 # Make-target contains the concatenation of all host makefile fragments
6272 # [there can be more than one].  This file is built by configure.frag.
6273 target_overrides=Make-target
6274 dep_tmake_file=
6275 for f in .. ${tmake_file}
6276 do
6277         if test -f ${srcdir}/config/$f
6278         then
6279                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6280         fi
6281 done
6282
6283 # If the host doesn't support symlinks, modify CC in
6284 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6285 # Otherwise, we can use "CC=$(CC)".
6286 rm -f symtest.tem
6287 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6288 then
6289         cc_set_by_configure="\$(CC)"
6290         quoted_cc_set_by_configure="\$(CC)"
6291         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6292 else
6293         rm -f symtest.tem
6294         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6295         then
6296                 symbolic_link="cp -p"
6297         else
6298                 symbolic_link="cp"
6299         fi
6300         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6301         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6302         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6303 fi
6304 rm -f symtest.tem
6305
6306 out_object_file=`basename $out_file .c`.o
6307
6308 tm_file_list=
6309 for f in $tm_file; do
6310   case $f in
6311     ansidecl.h )
6312        tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6313     defaults.h )
6314        tm_file_list="${tm_file_list} $f" ;;
6315     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6316   esac
6317 done
6318
6319 tm_p_file_list=
6320 for f in $tm_p_file; do
6321     tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6322 done
6323
6324 host_xm_file_list=
6325 for f in $host_xm_file; do
6326   case $f in
6327     ansidecl.h )
6328        host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6329     auto-host.h | defaults.h )
6330        host_xm_file_list="${host_xm_file_list} $f" ;;
6331     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6332   esac
6333 done
6334
6335 build_xm_file_list=
6336 for f in $build_xm_file; do
6337   case $f in
6338     ansidecl.h )
6339        build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6340     auto-build.h | auto-host.h | defaults.h )
6341        build_xm_file_list="${build_xm_file_list} $f" ;;
6342     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6343   esac
6344 done
6345
6346 # Define macro CROSS_COMPILE in compilation
6347 # if this is a cross-compiler.
6348 # Also use all.cross instead of all.internal
6349 # and add cross-make to Makefile.
6350 cross_overrides="/dev/null"
6351 if test x$host != x$target
6352 then
6353         cross_defines="CROSS=-DCROSS_COMPILE"
6354         cross_overrides="${topdir}/cross-make"
6355 fi
6356
6357 # If this is a cross-compiler that does not
6358 # have its own set of headers then define
6359 # inhibit_libc
6360
6361 # If this is using newlib, then define inhibit_libc in
6362 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
6363 # libgcc.a, but that's OK because newlib should have its own version of
6364 # assert.h.
6365 inhibit_libc=
6366 if test x$host != x$target && test x$with_headers = x; then
6367        inhibit_libc=-Dinhibit_libc
6368 else
6369        if test x$with_newlib = xyes; then
6370                inhibit_libc=-Dinhibit_libc
6371        fi
6372 fi
6373
6374
6375 # When building gcc with a cross-compiler, we need to fix a few things.
6376 # This must come after cross-make as we want all.build to override
6377 # all.cross.
6378 build_overrides="/dev/null"
6379 if test x$build != x$host
6380 then
6381         build_overrides="${topdir}/build-make"
6382 fi
6383
6384 # Expand extra_headers to include complete path.
6385 # This substitutes for lots of t-* files.
6386 extra_headers_list=
6387 if test "x$extra_headers" = x
6388 then true
6389 else
6390         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6391         for file in $extra_headers;
6392         do
6393                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6394         done
6395 fi
6396
6397 if test x$use_collect2 = xno; then
6398         use_collect2=
6399 fi
6400
6401 # Add a definition of USE_COLLECT2 if system wants one.
6402 # Also tell toplev.c what to do.
6403 # This substitutes for lots of t-* files.
6404 if test x$use_collect2 = x
6405 then
6406         will_use_collect2=
6407         maybe_use_collect2=
6408 else
6409         will_use_collect2="collect2"
6410         maybe_use_collect2="-DUSE_COLLECT2"
6411 fi
6412
6413 # If we have gas in the build tree, make a link to it.
6414 if test -f ../gas/Makefile; then
6415         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6416 fi
6417
6418 # If we have nm in the build tree, make a link to it.
6419 if test -f ../binutils/Makefile; then
6420         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6421 fi
6422
6423 # If we have ld in the build tree, make a link to it.
6424 if test -f ../ld/Makefile; then
6425 #       if test x$use_collect2 = x; then
6426 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6427 #       else
6428                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6429 #       fi
6430 fi
6431
6432 # Figure out what assembler we will be using.
6433 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6434 echo "configure:6435: checking what assembler to use" >&5
6435 gcc_cv_as=
6436 gcc_cv_gas_major_version=
6437 gcc_cv_gas_minor_version=
6438 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6439 if test -x "$DEFAULT_ASSEMBLER"; then
6440         gcc_cv_as="$DEFAULT_ASSEMBLER"
6441 elif test -x "$AS"; then
6442         gcc_cv_as="$AS"
6443 elif test -x as$host_exeext; then
6444         # Build using assembler in the current directory.
6445         gcc_cv_as=./as$host_exeext
6446 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6447         # Single tree build which includes gas.
6448         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6449         do
6450                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6451                 if test x$gcc_cv_gas_version != x; then
6452                         break
6453                 fi
6454         done
6455         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6456         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6457 fi
6458
6459 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6460         # Native build.
6461         # Search the same directories that the installed compiler will
6462         # search.  Else we may find the wrong assembler and lose.  If we
6463         # do not find a suitable assembler binary, then try the user's
6464         # path.
6465         #
6466         # Also note we have to check MD_EXEC_PREFIX before checking the
6467         # user's path.  Unfortunately, there is no good way to get at the
6468         # value of MD_EXEC_PREFIX here.  So we do a brute force search
6469         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
6470         # to be fixed as part of the make/configure rewrite too.
6471
6472         if test "x$exec_prefix" = xNONE; then
6473                 if test "x$prefix" = xNONE; then
6474                         test_prefix=/usr/local
6475                 else
6476                         test_prefix=$prefix
6477                 fi
6478         else
6479                 test_prefix=$exec_prefix
6480         fi
6481
6482         # If the loop below does not find an assembler, then use whatever
6483         # one we can find in the users's path.
6484         # user's path.
6485         gcc_cv_as=as$host_exeext
6486
6487         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6488                    $test_prefix/lib/gcc-lib/$target \
6489                    /usr/lib/gcc/$target/$gcc_version \
6490                    /usr/lib/gcc/$target \
6491                    $test_prefix/$target/bin/$target/$gcc_version \
6492                    $test_prefix/$target/bin \
6493                    /usr/libexec \
6494                    /usr/ccs/gcc \
6495                    /usr/ccs/bin \
6496                    /udk/usr/ccs/bin \
6497                    /bsd43/usr/lib/cmplrs/cc \
6498                    /usr/cross64/usr/bin \
6499                    /usr/lib/cmplrs/cc \
6500                    /sysv/usr/lib/cmplrs/cc \
6501                    /svr4/usr/lib/cmplrs/cc \
6502                    /usr/bin"
6503
6504         for dir in $test_dirs; do
6505                 if test -f $dir/as$host_exeext; then
6506                         gcc_cv_as=$dir/as$host_exeext
6507                         break;
6508                 fi
6509         done
6510 fi
6511 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6512   echo "$ac_t"""newly built gas"" 1>&6
6513 else
6514   echo "$ac_t""$gcc_cv_as" 1>&6
6515 fi
6516
6517 # Figure out what nm we will be using.
6518 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6519 echo "configure:6520: checking what nm to use" >&5
6520 if test -x nm$host_exeext; then
6521         gcc_cv_nm=./nm$host_exeext
6522 elif test x$host = x$target; then
6523         # Native build.
6524         gcc_cv_nm=nm$host_exeext
6525 fi
6526 echo "$ac_t""$gcc_cv_nm" 1>&6
6527
6528 # Figure out what assembler alignment features are present.
6529 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
6530 echo "configure:6531: checking assembler alignment features" >&5
6531 gcc_cv_as_alignment_features=none
6532 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6533         # Gas version 2.6 and later support for .balign and .p2align.
6534         # bytes to skip when using .p2align.
6535         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
6536                 gcc_cv_as_alignment_features=".balign and .p2align"
6537                 cat >> confdefs.h <<\EOF
6538 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6539 EOF
6540
6541         fi
6542         # Gas version 2.8 and later support specifying the maximum
6543         # bytes to skip when using .p2align.
6544         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
6545                 gcc_cv_as_alignment_features=".p2align including maximum skip"
6546                 cat >> confdefs.h <<\EOF
6547 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6548 EOF
6549
6550         fi
6551 elif test x$gcc_cv_as != x; then
6552         # Check if we have .balign and .p2align
6553         echo ".balign  4" > conftest.s
6554         echo ".p2align  2" >> conftest.s
6555         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6556                 gcc_cv_as_alignment_features=".balign and .p2align"
6557                 cat >> confdefs.h <<\EOF
6558 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6559 EOF
6560
6561         fi
6562         rm -f conftest.s conftest.o
6563         # Check if specifying the maximum bytes to skip when
6564         # using .p2align is supported.
6565         echo ".p2align 4,,7" > conftest.s
6566         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6567                 gcc_cv_as_alignment_features=".p2align including maximum skip"
6568                 cat >> confdefs.h <<\EOF
6569 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6570 EOF
6571
6572         fi
6573         rm -f conftest.s conftest.o
6574 fi
6575 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6576
6577 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
6578 echo "configure:6579: checking assembler subsection support" >&5
6579 gcc_cv_as_subsections=no
6580 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6581   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
6582     gcc_cv_as_subsections="working .subsection -1"
6583   fi
6584 elif test x$gcc_cv_as != x; then
6585         # Check if we have .subsection
6586         echo ".subsection 1" > conftest.s
6587         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6588                 gcc_cv_as_subsections=".subsection"
6589                 if test x$gcc_cv_nm != x; then
6590                         cat > conftest.s <<EOF
6591 conftest_label1: .word 0
6592 .subsection -1
6593 conftest_label2: .word 0
6594 .previous
6595 EOF
6596                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6597                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6598                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6599                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6600                                         :
6601                                 else
6602                                         gcc_cv_as_subsections="working .subsection -1"
6603                                 fi
6604                         fi
6605                 fi
6606         fi
6607         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6608 fi
6609 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6610         cat >> confdefs.h <<\EOF
6611 #define HAVE_GAS_SUBSECTION_ORDERING 1
6612 EOF
6613
6614 fi
6615 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6616
6617 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
6618 echo "configure:6619: checking assembler weak support" >&5
6619 gcc_cv_as_weak=no
6620 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6621   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
6622     gcc_cv_as_weak="yes"
6623   fi
6624 elif test x$gcc_cv_as != x; then
6625         # Check if we have .weak
6626         echo "  .weak foobar" > conftest.s
6627         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6628                 gcc_cv_as_weak="yes"
6629         fi
6630         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6631 fi
6632 if test x"$gcc_cv_as_weak" = xyes; then
6633         cat >> confdefs.h <<\EOF
6634 #define HAVE_GAS_WEAK 1
6635 EOF
6636
6637 fi
6638 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6639
6640 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
6641 echo "configure:6642: checking assembler hidden support" >&5
6642 gcc_cv_as_hidden=no
6643 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6644   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
6645     gcc_cv_as_hidden="yes"
6646   fi
6647 elif test x$gcc_cv_as != x; then
6648         # Check if we have .hidden
6649         echo "  .hidden foobar" > conftest.s
6650         echo "foobar:" >> conftest.s
6651         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6652                 gcc_cv_as_hidden="yes"
6653         fi
6654         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6655 fi
6656 if test x"$gcc_cv_as_hidden" = xyes; then
6657         cat >> confdefs.h <<\EOF
6658 #define HAVE_GAS_HIDDEN 1
6659 EOF
6660
6661 fi
6662 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6663
6664 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
6665 echo "configure:6666: checking assembler leb128 support" >&5
6666 gcc_cv_as_leb128=no
6667 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6668   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
6669     gcc_cv_as_leb128="yes"
6670   fi
6671 elif test x$gcc_cv_as != x; then
6672         # Check if we have .[us]leb128, and support symbol arithmetic with it.
6673         cat > conftest.s <<EOF
6674         .data
6675         .uleb128 L2 - L1
6676 L1:
6677         .uleb128 1280
6678         .sleb128 -1010
6679 L2:
6680 EOF
6681         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6682                 gcc_cv_as_leb128="yes"
6683
6684                 # GAS versions before 2.11 do not support uleb128,
6685                 # despite appearing to.
6686                 # ??? There exists an elf-specific test that will crash
6687                 # the assembler.  Perhaps it's better to figure out whether
6688                 # arbitrary sections are supported and try the test.
6689                 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
6690                 if echo "$as_ver" | grep GNU > /dev/null; then
6691                         as_ver=`echo $as_ver | sed -e 's/.* //'`
6692                         as_major=`echo $as_ver | sed 's/\..*//'`
6693                         as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6694                         if test $as_major -eq 2 -a $as_minor -lt 11; then
6695                                 gcc_cv_as_leb128="no"
6696                         fi
6697                 fi
6698         fi
6699         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6700 fi
6701 if test x"$gcc_cv_as_leb128" = xyes; then
6702         cat >> confdefs.h <<\EOF
6703 #define HAVE_AS_LEB128 1
6704 EOF
6705
6706 fi
6707 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6708
6709 case "$target" in 
6710   sparc*-*-*)
6711     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
6712 echo "configure:6713: checking assembler .register pseudo-op support" >&5
6713 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   
6717         gcc_cv_as_register_pseudo_op=unknown
6718         if test x$gcc_cv_as != x; then
6719             # Check if we have .register
6720             echo ".register %g2, #scratch" > conftest.s
6721             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6722                 gcc_cv_as_register_pseudo_op=yes
6723             else
6724                 gcc_cv_as_register_pseudo_op=no
6725             fi
6726             rm -f conftest.s conftest.o
6727         fi
6728     
6729 fi
6730
6731 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6732     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6733         cat >> confdefs.h <<\EOF
6734 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6735 EOF
6736
6737     fi
6738
6739     echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6740 echo "configure:6741: checking assembler supports -relax" >&5
6741 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   
6745         gcc_cv_as_relax_opt=unknown
6746         if test x$gcc_cv_as != x; then
6747             # Check if gas supports -relax
6748             echo ".text" > conftest.s
6749             if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6750                 gcc_cv_as_relax_opt=yes
6751             else
6752                 gcc_cv_as_relax_opt=no
6753             fi
6754             rm -f conftest.s conftest.o
6755         fi
6756     
6757 fi
6758
6759 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6760     if test "x$gcc_cv_as_relax_opt" = xyes; then
6761         cat >> confdefs.h <<\EOF
6762 #define HAVE_AS_RELAX_OPTION 1
6763 EOF
6764
6765     fi
6766
6767     case "$tm_file" in
6768     *64*)
6769         echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6770 echo "configure:6771: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6771 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6772   echo $ac_n "(cached) $ac_c" 1>&6
6773 else
6774   
6775                 if test -n "$gcc_cv_as"; then
6776                     echo ".xword foo" > conftest.s
6777                     gcc_cv_as_flags64=no
6778                     for flag in "-xarch=v9" "-64 -Av9"; do
6779                         if $gcc_cv_as $flag -o conftest.o conftest.s \
6780                             > /dev/null 2>&1; then
6781                             gcc_cv_as_flags64=$flag
6782                             break
6783                         fi
6784                     done
6785                     rm -f conftest.s conftest.o
6786                 else
6787                     if test "$gas" = yes; then
6788                         gcc_cv_as_flags64="-64 -Av9"
6789                     else
6790                         gcc_cv_as_flags64="-xarch=v9"
6791                     fi
6792                 fi
6793         
6794 fi
6795
6796 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6797         if test "x$gcc_cv_as_flags64" = xno; then
6798
6799             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6800             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6801
6802         else
6803             cat >> confdefs.h <<EOF
6804 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6805 EOF
6806
6807         fi
6808         ;;
6809     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6810         ;;
6811     esac
6812
6813     if test "x$gcc_cv_as_flags64" != xno; then
6814         echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6815 echo "configure:6816: checking for assembler offsetable %lo() support" >&5
6816 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   
6820             gcc_cv_as_offsetable_lo10=unknown
6821             if test "x$gcc_cv_as" != x; then
6822                 # Check if assembler has offsetable %lo()
6823                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6824                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6825                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6826                         > /dev/null 2>&1 &&
6827                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6828                         > /dev/null 2>&1; then
6829                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6830                         gcc_cv_as_offsetable_lo10=no
6831                     else
6832                         gcc_cv_as_offsetable_lo10=yes
6833                     fi
6834                 else
6835                     gcc_cv_as_offsetable_lo10=no
6836                 fi
6837                 rm -f conftest.s conftest.o conftest1.s conftest1.o
6838             fi
6839         
6840 fi
6841
6842 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6843         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6844             cat >> confdefs.h <<\EOF
6845 #define HAVE_AS_OFFSETABLE_LO10 1
6846 EOF
6847
6848         fi
6849     fi
6850     ;;
6851
6852   i[34567]86-*-*)
6853     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6854 echo "configure:6855: checking assembler instructions" >&5
6855     gcc_cv_as_instructions=
6856     if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6857       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
6858         gcc_cv_as_instructions="filds fists"
6859       fi
6860     elif test x$gcc_cv_as != x; then
6861         set "filds fists" "filds mem; fists mem"
6862         while test $# -gt 0
6863         do
6864                 echo "$2" > conftest.s
6865                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6866                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6867                 fi
6868                 shift 2
6869         done
6870         rm -f conftest.s conftest.o
6871     fi
6872     if test x"$gcc_cv_as_instructions" != x; then
6873         cat >> confdefs.h <<EOF
6874 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6875 EOF
6876
6877     fi
6878     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6879     ;;
6880 esac
6881
6882 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6883 echo "configure:6884: checking assembler dwarf2 debug_line support" >&5
6884 gcc_cv_as_dwarf2_debug_line=no
6885 # ??? Not all targets support dwarf2 debug_line, even within a version
6886 # of gas.  Moreover, we need to emit a valid instruction to trigger any
6887 # info to the output file.  So, as supported targets are added to gas 2.11,
6888 # add some instruction here to (also) show we expect this might work.
6889 # ??? Once 2.11 is released, probably need to add first known working
6890 # version to the per-target configury.
6891 case "$target" in
6892   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
6893     insn="nop"
6894     ;;
6895   ia64*-*-*)
6896     insn="nop 0"
6897     ;;
6898   esac
6899 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6900 then
6901   if test "$gcc_cv_gas_major_version" -eq 2 \
6902         -a "$gcc_cv_gas_minor_version" -ge 11 \
6903         -o "$gcc_cv_gas_major_version" -gt 2 \
6904      && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6905      && test x"$insn" != x ; then
6906     gcc_cv_as_dwarf2_debug_line="yes"
6907   fi
6908 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6909         echo '  .file 1 "conftest.s"' > conftest.s
6910         echo '  .loc 1 3 0' >> conftest.s
6911         echo "  $insn" >> conftest.s
6912         # ??? This fails with non-gnu grep.
6913         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6914            && grep debug_line conftest.o > /dev/null 2>&1 ; then
6915                 # The .debug_line file table must be in the exact order that
6916                 # we specified the files, since these indicies are also used
6917                 # by DW_AT_decl_file.  Approximate this test by testing if
6918                 # the assembler bitches if the same index is assigned twice.
6919                 echo '  .file 1 "foo.s"' > conftest.s
6920                 echo '  .file 1 "bar.s"' >> conftest.s
6921                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6922                 then
6923                   gcc_cv_as_dwarf2_debug_line="no"
6924                 else
6925                   gcc_cv_as_dwarf2_debug_line="yes"
6926                 fi
6927         fi
6928         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6929 fi
6930 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6931         cat >> confdefs.h <<\EOF
6932 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6933 EOF
6934
6935 fi
6936 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6937
6938 # Figure out what language subdirectories are present.
6939 # Look if the user specified --enable-languages="..."; if not, use
6940 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6941 # go away some day.
6942 if test x"${enable_languages+set}" != xset; then
6943         if test x"${LANGUAGES+set}" = xset; then
6944                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6945         else
6946                 enable_languages=all
6947         fi
6948 else
6949         if test x"${enable_languages}" = x; then
6950                 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6951         fi
6952 fi
6953
6954 # First scan to see if an enabled language requires some other language.
6955 # We assume that a given config-lang.in will list all the language
6956 # front ends it requires, even if some are required indirectly.
6957 for lang in ${srcdir}/*/config-lang.in ..
6958 do
6959    case $lang in
6960     ..)
6961        ;;
6962     # The odd quoting in the next line works around
6963     # an apparent bug in bash 1.12 on linux.
6964     ${srcdir}/[*]/config-lang.in)
6965        ;;
6966     *)
6967        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
6968        this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
6969        for other in $this_lang_requires
6970        do
6971           case ,${enable_languages}, in
6972            *,$other,*)
6973               ;;
6974            *,all,*)
6975               ;;
6976            *,$lang_alias,*)
6977               enable_languages="$enable_languages,$other"
6978               ;;
6979           esac
6980        done
6981        ;;
6982    esac
6983 done
6984
6985 subdirs=
6986 for lang in ${srcdir}/*/config-lang.in ..
6987 do
6988         case $lang in
6989         ..) ;;
6990         # The odd quoting in the next line works around
6991         # an apparent bug in bash 1.12 on linux.
6992         ${srcdir}/[*]/config-lang.in) ;;
6993         *)
6994           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
6995           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
6996           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
6997           if test "x$lang_alias" = x
6998           then
6999                 echo "$lang doesn't set \$language." 1>&2
7000                 exit 1
7001           fi
7002           case ${build_by_default},${enable_languages}, in
7003           *,$lang_alias,*) add_this_lang=yes ;;
7004           no,*) add_this_lang=no ;;
7005           *,all,*) add_this_lang=yes ;;
7006           *) add_this_lang=no ;;
7007           esac
7008           if test x"${add_this_lang}" = xyes; then
7009                 case $lang in
7010                     ${srcdir}/ada/config-lang.in)
7011                         if test x$have_gnat = xyes ; then
7012                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7013                         fi
7014                         ;;
7015                     *)
7016                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7017                         ;;
7018                 esac
7019           fi
7020           ;;
7021         esac
7022 done
7023
7024 # Make gthr-default.h if we have a thread file.
7025 gthread_flags=
7026 if test $thread_file != single; then
7027     rm -f gthr-default.h
7028     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7029     gthread_flags=-DHAVE_GTHR_DEFAULT
7030 fi
7031
7032
7033 # Find out what GC implementation we want, or may, use.
7034 # Check whether --with-gc or --without-gc was given.
7035 if test "${with_gc+set}" = set; then
7036   withval="$with_gc"
7037   case "$withval" in
7038   simple | page)
7039     GGC=ggc-$withval
7040     ;;
7041   *)
7042     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7043     ;;
7044 esac
7045 else
7046   GGC=ggc-page
7047 fi
7048
7049
7050 echo "Using $GGC for garbage collection."
7051
7052 # Use the system's zlib library.
7053 zlibdir=-L../zlib
7054 zlibinc="-I\$(srcdir)/../zlib"
7055 # Check whether --with-system-zlib or --without-system-zlib was given.
7056 if test "${with_system_zlib+set}" = set; then
7057   withval="$with_system_zlib"
7058   zlibdir=
7059 zlibinc=
7060
7061 fi
7062
7063
7064
7065
7066 cat >> confdefs.h <<EOF
7067 #define ENABLE_STD_NAMESPACE 1
7068 EOF
7069
7070
7071
7072 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7073 echo "configure:7074: checking whether to enable maintainer-specific portions of Makefiles" >&5
7074     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7075 if test "${enable_maintainer_mode+set}" = set; then
7076   enableval="$enable_maintainer_mode"
7077   maintainer_mode=$enableval
7078 else
7079   maintainer_mode=no
7080 fi
7081
7082
7083 echo "$ac_t""$maintainer_mode" 1>&6
7084
7085 if test "$maintainer_mode" = "yes"; then
7086   MAINT=''
7087 else
7088   MAINT='#'
7089 fi
7090
7091 # With Setjmp/Longjmp based exception handling.
7092 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
7093 if test "${enable_sjlj_exceptions+set}" = set; then
7094   enableval="$enable_sjlj_exceptions"
7095   sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
7096 cat >> confdefs.h <<EOF
7097 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
7098 EOF
7099
7100 fi
7101
7102
7103 # Make empty files to contain the specs and options for each language.
7104 # Then add #include lines to for a compiler that has specs and/or options.
7105
7106 lang_specs_files=
7107 lang_options_files=
7108 lang_tree_files=
7109 rm -f specs.h options.h gencheck.h
7110 touch specs.h options.h gencheck.h
7111 for subdir in . $subdirs
7112 do
7113         if test -f $srcdir/$subdir/lang-specs.h; then
7114                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
7115                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7116         fi
7117         if test -f $srcdir/$subdir/lang-options.h; then
7118                 echo "#include \"$subdir/lang-options.h\"" >>options.h
7119                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
7120         fi
7121         if test -f $srcdir/$subdir/$subdir-tree.def; then
7122                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
7123                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7124         fi
7125 done
7126
7127 # These (without "all_") are set in each config-lang.in.
7128 # `language' must be a single word so is spelled singularly.
7129 all_languages=
7130 all_boot_languages=
7131 all_compilers=
7132 all_stagestuff=
7133 all_diff_excludes=
7134 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
7135 # List of language makefile fragments.
7136 all_lang_makefiles=
7137 all_headers=
7138 all_lib2funcs=
7139
7140 # Add the language fragments.
7141 # Languages are added via two mechanisms.  Some information must be
7142 # recorded in makefile variables, these are defined in config-lang.in.
7143 # We accumulate them and plug them into the main Makefile.
7144 # The other mechanism is a set of hooks for each of the main targets
7145 # like `clean', `install', etc.
7146
7147 language_fragments="Make-lang"
7148 language_hooks="Make-hooks"
7149
7150 for s in .. $subdirs
7151 do
7152         if test $s != ".."
7153         then
7154                 language=
7155                 boot_language=
7156                 compilers=
7157                 stagestuff=
7158                 diff_excludes=
7159                 headers=
7160                 outputs=
7161                 lib2funcs=
7162                 . ${srcdir}/$s/config-lang.in
7163                 if test "x$language" = x
7164                 then
7165                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7166                         exit 1
7167                 fi
7168                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
7169                 if test -f ${srcdir}/$s/Makefile.in
7170                 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
7171                 fi
7172                 all_languages="$all_languages $language"
7173                 if test "x$boot_language" = xyes
7174                 then
7175                         all_boot_languages="$all_boot_languages $language"
7176                 fi
7177                 all_compilers="$all_compilers $compilers"
7178                 all_stagestuff="$all_stagestuff $stagestuff"
7179                 all_diff_excludes="$all_diff_excludes $diff_excludes"
7180                 all_headers="$all_headers $headers"
7181                 all_outputs="$all_outputs $outputs"
7182                 all_lib2funcs="$all_lib2funcs $lib2funcs"
7183         fi
7184 done
7185
7186 check_languages=
7187 for language in .. $all_languages
7188 do
7189         if test $language != ".."
7190         then
7191                 check_languages="$check_languages check-$language"
7192         fi
7193 done
7194
7195 # Since we can't use `::' targets, we link each language in
7196 # with a set of hooks, reached indirectly via lang.${target}.
7197
7198 rm -f Make-hooks
7199 touch Make-hooks
7200 target_list="all.build all.cross start.encap rest.encap \
7201         info dvi \
7202         install-normal install-common install-info install-man \
7203         uninstall \
7204         mostlyclean clean distclean extraclean maintainer-clean \
7205         stage1 stage2 stage3 stage4"
7206 for t in $target_list
7207 do
7208         x=
7209         for lang in .. $all_languages
7210         do
7211                 if test $lang != ".."; then
7212                         x="$x $lang.$t"
7213                 fi
7214         done
7215         echo "lang.$t: $x" >> Make-hooks
7216 done
7217
7218 # Create .gdbinit.
7219
7220 echo "dir ." > .gdbinit
7221 echo "dir ${srcdir}" >> .gdbinit
7222 if test x$gdb_needs_out_file_path = xyes
7223 then
7224         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7225 fi
7226 if test "x$subdirs" != x; then
7227         for s in $subdirs
7228         do
7229                 echo "dir ${srcdir}/$s" >> .gdbinit
7230         done
7231 fi
7232 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
7233
7234 # Define variables host_canonical and build_canonical
7235 # because some Cygnus local changes in the Makefile depend on them.
7236 build_canonical=${build}
7237 host_canonical=${host}
7238 target_subdir=
7239 if test "${host}" != "${target}" ; then
7240     target_subdir=${target_alias}/
7241 fi
7242
7243
7244
7245         
7246 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7247 # absolute path for gcc_tooldir based on inserting the number of up-directory
7248 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7249 # $(libsubdir)/@(unlibsubdir) based path.
7250 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7251 # make and thus we'd get different behavior depending on where we built the
7252 # sources.
7253 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7254     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7255 else
7256 # An explanation of the sed strings:
7257 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
7258 #  -e 's|/$||'            match a trailing forward slash and eliminates it
7259 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
7260 #  -e 's|/[^/]*|../|g'    replaces each occurance of /<directory> with ../
7261 #
7262 # (*) Note this pattern overwrites the first character of the string
7263 # with a forward slash if one is not already present.  This is not a
7264 # problem because the exact names of the sub-directories concerned is
7265 # unimportant, just the number of them matters.
7266 #
7267 # The practical upshot of these patterns is like this:
7268 #
7269 #  prefix     exec_prefix        result
7270 #  ------     -----------        ------
7271 #   /foo        /foo/bar          ../
7272 #   /foo/       /foo/bar          ../
7273 #   /foo        /foo/bar/         ../
7274 #   /foo/       /foo/bar/         ../
7275 #   /foo        /foo/bar/ugg      ../../
7276 #
7277     dollar='$$'
7278     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7279 fi
7280
7281
7282
7283 # Find a directory in which to install a shared libgcc.
7284
7285 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7286 if test "${enable_version_specific_runtime_libs+set}" = set; then
7287   enableval="$enable_version_specific_runtime_libs"
7288   :
7289 fi
7290
7291
7292 # Check whether --with-slibdir or --without-slibdir was given.
7293 if test "${with_slibdir+set}" = set; then
7294   withval="$with_slibdir"
7295   slibdir="$with_slibdir"
7296 else
7297   if test "${enable_version_specific_runtime_libs+set}" = set; then
7298   slibdir='$(libsubdir)'
7299 elif test "$host" != "$target"; then
7300   slibdir='$(build_tooldir)/lib'
7301 else
7302   slibdir='$(libdir)'
7303 fi
7304 fi
7305
7306
7307
7308 # Nothing to do for FLOAT_H, float_format already handled.
7309 objdir=`pwd`
7310
7311
7312 # Process the language and host/target makefile fragments.
7313 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7314
7315 # Substitute configuration variables
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386 # Echo that links are built
7387 if test x$host = x$target
7388 then
7389         str1="native "
7390 else
7391         str1="cross-"
7392         str2=" from $host"
7393 fi
7394
7395 if test x$host != x$build
7396 then
7397         str3=" on a $build system"
7398 fi
7399
7400 if test "x$str2" != x || test "x$str3" != x
7401 then
7402         str4=
7403 fi
7404
7405 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7406
7407 if test "x$str2" != x || test "x$str3" != x
7408 then
7409         echo " ${str2}${str3}." 1>&2
7410 fi
7411
7412 # Truncate the target if necessary
7413 if test x$host_truncate_target != x; then
7414         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7415 fi
7416
7417 # Configure the subdirectories
7418 # AC_CONFIG_SUBDIRS($subdirs)
7419
7420 # Create the Makefile
7421 # and configure language subdirectories
7422 trap '' 1 2 15
7423 cat > confcache <<\EOF
7424 # This file is a shell script that caches the results of configure
7425 # tests run on this system so they can be shared between configure
7426 # scripts and configure runs.  It is not useful on other systems.
7427 # If it contains results you don't want to keep, you may remove or edit it.
7428 #
7429 # By default, configure uses ./config.cache as the cache file,
7430 # creating it if it does not exist already.  You can give configure
7431 # the --cache-file=FILE option to use a different cache file; that is
7432 # what configure does when it calls configure scripts in
7433 # subdirectories, so they share the cache.
7434 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7435 # config.status only pays attention to the cache file if you give it the
7436 # --recheck option to rerun configure.
7437 #
7438 EOF
7439 # The following way of writing the cache mishandles newlines in values,
7440 # but we know of no workaround that is simple, portable, and efficient.
7441 # So, don't put newlines in cache variables' values.
7442 # Ultrix sh set writes to stderr and can't be redirected directly,
7443 # and sets the high bit in the cache file unless we assign to the vars.
7444 (set) 2>&1 |
7445   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7446   *ac_space=\ *)
7447     # `set' does not quote correctly, so add quotes (double-quote substitution
7448     # turns \\\\ into \\, and sed turns \\ into \).
7449     sed -n \
7450       -e "s/'/'\\\\''/g" \
7451       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7452     ;;
7453   *)
7454     # `set' quotes correctly as required by POSIX, so do not add quotes.
7455     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7456     ;;
7457   esac >> confcache
7458 if cmp -s $cache_file confcache; then
7459   :
7460 else
7461   if test -w $cache_file; then
7462     echo "updating cache $cache_file"
7463     cat confcache > $cache_file
7464   else
7465     echo "not updating unwritable cache $cache_file"
7466   fi
7467 fi
7468 rm -f confcache
7469
7470 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7471
7472 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7473 # Let make expand exec_prefix.
7474 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7475
7476 # Any assignment to VPATH causes Sun make to only execute
7477 # the first set of double-colon rules, so remove it if not needed.
7478 # If there is a colon in the path, we need to keep it.
7479 if test "x$srcdir" = x.; then
7480   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7481 fi
7482
7483 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7484
7485 DEFS=-DHAVE_CONFIG_H
7486
7487 # Without the "./", some shells look in PATH for config.status.
7488 : ${CONFIG_STATUS=./config.status}
7489
7490 echo creating $CONFIG_STATUS
7491 rm -f $CONFIG_STATUS
7492 cat > $CONFIG_STATUS <<EOF
7493 #! /bin/sh
7494 # Generated automatically by configure.
7495 # Run this file to recreate the current configuration.
7496 # This directory was configured as follows,
7497 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7498 #
7499 # $0 $ac_configure_args
7500 #
7501 # Compiler output produced by configure, useful for debugging
7502 # configure, is in ./config.log if it exists.
7503
7504 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7505 for ac_option
7506 do
7507   case "\$ac_option" in
7508   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7509     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7510     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7511   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7512     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7513     exit 0 ;;
7514   -help | --help | --hel | --he | --h)
7515     echo "\$ac_cs_usage"; exit 0 ;;
7516   *) echo "\$ac_cs_usage"; exit 1 ;;
7517   esac
7518 done
7519
7520 ac_given_srcdir=$srcdir
7521
7522 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7523 EOF
7524 cat >> $CONFIG_STATUS <<EOF
7525
7526 # Protect against being on the right side of a sed subst in config.status.
7527 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7528  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7529 $ac_vpsub
7530 $extrasub
7531 s%@SHELL@%$SHELL%g
7532 s%@CFLAGS@%$CFLAGS%g
7533 s%@CPPFLAGS@%$CPPFLAGS%g
7534 s%@CXXFLAGS@%$CXXFLAGS%g
7535 s%@FFLAGS@%$FFLAGS%g
7536 s%@DEFS@%$DEFS%g
7537 s%@LDFLAGS@%$LDFLAGS%g
7538 s%@LIBS@%$LIBS%g
7539 s%@exec_prefix@%$exec_prefix%g
7540 s%@prefix@%$prefix%g
7541 s%@program_transform_name@%$program_transform_name%g
7542 s%@bindir@%$bindir%g
7543 s%@sbindir@%$sbindir%g
7544 s%@libexecdir@%$libexecdir%g
7545 s%@datadir@%$datadir%g
7546 s%@sysconfdir@%$sysconfdir%g
7547 s%@sharedstatedir@%$sharedstatedir%g
7548 s%@localstatedir@%$localstatedir%g
7549 s%@libdir@%$libdir%g
7550 s%@includedir@%$includedir%g
7551 s%@oldincludedir@%$oldincludedir%g
7552 s%@infodir@%$infodir%g
7553 s%@mandir@%$mandir%g
7554 s%@enable_multilib@%$enable_multilib%g
7555 s%@enable_shared@%$enable_shared%g
7556 s%@host@%$host%g
7557 s%@host_alias@%$host_alias%g
7558 s%@host_cpu@%$host_cpu%g
7559 s%@host_vendor@%$host_vendor%g
7560 s%@host_os@%$host_os%g
7561 s%@target@%$target%g
7562 s%@target_alias@%$target_alias%g
7563 s%@target_cpu@%$target_cpu%g
7564 s%@target_vendor@%$target_vendor%g
7565 s%@target_os@%$target_os%g
7566 s%@build@%$build%g
7567 s%@build_alias@%$build_alias%g
7568 s%@build_cpu@%$build_cpu%g
7569 s%@build_vendor@%$build_vendor%g
7570 s%@build_os@%$build_os%g
7571 s%@CC@%$CC%g
7572 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
7573 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7574 s%@strict1_warn@%$strict1_warn%g
7575 s%@CPP@%$CPP%g
7576 s%@warn_cflags@%$warn_cflags%g
7577 s%@stage1_cflags@%$stage1_cflags%g
7578 s%@SET_MAKE@%$SET_MAKE%g
7579 s%@AWK@%$AWK%g
7580 s%@LN@%$LN%g
7581 s%@LN_S@%$LN_S%g
7582 s%@RANLIB@%$RANLIB%g
7583 s%@INSTALL@%$INSTALL%g
7584 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7585 s%@INSTALL_DATA@%$INSTALL_DATA%g
7586 s%@have_gnat@%$have_gnat%g
7587 s%@have_mktemp_command@%$have_mktemp_command%g
7588 s%@MAKEINFO@%$MAKEINFO%g
7589 s%@BUILD_INFO@%$BUILD_INFO%g
7590 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
7591 s%@FLEX@%$FLEX%g
7592 s%@BISON@%$BISON%g
7593 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
7594 s%@vfprintf@%$vfprintf%g
7595 s%@doprint@%$doprint%g
7596 s%@strstr@%$strstr%g
7597 s%@manext@%$manext%g
7598 s%@objext@%$objext%g
7599 s%@PACKAGE@%$PACKAGE%g
7600 s%@VERSION@%$VERSION%g
7601 s%@CHECK_PO@%$CHECK_PO%g
7602 s%@USE_NLS@%$USE_NLS%g
7603 s%@MSGFMT@%$MSGFMT%g
7604 s%@GMSGFMT@%$GMSGFMT%g
7605 s%@XGETTEXT@%$XGETTEXT%g
7606 s%@GENCAT@%$GENCAT%g
7607 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7608 s%@CATALOGS@%$CATALOGS%g
7609 s%@CATOBJEXT@%$CATOBJEXT%g
7610 s%@DATADIRNAME@%$DATADIRNAME%g
7611 s%@GMOFILES@%$GMOFILES%g
7612 s%@INSTOBJEXT@%$INSTOBJEXT%g
7613 s%@INTLDEPS@%$INTLDEPS%g
7614 s%@INTLLIBS@%$INTLLIBS%g
7615 s%@INTLOBJS@%$INTLOBJS%g
7616 s%@POFILES@%$POFILES%g
7617 s%@POSUB@%$POSUB%g
7618 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7619 s%@GT_NO@%$GT_NO%g
7620 s%@GT_YES@%$GT_YES%g
7621 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7622 s%@l@%$l%g
7623 s%@inhibit_libc@%$inhibit_libc%g
7624 s%@gthread_flags@%$gthread_flags%g
7625 s%@GGC@%$GGC%g
7626 s%@zlibdir@%$zlibdir%g
7627 s%@zlibinc@%$zlibinc%g
7628 s%@MAINT@%$MAINT%g
7629 s%@build_canonical@%$build_canonical%g
7630 s%@host_canonical@%$host_canonical%g
7631 s%@target_subdir@%$target_subdir%g
7632 s%@gcc_tooldir@%$gcc_tooldir%g
7633 s%@dollar@%$dollar%g
7634 s%@slibdir@%$slibdir%g
7635 s%@objdir@%$objdir%g
7636 s%@subdirs@%$subdirs%g
7637 s%@all_boot_languages@%$all_boot_languages%g
7638 s%@all_compilers@%$all_compilers%g
7639 s%@all_diff_excludes@%$all_diff_excludes%g
7640 s%@all_headers@%$all_headers%g
7641 s%@all_lang_makefiles@%$all_lang_makefiles%g
7642 s%@all_languages@%$all_languages%g
7643 s%@all_lib2funcs@%$all_lib2funcs%g
7644 s%@all_stagestuff@%$all_stagestuff%g
7645 s%@build_exeext@%$build_exeext%g
7646 s%@build_install_headers_dir@%$build_install_headers_dir%g
7647 s%@build_xm_file_list@%$build_xm_file_list%g
7648 s%@build_xm_file@%$build_xm_file%g
7649 s%@build_xm_defines@%$build_xm_defines%g
7650 s%@check_languages@%$check_languages%g
7651 s%@cc_set_by_configure@%$cc_set_by_configure%g
7652 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
7653 s%@cpp_install_dir@%$cpp_install_dir%g
7654 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7655 s%@dep_tmake_file@%$dep_tmake_file%g
7656 s%@extra_c_flags@%$extra_c_flags%g
7657 s%@extra_headers_list@%$extra_headers_list%g
7658 s%@extra_objs@%$extra_objs%g
7659 s%@extra_parts@%$extra_parts%g
7660 s%@extra_passes@%$extra_passes%g
7661 s%@extra_programs@%$extra_programs%g
7662 s%@float_h_file@%$float_h_file%g
7663 s%@gcc_config_arguments@%$gcc_config_arguments%g
7664 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
7665 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
7666 s%@gcc_version@%$gcc_version%g
7667 s%@gcc_version_full@%$gcc_version_full%g
7668 s%@gcc_version_trigger@%$gcc_version_trigger%g
7669 s%@host_exeext@%$host_exeext%g
7670 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
7671 s%@host_xm_file_list@%$host_xm_file_list%g
7672 s%@host_xm_file@%$host_xm_file%g
7673 s%@host_xm_defines@%$host_xm_defines%g
7674 s%@install@%$install%g
7675 s%@lang_options_files@%$lang_options_files%g
7676 s%@lang_specs_files@%$lang_specs_files%g
7677 s%@lang_tree_files@%$lang_tree_files%g
7678 s%@local_prefix@%$local_prefix%g
7679 s%@maybe_use_collect2@%$maybe_use_collect2%g
7680 s%@md_file@%$md_file%g
7681 s%@objc_boehm_gc@%$objc_boehm_gc%g
7682 s%@out_file@%$out_file%g
7683 s%@out_object_file@%$out_object_file%g
7684 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
7685 s%@symbolic_link@%$symbolic_link%g
7686 s%@thread_file@%$thread_file%g
7687 s%@tm_file_list@%$tm_file_list%g
7688 s%@tm_file@%$tm_file%g
7689 s%@tm_p_file_list@%$tm_p_file_list%g
7690 s%@tm_p_file@%$tm_p_file%g
7691 s%@xm_file@%$xm_file%g
7692 s%@xm_defines@%$xm_defines%g
7693 s%@will_use_collect2@%$will_use_collect2%g
7694 s%@c_target_objs@%$c_target_objs%g
7695 s%@cxx_target_objs@%$cxx_target_objs%g
7696 s%@target_cpu_default@%$target_cpu_default%g
7697 /@target_overrides@/r $target_overrides
7698 s%@target_overrides@%%g
7699 /@host_overrides@/r $host_overrides
7700 s%@host_overrides@%%g
7701 s%@cross_defines@%$cross_defines%g
7702 /@cross_overrides@/r $cross_overrides
7703 s%@cross_overrides@%%g
7704 /@build_overrides@/r $build_overrides
7705 s%@build_overrides@%%g
7706 /@language_fragments@/r $language_fragments
7707 s%@language_fragments@%%g
7708 /@language_hooks@/r $language_hooks
7709 s%@language_hooks@%%g
7710
7711 CEOF
7712 EOF
7713
7714 cat >> $CONFIG_STATUS <<\EOF
7715
7716 # Split the substitutions into bite-sized pieces for seds with
7717 # small command number limits, like on Digital OSF/1 and HP-UX.
7718 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7719 ac_file=1 # Number of current file.
7720 ac_beg=1 # First line for current file.
7721 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7722 ac_more_lines=:
7723 ac_sed_cmds=""
7724 while $ac_more_lines; do
7725   if test $ac_beg -gt 1; then
7726     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7727   else
7728     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7729   fi
7730   if test ! -s conftest.s$ac_file; then
7731     ac_more_lines=false
7732     rm -f conftest.s$ac_file
7733   else
7734     if test -z "$ac_sed_cmds"; then
7735       ac_sed_cmds="sed -f conftest.s$ac_file"
7736     else
7737       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7738     fi
7739     ac_file=`expr $ac_file + 1`
7740     ac_beg=$ac_end
7741     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7742   fi
7743 done
7744 if test -z "$ac_sed_cmds"; then
7745   ac_sed_cmds=cat
7746 fi
7747 EOF
7748
7749 cat >> $CONFIG_STATUS <<EOF
7750
7751 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7752 EOF
7753 cat >> $CONFIG_STATUS <<\EOF
7754 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7755   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7756   case "$ac_file" in
7757   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7758        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7759   *) ac_file_in="${ac_file}.in" ;;
7760   esac
7761
7762   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7763
7764   # Remove last slash and all that follows it.  Not all systems have dirname.
7765   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7766   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7767     # The file is in a subdirectory.
7768     test ! -d "$ac_dir" && mkdir "$ac_dir"
7769     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7770     # A "../" for each directory in $ac_dir_suffix.
7771     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7772   else
7773     ac_dir_suffix= ac_dots=
7774   fi
7775
7776   case "$ac_given_srcdir" in
7777   .)  srcdir=.
7778       if test -z "$ac_dots"; then top_srcdir=.
7779       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7780   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7781   *) # Relative path.
7782     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7783     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7784   esac
7785
7786
7787   echo creating "$ac_file"
7788   rm -f "$ac_file"
7789   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7790   case "$ac_file" in
7791   *Makefile*) ac_comsub="1i\\
7792 # $configure_input" ;;
7793   *) ac_comsub= ;;
7794   esac
7795
7796   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7797   sed -e "$ac_comsub
7798 s%@configure_input@%$configure_input%g
7799 s%@srcdir@%$srcdir%g
7800 s%@top_srcdir@%$top_srcdir%g
7801 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7802 fi; done
7803 rm -f conftest.s*
7804
7805 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7806 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7807 #
7808 # ac_d sets the value in "#define NAME VALUE" lines.
7809 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7810 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7811 ac_dC='\3'
7812 ac_dD='%g'
7813 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7814 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7815 ac_uB='\([      ]\)%\1#\2define\3'
7816 ac_uC=' '
7817 ac_uD='\4%g'
7818 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7819 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7820 ac_eB='$%\1#\2define\3'
7821 ac_eC=' '
7822 ac_eD='%g'
7823
7824 if test "${CONFIG_HEADERS+set}" != set; then
7825 EOF
7826 cat >> $CONFIG_STATUS <<EOF
7827   CONFIG_HEADERS="auto-host.h:config.in"
7828 EOF
7829 cat >> $CONFIG_STATUS <<\EOF
7830 fi
7831 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7832   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7833   case "$ac_file" in
7834   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7835        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7836   *) ac_file_in="${ac_file}.in" ;;
7837   esac
7838
7839   echo creating $ac_file
7840
7841   rm -f conftest.frag conftest.in conftest.out
7842   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7843   cat $ac_file_inputs > conftest.in
7844
7845 EOF
7846
7847 # Transform confdefs.h into a sed script conftest.vals that substitutes
7848 # the proper values into config.h.in to produce config.h.  And first:
7849 # Protect against being on the right side of a sed subst in config.status.
7850 # Protect against being in an unquoted here document in config.status.
7851 rm -f conftest.vals
7852 cat > conftest.hdr <<\EOF
7853 s/[\\&%]/\\&/g
7854 s%[\\$`]%\\&%g
7855 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7856 s%ac_d%ac_u%gp
7857 s%ac_u%ac_e%gp
7858 EOF
7859 sed -n -f conftest.hdr confdefs.h > conftest.vals
7860 rm -f conftest.hdr
7861
7862 # This sed command replaces #undef with comments.  This is necessary, for
7863 # example, in the case of _POSIX_SOURCE, which is predefined and required
7864 # on some systems where configure will not decide to define it.
7865 cat >> conftest.vals <<\EOF
7866 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7867 EOF
7868
7869 # Break up conftest.vals because some shells have a limit on
7870 # the size of here documents, and old seds have small limits too.
7871
7872 rm -f conftest.tail
7873 while :
7874 do
7875   ac_lines=`grep -c . conftest.vals`
7876   # grep -c gives empty output for an empty file on some AIX systems.
7877   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7878   # Write a limited-size here document to conftest.frag.
7879   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7880   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7881   echo 'CEOF
7882   sed -f conftest.frag conftest.in > conftest.out
7883   rm -f conftest.in
7884   mv conftest.out conftest.in
7885 ' >> $CONFIG_STATUS
7886   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7887   rm -f conftest.vals
7888   mv conftest.tail conftest.vals
7889 done
7890 rm -f conftest.vals
7891
7892 cat >> $CONFIG_STATUS <<\EOF
7893   rm -f conftest.frag conftest.h
7894   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7895   cat conftest.in >> conftest.h
7896   rm -f conftest.in
7897   if cmp -s $ac_file conftest.h 2>/dev/null; then
7898     echo "$ac_file is unchanged"
7899     rm -f conftest.h
7900   else
7901     # Remove last slash and all that follows it.  Not all systems have dirname.
7902       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7903       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7904       # The file is in a subdirectory.
7905       test ! -d "$ac_dir" && mkdir "$ac_dir"
7906     fi
7907     rm -f $ac_file
7908     mv conftest.h $ac_file
7909   fi
7910 fi; done
7911
7912 EOF
7913
7914 cat >> $CONFIG_STATUS <<EOF
7915 ac_sources="$nls_cv_header_libgt"
7916 ac_dests="$nls_cv_header_intl"
7917 EOF
7918
7919 cat >> $CONFIG_STATUS <<\EOF
7920 srcdir=$ac_given_srcdir
7921 while test -n "$ac_sources"; do
7922   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7923   set $ac_sources; ac_source=$1; shift; ac_sources=$*
7924
7925   echo "linking $srcdir/$ac_source to $ac_dest"
7926
7927   if test ! -r $srcdir/$ac_source; then
7928     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7929   fi
7930   rm -f $ac_dest
7931
7932   # Make relative symlinks.
7933   # Remove last slash and all that follows it.  Not all systems have dirname.
7934   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7935   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7936     # The dest file is in a subdirectory.
7937     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7938     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7939     # A "../" for each directory in $ac_dest_dir_suffix.
7940     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7941   else
7942     ac_dest_dir_suffix= ac_dots=
7943   fi
7944
7945   case "$srcdir" in
7946   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7947   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7948   esac
7949
7950   # Make a symlink if possible; otherwise try a hard link.
7951   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7952     ln $srcdir/$ac_source $ac_dest; then :
7953   else
7954     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7955   fi
7956 done
7957 EOF
7958 cat >> $CONFIG_STATUS <<EOF
7959
7960
7961 host='${host}'
7962 build='${build}'
7963 target='${target}'
7964 target_alias='${target_alias}'
7965 srcdir='${srcdir}'
7966 subdirs='${subdirs}'
7967 symbolic_link='${symbolic_link}'
7968 program_transform_set='${program_transform_set}'
7969 program_transform_name='${program_transform_name}'
7970 dep_host_xmake_file='${dep_host_xmake_file}'
7971 host_xmake_file='${host_xmake_file}'
7972 dep_tmake_file='${dep_tmake_file}'
7973 tmake_file='${tmake_file}'
7974 thread_file='${thread_file}'
7975 gcc_config_arguments='${gcc_config_arguments}'
7976 gcc_version='${gcc_version}'
7977 gcc_version_full='${gcc_version_full}'
7978 gcc_version_trigger='${gcc_version_trigger}'
7979 local_prefix='${local_prefix}'
7980 build_install_headers_dir='${build_install_headers_dir}'
7981 build_exeext='${build_exeext}'
7982 host_exeext='${host_exeext}'
7983 out_file='${out_file}'
7984 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7985 SET_MAKE='${SET_MAKE}'
7986 target_list='${target_list}'
7987 target_overrides='${target_overrides}'
7988 host_overrides='${host_overrides}'
7989 cross_defines='${cross_defines}'
7990 cross_overrides='${cross_overrides}'
7991 build_overrides='${build_overrides}'
7992 cpp_install_dir='${cpp_install_dir}'
7993
7994 EOF
7995 cat >> $CONFIG_STATUS <<\EOF
7996 case "$CONFIG_FILES" in *po/Makefile.in*)
7997         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7998       esac
7999
8000 case x$CONFIG_HEADERS in
8001 xauto-host.h:config.in)
8002 echo > cstamp-h ;;
8003 esac
8004 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8005 # bootstrapping and the installation procedure can still use
8006 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
8007 # FLAGS_TO_PASS has been modified to solve the problem there.
8008 # This is virtually a duplicate of what happens in configure.lang; we do
8009 # an extra check to make sure this only happens if ln -s can be used.
8010 if test "$symbolic_link" = "ln -s"; then
8011  for d in .. ${subdirs} ; do
8012    if test $d != ..; then
8013         STARTDIR=`pwd`
8014         cd $d
8015         for t in stage1 stage2 stage3 stage4 include
8016         do
8017                 rm -f $t
8018                 $symbolic_link ../$t $t 2>/dev/null
8019         done
8020         cd $STARTDIR
8021    fi
8022  done
8023 else true ; fi
8024 # Avoid having to add intl to our include paths.
8025 if test -f intl/libintl.h; then
8026   echo creating libintl.h
8027   echo '#include "intl/libintl.h"' >libintl.h
8028 fi
8029
8030 exit 0
8031 EOF
8032 chmod +x $CONFIG_STATUS
8033 rm -fr confdefs* $ac_clean_files
8034 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8035