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