OSDN Git Service

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