OSDN Git Service

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