OSDN Git Service

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