OSDN Git Service

* aclocal.m4 (gcc_AC_EXAMINE_OBJECT): New utility macro which
[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.
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 bcopy \
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 bcopy \
4257         getenv atol sbrk abort atof getcwd getwd \
4258         strsignal putc_unlocked fputs_unlocked strstr environ \
4259         malloc realloc calloc free basename getopt
4260 do
4261   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4262 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4263 echo "configure:4264: checking whether $ac_func is declared" >&5
4264 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 #undef $ac_tr_decl
4271 #define $ac_tr_decl 1
4272   
4273 #include "gansidecl.h"
4274 #include "system.h"
4275
4276 int main() {
4277 #ifndef $ac_func
4278 char *(*pfn) = (char *(*)) $ac_func ;
4279 #endif
4280 ; return 0; }
4281 EOF
4282 if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4283   rm -rf conftest*
4284   eval "gcc_cv_have_decl_$ac_func=yes"
4285 else
4286   echo "configure: failed program was:" >&5
4287   cat conftest.$ac_ext >&5
4288   rm -rf conftest*
4289   eval "gcc_cv_have_decl_$ac_func=no"
4290 fi
4291 rm -f conftest*
4292 fi
4293
4294 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4295   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4296 #define $ac_tr_decl 1
4297 EOF
4298  
4299 else
4300   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4301 #define $ac_tr_decl 0
4302 EOF
4303  
4304 fi
4305
4306 done
4307 if test x = y ; then
4308   cat >> confdefs.h <<EOF
4309 #define HAVE_DECL_BCOPY 1
4310 EOF
4311  \
4312         cat >> confdefs.h <<EOF
4313 #define HAVE_DECL_GETENV 1
4314 EOF
4315  cat >> confdefs.h <<EOF
4316 #define HAVE_DECL_ATOL 1
4317 EOF
4318  cat >> confdefs.h <<EOF
4319 #define HAVE_DECL_SBRK 1
4320 EOF
4321  cat >> confdefs.h <<EOF
4322 #define HAVE_DECL_ABORT 1
4323 EOF
4324  cat >> confdefs.h <<EOF
4325 #define HAVE_DECL_ATOF 1
4326 EOF
4327  cat >> confdefs.h <<EOF
4328 #define HAVE_DECL_GETCWD 1
4329 EOF
4330  cat >> confdefs.h <<EOF
4331 #define HAVE_DECL_GETWD 1
4332 EOF
4333  \
4334         cat >> confdefs.h <<EOF
4335 #define HAVE_DECL_STRSIGNAL 1
4336 EOF
4337  cat >> confdefs.h <<EOF
4338 #define HAVE_DECL_PUTC_UNLOCKED 1
4339 EOF
4340  cat >> confdefs.h <<EOF
4341 #define HAVE_DECL_FPUTS_UNLOCKED 1
4342 EOF
4343  cat >> confdefs.h <<EOF
4344 #define HAVE_DECL_STRSTR 1
4345 EOF
4346  cat >> confdefs.h <<EOF
4347 #define HAVE_DECL_ENVIRON 1
4348 EOF
4349  \
4350         cat >> confdefs.h <<EOF
4351 #define HAVE_DECL_MALLOC 1
4352 EOF
4353  cat >> confdefs.h <<EOF
4354 #define HAVE_DECL_REALLOC 1
4355 EOF
4356  cat >> confdefs.h <<EOF
4357 #define HAVE_DECL_CALLOC 1
4358 EOF
4359  cat >> confdefs.h <<EOF
4360 #define HAVE_DECL_FREE 1
4361 EOF
4362  cat >> confdefs.h <<EOF
4363 #define HAVE_DECL_BASENAME 1
4364 EOF
4365  cat >> confdefs.h <<EOF
4366 #define HAVE_DECL_GETOPT 1
4367 EOF
4368 fi
4369
4370
4371 for ac_func in getrlimit setrlimit getrusage
4372 do
4373   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4374 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4375 echo "configure:4376: checking whether $ac_func is declared" >&5
4376 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   cat > conftest.$ac_ext <<EOF
4380 #line 4381 "configure"
4381 #include "confdefs.h"
4382 #undef $ac_tr_decl
4383 #define $ac_tr_decl 1
4384   
4385 #include "gansidecl.h"
4386 #include "system.h"
4387 #ifdef HAVE_SYS_RESOURCE_H
4388 #include <sys/resource.h>
4389 #endif
4390
4391
4392 int main() {
4393 #ifndef $ac_func
4394 char *(*pfn) = (char *(*)) $ac_func ;
4395 #endif
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4399   rm -rf conftest*
4400   eval "gcc_cv_have_decl_$ac_func=yes"
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "gcc_cv_have_decl_$ac_func=no"
4406 fi
4407 rm -f conftest*
4408 fi
4409
4410 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4411   echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4412 #define $ac_tr_decl 1
4413 EOF
4414  
4415 else
4416   echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4417 #define $ac_tr_decl 0
4418 EOF
4419  
4420 fi
4421
4422 done
4423 if test x = y ; then
4424   cat >> confdefs.h <<EOF
4425 #define HAVE_DECL_GETRLIMIT 1
4426 EOF
4427  cat >> confdefs.h <<EOF
4428 #define HAVE_DECL_SETRLIMIT 1
4429 EOF
4430  cat >> confdefs.h <<EOF
4431 #define HAVE_DECL_GETRUSAGE 1
4432 EOF
4433 fi
4434
4435
4436 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4437 CFLAGS="$saved_CFLAGS"
4438
4439 # mkdir takes a single argument on some systems. 
4440 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4441 echo "configure:4442: checking if mkdir takes one argument" >&5
4442 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4443   echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445   cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448
4449 #include <sys/types.h>
4450 #ifdef HAVE_SYS_STAT_H
4451 # include <sys/stat.h>
4452 #endif
4453 #ifdef HAVE_UNISTD_H
4454 # include <unistd.h>
4455 #endif
4456 #ifdef HAVE_DIRECT_H
4457 # include <direct.h>
4458 #endif
4459 int main() {
4460 mkdir ("foo", 0);
4461 ; return 0; }
4462 EOF
4463 if { (eval echo configure:4464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4464   rm -rf conftest*
4465   gcc_cv_mkdir_takes_one_arg=no
4466 else
4467   echo "configure: failed program was:" >&5
4468   cat conftest.$ac_ext >&5
4469   rm -rf conftest*
4470   gcc_cv_mkdir_takes_one_arg=yes
4471 fi
4472 rm -f conftest*
4473 fi
4474
4475 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4476 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4477   cat >> confdefs.h <<\EOF
4478 #define MKDIR_TAKES_ONE_ARG 1
4479 EOF
4480
4481 fi
4482
4483
4484 # File extensions
4485 manext='.1'
4486 objext='.o'
4487
4488
4489
4490 build_xm_file=
4491 build_xm_defines=
4492 build_install_headers_dir=install-headers-tar
4493 build_exeext=
4494 host_xm_file=
4495 host_xm_defines=
4496 host_xmake_file=
4497 host_truncate_target=
4498 host_exeext=
4499
4500 # Decode the host machine, then the target machine.
4501 # For the host machine, we save the xm_file variable as host_xm_file;
4502 # then we decode the target machine and forget everything else
4503 # that came from the host machine.
4504 for machine in $build $host $target; do
4505         . ${srcdir}/config.gcc
4506 done
4507
4508 extra_objs="${host_extra_objs} ${extra_objs}"
4509
4510 # Default the target-machine variables that were not explicitly set.
4511 if test x"$tm_file" = x
4512 then tm_file=$cpu_type/$cpu_type.h; fi
4513
4514 if test x"$extra_headers" = x
4515 then extra_headers=; fi
4516
4517 if test x"$xm_file" = x
4518 then xm_file=$cpu_type/xm-$cpu_type.h; fi
4519
4520 if test x$md_file = x
4521 then md_file=$cpu_type/$cpu_type.md; fi
4522
4523 if test x$out_file = x
4524 then out_file=$cpu_type/$cpu_type.c; fi
4525
4526 if test x"$tmake_file" = x
4527 then tmake_file=$cpu_type/t-$cpu_type
4528 fi
4529
4530 if test x"$dwarf2" = xyes
4531 then tm_file="$tm_file tm-dwarf2.h"
4532 fi
4533
4534 if test x$float_format = x
4535 then float_format=i64
4536 fi
4537
4538 if test $float_format = none
4539 then float_h_file=Makefile.in
4540 else float_h_file=float-$float_format.h
4541 fi
4542
4543 # Handle cpp installation.
4544 if test x$enable_cpp != xno
4545 then
4546   tmake_file="$tmake_file t-install-cpp"
4547 fi
4548
4549 # Say what files are being used for the output code and MD file.
4550 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4551 echo "Using \`$srcdir/config/$md_file' as machine description file."
4552
4553 # If any of the xm_file variables contain nonexistent files, warn
4554 # about them and drop them.  But $cpu/xm-$cpu.h is allowed not to
4555 # exist, if we have nothing for it to do.
4556 bx=
4557 for x in $build_xm_file; do
4558   if    test -f $srcdir/config/$x
4559   then      bx="$bx $x"
4560   elif  expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
4561   then      :
4562   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4563   fi
4564 done
4565 build_xm_file="$bx"
4566
4567 hx=
4568 for x in $host_xm_file; do
4569   if    test -f $srcdir/config/$x
4570   then      hx="$hx $x"
4571   elif  expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
4572   then      :
4573   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4574   fi
4575 done
4576 host_xm_file="$hx"
4577
4578 tx=
4579 for x in $xm_file; do
4580   if    test -f $srcdir/config/$x
4581   then      tx="$tx $x"
4582   elif  expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
4583   then      :
4584   else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4585   fi
4586 done
4587 xm_file="$tx"
4588
4589 count=a
4590 for f in $tm_file; do
4591         count=${count}x
4592 done
4593 if test $count = ax; then
4594         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4595 else
4596         echo "Using the following target machine macro files:"
4597         for f in $tm_file; do
4598                 echo "  $srcdir/config/$f"
4599         done
4600 fi
4601
4602 count=a
4603 for f in $host_xm_file; do
4604         count=${count}x
4605 done
4606 if test $count = a; then
4607         :
4608 elif test $count = ax; then
4609         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4610 else
4611         echo "Using the following host machine macro files:"
4612         for f in $host_xm_file; do
4613                 echo "  $srcdir/config/$f"
4614         done
4615 fi
4616
4617 if test "$host_xm_file" != "$build_xm_file"; then
4618         count=a
4619         for f in $build_xm_file; do
4620                 count=${count}x
4621         done
4622         if test $count = a; then
4623                 :
4624         elif test $count = ax; then
4625                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4626         else
4627                 echo "Using the following build machine macro files:"
4628                 for f in $build_xm_file; do
4629                         echo "  $srcdir/config/$f"
4630                 done
4631         fi
4632 fi
4633
4634 if test x$thread_file = x; then
4635         if test x$target_thread_file != x; then
4636                 thread_file=$target_thread_file
4637         else
4638                 thread_file='single'
4639         fi
4640 fi
4641
4642 # auto-host.h is the file containing items generated by autoconf and is
4643 # the first file included by config.h.
4644 # If host=build, it is correct to have hconfig include auto-host.h
4645 # as well.  If host!=build, we are in error and need to do more 
4646 # work to find out the build config parameters.
4647 if test x$host = x$build
4648 then
4649         build_auto=auto-host.h
4650 else
4651         # We create a subdir, then run autoconf in the subdir.
4652         # To prevent recursion we set host and build for the new
4653         # invocation of configure to the build for this invocation
4654         # of configure. 
4655         tempdir=build.$$
4656         rm -rf $tempdir
4657         mkdir $tempdir
4658         cd $tempdir
4659         case ${srcdir} in
4660         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4661         *) realsrcdir=../${srcdir};;
4662         esac
4663         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4664                 --target=$target --host=$build --build=$build
4665
4666         # We just finished tests for the build machine, so rename
4667         # the file auto-build.h in the gcc directory.
4668         mv auto-host.h ../auto-build.h
4669         cd ..
4670         rm -rf $tempdir
4671         build_auto=auto-build.h
4672 fi
4673
4674 tm_file="${tm_file} defaults.h"
4675 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file}"
4676 build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file}"
4677 xm_file="gansidecl.h ${xm_file} ${tm_file}"
4678
4679 # Truncate the target if necessary
4680 if test x$host_truncate_target != x; then
4681         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4682 fi
4683
4684 # Get the version trigger filename from the toplevel
4685 if test "${with_gcc_version_trigger+set}" = set; then
4686         gcc_version_trigger=$with_gcc_version_trigger
4687 else
4688         gcc_version_trigger=${srcdir}/version.c
4689 fi
4690 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4691 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4692
4693 # Compile in configure arguments.
4694 if test -f configargs.h ; then
4695         # Being re-configured.
4696         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4697         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4698 else
4699         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4700 fi
4701 cat > configargs.h <<EOF
4702 /* Generated automatically. */
4703 static const char configuration_arguments[] = "$gcc_config_arguments";
4704 EOF
4705
4706 # Internationalization
4707 PACKAGE=gcc
4708 VERSION="$gcc_version"
4709 cat >> confdefs.h <<EOF
4710 #define PACKAGE "$PACKAGE"
4711 EOF
4712
4713 cat >> confdefs.h <<EOF
4714 #define VERSION "$VERSION"
4715 EOF
4716
4717
4718
4719
4720 ALL_LINGUAS="sv"
4721
4722 # Enable NLS support by default
4723 # Check whether --enable-nls or --disable-nls was given.
4724 if test "${enable_nls+set}" = set; then
4725   enableval="$enable_nls"
4726   :
4727 else
4728   enable_nls=yes
4729 fi
4730
4731
4732 # if cross compiling, disable NLS support.
4733 # It's not worth the trouble, at least for now.
4734
4735 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4736   echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4737   enable_nls=no
4738 fi
4739
4740 # if NLS is enabled, also enable check in po subdir
4741 if test $enable_nls = yes; then
4742   CHECK_PO=check-po
4743 else
4744   CHECK_PO=""
4745 fi
4746
4747
4748
4749
4750         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4751 echo "configure:4752: checking for strerror in -lcposix" >&5
4752 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756   ac_save_LIBS="$LIBS"
4757 LIBS="-lcposix  $LIBS"
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 /* Override any gcc2 internal prototype to avoid an error.  */
4762 /* We use char because int might match the return type of a gcc2
4763     builtin and then its argument prototype would still apply.  */
4764 char strerror();
4765
4766 int main() {
4767 strerror()
4768 ; return 0; }
4769 EOF
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4771   rm -rf conftest*
4772   eval "ac_cv_lib_$ac_lib_var=yes"
4773 else
4774   echo "configure: failed program was:" >&5
4775   cat conftest.$ac_ext >&5
4776   rm -rf conftest*
4777   eval "ac_cv_lib_$ac_lib_var=no"
4778 fi
4779 rm -f conftest*
4780 LIBS="$ac_save_LIBS"
4781
4782 fi
4783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785   LIBS="$LIBS -lcposix"
4786 else
4787   echo "$ac_t""no" 1>&6
4788 fi
4789
4790   
4791
4792 echo $ac_n "checking for working const""... $ac_c" 1>&6
4793 echo "configure:4794: checking for working const" >&5
4794 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800
4801 int main() {
4802
4803 /* Ultrix mips cc rejects this.  */
4804 typedef int charset[2]; const charset x;
4805 /* SunOS 4.1.1 cc rejects this.  */
4806 char const *const *ccp;
4807 char **p;
4808 /* NEC SVR4.0.2 mips cc rejects this.  */
4809 struct point {int x, y;};
4810 static struct point const zero = {0,0};
4811 /* AIX XL C 1.02.0.0 rejects this.
4812    It does not let you subtract one const X* pointer from another in an arm
4813    of an if-expression whose if-part is not a constant expression */
4814 const char *g = "string";
4815 ccp = &g + (g ? g-g : 0);
4816 /* HPUX 7.0 cc rejects these. */
4817 ++ccp;
4818 p = (char**) ccp;
4819 ccp = (char const *const *) p;
4820 { /* SCO 3.2v4 cc rejects this.  */
4821   char *t;
4822   char const *s = 0 ? (char *) 0 : (char const *) 0;
4823
4824   *t++ = 0;
4825 }
4826 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4827   int x[] = {25, 17};
4828   const int *foo = &x[0];
4829   ++foo;
4830 }
4831 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4832   typedef const int *iptr;
4833   iptr p = 0;
4834   ++p;
4835 }
4836 { /* AIX XL C 1.02.0.0 rejects this saying
4837      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4838   struct s { int j; const int *ap[3]; };
4839   struct s *b; b->j = 5;
4840 }
4841 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4842   const int foo = 10;
4843 }
4844
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4848   rm -rf conftest*
4849   ac_cv_c_const=yes
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   ac_cv_c_const=no
4855 fi
4856 rm -f conftest*
4857 fi
4858
4859 echo "$ac_t""$ac_cv_c_const" 1>&6
4860 if test $ac_cv_c_const = no; then
4861   cat >> confdefs.h <<\EOF
4862 #define const 
4863 EOF
4864
4865 fi
4866
4867 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4868 echo "configure:4869: checking for off_t" >&5
4869 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 #include <sys/types.h>
4876 #if STDC_HEADERS
4877 #include <stdlib.h>
4878 #include <stddef.h>
4879 #endif
4880 EOF
4881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4882   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4883   rm -rf conftest*
4884   ac_cv_type_off_t=yes
4885 else
4886   rm -rf conftest*
4887   ac_cv_type_off_t=no
4888 fi
4889 rm -f conftest*
4890
4891 fi
4892 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4893 if test $ac_cv_type_off_t = no; then
4894   cat >> confdefs.h <<\EOF
4895 #define off_t long
4896 EOF
4897
4898 fi
4899
4900 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4901 echo "configure:4902: checking for size_t" >&5
4902 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 #include <sys/types.h>
4909 #if STDC_HEADERS
4910 #include <stdlib.h>
4911 #include <stddef.h>
4912 #endif
4913 EOF
4914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4915   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4916   rm -rf conftest*
4917   ac_cv_type_size_t=yes
4918 else
4919   rm -rf conftest*
4920   ac_cv_type_size_t=no
4921 fi
4922 rm -f conftest*
4923
4924 fi
4925 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4926 if test $ac_cv_type_size_t = no; then
4927   cat >> confdefs.h <<\EOF
4928 #define size_t unsigned
4929 EOF
4930
4931 fi
4932
4933                         
4934    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4935 unistd.h sys/param.h
4936 do
4937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4939 echo "configure:4940: checking for $ac_hdr" >&5
4940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 #include <$ac_hdr>
4947 EOF
4948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4949 { (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4951 if test -z "$ac_err"; then
4952   rm -rf conftest*
4953   eval "ac_cv_header_$ac_safe=yes"
4954 else
4955   echo "$ac_err" >&5
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_header_$ac_safe=no"
4960 fi
4961 rm -f conftest*
4962 fi
4963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4964   echo "$ac_t""yes" 1>&6
4965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4966   cat >> confdefs.h <<EOF
4967 #define $ac_tr_hdr 1
4968 EOF
4969  
4970 else
4971   echo "$ac_t""no" 1>&6
4972 fi
4973 done
4974
4975    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4976 strdup __argz_count __argz_stringify __argz_next
4977 do
4978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4979 echo "configure:4980: checking for $ac_func" >&5
4980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4981   echo $ac_n "(cached) $ac_c" 1>&6
4982 else
4983   cat > conftest.$ac_ext <<EOF
4984 #line 4985 "configure"
4985 #include "confdefs.h"
4986 /* System header to define __stub macros and hopefully few prototypes,
4987     which can conflict with char $ac_func(); below.  */
4988 #include <assert.h>
4989 /* Override any gcc2 internal prototype to avoid an error.  */
4990 /* We use char because int might match the return type of a gcc2
4991     builtin and then its argument prototype would still apply.  */
4992 char $ac_func();
4993
4994 int main() {
4995
4996 /* The GNU C library defines this for functions which it implements
4997     to always fail with ENOSYS.  Some functions are actually named
4998     something starting with __ and the normal name is an alias.  */
4999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5000 choke me
5001 #else
5002 $ac_func();
5003 #endif
5004
5005 ; return 0; }
5006 EOF
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5008   rm -rf conftest*
5009   eval "ac_cv_func_$ac_func=yes"
5010 else
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -rf conftest*
5014   eval "ac_cv_func_$ac_func=no"
5015 fi
5016 rm -f conftest*
5017 fi
5018
5019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5020   echo "$ac_t""yes" 1>&6
5021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5022   cat >> confdefs.h <<EOF
5023 #define $ac_tr_func 1
5024 EOF
5025  
5026 else
5027   echo "$ac_t""no" 1>&6
5028 fi
5029 done
5030
5031
5032    if test "${ac_cv_func_stpcpy+set}" != "set"; then
5033      for ac_func in stpcpy
5034 do
5035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5036 echo "configure:5037: checking for $ac_func" >&5
5037 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040   cat > conftest.$ac_ext <<EOF
5041 #line 5042 "configure"
5042 #include "confdefs.h"
5043 /* System header to define __stub macros and hopefully few prototypes,
5044     which can conflict with char $ac_func(); below.  */
5045 #include <assert.h>
5046 /* Override any gcc2 internal prototype to avoid an error.  */
5047 /* We use char because int might match the return type of a gcc2
5048     builtin and then its argument prototype would still apply.  */
5049 char $ac_func();
5050
5051 int main() {
5052
5053 /* The GNU C library defines this for functions which it implements
5054     to always fail with ENOSYS.  Some functions are actually named
5055     something starting with __ and the normal name is an alias.  */
5056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5057 choke me
5058 #else
5059 $ac_func();
5060 #endif
5061
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065   rm -rf conftest*
5066   eval "ac_cv_func_$ac_func=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_func_$ac_func=no"
5072 fi
5073 rm -f conftest*
5074 fi
5075
5076 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5077   echo "$ac_t""yes" 1>&6
5078     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5079   cat >> confdefs.h <<EOF
5080 #define $ac_tr_func 1
5081 EOF
5082  
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086 done
5087
5088    fi
5089    if test "${ac_cv_func_stpcpy}" = "yes"; then
5090      cat >> confdefs.h <<\EOF
5091 #define HAVE_STPCPY 1
5092 EOF
5093
5094    fi
5095
5096    if test $ac_cv_header_locale_h = yes; then
5097     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5098 echo "configure:5099: checking for LC_MESSAGES" >&5
5099 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5100   echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102   cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105 #include <locale.h>
5106 int main() {
5107 return LC_MESSAGES
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   am_cv_val_LC_MESSAGES=yes
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   am_cv_val_LC_MESSAGES=no
5118 fi
5119 rm -f conftest*
5120 fi
5121
5122 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5123     if test $am_cv_val_LC_MESSAGES = yes; then
5124       cat >> confdefs.h <<\EOF
5125 #define HAVE_LC_MESSAGES 1
5126 EOF
5127
5128     fi
5129   fi
5130    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5131 echo "configure:5132: checking whether NLS is requested" >&5
5132         # Check whether --enable-nls or --disable-nls was given.
5133 if test "${enable_nls+set}" = set; then
5134   enableval="$enable_nls"
5135   USE_NLS=$enableval
5136 else
5137   USE_NLS=yes
5138 fi
5139
5140     echo "$ac_t""$USE_NLS" 1>&6
5141     
5142
5143     USE_INCLUDED_LIBINTL=no
5144
5145         if test "$USE_NLS" = "yes"; then
5146       cat >> confdefs.h <<\EOF
5147 #define ENABLE_NLS 1
5148 EOF
5149
5150       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5151 echo "configure:5152: checking whether included gettext is requested" >&5
5152       # Check whether --with-included-gettext or --without-included-gettext was given.
5153 if test "${with_included_gettext+set}" = set; then
5154   withval="$with_included_gettext"
5155   nls_cv_force_use_gnu_gettext=$withval
5156 else
5157   nls_cv_force_use_gnu_gettext=no
5158 fi
5159
5160       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5161
5162       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5163       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5164                                         nls_cv_header_intl=
5165         nls_cv_header_libgt=
5166         CATOBJEXT=NONE
5167
5168         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5169 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5170 echo "configure:5171: checking for libintl.h" >&5
5171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174   cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5177 #include <libintl.h>
5178 EOF
5179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5180 { (eval echo configure:5181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5182 if test -z "$ac_err"; then
5183   rm -rf conftest*
5184   eval "ac_cv_header_$ac_safe=yes"
5185 else
5186   echo "$ac_err" >&5
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -rf conftest*
5190   eval "ac_cv_header_$ac_safe=no"
5191 fi
5192 rm -f conftest*
5193 fi
5194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5195   echo "$ac_t""yes" 1>&6
5196   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5197 echo "configure:5198: checking for gettext in libc" >&5
5198 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
5199   echo $ac_n "(cached) $ac_c" 1>&6
5200 else
5201   cat > conftest.$ac_ext <<EOF
5202 #line 5203 "configure"
5203 #include "confdefs.h"
5204 #include <libintl.h>
5205 int main() {
5206 return (int) gettext ("")
5207 ; return 0; }
5208 EOF
5209 if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210   rm -rf conftest*
5211   gt_cv_func_gettext_libc=yes
5212 else
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   gt_cv_func_gettext_libc=no
5217 fi
5218 rm -f conftest*
5219 fi
5220
5221 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
5222
5223            if test "$gt_cv_func_gettext_libc" != "yes"; then
5224              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5225 echo "configure:5226: checking for bindtextdomain in -lintl" >&5
5226 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230   ac_save_LIBS="$LIBS"
5231 LIBS="-lintl  $LIBS"
5232 cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 /* Override any gcc2 internal prototype to avoid an error.  */
5236 /* We use char because int might match the return type of a gcc2
5237     builtin and then its argument prototype would still apply.  */
5238 char bindtextdomain();
5239
5240 int main() {
5241 bindtextdomain()
5242 ; return 0; }
5243 EOF
5244 if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=yes"
5247 else
5248   echo "configure: failed program was:" >&5
5249   cat conftest.$ac_ext >&5
5250   rm -rf conftest*
5251   eval "ac_cv_lib_$ac_lib_var=no"
5252 fi
5253 rm -f conftest*
5254 LIBS="$ac_save_LIBS"
5255
5256 fi
5257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5260 echo "configure:5261: checking for gettext in libintl" >&5
5261 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
5265 echo "configure:5266: checking for gettext in -lintl" >&5
5266 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270   ac_save_LIBS="$LIBS"
5271 LIBS="-lintl  $LIBS"
5272 cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5275 /* Override any gcc2 internal prototype to avoid an error.  */
5276 /* We use char because int might match the return type of a gcc2
5277     builtin and then its argument prototype would still apply.  */
5278 char gettext();
5279
5280 int main() {
5281 gettext()
5282 ; return 0; }
5283 EOF
5284 if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5285   rm -rf conftest*
5286   eval "ac_cv_lib_$ac_lib_var=yes"
5287 else
5288   echo "configure: failed program was:" >&5
5289   cat conftest.$ac_ext >&5
5290   rm -rf conftest*
5291   eval "ac_cv_lib_$ac_lib_var=no"
5292 fi
5293 rm -f conftest*
5294 LIBS="$ac_save_LIBS"
5295
5296 fi
5297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5298   echo "$ac_t""yes" 1>&6
5299   gt_cv_func_gettext_libintl=yes
5300 else
5301   echo "$ac_t""no" 1>&6
5302 gt_cv_func_gettext_libintl=no
5303 fi
5304
5305 fi
5306
5307 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5308 else
5309   echo "$ac_t""no" 1>&6
5310 fi
5311
5312            fi
5313
5314            if test "$gt_cv_func_gettext_libintl" = "yes"; then
5315              LIBS="-lintl $LIBS"
5316            fi
5317
5318            if test "$gt_cv_func_gettext_libc" = "yes" \
5319               || test "$gt_cv_func_gettext_libintl" = "yes"; then
5320               cat >> confdefs.h <<\EOF
5321 #define HAVE_GETTEXT 1
5322 EOF
5323
5324               # Extract the first word of "msgfmt", so it can be a program name with args.
5325 set dummy msgfmt; ac_word=$2
5326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5327 echo "configure:5328: checking for $ac_word" >&5
5328 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331   case "$MSGFMT" in
5332   /*)
5333   gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5334   ;;
5335   *)
5336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5337   for ac_dir in $PATH; do
5338     test -z "$ac_dir" && ac_dir=.
5339     if test -f $ac_dir/$ac_word; then
5340       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5341         gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5342         break
5343       fi
5344     fi
5345   done
5346   IFS="$ac_save_ifs"
5347   test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
5348   ;;
5349 esac
5350 fi
5351 MSGFMT="$gcc_cv_path_MSGFMT"
5352 if test -n "$MSGFMT"; then
5353   echo "$ac_t""$MSGFMT" 1>&6
5354 else
5355   echo "$ac_t""no" 1>&6
5356 fi
5357               if test "$MSGFMT" != "no"; then
5358                 for ac_func in dcgettext
5359 do
5360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5361 echo "configure:5362: checking for $ac_func" >&5
5362 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5363   echo $ac_n "(cached) $ac_c" 1>&6
5364 else
5365   cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* System header to define __stub macros and hopefully few prototypes,
5369     which can conflict with char $ac_func(); below.  */
5370 #include <assert.h>
5371 /* Override any gcc2 internal prototype to avoid an error.  */
5372 /* We use char because int might match the return type of a gcc2
5373     builtin and then its argument prototype would still apply.  */
5374 char $ac_func();
5375
5376 int main() {
5377
5378 /* The GNU C library defines this for functions which it implements
5379     to always fail with ENOSYS.  Some functions are actually named
5380     something starting with __ and the normal name is an alias.  */
5381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5382 choke me
5383 #else
5384 $ac_func();
5385 #endif
5386
5387 ; return 0; }
5388 EOF
5389 if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5390   rm -rf conftest*
5391   eval "ac_cv_func_$ac_func=yes"
5392 else
5393   echo "configure: failed program was:" >&5
5394   cat conftest.$ac_ext >&5
5395   rm -rf conftest*
5396   eval "ac_cv_func_$ac_func=no"
5397 fi
5398 rm -f conftest*
5399 fi
5400
5401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5402   echo "$ac_t""yes" 1>&6
5403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5404   cat >> confdefs.h <<EOF
5405 #define $ac_tr_func 1
5406 EOF
5407  
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411 done
5412
5413                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5414 set dummy gmsgfmt; ac_word=$2
5415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5416 echo "configure:5417: checking for $ac_word" >&5
5417 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5418   echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5420   case "$GMSGFMT" in
5421   /*)
5422   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5423   ;;
5424   ?:/*)                  
5425   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5426   ;;
5427   *)
5428   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5429   ac_dummy="$PATH"
5430   for ac_dir in $ac_dummy; do 
5431     test -z "$ac_dir" && ac_dir=.
5432     if test -f $ac_dir/$ac_word; then
5433       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5434       break
5435     fi
5436   done
5437   IFS="$ac_save_ifs"
5438   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5439   ;;
5440 esac
5441 fi
5442 GMSGFMT="$gcc_cv_path_GMSGFMT"
5443 if test -n "$GMSGFMT"; then
5444   echo "$ac_t""$GMSGFMT" 1>&6
5445 else
5446   echo "$ac_t""no" 1>&6
5447 fi
5448
5449                 # Extract the first word of "xgettext", so it can be a program name with args.
5450 set dummy xgettext; ac_word=$2
5451 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5452 echo "configure:5453: checking for $ac_word" >&5
5453 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5454   echo $ac_n "(cached) $ac_c" 1>&6
5455 else
5456   case "$XGETTEXT" in
5457   /*)
5458   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5459   ;;
5460   *)
5461   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5462   for ac_dir in $PATH; do
5463     test -z "$ac_dir" && ac_dir=.
5464     if test -f $ac_dir/$ac_word; then
5465       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5466         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5467         break
5468       fi
5469     fi
5470   done
5471   IFS="$ac_save_ifs"
5472   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5473   ;;
5474 esac
5475 fi
5476 XGETTEXT="$gcc_cv_path_XGETTEXT"
5477 if test -n "$XGETTEXT"; then
5478   echo "$ac_t""$XGETTEXT" 1>&6
5479 else
5480   echo "$ac_t""no" 1>&6
5481 fi
5482
5483                 cat > conftest.$ac_ext <<EOF
5484 #line 5485 "configure"
5485 #include "confdefs.h"
5486
5487 int main() {
5488 extern int _nl_msg_cat_cntr;
5489                                return _nl_msg_cat_cntr
5490 ; return 0; }
5491 EOF
5492 if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5493   rm -rf conftest*
5494   CATOBJEXT=.gmo
5495                    DATADIRNAME=share
5496 else
5497   echo "configure: failed program was:" >&5
5498   cat conftest.$ac_ext >&5
5499   rm -rf conftest*
5500   CATOBJEXT=.mo
5501                    DATADIRNAME=lib
5502 fi
5503 rm -f conftest*
5504                 INSTOBJEXT=.mo
5505               else
5506                 create_catalogs="no"
5507               fi
5508             fi
5509         
5510 else
5511   echo "$ac_t""no" 1>&6
5512 fi
5513
5514
5515         if test "$CATOBJEXT" = "NONE"; then
5516           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
5517 echo "configure:5518: checking whether catgets can be used" >&5
5518           # Check whether --with-catgets or --without-catgets was given.
5519 if test "${with_catgets+set}" = set; then
5520   withval="$with_catgets"
5521   nls_cv_use_catgets=$withval
5522 else
5523   nls_cv_use_catgets=no
5524 fi
5525
5526           echo "$ac_t""$nls_cv_use_catgets" 1>&6
5527
5528           if test "$nls_cv_use_catgets" = "yes"; then
5529                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
5530 echo "configure:5531: checking for main in -li" >&5
5531 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5532 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5533   echo $ac_n "(cached) $ac_c" 1>&6
5534 else
5535   ac_save_LIBS="$LIBS"
5536 LIBS="-li  $LIBS"
5537 cat > conftest.$ac_ext <<EOF
5538 #line 5539 "configure"
5539 #include "confdefs.h"
5540
5541 int main() {
5542 main()
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_lib_$ac_lib_var=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=no"
5553 fi
5554 rm -f conftest*
5555 LIBS="$ac_save_LIBS"
5556
5557 fi
5558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5559   echo "$ac_t""yes" 1>&6
5560     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5561     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5562   cat >> confdefs.h <<EOF
5563 #define $ac_tr_lib 1
5564 EOF
5565
5566   LIBS="-li $LIBS"
5567
5568 else
5569   echo "$ac_t""no" 1>&6
5570 fi
5571
5572             echo $ac_n "checking for catgets""... $ac_c" 1>&6
5573 echo "configure:5574: checking for catgets" >&5
5574 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   cat > conftest.$ac_ext <<EOF
5578 #line 5579 "configure"
5579 #include "confdefs.h"
5580 /* System header to define __stub macros and hopefully few prototypes,
5581     which can conflict with char catgets(); below.  */
5582 #include <assert.h>
5583 /* Override any gcc2 internal prototype to avoid an error.  */
5584 /* We use char because int might match the return type of a gcc2
5585     builtin and then its argument prototype would still apply.  */
5586 char catgets();
5587
5588 int main() {
5589
5590 /* The GNU C library defines this for functions which it implements
5591     to always fail with ENOSYS.  Some functions are actually named
5592     something starting with __ and the normal name is an alias.  */
5593 #if defined (__stub_catgets) || defined (__stub___catgets)
5594 choke me
5595 #else
5596 catgets();
5597 #endif
5598
5599 ; return 0; }
5600 EOF
5601 if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5602   rm -rf conftest*
5603   eval "ac_cv_func_catgets=yes"
5604 else
5605   echo "configure: failed program was:" >&5
5606   cat conftest.$ac_ext >&5
5607   rm -rf conftest*
5608   eval "ac_cv_func_catgets=no"
5609 fi
5610 rm -f conftest*
5611 fi
5612
5613 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5614   echo "$ac_t""yes" 1>&6
5615   cat >> confdefs.h <<\EOF
5616 #define HAVE_CATGETS 1
5617 EOF
5618
5619                INTLOBJS="\$(CATOBJS)"
5620                # Extract the first word of "gencat", so it can be a program name with args.
5621 set dummy gencat; ac_word=$2
5622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5623 echo "configure:5624: checking for $ac_word" >&5
5624 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5625   echo $ac_n "(cached) $ac_c" 1>&6
5626 else
5627   case "$GENCAT" in
5628   /*)
5629   gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5630   ;;
5631   ?:/*)                  
5632   gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5633   ;;
5634   *)
5635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5636   ac_dummy="$PATH"
5637   for ac_dir in $ac_dummy; do 
5638     test -z "$ac_dir" && ac_dir=.
5639     if test -f $ac_dir/$ac_word; then
5640       gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5641       break
5642     fi
5643   done
5644   IFS="$ac_save_ifs"
5645   test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5646   ;;
5647 esac
5648 fi
5649 GENCAT="$gcc_cv_path_GENCAT"
5650 if test -n "$GENCAT"; then
5651   echo "$ac_t""$GENCAT" 1>&6
5652 else
5653   echo "$ac_t""no" 1>&6
5654 fi
5655                if test "$GENCAT" != "no"; then
5656                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
5657 set dummy gmsgfmt; ac_word=$2
5658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5659 echo "configure:5660: checking for $ac_word" >&5
5660 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5661   echo $ac_n "(cached) $ac_c" 1>&6
5662 else
5663   case "$GMSGFMT" in
5664   /*)
5665   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5666   ;;
5667   ?:/*)                  
5668   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5669   ;;
5670   *)
5671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5672   ac_dummy="$PATH"
5673   for ac_dir in $ac_dummy; do 
5674     test -z "$ac_dir" && ac_dir=.
5675     if test -f $ac_dir/$ac_word; then
5676       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5677       break
5678     fi
5679   done
5680   IFS="$ac_save_ifs"
5681   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5682   ;;
5683 esac
5684 fi
5685 GMSGFMT="$gcc_cv_path_GMSGFMT"
5686 if test -n "$GMSGFMT"; then
5687   echo "$ac_t""$GMSGFMT" 1>&6
5688 else
5689   echo "$ac_t""no" 1>&6
5690 fi
5691
5692                  if test "$GMSGFMT" = "no"; then
5693                    # Extract the first word of "msgfmt", so it can be a program name with args.
5694 set dummy msgfmt; ac_word=$2
5695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5696 echo "configure:5697: checking for $ac_word" >&5
5697 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5698   echo $ac_n "(cached) $ac_c" 1>&6
5699 else
5700   case "$GMSGFMT" in
5701   /*)
5702   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5703   ;;
5704   *)
5705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5706   for ac_dir in $PATH; do
5707     test -z "$ac_dir" && ac_dir=.
5708     if test -f $ac_dir/$ac_word; then
5709       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5710         gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5711         break
5712       fi
5713     fi
5714   done
5715   IFS="$ac_save_ifs"
5716   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5717   ;;
5718 esac
5719 fi
5720 GMSGFMT="$gcc_cv_path_GMSGFMT"
5721 if test -n "$GMSGFMT"; then
5722   echo "$ac_t""$GMSGFMT" 1>&6
5723 else
5724   echo "$ac_t""no" 1>&6
5725 fi
5726
5727                    if test "$GMSGFMT" = "msgfmt"; then
5728                      create_catalogs="no"
5729                    fi
5730                  fi
5731                  # Extract the first word of "xgettext", so it can be a program name with args.
5732 set dummy xgettext; ac_word=$2
5733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5734 echo "configure:5735: checking for $ac_word" >&5
5735 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5736   echo $ac_n "(cached) $ac_c" 1>&6
5737 else
5738   case "$XGETTEXT" in
5739   /*)
5740   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5741   ;;
5742   *)
5743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5744   for ac_dir in $PATH; do
5745     test -z "$ac_dir" && ac_dir=.
5746     if test -f $ac_dir/$ac_word; then
5747       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5748         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5749         break
5750       fi
5751     fi
5752   done
5753   IFS="$ac_save_ifs"
5754   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5755   ;;
5756 esac
5757 fi
5758 XGETTEXT="$gcc_cv_path_XGETTEXT"
5759 if test -n "$XGETTEXT"; then
5760   echo "$ac_t""$XGETTEXT" 1>&6
5761 else
5762   echo "$ac_t""no" 1>&6
5763 fi
5764
5765                  USE_INCLUDED_LIBINTL=yes
5766                  CATOBJEXT=.cat
5767                  INSTOBJEXT=.cat
5768                  DATADIRNAME=lib
5769                  INTLDEPS='$(top_builddir)/intl/libintl.a'
5770                  INTLLIBS=$INTLDEPS
5771                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5772                  nls_cv_header_intl=intl/libintl.h
5773                  nls_cv_header_libgt=intl/libgettext.h
5774                fi
5775 else
5776   echo "$ac_t""no" 1>&6
5777 fi
5778
5779           fi
5780         fi
5781
5782         if test "$CATOBJEXT" = "NONE"; then
5783                           nls_cv_use_gnu_gettext=yes
5784         fi
5785       fi
5786
5787       if test "$nls_cv_use_gnu_gettext" = "yes"; then
5788                 INTLOBJS="\$(GETTOBJS)"
5789         # Extract the first word of "msgfmt", so it can be a program name with args.
5790 set dummy msgfmt; ac_word=$2
5791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5792 echo "configure:5793: checking for $ac_word" >&5
5793 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5794   echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796   case "$MSGFMT" in
5797   /*)
5798   gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5799   ;;
5800   *)
5801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5802   for ac_dir in $PATH; do
5803     test -z "$ac_dir" && ac_dir=.
5804     if test -f $ac_dir/$ac_word; then
5805       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5806         gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5807         break
5808       fi
5809     fi
5810   done
5811   IFS="$ac_save_ifs"
5812   test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5813   ;;
5814 esac
5815 fi
5816 MSGFMT="$gcc_cv_path_MSGFMT"
5817 if test -n "$MSGFMT"; then
5818   echo "$ac_t""$MSGFMT" 1>&6
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822
5823         # Extract the first word of "gmsgfmt", so it can be a program name with args.
5824 set dummy gmsgfmt; ac_word=$2
5825 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5826 echo "configure:5827: checking for $ac_word" >&5
5827 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5828   echo $ac_n "(cached) $ac_c" 1>&6
5829 else
5830   case "$GMSGFMT" in
5831   /*)
5832   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5833   ;;
5834   ?:/*)                  
5835   gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5836   ;;
5837   *)
5838   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5839   ac_dummy="$PATH"
5840   for ac_dir in $ac_dummy; do 
5841     test -z "$ac_dir" && ac_dir=.
5842     if test -f $ac_dir/$ac_word; then
5843       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5844       break
5845     fi
5846   done
5847   IFS="$ac_save_ifs"
5848   test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5849   ;;
5850 esac
5851 fi
5852 GMSGFMT="$gcc_cv_path_GMSGFMT"
5853 if test -n "$GMSGFMT"; then
5854   echo "$ac_t""$GMSGFMT" 1>&6
5855 else
5856   echo "$ac_t""no" 1>&6
5857 fi
5858
5859                         if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5860           create_catalogs="no"
5861         fi
5862         # Extract the first word of "xgettext", so it can be a program name with args.
5863 set dummy xgettext; ac_word=$2
5864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5865 echo "configure:5866: checking for $ac_word" >&5
5866 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5867   echo $ac_n "(cached) $ac_c" 1>&6
5868 else
5869   case "$XGETTEXT" in
5870   /*)
5871   gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5872   ;;
5873   *)
5874   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5875   for ac_dir in $PATH; do
5876     test -z "$ac_dir" && ac_dir=.
5877     if test -f $ac_dir/$ac_word; then
5878       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5879         gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5880         break
5881       fi
5882     fi
5883   done
5884   IFS="$ac_save_ifs"
5885   test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5886   ;;
5887 esac
5888 fi
5889 XGETTEXT="$gcc_cv_path_XGETTEXT"
5890 if test -n "$XGETTEXT"; then
5891   echo "$ac_t""$XGETTEXT" 1>&6
5892 else
5893   echo "$ac_t""no" 1>&6
5894 fi
5895
5896         
5897         USE_INCLUDED_LIBINTL=yes
5898         CATOBJEXT=.gmo
5899         INSTOBJEXT=.mo
5900         DATADIRNAME=share
5901         INTLDEPS='$(top_builddir)/intl/libintl.a'
5902         INTLLIBS=$INTLDEPS
5903         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5904         nls_cv_header_intl=intl/libintl.h
5905         nls_cv_header_libgt=intl/libgettext.h
5906       fi
5907
5908             if test "$XGETTEXT" != ":"; then
5909                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5910           : ;
5911         else
5912           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5913           XGETTEXT=":"
5914         fi
5915       fi
5916
5917
5918
5919       # We need to process the po/ directory.
5920       POSUB=po
5921     else
5922       DATADIRNAME=share
5923       nls_cv_header_intl=intl/libintl.h
5924       nls_cv_header_libgt=intl/libgettext.h
5925     fi
5926     
5927     
5928
5929
5930     # If this is used in GNU gettext we have to set USE_NLS to `yes'
5931     # because some of the sources are only built for this goal.
5932     if test "$PACKAGE" = gettext; then
5933       USE_NLS=yes
5934       USE_INCLUDED_LIBINTL=yes
5935     fi
5936
5937                 for lang in $ALL_LINGUAS; do
5938       GMOFILES="$GMOFILES $lang.gmo"
5939       POFILES="$POFILES $lang.po"
5940     done
5941
5942         
5943     
5944     
5945     
5946     
5947     
5948     
5949     
5950     
5951     
5952     
5953   
5954
5955    if test "x$create_catalogs" = "xno"; then
5956      echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5957    fi
5958
5959    if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
5960      if test "x$ALL_LINGUAS" = "x"; then
5961        LINGUAS=
5962      else
5963        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5964 echo "configure:5965: checking for catalogs to be installed" >&5
5965        if test "x$LINGUAS" = "x"; then
5966          LINGUAS=$ALL_LINGUAS
5967        else
5968          NEW_LINGUAS=
5969          for lang in $ALL_LINGUAS; do
5970            case " $LINGUAS " in
5971              *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5972            esac
5973          done
5974          LINGUAS=$NEW_LINGUAS
5975        fi
5976        echo "$ac_t""$LINGUAS" 1>&6
5977      fi
5978
5979           if test -n "$LINGUAS"; then
5980        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5981      fi
5982    fi
5983
5984             if test $ac_cv_header_locale_h = yes; then
5985      INCLUDE_LOCALE_H="#include <locale.h>"
5986    else
5987      INCLUDE_LOCALE_H="\
5988 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
5989    fi
5990    
5991
5992             test -d intl || mkdir intl
5993    if test "$CATOBJEXT" = ".cat"; then
5994      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5995 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5996 echo "configure:5997: checking for linux/version.h" >&5
5997 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 #include <linux/version.h>
6004 EOF
6005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6006 { (eval echo configure:6007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6008 if test -z "$ac_err"; then
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=yes"
6011 else
6012   echo "$ac_err" >&5
6013   echo "configure: failed program was:" >&5
6014   cat conftest.$ac_ext >&5
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=no"
6017 fi
6018 rm -f conftest*
6019 fi
6020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6021   echo "$ac_t""yes" 1>&6
6022   msgformat=linux
6023 else
6024   echo "$ac_t""no" 1>&6
6025 msgformat=xopen
6026 fi
6027
6028
6029                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
6030    fi
6031       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
6032      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
6033
6034             if test "$PACKAGE" = "gettext"; then
6035      GT_NO="#NO#"
6036      GT_YES=
6037    else
6038      GT_NO=
6039      GT_YES="#YES#"
6040    fi
6041    
6042    
6043
6044             MKINSTALLDIRS=
6045    if test -n "$ac_aux_dir"; then
6046      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6047    fi
6048    if test -z "$MKINSTALLDIRS"; then
6049      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6050    fi
6051    
6052
6053       l=
6054    
6055
6056          test -d po || mkdir po
6057    if test "x$srcdir" != "x."; then
6058      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
6059        posrcprefix="$srcdir/"
6060      else
6061        posrcprefix="../$srcdir/"
6062      fi
6063    else
6064      posrcprefix="../"
6065    fi
6066    rm -f po/POTFILES
6067    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
6068         < $srcdir/po/POTFILES.in > po/POTFILES
6069   
6070 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
6071
6072 # Windows32 Registry support for specifying GCC installation paths.
6073 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6074 if test "${enable_win32_registry+set}" = set; then
6075   enableval="$enable_win32_registry"
6076   :
6077 fi
6078
6079
6080 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6081 echo "configure:6082: checking whether windows registry support is requested" >&5
6082 if test x$enable_win32_registry != xno; then
6083   cat >> confdefs.h <<\EOF
6084 #define ENABLE_WIN32_REGISTRY 1
6085 EOF
6086
6087   echo "$ac_t""yes" 1>&6
6088 else
6089   echo "$ac_t""no" 1>&6
6090 fi
6091
6092 # Check if user specified a different registry key.
6093 case x${enable_win32_registry} in
6094 x | xyes)
6095   # default.
6096   gcc_cv_win32_registry_key="$VERSION"
6097   ;;
6098 xno)
6099   # no registry lookup.
6100   gcc_cv_win32_registry_key=''
6101   ;;
6102 *)
6103   # user-specified key.
6104   gcc_cv_win32_registry_key="$enable_win32_registry"
6105   ;;
6106 esac
6107
6108 if test x$enable_win32_registry != xno; then
6109   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6110 echo "configure:6111: checking registry key on windows hosts" >&5
6111   cat >> confdefs.h <<EOF
6112 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6113 EOF
6114
6115   echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6116 fi
6117
6118 # Get an absolute path to the GCC top-level source directory
6119 holddir=`pwd`
6120 cd $srcdir
6121 topdir=`pwd`
6122 cd $holddir
6123
6124 # Conditionalize the makefile for this host machine.
6125 # Make-host contains the concatenation of all host makefile fragments
6126 # [there can be more than one].  This file is built by configure.frag.
6127 host_overrides=Make-host
6128 dep_host_xmake_file=
6129 for f in .. ${host_xmake_file}
6130 do
6131         if test -f ${srcdir}/config/$f
6132         then
6133                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6134         fi
6135 done
6136
6137 # Conditionalize the makefile for this target machine.
6138 # Make-target contains the concatenation of all host makefile fragments
6139 # [there can be more than one].  This file is built by configure.frag.
6140 target_overrides=Make-target
6141 dep_tmake_file=
6142 for f in .. ${tmake_file}
6143 do
6144         if test -f ${srcdir}/config/$f
6145         then
6146                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6147         fi
6148 done
6149
6150 # If the host doesn't support symlinks, modify CC in
6151 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6152 # Otherwise, we can use "CC=$(CC)".
6153 rm -f symtest.tem
6154 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6155 then
6156         cc_set_by_configure="\$(CC)"
6157         quoted_cc_set_by_configure="\$(CC)"
6158         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6159 else
6160         rm -f symtest.tem
6161         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6162         then
6163                 symbolic_link="cp -p"
6164         else
6165                 symbolic_link="cp"
6166         fi
6167         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6168         quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6169         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6170 fi
6171 rm -f symtest.tem
6172
6173 out_object_file=`basename $out_file .c`.o
6174
6175 tm_file_list=
6176 for f in $tm_file; do
6177   case $f in
6178     gansidecl.h | defaults.h )
6179        tm_file_list="${tm_file_list} $f" ;;
6180     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6181   esac
6182 done
6183
6184 tm_p_file_list=
6185 for f in $tm_p_file; do
6186     tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6187 done
6188
6189 host_xm_file_list=
6190 for f in $host_xm_file; do
6191   case $f in
6192     auto-host.h | gansidecl.h | defaults.h )
6193        host_xm_file_list="${host_xm_file_list} $f" ;;
6194     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6195   esac
6196 done
6197
6198 build_xm_file_list=
6199 for f in $build_xm_file; do
6200   case $f in
6201     auto-build.h | auto-host.h | gansidecl.h | defaults.h )
6202        build_xm_file_list="${build_xm_file_list} $f" ;;
6203     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6204   esac
6205 done
6206
6207 # Define macro CROSS_COMPILE in compilation
6208 # if this is a cross-compiler.
6209 # Also use all.cross instead of all.internal
6210 # and add cross-make to Makefile.
6211 cross_overrides="/dev/null"
6212 if test x$host != x$target
6213 then
6214         cross_defines="CROSS=-DCROSS_COMPILE"
6215         cross_overrides="${topdir}/cross-make"
6216 fi
6217
6218 # If this is a cross-compiler that does not
6219 # have its own set of headers then define
6220 # inhibit_libc
6221
6222 # If this is using newlib, then define inhibit_libc in
6223 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
6224 # libgcc.a, but that's OK because newlib should have its own version of
6225 # assert.h.
6226 inhibit_libc=
6227 if test x$host != x$target && test x$with_headers = x; then
6228        inhibit_libc=-Dinhibit_libc
6229 else
6230        if test x$with_newlib = xyes; then
6231                inhibit_libc=-Dinhibit_libc
6232        fi
6233 fi
6234
6235
6236 # When building gcc with a cross-compiler, we need to fix a few things.
6237 # This must come after cross-make as we want all.build to override
6238 # all.cross.
6239 build_overrides="/dev/null"
6240 if test x$build != x$host
6241 then
6242         build_overrides="${topdir}/build-make"
6243 fi
6244
6245 # Expand extra_headers to include complete path.
6246 # This substitutes for lots of t-* files.
6247 extra_headers_list=
6248 if test "x$extra_headers" = x
6249 then true
6250 else
6251         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6252         for file in $extra_headers;
6253         do
6254                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6255         done
6256 fi
6257
6258 if test x$use_collect2 = xno; then
6259         use_collect2=
6260 fi
6261
6262 # Add a definition of USE_COLLECT2 if system wants one.
6263 # Also tell toplev.c what to do.
6264 # This substitutes for lots of t-* files.
6265 if test x$use_collect2 = x
6266 then
6267         will_use_collect2=
6268         maybe_use_collect2=
6269 else
6270         will_use_collect2="collect2"
6271         maybe_use_collect2="-DUSE_COLLECT2"
6272 fi
6273
6274 # If we have gas in the build tree, make a link to it.
6275 if test -f ../gas/Makefile; then
6276         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6277 fi
6278
6279 # If we have nm in the build tree, make a link to it.
6280 if test -f ../binutils/Makefile; then
6281         rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6282 fi
6283
6284 # If we have ld in the build tree, make a link to it.
6285 if test -f ../ld/Makefile; then
6286 #       if test x$use_collect2 = x; then
6287 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6288 #       else
6289                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6290 #       fi
6291 fi
6292
6293 # Figure out what assembler we will be using.
6294 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6295 echo "configure:6296: checking what assembler to use" >&5
6296 gcc_cv_as=
6297 gcc_cv_gas_major_version=
6298 gcc_cv_gas_minor_version=
6299 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6300 if test -x "$DEFAULT_ASSEMBLER"; then
6301         gcc_cv_as="$DEFAULT_ASSEMBLER"
6302 elif test -x "$AS"; then
6303         gcc_cv_as="$AS"
6304 elif test -x as$host_exeext; then
6305         # Build using assembler in the current directory.
6306         gcc_cv_as=./as$host_exeext
6307 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6308         # Single tree build which includes gas.
6309         for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6310         do
6311                 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6312                 if test x$gcc_cv_gas_version != x; then
6313                         break
6314                 fi
6315         done
6316         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6317         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6318 fi
6319
6320 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6321         # Native build.
6322         # Search the same directories that the installed compiler will
6323         # search.  Else we may find the wrong assembler and lose.  If we
6324         # do not find a suitable assembler binary, then try the user's
6325         # path.
6326         #
6327         # Also note we have to check MD_EXEC_PREFIX before checking the
6328         # user's path.  Unfortunately, there is no good way to get at the
6329         # value of MD_EXEC_PREFIX here.  So we do a brute force search
6330         # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
6331         # to be fixed as part of the make/configure rewrite too.
6332
6333         if test "x$exec_prefix" = xNONE; then
6334                 if test "x$prefix" = xNONE; then
6335                         test_prefix=/usr/local
6336                 else
6337                         test_prefix=$prefix
6338                 fi
6339         else
6340                 test_prefix=$exec_prefix
6341         fi
6342
6343         # If the loop below does not find an assembler, then use whatever
6344         # one we can find in the users's path.
6345         # user's path.
6346         gcc_cv_as=as$host_exeext
6347
6348         test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6349                    $test_prefix/lib/gcc-lib/$target \
6350                    /usr/lib/gcc/$target/$gcc_version \
6351                    /usr/lib/gcc/$target \
6352                    $test_prefix/$target/bin/$target/$gcc_version \
6353                    $test_prefix/$target/bin \
6354                    /usr/libexec \
6355                    /usr/ccs/gcc \
6356                    /usr/ccs/bin \
6357                    /udk/usr/ccs/bin \
6358                    /bsd43/usr/lib/cmplrs/cc \
6359                    /usr/cross64/usr/bin \
6360                    /usr/lib/cmplrs/cc \
6361                    /sysv/usr/lib/cmplrs/cc \
6362                    /svr4/usr/lib/cmplrs/cc \
6363                    /usr/bin"
6364
6365         for dir in $test_dirs; do
6366                 if test -f $dir/as$host_exeext; then
6367                         gcc_cv_as=$dir/as$host_exeext
6368                         break;
6369                 fi
6370         done
6371 fi
6372 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6373   echo "$ac_t"""newly built gas"" 1>&6
6374 else
6375   echo "$ac_t""$gcc_cv_as" 1>&6
6376 fi
6377
6378 # Figure out what nm we will be using.
6379 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6380 echo "configure:6381: checking what nm to use" >&5
6381 if test -x nm$host_exeext; then
6382         gcc_cv_nm=./nm$host_exeext
6383 elif test x$host = x$target; then
6384         # Native build.
6385         gcc_cv_nm=nm$host_exeext
6386 fi
6387 echo "$ac_t""$gcc_cv_nm" 1>&6
6388
6389 # Figure out what assembler alignment features are present.
6390 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
6391 echo "configure:6392: checking assembler alignment features" >&5
6392 gcc_cv_as_alignment_features=none
6393 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6394         # Gas version 2.6 and later support for .balign and .p2align.
6395         # bytes to skip when using .p2align.
6396         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
6397                 gcc_cv_as_alignment_features=".balign and .p2align"
6398                 cat >> confdefs.h <<\EOF
6399 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6400 EOF
6401
6402         fi
6403         # Gas version 2.8 and later support specifying the maximum
6404         # bytes to skip when using .p2align.
6405         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
6406                 gcc_cv_as_alignment_features=".p2align including maximum skip"
6407                 cat >> confdefs.h <<\EOF
6408 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6409 EOF
6410
6411         fi
6412 elif test x$gcc_cv_as != x; then
6413         # Check if we have .balign and .p2align
6414         echo ".balign  4" > conftest.s
6415         echo ".p2align  2" >> conftest.s
6416         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6417                 gcc_cv_as_alignment_features=".balign and .p2align"
6418                 cat >> confdefs.h <<\EOF
6419 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6420 EOF
6421
6422         fi
6423         rm -f conftest.s conftest.o
6424         # Check if specifying the maximum bytes to skip when
6425         # using .p2align is supported.
6426         echo ".p2align 4,,7" > conftest.s
6427         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6428                 gcc_cv_as_alignment_features=".p2align including maximum skip"
6429                 cat >> confdefs.h <<\EOF
6430 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6431 EOF
6432
6433         fi
6434         rm -f conftest.s conftest.o
6435 fi
6436 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6437
6438 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
6439 echo "configure:6440: checking assembler subsection support" >&5
6440 gcc_cv_as_subsections=no
6441 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6442   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
6443     gcc_cv_as_subsections="working .subsection -1"
6444   fi
6445 elif test x$gcc_cv_as != x; then
6446         # Check if we have .subsection
6447         echo ".subsection 1" > conftest.s
6448         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6449                 gcc_cv_as_subsections=".subsection"
6450                 if test x$gcc_cv_nm != x; then
6451                         cat > conftest.s <<EOF
6452 conftest_label1: .word 0
6453 .subsection -1
6454 conftest_label2: .word 0
6455 .previous
6456 EOF
6457                         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6458                                 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6459                                 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6460                                 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6461                                         :
6462                                 else
6463                                         gcc_cv_as_subsections="working .subsection -1"
6464                                 fi
6465                         fi
6466                 fi
6467         fi
6468         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6469 fi
6470 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6471         cat >> confdefs.h <<\EOF
6472 #define HAVE_GAS_SUBSECTION_ORDERING 1
6473 EOF
6474
6475 fi
6476 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6477
6478 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
6479 echo "configure:6480: checking assembler weak support" >&5
6480 gcc_cv_as_weak=no
6481 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6482   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
6483     gcc_cv_as_weak="yes"
6484   fi
6485 elif test x$gcc_cv_as != x; then
6486         # Check if we have .weak
6487         echo "  .weak foobar" > conftest.s
6488         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6489                 gcc_cv_as_weak="yes"
6490         fi
6491         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6492 fi
6493 if test x"$gcc_cv_as_weak" = xyes; then
6494         cat >> confdefs.h <<\EOF
6495 #define HAVE_GAS_WEAK 1
6496 EOF
6497
6498 fi
6499 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6500
6501 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
6502 echo "configure:6503: checking assembler hidden support" >&5
6503 gcc_cv_as_hidden=no
6504 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6505   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
6506     gcc_cv_as_hidden="yes"
6507   fi
6508 elif test x$gcc_cv_as != x; then
6509         # Check if we have .hidden
6510         echo "  .hidden foobar" > conftest.s
6511         echo "foobar:" >> conftest.s
6512         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6513                 gcc_cv_as_hidden="yes"
6514         fi
6515         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6516 fi
6517 if test x"$gcc_cv_as_hidden" = xyes; then
6518         cat >> confdefs.h <<\EOF
6519 #define HAVE_GAS_HIDDEN 1
6520 EOF
6521
6522 fi
6523 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6524
6525 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
6526 echo "configure:6527: checking assembler leb128 support" >&5
6527 gcc_cv_as_hidden=no
6528 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6529   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
6530     gcc_cv_as_leb128="yes"
6531   fi
6532 elif test x$gcc_cv_as != x; then
6533         # Check if we have .[us]leb128, and support symbol arithmetic with it.
6534         cat > conftest.s <<EOF
6535         .data
6536         .uleb128 L2 - L1
6537 L1:
6538         .uleb128 1280
6539         .sleb128 -1010
6540 L2:
6541 EOF
6542         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6543                 gcc_cv_as_leb128="yes"
6544         fi
6545         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6546 fi
6547 if test x"$gcc_cv_as_leb128" = xyes; then
6548         cat >> confdefs.h <<\EOF
6549 #define HAVE_AS_LEB128 1
6550 EOF
6551
6552 fi
6553 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6554
6555 case "$target" in 
6556   sparc*-*-*)
6557     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
6558 echo "configure:6559: checking assembler .register pseudo-op support" >&5
6559 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6560   echo $ac_n "(cached) $ac_c" 1>&6
6561 else
6562   
6563         gcc_cv_as_register_pseudo_op=unknown
6564         if test x$gcc_cv_as != x; then
6565             # Check if we have .register
6566             echo ".register %g2, #scratch" > conftest.s
6567             if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6568                 gcc_cv_as_register_pseudo_op=yes
6569             else
6570                 gcc_cv_as_register_pseudo_op=no
6571             fi
6572             rm -f conftest.s conftest.o
6573         fi
6574     
6575 fi
6576
6577 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6578     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6579         cat >> confdefs.h <<\EOF
6580 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6581 EOF
6582
6583     fi
6584
6585     echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6586 echo "configure:6587: checking assembler supports -relax" >&5
6587 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6588   echo $ac_n "(cached) $ac_c" 1>&6
6589 else
6590   
6591         gcc_cv_as_relax_opt=unknown
6592         if test x$gcc_cv_as != x; then
6593             # Check if gas supports -relax
6594             echo ".text" > conftest.s
6595             if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6596                 gcc_cv_as_relax_opt=yes
6597             else
6598                 gcc_cv_as_relax_opt=no
6599             fi
6600             rm -f conftest.s conftest.o
6601         fi
6602     
6603 fi
6604
6605 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6606     if test "x$gcc_cv_as_relax_opt" = xyes; then
6607         cat >> confdefs.h <<\EOF
6608 #define HAVE_AS_RELAX_OPTION 1
6609 EOF
6610
6611     fi
6612
6613     case "$tm_file" in
6614     *64*)
6615         echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6616 echo "configure:6617: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6617 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6618   echo $ac_n "(cached) $ac_c" 1>&6
6619 else
6620   
6621                 if test -n "$gcc_cv_as"; then
6622                     echo ".xword foo" > conftest.s
6623                     gcc_cv_as_flags64=no
6624                     for flag in "-xarch=v9" "-64 -Av9"; do
6625                         if $gcc_cv_as $flag -o conftest.o conftest.s \
6626                             > /dev/null 2>&1; then
6627                             gcc_cv_as_flags64=$flag
6628                             break
6629                         fi
6630                     done
6631                     rm -f conftest.s conftest.o
6632                 else
6633                     if test "$gas" = yes; then
6634                         gcc_cv_as_flags64="-64 -Av9"
6635                     else
6636                         gcc_cv_as_flags64="-xarch=v9"
6637                     fi
6638                 fi
6639         
6640 fi
6641
6642 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6643         if test "x$gcc_cv_as_flags64" = xno; then
6644
6645             tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6646             dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6647
6648         else
6649             cat >> confdefs.h <<EOF
6650 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6651 EOF
6652
6653         fi
6654         ;;
6655     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6656         ;;
6657     esac
6658
6659     if test "x$gcc_cv_as_flags64" != xno; then
6660         echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6661 echo "configure:6662: checking for assembler offsetable %lo() support" >&5
6662 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   
6666             gcc_cv_as_offsetable_lo10=unknown
6667             if test "x$gcc_cv_as" != x; then
6668                 # Check if assembler has offsetable %lo()
6669                 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6670                 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6671                 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6672                         > /dev/null 2>&1 &&
6673                    $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6674                         > /dev/null 2>&1; then
6675                     if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6676                         gcc_cv_as_offsetable_lo10=no
6677                     else
6678                         gcc_cv_as_offsetable_lo10=yes
6679                     fi
6680                 else
6681                     gcc_cv_as_offsetable_lo10=no
6682                 fi
6683                 rm -f conftest.s conftest.o conftest1.s conftest1.o
6684             fi
6685         
6686 fi
6687
6688 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6689         if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6690             cat >> confdefs.h <<\EOF
6691 #define HAVE_AS_OFFSETABLE_LO10 1
6692 EOF
6693
6694         fi
6695     fi
6696     ;;
6697
6698   i[34567]86-*-*)
6699     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6700 echo "configure:6701: checking assembler instructions" >&5
6701     gcc_cv_as_instructions=
6702     if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6703       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
6704         gcc_cv_as_instructions="filds fists"
6705       fi
6706     elif test x$gcc_cv_as != x; then
6707         set "filds fists" "filds mem; fists mem"
6708         while test $# -gt 0
6709         do
6710                 echo "$2" > conftest.s
6711                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6712                         gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6713                 fi
6714                 shift 2
6715         done
6716         rm -f conftest.s conftest.o
6717     fi
6718     if test x"$gcc_cv_as_instructions" != x; then
6719         cat >> confdefs.h <<EOF
6720 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6721 EOF
6722
6723     fi
6724     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6725     ;;
6726 esac
6727
6728 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6729 echo "configure:6730: checking assembler dwarf2 debug_line support" >&5
6730 gcc_cv_as_dwarf2_debug_line=no
6731 # ??? Not all targets support dwarf2 debug_line, even within a version
6732 # of gas.  Moreover, we need to emit a valid instruction to trigger any
6733 # info to the output file.  So, as supported targets are added to gas 2.11,
6734 # add some instruction here to (also) show we expect this might work.
6735 # ??? Once 2.11 is released, probably need to add first known working
6736 # version to the per-target configury.
6737 case "$target" in
6738   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
6739     insn="nop"
6740     ;;
6741   ia64*-*-*)
6742     insn="nop 0"
6743     ;;
6744   esac
6745 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6746 then
6747   if test "$gcc_cv_gas_major_version" -eq 2 \
6748         -a "$gcc_cv_gas_minor_version" -ge 11 \
6749         -o "$gcc_cv_gas_major_version" -gt 2 \
6750      && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6751      && test x"$insn" != x ; then
6752     gcc_cv_as_dwarf2_debug_line="yes"
6753   fi
6754 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6755         echo '  .file 0 "conftest.s"' > conftest.s
6756         echo '  .loc 0 3 0' >> conftest.s
6757         echo "  $insn" >> conftest.s
6758         # ??? This fails with non-gnu grep.
6759         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6760            && grep debug_line conftest.o > /dev/null 2>&1 ; then
6761                 # The .debug_line file table must be in the exact order that
6762                 # we specified the files, since these indicies are also used
6763                 # by DW_AT_decl_file.  Approximate this test by testing if
6764                 # the assembler bitches if the same index is assigned twice.
6765                 echo '  .file 1 "foo.s"' > conftest.s
6766                 echo '  .file 1 "bar.s"' >> conftest.s
6767                 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6768                 then
6769                   gcc_cv_as_dwarf2_debug_line="no"
6770                 else
6771                   gcc_cv_as_dwarf2_debug_line="yes"
6772                 fi
6773         fi
6774         rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6775 fi
6776 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6777         cat >> confdefs.h <<\EOF
6778 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6779 EOF
6780
6781 fi
6782 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6783
6784 # Figure out what language subdirectories are present.
6785 # Look if the user specified --enable-languages="..."; if not, use
6786 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6787 # go away some day.
6788 if test x"${enable_languages+set}" != xset; then
6789         if test x"${LANGUAGES+set}" = xset; then
6790                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6791         else
6792                 enable_languages=all
6793         fi
6794 else
6795         if test x"${enable_languages}" = x; then
6796                 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6797         fi
6798 fi
6799
6800 # First scan to see if an enabled language requires some other language.
6801 # We assume that a given config-lang.in will list all the language
6802 # front ends it requires, even if some are required indirectly.
6803 for lang in ${srcdir}/*/config-lang.in ..
6804 do
6805    case $lang in
6806     ..)
6807        ;;
6808     # The odd quoting in the next line works around
6809     # an apparent bug in bash 1.12 on linux.
6810     ${srcdir}/[*]/config-lang.in)
6811        ;;
6812     *)
6813        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
6814        this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
6815        for other in $this_lang_requires
6816        do
6817           case ,${enable_languages}, in
6818            *,$other,*)
6819               ;;
6820            *,all,*)
6821               ;;
6822            *,$lang_alias,*)
6823               enable_languages="$enable_languages,$other"
6824               ;;
6825           esac
6826        done
6827        ;;
6828    esac
6829 done
6830
6831 subdirs=
6832 for lang in ${srcdir}/*/config-lang.in ..
6833 do
6834         case $lang in
6835         ..) ;;
6836         # The odd quoting in the next line works around
6837         # an apparent bug in bash 1.12 on linux.
6838         ${srcdir}/[*]/config-lang.in) ;;
6839         *)
6840           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
6841           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
6842           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
6843           if test "x$lang_alias" = x
6844           then
6845                 echo "$lang doesn't set \$language." 1>&2
6846                 exit 1
6847           fi
6848           case ${build_by_default},${enable_languages}, in
6849           *,$lang_alias,*) add_this_lang=yes ;;
6850           no,*) add_this_lang=no ;;
6851           *,all,*) add_this_lang=yes ;;
6852           *) add_this_lang=no ;;
6853           esac
6854           if test x"${add_this_lang}" = xyes; then
6855                 case $lang in
6856                     ${srcdir}/ada/config-lang.in)
6857                         if test x$have_gnat = xyes ; then
6858                                 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6859                         fi
6860                         ;;
6861                     *)
6862                         subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6863                         ;;
6864                 esac
6865           fi
6866           ;;
6867         esac
6868 done
6869
6870 # Make gthr-default.h if we have a thread file.
6871 gthread_flags=
6872 if test $thread_file != single; then
6873     rm -f gthr-default.h
6874     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6875     gthread_flags=-DHAVE_GTHR_DEFAULT
6876 fi
6877
6878
6879 # Find out what GC implementation we want, or may, use.
6880 # Check whether --with-gc or --without-gc was given.
6881 if test "${with_gc+set}" = set; then
6882   withval="$with_gc"
6883   case "$withval" in
6884   simple | page)
6885     GGC=ggc-$withval
6886     ;;
6887   *)
6888     { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6889     ;;
6890 esac
6891 else
6892   GGC=ggc-page
6893 fi
6894
6895
6896 echo "Using $GGC for garbage collection."
6897
6898 # Use the system's zlib library.
6899 zlibdir=-L../zlib
6900 zlibinc="-I\$(srcdir)/../zlib"
6901 # Check whether --with-system-zlib or --without-system-zlib was given.
6902 if test "${with_system_zlib+set}" = set; then
6903   withval="$with_system_zlib"
6904   zlibdir=
6905 zlibinc=
6906
6907 fi
6908
6909
6910
6911
6912 cat >> confdefs.h <<EOF
6913 #define ENABLE_STD_NAMESPACE 1
6914 EOF
6915
6916
6917
6918 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6919 echo "configure:6920: checking whether to enable maintainer-specific portions of Makefiles" >&5
6920     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6921 if test "${enable_maintainer_mode+set}" = set; then
6922   enableval="$enable_maintainer_mode"
6923   maintainer_mode=$enableval
6924 else
6925   maintainer_mode=no
6926 fi
6927
6928
6929 echo "$ac_t""$maintainer_mode" 1>&6
6930
6931 if test "$maintainer_mode" = "yes"; then
6932   MAINT=''
6933 else
6934   MAINT='#'
6935 fi
6936
6937 # Make empty files to contain the specs and options for each language.
6938 # Then add #include lines to for a compiler that has specs and/or options.
6939
6940 lang_specs_files=
6941 lang_options_files=
6942 lang_tree_files=
6943 rm -f specs.h options.h gencheck.h
6944 touch specs.h options.h gencheck.h
6945 for subdir in . $subdirs
6946 do
6947         if test -f $srcdir/$subdir/lang-specs.h; then
6948                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6949                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6950         fi
6951         if test -f $srcdir/$subdir/lang-options.h; then
6952                 echo "#include \"$subdir/lang-options.h\"" >>options.h
6953                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6954         fi
6955         if test -f $srcdir/$subdir/$subdir-tree.def; then
6956                 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6957                 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6958         fi
6959 done
6960
6961 # These (without "all_") are set in each config-lang.in.
6962 # `language' must be a single word so is spelled singularly.
6963 all_languages=
6964 all_boot_languages=
6965 all_compilers=
6966 all_stagestuff=
6967 all_diff_excludes=
6968 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
6969 # List of language makefile fragments.
6970 all_lang_makefiles=
6971 all_headers=
6972 all_lib2funcs=
6973
6974 # Add the language fragments.
6975 # Languages are added via two mechanisms.  Some information must be
6976 # recorded in makefile variables, these are defined in config-lang.in.
6977 # We accumulate them and plug them into the main Makefile.
6978 # The other mechanism is a set of hooks for each of the main targets
6979 # like `clean', `install', etc.
6980
6981 language_fragments="Make-lang"
6982 language_hooks="Make-hooks"
6983
6984 for s in .. $subdirs
6985 do
6986         if test $s != ".."
6987         then
6988                 language=
6989                 boot_language=
6990                 compilers=
6991                 stagestuff=
6992                 diff_excludes=
6993                 headers=
6994                 outputs=
6995                 lib2funcs=
6996                 . ${srcdir}/$s/config-lang.in
6997                 if test "x$language" = x
6998                 then
6999                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7000                         exit 1
7001                 fi
7002                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
7003                 if test -f ${srcdir}/$s/Makefile.in
7004                 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
7005                 fi
7006                 all_languages="$all_languages $language"
7007                 if test "x$boot_language" = xyes
7008                 then
7009                         all_boot_languages="$all_boot_languages $language"
7010                 fi
7011                 all_compilers="$all_compilers $compilers"
7012                 all_stagestuff="$all_stagestuff $stagestuff"
7013                 all_diff_excludes="$all_diff_excludes $diff_excludes"
7014                 all_headers="$all_headers $headers"
7015                 all_outputs="$all_outputs $outputs"
7016                 all_lib2funcs="$all_lib2funcs $lib2funcs"
7017         fi
7018 done
7019
7020 check_languages=
7021 for language in .. $all_languages
7022 do
7023         if test $language != ".."
7024         then
7025                 check_languages="$check_languages check-$language"
7026         fi
7027 done
7028
7029 # Since we can't use `::' targets, we link each language in
7030 # with a set of hooks, reached indirectly via lang.${target}.
7031
7032 rm -f Make-hooks
7033 touch Make-hooks
7034 target_list="all.build all.cross start.encap rest.encap \
7035         info dvi \
7036         install-normal install-common install-info install-man \
7037         uninstall \
7038         mostlyclean clean distclean extraclean maintainer-clean \
7039         stage1 stage2 stage3 stage4"
7040 for t in $target_list
7041 do
7042         x=
7043         for lang in .. $all_languages
7044         do
7045                 if test $lang != ".."; then
7046                         x="$x $lang.$t"
7047                 fi
7048         done
7049         echo "lang.$t: $x" >> Make-hooks
7050 done
7051
7052 # Create .gdbinit.
7053
7054 echo "dir ." > .gdbinit
7055 echo "dir ${srcdir}" >> .gdbinit
7056 if test x$gdb_needs_out_file_path = xyes
7057 then
7058         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7059 fi
7060 if test "x$subdirs" != x; then
7061         for s in $subdirs
7062         do
7063                 echo "dir ${srcdir}/$s" >> .gdbinit
7064         done
7065 fi
7066 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
7067
7068 # Define variables host_canonical and build_canonical
7069 # because some Cygnus local changes in the Makefile depend on them.
7070 build_canonical=${build}
7071 host_canonical=${host}
7072 target_subdir=
7073 if test "${host}" != "${target}" ; then
7074     target_subdir=${target}/
7075 fi
7076
7077
7078
7079         
7080 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7081 # absolute path for gcc_tooldir based on inserting the number of up-directory
7082 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7083 # $(libsubdir)/@(unlibsubdir) based path.
7084 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7085 # make and thus we'd get different behavior depending on where we built the
7086 # sources.
7087 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7088     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7089 else
7090 # An explanation of the sed strings:
7091 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
7092 #  -e 's|/$||'            match a trailing forward slash and eliminates it
7093 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
7094 #  -e 's|/[^/]*|../|g'    replaces each occurance of /<directory> with ../
7095 #
7096 # (*) Note this pattern overwrites the first character of the string
7097 # with a forward slash if one is not already present.  This is not a
7098 # problem because the exact names of the sub-directories concerned is
7099 # unimportant, just the number of them matters.
7100 #
7101 # The practical upshot of these patterns is like this:
7102 #
7103 #  prefix     exec_prefix        result
7104 #  ------     -----------        ------
7105 #   /foo        /foo/bar          ../
7106 #   /foo/       /foo/bar          ../
7107 #   /foo        /foo/bar/         ../
7108 #   /foo/       /foo/bar/         ../
7109 #   /foo        /foo/bar/ugg      ../../
7110 #
7111     dollar='$$'
7112     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7113 fi
7114
7115
7116
7117 # Find a directory in which to install a shared libgcc.
7118
7119 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7120 if test "${enable_version_specific_runtime_libs+set}" = set; then
7121   enableval="$enable_version_specific_runtime_libs"
7122   :
7123 fi
7124
7125
7126 # Check whether --with-slibdir or --without-slibdir was given.
7127 if test "${with_slibdir+set}" = set; then
7128   withval="$with_slibdir"
7129   slibdir="$with_slibdir"
7130 else
7131   if test "${enable_version_specific_runtime_libs+set}" = set; then
7132   slibdir='$(libsubdir)'
7133 elif test "$host" != "$target"; then
7134   slibdir='$(build_tooldir)/lib'
7135 else
7136   slibdir='$(libdir)'
7137 fi
7138 fi
7139
7140
7141
7142 # Nothing to do for FLOAT_H, float_format already handled.
7143 objdir=`pwd`
7144
7145
7146 # Process the language and host/target makefile fragments.
7147 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7148
7149 # Substitute configuration variables
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
7216
7217
7218
7219
7220 # Echo that links are built
7221 if test x$host = x$target
7222 then
7223         str1="native "
7224 else
7225         str1="cross-"
7226         str2=" from $host"
7227 fi
7228
7229 if test x$host != x$build
7230 then
7231         str3=" on a $build system"
7232 fi
7233
7234 if test "x$str2" != x || test "x$str3" != x
7235 then
7236         str4=
7237 fi
7238
7239 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7240
7241 if test "x$str2" != x || test "x$str3" != x
7242 then
7243         echo " ${str2}${str3}." 1>&2
7244 fi
7245
7246 # Truncate the target if necessary
7247 if test x$host_truncate_target != x; then
7248         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7249 fi
7250
7251 # Configure the subdirectories
7252 # AC_CONFIG_SUBDIRS($subdirs)
7253
7254 # Create the Makefile
7255 # and configure language subdirectories
7256 trap '' 1 2 15
7257 cat > confcache <<\EOF
7258 # This file is a shell script that caches the results of configure
7259 # tests run on this system so they can be shared between configure
7260 # scripts and configure runs.  It is not useful on other systems.
7261 # If it contains results you don't want to keep, you may remove or edit it.
7262 #
7263 # By default, configure uses ./config.cache as the cache file,
7264 # creating it if it does not exist already.  You can give configure
7265 # the --cache-file=FILE option to use a different cache file; that is
7266 # what configure does when it calls configure scripts in
7267 # subdirectories, so they share the cache.
7268 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7269 # config.status only pays attention to the cache file if you give it the
7270 # --recheck option to rerun configure.
7271 #
7272 EOF
7273 # The following way of writing the cache mishandles newlines in values,
7274 # but we know of no workaround that is simple, portable, and efficient.
7275 # So, don't put newlines in cache variables' values.
7276 # Ultrix sh set writes to stderr and can't be redirected directly,
7277 # and sets the high bit in the cache file unless we assign to the vars.
7278 (set) 2>&1 |
7279   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7280   *ac_space=\ *)
7281     # `set' does not quote correctly, so add quotes (double-quote substitution
7282     # turns \\\\ into \\, and sed turns \\ into \).
7283     sed -n \
7284       -e "s/'/'\\\\''/g" \
7285       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7286     ;;
7287   *)
7288     # `set' quotes correctly as required by POSIX, so do not add quotes.
7289     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7290     ;;
7291   esac >> confcache
7292 if cmp -s $cache_file confcache; then
7293   :
7294 else
7295   if test -w $cache_file; then
7296     echo "updating cache $cache_file"
7297     cat confcache > $cache_file
7298   else
7299     echo "not updating unwritable cache $cache_file"
7300   fi
7301 fi
7302 rm -f confcache
7303
7304 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7305
7306 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7307 # Let make expand exec_prefix.
7308 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7309
7310 # Any assignment to VPATH causes Sun make to only execute
7311 # the first set of double-colon rules, so remove it if not needed.
7312 # If there is a colon in the path, we need to keep it.
7313 if test "x$srcdir" = x.; then
7314   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7315 fi
7316
7317 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7318
7319 DEFS=-DHAVE_CONFIG_H
7320
7321 # Without the "./", some shells look in PATH for config.status.
7322 : ${CONFIG_STATUS=./config.status}
7323
7324 echo creating $CONFIG_STATUS
7325 rm -f $CONFIG_STATUS
7326 cat > $CONFIG_STATUS <<EOF
7327 #! /bin/sh
7328 # Generated automatically by configure.
7329 # Run this file to recreate the current configuration.
7330 # This directory was configured as follows,
7331 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7332 #
7333 # $0 $ac_configure_args
7334 #
7335 # Compiler output produced by configure, useful for debugging
7336 # configure, is in ./config.log if it exists.
7337
7338 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7339 for ac_option
7340 do
7341   case "\$ac_option" in
7342   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7343     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7344     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7345   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7346     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7347     exit 0 ;;
7348   -help | --help | --hel | --he | --h)
7349     echo "\$ac_cs_usage"; exit 0 ;;
7350   *) echo "\$ac_cs_usage"; exit 1 ;;
7351   esac
7352 done
7353
7354 ac_given_srcdir=$srcdir
7355
7356 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7357 EOF
7358 cat >> $CONFIG_STATUS <<EOF
7359
7360 # Protect against being on the right side of a sed subst in config.status.
7361 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7362  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7363 $ac_vpsub
7364 $extrasub
7365 s%@SHELL@%$SHELL%g
7366 s%@CFLAGS@%$CFLAGS%g
7367 s%@CPPFLAGS@%$CPPFLAGS%g
7368 s%@CXXFLAGS@%$CXXFLAGS%g
7369 s%@FFLAGS@%$FFLAGS%g
7370 s%@DEFS@%$DEFS%g
7371 s%@LDFLAGS@%$LDFLAGS%g
7372 s%@LIBS@%$LIBS%g
7373 s%@exec_prefix@%$exec_prefix%g
7374 s%@prefix@%$prefix%g
7375 s%@program_transform_name@%$program_transform_name%g
7376 s%@bindir@%$bindir%g
7377 s%@sbindir@%$sbindir%g
7378 s%@libexecdir@%$libexecdir%g
7379 s%@datadir@%$datadir%g
7380 s%@sysconfdir@%$sysconfdir%g
7381 s%@sharedstatedir@%$sharedstatedir%g
7382 s%@localstatedir@%$localstatedir%g
7383 s%@libdir@%$libdir%g
7384 s%@includedir@%$includedir%g
7385 s%@oldincludedir@%$oldincludedir%g
7386 s%@infodir@%$infodir%g
7387 s%@mandir@%$mandir%g
7388 s%@enable_multilib@%$enable_multilib%g
7389 s%@enable_shared@%$enable_shared%g
7390 s%@host@%$host%g
7391 s%@host_alias@%$host_alias%g
7392 s%@host_cpu@%$host_cpu%g
7393 s%@host_vendor@%$host_vendor%g
7394 s%@host_os@%$host_os%g
7395 s%@target@%$target%g
7396 s%@target_alias@%$target_alias%g
7397 s%@target_cpu@%$target_cpu%g
7398 s%@target_vendor@%$target_vendor%g
7399 s%@target_os@%$target_os%g
7400 s%@build@%$build%g
7401 s%@build_alias@%$build_alias%g
7402 s%@build_cpu@%$build_cpu%g
7403 s%@build_vendor@%$build_vendor%g
7404 s%@build_os@%$build_os%g
7405 s%@CC@%$CC%g
7406 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
7407 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7408 s%@strict1_warn@%$strict1_warn%g
7409 s%@CPP@%$CPP%g
7410 s%@warn_cflags@%$warn_cflags%g
7411 s%@stage1_cflags@%$stage1_cflags%g
7412 s%@SET_MAKE@%$SET_MAKE%g
7413 s%@AWK@%$AWK%g
7414 s%@LN@%$LN%g
7415 s%@LN_S@%$LN_S%g
7416 s%@RANLIB@%$RANLIB%g
7417 s%@INSTALL@%$INSTALL%g
7418 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7419 s%@INSTALL_DATA@%$INSTALL_DATA%g
7420 s%@have_gnat@%$have_gnat%g
7421 s%@have_mktemp_command@%$have_mktemp_command%g
7422 s%@MAKEINFO@%$MAKEINFO%g
7423 s%@BUILD_INFO@%$BUILD_INFO%g
7424 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
7425 s%@FLEX@%$FLEX%g
7426 s%@BISON@%$BISON%g
7427 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
7428 s%@vfprintf@%$vfprintf%g
7429 s%@doprint@%$doprint%g
7430 s%@strstr@%$strstr%g
7431 s%@manext@%$manext%g
7432 s%@objext@%$objext%g
7433 s%@PACKAGE@%$PACKAGE%g
7434 s%@VERSION@%$VERSION%g
7435 s%@CHECK_PO@%$CHECK_PO%g
7436 s%@USE_NLS@%$USE_NLS%g
7437 s%@MSGFMT@%$MSGFMT%g
7438 s%@GMSGFMT@%$GMSGFMT%g
7439 s%@XGETTEXT@%$XGETTEXT%g
7440 s%@GENCAT@%$GENCAT%g
7441 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7442 s%@CATALOGS@%$CATALOGS%g
7443 s%@CATOBJEXT@%$CATOBJEXT%g
7444 s%@DATADIRNAME@%$DATADIRNAME%g
7445 s%@GMOFILES@%$GMOFILES%g
7446 s%@INSTOBJEXT@%$INSTOBJEXT%g
7447 s%@INTLDEPS@%$INTLDEPS%g
7448 s%@INTLLIBS@%$INTLLIBS%g
7449 s%@INTLOBJS@%$INTLOBJS%g
7450 s%@POFILES@%$POFILES%g
7451 s%@POSUB@%$POSUB%g
7452 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7453 s%@GT_NO@%$GT_NO%g
7454 s%@GT_YES@%$GT_YES%g
7455 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7456 s%@l@%$l%g
7457 s%@inhibit_libc@%$inhibit_libc%g
7458 s%@gthread_flags@%$gthread_flags%g
7459 s%@GGC@%$GGC%g
7460 s%@zlibdir@%$zlibdir%g
7461 s%@zlibinc@%$zlibinc%g
7462 s%@MAINT@%$MAINT%g
7463 s%@build_canonical@%$build_canonical%g
7464 s%@host_canonical@%$host_canonical%g
7465 s%@target_subdir@%$target_subdir%g
7466 s%@gcc_tooldir@%$gcc_tooldir%g
7467 s%@dollar@%$dollar%g
7468 s%@slibdir@%$slibdir%g
7469 s%@objdir@%$objdir%g
7470 s%@subdirs@%$subdirs%g
7471 s%@all_boot_languages@%$all_boot_languages%g
7472 s%@all_compilers@%$all_compilers%g
7473 s%@all_diff_excludes@%$all_diff_excludes%g
7474 s%@all_headers@%$all_headers%g
7475 s%@all_lang_makefiles@%$all_lang_makefiles%g
7476 s%@all_languages@%$all_languages%g
7477 s%@all_lib2funcs@%$all_lib2funcs%g
7478 s%@all_stagestuff@%$all_stagestuff%g
7479 s%@build_exeext@%$build_exeext%g
7480 s%@build_install_headers_dir@%$build_install_headers_dir%g
7481 s%@build_xm_file_list@%$build_xm_file_list%g
7482 s%@build_xm_file@%$build_xm_file%g
7483 s%@build_xm_defines@%$build_xm_defines%g
7484 s%@check_languages@%$check_languages%g
7485 s%@cc_set_by_configure@%$cc_set_by_configure%g
7486 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
7487 s%@cpp_install_dir@%$cpp_install_dir%g
7488 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7489 s%@dep_tmake_file@%$dep_tmake_file%g
7490 s%@extra_c_flags@%$extra_c_flags%g
7491 s%@extra_headers_list@%$extra_headers_list%g
7492 s%@extra_objs@%$extra_objs%g
7493 s%@extra_parts@%$extra_parts%g
7494 s%@extra_passes@%$extra_passes%g
7495 s%@extra_programs@%$extra_programs%g
7496 s%@float_h_file@%$float_h_file%g
7497 s%@gcc_config_arguments@%$gcc_config_arguments%g
7498 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
7499 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
7500 s%@gcc_version@%$gcc_version%g
7501 s%@gcc_version_full@%$gcc_version_full%g
7502 s%@gcc_version_trigger@%$gcc_version_trigger%g
7503 s%@host_exeext@%$host_exeext%g
7504 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
7505 s%@host_xm_file_list@%$host_xm_file_list%g
7506 s%@host_xm_file@%$host_xm_file%g
7507 s%@host_xm_defines@%$host_xm_defines%g
7508 s%@install@%$install%g
7509 s%@lang_options_files@%$lang_options_files%g
7510 s%@lang_specs_files@%$lang_specs_files%g
7511 s%@lang_tree_files@%$lang_tree_files%g
7512 s%@local_prefix@%$local_prefix%g
7513 s%@maybe_use_collect2@%$maybe_use_collect2%g
7514 s%@md_file@%$md_file%g
7515 s%@objc_boehm_gc@%$objc_boehm_gc%g
7516 s%@out_file@%$out_file%g
7517 s%@out_object_file@%$out_object_file%g
7518 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
7519 s%@symbolic_link@%$symbolic_link%g
7520 s%@thread_file@%$thread_file%g
7521 s%@tm_file_list@%$tm_file_list%g
7522 s%@tm_file@%$tm_file%g
7523 s%@tm_p_file_list@%$tm_p_file_list%g
7524 s%@tm_p_file@%$tm_p_file%g
7525 s%@xm_file@%$xm_file%g
7526 s%@xm_defines@%$xm_defines%g
7527 s%@will_use_collect2@%$will_use_collect2%g
7528 s%@c_target_objs@%$c_target_objs%g
7529 s%@cxx_target_objs@%$cxx_target_objs%g
7530 s%@target_cpu_default@%$target_cpu_default%g
7531 /@target_overrides@/r $target_overrides
7532 s%@target_overrides@%%g
7533 /@host_overrides@/r $host_overrides
7534 s%@host_overrides@%%g
7535 s%@cross_defines@%$cross_defines%g
7536 /@cross_overrides@/r $cross_overrides
7537 s%@cross_overrides@%%g
7538 /@build_overrides@/r $build_overrides
7539 s%@build_overrides@%%g
7540 /@language_fragments@/r $language_fragments
7541 s%@language_fragments@%%g
7542 /@language_hooks@/r $language_hooks
7543 s%@language_hooks@%%g
7544
7545 CEOF
7546 EOF
7547
7548 cat >> $CONFIG_STATUS <<\EOF
7549
7550 # Split the substitutions into bite-sized pieces for seds with
7551 # small command number limits, like on Digital OSF/1 and HP-UX.
7552 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7553 ac_file=1 # Number of current file.
7554 ac_beg=1 # First line for current file.
7555 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7556 ac_more_lines=:
7557 ac_sed_cmds=""
7558 while $ac_more_lines; do
7559   if test $ac_beg -gt 1; then
7560     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7561   else
7562     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7563   fi
7564   if test ! -s conftest.s$ac_file; then
7565     ac_more_lines=false
7566     rm -f conftest.s$ac_file
7567   else
7568     if test -z "$ac_sed_cmds"; then
7569       ac_sed_cmds="sed -f conftest.s$ac_file"
7570     else
7571       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7572     fi
7573     ac_file=`expr $ac_file + 1`
7574     ac_beg=$ac_end
7575     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7576   fi
7577 done
7578 if test -z "$ac_sed_cmds"; then
7579   ac_sed_cmds=cat
7580 fi
7581 EOF
7582
7583 cat >> $CONFIG_STATUS <<EOF
7584
7585 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7586 EOF
7587 cat >> $CONFIG_STATUS <<\EOF
7588 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7589   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7590   case "$ac_file" in
7591   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7592        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7593   *) ac_file_in="${ac_file}.in" ;;
7594   esac
7595
7596   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7597
7598   # Remove last slash and all that follows it.  Not all systems have dirname.
7599   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7600   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7601     # The file is in a subdirectory.
7602     test ! -d "$ac_dir" && mkdir "$ac_dir"
7603     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7604     # A "../" for each directory in $ac_dir_suffix.
7605     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7606   else
7607     ac_dir_suffix= ac_dots=
7608   fi
7609
7610   case "$ac_given_srcdir" in
7611   .)  srcdir=.
7612       if test -z "$ac_dots"; then top_srcdir=.
7613       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7614   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7615   *) # Relative path.
7616     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7617     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7618   esac
7619
7620
7621   echo creating "$ac_file"
7622   rm -f "$ac_file"
7623   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7624   case "$ac_file" in
7625   *Makefile*) ac_comsub="1i\\
7626 # $configure_input" ;;
7627   *) ac_comsub= ;;
7628   esac
7629
7630   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7631   sed -e "$ac_comsub
7632 s%@configure_input@%$configure_input%g
7633 s%@srcdir@%$srcdir%g
7634 s%@top_srcdir@%$top_srcdir%g
7635 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7636 fi; done
7637 rm -f conftest.s*
7638
7639 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7640 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7641 #
7642 # ac_d sets the value in "#define NAME VALUE" lines.
7643 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7644 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7645 ac_dC='\3'
7646 ac_dD='%g'
7647 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7648 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7649 ac_uB='\([      ]\)%\1#\2define\3'
7650 ac_uC=' '
7651 ac_uD='\4%g'
7652 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7653 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7654 ac_eB='$%\1#\2define\3'
7655 ac_eC=' '
7656 ac_eD='%g'
7657
7658 if test "${CONFIG_HEADERS+set}" != set; then
7659 EOF
7660 cat >> $CONFIG_STATUS <<EOF
7661   CONFIG_HEADERS="auto-host.h:config.in"
7662 EOF
7663 cat >> $CONFIG_STATUS <<\EOF
7664 fi
7665 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7666   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7667   case "$ac_file" in
7668   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7669        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7670   *) ac_file_in="${ac_file}.in" ;;
7671   esac
7672
7673   echo creating $ac_file
7674
7675   rm -f conftest.frag conftest.in conftest.out
7676   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7677   cat $ac_file_inputs > conftest.in
7678
7679 EOF
7680
7681 # Transform confdefs.h into a sed script conftest.vals that substitutes
7682 # the proper values into config.h.in to produce config.h.  And first:
7683 # Protect against being on the right side of a sed subst in config.status.
7684 # Protect against being in an unquoted here document in config.status.
7685 rm -f conftest.vals
7686 cat > conftest.hdr <<\EOF
7687 s/[\\&%]/\\&/g
7688 s%[\\$`]%\\&%g
7689 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7690 s%ac_d%ac_u%gp
7691 s%ac_u%ac_e%gp
7692 EOF
7693 sed -n -f conftest.hdr confdefs.h > conftest.vals
7694 rm -f conftest.hdr
7695
7696 # This sed command replaces #undef with comments.  This is necessary, for
7697 # example, in the case of _POSIX_SOURCE, which is predefined and required
7698 # on some systems where configure will not decide to define it.
7699 cat >> conftest.vals <<\EOF
7700 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7701 EOF
7702
7703 # Break up conftest.vals because some shells have a limit on
7704 # the size of here documents, and old seds have small limits too.
7705
7706 rm -f conftest.tail
7707 while :
7708 do
7709   ac_lines=`grep -c . conftest.vals`
7710   # grep -c gives empty output for an empty file on some AIX systems.
7711   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7712   # Write a limited-size here document to conftest.frag.
7713   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7714   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7715   echo 'CEOF
7716   sed -f conftest.frag conftest.in > conftest.out
7717   rm -f conftest.in
7718   mv conftest.out conftest.in
7719 ' >> $CONFIG_STATUS
7720   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7721   rm -f conftest.vals
7722   mv conftest.tail conftest.vals
7723 done
7724 rm -f conftest.vals
7725
7726 cat >> $CONFIG_STATUS <<\EOF
7727   rm -f conftest.frag conftest.h
7728   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7729   cat conftest.in >> conftest.h
7730   rm -f conftest.in
7731   if cmp -s $ac_file conftest.h 2>/dev/null; then
7732     echo "$ac_file is unchanged"
7733     rm -f conftest.h
7734   else
7735     # Remove last slash and all that follows it.  Not all systems have dirname.
7736       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7737       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7738       # The file is in a subdirectory.
7739       test ! -d "$ac_dir" && mkdir "$ac_dir"
7740     fi
7741     rm -f $ac_file
7742     mv conftest.h $ac_file
7743   fi
7744 fi; done
7745
7746 EOF
7747
7748 cat >> $CONFIG_STATUS <<EOF
7749 ac_sources="$nls_cv_header_libgt"
7750 ac_dests="$nls_cv_header_intl"
7751 EOF
7752
7753 cat >> $CONFIG_STATUS <<\EOF
7754 srcdir=$ac_given_srcdir
7755 while test -n "$ac_sources"; do
7756   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7757   set $ac_sources; ac_source=$1; shift; ac_sources=$*
7758
7759   echo "linking $srcdir/$ac_source to $ac_dest"
7760
7761   if test ! -r $srcdir/$ac_source; then
7762     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7763   fi
7764   rm -f $ac_dest
7765
7766   # Make relative symlinks.
7767   # Remove last slash and all that follows it.  Not all systems have dirname.
7768   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7769   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7770     # The dest file is in a subdirectory.
7771     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7772     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7773     # A "../" for each directory in $ac_dest_dir_suffix.
7774     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7775   else
7776     ac_dest_dir_suffix= ac_dots=
7777   fi
7778
7779   case "$srcdir" in
7780   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7781   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7782   esac
7783
7784   # Make a symlink if possible; otherwise try a hard link.
7785   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7786     ln $srcdir/$ac_source $ac_dest; then :
7787   else
7788     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7789   fi
7790 done
7791 EOF
7792 cat >> $CONFIG_STATUS <<EOF
7793
7794
7795 host='${host}'
7796 build='${build}'
7797 target='${target}'
7798 target_alias='${target_alias}'
7799 srcdir='${srcdir}'
7800 subdirs='${subdirs}'
7801 symbolic_link='${symbolic_link}'
7802 program_transform_set='${program_transform_set}'
7803 program_transform_name='${program_transform_name}'
7804 dep_host_xmake_file='${dep_host_xmake_file}'
7805 host_xmake_file='${host_xmake_file}'
7806 dep_tmake_file='${dep_tmake_file}'
7807 tmake_file='${tmake_file}'
7808 thread_file='${thread_file}'
7809 gcc_config_arguments='${gcc_config_arguments}'
7810 gcc_version='${gcc_version}'
7811 gcc_version_full='${gcc_version_full}'
7812 gcc_version_trigger='${gcc_version_trigger}'
7813 local_prefix='${local_prefix}'
7814 build_install_headers_dir='${build_install_headers_dir}'
7815 build_exeext='${build_exeext}'
7816 host_exeext='${host_exeext}'
7817 out_file='${out_file}'
7818 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7819 SET_MAKE='${SET_MAKE}'
7820 target_list='${target_list}'
7821 target_overrides='${target_overrides}'
7822 host_overrides='${host_overrides}'
7823 cross_defines='${cross_defines}'
7824 cross_overrides='${cross_overrides}'
7825 build_overrides='${build_overrides}'
7826 cpp_install_dir='${cpp_install_dir}'
7827
7828 EOF
7829 cat >> $CONFIG_STATUS <<\EOF
7830 case "$CONFIG_FILES" in *po/Makefile.in*)
7831         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7832       esac
7833
7834 case x$CONFIG_HEADERS in
7835 xauto-host.h:config.in)
7836 echo > cstamp-h ;;
7837 esac
7838 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
7839 # bootstrapping and the installation procedure can still use
7840 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
7841 # FLAGS_TO_PASS has been modified to solve the problem there.
7842 # This is virtually a duplicate of what happens in configure.lang; we do
7843 # an extra check to make sure this only happens if ln -s can be used.
7844 if test "$symbolic_link" = "ln -s"; then
7845  for d in .. ${subdirs} ; do
7846    if test $d != ..; then
7847         STARTDIR=`pwd`
7848         cd $d
7849         for t in stage1 stage2 stage3 stage4 include
7850         do
7851                 rm -f $t
7852                 $symbolic_link ../$t $t 2>/dev/null
7853         done
7854         cd $STARTDIR
7855    fi
7856  done
7857 else true ; fi
7858 # Avoid having to add intl to our include paths.
7859 if test -f intl/libintl.h; then
7860   echo creating libintl.h
7861   echo '#include "intl/libintl.h"' >libintl.h
7862 fi
7863
7864 exit 0
7865 EOF
7866 chmod +x $CONFIG_STATUS
7867 rm -fr confdefs* $ac_clean_files
7868 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7869