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