OSDN Git Service

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