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