OSDN Git Service

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