OSDN Git Service

* lib/old-dejagnu.exp (old-dejagnu): Copy extra source files
[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 gawk mawk 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 strtoul bsearch popen times clock \
3401         strchr strrchr kill getrlimit setrlimit atoll atoq \
3402         sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
3403         fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
3404         lstat
3405 do
3406 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3407 echo "configure:3408: checking for $ac_func" >&5
3408 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 /* System header to define __stub macros and hopefully few prototypes,
3415     which can conflict with char $ac_func(); below.  */
3416 #include <assert.h>
3417 /* Override any gcc2 internal prototype to avoid an error.  */
3418 /* We use char because int might match the return type of a gcc2
3419     builtin and then its argument prototype would still apply.  */
3420 char $ac_func();
3421
3422 int main() {
3423
3424 /* The GNU C library defines this for functions which it implements
3425     to always fail with ENOSYS.  Some functions are actually named
3426     something starting with __ and the normal name is an alias.  */
3427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3428 choke me
3429 #else
3430 $ac_func();
3431 #endif
3432
3433 ; return 0; }
3434 EOF
3435 if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3436   rm -rf conftest*
3437   eval "ac_cv_func_$ac_func=yes"
3438 else
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -rf conftest*
3442   eval "ac_cv_func_$ac_func=no"
3443 fi
3444 rm -f conftest*
3445 fi
3446
3447 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3450   cat >> confdefs.h <<EOF
3451 #define $ac_tr_func 1
3452 EOF
3453  
3454 else
3455   echo "$ac_t""no" 1>&6
3456 fi
3457 done
3458
3459
3460 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3461 echo "configure:3462: checking for ssize_t" >&5
3462 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <sys/types.h>
3469 #if STDC_HEADERS
3470 #include <stdlib.h>
3471 #include <stddef.h>
3472 #endif
3473 EOF
3474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3475   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3476   rm -rf conftest*
3477   ac_cv_type_ssize_t=yes
3478 else
3479   rm -rf conftest*
3480   ac_cv_type_ssize_t=no
3481 fi
3482 rm -f conftest*
3483
3484 fi
3485 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3486 if test $ac_cv_type_ssize_t = no; then
3487   cat >> confdefs.h <<\EOF
3488 #define ssize_t int
3489 EOF
3490
3491 fi
3492
3493
3494 # Try to determine the array type of the second argument of getgroups
3495 # for the target system (int or gid_t).
3496 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3497 echo "configure:3498: checking for uid_t in sys/types.h" >&5
3498 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 #include <sys/types.h>
3505 EOF
3506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3507   egrep "uid_t" >/dev/null 2>&1; then
3508   rm -rf conftest*
3509   ac_cv_type_uid_t=yes
3510 else
3511   rm -rf conftest*
3512   ac_cv_type_uid_t=no
3513 fi
3514 rm -f conftest*
3515
3516 fi
3517
3518 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3519 if test $ac_cv_type_uid_t = no; then
3520   cat >> confdefs.h <<\EOF
3521 #define uid_t int
3522 EOF
3523
3524   cat >> confdefs.h <<\EOF
3525 #define gid_t int
3526 EOF
3527
3528 fi
3529
3530 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3531 echo "configure:3532: checking type of array argument to getgroups" >&5
3532 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3533   echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535   if test "$cross_compiling" = yes; then
3536   ac_cv_type_getgroups=cross
3537 else
3538   cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541
3542 /* Thanks to Mike Rendell for this test.  */
3543 #include <sys/types.h>
3544 #define NGID 256
3545 #undef MAX
3546 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3547 main()
3548 {
3549   gid_t gidset[NGID];
3550   int i, n;
3551   union { gid_t gval; long lval; }  val;
3552
3553   val.lval = -1;
3554   for (i = 0; i < NGID; i++)
3555     gidset[i] = val.gval;
3556   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3557                  gidset);
3558   /* Exit non-zero if getgroups seems to require an array of ints.  This
3559      happens when gid_t is short but getgroups modifies an array of ints.  */
3560   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3561 }
3562
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3565 then
3566     ac_cv_type_getgroups=gid_t
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -fr conftest*
3571   ac_cv_type_getgroups=int
3572 fi
3573 rm -fr conftest*
3574 fi
3575
3576 if test $ac_cv_type_getgroups = cross; then
3577         cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #include <unistd.h>
3581 EOF
3582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3583   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3584   rm -rf conftest*
3585   ac_cv_type_getgroups=gid_t
3586 else
3587   rm -rf conftest*
3588   ac_cv_type_getgroups=int
3589 fi
3590 rm -f conftest*
3591
3592 fi
3593 fi
3594
3595 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3596 cat >> confdefs.h <<EOF
3597 #define GETGROUPS_T $ac_cv_type_getgroups
3598 EOF
3599
3600
3601 if test "${target}" = "${build}"; then
3602   TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3603 else
3604   case "${target}" in
3605         # This condition may need some tweaking.  It should include all
3606         # targets where the array type of the second argument of getgroups
3607         # is int and the type of gid_t is not equivalent to int.
3608         *-*-sunos* | *-*-ultrix*)
3609                 TARGET_GETGROUPS_T=int
3610                 ;;
3611         *)
3612                 TARGET_GETGROUPS_T=gid_t
3613                 ;;
3614   esac
3615 fi
3616
3617
3618 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3619 echo "configure:3620: checking for vprintf" >&5
3620 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623   cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 /* System header to define __stub macros and hopefully few prototypes,
3627     which can conflict with char vprintf(); below.  */
3628 #include <assert.h>
3629 /* Override any gcc2 internal prototype to avoid an error.  */
3630 /* We use char because int might match the return type of a gcc2
3631     builtin and then its argument prototype would still apply.  */
3632 char vprintf();
3633
3634 int main() {
3635
3636 /* The GNU C library defines this for functions which it implements
3637     to always fail with ENOSYS.  Some functions are actually named
3638     something starting with __ and the normal name is an alias.  */
3639 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3640 choke me
3641 #else
3642 vprintf();
3643 #endif
3644
3645 ; return 0; }
3646 EOF
3647 if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3648   rm -rf conftest*
3649   eval "ac_cv_func_vprintf=yes"
3650 else
3651   echo "configure: failed program was:" >&5
3652   cat conftest.$ac_ext >&5
3653   rm -rf conftest*
3654   eval "ac_cv_func_vprintf=no"
3655 fi
3656 rm -f conftest*
3657 fi
3658
3659 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3660   echo "$ac_t""yes" 1>&6
3661   cat >> confdefs.h <<\EOF
3662 #define HAVE_VPRINTF 1
3663 EOF
3664
3665 else
3666   echo "$ac_t""no" 1>&6
3667 fi
3668
3669 if test "$ac_cv_func_vprintf" != yes; then
3670 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3671 echo "configure:3672: checking for _doprnt" >&5
3672 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3673   echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675   cat > conftest.$ac_ext <<EOF
3676 #line 3677 "configure"
3677 #include "confdefs.h"
3678 /* System header to define __stub macros and hopefully few prototypes,
3679     which can conflict with char _doprnt(); below.  */
3680 #include <assert.h>
3681 /* Override any gcc2 internal prototype to avoid an error.  */
3682 /* We use char because int might match the return type of a gcc2
3683     builtin and then its argument prototype would still apply.  */
3684 char _doprnt();
3685
3686 int main() {
3687
3688 /* The GNU C library defines this for functions which it implements
3689     to always fail with ENOSYS.  Some functions are actually named
3690     something starting with __ and the normal name is an alias.  */
3691 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3692 choke me
3693 #else
3694 _doprnt();
3695 #endif
3696
3697 ; return 0; }
3698 EOF
3699 if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3700   rm -rf conftest*
3701   eval "ac_cv_func__doprnt=yes"
3702 else
3703   echo "configure: failed program was:" >&5
3704   cat conftest.$ac_ext >&5
3705   rm -rf conftest*
3706   eval "ac_cv_func__doprnt=no"
3707 fi
3708 rm -f conftest*
3709 fi
3710
3711 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3712   echo "$ac_t""yes" 1>&6
3713   cat >> confdefs.h <<\EOF
3714 #define HAVE_DOPRNT 1
3715 EOF
3716
3717 else
3718   echo "$ac_t""no" 1>&6
3719 fi
3720
3721 fi
3722
3723 vfprintf=
3724 doprint=
3725 if test $ac_cv_func_vprintf != yes ; then
3726   vfprintf=vfprintf.o
3727   if test $ac_cv_func__doprnt != yes ; then
3728     doprint=doprint.o
3729   fi
3730 fi
3731
3732
3733
3734 for ac_func in strstr
3735 do
3736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3737 echo "configure:3738: checking for $ac_func" >&5
3738 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744 /* System header to define __stub macros and hopefully few prototypes,
3745     which can conflict with char $ac_func(); below.  */
3746 #include <assert.h>
3747 /* Override any gcc2 internal prototype to avoid an error.  */
3748 /* We use char because int might match the return type of a gcc2
3749     builtin and then its argument prototype would still apply.  */
3750 char $ac_func();
3751
3752 int main() {
3753
3754 /* The GNU C library defines this for functions which it implements
3755     to always fail with ENOSYS.  Some functions are actually named
3756     something starting with __ and the normal name is an alias.  */
3757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3758 choke me
3759 #else
3760 $ac_func();
3761 #endif
3762
3763 ; return 0; }
3764 EOF
3765 if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3766   rm -rf conftest*
3767   eval "ac_cv_func_$ac_func=yes"
3768 else
3769   echo "configure: failed program was:" >&5
3770   cat conftest.$ac_ext >&5
3771   rm -rf conftest*
3772   eval "ac_cv_func_$ac_func=no"
3773 fi
3774 rm -f conftest*
3775 fi
3776
3777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3778   echo "$ac_t""yes" 1>&6
3779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3780   cat >> confdefs.h <<EOF
3781 #define $ac_tr_func 1
3782 EOF
3783  strstr=
3784 else
3785   echo "$ac_t""no" 1>&6
3786 strstr=strstr.o
3787 fi
3788 done
3789
3790    
3791 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3792 echo "configure:3793: checking whether the printf functions support %p" >&5
3793 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3794   echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796   if test "$cross_compiling" = yes; then
3797   gcc_cv_func_printf_ptr=no
3798 else
3799   cat > conftest.$ac_ext <<EOF
3800 #line 3801 "configure"
3801 #include "confdefs.h"
3802 #include <stdio.h>
3803
3804 int main()
3805 {
3806   char buf[64];
3807   char *p = buf, *q = NULL;
3808   sprintf(buf, "%p", p);
3809   sscanf(buf, "%p", &q);
3810   return (p != q);
3811 }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3814 then
3815   gcc_cv_func_printf_ptr=yes
3816 else
3817   echo "configure: failed program was:" >&5
3818   cat conftest.$ac_ext >&5
3819   rm -fr conftest*
3820   gcc_cv_func_printf_ptr=no
3821 fi
3822 rm -fr conftest*
3823 fi
3824
3825 rm -f core core.* *.core
3826 fi
3827
3828 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3829 if test $gcc_cv_func_printf_ptr = yes ; then
3830   cat >> confdefs.h <<\EOF
3831 #define HAVE_PRINTF_PTR 1
3832 EOF
3833
3834 fi
3835
3836
3837 case "${host}" in
3838 *-*-uwin*)
3839   { echo "configure: error: 
3840 *** UWIN may not be used as a host platform because
3841 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3842   ;;
3843 esac
3844 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3845 echo "configure:3846: checking for pid_t" >&5
3846 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3847   echo $ac_n "(cached) $ac_c" 1>&6
3848 else
3849   cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852 #include <sys/types.h>
3853 #if STDC_HEADERS
3854 #include <stdlib.h>
3855 #include <stddef.h>
3856 #endif
3857 EOF
3858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3860   rm -rf conftest*
3861   ac_cv_type_pid_t=yes
3862 else
3863   rm -rf conftest*
3864   ac_cv_type_pid_t=no
3865 fi
3866 rm -f conftest*
3867
3868 fi
3869 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3870 if test $ac_cv_type_pid_t = no; then
3871   cat >> confdefs.h <<\EOF
3872 #define pid_t int
3873 EOF
3874
3875 fi
3876
3877 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3878 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3879 echo "configure:3880: checking for vfork.h" >&5
3880 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3881   echo $ac_n "(cached) $ac_c" 1>&6
3882 else
3883   cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <vfork.h>
3887 EOF
3888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3889 { (eval echo configure:3890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3891 if test -z "$ac_err"; then
3892   rm -rf conftest*
3893   eval "ac_cv_header_$ac_safe=yes"
3894 else
3895   echo "$ac_err" >&5
3896   echo "configure: failed program was:" >&5
3897   cat conftest.$ac_ext >&5
3898   rm -rf conftest*
3899   eval "ac_cv_header_$ac_safe=no"
3900 fi
3901 rm -f conftest*
3902 fi
3903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3904   echo "$ac_t""yes" 1>&6
3905   cat >> confdefs.h <<\EOF
3906 #define HAVE_VFORK_H 1
3907 EOF
3908
3909 else
3910   echo "$ac_t""no" 1>&6
3911 fi
3912
3913 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3914 echo "configure:3915: checking for working vfork" >&5
3915 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   if test "$cross_compiling" = yes; then
3919   echo $ac_n "checking for vfork""... $ac_c" 1>&6
3920 echo "configure:3921: checking for vfork" >&5
3921 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 /* System header to define __stub macros and hopefully few prototypes,
3928     which can conflict with char vfork(); below.  */
3929 #include <assert.h>
3930 /* Override any gcc2 internal prototype to avoid an error.  */
3931 /* We use char because int might match the return type of a gcc2
3932     builtin and then its argument prototype would still apply.  */
3933 char vfork();
3934
3935 int main() {
3936
3937 /* The GNU C library defines this for functions which it implements
3938     to always fail with ENOSYS.  Some functions are actually named
3939     something starting with __ and the normal name is an alias.  */
3940 #if defined (__stub_vfork) || defined (__stub___vfork)
3941 choke me
3942 #else
3943 vfork();
3944 #endif
3945
3946 ; return 0; }
3947 EOF
3948 if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3949   rm -rf conftest*
3950   eval "ac_cv_func_vfork=yes"
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   eval "ac_cv_func_vfork=no"
3956 fi
3957 rm -f conftest*
3958 fi
3959
3960 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3961   echo "$ac_t""yes" 1>&6
3962   :
3963 else
3964   echo "$ac_t""no" 1>&6
3965 fi
3966
3967 ac_cv_func_vfork_works=$ac_cv_func_vfork
3968 else
3969   cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 /* Thanks to Paul Eggert for this test.  */
3973 #include <stdio.h>
3974 #include <sys/types.h>
3975 #include <sys/stat.h>
3976 #ifdef HAVE_UNISTD_H
3977 #include <unistd.h>
3978 #endif
3979 #ifdef HAVE_VFORK_H
3980 #include <vfork.h>
3981 #endif
3982 /* On some sparc systems, changes by the child to local and incoming
3983    argument registers are propagated back to the parent.
3984    The compiler is told about this with #include <vfork.h>,
3985    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3986    Test for this by using a static variable whose address
3987    is put into a register that is clobbered by the vfork.  */
3988 static
3989 #ifdef __cplusplus
3990 sparc_address_test (int arg)
3991 #else
3992 sparc_address_test (arg) int arg;
3993 #endif
3994 {
3995   static pid_t child;
3996   if (!child) {
3997     child = vfork ();
3998     if (child < 0) {
3999       perror ("vfork");
4000       _exit(2);
4001     }
4002     if (!child) {
4003       arg = getpid();
4004       write(-1, "", 0);
4005       _exit (arg);
4006     }
4007   }
4008 }
4009 main() {
4010   pid_t parent = getpid ();
4011   pid_t child;
4012
4013   sparc_address_test ();
4014
4015   child = vfork ();
4016
4017   if (child == 0) {
4018     /* Here is another test for sparc vfork register problems.
4019        This test uses lots of local variables, at least
4020        as many local variables as main has allocated so far
4021        including compiler temporaries.  4 locals are enough for
4022        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4023        A buggy compiler should reuse the register of parent
4024        for one of the local variables, since it will think that
4025        parent can't possibly be used any more in this routine.
4026        Assigning to the local variable will thus munge parent
4027        in the parent process.  */
4028     pid_t
4029       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4030       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4031     /* Convince the compiler that p..p7 are live; otherwise, it might
4032        use the same hardware register for all 8 local variables.  */
4033     if (p != p1 || p != p2 || p != p3 || p != p4
4034         || p != p5 || p != p6 || p != p7)
4035       _exit(1);
4036
4037     /* On some systems (e.g. IRIX 3.3),
4038        vfork doesn't separate parent from child file descriptors.
4039        If the child closes a descriptor before it execs or exits,
4040        this munges the parent's descriptor as well.
4041        Test for this by closing stdout in the child.  */
4042     _exit(close(fileno(stdout)) != 0);
4043   } else {
4044     int status;
4045     struct stat st;
4046
4047     while (wait(&status) != child)
4048       ;
4049     exit(
4050          /* Was there some problem with vforking?  */
4051          child < 0
4052
4053          /* Did the child fail?  (This shouldn't happen.)  */
4054          || status
4055
4056          /* Did the vfork/compiler bug occur?  */
4057          || parent != getpid()
4058
4059          /* Did the file descriptor bug occur?  */
4060          || fstat(fileno(stdout), &st) != 0
4061          );
4062   }
4063 }
4064 EOF
4065 if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4066 then
4067   ac_cv_func_vfork_works=yes
4068 else
4069   echo "configure: failed program was:" >&5
4070   cat conftest.$ac_ext >&5
4071   rm -fr conftest*
4072   ac_cv_func_vfork_works=no
4073 fi
4074 rm -fr conftest*
4075 fi
4076
4077 fi
4078
4079 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4080 if test $ac_cv_func_vfork_works = no; then
4081   cat >> confdefs.h <<\EOF
4082 #define vfork fork
4083 EOF
4084
4085 fi
4086
4087 for ac_func in getpagesize
4088 do
4089 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4090 echo "configure:4091: checking for $ac_func" >&5
4091 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 /* System header to define __stub macros and hopefully few prototypes,
4098     which can conflict with char $ac_func(); below.  */
4099 #include <assert.h>
4100 /* Override any gcc2 internal prototype to avoid an error.  */
4101 /* We use char because int might match the return type of a gcc2
4102     builtin and then its argument prototype would still apply.  */
4103 char $ac_func();
4104
4105 int main() {
4106
4107 /* The GNU C library defines this for functions which it implements
4108     to always fail with ENOSYS.  Some functions are actually named
4109     something starting with __ and the normal name is an alias.  */
4110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4111 choke me
4112 #else
4113 $ac_func();
4114 #endif
4115
4116 ; return 0; }
4117 EOF
4118 if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4119   rm -rf conftest*
4120   eval "ac_cv_func_$ac_func=yes"
4121 else
4122   echo "configure: failed program was:" >&5
4123   cat conftest.$ac_ext >&5
4124   rm -rf conftest*
4125   eval "ac_cv_func_$ac_func=no"
4126 fi
4127 rm -f conftest*
4128 fi
4129
4130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4131   echo "$ac_t""yes" 1>&6
4132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4133   cat >> confdefs.h <<EOF
4134 #define $ac_tr_func 1
4135 EOF
4136  
4137 else
4138   echo "$ac_t""no" 1>&6
4139 fi
4140 done
4141
4142 # The test program for the next two tests is the same except for one
4143 # set of ifdefs.
4144 cat >ct-mmap.inc <<'EOF'
4145 #include <sys/types.h>
4146 #include <sys/mman.h>
4147 #include <fcntl.h>
4148 #include <signal.h>
4149 #include <setjmp.h>
4150 #include <stdio.h>
4151
4152 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4153 # define MAP_ANONYMOUS MAP_ANON
4154 #endif
4155
4156 /* This mess was copied from the GNU getpagesize.h.  */
4157 #ifndef HAVE_GETPAGESIZE
4158 # ifdef HAVE_UNISTD_H
4159 #  include <unistd.h>
4160 # endif
4161
4162 /* Assume that all systems that can run configure have sys/param.h.  */
4163 # ifndef HAVE_SYS_PARAM_H
4164 #  define HAVE_SYS_PARAM_H 1
4165 # endif
4166
4167 # ifdef _SC_PAGESIZE
4168 #  define getpagesize() sysconf(_SC_PAGESIZE)
4169 # else /* no _SC_PAGESIZE */
4170 #  ifdef HAVE_SYS_PARAM_H
4171 #   include <sys/param.h>
4172 #   ifdef EXEC_PAGESIZE
4173 #    define getpagesize() EXEC_PAGESIZE
4174 #   else /* no EXEC_PAGESIZE */
4175 #    ifdef NBPG
4176 #     define getpagesize() NBPG * CLSIZE
4177 #     ifndef CLSIZE
4178 #      define CLSIZE 1
4179 #     endif /* no CLSIZE */
4180 #    else /* no NBPG */
4181 #     ifdef NBPC
4182 #      define getpagesize() NBPC
4183 #     else /* no NBPC */
4184 #      ifdef PAGESIZE
4185 #       define getpagesize() PAGESIZE
4186 #      endif /* PAGESIZE */
4187 #     endif /* no NBPC */
4188 #    endif /* no NBPG */
4189 #   endif /* no EXEC_PAGESIZE */
4190 #  else /* no HAVE_SYS_PARAM_H */
4191 #   define getpagesize() 8192   /* punt totally */
4192 #  endif /* no HAVE_SYS_PARAM_H */
4193 # endif /* no _SC_PAGESIZE */
4194
4195 #endif /* no HAVE_GETPAGESIZE */
4196
4197 #ifndef MAP_FAILED
4198 # define MAP_FAILED -1
4199 #endif
4200
4201 #undef perror_exit
4202 #define perror_exit(str, val) \
4203   do { perror(str); exit(val); } while (0)
4204
4205 /* Some versions of cygwin mmap require that munmap is called with the
4206    same parameters as mmap.  GCC expects that this is not the case.
4207    Test for various forms of this problem.  Warning - icky signal games.  */
4208
4209 static sigset_t unblock_sigsegv;
4210 static jmp_buf r;
4211 static size_t pg;
4212 static int devzero;
4213
4214 static char *
4215 anonmap (size)
4216      size_t size;
4217 {
4218 #ifdef USE_MAP_ANON
4219   return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4220                         MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4221 #else
4222   return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4223                         MAP_PRIVATE, devzero, 0);
4224 #endif
4225 }
4226
4227 static void
4228 sigsegv (unused)
4229      int unused;
4230 {
4231   sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4232   longjmp (r, 1);
4233 }
4234
4235 /* Basic functionality test.  */
4236 void
4237 test_0 ()
4238 {
4239   char *x = anonmap (pg);
4240   if (x == (char *) MAP_FAILED)
4241     perror_exit("test 0 mmap", 2);
4242
4243   *(int *)x += 1;
4244
4245   if (munmap(x, pg) < 0)
4246     perror_exit("test 0 munmap", 3);
4247 }
4248
4249 /* 1. If we map a 2-page region and unmap its second page, the first page
4250    must remain.  */
4251 static void
4252 test_1 ()
4253 {
4254   char *x = anonmap (pg * 2);
4255   if (x == (char *)MAP_FAILED)
4256     perror_exit ("test 1 mmap", 4);
4257
4258   signal (SIGSEGV, sigsegv);
4259   if (setjmp (r))
4260     perror_exit ("test 1 fault", 5);
4261
4262   x[0] = 1;
4263   x[pg] = 1;
4264
4265   if (munmap (x + pg, pg) < 0)
4266     perror_exit ("test 1 munmap 1", 6);
4267   x[0] = 2;
4268
4269   if (setjmp (r) == 0)
4270     {
4271       x[pg] = 1;
4272       perror_exit ("test 1 no fault", 7);
4273     }
4274   if (munmap (x, pg) < 0)
4275     perror_exit ("test 1 munmap 2", 8);
4276 }
4277
4278 /* 2. If we map a 2-page region and unmap its first page, the second
4279    page must remain.  */
4280 static void
4281 test_2 ()
4282 {
4283   char *x = anonmap (pg * 2);
4284   if (x == (char *)MAP_FAILED)
4285     perror_exit ("test 2 mmap", 9);
4286
4287   signal (SIGSEGV, sigsegv);
4288   if (setjmp (r))
4289     perror_exit ("test 2 fault", 10);
4290
4291   x[0] = 1;
4292   x[pg] = 1;
4293
4294   if (munmap (x, pg) < 0)
4295     perror_exit ("test 2 munmap 1", 11);
4296
4297   x[pg] = 2;
4298
4299   if (setjmp (r) == 0)
4300     {
4301       x[0] = 1;
4302       perror_exit ("test 2 no fault", 12);
4303     }
4304
4305   if (munmap (x+pg, pg) < 0)
4306     perror_exit ("test 2 munmap 2", 13);
4307 }
4308
4309 /* 3. If we map two adjacent 1-page regions and unmap them both with
4310    one munmap, both must go away.
4311
4312    Getting two adjacent 1-page regions with two mmap calls is slightly
4313    tricky.  All OS's tested skip over already-allocated blocks; therefore
4314    we have been careful to unmap all allocated regions in previous tests.
4315    HP/UX allocates pages backward in memory.  No OS has yet been observed
4316    to be so perverse as to leave unmapped space between consecutive calls
4317    to mmap.  */
4318
4319 static void
4320 test_3 ()
4321 {
4322   char *x, *y, *z;
4323
4324   x = anonmap (pg);
4325   if (x == (char *)MAP_FAILED)
4326     perror_exit ("test 3 mmap 1", 14);
4327   y = anonmap (pg);
4328   if (y == (char *)MAP_FAILED)
4329     perror_exit ("test 3 mmap 2", 15);
4330
4331   if (y != x + pg)
4332     {
4333       if (y == x - pg)
4334         z = y, y = x, x = z;
4335       else
4336         {
4337           fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4338                    (unsigned long)x, (unsigned long)y);
4339           exit (16);
4340         }
4341     }
4342
4343   signal (SIGSEGV, sigsegv);
4344   if (setjmp (r))
4345     perror_exit ("test 3 fault", 17);
4346
4347   x[0] = 1;
4348   y[0] = 1;
4349
4350   if (munmap (x, pg*2) < 0)
4351     perror_exit ("test 3 munmap", 18);
4352
4353   if (setjmp (r) == 0)
4354     {
4355       x[0] = 1;
4356       perror_exit ("test 3 no fault 1", 19);
4357     }
4358   
4359   signal (SIGSEGV, sigsegv);
4360   if (setjmp (r) == 0)
4361     {
4362       y[0] = 1;
4363       perror_exit ("test 3 no fault 2", 20);
4364     }
4365 }
4366
4367 int
4368 main ()
4369 {
4370   sigemptyset (&unblock_sigsegv);
4371   sigaddset (&unblock_sigsegv, SIGSEGV);
4372   pg = getpagesize ();
4373 #ifndef USE_MAP_ANON
4374   devzero = open ("/dev/zero", O_RDWR);
4375   if (devzero < 0)
4376     perror_exit ("open /dev/zero", 1);
4377 #endif
4378
4379   test_0();
4380   test_1();
4381   test_2();
4382   test_3();
4383
4384   exit(0);
4385 }
4386 EOF
4387
4388 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4389 echo "configure:4390: checking for working mmap from /dev/zero" >&5
4390 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   if test "$cross_compiling" = yes; then
4394   # If this is not cygwin, and /dev/zero is a character device, it's probably
4395  # safe to assume it works.
4396  case "$host_os" in
4397    cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4398    * ) if test -c /dev/zero
4399        then ac_cv_func_mmap_dev_zero=yes
4400        else ac_cv_func_mmap_dev_zero=no
4401        fi ;;
4402   esac
4403 else
4404   cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 #include "ct-mmap.inc"
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4410 then
4411   ac_cv_func_mmap_dev_zero=yes
4412 else
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -fr conftest*
4416   if test $? -lt 4
4417  then ac_cv_func_mmap_dev_zero=no
4418  else ac_cv_func_mmap_dev_zero=buggy
4419  fi
4420 fi
4421 rm -fr conftest*
4422 fi
4423
4424
4425 fi
4426
4427 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4428 if test $ac_cv_func_mmap_dev_zero = yes; then
4429   cat >> confdefs.h <<\EOF
4430 #define HAVE_MMAP_DEV_ZERO 1
4431 EOF
4432
4433 fi
4434
4435 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4436 echo "configure:4437: checking for working mmap with MAP_ANON(YMOUS)" >&5
4437 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   if test "$cross_compiling" = yes; then
4441   # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4442  # just because it's there. Some SCO Un*xen define it but don't implement it.
4443  ac_cv_func_mmap_anon=no
4444 else
4445   cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #define USE_MAP_ANON
4449 #include "ct-mmap.inc"
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4452 then
4453   ac_cv_func_mmap_anon=yes
4454 else
4455   echo "configure: failed program was:" >&5
4456   cat conftest.$ac_ext >&5
4457   rm -fr conftest*
4458   if test $? -lt 4
4459  then ac_cv_func_mmap_anon=no
4460  else ac_cv_func_mmap_anon=buggy
4461  fi
4462 fi
4463 rm -fr conftest*
4464 fi
4465
4466
4467 fi
4468
4469 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4470 if test $ac_cv_func_mmap_anon = yes; then
4471   cat >> confdefs.h <<\EOF
4472 #define HAVE_MMAP_ANON 1
4473 EOF
4474
4475 fi
4476 rm -f ct-mmap.inc
4477
4478 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4479 echo "configure:4480: checking for working mmap of a file" >&5
4480 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4481   echo $ac_n "(cached) $ac_c" 1>&6
4482 else
4483   # Create a file one thousand bytes long.
4484 for i in 1 2 3 4 5 6 7 8 9 0
4485 do for j in 1 2 3 4 5 6 7 8 9 0
4486 do echo $i $j xxxxx
4487 done
4488 done > conftestdata$$
4489
4490 if test "$cross_compiling" = yes; then
4491   ac_cv_func_mmap_file=no
4492 else
4493   cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496
4497 /* Test by Zack Weinberg.  Modified from MMAP_ANYWHERE test by
4498    Richard Henderson and Alexandre Oliva.
4499    Check whether read-only mmap of a plain file works. */
4500 #include <sys/types.h>
4501 #include <sys/stat.h>
4502 #include <fcntl.h>
4503 #include <sys/mman.h>
4504
4505 int main()
4506 {
4507   char *x;
4508   int fd;
4509   struct stat st;
4510
4511   fd = open("conftestdata$$", O_RDONLY);
4512   if (fd < 0)
4513     exit(1);
4514
4515   if (fstat (fd, &st))
4516     exit(2);
4517
4518   x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4519   if (x == (char *) -1)
4520     exit(3);
4521
4522   if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4523     exit(4);
4524
4525   if (munmap(x, st.st_size) < 0)
4526     exit(5);
4527
4528   exit(0);
4529 }
4530 EOF
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4532 then
4533   ac_cv_func_mmap_file=yes
4534 else
4535   echo "configure: failed program was:" >&5
4536   cat conftest.$ac_ext >&5
4537   rm -fr conftest*
4538   ac_cv_func_mmap_file=no
4539 fi
4540 rm -fr conftest*
4541 fi
4542
4543 fi
4544
4545 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4546 if test $ac_cv_func_mmap_file = yes; then
4547   cat >> confdefs.h <<\EOF
4548 #define HAVE_MMAP_FILE 1
4549 EOF
4550
4551 fi
4552
4553
4554
4555     
4556   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4557 if test "${with_libiconv_prefix+set}" = set; then
4558   withval="$with_libiconv_prefix"
4559   
4560     for dir in `echo "$withval" | tr : ' '`; do
4561       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4562       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
4563     done
4564    
4565 fi
4566
4567
4568   echo $ac_n "checking for iconv""... $ac_c" 1>&6
4569 echo "configure:4570: checking for iconv" >&5
4570 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4571   echo $ac_n "(cached) $ac_c" 1>&6
4572 else
4573   
4574     am_cv_func_iconv="no, consider installing GNU libiconv"
4575     am_cv_lib_iconv=no
4576     cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 #include <stdlib.h>
4580 #include <iconv.h>
4581 int main() {
4582 iconv_t cd = iconv_open("","");
4583        iconv(cd,NULL,NULL,NULL,NULL);
4584        iconv_close(cd);
4585 ; return 0; }
4586 EOF
4587 if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4588   rm -rf conftest*
4589   am_cv_func_iconv=yes
4590 else
4591   echo "configure: failed program was:" >&5
4592   cat conftest.$ac_ext >&5
4593 fi
4594 rm -f conftest*
4595     if test "$am_cv_func_iconv" != yes; then
4596       am_save_LIBS="$LIBS"
4597       LIBS="$LIBS -liconv"
4598       cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 #include <stdlib.h>
4602 #include <iconv.h>
4603 int main() {
4604 iconv_t cd = iconv_open("","");
4605          iconv(cd,NULL,NULL,NULL,NULL);
4606          iconv_close(cd);
4607 ; return 0; }
4608 EOF
4609 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4610   rm -rf conftest*
4611   am_cv_lib_iconv=yes
4612         am_cv_func_iconv=yes
4613 else
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616 fi
4617 rm -f conftest*
4618       LIBS="$am_save_LIBS"
4619     fi
4620   
4621 fi
4622
4623 echo "$ac_t""$am_cv_func_iconv" 1>&6
4624   if test "$am_cv_func_iconv" = yes; then
4625     cat >> confdefs.h <<\EOF
4626 #define HAVE_ICONV 1
4627 EOF
4628
4629     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4630 echo "configure:4631: checking for iconv declaration" >&5
4631     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4632   echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634   
4635       cat > conftest.$ac_ext <<EOF
4636 #line 4637 "configure"
4637 #include "confdefs.h"
4638
4639 #include <stdlib.h>
4640 #include <iconv.h>
4641 extern
4642 #ifdef __cplusplus
4643 "C"
4644 #endif
4645 #if defined(__STDC__) || defined(__cplusplus)
4646 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4647 #else
4648 size_t iconv();
4649 #endif
4650
4651 int main() {
4652
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656   rm -rf conftest*
4657   am_cv_proto_iconv_arg1=""
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   am_cv_proto_iconv_arg1="const"
4663 fi
4664 rm -f conftest*
4665       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);"
4666 fi
4667
4668     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4669     echo "$ac_t""${ac_t:-
4670          }$am_cv_proto_iconv" 1>&6
4671     cat >> confdefs.h <<EOF
4672 #define ICONV_CONST $am_cv_proto_iconv_arg1
4673 EOF
4674
4675   fi
4676   LIBICONV=
4677   if test "$am_cv_lib_iconv" = yes; then
4678     LIBICONV="-liconv"
4679   fi
4680   
4681
4682
4683 # We will need to find libiberty.h and ansidecl.h
4684 saved_CFLAGS="$CFLAGS"
4685 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4686 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4687         strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4688         fprintf_unlocked strstr environ errno \
4689         malloc realloc calloc free basename getopt clock
4690 do
4691   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4692 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4693 echo "configure:4694: checking whether $ac_func is declared" >&5
4694 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #undef $ac_tr_decl
4701 #define $ac_tr_decl 1
4702   
4703 #include "ansidecl.h"
4704 #include "system.h"
4705
4706 int main() {
4707 #ifndef $ac_func
4708 char *(*pfn) = (char *(*)) $ac_func ;
4709 #endif
4710 ; return 0; }
4711 EOF
4712 if { (eval echo configure:4713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4713   rm -rf conftest*
4714   eval "gcc_cv_have_decl_$ac_func=yes"
4715 else
4716   echo "configure: failed program was:" >&5
4717   cat conftest.$ac_ext >&5
4718   rm -rf conftest*
4719   eval "gcc_cv_have_decl_$ac_func=no"
4720 fi
4721 rm -f conftest*
4722 fi
4723
4724 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4726 #define $ac_tr_decl 1
4727 EOF
4728  
4729 else
4730   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4731 #define $ac_tr_decl 0
4732 EOF
4733  
4734 fi
4735
4736 done
4737 if test x = y ; then
4738   cat >> confdefs.h <<\EOF
4739 #define HAVE_DECL_GETENV 1
4740 EOF
4741  cat >> confdefs.h <<\EOF
4742 #define HAVE_DECL_ATOL 1
4743 EOF
4744  cat >> confdefs.h <<\EOF
4745 #define HAVE_DECL_SBRK 1
4746 EOF
4747  cat >> confdefs.h <<\EOF
4748 #define HAVE_DECL_ABORT 1
4749 EOF
4750  cat >> confdefs.h <<\EOF
4751 #define HAVE_DECL_ATOF 1
4752 EOF
4753  cat >> confdefs.h <<\EOF
4754 #define HAVE_DECL_GETCWD 1
4755 EOF
4756  cat >> confdefs.h <<\EOF
4757 #define HAVE_DECL_GETWD 1
4758 EOF
4759  \
4760         cat >> confdefs.h <<\EOF
4761 #define HAVE_DECL_STRSIGNAL 1
4762 EOF
4763  cat >> confdefs.h <<\EOF
4764 #define HAVE_DECL_PUTC_UNLOCKED 1
4765 EOF
4766  cat >> confdefs.h <<\EOF
4767 #define HAVE_DECL_FPUTS_UNLOCKED 1
4768 EOF
4769  cat >> confdefs.h <<\EOF
4770 #define HAVE_DECL_FWRITE_UNLOCKED 1
4771 EOF
4772  \
4773         cat >> confdefs.h <<\EOF
4774 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4775 EOF
4776  cat >> confdefs.h <<\EOF
4777 #define HAVE_DECL_STRSTR 1
4778 EOF
4779  cat >> confdefs.h <<\EOF
4780 #define HAVE_DECL_ENVIRON 1
4781 EOF
4782  cat >> confdefs.h <<\EOF
4783 #define HAVE_DECL_ERRNO 1
4784 EOF
4785  \
4786         cat >> confdefs.h <<\EOF
4787 #define HAVE_DECL_MALLOC 1
4788 EOF
4789  cat >> confdefs.h <<\EOF
4790 #define HAVE_DECL_REALLOC 1
4791 EOF
4792  cat >> confdefs.h <<\EOF
4793 #define HAVE_DECL_CALLOC 1
4794 EOF
4795  cat >> confdefs.h <<\EOF
4796 #define HAVE_DECL_FREE 1
4797 EOF
4798  cat >> confdefs.h <<\EOF
4799 #define HAVE_DECL_BASENAME 1
4800 EOF
4801  cat >> confdefs.h <<\EOF
4802 #define HAVE_DECL_GETOPT 1
4803 EOF
4804  cat >> confdefs.h <<\EOF
4805 #define HAVE_DECL_CLOCK 1
4806 EOF
4807 fi
4808
4809
4810 for ac_func in getrlimit setrlimit getrusage
4811 do
4812   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4813 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4814 echo "configure:4815: checking whether $ac_func is declared" >&5
4815 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818   cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 #undef $ac_tr_decl
4822 #define $ac_tr_decl 1
4823   
4824 #include "ansidecl.h"
4825 #include "system.h"
4826 #ifdef HAVE_SYS_RESOURCE_H
4827 #include <sys/resource.h>
4828 #endif
4829
4830
4831 int main() {
4832 #ifndef $ac_func
4833 char *(*pfn) = (char *(*)) $ac_func ;
4834 #endif
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4838   rm -rf conftest*
4839   eval "gcc_cv_have_decl_$ac_func=yes"
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   eval "gcc_cv_have_decl_$ac_func=no"
4845 fi
4846 rm -f conftest*
4847 fi
4848
4849 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4850   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4851 #define $ac_tr_decl 1
4852 EOF
4853  
4854 else
4855   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4856 #define $ac_tr_decl 0
4857 EOF
4858  
4859 fi
4860
4861 done
4862 if test x = y ; then
4863   cat >> confdefs.h <<\EOF
4864 #define HAVE_DECL_GETRLIMIT 1
4865 EOF
4866  cat >> confdefs.h <<\EOF
4867 #define HAVE_DECL_SETRLIMIT 1
4868 EOF
4869  cat >> confdefs.h <<\EOF
4870 #define HAVE_DECL_GETRUSAGE 1
4871 EOF
4872 fi
4873
4874
4875 for ac_func in times
4876 do
4877   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4878 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4879 echo "configure:4880: checking whether $ac_func is declared" >&5
4880 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4881   echo $ac_n "(cached) $ac_c" 1>&6
4882 else
4883   cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 #undef $ac_tr_decl
4887 #define $ac_tr_decl 1
4888   
4889 #include "ansidecl.h"
4890 #include "system.h"
4891 #ifdef HAVE_SYS_TIMES_H
4892 #include <sys/times.h>
4893 #endif
4894
4895
4896 int main() {
4897 #ifndef $ac_func
4898 char *(*pfn) = (char *(*)) $ac_func ;
4899 #endif
4900 ; return 0; }
4901 EOF
4902 if { (eval echo configure:4903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4903   rm -rf conftest*
4904   eval "gcc_cv_have_decl_$ac_func=yes"
4905 else
4906   echo "configure: failed program was:" >&5
4907   cat conftest.$ac_ext >&5
4908   rm -rf conftest*
4909   eval "gcc_cv_have_decl_$ac_func=no"
4910 fi
4911 rm -f conftest*
4912 fi
4913
4914 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4915   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4916 #define $ac_tr_decl 1
4917 EOF
4918  
4919 else
4920   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4921 #define $ac_tr_decl 0
4922 EOF
4923  
4924 fi
4925
4926 done
4927 if test x = y ; then
4928   cat >> confdefs.h <<\EOF
4929 #define HAVE_DECL_TIMES 1
4930 EOF
4931 fi
4932
4933
4934 # More time-related stuff.
4935 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4936 echo "configure:4937: checking for struct tms" >&5
4937 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   
4941 cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944
4945 #include "ansidecl.h"
4946 #include "system.h"
4947 #ifdef HAVE_SYS_TIMES_H
4948 #include <sys/times.h>
4949 #endif
4950
4951 int main() {
4952 struct tms tms;
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4956   rm -rf conftest*
4957   ac_cv_struct_tms=yes
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   ac_cv_struct_tms=no
4963 fi
4964 rm -f conftest*
4965 fi
4966
4967 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4968 if test $ac_cv_struct_tms = yes; then
4969   cat >> confdefs.h <<\EOF
4970 #define HAVE_STRUCT_TMS 1
4971 EOF
4972
4973 fi
4974
4975 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4976 # revisit after autoconf 2.50.
4977 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4978 echo "configure:4979: checking for clock_t" >&5
4979 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982   
4983 cat > conftest.$ac_ext <<EOF
4984 #line 4985 "configure"
4985 #include "confdefs.h"
4986
4987 #include "ansidecl.h"
4988 #include "system.h"
4989
4990 int main() {
4991 clock_t x;
4992 ; return 0; }
4993 EOF
4994 if { (eval echo configure:4995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4995   rm -rf conftest*
4996   gcc_cv_type_clock_t=yes
4997 else
4998   echo "configure: failed program was:" >&5
4999   cat conftest.$ac_ext >&5
5000   rm -rf conftest*
5001   gcc_cv_type_clock_t=no
5002 fi
5003 rm -f conftest*
5004 fi
5005
5006 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5007 if test $gcc_cv_type_clock_t = yes; then
5008   cat >> confdefs.h <<\EOF
5009 #define HAVE_CLOCK_T 1
5010 EOF
5011
5012 fi
5013
5014 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5015 CFLAGS="$saved_CFLAGS"
5016
5017 # mkdir takes a single argument on some systems. 
5018 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5019 echo "configure:5020: checking if mkdir takes one argument" >&5
5020 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5021   echo $ac_n "(cached) $ac_c" 1>&6
5022 else
5023   cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026
5027 #include <sys/types.h>
5028 #ifdef HAVE_SYS_STAT_H
5029 # include <sys/stat.h>
5030 #endif
5031 #ifdef HAVE_UNISTD_H
5032 # include <unistd.h>
5033 #endif
5034 #ifdef HAVE_DIRECT_H
5035 # include <direct.h>
5036 #endif
5037 int main() {
5038 mkdir ("foo", 0);
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5042   rm -rf conftest*
5043   gcc_cv_mkdir_takes_one_arg=no
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   gcc_cv_mkdir_takes_one_arg=yes
5049 fi
5050 rm -f conftest*
5051 fi
5052
5053 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5054 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5055   cat >> confdefs.h <<\EOF
5056 #define MKDIR_TAKES_ONE_ARG 1
5057 EOF
5058
5059 fi
5060
5061
5062 # File extensions
5063 manext='.1'
5064 objext='.o'
5065
5066
5067
5068 build_xm_file=
5069 build_xm_defines=
5070 build_install_headers_dir=install-headers-tar
5071 build_exeext=
5072 host_xm_file=
5073 host_xm_defines=
5074 host_xmake_file=
5075 host_truncate_target=
5076 host_exeext=
5077
5078 # Decode the host machine, then the target machine.
5079 # For the host machine, we save the xm_file variable as host_xm_file;
5080 # then we decode the target machine and forget everything else
5081 # that came from the host machine.
5082 for machine in $build $host $target; do
5083         . ${srcdir}/config.gcc
5084 done
5085
5086 extra_objs="${host_extra_objs} ${extra_objs}"
5087
5088 # Default the target-machine variables that were not explicitly set.
5089 if test x"$tm_file" = x
5090 then tm_file=$cpu_type/$cpu_type.h; fi
5091
5092 if test x"$extra_headers" = x
5093 then extra_headers=; fi
5094
5095 if test x$md_file = x
5096 then md_file=$cpu_type/$cpu_type.md; fi
5097
5098 if test x$out_file = x
5099 then out_file=$cpu_type/$cpu_type.c; fi
5100
5101 if test x"$tmake_file" = x
5102 then tmake_file=$cpu_type/t-$cpu_type
5103 fi
5104
5105 if test x"$dwarf2" = xyes
5106 then tm_file="$tm_file tm-dwarf2.h"
5107 fi
5108
5109 if test x$float_format = x
5110 then float_format=i64
5111 fi
5112
5113 if test $float_format = none
5114 then float_h_file=Makefile.in
5115 else float_h_file=float-$float_format.h
5116 fi
5117
5118 # Handle cpp installation.
5119 if test x$enable_cpp != xno
5120 then
5121   tmake_file="$tmake_file t-install-cpp"
5122 fi
5123
5124 # Say what files are being used for the output code and MD file.
5125 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5126 echo "Using \`$srcdir/config/$md_file' as machine description file."
5127
5128 # If any of the xm_file variables contain nonexistent files, warn
5129 # about them and drop them.
5130
5131 bx=
5132 for x in $build_xm_file; do
5133   if    test -f $srcdir/config/$x
5134   then      bx="$bx $x"
5135   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5136   fi
5137 done
5138 build_xm_file="$bx"
5139
5140 hx=
5141 for x in $host_xm_file; do
5142   if    test -f $srcdir/config/$x
5143   then      hx="$hx $x"
5144   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5145   fi
5146 done
5147 host_xm_file="$hx"
5148
5149 tx=
5150 for x in $xm_file; do
5151   if    test -f $srcdir/config/$x
5152   then      tx="$tx $x"
5153   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5154   fi
5155 done
5156 xm_file="$tx"
5157
5158 count=a
5159 for f in $tm_file; do
5160         count=${count}x
5161 done
5162 if test $count = ax; then
5163         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5164 else
5165         echo "Using the following target machine macro files:"
5166         for f in $tm_file; do
5167                 echo "  $srcdir/config/$f"
5168         done
5169 fi
5170
5171 count=a
5172 for f in $host_xm_file; do
5173         count=${count}x
5174 done
5175 if test $count = a; then
5176         :
5177 elif test $count = ax; then
5178         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5179 else
5180         echo "Using the following host machine macro files:"
5181         for f in $host_xm_file; do
5182                 echo "  $srcdir/config/$f"
5183         done
5184 fi
5185
5186 if test "$host_xm_file" != "$build_xm_file"; then
5187         count=a
5188         for f in $build_xm_file; do
5189                 count=${count}x
5190         done
5191         if test $count = a; then
5192                 :
5193         elif test $count = ax; then
5194                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5195         else
5196                 echo "Using the following build machine macro files:"
5197                 for f in $build_xm_file; do
5198                         echo "  $srcdir/config/$f"
5199                 done
5200         fi
5201 fi
5202
5203 if test x$thread_file = x; then
5204         if test x$target_thread_file != x; then
5205                 thread_file=$target_thread_file
5206         else
5207                 thread_file='single'
5208         fi
5209 fi
5210
5211 # auto-host.h is the file containing items generated by autoconf and is
5212 # the first file included by config.h.
5213 # If host=build, it is correct to have hconfig include auto-host.h
5214 # as well.  If host!=build, we are in error and need to do more 
5215 # work to find out the build config parameters.
5216 if test x$host = x$build
5217 then
5218         build_auto=auto-host.h
5219 else
5220         # We create a subdir, then run autoconf in the subdir.
5221         # To prevent recursion we set host and build for the new
5222         # invocation of configure to the build for this invocation
5223         # of configure. 
5224         tempdir=build.$$
5225         rm -rf $tempdir
5226         mkdir $tempdir
5227         cd $tempdir
5228         case ${srcdir} in
5229         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5230         *) realsrcdir=../${srcdir};;
5231         esac
5232         saved_CFLAGS="${CFLAGS}"
5233         CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5234         ${realsrcdir}/configure \
5235                 --target=$target --host=$build --build=$build
5236         CFLAGS="${saved_CFLAGS}"
5237
5238         # We just finished tests for the build machine, so rename
5239         # the file auto-build.h in the gcc directory.
5240         mv auto-host.h ../auto-build.h
5241         cd ..
5242         rm -rf $tempdir
5243         build_auto=auto-build.h
5244 fi
5245
5246 tm_file="${tm_file} defaults.h"
5247 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5248 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5249 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5250
5251 # Truncate the target if necessary
5252 if test x$host_truncate_target != x; then
5253         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5254 fi
5255
5256 # Get the version trigger filename from the toplevel
5257 if test "${with_gcc_version_trigger+set}" = set; then
5258         gcc_version_trigger=$with_gcc_version_trigger
5259 else
5260         gcc_version_trigger=${srcdir}/version.c
5261 fi
5262 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5263 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5264
5265 # Compile in configure arguments.
5266 if test -f configargs.h ; then
5267         # Being re-configured.
5268         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5269         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5270 else
5271         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5272 fi
5273 cat > configargs.h <<EOF
5274 /* Generated automatically. */
5275 static const char configuration_arguments[] = "$gcc_config_arguments";
5276 static const char thread_model[] = "$thread_file";
5277 EOF
5278
5279 # Internationalization
5280 PACKAGE=gcc
5281 VERSION="$gcc_version"
5282 cat >> confdefs.h <<EOF
5283 #define PACKAGE "$PACKAGE"
5284 EOF
5285
5286 cat >> confdefs.h <<EOF
5287 #define VERSION "$VERSION"
5288 EOF
5289
5290
5291
5292
5293 # Enable NLS support by default
5294 # Check whether --enable-nls or --disable-nls was given.
5295 if test "${enable_nls+set}" = set; then
5296   enableval="$enable_nls"
5297   :
5298 else
5299   enable_nls=yes
5300 fi
5301
5302
5303 # if cross compiling, disable NLS support.
5304 # It's not worth the trouble, at least for now.
5305
5306 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5307   echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5308   enable_nls=no
5309 fi
5310
5311
5312             
5313 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5314 echo "configure:5315: checking for library containing strerror" >&5
5315 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   ac_func_search_save_LIBS="$LIBS"
5319 ac_cv_search_strerror="no"
5320 cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char strerror();
5327
5328 int main() {
5329 strerror()
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5333   rm -rf conftest*
5334   ac_cv_search_strerror="none required"
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338 fi
5339 rm -f conftest*
5340 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5341 LIBS="-l$i  $ac_func_search_save_LIBS"
5342 cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 /* Override any gcc2 internal prototype to avoid an error.  */
5346 /* We use char because int might match the return type of a gcc2
5347     builtin and then its argument prototype would still apply.  */
5348 char strerror();
5349
5350 int main() {
5351 strerror()
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   ac_cv_search_strerror="-l$i"
5357 break
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361 fi
5362 rm -f conftest*
5363 done
5364 LIBS="$ac_func_search_save_LIBS"
5365 fi
5366
5367 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5368 if test "$ac_cv_search_strerror" != "no"; then
5369   test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5370   
5371 else :
5372   
5373 fi
5374   
5375
5376 echo $ac_n "checking for working const""... $ac_c" 1>&6
5377 echo "configure:5378: checking for working const" >&5
5378 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381   cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384
5385 int main() {
5386
5387 /* Ultrix mips cc rejects this.  */
5388 typedef int charset[2]; const charset x;
5389 /* SunOS 4.1.1 cc rejects this.  */
5390 char const *const *ccp;
5391 char **p;
5392 /* NEC SVR4.0.2 mips cc rejects this.  */
5393 struct point {int x, y;};
5394 static struct point const zero = {0,0};
5395 /* AIX XL C 1.02.0.0 rejects this.
5396    It does not let you subtract one const X* pointer from another in an arm
5397    of an if-expression whose if-part is not a constant expression */
5398 const char *g = "string";
5399 ccp = &g + (g ? g-g : 0);
5400 /* HPUX 7.0 cc rejects these. */
5401 ++ccp;
5402 p = (char**) ccp;
5403 ccp = (char const *const *) p;
5404 { /* SCO 3.2v4 cc rejects this.  */
5405   char *t;
5406   char const *s = 0 ? (char *) 0 : (char const *) 0;
5407
5408   *t++ = 0;
5409 }
5410 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5411   int x[] = {25, 17};
5412   const int *foo = &x[0];
5413   ++foo;
5414 }
5415 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5416   typedef const int *iptr;
5417   iptr p = 0;
5418   ++p;
5419 }
5420 { /* AIX XL C 1.02.0.0 rejects this saying
5421      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5422   struct s { int j; const int *ap[3]; };
5423   struct s *b; b->j = 5;
5424 }
5425 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5426   const int foo = 10;
5427 }
5428
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5432   rm -rf conftest*
5433   ac_cv_c_const=yes
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   ac_cv_c_const=no
5439 fi
5440 rm -f conftest*
5441 fi
5442
5443 echo "$ac_t""$ac_cv_c_const" 1>&6
5444 if test $ac_cv_c_const = no; then
5445   cat >> confdefs.h <<\EOF
5446 #define const 
5447 EOF
5448
5449 fi
5450
5451 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5452 echo "configure:5453: checking for off_t" >&5
5453 if eval "test \"`echo '$''{'ac_cv_type_off_t'+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 #include <sys/types.h>
5460 #if STDC_HEADERS
5461 #include <stdlib.h>
5462 #include <stddef.h>
5463 #endif
5464 EOF
5465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5466   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5467   rm -rf conftest*
5468   ac_cv_type_off_t=yes
5469 else
5470   rm -rf conftest*
5471   ac_cv_type_off_t=no
5472 fi
5473 rm -f conftest*
5474
5475 fi
5476 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5477 if test $ac_cv_type_off_t = no; then
5478   cat >> confdefs.h <<\EOF
5479 #define off_t long
5480 EOF
5481
5482 fi
5483
5484 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5485 echo "configure:5486: checking for size_t" >&5
5486 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5487   echo $ac_n "(cached) $ac_c" 1>&6
5488 else
5489   cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 #include <sys/types.h>
5493 #if STDC_HEADERS
5494 #include <stdlib.h>
5495 #include <stddef.h>
5496 #endif
5497 EOF
5498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5499   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5500   rm -rf conftest*
5501   ac_cv_type_size_t=yes
5502 else
5503   rm -rf conftest*
5504   ac_cv_type_size_t=no
5505 fi
5506 rm -f conftest*
5507
5508 fi
5509 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5510 if test $ac_cv_type_size_t = no; then
5511   cat >> confdefs.h <<\EOF
5512 #define size_t unsigned
5513 EOF
5514
5515 fi
5516
5517 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5518 # for constant arguments.  Useless!
5519 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5520 echo "configure:5521: checking for working alloca.h" >&5
5521 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5522   echo $ac_n "(cached) $ac_c" 1>&6
5523 else
5524   cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527 #include <alloca.h>
5528 int main() {
5529 char *p = alloca(2 * sizeof(int));
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   ac_cv_header_alloca_h=yes
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   ac_cv_header_alloca_h=no
5540 fi
5541 rm -f conftest*
5542 fi
5543
5544 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5545 if test $ac_cv_header_alloca_h = yes; then
5546   cat >> confdefs.h <<\EOF
5547 #define HAVE_ALLOCA_H 1
5548 EOF
5549
5550 fi
5551
5552 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5553 echo "configure:5554: checking for alloca" >&5
5554 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5555   echo $ac_n "(cached) $ac_c" 1>&6
5556 else
5557   cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560
5561 #ifdef __GNUC__
5562 # define alloca __builtin_alloca
5563 #else
5564 # ifdef _MSC_VER
5565 #  include <malloc.h>
5566 #  define alloca _alloca
5567 # else
5568 #  if HAVE_ALLOCA_H
5569 #   include <alloca.h>
5570 #  else
5571 #   ifdef _AIX
5572  #pragma alloca
5573 #   else
5574 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5575 char *alloca ();
5576 #    endif
5577 #   endif
5578 #  endif
5579 # endif
5580 #endif
5581
5582 int main() {
5583 char *p = (char *) alloca(1);
5584 ; return 0; }
5585 EOF
5586 if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5587   rm -rf conftest*
5588   ac_cv_func_alloca_works=yes
5589 else
5590   echo "configure: failed program was:" >&5
5591   cat conftest.$ac_ext >&5
5592   rm -rf conftest*
5593   ac_cv_func_alloca_works=no
5594 fi
5595 rm -f conftest*
5596 fi
5597
5598 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5599 if test $ac_cv_func_alloca_works = yes; then
5600   cat >> confdefs.h <<\EOF
5601 #define HAVE_ALLOCA 1
5602 EOF
5603
5604 fi
5605
5606 if test $ac_cv_func_alloca_works = no; then
5607   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5608   # that cause trouble.  Some versions do not even contain alloca or
5609   # contain a buggy version.  If you still want to use their alloca,
5610   # use ar to extract alloca.o from them instead of compiling alloca.c.
5611   ALLOCA=alloca.${ac_objext}
5612   cat >> confdefs.h <<\EOF
5613 #define C_ALLOCA 1
5614 EOF
5615
5616
5617 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5618 echo "configure:5619: checking whether alloca needs Cray hooks" >&5
5619 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5620   echo $ac_n "(cached) $ac_c" 1>&6
5621 else
5622   cat > conftest.$ac_ext <<EOF
5623 #line 5624 "configure"
5624 #include "confdefs.h"
5625 #if defined(CRAY) && ! defined(CRAY2)
5626 webecray
5627 #else
5628 wenotbecray
5629 #endif
5630
5631 EOF
5632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5633   egrep "webecray" >/dev/null 2>&1; then
5634   rm -rf conftest*
5635   ac_cv_os_cray=yes
5636 else
5637   rm -rf conftest*
5638   ac_cv_os_cray=no
5639 fi
5640 rm -f conftest*
5641
5642 fi
5643
5644 echo "$ac_t""$ac_cv_os_cray" 1>&6
5645 if test $ac_cv_os_cray = yes; then
5646 for ac_func in _getb67 GETB67 getb67; do
5647   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5648 echo "configure:5649: checking for $ac_func" >&5
5649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655 /* System header to define __stub macros and hopefully few prototypes,
5656     which can conflict with char $ac_func(); below.  */
5657 #include <assert.h>
5658 /* Override any gcc2 internal prototype to avoid an error.  */
5659 /* We use char because int might match the return type of a gcc2
5660     builtin and then its argument prototype would still apply.  */
5661 char $ac_func();
5662
5663 int main() {
5664
5665 /* The GNU C library defines this for functions which it implements
5666     to always fail with ENOSYS.  Some functions are actually named
5667     something starting with __ and the normal name is an alias.  */
5668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5669 choke me
5670 #else
5671 $ac_func();
5672 #endif
5673
5674 ; return 0; }
5675 EOF
5676 if { (eval echo configure:5677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5677   rm -rf conftest*
5678   eval "ac_cv_func_$ac_func=yes"
5679 else
5680   echo "configure: failed program was:" >&5
5681   cat conftest.$ac_ext >&5
5682   rm -rf conftest*
5683   eval "ac_cv_func_$ac_func=no"
5684 fi
5685 rm -f conftest*
5686 fi
5687
5688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5689   echo "$ac_t""yes" 1>&6
5690   cat >> confdefs.h <<EOF
5691 #define CRAY_STACKSEG_END $ac_func
5692 EOF
5693
5694   break
5695 else
5696   echo "$ac_t""no" 1>&6
5697 fi
5698
5699 done
5700 fi
5701
5702 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5703 echo "configure:5704: checking stack direction for C alloca" >&5
5704 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5705   echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707   if test "$cross_compiling" = yes; then
5708   ac_cv_c_stack_direction=0
5709 else
5710   cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 find_stack_direction ()
5714 {
5715   static char *addr = 0;
5716   auto char dummy;
5717   if (addr == 0)
5718     {
5719       addr = &dummy;
5720       return find_stack_direction ();
5721     }
5722   else
5723     return (&dummy > addr) ? 1 : -1;
5724 }
5725 main ()
5726 {
5727   exit (find_stack_direction() < 0);
5728 }
5729 EOF
5730 if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5731 then
5732   ac_cv_c_stack_direction=1
5733 else
5734   echo "configure: failed program was:" >&5
5735   cat conftest.$ac_ext >&5
5736   rm -fr conftest*
5737   ac_cv_c_stack_direction=-1
5738 fi
5739 rm -fr conftest*
5740 fi
5741
5742 fi
5743
5744 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5745 cat >> confdefs.h <<EOF
5746 #define STACK_DIRECTION $ac_cv_c_stack_direction
5747 EOF
5748
5749 fi
5750
5751
5752     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5753 echo "configure:5754: checking whether we are using the GNU C Library 2.1 or newer" >&5
5754 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   cat > conftest.$ac_ext <<EOF
5758 #line 5759 "configure"
5759 #include "confdefs.h"
5760
5761 #include <features.h>
5762 #ifdef __GNU_LIBRARY__
5763  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5764   Lucky GNU user
5765  #endif
5766 #endif
5767         
5768 EOF
5769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5770   egrep "Lucky GNU user" >/dev/null 2>&1; then
5771   rm -rf conftest*
5772   ac_cv_gnu_library_2_1=yes
5773 else
5774   rm -rf conftest*
5775   ac_cv_gnu_library_2_1=no
5776 fi
5777 rm -f conftest*
5778
5779       
5780     
5781 fi
5782
5783 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5784     
5785     GLIBC21="$ac_cv_gnu_library_2_1"
5786   
5787
5788                                  
5789    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5790 stdlib.h string.h unistd.h sys/param.h
5791 do
5792 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5793 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5794 echo "configure:5795: checking for $ac_hdr" >&5
5795 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5796   echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798   cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 #include <$ac_hdr>
5802 EOF
5803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5804 { (eval echo configure:5805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5806 if test -z "$ac_err"; then
5807   rm -rf conftest*
5808   eval "ac_cv_header_$ac_safe=yes"
5809 else
5810   echo "$ac_err" >&5
5811   echo "configure: failed program was:" >&5
5812   cat conftest.$ac_ext >&5
5813   rm -rf conftest*
5814   eval "ac_cv_header_$ac_safe=no"
5815 fi
5816 rm -f conftest*
5817 fi
5818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5819   echo "$ac_t""yes" 1>&6
5820     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5821   cat >> confdefs.h <<EOF
5822 #define $ac_tr_hdr 1
5823 EOF
5824  
5825 else
5826   echo "$ac_t""no" 1>&6
5827 fi
5828 done
5829
5830    for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5831 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5832 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5833 do
5834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5835 echo "configure:5836: checking for $ac_func" >&5
5836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5837   echo $ac_n "(cached) $ac_c" 1>&6
5838 else
5839   cat > conftest.$ac_ext <<EOF
5840 #line 5841 "configure"
5841 #include "confdefs.h"
5842 /* System header to define __stub macros and hopefully few prototypes,
5843     which can conflict with char $ac_func(); below.  */
5844 #include <assert.h>
5845 /* Override any gcc2 internal prototype to avoid an error.  */
5846 /* We use char because int might match the return type of a gcc2
5847     builtin and then its argument prototype would still apply.  */
5848 char $ac_func();
5849
5850 int main() {
5851
5852 /* The GNU C library defines this for functions which it implements
5853     to always fail with ENOSYS.  Some functions are actually named
5854     something starting with __ and the normal name is an alias.  */
5855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5856 choke me
5857 #else
5858 $ac_func();
5859 #endif
5860
5861 ; return 0; }
5862 EOF
5863 if { (eval echo configure:5864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5864   rm -rf conftest*
5865   eval "ac_cv_func_$ac_func=yes"
5866 else
5867   echo "configure: failed program was:" >&5
5868   cat conftest.$ac_ext >&5
5869   rm -rf conftest*
5870   eval "ac_cv_func_$ac_func=no"
5871 fi
5872 rm -f conftest*
5873 fi
5874
5875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5876   echo "$ac_t""yes" 1>&6
5877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5878   cat >> confdefs.h <<EOF
5879 #define $ac_tr_func 1
5880 EOF
5881  
5882 else
5883   echo "$ac_t""no" 1>&6
5884 fi
5885 done
5886
5887
5888    
5889     
5890   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5891 if test "${with_libiconv_prefix+set}" = set; then
5892   withval="$with_libiconv_prefix"
5893   
5894     for dir in `echo "$withval" | tr : ' '`; do
5895       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5896       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
5897     done
5898    
5899 fi
5900
5901
5902   echo $ac_n "checking for iconv""... $ac_c" 1>&6
5903 echo "configure:5904: checking for iconv" >&5
5904 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   
5908     am_cv_func_iconv="no, consider installing GNU libiconv"
5909     am_cv_lib_iconv=no
5910     cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 #include <stdlib.h>
5914 #include <iconv.h>
5915 int main() {
5916 iconv_t cd = iconv_open("","");
5917        iconv(cd,NULL,NULL,NULL,NULL);
5918        iconv_close(cd);
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5922   rm -rf conftest*
5923   am_cv_func_iconv=yes
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927 fi
5928 rm -f conftest*
5929     if test "$am_cv_func_iconv" != yes; then
5930       am_save_LIBS="$LIBS"
5931       LIBS="$LIBS -liconv"
5932       cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 #include <stdlib.h>
5936 #include <iconv.h>
5937 int main() {
5938 iconv_t cd = iconv_open("","");
5939          iconv(cd,NULL,NULL,NULL,NULL);
5940          iconv_close(cd);
5941 ; return 0; }
5942 EOF
5943 if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5944   rm -rf conftest*
5945   am_cv_lib_iconv=yes
5946         am_cv_func_iconv=yes
5947 else
5948   echo "configure: failed program was:" >&5
5949   cat conftest.$ac_ext >&5
5950 fi
5951 rm -f conftest*
5952       LIBS="$am_save_LIBS"
5953     fi
5954   
5955 fi
5956
5957 echo "$ac_t""$am_cv_func_iconv" 1>&6
5958   if test "$am_cv_func_iconv" = yes; then
5959     cat >> confdefs.h <<\EOF
5960 #define HAVE_ICONV 1
5961 EOF
5962
5963     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5964 echo "configure:5965: checking for iconv declaration" >&5
5965     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5966   echo $ac_n "(cached) $ac_c" 1>&6
5967 else
5968   
5969       cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972
5973 #include <stdlib.h>
5974 #include <iconv.h>
5975 extern
5976 #ifdef __cplusplus
5977 "C"
5978 #endif
5979 #if defined(__STDC__) || defined(__cplusplus)
5980 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5981 #else
5982 size_t iconv();
5983 #endif
5984
5985 int main() {
5986
5987 ; return 0; }
5988 EOF
5989 if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5990   rm -rf conftest*
5991   am_cv_proto_iconv_arg1=""
5992 else
5993   echo "configure: failed program was:" >&5
5994   cat conftest.$ac_ext >&5
5995   rm -rf conftest*
5996   am_cv_proto_iconv_arg1="const"
5997 fi
5998 rm -f conftest*
5999       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);"
6000 fi
6001
6002     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6003     echo "$ac_t""${ac_t:-
6004          }$am_cv_proto_iconv" 1>&6
6005     cat >> confdefs.h <<EOF
6006 #define ICONV_CONST $am_cv_proto_iconv_arg1
6007 EOF
6008
6009   fi
6010   LIBICONV=
6011   if test "$am_cv_lib_iconv" = yes; then
6012     LIBICONV="-liconv"
6013   fi
6014   
6015
6016    
6017   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6018 echo "configure:6019: checking for nl_langinfo and CODESET" >&5
6019 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6020   echo $ac_n "(cached) $ac_c" 1>&6
6021 else
6022   cat > conftest.$ac_ext <<EOF
6023 #line 6024 "configure"
6024 #include "confdefs.h"
6025 #include <langinfo.h>
6026 int main() {
6027 char* cs = nl_langinfo(CODESET);
6028 ; return 0; }
6029 EOF
6030 if { (eval echo configure:6031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6031   rm -rf conftest*
6032   am_cv_langinfo_codeset=yes
6033 else
6034   echo "configure: failed program was:" >&5
6035   cat conftest.$ac_ext >&5
6036   rm -rf conftest*
6037   am_cv_langinfo_codeset=no
6038 fi
6039 rm -f conftest*
6040     
6041 fi
6042
6043 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6044   if test $am_cv_langinfo_codeset = yes; then
6045     cat >> confdefs.h <<\EOF
6046 #define HAVE_LANGINFO_CODESET 1
6047 EOF
6048
6049   fi
6050
6051    if test $ac_cv_header_locale_h = yes; then
6052     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6053 echo "configure:6054: checking for LC_MESSAGES" >&5
6054 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060 #include <locale.h>
6061 int main() {
6062 return LC_MESSAGES
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   am_cv_val_LC_MESSAGES=yes
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   am_cv_val_LC_MESSAGES=no
6073 fi
6074 rm -f conftest*
6075 fi
6076
6077 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6078     if test $am_cv_val_LC_MESSAGES = yes; then
6079       cat >> confdefs.h <<\EOF
6080 #define HAVE_LC_MESSAGES 1
6081 EOF
6082
6083     fi
6084   fi
6085    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6086 echo "configure:6087: checking whether NLS is requested" >&5
6087         # Check whether --enable-nls or --disable-nls was given.
6088 if test "${enable_nls+set}" = set; then
6089   enableval="$enable_nls"
6090   USE_NLS=$enableval
6091 else
6092   USE_NLS=yes
6093 fi
6094
6095     echo "$ac_t""$USE_NLS" 1>&6
6096     
6097
6098     BUILD_INCLUDED_LIBINTL=no
6099     USE_INCLUDED_LIBINTL=no
6100     INTLLIBS=
6101     INTLDEPS=
6102
6103         if test "$USE_NLS" = "yes"; then
6104       cat >> confdefs.h <<\EOF
6105 #define ENABLE_NLS 1
6106 EOF
6107
6108       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6109 echo "configure:6110: checking whether included gettext is requested" >&5
6110       # Check whether --with-included-gettext or --without-included-gettext was given.
6111 if test "${with_included_gettext+set}" = set; then
6112   withval="$with_included_gettext"
6113   nls_cv_force_use_gnu_gettext=$withval
6114 else
6115   nls_cv_force_use_gnu_gettext=no
6116 fi
6117
6118       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6119
6120       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6121       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6122                                 CATOBJEXT=NONE
6123
6124                 
6125         
6126
6127         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6128 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6129 echo "configure:6130: checking for libintl.h" >&5
6130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6131   echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133   cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 #include <libintl.h>
6137 EOF
6138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6139 { (eval echo configure:6140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6141 if test -z "$ac_err"; then
6142   rm -rf conftest*
6143   eval "ac_cv_header_$ac_safe=yes"
6144 else
6145   echo "$ac_err" >&5
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_header_$ac_safe=no"
6150 fi
6151 rm -f conftest*
6152 fi
6153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   cat >> confdefs.h <<\EOF
6156 #define HAVE_LIBINTL_H 1
6157 EOF
6158
6159            echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6160 echo "configure:6161: checking for GNU gettext in libc" >&5
6161 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6162   echo $ac_n "(cached) $ac_c" 1>&6
6163 else
6164   cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167 #include <libintl.h>
6168 extern int _nl_msg_cat_cntr;
6169 int main() {
6170 bindtextdomain ("", "");
6171 return (int) gettext ("") + _nl_msg_cat_cntr
6172 ; return 0; }
6173 EOF
6174 if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6175   rm -rf conftest*
6176   gt_cv_func_gnugettext1_libc=yes
6177 else
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   gt_cv_func_gnugettext1_libc=no
6182 fi
6183 rm -f conftest*
6184 fi
6185
6186 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6187
6188            if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6189              echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6190 echo "configure:6191: checking for GNU gettext in libintl" >&5
6191 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6192   echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194   gt_save_LIBS="$LIBS"
6195                 LIBS="$LIBS -lintl $LIBICONV"
6196                 cat > conftest.$ac_ext <<EOF
6197 #line 6198 "configure"
6198 #include "confdefs.h"
6199 #include <libintl.h>
6200 extern int _nl_msg_cat_cntr;
6201 int main() {
6202 bindtextdomain ("", "");
6203 return (int) gettext ("") + _nl_msg_cat_cntr
6204 ; return 0; }
6205 EOF
6206 if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6207   rm -rf conftest*
6208   gt_cv_func_gnugettext1_libintl=yes
6209 else
6210   echo "configure: failed program was:" >&5
6211   cat conftest.$ac_ext >&5
6212   rm -rf conftest*
6213   gt_cv_func_gnugettext1_libintl=no
6214 fi
6215 rm -f conftest*
6216                 LIBS="$gt_save_LIBS"
6217 fi
6218
6219 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6220            fi
6221
6222                                            if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6223               || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6224                    && test "$PACKAGE" != gettext; }; then
6225              cat >> confdefs.h <<\EOF
6226 #define HAVE_GETTEXT 1
6227 EOF
6228
6229
6230              if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6231                                        INTLLIBS="-lintl $LIBICONV"
6232              fi
6233
6234              gt_save_LIBS="$LIBS"
6235              LIBS="$LIBS $INTLLIBS"
6236              for ac_func in dcgettext
6237 do
6238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6239 echo "configure:6240: checking for $ac_func" >&5
6240 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6241   echo $ac_n "(cached) $ac_c" 1>&6
6242 else
6243   cat > conftest.$ac_ext <<EOF
6244 #line 6245 "configure"
6245 #include "confdefs.h"
6246 /* System header to define __stub macros and hopefully few prototypes,
6247     which can conflict with char $ac_func(); below.  */
6248 #include <assert.h>
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 /* We use char because int might match the return type of a gcc2
6251     builtin and then its argument prototype would still apply.  */
6252 char $ac_func();
6253
6254 int main() {
6255
6256 /* The GNU C library defines this for functions which it implements
6257     to always fail with ENOSYS.  Some functions are actually named
6258     something starting with __ and the normal name is an alias.  */
6259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6260 choke me
6261 #else
6262 $ac_func();
6263 #endif
6264
6265 ; return 0; }
6266 EOF
6267 if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6268   rm -rf conftest*
6269   eval "ac_cv_func_$ac_func=yes"
6270 else
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   eval "ac_cv_func_$ac_func=no"
6275 fi
6276 rm -f conftest*
6277 fi
6278
6279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6280   echo "$ac_t""yes" 1>&6
6281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6282   cat >> confdefs.h <<EOF
6283 #define $ac_tr_func 1
6284 EOF
6285  
6286 else
6287   echo "$ac_t""no" 1>&6
6288 fi
6289 done
6290
6291              LIBS="$gt_save_LIBS"
6292
6293                      # Extract the first word of "msgfmt", so it can be a program name with args.
6294 set dummy msgfmt; ac_word=$2
6295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6296 echo "configure:6297: checking for $ac_word" >&5
6297 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   case "$MSGFMT" in
6301   /*)
6302   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6303   ;;
6304   *)
6305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6306   for ac_dir in $PATH; do
6307     test -z "$ac_dir" && ac_dir=.
6308     if test -f $ac_dir/$ac_word; then
6309       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6310         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6311         break
6312       fi
6313     fi
6314   done
6315   IFS="$ac_save_ifs"
6316   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6317   ;;
6318 esac
6319 fi
6320 MSGFMT="$ac_cv_path_MSGFMT"
6321 if test "$MSGFMT" != ":"; then
6322   echo "$ac_t""$MSGFMT" 1>&6
6323 else
6324   echo "$ac_t""no" 1>&6
6325 fi
6326
6327              # Extract the first word of "gmsgfmt", so it can be a program name with args.
6328 set dummy gmsgfmt; ac_word=$2
6329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6330 echo "configure:6331: checking for $ac_word" >&5
6331 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6332   echo $ac_n "(cached) $ac_c" 1>&6
6333 else
6334   case "$GMSGFMT" in
6335   /*)
6336   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6337   ;;
6338   ?:/*)                  
6339   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6340   ;;
6341   *)
6342   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6343   ac_dummy="$PATH"
6344   for ac_dir in $ac_dummy; do 
6345     test -z "$ac_dir" && ac_dir=.
6346     if test -f $ac_dir/$ac_word; then
6347       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6348       break
6349     fi
6350   done
6351   IFS="$ac_save_ifs"
6352   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6353   ;;
6354 esac
6355 fi
6356 GMSGFMT="$ac_cv_path_GMSGFMT"
6357 if test -n "$GMSGFMT"; then
6358   echo "$ac_t""$GMSGFMT" 1>&6
6359 else
6360   echo "$ac_t""no" 1>&6
6361 fi
6362
6363
6364                      # Extract the first word of "xgettext", so it can be a program name with args.
6365 set dummy xgettext; ac_word=$2
6366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6367 echo "configure:6368: checking for $ac_word" >&5
6368 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6369   echo $ac_n "(cached) $ac_c" 1>&6
6370 else
6371   case "$XGETTEXT" in
6372   /*)
6373   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6374   ;;
6375   *)
6376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6377   for ac_dir in $PATH; do
6378     test -z "$ac_dir" && ac_dir=.
6379     if test -f $ac_dir/$ac_word; then
6380       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6381         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6382         break
6383       fi
6384     fi
6385   done
6386   IFS="$ac_save_ifs"
6387   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6388   ;;
6389 esac
6390 fi
6391 XGETTEXT="$ac_cv_path_XGETTEXT"
6392 if test "$XGETTEXT" != ":"; then
6393   echo "$ac_t""$XGETTEXT" 1>&6
6394 else
6395   echo "$ac_t""no" 1>&6
6396 fi
6397
6398
6399              CATOBJEXT=.gmo
6400            fi
6401         
6402 else
6403   echo "$ac_t""no" 1>&6
6404 fi
6405
6406
6407         if test "$CATOBJEXT" = "NONE"; then
6408                           nls_cv_use_gnu_gettext=yes
6409         fi
6410       fi
6411
6412       if test "$nls_cv_use_gnu_gettext" = "yes"; then
6413                 INTLOBJS="\$(GETTOBJS)"
6414         # Extract the first word of "msgfmt", so it can be a program name with args.
6415 set dummy msgfmt; ac_word=$2
6416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6417 echo "configure:6418: checking for $ac_word" >&5
6418 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   case "$MSGFMT" in
6422   /*)
6423   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6424   ;;
6425   *)
6426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6427   for ac_dir in $PATH; do
6428     test -z "$ac_dir" && ac_dir=.
6429     if test -f $ac_dir/$ac_word; then
6430       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6431         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6432         break
6433       fi
6434     fi
6435   done
6436   IFS="$ac_save_ifs"
6437   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6438   ;;
6439 esac
6440 fi
6441 MSGFMT="$ac_cv_path_MSGFMT"
6442 if test "$MSGFMT" != ":"; then
6443   echo "$ac_t""$MSGFMT" 1>&6
6444 else
6445   echo "$ac_t""no" 1>&6
6446 fi
6447
6448         # Extract the first word of "gmsgfmt", so it can be a program name with args.
6449 set dummy gmsgfmt; ac_word=$2
6450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6451 echo "configure:6452: checking for $ac_word" >&5
6452 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6453   echo $ac_n "(cached) $ac_c" 1>&6
6454 else
6455   case "$GMSGFMT" in
6456   /*)
6457   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6458   ;;
6459   ?:/*)                  
6460   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6461   ;;
6462   *)
6463   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6464   ac_dummy="$PATH"
6465   for ac_dir in $ac_dummy; do 
6466     test -z "$ac_dir" && ac_dir=.
6467     if test -f $ac_dir/$ac_word; then
6468       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6469       break
6470     fi
6471   done
6472   IFS="$ac_save_ifs"
6473   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6474   ;;
6475 esac
6476 fi
6477 GMSGFMT="$ac_cv_path_GMSGFMT"
6478 if test -n "$GMSGFMT"; then
6479   echo "$ac_t""$GMSGFMT" 1>&6
6480 else
6481   echo "$ac_t""no" 1>&6
6482 fi
6483
6484         # Extract the first word of "xgettext", so it can be a program name with args.
6485 set dummy xgettext; ac_word=$2
6486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6487 echo "configure:6488: checking for $ac_word" >&5
6488 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   case "$XGETTEXT" in
6492   /*)
6493   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6494   ;;
6495   *)
6496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6497   for ac_dir in $PATH; do
6498     test -z "$ac_dir" && ac_dir=.
6499     if test -f $ac_dir/$ac_word; then
6500       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6501         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6502         break
6503       fi
6504     fi
6505   done
6506   IFS="$ac_save_ifs"
6507   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6508   ;;
6509 esac
6510 fi
6511 XGETTEXT="$ac_cv_path_XGETTEXT"
6512 if test "$XGETTEXT" != ":"; then
6513   echo "$ac_t""$XGETTEXT" 1>&6
6514 else
6515   echo "$ac_t""no" 1>&6
6516 fi
6517
6518         
6519         BUILD_INCLUDED_LIBINTL=yes
6520         USE_INCLUDED_LIBINTL=yes
6521         CATOBJEXT=.gmo
6522         INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6523         INTLDEPS="\$(top_builddir)/intl/libintl.a"
6524         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6525       fi
6526
6527                   if test "$GMSGFMT" != ":"; then
6528                         if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6529           : ;
6530         else
6531           echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6532           GMSGFMT=":"
6533         fi
6534       fi
6535
6536                   if test "$XGETTEXT" != ":"; then
6537                         if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6538           : ;
6539         else
6540           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6541           XGETTEXT=":"
6542         fi
6543       fi
6544
6545             POSUB=po
6546     fi
6547     
6548
6549
6550             if test "$PACKAGE" = gettext; then
6551       BUILD_INCLUDED_LIBINTL=yes
6552     fi
6553
6554                                             for ac_prog in bison
6555 do
6556 # Extract the first word of "$ac_prog", so it can be a program name with args.
6557 set dummy $ac_prog; ac_word=$2
6558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6559 echo "configure:6560: checking for $ac_word" >&5
6560 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6561   echo $ac_n "(cached) $ac_c" 1>&6
6562 else
6563   if test -n "$INTLBISON"; then
6564   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6565 else
6566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6567   ac_dummy="$PATH"
6568   for ac_dir in $ac_dummy; do
6569     test -z "$ac_dir" && ac_dir=.
6570     if test -f $ac_dir/$ac_word; then
6571       ac_cv_prog_INTLBISON="$ac_prog"
6572       break
6573     fi
6574   done
6575   IFS="$ac_save_ifs"
6576 fi
6577 fi
6578 INTLBISON="$ac_cv_prog_INTLBISON"
6579 if test -n "$INTLBISON"; then
6580   echo "$ac_t""$INTLBISON" 1>&6
6581 else
6582   echo "$ac_t""no" 1>&6
6583 fi
6584
6585 test -n "$INTLBISON" && break
6586 done
6587
6588     if test -z "$INTLBISON"; then
6589       ac_verc_fail=yes
6590     else
6591             echo $ac_n "checking version of bison""... $ac_c" 1>&6
6592 echo "configure:6593: checking version of bison" >&5
6593       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6594       case $ac_prog_version in
6595         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6596         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6597            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6598         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6599       esac
6600       echo "$ac_t""$ac_prog_version" 1>&6
6601     fi
6602     if test $ac_verc_fail = yes; then
6603       INTLBISON=:
6604     fi
6605
6606     
6607         
6608     
6609     
6610     
6611     
6612     
6613     
6614     
6615     if test $USE_INCLUDED_LIBINTL = yes; then
6616       cat >> confdefs.h <<\EOF
6617 #define USE_INCLUDED_LIBINTL 1
6618 EOF
6619
6620     fi
6621
6622         nls_cv_header_intl=
6623     nls_cv_header_libgt=
6624
6625         DATADIRNAME=share
6626     
6627
6628         INSTOBJEXT=.mo
6629     
6630
6631         GENCAT=gencat
6632     
6633   
6634
6635          if test "x$CATOBJEXT" != x; then
6636      echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6637 echo "configure:6638: checking for catalogs to be installed" >&5
6638      # Look for .po and .gmo files in the source directory.
6639      CATALOGS=
6640      XLINGUAS=
6641      for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6642         # If there aren't any .gmo files the shell will give us the
6643         # literal string "../path/to/srcdir/po/*.gmo" which has to be
6644         # weeded out.
6645         case "$cat" in *\**)
6646             continue;;
6647         esac
6648         # The quadruple backslash is collapsed to a double backslash
6649         # by the backticks, then collapsed again by the double quotes,
6650         # leaving us with one backslash in the sed expression (right
6651         # before the dot that mustn't act as a wildcard).  The dot to
6652         # be escaped in the second expression is hiding inside CATOBJEXT.
6653         cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6654         lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6655         # The user is allowed to set LINGUAS to a list of languages to
6656         # install catalogs for.  If it's empty that means "all of them."
6657         if test "x$LINGUAS" = x; then
6658             CATALOGS="$CATALOGS $cat"
6659             XLINGUAS="$XLINGUAS $lang"
6660         else
6661           case "$LINGUAS" in *$lang*)
6662             CATALOGS="$CATALOGS $cat"
6663             XLINGUAS="$XLINGUAS $lang"
6664             ;;
6665           esac
6666         fi
6667      done
6668      LINGUAS="$XLINGUAS"
6669      echo "$ac_t""$LINGUAS" 1>&6
6670    fi
6671
6672             MKINSTALLDIRS=
6673    if test -n "$ac_aux_dir"; then
6674      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6675    fi
6676    if test -z "$MKINSTALLDIRS"; then
6677      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6678    fi
6679    
6680
6681       INTL_LIBTOOL_SUFFIX_PREFIX=
6682    
6683   
6684
6685 # Windows32 Registry support for specifying GCC installation paths.
6686 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6687 if test "${enable_win32_registry+set}" = set; then
6688   enableval="$enable_win32_registry"
6689   :
6690 fi
6691
6692 case $host_os in
6693         win32 | pe | cygwin* | mingw32* | uwin*)
6694 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6695 echo "configure:6696: checking whether windows registry support is requested" >&5
6696 if test "x$enable_win32_registry" != xno; then
6697   cat >> confdefs.h <<\EOF
6698 #define ENABLE_WIN32_REGISTRY 1
6699 EOF
6700
6701   echo "$ac_t""yes" 1>&6
6702   
6703 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6704 echo "configure:6705: checking for library containing RegOpenKeyExA" >&5
6705 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   ac_func_search_save_LIBS="$LIBS"
6709 ac_cv_search_RegOpenKeyExA="no"
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char RegOpenKeyExA();
6717
6718 int main() {
6719 RegOpenKeyExA()
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   ac_cv_search_RegOpenKeyExA="none required"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728 fi
6729 rm -f conftest*
6730 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6731 LIBS="-l$i  $ac_func_search_save_LIBS"
6732 cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 /* Override any gcc2 internal prototype to avoid an error.  */
6736 /* We use char because int might match the return type of a gcc2
6737     builtin and then its argument prototype would still apply.  */
6738 char RegOpenKeyExA();
6739
6740 int main() {
6741 RegOpenKeyExA()
6742 ; return 0; }
6743 EOF
6744 if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6745   rm -rf conftest*
6746   ac_cv_search_RegOpenKeyExA="-l$i"
6747 break
6748 else
6749   echo "configure: failed program was:" >&5
6750   cat conftest.$ac_ext >&5
6751 fi
6752 rm -f conftest*
6753 done
6754 LIBS="$ac_func_search_save_LIBS"
6755 fi
6756
6757 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6758 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6759   test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6760   
6761 else :
6762   
6763 fi
6764 else
6765   echo "$ac_t""no" 1>&6
6766 fi
6767
6768 # Check if user specified a different registry key.
6769 case "x${enable_win32_registry}" in
6770 x | xyes)
6771   # default.
6772   gcc_cv_win32_registry_key="$VERSION"
6773   ;;
6774 xno)
6775   # no registry lookup.
6776   gcc_cv_win32_registry_key=''
6777   ;;
6778 *)
6779   # user-specified key.
6780   gcc_cv_win32_registry_key="$enable_win32_registry"
6781   ;;
6782 esac
6783
6784 if test "x$enable_win32_registry" != xno; then
6785   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6786 echo "configure:6787: checking registry key on windows hosts" >&5
6787   cat >> confdefs.h <<EOF
6788 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6789 EOF
6790
6791   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6792 fi
6793 ;;
6794 esac
6795
6796 # Get an absolute path to the GCC top-level source directory
6797 holddir=`pwd`
6798 cd $srcdir
6799 topdir=`pwd`
6800 cd $holddir
6801
6802 # Conditionalize the makefile for this host machine.
6803 # Make-host contains the concatenation of all host makefile fragments
6804 # [there can be more than one].  This file is built by configure.frag.
6805 host_overrides=Make-host
6806 dep_host_xmake_file=
6807 for f in .. ${host_xmake_file}
6808 do
6809         if test -f ${srcdir}/config/$f
6810         then
6811                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6812         fi
6813 done
6814
6815 # Conditionalize the makefile for this target machine.
6816 # Make-target contains the concatenation of all host makefile fragments
6817 # [there can be more than one].  This file is built by configure.frag.
6818 target_overrides=Make-target
6819 dep_tmake_file=
6820 for f in .. ${tmake_file}
6821 do
6822         if test -f ${srcdir}/config/$f
6823         then
6824                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6825         fi
6826 done
6827
6828 # If the host doesn't support symlinks, modify CC in
6829 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6830 # Otherwise, we can use "CC=$(CC)".
6831 rm -f symtest.tem
6832 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6833 then
6834         cc_set_by_configure="\$(CC)"
6835         quoted_cc_set_by_configure="\$(CC)"
6836         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6837 else
6838         rm -f symtest.tem
6839         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6840         then
6841                 symbolic_link="cp -p"
6842         else
6843                 symbolic_link="cp"
6844         fi
6845         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6846         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6847         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6848 fi
6849 rm -f symtest.tem
6850
6851 out_object_file=`basename $out_file .c`.o
6852
6853 tm_file_list=
6854 for f in $tm_file; do
6855   case $f in
6856     ansidecl.h )
6857        tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6858     defaults.h )
6859        tm_file_list="${tm_file_list} $f" ;;
6860     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6861   esac
6862 done
6863
6864 tm_p_file_list=
6865 for f in $tm_p_file; do
6866     tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6867 done
6868
6869 host_xm_file_list=
6870 for f in $host_xm_file; do
6871   case $f in
6872     ansidecl.h )
6873        host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6874     auto-host.h | defaults.h )
6875        host_xm_file_list="${host_xm_file_list} $f" ;;
6876     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6877   esac
6878 done
6879
6880 build_xm_file_list=
6881 for f in $build_xm_file; do
6882   case $f in
6883     ansidecl.h )
6884        build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6885     auto-build.h | auto-host.h | defaults.h )
6886        build_xm_file_list="${build_xm_file_list} $f" ;;
6887     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6888   esac
6889 done
6890
6891 # Define macro CROSS_COMPILE in compilation
6892 # if this is a cross-compiler.
6893 # Also use all.cross instead of all.internal
6894 # and add cross-make to Makefile.
6895 cross_overrides="/dev/null"
6896 if test x$host != x$target
6897 then
6898         cross_defines="CROSS=-DCROSS_COMPILE"
6899         cross_overrides="${topdir}/cross-make"
6900 fi
6901
6902 # If this is a cross-compiler that does not
6903 # have its own set of headers then define
6904 # inhibit_libc
6905
6906 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6907 # This prevents libgcc2 from containing any code which requires libc
6908 # support.
6909 inhibit_libc=
6910 if test x$host != x$target && test x$with_headers = x; then
6911        inhibit_libc=-Dinhibit_libc
6912 else
6913        if test x$with_newlib = xyes; then
6914                inhibit_libc=-Dinhibit_libc
6915        fi
6916 fi
6917
6918
6919 # When building gcc with a cross-compiler, we need to fix a few things.
6920 # This must come after cross-make as we want all.build to override
6921 # all.cross.
6922 build_overrides="/dev/null"
6923 if test x$build != x$host
6924 then
6925         build_overrides="${topdir}/build-make"
6926 fi
6927
6928 # Expand extra_headers to include complete path.
6929 # This substitutes for lots of t-* files.
6930 extra_headers_list=
6931 if test "x$extra_headers" = x
6932 then true
6933 else
6934         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6935         for file in $extra_headers;
6936         do
6937                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6938         done
6939 fi
6940
6941 if test x$use_collect2 = xno; then
6942         use_collect2=
6943 fi
6944
6945 # Add a definition of USE_COLLECT2 if system wants one.
6946 if test x$use_collect2 != x
6947 then
6948         host_xm_defines="${host_xm_defines} USE_COLLECT2"
6949         xm_defines="${xm_defines} USE_COLLECT2"
6950 fi
6951
6952 # If we have gas in the build tree, make a link to it.
6953 if test -f ../gas/Makefile; then
6954         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6955 fi
6956
6957 # If we have nm and objdump in the build tree, make a link to them.
6958 if test -f ../binutils/Makefile; then
6959         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6960         rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6961 fi
6962
6963 # If we have ld in the build tree, make a link to it.
6964 if test -f ../ld/Makefile; then
6965         rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6966 fi
6967
6968 # Figure out what assembler we will be using.
6969 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6970 echo "configure:6971: checking what assembler to use" >&5
6971 gcc_cv_as=
6972 gcc_cv_gas_major_version=
6973 gcc_cv_gas_minor_version=
6974 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6975 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6976 if test -x "$DEFAULT_ASSEMBLER"; then
6977         gcc_cv_as="$DEFAULT_ASSEMBLER"
6978 elif test -x "$AS"; then
6979         gcc_cv_as="$AS"
6980 elif test -x as$host_exeext; then
6981         # Build using assembler in the current directory.
6982         gcc_cv_as=./as$host_exeext
6983 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6984         # Single tree build which includes gas.
6985         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
6986         do
6987                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6988                 if test x$gcc_cv_gas_version != x; then
6989                         break
6990                 fi
6991         done
6992         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6993         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6994 fi
6995
6996 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6997         # Native build.
6998         # Search the same directories that the installed compiler will
6999         # search.  Else we may find the wrong assembler and lose.  If we
7000         # do not find a suitable assembler binary, then try the user's
7001         # path.
7002         #
7003         # Also note we have to check MD_EXEC_PREFIX before checking the
7004         # user's path.  Unfortunately, there is no good way to get at the
7005         # value of MD_EXEC_PREFIX here.  So we do a brute force search
7006         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
7007         # to be fixed as part of the make/configure rewrite too.
7008
7009         if test "x$exec_prefix" = xNONE; then
7010                 if test "x$prefix" = xNONE; then
7011                         test_prefix=/usr/local
7012                 else
7013                         test_prefix=$prefix
7014                 fi
7015         else
7016                 test_prefix=$exec_prefix
7017         fi
7018
7019         # If the loop below does not find an assembler, then use whatever
7020         # one we can find in the users's path.
7021         # user's path.
7022         gcc_cv_as=as$host_exeext
7023
7024         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
7025                    $test_prefix/lib/gcc-lib/$target \
7026                    /usr/lib/gcc/$target/$gcc_version \
7027                    /usr/lib/gcc/$target \
7028                    $test_prefix/$target/bin/$target/$gcc_version \
7029                    $test_prefix/$target/bin \
7030                    /usr/libexec \
7031                    /usr/ccs/gcc \
7032                    /usr/ccs/bin \
7033                    /udk/usr/ccs/bin \
7034                    /bsd43/usr/lib/cmplrs/cc \
7035                    /usr/cross64/usr/bin \
7036                    /usr/lib/cmplrs/cc \
7037                    /sysv/usr/lib/cmplrs/cc \
7038                    /svr4/usr/lib/cmplrs/cc \
7039                    /usr/bin"
7040
7041         for dir in $test_dirs; do
7042                 if test -f $dir/as$host_exeext; then
7043                         gcc_cv_as=$dir/as$host_exeext
7044                         break;
7045                 fi
7046         done
7047 fi
7048 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7049   echo "$ac_t"""newly built gas"" 1>&6
7050 else
7051   echo "$ac_t""$gcc_cv_as" 1>&6
7052 fi
7053
7054 # Figure out what nm we will be using.
7055 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7056 echo "configure:7057: checking what nm to use" >&5
7057 if test -x nm$host_exeext; then
7058         gcc_cv_nm=./nm$host_exeext
7059 elif test x$host = x$target; then
7060         # Native build.
7061         gcc_cv_nm=nm$host_exeext
7062 fi
7063 echo "$ac_t""$gcc_cv_nm" 1>&6
7064
7065 # Figure out what objdump we will be using.
7066 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7067 echo "configure:7068: checking what objdump to use" >&5
7068 if test -x objdump$host_exeext; then
7069         gcc_cv_objdump=./objdump$host_exeext
7070 elif test x$host = x$target; then
7071         # Native build.
7072         gcc_cv_objdump=objdump$host_exeext
7073 fi
7074 echo "$ac_t""$gcc_cv_objdump" 1>&6
7075
7076 # Figure out what assembler alignment features are present.
7077 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7078 echo "configure:7079: checking assembler alignment features" >&5
7079 gcc_cv_as_alignment_features=none
7080 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7081         # Gas version 2.6 and later support for .balign and .p2align.
7082         # bytes to skip when using .p2align.
7083         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
7084                 gcc_cv_as_alignment_features=".balign and .p2align"
7085                 cat >> confdefs.h <<\EOF
7086 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7087 EOF
7088
7089         fi
7090         # Gas version 2.8 and later support specifying the maximum
7091         # bytes to skip when using .p2align.
7092         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
7093                 gcc_cv_as_alignment_features=".p2align including maximum skip"
7094                 cat >> confdefs.h <<\EOF
7095 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7096 EOF
7097
7098         fi
7099 elif test x$gcc_cv_as != x; then
7100         # Check if we have .balign and .p2align
7101         echo ".balign  4" > conftest.s
7102         echo ".p2align  2" >> conftest.s
7103         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7104                 gcc_cv_as_alignment_features=".balign and .p2align"
7105                 cat >> confdefs.h <<\EOF
7106 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7107 EOF
7108
7109         fi
7110         rm -f conftest.s conftest.o
7111         # Check if specifying the maximum bytes to skip when
7112         # using .p2align is supported.
7113         echo ".p2align 4,,7" > conftest.s
7114         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7115                 gcc_cv_as_alignment_features=".p2align including maximum skip"
7116                 cat >> confdefs.h <<\EOF
7117 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7118 EOF
7119
7120         fi
7121         rm -f conftest.s conftest.o
7122 fi
7123 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7124
7125 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7126 echo "configure:7127: checking assembler subsection support" >&5
7127 gcc_cv_as_subsections=no
7128 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7129   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
7130     gcc_cv_as_subsections="working .subsection -1"
7131   fi
7132 elif test x$gcc_cv_as != x; then
7133         # Check if we have .subsection
7134         echo ".subsection 1" > conftest.s
7135         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7136                 gcc_cv_as_subsections=".subsection"
7137                 if test x$gcc_cv_nm != x; then
7138                         cat > conftest.s <<EOF
7139 conftest_label1: .word 0
7140 .subsection -1
7141 conftest_label2: .word 0
7142 .previous
7143 EOF
7144                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7145                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7146                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7147                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7148                                         :
7149                                 else
7150                                         gcc_cv_as_subsections="working .subsection -1"
7151                                 fi
7152                         fi
7153                 fi
7154         fi
7155         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7156 fi
7157 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7158         cat >> confdefs.h <<\EOF
7159 #define HAVE_GAS_SUBSECTION_ORDERING 1
7160 EOF
7161
7162 fi
7163 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7164
7165 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7166 echo "configure:7167: checking assembler weak support" >&5
7167 gcc_cv_as_weak=no
7168 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7169   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
7170     gcc_cv_as_weak="yes"
7171   fi
7172 elif test x$gcc_cv_as != x; then
7173         # Check if we have .weak
7174         echo "  .weak foobar" > conftest.s
7175         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7176                 gcc_cv_as_weak="yes"
7177         fi
7178         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7179 fi
7180 if test x"$gcc_cv_as_weak" = xyes; then
7181         cat >> confdefs.h <<\EOF
7182 #define HAVE_GAS_WEAK 1
7183 EOF
7184
7185 fi
7186 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7187
7188 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7189 echo "configure:7190: checking assembler hidden support" >&5
7190 gcc_cv_as_hidden=no
7191 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7192   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
7193     gcc_cv_as_hidden="yes"
7194   fi
7195 elif test x$gcc_cv_as != x; then
7196         # Check if we have .hidden
7197         echo "  .hidden foobar" > conftest.s
7198         echo "foobar:" >> conftest.s
7199         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7200                 gcc_cv_as_hidden="yes"
7201         fi
7202         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7203 fi
7204 if test x"$gcc_cv_as_hidden" = xyes; then
7205         cat >> confdefs.h <<\EOF
7206 #define HAVE_GAS_HIDDEN 1
7207 EOF
7208
7209 fi
7210 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7211
7212 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7213 echo "configure:7214: checking assembler leb128 support" >&5
7214 gcc_cv_as_leb128=no
7215 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7216   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
7217     gcc_cv_as_leb128="yes"
7218   fi
7219 elif test x$gcc_cv_as != x; then
7220         # Check if we have .[us]leb128, and support symbol arithmetic with it.
7221         cat > conftest.s <<EOF
7222         .data
7223         .uleb128 L2 - L1
7224 L1:
7225         .uleb128 1280
7226         .sleb128 -1010
7227 L2:
7228 EOF
7229         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7230                 gcc_cv_as_leb128="yes"
7231
7232                 # GAS versions before 2.11 do not support uleb128,
7233                 # despite appearing to.
7234                 # ??? There exists an elf-specific test that will crash
7235                 # the assembler.  Perhaps it's better to figure out whether
7236                 # arbitrary sections are supported and try the test.
7237                 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7238                 if echo "$as_ver" | grep GNU > /dev/null; then
7239                         as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7240                         as_major=`echo $as_ver | sed 's/\..*//'`
7241                         as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7242                         if test $as_major -eq 2 -a $as_minor -lt 11; then
7243                                 gcc_cv_as_leb128="no"
7244                         fi
7245                 fi
7246         fi
7247         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7248 fi
7249 if test x"$gcc_cv_as_leb128" = xyes; then
7250         cat >> confdefs.h <<\EOF
7251 #define HAVE_AS_LEB128 1
7252 EOF
7253
7254 fi
7255 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7256
7257 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7258 echo "configure:7259: checking assembler eh_frame optimization" >&5
7259 gcc_cv_as_eh_frame=no
7260 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7261   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
7262     gcc_cv_as_eh_frame="yes"
7263   fi
7264 elif test x$gcc_cv_as != x; then
7265         # Check if this is GAS.
7266         as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7267         rm -f a.out 2> /dev/null
7268         if echo "$as_ver" | grep GNU > /dev/null; then
7269                 # Versions up to and including 2.11.0 may mis-optimize
7270                 # .eh_frame data.  Try something.
7271                 cat > conftest.s <<EOF
7272         .text
7273 .LFB1:
7274         .4byte  0
7275 .L1:
7276         .4byte  0
7277 .LFE1:
7278         .section        .eh_frame,"aw",@progbits
7279 __FRAME_BEGIN__:
7280         .4byte  .LECIE1-.LSCIE1
7281 .LSCIE1:
7282         .4byte  0x0
7283         .byte   0x1
7284         .ascii "z\0"
7285         .byte   0x1
7286         .byte   0x78
7287         .byte   0x1a
7288         .byte   0x0
7289         .byte   0x4
7290         .4byte  1
7291         .p2align 1
7292 .LECIE1:
7293 .LSFDE1:
7294         .4byte  .LEFDE1-.LASFDE1
7295 .LASFDE1:
7296         .4byte  .LASFDE1-__FRAME_BEGIN__
7297         .4byte  .LFB1
7298         .4byte  .LFE1-.LFB1
7299         .byte   0x4
7300         .4byte  .LFE1-.LFB1
7301         .byte   0x4
7302         .4byte  .L1-.LFB1
7303 .LEFDE1:
7304 EOF
7305                 cat > conftest.lit <<EOF
7306  0000 10000000 00000000 017a0001 781a0004  .........z..x...
7307  0010 01000000 12000000 18000000 00000000  ................
7308  0020 08000000 04080000 0044               .........D      
7309 EOF
7310                 cat > conftest.big <<EOF
7311  0000 00000010 00000000 017a0001 781a0004  .........z..x...
7312  0010 00000001 00000012 00000018 00000000  ................
7313  0020 00000008 04000000 0844               .........D      
7314 EOF
7315                 # If the assembler didn't choke, and we can objdump,
7316                 # and we got the correct data, then succeed.
7317                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7318                    && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7319                       | tail -3 > conftest.got \
7320                    && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7321                         || cmp conftest.big conftest.got > /dev/null 2>&1; }
7322                 then
7323                         gcc_cv_as_eh_frame="yes"
7324                 else
7325                         gcc_cv_as_eh_frame="bad"
7326                         if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7327                                 cat >> confdefs.h <<\EOF
7328 #define USE_AS_TRADITIONAL_FORMAT 1
7329 EOF
7330
7331                         fi
7332                 fi
7333         fi
7334         rm -f conftest.*
7335 fi
7336 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7337
7338 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7339 echo "configure:7340: checking assembler section merging support" >&5
7340 gcc_cv_as_shf_merge=no
7341 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7342   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
7343     gcc_cv_as_shf_merge=yes
7344   fi
7345 elif test x$gcc_cv_as != x; then
7346         # Check if we support SHF_MERGE sections
7347         echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7348         if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7349                 gcc_cv_as_shf_merge=yes
7350         fi
7351         rm -f conftest.s conftest.o
7352 fi
7353 if test x"$gcc_cv_as_shf_merge" = xyes; then
7354         cat >> confdefs.h <<\EOF
7355 #define HAVE_GAS_SHF_MERGE 1
7356 EOF
7357
7358 fi
7359 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7360
7361 case "$target" in 
7362   sparc*-*-*)
7363     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7364 echo "configure:7365: checking assembler .register pseudo-op support" >&5
7365 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7366   echo $ac_n "(cached) $ac_c" 1>&6
7367 else
7368   
7369         gcc_cv_as_register_pseudo_op=unknown
7370         if test x$gcc_cv_as != x; then
7371             # Check if we have .register
7372             echo ".register %g2, #scratch" > conftest.s
7373             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7374                 gcc_cv_as_register_pseudo_op=yes
7375             else
7376                 gcc_cv_as_register_pseudo_op=no
7377             fi
7378             rm -f conftest.s conftest.o
7379         fi
7380     
7381 fi
7382
7383 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7384     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7385         cat >> confdefs.h <<\EOF
7386 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7387 EOF
7388
7389     fi
7390
7391     echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7392 echo "configure:7393: checking assembler supports -relax" >&5
7393 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   
7397         gcc_cv_as_relax_opt=unknown
7398         if test x$gcc_cv_as != x; then
7399             # Check if gas supports -relax
7400             echo ".text" > conftest.s
7401             if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7402                 gcc_cv_as_relax_opt=yes
7403             else
7404                 gcc_cv_as_relax_opt=no
7405             fi
7406             rm -f conftest.s conftest.o
7407         fi
7408     
7409 fi
7410
7411 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7412     if test "x$gcc_cv_as_relax_opt" = xyes; then
7413         cat >> confdefs.h <<\EOF
7414 #define HAVE_AS_RELAX_OPTION 1
7415 EOF
7416
7417     fi
7418
7419     case "$tm_file" in
7420     *64*)
7421         echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
7422 echo "configure:7423: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
7423 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
7424   echo $ac_n "(cached) $ac_c" 1>&6
7425 else
7426   
7427                 if test -n "$gcc_cv_as"; then
7428                     echo ".xword foo" > conftest.s
7429                     gcc_cv_as_flags64=no
7430                     for flag in "-xarch=v9" "-64 -Av9"; do
7431                         if $gcc_cv_as $flag -o conftest.o conftest.s \
7432                             > /dev/null 2>&1; then
7433                             gcc_cv_as_flags64=$flag
7434                             break
7435                         fi
7436                     done
7437                     rm -f conftest.s conftest.o
7438                 else
7439                     if test "$gas" = yes; then
7440                         gcc_cv_as_flags64="-64 -Av9"
7441                     else
7442                         gcc_cv_as_flags64="-xarch=v9"
7443                     fi
7444                 fi
7445         
7446 fi
7447
7448 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
7449         if test "x$gcc_cv_as_flags64" = xno; then
7450
7451             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
7452             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
7453
7454         else
7455             cat >> confdefs.h <<EOF
7456 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
7457 EOF
7458
7459         fi
7460         ;;
7461     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
7462         ;;
7463     esac
7464
7465     if test "x$gcc_cv_as_flags64" != xno; then
7466         echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7467 echo "configure:7468: checking for assembler offsetable %lo() support" >&5
7468 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7469   echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471   
7472             gcc_cv_as_offsetable_lo10=unknown
7473             if test "x$gcc_cv_as" != x; then
7474                 # Check if assembler has offsetable %lo()
7475                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7476                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7477                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7478                         > /dev/null 2>&1 &&
7479                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7480                         > /dev/null 2>&1; then
7481                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7482                         gcc_cv_as_offsetable_lo10=no
7483                     else
7484                         gcc_cv_as_offsetable_lo10=yes
7485                     fi
7486                 else
7487                     gcc_cv_as_offsetable_lo10=no
7488                 fi
7489                 rm -f conftest.s conftest.o conftest1.s conftest1.o
7490             fi
7491         
7492 fi
7493
7494 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7495         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7496             cat >> confdefs.h <<\EOF
7497 #define HAVE_AS_OFFSETABLE_LO10 1
7498 EOF
7499
7500         fi
7501     fi
7502
7503     ;;
7504
7505   i[34567]86-*-* | x86_64-*-*)
7506     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7507 echo "configure:7508: checking assembler instructions" >&5
7508     gcc_cv_as_instructions=
7509     if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7510       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
7511         gcc_cv_as_instructions="filds fists"
7512       fi
7513     elif test x$gcc_cv_as != x; then
7514         set "filds fists" "filds mem; fists mem"
7515         while test $# -gt 0
7516         do
7517                 echo "$2" > conftest.s
7518                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7519                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7520                 fi
7521                 shift 2
7522         done
7523         rm -f conftest.s conftest.o
7524     fi
7525     if test x"$gcc_cv_as_instructions" != x; then
7526         cat >> confdefs.h <<EOF
7527 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7528 EOF
7529
7530     fi
7531     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7532
7533     echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7534 echo "configure:7535: checking assembler GOTOFF in data directives" >&5
7535     gcc_cv_as_gotoff_in_data=no
7536     if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7537     then
7538       if test "$gcc_cv_gas_major_version" -eq 2 \
7539          -a "$gcc_cv_gas_minor_version" -ge 11 \
7540          -o "$gcc_cv_gas_major_version" -gt 2; then
7541         gcc_cv_as_gotoff_in_data=yes
7542       fi
7543     elif test x$gcc_cv_as != x; then
7544         cat > conftest.s <<EOF
7545         .text
7546 .L0:
7547         nop
7548         .data
7549         .long .L0@GOTOFF
7550 EOF
7551         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7552           gcc_cv_as_gotoff_in_data=yes
7553         fi
7554     fi
7555     cat >> confdefs.h <<EOF
7556 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7557 EOF
7558
7559     echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7560     ;;
7561 esac
7562
7563 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7564 echo "configure:7565: checking assembler dwarf2 debug_line support" >&5
7565 gcc_cv_as_dwarf2_debug_line=no
7566 # ??? Not all targets support dwarf2 debug_line, even within a version
7567 # of gas.  Moreover, we need to emit a valid instruction to trigger any
7568 # info to the output file.  So, as supported targets are added to gas 2.11,
7569 # add some instruction here to (also) show we expect this might work.
7570 # ??? Once 2.11 is released, probably need to add first known working
7571 # version to the per-target configury.
7572 case "$target" in
7573   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*)
7574     insn="nop"
7575     ;;
7576   ia64*-*-*)
7577     insn="nop 0"
7578     ;;
7579   esac
7580 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7581 then
7582   if test "$gcc_cv_gas_major_version" -eq 2 \
7583         -a "$gcc_cv_gas_minor_version" -ge 11 \
7584         -o "$gcc_cv_gas_major_version" -gt 2 \
7585      && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7586      && test x"$insn" != x ; then
7587     gcc_cv_as_dwarf2_debug_line="yes"
7588   fi
7589 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7590         echo '  .file 1 "conftest.s"' > conftest.s
7591         echo '  .loc 1 3 0' >> conftest.s
7592         echo "  $insn" >> conftest.s
7593         # ??? This fails with non-gnu grep.
7594         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7595            && grep debug_line conftest.o > /dev/null 2>&1 ; then
7596                 # The .debug_line file table must be in the exact order that
7597                 # we specified the files, since these indices are also used
7598                 # by DW_AT_decl_file.  Approximate this test by testing if
7599                 # the assembler bitches if the same index is assigned twice.
7600                 echo '  .file 1 "foo.s"' > conftest.s
7601                 echo '  .file 1 "bar.s"' >> conftest.s
7602                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7603                 then
7604                   gcc_cv_as_dwarf2_debug_line="no"
7605                 else
7606                   gcc_cv_as_dwarf2_debug_line="yes"
7607                 fi
7608         fi
7609         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7610 fi
7611 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7612         cat >> confdefs.h <<\EOF
7613 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7614 EOF
7615
7616 fi
7617 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7618
7619 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7620 echo "configure:7621: checking assembler --gdwarf2 support" >&5
7621 gcc_cv_as_gdwarf2_flag=no
7622 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7623 then
7624   if test "$gcc_cv_gas_major_version" -eq 2 \
7625         -a "$gcc_cv_gas_minor_version" -ge 11 \
7626         -o "$gcc_cv_gas_major_version" -gt 2 \
7627      && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7628      && test x"$insn" != x ; then
7629     gcc_cv_as_gdwarf2_debug_flag="yes"
7630   fi
7631 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7632         echo '' > conftest.s
7633         # ??? This fails with non-gnu grep.
7634         if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7635           then
7636           gcc_cv_as_gdwarf2_flag="yes"
7637         fi
7638         rm -f conftest.s conftest.o
7639 fi
7640 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7641         cat >> confdefs.h <<\EOF
7642 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7643 EOF
7644
7645 fi
7646 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7647
7648 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7649 echo "configure:7650: checking assembler --gstabs support" >&5
7650 gcc_cv_as_gstabs_flag=no
7651 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7652 then
7653   if test "$gcc_cv_gas_major_version" -eq 2 \
7654         -a "$gcc_cv_gas_minor_version" -ge 11 \
7655         -o "$gcc_cv_gas_major_version" -gt 2 \
7656      && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7657      && test x"$insn" != x ; then
7658     gcc_cv_as_gstabs_debug_flag="yes"
7659   fi
7660 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7661         echo '' > conftest.s
7662         # ??? This fails with non-gnu grep.
7663         if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7664           gcc_cv_as_gstabs_flag="yes"
7665         fi
7666         rm -f conftest.s conftest.o
7667 fi
7668 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7669         cat >> confdefs.h <<\EOF
7670 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7671 EOF
7672
7673 fi
7674 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7675
7676 if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7677   cat >> confdefs.h <<EOF
7678 #define PREFIX_INCLUDE_DIR "$prefix/include"
7679 EOF
7680
7681 fi
7682
7683 # Figure out what language subdirectories are present.
7684 # Look if the user specified --enable-languages="..."; if not, use
7685 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7686 # go away some day.
7687 # NB:  embedded tabs in this IF block -- do not untabify
7688 if test x"${enable_languages+set}" != xset; then
7689         if test x"${LANGUAGES+set}" = xset; then
7690                 enable_languages="${LANGUAGES}"
7691                 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7692
7693         else
7694                 enable_languages=all
7695         fi
7696 else
7697         if test x"${enable_languages}" = x ||
7698            test x"${enable_languages}" = xyes;
7699         then
7700                 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7701         fi
7702 fi
7703 enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/,$//'`
7704
7705 # First scan to see if an enabled language requires some other language.
7706 # We assume that a given config-lang.in will list all the language
7707 # front ends it requires, even if some are required indirectly.
7708 for lang in ${srcdir}/*/config-lang.in ..
7709 do
7710    case $lang in
7711     ..)
7712        ;;
7713     # The odd quoting in the next line works around
7714     # an apparent bug in bash 1.12 on linux.
7715     ${srcdir}/[*]/config-lang.in)
7716        ;;
7717     *)
7718        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
7719        this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
7720        for other in $this_lang_requires
7721        do
7722           case ,${enable_languages}, in
7723            *,$other,*)
7724               ;;
7725            *,all,*)
7726               ;;
7727            *,$lang_alias,*)
7728               enable_languages="$enable_languages,$other"
7729               ;;
7730           esac
7731        done
7732        ;;
7733    esac
7734 done
7735
7736 subdirs=
7737 for lang in ${srcdir}/*/config-lang.in ..
7738 do
7739         case $lang in
7740         ..) ;;
7741         # The odd quoting in the next line works around
7742         # an apparent bug in bash 1.12 on linux.
7743         ${srcdir}/[*]/config-lang.in) ;;
7744         *)
7745           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
7746           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
7747           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
7748           if test "x$lang_alias" = x
7749           then
7750                 echo "$lang doesn't set \$language." 1>&2
7751                 exit 1
7752           fi
7753           case ${build_by_default},${enable_languages}, in
7754           *,$lang_alias,*) add_this_lang=yes ;;
7755           no,*) add_this_lang=no ;;
7756           *,all,*) add_this_lang=yes ;;
7757           *) add_this_lang=no ;;
7758           esac
7759           if test x"${add_this_lang}" = xyes; then
7760                 case $lang in
7761                     ${srcdir}/ada/config-lang.in)
7762                         if test x$have_gnat = xyes ; then
7763                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7764                         fi
7765                         ;;
7766                     *)
7767                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7768                         ;;
7769                 esac
7770           fi
7771           ;;
7772         esac
7773 done
7774
7775 # Make gthr-default.h if we have a thread file.
7776 gthread_flags=
7777 if test $thread_file != single; then
7778     rm -f gthr-default.h
7779     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7780     gthread_flags=-DHAVE_GTHR_DEFAULT
7781 fi
7782
7783
7784 # Find out what GC implementation we want, or may, use.
7785 # Check whether --with-gc or --without-gc was given.
7786 if test "${with_gc+set}" = set; then
7787   withval="$with_gc"
7788   case "$withval" in
7789   simple | page)
7790     GGC=ggc-$withval
7791     ;;
7792   *)
7793     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7794     ;;
7795 esac
7796 else
7797   GGC=ggc-page
7798 fi
7799
7800
7801 echo "Using $GGC for garbage collection."
7802
7803 # Use the system's zlib library.
7804 zlibdir=-L../zlib
7805 zlibinc="-I\$(srcdir)/../zlib"
7806 # Check whether --with-system-zlib or --without-system-zlib was given.
7807 if test "${with_system_zlib+set}" = set; then
7808   withval="$with_system_zlib"
7809   zlibdir=
7810 zlibinc=
7811
7812 fi
7813
7814
7815
7816
7817
7818 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7819 echo "configure:7820: checking whether to enable maintainer-specific portions of Makefiles" >&5
7820     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7821 if test "${enable_maintainer_mode+set}" = set; then
7822   enableval="$enable_maintainer_mode"
7823   maintainer_mode=$enableval
7824 else
7825   maintainer_mode=no
7826 fi
7827
7828
7829 echo "$ac_t""$maintainer_mode" 1>&6
7830
7831 if test "$maintainer_mode" = "yes"; then
7832   MAINT=''
7833 else
7834   MAINT='#'
7835 fi
7836
7837 # With Setjmp/Longjmp based exception handling.
7838 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
7839 if test "${enable_sjlj_exceptions+set}" = set; then
7840   enableval="$enable_sjlj_exceptions"
7841   sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
7842 cat >> confdefs.h <<EOF
7843 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
7844 EOF
7845
7846 fi
7847
7848
7849 # Make empty files to contain the specs and options for each language.
7850 # Then add #include lines to for a compiler that has specs and/or options.
7851
7852 lang_specs_files=
7853 lang_options_files=
7854 lang_tree_files=
7855 rm -f specs.h options.h gencheck.h
7856 touch specs.h options.h gencheck.h
7857 for subdir in . $subdirs
7858 do
7859         if test -f $srcdir/$subdir/lang-specs.h; then
7860                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
7861                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7862         fi
7863         if test -f $srcdir/$subdir/lang-options.h; then
7864                 echo "#include \"$subdir/lang-options.h\"" >>options.h
7865                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
7866         fi
7867         if test -f $srcdir/$subdir/$subdir-tree.def; then
7868                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
7869                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7870         fi
7871 done
7872
7873 # These (without "all_") are set in each config-lang.in.
7874 # `language' must be a single word so is spelled singularly.
7875 all_languages=
7876 all_boot_languages=
7877 all_compilers=
7878 all_stagestuff=
7879 all_diff_excludes=
7880 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc'
7881 # List of language makefile fragments.
7882 all_lang_makefiles=
7883 all_headers=
7884 all_lib2funcs=
7885
7886 # Add the language fragments.
7887 # Languages are added via two mechanisms.  Some information must be
7888 # recorded in makefile variables, these are defined in config-lang.in.
7889 # We accumulate them and plug them into the main Makefile.
7890 # The other mechanism is a set of hooks for each of the main targets
7891 # like `clean', `install', etc.
7892
7893 language_fragments="Make-lang"
7894 language_hooks="Make-hooks"
7895
7896 for s in .. $subdirs
7897 do
7898         if test $s != ".."
7899         then
7900                 language=
7901                 boot_language=
7902                 compilers=
7903                 stagestuff=
7904                 diff_excludes=
7905                 headers=
7906                 outputs=
7907                 lib2funcs=
7908                 . ${srcdir}/$s/config-lang.in
7909                 if test "x$language" = x
7910                 then
7911                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7912                         exit 1
7913                 fi
7914                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
7915                 if test -f ${srcdir}/$s/Makefile.in
7916                 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
7917                 fi
7918                 all_languages="$all_languages $language"
7919                 if test "x$boot_language" = xyes
7920                 then
7921                         all_boot_languages="$all_boot_languages $language"
7922                 fi
7923                 all_compilers="$all_compilers $compilers"
7924                 all_stagestuff="$all_stagestuff $stagestuff"
7925                 all_diff_excludes="$all_diff_excludes $diff_excludes"
7926                 all_headers="$all_headers $headers"
7927                 all_outputs="$all_outputs $outputs"
7928                 all_lib2funcs="$all_lib2funcs $lib2funcs"
7929         fi
7930 done
7931
7932 check_languages=
7933 for language in .. $all_languages
7934 do
7935         if test $language != ".."
7936         then
7937                 check_languages="$check_languages check-$language"
7938         fi
7939 done
7940
7941 # Since we can't use `::' targets, we link each language in
7942 # with a set of hooks, reached indirectly via lang.${target}.
7943
7944 rm -f Make-hooks
7945 touch Make-hooks
7946 target_list="all.build all.cross start.encap rest.encap \
7947         info dvi \
7948         install-normal install-common install-info install-man \
7949         uninstall \
7950         mostlyclean clean distclean extraclean maintainer-clean \
7951         stage1 stage2 stage3 stage4"
7952 for t in $target_list
7953 do
7954         x=
7955         for lang in .. $all_languages
7956         do
7957                 if test $lang != ".."; then
7958                         x="$x $lang.$t"
7959                 fi
7960         done
7961         echo "lang.$t: $x" >> Make-hooks
7962 done
7963
7964 # Create .gdbinit.
7965
7966 echo "dir ." > .gdbinit
7967 echo "dir ${srcdir}" >> .gdbinit
7968 if test x$gdb_needs_out_file_path = xyes
7969 then
7970         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7971 fi
7972 if test "x$subdirs" != x; then
7973         for s in $subdirs
7974         do
7975                 echo "dir ${srcdir}/$s" >> .gdbinit
7976         done
7977 fi
7978 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
7979
7980 # Define variables host_canonical and build_canonical
7981 # because some Cygnus local changes in the Makefile depend on them.
7982 build_canonical=${build}
7983 host_canonical=${host}
7984 target_subdir=
7985 if test "${host}" != "${target}" ; then
7986     target_subdir=${target_alias}/
7987 fi
7988
7989
7990
7991         
7992 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7993 # absolute path for gcc_tooldir based on inserting the number of up-directory
7994 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7995 # $(libsubdir)/@(unlibsubdir) based path.
7996 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7997 # make and thus we'd get different behavior depending on where we built the
7998 # sources.
7999 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8000     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8001 else
8002 # An explanation of the sed strings:
8003 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
8004 #  -e 's|/$||'            match a trailing forward slash and eliminates it
8005 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
8006 #  -e 's|/[^/]*|../|g'    replaces each occurrence of /<directory> with ../
8007 #
8008 # (*) Note this pattern overwrites the first character of the string
8009 # with a forward slash if one is not already present.  This is not a
8010 # problem because the exact names of the sub-directories concerned is
8011 # unimportant, just the number of them matters.
8012 #
8013 # The practical upshot of these patterns is like this:
8014 #
8015 #  prefix     exec_prefix        result
8016 #  ------     -----------        ------
8017 #   /foo        /foo/bar          ../
8018 #   /foo/       /foo/bar          ../
8019 #   /foo        /foo/bar/         ../
8020 #   /foo/       /foo/bar/         ../
8021 #   /foo        /foo/bar/ugg      ../../
8022 #
8023     dollar='$$'
8024     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8025 fi
8026
8027
8028
8029 # Find a directory in which to install a shared libgcc.
8030
8031 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8032 if test "${enable_version_specific_runtime_libs+set}" = set; then
8033   enableval="$enable_version_specific_runtime_libs"
8034   :
8035 fi
8036
8037
8038 # Check whether --with-slibdir or --without-slibdir was given.
8039 if test "${with_slibdir+set}" = set; then
8040   withval="$with_slibdir"
8041   slibdir="$with_slibdir"
8042 else
8043   if test "${enable_version_specific_runtime_libs+set}" = set; then
8044   slibdir='$(libsubdir)'
8045 elif test "$host" != "$target"; then
8046   slibdir='$(build_tooldir)/lib'
8047 else
8048   slibdir='$(libdir)'
8049 fi
8050 fi
8051
8052
8053
8054 # Nothing to do for FLOAT_H, float_format already handled.
8055 objdir=`pwd`
8056
8057
8058 # Process the language and host/target makefile fragments.
8059 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8060
8061 # Substitute configuration variables
8062
8063
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
8127
8128
8129
8130 # Echo that links are built
8131 if test x$host = x$target
8132 then
8133         str1="native "
8134 else
8135         str1="cross-"
8136         str2=" from $host"
8137 fi
8138
8139 if test x$host != x$build
8140 then
8141         str3=" on a $build system"
8142 fi
8143
8144 if test "x$str2" != x || test "x$str3" != x
8145 then
8146         str4=
8147 fi
8148
8149 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8150
8151 if test "x$str2" != x || test "x$str3" != x
8152 then
8153         echo " ${str2}${str3}." 1>&2
8154 fi
8155
8156 # Truncate the target if necessary
8157 if test x$host_truncate_target != x; then
8158         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8159 fi
8160
8161 # Configure the subdirectories
8162 # AC_CONFIG_SUBDIRS($subdirs)
8163
8164 # Create the Makefile
8165 # and configure language subdirectories
8166 trap '' 1 2 15
8167 cat > confcache <<\EOF
8168 # This file is a shell script that caches the results of configure
8169 # tests run on this system so they can be shared between configure
8170 # scripts and configure runs.  It is not useful on other systems.
8171 # If it contains results you don't want to keep, you may remove or edit it.
8172 #
8173 # By default, configure uses ./config.cache as the cache file,
8174 # creating it if it does not exist already.  You can give configure
8175 # the --cache-file=FILE option to use a different cache file; that is
8176 # what configure does when it calls configure scripts in
8177 # subdirectories, so they share the cache.
8178 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8179 # config.status only pays attention to the cache file if you give it the
8180 # --recheck option to rerun configure.
8181 #
8182 EOF
8183 # The following way of writing the cache mishandles newlines in values,
8184 # but we know of no workaround that is simple, portable, and efficient.
8185 # So, don't put newlines in cache variables' values.
8186 # Ultrix sh set writes to stderr and can't be redirected directly,
8187 # and sets the high bit in the cache file unless we assign to the vars.
8188 (set) 2>&1 |
8189   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8190   *ac_space=\ *)
8191     # `set' does not quote correctly, so add quotes (double-quote substitution
8192     # turns \\\\ into \\, and sed turns \\ into \).
8193     sed -n \
8194       -e "s/'/'\\\\''/g" \
8195       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8196     ;;
8197   *)
8198     # `set' quotes correctly as required by POSIX, so do not add quotes.
8199     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8200     ;;
8201   esac >> confcache
8202 if cmp -s $cache_file confcache; then
8203   :
8204 else
8205   if test -w $cache_file; then
8206     echo "updating cache $cache_file"
8207     cat confcache > $cache_file
8208   else
8209     echo "not updating unwritable cache $cache_file"
8210   fi
8211 fi
8212 rm -f confcache
8213
8214 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8215
8216 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8217 # Let make expand exec_prefix.
8218 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8219
8220 # Any assignment to VPATH causes Sun make to only execute
8221 # the first set of double-colon rules, so remove it if not needed.
8222 # If there is a colon in the path, we need to keep it.
8223 if test "x$srcdir" = x.; then
8224   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8225 fi
8226
8227 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8228
8229 DEFS=-DHAVE_CONFIG_H
8230
8231 # Without the "./", some shells look in PATH for config.status.
8232 : ${CONFIG_STATUS=./config.status}
8233
8234 echo creating $CONFIG_STATUS
8235 rm -f $CONFIG_STATUS
8236 cat > $CONFIG_STATUS <<EOF
8237 #! /bin/sh
8238 # Generated automatically by configure.
8239 # Run this file to recreate the current configuration.
8240 # This directory was configured as follows,
8241 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8242 #
8243 # $0 $ac_configure_args
8244 #
8245 # Compiler output produced by configure, useful for debugging
8246 # configure, is in ./config.log if it exists.
8247
8248 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8249 for ac_option
8250 do
8251   case "\$ac_option" in
8252   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8253     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8254     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8255   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8256     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8257     exit 0 ;;
8258   -help | --help | --hel | --he | --h)
8259     echo "\$ac_cs_usage"; exit 0 ;;
8260   *) echo "\$ac_cs_usage"; exit 1 ;;
8261   esac
8262 done
8263
8264 ac_given_srcdir=$srcdir
8265
8266 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8267 EOF
8268 cat >> $CONFIG_STATUS <<EOF
8269
8270 # Protect against being on the right side of a sed subst in config.status.
8271 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8272  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8273 $ac_vpsub
8274 $extrasub
8275 s%@SHELL@%$SHELL%g
8276 s%@CFLAGS@%$CFLAGS%g
8277 s%@CPPFLAGS@%$CPPFLAGS%g
8278 s%@CXXFLAGS@%$CXXFLAGS%g
8279 s%@FFLAGS@%$FFLAGS%g
8280 s%@DEFS@%$DEFS%g
8281 s%@LDFLAGS@%$LDFLAGS%g
8282 s%@LIBS@%$LIBS%g
8283 s%@exec_prefix@%$exec_prefix%g
8284 s%@prefix@%$prefix%g
8285 s%@program_transform_name@%$program_transform_name%g
8286 s%@bindir@%$bindir%g
8287 s%@sbindir@%$sbindir%g
8288 s%@libexecdir@%$libexecdir%g
8289 s%@datadir@%$datadir%g
8290 s%@sysconfdir@%$sysconfdir%g
8291 s%@sharedstatedir@%$sharedstatedir%g
8292 s%@localstatedir@%$localstatedir%g
8293 s%@libdir@%$libdir%g
8294 s%@includedir@%$includedir%g
8295 s%@oldincludedir@%$oldincludedir%g
8296 s%@infodir@%$infodir%g
8297 s%@mandir@%$mandir%g
8298 s%@enable_multilib@%$enable_multilib%g
8299 s%@enable_shared@%$enable_shared%g
8300 s%@host@%$host%g
8301 s%@host_alias@%$host_alias%g
8302 s%@host_cpu@%$host_cpu%g
8303 s%@host_vendor@%$host_vendor%g
8304 s%@host_os@%$host_os%g
8305 s%@target@%$target%g
8306 s%@target_alias@%$target_alias%g
8307 s%@target_cpu@%$target_cpu%g
8308 s%@target_vendor@%$target_vendor%g
8309 s%@target_os@%$target_os%g
8310 s%@build@%$build%g
8311 s%@build_alias@%$build_alias%g
8312 s%@build_cpu@%$build_cpu%g
8313 s%@build_vendor@%$build_vendor%g
8314 s%@build_os@%$build_os%g
8315 s%@CC@%$CC%g
8316 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8317 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8318 s%@strict1_warn@%$strict1_warn%g
8319 s%@CPP@%$CPP%g
8320 s%@warn_cflags@%$warn_cflags%g
8321 s%@stage1_cflags@%$stage1_cflags%g
8322 s%@SET_MAKE@%$SET_MAKE%g
8323 s%@AWK@%$AWK%g
8324 s%@LN@%$LN%g
8325 s%@LN_S@%$LN_S%g
8326 s%@RANLIB@%$RANLIB%g
8327 s%@INSTALL@%$INSTALL%g
8328 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8329 s%@INSTALL_DATA@%$INSTALL_DATA%g
8330 s%@GNATBIND@%$GNATBIND%g
8331 s%@ADAC@%$ADAC%g
8332 s%@have_mktemp_command@%$have_mktemp_command%g
8333 s%@MAKEINFO@%$MAKEINFO%g
8334 s%@BUILD_INFO@%$BUILD_INFO%g
8335 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8336 s%@FLEX@%$FLEX%g
8337 s%@BISON@%$BISON%g
8338 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8339 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8340 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8341 s%@vfprintf@%$vfprintf%g
8342 s%@doprint@%$doprint%g
8343 s%@strstr@%$strstr%g
8344 s%@LIBICONV@%$LIBICONV%g
8345 s%@manext@%$manext%g
8346 s%@objext@%$objext%g
8347 s%@PACKAGE@%$PACKAGE%g
8348 s%@VERSION@%$VERSION%g
8349 s%@ALLOCA@%$ALLOCA%g
8350 s%@GLIBC21@%$GLIBC21%g
8351 s%@USE_NLS@%$USE_NLS%g
8352 s%@MSGFMT@%$MSGFMT%g
8353 s%@GMSGFMT@%$GMSGFMT%g
8354 s%@XGETTEXT@%$XGETTEXT%g
8355 s%@INTLBISON@%$INTLBISON%g
8356 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8357 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8358 s%@CATALOGS@%$CATALOGS%g
8359 s%@CATOBJEXT@%$CATOBJEXT%g
8360 s%@INTLLIBS@%$INTLLIBS%g
8361 s%@INTLDEPS@%$INTLDEPS%g
8362 s%@INTLOBJS@%$INTLOBJS%g
8363 s%@POSUB@%$POSUB%g
8364 s%@DATADIRNAME@%$DATADIRNAME%g
8365 s%@INSTOBJEXT@%$INSTOBJEXT%g
8366 s%@GENCAT@%$GENCAT%g
8367 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8368 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8369 s%@inhibit_libc@%$inhibit_libc%g
8370 s%@gthread_flags@%$gthread_flags%g
8371 s%@GGC@%$GGC%g
8372 s%@zlibdir@%$zlibdir%g
8373 s%@zlibinc@%$zlibinc%g
8374 s%@MAINT@%$MAINT%g
8375 s%@build_canonical@%$build_canonical%g
8376 s%@host_canonical@%$host_canonical%g
8377 s%@target_subdir@%$target_subdir%g
8378 s%@gcc_tooldir@%$gcc_tooldir%g
8379 s%@dollar@%$dollar%g
8380 s%@slibdir@%$slibdir%g
8381 s%@objdir@%$objdir%g
8382 s%@subdirs@%$subdirs%g
8383 s%@all_boot_languages@%$all_boot_languages%g
8384 s%@all_compilers@%$all_compilers%g
8385 s%@all_diff_excludes@%$all_diff_excludes%g
8386 s%@all_headers@%$all_headers%g
8387 s%@all_lang_makefiles@%$all_lang_makefiles%g
8388 s%@all_languages@%$all_languages%g
8389 s%@all_lib2funcs@%$all_lib2funcs%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_c_flags@%$extra_c_flags%g
8403 s%@extra_headers_list@%$extra_headers_list%g
8404 s%@extra_objs@%$extra_objs%g
8405 s%@extra_parts@%$extra_parts%g
8406 s%@extra_passes@%$extra_passes%g
8407 s%@extra_programs@%$extra_programs%g
8408 s%@float_h_file@%$float_h_file%g
8409 s%@gcc_config_arguments@%$gcc_config_arguments%g
8410 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8411 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8412 s%@gcc_version@%$gcc_version%g
8413 s%@gcc_version_full@%$gcc_version_full%g
8414 s%@gcc_version_trigger@%$gcc_version_trigger%g
8415 s%@host_exeext@%$host_exeext%g
8416 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8417 s%@host_xm_file_list@%$host_xm_file_list%g
8418 s%@host_xm_file@%$host_xm_file%g
8419 s%@host_xm_defines@%$host_xm_defines%g
8420 s%@install@%$install%g
8421 s%@lang_options_files@%$lang_options_files%g
8422 s%@lang_specs_files@%$lang_specs_files%g
8423 s%@lang_tree_files@%$lang_tree_files%g
8424 s%@local_prefix@%$local_prefix%g
8425 s%@md_file@%$md_file%g
8426 s%@objc_boehm_gc@%$objc_boehm_gc%g
8427 s%@out_file@%$out_file%g
8428 s%@out_object_file@%$out_object_file%g
8429 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8430 s%@symbolic_link@%$symbolic_link%g
8431 s%@thread_file@%$thread_file%g
8432 s%@tm_file_list@%$tm_file_list%g
8433 s%@tm_file@%$tm_file%g
8434 s%@tm_p_file_list@%$tm_p_file_list%g
8435 s%@tm_p_file@%$tm_p_file%g
8436 s%@xm_file@%$xm_file%g
8437 s%@xm_defines@%$xm_defines%g
8438 s%@c_target_objs@%$c_target_objs%g
8439 s%@cxx_target_objs@%$cxx_target_objs%g
8440 s%@target_cpu_default@%$target_cpu_default%g
8441 /@target_overrides@/r $target_overrides
8442 s%@target_overrides@%%g
8443 /@host_overrides@/r $host_overrides
8444 s%@host_overrides@%%g
8445 s%@cross_defines@%$cross_defines%g
8446 /@cross_overrides@/r $cross_overrides
8447 s%@cross_overrides@%%g
8448 /@build_overrides@/r $build_overrides
8449 s%@build_overrides@%%g
8450 /@language_fragments@/r $language_fragments
8451 s%@language_fragments@%%g
8452 /@language_hooks@/r $language_hooks
8453 s%@language_hooks@%%g
8454
8455 CEOF
8456 EOF
8457
8458 cat >> $CONFIG_STATUS <<\EOF
8459
8460 # Split the substitutions into bite-sized pieces for seds with
8461 # small command number limits, like on Digital OSF/1 and HP-UX.
8462 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8463 ac_file=1 # Number of current file.
8464 ac_beg=1 # First line for current file.
8465 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8466 ac_more_lines=:
8467 ac_sed_cmds=""
8468 while $ac_more_lines; do
8469   if test $ac_beg -gt 1; then
8470     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8471   else
8472     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8473   fi
8474   if test ! -s conftest.s$ac_file; then
8475     ac_more_lines=false
8476     rm -f conftest.s$ac_file
8477   else
8478     if test -z "$ac_sed_cmds"; then
8479       ac_sed_cmds="sed -f conftest.s$ac_file"
8480     else
8481       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8482     fi
8483     ac_file=`expr $ac_file + 1`
8484     ac_beg=$ac_end
8485     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8486   fi
8487 done
8488 if test -z "$ac_sed_cmds"; then
8489   ac_sed_cmds=cat
8490 fi
8491 EOF
8492
8493 cat >> $CONFIG_STATUS <<EOF
8494
8495 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8496 EOF
8497 cat >> $CONFIG_STATUS <<\EOF
8498 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8499   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8500   case "$ac_file" in
8501   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8502        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8503   *) ac_file_in="${ac_file}.in" ;;
8504   esac
8505
8506   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8507
8508   # Remove last slash and all that follows it.  Not all systems have dirname.
8509   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8510   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8511     # The file is in a subdirectory.
8512     test ! -d "$ac_dir" && mkdir "$ac_dir"
8513     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8514     # A "../" for each directory in $ac_dir_suffix.
8515     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8516   else
8517     ac_dir_suffix= ac_dots=
8518   fi
8519
8520   case "$ac_given_srcdir" in
8521   .)  srcdir=.
8522       if test -z "$ac_dots"; then top_srcdir=.
8523       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8524   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8525   *) # Relative path.
8526     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8527     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8528   esac
8529
8530
8531   echo creating "$ac_file"
8532   rm -f "$ac_file"
8533   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8534   case "$ac_file" in
8535   *Makefile*) ac_comsub="1i\\
8536 # $configure_input" ;;
8537   *) ac_comsub= ;;
8538   esac
8539
8540   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8541   sed -e "$ac_comsub
8542 s%@configure_input@%$configure_input%g
8543 s%@srcdir@%$srcdir%g
8544 s%@top_srcdir@%$top_srcdir%g
8545 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8546 fi; done
8547 rm -f conftest.s*
8548
8549 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8550 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8551 #
8552 # ac_d sets the value in "#define NAME VALUE" lines.
8553 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8554 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8555 ac_dC='\3'
8556 ac_dD='%g'
8557 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8558 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8559 ac_uB='\([      ]\)%\1#\2define\3'
8560 ac_uC=' '
8561 ac_uD='\4%g'
8562 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8563 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8564 ac_eB='$%\1#\2define\3'
8565 ac_eC=' '
8566 ac_eD='%g'
8567
8568 if test "${CONFIG_HEADERS+set}" != set; then
8569 EOF
8570 cat >> $CONFIG_STATUS <<EOF
8571   CONFIG_HEADERS="auto-host.h:config.in"
8572 EOF
8573 cat >> $CONFIG_STATUS <<\EOF
8574 fi
8575 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8576   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8577   case "$ac_file" in
8578   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8579        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8580   *) ac_file_in="${ac_file}.in" ;;
8581   esac
8582
8583   echo creating $ac_file
8584
8585   rm -f conftest.frag conftest.in conftest.out
8586   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8587   cat $ac_file_inputs > conftest.in
8588
8589 EOF
8590
8591 # Transform confdefs.h into a sed script conftest.vals that substitutes
8592 # the proper values into config.h.in to produce config.h.  And first:
8593 # Protect against being on the right side of a sed subst in config.status.
8594 # Protect against being in an unquoted here document in config.status.
8595 rm -f conftest.vals
8596 cat > conftest.hdr <<\EOF
8597 s/[\\&%]/\\&/g
8598 s%[\\$`]%\\&%g
8599 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8600 s%ac_d%ac_u%gp
8601 s%ac_u%ac_e%gp
8602 EOF
8603 sed -n -f conftest.hdr confdefs.h > conftest.vals
8604 rm -f conftest.hdr
8605
8606 # This sed command replaces #undef with comments.  This is necessary, for
8607 # example, in the case of _POSIX_SOURCE, which is predefined and required
8608 # on some systems where configure will not decide to define it.
8609 cat >> conftest.vals <<\EOF
8610 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8611 EOF
8612
8613 # Break up conftest.vals because some shells have a limit on
8614 # the size of here documents, and old seds have small limits too.
8615
8616 rm -f conftest.tail
8617 while :
8618 do
8619   ac_lines=`grep -c . conftest.vals`
8620   # grep -c gives empty output for an empty file on some AIX systems.
8621   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8622   # Write a limited-size here document to conftest.frag.
8623   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8624   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8625   echo 'CEOF
8626   sed -f conftest.frag conftest.in > conftest.out
8627   rm -f conftest.in
8628   mv conftest.out conftest.in
8629 ' >> $CONFIG_STATUS
8630   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8631   rm -f conftest.vals
8632   mv conftest.tail conftest.vals
8633 done
8634 rm -f conftest.vals
8635
8636 cat >> $CONFIG_STATUS <<\EOF
8637   rm -f conftest.frag conftest.h
8638   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8639   cat conftest.in >> conftest.h
8640   rm -f conftest.in
8641   if cmp -s $ac_file conftest.h 2>/dev/null; then
8642     echo "$ac_file is unchanged"
8643     rm -f conftest.h
8644   else
8645     # Remove last slash and all that follows it.  Not all systems have dirname.
8646       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8647       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8648       # The file is in a subdirectory.
8649       test ! -d "$ac_dir" && mkdir "$ac_dir"
8650     fi
8651     rm -f $ac_file
8652     mv conftest.h $ac_file
8653   fi
8654 fi; done
8655
8656 EOF
8657 cat >> $CONFIG_STATUS <<EOF
8658
8659
8660 host='${host}'
8661 build='${build}'
8662 target='${target}'
8663 target_alias='${target_alias}'
8664 srcdir='${srcdir}'
8665 subdirs='${subdirs}'
8666 symbolic_link='${symbolic_link}'
8667 program_transform_set='${program_transform_set}'
8668 program_transform_name='${program_transform_name}'
8669 dep_host_xmake_file='${dep_host_xmake_file}'
8670 host_xmake_file='${host_xmake_file}'
8671 dep_tmake_file='${dep_tmake_file}'
8672 tmake_file='${tmake_file}'
8673 thread_file='${thread_file}'
8674 gcc_config_arguments='${gcc_config_arguments}'
8675 gcc_version='${gcc_version}'
8676 gcc_version_full='${gcc_version_full}'
8677 gcc_version_trigger='${gcc_version_trigger}'
8678 local_prefix='${local_prefix}'
8679 build_install_headers_dir='${build_install_headers_dir}'
8680 build_exeext='${build_exeext}'
8681 host_exeext='${host_exeext}'
8682 out_file='${out_file}'
8683 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
8684 SET_MAKE='${SET_MAKE}'
8685 target_list='${target_list}'
8686 target_overrides='${target_overrides}'
8687 host_overrides='${host_overrides}'
8688 cross_defines='${cross_defines}'
8689 cross_overrides='${cross_overrides}'
8690 build_overrides='${build_overrides}'
8691 cpp_install_dir='${cpp_install_dir}'
8692
8693 EOF
8694 cat >> $CONFIG_STATUS <<\EOF
8695 for ac_file in $CONFIG_FILES; do
8696         # Support "outfile[:infile[:infile...]]"
8697         case "$ac_file" in
8698           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8699         esac
8700         # PO directories have a Makefile.in generated from Makefile.in.in.
8701         case "$ac_file" in */Makefile.in)
8702           # Adjust a relative srcdir.
8703           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8704           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8705           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8706           # In autoconf-2.13 it is called $ac_given_srcdir.
8707           # In autoconf-2.50 it is called $srcdir.
8708           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8709           case "$ac_given_srcdir" in
8710             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8711             /*) top_srcdir="$ac_given_srcdir" ;;
8712             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
8713           esac
8714           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8715             rm -f "$ac_dir/POTFILES"
8716             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8717             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8718             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8719             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8720           fi
8721           ;;
8722         esac
8723       done
8724
8725 case x$CONFIG_HEADERS in
8726 xauto-host.h:config.in)
8727 echo > cstamp-h ;;
8728 esac
8729 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8730 # bootstrapping and the installation procedure can still use
8731 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
8732 # FLAGS_TO_PASS has been modified to solve the problem there.
8733 # This is virtually a duplicate of what happens in configure.lang; we do
8734 # an extra check to make sure this only happens if ln -s can be used.
8735 if test "$symbolic_link" = "ln -s"; then
8736  for d in .. ${subdirs} fixinc ; do
8737    if test $d != ..; then
8738         STARTDIR=`pwd`
8739         cd $d
8740         for t in stage1 stage2 stage3 stage4 include
8741         do
8742                 rm -f $t
8743                 $symbolic_link ../$t $t 2>/dev/null
8744         done
8745         cd $STARTDIR
8746    fi
8747  done
8748 else true ; fi
8749 # Avoid having to add intl to our include paths.
8750 if test -f intl/libintl.h; then
8751   echo creating libintl.h
8752   echo '#include "intl/libintl.h"' >libintl.h
8753 fi
8754
8755 exit 0
8756 EOF
8757 chmod +x $CONFIG_STATUS
8758 rm -fr confdefs* $ac_clean_files
8759 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8760