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