OSDN Git Service

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