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