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