OSDN Git Service

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