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