configure.in (enable_coverage): New enable switch.
[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 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files"
31 ac_help="$ac_help
32 --enable-multilib enable library support for multiple ABIs"
33 ac_help="$ac_help
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,rtlflag,gc,gcac;
38 default is misc,tree,gc,rtlflag"
39 ac_help="$ac_help
40 --enable-coverage[=LEVEL]
41 enable compiler\'s code coverage collection.
42 Use to measure compiler performance and locate
43 unused parts of the compiler. With LEVEL, specificy
44 optimization. Values are opt, noopt,
45 default is noopt"
46 ac_help="$ac_help
47 --with-cpp-install-dir=DIR
48 install the user visible C preprocessor in DIR
49 (relative to PREFIX) as well as PREFIX/bin"
50 ac_help="$ac_help
51 --enable-__cxa_atexit enable __cxa_atexit for C++"
52 ac_help="$ac_help
53 --enable-c-mbchar enable multibyte characters for C and C++"
54 ac_help="$ac_help
55 --enable-threads enable thread usage for target GCC
56 --enable-threads=LIB use LIB thread package for target GCC"
57 ac_help="$ac_help
58 --enable-objc-gc enable the use of Boehm's garbage collector with
59 the GNU Objective-C runtime"
60 ac_help="$ac_help
61 --with-dwarf2 force the default debug format to be DWARF 2"
62 ac_help="$ac_help
63 --disable-shared don't provide a shared libgcc"
64 ac_help="$ac_help
65 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
66 ac_help="$ac_help
67 --enable-nls use Native Language Support (default)"
68 ac_help="$ac_help
69 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
70 ac_help="$ac_help
71 --disable-nls do not use Native Language Support"
72 ac_help="$ac_help
73 --with-included-gettext use the GNU gettext library included here"
74 ac_help="$ac_help
75 --disable-win32-registry
76 disable lookup of installation paths in the
77 Registry on Windows hosts
78 --enable-win32-registry enable registry lookup (default)
79 --enable-win32-registry=KEY
80 use KEY instead of GCC version as the last portion
81 of the registry key"
82 ac_help="$ac_help
83 --with-gc={simple,page} choose the garbage collection mechanism to use
84 with the compiler"
85 ac_help="$ac_help
86 --with-system-zlib use installed libz"
87 ac_help="$ac_help
88 --enable-maintainer-mode
89 enable make rules and dependencies not useful
90 (and sometimes confusing) to the casual installer"
91 ac_help="$ac_help
92 --enable-sjlj-exceptions
93 arrange to use setjmp/longjmp exception handling"
94 ac_help="$ac_help
95 --enable-libunwind-exceptions force use libunwind for exceptions"
96 ac_help="$ac_help
97 --enable-version-specific-runtime-libs
98 specify that runtime libraries should be
99 installed in a compiler-specific directory"
100 ac_help="$ac_help
101 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
102
103 # Initialize some variables set by options.
104 # The variables have the same names as the options, with
105 # dashes changed to underlines.
106 build=NONE
107 cache_file=./config.cache
108 exec_prefix=NONE
109 host=NONE
110 no_create=
111 nonopt=NONE
112 no_recursion=
113 prefix=NONE
114 program_prefix=NONE
115 program_suffix=NONE
116 program_transform_name=s,x,x,
117 silent=
118 site=
119 srcdir=
120 target=NONE
121 verbose=
122 x_includes=NONE
123 x_libraries=NONE
124 bindir='${exec_prefix}/bin'
125 sbindir='${exec_prefix}/sbin'
126 libexecdir='${exec_prefix}/libexec'
127 datadir='${prefix}/share'
128 sysconfdir='${prefix}/etc'
129 sharedstatedir='${prefix}/com'
130 localstatedir='${prefix}/var'
131 libdir='${exec_prefix}/lib'
132 includedir='${prefix}/include'
133 oldincludedir='/usr/include'
134 infodir='${prefix}/info'
135 mandir='${prefix}/man'
136
137 # Initialize some other variables.
138 subdirs=
139 MFLAGS= MAKEFLAGS=
140 SHELL=${CONFIG_SHELL-/bin/sh}
141 # Maximum number of lines to put in a shell here document.
142 ac_max_here_lines=12
143
144 ac_prev=
145 for ac_option
146 do
147
148 # If the previous option needs an argument, assign it.
149 if test -n "$ac_prev"; then
150 eval "$ac_prev=\$ac_option"
151 ac_prev=
152 continue
153 fi
154
155 case "$ac_option" in
156 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
157 *) ac_optarg= ;;
158 esac
159
160 # Accept the important Cygnus configure options, so we can diagnose typos.
161
162 case "$ac_option" in
163
164 -bindir | --bindir | --bindi | --bind | --bin | --bi)
165 ac_prev=bindir ;;
166 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
167 bindir="$ac_optarg" ;;
168
169 -build | --build | --buil | --bui | --bu)
170 ac_prev=build ;;
171 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
172 build="$ac_optarg" ;;
173
174 -cache-file | --cache-file | --cache-fil | --cache-fi \
175 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
176 ac_prev=cache_file ;;
177 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
178 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
179 cache_file="$ac_optarg" ;;
180
181 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
182 ac_prev=datadir ;;
183 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
184 | --da=*)
185 datadir="$ac_optarg" ;;
186
187 -disable-* | --disable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
192 fi
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 eval "enable_${ac_feature}=no" ;;
195
196 -enable-* | --enable-*)
197 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
198 # Reject names that are not valid shell variable names.
199 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
200 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
201 fi
202 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
203 case "$ac_option" in
204 *=*) ;;
205 *) ac_optarg=yes ;;
206 esac
207 eval "enable_${ac_feature}='$ac_optarg'" ;;
208
209 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
210 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
211 | --exec | --exe | --ex)
212 ac_prev=exec_prefix ;;
213 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
214 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
215 | --exec=* | --exe=* | --ex=*)
216 exec_prefix="$ac_optarg" ;;
217
218 -gas | --gas | --ga | --g)
219 # Obsolete; use --with-gas.
220 with_gas=yes ;;
221
222 -help | --help | --hel | --he)
223 # Omit some internal or obsolete options to make the list less imposing.
224 # This message is too long to be a string in the A/UX 3.1 sh.
225 cat << EOF
226 Usage: configure [options] [host]
227 Options: [defaults in brackets after descriptions]
228 Configuration:
229 --cache-file=FILE cache test results in FILE
230 --help print this message
231 --no-create do not create output files
232 --quiet, --silent do not print \`checking...' messages
233 --version print the version of autoconf that created configure
234 Directory and file names:
235 --prefix=PREFIX install architecture-independent files in PREFIX
236 [$ac_default_prefix]
237 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
238 [same as prefix]
239 --bindir=DIR user executables in DIR [EPREFIX/bin]
240 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
241 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
242 --datadir=DIR read-only architecture-independent data in DIR
243 [PREFIX/share]
244 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
245 --sharedstatedir=DIR modifiable architecture-independent data in DIR
246 [PREFIX/com]
247 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
248 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
249 --includedir=DIR C header files in DIR [PREFIX/include]
250 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
251 --infodir=DIR info documentation in DIR [PREFIX/info]
252 --mandir=DIR man documentation in DIR [PREFIX/man]
253 --srcdir=DIR find the sources in DIR [configure dir or ..]
254 --program-prefix=PREFIX prepend PREFIX to installed program names
255 --program-suffix=SUFFIX append SUFFIX to installed program names
256 --program-transform-name=PROGRAM
257 run sed PROGRAM on installed program names
258 EOF
259 cat << EOF
260 Host type:
261 --build=BUILD configure for building on BUILD [BUILD=HOST]
262 --host=HOST configure for HOST [guessed]
263 --target=TARGET configure for TARGET [TARGET=HOST]
264 Features and packages:
265 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
266 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
267 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
268 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
269 --x-includes=DIR X include files are in DIR
270 --x-libraries=DIR X library files are in DIR
271 EOF
272 if test -n "$ac_help"; then
273 echo "--enable and --with options recognized:$ac_help"
274 fi
275 exit 0 ;;
276
277 -host | --host | --hos | --ho)
278 ac_prev=host ;;
279 -host=* | --host=* | --hos=* | --ho=*)
280 host="$ac_optarg" ;;
281
282 -includedir | --includedir | --includedi | --included | --include \
283 | --includ | --inclu | --incl | --inc)
284 ac_prev=includedir ;;
285 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
286 | --includ=* | --inclu=* | --incl=* | --inc=*)
287 includedir="$ac_optarg" ;;
288
289 -infodir | --infodir | --infodi | --infod | --info | --inf)
290 ac_prev=infodir ;;
291 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
292 infodir="$ac_optarg" ;;
293
294 -libdir | --libdir | --libdi | --libd)
295 ac_prev=libdir ;;
296 -libdir=* | --libdir=* | --libdi=* | --libd=*)
297 libdir="$ac_optarg" ;;
298
299 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
300 | --libexe | --libex | --libe)
301 ac_prev=libexecdir ;;
302 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
303 | --libexe=* | --libex=* | --libe=*)
304 libexecdir="$ac_optarg" ;;
305
306 -localstatedir | --localstatedir | --localstatedi | --localstated \
307 | --localstate | --localstat | --localsta | --localst \
308 | --locals | --local | --loca | --loc | --lo)
309 ac_prev=localstatedir ;;
310 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
311 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
312 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
313 localstatedir="$ac_optarg" ;;
314
315 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
316 ac_prev=mandir ;;
317 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
318 mandir="$ac_optarg" ;;
319
320 -nfp | --nfp | --nf)
321 # Obsolete; use --without-fp.
322 with_fp=no ;;
323
324 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
325 | --no-cr | --no-c)
326 no_create=yes ;;
327
328 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
329 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
330 no_recursion=yes ;;
331
332 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
333 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
334 | --oldin | --oldi | --old | --ol | --o)
335 ac_prev=oldincludedir ;;
336 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
337 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
338 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
339 oldincludedir="$ac_optarg" ;;
340
341 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
342 ac_prev=prefix ;;
343 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
344 prefix="$ac_optarg" ;;
345
346 -program-prefix | --program-prefix | --program-prefi | --program-pref \
347 | --program-pre | --program-pr | --program-p)
348 ac_prev=program_prefix ;;
349 -program-prefix=* | --program-prefix=* | --program-prefi=* \
350 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
351 program_prefix="$ac_optarg" ;;
352
353 -program-suffix | --program-suffix | --program-suffi | --program-suff \
354 | --program-suf | --program-su | --program-s)
355 ac_prev=program_suffix ;;
356 -program-suffix=* | --program-suffix=* | --program-suffi=* \
357 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
358 program_suffix="$ac_optarg" ;;
359
360 -program-transform-name | --program-transform-name \
361 | --program-transform-nam | --program-transform-na \
362 | --program-transform-n | --program-transform- \
363 | --program-transform | --program-transfor \
364 | --program-transfo | --program-transf \
365 | --program-trans | --program-tran \
366 | --progr-tra | --program-tr | --program-t)
367 ac_prev=program_transform_name ;;
368 -program-transform-name=* | --program-transform-name=* \
369 | --program-transform-nam=* | --program-transform-na=* \
370 | --program-transform-n=* | --program-transform-=* \
371 | --program-transform=* | --program-transfor=* \
372 | --program-transfo=* | --program-transf=* \
373 | --program-trans=* | --program-tran=* \
374 | --progr-tra=* | --program-tr=* | --program-t=*)
375 program_transform_name="$ac_optarg" ;;
376
377 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
378 | -silent | --silent | --silen | --sile | --sil)
379 silent=yes ;;
380
381 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
382 ac_prev=sbindir ;;
383 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
384 | --sbi=* | --sb=*)
385 sbindir="$ac_optarg" ;;
386
387 -sharedstatedir | --sharedstatedir | --sharedstatedi \
388 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
389 | --sharedst | --shareds | --shared | --share | --shar \
390 | --sha | --sh)
391 ac_prev=sharedstatedir ;;
392 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
393 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
394 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
395 | --sha=* | --sh=*)
396 sharedstatedir="$ac_optarg" ;;
397
398 -site | --site | --sit)
399 ac_prev=site ;;
400 -site=* | --site=* | --sit=*)
401 site="$ac_optarg" ;;
402
403 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
404 ac_prev=srcdir ;;
405 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
406 srcdir="$ac_optarg" ;;
407
408 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
409 | --syscon | --sysco | --sysc | --sys | --sy)
410 ac_prev=sysconfdir ;;
411 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
412 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
413 sysconfdir="$ac_optarg" ;;
414
415 -target | --target | --targe | --targ | --tar | --ta | --t)
416 ac_prev=target ;;
417 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
418 target="$ac_optarg" ;;
419
420 -v | -verbose | --verbose | --verbos | --verbo | --verb)
421 verbose=yes ;;
422
423 -version | --version | --versio | --versi | --vers)
424 echo "configure generated by autoconf version 2.13"
425 exit 0 ;;
426
427 -with-* | --with-*)
428 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
429 # Reject names that are not valid shell variable names.
430 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
431 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
432 fi
433 ac_package=`echo $ac_package| sed 's/-/_/g'`
434 case "$ac_option" in
435 *=*) ;;
436 *) ac_optarg=yes ;;
437 esac
438 eval "with_${ac_package}='$ac_optarg'" ;;
439
440 -without-* | --without-*)
441 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
442 # Reject names that are not valid shell variable names.
443 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
444 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
445 fi
446 ac_package=`echo $ac_package| sed 's/-/_/g'`
447 eval "with_${ac_package}=no" ;;
448
449 --x)
450 # Obsolete; use --with-x.
451 with_x=yes ;;
452
453 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
454 | --x-incl | --x-inc | --x-in | --x-i)
455 ac_prev=x_includes ;;
456 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
457 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
458 x_includes="$ac_optarg" ;;
459
460 -x-libraries | --x-libraries | --x-librarie | --x-librari \
461 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
462 ac_prev=x_libraries ;;
463 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
464 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
465 x_libraries="$ac_optarg" ;;
466
467 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
468 ;;
469
470 *)
471 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
472 echo "configure: warning: $ac_option: invalid host type" 1>&2
473 fi
474 if test "x$nonopt" != xNONE; then
475 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
476 fi
477 nonopt="$ac_option"
478 ;;
479
480 esac
481 done
482
483 if test -n "$ac_prev"; then
484 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
485 fi
486
487 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
488
489 # File descriptor usage:
490 # 0 standard input
491 # 1 file creation
492 # 2 errors and warnings
493 # 3 some systems may open it to /dev/tty
494 # 4 used on the Kubota Titan
495 # 6 checking for... messages and results
496 # 5 compiler messages saved in config.log
497 if test "$silent" = yes; then
498 exec 6>/dev/null
499 else
500 exec 6>&1
501 fi
502 exec 5>./config.log
503
504 echo "\
505 This file contains any messages produced by compilers while
506 running configure, to aid debugging if configure makes a mistake.
507 " 1>&5
508
509 # Strip out --no-create and --no-recursion so they do not pile up.
510 # Also quote any args containing shell metacharacters.
511 ac_configure_args=
512 for ac_arg
513 do
514 case "$ac_arg" in
515 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
516 | --no-cr | --no-c) ;;
517 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
518 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
519 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
520 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
521 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
522 esac
523 done
524
525 # NLS nuisances.
526 # Only set these to C if already set. These must not be set unconditionally
527 # because not all systems understand e.g. LANG=C (notably SCO).
528 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
529 # Non-C LC_CTYPE values break the ctype check.
530 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
531 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
532 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
533 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
534
535 # confdefs.h avoids OS command line length limits that DEFS can exceed.
536 rm -rf conftest* confdefs.h
537 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
538 echo > confdefs.h
539
540 # A filename unique to this package, relative to the directory that
541 # configure is in, which we can look for to find out if srcdir is correct.
542 ac_unique_file=tree.c
543
544 # Find the source files, if location was not specified.
545 if test -z "$srcdir"; then
546 ac_srcdir_defaulted=yes
547 # Try the directory containing this script, then its parent.
548 ac_prog=$0
549 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
550 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
551 srcdir=$ac_confdir
552 if test ! -r $srcdir/$ac_unique_file; then
553 srcdir=..
554 fi
555 else
556 ac_srcdir_defaulted=no
557 fi
558 if test ! -r $srcdir/$ac_unique_file; then
559 if test "$ac_srcdir_defaulted" = yes; then
560 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
561 else
562 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
563 fi
564 fi
565 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
566
567 # Prefer explicitly selected file to automatically selected ones.
568 if test -z "$CONFIG_SITE"; then
569 if test "x$prefix" != xNONE; then
570 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
571 else
572 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
573 fi
574 fi
575 for ac_site_file in $CONFIG_SITE; do
576 if test -r "$ac_site_file"; then
577 echo "loading site script $ac_site_file"
578 . "$ac_site_file"
579 fi
580 done
581
582 if test -r "$cache_file"; then
583 echo "loading cache $cache_file"
584 . $cache_file
585 else
586 echo "creating cache $cache_file"
587 > $cache_file
588 fi
589
590 ac_ext=c
591 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
592 ac_cpp='$CPP $CPPFLAGS'
593 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
594 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
595 cross_compiling=$ac_cv_prog_cc_cross
596
597 ac_exeext=
598 ac_objext=o
599 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
600 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
601 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602 ac_n= ac_c='
603 ' ac_t=' '
604 else
605 ac_n=-n ac_c= ac_t=
606 fi
607 else
608 ac_n= ac_c='\c' ac_t=
609 fi
610
611
612
613
614 remove=rm
615 hard_link=ln
616 symbolic_link='ln -s'
617 copy=cp
618
619 # Check for bogus environment variables.
620 # Test if LIBRARY_PATH contains the notation for the current directory
621 # since this would lead to problems installing/building glibc.
622 # LIBRARY_PATH contains the current directory if one of the following
623 # is true:
624 # - one of the terminals (":" and ";") is the first or last sign
625 # - two terminals occur directly after each other
626 # - the path contains an element with a dot in it
627 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
628 echo "configure:629: checking LIBRARY_PATH variable" >&5
629 case ${LIBRARY_PATH} in
630 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
631 library_path_setting="contains current directory"
632 ;;
633 *)
634 library_path_setting="ok"
635 ;;
636 esac
637 echo "$ac_t""$library_path_setting" 1>&6
638 if test "$library_path_setting" != "ok"; then
639 { echo "configure: error:
640 *** LIBRARY_PATH shouldn't contain the current directory when
641 *** building gcc. Please change the environment variable
642 *** and run configure again." 1>&2; exit 1; }
643 fi
644
645 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
646 # since this would lead to problems installing/building glibc.
647 # GCC_EXEC_PREFIX contains the current directory if one of the following
648 # is true:
649 # - one of the terminals (":" and ";") is the first or last sign
650 # - two terminals occur directly after each other
651 # - the path contains an element with a dot in it
652 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
653 echo "configure:654: checking GCC_EXEC_PREFIX variable" >&5
654 case ${GCC_EXEC_PREFIX} in
655 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
656 gcc_exec_prefix_setting="contains current directory"
657 ;;
658 *)
659 gcc_exec_prefix_setting="ok"
660 ;;
661 esac
662 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
663 if test "$gcc_exec_prefix_setting" != "ok"; then
664 { echo "configure: error:
665 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
666 *** building gcc. Please change the environment variable
667 *** and run configure again." 1>&2; exit 1; }
668 fi
669
670 # Check for additional parameters
671
672 # With GNU ld
673 # Check whether --with-gnu-ld or --without-gnu-ld was given.
674 if test "${with_gnu_ld+set}" = set; then
675 withval="$with_gnu_ld"
676 gnu_ld_flag="$with_gnu_ld"
677 else
678 gnu_ld_flag=no
679 fi
680
681
682 # With pre-defined ld
683 # Check whether --with-ld or --without-ld was given.
684 if test "${with_ld+set}" = set; then
685 withval="$with_ld"
686 DEFAULT_LINKER="$with_ld"
687 fi
688
689 if test x"${DEFAULT_LINKER+set}" = x"set"; then
690 if test ! -x "$DEFAULT_LINKER"; then
691 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
692 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
693 gnu_ld_flag=yes
694 fi
695 cat >> confdefs.h <<EOF
696 #define DEFAULT_LINKER "$DEFAULT_LINKER"
697 EOF
698
699 fi
700
701 # With GNU as
702 # Check whether --with-gnu-as or --without-gnu-as was given.
703 if test "${with_gnu_as+set}" = set; then
704 withval="$with_gnu_as"
705 gas_flag="$with_gnu_as"
706 else
707 gas_flag=no
708 fi
709
710
711 # Check whether --with-as or --without-as was given.
712 if test "${with_as+set}" = set; then
713 withval="$with_as"
714 DEFAULT_ASSEMBLER="$with_as"
715 fi
716
717 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
718 if test ! -x "$DEFAULT_ASSEMBLER"; then
719 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
720 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
721 gas_flag=yes
722 fi
723 cat >> confdefs.h <<EOF
724 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
725 EOF
726
727 fi
728
729 # With stabs
730 # Check whether --with-stabs or --without-stabs was given.
731 if test "${with_stabs+set}" = set; then
732 withval="$with_stabs"
733 stabs="$with_stabs"
734 else
735 stabs=no
736 fi
737
738
739 # With ELF
740 # Check whether --with-elf or --without-elf was given.
741 if test "${with_elf+set}" = set; then
742 withval="$with_elf"
743 elf="$with_elf"
744 else
745 elf=no
746 fi
747
748
749 # Specify the local prefix
750 local_prefix=
751 # Check whether --with-local-prefix or --without-local-prefix was given.
752 if test "${with_local_prefix+set}" = set; then
753 withval="$with_local_prefix"
754 case "${withval}" in
755 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
756 no) ;;
757 *) local_prefix=$with_local_prefix ;;
758 esac
759 fi
760
761
762 # Default local prefix if it is empty
763 if test x$local_prefix = x; then
764 local_prefix=/usr/local
765 fi
766
767 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
768 # passed in by the toplevel make and thus we'd get different behavior
769 # depending on where we built the sources.
770 gcc_gxx_include_dir=
771 # Specify the g++ header file directory
772 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
773 if test "${with_gxx_include_dir+set}" = set; then
774 withval="$with_gxx_include_dir"
775 case "${withval}" in
776 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
777 no) ;;
778 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
779 esac
780 fi
781
782
783 if test x${gcc_gxx_include_dir} = x; then
784 if test x${enable_version_specific_runtime_libs} = xyes; then
785 gcc_gxx_include_dir='${libsubdir}/include/c++'
786 else
787 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
788 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
789 fi
790 fi
791
792 # Determine whether or not multilibs are enabled.
793 # Check whether --enable-multilib or --disable-multilib was given.
794 if test "${enable_multilib+set}" = set; then
795 enableval="$enable_multilib"
796 :
797 else
798 enable_multilib=yes
799 fi
800
801
802
803 # Enable expensive internal checks
804 # Check whether --enable-checking or --disable-checking was given.
805 if test "${enable_checking+set}" = set; then
806 enableval="$enable_checking"
807 ac_checking=
808 ac_tree_checking=
809 ac_rtl_checking=
810 ac_rtlflag_checking=
811 ac_gc_checking=
812 ac_gc_always_collect=
813 case "${enableval}" in
814 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
815 ac_rtlflag_checking=1 ;;
816 no) ;;
817 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
818 set fnord $enableval; shift
819 IFS="$ac_save_IFS"
820 for check
821 do
822 case $check in
823 misc) ac_checking=1 ;;
824 tree) ac_tree_checking=1 ;;
825 rtlflag) ac_rtlflag_checking=1 ;;
826 rtl) ac_rtl_checking=1 ;;
827 gc) ac_gc_checking=1 ;;
828 gcac) ac_gc_always_collect=1 ;;
829 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
830 esac
831 done
832 ;;
833 esac
834
835 else
836 # Enable some checks by default for development versions of GCC
837 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
838 fi
839
840 if test x$ac_checking != x ; then
841 cat >> confdefs.h <<\EOF
842 #define ENABLE_CHECKING 1
843 EOF
844
845 fi
846 if test x$ac_tree_checking != x ; then
847 cat >> confdefs.h <<\EOF
848 #define ENABLE_TREE_CHECKING 1
849 EOF
850
851 fi
852 if test x$ac_rtl_checking != x ; then
853 cat >> confdefs.h <<\EOF
854 #define ENABLE_RTL_CHECKING 1
855 EOF
856
857 fi
858 if test x$ac_rtlflag_checking != x ; then
859 cat >> confdefs.h <<\EOF
860 #define ENABLE_RTL_FLAG_CHECKING 1
861 EOF
862
863 fi
864 if test x$ac_gc_checking != x ; then
865 cat >> confdefs.h <<\EOF
866 #define ENABLE_GC_CHECKING 1
867 EOF
868
869 fi
870 if test x$ac_gc_always_collect != x ; then
871 cat >> confdefs.h <<\EOF
872 #define ENABLE_GC_ALWAYS_COLLECT 1
873 EOF
874
875 fi
876
877 # Enable code coverage collection
878 # Check whether --enable-coverage or --disable-coverage was given.
879 if test "${enable_coverage+set}" = set; then
880 enableval="$enable_coverage"
881 case "${enableval}" in
882 yes|noopt)
883 coverage_flags="-fprofile-arcs -ftest-coverage -O0"
884 ;;
885 opt)
886 coverage_flags="-fprofile-arcs -ftest-coverage -O2"
887 ;;
888 *)
889 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
890 ;;
891 esac
892 else
893 coverage_flags="-O2"
894 fi
895
896
897
898 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
899 if test "${with_cpp_install_dir+set}" = set; then
900 withval="$with_cpp_install_dir"
901 if test x$withval = xyes; then
902 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
903 elif test x$withval != xno; then
904 cpp_install_dir=$withval
905 fi
906 fi
907
908
909 # Enable __cxa_atexit for C++.
910 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
911 if test "${enable___cxa_atexit+set}" = set; then
912 enableval="$enable___cxa_atexit"
913 :
914 fi
915
916 if test x$enable___cxa_atexit = xyes; then
917 cat >> confdefs.h <<\EOF
918 #define DEFAULT_USE_CXA_ATEXIT 1
919 EOF
920
921 fi
922
923 # Enable Multibyte Characters for C/C++
924 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
925 if test "${enable_c_mbchar+set}" = set; then
926 enableval="$enable_c_mbchar"
927 if test x$enable_c_mbchar != xno; then
928 cat >> confdefs.h <<\EOF
929 #define MULTIBYTE_CHARS 1
930 EOF
931
932 fi
933 fi
934
935
936 # Enable threads
937 # Pass with no value to take the default
938 # Pass with a value to specify a thread package
939 # Check whether --enable-threads or --disable-threads was given.
940 if test "${enable_threads+set}" = set; then
941 enableval="$enable_threads"
942 :
943 else
944 enable_threads=''
945 fi
946
947
948 enable_threads_flag=$enable_threads
949 # Check if a valid thread package
950 case x${enable_threads_flag} in
951 x | xno)
952 # No threads
953 target_thread_file='single'
954 ;;
955 xyes)
956 # default
957 target_thread_file=''
958 ;;
959 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
960 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
961 target_thread_file=$enable_threads_flag
962 ;;
963 *)
964 echo "$enable_threads is an unknown thread package" 1>&2
965 exit 1
966 ;;
967 esac
968
969 # Check whether --enable-objc-gc or --disable-objc-gc was given.
970 if test "${enable_objc_gc+set}" = set; then
971 enableval="$enable_objc_gc"
972 if test x$enable_objc_gc = xno; then
973 objc_boehm_gc=''
974 else
975 objc_boehm_gc=1
976 fi
977 else
978 objc_boehm_gc=''
979 fi
980
981
982 # Check whether --with-dwarf2 or --without-dwarf2 was given.
983 if test "${with_dwarf2+set}" = set; then
984 withval="$with_dwarf2"
985 dwarf2="$with_dwarf2"
986 else
987 dwarf2=no
988 fi
989
990
991 # Check whether --enable-shared or --disable-shared was given.
992 if test "${enable_shared+set}" = set; then
993 enableval="$enable_shared"
994
995 case $enable_shared in
996 yes | no) ;;
997 *)
998 enable_shared=no
999 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1000 for pkg in $enableval; do
1001 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
1002 enable_shared=yes
1003 fi
1004 done
1005 IFS="$ac_save_ifs"
1006 ;;
1007 esac
1008
1009 else
1010 enable_shared=yes
1011 fi
1012
1013
1014
1015 # Determine the host, build, and target systems
1016 ac_aux_dir=
1017 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1018 if test -f $ac_dir/install-sh; then
1019 ac_aux_dir=$ac_dir
1020 ac_install_sh="$ac_aux_dir/install-sh -c"
1021 break
1022 elif test -f $ac_dir/install.sh; then
1023 ac_aux_dir=$ac_dir
1024 ac_install_sh="$ac_aux_dir/install.sh -c"
1025 break
1026 fi
1027 done
1028 if test -z "$ac_aux_dir"; then
1029 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1030 fi
1031 ac_config_guess=$ac_aux_dir/config.guess
1032 ac_config_sub=$ac_aux_dir/config.sub
1033 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1034
1035
1036 # Do some error checking and defaulting for the host and target type.
1037 # The inputs are:
1038 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1039 #
1040 # The rules are:
1041 # 1. You are not allowed to specify --host, --target, and nonopt at the
1042 # same time.
1043 # 2. Host defaults to nonopt.
1044 # 3. If nonopt is not specified, then host defaults to the current host,
1045 # as determined by config.guess.
1046 # 4. Target and build default to nonopt.
1047 # 5. If nonopt is not specified, then target and build default to host.
1048
1049 # The aliases save the names the user supplied, while $host etc.
1050 # will get canonicalized.
1051 case $host---$target---$nonopt in
1052 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1053 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1054 esac
1055
1056
1057 # Make sure we can run config.sub.
1058 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1059 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1060 fi
1061
1062 echo $ac_n "checking host system type""... $ac_c" 1>&6
1063 echo "configure:1064: checking host system type" >&5
1064
1065 host_alias=$host
1066 case "$host_alias" in
1067 NONE)
1068 case $nonopt in
1069 NONE)
1070 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1071 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1072 fi ;;
1073 *) host_alias=$nonopt ;;
1074 esac ;;
1075 esac
1076
1077 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1078 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1079 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1080 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1081 echo "$ac_t""$host" 1>&6
1082
1083 echo $ac_n "checking target system type""... $ac_c" 1>&6
1084 echo "configure:1085: checking target system type" >&5
1085
1086 target_alias=$target
1087 case "$target_alias" in
1088 NONE)
1089 case $nonopt in
1090 NONE) target_alias=$host_alias ;;
1091 *) target_alias=$nonopt ;;
1092 esac ;;
1093 esac
1094
1095 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1096 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1097 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1098 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1099 echo "$ac_t""$target" 1>&6
1100
1101 echo $ac_n "checking build system type""... $ac_c" 1>&6
1102 echo "configure:1103: checking build system type" >&5
1103
1104 build_alias=$build
1105 case "$build_alias" in
1106 NONE)
1107 case $nonopt in
1108 NONE) build_alias=$host_alias ;;
1109 *) build_alias=$nonopt ;;
1110 esac ;;
1111 esac
1112
1113 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1114 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1115 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1116 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117 echo "$ac_t""$build" 1>&6
1118
1119 test "$host_alias" != "$target_alias" &&
1120 test "$program_prefix$program_suffix$program_transform_name" = \
1121 NONENONEs,x,x, &&
1122 program_prefix=${target_alias}-
1123
1124
1125 # Set program_transform_name
1126 if test "$program_transform_name" = s,x,x,; then
1127 program_transform_name=
1128 else
1129 # Double any \ or $. echo might interpret backslashes.
1130 cat <<\EOF_SED > conftestsed
1131 s,\\,\\\\,g; s,\$,$$,g
1132 EOF_SED
1133 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1134 rm -f conftestsed
1135 fi
1136 test "$program_prefix" != NONE &&
1137 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1138 # Use a double $ so make ignores it.
1139 test "$program_suffix" != NONE &&
1140 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1141
1142 # sed with no file args requires a program.
1143 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1144
1145
1146 # Find the native compiler
1147 # Extract the first word of "gcc", so it can be a program name with args.
1148 set dummy gcc; ac_word=$2
1149 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1150 echo "configure:1151: checking for $ac_word" >&5
1151 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1152 echo $ac_n "(cached) $ac_c" 1>&6
1153 else
1154 if test -n "$CC"; then
1155 ac_cv_prog_CC="$CC" # Let the user override the test.
1156 else
1157 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1158 ac_dummy="$PATH"
1159 for ac_dir in $ac_dummy; do
1160 test -z "$ac_dir" && ac_dir=.
1161 if test -f $ac_dir/$ac_word; then
1162 ac_cv_prog_CC="gcc"
1163 break
1164 fi
1165 done
1166 IFS="$ac_save_ifs"
1167 fi
1168 fi
1169 CC="$ac_cv_prog_CC"
1170 if test -n "$CC"; then
1171 echo "$ac_t""$CC" 1>&6
1172 else
1173 echo "$ac_t""no" 1>&6
1174 fi
1175
1176 if test -z "$CC"; then
1177 # Extract the first word of "cc", so it can be a program name with args.
1178 set dummy cc; ac_word=$2
1179 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1180 echo "configure:1181: checking for $ac_word" >&5
1181 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184 if test -n "$CC"; then
1185 ac_cv_prog_CC="$CC" # Let the user override the test.
1186 else
1187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1188 ac_prog_rejected=no
1189 ac_dummy="$PATH"
1190 for ac_dir in $ac_dummy; do
1191 test -z "$ac_dir" && ac_dir=.
1192 if test -f $ac_dir/$ac_word; then
1193 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1194 ac_prog_rejected=yes
1195 continue
1196 fi
1197 ac_cv_prog_CC="cc"
1198 break
1199 fi
1200 done
1201 IFS="$ac_save_ifs"
1202 if test $ac_prog_rejected = yes; then
1203 # We found a bogon in the path, so make sure we never use it.
1204 set dummy $ac_cv_prog_CC
1205 shift
1206 if test $# -gt 0; then
1207 # We chose a different compiler from the bogus one.
1208 # However, it has the same basename, so the bogon will be chosen
1209 # first if we set CC to just the basename; use the full file name.
1210 shift
1211 set dummy "$ac_dir/$ac_word" "$@"
1212 shift
1213 ac_cv_prog_CC="$@"
1214 fi
1215 fi
1216 fi
1217 fi
1218 CC="$ac_cv_prog_CC"
1219 if test -n "$CC"; then
1220 echo "$ac_t""$CC" 1>&6
1221 else
1222 echo "$ac_t""no" 1>&6
1223 fi
1224
1225 if test -z "$CC"; then
1226 case "`uname -s`" in
1227 *win32* | *WIN32*)
1228 # Extract the first word of "cl", so it can be a program name with args.
1229 set dummy cl; ac_word=$2
1230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_word" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235 if test -n "$CC"; then
1236 ac_cv_prog_CC="$CC" # Let the user override the test.
1237 else
1238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1239 ac_dummy="$PATH"
1240 for ac_dir in $ac_dummy; do
1241 test -z "$ac_dir" && ac_dir=.
1242 if test -f $ac_dir/$ac_word; then
1243 ac_cv_prog_CC="cl"
1244 break
1245 fi
1246 done
1247 IFS="$ac_save_ifs"
1248 fi
1249 fi
1250 CC="$ac_cv_prog_CC"
1251 if test -n "$CC"; then
1252 echo "$ac_t""$CC" 1>&6
1253 else
1254 echo "$ac_t""no" 1>&6
1255 fi
1256 ;;
1257 esac
1258 fi
1259 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1260 fi
1261
1262 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1263 echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1264
1265 ac_ext=c
1266 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1267 ac_cpp='$CPP $CPPFLAGS'
1268 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1269 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1270 cross_compiling=$ac_cv_prog_cc_cross
1271
1272 cat > conftest.$ac_ext << EOF
1273
1274 #line 1275 "configure"
1275 #include "confdefs.h"
1276
1277 main(){return(0);}
1278 EOF
1279 if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1280 ac_cv_prog_cc_works=yes
1281 # If we can't run a trivial program, we are probably using a cross compiler.
1282 if (./conftest; exit) 2>/dev/null; then
1283 ac_cv_prog_cc_cross=no
1284 else
1285 ac_cv_prog_cc_cross=yes
1286 fi
1287 else
1288 echo "configure: failed program was:" >&5
1289 cat conftest.$ac_ext >&5
1290 ac_cv_prog_cc_works=no
1291 fi
1292 rm -fr conftest*
1293 ac_ext=c
1294 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1295 ac_cpp='$CPP $CPPFLAGS'
1296 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1297 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1298 cross_compiling=$ac_cv_prog_cc_cross
1299
1300 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1301 if test $ac_cv_prog_cc_works = no; then
1302 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1303 fi
1304 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1306 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1307 cross_compiling=$ac_cv_prog_cc_cross
1308
1309 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1310 echo "configure:1311: checking whether we are using GNU C" >&5
1311 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314 cat > conftest.c <<EOF
1315 #ifdef __GNUC__
1316 yes;
1317 #endif
1318 EOF
1319 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1320 ac_cv_prog_gcc=yes
1321 else
1322 ac_cv_prog_gcc=no
1323 fi
1324 fi
1325
1326 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1327
1328 if test $ac_cv_prog_gcc = yes; then
1329 GCC=yes
1330 else
1331 GCC=
1332 fi
1333
1334 ac_test_CFLAGS="${CFLAGS+set}"
1335 ac_save_CFLAGS="$CFLAGS"
1336 CFLAGS=
1337 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1338 echo "configure:1339: checking whether ${CC-cc} accepts -g" >&5
1339 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1340 echo $ac_n "(cached) $ac_c" 1>&6
1341 else
1342 echo 'void f(){}' > conftest.c
1343 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1344 ac_cv_prog_cc_g=yes
1345 else
1346 ac_cv_prog_cc_g=no
1347 fi
1348 rm -f conftest*
1349
1350 fi
1351
1352 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1353 if test "$ac_test_CFLAGS" = set; then
1354 CFLAGS="$ac_save_CFLAGS"
1355 elif test $ac_cv_prog_cc_g = yes; then
1356 if test "$GCC" = yes; then
1357 CFLAGS="-g -O2"
1358 else
1359 CFLAGS="-g"
1360 fi
1361 else
1362 if test "$GCC" = yes; then
1363 CFLAGS="-O2"
1364 else
1365 CFLAGS=
1366 fi
1367 fi
1368
1369 if test "x$CC" != xcc; then
1370 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1371 echo "configure:1372: checking whether $CC and cc understand -c and -o together" >&5
1372 else
1373 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1374 echo "configure:1375: checking whether cc understands -c and -o together" >&5
1375 fi
1376 set dummy $CC; ac_cc="`echo $2 |
1377 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1378 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1379 echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381 echo 'foo(){}' > conftest.c
1382 # Make sure it works both with $CC and with simple cc.
1383 # We do the test twice because some compilers refuse to overwrite an
1384 # existing .o file with -o, though they will create one.
1385 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1386 if { (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1387 test -f conftest.o && { (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1388 then
1389 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1390 if test "x$CC" != xcc; then
1391 # Test first that cc exists at all.
1392 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1393 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1394 if { (eval echo configure:1395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1395 test -f conftest.o && { (eval echo configure:1396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1396 then
1397 # cc works too.
1398 :
1399 else
1400 # cc exists but doesn't like -o.
1401 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1402 fi
1403 fi
1404 fi
1405 else
1406 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1407 fi
1408 rm -f conftest*
1409
1410 fi
1411 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1412 echo "$ac_t""yes" 1>&6
1413 else
1414 echo "$ac_t""no" 1>&6
1415 cat >> confdefs.h <<\EOF
1416 #define NO_MINUS_C_MINUS_O 1
1417 EOF
1418
1419 fi
1420
1421 # autoconf is lame and doesn't give us any substitution variable for this.
1422 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1423 NO_MINUS_C_MINUS_O=yes
1424 else
1425 OUTPUT_OPTION='-o $@'
1426 fi
1427
1428
1429
1430 # See if GNAT has been installed
1431 if test $host != $build; then
1432 ac_tool_prefix=${host_alias}-
1433 else
1434 ac_tool_prefix=
1435 fi
1436
1437
1438 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1439 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1441 echo "configure:1442: checking for $ac_word" >&5
1442 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1443 echo $ac_n "(cached) $ac_c" 1>&6
1444 else
1445 if test -n "$GNATBIND"; then
1446 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1447 else
1448 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1449 ac_dummy="$PATH"
1450 for ac_dir in $ac_dummy; do
1451 test -z "$ac_dir" && ac_dir=.
1452 if test -f $ac_dir/$ac_word; then
1453 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1454 break
1455 fi
1456 done
1457 IFS="$ac_save_ifs"
1458 fi
1459 fi
1460 GNATBIND="$ac_cv_prog_GNATBIND"
1461 if test -n "$GNATBIND"; then
1462 echo "$ac_t""$GNATBIND" 1>&6
1463 else
1464 echo "$ac_t""no" 1>&6
1465 fi
1466
1467
1468 if test -z "$ac_cv_prog_GNATBIND"; then
1469 if test -n "$ac_tool_prefix"; then
1470 # Extract the first word of "gnatbind", so it can be a program name with args.
1471 set dummy gnatbind; ac_word=$2
1472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_word" >&5
1474 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477 if test -n "$GNATBIND"; then
1478 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1479 else
1480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1481 ac_dummy="$PATH"
1482 for ac_dir in $ac_dummy; do
1483 test -z "$ac_dir" && ac_dir=.
1484 if test -f $ac_dir/$ac_word; then
1485 ac_cv_prog_GNATBIND="gnatbind"
1486 break
1487 fi
1488 done
1489 IFS="$ac_save_ifs"
1490 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1491 fi
1492 fi
1493 GNATBIND="$ac_cv_prog_GNATBIND"
1494 if test -n "$GNATBIND"; then
1495 echo "$ac_t""$GNATBIND" 1>&6
1496 else
1497 echo "$ac_t""no" 1>&6
1498 fi
1499
1500 else
1501 GNATBIND="no"
1502 fi
1503 fi
1504
1505 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1506 echo "configure:1507: checking for compiler driver that understands Ada" >&5
1507 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1508 echo $ac_n "(cached) $ac_c" 1>&6
1509 else
1510 cat >conftest.adb <<EOF
1511 procedure conftest is begin null; end conftest;
1512 EOF
1513 gcc_cv_prog_adac=no
1514 # Have to do ac_tool_prefix and user overrides by hand.
1515 user_adac=$ADAC
1516 user_cc=$CC
1517 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1518 ${ac_tool_prefix}$user_cc $user_cc \
1519 ${ac_tool_prefix}gcc gcc \
1520 ${ac_tool_prefix}cc cc \
1521 ${ac_tool_prefix}gnatgcc gnatgcc \
1522 ${ac_tool_prefix}gnatcc gnatcc \
1523 ${ac_tool_prefix}adagcc adagcc \
1524 ${ac_tool_prefix}adacc adacc ; do
1525 # There is a bug in all released versions of GCC which causes the
1526 # driver to exit successfully when the appropriate language module
1527 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1528 # Therefore we must check for the error message as well as an
1529 # unsuccessful exit.
1530 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1531 if test x"$errors" = x; then
1532 gcc_cv_prog_adac=$cand
1533 break
1534 fi
1535 done
1536 rm -f conftest.*
1537 fi
1538
1539 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1540 ADAC=$gcc_cv_prog_adac
1541
1542
1543 if test x$GNATBIND != xno && test x$ADAC != xno; then
1544 have_gnat=yes
1545 else
1546 have_gnat=no
1547 fi
1548
1549
1550 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1551 echo "configure:1552: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1552 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1554 else
1555 save_CFLAGS="$CFLAGS"
1556 CFLAGS="-Wno-long-long"
1557 cat > conftest.$ac_ext <<EOF
1558 #line 1559 "configure"
1559 #include "confdefs.h"
1560
1561 int main() {
1562
1563 ; return 0; }
1564 EOF
1565 if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1566 rm -rf conftest*
1567 ac_cv_prog_cc_no_long_long=yes
1568 else
1569 echo "configure: failed program was:" >&5
1570 cat conftest.$ac_ext >&5
1571 rm -rf conftest*
1572 ac_cv_prog_cc_no_long_long=no
1573 fi
1574 rm -f conftest*
1575 CFLAGS="$save_CFLAGS"
1576 fi
1577
1578 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1579
1580 if test x$have_gnat != xno ; then
1581 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1582 echo "configure:1583: checking whether ${ADAC} accepts -Wno-long-long" >&5
1583 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586 cat >conftest.adb <<EOF
1587 procedure conftest is begin null; end conftest;
1588 EOF
1589 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1590 ac_cv_prog_adac_no_long_long=yes
1591 else
1592 ac_cv_prog_adac_no_long_long=no
1593 fi
1594 rm -f conftest*
1595 fi
1596
1597 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1598 else
1599 ac_cv_prog_adac_no_long_long=yes
1600 fi
1601
1602 strict1_warn=
1603 if test $ac_cv_prog_cc_no_long_long = yes && \
1604 test $ac_cv_prog_adac_no_long_long = yes ; then
1605 strict1_warn="-pedantic -Wno-long-long"
1606 fi
1607
1608
1609 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1610 echo "configure:1611: checking how to run the C preprocessor" >&5
1611 # On Suns, sometimes $CPP names a directory.
1612 if test -n "$CPP" && test -d "$CPP"; then
1613 CPP=
1614 fi
1615 if test -z "$CPP"; then
1616 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
1618 else
1619 # This must be in double quotes, not single quotes, because CPP may get
1620 # substituted into the Makefile and "${CC-cc}" will confuse make.
1621 CPP="${CC-cc} -E"
1622 # On the NeXT, cc -E runs the code through the compiler's parser,
1623 # not just through cpp.
1624 cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 #include <assert.h>
1628 Syntax Error
1629 EOF
1630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1631 { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1633 if test -z "$ac_err"; then
1634 :
1635 else
1636 echo "$ac_err" >&5
1637 echo "configure: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 rm -rf conftest*
1640 CPP="${CC-cc} -E -traditional-cpp"
1641 cat > conftest.$ac_ext <<EOF
1642 #line 1643 "configure"
1643 #include "confdefs.h"
1644 #include <assert.h>
1645 Syntax Error
1646 EOF
1647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1648 { (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1650 if test -z "$ac_err"; then
1651 :
1652 else
1653 echo "$ac_err" >&5
1654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1656 rm -rf conftest*
1657 CPP="${CC-cc} -nologo -E"
1658 cat > conftest.$ac_ext <<EOF
1659 #line 1660 "configure"
1660 #include "confdefs.h"
1661 #include <assert.h>
1662 Syntax Error
1663 EOF
1664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1665 { (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1667 if test -z "$ac_err"; then
1668 :
1669 else
1670 echo "$ac_err" >&5
1671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
1673 rm -rf conftest*
1674 CPP=/lib/cpp
1675 fi
1676 rm -f conftest*
1677 fi
1678 rm -f conftest*
1679 fi
1680 rm -f conftest*
1681 ac_cv_prog_CPP="$CPP"
1682 fi
1683 CPP="$ac_cv_prog_CPP"
1684 else
1685 ac_cv_prog_CPP="$CPP"
1686 fi
1687 echo "$ac_t""$CPP" 1>&6
1688
1689 echo $ac_n "checking for inline""... $ac_c" 1>&6
1690 echo "configure:1691: checking for inline" >&5
1691 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1692 echo $ac_n "(cached) $ac_c" 1>&6
1693 else
1694 ac_cv_c_inline=no
1695 for ac_kw in inline __inline__ __inline; do
1696 cat > conftest.$ac_ext <<EOF
1697 #line 1698 "configure"
1698 #include "confdefs.h"
1699
1700 int main() {
1701 } $ac_kw foo() {
1702 ; return 0; }
1703 EOF
1704 if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1705 rm -rf conftest*
1706 ac_cv_c_inline=$ac_kw; break
1707 else
1708 echo "configure: failed program was:" >&5
1709 cat conftest.$ac_ext >&5
1710 fi
1711 rm -f conftest*
1712 done
1713
1714 fi
1715
1716 echo "$ac_t""$ac_cv_c_inline" 1>&6
1717 case "$ac_cv_c_inline" in
1718 inline | yes) ;;
1719 no) cat >> confdefs.h <<\EOF
1720 #define inline
1721 EOF
1722 ;;
1723 *) cat >> confdefs.h <<EOF
1724 #define inline $ac_cv_c_inline
1725 EOF
1726 ;;
1727 esac
1728
1729 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1730 echo "configure:1731: checking for volatile" >&5
1731 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1733 else
1734 cat > conftest.$ac_ext <<EOF
1735 #line 1736 "configure"
1736 #include "confdefs.h"
1737
1738 int main() {
1739 volatile int foo;
1740 ; return 0; }
1741 EOF
1742 if { (eval echo configure:1743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1743 rm -rf conftest*
1744 gcc_cv_c_volatile=yes
1745 else
1746 echo "configure: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 rm -rf conftest*
1749 gcc_cv_c_volatile=no
1750 fi
1751 rm -f conftest*
1752 fi
1753
1754 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1755 if test $gcc_cv_c_volatile = yes ; then
1756 cat >> confdefs.h <<\EOF
1757 #define HAVE_VOLATILE 1
1758 EOF
1759
1760 fi
1761
1762
1763 echo $ac_n "checking for long double""... $ac_c" 1>&6
1764 echo "configure:1765: checking for long double" >&5
1765 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768 if test "$GCC" = yes; then
1769 gcc_cv_c_long_double=yes
1770 else
1771 cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 int main() {
1776 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1777 long double foo = 0.0;
1778 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1779 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1780 ; return 0; }
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1783 rm -rf conftest*
1784 gcc_cv_c_long_double=yes
1785 else
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -rf conftest*
1789 gcc_cv_c_long_double=no
1790 fi
1791 rm -f conftest*
1792 fi
1793 fi
1794
1795 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1796 if test $gcc_cv_c_long_double = yes; then
1797 cat >> confdefs.h <<\EOF
1798 #define HAVE_LONG_DOUBLE 1
1799 EOF
1800
1801 fi
1802
1803 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1804 echo "configure:1805: checking for long long int" >&5
1805 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811
1812 int main() {
1813 long long int i;
1814 ; return 0; }
1815 EOF
1816 if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1817 rm -rf conftest*
1818 ac_cv_c_long_long=yes
1819 else
1820 echo "configure: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1822 rm -rf conftest*
1823 ac_cv_c_long_long=no
1824 fi
1825 rm -f conftest*
1826 fi
1827
1828 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1829 if test $ac_cv_c_long_long = yes; then
1830 cat >> confdefs.h <<\EOF
1831 #define HAVE_LONG_LONG 1
1832 EOF
1833
1834 fi
1835 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1836 echo "configure:1837: checking for __int64" >&5
1837 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1838 echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840 cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843
1844 int main() {
1845 __int64 i;
1846 ; return 0; }
1847 EOF
1848 if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1849 rm -rf conftest*
1850 ac_cv_c___int64=yes
1851 else
1852 echo "configure: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1854 rm -rf conftest*
1855 ac_cv_c___int64=no
1856 fi
1857 rm -f conftest*
1858 fi
1859
1860 echo "$ac_t""$ac_cv_c___int64" 1>&6
1861 if test $ac_cv_c___int64 = yes; then
1862 cat >> confdefs.h <<\EOF
1863 #define HAVE___INT64 1
1864 EOF
1865
1866 fi
1867
1868 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1869 echo "configure:1870: checking for built-in _Bool" >&5
1870 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1871 echo $ac_n "(cached) $ac_c" 1>&6
1872 else
1873 cat > conftest.$ac_ext <<EOF
1874 #line 1875 "configure"
1875 #include "confdefs.h"
1876
1877 int main() {
1878 _Bool foo;
1879 ; return 0; }
1880 EOF
1881 if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1882 rm -rf conftest*
1883 gcc_cv_c__bool=yes
1884 else
1885 echo "configure: failed program was:" >&5
1886 cat conftest.$ac_ext >&5
1887 rm -rf conftest*
1888 gcc_cv_c__bool=no
1889 fi
1890 rm -f conftest*
1891
1892 fi
1893
1894 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1895 if test $gcc_cv_c__bool = yes; then
1896 cat >> confdefs.h <<\EOF
1897 #define HAVE__BOOL 1
1898 EOF
1899
1900 fi
1901
1902
1903 # sizeof(char) is 1 by definition.
1904 echo $ac_n "checking size of short""... $ac_c" 1>&6
1905 echo "configure:1906: checking size of short" >&5
1906 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1908 else
1909 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include "confdefs.h"
1914 #include <sys/types.h>
1915
1916
1917 int main() {
1918 switch (0) case 0: case (sizeof (short) == $ac_size):;
1919 ; return 0; }
1920 EOF
1921 if { (eval echo configure:1922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1922 rm -rf conftest*
1923 ac_cv_sizeof_short=$ac_size
1924 else
1925 echo "configure: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest*
1929 if test x$ac_cv_sizeof_short != x ; then break; fi
1930 done
1931
1932 fi
1933
1934 if test x$ac_cv_sizeof_short = x ; then
1935 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1936 fi
1937 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1938 cat >> confdefs.h <<EOF
1939 #define SIZEOF_SHORT $ac_cv_sizeof_short
1940 EOF
1941
1942
1943 echo $ac_n "checking size of int""... $ac_c" 1>&6
1944 echo "configure:1945: checking size of int" >&5
1945 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1946 echo $ac_n "(cached) $ac_c" 1>&6
1947 else
1948 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1949 cat > conftest.$ac_ext <<EOF
1950 #line 1951 "configure"
1951 #include "confdefs.h"
1952 #include "confdefs.h"
1953 #include <sys/types.h>
1954
1955
1956 int main() {
1957 switch (0) case 0: case (sizeof (int) == $ac_size):;
1958 ; return 0; }
1959 EOF
1960 if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1961 rm -rf conftest*
1962 ac_cv_sizeof_int=$ac_size
1963 else
1964 echo "configure: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 fi
1967 rm -f conftest*
1968 if test x$ac_cv_sizeof_int != x ; then break; fi
1969 done
1970
1971 fi
1972
1973 if test x$ac_cv_sizeof_int = x ; then
1974 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1975 fi
1976 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1977 cat >> confdefs.h <<EOF
1978 #define SIZEOF_INT $ac_cv_sizeof_int
1979 EOF
1980
1981
1982 echo $ac_n "checking size of long""... $ac_c" 1>&6
1983 echo "configure:1984: checking size of long" >&5
1984 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1985 echo $ac_n "(cached) $ac_c" 1>&6
1986 else
1987 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1988 cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 #include "confdefs.h"
1992 #include <sys/types.h>
1993
1994
1995 int main() {
1996 switch (0) case 0: case (sizeof (long) == $ac_size):;
1997 ; return 0; }
1998 EOF
1999 if { (eval echo configure:2000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2000 rm -rf conftest*
2001 ac_cv_sizeof_long=$ac_size
2002 else
2003 echo "configure: failed program was:" >&5
2004 cat conftest.$ac_ext >&5
2005 fi
2006 rm -f conftest*
2007 if test x$ac_cv_sizeof_long != x ; then break; fi
2008 done
2009
2010 fi
2011
2012 if test x$ac_cv_sizeof_long = x ; then
2013 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
2014 fi
2015 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2016 cat >> confdefs.h <<EOF
2017 #define SIZEOF_LONG $ac_cv_sizeof_long
2018 EOF
2019
2020
2021 if test $ac_cv_c_long_long = yes; then
2022 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2023 echo "configure:2024: checking size of long long" >&5
2024 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2025 echo $ac_n "(cached) $ac_c" 1>&6
2026 else
2027 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031 #include "confdefs.h"
2032 #include <sys/types.h>
2033
2034
2035 int main() {
2036 switch (0) case 0: case (sizeof (long long) == $ac_size):;
2037 ; return 0; }
2038 EOF
2039 if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2040 rm -rf conftest*
2041 ac_cv_sizeof_long_long=$ac_size
2042 else
2043 echo "configure: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 fi
2046 rm -f conftest*
2047 if test x$ac_cv_sizeof_long_long != x ; then break; fi
2048 done
2049
2050 fi
2051
2052 if test x$ac_cv_sizeof_long_long = x ; then
2053 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
2054 fi
2055 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2056 cat >> confdefs.h <<EOF
2057 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2058 EOF
2059
2060
2061 fi
2062 if test $ac_cv_c___int64 = yes; then
2063 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
2064 echo "configure:2065: checking size of __int64" >&5
2065 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
2066 echo $ac_n "(cached) $ac_c" 1>&6
2067 else
2068 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2069 cat > conftest.$ac_ext <<EOF
2070 #line 2071 "configure"
2071 #include "confdefs.h"
2072 #include "confdefs.h"
2073 #include <sys/types.h>
2074
2075
2076 int main() {
2077 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
2078 ; return 0; }
2079 EOF
2080 if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2081 rm -rf conftest*
2082 ac_cv_sizeof___int64=$ac_size
2083 else
2084 echo "configure: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 fi
2087 rm -f conftest*
2088 if test x$ac_cv_sizeof___int64 != x ; then break; fi
2089 done
2090
2091 fi
2092
2093 if test x$ac_cv_sizeof___int64 = x ; then
2094 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
2095 fi
2096 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
2097 cat >> confdefs.h <<EOF
2098 #define SIZEOF___INT64 $ac_cv_sizeof___int64
2099 EOF
2100
2101
2102 fi
2103
2104 echo $ac_n "checking execution character set""... $ac_c" 1>&6
2105 echo "configure:2106: checking execution character set" >&5
2106 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
2107 echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109 cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
2113 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
2114 ASCII
2115 #endif
2116 EOF
2117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2118 egrep "ASCII" >/dev/null 2>&1; then
2119 rm -rf conftest*
2120 ac_cv_c_charset=ASCII
2121 fi
2122 rm -f conftest*
2123
2124 if test x${ac_cv_c_charset+set} != xset; then
2125 cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
2129 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
2130 EBCDIC
2131 #endif
2132 EOF
2133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2134 egrep "EBCDIC" >/dev/null 2>&1; then
2135 rm -rf conftest*
2136 ac_cv_c_charset=EBCDIC
2137 fi
2138 rm -f conftest*
2139
2140 fi
2141 if test x${ac_cv_c_charset+set} != xset; then
2142 ac_cv_c_charset=unknown
2143 fi
2144 fi
2145
2146 echo "$ac_t""$ac_cv_c_charset" 1>&6
2147 if test $ac_cv_c_charset = unknown; then
2148 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
2149 elif test $ac_cv_c_charset = EBCDIC; then
2150 cat >> confdefs.h <<\EOF
2151 #define HOST_EBCDIC 1
2152 EOF
2153
2154 fi
2155
2156 # If the native compiler is GCC, we can enable warnings even in stage1.
2157 # That's useful for people building cross-compilers, or just running a
2158 # quick `make'.
2159 warn_cflags=
2160 if test "x$GCC" = "xyes"; then
2161 warn_cflags='$(GCC_WARN_CFLAGS)'
2162 fi
2163
2164
2165 # Stage specific cflags for build.
2166 stage1_cflags=
2167 case $build in
2168 vax-*-*)
2169 if test x$GCC = xyes
2170 then
2171 stage1_cflags="-Wa,-J"
2172 else
2173 stage1_cflags="-J"
2174 fi
2175 ;;
2176 powerpc-*-darwin*)
2177 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2178 # sources; use -no-cpp-precomp to get to GNU cpp.
2179 # Apple's GCC has bugs in designated initializer handling, so disable
2180 # that too.
2181 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2182 ;;
2183 esac
2184
2185
2186 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether ${MAKE-make} sets \${MAKE}" >&5
2188 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2189 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2190 echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192 cat > conftestmake <<\EOF
2193 all:
2194 @echo 'ac_maketemp="${MAKE}"'
2195 EOF
2196 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2197 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2198 if test -n "$ac_maketemp"; then
2199 eval ac_cv_prog_make_${ac_make}_set=yes
2200 else
2201 eval ac_cv_prog_make_${ac_make}_set=no
2202 fi
2203 rm -f conftestmake
2204 fi
2205 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2206 echo "$ac_t""yes" 1>&6
2207 SET_MAKE=
2208 else
2209 echo "$ac_t""no" 1>&6
2210 SET_MAKE="MAKE=${MAKE-make}"
2211 fi
2212
2213
2214 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2215 echo "configure:2216: checking whether a default assembler was specified" >&5
2216 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2217 if test x"$gas_flag" = x"no"; then
2218 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2219 else
2220 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2221 fi
2222 else
2223 echo "$ac_t""no" 1>&6
2224 fi
2225
2226 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2227 echo "configure:2228: checking whether a default linker was specified" >&5
2228 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2229 if test x"$gnu_ld_flag" = x"no"; then
2230 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2231 else
2232 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2233 fi
2234 else
2235 echo "$ac_t""no" 1>&6
2236 fi
2237
2238 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2239 echo "configure:2240: checking for GNU C library" >&5
2240 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242 else
2243 cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #include <features.h>
2247 int main() {
2248
2249 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2250 #error Not a GNU C library system
2251 #endif
2252 ; return 0; }
2253 EOF
2254 if { (eval echo configure:2255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2255 rm -rf conftest*
2256 gcc_cv_glibc=yes
2257 else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 gcc_cv_glibc=no
2262 fi
2263 rm -f conftest*
2264 fi
2265
2266 echo "$ac_t""$gcc_cv_glibc" 1>&6
2267 if test $gcc_cv_glibc = yes; then
2268 cat >> confdefs.h <<\EOF
2269 #define _GNU_SOURCE 1
2270 EOF
2271
2272 fi
2273
2274 # Find some useful tools
2275 for ac_prog in gawk mawk nawk awk
2276 do
2277 # Extract the first word of "$ac_prog", so it can be a program name with args.
2278 set dummy $ac_prog; ac_word=$2
2279 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2280 echo "configure:2281: checking for $ac_word" >&5
2281 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2283 else
2284 if test -n "$AWK"; then
2285 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2286 else
2287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2288 ac_dummy="$PATH"
2289 for ac_dir in $ac_dummy; do
2290 test -z "$ac_dir" && ac_dir=.
2291 if test -f $ac_dir/$ac_word; then
2292 ac_cv_prog_AWK="$ac_prog"
2293 break
2294 fi
2295 done
2296 IFS="$ac_save_ifs"
2297 fi
2298 fi
2299 AWK="$ac_cv_prog_AWK"
2300 if test -n "$AWK"; then
2301 echo "$ac_t""$AWK" 1>&6
2302 else
2303 echo "$ac_t""no" 1>&6
2304 fi
2305
2306 test -n "$AWK" && break
2307 done
2308
2309 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2310 echo "configure:2311: checking whether ln works" >&5
2311 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2313 else
2314 rm -f conftestdata_t
2315 echo >conftestdata_f
2316 if ln conftestdata_f conftestdata_t 2>/dev/null
2317 then
2318 gcc_cv_prog_LN="ln"
2319 else
2320 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2321 then
2322 gcc_cv_prog_LN="ln -s"
2323 else
2324 gcc_cv_prog_LN=cp
2325 fi
2326 fi
2327 rm -f conftestdata_f conftestdata_t
2328
2329 fi
2330 LN="$gcc_cv_prog_LN"
2331 if test "$gcc_cv_prog_LN" = "ln"; then
2332 echo "$ac_t""yes" 1>&6
2333 else
2334 if test "$gcc_cv_prog_LN" = "ln -s"; then
2335 echo "$ac_t""no, using ln -s" 1>&6
2336 else
2337 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2338 fi
2339 fi
2340
2341 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2342 echo "configure:2343: checking whether ln -s works" >&5
2343 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346 rm -f conftestdata_t
2347 echo >conftestdata_f
2348 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2349 then
2350 gcc_cv_prog_LN_S="ln -s"
2351 else
2352 if ln conftestdata_f conftestdata_t 2>/dev/null
2353 then
2354 gcc_cv_prog_LN_S=ln
2355 else
2356 gcc_cv_prog_LN_S=cp
2357 fi
2358 fi
2359 rm -f conftestdata_f conftestdata_t
2360
2361 fi
2362 LN_S="$gcc_cv_prog_LN_S"
2363 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2364 echo "$ac_t""yes" 1>&6
2365 else
2366 if test "$gcc_cv_prog_LN_S" = "ln"; then
2367 echo "$ac_t""no, using ln" 1>&6
2368 else
2369 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2370 fi
2371 fi
2372
2373 # Extract the first word of "ranlib", so it can be a program name with args.
2374 set dummy ranlib; ac_word=$2
2375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2376 echo "configure:2377: checking for $ac_word" >&5
2377 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380 if test -n "$RANLIB"; then
2381 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2382 else
2383 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2384 ac_dummy="$PATH"
2385 for ac_dir in $ac_dummy; do
2386 test -z "$ac_dir" && ac_dir=.
2387 if test -f $ac_dir/$ac_word; then
2388 ac_cv_prog_RANLIB="ranlib"
2389 break
2390 fi
2391 done
2392 IFS="$ac_save_ifs"
2393 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2394 fi
2395 fi
2396 RANLIB="$ac_cv_prog_RANLIB"
2397 if test -n "$RANLIB"; then
2398 echo "$ac_t""$RANLIB" 1>&6
2399 else
2400 echo "$ac_t""no" 1>&6
2401 fi
2402
2403 # Find a good install program. We prefer a C program (faster),
2404 # so one script is as good as another. But avoid the broken or
2405 # incompatible versions:
2406 # SysV /etc/install, /usr/sbin/install
2407 # SunOS /usr/etc/install
2408 # IRIX /sbin/install
2409 # AIX /bin/install
2410 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2411 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2412 # ./install, which can be erroneously created by make from ./install.sh.
2413 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2414 echo "configure:2415: checking for a BSD compatible install" >&5
2415 if test -z "$INSTALL"; then
2416 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418 else
2419 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2420 for ac_dir in $PATH; do
2421 # Account for people who put trailing slashes in PATH elements.
2422 case "$ac_dir/" in
2423 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2424 *)
2425 # OSF1 and SCO ODT 3.0 have their own names for install.
2426 for ac_prog in ginstall scoinst install; do
2427 if test -f $ac_dir/$ac_prog; then
2428 if test $ac_prog = install &&
2429 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2430 # AIX install. It has an incompatible calling convention.
2431 # OSF/1 installbsd also uses dspmsg, but is usable.
2432 :
2433 else
2434 ac_cv_path_install="$ac_dir/$ac_prog -c"
2435 break 2
2436 fi
2437 fi
2438 done
2439 ;;
2440 esac
2441 done
2442 IFS="$ac_save_IFS"
2443
2444 fi
2445 if test "${ac_cv_path_install+set}" = set; then
2446 INSTALL="$ac_cv_path_install"
2447 else
2448 # As a last resort, use the slow shell script. We don't cache a
2449 # path for INSTALL within a source directory, because that will
2450 # break other packages using the cache if that directory is
2451 # removed, or if the path is relative.
2452 INSTALL="$ac_install_sh"
2453 fi
2454 fi
2455 echo "$ac_t""$INSTALL" 1>&6
2456
2457 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2458 # It thinks the first close brace ends the variable substitution.
2459 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2460
2461 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2462
2463
2464 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2465 echo "configure:2466: checking for ANSI C header files" >&5
2466 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2467 echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 #include <stdlib.h>
2473 #include <stdarg.h>
2474 #include <string.h>
2475 #include <float.h>
2476 EOF
2477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2478 { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2480 if test -z "$ac_err"; then
2481 rm -rf conftest*
2482 ac_cv_header_stdc=yes
2483 else
2484 echo "$ac_err" >&5
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -rf conftest*
2488 ac_cv_header_stdc=no
2489 fi
2490 rm -f conftest*
2491
2492 if test $ac_cv_header_stdc = yes; then
2493 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2494 cat > conftest.$ac_ext <<EOF
2495 #line 2496 "configure"
2496 #include "confdefs.h"
2497 #include <string.h>
2498 EOF
2499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2500 egrep "memchr" >/dev/null 2>&1; then
2501 :
2502 else
2503 rm -rf conftest*
2504 ac_cv_header_stdc=no
2505 fi
2506 rm -f conftest*
2507
2508 fi
2509
2510 if test $ac_cv_header_stdc = yes; then
2511 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2512 cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <stdlib.h>
2516 EOF
2517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2518 egrep "free" >/dev/null 2>&1; then
2519 :
2520 else
2521 rm -rf conftest*
2522 ac_cv_header_stdc=no
2523 fi
2524 rm -f conftest*
2525
2526 fi
2527
2528 if test $ac_cv_header_stdc = yes; then
2529 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2530 if test "$cross_compiling" = yes; then
2531 :
2532 else
2533 cat > conftest.$ac_ext <<EOF
2534 #line 2535 "configure"
2535 #include "confdefs.h"
2536 #include <ctype.h>
2537 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2538 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2539 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2540 int main () { int i; for (i = 0; i < 256; i++)
2541 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2542 exit (0); }
2543
2544 EOF
2545 if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2546 then
2547 :
2548 else
2549 echo "configure: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 rm -fr conftest*
2552 ac_cv_header_stdc=no
2553 fi
2554 rm -fr conftest*
2555 fi
2556
2557 fi
2558 fi
2559
2560 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2561 if test $ac_cv_header_stdc = yes; then
2562 cat >> confdefs.h <<\EOF
2563 #define STDC_HEADERS 1
2564 EOF
2565
2566 fi
2567
2568 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2569 echo "configure:2570: checking whether time.h and sys/time.h may both be included" >&5
2570 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573 cat > conftest.$ac_ext <<EOF
2574 #line 2575 "configure"
2575 #include "confdefs.h"
2576 #include <sys/types.h>
2577 #include <sys/time.h>
2578 #include <time.h>
2579 int main() {
2580 struct tm *tp;
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584 rm -rf conftest*
2585 ac_cv_header_time=yes
2586 else
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 rm -rf conftest*
2590 ac_cv_header_time=no
2591 fi
2592 rm -f conftest*
2593 fi
2594
2595 echo "$ac_t""$ac_cv_header_time" 1>&6
2596 if test $ac_cv_header_time = yes; then
2597 cat >> confdefs.h <<\EOF
2598 #define TIME_WITH_SYS_TIME 1
2599 EOF
2600
2601 fi
2602
2603 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2604 echo "configure:2605: checking for working stdbool.h" >&5
2605 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2606 echo $ac_n "(cached) $ac_c" 1>&6
2607 else
2608 cat > conftest.$ac_ext <<EOF
2609 #line 2610 "configure"
2610 #include "confdefs.h"
2611 #include <stdbool.h>
2612 int main() {
2613 bool foo = false;
2614 ; return 0; }
2615 EOF
2616 if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2617 rm -rf conftest*
2618 ac_cv_header_stdbool_h=yes
2619 else
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2622 rm -rf conftest*
2623 ac_cv_header_stdbool_h=no
2624 fi
2625 rm -f conftest*
2626 fi
2627
2628 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2629 if test $ac_cv_header_stdbool_h = yes; then
2630 cat >> confdefs.h <<\EOF
2631 #define HAVE_STDBOOL_H 1
2632 EOF
2633
2634 fi
2635
2636 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2637 echo "configure:2638: checking whether string.h and strings.h may both be included" >&5
2638 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641 cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <string.h>
2645 #include <strings.h>
2646 int main() {
2647
2648 ; return 0; }
2649 EOF
2650 if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2651 rm -rf conftest*
2652 gcc_cv_header_string=yes
2653 else
2654 echo "configure: failed program was:" >&5
2655 cat conftest.$ac_ext >&5
2656 rm -rf conftest*
2657 gcc_cv_header_string=no
2658 fi
2659 rm -f conftest*
2660 fi
2661
2662 echo "$ac_t""$gcc_cv_header_string" 1>&6
2663 if test $gcc_cv_header_string = yes; then
2664 cat >> confdefs.h <<\EOF
2665 #define STRING_WITH_STRINGS 1
2666 EOF
2667
2668 fi
2669
2670 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2671 echo "configure:2672: checking for sys/wait.h that is POSIX.1 compatible" >&5
2672 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2673 echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675 cat > conftest.$ac_ext <<EOF
2676 #line 2677 "configure"
2677 #include "confdefs.h"
2678 #include <sys/types.h>
2679 #include <sys/wait.h>
2680 #ifndef WEXITSTATUS
2681 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2682 #endif
2683 #ifndef WIFEXITED
2684 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2685 #endif
2686 int main() {
2687 int s;
2688 wait (&s);
2689 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2690 ; return 0; }
2691 EOF
2692 if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2693 rm -rf conftest*
2694 ac_cv_header_sys_wait_h=yes
2695 else
2696 echo "configure: failed program was:" >&5
2697 cat conftest.$ac_ext >&5
2698 rm -rf conftest*
2699 ac_cv_header_sys_wait_h=no
2700 fi
2701 rm -f conftest*
2702 fi
2703
2704 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2705 if test $ac_cv_header_sys_wait_h = yes; then
2706 cat >> confdefs.h <<\EOF
2707 #define HAVE_SYS_WAIT_H 1
2708 EOF
2709
2710 fi
2711
2712 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2713 fcntl.h unistd.h sys/file.h sys/time.h \
2714 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2715 direct.h malloc.h langinfo.h
2716 do
2717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2719 echo "configure:2720: checking for $ac_hdr" >&5
2720 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2721 echo $ac_n "(cached) $ac_c" 1>&6
2722 else
2723 cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726 #include <$ac_hdr>
2727 EOF
2728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2729 { (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2731 if test -z "$ac_err"; then
2732 rm -rf conftest*
2733 eval "ac_cv_header_$ac_safe=yes"
2734 else
2735 echo "$ac_err" >&5
2736 echo "configure: failed program was:" >&5
2737 cat conftest.$ac_ext >&5
2738 rm -rf conftest*
2739 eval "ac_cv_header_$ac_safe=no"
2740 fi
2741 rm -f conftest*
2742 fi
2743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2744 echo "$ac_t""yes" 1>&6
2745 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2746 cat >> confdefs.h <<EOF
2747 #define $ac_tr_hdr 1
2748 EOF
2749
2750 else
2751 echo "$ac_t""no" 1>&6
2752 fi
2753 done
2754
2755
2756 # Check for thread headers.
2757 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2758 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2759 echo "configure:2760: checking for thread.h" >&5
2760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2761 echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763 cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766 #include <thread.h>
2767 EOF
2768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2769 { (eval echo configure:2770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2771 if test -z "$ac_err"; then
2772 rm -rf conftest*
2773 eval "ac_cv_header_$ac_safe=yes"
2774 else
2775 echo "$ac_err" >&5
2776 echo "configure: failed program was:" >&5
2777 cat conftest.$ac_ext >&5
2778 rm -rf conftest*
2779 eval "ac_cv_header_$ac_safe=no"
2780 fi
2781 rm -f conftest*
2782 fi
2783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2784 echo "$ac_t""yes" 1>&6
2785 have_thread_h=yes
2786 else
2787 echo "$ac_t""no" 1>&6
2788 have_thread_h=
2789 fi
2790
2791 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2792 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2793 echo "configure:2794: checking for pthread.h" >&5
2794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2795 echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800 #include <pthread.h>
2801 EOF
2802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2803 { (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2805 if test -z "$ac_err"; then
2806 rm -rf conftest*
2807 eval "ac_cv_header_$ac_safe=yes"
2808 else
2809 echo "$ac_err" >&5
2810 echo "configure: failed program was:" >&5
2811 cat conftest.$ac_ext >&5
2812 rm -rf conftest*
2813 eval "ac_cv_header_$ac_safe=no"
2814 fi
2815 rm -f conftest*
2816 fi
2817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2818 echo "$ac_t""yes" 1>&6
2819 have_pthread_h=yes
2820 else
2821 echo "$ac_t""no" 1>&6
2822 have_pthread_h=
2823 fi
2824
2825
2826 # These tests can't be done till we know if we have limits.h.
2827 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2828 echo "configure:2829: checking for CHAR_BIT" >&5
2829 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
2831 else
2832 cat > conftest.$ac_ext <<EOF
2833 #line 2834 "configure"
2834 #include "confdefs.h"
2835 #ifdef HAVE_LIMITS_H
2836 #include <limits.h>
2837 #endif
2838 #ifdef CHAR_BIT
2839 found
2840 #endif
2841 EOF
2842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2843 egrep "found" >/dev/null 2>&1; then
2844 rm -rf conftest*
2845 gcc_cv_decl_char_bit=yes
2846 else
2847 rm -rf conftest*
2848 gcc_cv_decl_char_bit=no
2849 fi
2850 rm -f conftest*
2851
2852
2853 fi
2854
2855 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2856 if test $gcc_cv_decl_char_bit = no; then
2857 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2858 echo "configure:2859: checking number of bits in a byte" >&5
2859 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2860 echo $ac_n "(cached) $ac_c" 1>&6
2861 else
2862 i=8
2863 gcc_cv_c_nbby=
2864 while test $i -lt 65; do
2865 cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2868
2869 int main() {
2870 switch(0) {
2871 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2872 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2873 ; }
2874 ; return 0; }
2875 EOF
2876 if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2877 rm -rf conftest*
2878 gcc_cv_c_nbby=$i; break
2879 else
2880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
2882 fi
2883 rm -f conftest*
2884 i=`expr $i + 1`
2885 done
2886 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2887
2888 fi
2889
2890 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2891 if test $gcc_cv_c_nbby = failed; then
2892 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2893 else
2894 cat >> confdefs.h <<EOF
2895 #define CHAR_BIT $gcc_cv_c_nbby
2896 EOF
2897
2898 fi
2899 fi
2900 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2901 echo "configure:2902: checking byte ordering" >&5
2902 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2903 echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905 ac_cv_c_compile_endian=unknown
2906
2907 ac_ext=c
2908 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2909 ac_cpp='$CPP $CPPFLAGS'
2910 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2911 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2912 cross_compiling=$ac_cv_prog_cc_cross
2913
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917
2918 #ifdef HAVE_LIMITS_H
2919 # include <limits.h>
2920 #endif
2921 /* This structure must have no internal padding. */
2922 struct {
2923 char prefix[sizeof "\nendian:" - 1];
2924 short word;
2925 char postfix[2];
2926 } tester = {
2927 "\nendian:",
2928 #if SIZEOF_SHORT == 4
2929 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2930 #endif
2931 ('A' << CHAR_BIT) | 'B',
2932 'X', '\n'
2933 };
2934 EOF
2935 if { (eval echo configure:2936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2936 od -c conftest.o |
2937 sed 's/^[0-7]*[ ]*/ /
2938 s/\*/./g
2939 s/ \\n/*/g
2940 s/ [0-9][0-9][0-9]/./g
2941 s/ \\[^ ]/./g' |
2942 tr -d '
2943 ' | tr -s '*' '
2944 ' | fold | sed '$a\
2945 ' > conftest.dmp
2946 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2947 ac_cv_c_compile_endian=big-endian
2948 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2949 ac_cv_c_compile_endian=little-endian
2950 fi
2951 fi
2952 rm -rf conftest*
2953 ac_ext=c
2954 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2955 ac_cpp='$CPP $CPPFLAGS'
2956 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2957 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2958 cross_compiling=$ac_cv_prog_cc_cross
2959
2960
2961 fi
2962
2963 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2964 if test $ac_cv_c_compile_endian = unknown; then
2965 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2966 elif test $ac_cv_c_compile_endian = big-endian; then
2967 cat >> confdefs.h <<\EOF
2968 #define HOST_WORDS_BIG_ENDIAN 1
2969 EOF
2970
2971 fi
2972
2973 echo $ac_n "checking floating point format""... $ac_c" 1>&6
2974 echo "configure:2975: checking floating point format" >&5
2975 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978
2979 ac_ext=c
2980 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2981 ac_cpp='$CPP $CPPFLAGS'
2982 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2983 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2984 cross_compiling=$ac_cv_prog_cc_cross
2985
2986 cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989 /* This will not work unless sizeof(double) == 8. */
2990 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2991
2992 /* This structure must have no internal padding. */
2993 struct possibility {
2994 char prefix[8];
2995 double candidate;
2996 char postfix[8];
2997 };
2998
2999 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3000 struct possibility table [] =
3001 {
3002 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3003 C( 3.53802595280598432000e+18), /* D__float - VAX */
3004 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3005 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3006 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3007 };
3008 EOF
3009 if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3010 od -c conftest.o |
3011 sed 's/^[0-7]*[ ]*/ /
3012 s/\*/./g
3013 s/ \\n/*/g
3014 s/ [0-9][0-9][0-9]/./g
3015 s/ \\[^ ]/./g' |
3016 tr -d '
3017 ' | tr -s '*' '
3018 ' | fold | sed '$a\
3019 ' > conftest.dmp
3020 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3021 ac_cv_c_float_format='IEEE (big-endian)'
3022 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3023 ac_cv_c_float_format='IEEE (big-endian)'
3024 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3025 ac_cv_c_float_format='IEEE (little-endian)'
3026 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3027 ac_cv_c_float_format='IEEE (little-endian)'
3028 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3029 ac_cv_c_float_format='VAX D-float'
3030 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3031 ac_cv_c_float_format='PDP-10'
3032 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3033 ac_cv_c_float_format='IBM 370 hex'
3034 else
3035 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3036 fi
3037 else
3038 { echo "configure: error: compile failed" 1>&2; exit 1; }
3039 fi
3040 rm -rf conftest*
3041 ac_ext=c
3042 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3043 ac_cpp='$CPP $CPPFLAGS'
3044 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3045 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3046 cross_compiling=$ac_cv_prog_cc_cross
3047
3048
3049 fi
3050
3051 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3052 # IEEE is the default format. If the float endianness isn't the same
3053 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3054 # (which is a tristate: yes, no, default). This is only an issue with
3055 # IEEE; the other formats are only supported by a few machines each,
3056 # all with the same endianness.
3057 format=
3058 fbigend=
3059 case $ac_cv_c_float_format in
3060 'IEEE (big-endian)' )
3061 if test $ac_cv_c_compile_endian = little-endian; then
3062 fbigend=1
3063 fi
3064 ;;
3065 'IEEE (little-endian)' )
3066 if test $ac_cv_c_compile_endian = big-endian; then
3067 fbigend=0
3068 fi
3069 ;;
3070 'VAX D-float' )
3071 format=VAX_FLOAT_FORMAT
3072 ;;
3073 'PDP-10' )
3074 format=PDP10_FLOAT_FORMAT
3075 ;;
3076 'IBM 370 hex' )
3077 format=IBM_FLOAT_FORMAT
3078 ;;
3079 esac
3080 if test -n "$format"; then
3081 cat >> confdefs.h <<EOF
3082 #define HOST_FLOAT_FORMAT $format
3083 EOF
3084
3085 fi
3086 if test -n "$fbigend"; then
3087 cat >> confdefs.h <<EOF
3088 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3089 EOF
3090
3091 fi
3092
3093
3094 # See if we have the mktemp command.
3095 # Extract the first word of "mktemp", so it can be a program name with args.
3096 set dummy mktemp; ac_word=$2
3097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3098 echo "configure:3099: checking for $ac_word" >&5
3099 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3100 echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102 if test -n "$have_mktemp_command"; then
3103 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3104 else
3105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3106 ac_dummy="$PATH"
3107 for ac_dir in $ac_dummy; do
3108 test -z "$ac_dir" && ac_dir=.
3109 if test -f $ac_dir/$ac_word; then
3110 ac_cv_prog_have_mktemp_command="yes"
3111 break
3112 fi
3113 done
3114 IFS="$ac_save_ifs"
3115 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3116 fi
3117 fi
3118 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3119 if test -n "$have_mktemp_command"; then
3120 echo "$ac_t""$have_mktemp_command" 1>&6
3121 else
3122 echo "$ac_t""no" 1>&6
3123 fi
3124
3125
3126 # Do we have a single-tree copy of texinfo?
3127 if test -f $srcdir/../texinfo/Makefile.in; then
3128 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3129 gcc_cv_prog_makeinfo_modern=yes
3130 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3131 else
3132 # See if makeinfo has been installed and is modern enough
3133 # that we can use it.
3134 # Extract the first word of "makeinfo", so it can be a program name with args.
3135 set dummy makeinfo; ac_word=$2
3136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3137 echo "configure:3138: checking for $ac_word" >&5
3138 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3139 echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141 if test -n "$MAKEINFO"; then
3142 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3143 else
3144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3145 ac_dummy="$PATH"
3146 for ac_dir in $ac_dummy; do
3147 test -z "$ac_dir" && ac_dir=.
3148 if test -f $ac_dir/$ac_word; then
3149 ac_cv_prog_MAKEINFO="makeinfo"
3150 break
3151 fi
3152 done
3153 IFS="$ac_save_ifs"
3154 fi
3155 fi
3156 MAKEINFO="$ac_cv_prog_MAKEINFO"
3157 if test -n "$MAKEINFO"; then
3158 echo "$ac_t""$MAKEINFO" 1>&6
3159 else
3160 echo "$ac_t""no" 1>&6
3161 fi
3162
3163 if test -n "$MAKEINFO"; then
3164 # Found it, now check the version.
3165 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3166 echo "configure:3167: checking for modern makeinfo" >&5
3167 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3168 echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170 ac_prog_version=`$MAKEINFO --version 2>&1 |
3171 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3172 echo "configure:3173: version of makeinfo is $ac_prog_version" >&5
3173 case $ac_prog_version in
3174 '') gcc_cv_prog_makeinfo_modern=no;;
3175 4.[1-9]*)
3176 gcc_cv_prog_makeinfo_modern=yes;;
3177 *) gcc_cv_prog_makeinfo_modern=no;;
3178 esac
3179
3180 fi
3181
3182 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3183 else
3184 gcc_cv_prog_makeinfo_modern=no
3185 fi
3186
3187 fi
3188
3189 if test $gcc_cv_prog_makeinfo_modern = no; then
3190 echo "configure: warning:
3191 *** Makeinfo is missing or too old.
3192 *** Info documentation will not be built." 1>&2
3193 BUILD_INFO=
3194 else
3195 BUILD_INFO=info
3196 fi
3197
3198 # Is pod2man recent enough to regenerate manpages?
3199 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3200 echo "configure:3201: checking for recent Pod::Man" >&5
3201 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3202 echo "$ac_t""yes" 1>&6
3203 GENERATED_MANPAGES=generated-manpages
3204 else
3205 echo "$ac_t""no" 1>&6
3206 GENERATED_MANPAGES=
3207 fi
3208
3209 # How about lex?
3210 if test -f $srcdir/../flex/skel.c; then
3211 FLEX='$(objdir)/../flex/flex'
3212 else
3213 # Extract the first word of "flex", so it can be a program name with args.
3214 set dummy flex; ac_word=$2
3215 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3216 echo "configure:3217: checking for $ac_word" >&5
3217 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3218 echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220 if test -n "$FLEX"; then
3221 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3222 else
3223 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3224 ac_dummy="$PATH"
3225 for ac_dir in $ac_dummy; do
3226 test -z "$ac_dir" && ac_dir=.
3227 if test -f $ac_dir/$ac_word; then
3228 ac_cv_prog_FLEX="flex"
3229 break
3230 fi
3231 done
3232 IFS="$ac_save_ifs"
3233 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3234 fi
3235 fi
3236 FLEX="$ac_cv_prog_FLEX"
3237 if test -n "$FLEX"; then
3238 echo "$ac_t""$FLEX" 1>&6
3239 else
3240 echo "$ac_t""no" 1>&6
3241 fi
3242
3243 fi
3244
3245 # Bison?
3246 # The -L switch is so bison can find its skeleton file.
3247 if test -f $srcdir/../bison/bison.simple; then
3248 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3249 else
3250 # Extract the first word of "bison", so it can be a program name with args.
3251 set dummy bison; ac_word=$2
3252 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3253 echo "configure:3254: checking for $ac_word" >&5
3254 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257 if test -n "$BISON"; then
3258 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3259 else
3260 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3261 ac_dummy="$PATH"
3262 for ac_dir in $ac_dummy; do
3263 test -z "$ac_dir" && ac_dir=.
3264 if test -f $ac_dir/$ac_word; then
3265 ac_cv_prog_BISON="bison"
3266 break
3267 fi
3268 done
3269 IFS="$ac_save_ifs"
3270 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3271 fi
3272 fi
3273 BISON="$ac_cv_prog_BISON"
3274 if test -n "$BISON"; then
3275 echo "$ac_t""$BISON" 1>&6
3276 else
3277 echo "$ac_t""no" 1>&6
3278 fi
3279
3280 fi
3281
3282 # These libraries may be used by collect2.
3283 # We may need a special search path to get them linked.
3284 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3285 echo "configure:3286: checking for collect2 libraries" >&5
3286 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3287 echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289 save_LIBS="$LIBS"
3290 for libs in '' -lld -lmld \
3291 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3292 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3293 do
3294 LIBS="$libs"
3295 cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298 /* Override any gcc2 internal prototype to avoid an error. */
3299 /* We use char because int might match the return type of a gcc2
3300 builtin and then its argument prototype would still apply. */
3301 char ldopen();
3302
3303 int main() {
3304 ldopen()
3305 ; return 0; }
3306 EOF
3307 if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3308 rm -rf conftest*
3309 gcc_cv_collect2_libs="$libs"; break
3310 else
3311 echo "configure: failed program was:" >&5
3312 cat conftest.$ac_ext >&5
3313 fi
3314 rm -f conftest*
3315 done
3316 LIBS="$save_LIBS"
3317 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3318 fi
3319
3320 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3321 case $gcc_cv_collect2_libs in
3322 "none required") ;;
3323 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3324 esac
3325
3326
3327 # When building Ada code on Alpha, we need exc_resume which is usually in
3328 # -lexc. So test for it.
3329 save_LIBS="$LIBS"
3330 LIBS=
3331
3332 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3333 echo "configure:3334: checking for library containing exc_resume" >&5
3334 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3335 echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337 ac_func_search_save_LIBS="$LIBS"
3338 ac_cv_search_exc_resume="no"
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 /* Override any gcc2 internal prototype to avoid an error. */
3343 /* We use char because int might match the return type of a gcc2
3344 builtin and then its argument prototype would still apply. */
3345 char exc_resume();
3346
3347 int main() {
3348 exc_resume()
3349 ; return 0; }
3350 EOF
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3352 rm -rf conftest*
3353 ac_cv_search_exc_resume="none required"
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 fi
3358 rm -f conftest*
3359 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3360 LIBS="-l$i $ac_func_search_save_LIBS"
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* Override any gcc2 internal prototype to avoid an error. */
3365 /* We use char because int might match the return type of a gcc2
3366 builtin and then its argument prototype would still apply. */
3367 char exc_resume();
3368
3369 int main() {
3370 exc_resume()
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374 rm -rf conftest*
3375 ac_cv_search_exc_resume="-l$i"
3376 break
3377 else
3378 echo "configure: failed program was:" >&5
3379 cat conftest.$ac_ext >&5
3380 fi
3381 rm -f conftest*
3382 done
3383 LIBS="$ac_func_search_save_LIBS"
3384 fi
3385
3386 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3387 if test "$ac_cv_search_exc_resume" != "no"; then
3388 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3389
3390 else :
3391
3392 fi
3393 GNAT_LIBEXC="$LIBS"
3394 LIBS="$save_LIBS"
3395
3396
3397 # See if the stage1 system preprocessor understands the ANSI C
3398 # preprocessor stringification operator. (Used by symcat.h.)
3399
3400
3401 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3402 echo "configure:3403: checking for preprocessor stringizing operator" >&5
3403 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406 cat > conftest.$ac_ext <<EOF
3407 #line 3408 "configure"
3408 #include "confdefs.h"
3409
3410 #define x(y) #y
3411
3412 char *s = x(teststring);
3413
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416 egrep "#teststring" >/dev/null 2>&1; then
3417 rm -rf conftest*
3418 ac_cv_c_stringize=no
3419 else
3420 rm -rf conftest*
3421 ac_cv_c_stringize=yes
3422 fi
3423 rm -f conftest*
3424
3425 fi
3426
3427 if test "${ac_cv_c_stringize}" = yes
3428 then
3429 cat >> confdefs.h <<\EOF
3430 #define HAVE_STRINGIZE 1
3431 EOF
3432
3433 fi
3434 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3435
3436
3437 # Use <inttypes.h> only if it exists,
3438 # doesn't clash with <sys/types.h>, and declares intmax_t.
3439 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3440 echo "configure:3441: checking for inttypes.h" >&5
3441 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3442 echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <sys/types.h>
3448 #include <inttypes.h>
3449 int main() {
3450 intmax_t i = -1;
3451 ; return 0; }
3452 EOF
3453 if { (eval echo configure:3454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3454 rm -rf conftest*
3455 gcc_cv_header_inttypes_h=yes
3456 else
3457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3459 rm -rf conftest*
3460 gcc_cv_header_inttypes_h=no
3461 fi
3462 rm -f conftest*
3463 fi
3464
3465 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3466 if test $gcc_cv_header_inttypes_h = yes; then
3467 cat >> confdefs.h <<\EOF
3468 #define HAVE_INTTYPES_H 1
3469 EOF
3470
3471 fi
3472
3473
3474 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3475 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3476 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3477 scandir alphasort
3478 do
3479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3480 echo "configure:3481: checking for $ac_func" >&5
3481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3482 echo $ac_n "(cached) $ac_c" 1>&6
3483 else
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 /* System header to define __stub macros and hopefully few prototypes,
3488 which can conflict with char $ac_func(); below. */
3489 #include <assert.h>
3490 /* Override any gcc2 internal prototype to avoid an error. */
3491 /* We use char because int might match the return type of a gcc2
3492 builtin and then its argument prototype would still apply. */
3493 char $ac_func();
3494
3495 int main() {
3496
3497 /* The GNU C library defines this for functions which it implements
3498 to always fail with ENOSYS. Some functions are actually named
3499 something starting with __ and the normal name is an alias. */
3500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3501 choke me
3502 #else
3503 $ac_func();
3504 #endif
3505
3506 ; return 0; }
3507 EOF
3508 if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3509 rm -rf conftest*
3510 eval "ac_cv_func_$ac_func=yes"
3511 else
3512 echo "configure: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 rm -rf conftest*
3515 eval "ac_cv_func_$ac_func=no"
3516 fi
3517 rm -f conftest*
3518 fi
3519
3520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3521 echo "$ac_t""yes" 1>&6
3522 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3523 cat >> confdefs.h <<EOF
3524 #define $ac_tr_func 1
3525 EOF
3526
3527 else
3528 echo "$ac_t""no" 1>&6
3529 fi
3530 done
3531
3532
3533 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3534 echo "configure:3535: checking for ssize_t" >&5
3535 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3536 echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #include <sys/types.h>
3542 #if STDC_HEADERS
3543 #include <stdlib.h>
3544 #include <stddef.h>
3545 #endif
3546 EOF
3547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3548 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3549 rm -rf conftest*
3550 ac_cv_type_ssize_t=yes
3551 else
3552 rm -rf conftest*
3553 ac_cv_type_ssize_t=no
3554 fi
3555 rm -f conftest*
3556
3557 fi
3558 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3559 if test $ac_cv_type_ssize_t = no; then
3560 cat >> confdefs.h <<\EOF
3561 #define ssize_t int
3562 EOF
3563
3564 fi
3565
3566
3567 # Try to determine the array type of the second argument of getgroups
3568 # for the target system (int or gid_t).
3569 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3570 echo "configure:3571: checking for uid_t in sys/types.h" >&5
3571 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <sys/types.h>
3578 EOF
3579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3580 egrep "uid_t" >/dev/null 2>&1; then
3581 rm -rf conftest*
3582 ac_cv_type_uid_t=yes
3583 else
3584 rm -rf conftest*
3585 ac_cv_type_uid_t=no
3586 fi
3587 rm -f conftest*
3588
3589 fi
3590
3591 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3592 if test $ac_cv_type_uid_t = no; then
3593 cat >> confdefs.h <<\EOF
3594 #define uid_t int
3595 EOF
3596
3597 cat >> confdefs.h <<\EOF
3598 #define gid_t int
3599 EOF
3600
3601 fi
3602
3603 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3604 echo "configure:3605: checking type of array argument to getgroups" >&5
3605 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3606 echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608 if test "$cross_compiling" = yes; then
3609 ac_cv_type_getgroups=cross
3610 else
3611 cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614
3615 /* Thanks to Mike Rendell for this test. */
3616 #include <sys/types.h>
3617 #define NGID 256
3618 #undef MAX
3619 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3620 main()
3621 {
3622 gid_t gidset[NGID];
3623 int i, n;
3624 union { gid_t gval; long lval; } val;
3625
3626 val.lval = -1;
3627 for (i = 0; i < NGID; i++)
3628 gidset[i] = val.gval;
3629 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3630 gidset);
3631 /* Exit non-zero if getgroups seems to require an array of ints. This
3632 happens when gid_t is short but getgroups modifies an array of ints. */
3633 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3634 }
3635
3636 EOF
3637 if { (eval echo configure:3638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3638 then
3639 ac_cv_type_getgroups=gid_t
3640 else
3641 echo "configure: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3643 rm -fr conftest*
3644 ac_cv_type_getgroups=int
3645 fi
3646 rm -fr conftest*
3647 fi
3648
3649 if test $ac_cv_type_getgroups = cross; then
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 #include <unistd.h>
3654 EOF
3655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3656 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3657 rm -rf conftest*
3658 ac_cv_type_getgroups=gid_t
3659 else
3660 rm -rf conftest*
3661 ac_cv_type_getgroups=int
3662 fi
3663 rm -f conftest*
3664
3665 fi
3666 fi
3667
3668 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3669 cat >> confdefs.h <<EOF
3670 #define GETGROUPS_T $ac_cv_type_getgroups
3671 EOF
3672
3673
3674 if test "${target}" = "${build}"; then
3675 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3676 else
3677 case "${target}" in
3678 # This condition may need some tweaking. It should include all
3679 # targets where the array type of the second argument of getgroups
3680 # is int and the type of gid_t is not equivalent to int.
3681 *-*-sunos* | *-*-ultrix*)
3682 TARGET_GETGROUPS_T=int
3683 ;;
3684 *)
3685 TARGET_GETGROUPS_T=gid_t
3686 ;;
3687 esac
3688 fi
3689
3690
3691 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3692 echo "configure:3693: checking whether the printf functions support %p" >&5
3693 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3694 echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696 if test "$cross_compiling" = yes; then
3697 gcc_cv_func_printf_ptr=no
3698 else
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #include <stdio.h>
3703
3704 int main()
3705 {
3706 char buf[64];
3707 char *p = buf, *q = NULL;
3708 sprintf(buf, "%p", p);
3709 sscanf(buf, "%p", &q);
3710 return (p != q);
3711 }
3712 EOF
3713 if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3714 then
3715 gcc_cv_func_printf_ptr=yes
3716 else
3717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -fr conftest*
3720 gcc_cv_func_printf_ptr=no
3721 fi
3722 rm -fr conftest*
3723 fi
3724
3725 rm -f core core.* *.core
3726 fi
3727
3728 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3729 if test $gcc_cv_func_printf_ptr = yes ; then
3730 cat >> confdefs.h <<\EOF
3731 #define HAVE_PRINTF_PTR 1
3732 EOF
3733
3734 fi
3735
3736
3737 case "${host}" in
3738 *-*-uwin*)
3739 { echo "configure: error:
3740 *** UWIN may not be used as a host platform because
3741 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3742 ;;
3743 *-*-*vms*)
3744 # Under VMS, vfork works very different than on Unix. The standard test
3745 # won't work, and it isn't easily adaptable. It makes more sense to
3746 # just force it.
3747 ac_cv_func_vfork_works=yes
3748 ;;
3749 esac
3750 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3751 echo "configure:3752: checking for pid_t" >&5
3752 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3753 echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755 cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 #include <sys/types.h>
3759 #if STDC_HEADERS
3760 #include <stdlib.h>
3761 #include <stddef.h>
3762 #endif
3763 EOF
3764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3765 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3766 rm -rf conftest*
3767 ac_cv_type_pid_t=yes
3768 else
3769 rm -rf conftest*
3770 ac_cv_type_pid_t=no
3771 fi
3772 rm -f conftest*
3773
3774 fi
3775 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3776 if test $ac_cv_type_pid_t = no; then
3777 cat >> confdefs.h <<\EOF
3778 #define pid_t int
3779 EOF
3780
3781 fi
3782
3783 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3784 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3785 echo "configure:3786: checking for vfork.h" >&5
3786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3787 echo $ac_n "(cached) $ac_c" 1>&6
3788 else
3789 cat > conftest.$ac_ext <<EOF
3790 #line 3791 "configure"
3791 #include "confdefs.h"
3792 #include <vfork.h>
3793 EOF
3794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3795 { (eval echo configure:3796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3797 if test -z "$ac_err"; then
3798 rm -rf conftest*
3799 eval "ac_cv_header_$ac_safe=yes"
3800 else
3801 echo "$ac_err" >&5
3802 echo "configure: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 rm -rf conftest*
3805 eval "ac_cv_header_$ac_safe=no"
3806 fi
3807 rm -f conftest*
3808 fi
3809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3810 echo "$ac_t""yes" 1>&6
3811 cat >> confdefs.h <<\EOF
3812 #define HAVE_VFORK_H 1
3813 EOF
3814
3815 else
3816 echo "$ac_t""no" 1>&6
3817 fi
3818
3819 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3820 echo "configure:3821: checking for working vfork" >&5
3821 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3822 echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824 if test "$cross_compiling" = yes; then
3825 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3826 echo "configure:3827: checking for vfork" >&5
3827 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3828 echo $ac_n "(cached) $ac_c" 1>&6
3829 else
3830 cat > conftest.$ac_ext <<EOF
3831 #line 3832 "configure"
3832 #include "confdefs.h"
3833 /* System header to define __stub macros and hopefully few prototypes,
3834 which can conflict with char vfork(); below. */
3835 #include <assert.h>
3836 /* Override any gcc2 internal prototype to avoid an error. */
3837 /* We use char because int might match the return type of a gcc2
3838 builtin and then its argument prototype would still apply. */
3839 char vfork();
3840
3841 int main() {
3842
3843 /* The GNU C library defines this for functions which it implements
3844 to always fail with ENOSYS. Some functions are actually named
3845 something starting with __ and the normal name is an alias. */
3846 #if defined (__stub_vfork) || defined (__stub___vfork)
3847 choke me
3848 #else
3849 vfork();
3850 #endif
3851
3852 ; return 0; }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3855 rm -rf conftest*
3856 eval "ac_cv_func_vfork=yes"
3857 else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -rf conftest*
3861 eval "ac_cv_func_vfork=no"
3862 fi
3863 rm -f conftest*
3864 fi
3865
3866 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3867 echo "$ac_t""yes" 1>&6
3868 :
3869 else
3870 echo "$ac_t""no" 1>&6
3871 fi
3872
3873 ac_cv_func_vfork_works=$ac_cv_func_vfork
3874 else
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 /* Thanks to Paul Eggert for this test. */
3879 #include <stdio.h>
3880 #include <sys/types.h>
3881 #include <sys/stat.h>
3882 #ifdef HAVE_UNISTD_H
3883 #include <unistd.h>
3884 #endif
3885 #ifdef HAVE_VFORK_H
3886 #include <vfork.h>
3887 #endif
3888 /* On some sparc systems, changes by the child to local and incoming
3889 argument registers are propagated back to the parent.
3890 The compiler is told about this with #include <vfork.h>,
3891 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3892 Test for this by using a static variable whose address
3893 is put into a register that is clobbered by the vfork. */
3894 static
3895 #ifdef __cplusplus
3896 sparc_address_test (int arg)
3897 #else
3898 sparc_address_test (arg) int arg;
3899 #endif
3900 {
3901 static pid_t child;
3902 if (!child) {
3903 child = vfork ();
3904 if (child < 0) {
3905 perror ("vfork");
3906 _exit(2);
3907 }
3908 if (!child) {
3909 arg = getpid();
3910 write(-1, "", 0);
3911 _exit (arg);
3912 }
3913 }
3914 }
3915 main() {
3916 pid_t parent = getpid ();
3917 pid_t child;
3918
3919 sparc_address_test ();
3920
3921 child = vfork ();
3922
3923 if (child == 0) {
3924 /* Here is another test for sparc vfork register problems.
3925 This test uses lots of local variables, at least
3926 as many local variables as main has allocated so far
3927 including compiler temporaries. 4 locals are enough for
3928 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3929 A buggy compiler should reuse the register of parent
3930 for one of the local variables, since it will think that
3931 parent can't possibly be used any more in this routine.
3932 Assigning to the local variable will thus munge parent
3933 in the parent process. */
3934 pid_t
3935 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3936 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3937 /* Convince the compiler that p..p7 are live; otherwise, it might
3938 use the same hardware register for all 8 local variables. */
3939 if (p != p1 || p != p2 || p != p3 || p != p4
3940 || p != p5 || p != p6 || p != p7)
3941 _exit(1);
3942
3943 /* On some systems (e.g. IRIX 3.3),
3944 vfork doesn't separate parent from child file descriptors.
3945 If the child closes a descriptor before it execs or exits,
3946 this munges the parent's descriptor as well.
3947 Test for this by closing stdout in the child. */
3948 _exit(close(fileno(stdout)) != 0);
3949 } else {
3950 int status;
3951 struct stat st;
3952
3953 while (wait(&status) != child)
3954 ;
3955 exit(
3956 /* Was there some problem with vforking? */
3957 child < 0
3958
3959 /* Did the child fail? (This shouldn't happen.) */
3960 || status
3961
3962 /* Did the vfork/compiler bug occur? */
3963 || parent != getpid()
3964
3965 /* Did the file descriptor bug occur? */
3966 || fstat(fileno(stdout), &st) != 0
3967 );
3968 }
3969 }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3972 then
3973 ac_cv_func_vfork_works=yes
3974 else
3975 echo "configure: failed program was:" >&5
3976 cat conftest.$ac_ext >&5
3977 rm -fr conftest*
3978 ac_cv_func_vfork_works=no
3979 fi
3980 rm -fr conftest*
3981 fi
3982
3983 fi
3984
3985 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3986 if test $ac_cv_func_vfork_works = no; then
3987 cat >> confdefs.h <<\EOF
3988 #define vfork fork
3989 EOF
3990
3991 fi
3992
3993 for ac_func in getpagesize
3994 do
3995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3996 echo "configure:3997: checking for $ac_func" >&5
3997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3998 echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000 cat > conftest.$ac_ext <<EOF
4001 #line 4002 "configure"
4002 #include "confdefs.h"
4003 /* System header to define __stub macros and hopefully few prototypes,
4004 which can conflict with char $ac_func(); below. */
4005 #include <assert.h>
4006 /* Override any gcc2 internal prototype to avoid an error. */
4007 /* We use char because int might match the return type of a gcc2
4008 builtin and then its argument prototype would still apply. */
4009 char $ac_func();
4010
4011 int main() {
4012
4013 /* The GNU C library defines this for functions which it implements
4014 to always fail with ENOSYS. Some functions are actually named
4015 something starting with __ and the normal name is an alias. */
4016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4017 choke me
4018 #else
4019 $ac_func();
4020 #endif
4021
4022 ; return 0; }
4023 EOF
4024 if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4025 rm -rf conftest*
4026 eval "ac_cv_func_$ac_func=yes"
4027 else
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4030 rm -rf conftest*
4031 eval "ac_cv_func_$ac_func=no"
4032 fi
4033 rm -f conftest*
4034 fi
4035
4036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4037 echo "$ac_t""yes" 1>&6
4038 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4039 cat >> confdefs.h <<EOF
4040 #define $ac_tr_func 1
4041 EOF
4042
4043 else
4044 echo "$ac_t""no" 1>&6
4045 fi
4046 done
4047
4048 # The test program for the next two tests is the same except for one
4049 # set of ifdefs.
4050 cat >ct-mmap.inc <<'EOF'
4051 #include <sys/types.h>
4052 #include <sys/mman.h>
4053 #include <fcntl.h>
4054 #include <signal.h>
4055 #include <setjmp.h>
4056 #include <stdio.h>
4057
4058 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4059 # define MAP_ANONYMOUS MAP_ANON
4060 #endif
4061
4062 /* This mess was copied from the GNU getpagesize.h. */
4063 #ifndef HAVE_GETPAGESIZE
4064 # ifdef HAVE_UNISTD_H
4065 # include <unistd.h>
4066 # endif
4067
4068 /* Assume that all systems that can run configure have sys/param.h. */
4069 # ifndef HAVE_SYS_PARAM_H
4070 # define HAVE_SYS_PARAM_H 1
4071 # endif
4072
4073 # ifdef _SC_PAGESIZE
4074 # define getpagesize() sysconf(_SC_PAGESIZE)
4075 # else /* no _SC_PAGESIZE */
4076 # ifdef HAVE_SYS_PARAM_H
4077 # include <sys/param.h>
4078 # ifdef EXEC_PAGESIZE
4079 # define getpagesize() EXEC_PAGESIZE
4080 # else /* no EXEC_PAGESIZE */
4081 # ifdef NBPG
4082 # define getpagesize() NBPG * CLSIZE
4083 # ifndef CLSIZE
4084 # define CLSIZE 1
4085 # endif /* no CLSIZE */
4086 # else /* no NBPG */
4087 # ifdef NBPC
4088 # define getpagesize() NBPC
4089 # else /* no NBPC */
4090 # ifdef PAGESIZE
4091 # define getpagesize() PAGESIZE
4092 # endif /* PAGESIZE */
4093 # endif /* no NBPC */
4094 # endif /* no NBPG */
4095 # endif /* no EXEC_PAGESIZE */
4096 # else /* no HAVE_SYS_PARAM_H */
4097 # define getpagesize() 8192 /* punt totally */
4098 # endif /* no HAVE_SYS_PARAM_H */
4099 # endif /* no _SC_PAGESIZE */
4100
4101 #endif /* no HAVE_GETPAGESIZE */
4102
4103 #ifndef MAP_FAILED
4104 # define MAP_FAILED -1
4105 #endif
4106
4107 #undef perror_exit
4108 #define perror_exit(str, val) \
4109 do { perror(str); exit(val); } while (0)
4110
4111 /* Some versions of cygwin mmap require that munmap is called with the
4112 same parameters as mmap. GCC expects that this is not the case.
4113 Test for various forms of this problem. Warning - icky signal games. */
4114
4115 static sigset_t unblock_sigsegv;
4116 static jmp_buf r;
4117 static size_t pg;
4118 static int devzero;
4119
4120 static char *
4121 anonmap (size)
4122 size_t size;
4123 {
4124 #ifdef USE_MAP_ANON
4125 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4126 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4127 #else
4128 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4129 MAP_PRIVATE, devzero, 0);
4130 #endif
4131 }
4132
4133 static void
4134 sigsegv (unused)
4135 int unused;
4136 {
4137 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4138 longjmp (r, 1);
4139 }
4140
4141 /* Basic functionality test. */
4142 void
4143 test_0 ()
4144 {
4145 char *x = anonmap (pg);
4146 if (x == (char *) MAP_FAILED)
4147 perror_exit("test 0 mmap", 2);
4148
4149 *(int *)x += 1;
4150
4151 if (munmap(x, pg) < 0)
4152 perror_exit("test 0 munmap", 3);
4153 }
4154
4155 /* 1. If we map a 2-page region and unmap its second page, the first page
4156 must remain. */
4157 static void
4158 test_1 ()
4159 {
4160 char *x = anonmap (pg * 2);
4161 if (x == (char *)MAP_FAILED)
4162 perror_exit ("test 1 mmap", 4);
4163
4164 signal (SIGSEGV, sigsegv);
4165 if (setjmp (r))
4166 perror_exit ("test 1 fault", 5);
4167
4168 x[0] = 1;
4169 x[pg] = 1;
4170
4171 if (munmap (x + pg, pg) < 0)
4172 perror_exit ("test 1 munmap 1", 6);
4173 x[0] = 2;
4174
4175 if (setjmp (r) == 0)
4176 {
4177 x[pg] = 1;
4178 perror_exit ("test 1 no fault", 7);
4179 }
4180 if (munmap (x, pg) < 0)
4181 perror_exit ("test 1 munmap 2", 8);
4182 }
4183
4184 /* 2. If we map a 2-page region and unmap its first page, the second
4185 page must remain. */
4186 static void
4187 test_2 ()
4188 {
4189 char *x = anonmap (pg * 2);
4190 if (x == (char *)MAP_FAILED)
4191 perror_exit ("test 2 mmap", 9);
4192
4193 signal (SIGSEGV, sigsegv);
4194 if (setjmp (r))
4195 perror_exit ("test 2 fault", 10);
4196
4197 x[0] = 1;
4198 x[pg] = 1;
4199
4200 if (munmap (x, pg) < 0)
4201 perror_exit ("test 2 munmap 1", 11);
4202
4203 x[pg] = 2;
4204
4205 if (setjmp (r) == 0)
4206 {
4207 x[0] = 1;
4208 perror_exit ("test 2 no fault", 12);
4209 }
4210
4211 if (munmap (x+pg, pg) < 0)
4212 perror_exit ("test 2 munmap 2", 13);
4213 }
4214
4215 /* 3. If we map two adjacent 1-page regions and unmap them both with
4216 one munmap, both must go away.
4217
4218 Getting two adjacent 1-page regions with two mmap calls is slightly
4219 tricky. All OS's tested skip over already-allocated blocks; therefore
4220 we have been careful to unmap all allocated regions in previous tests.
4221 HP/UX allocates pages backward in memory. No OS has yet been observed
4222 to be so perverse as to leave unmapped space between consecutive calls
4223 to mmap. */
4224
4225 static void
4226 test_3 ()
4227 {
4228 char *x, *y, *z;
4229
4230 x = anonmap (pg);
4231 if (x == (char *)MAP_FAILED)
4232 perror_exit ("test 3 mmap 1", 14);
4233 y = anonmap (pg);
4234 if (y == (char *)MAP_FAILED)
4235 perror_exit ("test 3 mmap 2", 15);
4236
4237 if (y != x + pg)
4238 {
4239 if (y == x - pg)
4240 z = y, y = x, x = z;
4241 else
4242 {
4243 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4244 (unsigned long)x, (unsigned long)y);
4245 exit (16);
4246 }
4247 }
4248
4249 signal (SIGSEGV, sigsegv);
4250 if (setjmp (r))
4251 perror_exit ("test 3 fault", 17);
4252
4253 x[0] = 1;
4254 y[0] = 1;
4255
4256 if (munmap (x, pg*2) < 0)
4257 perror_exit ("test 3 munmap", 18);
4258
4259 if (setjmp (r) == 0)
4260 {
4261 x[0] = 1;
4262 perror_exit ("test 3 no fault 1", 19);
4263 }
4264
4265 signal (SIGSEGV, sigsegv);
4266 if (setjmp (r) == 0)
4267 {
4268 y[0] = 1;
4269 perror_exit ("test 3 no fault 2", 20);
4270 }
4271 }
4272
4273 int
4274 main ()
4275 {
4276 sigemptyset (&unblock_sigsegv);
4277 sigaddset (&unblock_sigsegv, SIGSEGV);
4278 pg = getpagesize ();
4279 #ifndef USE_MAP_ANON
4280 devzero = open ("/dev/zero", O_RDWR);
4281 if (devzero < 0)
4282 perror_exit ("open /dev/zero", 1);
4283 #endif
4284
4285 test_0();
4286 test_1();
4287 test_2();
4288 test_3();
4289
4290 exit(0);
4291 }
4292 EOF
4293
4294 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4295 echo "configure:4296: checking for working mmap from /dev/zero" >&5
4296 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4297 echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299 if test "$cross_compiling" = yes; then
4300 # If this is not cygwin, and /dev/zero is a character device, it's probably
4301 # safe to assume it works.
4302 case "$host_os" in
4303 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4304 * ) if test -c /dev/zero
4305 then ac_cv_func_mmap_dev_zero=yes
4306 else ac_cv_func_mmap_dev_zero=no
4307 fi ;;
4308 esac
4309 else
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include "ct-mmap.inc"
4314 EOF
4315 if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4316 then
4317 ac_cv_func_mmap_dev_zero=yes
4318 else
4319 echo "configure: failed program was:" >&5
4320 cat conftest.$ac_ext >&5
4321 rm -fr conftest*
4322 if test $? -lt 4
4323 then ac_cv_func_mmap_dev_zero=no
4324 else ac_cv_func_mmap_dev_zero=buggy
4325 fi
4326 fi
4327 rm -fr conftest*
4328 fi
4329
4330
4331 fi
4332
4333 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4334 if test $ac_cv_func_mmap_dev_zero = yes; then
4335 cat >> confdefs.h <<\EOF
4336 #define HAVE_MMAP_DEV_ZERO 1
4337 EOF
4338
4339 fi
4340
4341 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4342 echo "configure:4343: checking for working mmap with MAP_ANON(YMOUS)" >&5
4343 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4344 echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346 if test "$cross_compiling" = yes; then
4347 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4348 # just because it's there. Some SCO Un*xen define it but don't implement it.
4349 ac_cv_func_mmap_anon=no
4350 else
4351 cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354 #define USE_MAP_ANON
4355 #include "ct-mmap.inc"
4356 EOF
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4358 then
4359 ac_cv_func_mmap_anon=yes
4360 else
4361 echo "configure: failed program was:" >&5
4362 cat conftest.$ac_ext >&5
4363 rm -fr conftest*
4364 if test $? -lt 4
4365 then ac_cv_func_mmap_anon=no
4366 else ac_cv_func_mmap_anon=buggy
4367 fi
4368 fi
4369 rm -fr conftest*
4370 fi
4371
4372
4373 fi
4374
4375 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4376 if test $ac_cv_func_mmap_anon = yes; then
4377 cat >> confdefs.h <<\EOF
4378 #define HAVE_MMAP_ANON 1
4379 EOF
4380
4381 fi
4382 rm -f ct-mmap.inc
4383
4384 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4385 echo "configure:4386: checking for working mmap of a file" >&5
4386 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4387 echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389 # Create a file one thousand bytes long.
4390 for i in 1 2 3 4 5 6 7 8 9 0
4391 do for j in 1 2 3 4 5 6 7 8 9 0
4392 do echo $i $j xxxxx
4393 done
4394 done > conftestdata$$
4395
4396 if test "$cross_compiling" = yes; then
4397 ac_cv_func_mmap_file=no
4398 else
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402
4403 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4404 Richard Henderson and Alexandre Oliva.
4405 Check whether read-only mmap of a plain file works. */
4406 #include <sys/types.h>
4407 #include <sys/stat.h>
4408 #include <fcntl.h>
4409 #include <sys/mman.h>
4410
4411 int main()
4412 {
4413 char *x;
4414 int fd;
4415 struct stat st;
4416
4417 fd = open("conftestdata$$", O_RDONLY);
4418 if (fd < 0)
4419 exit(1);
4420
4421 if (fstat (fd, &st))
4422 exit(2);
4423
4424 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4425 if (x == (char *) -1)
4426 exit(3);
4427
4428 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4429 exit(4);
4430
4431 if (munmap(x, st.st_size) < 0)
4432 exit(5);
4433
4434 exit(0);
4435 }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4438 then
4439 ac_cv_func_mmap_file=yes
4440 else
4441 echo "configure: failed program was:" >&5
4442 cat conftest.$ac_ext >&5
4443 rm -fr conftest*
4444 ac_cv_func_mmap_file=no
4445 fi
4446 rm -fr conftest*
4447 fi
4448
4449 fi
4450
4451 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4452 if test $ac_cv_func_mmap_file = yes; then
4453 cat >> confdefs.h <<\EOF
4454 #define HAVE_MMAP_FILE 1
4455 EOF
4456
4457 fi
4458
4459
4460
4461
4462 am_cv_lib_iconv_ldpath=
4463 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4464 if test "${with_libiconv_prefix+set}" = set; then
4465 withval="$with_libiconv_prefix"
4466
4467 for dir in `echo "$withval" | tr : ' '`; do
4468 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4469 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4470 done
4471
4472 fi
4473
4474
4475 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4476 echo "configure:4477: checking for iconv" >&5
4477 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4478 echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480
4481 am_cv_func_iconv="no, consider installing GNU libiconv"
4482 am_cv_lib_iconv=no
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486 #include <stdlib.h>
4487 #include <iconv.h>
4488 int main() {
4489 iconv_t cd = iconv_open("","");
4490 iconv(cd,NULL,NULL,NULL,NULL);
4491 iconv_close(cd);
4492 ; return 0; }
4493 EOF
4494 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4495 rm -rf conftest*
4496 am_cv_func_iconv=yes
4497 else
4498 echo "configure: failed program was:" >&5
4499 cat conftest.$ac_ext >&5
4500 fi
4501 rm -f conftest*
4502 if test "$am_cv_func_iconv" != yes; then
4503 am_save_LIBS="$LIBS"
4504 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4505 cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4508 #include <stdlib.h>
4509 #include <iconv.h>
4510 int main() {
4511 iconv_t cd = iconv_open("","");
4512 iconv(cd,NULL,NULL,NULL,NULL);
4513 iconv_close(cd);
4514 ; return 0; }
4515 EOF
4516 if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4517 rm -rf conftest*
4518 am_cv_lib_iconv=yes
4519 am_cv_func_iconv=yes
4520 else
4521 echo "configure: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4523 fi
4524 rm -f conftest*
4525 LIBS="$am_save_LIBS"
4526 fi
4527
4528 fi
4529
4530 echo "$ac_t""$am_cv_func_iconv" 1>&6
4531 if test "$am_cv_func_iconv" = yes; then
4532 cat >> confdefs.h <<\EOF
4533 #define HAVE_ICONV 1
4534 EOF
4535
4536 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4537 echo "configure:4538: checking for iconv declaration" >&5
4538 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4539 echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541
4542 cat > conftest.$ac_ext <<EOF
4543 #line 4544 "configure"
4544 #include "confdefs.h"
4545
4546 #include <stdlib.h>
4547 #include <iconv.h>
4548 extern
4549 #ifdef __cplusplus
4550 "C"
4551 #endif
4552 #if defined(__STDC__) || defined(__cplusplus)
4553 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4554 #else
4555 size_t iconv();
4556 #endif
4557
4558 int main() {
4559
4560 ; return 0; }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4563 rm -rf conftest*
4564 am_cv_proto_iconv_arg1=""
4565 else
4566 echo "configure: failed program was:" >&5
4567 cat conftest.$ac_ext >&5
4568 rm -rf conftest*
4569 am_cv_proto_iconv_arg1="const"
4570 fi
4571 rm -f conftest*
4572 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
4573 fi
4574
4575 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4576 echo "$ac_t""${ac_t:-
4577 }$am_cv_proto_iconv" 1>&6
4578 cat >> confdefs.h <<EOF
4579 #define ICONV_CONST $am_cv_proto_iconv_arg1
4580 EOF
4581
4582 fi
4583 LIBICONV=
4584 if test "$am_cv_lib_iconv" = yes; then
4585 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4586 fi
4587
4588
4589
4590 # We will need to find libiberty.h and ansidecl.h
4591 saved_CFLAGS="$CFLAGS"
4592 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4593 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4594 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4595 fprintf_unlocked strstr errno \
4596 malloc realloc calloc free basename getopt clock
4597 do
4598 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4599 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4600 echo "configure:4601: checking whether $ac_func is declared" >&5
4601 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4602 echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604 cat > conftest.$ac_ext <<EOF
4605 #line 4606 "configure"
4606 #include "confdefs.h"
4607 #undef $ac_tr_decl
4608 #define $ac_tr_decl 1
4609
4610 #include "ansidecl.h"
4611 #include "system.h"
4612
4613 int main() {
4614 #ifndef $ac_func
4615 char *(*pfn) = (char *(*)) $ac_func ;
4616 #endif
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4620 rm -rf conftest*
4621 eval "gcc_cv_have_decl_$ac_func=yes"
4622 else
4623 echo "configure: failed program was:" >&5
4624 cat conftest.$ac_ext >&5
4625 rm -rf conftest*
4626 eval "gcc_cv_have_decl_$ac_func=no"
4627 fi
4628 rm -f conftest*
4629 fi
4630
4631 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4632 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4633 #define $ac_tr_decl 1
4634 EOF
4635
4636 else
4637 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4638 #define $ac_tr_decl 0
4639 EOF
4640
4641 fi
4642
4643 done
4644 if test x = y ; then
4645 cat >> confdefs.h <<\EOF
4646 #define HAVE_DECL_GETENV 1
4647 EOF
4648 cat >> confdefs.h <<\EOF
4649 #define HAVE_DECL_ATOL 1
4650 EOF
4651 cat >> confdefs.h <<\EOF
4652 #define HAVE_DECL_SBRK 1
4653 EOF
4654 cat >> confdefs.h <<\EOF
4655 #define HAVE_DECL_ABORT 1
4656 EOF
4657 cat >> confdefs.h <<\EOF
4658 #define HAVE_DECL_ATOF 1
4659 EOF
4660 cat >> confdefs.h <<\EOF
4661 #define HAVE_DECL_GETCWD 1
4662 EOF
4663 cat >> confdefs.h <<\EOF
4664 #define HAVE_DECL_GETWD 1
4665 EOF
4666 \
4667 cat >> confdefs.h <<\EOF
4668 #define HAVE_DECL_STRSIGNAL 1
4669 EOF
4670 cat >> confdefs.h <<\EOF
4671 #define HAVE_DECL_PUTC_UNLOCKED 1
4672 EOF
4673 cat >> confdefs.h <<\EOF
4674 #define HAVE_DECL_FPUTS_UNLOCKED 1
4675 EOF
4676 cat >> confdefs.h <<\EOF
4677 #define HAVE_DECL_FWRITE_UNLOCKED 1
4678 EOF
4679 \
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4682 EOF
4683 cat >> confdefs.h <<\EOF
4684 #define HAVE_DECL_STRSTR 1
4685 EOF
4686 cat >> confdefs.h <<\EOF
4687 #define HAVE_DECL_ERRNO 1
4688 EOF
4689 \
4690 cat >> confdefs.h <<\EOF
4691 #define HAVE_DECL_MALLOC 1
4692 EOF
4693 cat >> confdefs.h <<\EOF
4694 #define HAVE_DECL_REALLOC 1
4695 EOF
4696 cat >> confdefs.h <<\EOF
4697 #define HAVE_DECL_CALLOC 1
4698 EOF
4699 cat >> confdefs.h <<\EOF
4700 #define HAVE_DECL_FREE 1
4701 EOF
4702 cat >> confdefs.h <<\EOF
4703 #define HAVE_DECL_BASENAME 1
4704 EOF
4705 cat >> confdefs.h <<\EOF
4706 #define HAVE_DECL_GETOPT 1
4707 EOF
4708 cat >> confdefs.h <<\EOF
4709 #define HAVE_DECL_CLOCK 1
4710 EOF
4711 fi
4712
4713
4714 for ac_func in getrlimit setrlimit getrusage
4715 do
4716 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4717 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4718 echo "configure:4719: checking whether $ac_func is declared" >&5
4719 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 #undef $ac_tr_decl
4726 #define $ac_tr_decl 1
4727
4728 #include "ansidecl.h"
4729 #include "system.h"
4730 #ifdef HAVE_SYS_RESOURCE_H
4731 #include <sys/resource.h>
4732 #endif
4733
4734
4735 int main() {
4736 #ifndef $ac_func
4737 char *(*pfn) = (char *(*)) $ac_func ;
4738 #endif
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4742 rm -rf conftest*
4743 eval "gcc_cv_have_decl_$ac_func=yes"
4744 else
4745 echo "configure: failed program was:" >&5
4746 cat conftest.$ac_ext >&5
4747 rm -rf conftest*
4748 eval "gcc_cv_have_decl_$ac_func=no"
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4754 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4755 #define $ac_tr_decl 1
4756 EOF
4757
4758 else
4759 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4760 #define $ac_tr_decl 0
4761 EOF
4762
4763 fi
4764
4765 done
4766 if test x = y ; then
4767 cat >> confdefs.h <<\EOF
4768 #define HAVE_DECL_GETRLIMIT 1
4769 EOF
4770 cat >> confdefs.h <<\EOF
4771 #define HAVE_DECL_SETRLIMIT 1
4772 EOF
4773 cat >> confdefs.h <<\EOF
4774 #define HAVE_DECL_GETRUSAGE 1
4775 EOF
4776 fi
4777
4778
4779 for ac_func in times
4780 do
4781 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4782 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4783 echo "configure:4784: checking whether $ac_func is declared" >&5
4784 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4785 echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787 cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #undef $ac_tr_decl
4791 #define $ac_tr_decl 1
4792
4793 #include "ansidecl.h"
4794 #include "system.h"
4795 #ifdef HAVE_SYS_TIMES_H
4796 #include <sys/times.h>
4797 #endif
4798
4799
4800 int main() {
4801 #ifndef $ac_func
4802 char *(*pfn) = (char *(*)) $ac_func ;
4803 #endif
4804 ; return 0; }
4805 EOF
4806 if { (eval echo configure:4807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4807 rm -rf conftest*
4808 eval "gcc_cv_have_decl_$ac_func=yes"
4809 else
4810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
4812 rm -rf conftest*
4813 eval "gcc_cv_have_decl_$ac_func=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817
4818 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4819 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4820 #define $ac_tr_decl 1
4821 EOF
4822
4823 else
4824 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4825 #define $ac_tr_decl 0
4826 EOF
4827
4828 fi
4829
4830 done
4831 if test x = y ; then
4832 cat >> confdefs.h <<\EOF
4833 #define HAVE_DECL_TIMES 1
4834 EOF
4835 fi
4836
4837
4838 # More time-related stuff.
4839 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4840 echo "configure:4841: checking for struct tms" >&5
4841 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4842 echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844
4845 cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848
4849 #include "ansidecl.h"
4850 #include "system.h"
4851 #ifdef HAVE_SYS_TIMES_H
4852 #include <sys/times.h>
4853 #endif
4854
4855 int main() {
4856 struct tms tms;
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4860 rm -rf conftest*
4861 ac_cv_struct_tms=yes
4862 else
4863 echo "configure: failed program was:" >&5
4864 cat conftest.$ac_ext >&5
4865 rm -rf conftest*
4866 ac_cv_struct_tms=no
4867 fi
4868 rm -f conftest*
4869 fi
4870
4871 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4872 if test $ac_cv_struct_tms = yes; then
4873 cat >> confdefs.h <<\EOF
4874 #define HAVE_STRUCT_TMS 1
4875 EOF
4876
4877 fi
4878
4879 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4880 # revisit after autoconf 2.50.
4881 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4882 echo "configure:4883: checking for clock_t" >&5
4883 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4884 echo $ac_n "(cached) $ac_c" 1>&6
4885 else
4886
4887 cat > conftest.$ac_ext <<EOF
4888 #line 4889 "configure"
4889 #include "confdefs.h"
4890
4891 #include "ansidecl.h"
4892 #include "system.h"
4893
4894 int main() {
4895 clock_t x;
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4899 rm -rf conftest*
4900 gcc_cv_type_clock_t=yes
4901 else
4902 echo "configure: failed program was:" >&5
4903 cat conftest.$ac_ext >&5
4904 rm -rf conftest*
4905 gcc_cv_type_clock_t=no
4906 fi
4907 rm -f conftest*
4908 fi
4909
4910 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4911 if test $gcc_cv_type_clock_t = yes; then
4912 cat >> confdefs.h <<\EOF
4913 #define HAVE_CLOCK_T 1
4914 EOF
4915
4916 fi
4917
4918 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4919 CFLAGS="$saved_CFLAGS"
4920
4921 # mkdir takes a single argument on some systems.
4922 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4923 echo "configure:4924: checking if mkdir takes one argument" >&5
4924 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4925 echo $ac_n "(cached) $ac_c" 1>&6
4926 else
4927 cat > conftest.$ac_ext <<EOF
4928 #line 4929 "configure"
4929 #include "confdefs.h"
4930
4931 #include <sys/types.h>
4932 #ifdef HAVE_SYS_STAT_H
4933 # include <sys/stat.h>
4934 #endif
4935 #ifdef HAVE_UNISTD_H
4936 # include <unistd.h>
4937 #endif
4938 #ifdef HAVE_DIRECT_H
4939 # include <direct.h>
4940 #endif
4941 int main() {
4942 mkdir ("foo", 0);
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4946 rm -rf conftest*
4947 gcc_cv_mkdir_takes_one_arg=no
4948 else
4949 echo "configure: failed program was:" >&5
4950 cat conftest.$ac_ext >&5
4951 rm -rf conftest*
4952 gcc_cv_mkdir_takes_one_arg=yes
4953 fi
4954 rm -f conftest*
4955 fi
4956
4957 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4958 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4959 cat >> confdefs.h <<\EOF
4960 #define MKDIR_TAKES_ONE_ARG 1
4961 EOF
4962
4963 fi
4964
4965
4966 # File extensions
4967 manext='.1'
4968 objext='.o'
4969
4970
4971
4972 target_gtfiles=
4973 build_xm_file=
4974 build_xm_defines=
4975 build_install_headers_dir=install-headers-tar
4976 build_exeext=
4977 host_xm_file=
4978 host_xm_defines=
4979 host_xmake_file=
4980 host_truncate_target=
4981 host_exeext=
4982
4983 # Decode the host machine, then the target machine.
4984 # For the host machine, we save the xm_file variable as host_xm_file;
4985 # then we decode the target machine and forget everything else
4986 # that came from the host machine.
4987 for machine in $build $host $target; do
4988 . ${srcdir}/config.gcc
4989 done
4990
4991 extra_objs="${host_extra_objs} ${extra_objs}"
4992
4993 # Default the target-machine variables that were not explicitly set.
4994 if test x"$tm_file" = x
4995 then tm_file=$cpu_type/$cpu_type.h; fi
4996
4997 if test x"$extra_headers" = x
4998 then extra_headers=; fi
4999
5000 if test x$md_file = x
5001 then md_file=$cpu_type/$cpu_type.md; fi
5002
5003 if test x$out_file = x
5004 then out_file=$cpu_type/$cpu_type.c; fi
5005
5006 if test x"$tmake_file" = x
5007 then tmake_file=$cpu_type/t-$cpu_type
5008 fi
5009
5010 if test x"$dwarf2" = xyes
5011 then tm_file="$tm_file tm-dwarf2.h"
5012 fi
5013
5014 if test x$float_format = x
5015 then float_format=i64
5016 fi
5017
5018 if test $float_format = none
5019 then float_h_file=Makefile.in
5020 else float_h_file=float-$float_format.h
5021 fi
5022
5023 # Say what files are being used for the output code and MD file.
5024 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5025 echo "Using \`$srcdir/config/$md_file' as machine description file."
5026
5027 # If any of the xm_file variables contain nonexistent files, warn
5028 # about them and drop them.
5029
5030 bx=
5031 for x in $build_xm_file; do
5032 if test -f $srcdir/config/$x
5033 then bx="$bx $x"
5034 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5035 fi
5036 done
5037 build_xm_file="$bx"
5038
5039 hx=
5040 for x in $host_xm_file; do
5041 if test -f $srcdir/config/$x
5042 then hx="$hx $x"
5043 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5044 fi
5045 done
5046 host_xm_file="$hx"
5047
5048 tx=
5049 for x in $xm_file; do
5050 if test -f $srcdir/config/$x
5051 then tx="$tx $x"
5052 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5053 fi
5054 done
5055 xm_file="$tx"
5056
5057 count=a
5058 for f in $tm_file; do
5059 count=${count}x
5060 done
5061 if test $count = ax; then
5062 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5063 else
5064 echo "Using the following target machine macro files:"
5065 for f in $tm_file; do
5066 echo " $srcdir/config/$f"
5067 done
5068 fi
5069
5070 count=a
5071 for f in $host_xm_file; do
5072 count=${count}x
5073 done
5074 if test $count = a; then
5075 :
5076 elif test $count = ax; then
5077 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5078 else
5079 echo "Using the following host machine macro files:"
5080 for f in $host_xm_file; do
5081 echo " $srcdir/config/$f"
5082 done
5083 fi
5084
5085 if test "$host_xm_file" != "$build_xm_file"; then
5086 count=a
5087 for f in $build_xm_file; do
5088 count=${count}x
5089 done
5090 if test $count = a; then
5091 :
5092 elif test $count = ax; then
5093 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5094 else
5095 echo "Using the following build machine macro files:"
5096 for f in $build_xm_file; do
5097 echo " $srcdir/config/$f"
5098 done
5099 fi
5100 fi
5101
5102 if test x$thread_file = x; then
5103 if test x$target_thread_file != x; then
5104 thread_file=$target_thread_file
5105 else
5106 thread_file='single'
5107 fi
5108 fi
5109
5110 # Look for a file containing extra machine modes.
5111 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5112 extra_modes_file='$(srcdir)'/config/${extra_modes}
5113
5114 cat >> confdefs.h <<EOF
5115 #define EXTRA_MODES_FILE "$extra_modes"
5116 EOF
5117
5118 cat >> confdefs.h <<\EOF
5119 #define EXTRA_CC_MODES 1
5120 EOF
5121
5122 fi
5123
5124 # auto-host.h is the file containing items generated by autoconf and is
5125 # the first file included by config.h.
5126 # If host=build, it is correct to have hconfig include auto-host.h
5127 # as well. If host!=build, we are in error and need to do more
5128 # work to find out the build config parameters.
5129 if test x$host = x$build
5130 then
5131 build_auto=auto-host.h
5132 FORBUILD=..
5133 else
5134 # We create a subdir, then run autoconf in the subdir.
5135 # To prevent recursion we set host and build for the new
5136 # invocation of configure to the build for this invocation
5137 # of configure.
5138 tempdir=build.$$
5139 rm -rf $tempdir
5140 mkdir $tempdir
5141 cd $tempdir
5142 case ${srcdir} in
5143 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5144 *) realsrcdir=../${srcdir};;
5145 esac
5146 saved_CFLAGS="${CFLAGS}"
5147 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5148 ${realsrcdir}/configure \
5149 --target=$target_alias --host=$build_alias --build=$build_alias
5150 CFLAGS="${saved_CFLAGS}"
5151
5152 # We just finished tests for the build machine, so rename
5153 # the file auto-build.h in the gcc directory.
5154 mv auto-host.h ../auto-build.h
5155 cd ..
5156 rm -rf $tempdir
5157 build_auto=auto-build.h
5158 FORBUILD=../$build_alias
5159 fi
5160
5161
5162 tm_file="${tm_file} defaults.h"
5163 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5164 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5165 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5166
5167 # Truncate the target if necessary
5168 if test x$host_truncate_target != x; then
5169 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5170 fi
5171
5172 # Get the version trigger filename from the toplevel
5173 if test "${with_gcc_version_trigger+set}" = set; then
5174 gcc_version_trigger=$with_gcc_version_trigger
5175 else
5176 gcc_version_trigger=${srcdir}/version.c
5177 fi
5178 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5179 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5180
5181 # Compile in configure arguments.
5182 if test -f configargs.h ; then
5183 # Being re-configured.
5184 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5185 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5186 else
5187 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5188 fi
5189 cat > configargs.h <<EOF
5190 /* Generated automatically. */
5191 static const char configuration_arguments[] = "$gcc_config_arguments";
5192 static const char thread_model[] = "$thread_file";
5193 EOF
5194
5195 # Internationalization
5196 PACKAGE=gcc
5197 VERSION="$gcc_version"
5198
5199
5200
5201 # Enable NLS support by default
5202 # Check whether --enable-nls or --disable-nls was given.
5203 if test "${enable_nls+set}" = set; then
5204 enableval="$enable_nls"
5205 :
5206 else
5207 enable_nls=yes
5208 fi
5209
5210
5211 # if cross compiling, disable NLS support.
5212 # It's not worth the trouble, at least for now.
5213
5214 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5215 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5216 enable_nls=no
5217 fi
5218
5219
5220
5221 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5222 echo "configure:5223: checking for library containing strerror" >&5
5223 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
5225 else
5226 ac_func_search_save_LIBS="$LIBS"
5227 ac_cv_search_strerror="no"
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 /* Override any gcc2 internal prototype to avoid an error. */
5232 /* We use char because int might match the return type of a gcc2
5233 builtin and then its argument prototype would still apply. */
5234 char strerror();
5235
5236 int main() {
5237 strerror()
5238 ; return 0; }
5239 EOF
5240 if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5241 rm -rf conftest*
5242 ac_cv_search_strerror="none required"
5243 else
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 fi
5247 rm -f conftest*
5248 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5249 LIBS="-l$i $ac_func_search_save_LIBS"
5250 cat > conftest.$ac_ext <<EOF
5251 #line 5252 "configure"
5252 #include "confdefs.h"
5253 /* Override any gcc2 internal prototype to avoid an error. */
5254 /* We use char because int might match the return type of a gcc2
5255 builtin and then its argument prototype would still apply. */
5256 char strerror();
5257
5258 int main() {
5259 strerror()
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263 rm -rf conftest*
5264 ac_cv_search_strerror="-l$i"
5265 break
5266 else
5267 echo "configure: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 fi
5270 rm -f conftest*
5271 done
5272 LIBS="$ac_func_search_save_LIBS"
5273 fi
5274
5275 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5276 if test "$ac_cv_search_strerror" != "no"; then
5277 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5278
5279 else :
5280
5281 fi
5282
5283
5284 echo $ac_n "checking for working const""... $ac_c" 1>&6
5285 echo "configure:5286: checking for working const" >&5
5286 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5287 echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292
5293 int main() {
5294
5295 /* Ultrix mips cc rejects this. */
5296 typedef int charset[2]; const charset x;
5297 /* SunOS 4.1.1 cc rejects this. */
5298 char const *const *ccp;
5299 char **p;
5300 /* NEC SVR4.0.2 mips cc rejects this. */
5301 struct point {int x, y;};
5302 static struct point const zero = {0,0};
5303 /* AIX XL C 1.02.0.0 rejects this.
5304 It does not let you subtract one const X* pointer from another in an arm
5305 of an if-expression whose if-part is not a constant expression */
5306 const char *g = "string";
5307 ccp = &g + (g ? g-g : 0);
5308 /* HPUX 7.0 cc rejects these. */
5309 ++ccp;
5310 p = (char**) ccp;
5311 ccp = (char const *const *) p;
5312 { /* SCO 3.2v4 cc rejects this. */
5313 char *t;
5314 char const *s = 0 ? (char *) 0 : (char const *) 0;
5315
5316 *t++ = 0;
5317 }
5318 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5319 int x[] = {25, 17};
5320 const int *foo = &x[0];
5321 ++foo;
5322 }
5323 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5324 typedef const int *iptr;
5325 iptr p = 0;
5326 ++p;
5327 }
5328 { /* AIX XL C 1.02.0.0 rejects this saying
5329 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5330 struct s { int j; const int *ap[3]; };
5331 struct s *b; b->j = 5;
5332 }
5333 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5334 const int foo = 10;
5335 }
5336
5337 ; return 0; }
5338 EOF
5339 if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5340 rm -rf conftest*
5341 ac_cv_c_const=yes
5342 else
5343 echo "configure: failed program was:" >&5
5344 cat conftest.$ac_ext >&5
5345 rm -rf conftest*
5346 ac_cv_c_const=no
5347 fi
5348 rm -f conftest*
5349 fi
5350
5351 echo "$ac_t""$ac_cv_c_const" 1>&6
5352 if test $ac_cv_c_const = no; then
5353 cat >> confdefs.h <<\EOF
5354 #define const
5355 EOF
5356
5357 fi
5358
5359 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5360 echo "configure:5361: checking for off_t" >&5
5361 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5362 echo $ac_n "(cached) $ac_c" 1>&6
5363 else
5364 cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367 #include <sys/types.h>
5368 #if STDC_HEADERS
5369 #include <stdlib.h>
5370 #include <stddef.h>
5371 #endif
5372 EOF
5373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5374 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5375 rm -rf conftest*
5376 ac_cv_type_off_t=yes
5377 else
5378 rm -rf conftest*
5379 ac_cv_type_off_t=no
5380 fi
5381 rm -f conftest*
5382
5383 fi
5384 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5385 if test $ac_cv_type_off_t = no; then
5386 cat >> confdefs.h <<\EOF
5387 #define off_t long
5388 EOF
5389
5390 fi
5391
5392 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5393 echo "configure:5394: checking for size_t" >&5
5394 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 #include <sys/types.h>
5401 #if STDC_HEADERS
5402 #include <stdlib.h>
5403 #include <stddef.h>
5404 #endif
5405 EOF
5406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5407 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5408 rm -rf conftest*
5409 ac_cv_type_size_t=yes
5410 else
5411 rm -rf conftest*
5412 ac_cv_type_size_t=no
5413 fi
5414 rm -f conftest*
5415
5416 fi
5417 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5418 if test $ac_cv_type_size_t = no; then
5419 cat >> confdefs.h <<\EOF
5420 #define size_t unsigned
5421 EOF
5422
5423 fi
5424
5425 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5426 # for constant arguments. Useless!
5427 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5428 echo "configure:5429: checking for working alloca.h" >&5
5429 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5430 echo $ac_n "(cached) $ac_c" 1>&6
5431 else
5432 cat > conftest.$ac_ext <<EOF
5433 #line 5434 "configure"
5434 #include "confdefs.h"
5435 #include <alloca.h>
5436 int main() {
5437 char *p = alloca(2 * sizeof(int));
5438 ; return 0; }
5439 EOF
5440 if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5441 rm -rf conftest*
5442 ac_cv_header_alloca_h=yes
5443 else
5444 echo "configure: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 rm -rf conftest*
5447 ac_cv_header_alloca_h=no
5448 fi
5449 rm -f conftest*
5450 fi
5451
5452 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5453 if test $ac_cv_header_alloca_h = yes; then
5454 cat >> confdefs.h <<\EOF
5455 #define HAVE_ALLOCA_H 1
5456 EOF
5457
5458 fi
5459
5460 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5461 echo "configure:5462: checking for alloca" >&5
5462 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5463 echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465 cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468
5469 #ifdef __GNUC__
5470 # define alloca __builtin_alloca
5471 #else
5472 # ifdef _MSC_VER
5473 # include <malloc.h>
5474 # define alloca _alloca
5475 # else
5476 # if HAVE_ALLOCA_H
5477 # include <alloca.h>
5478 # else
5479 # ifdef _AIX
5480 #pragma alloca
5481 # else
5482 # ifndef alloca /* predefined by HP cc +Olibcalls */
5483 char *alloca ();
5484 # endif
5485 # endif
5486 # endif
5487 # endif
5488 #endif
5489
5490 int main() {
5491 char *p = (char *) alloca(1);
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495 rm -rf conftest*
5496 ac_cv_func_alloca_works=yes
5497 else
5498 echo "configure: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5500 rm -rf conftest*
5501 ac_cv_func_alloca_works=no
5502 fi
5503 rm -f conftest*
5504 fi
5505
5506 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5507 if test $ac_cv_func_alloca_works = yes; then
5508 cat >> confdefs.h <<\EOF
5509 #define HAVE_ALLOCA 1
5510 EOF
5511
5512 fi
5513
5514 if test $ac_cv_func_alloca_works = no; then
5515 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5516 # that cause trouble. Some versions do not even contain alloca or
5517 # contain a buggy version. If you still want to use their alloca,
5518 # use ar to extract alloca.o from them instead of compiling alloca.c.
5519 ALLOCA=alloca.${ac_objext}
5520 cat >> confdefs.h <<\EOF
5521 #define C_ALLOCA 1
5522 EOF
5523
5524
5525 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5526 echo "configure:5527: checking whether alloca needs Cray hooks" >&5
5527 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5528 echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530 cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #if defined(CRAY) && ! defined(CRAY2)
5534 webecray
5535 #else
5536 wenotbecray
5537 #endif
5538
5539 EOF
5540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5541 egrep "webecray" >/dev/null 2>&1; then
5542 rm -rf conftest*
5543 ac_cv_os_cray=yes
5544 else
5545 rm -rf conftest*
5546 ac_cv_os_cray=no
5547 fi
5548 rm -f conftest*
5549
5550 fi
5551
5552 echo "$ac_t""$ac_cv_os_cray" 1>&6
5553 if test $ac_cv_os_cray = yes; then
5554 for ac_func in _getb67 GETB67 getb67; do
5555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_func" >&5
5557 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5558 echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 /* System header to define __stub macros and hopefully few prototypes,
5564 which can conflict with char $ac_func(); below. */
5565 #include <assert.h>
5566 /* Override any gcc2 internal prototype to avoid an error. */
5567 /* We use char because int might match the return type of a gcc2
5568 builtin and then its argument prototype would still apply. */
5569 char $ac_func();
5570
5571 int main() {
5572
5573 /* The GNU C library defines this for functions which it implements
5574 to always fail with ENOSYS. Some functions are actually named
5575 something starting with __ and the normal name is an alias. */
5576 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5577 choke me
5578 #else
5579 $ac_func();
5580 #endif
5581
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585 rm -rf conftest*
5586 eval "ac_cv_func_$ac_func=yes"
5587 else
5588 echo "configure: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
5590 rm -rf conftest*
5591 eval "ac_cv_func_$ac_func=no"
5592 fi
5593 rm -f conftest*
5594 fi
5595
5596 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5597 echo "$ac_t""yes" 1>&6
5598 cat >> confdefs.h <<EOF
5599 #define CRAY_STACKSEG_END $ac_func
5600 EOF
5601
5602 break
5603 else
5604 echo "$ac_t""no" 1>&6
5605 fi
5606
5607 done
5608 fi
5609
5610 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5611 echo "configure:5612: checking stack direction for C alloca" >&5
5612 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5613 echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615 if test "$cross_compiling" = yes; then
5616 ac_cv_c_stack_direction=0
5617 else
5618 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621 find_stack_direction ()
5622 {
5623 static char *addr = 0;
5624 auto char dummy;
5625 if (addr == 0)
5626 {
5627 addr = &dummy;
5628 return find_stack_direction ();
5629 }
5630 else
5631 return (&dummy > addr) ? 1 : -1;
5632 }
5633 main ()
5634 {
5635 exit (find_stack_direction() < 0);
5636 }
5637 EOF
5638 if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5639 then
5640 ac_cv_c_stack_direction=1
5641 else
5642 echo "configure: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 rm -fr conftest*
5645 ac_cv_c_stack_direction=-1
5646 fi
5647 rm -fr conftest*
5648 fi
5649
5650 fi
5651
5652 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5653 cat >> confdefs.h <<EOF
5654 #define STACK_DIRECTION $ac_cv_c_stack_direction
5655 EOF
5656
5657 fi
5658
5659
5660 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5661 echo "configure:5662: checking whether we are using the GNU C Library 2.1 or newer" >&5
5662 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5663 echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665 cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668
5669 #include <features.h>
5670 #ifdef __GNU_LIBRARY__
5671 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5672 Lucky GNU user
5673 #endif
5674 #endif
5675
5676 EOF
5677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5678 egrep "Lucky GNU user" >/dev/null 2>&1; then
5679 rm -rf conftest*
5680 ac_cv_gnu_library_2_1=yes
5681 else
5682 rm -rf conftest*
5683 ac_cv_gnu_library_2_1=no
5684 fi
5685 rm -f conftest*
5686
5687
5688
5689 fi
5690
5691 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5692
5693 GLIBC21="$ac_cv_gnu_library_2_1"
5694
5695
5696
5697 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5698 stdlib.h string.h unistd.h sys/param.h
5699 do
5700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5702 echo "configure:5703: checking for $ac_hdr" >&5
5703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5704 echo $ac_n "(cached) $ac_c" 1>&6
5705 else
5706 cat > conftest.$ac_ext <<EOF
5707 #line 5708 "configure"
5708 #include "confdefs.h"
5709 #include <$ac_hdr>
5710 EOF
5711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5712 { (eval echo configure:5713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5714 if test -z "$ac_err"; then
5715 rm -rf conftest*
5716 eval "ac_cv_header_$ac_safe=yes"
5717 else
5718 echo "$ac_err" >&5
5719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5721 rm -rf conftest*
5722 eval "ac_cv_header_$ac_safe=no"
5723 fi
5724 rm -f conftest*
5725 fi
5726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5727 echo "$ac_t""yes" 1>&6
5728 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5729 cat >> confdefs.h <<EOF
5730 #define $ac_tr_hdr 1
5731 EOF
5732
5733 else
5734 echo "$ac_t""no" 1>&6
5735 fi
5736 done
5737
5738 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5739 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5740 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5741 do
5742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5743 echo "configure:5744: checking for $ac_func" >&5
5744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5745 echo $ac_n "(cached) $ac_c" 1>&6
5746 else
5747 cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 /* System header to define __stub macros and hopefully few prototypes,
5751 which can conflict with char $ac_func(); below. */
5752 #include <assert.h>
5753 /* Override any gcc2 internal prototype to avoid an error. */
5754 /* We use char because int might match the return type of a gcc2
5755 builtin and then its argument prototype would still apply. */
5756 char $ac_func();
5757
5758 int main() {
5759
5760 /* The GNU C library defines this for functions which it implements
5761 to always fail with ENOSYS. Some functions are actually named
5762 something starting with __ and the normal name is an alias. */
5763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5764 choke me
5765 #else
5766 $ac_func();
5767 #endif
5768
5769 ; return 0; }
5770 EOF
5771 if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5772 rm -rf conftest*
5773 eval "ac_cv_func_$ac_func=yes"
5774 else
5775 echo "configure: failed program was:" >&5
5776 cat conftest.$ac_ext >&5
5777 rm -rf conftest*
5778 eval "ac_cv_func_$ac_func=no"
5779 fi
5780 rm -f conftest*
5781 fi
5782
5783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5784 echo "$ac_t""yes" 1>&6
5785 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5786 cat >> confdefs.h <<EOF
5787 #define $ac_tr_func 1
5788 EOF
5789
5790 else
5791 echo "$ac_t""no" 1>&6
5792 fi
5793 done
5794
5795
5796
5797
5798 am_cv_lib_iconv_ldpath=
5799 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5800 if test "${with_libiconv_prefix+set}" = set; then
5801 withval="$with_libiconv_prefix"
5802
5803 for dir in `echo "$withval" | tr : ' '`; do
5804 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5805 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5806 done
5807
5808 fi
5809
5810
5811 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5812 echo "configure:5813: checking for iconv" >&5
5813 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5815 else
5816
5817 am_cv_func_iconv="no, consider installing GNU libiconv"
5818 am_cv_lib_iconv=no
5819 cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822 #include <stdlib.h>
5823 #include <iconv.h>
5824 int main() {
5825 iconv_t cd = iconv_open("","");
5826 iconv(cd,NULL,NULL,NULL,NULL);
5827 iconv_close(cd);
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831 rm -rf conftest*
5832 am_cv_func_iconv=yes
5833 else
5834 echo "configure: failed program was:" >&5
5835 cat conftest.$ac_ext >&5
5836 fi
5837 rm -f conftest*
5838 if test "$am_cv_func_iconv" != yes; then
5839 am_save_LIBS="$LIBS"
5840 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5841 cat > conftest.$ac_ext <<EOF
5842 #line 5843 "configure"
5843 #include "confdefs.h"
5844 #include <stdlib.h>
5845 #include <iconv.h>
5846 int main() {
5847 iconv_t cd = iconv_open("","");
5848 iconv(cd,NULL,NULL,NULL,NULL);
5849 iconv_close(cd);
5850 ; return 0; }
5851 EOF
5852 if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5853 rm -rf conftest*
5854 am_cv_lib_iconv=yes
5855 am_cv_func_iconv=yes
5856 else
5857 echo "configure: failed program was:" >&5
5858 cat conftest.$ac_ext >&5
5859 fi
5860 rm -f conftest*
5861 LIBS="$am_save_LIBS"
5862 fi
5863
5864 fi
5865
5866 echo "$ac_t""$am_cv_func_iconv" 1>&6
5867 if test "$am_cv_func_iconv" = yes; then
5868 cat >> confdefs.h <<\EOF
5869 #define HAVE_ICONV 1
5870 EOF
5871
5872 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5873 echo "configure:5874: checking for iconv declaration" >&5
5874 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5875 echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877
5878 cat > conftest.$ac_ext <<EOF
5879 #line 5880 "configure"
5880 #include "confdefs.h"
5881
5882 #include <stdlib.h>
5883 #include <iconv.h>
5884 extern
5885 #ifdef __cplusplus
5886 "C"
5887 #endif
5888 #if defined(__STDC__) || defined(__cplusplus)
5889 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5890 #else
5891 size_t iconv();
5892 #endif
5893
5894 int main() {
5895
5896 ; return 0; }
5897 EOF
5898 if { (eval echo configure:5899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5899 rm -rf conftest*
5900 am_cv_proto_iconv_arg1=""
5901 else
5902 echo "configure: failed program was:" >&5
5903 cat conftest.$ac_ext >&5
5904 rm -rf conftest*
5905 am_cv_proto_iconv_arg1="const"
5906 fi
5907 rm -f conftest*
5908 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
5909 fi
5910
5911 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5912 echo "$ac_t""${ac_t:-
5913 }$am_cv_proto_iconv" 1>&6
5914 cat >> confdefs.h <<EOF
5915 #define ICONV_CONST $am_cv_proto_iconv_arg1
5916 EOF
5917
5918 fi
5919 LIBICONV=
5920 if test "$am_cv_lib_iconv" = yes; then
5921 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5922 fi
5923
5924
5925
5926 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
5927 echo "configure:5928: checking for nl_langinfo and CODESET" >&5
5928 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
5929 echo $ac_n "(cached) $ac_c" 1>&6
5930 else
5931 cat > conftest.$ac_ext <<EOF
5932 #line 5933 "configure"
5933 #include "confdefs.h"
5934 #include <langinfo.h>
5935 int main() {
5936 char* cs = nl_langinfo(CODESET);
5937 ; return 0; }
5938 EOF
5939 if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5940 rm -rf conftest*
5941 am_cv_langinfo_codeset=yes
5942 else
5943 echo "configure: failed program was:" >&5
5944 cat conftest.$ac_ext >&5
5945 rm -rf conftest*
5946 am_cv_langinfo_codeset=no
5947 fi
5948 rm -f conftest*
5949
5950 fi
5951
5952 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5953 if test $am_cv_langinfo_codeset = yes; then
5954 cat >> confdefs.h <<\EOF
5955 #define HAVE_LANGINFO_CODESET 1
5956 EOF
5957
5958 fi
5959
5960 if test $ac_cv_header_locale_h = yes; then
5961 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5962 echo "configure:5963: checking for LC_MESSAGES" >&5
5963 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5964 echo $ac_n "(cached) $ac_c" 1>&6
5965 else
5966 cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969 #include <locale.h>
5970 int main() {
5971 return LC_MESSAGES
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975 rm -rf conftest*
5976 am_cv_val_LC_MESSAGES=yes
5977 else
5978 echo "configure: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 rm -rf conftest*
5981 am_cv_val_LC_MESSAGES=no
5982 fi
5983 rm -f conftest*
5984 fi
5985
5986 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5987 if test $am_cv_val_LC_MESSAGES = yes; then
5988 cat >> confdefs.h <<\EOF
5989 #define HAVE_LC_MESSAGES 1
5990 EOF
5991
5992 fi
5993 fi
5994 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5995 echo "configure:5996: checking whether NLS is requested" >&5
5996 # Check whether --enable-nls or --disable-nls was given.
5997 if test "${enable_nls+set}" = set; then
5998 enableval="$enable_nls"
5999 USE_NLS=$enableval
6000 else
6001 USE_NLS=yes
6002 fi
6003
6004 echo "$ac_t""$USE_NLS" 1>&6
6005
6006
6007 BUILD_INCLUDED_LIBINTL=no
6008 USE_INCLUDED_LIBINTL=no
6009 INTLLIBS=
6010 INTLDEPS=
6011
6012 if test "$USE_NLS" = "yes"; then
6013 cat >> confdefs.h <<\EOF
6014 #define ENABLE_NLS 1
6015 EOF
6016
6017 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6018 echo "configure:6019: checking whether included gettext is requested" >&5
6019 # Check whether --with-included-gettext or --without-included-gettext was given.
6020 if test "${with_included_gettext+set}" = set; then
6021 withval="$with_included_gettext"
6022 nls_cv_force_use_gnu_gettext=$withval
6023 else
6024 nls_cv_force_use_gnu_gettext=no
6025 fi
6026
6027 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6028
6029 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6030 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6031 CATOBJEXT=NONE
6032
6033
6034
6035
6036 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6037 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6038 echo "configure:6039: checking for libintl.h" >&5
6039 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6040 echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042 cat > conftest.$ac_ext <<EOF
6043 #line 6044 "configure"
6044 #include "confdefs.h"
6045 #include <libintl.h>
6046 EOF
6047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6048 { (eval echo configure:6049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6050 if test -z "$ac_err"; then
6051 rm -rf conftest*
6052 eval "ac_cv_header_$ac_safe=yes"
6053 else
6054 echo "$ac_err" >&5
6055 echo "configure: failed program was:" >&5
6056 cat conftest.$ac_ext >&5
6057 rm -rf conftest*
6058 eval "ac_cv_header_$ac_safe=no"
6059 fi
6060 rm -f conftest*
6061 fi
6062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6063 echo "$ac_t""yes" 1>&6
6064 cat >> confdefs.h <<\EOF
6065 #define HAVE_LIBINTL_H 1
6066 EOF
6067
6068 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6069 echo "configure:6070: checking for GNU gettext in libc" >&5
6070 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6071 echo $ac_n "(cached) $ac_c" 1>&6
6072 else
6073 cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076 #include <libintl.h>
6077 extern int _nl_msg_cat_cntr;
6078 int main() {
6079 bindtextdomain ("", "");
6080 return (int) gettext ("") + _nl_msg_cat_cntr
6081 ; return 0; }
6082 EOF
6083 if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6084 rm -rf conftest*
6085 gt_cv_func_gnugettext1_libc=yes
6086 else
6087 echo "configure: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089 rm -rf conftest*
6090 gt_cv_func_gnugettext1_libc=no
6091 fi
6092 rm -f conftest*
6093 fi
6094
6095 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6096
6097 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6098 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6099 echo "configure:6100: checking for GNU gettext in libintl" >&5
6100 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6101 echo $ac_n "(cached) $ac_c" 1>&6
6102 else
6103 gt_save_LIBS="$LIBS"
6104 LIBS="$LIBS -lintl $LIBICONV"
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 #include <libintl.h>
6109 extern int _nl_msg_cat_cntr;
6110 int main() {
6111 bindtextdomain ("", "");
6112 return (int) gettext ("") + _nl_msg_cat_cntr
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116 rm -rf conftest*
6117 gt_cv_func_gnugettext1_libintl=yes
6118 else
6119 echo "configure: failed program was:" >&5
6120 cat conftest.$ac_ext >&5
6121 rm -rf conftest*
6122 gt_cv_func_gnugettext1_libintl=no
6123 fi
6124 rm -f conftest*
6125 LIBS="$gt_save_LIBS"
6126 fi
6127
6128 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6129 fi
6130
6131 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6132 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6133 && test "$PACKAGE" != gettext; }; then
6134 cat >> confdefs.h <<\EOF
6135 #define HAVE_GETTEXT 1
6136 EOF
6137
6138
6139 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6140 INTLLIBS="-lintl $LIBICONV"
6141 fi
6142
6143 gt_save_LIBS="$LIBS"
6144 LIBS="$LIBS $INTLLIBS"
6145 for ac_func in dcgettext
6146 do
6147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6148 echo "configure:6149: checking for $ac_func" >&5
6149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6150 echo $ac_n "(cached) $ac_c" 1>&6
6151 else
6152 cat > conftest.$ac_ext <<EOF
6153 #line 6154 "configure"
6154 #include "confdefs.h"
6155 /* System header to define __stub macros and hopefully few prototypes,
6156 which can conflict with char $ac_func(); below. */
6157 #include <assert.h>
6158 /* Override any gcc2 internal prototype to avoid an error. */
6159 /* We use char because int might match the return type of a gcc2
6160 builtin and then its argument prototype would still apply. */
6161 char $ac_func();
6162
6163 int main() {
6164
6165 /* The GNU C library defines this for functions which it implements
6166 to always fail with ENOSYS. Some functions are actually named
6167 something starting with __ and the normal name is an alias. */
6168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6169 choke me
6170 #else
6171 $ac_func();
6172 #endif
6173
6174 ; return 0; }
6175 EOF
6176 if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6177 rm -rf conftest*
6178 eval "ac_cv_func_$ac_func=yes"
6179 else
6180 echo "configure: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182 rm -rf conftest*
6183 eval "ac_cv_func_$ac_func=no"
6184 fi
6185 rm -f conftest*
6186 fi
6187
6188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6189 echo "$ac_t""yes" 1>&6
6190 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6191 cat >> confdefs.h <<EOF
6192 #define $ac_tr_func 1
6193 EOF
6194
6195 else
6196 echo "$ac_t""no" 1>&6
6197 fi
6198 done
6199
6200 LIBS="$gt_save_LIBS"
6201
6202 # Extract the first word of "msgfmt", so it can be a program name with args.
6203 set dummy msgfmt; ac_word=$2
6204 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6205 echo "configure:6206: checking for $ac_word" >&5
6206 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6207 echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209 case "$MSGFMT" in
6210 /*)
6211 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6212 ;;
6213 *)
6214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6215 for ac_dir in $PATH; do
6216 test -z "$ac_dir" && ac_dir=.
6217 if test -f $ac_dir/$ac_word; then
6218 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6219 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6220 break
6221 fi
6222 fi
6223 done
6224 IFS="$ac_save_ifs"
6225 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6226 ;;
6227 esac
6228 fi
6229 MSGFMT="$ac_cv_path_MSGFMT"
6230 if test "$MSGFMT" != ":"; then
6231 echo "$ac_t""$MSGFMT" 1>&6
6232 else
6233 echo "$ac_t""no" 1>&6
6234 fi
6235
6236 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6237 set dummy gmsgfmt; ac_word=$2
6238 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6239 echo "configure:6240: checking for $ac_word" >&5
6240 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6241 echo $ac_n "(cached) $ac_c" 1>&6
6242 else
6243 case "$GMSGFMT" in
6244 /*)
6245 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6246 ;;
6247 ?:/*)
6248 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6249 ;;
6250 *)
6251 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6252 ac_dummy="$PATH"
6253 for ac_dir in $ac_dummy; do
6254 test -z "$ac_dir" && ac_dir=.
6255 if test -f $ac_dir/$ac_word; then
6256 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6257 break
6258 fi
6259 done
6260 IFS="$ac_save_ifs"
6261 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6262 ;;
6263 esac
6264 fi
6265 GMSGFMT="$ac_cv_path_GMSGFMT"
6266 if test -n "$GMSGFMT"; then
6267 echo "$ac_t""$GMSGFMT" 1>&6
6268 else
6269 echo "$ac_t""no" 1>&6
6270 fi
6271
6272
6273 # Extract the first word of "xgettext", so it can be a program name with args.
6274 set dummy xgettext; ac_word=$2
6275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6276 echo "configure:6277: checking for $ac_word" >&5
6277 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6278 echo $ac_n "(cached) $ac_c" 1>&6
6279 else
6280 case "$XGETTEXT" in
6281 /*)
6282 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6283 ;;
6284 *)
6285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6286 for ac_dir in $PATH; do
6287 test -z "$ac_dir" && ac_dir=.
6288 if test -f $ac_dir/$ac_word; then
6289 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6290 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6291 break
6292 fi
6293 fi
6294 done
6295 IFS="$ac_save_ifs"
6296 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6297 ;;
6298 esac
6299 fi
6300 XGETTEXT="$ac_cv_path_XGETTEXT"
6301 if test "$XGETTEXT" != ":"; then
6302 echo "$ac_t""$XGETTEXT" 1>&6
6303 else
6304 echo "$ac_t""no" 1>&6
6305 fi
6306
6307
6308 CATOBJEXT=.gmo
6309 fi
6310
6311 else
6312 echo "$ac_t""no" 1>&6
6313 fi
6314
6315
6316 if test "$CATOBJEXT" = "NONE"; then
6317 nls_cv_use_gnu_gettext=yes
6318 fi
6319 fi
6320
6321 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6322 INTLOBJS="\$(GETTOBJS)"
6323 # Extract the first word of "msgfmt", so it can be a program name with args.
6324 set dummy msgfmt; ac_word=$2
6325 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6326 echo "configure:6327: checking for $ac_word" >&5
6327 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6328 echo $ac_n "(cached) $ac_c" 1>&6
6329 else
6330 case "$MSGFMT" in
6331 /*)
6332 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6333 ;;
6334 *)
6335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6336 for ac_dir in $PATH; do
6337 test -z "$ac_dir" && ac_dir=.
6338 if test -f $ac_dir/$ac_word; then
6339 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6340 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6341 break
6342 fi
6343 fi
6344 done
6345 IFS="$ac_save_ifs"
6346 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6347 ;;
6348 esac
6349 fi
6350 MSGFMT="$ac_cv_path_MSGFMT"
6351 if test "$MSGFMT" != ":"; then
6352 echo "$ac_t""$MSGFMT" 1>&6
6353 else
6354 echo "$ac_t""no" 1>&6
6355 fi
6356
6357 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6358 set dummy gmsgfmt; ac_word=$2
6359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6360 echo "configure:6361: checking for $ac_word" >&5
6361 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6362 echo $ac_n "(cached) $ac_c" 1>&6
6363 else
6364 case "$GMSGFMT" in
6365 /*)
6366 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6367 ;;
6368 ?:/*)
6369 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6370 ;;
6371 *)
6372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6373 ac_dummy="$PATH"
6374 for ac_dir in $ac_dummy; do
6375 test -z "$ac_dir" && ac_dir=.
6376 if test -f $ac_dir/$ac_word; then
6377 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6378 break
6379 fi
6380 done
6381 IFS="$ac_save_ifs"
6382 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6383 ;;
6384 esac
6385 fi
6386 GMSGFMT="$ac_cv_path_GMSGFMT"
6387 if test -n "$GMSGFMT"; then
6388 echo "$ac_t""$GMSGFMT" 1>&6
6389 else
6390 echo "$ac_t""no" 1>&6
6391 fi
6392
6393 # Extract the first word of "xgettext", so it can be a program name with args.
6394 set dummy xgettext; ac_word=$2
6395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6396 echo "configure:6397: checking for $ac_word" >&5
6397 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6398 echo $ac_n "(cached) $ac_c" 1>&6
6399 else
6400 case "$XGETTEXT" in
6401 /*)
6402 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6403 ;;
6404 *)
6405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6406 for ac_dir in $PATH; do
6407 test -z "$ac_dir" && ac_dir=.
6408 if test -f $ac_dir/$ac_word; then
6409 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6410 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6411 break
6412 fi
6413 fi
6414 done
6415 IFS="$ac_save_ifs"
6416 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6417 ;;
6418 esac
6419 fi
6420 XGETTEXT="$ac_cv_path_XGETTEXT"
6421 if test "$XGETTEXT" != ":"; then
6422 echo "$ac_t""$XGETTEXT" 1>&6
6423 else
6424 echo "$ac_t""no" 1>&6
6425 fi
6426
6427
6428 BUILD_INCLUDED_LIBINTL=yes
6429 USE_INCLUDED_LIBINTL=yes
6430 CATOBJEXT=.gmo
6431 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6432 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6433 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6434 fi
6435
6436 if test "$GMSGFMT" != ":"; then
6437 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6438 : ;
6439 else
6440 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6441 GMSGFMT=":"
6442 fi
6443 fi
6444
6445 if test "$XGETTEXT" != ":"; then
6446 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6447 : ;
6448 else
6449 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6450 XGETTEXT=":"
6451 fi
6452 fi
6453
6454 POSUB=po
6455 fi
6456
6457
6458
6459 if test "$PACKAGE" = gettext; then
6460 BUILD_INCLUDED_LIBINTL=yes
6461 fi
6462
6463 for ac_prog in bison
6464 do
6465 # Extract the first word of "$ac_prog", so it can be a program name with args.
6466 set dummy $ac_prog; ac_word=$2
6467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6468 echo "configure:6469: checking for $ac_word" >&5
6469 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6470 echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472 if test -n "$INTLBISON"; then
6473 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6474 else
6475 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6476 ac_dummy="$PATH"
6477 for ac_dir in $ac_dummy; do
6478 test -z "$ac_dir" && ac_dir=.
6479 if test -f $ac_dir/$ac_word; then
6480 ac_cv_prog_INTLBISON="$ac_prog"
6481 break
6482 fi
6483 done
6484 IFS="$ac_save_ifs"
6485 fi
6486 fi
6487 INTLBISON="$ac_cv_prog_INTLBISON"
6488 if test -n "$INTLBISON"; then
6489 echo "$ac_t""$INTLBISON" 1>&6
6490 else
6491 echo "$ac_t""no" 1>&6
6492 fi
6493
6494 test -n "$INTLBISON" && break
6495 done
6496
6497 if test -z "$INTLBISON"; then
6498 ac_verc_fail=yes
6499 else
6500 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6501 echo "configure:6502: checking version of bison" >&5
6502 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6503 case $ac_prog_version in
6504 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6505 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6506 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6507 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6508 esac
6509 echo "$ac_t""$ac_prog_version" 1>&6
6510 fi
6511 if test $ac_verc_fail = yes; then
6512 INTLBISON=:
6513 fi
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524 if test $USE_INCLUDED_LIBINTL = yes; then
6525 cat >> confdefs.h <<\EOF
6526 #define USE_INCLUDED_LIBINTL 1
6527 EOF
6528
6529 fi
6530
6531 nls_cv_header_intl=
6532 nls_cv_header_libgt=
6533
6534 DATADIRNAME=share
6535
6536
6537 INSTOBJEXT=.mo
6538
6539
6540 GENCAT=gencat
6541
6542
6543
6544 if test "x$CATOBJEXT" != x; then
6545 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6546 echo "configure:6547: checking for catalogs to be installed" >&5
6547 # Look for .po and .gmo files in the source directory.
6548 CATALOGS=
6549 XLINGUAS=
6550 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6551 # If there aren't any .gmo files the shell will give us the
6552 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6553 # weeded out.
6554 case "$cat" in *\**)
6555 continue;;
6556 esac
6557 # The quadruple backslash is collapsed to a double backslash
6558 # by the backticks, then collapsed again by the double quotes,
6559 # leaving us with one backslash in the sed expression (right
6560 # before the dot that mustn't act as a wildcard). The dot to
6561 # be escaped in the second expression is hiding inside CATOBJEXT.
6562 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6563 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6564 # The user is allowed to set LINGUAS to a list of languages to
6565 # install catalogs for. If it's empty that means "all of them."
6566 if test "x$LINGUAS" = x; then
6567 CATALOGS="$CATALOGS $cat"
6568 XLINGUAS="$XLINGUAS $lang"
6569 else
6570 case "$LINGUAS" in *$lang*)
6571 CATALOGS="$CATALOGS $cat"
6572 XLINGUAS="$XLINGUAS $lang"
6573 ;;
6574 esac
6575 fi
6576 done
6577 LINGUAS="$XLINGUAS"
6578 echo "$ac_t""$LINGUAS" 1>&6
6579 fi
6580
6581 MKINSTALLDIRS=
6582 if test -n "$ac_aux_dir"; then
6583 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6584 fi
6585 if test -z "$MKINSTALLDIRS"; then
6586 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6587 fi
6588
6589
6590 INTL_LIBTOOL_SUFFIX_PREFIX=
6591
6592
6593
6594 # Windows32 Registry support for specifying GCC installation paths.
6595 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6596 if test "${enable_win32_registry+set}" = set; then
6597 enableval="$enable_win32_registry"
6598 :
6599 fi
6600
6601 case $host_os in
6602 win32 | pe | cygwin* | mingw32* | uwin*)
6603 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6604 echo "configure:6605: checking whether windows registry support is requested" >&5
6605 if test "x$enable_win32_registry" != xno; then
6606 cat >> confdefs.h <<\EOF
6607 #define ENABLE_WIN32_REGISTRY 1
6608 EOF
6609
6610 echo "$ac_t""yes" 1>&6
6611
6612 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6613 echo "configure:6614: checking for library containing RegOpenKeyExA" >&5
6614 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6615 echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617 ac_func_search_save_LIBS="$LIBS"
6618 ac_cv_search_RegOpenKeyExA="no"
6619 cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* Override any gcc2 internal prototype to avoid an error. */
6623 /* We use char because int might match the return type of a gcc2
6624 builtin and then its argument prototype would still apply. */
6625 char RegOpenKeyExA();
6626
6627 int main() {
6628 RegOpenKeyExA()
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632 rm -rf conftest*
6633 ac_cv_search_RegOpenKeyExA="none required"
6634 else
6635 echo "configure: failed program was:" >&5
6636 cat conftest.$ac_ext >&5
6637 fi
6638 rm -f conftest*
6639 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6640 LIBS="-l$i $ac_func_search_save_LIBS"
6641 cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 /* Override any gcc2 internal prototype to avoid an error. */
6645 /* We use char because int might match the return type of a gcc2
6646 builtin and then its argument prototype would still apply. */
6647 char RegOpenKeyExA();
6648
6649 int main() {
6650 RegOpenKeyExA()
6651 ; return 0; }
6652 EOF
6653 if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6654 rm -rf conftest*
6655 ac_cv_search_RegOpenKeyExA="-l$i"
6656 break
6657 else
6658 echo "configure: failed program was:" >&5
6659 cat conftest.$ac_ext >&5
6660 fi
6661 rm -f conftest*
6662 done
6663 LIBS="$ac_func_search_save_LIBS"
6664 fi
6665
6666 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6667 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6668 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6669
6670 else :
6671
6672 fi
6673 else
6674 echo "$ac_t""no" 1>&6
6675 fi
6676
6677 # Check if user specified a different registry key.
6678 case "x${enable_win32_registry}" in
6679 x | xyes)
6680 # default.
6681 gcc_cv_win32_registry_key="$VERSION"
6682 ;;
6683 xno)
6684 # no registry lookup.
6685 gcc_cv_win32_registry_key=''
6686 ;;
6687 *)
6688 # user-specified key.
6689 gcc_cv_win32_registry_key="$enable_win32_registry"
6690 ;;
6691 esac
6692
6693 if test "x$enable_win32_registry" != xno; then
6694 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6695 echo "configure:6696: checking registry key on windows hosts" >&5
6696 cat >> confdefs.h <<EOF
6697 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6698 EOF
6699
6700 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6701 fi
6702 ;;
6703 esac
6704
6705 # Get an absolute path to the GCC top-level source directory
6706 holddir=`${PWDCMD-pwd}`
6707 cd $srcdir
6708 topdir=`${PWDCMD-pwd}`
6709 cd $holddir
6710
6711 # Conditionalize the makefile for this host machine.
6712 # Make-host contains the concatenation of all host makefile fragments
6713 # [there can be more than one]. This file is built by configure.frag.
6714 host_overrides=Make-host
6715 dep_host_xmake_file=
6716 for f in .. ${host_xmake_file}
6717 do
6718 if test -f ${srcdir}/config/$f
6719 then
6720 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6721 fi
6722 done
6723
6724 # Conditionalize the makefile for this target machine.
6725 # Make-target contains the concatenation of all host makefile fragments
6726 # [there can be more than one]. This file is built by configure.frag.
6727 target_overrides=Make-target
6728 dep_tmake_file=
6729 for f in .. ${tmake_file}
6730 do
6731 if test -f ${srcdir}/config/$f
6732 then
6733 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6734 fi
6735 done
6736
6737 # If the host doesn't support symlinks, modify CC in
6738 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6739 # Otherwise, we can use "CC=$(CC)".
6740 rm -f symtest.tem
6741 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6742 then
6743 cc_set_by_configure="\$(CC)"
6744 quoted_cc_set_by_configure="\$(CC)"
6745 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6746 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6747 else
6748 rm -f symtest.tem
6749 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6750 then
6751 symbolic_link="cp -p"
6752 else
6753 symbolic_link="cp"
6754 fi
6755 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6756 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6757 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6758 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6759 fi
6760 rm -f symtest.tem
6761
6762 out_object_file=`basename $out_file .c`.o
6763
6764 tm_file_list=
6765 for f in $tm_file; do
6766 case $f in
6767 ansidecl.h )
6768 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6769 defaults.h )
6770 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6771 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6772 esac
6773 done
6774
6775 tm_p_file_list=
6776 for f in $tm_p_file; do
6777 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6778 done
6779
6780 host_xm_file_list=
6781 for f in $host_xm_file; do
6782 case $f in
6783 ansidecl.h )
6784 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6785 auto-host.h )
6786 host_xm_file_list="${host_xm_file_list} $f" ;;
6787 defaults.h )
6788 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6789 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6790 esac
6791 done
6792
6793 build_xm_file_list=
6794 for f in $build_xm_file; do
6795 case $f in
6796 ansidecl.h )
6797 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6798 auto-build.h | auto-host.h )
6799 build_xm_file_list="${build_xm_file_list} $f" ;;
6800 defaults.h )
6801 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6802 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6803 esac
6804 done
6805
6806 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6807 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6808 CROSS=
6809 ALL=all.internal
6810 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6811 if test x$host != x$target
6812 then
6813 CROSS="-DCROSS_COMPILE"
6814 ALL=all.cross
6815 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6816 case "$host","$target" in
6817 i?86-*-*,x86_64-*-* \
6818 | powerpc*-*-*,powerpc64*-*-*)
6819 CROSS="$CROSS -DNATIVE_CROSS" ;;
6820 esac
6821 fi
6822
6823 # If this is a cross-compiler that does not
6824 # have its own set of headers then define
6825 # inhibit_libc
6826
6827 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6828 # This prevents libgcc2 from containing any code which requires libc
6829 # support.
6830 inhibit_libc=
6831 if test x$host != x$target && test x$with_headers = x; then
6832 inhibit_libc=-Dinhibit_libc
6833 else
6834 if test x$with_newlib = xyes; then
6835 inhibit_libc=-Dinhibit_libc
6836 fi
6837 fi
6838
6839
6840 # When building gcc with a cross-compiler, we need to adjust things so
6841 # that the generator programs are still built with the native compiler.
6842 # Also, we cannot run fixincludes or fix-header.
6843 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6844 # FIXME.
6845
6846 # These are the normal (build=host) settings:
6847 BUILD_PREFIX=
6848 BUILD_PREFIX_1=ignore-
6849 HOST_CC='$(CC)'
6850 HOST_CFLAGS='$(ALL_CFLAGS)'
6851
6852 STMP_FIXINC=stmp-fixinc
6853 STMP_FIXPROTO=stmp-fixproto
6854
6855 # And these apply if build != host.
6856 if test x$build != x$host
6857 then
6858 BUILD_PREFIX=build-
6859 BUILD_PREFIX_1=build-
6860 HOST_CC='$(CC_FOR_BUILD)'
6861 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6862
6863 STMP_FIXINC=
6864 STMP_FIXPROTO=
6865 fi
6866
6867 # Expand extra_headers to include complete path.
6868 # This substitutes for lots of t-* files.
6869 extra_headers_list=
6870 if test "x$extra_headers" = x
6871 then true
6872 else
6873 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6874 for file in $extra_headers;
6875 do
6876 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6877 done
6878 fi
6879
6880 if test x$use_collect2 = xno; then
6881 use_collect2=
6882 fi
6883
6884 # Add a definition of USE_COLLECT2 if system wants one.
6885 if test x$use_collect2 != x
6886 then
6887 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6888 xm_defines="${xm_defines} USE_COLLECT2"
6889 fi
6890
6891 # If we have gas in the build tree, make a link to it.
6892 if test -f ../gas/Makefile; then
6893 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6894 fi
6895
6896 # If we have nm and objdump in the build tree, make a link to them.
6897 if test -f ../binutils/Makefile; then
6898 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6899 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6900 fi
6901
6902 # If we have ld in the build tree, make a link to it.
6903 if test -f ../ld/Makefile; then
6904 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6905 fi
6906
6907 # Figure out what assembler we will be using.
6908 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6909 echo "configure:6910: checking what assembler to use" >&5
6910 gcc_cv_as=
6911 gcc_cv_gas_major_version=
6912 gcc_cv_gas_minor_version=
6913 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6914 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6915 if test -x "$DEFAULT_ASSEMBLER"; then
6916 gcc_cv_as="$DEFAULT_ASSEMBLER"
6917 elif test -x "$AS"; then
6918 gcc_cv_as="$AS"
6919 elif test -x as$host_exeext; then
6920 # Build using assembler in the current directory.
6921 gcc_cv_as=./as$host_exeext
6922 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6923 # Single tree build which includes gas.
6924 for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6925 do
6926 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6927 if test x$gcc_cv_gas_version != x; then
6928 break
6929 fi
6930 done
6931 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6932 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6933 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
6934 fi
6935
6936 if test "x$gcc_cv_as" = x; then
6937 # Search the same directories that the installed compiler will
6938 # search. Else we may find the wrong assembler and lose. If we
6939 # do not find a suitable assembler binary, then try the user's
6940 # path.
6941 #
6942 # Also note we have to check MD_EXEC_PREFIX before checking the
6943 # user's path. Unfortunately, there is no good way to get at the
6944 # value of MD_EXEC_PREFIX here. So we do a brute force search
6945 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6946 # to be fixed as part of the make/configure rewrite too.
6947
6948 if test "x$exec_prefix" = xNONE; then
6949 if test "x$prefix" = xNONE; then
6950 test_prefix=/usr/local
6951 else
6952 test_prefix=$prefix
6953 fi
6954 else
6955 test_prefix=$exec_prefix
6956 fi
6957
6958 # If the loop below does not find an assembler, then use whatever
6959 # one we can find in the users's path.
6960 # user's path.
6961 if test "x$program_prefix" != xNONE; then
6962 gcc_cv_as=${program_prefix}as$host_exeext
6963 else
6964 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
6965 fi
6966
6967 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6968 $test_prefix/lib/gcc-lib/$target_alias \
6969 /usr/lib/gcc/$target_alias/$gcc_version \
6970 /usr/lib/gcc/$target_alias \
6971 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6972 $test_prefix/$target_alias/bin"
6973
6974 if test x$host = x$target; then
6975 test_dirs="$test_dirs \
6976 /usr/libexec \
6977 /usr/ccs/gcc \
6978 /usr/ccs/bin \
6979 /udk/usr/ccs/bin \
6980 /bsd43/usr/lib/cmplrs/cc \
6981 /usr/cross64/usr/bin \
6982 /usr/lib/cmplrs/cc \
6983 /sysv/usr/lib/cmplrs/cc \
6984 /svr4/usr/lib/cmplrs/cc \
6985 /usr/bin"
6986 fi
6987
6988 for dir in $test_dirs; do
6989 if test -x $dir/as$host_exeext; then
6990 gcc_cv_as=$dir/as$host_exeext
6991 break;
6992 fi
6993 done
6994 fi
6995 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6996 echo "$ac_t"""newly built gas"" 1>&6
6997 else
6998 echo "$ac_t""$gcc_cv_as" 1>&6
6999 fi
7000
7001 # Figure out what linker we will be using.
7002 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7003 echo "configure:7004: checking what linker to use" >&5
7004 gcc_cv_ld=
7005 gcc_cv_gld_major_version=
7006 gcc_cv_gld_minor_version=
7007 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7008 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7009 if test -x "$DEFAULT_LINKER"; then
7010 gcc_cv_ld="$DEFAULT_LINKER"
7011 elif test -x "$LD"; then
7012 gcc_cv_ld="$LD"
7013 elif test -x ld$host_exeext; then
7014 # Build using linker in the current directory.
7015 gcc_cv_ld=./ld$host_exeext
7016 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
7017 # Single tree build which includes ld.
7018 for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
7019 do
7020 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7021 if test x$gcc_cv_gld_version != x; then
7022 break
7023 fi
7024 done
7025 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7026 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7027 fi
7028
7029 if test "x$gcc_cv_ld" = x; then
7030 # Search the same directories that the installed compiler will
7031 # search. Else we may find the wrong linker and lose. If we
7032 # do not find a suitable linker binary, then try the user's
7033 # path.
7034 #
7035 # Also note we have to check MD_EXEC_PREFIX before checking the
7036 # user's path. Unfortunately, there is no good way to get at the
7037 # value of MD_EXEC_PREFIX here. So we do a brute force search
7038 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7039 # to be fixed as part of the make/configure rewrite too.
7040
7041 if test "x$exec_prefix" = xNONE; then
7042 if test "x$prefix" = xNONE; then
7043 test_prefix=/usr/local
7044 else
7045 test_prefix=$prefix
7046 fi
7047 else
7048 test_prefix=$exec_prefix
7049 fi
7050
7051 # If the loop below does not find an linker, then use whatever
7052 # one we can find in the users's path.
7053 # user's path.
7054 if test "x$program_prefix" != xNONE; then
7055 gcc_cv_ld=${program_prefix}ld$host_exeext
7056 else
7057 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7058 fi
7059
7060 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7061 $test_prefix/lib/gcc-lib/$target_alias \
7062 /usr/lib/gcc/$target_alias/$gcc_version \
7063 /usr/lib/gcc/$target_alias \
7064 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7065 $test_prefix/$target_alias/bin"
7066
7067 if test x$host = x$target; then
7068 test_dirs="$test_dirs \
7069 /usr/libexec \
7070 /usr/ccs/gcc \
7071 /usr/ccs/bin \
7072 /udk/usr/ccs/bin \
7073 /bsd43/usr/lib/cmplrs/cc \
7074 /usr/cross64/usr/bin \
7075 /usr/lib/cmplrs/cc \
7076 /sysv/usr/lib/cmplrs/cc \
7077 /svr4/usr/lib/cmplrs/cc \
7078 /usr/bin"
7079 fi
7080
7081 for dir in $test_dirs; do
7082 if test -x $dir/ld$host_exeext; then
7083 gcc_cv_ld=$dir/ld$host_exeext
7084 break;
7085 fi
7086 done
7087 fi
7088 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7089 echo "$ac_t"""newly built ld"" 1>&6
7090 else
7091 echo "$ac_t""$gcc_cv_ld" 1>&6
7092 fi
7093
7094 # Figure out what nm we will be using.
7095 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7096 echo "configure:7097: checking what nm to use" >&5
7097 if test -x nm$host_exeext; then
7098 gcc_cv_nm=./nm$host_exeext
7099 elif test "x$program_prefix" != xNONE; then
7100 gcc_cv_nm=${program_prefix}nm$host_exeext
7101 else
7102 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7103 fi
7104 echo "$ac_t""$gcc_cv_nm" 1>&6
7105
7106 # Figure out what objdump we will be using.
7107 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7108 echo "configure:7109: checking what objdump to use" >&5
7109 if test -x objdump$host_exeext; then
7110 gcc_cv_objdump=./objdump$host_exeext
7111 elif test "x$program_prefix" != xNONE; then
7112 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7113 else
7114 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7115 fi
7116 echo "$ac_t""$gcc_cv_objdump" 1>&6
7117
7118 # Figure out what assembler alignment features are present.
7119 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7120 echo "configure:7121: checking assembler alignment features" >&5
7121 gcc_cv_as_alignment_features=none
7122 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7123 # Gas version 2.6 and later support for .balign and .p2align.
7124 # bytes to skip when using .p2align.
7125 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
7126 gcc_cv_as_alignment_features=".balign and .p2align"
7127 cat >> confdefs.h <<\EOF
7128 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7129 EOF
7130
7131 fi
7132 # Gas version 2.8 and later support specifying the maximum
7133 # bytes to skip when using .p2align.
7134 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
7135 gcc_cv_as_alignment_features=".p2align including maximum skip"
7136 cat >> confdefs.h <<\EOF
7137 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7138 EOF
7139
7140 fi
7141 elif test x$gcc_cv_as != x; then
7142 # Check if we have .balign and .p2align
7143 echo ".balign 4" > conftest.s
7144 echo ".p2align 2" >> conftest.s
7145 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7146 gcc_cv_as_alignment_features=".balign and .p2align"
7147 cat >> confdefs.h <<\EOF
7148 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7149 EOF
7150
7151 fi
7152 rm -f conftest.s conftest.o
7153 # Check if specifying the maximum bytes to skip when
7154 # using .p2align is supported.
7155 echo ".p2align 4,,7" > conftest.s
7156 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7157 gcc_cv_as_alignment_features=".p2align including maximum skip"
7158 cat >> confdefs.h <<\EOF
7159 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7160 EOF
7161
7162 fi
7163 rm -f conftest.s conftest.o
7164 fi
7165 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7166
7167 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7168 echo "configure:7169: checking assembler subsection support" >&5
7169 gcc_cv_as_subsections=no
7170 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7171 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
7172 gcc_cv_as_subsections="working .subsection -1"
7173 fi
7174 elif test x$gcc_cv_as != x; then
7175 # Check if we have .subsection
7176 echo ".subsection 1" > conftest.s
7177 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7178 gcc_cv_as_subsections=".subsection"
7179 if test x$gcc_cv_nm != x; then
7180 cat > conftest.s <<EOF
7181 conftest_label1: .word 0
7182 .subsection -1
7183 conftest_label2: .word 0
7184 .previous
7185 EOF
7186 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7187 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7188 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7189 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7190 :
7191 else
7192 gcc_cv_as_subsections="working .subsection -1"
7193 fi
7194 fi
7195 fi
7196 fi
7197 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7198 fi
7199 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7200 cat >> confdefs.h <<\EOF
7201 #define HAVE_GAS_SUBSECTION_ORDERING 1
7202 EOF
7203
7204 fi
7205 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7206
7207 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7208 echo "configure:7209: checking assembler weak support" >&5
7209 gcc_cv_as_weak=no
7210 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7211 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
7212 gcc_cv_as_weak="yes"
7213 fi
7214 elif test x$gcc_cv_as != x; then
7215 # Check if we have .weak
7216 echo " .weak foobar" > conftest.s
7217 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7218 gcc_cv_as_weak="yes"
7219 fi
7220 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7221 fi
7222 if test x"$gcc_cv_as_weak" = xyes; then
7223 cat >> confdefs.h <<\EOF
7224 #define HAVE_GAS_WEAK 1
7225 EOF
7226
7227 fi
7228 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7229
7230 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7231 echo "configure:7232: checking assembler hidden support" >&5
7232 gcc_cv_as_hidden=no
7233 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7234 if test "$gcc_cv_gas_major_version" -eq 2 \
7235 -a "$gcc_cv_gas_minor_version" -eq 12 \
7236 -a "$gcc_cv_gas_patch_version" -ge 1 \
7237 -o "$gcc_cv_gas_major_version" -eq 2 \
7238 -a "$gcc_cv_gas_minor_version" -gt 12 \
7239 -o "$gcc_cv_gas_major_version" -gt 2 \
7240 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7241 gcc_cv_as_hidden="yes"
7242 fi
7243 elif test x$gcc_cv_as != x; then
7244 # Check if we have .hidden
7245 echo " .hidden foobar" > conftest.s
7246 echo "foobar:" >> conftest.s
7247 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7248 gcc_cv_as_hidden="yes"
7249 fi
7250 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7251
7252 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7253 # This is irritatingly difficult to feature test for. Look for
7254 # the date string after the version number.
7255 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7256 if echo "$ld_ver" | grep GNU > /dev/null; then
7257 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7258 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
7259 if test 0"$ld_date" -lt 20020404; then
7260 if test -n "$ld_date"; then
7261 # If there was date string, but was earlier than 2002-04-04, fail
7262 gcc_cv_as_hidden="no"
7263 elif test -z "$ld_vers"; then
7264 # If there was no date string nor ld version number, something is wrong
7265 gcc_cv_as_hidden="no"
7266 else
7267 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7268 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7269 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7270 test -z "$ld_vers_patch" && ld_vers_patch=0
7271 if test "$ld_vers_major" -lt 2; then
7272 gcc_cv_as_hidden="no"
7273 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7274 gcc_cv_as_hidden="no"
7275 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7276 -a "$ld_vers_patch" -eq 0; then
7277 gcc_cv_as_hidden="no"
7278 fi
7279 fi
7280 fi
7281 fi
7282 fi
7283 if test x"$gcc_cv_as_hidden" = xyes; then
7284 cat >> confdefs.h <<\EOF
7285 #define HAVE_GAS_HIDDEN 1
7286 EOF
7287
7288 fi
7289 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7290 libgcc_visibility=$gcc_cv_as_hidden
7291 case "$target" in
7292 mips-sgi-irix6*o32)
7293 if test x"$gnu_ld_flag" = x"no"; then
7294 # Even if using gas with .hidden support, the resulting object files
7295 # cannot be linked with the IRIX 6 O32 linker.
7296 libgcc_visibility=no
7297 fi
7298 ;;
7299 esac
7300
7301
7302 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7303 echo "configure:7304: checking assembler leb128 support" >&5
7304 gcc_cv_as_leb128=no
7305 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7306 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7307 gcc_cv_as_leb128="yes"
7308 fi
7309 elif test x$gcc_cv_as != x; then
7310 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7311 cat > conftest.s <<EOF
7312 .data
7313 .uleb128 L2 - L1
7314 L1:
7315 .uleb128 1280
7316 .sleb128 -1010
7317 L2:
7318 EOF
7319 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7320 gcc_cv_as_leb128="yes"
7321
7322 # GAS versions before 2.11 do not support uleb128,
7323 # despite appearing to.
7324 # ??? There exists an elf-specific test that will crash
7325 # the assembler. Perhaps it's better to figure out whether
7326 # arbitrary sections are supported and try the test.
7327 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7328 if echo "$as_ver" | grep GNU > /dev/null; then
7329 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7330 as_major=`echo $as_ver | sed 's/\..*//'`
7331 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7332 if test $as_major -eq 2 -a $as_minor -lt 11; then
7333 gcc_cv_as_leb128="no"
7334 fi
7335 fi
7336 fi
7337 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7338 fi
7339 if test x"$gcc_cv_as_leb128" = xyes; then
7340 cat >> confdefs.h <<\EOF
7341 #define HAVE_AS_LEB128 1
7342 EOF
7343
7344 fi
7345 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7346
7347 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7348 echo "configure:7349: checking assembler eh_frame optimization" >&5
7349 gcc_cv_as_eh_frame=no
7350 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7351 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7352 gcc_cv_as_eh_frame="yes"
7353 fi
7354 elif test x$gcc_cv_as != x; then
7355 # Check if this is GAS.
7356 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7357 rm -f a.out 2> /dev/null
7358 if echo "$as_ver" | grep GNU > /dev/null; then
7359 # Versions up to and including 2.11.0 may mis-optimize
7360 # .eh_frame data. Try something.
7361 cat > conftest.s <<EOF
7362 .text
7363 .LFB1:
7364 .4byte 0
7365 .L1:
7366 .4byte 0
7367 .LFE1:
7368 .section .eh_frame,"aw",@progbits
7369 __FRAME_BEGIN__:
7370 .4byte .LECIE1-.LSCIE1
7371 .LSCIE1:
7372 .4byte 0x0
7373 .byte 0x1
7374 .ascii "z\0"
7375 .byte 0x1
7376 .byte 0x78
7377 .byte 0x1a
7378 .byte 0x0
7379 .byte 0x4
7380 .4byte 1
7381 .p2align 1
7382 .LECIE1:
7383 .LSFDE1:
7384 .4byte .LEFDE1-.LASFDE1
7385 .LASFDE1:
7386 .4byte .LASFDE1-__FRAME_BEGIN__
7387 .4byte .LFB1
7388 .4byte .LFE1-.LFB1
7389 .byte 0x4
7390 .4byte .LFE1-.LFB1
7391 .byte 0x4
7392 .4byte .L1-.LFB1
7393 .LEFDE1:
7394 EOF
7395 cat > conftest.lit <<EOF
7396 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7397 0010 01000000 12000000 18000000 00000000 ................
7398 0020 08000000 04080000 0044 .........D
7399 EOF
7400 cat > conftest.big <<EOF
7401 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7402 0010 00000001 00000012 00000018 00000000 ................
7403 0020 00000008 04000000 0844 .........D
7404 EOF
7405 # If the assembler didn't choke, and we can objdump,
7406 # and we got the correct data, then succeed.
7407 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7408 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7409 | tail -3 > conftest.got \
7410 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7411 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7412 then
7413 gcc_cv_as_eh_frame="yes"
7414 else
7415 gcc_cv_as_eh_frame="bad"
7416 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7417 cat >> confdefs.h <<\EOF
7418 #define USE_AS_TRADITIONAL_FORMAT 1
7419 EOF
7420
7421 fi
7422 fi
7423 fi
7424 rm -f conftest.*
7425 fi
7426 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7427
7428 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7429 echo "configure:7430: checking assembler section merging support" >&5
7430 gcc_cv_as_shf_merge=no
7431 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7432 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7433 gcc_cv_as_shf_merge=yes
7434 fi
7435 elif test x$gcc_cv_as != x; then
7436 # Check if we support SHF_MERGE sections
7437 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7438 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7439 gcc_cv_as_shf_merge=yes
7440 fi
7441 rm -f conftest.s conftest.o
7442 fi
7443 if test x"$gcc_cv_as_shf_merge" = xyes; then
7444 cat >> confdefs.h <<\EOF
7445 #define HAVE_GAS_SHF_MERGE 1
7446 EOF
7447
7448 fi
7449 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7450
7451 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7452 echo "configure:7453: checking assembler thread-local storage support" >&5
7453 gcc_cv_as_tls=no
7454 conftest_s=
7455 tls_first_major=
7456 tls_first_minor=
7457 case "$target" in
7458 alpha*-*-*)
7459 conftest_s='
7460 .section ".tdata","awT",@progbits
7461 foo: .long 25
7462 .text
7463 ldq $27,__tls_get_addr($29) !literal!1
7464 lda $16,foo($29) !tlsgd!1
7465 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7466 ldq $27,__tls_get_addr($29) !literal!2
7467 lda $16,foo($29) !tlsldm!2
7468 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7469 ldq $1,foo($29) !gotdtprel
7470 ldah $2,foo($29) !dtprelhi
7471 lda $3,foo($2) !dtprello
7472 lda $4,foo($29) !dtprel
7473 ldq $1,foo($29) !gottprel
7474 ldah $2,foo($29) !tprelhi
7475 lda $3,foo($2) !tprello
7476 lda $4,foo($29) !tprel'
7477 tls_first_major=2
7478 tls_first_minor=13
7479 ;;
7480 i[34567]86-*-*)
7481 conftest_s='
7482 .section ".tdata","awT",@progbits
7483 foo: .long 25
7484 .text
7485 movl %gs:0, %eax
7486 leal foo@TLSGD(,%ebx,1), %eax
7487 leal foo@TLSLDM(%ebx), %eax
7488 leal foo@DTPOFF(%eax), %edx
7489 movl foo@GOTTPOFF(%ebx), %eax
7490 subl foo@GOTTPOFF(%ebx), %eax
7491 movl $foo@TPOFF, %eax
7492 subl $foo@TPOFF, %eax
7493 leal foo@NTPOFF(%ecx), %eax'
7494 tls_first_major=2
7495 tls_first_minor=13
7496 ;;
7497 ia64-*-*)
7498 conftest_s='
7499 .section ".tdata","awT",@progbits
7500 foo: data8 25
7501 .text
7502 addl r16 = @ltoff(@dtpmod(foo#)), gp
7503 addl r17 = @ltoff(@dtprel(foo#)), gp
7504 addl r18 = @ltoff(@tprel(foo#)), gp
7505 addl r19 = @dtprel(foo#), gp
7506 adds r21 = @dtprel(foo#), r13
7507 movl r23 = @dtprel(foo#)
7508 addl r20 = @tprel(foo#), gp
7509 adds r22 = @tprel(foo#), r13
7510 movl r24 = @tprel(foo#)'
7511 tls_first_major=2
7512 tls_first_minor=13
7513 ;;
7514 esac
7515 if test -z "$tls_first_major"; then
7516 :
7517 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7518 then
7519 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7520 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7521 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7522 gcc_cv_as_tls=yes
7523 fi
7524 elif test x$gcc_cv_as != x; then
7525 echo "$conftest_s" > conftest.s
7526 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7527 then
7528 gcc_cv_as_tls=yes
7529 fi
7530 rm -f conftest.s conftest.o
7531 fi
7532 if test "$gcc_cv_as_tls" = yes; then
7533 cat >> confdefs.h <<\EOF
7534 #define HAVE_AS_TLS 1
7535 EOF
7536
7537 fi
7538 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7539
7540 case "$target" in
7541 # All TARGET_ABI_OSF targets.
7542 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7543 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7544 echo "configure:7545: checking assembler supports explicit relocations" >&5
7545 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7546 echo $ac_n "(cached) $ac_c" 1>&6
7547 else
7548
7549 gcc_cv_as_explicit_relocs=unknown
7550 if test x$gcc_cv_gas_major_version != x \
7551 -a x$gcc_cv_gas_minor_version != x
7552 then
7553 if test "$gcc_cv_gas_major_version" -eq 2 \
7554 -a "$gcc_cv_gas_minor_version" -ge 12 \
7555 -o "$gcc_cv_gas_major_version" -gt 2; then
7556 gcc_cv_as_explicit_relocs=yes
7557 fi
7558 elif test x$gcc_cv_as != x; then
7559 cat > conftest.s << 'EOF'
7560 .set nomacro
7561 .text
7562 extbl $3, $2, $3 !lituse_bytoff!1
7563 ldq $2, a($29) !literal!1
7564 ldq $4, b($29) !literal!2
7565 ldq_u $3, 0($2) !lituse_base!1
7566 ldq $27, f($29) !literal!5
7567 jsr $26, ($27), f !lituse_jsr!5
7568 ldah $29, 0($26) !gpdisp!3
7569 lda $0, c($29) !gprel
7570 ldah $1, d($29) !gprelhigh
7571 lda $1, d($1) !gprellow
7572 lda $29, 0($29) !gpdisp!3
7573 EOF
7574 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7575 gcc_cv_as_explicit_relocs=yes
7576 else
7577 gcc_cv_as_explicit_relocs=no
7578 fi
7579 rm -f conftest.s conftest.o
7580 fi
7581
7582 fi
7583
7584 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7585 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7586 cat >> confdefs.h <<\EOF
7587 #define HAVE_AS_EXPLICIT_RELOCS 1
7588 EOF
7589
7590 fi
7591 ;;
7592 sparc*-*-*)
7593 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7594 echo "configure:7595: checking assembler .register pseudo-op support" >&5
7595 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7596 echo $ac_n "(cached) $ac_c" 1>&6
7597 else
7598
7599 gcc_cv_as_register_pseudo_op=unknown
7600 if test x$gcc_cv_as != x; then
7601 # Check if we have .register
7602 echo ".register %g2, #scratch" > conftest.s
7603 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7604 gcc_cv_as_register_pseudo_op=yes
7605 else
7606 gcc_cv_as_register_pseudo_op=no
7607 fi
7608 rm -f conftest.s conftest.o
7609 fi
7610
7611 fi
7612
7613 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7614 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7615 cat >> confdefs.h <<\EOF
7616 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7617 EOF
7618
7619 fi
7620
7621 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7622 echo "configure:7623: checking assembler supports -relax" >&5
7623 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7624 echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626
7627 gcc_cv_as_relax_opt=unknown
7628 if test x$gcc_cv_as != x; then
7629 # Check if gas supports -relax
7630 echo ".text" > conftest.s
7631 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7632 gcc_cv_as_relax_opt=yes
7633 else
7634 gcc_cv_as_relax_opt=no
7635 fi
7636 rm -f conftest.s conftest.o
7637 fi
7638
7639 fi
7640
7641 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7642 if test "x$gcc_cv_as_relax_opt" = xyes; then
7643 cat >> confdefs.h <<\EOF
7644 #define HAVE_AS_RELAX_OPTION 1
7645 EOF
7646
7647 fi
7648
7649 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7650 echo "configure:7651: checking assembler and linker support unaligned pc related relocs" >&5
7651 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7652 echo $ac_n "(cached) $ac_c" 1>&6
7653 else
7654
7655 gcc_cv_as_sparc_ua_pcrel=unknown
7656 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7657 gcc_cv_as_sparc_ua_pcrel=no
7658 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7659 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7660 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7661 gcc_cv_as_sparc_ua_pcrel=yes
7662 fi
7663 rm -f conftest.s conftest.o conftest
7664 fi
7665
7666 fi
7667
7668 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7669 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7670 cat >> confdefs.h <<\EOF
7671 #define HAVE_AS_SPARC_UA_PCREL 1
7672 EOF
7673
7674 fi
7675
7676 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7677 echo "configure:7678: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7678 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7679 echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681
7682 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7683 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7684 if test x$gcc_cv_objdump != x; then
7685 gcc_cv_as_sparc_ua_pcrel_hidden=no
7686 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7687 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7688 echo "foo: .skip 4" >> conftest.s
7689 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7690 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7691 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7692 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7693 if $gcc_cv_objdump -R conftest 2> /dev/null \
7694 | grep 'DISP32' > /dev/null 2>&1; then
7695 :
7696 else
7697 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7698 fi
7699 fi
7700 fi
7701 rm -f conftest.s conftest.o conftest
7702 else
7703 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7704 fi
7705
7706 fi
7707
7708 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7709 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7710 cat >> confdefs.h <<\EOF
7711 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7712 EOF
7713
7714 fi
7715
7716 if test "x$gcc_cv_as_flags64" != xno; then
7717 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7718 echo "configure:7719: checking for assembler offsetable %lo() support" >&5
7719 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7720 echo $ac_n "(cached) $ac_c" 1>&6
7721 else
7722
7723 gcc_cv_as_offsetable_lo10=unknown
7724 if test "x$gcc_cv_as" != x; then
7725 # Check if assembler has offsetable %lo()
7726 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7727 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7728 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7729 > /dev/null 2>&1 &&
7730 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7731 > /dev/null 2>&1; then
7732 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7733 gcc_cv_as_offsetable_lo10=no
7734 else
7735 gcc_cv_as_offsetable_lo10=yes
7736 fi
7737 else
7738 gcc_cv_as_offsetable_lo10=no
7739 fi
7740 rm -f conftest.s conftest.o conftest1.s conftest1.o
7741 fi
7742
7743 fi
7744
7745 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7746 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7747 cat >> confdefs.h <<\EOF
7748 #define HAVE_AS_OFFSETABLE_LO10 1
7749 EOF
7750
7751 fi
7752 fi
7753
7754 ;;
7755
7756 i[34567]86-*-* | x86_64-*-*)
7757 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7758 echo "configure:7759: checking assembler instructions" >&5
7759 gcc_cv_as_instructions=
7760 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7761 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
7762 gcc_cv_as_instructions="filds fists"
7763 fi
7764 elif test x$gcc_cv_as != x; then
7765 set "filds fists" "filds mem; fists mem"
7766 while test $# -gt 0
7767 do
7768 echo "$2" > conftest.s
7769 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7770 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7771 fi
7772 shift 2
7773 done
7774 rm -f conftest.s conftest.o
7775 fi
7776 if test x"$gcc_cv_as_instructions" != x; then
7777 cat >> confdefs.h <<EOF
7778 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7779 EOF
7780
7781 fi
7782 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7783
7784 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7785 echo "configure:7786: checking assembler GOTOFF in data directives" >&5
7786 gcc_cv_as_gotoff_in_data=no
7787 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7788 then
7789 if test "$gcc_cv_gas_major_version" -eq 2 \
7790 -a "$gcc_cv_gas_minor_version" -ge 11 \
7791 -o "$gcc_cv_gas_major_version" -gt 2; then
7792 gcc_cv_as_gotoff_in_data=yes
7793 fi
7794 elif test x$gcc_cv_as != x; then
7795 cat > conftest.s <<EOF
7796 .text
7797 .L0:
7798 nop
7799 .data
7800 .long .L0@GOTOFF
7801 EOF
7802 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7803 gcc_cv_as_gotoff_in_data=yes
7804 fi
7805 fi
7806 cat >> confdefs.h <<EOF
7807 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7808 EOF
7809
7810 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7811 ;;
7812 esac
7813
7814 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7815 echo "configure:7816: checking assembler dwarf2 debug_line support" >&5
7816 gcc_cv_as_dwarf2_debug_line=no
7817 # ??? Not all targets support dwarf2 debug_line, even within a version
7818 # of gas. Moreover, we need to emit a valid instruction to trigger any
7819 # info to the output file. So, as supported targets are added to gas 2.11,
7820 # add some instruction here to (also) show we expect this might work.
7821 # ??? Once 2.11 is released, probably need to add first known working
7822 # version to the per-target configury.
7823 case "$target" in
7824 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
7825 insn="nop"
7826 ;;
7827 ia64*-*-*)
7828 insn="nop 0"
7829 ;;
7830 esac
7831 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7832 then
7833 if test "$gcc_cv_gas_major_version" -eq 2 \
7834 -a "$gcc_cv_gas_minor_version" -ge 11 \
7835 -o "$gcc_cv_gas_major_version" -gt 2 \
7836 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7837 && test x"$insn" != x ; then
7838 gcc_cv_as_dwarf2_debug_line="yes"
7839 fi
7840 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7841 echo ' .file 1 "conftest.s"' > conftest.s
7842 echo ' .loc 1 3 0' >> conftest.s
7843 echo " $insn" >> conftest.s
7844 # ??? This fails with non-gnu grep.
7845 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7846 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7847 # The .debug_line file table must be in the exact order that
7848 # we specified the files, since these indices are also used
7849 # by DW_AT_decl_file. Approximate this test by testing if
7850 # the assembler bitches if the same index is assigned twice.
7851 echo ' .file 1 "foo.s"' > conftest.s
7852 echo ' .file 1 "bar.s"' >> conftest.s
7853 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7854 then
7855 gcc_cv_as_dwarf2_debug_line="no"
7856 else
7857 gcc_cv_as_dwarf2_debug_line="yes"
7858 fi
7859 fi
7860 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7861 fi
7862 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7863 cat >> confdefs.h <<\EOF
7864 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7865 EOF
7866
7867 fi
7868 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7869
7870 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7871 echo "configure:7872: checking assembler --gdwarf2 support" >&5
7872 gcc_cv_as_gdwarf2_flag=no
7873 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7874 then
7875 if test "$gcc_cv_gas_major_version" -eq 2 \
7876 -a "$gcc_cv_gas_minor_version" -ge 11 \
7877 -o "$gcc_cv_gas_major_version" -gt 2 \
7878 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7879 && test x"$insn" != x ; then
7880 gcc_cv_as_gdwarf2_flag="yes"
7881 fi
7882 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7883 echo '' > conftest.s
7884 # ??? This fails with non-gnu grep.
7885 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7886 then
7887 gcc_cv_as_gdwarf2_flag="yes"
7888 fi
7889 rm -f conftest.s conftest.o
7890 fi
7891 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7892 cat >> confdefs.h <<\EOF
7893 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7894 EOF
7895
7896 fi
7897 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7898
7899 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7900 echo "configure:7901: checking assembler --gstabs support" >&5
7901 gcc_cv_as_gstabs_flag=no
7902 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7903 then
7904 if test "$gcc_cv_gas_major_version" -eq 2 \
7905 -a "$gcc_cv_gas_minor_version" -ge 11 \
7906 -o "$gcc_cv_gas_major_version" -gt 2 \
7907 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7908 && test x"$insn" != x ; then
7909 gcc_cv_as_gstabs_flag="yes"
7910 fi
7911 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7912 echo '' > conftest.s
7913 # ??? This fails with non-gnu grep.
7914 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7915 gcc_cv_as_gstabs_flag="yes"
7916 fi
7917 rm -f conftest.s conftest.o
7918 fi
7919 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7920 cat >> confdefs.h <<\EOF
7921 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7922 EOF
7923
7924 fi
7925 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7926
7927 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7928 echo "configure:7929: checking linker PT_GNU_EH_FRAME support" >&5
7929 gcc_cv_ld_eh_frame_hdr=no
7930 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7931 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
7932 gcc_cv_ld_eh_frame_hdr=yes
7933 fi
7934 elif test x$gcc_cv_ld != x; then
7935 # Check if linker supports --eh-frame-hdr option
7936 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7937 gcc_cv_ld_eh_frame_hdr=yes
7938 fi
7939 fi
7940 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7941 cat >> confdefs.h <<\EOF
7942 #define HAVE_LD_EH_FRAME_HDR 1
7943 EOF
7944
7945 fi
7946 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7947
7948 # Miscellaneous target-specific checks.
7949 case "$target" in
7950 mips*-*-*)
7951 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
7952 echo "configure:7953: checking whether libgloss uses STARTUP directives consistently" >&5
7953 gcc_cv_mips_libgloss_startup=no
7954 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
7955 if test "x$exec_prefix" = xNONE; then
7956 if test "x$prefix" = xNONE; then
7957 test_prefix=/usr/local
7958 else
7959 test_prefix=$prefix
7960 fi
7961 else
7962 test_prefix=$exec_prefix
7963 fi
7964 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
7965 do
7966 if grep '^STARTUP' $f > /dev/null 2>&1; then
7967 gcc_cv_mips_libgloss_startup=yes
7968 break
7969 fi
7970 done
7971 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
7972 cat >> confdefs.h <<\EOF
7973 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
7974 EOF
7975
7976 fi
7977 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
7978 ;;
7979 esac
7980
7981 if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
7982 cat >> confdefs.h <<EOF
7983 #define PREFIX_INCLUDE_DIR "$prefix/include"
7984 EOF
7985
7986 fi
7987
7988 # Figure out what language subdirectories are present.
7989 # Look if the user specified --enable-languages="..."; if not, use
7990 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7991 # go away some day.
7992 # NB: embedded tabs in this IF block -- do not untabify
7993 if test x"${enable_languages+set}" != xset; then
7994 if test x"${LANGUAGES+set}" = xset; then
7995 enable_languages="${LANGUAGES}"
7996 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7997
7998 else
7999 enable_languages=all
8000 fi
8001 else
8002 if test x"${enable_languages}" = x \
8003 || test x"${enable_languages}" = xyes;
8004 then
8005 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8006 fi
8007 fi
8008 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8009
8010 # First scan to see if an enabled language requires some other language.
8011 # We assume that a given config-lang.in will list all the language
8012 # front ends it requires, even if some are required indirectly.
8013 for lang in ${srcdir}/*/config-lang.in ..
8014 do
8015 case $lang in
8016 ..)
8017 ;;
8018 # The odd quoting in the next line works around
8019 # an apparent bug in bash 1.12 on linux.
8020 ${srcdir}/[*]/config-lang.in)
8021 ;;
8022 *)
8023 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8024 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8025 for other in $this_lang_requires
8026 do
8027 case ,${enable_languages}, in
8028 *,$other,*)
8029 ;;
8030 *,all,*)
8031 ;;
8032 *,$lang_alias,*)
8033 enable_languages="$enable_languages,$other"
8034 ;;
8035 esac
8036 done
8037 ;;
8038 esac
8039 done
8040
8041 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8042 found_languages=
8043 subdirs=
8044 for lang in ${srcdir}/*/config-lang.in ..
8045 do
8046 case $lang in
8047 ..) ;;
8048 # The odd quoting in the next line works around
8049 # an apparent bug in bash 1.12 on linux.
8050 ${srcdir}/[*]/config-lang.in) ;;
8051 *)
8052 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8053 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8054 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8055 if test "x$lang_alias" = x
8056 then
8057 echo "$lang doesn't set \$language." 1>&2
8058 exit 1
8059 fi
8060 case ${build_by_default},${enable_languages}, in
8061 *,$lang_alias,*) add_this_lang=yes ;;
8062 no,*) add_this_lang=no ;;
8063 *,all,*) add_this_lang=yes ;;
8064 *) add_this_lang=no ;;
8065 esac
8066 found_languages="${found_languages} ${lang_alias}"
8067 if test x"${add_this_lang}" = xyes; then
8068 case $lang in
8069 ${srcdir}/ada/config-lang.in)
8070 if test x$have_gnat = xyes ; then
8071 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8072 fi
8073 ;;
8074 *)
8075 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8076 ;;
8077 esac
8078 fi
8079 ;;
8080 esac
8081 done
8082
8083 missing_languages=
8084 for expected_language in ${expected_languages} ..
8085 do
8086 if test "${expected_language}" != ..; then
8087 missing_language="${expected_language}"
8088 if test "${expected_language}" = "c" \
8089 || test "${expected_language}" = "all"; then
8090 missing_language=
8091 fi
8092 for found_language in ${found_languages} ..
8093 do
8094 if test "${found_language}" != ..; then
8095 if test "${expected_language}" = "${found_language}"; then
8096 missing_language=
8097 fi
8098 fi
8099 done
8100 if test "x${missing_language}" != x; then
8101 missing_languages="${missing_languages} ${missing_language}"
8102 fi
8103 fi
8104 done
8105
8106 if test "x$missing_languages" != x; then
8107 { echo "configure: error:
8108 The following requested languages were not found:${missing_languages}
8109 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8110 fi
8111
8112 # Make gthr-default.h if we have a thread file.
8113 gthread_flags=
8114 if test $thread_file != single; then
8115 rm -f gthr-default.h
8116 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8117 gthread_flags=-DHAVE_GTHR_DEFAULT
8118 fi
8119
8120
8121 # Find out what GC implementation we want, or may, use.
8122 # Check whether --with-gc or --without-gc was given.
8123 if test "${with_gc+set}" = set; then
8124 withval="$with_gc"
8125 case "$withval" in
8126 simple | page)
8127 GGC=ggc-$withval
8128 ;;
8129 *)
8130 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8131 ;;
8132 esac
8133 else
8134 GGC=ggc-page
8135 fi
8136
8137
8138 echo "Using $GGC for garbage collection."
8139
8140 # Use the system's zlib library.
8141 zlibdir=-L../zlib
8142 zlibinc="-I\$(srcdir)/../zlib"
8143 # Check whether --with-system-zlib or --without-system-zlib was given.
8144 if test "${with_system_zlib+set}" = set; then
8145 withval="$with_system_zlib"
8146 zlibdir=
8147 zlibinc=
8148
8149 fi
8150
8151
8152
8153
8154
8155 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8156 echo "configure:8157: checking whether to enable maintainer-specific portions of Makefiles" >&5
8157 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8158 if test "${enable_maintainer_mode+set}" = set; then
8159 enableval="$enable_maintainer_mode"
8160 maintainer_mode=$enableval
8161 else
8162 maintainer_mode=no
8163 fi
8164
8165
8166 echo "$ac_t""$maintainer_mode" 1>&6
8167
8168 if test "$maintainer_mode" = "yes"; then
8169 MAINT=''
8170 else
8171 MAINT='#'
8172 fi
8173
8174 # With Setjmp/Longjmp based exception handling.
8175 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8176 if test "${enable_sjlj_exceptions+set}" = set; then
8177 enableval="$enable_sjlj_exceptions"
8178 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
8179 cat >> confdefs.h <<EOF
8180 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
8181 EOF
8182
8183 fi
8184
8185
8186 # Use libunwind based exception handling.
8187 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8188 if test "${enable_libunwind_exceptions+set}" = set; then
8189 enableval="$enable_libunwind_exceptions"
8190 use_libunwind_exceptions=$enableval
8191 else
8192 use_libunwind_exceptions=no
8193 fi
8194
8195 if test x"$use_libunwind_exceptions" = xyes; then
8196 cat >> confdefs.h <<\EOF
8197 #define USE_LIBUNWIND_EXCEPTIONS 1
8198 EOF
8199
8200 fi
8201
8202 # Make empty files to contain the specs and options for each language.
8203 # Then add #include lines to for a compiler that has specs and/or options.
8204
8205 lang_specs_files=
8206 lang_options_files=
8207 lang_tree_files=
8208 for subdir in . $subdirs
8209 do
8210 if test -f $srcdir/$subdir/lang-specs.h; then
8211 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8212 fi
8213 if test -f $srcdir/$subdir/lang-options.h; then
8214 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8215 fi
8216 if test -f $srcdir/$subdir/$subdir-tree.def; then
8217 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8218 fi
8219 done
8220
8221 # These (without "all_") are set in each config-lang.in.
8222 # `language' must be a single word so is spelled singularly.
8223 all_languages=
8224 all_boot_languages=
8225 all_compilers=
8226 all_stagestuff=
8227 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8228 # List of language makefile fragments.
8229 all_lang_makefiles=
8230 # Files for gengtype
8231 all_gtfiles="$target_gtfiles"
8232 # Files for gengtype with language
8233 all_gtfiles_files_langs=
8234 all_gtfiles_files_files=
8235
8236 # Add the language fragments.
8237 # Languages are added via two mechanisms. Some information must be
8238 # recorded in makefile variables, these are defined in config-lang.in.
8239 # We accumulate them and plug them into the main Makefile.
8240 # The other mechanism is a set of hooks for each of the main targets
8241 # like `clean', `install', etc.
8242
8243 language_fragments="Make-lang"
8244 language_hooks="Make-hooks"
8245
8246 for s in .. $subdirs
8247 do
8248 if test $s != ".."
8249 then
8250 language=
8251 boot_language=
8252 compilers=
8253 stagestuff=
8254 outputs=
8255 gtfiles=
8256 . ${srcdir}/$s/config-lang.in
8257 if test "x$language" = x
8258 then
8259 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8260 exit 1
8261 fi
8262 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8263 if test -f ${srcdir}/$s/Makefile.in
8264 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8265 fi
8266 all_languages="$all_languages $language"
8267 if test "x$boot_language" = xyes
8268 then
8269 all_boot_languages="$all_boot_languages $language"
8270 fi
8271 all_compilers="$all_compilers $compilers"
8272 all_stagestuff="$all_stagestuff $stagestuff"
8273 all_outputs="$all_outputs $outputs"
8274 all_gtfiles="$all_gtfiles $gtfiles"
8275 for f in .. $gtfiles
8276 do
8277 if test $f != ".."
8278 then
8279 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8280 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8281 fi
8282 done
8283 fi
8284 done
8285
8286 # Pick up gtfiles for c
8287 gtfiles=
8288 s="c"
8289 . ${srcdir}/c-config-lang.in
8290 all_gtfiles="$all_gtfiles $gtfiles"
8291 for f in .. $gtfiles
8292 do
8293 if test $f != ".."
8294 then
8295 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8296 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8297 fi
8298 done
8299
8300 check_languages=
8301 for language in .. $all_languages
8302 do
8303 if test $language != ".."
8304 then
8305 check_languages="$check_languages check-$language"
8306 fi
8307 done
8308
8309 # Since we can't use `::' targets, we link each language in
8310 # with a set of hooks, reached indirectly via lang.${target}.
8311
8312 rm -f Make-hooks
8313 touch Make-hooks
8314 target_list="all.build all.cross start.encap rest.encap \
8315 info dvi generated-manpages \
8316 install-normal install-common install-info install-man \
8317 uninstall \
8318 mostlyclean clean distclean extraclean maintainer-clean \
8319 stage1 stage2 stage3 stage4"
8320 for t in $target_list
8321 do
8322 x=
8323 for lang in .. $all_languages
8324 do
8325 if test $lang != ".."; then
8326 x="$x $lang.$t"
8327 fi
8328 done
8329 echo "lang.$t: $x" >> Make-hooks
8330 done
8331
8332 # Create .gdbinit.
8333
8334 echo "dir ." > .gdbinit
8335 echo "dir ${srcdir}" >> .gdbinit
8336 if test x$gdb_needs_out_file_path = xyes
8337 then
8338 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8339 fi
8340 if test "x$subdirs" != x; then
8341 for s in $subdirs
8342 do
8343 echo "dir ${srcdir}/$s" >> .gdbinit
8344 done
8345 fi
8346 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8347
8348 # Define variables host_canonical and build_canonical
8349 # because some Cygnus local changes in the Makefile depend on them.
8350 build_canonical=${build}
8351 host_canonical=${host}
8352 target_subdir=
8353 if test "${host}" != "${target}" ; then
8354 target_subdir=${target_alias}/
8355 fi
8356
8357
8358
8359
8360 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8361 # absolute path for gcc_tooldir based on inserting the number of up-directory
8362 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8363 # $(libsubdir)/@(unlibsubdir) based path.
8364 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8365 # make and thus we'd get different behavior depending on where we built the
8366 # sources.
8367 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8368 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8369 else
8370 # An explanation of the sed strings:
8371 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8372 # -e 's|/$||' match a trailing forward slash and eliminates it
8373 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8374 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8375 #
8376 # (*) Note this pattern overwrites the first character of the string
8377 # with a forward slash if one is not already present. This is not a
8378 # problem because the exact names of the sub-directories concerned is
8379 # unimportant, just the number of them matters.
8380 #
8381 # The practical upshot of these patterns is like this:
8382 #
8383 # prefix exec_prefix result
8384 # ------ ----------- ------
8385 # /foo /foo/bar ../
8386 # /foo/ /foo/bar ../
8387 # /foo /foo/bar/ ../
8388 # /foo/ /foo/bar/ ../
8389 # /foo /foo/bar/ugg ../../
8390 #
8391 dollar='$$'
8392 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8393 fi
8394
8395
8396
8397 # Find a directory in which to install a shared libgcc.
8398
8399 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8400 if test "${enable_version_specific_runtime_libs+set}" = set; then
8401 enableval="$enable_version_specific_runtime_libs"
8402 :
8403 fi
8404
8405
8406 # Check whether --with-slibdir or --without-slibdir was given.
8407 if test "${with_slibdir+set}" = set; then
8408 withval="$with_slibdir"
8409 slibdir="$with_slibdir"
8410 else
8411 if test "${enable_version_specific_runtime_libs+set}" = set; then
8412 slibdir='$(libsubdir)'
8413 elif test "$host" != "$target"; then
8414 slibdir='$(build_tooldir)/lib'
8415 else
8416 slibdir='$(libdir)'
8417 fi
8418 fi
8419
8420
8421
8422 # Nothing to do for FLOAT_H, float_format already handled.
8423 objdir=`${PWDCMD-pwd}`
8424
8425
8426 # Process the language and host/target makefile fragments.
8427 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8428
8429 # Substitute configuration variables
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498 # Echo that links are built
8499 if test x$host = x$target
8500 then
8501 str1="native "
8502 else
8503 str1="cross-"
8504 str2=" from $host"
8505 fi
8506
8507 if test x$host != x$build
8508 then
8509 str3=" on a $build system"
8510 fi
8511
8512 if test "x$str2" != x || test "x$str3" != x
8513 then
8514 str4=
8515 fi
8516
8517 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8518
8519 if test "x$str2" != x || test "x$str3" != x
8520 then
8521 echo " ${str2}${str3}." 1>&2
8522 fi
8523
8524 # Truncate the target if necessary
8525 if test x$host_truncate_target != x; then
8526 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8527 fi
8528
8529 # Configure the subdirectories
8530 # AC_CONFIG_SUBDIRS($subdirs)
8531
8532 # Create the Makefile
8533 # and configure language subdirectories
8534 trap '' 1 2 15
8535 cat > confcache <<\EOF
8536 # This file is a shell script that caches the results of configure
8537 # tests run on this system so they can be shared between configure
8538 # scripts and configure runs. It is not useful on other systems.
8539 # If it contains results you don't want to keep, you may remove or edit it.
8540 #
8541 # By default, configure uses ./config.cache as the cache file,
8542 # creating it if it does not exist already. You can give configure
8543 # the --cache-file=FILE option to use a different cache file; that is
8544 # what configure does when it calls configure scripts in
8545 # subdirectories, so they share the cache.
8546 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8547 # config.status only pays attention to the cache file if you give it the
8548 # --recheck option to rerun configure.
8549 #
8550 EOF
8551 # The following way of writing the cache mishandles newlines in values,
8552 # but we know of no workaround that is simple, portable, and efficient.
8553 # So, don't put newlines in cache variables' values.
8554 # Ultrix sh set writes to stderr and can't be redirected directly,
8555 # and sets the high bit in the cache file unless we assign to the vars.
8556 (set) 2>&1 |
8557 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8558 *ac_space=\ *)
8559 # `set' does not quote correctly, so add quotes (double-quote substitution
8560 # turns \\\\ into \\, and sed turns \\ into \).
8561 sed -n \
8562 -e "s/'/'\\\\''/g" \
8563 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8564 ;;
8565 *)
8566 # `set' quotes correctly as required by POSIX, so do not add quotes.
8567 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8568 ;;
8569 esac >> confcache
8570 if cmp -s $cache_file confcache; then
8571 :
8572 else
8573 if test -w $cache_file; then
8574 echo "updating cache $cache_file"
8575 cat confcache > $cache_file
8576 else
8577 echo "not updating unwritable cache $cache_file"
8578 fi
8579 fi
8580 rm -f confcache
8581
8582 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8583
8584 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8585 # Let make expand exec_prefix.
8586 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8587
8588 # Any assignment to VPATH causes Sun make to only execute
8589 # the first set of double-colon rules, so remove it if not needed.
8590 # If there is a colon in the path, we need to keep it.
8591 if test "x$srcdir" = x.; then
8592 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8593 fi
8594
8595 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8596
8597 DEFS=-DHAVE_CONFIG_H
8598
8599 # Without the "./", some shells look in PATH for config.status.
8600 : ${CONFIG_STATUS=./config.status}
8601
8602 echo creating $CONFIG_STATUS
8603 rm -f $CONFIG_STATUS
8604 cat > $CONFIG_STATUS <<EOF
8605 #! /bin/sh
8606 # Generated automatically by configure.
8607 # Run this file to recreate the current configuration.
8608 # This directory was configured as follows,
8609 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8610 #
8611 # $0 $ac_configure_args
8612 #
8613 # Compiler output produced by configure, useful for debugging
8614 # configure, is in ./config.log if it exists.
8615
8616 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8617 for ac_option
8618 do
8619 case "\$ac_option" in
8620 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8621 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8622 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8623 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8624 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8625 exit 0 ;;
8626 -help | --help | --hel | --he | --h)
8627 echo "\$ac_cs_usage"; exit 0 ;;
8628 *) echo "\$ac_cs_usage"; exit 1 ;;
8629 esac
8630 done
8631
8632 ac_given_srcdir=$srcdir
8633
8634 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8635 EOF
8636 cat >> $CONFIG_STATUS <<EOF
8637
8638 # Protect against being on the right side of a sed subst in config.status.
8639 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8640 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8641 $ac_vpsub
8642 $extrasub
8643 s%@SHELL@%$SHELL%g
8644 s%@CFLAGS@%$CFLAGS%g
8645 s%@CPPFLAGS@%$CPPFLAGS%g
8646 s%@CXXFLAGS@%$CXXFLAGS%g
8647 s%@FFLAGS@%$FFLAGS%g
8648 s%@DEFS@%$DEFS%g
8649 s%@LDFLAGS@%$LDFLAGS%g
8650 s%@LIBS@%$LIBS%g
8651 s%@exec_prefix@%$exec_prefix%g
8652 s%@prefix@%$prefix%g
8653 s%@program_transform_name@%$program_transform_name%g
8654 s%@bindir@%$bindir%g
8655 s%@sbindir@%$sbindir%g
8656 s%@libexecdir@%$libexecdir%g
8657 s%@datadir@%$datadir%g
8658 s%@sysconfdir@%$sysconfdir%g
8659 s%@sharedstatedir@%$sharedstatedir%g
8660 s%@localstatedir@%$localstatedir%g
8661 s%@libdir@%$libdir%g
8662 s%@includedir@%$includedir%g
8663 s%@oldincludedir@%$oldincludedir%g
8664 s%@infodir@%$infodir%g
8665 s%@mandir@%$mandir%g
8666 s%@enable_multilib@%$enable_multilib%g
8667 s%@coverage_flags@%$coverage_flags%g
8668 s%@enable_shared@%$enable_shared%g
8669 s%@host@%$host%g
8670 s%@host_alias@%$host_alias%g
8671 s%@host_cpu@%$host_cpu%g
8672 s%@host_vendor@%$host_vendor%g
8673 s%@host_os@%$host_os%g
8674 s%@target@%$target%g
8675 s%@target_alias@%$target_alias%g
8676 s%@target_cpu@%$target_cpu%g
8677 s%@target_vendor@%$target_vendor%g
8678 s%@target_os@%$target_os%g
8679 s%@build@%$build%g
8680 s%@build_alias@%$build_alias%g
8681 s%@build_cpu@%$build_cpu%g
8682 s%@build_vendor@%$build_vendor%g
8683 s%@build_os@%$build_os%g
8684 s%@CC@%$CC%g
8685 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8686 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8687 s%@GNATBIND@%$GNATBIND%g
8688 s%@ADAC@%$ADAC%g
8689 s%@strict1_warn@%$strict1_warn%g
8690 s%@CPP@%$CPP%g
8691 s%@warn_cflags@%$warn_cflags%g
8692 s%@stage1_cflags@%$stage1_cflags%g
8693 s%@SET_MAKE@%$SET_MAKE%g
8694 s%@AWK@%$AWK%g
8695 s%@LN@%$LN%g
8696 s%@LN_S@%$LN_S%g
8697 s%@RANLIB@%$RANLIB%g
8698 s%@INSTALL@%$INSTALL%g
8699 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8700 s%@INSTALL_DATA@%$INSTALL_DATA%g
8701 s%@have_mktemp_command@%$have_mktemp_command%g
8702 s%@MAKEINFO@%$MAKEINFO%g
8703 s%@BUILD_INFO@%$BUILD_INFO%g
8704 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8705 s%@FLEX@%$FLEX%g
8706 s%@BISON@%$BISON%g
8707 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8708 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8709 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8710 s%@LIBICONV@%$LIBICONV%g
8711 s%@manext@%$manext%g
8712 s%@objext@%$objext%g
8713 s%@extra_modes_file@%$extra_modes_file%g
8714 s%@FORBUILD@%$FORBUILD%g
8715 s%@PACKAGE@%$PACKAGE%g
8716 s%@VERSION@%$VERSION%g
8717 s%@ALLOCA@%$ALLOCA%g
8718 s%@GLIBC21@%$GLIBC21%g
8719 s%@USE_NLS@%$USE_NLS%g
8720 s%@MSGFMT@%$MSGFMT%g
8721 s%@GMSGFMT@%$GMSGFMT%g
8722 s%@XGETTEXT@%$XGETTEXT%g
8723 s%@INTLBISON@%$INTLBISON%g
8724 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8725 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8726 s%@CATALOGS@%$CATALOGS%g
8727 s%@CATOBJEXT@%$CATOBJEXT%g
8728 s%@INTLLIBS@%$INTLLIBS%g
8729 s%@INTLDEPS@%$INTLDEPS%g
8730 s%@INTLOBJS@%$INTLOBJS%g
8731 s%@POSUB@%$POSUB%g
8732 s%@DATADIRNAME@%$DATADIRNAME%g
8733 s%@INSTOBJEXT@%$INSTOBJEXT%g
8734 s%@GENCAT@%$GENCAT%g
8735 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8736 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8737 s%@CROSS@%$CROSS%g
8738 s%@ALL@%$ALL%g
8739 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8740 s%@inhibit_libc@%$inhibit_libc%g
8741 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8742 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8743 s%@HOST_CC@%$HOST_CC%g
8744 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8745 s%@STMP_FIXINC@%$STMP_FIXINC%g
8746 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8747 s%@libgcc_visibility@%$libgcc_visibility%g
8748 s%@gthread_flags@%$gthread_flags%g
8749 s%@GGC@%$GGC%g
8750 s%@zlibdir@%$zlibdir%g
8751 s%@zlibinc@%$zlibinc%g
8752 s%@MAINT@%$MAINT%g
8753 s%@build_canonical@%$build_canonical%g
8754 s%@host_canonical@%$host_canonical%g
8755 s%@target_subdir@%$target_subdir%g
8756 s%@gcc_tooldir@%$gcc_tooldir%g
8757 s%@dollar@%$dollar%g
8758 s%@slibdir@%$slibdir%g
8759 s%@objdir@%$objdir%g
8760 s%@subdirs@%$subdirs%g
8761 s%@srcdir@%$srcdir%g
8762 s%@all_boot_languages@%$all_boot_languages%g
8763 s%@all_compilers@%$all_compilers%g
8764 s%@all_gtfiles@%$all_gtfiles%g
8765 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
8766 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
8767 s%@all_lang_makefiles@%$all_lang_makefiles%g
8768 s%@all_languages@%$all_languages%g
8769 s%@all_stagestuff@%$all_stagestuff%g
8770 s%@build_exeext@%$build_exeext%g
8771 s%@build_install_headers_dir@%$build_install_headers_dir%g
8772 s%@build_xm_file_list@%$build_xm_file_list%g
8773 s%@build_xm_file@%$build_xm_file%g
8774 s%@build_xm_defines@%$build_xm_defines%g
8775 s%@check_languages@%$check_languages%g
8776 s%@cc_set_by_configure@%$cc_set_by_configure%g
8777 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8778 s%@cpp_install_dir@%$cpp_install_dir%g
8779 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8780 s%@dep_tmake_file@%$dep_tmake_file%g
8781 s%@extra_headers_list@%$extra_headers_list%g
8782 s%@extra_objs@%$extra_objs%g
8783 s%@extra_parts@%$extra_parts%g
8784 s%@extra_passes@%$extra_passes%g
8785 s%@extra_programs@%$extra_programs%g
8786 s%@float_h_file@%$float_h_file%g
8787 s%@gcc_config_arguments@%$gcc_config_arguments%g
8788 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8789 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8790 s%@gcc_version@%$gcc_version%g
8791 s%@gcc_version_full@%$gcc_version_full%g
8792 s%@gcc_version_trigger@%$gcc_version_trigger%g
8793 s%@host_exeext@%$host_exeext%g
8794 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8795 s%@host_xm_file_list@%$host_xm_file_list%g
8796 s%@host_xm_file@%$host_xm_file%g
8797 s%@host_xm_defines@%$host_xm_defines%g
8798 s%@install@%$install%g
8799 s%@lang_options_files@%$lang_options_files%g
8800 s%@lang_specs_files@%$lang_specs_files%g
8801 s%@lang_tree_files@%$lang_tree_files%g
8802 s%@local_prefix@%$local_prefix%g
8803 s%@md_file@%$md_file%g
8804 s%@objc_boehm_gc@%$objc_boehm_gc%g
8805 s%@out_file@%$out_file%g
8806 s%@out_object_file@%$out_object_file%g
8807 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8808 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8809 s%@symbolic_link@%$symbolic_link%g
8810 s%@thread_file@%$thread_file%g
8811 s%@tm_file_list@%$tm_file_list%g
8812 s%@tm_file@%$tm_file%g
8813 s%@tm_defines@%$tm_defines%g
8814 s%@tm_p_file_list@%$tm_p_file_list%g
8815 s%@tm_p_file@%$tm_p_file%g
8816 s%@xm_file@%$xm_file%g
8817 s%@xm_defines@%$xm_defines%g
8818 s%@c_target_objs@%$c_target_objs%g
8819 s%@cxx_target_objs@%$cxx_target_objs%g
8820 s%@target_cpu_default@%$target_cpu_default%g
8821 /@target_overrides@/r $target_overrides
8822 s%@target_overrides@%%g
8823 /@host_overrides@/r $host_overrides
8824 s%@host_overrides@%%g
8825 /@language_fragments@/r $language_fragments
8826 s%@language_fragments@%%g
8827 /@language_hooks@/r $language_hooks
8828 s%@language_hooks@%%g
8829
8830 CEOF
8831 EOF
8832
8833 cat >> $CONFIG_STATUS <<\EOF
8834
8835 # Split the substitutions into bite-sized pieces for seds with
8836 # small command number limits, like on Digital OSF/1 and HP-UX.
8837 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8838 ac_file=1 # Number of current file.
8839 ac_beg=1 # First line for current file.
8840 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8841 ac_more_lines=:
8842 ac_sed_cmds=""
8843 while $ac_more_lines; do
8844 if test $ac_beg -gt 1; then
8845 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8846 else
8847 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8848 fi
8849 if test ! -s conftest.s$ac_file; then
8850 ac_more_lines=false
8851 rm -f conftest.s$ac_file
8852 else
8853 if test -z "$ac_sed_cmds"; then
8854 ac_sed_cmds="sed -f conftest.s$ac_file"
8855 else
8856 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8857 fi
8858 ac_file=`expr $ac_file + 1`
8859 ac_beg=$ac_end
8860 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8861 fi
8862 done
8863 if test -z "$ac_sed_cmds"; then
8864 ac_sed_cmds=cat
8865 fi
8866 EOF
8867
8868 cat >> $CONFIG_STATUS <<EOF
8869
8870 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8871 EOF
8872 cat >> $CONFIG_STATUS <<\EOF
8873 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8874 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8875 case "$ac_file" in
8876 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8877 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8878 *) ac_file_in="${ac_file}.in" ;;
8879 esac
8880
8881 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8882
8883 # Remove last slash and all that follows it. Not all systems have dirname.
8884 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8885 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8886 # The file is in a subdirectory.
8887 test ! -d "$ac_dir" && mkdir "$ac_dir"
8888 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8889 # A "../" for each directory in $ac_dir_suffix.
8890 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8891 else
8892 ac_dir_suffix= ac_dots=
8893 fi
8894
8895 case "$ac_given_srcdir" in
8896 .) srcdir=.
8897 if test -z "$ac_dots"; then top_srcdir=.
8898 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8899 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8900 *) # Relative path.
8901 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8902 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8903 esac
8904
8905
8906 echo creating "$ac_file"
8907 rm -f "$ac_file"
8908 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8909 case "$ac_file" in
8910 *Makefile*) ac_comsub="1i\\
8911 # $configure_input" ;;
8912 *) ac_comsub= ;;
8913 esac
8914
8915 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8916 sed -e "$ac_comsub
8917 s%@configure_input@%$configure_input%g
8918 s%@srcdir@%$srcdir%g
8919 s%@top_srcdir@%$top_srcdir%g
8920 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8921 fi; done
8922 rm -f conftest.s*
8923
8924 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8925 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8926 #
8927 # ac_d sets the value in "#define NAME VALUE" lines.
8928 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8929 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8930 ac_dC='\3'
8931 ac_dD='%g'
8932 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8933 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8934 ac_uB='\([ ]\)%\1#\2define\3'
8935 ac_uC=' '
8936 ac_uD='\4%g'
8937 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8938 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8939 ac_eB='$%\1#\2define\3'
8940 ac_eC=' '
8941 ac_eD='%g'
8942
8943 if test "${CONFIG_HEADERS+set}" != set; then
8944 EOF
8945 cat >> $CONFIG_STATUS <<EOF
8946 CONFIG_HEADERS="auto-host.h:config.in"
8947 EOF
8948 cat >> $CONFIG_STATUS <<\EOF
8949 fi
8950 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8951 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8952 case "$ac_file" in
8953 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8954 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8955 *) ac_file_in="${ac_file}.in" ;;
8956 esac
8957
8958 echo creating $ac_file
8959
8960 rm -f conftest.frag conftest.in conftest.out
8961 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8962 cat $ac_file_inputs > conftest.in
8963
8964 EOF
8965
8966 # Transform confdefs.h into a sed script conftest.vals that substitutes
8967 # the proper values into config.h.in to produce config.h. And first:
8968 # Protect against being on the right side of a sed subst in config.status.
8969 # Protect against being in an unquoted here document in config.status.
8970 rm -f conftest.vals
8971 cat > conftest.hdr <<\EOF
8972 s/[\\&%]/\\&/g
8973 s%[\\$`]%\\&%g
8974 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8975 s%ac_d%ac_u%gp
8976 s%ac_u%ac_e%gp
8977 EOF
8978 sed -n -f conftest.hdr confdefs.h > conftest.vals
8979 rm -f conftest.hdr
8980
8981 # This sed command replaces #undef with comments. This is necessary, for
8982 # example, in the case of _POSIX_SOURCE, which is predefined and required
8983 # on some systems where configure will not decide to define it.
8984 cat >> conftest.vals <<\EOF
8985 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8986 EOF
8987
8988 # Break up conftest.vals because some shells have a limit on
8989 # the size of here documents, and old seds have small limits too.
8990
8991 rm -f conftest.tail
8992 while :
8993 do
8994 ac_lines=`grep -c . conftest.vals`
8995 # grep -c gives empty output for an empty file on some AIX systems.
8996 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8997 # Write a limited-size here document to conftest.frag.
8998 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8999 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9000 echo 'CEOF
9001 sed -f conftest.frag conftest.in > conftest.out
9002 rm -f conftest.in
9003 mv conftest.out conftest.in
9004 ' >> $CONFIG_STATUS
9005 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9006 rm -f conftest.vals
9007 mv conftest.tail conftest.vals
9008 done
9009 rm -f conftest.vals
9010
9011 cat >> $CONFIG_STATUS <<\EOF
9012 rm -f conftest.frag conftest.h
9013 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9014 cat conftest.in >> conftest.h
9015 rm -f conftest.in
9016 if cmp -s $ac_file conftest.h 2>/dev/null; then
9017 echo "$ac_file is unchanged"
9018 rm -f conftest.h
9019 else
9020 # Remove last slash and all that follows it. Not all systems have dirname.
9021 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9022 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9023 # The file is in a subdirectory.
9024 test ! -d "$ac_dir" && mkdir "$ac_dir"
9025 fi
9026 rm -f $ac_file
9027 mv conftest.h $ac_file
9028 fi
9029 fi; done
9030
9031 EOF
9032 cat >> $CONFIG_STATUS <<EOF
9033
9034 subdirs='$subdirs'
9035 symbolic_link='$symbolic_link'
9036
9037 EOF
9038 cat >> $CONFIG_STATUS <<\EOF
9039 for ac_file in $CONFIG_FILES; do
9040 # Support "outfile[:infile[:infile...]]"
9041 case "$ac_file" in
9042 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9043 esac
9044 # PO directories have a Makefile.in generated from Makefile.in.in.
9045 case "$ac_file" in */Makefile.in)
9046 # Adjust a relative srcdir.
9047 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9048 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9049 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9050 # In autoconf-2.13 it is called $ac_given_srcdir.
9051 # In autoconf-2.50 it is called $srcdir.
9052 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9053 case "$ac_given_srcdir" in
9054 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9055 /*) top_srcdir="$ac_given_srcdir" ;;
9056 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9057 esac
9058 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9059 rm -f "$ac_dir/POTFILES"
9060 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9061 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9062 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9063 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9064 fi
9065 ;;
9066 esac
9067 done
9068
9069 case x$CONFIG_HEADERS in
9070 xauto-host.h:config.in)
9071 echo > cstamp-h ;;
9072 esac
9073 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9074 # bootstrapping and the installation procedure can still use
9075 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9076 # FLAGS_TO_PASS has been modified to solve the problem there.
9077 # This is virtually a duplicate of what happens in configure.lang; we do
9078 # an extra check to make sure this only happens if ln -s can be used.
9079 if test "$symbolic_link" = "ln -s"; then
9080 for d in .. ${subdirs} fixinc ; do
9081 if test $d != ..; then
9082 STARTDIR=`${PWDCMD-pwd}`
9083 cd $d
9084 for t in stage1 stage2 stage3 stage4 include
9085 do
9086 rm -f $t
9087 $symbolic_link ../$t $t 2>/dev/null
9088 done
9089 cd $STARTDIR
9090 fi
9091 done
9092 else true ; fi
9093 # Avoid having to add intl to our include paths.
9094 if test -f intl/libintl.h; then
9095 echo creating libintl.h
9096 echo '#include "intl/libintl.h"' >libintl.h
9097 fi
9098
9099 exit 0
9100 EOF
9101 chmod +x $CONFIG_STATUS
9102 rm -fr confdefs* $ac_clean_files
9103 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9104