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