OSDN Git Service

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