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