OSDN Git Service

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