OSDN Git Service

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