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