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