OSDN Git Service

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