OSDN Git Service

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