rebuild with current tools
[deliverable/binutils-gdb.git] / binutils / 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 --enable-shared[=PKGS] build shared libraries [default=yes]"
16 ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18 ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23 --disable-libtool-lock avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25 --enable-targets alternative target configurations"
26 ac_help="$ac_help
27 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
28 ac_help="$ac_help
29 --disable-nls do not use Native Language Support"
30 ac_help="$ac_help
31 --with-included-gettext use the GNU gettext library included here"
32 ac_help="$ac_help
33 --enable-maintainer-mode enable make rules and dependencies not useful
34 (and sometimes confusing) to the casual installer"
35
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 sitefile=
53 srcdir=
54 target=NONE
55 verbose=
56 x_includes=NONE
57 x_libraries=NONE
58 bindir='${exec_prefix}/bin'
59 sbindir='${exec_prefix}/sbin'
60 libexecdir='${exec_prefix}/libexec'
61 datadir='${prefix}/share'
62 sysconfdir='${prefix}/etc'
63 sharedstatedir='${prefix}/com'
64 localstatedir='${prefix}/var'
65 libdir='${exec_prefix}/lib'
66 includedir='${prefix}/include'
67 oldincludedir='/usr/include'
68 infodir='${prefix}/info'
69 mandir='${prefix}/man'
70
71 # Initialize some other variables.
72 subdirs=
73 MFLAGS= MAKEFLAGS=
74 SHELL=${CONFIG_SHELL-/bin/sh}
75 # Maximum number of lines to put in a shell here document.
76 ac_max_here_lines=12
77
78 ac_prev=
79 for ac_option
80 do
81
82 # If the previous option needs an argument, assign it.
83 if test -n "$ac_prev"; then
84 eval "$ac_prev=\$ac_option"
85 ac_prev=
86 continue
87 fi
88
89 case "$ac_option" in
90 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
91 *) ac_optarg= ;;
92 esac
93
94 # Accept the important Cygnus configure options, so we can diagnose typos.
95
96 case "$ac_option" in
97
98 -bindir | --bindir | --bindi | --bind | --bin | --bi)
99 ac_prev=bindir ;;
100 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
101 bindir="$ac_optarg" ;;
102
103 -build | --build | --buil | --bui | --bu)
104 ac_prev=build ;;
105 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
106 build="$ac_optarg" ;;
107
108 -cache-file | --cache-file | --cache-fil | --cache-fi \
109 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
110 ac_prev=cache_file ;;
111 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
112 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
113 cache_file="$ac_optarg" ;;
114
115 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
116 ac_prev=datadir ;;
117 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
118 | --da=*)
119 datadir="$ac_optarg" ;;
120
121 -disable-* | --disable-*)
122 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
123 # Reject names that are not valid shell variable names.
124 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
125 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 fi
127 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128 eval "enable_${ac_feature}=no" ;;
129
130 -enable-* | --enable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 fi
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 case "$ac_option" in
138 *=*) ;;
139 *) ac_optarg=yes ;;
140 esac
141 eval "enable_${ac_feature}='$ac_optarg'" ;;
142
143 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
144 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
145 | --exec | --exe | --ex)
146 ac_prev=exec_prefix ;;
147 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
148 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
149 | --exec=* | --exe=* | --ex=*)
150 exec_prefix="$ac_optarg" ;;
151
152 -gas | --gas | --ga | --g)
153 # Obsolete; use --with-gas.
154 with_gas=yes ;;
155
156 -help | --help | --hel | --he)
157 # Omit some internal or obsolete options to make the list less imposing.
158 # This message is too long to be a string in the A/UX 3.1 sh.
159 cat << EOF
160 Usage: configure [options] [host]
161 Options: [defaults in brackets after descriptions]
162 Configuration:
163 --cache-file=FILE cache test results in FILE
164 --help print this message
165 --no-create do not create output files
166 --quiet, --silent do not print \`checking...' messages
167 --site-file=FILE use FILE as the site file
168 --version print the version of autoconf that created configure
169 Directory and file names:
170 --prefix=PREFIX install architecture-independent files in PREFIX
171 [$ac_default_prefix]
172 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
173 [same as prefix]
174 --bindir=DIR user executables in DIR [EPREFIX/bin]
175 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
176 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
177 --datadir=DIR read-only architecture-independent data in DIR
178 [PREFIX/share]
179 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
180 --sharedstatedir=DIR modifiable architecture-independent data in DIR
181 [PREFIX/com]
182 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
183 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
184 --includedir=DIR C header files in DIR [PREFIX/include]
185 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
186 --infodir=DIR info documentation in DIR [PREFIX/info]
187 --mandir=DIR man documentation in DIR [PREFIX/man]
188 --srcdir=DIR find the sources in DIR [configure dir or ..]
189 --program-prefix=PREFIX prepend PREFIX to installed program names
190 --program-suffix=SUFFIX append SUFFIX to installed program names
191 --program-transform-name=PROGRAM
192 run sed PROGRAM on installed program names
193 EOF
194 cat << EOF
195 Host type:
196 --build=BUILD configure for building on BUILD [BUILD=HOST]
197 --host=HOST configure for HOST [guessed]
198 --target=TARGET configure for TARGET [TARGET=HOST]
199 Features and packages:
200 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
201 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
202 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
203 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
204 --x-includes=DIR X include files are in DIR
205 --x-libraries=DIR X library files are in DIR
206 EOF
207 if test -n "$ac_help"; then
208 echo "--enable and --with options recognized:$ac_help"
209 fi
210 exit 0 ;;
211
212 -host | --host | --hos | --ho)
213 ac_prev=host ;;
214 -host=* | --host=* | --hos=* | --ho=*)
215 host="$ac_optarg" ;;
216
217 -includedir | --includedir | --includedi | --included | --include \
218 | --includ | --inclu | --incl | --inc)
219 ac_prev=includedir ;;
220 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
221 | --includ=* | --inclu=* | --incl=* | --inc=*)
222 includedir="$ac_optarg" ;;
223
224 -infodir | --infodir | --infodi | --infod | --info | --inf)
225 ac_prev=infodir ;;
226 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
227 infodir="$ac_optarg" ;;
228
229 -libdir | --libdir | --libdi | --libd)
230 ac_prev=libdir ;;
231 -libdir=* | --libdir=* | --libdi=* | --libd=*)
232 libdir="$ac_optarg" ;;
233
234 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
235 | --libexe | --libex | --libe)
236 ac_prev=libexecdir ;;
237 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
238 | --libexe=* | --libex=* | --libe=*)
239 libexecdir="$ac_optarg" ;;
240
241 -localstatedir | --localstatedir | --localstatedi | --localstated \
242 | --localstate | --localstat | --localsta | --localst \
243 | --locals | --local | --loca | --loc | --lo)
244 ac_prev=localstatedir ;;
245 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
246 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
247 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
248 localstatedir="$ac_optarg" ;;
249
250 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
251 ac_prev=mandir ;;
252 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
253 mandir="$ac_optarg" ;;
254
255 -nfp | --nfp | --nf)
256 # Obsolete; use --without-fp.
257 with_fp=no ;;
258
259 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
260 | --no-cr | --no-c)
261 no_create=yes ;;
262
263 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
264 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
265 no_recursion=yes ;;
266
267 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
268 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
269 | --oldin | --oldi | --old | --ol | --o)
270 ac_prev=oldincludedir ;;
271 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
272 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
273 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
274 oldincludedir="$ac_optarg" ;;
275
276 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
277 ac_prev=prefix ;;
278 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
279 prefix="$ac_optarg" ;;
280
281 -program-prefix | --program-prefix | --program-prefi | --program-pref \
282 | --program-pre | --program-pr | --program-p)
283 ac_prev=program_prefix ;;
284 -program-prefix=* | --program-prefix=* | --program-prefi=* \
285 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
286 program_prefix="$ac_optarg" ;;
287
288 -program-suffix | --program-suffix | --program-suffi | --program-suff \
289 | --program-suf | --program-su | --program-s)
290 ac_prev=program_suffix ;;
291 -program-suffix=* | --program-suffix=* | --program-suffi=* \
292 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
293 program_suffix="$ac_optarg" ;;
294
295 -program-transform-name | --program-transform-name \
296 | --program-transform-nam | --program-transform-na \
297 | --program-transform-n | --program-transform- \
298 | --program-transform | --program-transfor \
299 | --program-transfo | --program-transf \
300 | --program-trans | --program-tran \
301 | --progr-tra | --program-tr | --program-t)
302 ac_prev=program_transform_name ;;
303 -program-transform-name=* | --program-transform-name=* \
304 | --program-transform-nam=* | --program-transform-na=* \
305 | --program-transform-n=* | --program-transform-=* \
306 | --program-transform=* | --program-transfor=* \
307 | --program-transfo=* | --program-transf=* \
308 | --program-trans=* | --program-tran=* \
309 | --progr-tra=* | --program-tr=* | --program-t=*)
310 program_transform_name="$ac_optarg" ;;
311
312 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
313 | -silent | --silent | --silen | --sile | --sil)
314 silent=yes ;;
315
316 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
317 ac_prev=sbindir ;;
318 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
319 | --sbi=* | --sb=*)
320 sbindir="$ac_optarg" ;;
321
322 -sharedstatedir | --sharedstatedir | --sharedstatedi \
323 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
324 | --sharedst | --shareds | --shared | --share | --shar \
325 | --sha | --sh)
326 ac_prev=sharedstatedir ;;
327 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
328 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
329 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
330 | --sha=* | --sh=*)
331 sharedstatedir="$ac_optarg" ;;
332
333 -site | --site | --sit)
334 ac_prev=site ;;
335 -site=* | --site=* | --sit=*)
336 site="$ac_optarg" ;;
337
338 -site-file | --site-file | --site-fil | --site-fi | --site-f)
339 ac_prev=sitefile ;;
340 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
341 sitefile="$ac_optarg" ;;
342
343 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
344 ac_prev=srcdir ;;
345 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346 srcdir="$ac_optarg" ;;
347
348 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349 | --syscon | --sysco | --sysc | --sys | --sy)
350 ac_prev=sysconfdir ;;
351 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353 sysconfdir="$ac_optarg" ;;
354
355 -target | --target | --targe | --targ | --tar | --ta | --t)
356 ac_prev=target ;;
357 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358 target="$ac_optarg" ;;
359
360 -v | -verbose | --verbose | --verbos | --verbo | --verb)
361 verbose=yes ;;
362
363 -version | --version | --versio | --versi | --vers)
364 echo "configure generated by autoconf version 2.13"
365 exit 0 ;;
366
367 -with-* | --with-*)
368 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372 fi
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 case "$ac_option" in
375 *=*) ;;
376 *) ac_optarg=yes ;;
377 esac
378 eval "with_${ac_package}='$ac_optarg'" ;;
379
380 -without-* | --without-*)
381 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382 # Reject names that are not valid shell variable names.
383 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
385 fi
386 ac_package=`echo $ac_package| sed 's/-/_/g'`
387 eval "with_${ac_package}=no" ;;
388
389 --x)
390 # Obsolete; use --with-x.
391 with_x=yes ;;
392
393 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394 | --x-incl | --x-inc | --x-in | --x-i)
395 ac_prev=x_includes ;;
396 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398 x_includes="$ac_optarg" ;;
399
400 -x-libraries | --x-libraries | --x-librarie | --x-librari \
401 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402 ac_prev=x_libraries ;;
403 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405 x_libraries="$ac_optarg" ;;
406
407 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
408 ;;
409
410 *)
411 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412 echo "configure: warning: $ac_option: invalid host type" 1>&2
413 fi
414 if test "x$nonopt" != xNONE; then
415 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416 fi
417 nonopt="$ac_option"
418 ;;
419
420 esac
421 done
422
423 if test -n "$ac_prev"; then
424 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 fi
426
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
428
429 # File descriptor usage:
430 # 0 standard input
431 # 1 file creation
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
438 exec 6>/dev/null
439 else
440 exec 6>&1
441 fi
442 exec 5>./config.log
443
444 echo "\
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
447 " 1>&5
448
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
451 ac_configure_args=
452 for ac_arg
453 do
454 case "$ac_arg" in
455 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456 | --no-cr | --no-c) ;;
457 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462 esac
463 done
464
465 # NLS nuisances.
466 # Only set these to C if already set. These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
474
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 echo > confdefs.h
479
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=ar.c
483
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486 ac_srcdir_defaulted=yes
487 # Try the directory containing this script, then its parent.
488 ac_prog=$0
489 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
491 srcdir=$ac_confdir
492 if test ! -r $srcdir/$ac_unique_file; then
493 srcdir=..
494 fi
495 else
496 ac_srcdir_defaulted=no
497 fi
498 if test ! -r $srcdir/$ac_unique_file; then
499 if test "$ac_srcdir_defaulted" = yes; then
500 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
501 else
502 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503 fi
504 fi
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
506
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$sitefile"; then
509 if test -z "$CONFIG_SITE"; then
510 if test "x$prefix" != xNONE; then
511 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512 else
513 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514 fi
515 fi
516 else
517 CONFIG_SITE="$sitefile"
518 fi
519 for ac_site_file in $CONFIG_SITE; do
520 if test -r "$ac_site_file"; then
521 echo "loading site script $ac_site_file"
522 . "$ac_site_file"
523 fi
524 done
525
526 if test -r "$cache_file"; then
527 echo "loading cache $cache_file"
528 . $cache_file
529 else
530 echo "creating cache $cache_file"
531 > $cache_file
532 fi
533
534 ac_ext=c
535 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
536 ac_cpp='$CPP $CPPFLAGS'
537 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
538 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
539 cross_compiling=$ac_cv_prog_cc_cross
540
541 ac_exeext=
542 ac_objext=o
543 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
544 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
545 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546 ac_n= ac_c='
547 ' ac_t=' '
548 else
549 ac_n=-n ac_c= ac_t=
550 fi
551 else
552 ac_n= ac_c='\c' ac_t=
553 fi
554
555
556
557 ac_aux_dir=
558 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
559 if test -f $ac_dir/install-sh; then
560 ac_aux_dir=$ac_dir
561 ac_install_sh="$ac_aux_dir/install-sh -c"
562 break
563 elif test -f $ac_dir/install.sh; then
564 ac_aux_dir=$ac_dir
565 ac_install_sh="$ac_aux_dir/install.sh -c"
566 break
567 fi
568 done
569 if test -z "$ac_aux_dir"; then
570 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
571 fi
572 ac_config_guess=$ac_aux_dir/config.guess
573 ac_config_sub=$ac_aux_dir/config.sub
574 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
575
576
577 # Do some error checking and defaulting for the host and target type.
578 # The inputs are:
579 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
580 #
581 # The rules are:
582 # 1. You are not allowed to specify --host, --target, and nonopt at the
583 # same time.
584 # 2. Host defaults to nonopt.
585 # 3. If nonopt is not specified, then host defaults to the current host,
586 # as determined by config.guess.
587 # 4. Target and build default to nonopt.
588 # 5. If nonopt is not specified, then target and build default to host.
589
590 # The aliases save the names the user supplied, while $host etc.
591 # will get canonicalized.
592 case $host---$target---$nonopt in
593 NONE---*---* | *---NONE---* | *---*---NONE) ;;
594 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
595 esac
596
597
598 # Make sure we can run config.sub.
599 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
600 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
601 fi
602
603 echo $ac_n "checking host system type""... $ac_c" 1>&6
604 echo "configure:605: checking host system type" >&5
605
606 host_alias=$host
607 case "$host_alias" in
608 NONE)
609 case $nonopt in
610 NONE)
611 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
612 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
613 fi ;;
614 *) host_alias=$nonopt ;;
615 esac ;;
616 esac
617
618 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
619 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
620 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
621 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
622 echo "$ac_t""$host" 1>&6
623
624 echo $ac_n "checking target system type""... $ac_c" 1>&6
625 echo "configure:626: checking target system type" >&5
626
627 target_alias=$target
628 case "$target_alias" in
629 NONE)
630 case $nonopt in
631 NONE) target_alias=$host_alias ;;
632 *) target_alias=$nonopt ;;
633 esac ;;
634 esac
635
636 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
637 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
638 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
639 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
640 echo "$ac_t""$target" 1>&6
641
642 echo $ac_n "checking build system type""... $ac_c" 1>&6
643 echo "configure:644: checking build system type" >&5
644
645 build_alias=$build
646 case "$build_alias" in
647 NONE)
648 case $nonopt in
649 NONE) build_alias=$host_alias ;;
650 *) build_alias=$nonopt ;;
651 esac ;;
652 esac
653
654 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
655 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
656 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
657 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
658 echo "$ac_t""$build" 1>&6
659
660 test "$host_alias" != "$target_alias" &&
661 test "$program_prefix$program_suffix$program_transform_name" = \
662 NONENONEs,x,x, &&
663 program_prefix=${target_alias}-
664
665
666 # Find a good install program. We prefer a C program (faster),
667 # so one script is as good as another. But avoid the broken or
668 # incompatible versions:
669 # SysV /etc/install, /usr/sbin/install
670 # SunOS /usr/etc/install
671 # IRIX /sbin/install
672 # AIX /bin/install
673 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
674 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
675 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
676 # ./install, which can be erroneously created by make from ./install.sh.
677 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
678 echo "configure:679: checking for a BSD compatible install" >&5
679 if test -z "$INSTALL"; then
680 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
681 echo $ac_n "(cached) $ac_c" 1>&6
682 else
683 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
684 for ac_dir in $PATH; do
685 # Account for people who put trailing slashes in PATH elements.
686 case "$ac_dir/" in
687 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
688 *)
689 # OSF1 and SCO ODT 3.0 have their own names for install.
690 # Don't use installbsd from OSF since it installs stuff as root
691 # by default.
692 for ac_prog in ginstall scoinst install; do
693 if test -f $ac_dir/$ac_prog; then
694 if test $ac_prog = install &&
695 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
696 # AIX install. It has an incompatible calling convention.
697 :
698 else
699 ac_cv_path_install="$ac_dir/$ac_prog -c"
700 break 2
701 fi
702 fi
703 done
704 ;;
705 esac
706 done
707 IFS="$ac_save_IFS"
708
709 fi
710 if test "${ac_cv_path_install+set}" = set; then
711 INSTALL="$ac_cv_path_install"
712 else
713 # As a last resort, use the slow shell script. We don't cache a
714 # path for INSTALL within a source directory, because that will
715 # break other packages using the cache if that directory is
716 # removed, or if the path is relative.
717 INSTALL="$ac_install_sh"
718 fi
719 fi
720 echo "$ac_t""$INSTALL" 1>&6
721
722 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
723 # It thinks the first close brace ends the variable substitution.
724 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
725
726 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
727
728 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
729
730 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
731 echo "configure:732: checking whether build environment is sane" >&5
732 # Just in case
733 sleep 1
734 echo timestamp > conftestfile
735 # Do `set' in a subshell so we don't clobber the current shell's
736 # arguments. Must try -L first in case configure is actually a
737 # symlink; some systems play weird games with the mod time of symlinks
738 # (eg FreeBSD returns the mod time of the symlink's containing
739 # directory).
740 if (
741 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
742 if test "$*" = "X"; then
743 # -L didn't work.
744 set X `ls -t $srcdir/configure conftestfile`
745 fi
746 if test "$*" != "X $srcdir/configure conftestfile" \
747 && test "$*" != "X conftestfile $srcdir/configure"; then
748
749 # If neither matched, then we have a broken ls. This can happen
750 # if, for instance, CONFIG_SHELL is bash and it inherits a
751 # broken ls alias from the environment. This has actually
752 # happened. Such a system could not be considered "sane".
753 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
754 alias in your environment" 1>&2; exit 1; }
755 fi
756
757 test "$2" = conftestfile
758 )
759 then
760 # Ok.
761 :
762 else
763 { echo "configure: error: newly created file is older than distributed files!
764 Check your system clock" 1>&2; exit 1; }
765 fi
766 rm -f conftest*
767 echo "$ac_t""yes" 1>&6
768 if test "$program_transform_name" = s,x,x,; then
769 program_transform_name=
770 else
771 # Double any \ or $. echo might interpret backslashes.
772 cat <<\EOF_SED > conftestsed
773 s,\\,\\\\,g; s,\$,$$,g
774 EOF_SED
775 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
776 rm -f conftestsed
777 fi
778 test "$program_prefix" != NONE &&
779 program_transform_name="s,^,${program_prefix},; $program_transform_name"
780 # Use a double $ so make ignores it.
781 test "$program_suffix" != NONE &&
782 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
783
784 # sed with no file args requires a program.
785 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
786
787 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
788 echo "configure:789: checking whether ${MAKE-make} sets \${MAKE}" >&5
789 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
790 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
791 echo $ac_n "(cached) $ac_c" 1>&6
792 else
793 cat > conftestmake <<\EOF
794 all:
795 @echo 'ac_maketemp="${MAKE}"'
796 EOF
797 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
798 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
799 if test -n "$ac_maketemp"; then
800 eval ac_cv_prog_make_${ac_make}_set=yes
801 else
802 eval ac_cv_prog_make_${ac_make}_set=no
803 fi
804 rm -f conftestmake
805 fi
806 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
807 echo "$ac_t""yes" 1>&6
808 SET_MAKE=
809 else
810 echo "$ac_t""no" 1>&6
811 SET_MAKE="MAKE=${MAKE-make}"
812 fi
813
814
815 PACKAGE=binutils
816
817 VERSION=2.9.5
818
819 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
820 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
821 fi
822 cat >> confdefs.h <<EOF
823 #define PACKAGE "$PACKAGE"
824 EOF
825
826 cat >> confdefs.h <<EOF
827 #define VERSION "$VERSION"
828 EOF
829
830
831
832 missing_dir=`cd $ac_aux_dir && pwd`
833 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
834 echo "configure:835: checking for working aclocal" >&5
835 # Run test in a subshell; some versions of sh will print an error if
836 # an executable is not found, even if stderr is redirected.
837 # Redirect stdin to placate older versions of autoconf. Sigh.
838 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
839 ACLOCAL=aclocal
840 echo "$ac_t""found" 1>&6
841 else
842 ACLOCAL="$missing_dir/missing aclocal"
843 echo "$ac_t""missing" 1>&6
844 fi
845
846 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
847 echo "configure:848: checking for working autoconf" >&5
848 # Run test in a subshell; some versions of sh will print an error if
849 # an executable is not found, even if stderr is redirected.
850 # Redirect stdin to placate older versions of autoconf. Sigh.
851 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
852 AUTOCONF=autoconf
853 echo "$ac_t""found" 1>&6
854 else
855 AUTOCONF="$missing_dir/missing autoconf"
856 echo "$ac_t""missing" 1>&6
857 fi
858
859 echo $ac_n "checking for working automake""... $ac_c" 1>&6
860 echo "configure:861: checking for working automake" >&5
861 # Run test in a subshell; some versions of sh will print an error if
862 # an executable is not found, even if stderr is redirected.
863 # Redirect stdin to placate older versions of autoconf. Sigh.
864 if (automake --version) < /dev/null > /dev/null 2>&1; then
865 AUTOMAKE=automake
866 echo "$ac_t""found" 1>&6
867 else
868 AUTOMAKE="$missing_dir/missing automake"
869 echo "$ac_t""missing" 1>&6
870 fi
871
872 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
873 echo "configure:874: checking for working autoheader" >&5
874 # Run test in a subshell; some versions of sh will print an error if
875 # an executable is not found, even if stderr is redirected.
876 # Redirect stdin to placate older versions of autoconf. Sigh.
877 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
878 AUTOHEADER=autoheader
879 echo "$ac_t""found" 1>&6
880 else
881 AUTOHEADER="$missing_dir/missing autoheader"
882 echo "$ac_t""missing" 1>&6
883 fi
884
885 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
886 echo "configure:887: checking for working makeinfo" >&5
887 # Run test in a subshell; some versions of sh will print an error if
888 # an executable is not found, even if stderr is redirected.
889 # Redirect stdin to placate older versions of autoconf. Sigh.
890 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
891 MAKEINFO=makeinfo
892 echo "$ac_t""found" 1>&6
893 else
894 MAKEINFO="$missing_dir/missing makeinfo"
895 echo "$ac_t""missing" 1>&6
896 fi
897
898
899
900 # Check whether --enable-shared or --disable-shared was given.
901 if test "${enable_shared+set}" = set; then
902 enableval="$enable_shared"
903 p=${PACKAGE-default}
904 case "$enableval" in
905 yes) enable_shared=yes ;;
906 no) enable_shared=no ;;
907 *)
908 enable_shared=no
909 # Look at the argument we got. We use all the common list separators.
910 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
911 for pkg in $enableval; do
912 if test "X$pkg" = "X$p"; then
913 enable_shared=yes
914 fi
915 done
916 IFS="$ac_save_ifs"
917 ;;
918 esac
919 else
920 enable_shared=yes
921 fi
922
923 # Check whether --enable-static or --disable-static was given.
924 if test "${enable_static+set}" = set; then
925 enableval="$enable_static"
926 p=${PACKAGE-default}
927 case "$enableval" in
928 yes) enable_static=yes ;;
929 no) enable_static=no ;;
930 *)
931 enable_static=no
932 # Look at the argument we got. We use all the common list separators.
933 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
934 for pkg in $enableval; do
935 if test "X$pkg" = "X$p"; then
936 enable_static=yes
937 fi
938 done
939 IFS="$ac_save_ifs"
940 ;;
941 esac
942 else
943 enable_static=yes
944 fi
945
946 # Check whether --enable-fast-install or --disable-fast-install was given.
947 if test "${enable_fast_install+set}" = set; then
948 enableval="$enable_fast_install"
949 p=${PACKAGE-default}
950 case "$enableval" in
951 yes) enable_fast_install=yes ;;
952 no) enable_fast_install=no ;;
953 *)
954 enable_fast_install=no
955 # Look at the argument we got. We use all the common list separators.
956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
957 for pkg in $enableval; do
958 if test "X$pkg" = "X$p"; then
959 enable_fast_install=yes
960 fi
961 done
962 IFS="$ac_save_ifs"
963 ;;
964 esac
965 else
966 enable_fast_install=yes
967 fi
968
969 # Extract the first word of "ranlib", so it can be a program name with args.
970 set dummy ranlib; ac_word=$2
971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
972 echo "configure:973: checking for $ac_word" >&5
973 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
975 else
976 if test -n "$RANLIB"; then
977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
978 else
979 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
980 ac_dummy="$PATH"
981 for ac_dir in $ac_dummy; do
982 test -z "$ac_dir" && ac_dir=.
983 if test -f $ac_dir/$ac_word; then
984 ac_cv_prog_RANLIB="ranlib"
985 break
986 fi
987 done
988 IFS="$ac_save_ifs"
989 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
990 fi
991 fi
992 RANLIB="$ac_cv_prog_RANLIB"
993 if test -n "$RANLIB"; then
994 echo "$ac_t""$RANLIB" 1>&6
995 else
996 echo "$ac_t""no" 1>&6
997 fi
998
999 # Extract the first word of "gcc", so it can be a program name with args.
1000 set dummy gcc; ac_word=$2
1001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1002 echo "configure:1003: checking for $ac_word" >&5
1003 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006 if test -n "$CC"; then
1007 ac_cv_prog_CC="$CC" # Let the user override the test.
1008 else
1009 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1010 ac_dummy="$PATH"
1011 for ac_dir in $ac_dummy; do
1012 test -z "$ac_dir" && ac_dir=.
1013 if test -f $ac_dir/$ac_word; then
1014 ac_cv_prog_CC="gcc"
1015 break
1016 fi
1017 done
1018 IFS="$ac_save_ifs"
1019 fi
1020 fi
1021 CC="$ac_cv_prog_CC"
1022 if test -n "$CC"; then
1023 echo "$ac_t""$CC" 1>&6
1024 else
1025 echo "$ac_t""no" 1>&6
1026 fi
1027
1028 if test -z "$CC"; then
1029 # Extract the first word of "cc", so it can be a program name with args.
1030 set dummy cc; ac_word=$2
1031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1032 echo "configure:1033: checking for $ac_word" >&5
1033 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1034 echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036 if test -n "$CC"; then
1037 ac_cv_prog_CC="$CC" # Let the user override the test.
1038 else
1039 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1040 ac_prog_rejected=no
1041 ac_dummy="$PATH"
1042 for ac_dir in $ac_dummy; do
1043 test -z "$ac_dir" && ac_dir=.
1044 if test -f $ac_dir/$ac_word; then
1045 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1046 ac_prog_rejected=yes
1047 continue
1048 fi
1049 ac_cv_prog_CC="cc"
1050 break
1051 fi
1052 done
1053 IFS="$ac_save_ifs"
1054 if test $ac_prog_rejected = yes; then
1055 # We found a bogon in the path, so make sure we never use it.
1056 set dummy $ac_cv_prog_CC
1057 shift
1058 if test $# -gt 0; then
1059 # We chose a different compiler from the bogus one.
1060 # However, it has the same basename, so the bogon will be chosen
1061 # first if we set CC to just the basename; use the full file name.
1062 shift
1063 set dummy "$ac_dir/$ac_word" "$@"
1064 shift
1065 ac_cv_prog_CC="$@"
1066 fi
1067 fi
1068 fi
1069 fi
1070 CC="$ac_cv_prog_CC"
1071 if test -n "$CC"; then
1072 echo "$ac_t""$CC" 1>&6
1073 else
1074 echo "$ac_t""no" 1>&6
1075 fi
1076
1077 if test -z "$CC"; then
1078 case "`uname -s`" in
1079 *win32* | *WIN32*)
1080 # Extract the first word of "cl", so it can be a program name with args.
1081 set dummy cl; ac_word=$2
1082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1083 echo "configure:1084: checking for $ac_word" >&5
1084 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1085 echo $ac_n "(cached) $ac_c" 1>&6
1086 else
1087 if test -n "$CC"; then
1088 ac_cv_prog_CC="$CC" # Let the user override the test.
1089 else
1090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1091 ac_dummy="$PATH"
1092 for ac_dir in $ac_dummy; do
1093 test -z "$ac_dir" && ac_dir=.
1094 if test -f $ac_dir/$ac_word; then
1095 ac_cv_prog_CC="cl"
1096 break
1097 fi
1098 done
1099 IFS="$ac_save_ifs"
1100 fi
1101 fi
1102 CC="$ac_cv_prog_CC"
1103 if test -n "$CC"; then
1104 echo "$ac_t""$CC" 1>&6
1105 else
1106 echo "$ac_t""no" 1>&6
1107 fi
1108 ;;
1109 esac
1110 fi
1111 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1112 fi
1113
1114 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1115 echo "configure:1116: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1116
1117 ac_ext=c
1118 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1121 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1122 cross_compiling=$ac_cv_prog_cc_cross
1123
1124 cat > conftest.$ac_ext << EOF
1125
1126 #line 1127 "configure"
1127 #include "confdefs.h"
1128
1129 main(){return(0);}
1130 EOF
1131 if { (eval echo configure:1132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1132 ac_cv_prog_cc_works=yes
1133 # If we can't run a trivial program, we are probably using a cross compiler.
1134 if (./conftest; exit) 2>/dev/null; then
1135 ac_cv_prog_cc_cross=no
1136 else
1137 ac_cv_prog_cc_cross=yes
1138 fi
1139 else
1140 echo "configure: failed program was:" >&5
1141 cat conftest.$ac_ext >&5
1142 ac_cv_prog_cc_works=no
1143 fi
1144 rm -fr conftest*
1145 ac_ext=c
1146 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1149 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1150 cross_compiling=$ac_cv_prog_cc_cross
1151
1152 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1153 if test $ac_cv_prog_cc_works = no; then
1154 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1155 fi
1156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1157 echo "configure:1158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1158 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1159 cross_compiling=$ac_cv_prog_cc_cross
1160
1161 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1162 echo "configure:1163: checking whether we are using GNU C" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166 cat > conftest.c <<EOF
1167 #ifdef __GNUC__
1168 yes;
1169 #endif
1170 EOF
1171 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1172 ac_cv_prog_gcc=yes
1173 else
1174 ac_cv_prog_gcc=no
1175 fi
1176 fi
1177
1178 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1179
1180 if test $ac_cv_prog_gcc = yes; then
1181 GCC=yes
1182 else
1183 GCC=
1184 fi
1185
1186 ac_test_CFLAGS="${CFLAGS+set}"
1187 ac_save_CFLAGS="$CFLAGS"
1188 CFLAGS=
1189 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${CC-cc} accepts -g" >&5
1191 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194 echo 'void f(){}' > conftest.c
1195 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1196 ac_cv_prog_cc_g=yes
1197 else
1198 ac_cv_prog_cc_g=no
1199 fi
1200 rm -f conftest*
1201
1202 fi
1203
1204 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1205 if test "$ac_test_CFLAGS" = set; then
1206 CFLAGS="$ac_save_CFLAGS"
1207 elif test $ac_cv_prog_cc_g = yes; then
1208 if test "$GCC" = yes; then
1209 CFLAGS="-g -O2"
1210 else
1211 CFLAGS="-g"
1212 fi
1213 else
1214 if test "$GCC" = yes; then
1215 CFLAGS="-O2"
1216 else
1217 CFLAGS=
1218 fi
1219 fi
1220
1221 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1222 if test "${with_gnu_ld+set}" = set; then
1223 withval="$with_gnu_ld"
1224 test "$withval" = no || with_gnu_ld=yes
1225 else
1226 with_gnu_ld=no
1227 fi
1228
1229 ac_prog=ld
1230 if test "$ac_cv_prog_gcc" = yes; then
1231 # Check if gcc -print-prog-name=ld gives a path.
1232 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1233 echo "configure:1234: checking for ld used by GCC" >&5
1234 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1235 case "$ac_prog" in
1236 # Accept absolute paths.
1237 [\\/]* | [A-Za-z]:[\\/]*)
1238 re_direlt='/[^/][^/]*/\.\./'
1239 # Canonicalize the path of ld
1240 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1241 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1242 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1243 done
1244 test -z "$LD" && LD="$ac_prog"
1245 ;;
1246 "")
1247 # If it fails, then pretend we aren't using GCC.
1248 ac_prog=ld
1249 ;;
1250 *)
1251 # If it is relative, then search for the first ld in PATH.
1252 with_gnu_ld=unknown
1253 ;;
1254 esac
1255 elif test "$with_gnu_ld" = yes; then
1256 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1257 echo "configure:1258: checking for GNU ld" >&5
1258 else
1259 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1260 echo "configure:1261: checking for non-GNU ld" >&5
1261 fi
1262 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265 if test -z "$LD"; then
1266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1267 for ac_dir in $PATH; do
1268 test -z "$ac_dir" && ac_dir=.
1269 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1270 ac_cv_path_LD="$ac_dir/$ac_prog"
1271 # Check to see if the program is GNU ld. I'd rather use --version,
1272 # but apparently some GNU ld's only accept -v.
1273 # Break only if it was the GNU/non-GNU ld that we prefer.
1274 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1275 test "$with_gnu_ld" != no && break
1276 else
1277 test "$with_gnu_ld" != yes && break
1278 fi
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 else
1283 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1284 fi
1285 fi
1286
1287 LD="$ac_cv_path_LD"
1288 if test -n "$LD"; then
1289 echo "$ac_t""$LD" 1>&6
1290 else
1291 echo "$ac_t""no" 1>&6
1292 fi
1293 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1294 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1295 echo "configure:1296: checking if the linker ($LD) is GNU ld" >&5
1296 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1297 echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1300 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1301 ac_cv_prog_gnu_ld=yes
1302 else
1303 ac_cv_prog_gnu_ld=no
1304 fi
1305 fi
1306
1307 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1308
1309
1310 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1311 echo "configure:1312: checking for BSD-compatible nm" >&5
1312 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1314 else
1315 if test -n "$NM"; then
1316 # Let the user override the test.
1317 ac_cv_path_NM="$NM"
1318 else
1319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1320 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1321 test -z "$ac_dir" && ac_dir=.
1322 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1323 # Check to see if the nm accepts a BSD-compat flag.
1324 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1325 # nm: unknown option "B" ignored
1326 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1327 ac_cv_path_NM="$ac_dir/nm -B"
1328 break
1329 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1330 ac_cv_path_NM="$ac_dir/nm -p"
1331 break
1332 else
1333 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1334 continue # so that we can try to find one that supports BSD flags
1335 fi
1336 fi
1337 done
1338 IFS="$ac_save_ifs"
1339 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1340 fi
1341 fi
1342
1343 NM="$ac_cv_path_NM"
1344 echo "$ac_t""$NM" 1>&6
1345
1346 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1347 echo "configure:1348: checking whether ln -s works" >&5
1348 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351 rm -f conftestdata
1352 if ln -s X conftestdata 2>/dev/null
1353 then
1354 rm -f conftestdata
1355 ac_cv_prog_LN_S="ln -s"
1356 else
1357 ac_cv_prog_LN_S=ln
1358 fi
1359 fi
1360 LN_S="$ac_cv_prog_LN_S"
1361 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1362 echo "$ac_t""yes" 1>&6
1363 else
1364 echo "$ac_t""no" 1>&6
1365 fi
1366
1367
1368 case "$target" in
1369 NONE) lt_target="$host" ;;
1370 *) lt_target="$target" ;;
1371 esac
1372
1373 # Check for any special flags to pass to ltconfig.
1374 libtool_flags="--cache-file=$cache_file"
1375 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1376 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1377 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1378 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1379 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1380
1381
1382 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1383 if test "${enable_libtool_lock+set}" = set; then
1384 enableval="$enable_libtool_lock"
1385 :
1386 fi
1387
1388 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1389 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1390
1391 # Some flags need to be propagated to the compiler or linker for good
1392 # libtool support.
1393 case "$lt_target" in
1394 *-*-irix6*)
1395 # Find out which ABI we are using.
1396 echo '#line 1397 "configure"' > conftest.$ac_ext
1397 if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1398 case "`/usr/bin/file conftest.o`" in
1399 *32-bit*)
1400 LD="${LD-ld} -32"
1401 ;;
1402 *N32*)
1403 LD="${LD-ld} -n32"
1404 ;;
1405 *64-bit*)
1406 LD="${LD-ld} -64"
1407 ;;
1408 esac
1409 fi
1410 rm -rf conftest*
1411 ;;
1412
1413 *-*-sco3.2v5*)
1414 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1415 SAVE_CFLAGS="$CFLAGS"
1416 CFLAGS="$CFLAGS -belf"
1417 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1418 echo "configure:1419: checking whether the C compiler needs -belf" >&5
1419 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1420 echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422 cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425
1426 int main() {
1427
1428 ; return 0; }
1429 EOF
1430 if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1431 rm -rf conftest*
1432 lt_cv_cc_needs_belf=yes
1433 else
1434 echo "configure: failed program was:" >&5
1435 cat conftest.$ac_ext >&5
1436 rm -rf conftest*
1437 lt_cv_cc_needs_belf=no
1438 fi
1439 rm -f conftest*
1440 fi
1441
1442 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1443 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1444 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1445 CFLAGS="$SAVE_CFLAGS"
1446 fi
1447 ;;
1448
1449
1450 esac
1451
1452
1453 # Save cache, so that ltconfig can load it
1454 cat > confcache <<\EOF
1455 # This file is a shell script that caches the results of configure
1456 # tests run on this system so they can be shared between configure
1457 # scripts and configure runs. It is not useful on other systems.
1458 # If it contains results you don't want to keep, you may remove or edit it.
1459 #
1460 # By default, configure uses ./config.cache as the cache file,
1461 # creating it if it does not exist already. You can give configure
1462 # the --cache-file=FILE option to use a different cache file; that is
1463 # what configure does when it calls configure scripts in
1464 # subdirectories, so they share the cache.
1465 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1466 # config.status only pays attention to the cache file if you give it the
1467 # --recheck option to rerun configure.
1468 #
1469 EOF
1470 # The following way of writing the cache mishandles newlines in values,
1471 # but we know of no workaround that is simple, portable, and efficient.
1472 # So, don't put newlines in cache variables' values.
1473 # Ultrix sh set writes to stderr and can't be redirected directly,
1474 # and sets the high bit in the cache file unless we assign to the vars.
1475 (set) 2>&1 |
1476 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1477 *ac_space=\ *)
1478 # `set' does not quote correctly, so add quotes (double-quote substitution
1479 # turns \\\\ into \\, and sed turns \\ into \).
1480 sed -n \
1481 -e "s/'/'\\\\''/g" \
1482 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1483 ;;
1484 *)
1485 # `set' quotes correctly as required by POSIX, so do not add quotes.
1486 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1487 ;;
1488 esac >> confcache
1489 if cmp -s $cache_file confcache; then
1490 :
1491 else
1492 if test -w $cache_file; then
1493 echo "updating cache $cache_file"
1494 cat confcache > $cache_file
1495 else
1496 echo "not updating unwritable cache $cache_file"
1497 fi
1498 fi
1499 rm -f confcache
1500
1501
1502 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1503 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1504 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1505 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1506 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1507 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1508 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1509 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1510
1511 # Reload cache, that may have been modified by ltconfig
1512 if test -r "$cache_file"; then
1513 echo "loading cache $cache_file"
1514 . $cache_file
1515 else
1516 echo "creating cache $cache_file"
1517 > $cache_file
1518 fi
1519
1520
1521 # This can be used to rebuild libtool when needed
1522 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1523
1524 # Always use our own libtool.
1525 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1526
1527 # Redirect the config.log output again, so that the ltconfig log is not
1528 # clobbered by the next message.
1529 exec 5>>./config.log
1530
1531
1532 # Check whether --enable-targets or --disable-targets was given.
1533 if test "${enable_targets+set}" = set; then
1534 enableval="$enable_targets"
1535 case "${enableval}" in
1536 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1537 ;;
1538 no) enable_targets= ;;
1539 *) enable_targets=$enableval ;;
1540 esac
1541 fi
1542 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1543 if test "${enable_commonbfdlib+set}" = set; then
1544 enableval="$enable_commonbfdlib"
1545 case "${enableval}" in
1546 yes) commonbfdlib=true ;;
1547 no) commonbfdlib=false ;;
1548 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1549 esac
1550 fi
1551
1552
1553
1554
1555
1556 if test -z "$target" ; then
1557 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1558 fi
1559 if test -z "$host" ; then
1560 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1561 fi
1562
1563 # Extract the first word of "gcc", so it can be a program name with args.
1564 set dummy gcc; ac_word=$2
1565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1566 echo "configure:1567: checking for $ac_word" >&5
1567 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
1569 else
1570 if test -n "$CC"; then
1571 ac_cv_prog_CC="$CC" # Let the user override the test.
1572 else
1573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576 test -z "$ac_dir" && ac_dir=.
1577 if test -f $ac_dir/$ac_word; then
1578 ac_cv_prog_CC="gcc"
1579 break
1580 fi
1581 done
1582 IFS="$ac_save_ifs"
1583 fi
1584 fi
1585 CC="$ac_cv_prog_CC"
1586 if test -n "$CC"; then
1587 echo "$ac_t""$CC" 1>&6
1588 else
1589 echo "$ac_t""no" 1>&6
1590 fi
1591
1592 if test -z "$CC"; then
1593 # Extract the first word of "cc", so it can be a program name with args.
1594 set dummy cc; ac_word=$2
1595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1596 echo "configure:1597: checking for $ac_word" >&5
1597 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1598 echo $ac_n "(cached) $ac_c" 1>&6
1599 else
1600 if test -n "$CC"; then
1601 ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1604 ac_prog_rejected=no
1605 ac_dummy="$PATH"
1606 for ac_dir in $ac_dummy; do
1607 test -z "$ac_dir" && ac_dir=.
1608 if test -f $ac_dir/$ac_word; then
1609 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1610 ac_prog_rejected=yes
1611 continue
1612 fi
1613 ac_cv_prog_CC="cc"
1614 break
1615 fi
1616 done
1617 IFS="$ac_save_ifs"
1618 if test $ac_prog_rejected = yes; then
1619 # We found a bogon in the path, so make sure we never use it.
1620 set dummy $ac_cv_prog_CC
1621 shift
1622 if test $# -gt 0; then
1623 # We chose a different compiler from the bogus one.
1624 # However, it has the same basename, so the bogon will be chosen
1625 # first if we set CC to just the basename; use the full file name.
1626 shift
1627 set dummy "$ac_dir/$ac_word" "$@"
1628 shift
1629 ac_cv_prog_CC="$@"
1630 fi
1631 fi
1632 fi
1633 fi
1634 CC="$ac_cv_prog_CC"
1635 if test -n "$CC"; then
1636 echo "$ac_t""$CC" 1>&6
1637 else
1638 echo "$ac_t""no" 1>&6
1639 fi
1640
1641 if test -z "$CC"; then
1642 case "`uname -s`" in
1643 *win32* | *WIN32*)
1644 # Extract the first word of "cl", so it can be a program name with args.
1645 set dummy cl; ac_word=$2
1646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_word" >&5
1648 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1649 echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651 if test -n "$CC"; then
1652 ac_cv_prog_CC="$CC" # Let the user override the test.
1653 else
1654 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1655 ac_dummy="$PATH"
1656 for ac_dir in $ac_dummy; do
1657 test -z "$ac_dir" && ac_dir=.
1658 if test -f $ac_dir/$ac_word; then
1659 ac_cv_prog_CC="cl"
1660 break
1661 fi
1662 done
1663 IFS="$ac_save_ifs"
1664 fi
1665 fi
1666 CC="$ac_cv_prog_CC"
1667 if test -n "$CC"; then
1668 echo "$ac_t""$CC" 1>&6
1669 else
1670 echo "$ac_t""no" 1>&6
1671 fi
1672 ;;
1673 esac
1674 fi
1675 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1676 fi
1677
1678 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1679 echo "configure:1680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1680
1681 ac_ext=c
1682 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1683 ac_cpp='$CPP $CPPFLAGS'
1684 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1685 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1686 cross_compiling=$ac_cv_prog_cc_cross
1687
1688 cat > conftest.$ac_ext << EOF
1689
1690 #line 1691 "configure"
1691 #include "confdefs.h"
1692
1693 main(){return(0);}
1694 EOF
1695 if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1696 ac_cv_prog_cc_works=yes
1697 # If we can't run a trivial program, we are probably using a cross compiler.
1698 if (./conftest; exit) 2>/dev/null; then
1699 ac_cv_prog_cc_cross=no
1700 else
1701 ac_cv_prog_cc_cross=yes
1702 fi
1703 else
1704 echo "configure: failed program was:" >&5
1705 cat conftest.$ac_ext >&5
1706 ac_cv_prog_cc_works=no
1707 fi
1708 rm -fr conftest*
1709 ac_ext=c
1710 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1711 ac_cpp='$CPP $CPPFLAGS'
1712 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1713 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1714 cross_compiling=$ac_cv_prog_cc_cross
1715
1716 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1717 if test $ac_cv_prog_cc_works = no; then
1718 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1719 fi
1720 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1721 echo "configure:1722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1722 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1723 cross_compiling=$ac_cv_prog_cc_cross
1724
1725 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1726 echo "configure:1727: checking whether we are using GNU C" >&5
1727 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730 cat > conftest.c <<EOF
1731 #ifdef __GNUC__
1732 yes;
1733 #endif
1734 EOF
1735 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1736 ac_cv_prog_gcc=yes
1737 else
1738 ac_cv_prog_gcc=no
1739 fi
1740 fi
1741
1742 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1743
1744 if test $ac_cv_prog_gcc = yes; then
1745 GCC=yes
1746 else
1747 GCC=
1748 fi
1749
1750 ac_test_CFLAGS="${CFLAGS+set}"
1751 ac_save_CFLAGS="$CFLAGS"
1752 CFLAGS=
1753 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1754 echo "configure:1755: checking whether ${CC-cc} accepts -g" >&5
1755 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1758 echo 'void f(){}' > conftest.c
1759 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1760 ac_cv_prog_cc_g=yes
1761 else
1762 ac_cv_prog_cc_g=no
1763 fi
1764 rm -f conftest*
1765
1766 fi
1767
1768 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1769 if test "$ac_test_CFLAGS" = set; then
1770 CFLAGS="$ac_save_CFLAGS"
1771 elif test $ac_cv_prog_cc_g = yes; then
1772 if test "$GCC" = yes; then
1773 CFLAGS="-g -O2"
1774 else
1775 CFLAGS="-g"
1776 fi
1777 else
1778 if test "$GCC" = yes; then
1779 CFLAGS="-O2"
1780 else
1781 CFLAGS=
1782 fi
1783 fi
1784
1785
1786 for ac_prog in 'bison -y' byacc
1787 do
1788 # Extract the first word of "$ac_prog", so it can be a program name with args.
1789 set dummy $ac_prog; ac_word=$2
1790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1791 echo "configure:1792: checking for $ac_word" >&5
1792 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795 if test -n "$YACC"; then
1796 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1797 else
1798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1799 ac_dummy="$PATH"
1800 for ac_dir in $ac_dummy; do
1801 test -z "$ac_dir" && ac_dir=.
1802 if test -f $ac_dir/$ac_word; then
1803 ac_cv_prog_YACC="$ac_prog"
1804 break
1805 fi
1806 done
1807 IFS="$ac_save_ifs"
1808 fi
1809 fi
1810 YACC="$ac_cv_prog_YACC"
1811 if test -n "$YACC"; then
1812 echo "$ac_t""$YACC" 1>&6
1813 else
1814 echo "$ac_t""no" 1>&6
1815 fi
1816
1817 test -n "$YACC" && break
1818 done
1819 test -n "$YACC" || YACC="yacc"
1820
1821 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1822 echo "configure:1823: checking how to run the C preprocessor" >&5
1823 # On Suns, sometimes $CPP names a directory.
1824 if test -n "$CPP" && test -d "$CPP"; then
1825 CPP=
1826 fi
1827 if test -z "$CPP"; then
1828 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1829 echo $ac_n "(cached) $ac_c" 1>&6
1830 else
1831 # This must be in double quotes, not single quotes, because CPP may get
1832 # substituted into the Makefile and "${CC-cc}" will confuse make.
1833 CPP="${CC-cc} -E"
1834 # On the NeXT, cc -E runs the code through the compiler's parser,
1835 # not just through cpp.
1836 cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1839 #include <assert.h>
1840 Syntax Error
1841 EOF
1842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1843 { (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1845 if test -z "$ac_err"; then
1846 :
1847 else
1848 echo "$ac_err" >&5
1849 echo "configure: failed program was:" >&5
1850 cat conftest.$ac_ext >&5
1851 rm -rf conftest*
1852 CPP="${CC-cc} -E -traditional-cpp"
1853 cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1856 #include <assert.h>
1857 Syntax Error
1858 EOF
1859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1860 { (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1862 if test -z "$ac_err"; then
1863 :
1864 else
1865 echo "$ac_err" >&5
1866 echo "configure: failed program was:" >&5
1867 cat conftest.$ac_ext >&5
1868 rm -rf conftest*
1869 CPP="${CC-cc} -nologo -E"
1870 cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 #include <assert.h>
1874 Syntax Error
1875 EOF
1876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1877 { (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1879 if test -z "$ac_err"; then
1880 :
1881 else
1882 echo "$ac_err" >&5
1883 echo "configure: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 rm -rf conftest*
1886 CPP=/lib/cpp
1887 fi
1888 rm -f conftest*
1889 fi
1890 rm -f conftest*
1891 fi
1892 rm -f conftest*
1893 ac_cv_prog_CPP="$CPP"
1894 fi
1895 CPP="$ac_cv_prog_CPP"
1896 else
1897 ac_cv_prog_CPP="$CPP"
1898 fi
1899 echo "$ac_t""$CPP" 1>&6
1900
1901 missing_dir=`cd $ac_aux_dir && pwd`
1902 for ac_prog in flex lex
1903 do
1904 # Extract the first word of "$ac_prog", so it can be a program name with args.
1905 set dummy $ac_prog; ac_word=$2
1906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_word" >&5
1908 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911 if test -n "$LEX"; then
1912 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1913 else
1914 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1915 ac_dummy="$PATH"
1916 for ac_dir in $ac_dummy; do
1917 test -z "$ac_dir" && ac_dir=.
1918 if test -f $ac_dir/$ac_word; then
1919 ac_cv_prog_LEX="$ac_prog"
1920 break
1921 fi
1922 done
1923 IFS="$ac_save_ifs"
1924 fi
1925 fi
1926 LEX="$ac_cv_prog_LEX"
1927 if test -n "$LEX"; then
1928 echo "$ac_t""$LEX" 1>&6
1929 else
1930 echo "$ac_t""no" 1>&6
1931 fi
1932
1933 test -n "$LEX" && break
1934 done
1935 test -n "$LEX" || LEX=""$missing_dir/missing flex""
1936
1937 # Extract the first word of "flex", so it can be a program name with args.
1938 set dummy flex; ac_word=$2
1939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_word" >&5
1941 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944 if test -n "$LEX"; then
1945 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1946 else
1947 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1948 ac_dummy="$PATH"
1949 for ac_dir in $ac_dummy; do
1950 test -z "$ac_dir" && ac_dir=.
1951 if test -f $ac_dir/$ac_word; then
1952 ac_cv_prog_LEX="flex"
1953 break
1954 fi
1955 done
1956 IFS="$ac_save_ifs"
1957 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1958 fi
1959 fi
1960 LEX="$ac_cv_prog_LEX"
1961 if test -n "$LEX"; then
1962 echo "$ac_t""$LEX" 1>&6
1963 else
1964 echo "$ac_t""no" 1>&6
1965 fi
1966
1967 if test -z "$LEXLIB"
1968 then
1969 case "$LEX" in
1970 flex*) ac_lib=fl ;;
1971 *) ac_lib=l ;;
1972 esac
1973 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1974 echo "configure:1975: checking for yywrap in -l$ac_lib" >&5
1975 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1977 echo $ac_n "(cached) $ac_c" 1>&6
1978 else
1979 ac_save_LIBS="$LIBS"
1980 LIBS="-l$ac_lib $LIBS"
1981 cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984 /* Override any gcc2 internal prototype to avoid an error. */
1985 /* We use char because int might match the return type of a gcc2
1986 builtin and then its argument prototype would still apply. */
1987 char yywrap();
1988
1989 int main() {
1990 yywrap()
1991 ; return 0; }
1992 EOF
1993 if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1994 rm -rf conftest*
1995 eval "ac_cv_lib_$ac_lib_var=yes"
1996 else
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
1999 rm -rf conftest*
2000 eval "ac_cv_lib_$ac_lib_var=no"
2001 fi
2002 rm -f conftest*
2003 LIBS="$ac_save_LIBS"
2004
2005 fi
2006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2007 echo "$ac_t""yes" 1>&6
2008 LEXLIB="-l$ac_lib"
2009 else
2010 echo "$ac_t""no" 1>&6
2011 fi
2012
2013 fi
2014
2015 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2016 echo "configure:2017: checking lex output file root" >&5
2017 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2018 echo $ac_n "(cached) $ac_c" 1>&6
2019 else
2020 # The minimal lex program is just a single line: %%. But some broken lexes
2021 # (Solaris, I think it was) want two %% lines, so accommodate them.
2022 echo '%%
2023 %%' | $LEX
2024 if test -f lex.yy.c; then
2025 ac_cv_prog_lex_root=lex.yy
2026 elif test -f lexyy.c; then
2027 ac_cv_prog_lex_root=lexyy
2028 else
2029 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2030 fi
2031 fi
2032
2033 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2034 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2035
2036 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether yytext is a pointer" >&5
2038 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2039 echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041 # POSIX says lex can declare yytext either as a pointer or an array; the
2042 # default is implementation-dependent. Figure out which it is, since
2043 # not all implementations provide the %pointer and %array declarations.
2044 ac_cv_prog_lex_yytext_pointer=no
2045 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2046 ac_save_LIBS="$LIBS"
2047 LIBS="$LIBS $LEXLIB"
2048 cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051 `cat $LEX_OUTPUT_ROOT.c`
2052 int main() {
2053
2054 ; return 0; }
2055 EOF
2056 if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2057 rm -rf conftest*
2058 ac_cv_prog_lex_yytext_pointer=yes
2059 else
2060 echo "configure: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 fi
2063 rm -f conftest*
2064 LIBS="$ac_save_LIBS"
2065 rm -f "${LEX_OUTPUT_ROOT}.c"
2066
2067 fi
2068
2069 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2070 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2071 cat >> confdefs.h <<\EOF
2072 #define YYTEXT_POINTER 1
2073 EOF
2074
2075 fi
2076
2077
2078 ALL_LINGUAS=
2079 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2080 echo "configure:2081: checking for POSIXized ISC" >&5
2081 if test -d /etc/conf/kconfig.d &&
2082 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2083 then
2084 echo "$ac_t""yes" 1>&6
2085 ISC=yes # If later tests want to check for ISC.
2086 cat >> confdefs.h <<\EOF
2087 #define _POSIX_SOURCE 1
2088 EOF
2089
2090 if test "$GCC" = yes; then
2091 CC="$CC -posix"
2092 else
2093 CC="$CC -Xp"
2094 fi
2095 else
2096 echo "$ac_t""no" 1>&6
2097 ISC=
2098 fi
2099
2100 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2101 echo "configure:2102: checking for ANSI C header files" >&5
2102 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105 cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <stdlib.h>
2109 #include <stdarg.h>
2110 #include <string.h>
2111 #include <float.h>
2112 EOF
2113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2114 { (eval echo configure:2115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2116 if test -z "$ac_err"; then
2117 rm -rf conftest*
2118 ac_cv_header_stdc=yes
2119 else
2120 echo "$ac_err" >&5
2121 echo "configure: failed program was:" >&5
2122 cat conftest.$ac_ext >&5
2123 rm -rf conftest*
2124 ac_cv_header_stdc=no
2125 fi
2126 rm -f conftest*
2127
2128 if test $ac_cv_header_stdc = yes; then
2129 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2130 cat > conftest.$ac_ext <<EOF
2131 #line 2132 "configure"
2132 #include "confdefs.h"
2133 #include <string.h>
2134 EOF
2135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2136 egrep "memchr" >/dev/null 2>&1; then
2137 :
2138 else
2139 rm -rf conftest*
2140 ac_cv_header_stdc=no
2141 fi
2142 rm -f conftest*
2143
2144 fi
2145
2146 if test $ac_cv_header_stdc = yes; then
2147 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2148 cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 #include <stdlib.h>
2152 EOF
2153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2154 egrep "free" >/dev/null 2>&1; then
2155 :
2156 else
2157 rm -rf conftest*
2158 ac_cv_header_stdc=no
2159 fi
2160 rm -f conftest*
2161
2162 fi
2163
2164 if test $ac_cv_header_stdc = yes; then
2165 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2166 if test "$cross_compiling" = yes; then
2167 :
2168 else
2169 cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172 #include <ctype.h>
2173 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2174 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2175 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2176 int main () { int i; for (i = 0; i < 256; i++)
2177 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2178 exit (0); }
2179
2180 EOF
2181 if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2182 then
2183 :
2184 else
2185 echo "configure: failed program was:" >&5
2186 cat conftest.$ac_ext >&5
2187 rm -fr conftest*
2188 ac_cv_header_stdc=no
2189 fi
2190 rm -fr conftest*
2191 fi
2192
2193 fi
2194 fi
2195
2196 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2197 if test $ac_cv_header_stdc = yes; then
2198 cat >> confdefs.h <<\EOF
2199 #define STDC_HEADERS 1
2200 EOF
2201
2202 fi
2203
2204 echo $ac_n "checking for working const""... $ac_c" 1>&6
2205 echo "configure:2206: checking for working const" >&5
2206 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2208 else
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212
2213 int main() {
2214
2215 /* Ultrix mips cc rejects this. */
2216 typedef int charset[2]; const charset x;
2217 /* SunOS 4.1.1 cc rejects this. */
2218 char const *const *ccp;
2219 char **p;
2220 /* NEC SVR4.0.2 mips cc rejects this. */
2221 struct point {int x, y;};
2222 static struct point const zero = {0,0};
2223 /* AIX XL C 1.02.0.0 rejects this.
2224 It does not let you subtract one const X* pointer from another in an arm
2225 of an if-expression whose if-part is not a constant expression */
2226 const char *g = "string";
2227 ccp = &g + (g ? g-g : 0);
2228 /* HPUX 7.0 cc rejects these. */
2229 ++ccp;
2230 p = (char**) ccp;
2231 ccp = (char const *const *) p;
2232 { /* SCO 3.2v4 cc rejects this. */
2233 char *t;
2234 char const *s = 0 ? (char *) 0 : (char const *) 0;
2235
2236 *t++ = 0;
2237 }
2238 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2239 int x[] = {25, 17};
2240 const int *foo = &x[0];
2241 ++foo;
2242 }
2243 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2244 typedef const int *iptr;
2245 iptr p = 0;
2246 ++p;
2247 }
2248 { /* AIX XL C 1.02.0.0 rejects this saying
2249 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2250 struct s { int j; const int *ap[3]; };
2251 struct s *b; b->j = 5;
2252 }
2253 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2254 const int foo = 10;
2255 }
2256
2257 ; return 0; }
2258 EOF
2259 if { (eval echo configure:2260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2260 rm -rf conftest*
2261 ac_cv_c_const=yes
2262 else
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2265 rm -rf conftest*
2266 ac_cv_c_const=no
2267 fi
2268 rm -f conftest*
2269 fi
2270
2271 echo "$ac_t""$ac_cv_c_const" 1>&6
2272 if test $ac_cv_c_const = no; then
2273 cat >> confdefs.h <<\EOF
2274 #define const
2275 EOF
2276
2277 fi
2278
2279 echo $ac_n "checking for inline""... $ac_c" 1>&6
2280 echo "configure:2281: checking for inline" >&5
2281 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2283 else
2284 ac_cv_c_inline=no
2285 for ac_kw in inline __inline__ __inline; do
2286 cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289
2290 int main() {
2291 } $ac_kw foo() {
2292 ; return 0; }
2293 EOF
2294 if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2295 rm -rf conftest*
2296 ac_cv_c_inline=$ac_kw; break
2297 else
2298 echo "configure: failed program was:" >&5
2299 cat conftest.$ac_ext >&5
2300 fi
2301 rm -f conftest*
2302 done
2303
2304 fi
2305
2306 echo "$ac_t""$ac_cv_c_inline" 1>&6
2307 case "$ac_cv_c_inline" in
2308 inline | yes) ;;
2309 no) cat >> confdefs.h <<\EOF
2310 #define inline
2311 EOF
2312 ;;
2313 *) cat >> confdefs.h <<EOF
2314 #define inline $ac_cv_c_inline
2315 EOF
2316 ;;
2317 esac
2318
2319 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2320 echo "configure:2321: checking for off_t" >&5
2321 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2322 echo $ac_n "(cached) $ac_c" 1>&6
2323 else
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <sys/types.h>
2328 #if STDC_HEADERS
2329 #include <stdlib.h>
2330 #include <stddef.h>
2331 #endif
2332 EOF
2333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2335 rm -rf conftest*
2336 ac_cv_type_off_t=yes
2337 else
2338 rm -rf conftest*
2339 ac_cv_type_off_t=no
2340 fi
2341 rm -f conftest*
2342
2343 fi
2344 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2345 if test $ac_cv_type_off_t = no; then
2346 cat >> confdefs.h <<\EOF
2347 #define off_t long
2348 EOF
2349
2350 fi
2351
2352 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2353 echo "configure:2354: checking for size_t" >&5
2354 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357 cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 #include <sys/types.h>
2361 #if STDC_HEADERS
2362 #include <stdlib.h>
2363 #include <stddef.h>
2364 #endif
2365 EOF
2366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2367 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2368 rm -rf conftest*
2369 ac_cv_type_size_t=yes
2370 else
2371 rm -rf conftest*
2372 ac_cv_type_size_t=no
2373 fi
2374 rm -f conftest*
2375
2376 fi
2377 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2378 if test $ac_cv_type_size_t = no; then
2379 cat >> confdefs.h <<\EOF
2380 #define size_t unsigned
2381 EOF
2382
2383 fi
2384
2385 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2386 # for constant arguments. Useless!
2387 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2388 echo "configure:2389: checking for working alloca.h" >&5
2389 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2390 echo $ac_n "(cached) $ac_c" 1>&6
2391 else
2392 cat > conftest.$ac_ext <<EOF
2393 #line 2394 "configure"
2394 #include "confdefs.h"
2395 #include <alloca.h>
2396 int main() {
2397 char *p = alloca(2 * sizeof(int));
2398 ; return 0; }
2399 EOF
2400 if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2401 rm -rf conftest*
2402 ac_cv_header_alloca_h=yes
2403 else
2404 echo "configure: failed program was:" >&5
2405 cat conftest.$ac_ext >&5
2406 rm -rf conftest*
2407 ac_cv_header_alloca_h=no
2408 fi
2409 rm -f conftest*
2410 fi
2411
2412 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2413 if test $ac_cv_header_alloca_h = yes; then
2414 cat >> confdefs.h <<\EOF
2415 #define HAVE_ALLOCA_H 1
2416 EOF
2417
2418 fi
2419
2420 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2421 echo "configure:2422: checking for alloca" >&5
2422 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425 cat > conftest.$ac_ext <<EOF
2426 #line 2427 "configure"
2427 #include "confdefs.h"
2428
2429 #ifdef __GNUC__
2430 # define alloca __builtin_alloca
2431 #else
2432 # ifdef _MSC_VER
2433 # include <malloc.h>
2434 # define alloca _alloca
2435 # else
2436 # if HAVE_ALLOCA_H
2437 # include <alloca.h>
2438 # else
2439 # ifdef _AIX
2440 #pragma alloca
2441 # else
2442 # ifndef alloca /* predefined by HP cc +Olibcalls */
2443 char *alloca ();
2444 # endif
2445 # endif
2446 # endif
2447 # endif
2448 #endif
2449
2450 int main() {
2451 char *p = (char *) alloca(1);
2452 ; return 0; }
2453 EOF
2454 if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2455 rm -rf conftest*
2456 ac_cv_func_alloca_works=yes
2457 else
2458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -rf conftest*
2461 ac_cv_func_alloca_works=no
2462 fi
2463 rm -f conftest*
2464 fi
2465
2466 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2467 if test $ac_cv_func_alloca_works = yes; then
2468 cat >> confdefs.h <<\EOF
2469 #define HAVE_ALLOCA 1
2470 EOF
2471
2472 fi
2473
2474 if test $ac_cv_func_alloca_works = no; then
2475 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2476 # that cause trouble. Some versions do not even contain alloca or
2477 # contain a buggy version. If you still want to use their alloca,
2478 # use ar to extract alloca.o from them instead of compiling alloca.c.
2479 ALLOCA=alloca.${ac_objext}
2480 cat >> confdefs.h <<\EOF
2481 #define C_ALLOCA 1
2482 EOF
2483
2484
2485 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2486 echo "configure:2487: checking whether alloca needs Cray hooks" >&5
2487 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2488 echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490 cat > conftest.$ac_ext <<EOF
2491 #line 2492 "configure"
2492 #include "confdefs.h"
2493 #if defined(CRAY) && ! defined(CRAY2)
2494 webecray
2495 #else
2496 wenotbecray
2497 #endif
2498
2499 EOF
2500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2501 egrep "webecray" >/dev/null 2>&1; then
2502 rm -rf conftest*
2503 ac_cv_os_cray=yes
2504 else
2505 rm -rf conftest*
2506 ac_cv_os_cray=no
2507 fi
2508 rm -f conftest*
2509
2510 fi
2511
2512 echo "$ac_t""$ac_cv_os_cray" 1>&6
2513 if test $ac_cv_os_cray = yes; then
2514 for ac_func in _getb67 GETB67 getb67; do
2515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_func" >&5
2517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2518 echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520 cat > conftest.$ac_ext <<EOF
2521 #line 2522 "configure"
2522 #include "confdefs.h"
2523 /* System header to define __stub macros and hopefully few prototypes,
2524 which can conflict with char $ac_func(); below. */
2525 #include <assert.h>
2526 /* Override any gcc2 internal prototype to avoid an error. */
2527 /* We use char because int might match the return type of a gcc2
2528 builtin and then its argument prototype would still apply. */
2529 char $ac_func();
2530
2531 int main() {
2532
2533 /* The GNU C library defines this for functions which it implements
2534 to always fail with ENOSYS. Some functions are actually named
2535 something starting with __ and the normal name is an alias. */
2536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2537 choke me
2538 #else
2539 $ac_func();
2540 #endif
2541
2542 ; return 0; }
2543 EOF
2544 if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2545 rm -rf conftest*
2546 eval "ac_cv_func_$ac_func=yes"
2547 else
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -rf conftest*
2551 eval "ac_cv_func_$ac_func=no"
2552 fi
2553 rm -f conftest*
2554 fi
2555
2556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2557 echo "$ac_t""yes" 1>&6
2558 cat >> confdefs.h <<EOF
2559 #define CRAY_STACKSEG_END $ac_func
2560 EOF
2561
2562 break
2563 else
2564 echo "$ac_t""no" 1>&6
2565 fi
2566
2567 done
2568 fi
2569
2570 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2571 echo "configure:2572: checking stack direction for C alloca" >&5
2572 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575 if test "$cross_compiling" = yes; then
2576 ac_cv_c_stack_direction=0
2577 else
2578 cat > conftest.$ac_ext <<EOF
2579 #line 2580 "configure"
2580 #include "confdefs.h"
2581 find_stack_direction ()
2582 {
2583 static char *addr = 0;
2584 auto char dummy;
2585 if (addr == 0)
2586 {
2587 addr = &dummy;
2588 return find_stack_direction ();
2589 }
2590 else
2591 return (&dummy > addr) ? 1 : -1;
2592 }
2593 main ()
2594 {
2595 exit (find_stack_direction() < 0);
2596 }
2597 EOF
2598 if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2599 then
2600 ac_cv_c_stack_direction=1
2601 else
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2604 rm -fr conftest*
2605 ac_cv_c_stack_direction=-1
2606 fi
2607 rm -fr conftest*
2608 fi
2609
2610 fi
2611
2612 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2613 cat >> confdefs.h <<EOF
2614 #define STACK_DIRECTION $ac_cv_c_stack_direction
2615 EOF
2616
2617 fi
2618
2619 for ac_hdr in unistd.h
2620 do
2621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2623 echo "configure:2624: checking for $ac_hdr" >&5
2624 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627 cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 #include <$ac_hdr>
2631 EOF
2632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2633 { (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2635 if test -z "$ac_err"; then
2636 rm -rf conftest*
2637 eval "ac_cv_header_$ac_safe=yes"
2638 else
2639 echo "$ac_err" >&5
2640 echo "configure: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 rm -rf conftest*
2643 eval "ac_cv_header_$ac_safe=no"
2644 fi
2645 rm -f conftest*
2646 fi
2647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2648 echo "$ac_t""yes" 1>&6
2649 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2650 cat >> confdefs.h <<EOF
2651 #define $ac_tr_hdr 1
2652 EOF
2653
2654 else
2655 echo "$ac_t""no" 1>&6
2656 fi
2657 done
2658
2659 for ac_func in getpagesize
2660 do
2661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2662 echo "configure:2663: checking for $ac_func" >&5
2663 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2664 echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666 cat > conftest.$ac_ext <<EOF
2667 #line 2668 "configure"
2668 #include "confdefs.h"
2669 /* System header to define __stub macros and hopefully few prototypes,
2670 which can conflict with char $ac_func(); below. */
2671 #include <assert.h>
2672 /* Override any gcc2 internal prototype to avoid an error. */
2673 /* We use char because int might match the return type of a gcc2
2674 builtin and then its argument prototype would still apply. */
2675 char $ac_func();
2676
2677 int main() {
2678
2679 /* The GNU C library defines this for functions which it implements
2680 to always fail with ENOSYS. Some functions are actually named
2681 something starting with __ and the normal name is an alias. */
2682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2683 choke me
2684 #else
2685 $ac_func();
2686 #endif
2687
2688 ; return 0; }
2689 EOF
2690 if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2691 rm -rf conftest*
2692 eval "ac_cv_func_$ac_func=yes"
2693 else
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2696 rm -rf conftest*
2697 eval "ac_cv_func_$ac_func=no"
2698 fi
2699 rm -f conftest*
2700 fi
2701
2702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2703 echo "$ac_t""yes" 1>&6
2704 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2705 cat >> confdefs.h <<EOF
2706 #define $ac_tr_func 1
2707 EOF
2708
2709 else
2710 echo "$ac_t""no" 1>&6
2711 fi
2712 done
2713
2714 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2715 echo "configure:2716: checking for working mmap" >&5
2716 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2717 echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719 if test "$cross_compiling" = yes; then
2720 ac_cv_func_mmap_fixed_mapped=no
2721 else
2722 cat > conftest.$ac_ext <<EOF
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725
2726 /* Thanks to Mike Haertel and Jim Avera for this test.
2727 Here is a matrix of mmap possibilities:
2728 mmap private not fixed
2729 mmap private fixed at somewhere currently unmapped
2730 mmap private fixed at somewhere already mapped
2731 mmap shared not fixed
2732 mmap shared fixed at somewhere currently unmapped
2733 mmap shared fixed at somewhere already mapped
2734 For private mappings, we should verify that changes cannot be read()
2735 back from the file, nor mmap's back from the file at a different
2736 address. (There have been systems where private was not correctly
2737 implemented like the infamous i386 svr4.0, and systems where the
2738 VM page cache was not coherent with the filesystem buffer cache
2739 like early versions of FreeBSD and possibly contemporary NetBSD.)
2740 For shared mappings, we should conversely verify that changes get
2741 propogated back to all the places they're supposed to be.
2742
2743 Grep wants private fixed already mapped.
2744 The main things grep needs to know about mmap are:
2745 * does it exist and is it safe to write into the mmap'd area
2746 * how to use it (BSD variants) */
2747 #include <sys/types.h>
2748 #include <fcntl.h>
2749 #include <sys/mman.h>
2750
2751 /* This mess was copied from the GNU getpagesize.h. */
2752 #ifndef HAVE_GETPAGESIZE
2753 # ifdef HAVE_UNISTD_H
2754 # include <unistd.h>
2755 # endif
2756
2757 /* Assume that all systems that can run configure have sys/param.h. */
2758 # ifndef HAVE_SYS_PARAM_H
2759 # define HAVE_SYS_PARAM_H 1
2760 # endif
2761
2762 # ifdef _SC_PAGESIZE
2763 # define getpagesize() sysconf(_SC_PAGESIZE)
2764 # else /* no _SC_PAGESIZE */
2765 # ifdef HAVE_SYS_PARAM_H
2766 # include <sys/param.h>
2767 # ifdef EXEC_PAGESIZE
2768 # define getpagesize() EXEC_PAGESIZE
2769 # else /* no EXEC_PAGESIZE */
2770 # ifdef NBPG
2771 # define getpagesize() NBPG * CLSIZE
2772 # ifndef CLSIZE
2773 # define CLSIZE 1
2774 # endif /* no CLSIZE */
2775 # else /* no NBPG */
2776 # ifdef NBPC
2777 # define getpagesize() NBPC
2778 # else /* no NBPC */
2779 # ifdef PAGESIZE
2780 # define getpagesize() PAGESIZE
2781 # endif /* PAGESIZE */
2782 # endif /* no NBPC */
2783 # endif /* no NBPG */
2784 # endif /* no EXEC_PAGESIZE */
2785 # else /* no HAVE_SYS_PARAM_H */
2786 # define getpagesize() 8192 /* punt totally */
2787 # endif /* no HAVE_SYS_PARAM_H */
2788 # endif /* no _SC_PAGESIZE */
2789
2790 #endif /* no HAVE_GETPAGESIZE */
2791
2792 #ifdef __cplusplus
2793 extern "C" { void *malloc(unsigned); }
2794 #else
2795 char *malloc();
2796 #endif
2797
2798 int
2799 main()
2800 {
2801 char *data, *data2, *data3;
2802 int i, pagesize;
2803 int fd;
2804
2805 pagesize = getpagesize();
2806
2807 /*
2808 * First, make a file with some known garbage in it.
2809 */
2810 data = malloc(pagesize);
2811 if (!data)
2812 exit(1);
2813 for (i = 0; i < pagesize; ++i)
2814 *(data + i) = rand();
2815 umask(0);
2816 fd = creat("conftestmmap", 0600);
2817 if (fd < 0)
2818 exit(1);
2819 if (write(fd, data, pagesize) != pagesize)
2820 exit(1);
2821 close(fd);
2822
2823 /*
2824 * Next, try to mmap the file at a fixed address which
2825 * already has something else allocated at it. If we can,
2826 * also make sure that we see the same garbage.
2827 */
2828 fd = open("conftestmmap", O_RDWR);
2829 if (fd < 0)
2830 exit(1);
2831 data2 = malloc(2 * pagesize);
2832 if (!data2)
2833 exit(1);
2834 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2835 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2836 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2837 exit(1);
2838 for (i = 0; i < pagesize; ++i)
2839 if (*(data + i) != *(data2 + i))
2840 exit(1);
2841
2842 /*
2843 * Finally, make sure that changes to the mapped area
2844 * do not percolate back to the file as seen by read().
2845 * (This is a bug on some variants of i386 svr4.0.)
2846 */
2847 for (i = 0; i < pagesize; ++i)
2848 *(data2 + i) = *(data2 + i) + 1;
2849 data3 = malloc(pagesize);
2850 if (!data3)
2851 exit(1);
2852 if (read(fd, data3, pagesize) != pagesize)
2853 exit(1);
2854 for (i = 0; i < pagesize; ++i)
2855 if (*(data + i) != *(data3 + i))
2856 exit(1);
2857 close(fd);
2858 unlink("conftestmmap");
2859 exit(0);
2860 }
2861
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2864 then
2865 ac_cv_func_mmap_fixed_mapped=yes
2866 else
2867 echo "configure: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 rm -fr conftest*
2870 ac_cv_func_mmap_fixed_mapped=no
2871 fi
2872 rm -fr conftest*
2873 fi
2874
2875 fi
2876
2877 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2878 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2879 cat >> confdefs.h <<\EOF
2880 #define HAVE_MMAP 1
2881 EOF
2882
2883 fi
2884
2885
2886 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2887 unistd.h values.h sys/param.h
2888 do
2889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2891 echo "configure:2892: checking for $ac_hdr" >&5
2892 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2893 echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895 cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898 #include <$ac_hdr>
2899 EOF
2900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2901 { (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2903 if test -z "$ac_err"; then
2904 rm -rf conftest*
2905 eval "ac_cv_header_$ac_safe=yes"
2906 else
2907 echo "$ac_err" >&5
2908 echo "configure: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 rm -rf conftest*
2911 eval "ac_cv_header_$ac_safe=no"
2912 fi
2913 rm -f conftest*
2914 fi
2915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2916 echo "$ac_t""yes" 1>&6
2917 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2918 cat >> confdefs.h <<EOF
2919 #define $ac_tr_hdr 1
2920 EOF
2921
2922 else
2923 echo "$ac_t""no" 1>&6
2924 fi
2925 done
2926
2927 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2928 __argz_count __argz_stringify __argz_next
2929 do
2930 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2931 echo "configure:2932: checking for $ac_func" >&5
2932 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2933 echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935 cat > conftest.$ac_ext <<EOF
2936 #line 2937 "configure"
2937 #include "confdefs.h"
2938 /* System header to define __stub macros and hopefully few prototypes,
2939 which can conflict with char $ac_func(); below. */
2940 #include <assert.h>
2941 /* Override any gcc2 internal prototype to avoid an error. */
2942 /* We use char because int might match the return type of a gcc2
2943 builtin and then its argument prototype would still apply. */
2944 char $ac_func();
2945
2946 int main() {
2947
2948 /* The GNU C library defines this for functions which it implements
2949 to always fail with ENOSYS. Some functions are actually named
2950 something starting with __ and the normal name is an alias. */
2951 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2952 choke me
2953 #else
2954 $ac_func();
2955 #endif
2956
2957 ; return 0; }
2958 EOF
2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2960 rm -rf conftest*
2961 eval "ac_cv_func_$ac_func=yes"
2962 else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 eval "ac_cv_func_$ac_func=no"
2967 fi
2968 rm -f conftest*
2969 fi
2970
2971 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2972 echo "$ac_t""yes" 1>&6
2973 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2974 cat >> confdefs.h <<EOF
2975 #define $ac_tr_func 1
2976 EOF
2977
2978 else
2979 echo "$ac_t""no" 1>&6
2980 fi
2981 done
2982
2983
2984 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2985 for ac_func in stpcpy
2986 do
2987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2988 echo "configure:2989: checking for $ac_func" >&5
2989 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2990 echo $ac_n "(cached) $ac_c" 1>&6
2991 else
2992 cat > conftest.$ac_ext <<EOF
2993 #line 2994 "configure"
2994 #include "confdefs.h"
2995 /* System header to define __stub macros and hopefully few prototypes,
2996 which can conflict with char $ac_func(); below. */
2997 #include <assert.h>
2998 /* Override any gcc2 internal prototype to avoid an error. */
2999 /* We use char because int might match the return type of a gcc2
3000 builtin and then its argument prototype would still apply. */
3001 char $ac_func();
3002
3003 int main() {
3004
3005 /* The GNU C library defines this for functions which it implements
3006 to always fail with ENOSYS. Some functions are actually named
3007 something starting with __ and the normal name is an alias. */
3008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3009 choke me
3010 #else
3011 $ac_func();
3012 #endif
3013
3014 ; return 0; }
3015 EOF
3016 if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3017 rm -rf conftest*
3018 eval "ac_cv_func_$ac_func=yes"
3019 else
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3022 rm -rf conftest*
3023 eval "ac_cv_func_$ac_func=no"
3024 fi
3025 rm -f conftest*
3026 fi
3027
3028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3029 echo "$ac_t""yes" 1>&6
3030 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3031 cat >> confdefs.h <<EOF
3032 #define $ac_tr_func 1
3033 EOF
3034
3035 else
3036 echo "$ac_t""no" 1>&6
3037 fi
3038 done
3039
3040 fi
3041 if test "${ac_cv_func_stpcpy}" = "yes"; then
3042 cat >> confdefs.h <<\EOF
3043 #define HAVE_STPCPY 1
3044 EOF
3045
3046 fi
3047
3048 if test $ac_cv_header_locale_h = yes; then
3049 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3050 echo "configure:3051: checking for LC_MESSAGES" >&5
3051 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3052 echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054 cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 #include <locale.h>
3058 int main() {
3059 return LC_MESSAGES
3060 ; return 0; }
3061 EOF
3062 if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3063 rm -rf conftest*
3064 am_cv_val_LC_MESSAGES=yes
3065 else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 rm -rf conftest*
3069 am_cv_val_LC_MESSAGES=no
3070 fi
3071 rm -f conftest*
3072 fi
3073
3074 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3075 if test $am_cv_val_LC_MESSAGES = yes; then
3076 cat >> confdefs.h <<\EOF
3077 #define HAVE_LC_MESSAGES 1
3078 EOF
3079
3080 fi
3081 fi
3082 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3083 echo "configure:3084: checking whether NLS is requested" >&5
3084 # Check whether --enable-nls or --disable-nls was given.
3085 if test "${enable_nls+set}" = set; then
3086 enableval="$enable_nls"
3087 USE_NLS=$enableval
3088 else
3089 USE_NLS=yes
3090 fi
3091
3092 echo "$ac_t""$USE_NLS" 1>&6
3093
3094
3095 USE_INCLUDED_LIBINTL=no
3096
3097 if test "$USE_NLS" = "yes"; then
3098 cat >> confdefs.h <<\EOF
3099 #define ENABLE_NLS 1
3100 EOF
3101
3102 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3103 echo "configure:3104: checking whether included gettext is requested" >&5
3104 # Check whether --with-included-gettext or --without-included-gettext was given.
3105 if test "${with_included_gettext+set}" = set; then
3106 withval="$with_included_gettext"
3107 nls_cv_force_use_gnu_gettext=$withval
3108 else
3109 nls_cv_force_use_gnu_gettext=no
3110 fi
3111
3112 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3113
3114 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3115 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3116 nls_cv_header_intl=
3117 nls_cv_header_libgt=
3118 CATOBJEXT=NONE
3119
3120 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3121 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3122 echo "configure:3123: checking for libintl.h" >&5
3123 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3124 echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126 cat > conftest.$ac_ext <<EOF
3127 #line 3128 "configure"
3128 #include "confdefs.h"
3129 #include <libintl.h>
3130 EOF
3131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3132 { (eval echo configure:3133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3134 if test -z "$ac_err"; then
3135 rm -rf conftest*
3136 eval "ac_cv_header_$ac_safe=yes"
3137 else
3138 echo "$ac_err" >&5
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3141 rm -rf conftest*
3142 eval "ac_cv_header_$ac_safe=no"
3143 fi
3144 rm -f conftest*
3145 fi
3146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3147 echo "$ac_t""yes" 1>&6
3148 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3149 echo "configure:3150: checking for gettext in libc" >&5
3150 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153 cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156 #include <libintl.h>
3157 int main() {
3158 return (int) gettext ("")
3159 ; return 0; }
3160 EOF
3161 if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3162 rm -rf conftest*
3163 gt_cv_func_gettext_libc=yes
3164 else
3165 echo "configure: failed program was:" >&5
3166 cat conftest.$ac_ext >&5
3167 rm -rf conftest*
3168 gt_cv_func_gettext_libc=no
3169 fi
3170 rm -f conftest*
3171 fi
3172
3173 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3174
3175 if test "$gt_cv_func_gettext_libc" != "yes"; then
3176 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3177 echo "configure:3178: checking for bindtextdomain in -lintl" >&5
3178 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3179 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3180 echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182 ac_save_LIBS="$LIBS"
3183 LIBS="-lintl $LIBS"
3184 cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187 /* Override any gcc2 internal prototype to avoid an error. */
3188 /* We use char because int might match the return type of a gcc2
3189 builtin and then its argument prototype would still apply. */
3190 char bindtextdomain();
3191
3192 int main() {
3193 bindtextdomain()
3194 ; return 0; }
3195 EOF
3196 if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3197 rm -rf conftest*
3198 eval "ac_cv_lib_$ac_lib_var=yes"
3199 else
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3202 rm -rf conftest*
3203 eval "ac_cv_lib_$ac_lib_var=no"
3204 fi
3205 rm -f conftest*
3206 LIBS="$ac_save_LIBS"
3207
3208 fi
3209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3210 echo "$ac_t""yes" 1>&6
3211 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3212 echo "configure:3213: checking for gettext in libintl" >&5
3213 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3214 echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216 cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219
3220 int main() {
3221 return (int) gettext ("")
3222 ; return 0; }
3223 EOF
3224 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3225 rm -rf conftest*
3226 gt_cv_func_gettext_libintl=yes
3227 else
3228 echo "configure: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 rm -rf conftest*
3231 gt_cv_func_gettext_libintl=no
3232 fi
3233 rm -f conftest*
3234 fi
3235
3236 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3237 else
3238 echo "$ac_t""no" 1>&6
3239 fi
3240
3241 fi
3242
3243 if test "$gt_cv_func_gettext_libc" = "yes" \
3244 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3245 cat >> confdefs.h <<\EOF
3246 #define HAVE_GETTEXT 1
3247 EOF
3248
3249 # Extract the first word of "msgfmt", so it can be a program name with args.
3250 set dummy msgfmt; ac_word=$2
3251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3252 echo "configure:3253: checking for $ac_word" >&5
3253 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256 case "$MSGFMT" in
3257 /*)
3258 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3259 ;;
3260 *)
3261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3262 for ac_dir in $PATH; do
3263 test -z "$ac_dir" && ac_dir=.
3264 if test -f $ac_dir/$ac_word; then
3265 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3266 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3267 break
3268 fi
3269 fi
3270 done
3271 IFS="$ac_save_ifs"
3272 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3273 ;;
3274 esac
3275 fi
3276 MSGFMT="$ac_cv_path_MSGFMT"
3277 if test -n "$MSGFMT"; then
3278 echo "$ac_t""$MSGFMT" 1>&6
3279 else
3280 echo "$ac_t""no" 1>&6
3281 fi
3282 if test "$MSGFMT" != "no"; then
3283 for ac_func in dcgettext
3284 do
3285 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3286 echo "configure:3287: checking for $ac_func" >&5
3287 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3288 echo $ac_n "(cached) $ac_c" 1>&6
3289 else
3290 cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293 /* System header to define __stub macros and hopefully few prototypes,
3294 which can conflict with char $ac_func(); below. */
3295 #include <assert.h>
3296 /* Override any gcc2 internal prototype to avoid an error. */
3297 /* We use char because int might match the return type of a gcc2
3298 builtin and then its argument prototype would still apply. */
3299 char $ac_func();
3300
3301 int main() {
3302
3303 /* The GNU C library defines this for functions which it implements
3304 to always fail with ENOSYS. Some functions are actually named
3305 something starting with __ and the normal name is an alias. */
3306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3307 choke me
3308 #else
3309 $ac_func();
3310 #endif
3311
3312 ; return 0; }
3313 EOF
3314 if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3315 rm -rf conftest*
3316 eval "ac_cv_func_$ac_func=yes"
3317 else
3318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
3320 rm -rf conftest*
3321 eval "ac_cv_func_$ac_func=no"
3322 fi
3323 rm -f conftest*
3324 fi
3325
3326 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3327 echo "$ac_t""yes" 1>&6
3328 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3329 cat >> confdefs.h <<EOF
3330 #define $ac_tr_func 1
3331 EOF
3332
3333 else
3334 echo "$ac_t""no" 1>&6
3335 fi
3336 done
3337
3338 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3339 set dummy gmsgfmt; ac_word=$2
3340 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3341 echo "configure:3342: checking for $ac_word" >&5
3342 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3343 echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345 case "$GMSGFMT" in
3346 /*)
3347 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3348 ;;
3349 ?:/*)
3350 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3351 ;;
3352 *)
3353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3354 ac_dummy="$PATH"
3355 for ac_dir in $ac_dummy; do
3356 test -z "$ac_dir" && ac_dir=.
3357 if test -f $ac_dir/$ac_word; then
3358 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3359 break
3360 fi
3361 done
3362 IFS="$ac_save_ifs"
3363 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3364 ;;
3365 esac
3366 fi
3367 GMSGFMT="$ac_cv_path_GMSGFMT"
3368 if test -n "$GMSGFMT"; then
3369 echo "$ac_t""$GMSGFMT" 1>&6
3370 else
3371 echo "$ac_t""no" 1>&6
3372 fi
3373
3374 # Extract the first word of "xgettext", so it can be a program name with args.
3375 set dummy xgettext; ac_word=$2
3376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3377 echo "configure:3378: checking for $ac_word" >&5
3378 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3379 echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381 case "$XGETTEXT" in
3382 /*)
3383 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3384 ;;
3385 *)
3386 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3387 for ac_dir in $PATH; do
3388 test -z "$ac_dir" && ac_dir=.
3389 if test -f $ac_dir/$ac_word; then
3390 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3391 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3392 break
3393 fi
3394 fi
3395 done
3396 IFS="$ac_save_ifs"
3397 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3398 ;;
3399 esac
3400 fi
3401 XGETTEXT="$ac_cv_path_XGETTEXT"
3402 if test -n "$XGETTEXT"; then
3403 echo "$ac_t""$XGETTEXT" 1>&6
3404 else
3405 echo "$ac_t""no" 1>&6
3406 fi
3407
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411
3412 int main() {
3413 extern int _nl_msg_cat_cntr;
3414 return _nl_msg_cat_cntr
3415 ; return 0; }
3416 EOF
3417 if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3418 rm -rf conftest*
3419 CATOBJEXT=.gmo
3420 DATADIRNAME=share
3421 else
3422 echo "configure: failed program was:" >&5
3423 cat conftest.$ac_ext >&5
3424 rm -rf conftest*
3425 CATOBJEXT=.mo
3426 DATADIRNAME=lib
3427 fi
3428 rm -f conftest*
3429 INSTOBJEXT=.mo
3430 fi
3431 fi
3432
3433 else
3434 echo "$ac_t""no" 1>&6
3435 fi
3436
3437
3438
3439 if test "$CATOBJEXT" = "NONE"; then
3440 nls_cv_use_gnu_gettext=yes
3441 fi
3442 fi
3443
3444 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3445 INTLOBJS="\$(GETTOBJS)"
3446 # Extract the first word of "msgfmt", so it can be a program name with args.
3447 set dummy msgfmt; ac_word=$2
3448 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3449 echo "configure:3450: checking for $ac_word" >&5
3450 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3451 echo $ac_n "(cached) $ac_c" 1>&6
3452 else
3453 case "$MSGFMT" in
3454 /*)
3455 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3456 ;;
3457 *)
3458 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3459 for ac_dir in $PATH; do
3460 test -z "$ac_dir" && ac_dir=.
3461 if test -f $ac_dir/$ac_word; then
3462 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3463 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3464 break
3465 fi
3466 fi
3467 done
3468 IFS="$ac_save_ifs"
3469 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3470 ;;
3471 esac
3472 fi
3473 MSGFMT="$ac_cv_path_MSGFMT"
3474 if test -n "$MSGFMT"; then
3475 echo "$ac_t""$MSGFMT" 1>&6
3476 else
3477 echo "$ac_t""no" 1>&6
3478 fi
3479
3480 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3481 set dummy gmsgfmt; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3485 echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487 case "$GMSGFMT" in
3488 /*)
3489 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3490 ;;
3491 ?:/*)
3492 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3493 ;;
3494 *)
3495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3496 ac_dummy="$PATH"
3497 for ac_dir in $ac_dummy; do
3498 test -z "$ac_dir" && ac_dir=.
3499 if test -f $ac_dir/$ac_word; then
3500 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3501 break
3502 fi
3503 done
3504 IFS="$ac_save_ifs"
3505 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3506 ;;
3507 esac
3508 fi
3509 GMSGFMT="$ac_cv_path_GMSGFMT"
3510 if test -n "$GMSGFMT"; then
3511 echo "$ac_t""$GMSGFMT" 1>&6
3512 else
3513 echo "$ac_t""no" 1>&6
3514 fi
3515
3516 # Extract the first word of "xgettext", so it can be a program name with args.
3517 set dummy xgettext; ac_word=$2
3518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3519 echo "configure:3520: checking for $ac_word" >&5
3520 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523 case "$XGETTEXT" in
3524 /*)
3525 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3526 ;;
3527 *)
3528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3529 for ac_dir in $PATH; do
3530 test -z "$ac_dir" && ac_dir=.
3531 if test -f $ac_dir/$ac_word; then
3532 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3533 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3534 break
3535 fi
3536 fi
3537 done
3538 IFS="$ac_save_ifs"
3539 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3540 ;;
3541 esac
3542 fi
3543 XGETTEXT="$ac_cv_path_XGETTEXT"
3544 if test -n "$XGETTEXT"; then
3545 echo "$ac_t""$XGETTEXT" 1>&6
3546 else
3547 echo "$ac_t""no" 1>&6
3548 fi
3549
3550
3551 USE_INCLUDED_LIBINTL=yes
3552 CATOBJEXT=.gmo
3553 INSTOBJEXT=.mo
3554 DATADIRNAME=share
3555 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3556 INTLLIBS=$INTLDEPS
3557 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3558 nls_cv_header_intl=libintl.h
3559 nls_cv_header_libgt=libgettext.h
3560 fi
3561
3562 if test "$XGETTEXT" != ":"; then
3563 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3564 : ;
3565 else
3566 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3567 XGETTEXT=":"
3568 fi
3569 fi
3570
3571 # We need to process the po/ directory.
3572 POSUB=po
3573 else
3574 DATADIRNAME=share
3575 nls_cv_header_intl=libintl.h
3576 nls_cv_header_libgt=libgettext.h
3577 fi
3578
3579 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3580 # because some of the sources are only built for this goal.
3581 if test "$PACKAGE" = gettext; then
3582 USE_NLS=yes
3583 USE_INCLUDED_LIBINTL=yes
3584 fi
3585
3586 for lang in $ALL_LINGUAS; do
3587 GMOFILES="$GMOFILES $lang.gmo"
3588 POFILES="$POFILES $lang.po"
3589 done
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604 if test "x$CATOBJEXT" != "x"; then
3605 if test "x$ALL_LINGUAS" = "x"; then
3606 LINGUAS=
3607 else
3608 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3609 echo "configure:3610: checking for catalogs to be installed" >&5
3610 NEW_LINGUAS=
3611 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3612 case "$ALL_LINGUAS" in
3613 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3614 esac
3615 done
3616 LINGUAS=$NEW_LINGUAS
3617 echo "$ac_t""$LINGUAS" 1>&6
3618 fi
3619
3620 if test -n "$LINGUAS"; then
3621 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3622 fi
3623 fi
3624
3625 if test $ac_cv_header_locale_h = yes; then
3626 INCLUDE_LOCALE_H="#include <locale.h>"
3627 else
3628 INCLUDE_LOCALE_H="\
3629 /* The system does not provide the header <locale.h>. Take care yourself. */"
3630 fi
3631
3632
3633 if test -f $srcdir/po2tbl.sed.in; then
3634 if test "$CATOBJEXT" = ".cat"; then
3635 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3636 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3637 echo "configure:3638: checking for linux/version.h" >&5
3638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3639 echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <linux/version.h>
3645 EOF
3646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3647 { (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3649 if test -z "$ac_err"; then
3650 rm -rf conftest*
3651 eval "ac_cv_header_$ac_safe=yes"
3652 else
3653 echo "$ac_err" >&5
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 eval "ac_cv_header_$ac_safe=no"
3658 fi
3659 rm -f conftest*
3660 fi
3661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3662 echo "$ac_t""yes" 1>&6
3663 msgformat=linux
3664 else
3665 echo "$ac_t""no" 1>&6
3666 msgformat=xopen
3667 fi
3668
3669
3670 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3671 fi
3672 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3673 $srcdir/po2tbl.sed.in > po2tbl.sed
3674 fi
3675
3676 if test "$PACKAGE" = "gettext"; then
3677 GT_NO="#NO#"
3678 GT_YES=
3679 else
3680 GT_NO=
3681 GT_YES="#YES#"
3682 fi
3683
3684
3685
3686 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3687
3688
3689 l=
3690
3691
3692 if test -d $srcdir/po; then
3693 test -d po || mkdir po
3694 if test "x$srcdir" != "x."; then
3695 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3696 posrcprefix="$srcdir/"
3697 else
3698 posrcprefix="../$srcdir/"
3699 fi
3700 else
3701 posrcprefix="../"
3702 fi
3703 rm -f po/POTFILES
3704 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3705 < $srcdir/po/POTFILES.in > po/POTFILES
3706 fi
3707
3708
3709 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
3710 echo "configure:3711: checking whether to enable maintainer-specific portions of Makefiles" >&5
3711 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3712 if test "${enable_maintainer_mode+set}" = set; then
3713 enableval="$enable_maintainer_mode"
3714 USE_MAINTAINER_MODE=$enableval
3715 else
3716 USE_MAINTAINER_MODE=no
3717 fi
3718
3719 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
3720
3721
3722 if test $USE_MAINTAINER_MODE = yes; then
3723 MAINTAINER_MODE_TRUE=
3724 MAINTAINER_MODE_FALSE='#'
3725 else
3726 MAINTAINER_MODE_TRUE='#'
3727 MAINTAINER_MODE_FALSE=
3728 fi
3729 MAINT=$MAINTAINER_MODE_TRUE
3730
3731
3732 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3733 echo "configure:3734: checking for Cygwin environment" >&5
3734 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3735 echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737 cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740
3741 int main() {
3742
3743 #ifndef __CYGWIN__
3744 #define __CYGWIN__ __CYGWIN32__
3745 #endif
3746 return __CYGWIN__;
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3750 rm -rf conftest*
3751 ac_cv_cygwin=yes
3752 else
3753 echo "configure: failed program was:" >&5
3754 cat conftest.$ac_ext >&5
3755 rm -rf conftest*
3756 ac_cv_cygwin=no
3757 fi
3758 rm -f conftest*
3759 rm -f conftest*
3760 fi
3761
3762 echo "$ac_t""$ac_cv_cygwin" 1>&6
3763 CYGWIN=
3764 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3765 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3766 echo "configure:3767: checking for mingw32 environment" >&5
3767 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3768 echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773
3774 int main() {
3775 return __MINGW32__;
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3779 rm -rf conftest*
3780 ac_cv_mingw32=yes
3781 else
3782 echo "configure: failed program was:" >&5
3783 cat conftest.$ac_ext >&5
3784 rm -rf conftest*
3785 ac_cv_mingw32=no
3786 fi
3787 rm -f conftest*
3788 rm -f conftest*
3789 fi
3790
3791 echo "$ac_t""$ac_cv_mingw32" 1>&6
3792 MINGW32=
3793 test "$ac_cv_mingw32" = yes && MINGW32=yes
3794
3795
3796 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3797 echo "configure:3798: checking for executable suffix" >&5
3798 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800 else
3801 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3802 ac_cv_exeext=.exe
3803 else
3804 rm -f conftest*
3805 echo 'int main () { return 0; }' > conftest.$ac_ext
3806 ac_cv_exeext=
3807 if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3808 for file in conftest.*; do
3809 case $file in
3810 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3811 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3812 esac
3813 done
3814 else
3815 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3816 fi
3817 rm -f conftest*
3818 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3819 fi
3820 fi
3821
3822 EXEEXT=""
3823 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3824 echo "$ac_t""${ac_cv_exeext}" 1>&6
3825 ac_exeext=$EXEEXT
3826
3827 if test -n "$EXEEXT"; then
3828 cat >> confdefs.h <<\EOF
3829 #define HAVE_EXECUTABLE_SUFFIX 1
3830 EOF
3831
3832 fi
3833 cat >> confdefs.h <<EOF
3834 #define EXECUTABLE_SUFFIX "${EXEEXT}"
3835 EOF
3836
3837
3838 # host-specific stuff:
3839
3840 HDEFINES=
3841
3842 . ${srcdir}/../bfd/configure.host
3843
3844
3845 AR=${AR-ar}
3846
3847 # Extract the first word of "ranlib", so it can be a program name with args.
3848 set dummy ranlib; ac_word=$2
3849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3850 echo "configure:3851: checking for $ac_word" >&5
3851 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3852 echo $ac_n "(cached) $ac_c" 1>&6
3853 else
3854 if test -n "$RANLIB"; then
3855 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3856 else
3857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3858 ac_dummy="$PATH"
3859 for ac_dir in $ac_dummy; do
3860 test -z "$ac_dir" && ac_dir=.
3861 if test -f $ac_dir/$ac_word; then
3862 ac_cv_prog_RANLIB="ranlib"
3863 break
3864 fi
3865 done
3866 IFS="$ac_save_ifs"
3867 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3868 fi
3869 fi
3870 RANLIB="$ac_cv_prog_RANLIB"
3871 if test -n "$RANLIB"; then
3872 echo "$ac_t""$RANLIB" 1>&6
3873 else
3874 echo "$ac_t""no" 1>&6
3875 fi
3876
3877 # Find a good install program. We prefer a C program (faster),
3878 # so one script is as good as another. But avoid the broken or
3879 # incompatible versions:
3880 # SysV /etc/install, /usr/sbin/install
3881 # SunOS /usr/etc/install
3882 # IRIX /sbin/install
3883 # AIX /bin/install
3884 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3885 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3886 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3887 # ./install, which can be erroneously created by make from ./install.sh.
3888 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3889 echo "configure:3890: checking for a BSD compatible install" >&5
3890 if test -z "$INSTALL"; then
3891 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3892 echo $ac_n "(cached) $ac_c" 1>&6
3893 else
3894 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3895 for ac_dir in $PATH; do
3896 # Account for people who put trailing slashes in PATH elements.
3897 case "$ac_dir/" in
3898 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3899 *)
3900 # OSF1 and SCO ODT 3.0 have their own names for install.
3901 # Don't use installbsd from OSF since it installs stuff as root
3902 # by default.
3903 for ac_prog in ginstall scoinst install; do
3904 if test -f $ac_dir/$ac_prog; then
3905 if test $ac_prog = install &&
3906 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3907 # AIX install. It has an incompatible calling convention.
3908 :
3909 else
3910 ac_cv_path_install="$ac_dir/$ac_prog -c"
3911 break 2
3912 fi
3913 fi
3914 done
3915 ;;
3916 esac
3917 done
3918 IFS="$ac_save_IFS"
3919
3920 fi
3921 if test "${ac_cv_path_install+set}" = set; then
3922 INSTALL="$ac_cv_path_install"
3923 else
3924 # As a last resort, use the slow shell script. We don't cache a
3925 # path for INSTALL within a source directory, because that will
3926 # break other packages using the cache if that directory is
3927 # removed, or if the path is relative.
3928 INSTALL="$ac_install_sh"
3929 fi
3930 fi
3931 echo "$ac_t""$INSTALL" 1>&6
3932
3933 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3934 # It thinks the first close brace ends the variable substitution.
3935 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3936
3937 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3938
3939 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3940
3941
3942 # Put a plausible default for CC_FOR_BUILD in Makefile.
3943 if test -z "$CC_FOR_BUILD"; then
3944 if test "x$cross_compiling" = "xno"; then
3945 CC_FOR_BUILD='$(CC)'
3946 else
3947 CC_FOR_BUILD=gcc
3948 fi
3949 fi
3950
3951 # Also set EXEEXT_FOR_BUILD.
3952 if test "x$cross_compiling" = "xno"; then
3953 EXEEXT_FOR_BUILD='$(EXEEXT)'
3954 else
3955 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
3956 echo "configure:3957: checking for build system executable suffix" >&5
3957 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960 rm -f conftest*
3961 echo 'int main () { return 0; }' > conftest.c
3962 bfd_cv_build_exeext=
3963 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
3964 for file in conftest.*; do
3965 case $file in
3966 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3967 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
3968 esac
3969 done
3970 rm -f conftest*
3971 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
3972 fi
3973
3974 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
3975 EXEEXT_FOR_BUILD=""
3976 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
3977 fi
3978
3979
3980 DEMANGLER_NAME=c++filt
3981 case "${host}" in
3982 *-*-go32* | *-*-msdos*)
3983 DEMANGLER_NAME=cxxfilt
3984 esac
3985
3986
3987 for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
3988 do
3989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3991 echo "configure:3992: checking for $ac_hdr" >&5
3992 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3993 echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995 cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 #include <$ac_hdr>
3999 EOF
4000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4001 { (eval echo configure:4002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4003 if test -z "$ac_err"; then
4004 rm -rf conftest*
4005 eval "ac_cv_header_$ac_safe=yes"
4006 else
4007 echo "$ac_err" >&5
4008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
4010 rm -rf conftest*
4011 eval "ac_cv_header_$ac_safe=no"
4012 fi
4013 rm -f conftest*
4014 fi
4015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4016 echo "$ac_t""yes" 1>&6
4017 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4018 cat >> confdefs.h <<EOF
4019 #define $ac_tr_hdr 1
4020 EOF
4021
4022 else
4023 echo "$ac_t""no" 1>&6
4024 fi
4025 done
4026
4027 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4028 echo "configure:4029: checking for sys/wait.h that is POSIX.1 compatible" >&5
4029 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <sys/types.h>
4036 #include <sys/wait.h>
4037 #ifndef WEXITSTATUS
4038 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4039 #endif
4040 #ifndef WIFEXITED
4041 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4042 #endif
4043 int main() {
4044 int s;
4045 wait (&s);
4046 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4047 ; return 0; }
4048 EOF
4049 if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4050 rm -rf conftest*
4051 ac_cv_header_sys_wait_h=yes
4052 else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 rm -rf conftest*
4056 ac_cv_header_sys_wait_h=no
4057 fi
4058 rm -f conftest*
4059 fi
4060
4061 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4062 if test $ac_cv_header_sys_wait_h = yes; then
4063 cat >> confdefs.h <<\EOF
4064 #define HAVE_SYS_WAIT_H 1
4065 EOF
4066
4067 fi
4068
4069 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4070 # for constant arguments. Useless!
4071 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4072 echo "configure:4073: checking for working alloca.h" >&5
4073 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4074 echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <alloca.h>
4080 int main() {
4081 char *p = alloca(2 * sizeof(int));
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4085 rm -rf conftest*
4086 ac_cv_header_alloca_h=yes
4087 else
4088 echo "configure: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 rm -rf conftest*
4091 ac_cv_header_alloca_h=no
4092 fi
4093 rm -f conftest*
4094 fi
4095
4096 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4097 if test $ac_cv_header_alloca_h = yes; then
4098 cat >> confdefs.h <<\EOF
4099 #define HAVE_ALLOCA_H 1
4100 EOF
4101
4102 fi
4103
4104 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4105 echo "configure:4106: checking for alloca" >&5
4106 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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
4113 #ifdef __GNUC__
4114 # define alloca __builtin_alloca
4115 #else
4116 # ifdef _MSC_VER
4117 # include <malloc.h>
4118 # define alloca _alloca
4119 # else
4120 # if HAVE_ALLOCA_H
4121 # include <alloca.h>
4122 # else
4123 # ifdef _AIX
4124 #pragma alloca
4125 # else
4126 # ifndef alloca /* predefined by HP cc +Olibcalls */
4127 char *alloca ();
4128 # endif
4129 # endif
4130 # endif
4131 # endif
4132 #endif
4133
4134 int main() {
4135 char *p = (char *) alloca(1);
4136 ; return 0; }
4137 EOF
4138 if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4139 rm -rf conftest*
4140 ac_cv_func_alloca_works=yes
4141 else
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144 rm -rf conftest*
4145 ac_cv_func_alloca_works=no
4146 fi
4147 rm -f conftest*
4148 fi
4149
4150 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4151 if test $ac_cv_func_alloca_works = yes; then
4152 cat >> confdefs.h <<\EOF
4153 #define HAVE_ALLOCA 1
4154 EOF
4155
4156 fi
4157
4158 if test $ac_cv_func_alloca_works = no; then
4159 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4160 # that cause trouble. Some versions do not even contain alloca or
4161 # contain a buggy version. If you still want to use their alloca,
4162 # use ar to extract alloca.o from them instead of compiling alloca.c.
4163 ALLOCA=alloca.${ac_objext}
4164 cat >> confdefs.h <<\EOF
4165 #define C_ALLOCA 1
4166 EOF
4167
4168
4169 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4170 echo "configure:4171: checking whether alloca needs Cray hooks" >&5
4171 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4172 echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 #if defined(CRAY) && ! defined(CRAY2)
4178 webecray
4179 #else
4180 wenotbecray
4181 #endif
4182
4183 EOF
4184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4185 egrep "webecray" >/dev/null 2>&1; then
4186 rm -rf conftest*
4187 ac_cv_os_cray=yes
4188 else
4189 rm -rf conftest*
4190 ac_cv_os_cray=no
4191 fi
4192 rm -f conftest*
4193
4194 fi
4195
4196 echo "$ac_t""$ac_cv_os_cray" 1>&6
4197 if test $ac_cv_os_cray = yes; then
4198 for ac_func in _getb67 GETB67 getb67; do
4199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4200 echo "configure:4201: checking for $ac_func" >&5
4201 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204 cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 /* System header to define __stub macros and hopefully few prototypes,
4208 which can conflict with char $ac_func(); below. */
4209 #include <assert.h>
4210 /* Override any gcc2 internal prototype to avoid an error. */
4211 /* We use char because int might match the return type of a gcc2
4212 builtin and then its argument prototype would still apply. */
4213 char $ac_func();
4214
4215 int main() {
4216
4217 /* The GNU C library defines this for functions which it implements
4218 to always fail with ENOSYS. Some functions are actually named
4219 something starting with __ and the normal name is an alias. */
4220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4221 choke me
4222 #else
4223 $ac_func();
4224 #endif
4225
4226 ; return 0; }
4227 EOF
4228 if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4229 rm -rf conftest*
4230 eval "ac_cv_func_$ac_func=yes"
4231 else
4232 echo "configure: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 rm -rf conftest*
4235 eval "ac_cv_func_$ac_func=no"
4236 fi
4237 rm -f conftest*
4238 fi
4239
4240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4241 echo "$ac_t""yes" 1>&6
4242 cat >> confdefs.h <<EOF
4243 #define CRAY_STACKSEG_END $ac_func
4244 EOF
4245
4246 break
4247 else
4248 echo "$ac_t""no" 1>&6
4249 fi
4250
4251 done
4252 fi
4253
4254 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4255 echo "configure:4256: checking stack direction for C alloca" >&5
4256 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4257 echo $ac_n "(cached) $ac_c" 1>&6
4258 else
4259 if test "$cross_compiling" = yes; then
4260 ac_cv_c_stack_direction=0
4261 else
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 find_stack_direction ()
4266 {
4267 static char *addr = 0;
4268 auto char dummy;
4269 if (addr == 0)
4270 {
4271 addr = &dummy;
4272 return find_stack_direction ();
4273 }
4274 else
4275 return (&dummy > addr) ? 1 : -1;
4276 }
4277 main ()
4278 {
4279 exit (find_stack_direction() < 0);
4280 }
4281 EOF
4282 if { (eval echo configure:4283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4283 then
4284 ac_cv_c_stack_direction=1
4285 else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -fr conftest*
4289 ac_cv_c_stack_direction=-1
4290 fi
4291 rm -fr conftest*
4292 fi
4293
4294 fi
4295
4296 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4297 cat >> confdefs.h <<EOF
4298 #define STACK_DIRECTION $ac_cv_c_stack_direction
4299 EOF
4300
4301 fi
4302
4303 for ac_func in sbrk utimes
4304 do
4305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_func" >&5
4307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 /* System header to define __stub macros and hopefully few prototypes,
4314 which can conflict with char $ac_func(); below. */
4315 #include <assert.h>
4316 /* Override any gcc2 internal prototype to avoid an error. */
4317 /* We use char because int might match the return type of a gcc2
4318 builtin and then its argument prototype would still apply. */
4319 char $ac_func();
4320
4321 int main() {
4322
4323 /* The GNU C library defines this for functions which it implements
4324 to always fail with ENOSYS. Some functions are actually named
4325 something starting with __ and the normal name is an alias. */
4326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4327 choke me
4328 #else
4329 $ac_func();
4330 #endif
4331
4332 ; return 0; }
4333 EOF
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4335 rm -rf conftest*
4336 eval "ac_cv_func_$ac_func=yes"
4337 else
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4340 rm -rf conftest*
4341 eval "ac_cv_func_$ac_func=no"
4342 fi
4343 rm -f conftest*
4344 fi
4345
4346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4347 echo "$ac_t""yes" 1>&6
4348 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4349 cat >> confdefs.h <<EOF
4350 #define $ac_tr_func 1
4351 EOF
4352
4353 else
4354 echo "$ac_t""no" 1>&6
4355 fi
4356 done
4357
4358
4359 # Some systems have frexp only in -lm, not in -lc.
4360
4361 echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
4362 echo "configure:4363: checking for library containing frexp" >&5
4363 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
4364 echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366 ac_func_search_save_LIBS="$LIBS"
4367 ac_cv_search_frexp="no"
4368 cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 /* Override any gcc2 internal prototype to avoid an error. */
4372 /* We use char because int might match the return type of a gcc2
4373 builtin and then its argument prototype would still apply. */
4374 char frexp();
4375
4376 int main() {
4377 frexp()
4378 ; return 0; }
4379 EOF
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4381 rm -rf conftest*
4382 ac_cv_search_frexp="none required"
4383 else
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4386 fi
4387 rm -f conftest*
4388 test "$ac_cv_search_frexp" = "no" && for i in m; do
4389 LIBS="-l$i $ac_func_search_save_LIBS"
4390 cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 /* Override any gcc2 internal prototype to avoid an error. */
4394 /* We use char because int might match the return type of a gcc2
4395 builtin and then its argument prototype would still apply. */
4396 char frexp();
4397
4398 int main() {
4399 frexp()
4400 ; return 0; }
4401 EOF
4402 if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4403 rm -rf conftest*
4404 ac_cv_search_frexp="-l$i"
4405 break
4406 else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 fi
4410 rm -f conftest*
4411 done
4412 LIBS="$ac_func_search_save_LIBS"
4413 fi
4414
4415 echo "$ac_t""$ac_cv_search_frexp" 1>&6
4416 if test "$ac_cv_search_frexp" != "no"; then
4417 test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
4418
4419 else :
4420
4421 fi
4422
4423 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
4424 echo "configure:4425: checking for time_t in time.h" >&5
4425 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
4426 echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <time.h>
4432 int main() {
4433 time_t i;
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437 rm -rf conftest*
4438 bu_cv_decl_time_t_time_h=yes
4439 else
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 rm -rf conftest*
4443 bu_cv_decl_time_t_time_h=no
4444 fi
4445 rm -f conftest*
4446 fi
4447
4448 echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
4449 if test $bu_cv_decl_time_t_time_h = yes; then
4450 cat >> confdefs.h <<\EOF
4451 #define HAVE_TIME_T_IN_TIME_H 1
4452 EOF
4453
4454 fi
4455
4456 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
4457 echo "configure:4458: checking for time_t in sys/types.h" >&5
4458 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
4459 echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461 cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <sys/types.h>
4465 int main() {
4466 time_t i;
4467 ; return 0; }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4470 rm -rf conftest*
4471 bu_cv_decl_time_t_types_h=yes
4472 else
4473 echo "configure: failed program was:" >&5
4474 cat conftest.$ac_ext >&5
4475 rm -rf conftest*
4476 bu_cv_decl_time_t_types_h=no
4477 fi
4478 rm -f conftest*
4479 fi
4480
4481 echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
4482 if test $bu_cv_decl_time_t_types_h = yes; then
4483 cat >> confdefs.h <<\EOF
4484 #define HAVE_TIME_T_IN_TYPES_H 1
4485 EOF
4486
4487 fi
4488
4489 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
4490 # by default.
4491 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
4492 echo "configure:4493: checking for utime.h" >&5
4493 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
4494 echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 #include <sys/types.h>
4500 #ifdef HAVE_TIME_H
4501 #include <time.h>
4502 #endif
4503 #include <utime.h>
4504 int main() {
4505 struct utimbuf s;
4506 ; return 0; }
4507 EOF
4508 if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4509 rm -rf conftest*
4510 bu_cv_header_utime_h=yes
4511 else
4512 echo "configure: failed program was:" >&5
4513 cat conftest.$ac_ext >&5
4514 rm -rf conftest*
4515 bu_cv_header_utime_h=no
4516 fi
4517 rm -f conftest*
4518 fi
4519
4520 echo "$ac_t""$bu_cv_header_utime_h" 1>&6
4521 if test $bu_cv_header_utime_h = yes; then
4522 cat >> confdefs.h <<\EOF
4523 #define HAVE_GOOD_UTIME_H 1
4524 EOF
4525
4526 fi
4527
4528 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether fprintf must be declared" >&5
4530 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536
4537 #include <stdio.h>
4538 #ifdef HAVE_STRING_H
4539 #include <string.h>
4540 #else
4541 #ifdef HAVE_STRINGS_H
4542 #include <strings.h>
4543 #endif
4544 #endif
4545 #ifdef HAVE_STDLIB_H
4546 #include <stdlib.h>
4547 #endif
4548 #ifdef HAVE_UNISTD_H
4549 #include <unistd.h>
4550 #endif
4551 int main() {
4552 char *(*pfn) = (char *(*)) fprintf
4553 ; return 0; }
4554 EOF
4555 if { (eval echo configure:4556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4556 rm -rf conftest*
4557 bfd_cv_decl_needed_fprintf=no
4558 else
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 bfd_cv_decl_needed_fprintf=yes
4563 fi
4564 rm -f conftest*
4565 fi
4566
4567 echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
4568 if test $bfd_cv_decl_needed_fprintf = yes; then
4569 cat >> confdefs.h <<\EOF
4570 #define NEED_DECLARATION_FPRINTF 1
4571 EOF
4572
4573 fi
4574
4575 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4576 echo "configure:4577: checking whether strstr must be declared" >&5
4577 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583
4584 #include <stdio.h>
4585 #ifdef HAVE_STRING_H
4586 #include <string.h>
4587 #else
4588 #ifdef HAVE_STRINGS_H
4589 #include <strings.h>
4590 #endif
4591 #endif
4592 #ifdef HAVE_STDLIB_H
4593 #include <stdlib.h>
4594 #endif
4595 #ifdef HAVE_UNISTD_H
4596 #include <unistd.h>
4597 #endif
4598 int main() {
4599 char *(*pfn) = (char *(*)) strstr
4600 ; return 0; }
4601 EOF
4602 if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4603 rm -rf conftest*
4604 bfd_cv_decl_needed_strstr=no
4605 else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 bfd_cv_decl_needed_strstr=yes
4610 fi
4611 rm -f conftest*
4612 fi
4613
4614 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4615 if test $bfd_cv_decl_needed_strstr = yes; then
4616 cat >> confdefs.h <<\EOF
4617 #define NEED_DECLARATION_STRSTR 1
4618 EOF
4619
4620 fi
4621
4622 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
4623 echo "configure:4624: checking whether sbrk must be declared" >&5
4624 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4625 echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630
4631 #include <stdio.h>
4632 #ifdef HAVE_STRING_H
4633 #include <string.h>
4634 #else
4635 #ifdef HAVE_STRINGS_H
4636 #include <strings.h>
4637 #endif
4638 #endif
4639 #ifdef HAVE_STDLIB_H
4640 #include <stdlib.h>
4641 #endif
4642 #ifdef HAVE_UNISTD_H
4643 #include <unistd.h>
4644 #endif
4645 int main() {
4646 char *(*pfn) = (char *(*)) sbrk
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4650 rm -rf conftest*
4651 bfd_cv_decl_needed_sbrk=no
4652 else
4653 echo "configure: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 rm -rf conftest*
4656 bfd_cv_decl_needed_sbrk=yes
4657 fi
4658 rm -f conftest*
4659 fi
4660
4661 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4662 if test $bfd_cv_decl_needed_sbrk = yes; then
4663 cat >> confdefs.h <<\EOF
4664 #define NEED_DECLARATION_SBRK 1
4665 EOF
4666
4667 fi
4668
4669 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4670 echo "configure:4671: checking whether getenv must be declared" >&5
4671 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4672 echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677
4678 #include <stdio.h>
4679 #ifdef HAVE_STRING_H
4680 #include <string.h>
4681 #else
4682 #ifdef HAVE_STRINGS_H
4683 #include <strings.h>
4684 #endif
4685 #endif
4686 #ifdef HAVE_STDLIB_H
4687 #include <stdlib.h>
4688 #endif
4689 #ifdef HAVE_UNISTD_H
4690 #include <unistd.h>
4691 #endif
4692 int main() {
4693 char *(*pfn) = (char *(*)) getenv
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4697 rm -rf conftest*
4698 bfd_cv_decl_needed_getenv=no
4699 else
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -rf conftest*
4703 bfd_cv_decl_needed_getenv=yes
4704 fi
4705 rm -f conftest*
4706 fi
4707
4708 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4709 if test $bfd_cv_decl_needed_getenv = yes; then
4710 cat >> confdefs.h <<\EOF
4711 #define NEED_DECLARATION_GETENV 1
4712 EOF
4713
4714 fi
4715
4716 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
4717 echo "configure:4718: checking whether environ must be declared" >&5
4718 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
4719 echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721 cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4724
4725 #include <stdio.h>
4726 #ifdef HAVE_STRING_H
4727 #include <string.h>
4728 #else
4729 #ifdef HAVE_STRINGS_H
4730 #include <strings.h>
4731 #endif
4732 #endif
4733 #ifdef HAVE_STDLIB_H
4734 #include <stdlib.h>
4735 #endif
4736 #ifdef HAVE_UNISTD_H
4737 #include <unistd.h>
4738 #endif
4739 int main() {
4740 char *(*pfn) = (char *(*)) environ
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4744 rm -rf conftest*
4745 bfd_cv_decl_needed_environ=no
4746 else
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 rm -rf conftest*
4750 bfd_cv_decl_needed_environ=yes
4751 fi
4752 rm -f conftest*
4753 fi
4754
4755 echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
4756 if test $bfd_cv_decl_needed_environ = yes; then
4757 cat >> confdefs.h <<\EOF
4758 #define NEED_DECLARATION_ENVIRON 1
4759 EOF
4760
4761 fi
4762
4763
4764
4765 case "${host}" in
4766 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
4767 cat >> confdefs.h <<\EOF
4768 #define USE_BINARY_FOPEN 1
4769 EOF
4770 ;;
4771 esac
4772
4773 # target-specific stuff:
4774
4775 # Canonicalize the secondary target names.
4776 if test -n "$enable_targets"; then
4777 for targ in `echo $enable_targets | sed 's/,/ /g'`
4778 do
4779 result=`$ac_config_sub $targ 2>/dev/null`
4780 if test -n "$result"; then
4781 canon_targets="$canon_targets $result"
4782 else
4783 # Allow targets that config.sub doesn't recognize, like "all".
4784 canon_targets="$canon_targets $targ"
4785 fi
4786 done
4787 fi
4788
4789 all_targets=false
4790 BUILD_NLMCONV=
4791 NLMCONV_DEFS=
4792 BUILD_SRCONV=
4793 BUILD_DLLTOOL=
4794 DLLTOOL_DEFS=
4795 BUILD_WINDRES=
4796 BUILD_DLLWRAP=
4797 BUILD_MISC=
4798
4799 for targ in $target $canon_targets
4800 do
4801 if test "x$targ" = "xall"; then
4802 all_targets=true
4803 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4804 BUILD_SRCONV='$(SRCONV_PROG)'
4805 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
4806 else
4807 case $targ in
4808 i[3456]86*-*-netware*)
4809 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4810 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
4811 ;;
4812 alpha*-*-netware*)
4813 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4814 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
4815 ;;
4816 powerpc*-*-netware*)
4817 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4818 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
4819 ;;
4820 sparc*-*-netware*)
4821 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4822 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
4823 ;;
4824 esac
4825 case $targ in
4826 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
4827 esac
4828 case $targ in
4829 arm-*pe* | arm-*-wince)
4830 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4831 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4832 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4833 ;;
4834 thumb-*pe*)
4835 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4836 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4837 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4838 ;;
4839 i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
4840 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4841 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4842 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4843 BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
4844 ;;
4845 i3-686-*-interix)
4846 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
4847 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4848 ;;
4849 powerpc*-*-*pe* | powerpc*-*-cygwin*)
4850 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4851 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
4852 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4853 ;;
4854 sh*-*-*pe)
4855 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4856 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
4857 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4858 ;;
4859 mips*-*-*pe)
4860 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4861 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
4862 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4863 ;;
4864 mcore-*pe)
4865 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4866 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
4867 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4868 ;;
4869 mcore-*elf)
4870 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4871 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
4872 ;;
4873 esac
4874 fi
4875 done
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886 cat >> confdefs.h <<EOF
4887 #define TARGET "${target}"
4888 EOF
4889
4890
4891 targ=$target
4892 . $srcdir/../bfd/config.bfd
4893 if test "x$targ_underscore" = "xyes"; then
4894 UNDERSCORE=1
4895 else
4896 UNDERSCORE=0
4897 fi
4898
4899
4900 trap '' 1 2 15
4901 cat > confcache <<\EOF
4902 # This file is a shell script that caches the results of configure
4903 # tests run on this system so they can be shared between configure
4904 # scripts and configure runs. It is not useful on other systems.
4905 # If it contains results you don't want to keep, you may remove or edit it.
4906 #
4907 # By default, configure uses ./config.cache as the cache file,
4908 # creating it if it does not exist already. You can give configure
4909 # the --cache-file=FILE option to use a different cache file; that is
4910 # what configure does when it calls configure scripts in
4911 # subdirectories, so they share the cache.
4912 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4913 # config.status only pays attention to the cache file if you give it the
4914 # --recheck option to rerun configure.
4915 #
4916 EOF
4917 # The following way of writing the cache mishandles newlines in values,
4918 # but we know of no workaround that is simple, portable, and efficient.
4919 # So, don't put newlines in cache variables' values.
4920 # Ultrix sh set writes to stderr and can't be redirected directly,
4921 # and sets the high bit in the cache file unless we assign to the vars.
4922 (set) 2>&1 |
4923 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4924 *ac_space=\ *)
4925 # `set' does not quote correctly, so add quotes (double-quote substitution
4926 # turns \\\\ into \\, and sed turns \\ into \).
4927 sed -n \
4928 -e "s/'/'\\\\''/g" \
4929 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4930 ;;
4931 *)
4932 # `set' quotes correctly as required by POSIX, so do not add quotes.
4933 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4934 ;;
4935 esac >> confcache
4936 if cmp -s $cache_file confcache; then
4937 :
4938 else
4939 if test -w $cache_file; then
4940 echo "updating cache $cache_file"
4941 cat confcache > $cache_file
4942 else
4943 echo "not updating unwritable cache $cache_file"
4944 fi
4945 fi
4946 rm -f confcache
4947
4948 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4949
4950 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4951 # Let make expand exec_prefix.
4952 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4953
4954 # Any assignment to VPATH causes Sun make to only execute
4955 # the first set of double-colon rules, so remove it if not needed.
4956 # If there is a colon in the path, we need to keep it.
4957 if test "x$srcdir" = x.; then
4958 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4959 fi
4960
4961 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4962
4963 DEFS=-DHAVE_CONFIG_H
4964
4965 # Without the "./", some shells look in PATH for config.status.
4966 : ${CONFIG_STATUS=./config.status}
4967
4968 echo creating $CONFIG_STATUS
4969 rm -f $CONFIG_STATUS
4970 cat > $CONFIG_STATUS <<EOF
4971 #! /bin/sh
4972 # Generated automatically by configure.
4973 # Run this file to recreate the current configuration.
4974 # This directory was configured as follows,
4975 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4976 #
4977 # $0 $ac_configure_args
4978 #
4979 # Compiler output produced by configure, useful for debugging
4980 # configure, is in ./config.log if it exists.
4981
4982 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4983 for ac_option
4984 do
4985 case "\$ac_option" in
4986 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4987 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4988 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4989 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4990 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4991 exit 0 ;;
4992 -help | --help | --hel | --he | --h)
4993 echo "\$ac_cs_usage"; exit 0 ;;
4994 *) echo "\$ac_cs_usage"; exit 1 ;;
4995 esac
4996 done
4997
4998 ac_given_srcdir=$srcdir
4999 ac_given_INSTALL="$INSTALL"
5000
5001 trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5002 EOF
5003 cat >> $CONFIG_STATUS <<EOF
5004
5005 # Protect against being on the right side of a sed subst in config.status.
5006 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5007 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5008 $ac_vpsub
5009 $extrasub
5010 s%@SHELL@%$SHELL%g
5011 s%@CFLAGS@%$CFLAGS%g
5012 s%@CPPFLAGS@%$CPPFLAGS%g
5013 s%@CXXFLAGS@%$CXXFLAGS%g
5014 s%@FFLAGS@%$FFLAGS%g
5015 s%@DEFS@%$DEFS%g
5016 s%@LDFLAGS@%$LDFLAGS%g
5017 s%@LIBS@%$LIBS%g
5018 s%@exec_prefix@%$exec_prefix%g
5019 s%@prefix@%$prefix%g
5020 s%@program_transform_name@%$program_transform_name%g
5021 s%@bindir@%$bindir%g
5022 s%@sbindir@%$sbindir%g
5023 s%@libexecdir@%$libexecdir%g
5024 s%@datadir@%$datadir%g
5025 s%@sysconfdir@%$sysconfdir%g
5026 s%@sharedstatedir@%$sharedstatedir%g
5027 s%@localstatedir@%$localstatedir%g
5028 s%@libdir@%$libdir%g
5029 s%@includedir@%$includedir%g
5030 s%@oldincludedir@%$oldincludedir%g
5031 s%@infodir@%$infodir%g
5032 s%@mandir@%$mandir%g
5033 s%@host@%$host%g
5034 s%@host_alias@%$host_alias%g
5035 s%@host_cpu@%$host_cpu%g
5036 s%@host_vendor@%$host_vendor%g
5037 s%@host_os@%$host_os%g
5038 s%@target@%$target%g
5039 s%@target_alias@%$target_alias%g
5040 s%@target_cpu@%$target_cpu%g
5041 s%@target_vendor@%$target_vendor%g
5042 s%@target_os@%$target_os%g
5043 s%@build@%$build%g
5044 s%@build_alias@%$build_alias%g
5045 s%@build_cpu@%$build_cpu%g
5046 s%@build_vendor@%$build_vendor%g
5047 s%@build_os@%$build_os%g
5048 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5049 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5050 s%@INSTALL_DATA@%$INSTALL_DATA%g
5051 s%@PACKAGE@%$PACKAGE%g
5052 s%@VERSION@%$VERSION%g
5053 s%@ACLOCAL@%$ACLOCAL%g
5054 s%@AUTOCONF@%$AUTOCONF%g
5055 s%@AUTOMAKE@%$AUTOMAKE%g
5056 s%@AUTOHEADER@%$AUTOHEADER%g
5057 s%@MAKEINFO@%$MAKEINFO%g
5058 s%@SET_MAKE@%$SET_MAKE%g
5059 s%@RANLIB@%$RANLIB%g
5060 s%@CC@%$CC%g
5061 s%@LN_S@%$LN_S%g
5062 s%@LIBTOOL@%$LIBTOOL%g
5063 s%@YACC@%$YACC%g
5064 s%@LEX@%$LEX%g
5065 s%@LEXLIB@%$LEXLIB%g
5066 s%@CPP@%$CPP%g
5067 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5068 s%@ALLOCA@%$ALLOCA%g
5069 s%@USE_NLS@%$USE_NLS%g
5070 s%@MSGFMT@%$MSGFMT%g
5071 s%@GMSGFMT@%$GMSGFMT%g
5072 s%@XGETTEXT@%$XGETTEXT%g
5073 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5074 s%@CATALOGS@%$CATALOGS%g
5075 s%@CATOBJEXT@%$CATOBJEXT%g
5076 s%@DATADIRNAME@%$DATADIRNAME%g
5077 s%@GMOFILES@%$GMOFILES%g
5078 s%@INSTOBJEXT@%$INSTOBJEXT%g
5079 s%@INTLDEPS@%$INTLDEPS%g
5080 s%@INTLLIBS@%$INTLLIBS%g
5081 s%@INTLOBJS@%$INTLOBJS%g
5082 s%@POFILES@%$POFILES%g
5083 s%@POSUB@%$POSUB%g
5084 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5085 s%@GT_NO@%$GT_NO%g
5086 s%@GT_YES@%$GT_YES%g
5087 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5088 s%@l@%$l%g
5089 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5090 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5091 s%@MAINT@%$MAINT%g
5092 s%@EXEEXT@%$EXEEXT%g
5093 s%@HDEFINES@%$HDEFINES%g
5094 s%@AR@%$AR%g
5095 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5096 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5097 s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
5098 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5099 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5100 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5101 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5102 s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5103 s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5104 s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5105 s%@BUILD_MISC@%$BUILD_MISC%g
5106 s%@UNDERSCORE@%$UNDERSCORE%g
5107
5108 CEOF
5109 EOF
5110
5111 cat >> $CONFIG_STATUS <<\EOF
5112
5113 # Split the substitutions into bite-sized pieces for seds with
5114 # small command number limits, like on Digital OSF/1 and HP-UX.
5115 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5116 ac_file=1 # Number of current file.
5117 ac_beg=1 # First line for current file.
5118 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5119 ac_more_lines=:
5120 ac_sed_cmds=""
5121 while $ac_more_lines; do
5122 if test $ac_beg -gt 1; then
5123 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5124 else
5125 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5126 fi
5127 if test ! -s conftest.s$ac_file; then
5128 ac_more_lines=false
5129 rm -f conftest.s$ac_file
5130 else
5131 if test -z "$ac_sed_cmds"; then
5132 ac_sed_cmds="sed -f conftest.s$ac_file"
5133 else
5134 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5135 fi
5136 ac_file=`expr $ac_file + 1`
5137 ac_beg=$ac_end
5138 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5139 fi
5140 done
5141 if test -z "$ac_sed_cmds"; then
5142 ac_sed_cmds=cat
5143 fi
5144 EOF
5145
5146 cat >> $CONFIG_STATUS <<EOF
5147
5148 CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5149 EOF
5150 cat >> $CONFIG_STATUS <<\EOF
5151 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5152 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5153 case "$ac_file" in
5154 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5155 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5156 *) ac_file_in="${ac_file}.in" ;;
5157 esac
5158
5159 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5160
5161 # Remove last slash and all that follows it. Not all systems have dirname.
5162 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5163 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5164 # The file is in a subdirectory.
5165 test ! -d "$ac_dir" && mkdir "$ac_dir"
5166 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5167 # A "../" for each directory in $ac_dir_suffix.
5168 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5169 else
5170 ac_dir_suffix= ac_dots=
5171 fi
5172
5173 case "$ac_given_srcdir" in
5174 .) srcdir=.
5175 if test -z "$ac_dots"; then top_srcdir=.
5176 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5177 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5178 *) # Relative path.
5179 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5180 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5181 esac
5182
5183 case "$ac_given_INSTALL" in
5184 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5185 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5186 esac
5187
5188 echo creating "$ac_file"
5189 rm -f "$ac_file"
5190 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5191 case "$ac_file" in
5192 *Makefile*) ac_comsub="1i\\
5193 # $configure_input" ;;
5194 *) ac_comsub= ;;
5195 esac
5196
5197 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5198 sed -e "$ac_comsub
5199 s%@configure_input@%$configure_input%g
5200 s%@srcdir@%$srcdir%g
5201 s%@top_srcdir@%$top_srcdir%g
5202 s%@INSTALL@%$INSTALL%g
5203 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5204 fi; done
5205 rm -f conftest.s*
5206
5207 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5208 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5209 #
5210 # ac_d sets the value in "#define NAME VALUE" lines.
5211 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5212 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5213 ac_dC='\3'
5214 ac_dD='%g'
5215 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5216 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5217 ac_uB='\([ ]\)%\1#\2define\3'
5218 ac_uC=' '
5219 ac_uD='\4%g'
5220 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5221 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5222 ac_eB='$%\1#\2define\3'
5223 ac_eC=' '
5224 ac_eD='%g'
5225
5226 if test "${CONFIG_HEADERS+set}" != set; then
5227 EOF
5228 cat >> $CONFIG_STATUS <<EOF
5229 CONFIG_HEADERS="config.h:config.in"
5230 EOF
5231 cat >> $CONFIG_STATUS <<\EOF
5232 fi
5233 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5234 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5235 case "$ac_file" in
5236 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5237 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5238 *) ac_file_in="${ac_file}.in" ;;
5239 esac
5240
5241 echo creating $ac_file
5242
5243 rm -f conftest.frag conftest.in conftest.out
5244 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5245 cat $ac_file_inputs > conftest.in
5246
5247 EOF
5248
5249 # Transform confdefs.h into a sed script conftest.vals that substitutes
5250 # the proper values into config.h.in to produce config.h. And first:
5251 # Protect against being on the right side of a sed subst in config.status.
5252 # Protect against being in an unquoted here document in config.status.
5253 rm -f conftest.vals
5254 cat > conftest.hdr <<\EOF
5255 s/[\\&%]/\\&/g
5256 s%[\\$`]%\\&%g
5257 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5258 s%ac_d%ac_u%gp
5259 s%ac_u%ac_e%gp
5260 EOF
5261 sed -n -f conftest.hdr confdefs.h > conftest.vals
5262 rm -f conftest.hdr
5263
5264 # This sed command replaces #undef with comments. This is necessary, for
5265 # example, in the case of _POSIX_SOURCE, which is predefined and required
5266 # on some systems where configure will not decide to define it.
5267 cat >> conftest.vals <<\EOF
5268 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5269 EOF
5270
5271 # Break up conftest.vals because some shells have a limit on
5272 # the size of here documents, and old seds have small limits too.
5273
5274 rm -f conftest.tail
5275 while :
5276 do
5277 ac_lines=`grep -c . conftest.vals`
5278 # grep -c gives empty output for an empty file on some AIX systems.
5279 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5280 # Write a limited-size here document to conftest.frag.
5281 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5282 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5283 echo 'CEOF
5284 sed -f conftest.frag conftest.in > conftest.out
5285 rm -f conftest.in
5286 mv conftest.out conftest.in
5287 ' >> $CONFIG_STATUS
5288 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5289 rm -f conftest.vals
5290 mv conftest.tail conftest.vals
5291 done
5292 rm -f conftest.vals
5293
5294 cat >> $CONFIG_STATUS <<\EOF
5295 rm -f conftest.frag conftest.h
5296 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5297 cat conftest.in >> conftest.h
5298 rm -f conftest.in
5299 if cmp -s $ac_file conftest.h 2>/dev/null; then
5300 echo "$ac_file is unchanged"
5301 rm -f conftest.h
5302 else
5303 # Remove last slash and all that follows it. Not all systems have dirname.
5304 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5305 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5306 # The file is in a subdirectory.
5307 test ! -d "$ac_dir" && mkdir "$ac_dir"
5308 fi
5309 rm -f $ac_file
5310 mv conftest.h $ac_file
5311 fi
5312 fi; done
5313
5314 EOF
5315 cat >> $CONFIG_STATUS <<EOF
5316
5317
5318 EOF
5319 cat >> $CONFIG_STATUS <<\EOF
5320 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5321
5322 case "x$CONFIG_FILES" in
5323 *) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
5324 esac
5325
5326 exit 0
5327 EOF
5328 chmod +x $CONFIG_STATUS
5329 rm -fr confdefs* $ac_clean_files
5330 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5331
This page took 0.163311 seconds and 5 git commands to generate.