OSDN Git Service

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