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