OSDN Git Service

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