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