OSDN Git Service

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