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