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