* mips-linux-tdep.c: Include "frame.h".
[deliverable/binutils-gdb.git] / bfd / configure
CommitLineData
252b5132 1#! /bin/sh
6be7c12c 2
252b5132 3# Guess values for system-dependent variables and create Makefiles.
6be7c12c
AO
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
252b5132
RH
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
6be7c12c
AO
10# Defaults:
11ac_help=
252b5132 12ac_default_prefix=/usr/local
6be7c12c
AO
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=no]"
16ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22ac_help="$ac_help
23 --disable-libtool-lock avoid locking (might break parallel builds)"
24ac_help="$ac_help
25 --with-pic try to use only PIC/non-PIC objects [default=use both]"
26ac_help="$ac_help
27 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
28ac_help="$ac_help
29 --enable-targets alternative target configurations"
30ac_help="$ac_help
31 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
32ac_help="$ac_help
33 --with-mmap try using mmap for BFD input files if available"
34ac_help="$ac_help
35 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
36ac_help="$ac_help
37 --enable-maintainer-mode enable make rules and dependencies not useful
38 (and sometimes confusing) to the casual installer"
a703a6ea 39ac_help="$ac_help
6a457e5c 40 --enable-install-libbfd controls installation of libbfd and related headers"
6be7c12c
AO
41ac_help="$ac_help
42 --disable-nls do not use Native Language Support"
43ac_help="$ac_help
44 --with-included-gettext use the GNU gettext library included here"
252b5132
RH
45
46# Initialize some variables set by options.
47# The variables have the same names as the options, with
48# dashes changed to underlines.
6be7c12c
AO
49build=NONE
50cache_file=./config.cache
252b5132 51exec_prefix=NONE
6be7c12c 52host=NONE
252b5132 53no_create=
6be7c12c 54nonopt=NONE
252b5132
RH
55no_recursion=
56prefix=NONE
57program_prefix=NONE
58program_suffix=NONE
59program_transform_name=s,x,x,
60silent=
61site=
4615568e 62sitefile=
252b5132 63srcdir=
6be7c12c 64target=NONE
252b5132
RH
65verbose=
66x_includes=NONE
67x_libraries=NONE
68bindir='${exec_prefix}/bin'
69sbindir='${exec_prefix}/sbin'
70libexecdir='${exec_prefix}/libexec'
71datadir='${prefix}/share'
72sysconfdir='${prefix}/etc'
73sharedstatedir='${prefix}/com'
74localstatedir='${prefix}/var'
75libdir='${exec_prefix}/lib'
76includedir='${prefix}/include'
77oldincludedir='/usr/include'
78infodir='${prefix}/info'
79mandir='${prefix}/man'
80
6be7c12c
AO
81# Initialize some other variables.
82subdirs=
83MFLAGS= MAKEFLAGS=
84SHELL=${CONFIG_SHELL-/bin/sh}
85# Maximum number of lines to put in a shell here document.
86ac_max_here_lines=12
252b5132
RH
87
88ac_prev=
89for ac_option
90do
6be7c12c 91
252b5132
RH
92 # If the previous option needs an argument, assign it.
93 if test -n "$ac_prev"; then
94 eval "$ac_prev=\$ac_option"
95 ac_prev=
96 continue
97 fi
98
6be7c12c
AO
99 case "$ac_option" in
100 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
101 *) ac_optarg= ;;
102 esac
252b5132
RH
103
104 # Accept the important Cygnus configure options, so we can diagnose typos.
105
6be7c12c 106 case "$ac_option" in
252b5132
RH
107
108 -bindir | --bindir | --bindi | --bind | --bin | --bi)
109 ac_prev=bindir ;;
110 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6be7c12c 111 bindir="$ac_optarg" ;;
252b5132
RH
112
113 -build | --build | --buil | --bui | --bu)
6be7c12c 114 ac_prev=build ;;
252b5132 115 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6be7c12c 116 build="$ac_optarg" ;;
252b5132
RH
117
118 -cache-file | --cache-file | --cache-fil | --cache-fi \
119 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
120 ac_prev=cache_file ;;
121 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
122 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6be7c12c 123 cache_file="$ac_optarg" ;;
252b5132
RH
124
125 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
126 ac_prev=datadir ;;
127 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
128 | --da=*)
6be7c12c 129 datadir="$ac_optarg" ;;
252b5132
RH
130
131 -disable-* | --disable-*)
6be7c12c 132 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
252b5132 133 # Reject names that are not valid shell variable names.
6be7c12c
AO
134 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
135 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 fi
137 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
138 eval "enable_${ac_feature}=no" ;;
252b5132
RH
139
140 -enable-* | --enable-*)
6be7c12c 141 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
252b5132 142 # Reject names that are not valid shell variable names.
6be7c12c
AO
143 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
144 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145 fi
146 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
147 case "$ac_option" in
148 *=*) ;;
252b5132
RH
149 *) ac_optarg=yes ;;
150 esac
6be7c12c 151 eval "enable_${ac_feature}='$ac_optarg'" ;;
252b5132
RH
152
153 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
154 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
155 | --exec | --exe | --ex)
156 ac_prev=exec_prefix ;;
157 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
158 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
159 | --exec=* | --exe=* | --ex=*)
6be7c12c 160 exec_prefix="$ac_optarg" ;;
252b5132
RH
161
162 -gas | --gas | --ga | --g)
163 # Obsolete; use --with-gas.
164 with_gas=yes ;;
165
6be7c12c
AO
166 -help | --help | --hel | --he)
167 # Omit some internal or obsolete options to make the list less imposing.
168 # This message is too long to be a string in the A/UX 3.1 sh.
169 cat << EOF
170Usage: configure [options] [host]
171Options: [defaults in brackets after descriptions]
172Configuration:
173 --cache-file=FILE cache test results in FILE
174 --help print this message
175 --no-create do not create output files
176 --quiet, --silent do not print \`checking...' messages
4615568e 177 --site-file=FILE use FILE as the site file
6be7c12c
AO
178 --version print the version of autoconf that created configure
179Directory and file names:
180 --prefix=PREFIX install architecture-independent files in PREFIX
181 [$ac_default_prefix]
182 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
183 [same as prefix]
184 --bindir=DIR user executables in DIR [EPREFIX/bin]
185 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
186 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
187 --datadir=DIR read-only architecture-independent data in DIR
188 [PREFIX/share]
189 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
190 --sharedstatedir=DIR modifiable architecture-independent data in DIR
191 [PREFIX/com]
192 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
193 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
194 --includedir=DIR C header files in DIR [PREFIX/include]
195 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
196 --infodir=DIR info documentation in DIR [PREFIX/info]
197 --mandir=DIR man documentation in DIR [PREFIX/man]
198 --srcdir=DIR find the sources in DIR [configure dir or ..]
199 --program-prefix=PREFIX prepend PREFIX to installed program names
200 --program-suffix=SUFFIX append SUFFIX to installed program names
201 --program-transform-name=PROGRAM
202 run sed PROGRAM on installed program names
203EOF
204 cat << EOF
205Host type:
206 --build=BUILD configure for building on BUILD [BUILD=HOST]
207 --host=HOST configure for HOST [guessed]
208 --target=TARGET configure for TARGET [TARGET=HOST]
209Features and packages:
210 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
211 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
212 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
213 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
214 --x-includes=DIR X include files are in DIR
215 --x-libraries=DIR X library files are in DIR
216EOF
217 if test -n "$ac_help"; then
218 echo "--enable and --with options recognized:$ac_help"
219 fi
220 exit 0 ;;
252b5132
RH
221
222 -host | --host | --hos | --ho)
6be7c12c 223 ac_prev=host ;;
252b5132 224 -host=* | --host=* | --hos=* | --ho=*)
6be7c12c 225 host="$ac_optarg" ;;
252b5132
RH
226
227 -includedir | --includedir | --includedi | --included | --include \
228 | --includ | --inclu | --incl | --inc)
229 ac_prev=includedir ;;
230 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
231 | --includ=* | --inclu=* | --incl=* | --inc=*)
6be7c12c 232 includedir="$ac_optarg" ;;
252b5132
RH
233
234 -infodir | --infodir | --infodi | --infod | --info | --inf)
235 ac_prev=infodir ;;
236 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6be7c12c 237 infodir="$ac_optarg" ;;
252b5132
RH
238
239 -libdir | --libdir | --libdi | --libd)
240 ac_prev=libdir ;;
241 -libdir=* | --libdir=* | --libdi=* | --libd=*)
6be7c12c 242 libdir="$ac_optarg" ;;
252b5132
RH
243
244 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
245 | --libexe | --libex | --libe)
246 ac_prev=libexecdir ;;
247 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
248 | --libexe=* | --libex=* | --libe=*)
6be7c12c 249 libexecdir="$ac_optarg" ;;
252b5132
RH
250
251 -localstatedir | --localstatedir | --localstatedi | --localstated \
252 | --localstate | --localstat | --localsta | --localst \
253 | --locals | --local | --loca | --loc | --lo)
254 ac_prev=localstatedir ;;
255 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
256 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
257 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
6be7c12c 258 localstatedir="$ac_optarg" ;;
252b5132
RH
259
260 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
261 ac_prev=mandir ;;
262 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6be7c12c 263 mandir="$ac_optarg" ;;
252b5132
RH
264
265 -nfp | --nfp | --nf)
266 # Obsolete; use --without-fp.
267 with_fp=no ;;
268
269 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
270 | --no-cr | --no-c)
271 no_create=yes ;;
272
273 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
274 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
275 no_recursion=yes ;;
276
277 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
278 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
279 | --oldin | --oldi | --old | --ol | --o)
280 ac_prev=oldincludedir ;;
281 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
282 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
283 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
6be7c12c 284 oldincludedir="$ac_optarg" ;;
252b5132
RH
285
286 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
287 ac_prev=prefix ;;
288 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6be7c12c 289 prefix="$ac_optarg" ;;
252b5132
RH
290
291 -program-prefix | --program-prefix | --program-prefi | --program-pref \
292 | --program-pre | --program-pr | --program-p)
293 ac_prev=program_prefix ;;
294 -program-prefix=* | --program-prefix=* | --program-prefi=* \
295 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
6be7c12c 296 program_prefix="$ac_optarg" ;;
252b5132
RH
297
298 -program-suffix | --program-suffix | --program-suffi | --program-suff \
299 | --program-suf | --program-su | --program-s)
300 ac_prev=program_suffix ;;
301 -program-suffix=* | --program-suffix=* | --program-suffi=* \
302 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
6be7c12c 303 program_suffix="$ac_optarg" ;;
252b5132
RH
304
305 -program-transform-name | --program-transform-name \
306 | --program-transform-nam | --program-transform-na \
307 | --program-transform-n | --program-transform- \
308 | --program-transform | --program-transfor \
309 | --program-transfo | --program-transf \
310 | --program-trans | --program-tran \
311 | --progr-tra | --program-tr | --program-t)
312 ac_prev=program_transform_name ;;
313 -program-transform-name=* | --program-transform-name=* \
314 | --program-transform-nam=* | --program-transform-na=* \
315 | --program-transform-n=* | --program-transform-=* \
316 | --program-transform=* | --program-transfor=* \
317 | --program-transfo=* | --program-transf=* \
318 | --program-trans=* | --program-tran=* \
319 | --progr-tra=* | --program-tr=* | --program-t=*)
6be7c12c 320 program_transform_name="$ac_optarg" ;;
252b5132
RH
321
322 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
323 | -silent | --silent | --silen | --sile | --sil)
324 silent=yes ;;
325
326 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
327 ac_prev=sbindir ;;
328 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
329 | --sbi=* | --sb=*)
6be7c12c 330 sbindir="$ac_optarg" ;;
252b5132
RH
331
332 -sharedstatedir | --sharedstatedir | --sharedstatedi \
333 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
334 | --sharedst | --shareds | --shared | --share | --shar \
335 | --sha | --sh)
336 ac_prev=sharedstatedir ;;
337 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
338 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
339 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
340 | --sha=* | --sh=*)
6be7c12c 341 sharedstatedir="$ac_optarg" ;;
252b5132
RH
342
343 -site | --site | --sit)
344 ac_prev=site ;;
345 -site=* | --site=* | --sit=*)
6be7c12c
AO
346 site="$ac_optarg" ;;
347
4615568e
NC
348 -site-file | --site-file | --site-fil | --site-fi | --site-f)
349 ac_prev=sitefile ;;
350 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
351 sitefile="$ac_optarg" ;;
352
252b5132
RH
353 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
354 ac_prev=srcdir ;;
355 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6be7c12c 356 srcdir="$ac_optarg" ;;
252b5132
RH
357
358 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
359 | --syscon | --sysco | --sysc | --sys | --sy)
360 ac_prev=sysconfdir ;;
361 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
362 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
6be7c12c 363 sysconfdir="$ac_optarg" ;;
252b5132
RH
364
365 -target | --target | --targe | --targ | --tar | --ta | --t)
6be7c12c 366 ac_prev=target ;;
252b5132 367 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6be7c12c 368 target="$ac_optarg" ;;
252b5132
RH
369
370 -v | -verbose | --verbose | --verbos | --verbo | --verb)
371 verbose=yes ;;
372
6be7c12c
AO
373 -version | --version | --versio | --versi | --vers)
374 echo "configure generated by autoconf version 2.13"
375 exit 0 ;;
252b5132
RH
376
377 -with-* | --with-*)
6be7c12c 378 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
252b5132 379 # Reject names that are not valid shell variable names.
6be7c12c
AO
380 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382 fi
252b5132 383 ac_package=`echo $ac_package| sed 's/-/_/g'`
6be7c12c
AO
384 case "$ac_option" in
385 *=*) ;;
252b5132
RH
386 *) ac_optarg=yes ;;
387 esac
6be7c12c 388 eval "with_${ac_package}='$ac_optarg'" ;;
252b5132
RH
389
390 -without-* | --without-*)
6be7c12c 391 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
252b5132 392 # Reject names that are not valid shell variable names.
6be7c12c
AO
393 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 eval "with_${ac_package}=no" ;;
252b5132
RH
398
399 --x)
400 # Obsolete; use --with-x.
401 with_x=yes ;;
402
403 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
404 | --x-incl | --x-inc | --x-in | --x-i)
405 ac_prev=x_includes ;;
406 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
407 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
6be7c12c 408 x_includes="$ac_optarg" ;;
252b5132
RH
409
410 -x-libraries | --x-libraries | --x-librarie | --x-librari \
411 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
412 ac_prev=x_libraries ;;
413 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
414 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
6be7c12c 415 x_libraries="$ac_optarg" ;;
252b5132 416
6be7c12c 417 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
252b5132
RH
418 ;;
419
420 *)
6be7c12c
AO
421 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
422 echo "configure: warning: $ac_option: invalid host type" 1>&2
423 fi
424 if test "x$nonopt" != xNONE; then
425 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
426 fi
427 nonopt="$ac_option"
252b5132
RH
428 ;;
429
430 esac
431done
432
433if test -n "$ac_prev"; then
6be7c12c
AO
434 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
435fi
436
437trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
438
439# File descriptor usage:
440# 0 standard input
441# 1 file creation
442# 2 errors and warnings
443# 3 some systems may open it to /dev/tty
444# 4 used on the Kubota Titan
445# 6 checking for... messages and results
446# 5 compiler messages saved in config.log
447if test "$silent" = yes; then
448 exec 6>/dev/null
449else
450 exec 6>&1
252b5132 451fi
6be7c12c 452exec 5>./config.log
252b5132 453
6be7c12c
AO
454echo "\
455This file contains any messages produced by compilers while
456running configure, to aid debugging if configure makes a mistake.
457" 1>&5
458
459# Strip out --no-create and --no-recursion so they do not pile up.
460# Also quote any args containing shell metacharacters.
461ac_configure_args=
462for ac_arg
252b5132 463do
6be7c12c
AO
464 case "$ac_arg" in
465 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
466 | --no-cr | --no-c) ;;
467 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
468 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
469 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
470 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
471 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
252b5132
RH
472 esac
473done
474
6be7c12c
AO
475# NLS nuisances.
476# Only set these to C if already set. These must not be set unconditionally
477# because not all systems understand e.g. LANG=C (notably SCO).
478# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
479# Non-C LC_CTYPE values break the ctype check.
480if test "${LANG+set}" = set; then LANG=C; export LANG; fi
481if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
482if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
483if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
252b5132 484
6be7c12c
AO
485# confdefs.h avoids OS command line length limits that DEFS can exceed.
486rm -rf conftest* confdefs.h
487# AIX cpp loses on an empty file, so make sure it contains at least a newline.
488echo > confdefs.h
252b5132 489
6be7c12c
AO
490# A filename unique to this package, relative to the directory that
491# configure is in, which we can look for to find out if srcdir is correct.
492ac_unique_file=libbfd.c
252b5132
RH
493
494# Find the source files, if location was not specified.
495if test -z "$srcdir"; then
496 ac_srcdir_defaulted=yes
497 # Try the directory containing this script, then its parent.
498 ac_prog=$0
6be7c12c 499 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
252b5132
RH
500 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
501 srcdir=$ac_confdir
502 if test ! -r $srcdir/$ac_unique_file; then
503 srcdir=..
504 fi
505else
506 ac_srcdir_defaulted=no
507fi
508if test ! -r $srcdir/$ac_unique_file; then
509 if test "$ac_srcdir_defaulted" = yes; then
6be7c12c 510 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
252b5132 511 else
6be7c12c 512 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
252b5132
RH
513 fi
514fi
6be7c12c 515srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
b3baf5d0 516
6be7c12c 517# Prefer explicitly selected file to automatically selected ones.
4615568e
NC
518if test -z "$sitefile"; then
519 if test -z "$CONFIG_SITE"; then
520 if test "x$prefix" != xNONE; then
521 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
522 else
523 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
524 fi
252b5132 525 fi
4615568e
NC
526else
527 CONFIG_SITE="$sitefile"
252b5132
RH
528fi
529for ac_site_file in $CONFIG_SITE; do
530 if test -r "$ac_site_file"; then
6be7c12c 531 echo "loading site script $ac_site_file"
252b5132
RH
532 . "$ac_site_file"
533 fi
534done
535
536if test -r "$cache_file"; then
6be7c12c
AO
537 echo "loading cache $cache_file"
538 . $cache_file
252b5132 539else
6be7c12c
AO
540 echo "creating cache $cache_file"
541 > $cache_file
252b5132
RH
542fi
543
544ac_ext=c
6be7c12c 545# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
252b5132 546ac_cpp='$CPP $CPPFLAGS'
6be7c12c
AO
547ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
548ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
549cross_compiling=$ac_cv_prog_cc_cross
550
551ac_exeext=
552ac_objext=o
553if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556 ac_n= ac_c='
557' ac_t=' '
558 else
559 ac_n=-n ac_c= ac_t=
560 fi
561else
562 ac_n= ac_c='\c' ac_t=
563fi
564
565echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4615568e 566echo "configure:567: checking for Cygwin environment" >&5
6be7c12c
AO
567if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
568 echo $ac_n "(cached) $ac_c" 1>&6
569else
570 cat > conftest.$ac_ext <<EOF
4615568e 571#line 572 "configure"
6be7c12c
AO
572#include "confdefs.h"
573
574int main() {
575
576#ifndef __CYGWIN__
577#define __CYGWIN__ __CYGWIN32__
578#endif
579return __CYGWIN__;
580; return 0; }
581EOF
4615568e 582if { (eval echo configure:583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
583 rm -rf conftest*
584 ac_cv_cygwin=yes
585else
586 echo "configure: failed program was:" >&5
587 cat conftest.$ac_ext >&5
588 rm -rf conftest*
589 ac_cv_cygwin=no
590fi
591rm -f conftest*
592rm -f conftest*
593fi
594
595echo "$ac_t""$ac_cv_cygwin" 1>&6
596CYGWIN=
597test "$ac_cv_cygwin" = yes && CYGWIN=yes
598echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4615568e 599echo "configure:600: checking for mingw32 environment" >&5
6be7c12c
AO
600if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
601 echo $ac_n "(cached) $ac_c" 1>&6
602else
603 cat > conftest.$ac_ext <<EOF
4615568e 604#line 605 "configure"
6be7c12c
AO
605#include "confdefs.h"
606
607int main() {
608return __MINGW32__;
609; return 0; }
610EOF
4615568e 611if { (eval echo configure:612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
612 rm -rf conftest*
613 ac_cv_mingw32=yes
ac48eca1 614else
6be7c12c
AO
615 echo "configure: failed program was:" >&5
616 cat conftest.$ac_ext >&5
617 rm -rf conftest*
618 ac_cv_mingw32=no
619fi
620rm -f conftest*
621rm -f conftest*
ac48eca1 622fi
6be7c12c
AO
623
624echo "$ac_t""$ac_cv_mingw32" 1>&6
625MINGW32=
626test "$ac_cv_mingw32" = yes && MINGW32=yes
627
252b5132
RH
628
629ac_aux_dir=
630for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
631 if test -f $ac_dir/install-sh; then
632 ac_aux_dir=$ac_dir
633 ac_install_sh="$ac_aux_dir/install-sh -c"
634 break
635 elif test -f $ac_dir/install.sh; then
636 ac_aux_dir=$ac_dir
637 ac_install_sh="$ac_aux_dir/install.sh -c"
638 break
639 fi
640done
641if test -z "$ac_aux_dir"; then
6be7c12c 642 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
252b5132 643fi
6be7c12c
AO
644ac_config_guess=$ac_aux_dir/config.guess
645ac_config_sub=$ac_aux_dir/config.sub
646ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
252b5132 647
6be7c12c
AO
648
649# Do some error checking and defaulting for the host and target type.
650# The inputs are:
651# configure --host=HOST --target=TARGET --build=BUILD NONOPT
652#
653# The rules are:
654# 1. You are not allowed to specify --host, --target, and nonopt at the
655# same time.
656# 2. Host defaults to nonopt.
657# 3. If nonopt is not specified, then host defaults to the current host,
658# as determined by config.guess.
659# 4. Target and build default to nonopt.
660# 5. If nonopt is not specified, then target and build default to host.
252b5132
RH
661
662# The aliases save the names the user supplied, while $host etc.
663# will get canonicalized.
6be7c12c
AO
664case $host---$target---$nonopt in
665NONE---*---* | *---NONE---* | *---*---NONE) ;;
666*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
667esac
668
669
670# Make sure we can run config.sub.
671if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
672else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
673fi
674
675echo $ac_n "checking host system type""... $ac_c" 1>&6
4615568e 676echo "configure:677: checking host system type" >&5
6be7c12c
AO
677
678host_alias=$host
679case "$host_alias" in
680NONE)
681 case $nonopt in
682 NONE)
683 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
684 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
685 fi ;;
686 *) host_alias=$nonopt ;;
687 esac ;;
688esac
689
690host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
691host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
692host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
693host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
694echo "$ac_t""$host" 1>&6
695
696echo $ac_n "checking target system type""... $ac_c" 1>&6
4615568e 697echo "configure:698: checking target system type" >&5
6be7c12c
AO
698
699target_alias=$target
700case "$target_alias" in
701NONE)
702 case $nonopt in
703 NONE) target_alias=$host_alias ;;
704 *) target_alias=$nonopt ;;
705 esac ;;
706esac
707
708target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
709target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
710target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
711target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
712echo "$ac_t""$target" 1>&6
713
714echo $ac_n "checking build system type""... $ac_c" 1>&6
4615568e 715echo "configure:716: checking build system type" >&5
6be7c12c
AO
716
717build_alias=$build
718case "$build_alias" in
719NONE)
720 case $nonopt in
721 NONE) build_alias=$host_alias ;;
722 *) build_alias=$nonopt ;;
723 esac ;;
724esac
725
726build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
727build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
728build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
729build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
730echo "$ac_t""$build" 1>&6
731
732test "$host_alias" != "$target_alias" &&
252b5132
RH
733 test "$program_prefix$program_suffix$program_transform_name" = \
734 NONENONEs,x,x, &&
735 program_prefix=${target_alias}-
6be7c12c 736
66e25bab 737
c5d1701e 738 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4615568e 739echo "configure:740: checking for strerror in -lcposix" >&5
c5d1701e
NC
740ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
741if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
66e25bab
AM
742 echo $ac_n "(cached) $ac_c" 1>&6
743else
c5d1701e
NC
744 ac_save_LIBS="$LIBS"
745LIBS="-lcposix $LIBS"
746cat > conftest.$ac_ext <<EOF
4615568e 747#line 748 "configure"
b3baf5d0 748#include "confdefs.h"
c5d1701e
NC
749/* Override any gcc2 internal prototype to avoid an error. */
750/* We use char because int might match the return type of a gcc2
751 builtin and then its argument prototype would still apply. */
752char strerror();
b3baf5d0 753
c5d1701e
NC
754int main() {
755strerror()
756; return 0; }
6be7c12c 757EOF
4615568e 758if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c5d1701e
NC
759 rm -rf conftest*
760 eval "ac_cv_lib_$ac_lib_var=yes"
b3baf5d0 761else
6be7c12c
AO
762 echo "configure: failed program was:" >&5
763 cat conftest.$ac_ext >&5
c5d1701e
NC
764 rm -rf conftest*
765 eval "ac_cv_lib_$ac_lib_var=no"
b3baf5d0 766fi
6be7c12c 767rm -f conftest*
c5d1701e 768LIBS="$ac_save_LIBS"
6be7c12c 769
b3baf5d0 770fi
c5d1701e 771if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6be7c12c 772 echo "$ac_t""yes" 1>&6
c5d1701e 773 LIBS="$LIBS -lcposix"
b3baf5d0 774else
6be7c12c 775 echo "$ac_t""no" 1>&6
b3baf5d0 776fi
252b5132 777
c5d1701e
NC
778
779
6be7c12c 780
6726e1ea 781am__api_version="1.4"
252b5132
RH
782# Find a good install program. We prefer a C program (faster),
783# so one script is as good as another. But avoid the broken or
784# incompatible versions:
785# SysV /etc/install, /usr/sbin/install
786# SunOS /usr/etc/install
787# IRIX /sbin/install
788# AIX /bin/install
789# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
790# AFS /usr/afsws/bin/install, which mishandles nonexistent args
791# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
792# ./install, which can be erroneously created by make from ./install.sh.
6be7c12c 793echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4615568e 794echo "configure:795: checking for a BSD compatible install" >&5
252b5132 795if test -z "$INSTALL"; then
6be7c12c
AO
796if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
797 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 798else
6be7c12c 799 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
252b5132
RH
800 for ac_dir in $PATH; do
801 # Account for people who put trailing slashes in PATH elements.
6be7c12c
AO
802 case "$ac_dir/" in
803 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
252b5132
RH
804 *)
805 # OSF1 and SCO ODT 3.0 have their own names for install.
806 # Don't use installbsd from OSF since it installs stuff as root
807 # by default.
808 for ac_prog in ginstall scoinst install; do
6be7c12c 809 if test -f $ac_dir/$ac_prog; then
252b5132 810 if test $ac_prog = install &&
6be7c12c 811 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
252b5132
RH
812 # AIX install. It has an incompatible calling convention.
813 :
814 else
815 ac_cv_path_install="$ac_dir/$ac_prog -c"
816 break 2
817 fi
818 fi
819 done
820 ;;
821 esac
822 done
6be7c12c 823 IFS="$ac_save_IFS"
252b5132
RH
824
825fi
826 if test "${ac_cv_path_install+set}" = set; then
6be7c12c 827 INSTALL="$ac_cv_path_install"
252b5132
RH
828 else
829 # As a last resort, use the slow shell script. We don't cache a
830 # path for INSTALL within a source directory, because that will
831 # break other packages using the cache if that directory is
832 # removed, or if the path is relative.
6be7c12c 833 INSTALL="$ac_install_sh"
252b5132
RH
834 fi
835fi
6be7c12c 836echo "$ac_t""$INSTALL" 1>&6
252b5132
RH
837
838# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
839# It thinks the first close brace ends the variable substitution.
840test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
841
6be7c12c 842test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
252b5132
RH
843
844test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
845
6be7c12c 846echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
4615568e 847echo "configure:848: checking whether build environment is sane" >&5
252b5132
RH
848# Just in case
849sleep 1
850echo timestamp > conftestfile
851# Do `set' in a subshell so we don't clobber the current shell's
852# arguments. Must try -L first in case configure is actually a
853# symlink; some systems play weird games with the mod time of symlinks
854# (eg FreeBSD returns the mod time of the symlink's containing
855# directory).
856if (
857 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
858 if test "$*" = "X"; then
859 # -L didn't work.
860 set X `ls -t $srcdir/configure conftestfile`
861 fi
862 if test "$*" != "X $srcdir/configure conftestfile" \
863 && test "$*" != "X conftestfile $srcdir/configure"; then
864
865 # If neither matched, then we have a broken ls. This can happen
866 # if, for instance, CONFIG_SHELL is bash and it inherits a
867 # broken ls alias from the environment. This has actually
868 # happened. Such a system could not be considered "sane".
6be7c12c
AO
869 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
870alias in your environment" 1>&2; exit 1; }
252b5132
RH
871 fi
872
873 test "$2" = conftestfile
874 )
875then
876 # Ok.
877 :
878else
6be7c12c
AO
879 { echo "configure: error: newly created file is older than distributed files!
880Check your system clock" 1>&2; exit 1; }
252b5132
RH
881fi
882rm -f conftest*
6be7c12c 883echo "$ac_t""yes" 1>&6
252b5132
RH
884if test "$program_transform_name" = s,x,x,; then
885 program_transform_name=
886else
887 # Double any \ or $. echo might interpret backslashes.
6be7c12c 888 cat <<\EOF_SED > conftestsed
252b5132 889s,\\,\\\\,g; s,\$,$$,g
6be7c12c
AO
890EOF_SED
891 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
892 rm -f conftestsed
252b5132
RH
893fi
894test "$program_prefix" != NONE &&
6be7c12c 895 program_transform_name="s,^,${program_prefix},; $program_transform_name"
252b5132
RH
896# Use a double $ so make ignores it.
897test "$program_suffix" != NONE &&
6be7c12c 898 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
252b5132
RH
899
900# sed with no file args requires a program.
6be7c12c 901test "$program_transform_name" = "" && program_transform_name="s,x,x,"
252b5132 902
6be7c12c 903echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4615568e 904echo "configure:905: checking whether ${MAKE-make} sets \${MAKE}" >&5
6be7c12c
AO
905set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
906if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
907 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 908else
6be7c12c 909 cat > conftestmake <<\EOF
252b5132
RH
910all:
911 @echo 'ac_maketemp="${MAKE}"'
912EOF
913# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6be7c12c 914eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
252b5132
RH
915if test -n "$ac_maketemp"; then
916 eval ac_cv_prog_make_${ac_make}_set=yes
917else
918 eval ac_cv_prog_make_${ac_make}_set=no
919fi
6be7c12c 920rm -f conftestmake
252b5132
RH
921fi
922if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
6be7c12c 923 echo "$ac_t""yes" 1>&6
252b5132
RH
924 SET_MAKE=
925else
6be7c12c 926 echo "$ac_t""no" 1>&6
252b5132
RH
927 SET_MAKE="MAKE=${MAKE-make}"
928fi
929
6be7c12c 930
252b5132
RH
931PACKAGE=bfd
932
fae6b768 933VERSION=2.14.90
252b5132
RH
934
935if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
6be7c12c 936 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
252b5132 937fi
6be7c12c 938cat >> confdefs.h <<EOF
252b5132
RH
939#define PACKAGE "$PACKAGE"
940EOF
941
6be7c12c 942cat >> confdefs.h <<EOF
252b5132
RH
943#define VERSION "$VERSION"
944EOF
945
6be7c12c
AO
946
947
252b5132 948missing_dir=`cd $ac_aux_dir && pwd`
6726e1ea 949echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
4615568e 950echo "configure:951: checking for working aclocal-${am__api_version}" >&5
252b5132
RH
951# Run test in a subshell; some versions of sh will print an error if
952# an executable is not found, even if stderr is redirected.
953# Redirect stdin to placate older versions of autoconf. Sigh.
6726e1ea
L
954if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
955 ACLOCAL=aclocal-${am__api_version}
6be7c12c 956 echo "$ac_t""found" 1>&6
252b5132 957else
6726e1ea 958 ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
6be7c12c 959 echo "$ac_t""missing" 1>&6
252b5132
RH
960fi
961
6be7c12c 962echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
4615568e 963echo "configure:964: checking for working autoconf" >&5
252b5132
RH
964# Run test in a subshell; some versions of sh will print an error if
965# an executable is not found, even if stderr is redirected.
966# Redirect stdin to placate older versions of autoconf. Sigh.
967if (autoconf --version) < /dev/null > /dev/null 2>&1; then
968 AUTOCONF=autoconf
6be7c12c 969 echo "$ac_t""found" 1>&6
252b5132
RH
970else
971 AUTOCONF="$missing_dir/missing autoconf"
6be7c12c 972 echo "$ac_t""missing" 1>&6
252b5132
RH
973fi
974
6726e1ea 975echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
4615568e 976echo "configure:977: checking for working automake-${am__api_version}" >&5
252b5132
RH
977# Run test in a subshell; some versions of sh will print an error if
978# an executable is not found, even if stderr is redirected.
979# Redirect stdin to placate older versions of autoconf. Sigh.
6726e1ea
L
980if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
981 AUTOMAKE=automake-${am__api_version}
6be7c12c 982 echo "$ac_t""found" 1>&6
252b5132 983else
6726e1ea 984 AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
6be7c12c 985 echo "$ac_t""missing" 1>&6
252b5132
RH
986fi
987
6be7c12c 988echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
4615568e 989echo "configure:990: checking for working autoheader" >&5
252b5132
RH
990# Run test in a subshell; some versions of sh will print an error if
991# an executable is not found, even if stderr is redirected.
992# Redirect stdin to placate older versions of autoconf. Sigh.
993if (autoheader --version) < /dev/null > /dev/null 2>&1; then
994 AUTOHEADER=autoheader
6be7c12c 995 echo "$ac_t""found" 1>&6
252b5132
RH
996else
997 AUTOHEADER="$missing_dir/missing autoheader"
6be7c12c 998 echo "$ac_t""missing" 1>&6
252b5132
RH
999fi
1000
6be7c12c 1001echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
4615568e 1002echo "configure:1003: checking for working makeinfo" >&5
252b5132
RH
1003# Run test in a subshell; some versions of sh will print an error if
1004# an executable is not found, even if stderr is redirected.
1005# Redirect stdin to placate older versions of autoconf. Sigh.
1006if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1007 MAKEINFO=makeinfo
6be7c12c 1008 echo "$ac_t""found" 1>&6
252b5132
RH
1009else
1010 MAKEINFO="$missing_dir/missing makeinfo"
6be7c12c 1011 echo "$ac_t""missing" 1>&6
252b5132
RH
1012fi
1013
6be7c12c 1014
e43d48cc
AM
1015# Uncomment the next line to remove the date from the reported bfd version
1016#is_release=y
1017
1018bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
1019
1020bfd_version_string="\"${VERSION}\""
e43d48cc 1021if test x${is_release} = x; then
6a0735ef 1022 bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
e43d48cc
AM
1023 bfd_version_string="\"${VERSION} ${bfd_version_date}\""
1024fi
1025
1026
1027
6be7c12c
AO
1028if test $host != $build; then
1029 ac_tool_prefix=${host_alias}-
1030else
1031 ac_tool_prefix=
1032fi
1033
1034# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
252b5132 1035set dummy ${ac_tool_prefix}ar; ac_word=$2
6be7c12c 1036echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1037echo "configure:1038: checking for $ac_word" >&5
6be7c12c
AO
1038if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
1040else
1041 if test -n "$AR"; then
1042 ac_cv_prog_AR="$AR" # Let the user override the test.
1043else
6be7c12c
AO
1044 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1045 ac_dummy="$PATH"
1046 for ac_dir in $ac_dummy; do
1047 test -z "$ac_dir" && ac_dir=.
1048 if test -f $ac_dir/$ac_word; then
1049 ac_cv_prog_AR="${ac_tool_prefix}ar"
1050 break
1051 fi
1052 done
1053 IFS="$ac_save_ifs"
1054 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
252b5132
RH
1055fi
1056fi
6be7c12c 1057AR="$ac_cv_prog_AR"
252b5132 1058if test -n "$AR"; then
6be7c12c 1059 echo "$ac_t""$AR" 1>&6
252b5132 1060else
6be7c12c 1061 echo "$ac_t""no" 1>&6
252b5132
RH
1062fi
1063
1064
6be7c12c
AO
1065
1066# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
252b5132 1067set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6be7c12c 1068echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1069echo "configure:1070: checking for $ac_word" >&5
6be7c12c
AO
1070if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1071 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
1072else
1073 if test -n "$RANLIB"; then
1074 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1075else
6be7c12c
AO
1076 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1077 ac_dummy="$PATH"
1078 for ac_dir in $ac_dummy; do
1079 test -z "$ac_dir" && ac_dir=.
1080 if test -f $ac_dir/$ac_word; then
1081 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1082 break
1083 fi
1084 done
1085 IFS="$ac_save_ifs"
252b5132
RH
1086fi
1087fi
6be7c12c 1088RANLIB="$ac_cv_prog_RANLIB"
252b5132 1089if test -n "$RANLIB"; then
6be7c12c 1090 echo "$ac_t""$RANLIB" 1>&6
252b5132 1091else
6be7c12c 1092 echo "$ac_t""no" 1>&6
252b5132
RH
1093fi
1094
6be7c12c 1095
252b5132 1096if test -z "$ac_cv_prog_RANLIB"; then
6be7c12c 1097if test -n "$ac_tool_prefix"; then
252b5132
RH
1098 # Extract the first word of "ranlib", so it can be a program name with args.
1099set dummy ranlib; ac_word=$2
6be7c12c 1100echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1101echo "configure:1102: checking for $ac_word" >&5
6be7c12c
AO
1102if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104else
1105 if test -n "$RANLIB"; then
1106 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1107else
1108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1109 ac_dummy="$PATH"
1110 for ac_dir in $ac_dummy; do
1111 test -z "$ac_dir" && ac_dir=.
1112 if test -f $ac_dir/$ac_word; then
1113 ac_cv_prog_RANLIB="ranlib"
1114 break
1115 fi
1116 done
1117 IFS="$ac_save_ifs"
1118 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
252b5132
RH
1119fi
1120fi
6be7c12c
AO
1121RANLIB="$ac_cv_prog_RANLIB"
1122if test -n "$RANLIB"; then
1123 echo "$ac_t""$RANLIB" 1>&6
252b5132 1124else
6be7c12c 1125 echo "$ac_t""no" 1>&6
252b5132
RH
1126fi
1127
1128else
6be7c12c 1129 RANLIB=":"
252b5132 1130fi
6be7c12c
AO
1131fi
1132
252b5132
RH
1133
1134# Check whether --enable-shared or --disable-shared was given.
1135if test "${enable_shared+set}" = set; then
1136 enableval="$enable_shared"
1137 p=${PACKAGE-default}
55c80943 1138case $enableval in
252b5132
RH
1139yes) enable_shared=yes ;;
1140no) enable_shared=no ;;
1141*)
1142 enable_shared=no
1143 # Look at the argument we got. We use all the common list separators.
1144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1145 for pkg in $enableval; do
1146 if test "X$pkg" = "X$p"; then
1147 enable_shared=yes
1148 fi
1149 done
1150 IFS="$ac_save_ifs"
1151 ;;
1152esac
1153else
1154 enable_shared=no
6be7c12c
AO
1155fi
1156
252b5132
RH
1157
1158# Check whether --enable-static or --disable-static was given.
1159if test "${enable_static+set}" = set; then
1160 enableval="$enable_static"
1161 p=${PACKAGE-default}
55c80943 1162case $enableval in
252b5132
RH
1163yes) enable_static=yes ;;
1164no) enable_static=no ;;
1165*)
1166 enable_static=no
1167 # Look at the argument we got. We use all the common list separators.
1168 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1169 for pkg in $enableval; do
1170 if test "X$pkg" = "X$p"; then
1171 enable_static=yes
1172 fi
1173 done
1174 IFS="$ac_save_ifs"
1175 ;;
1176esac
1177else
1178 enable_static=yes
6be7c12c
AO
1179fi
1180
b2ef150d
ILT
1181# Check whether --enable-fast-install or --disable-fast-install was given.
1182if test "${enable_fast_install+set}" = set; then
1183 enableval="$enable_fast_install"
1184 p=${PACKAGE-default}
55c80943 1185case $enableval in
b2ef150d
ILT
1186yes) enable_fast_install=yes ;;
1187no) enable_fast_install=no ;;
1188*)
1189 enable_fast_install=no
1190 # Look at the argument we got. We use all the common list separators.
1191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1192 for pkg in $enableval; do
1193 if test "X$pkg" = "X$p"; then
1194 enable_fast_install=yes
1195 fi
1196 done
1197 IFS="$ac_save_ifs"
1198 ;;
1199esac
1200else
1201 enable_fast_install=yes
6be7c12c 1202fi
8d88c4ca 1203
c5d1701e
NC
1204# Extract the first word of "gcc", so it can be a program name with args.
1205set dummy gcc; ac_word=$2
1206echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1207echo "configure:1208: checking for $ac_word" >&5
c5d1701e
NC
1208if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1209 echo $ac_n "(cached) $ac_c" 1>&6
1210else
1211 if test -n "$CC"; then
1212 ac_cv_prog_CC="$CC" # Let the user override the test.
1213else
1214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1215 ac_dummy="$PATH"
1216 for ac_dir in $ac_dummy; do
1217 test -z "$ac_dir" && ac_dir=.
1218 if test -f $ac_dir/$ac_word; then
1219 ac_cv_prog_CC="gcc"
1220 break
1221 fi
1222 done
1223 IFS="$ac_save_ifs"
1224fi
1225fi
1226CC="$ac_cv_prog_CC"
1227if test -n "$CC"; then
1228 echo "$ac_t""$CC" 1>&6
1229else
1230 echo "$ac_t""no" 1>&6
1231fi
1232
1233if test -z "$CC"; then
1234 # Extract the first word of "cc", so it can be a program name with args.
1235set dummy cc; ac_word=$2
1236echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1237echo "configure:1238: checking for $ac_word" >&5
c5d1701e
NC
1238if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 if test -n "$CC"; then
1242 ac_cv_prog_CC="$CC" # Let the user override the test.
1243else
1244 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1245 ac_prog_rejected=no
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248 test -z "$ac_dir" && ac_dir=.
1249 if test -f $ac_dir/$ac_word; then
1250 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1251 ac_prog_rejected=yes
1252 continue
1253 fi
1254 ac_cv_prog_CC="cc"
1255 break
1256 fi
1257 done
1258 IFS="$ac_save_ifs"
1259if test $ac_prog_rejected = yes; then
1260 # We found a bogon in the path, so make sure we never use it.
1261 set dummy $ac_cv_prog_CC
1262 shift
1263 if test $# -gt 0; then
1264 # We chose a different compiler from the bogus one.
1265 # However, it has the same basename, so the bogon will be chosen
1266 # first if we set CC to just the basename; use the full file name.
1267 shift
1268 set dummy "$ac_dir/$ac_word" "$@"
1269 shift
1270 ac_cv_prog_CC="$@"
1271 fi
1272fi
1273fi
1274fi
1275CC="$ac_cv_prog_CC"
1276if test -n "$CC"; then
1277 echo "$ac_t""$CC" 1>&6
1278else
1279 echo "$ac_t""no" 1>&6
1280fi
1281
1282 if test -z "$CC"; then
1283 case "`uname -s`" in
1284 *win32* | *WIN32*)
1285 # Extract the first word of "cl", so it can be a program name with args.
1286set dummy cl; ac_word=$2
1287echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1288echo "configure:1289: checking for $ac_word" >&5
c5d1701e
NC
1289if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1290 echo $ac_n "(cached) $ac_c" 1>&6
1291else
1292 if test -n "$CC"; then
1293 ac_cv_prog_CC="$CC" # Let the user override the test.
1294else
1295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1296 ac_dummy="$PATH"
1297 for ac_dir in $ac_dummy; do
1298 test -z "$ac_dir" && ac_dir=.
1299 if test -f $ac_dir/$ac_word; then
1300 ac_cv_prog_CC="cl"
1301 break
1302 fi
1303 done
1304 IFS="$ac_save_ifs"
1305fi
1306fi
1307CC="$ac_cv_prog_CC"
1308if test -n "$CC"; then
1309 echo "$ac_t""$CC" 1>&6
1310else
1311 echo "$ac_t""no" 1>&6
1312fi
1313 ;;
1314 esac
1315 fi
1316 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1317fi
1318
1319echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
4615568e 1320echo "configure:1321: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c5d1701e
NC
1321
1322ac_ext=c
1323# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1324ac_cpp='$CPP $CPPFLAGS'
1325ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1326ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1327cross_compiling=$ac_cv_prog_cc_cross
1328
1329cat > conftest.$ac_ext << EOF
1330
4615568e 1331#line 1332 "configure"
c5d1701e
NC
1332#include "confdefs.h"
1333
1334main(){return(0);}
1335EOF
4615568e 1336if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c5d1701e
NC
1337 ac_cv_prog_cc_works=yes
1338 # If we can't run a trivial program, we are probably using a cross compiler.
1339 if (./conftest; exit) 2>/dev/null; then
1340 ac_cv_prog_cc_cross=no
1341 else
1342 ac_cv_prog_cc_cross=yes
1343 fi
1344else
1345 echo "configure: failed program was:" >&5
1346 cat conftest.$ac_ext >&5
1347 ac_cv_prog_cc_works=no
1348fi
1349rm -fr conftest*
1350ac_ext=c
1351# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1352ac_cpp='$CPP $CPPFLAGS'
1353ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1354ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1355cross_compiling=$ac_cv_prog_cc_cross
1356
1357echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1358if test $ac_cv_prog_cc_works = no; then
1359 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1360fi
1361echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
4615568e 1362echo "configure:1363: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c5d1701e
NC
1363echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1364cross_compiling=$ac_cv_prog_cc_cross
1365
1366echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
4615568e 1367echo "configure:1368: checking whether we are using GNU C" >&5
c5d1701e
NC
1368if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1369 echo $ac_n "(cached) $ac_c" 1>&6
1370else
1371 cat > conftest.c <<EOF
1372#ifdef __GNUC__
1373 yes;
1374#endif
1375EOF
4615568e 1376if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c5d1701e
NC
1377 ac_cv_prog_gcc=yes
1378else
1379 ac_cv_prog_gcc=no
1380fi
1381fi
1382
1383echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1384
1385if test $ac_cv_prog_gcc = yes; then
1386 GCC=yes
1387else
1388 GCC=
1389fi
1390
1391ac_test_CFLAGS="${CFLAGS+set}"
1392ac_save_CFLAGS="$CFLAGS"
1393CFLAGS=
1394echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
4615568e 1395echo "configure:1396: checking whether ${CC-cc} accepts -g" >&5
c5d1701e
NC
1396if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398else
1399 echo 'void f(){}' > conftest.c
1400if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1401 ac_cv_prog_cc_g=yes
1402else
1403 ac_cv_prog_cc_g=no
1404fi
1405rm -f conftest*
1406
1407fi
1408
1409echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1410if test "$ac_test_CFLAGS" = set; then
1411 CFLAGS="$ac_save_CFLAGS"
1412elif test $ac_cv_prog_cc_g = yes; then
1413 if test "$GCC" = yes; then
1414 CFLAGS="-g -O2"
1415 else
1416 CFLAGS="-g"
1417 fi
1418else
1419 if test "$GCC" = yes; then
1420 CFLAGS="-O2"
1421 else
1422 CFLAGS=
1423 fi
1424fi
1425
252b5132
RH
1426# Check whether --with-gnu-ld or --without-gnu-ld was given.
1427if test "${with_gnu_ld+set}" = set; then
1428 withval="$with_gnu_ld"
1429 test "$withval" = no || with_gnu_ld=yes
1430else
1431 with_gnu_ld=no
6be7c12c
AO
1432fi
1433
252b5132 1434ac_prog=ld
55c80943 1435if test "$GCC" = yes; then
252b5132 1436 # Check if gcc -print-prog-name=ld gives a path.
6be7c12c 1437 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
4615568e 1438echo "configure:1439: checking for ld used by GCC" >&5
ac48eca1
AO
1439 case $host in
1440 *-*-mingw*)
1441 # gcc leaves a trailing carriage return which upsets mingw
1442 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1443 *)
1444 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1445 esac
55c80943 1446 case $ac_prog in
b2ef150d 1447 # Accept absolute paths.
a74801ba 1448 [\\/]* | [A-Za-z]:[\\/]*)
b2ef150d
ILT
1449 re_direlt='/[^/][^/]*/\.\./'
1450 # Canonicalize the path of ld
1451 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1452 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1453 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1454 done
1455 test -z "$LD" && LD="$ac_prog"
1456 ;;
252b5132
RH
1457 "")
1458 # If it fails, then pretend we aren't using GCC.
1459 ac_prog=ld
1460 ;;
1461 *)
1462 # If it is relative, then search for the first ld in PATH.
1463 with_gnu_ld=unknown
1464 ;;
1465 esac
1466elif test "$with_gnu_ld" = yes; then
6be7c12c 1467 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
4615568e 1468echo "configure:1469: checking for GNU ld" >&5
252b5132 1469else
6be7c12c 1470 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
4615568e 1471echo "configure:1472: checking for non-GNU ld" >&5
252b5132 1472fi
6be7c12c
AO
1473if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
1475else
1476 if test -z "$LD"; then
a74801ba 1477 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1478 for ac_dir in $PATH; do
1479 test -z "$ac_dir" && ac_dir=.
a74801ba 1480 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
55c80943 1481 lt_cv_path_LD="$ac_dir/$ac_prog"
252b5132
RH
1482 # Check to see if the program is GNU ld. I'd rather use --version,
1483 # but apparently some GNU ld's only accept -v.
1484 # Break only if it was the GNU/non-GNU ld that we prefer.
55c80943 1485 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
252b5132
RH
1486 test "$with_gnu_ld" != no && break
1487 else
b2ef150d 1488 test "$with_gnu_ld" != yes && break
252b5132
RH
1489 fi
1490 fi
1491 done
1492 IFS="$ac_save_ifs"
1493else
55c80943 1494 lt_cv_path_LD="$LD" # Let the user override the test with a path.
252b5132
RH
1495fi
1496fi
1497
55c80943 1498LD="$lt_cv_path_LD"
252b5132 1499if test -n "$LD"; then
6be7c12c 1500 echo "$ac_t""$LD" 1>&6
252b5132 1501else
6be7c12c 1502 echo "$ac_t""no" 1>&6
252b5132 1503fi
6be7c12c
AO
1504test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1505echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
4615568e 1506echo "configure:1507: checking if the linker ($LD) is GNU ld" >&5
6be7c12c
AO
1507if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1508 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
1509else
1510 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1511if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
55c80943 1512 lt_cv_prog_gnu_ld=yes
252b5132 1513else
55c80943 1514 lt_cv_prog_gnu_ld=no
252b5132
RH
1515fi
1516fi
6be7c12c
AO
1517
1518echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
55c80943 1519with_gnu_ld=$lt_cv_prog_gnu_ld
252b5132 1520
6be7c12c
AO
1521
1522echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
4615568e 1523echo "configure:1524: checking for $LD option to reload object files" >&5
6be7c12c
AO
1524if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1
AO
1526else
1527 lt_cv_ld_reload_flag='-r'
1528fi
6be7c12c
AO
1529
1530echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
ac48eca1
AO
1531reload_flag=$lt_cv_ld_reload_flag
1532test -n "$reload_flag" && reload_flag=" $reload_flag"
1533
6be7c12c 1534echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
4615568e 1535echo "configure:1536: checking for BSD-compatible nm" >&5
6be7c12c
AO
1536if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1537 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
1538else
1539 if test -n "$NM"; then
1540 # Let the user override the test.
55c80943 1541 lt_cv_path_NM="$NM"
252b5132 1542else
a74801ba 1543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
b2ef150d 1544 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132 1545 test -z "$ac_dir" && ac_dir=.
ac48eca1
AO
1546 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1547 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
252b5132
RH
1548 # Check to see if the nm accepts a BSD-compat flag.
1549 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1550 # nm: unknown option "B" ignored
90f2472a
AO
1551 # Tru64's nm complains that /dev/null is an invalid object file
1552 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
55c80943 1553 lt_cv_path_NM="$tmp_nm -B"
b2ef150d 1554 break
ac48eca1 1555 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
55c80943 1556 lt_cv_path_NM="$tmp_nm -p"
b2ef150d 1557 break
252b5132 1558 else
55c80943 1559 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
b2ef150d 1560 continue # so that we can try to find one that supports BSD flags
252b5132 1561 fi
252b5132
RH
1562 fi
1563 done
1564 IFS="$ac_save_ifs"
55c80943 1565 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
252b5132
RH
1566fi
1567fi
1568
55c80943 1569NM="$lt_cv_path_NM"
6be7c12c 1570echo "$ac_t""$NM" 1>&6
252b5132 1571
6be7c12c 1572echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
4615568e 1573echo "configure:1574: checking whether ln -s works" >&5
6be7c12c
AO
1574if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
1576else
1577 rm -f conftestdata
1578if ln -s X conftestdata 2>/dev/null
1579then
1580 rm -f conftestdata
1581 ac_cv_prog_LN_S="ln -s"
252b5132 1582else
6be7c12c
AO
1583 ac_cv_prog_LN_S=ln
1584fi
1585fi
1586LN_S="$ac_cv_prog_LN_S"
1587if test "$ac_cv_prog_LN_S" = "ln -s"; then
1588 echo "$ac_t""yes" 1>&6
1589else
1590 echo "$ac_t""no" 1>&6
252b5132
RH
1591fi
1592
6be7c12c 1593echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
4615568e 1594echo "configure:1595: checking how to recognise dependant libraries" >&5
6be7c12c
AO
1595if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 1597else
d64552c5 1598 lt_cv_file_magic_cmd='$MAGIC_CMD'
ac48eca1
AO
1599lt_cv_file_magic_test_file=
1600lt_cv_deplibs_check_method='unknown'
1601# Need to set the preceding variable on all platforms that support
1602# interlibrary dependencies.
1603# 'none' -- dependencies not supported.
1604# `unknown' -- same as none, but documents that we really don't know.
1605# 'pass_all' -- all dependencies passed with no checks.
1606# 'test_compile' -- check by making test program.
1607# 'file_magic [regex]' -- check by looking for files in library path
1608# which responds to the $file_magic_cmd with a given egrep regex.
1609# If you have `file' or equivalent on your system and you're not sure
1610# whether `pass_all' will *always* work, you probably want this one.
1611
55c80943
NC
1612case $host_os in
1613aix*)
ac48eca1
AO
1614 lt_cv_deplibs_check_method=pass_all
1615 ;;
1616
1617beos*)
1618 lt_cv_deplibs_check_method=pass_all
1619 ;;
1620
1621bsdi4*)
55c80943
NC
1622 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1623 lt_cv_file_magic_cmd='/usr/bin/file -L'
ac48eca1
AO
1624 lt_cv_file_magic_test_file=/shlib/libc.so
1625 ;;
1626
d64552c5 1627cygwin* | mingw* |pw32*)
ac48eca1 1628 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
d64552c5 1629 lt_cv_file_magic_cmd='$OBJDUMP -f'
ac48eca1
AO
1630 ;;
1631
55c80943
NC
1632darwin* | rhapsody*)
1633 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
b3baf5d0
NC
1634 lt_cv_file_magic_cmd='/usr/bin/file -L'
1635 case "$host_os" in
1636 rhapsody* | darwin1.012)
1637 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1638 ;;
1639 *) # Darwin 1.3 on
1640 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1641 ;;
1642 esac
55c80943
NC
1643 ;;
1644
ac48eca1
AO
1645freebsd* )
1646 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
55c80943 1647 case $host_cpu in
ac48eca1 1648 i*86 )
90f2472a
AO
1649 # Not sure whether the presence of OpenBSD here was a mistake.
1650 # Let's accept both of them until this is cleared up.
55c80943
NC
1651 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1652 lt_cv_file_magic_cmd=/usr/bin/file
ac48eca1
AO
1653 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1654 ;;
1655 esac
1656 else
1657 lt_cv_deplibs_check_method=pass_all
1658 fi
1659 ;;
1660
1661gnu*)
1662 lt_cv_deplibs_check_method=pass_all
1663 ;;
1664
55c80943 1665hpux10.20*|hpux11*)
4867be41
DJ
1666 case $host_cpu in
1667 hppa*)
1668 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1669 lt_cv_file_magic_cmd=/usr/bin/file
1670 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1671 ;;
1672 ia64*)
1673 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1674 lt_cv_file_magic_cmd=/usr/bin/file
1675 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1676 ;;
1677 esac
ac48eca1
AO
1678 ;;
1679
1680irix5* | irix6*)
55c80943 1681 case $host_os in
ac48eca1
AO
1682 irix5*)
1683 # this will be overridden with pass_all, but let us keep it just in case
1684 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1685 ;;
1686 *)
55c80943 1687 case $LD in
ac48eca1
AO
1688 *-32|*"-32 ") libmagic=32-bit;;
1689 *-n32|*"-n32 ") libmagic=N32;;
1690 *-64|*"-64 ") libmagic=64-bit;;
1691 *) libmagic=never-match;;
1692 esac
1693 # this will be overridden with pass_all, but let us keep it just in case
55c80943
NC
1694 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1695 ;;
ac48eca1
AO
1696 esac
1697 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1698 lt_cv_deplibs_check_method=pass_all
1699 ;;
1700
1701# This must be Linux ELF.
90f2472a 1702linux-gnu*)
55c80943 1703 case $host_cpu in
c5d1701e 1704 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
ac48eca1
AO
1705 lt_cv_deplibs_check_method=pass_all ;;
1706 *)
1707 # glibc up to 2.1.1 does not perform some relocations on ARM
55c80943
NC
1708 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1709 esac
ac48eca1
AO
1710 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1711 ;;
1712
1713netbsd*)
55c80943 1714 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
b3baf5d0 1715 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
ac48eca1 1716 else
b3baf5d0 1717 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
ac48eca1 1718 fi
55c80943
NC
1719 ;;
1720
1721newsos6)
1722 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1723 lt_cv_file_magic_cmd=/usr/bin/file
1724 lt_cv_file_magic_test_file=/usr/lib/libnls.so
ac48eca1
AO
1725 ;;
1726
1727osf3* | osf4* | osf5*)
1728 # this will be overridden with pass_all, but let us keep it just in case
1729 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1730 lt_cv_file_magic_test_file=/shlib/libc.so
1731 lt_cv_deplibs_check_method=pass_all
1732 ;;
1733
1734sco3.2v5*)
1735 lt_cv_deplibs_check_method=pass_all
1736 ;;
1737
1738solaris*)
1739 lt_cv_deplibs_check_method=pass_all
1740 lt_cv_file_magic_test_file=/lib/libc.so
1741 ;;
1742
6be7c12c
AO
1743sysv5uw[78]* | sysv4*uw2*)
1744 lt_cv_deplibs_check_method=pass_all
1745 ;;
1746
ac48eca1 1747sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
55c80943 1748 case $host_vendor in
ac48eca1
AO
1749 ncr)
1750 lt_cv_deplibs_check_method=pass_all
1751 ;;
1752 motorola)
55c80943
NC
1753 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1754 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
ac48eca1
AO
1755 ;;
1756 esac
1757 ;;
1758esac
1759
1760fi
6be7c12c
AO
1761
1762echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
ac48eca1
AO
1763file_magic_cmd=$lt_cv_file_magic_cmd
1764deplibs_check_method=$lt_cv_deplibs_check_method
1765
6be7c12c 1766echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4615568e 1767echo "configure:1768: checking for object suffix" >&5
6be7c12c
AO
1768if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1769 echo $ac_n "(cached) $ac_c" 1>&6
1770else
1771 rm -f conftest*
1772echo 'int i = 1;' > conftest.$ac_ext
4615568e 1773if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
1774 for ac_file in conftest.*; do
1775 case $ac_file in
1776 *.c) ;;
1777 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1778 esac
1779 done
1780else
1781 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1782fi
1783rm -f conftest*
1784fi
ac48eca1 1785
6be7c12c
AO
1786echo "$ac_t""$ac_cv_objext" 1>&6
1787OBJEXT=$ac_cv_objext
1788ac_objext=$ac_cv_objext
1789
1790
1791
1792echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4615568e 1793echo "configure:1794: checking for executable suffix" >&5
6be7c12c
AO
1794if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1795 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 1796else
6be7c12c
AO
1797 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1798 ac_cv_exeext=.exe
1799else
1800 rm -f conftest*
1801 echo 'int main () { return 0; }' > conftest.$ac_ext
1802 ac_cv_exeext=
4615568e 1803 if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6be7c12c
AO
1804 for file in conftest.*; do
1805 case $file in
4615568e 1806 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
6be7c12c
AO
1807 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1808 esac
1809 done
1810 else
1811 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1812 fi
1813 rm -f conftest*
1814 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1815fi
1816fi
1817
1818EXEEXT=""
1819test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1820echo "$ac_t""${ac_cv_exeext}" 1>&6
1821ac_exeext=$EXEEXT
1822
1823# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1824
1825# Only perform the check for file, if the check method requires it
1826case $deplibs_check_method in
1827file_magic*)
1828 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1829 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4615568e 1830echo "configure:1831: checking for ${ac_tool_prefix}file" >&5
6be7c12c
AO
1831if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1833else
1834 case $MAGIC_CMD in
1835 /*)
1836 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1837 ;;
1838 ?:/*)
1839 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1840 ;;
1841 *)
d64552c5 1842 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1844 ac_dummy="/usr/bin:$PATH"
1845 for ac_dir in $ac_dummy; do
1846 test -z "$ac_dir" && ac_dir=.
1847 if test -f $ac_dir/${ac_tool_prefix}file; then
d64552c5 1848 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ac48eca1 1849 if test -n "$file_magic_test_file"; then
55c80943 1850 case $deplibs_check_method in
ac48eca1
AO
1851 "file_magic "*)
1852 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1853 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1854 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1855 egrep "$file_magic_regex" > /dev/null; then
1856 :
1857 else
1858 cat <<EOF 1>&2
1859
1860*** Warning: the command libtool uses to detect shared libraries,
1861*** $file_magic_cmd, produces output that libtool cannot recognize.
1862*** The result is that libtool may fail to recognize shared libraries
1863*** as such. This will affect the creation of libtool libraries that
1864*** depend on shared libraries, but programs linked with such libtool
1865*** libraries will work regardless of this problem. Nevertheless, you
1866*** may want to report the problem to your system manager and/or to
1867*** bug-libtool@gnu.org
1868
1869EOF
1870 fi ;;
1871 esac
1872 fi
1873 break
1874 fi
1875 done
1876 IFS="$ac_save_ifs"
d64552c5 1877 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1878 ;;
1879esac
1880fi
1881
d64552c5
AO
1882MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1883if test -n "$MAGIC_CMD"; then
6be7c12c 1884 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1 1885else
6be7c12c 1886 echo "$ac_t""no" 1>&6
ac48eca1
AO
1887fi
1888
d64552c5 1889if test -z "$lt_cv_path_MAGIC_CMD"; then
ac48eca1 1890 if test -n "$ac_tool_prefix"; then
6be7c12c 1891 echo $ac_n "checking for file""... $ac_c" 1>&6
4615568e 1892echo "configure:1893: checking for file" >&5
6be7c12c
AO
1893if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 1895else
55c80943 1896 case $MAGIC_CMD in
ac48eca1 1897 /*)
d64552c5 1898 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
1899 ;;
1900 ?:/*)
d64552c5 1901 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
1902 ;;
1903 *)
d64552c5 1904 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1906 ac_dummy="/usr/bin:$PATH"
1907 for ac_dir in $ac_dummy; do
1908 test -z "$ac_dir" && ac_dir=.
1909 if test -f $ac_dir/file; then
d64552c5 1910 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ac48eca1 1911 if test -n "$file_magic_test_file"; then
55c80943 1912 case $deplibs_check_method in
ac48eca1
AO
1913 "file_magic "*)
1914 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1915 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1916 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1917 egrep "$file_magic_regex" > /dev/null; then
1918 :
1919 else
1920 cat <<EOF 1>&2
1921
1922*** Warning: the command libtool uses to detect shared libraries,
1923*** $file_magic_cmd, produces output that libtool cannot recognize.
1924*** The result is that libtool may fail to recognize shared libraries
1925*** as such. This will affect the creation of libtool libraries that
1926*** depend on shared libraries, but programs linked with such libtool
1927*** libraries will work regardless of this problem. Nevertheless, you
1928*** may want to report the problem to your system manager and/or to
1929*** bug-libtool@gnu.org
1930
1931EOF
1932 fi ;;
1933 esac
1934 fi
1935 break
1936 fi
1937 done
1938 IFS="$ac_save_ifs"
d64552c5 1939 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1940 ;;
1941esac
1942fi
1943
d64552c5
AO
1944MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1945if test -n "$MAGIC_CMD"; then
6be7c12c 1946 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1 1947else
6be7c12c 1948 echo "$ac_t""no" 1>&6
ac48eca1
AO
1949fi
1950
1951 else
d64552c5 1952 MAGIC_CMD=:
ac48eca1
AO
1953 fi
1954fi
1955
1956 fi
1957 ;;
1958esac
1959
6be7c12c 1960# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
ac48eca1 1961set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6be7c12c 1962echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1963echo "configure:1964: checking for $ac_word" >&5
6be7c12c
AO
1964if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1965 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1
AO
1966else
1967 if test -n "$RANLIB"; then
1968 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1969else
6be7c12c
AO
1970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1971 ac_dummy="$PATH"
1972 for ac_dir in $ac_dummy; do
1973 test -z "$ac_dir" && ac_dir=.
1974 if test -f $ac_dir/$ac_word; then
1975 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1976 break
1977 fi
1978 done
1979 IFS="$ac_save_ifs"
ac48eca1
AO
1980fi
1981fi
6be7c12c 1982RANLIB="$ac_cv_prog_RANLIB"
ac48eca1 1983if test -n "$RANLIB"; then
6be7c12c 1984 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 1985else
6be7c12c 1986 echo "$ac_t""no" 1>&6
ac48eca1
AO
1987fi
1988
6be7c12c 1989
ac48eca1 1990if test -z "$ac_cv_prog_RANLIB"; then
6be7c12c 1991if test -n "$ac_tool_prefix"; then
ac48eca1
AO
1992 # Extract the first word of "ranlib", so it can be a program name with args.
1993set dummy ranlib; ac_word=$2
6be7c12c 1994echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 1995echo "configure:1996: checking for $ac_word" >&5
6be7c12c
AO
1996if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998else
1999 if test -n "$RANLIB"; then
2000 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2001else
2002 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2003 ac_dummy="$PATH"
2004 for ac_dir in $ac_dummy; do
2005 test -z "$ac_dir" && ac_dir=.
2006 if test -f $ac_dir/$ac_word; then
2007 ac_cv_prog_RANLIB="ranlib"
2008 break
2009 fi
2010 done
2011 IFS="$ac_save_ifs"
2012 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
ac48eca1
AO
2013fi
2014fi
6be7c12c
AO
2015RANLIB="$ac_cv_prog_RANLIB"
2016if test -n "$RANLIB"; then
2017 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 2018else
6be7c12c 2019 echo "$ac_t""no" 1>&6
ac48eca1
AO
2020fi
2021
2022else
6be7c12c
AO
2023 RANLIB=":"
2024fi
ac48eca1
AO
2025fi
2026
6be7c12c 2027# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
ac48eca1 2028set dummy ${ac_tool_prefix}strip; ac_word=$2
6be7c12c 2029echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2030echo "configure:2031: checking for $ac_word" >&5
6be7c12c
AO
2031if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1
AO
2033else
2034 if test -n "$STRIP"; then
2035 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2036else
6be7c12c
AO
2037 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2038 ac_dummy="$PATH"
2039 for ac_dir in $ac_dummy; do
2040 test -z "$ac_dir" && ac_dir=.
2041 if test -f $ac_dir/$ac_word; then
2042 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2043 break
2044 fi
2045 done
2046 IFS="$ac_save_ifs"
ac48eca1
AO
2047fi
2048fi
6be7c12c 2049STRIP="$ac_cv_prog_STRIP"
ac48eca1 2050if test -n "$STRIP"; then
6be7c12c 2051 echo "$ac_t""$STRIP" 1>&6
ac48eca1 2052else
6be7c12c 2053 echo "$ac_t""no" 1>&6
ac48eca1
AO
2054fi
2055
6be7c12c 2056
ac48eca1 2057if test -z "$ac_cv_prog_STRIP"; then
6be7c12c 2058if test -n "$ac_tool_prefix"; then
ac48eca1
AO
2059 # Extract the first word of "strip", so it can be a program name with args.
2060set dummy strip; ac_word=$2
6be7c12c 2061echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2062echo "configure:2063: checking for $ac_word" >&5
6be7c12c
AO
2063if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2064 echo $ac_n "(cached) $ac_c" 1>&6
2065else
2066 if test -n "$STRIP"; then
2067 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2068else
2069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2070 ac_dummy="$PATH"
2071 for ac_dir in $ac_dummy; do
2072 test -z "$ac_dir" && ac_dir=.
2073 if test -f $ac_dir/$ac_word; then
2074 ac_cv_prog_STRIP="strip"
2075 break
2076 fi
2077 done
2078 IFS="$ac_save_ifs"
2079 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
ac48eca1
AO
2080fi
2081fi
6be7c12c
AO
2082STRIP="$ac_cv_prog_STRIP"
2083if test -n "$STRIP"; then
2084 echo "$ac_t""$STRIP" 1>&6
ac48eca1 2085else
6be7c12c 2086 echo "$ac_t""no" 1>&6
ac48eca1
AO
2087fi
2088
2089else
6be7c12c
AO
2090 STRIP=":"
2091fi
ac48eca1 2092fi
252b5132 2093
6be7c12c 2094
252b5132 2095# Check for any special flags to pass to ltconfig.
b2ef150d 2096libtool_flags="--cache-file=$cache_file"
252b5132
RH
2097test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2098test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
b2ef150d 2099test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
55c80943
NC
2100test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2101test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
252b5132 2102
6be7c12c 2103
a74801ba
ILT
2104# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2105if test "${enable_libtool_lock+set}" = set; then
2106 enableval="$enable_libtool_lock"
6be7c12c
AO
2107 :
2108fi
a74801ba
ILT
2109
2110test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2111test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2112
ac48eca1
AO
2113# Check whether --with-pic or --without-pic was given.
2114if test "${with_pic+set}" = set; then
2115 withval="$with_pic"
2116 pic_mode="$withval"
2117else
2118 pic_mode=default
6be7c12c
AO
2119fi
2120
ac48eca1
AO
2121test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2122test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2123
252b5132
RH
2124# Some flags need to be propagated to the compiler or linker for good
2125# libtool support.
55c80943 2126case $host in
252b5132
RH
2127*-*-irix6*)
2128 # Find out which ABI we are using.
4615568e
NC
2129 echo '#line 2130 "configure"' > conftest.$ac_ext
2130 if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6a457e5c
NC
2131 if test "$lt_cv_prog_gnu_ld" = yes; then
2132 case `/usr/bin/file conftest.$ac_objext` in
2133 *32-bit*)
2134 LD="${LD-ld} -melf32bsmip"
2135 ;;
2136 *N32*)
2137 LD="${LD-ld} -melf32bmipn32"
2138 ;;
2139 *64-bit*)
2140 LD="${LD-ld} -melf64bmip"
2141 ;;
2142 esac
2143 else
55c80943 2144 case `/usr/bin/file conftest.$ac_objext` in
252b5132
RH
2145 *32-bit*)
2146 LD="${LD-ld} -32"
2147 ;;
2148 *N32*)
2149 LD="${LD-ld} -n32"
2150 ;;
2151 *64-bit*)
2152 LD="${LD-ld} -64"
2153 ;;
2154 esac
6a457e5c 2155 fi
252b5132
RH
2156 fi
2157 rm -rf conftest*
2158 ;;
2159
4867be41
DJ
2160ia64-*-hpux*)
2161 # Find out which ABI we are using.
2162 echo 'int i;' > conftest.$ac_ext
4615568e 2163 if { (eval echo configure:2164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4867be41
DJ
2164 case "`/usr/bin/file conftest.o`" in
2165 *ELF-32*)
2166 HPUX_IA64_MODE="32"
2167 ;;
2168 *ELF-64*)
2169 HPUX_IA64_MODE="64"
2170 ;;
2171 esac
2172 fi
2173 rm -rf conftest*
2174 ;;
2175
252b5132
RH
2176*-*-sco3.2v5*)
2177 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
b2ef150d 2178 SAVE_CFLAGS="$CFLAGS"
252b5132 2179 CFLAGS="$CFLAGS -belf"
6be7c12c 2180 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4615568e 2181echo "configure:2182: checking whether the C compiler needs -belf" >&5
6be7c12c
AO
2182if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2183 echo $ac_n "(cached) $ac_c" 1>&6
b2ef150d 2184else
6be7c12c 2185
ac48eca1 2186 ac_ext=c
6be7c12c 2187# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac48eca1 2188ac_cpp='$CPP $CPPFLAGS'
6be7c12c
AO
2189ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2190ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2191cross_compiling=$ac_cv_prog_cc_cross
ac48eca1 2192
6be7c12c 2193 cat > conftest.$ac_ext <<EOF
4615568e 2194#line 2195 "configure"
b2ef150d
ILT
2195#include "confdefs.h"
2196
6be7c12c 2197int main() {
b2ef150d 2198
6be7c12c
AO
2199; return 0; }
2200EOF
4615568e 2201if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 2202 rm -rf conftest*
b2ef150d
ILT
2203 lt_cv_cc_needs_belf=yes
2204else
6be7c12c
AO
2205 echo "configure: failed program was:" >&5
2206 cat conftest.$ac_ext >&5
2207 rm -rf conftest*
2208 lt_cv_cc_needs_belf=no
b2ef150d 2209fi
6be7c12c 2210rm -f conftest*
ac48eca1 2211 ac_ext=c
6be7c12c 2212# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac48eca1 2213ac_cpp='$CPP $CPPFLAGS'
6be7c12c
AO
2214ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2215ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2216cross_compiling=$ac_cv_prog_cc_cross
ac48eca1 2217
b2ef150d 2218fi
6be7c12c
AO
2219
2220echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
b2ef150d
ILT
2221 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2222 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2223 CFLAGS="$SAVE_CFLAGS"
2224 fi
252b5132
RH
2225 ;;
2226
6be7c12c 2227
252b5132
RH
2228esac
2229
6be7c12c 2230
b2ef150d 2231# Save cache, so that ltconfig can load it
6be7c12c 2232cat > confcache <<\EOF
b2ef150d
ILT
2233# This file is a shell script that caches the results of configure
2234# tests run on this system so they can be shared between configure
6be7c12c
AO
2235# scripts and configure runs. It is not useful on other systems.
2236# If it contains results you don't want to keep, you may remove or edit it.
b2ef150d 2237#
6be7c12c
AO
2238# By default, configure uses ./config.cache as the cache file,
2239# creating it if it does not exist already. You can give configure
2240# the --cache-file=FILE option to use a different cache file; that is
2241# what configure does when it calls configure scripts in
2242# subdirectories, so they share the cache.
2243# Giving --cache-file=/dev/null disables caching, for debugging configure.
2244# config.status only pays attention to the cache file if you give it the
2245# --recheck option to rerun configure.
b2ef150d 2246#
6be7c12c 2247EOF
b2ef150d
ILT
2248# The following way of writing the cache mishandles newlines in values,
2249# but we know of no workaround that is simple, portable, and efficient.
2250# So, don't put newlines in cache variables' values.
2251# Ultrix sh set writes to stderr and can't be redirected directly,
2252# and sets the high bit in the cache file unless we assign to the vars.
6be7c12c
AO
2253(set) 2>&1 |
2254 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2255 *ac_space=\ *)
2256 # `set' does not quote correctly, so add quotes (double-quote substitution
2257 # turns \\\\ into \\, and sed turns \\ into \).
2258 sed -n \
2259 -e "s/'/'\\\\''/g" \
2260 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2261 ;;
2262 *)
2263 # `set' quotes correctly as required by POSIX, so do not add quotes.
2264 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2265 ;;
2266 esac >> confcache
2267if cmp -s $cache_file confcache; then
2268 :
2269else
b2ef150d 2270 if test -w $cache_file; then
6be7c12c
AO
2271 echo "updating cache $cache_file"
2272 cat confcache > $cache_file
b2ef150d
ILT
2273 else
2274 echo "not updating unwritable cache $cache_file"
2275 fi
2276fi
2277rm -f confcache
2278
6be7c12c 2279
252b5132 2280# Actually configure libtool. ac_aux_dir is where install-sh is found.
ac48eca1 2281AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
d64552c5 2282MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
ac48eca1
AO
2283LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2284AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2285objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2286deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
252b5132 2287${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
ac48eca1 2288$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
6be7c12c 2289|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
252b5132 2290
b2ef150d
ILT
2291# Reload cache, that may have been modified by ltconfig
2292if test -r "$cache_file"; then
6be7c12c
AO
2293 echo "loading cache $cache_file"
2294 . $cache_file
b2ef150d 2295else
6be7c12c
AO
2296 echo "creating cache $cache_file"
2297 > $cache_file
b2ef150d
ILT
2298fi
2299
6be7c12c 2300
b2ef150d 2301# This can be used to rebuild libtool when needed
ac48eca1 2302LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
b2ef150d
ILT
2303
2304# Always use our own libtool.
2305LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2306
252b5132
RH
2307# Redirect the config.log output again, so that the ltconfig log is not
2308# clobbered by the next message.
2309exec 5>>./config.log
2310
6be7c12c
AO
2311
2312
2313
2314
2315
2316
252b5132
RH
2317# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2318if test "${enable_64_bit_bfd+set}" = set; then
2319 enableval="$enable_64_bit_bfd"
2320 case "${enableval}" in
2321 yes) want64=true ;;
2322 no) want64=false ;;
6be7c12c 2323 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
252b5132
RH
2324esac
2325else
2326 want64=false
6be7c12c
AO
2327fi
2328# Check whether --enable-targets or --disable-targets was given.
252b5132
RH
2329if test "${enable_targets+set}" = set; then
2330 enableval="$enable_targets"
2331 case "${enableval}" in
6be7c12c 2332 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
252b5132
RH
2333 ;;
2334 no) enable_targets= ;;
2335 *) enable_targets=$enableval ;;
2336esac
6be7c12c
AO
2337fi
2338# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
252b5132
RH
2339if test "${enable_commonbfdlib+set}" = set; then
2340 enableval="$enable_commonbfdlib"
2341 case "${enableval}" in
2342 yes) commonbfdlib=true ;;
2343 no) commonbfdlib=false ;;
6be7c12c 2344 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
252b5132 2345esac
6be7c12c 2346fi
252b5132
RH
2347# Check whether --with-mmap or --without-mmap was given.
2348if test "${with_mmap+set}" = set; then
2349 withval="$with_mmap"
2350 case "${withval}" in
2351 yes) want_mmap=true ;;
2352 no) want_mmap=false ;;
6be7c12c 2353 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
252b5132
RH
2354esac
2355else
2356 want_mmap=false
6be7c12c
AO
2357fi
2358
0218d1e4 2359build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
a2d91340
AC
2360# Check whether --enable-build-warnings or --disable-build-warnings was given.
2361if test "${enable_build_warnings+set}" = set; then
2362 enableval="$enable_build_warnings"
2363 case "${enableval}" in
2364 yes) ;;
2365 no) build_warnings="-w";;
2366 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2367 build_warnings="${build_warnings} ${t}";;
2368 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2369 build_warnings="${t} ${build_warnings}";;
2370 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2371esac
2372if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2373 echo "Setting warning flags = $build_warnings" 6>&1
2374fi
6be7c12c
AO
2375fi
2376WARN_CFLAGS=""
66e25bab 2377if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
a2d91340
AC
2378 WARN_CFLAGS="${build_warnings}"
2379fi
2380
2381
6be7c12c
AO
2382
2383
2384
252b5132
RH
2385
2386if test -z "$target" ; then
6be7c12c 2387 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
252b5132 2388fi
252b5132 2389
6be7c12c 2390echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4615568e 2391echo "configure:2392: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
2392 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2393if test "${enable_maintainer_mode+set}" = set; then
2394 enableval="$enable_maintainer_mode"
2395 USE_MAINTAINER_MODE=$enableval
2396else
2397 USE_MAINTAINER_MODE=no
6be7c12c
AO
2398fi
2399
2400 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2401
252b5132
RH
2402
2403if test $USE_MAINTAINER_MODE = yes; then
2404 MAINTAINER_MODE_TRUE=
2405 MAINTAINER_MODE_FALSE='#'
2406else
2407 MAINTAINER_MODE_TRUE='#'
2408 MAINTAINER_MODE_FALSE=
2409fi
2410 MAINT=$MAINTAINER_MODE_TRUE
6be7c12c 2411
252b5132 2412
a703a6ea 2413echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
4615568e 2414echo "configure:2415: checking whether to install libbfd" >&5
a703a6ea
AM
2415 # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
2416if test "${enable_install_libbfd+set}" = set; then
2417 enableval="$enable_install_libbfd"
2418 install_libbfd_p=$enableval
2419else
66e25bab 2420 if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
a703a6ea
AM
2421 install_libbfd_p=yes
2422 else
2423 install_libbfd_p=no
2424 fi
2425fi
2426
2427 echo "$ac_t""$install_libbfd_p" 1>&6
2428
2429
2430if test $install_libbfd_p = yes; then
2431 INSTALL_LIBBFD_TRUE=
2432 INSTALL_LIBBFD_FALSE='#'
2433else
2434 INSTALL_LIBBFD_TRUE='#'
2435 INSTALL_LIBBFD_FALSE=
2436fi
2437 # libbfd.a is a host library containing target dependent code
2438 bfdlibdir='$(libdir)'
2439 bfdincludedir='$(includedir)'
2440 if test "${host}" != "${target}"; then
2441 bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
2442 bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
2443 fi
2444
2445
2446
2447
252b5132
RH
2448
2449
6be7c12c 2450echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4615568e 2451echo "configure:2452: checking for executable suffix" >&5
6be7c12c
AO
2452if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2453 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2454else
6be7c12c
AO
2455 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2456 ac_cv_exeext=.exe
252b5132 2457else
6be7c12c
AO
2458 rm -f conftest*
2459 echo 'int main () { return 0; }' > conftest.$ac_ext
2460 ac_cv_exeext=
4615568e 2461 if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6be7c12c
AO
2462 for file in conftest.*; do
2463 case $file in
4615568e 2464 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
6be7c12c
AO
2465 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2466 esac
2467 done
2468 else
2469 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2470 fi
2471 rm -f conftest*
2472 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
252b5132 2473fi
b3baf5d0 2474fi
252b5132 2475
6be7c12c
AO
2476EXEEXT=""
2477test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2478echo "$ac_t""${ac_cv_exeext}" 1>&6
2479ac_exeext=$EXEEXT
252b5132 2480
252b5132 2481
6be7c12c
AO
2482host64=false
2483target64=false
69263e90 2484bfd_default_target_size=32
252b5132 2485
6be7c12c
AO
2486# host stuff:
2487
2488# Extract the first word of "gcc", so it can be a program name with args.
2489set dummy gcc; ac_word=$2
2490echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2491echo "configure:2492: checking for $ac_word" >&5
6be7c12c
AO
2492if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2493 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2494else
2495 if test -n "$CC"; then
2496 ac_cv_prog_CC="$CC" # Let the user override the test.
2497else
6be7c12c
AO
2498 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2499 ac_dummy="$PATH"
2500 for ac_dir in $ac_dummy; do
2501 test -z "$ac_dir" && ac_dir=.
2502 if test -f $ac_dir/$ac_word; then
2503 ac_cv_prog_CC="gcc"
2504 break
2505 fi
2506 done
2507 IFS="$ac_save_ifs"
252b5132
RH
2508fi
2509fi
6be7c12c 2510CC="$ac_cv_prog_CC"
252b5132 2511if test -n "$CC"; then
6be7c12c 2512 echo "$ac_t""$CC" 1>&6
b3baf5d0 2513else
6be7c12c 2514 echo "$ac_t""no" 1>&6
b3baf5d0
NC
2515fi
2516
252b5132
RH
2517if test -z "$CC"; then
2518 # Extract the first word of "cc", so it can be a program name with args.
2519set dummy cc; ac_word=$2
6be7c12c 2520echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2521echo "configure:2522: checking for $ac_word" >&5
6be7c12c
AO
2522if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2523 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2524else
2525 if test -n "$CC"; then
2526 ac_cv_prog_CC="$CC" # Let the user override the test.
2527else
6be7c12c 2528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
252b5132 2529 ac_prog_rejected=no
6be7c12c
AO
2530 ac_dummy="$PATH"
2531 for ac_dir in $ac_dummy; do
2532 test -z "$ac_dir" && ac_dir=.
2533 if test -f $ac_dir/$ac_word; then
2534 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2535 ac_prog_rejected=yes
2536 continue
2537 fi
2538 ac_cv_prog_CC="cc"
2539 break
2540 fi
2541 done
2542 IFS="$ac_save_ifs"
252b5132
RH
2543if test $ac_prog_rejected = yes; then
2544 # We found a bogon in the path, so make sure we never use it.
2545 set dummy $ac_cv_prog_CC
2546 shift
6be7c12c 2547 if test $# -gt 0; then
252b5132
RH
2548 # We chose a different compiler from the bogus one.
2549 # However, it has the same basename, so the bogon will be chosen
2550 # first if we set CC to just the basename; use the full file name.
2551 shift
6be7c12c 2552 set dummy "$ac_dir/$ac_word" "$@"
252b5132
RH
2553 shift
2554 ac_cv_prog_CC="$@"
2555 fi
2556fi
2557fi
2558fi
6be7c12c 2559CC="$ac_cv_prog_CC"
252b5132 2560if test -n "$CC"; then
6be7c12c 2561 echo "$ac_t""$CC" 1>&6
252b5132 2562else
6be7c12c 2563 echo "$ac_t""no" 1>&6
252b5132
RH
2564fi
2565
6be7c12c
AO
2566 if test -z "$CC"; then
2567 case "`uname -s`" in
2568 *win32* | *WIN32*)
2569 # Extract the first word of "cl", so it can be a program name with args.
2570set dummy cl; ac_word=$2
2571echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2572echo "configure:2573: checking for $ac_word" >&5
6be7c12c
AO
2573if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2574 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2575else
2576 if test -n "$CC"; then
2577 ac_cv_prog_CC="$CC" # Let the user override the test.
2578else
6be7c12c
AO
2579 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2580 ac_dummy="$PATH"
2581 for ac_dir in $ac_dummy; do
2582 test -z "$ac_dir" && ac_dir=.
2583 if test -f $ac_dir/$ac_word; then
2584 ac_cv_prog_CC="cl"
2585 break
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
252b5132
RH
2589fi
2590fi
6be7c12c 2591CC="$ac_cv_prog_CC"
252b5132 2592if test -n "$CC"; then
6be7c12c 2593 echo "$ac_t""$CC" 1>&6
252b5132 2594else
6be7c12c 2595 echo "$ac_t""no" 1>&6
252b5132 2596fi
6be7c12c
AO
2597 ;;
2598 esac
2599 fi
2600 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
b3baf5d0 2601fi
252b5132 2602
6be7c12c 2603echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
4615568e 2604echo "configure:2605: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132 2605
6be7c12c
AO
2606ac_ext=c
2607# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2608ac_cpp='$CPP $CPPFLAGS'
2609ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2610ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2611cross_compiling=$ac_cv_prog_cc_cross
252b5132 2612
6be7c12c 2613cat > conftest.$ac_ext << EOF
252b5132 2614
4615568e 2615#line 2616 "configure"
6be7c12c
AO
2616#include "confdefs.h"
2617
2618main(){return(0);}
2619EOF
4615568e 2620if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
2621 ac_cv_prog_cc_works=yes
2622 # If we can't run a trivial program, we are probably using a cross compiler.
2623 if (./conftest; exit) 2>/dev/null; then
2624 ac_cv_prog_cc_cross=no
2625 else
2626 ac_cv_prog_cc_cross=yes
2627 fi
2628else
2629 echo "configure: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 ac_cv_prog_cc_works=no
252b5132 2632fi
6be7c12c
AO
2633rm -fr conftest*
2634ac_ext=c
2635# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2636ac_cpp='$CPP $CPPFLAGS'
2637ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2638ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2639cross_compiling=$ac_cv_prog_cc_cross
252b5132 2640
6be7c12c
AO
2641echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2642if test $ac_cv_prog_cc_works = no; then
2643 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2644fi
2645echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
4615568e 2646echo "configure:2647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
6be7c12c
AO
2647echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2648cross_compiling=$ac_cv_prog_cc_cross
b3baf5d0 2649
6be7c12c 2650echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
4615568e 2651echo "configure:2652: checking whether we are using GNU C" >&5
6be7c12c
AO
2652if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2654else
6be7c12c
AO
2655 cat > conftest.c <<EOF
2656#ifdef __GNUC__
2657 yes;
252b5132 2658#endif
6be7c12c 2659EOF
4615568e 2660if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
6be7c12c
AO
2661 ac_cv_prog_gcc=yes
2662else
2663 ac_cv_prog_gcc=no
2664fi
2665fi
252b5132 2666
6be7c12c 2667echo "$ac_t""$ac_cv_prog_gcc" 1>&6
252b5132 2668
6be7c12c
AO
2669if test $ac_cv_prog_gcc = yes; then
2670 GCC=yes
2671else
2672 GCC=
2673fi
252b5132 2674
6be7c12c
AO
2675ac_test_CFLAGS="${CFLAGS+set}"
2676ac_save_CFLAGS="$CFLAGS"
2677CFLAGS=
2678echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
4615568e 2679echo "configure:2680: checking whether ${CC-cc} accepts -g" >&5
6be7c12c
AO
2680if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2681 echo $ac_n "(cached) $ac_c" 1>&6
2682else
2683 echo 'void f(){}' > conftest.c
2684if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
252b5132
RH
2685 ac_cv_prog_cc_g=yes
2686else
6be7c12c 2687 ac_cv_prog_cc_g=no
252b5132 2688fi
6be7c12c
AO
2689rm -f conftest*
2690
252b5132 2691fi
6be7c12c
AO
2692
2693echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
252b5132 2694if test "$ac_test_CFLAGS" = set; then
6be7c12c 2695 CFLAGS="$ac_save_CFLAGS"
252b5132
RH
2696elif test $ac_cv_prog_cc_g = yes; then
2697 if test "$GCC" = yes; then
2698 CFLAGS="-g -O2"
2699 else
2700 CFLAGS="-g"
2701 fi
2702else
2703 if test "$GCC" = yes; then
2704 CFLAGS="-O2"
2705 else
2706 CFLAGS=
2707 fi
2708fi
2709
2710
f9d1e83f 2711ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
6be7c12c 2712echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
4615568e 2713echo "configure:2714: checking how to run the C preprocessor" >&5
252b5132
RH
2714# On Suns, sometimes $CPP names a directory.
2715if test -n "$CPP" && test -d "$CPP"; then
2716 CPP=
2717fi
2718if test -z "$CPP"; then
6be7c12c
AO
2719if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2720 echo $ac_n "(cached) $ac_c" 1>&6
2721else
2722 # This must be in double quotes, not single quotes, because CPP may get
2723 # substituted into the Makefile and "${CC-cc}" will confuse make.
2724 CPP="${CC-cc} -E"
2725 # On the NeXT, cc -E runs the code through the compiler's parser,
2726 # not just through cpp.
2727 cat > conftest.$ac_ext <<EOF
4615568e 2728#line 2729 "configure"
252b5132
RH
2729#include "confdefs.h"
2730#include <assert.h>
6be7c12c
AO
2731Syntax Error
2732EOF
2733ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 2734{ (eval echo configure:2735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2735ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2736if test -z "$ac_err"; then
2737 :
252b5132 2738else
6be7c12c
AO
2739 echo "$ac_err" >&5
2740 echo "configure: failed program was:" >&5
2741 cat conftest.$ac_ext >&5
2742 rm -rf conftest*
2743 CPP="${CC-cc} -E -traditional-cpp"
2744 cat > conftest.$ac_ext <<EOF
4615568e 2745#line 2746 "configure"
252b5132 2746#include "confdefs.h"
6be7c12c
AO
2747#include <assert.h>
2748Syntax Error
2749EOF
2750ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 2751{ (eval echo configure:2752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2752ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2753if test -z "$ac_err"; then
2754 :
252b5132 2755else
6be7c12c
AO
2756 echo "$ac_err" >&5
2757 echo "configure: failed program was:" >&5
252b5132 2758 cat conftest.$ac_ext >&5
6be7c12c
AO
2759 rm -rf conftest*
2760 CPP="${CC-cc} -nologo -E"
2761 cat > conftest.$ac_ext <<EOF
4615568e 2762#line 2763 "configure"
6be7c12c
AO
2763#include "confdefs.h"
2764#include <assert.h>
2765Syntax Error
2766EOF
2767ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 2768{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2769ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2770if test -z "$ac_err"; then
2771 :
b3baf5d0 2772else
6be7c12c
AO
2773 echo "$ac_err" >&5
2774 echo "configure: failed program was:" >&5
b3baf5d0 2775 cat conftest.$ac_ext >&5
6be7c12c
AO
2776 rm -rf conftest*
2777 CPP=/lib/cpp
252b5132 2778fi
6be7c12c 2779rm -f conftest*
252b5132 2780fi
6be7c12c 2781rm -f conftest*
252b5132 2782fi
6be7c12c
AO
2783rm -f conftest*
2784 ac_cv_prog_CPP="$CPP"
2785fi
2786 CPP="$ac_cv_prog_CPP"
ac48eca1 2787else
6be7c12c 2788 ac_cv_prog_CPP="$CPP"
b3baf5d0 2789fi
6be7c12c
AO
2790echo "$ac_t""$CPP" 1>&6
2791
2792# Extract the first word of "ranlib", so it can be a program name with args.
2793set dummy ranlib; ac_word=$2
2794echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 2795echo "configure:2796: checking for $ac_word" >&5
6be7c12c
AO
2796if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2797 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 2798else
6be7c12c
AO
2799 if test -n "$RANLIB"; then
2800 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2801else
2802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2803 ac_dummy="$PATH"
2804 for ac_dir in $ac_dummy; do
2805 test -z "$ac_dir" && ac_dir=.
2806 if test -f $ac_dir/$ac_word; then
2807 ac_cv_prog_RANLIB="ranlib"
2808 break
ac48eca1 2809 fi
6be7c12c
AO
2810 done
2811 IFS="$ac_save_ifs"
2812 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
ac48eca1
AO
2813fi
2814fi
6be7c12c
AO
2815RANLIB="$ac_cv_prog_RANLIB"
2816if test -n "$RANLIB"; then
2817 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 2818else
6be7c12c 2819 echo "$ac_t""no" 1>&6
b3baf5d0 2820fi
ac48eca1 2821
6be7c12c 2822echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4615568e 2823echo "configure:2824: checking for ANSI C header files" >&5
6be7c12c
AO
2824if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2825 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2826else
6be7c12c 2827 cat > conftest.$ac_ext <<EOF
4615568e 2828#line 2829 "configure"
252b5132
RH
2829#include "confdefs.h"
2830#include <stdlib.h>
2831#include <stdarg.h>
2832#include <string.h>
2833#include <float.h>
6be7c12c
AO
2834EOF
2835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 2836{ (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2837ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2838if test -z "$ac_err"; then
2839 rm -rf conftest*
252b5132
RH
2840 ac_cv_header_stdc=yes
2841else
6be7c12c
AO
2842 echo "$ac_err" >&5
2843 echo "configure: failed program was:" >&5
252b5132 2844 cat conftest.$ac_ext >&5
6be7c12c 2845 rm -rf conftest*
252b5132
RH
2846 ac_cv_header_stdc=no
2847fi
6be7c12c 2848rm -f conftest*
252b5132
RH
2849
2850if test $ac_cv_header_stdc = yes; then
2851 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6be7c12c 2852cat > conftest.$ac_ext <<EOF
4615568e 2853#line 2854 "configure"
252b5132
RH
2854#include "confdefs.h"
2855#include <string.h>
6be7c12c 2856EOF
252b5132
RH
2857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2858 egrep "memchr" >/dev/null 2>&1; then
2859 :
2860else
6be7c12c 2861 rm -rf conftest*
252b5132
RH
2862 ac_cv_header_stdc=no
2863fi
2864rm -f conftest*
2865
2866fi
2867
2868if test $ac_cv_header_stdc = yes; then
2869 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6be7c12c 2870cat > conftest.$ac_ext <<EOF
4615568e 2871#line 2872 "configure"
252b5132
RH
2872#include "confdefs.h"
2873#include <stdlib.h>
6be7c12c 2874EOF
252b5132
RH
2875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2876 egrep "free" >/dev/null 2>&1; then
2877 :
2878else
6be7c12c 2879 rm -rf conftest*
252b5132
RH
2880 ac_cv_header_stdc=no
2881fi
2882rm -f conftest*
2883
2884fi
2885
2886if test $ac_cv_header_stdc = yes; then
2887 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6be7c12c 2888if test "$cross_compiling" = yes; then
252b5132
RH
2889 :
2890else
6be7c12c 2891 cat > conftest.$ac_ext <<EOF
4615568e 2892#line 2893 "configure"
252b5132
RH
2893#include "confdefs.h"
2894#include <ctype.h>
6be7c12c
AO
2895#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2896#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
b3baf5d0 2897#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6be7c12c
AO
2898int main () { int i; for (i = 0; i < 256; i++)
2899if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2900exit (0); }
2901
2902EOF
4615568e 2903if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 2904then
252b5132
RH
2905 :
2906else
6be7c12c
AO
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 rm -fr conftest*
2910 ac_cv_header_stdc=no
252b5132 2911fi
6be7c12c 2912rm -fr conftest*
252b5132 2913fi
6be7c12c 2914
252b5132
RH
2915fi
2916fi
b3baf5d0 2917
6be7c12c
AO
2918echo "$ac_t""$ac_cv_header_stdc" 1>&6
2919if test $ac_cv_header_stdc = yes; then
2920 cat >> confdefs.h <<\EOF
252b5132
RH
2921#define STDC_HEADERS 1
2922EOF
2923
2924fi
2925
6be7c12c 2926echo $ac_n "checking for working const""... $ac_c" 1>&6
4615568e 2927echo "configure:2928: checking for working const" >&5
6be7c12c
AO
2928if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2929 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2930else
6be7c12c 2931 cat > conftest.$ac_ext <<EOF
4615568e 2932#line 2933 "configure"
252b5132 2933#include "confdefs.h"
6be7c12c
AO
2934
2935int main() {
2936
2937/* Ultrix mips cc rejects this. */
2938typedef int charset[2]; const charset x;
2939/* SunOS 4.1.1 cc rejects this. */
2940char const *const *ccp;
2941char **p;
2942/* NEC SVR4.0.2 mips cc rejects this. */
2943struct point {int x, y;};
2944static struct point const zero = {0,0};
2945/* AIX XL C 1.02.0.0 rejects this.
2946 It does not let you subtract one const X* pointer from another in an arm
2947 of an if-expression whose if-part is not a constant expression */
2948const char *g = "string";
2949ccp = &g + (g ? g-g : 0);
2950/* HPUX 7.0 cc rejects these. */
2951++ccp;
2952p = (char**) ccp;
2953ccp = (char const *const *) p;
2954{ /* SCO 3.2v4 cc rejects this. */
2955 char *t;
2956 char const *s = 0 ? (char *) 0 : (char const *) 0;
2957
2958 *t++ = 0;
252b5132 2959}
6be7c12c
AO
2960{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2961 int x[] = {25, 17};
2962 const int *foo = &x[0];
2963 ++foo;
252b5132 2964}
6be7c12c
AO
2965{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2966 typedef const int *iptr;
2967 iptr p = 0;
2968 ++p;
252b5132 2969}
6be7c12c
AO
2970{ /* AIX XL C 1.02.0.0 rejects this saying
2971 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2972 struct s { int j; const int *ap[3]; };
2973 struct s *b; b->j = 5;
b3baf5d0 2974}
6be7c12c
AO
2975{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2976 const int foo = 10;
2977}
2978
2979; return 0; }
2980EOF
4615568e 2981if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 2982 rm -rf conftest*
252b5132
RH
2983 ac_cv_c_const=yes
2984else
6be7c12c
AO
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 ac_cv_c_const=no
252b5132 2989fi
6be7c12c 2990rm -f conftest*
252b5132 2991fi
b3baf5d0 2992
6be7c12c
AO
2993echo "$ac_t""$ac_cv_c_const" 1>&6
2994if test $ac_cv_c_const = no; then
2995 cat >> confdefs.h <<\EOF
2996#define const
252b5132
RH
2997EOF
2998
2999fi
3000
6be7c12c 3001echo $ac_n "checking for inline""... $ac_c" 1>&6
4615568e 3002echo "configure:3003: checking for inline" >&5
6be7c12c
AO
3003if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3005else
3006 ac_cv_c_inline=no
3007for ac_kw in inline __inline__ __inline; do
6be7c12c 3008 cat > conftest.$ac_ext <<EOF
4615568e 3009#line 3010 "configure"
252b5132
RH
3010#include "confdefs.h"
3011
6be7c12c
AO
3012int main() {
3013} $ac_kw foo() {
3014; return 0; }
3015EOF
4615568e 3016if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 3017 rm -rf conftest*
252b5132
RH
3018 ac_cv_c_inline=$ac_kw; break
3019else
6be7c12c
AO
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
252b5132 3022fi
6be7c12c 3023rm -f conftest*
252b5132
RH
3024done
3025
3026fi
6be7c12c
AO
3027
3028echo "$ac_t""$ac_cv_c_inline" 1>&6
3029case "$ac_cv_c_inline" in
252b5132 3030 inline | yes) ;;
6be7c12c
AO
3031 no) cat >> confdefs.h <<\EOF
3032#define inline
252b5132
RH
3033EOF
3034 ;;
6be7c12c 3035 *) cat >> confdefs.h <<EOF
252b5132
RH
3036#define inline $ac_cv_c_inline
3037EOF
3038 ;;
3039esac
3040
6be7c12c 3041echo $ac_n "checking for off_t""... $ac_c" 1>&6
4615568e 3042echo "configure:3043: checking for off_t" >&5
6be7c12c
AO
3043if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3044 echo $ac_n "(cached) $ac_c" 1>&6
b3baf5d0 3045else
6be7c12c 3046 cat > conftest.$ac_ext <<EOF
4615568e 3047#line 3048 "configure"
b3baf5d0 3048#include "confdefs.h"
6be7c12c
AO
3049#include <sys/types.h>
3050#if STDC_HEADERS
3051#include <stdlib.h>
3052#include <stddef.h>
3053#endif
3054EOF
3055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3056 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3057 rm -rf conftest*
653f71ca 3058 ac_cv_type_off_t=yes
252b5132 3059else
6be7c12c
AO
3060 rm -rf conftest*
3061 ac_cv_type_off_t=no
252b5132 3062fi
6be7c12c 3063rm -f conftest*
b3baf5d0 3064
6be7c12c
AO
3065fi
3066echo "$ac_t""$ac_cv_type_off_t" 1>&6
3067if test $ac_cv_type_off_t = no; then
3068 cat >> confdefs.h <<\EOF
252b5132
RH
3069#define off_t long
3070EOF
3071
3072fi
3073
6be7c12c 3074echo $ac_n "checking for size_t""... $ac_c" 1>&6
4615568e 3075echo "configure:3076: checking for size_t" >&5
6be7c12c
AO
3076if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3078else
6be7c12c 3079 cat > conftest.$ac_ext <<EOF
4615568e 3080#line 3081 "configure"
252b5132 3081#include "confdefs.h"
6be7c12c
AO
3082#include <sys/types.h>
3083#if STDC_HEADERS
3084#include <stdlib.h>
3085#include <stddef.h>
3086#endif
3087EOF
3088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3089 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3090 rm -rf conftest*
653f71ca 3091 ac_cv_type_size_t=yes
252b5132 3092else
6be7c12c
AO
3093 rm -rf conftest*
3094 ac_cv_type_size_t=no
252b5132 3095fi
6be7c12c 3096rm -f conftest*
b3baf5d0 3097
6be7c12c
AO
3098fi
3099echo "$ac_t""$ac_cv_type_size_t" 1>&6
3100if test $ac_cv_type_size_t = no; then
3101 cat >> confdefs.h <<\EOF
252b5132
RH
3102#define size_t unsigned
3103EOF
3104
3105fi
3106
3107# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3108# for constant arguments. Useless!
6be7c12c 3109echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4615568e 3110echo "configure:3111: checking for working alloca.h" >&5
6be7c12c
AO
3111if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3112 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3113else
6be7c12c 3114 cat > conftest.$ac_ext <<EOF
4615568e 3115#line 3116 "configure"
252b5132
RH
3116#include "confdefs.h"
3117#include <alloca.h>
6be7c12c
AO
3118int main() {
3119char *p = alloca(2 * sizeof(int));
3120; return 0; }
3121EOF
4615568e 3122if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3123 rm -rf conftest*
3124 ac_cv_header_alloca_h=yes
3125else
3126 echo "configure: failed program was:" >&5
3127 cat conftest.$ac_ext >&5
3128 rm -rf conftest*
3129 ac_cv_header_alloca_h=no
3130fi
3131rm -f conftest*
3132fi
3133
3134echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3135if test $ac_cv_header_alloca_h = yes; then
3136 cat >> confdefs.h <<\EOF
252b5132
RH
3137#define HAVE_ALLOCA_H 1
3138EOF
3139
3140fi
3141
6be7c12c 3142echo $ac_n "checking for alloca""... $ac_c" 1>&6
4615568e 3143echo "configure:3144: checking for alloca" >&5
6be7c12c
AO
3144if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3145 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3146else
6be7c12c 3147 cat > conftest.$ac_ext <<EOF
4615568e 3148#line 3149 "configure"
252b5132 3149#include "confdefs.h"
6be7c12c 3150
252b5132
RH
3151#ifdef __GNUC__
3152# define alloca __builtin_alloca
3153#else
3154# ifdef _MSC_VER
3155# include <malloc.h>
3156# define alloca _alloca
3157# else
3158# if HAVE_ALLOCA_H
3159# include <alloca.h>
3160# else
3161# ifdef _AIX
3162 #pragma alloca
3163# else
3164# ifndef alloca /* predefined by HP cc +Olibcalls */
3165char *alloca ();
3166# endif
3167# endif
3168# endif
3169# endif
3170#endif
3171
6be7c12c
AO
3172int main() {
3173char *p = (char *) alloca(1);
3174; return 0; }
3175EOF
4615568e 3176if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3177 rm -rf conftest*
252b5132
RH
3178 ac_cv_func_alloca_works=yes
3179else
6be7c12c
AO
3180 echo "configure: failed program was:" >&5
3181 cat conftest.$ac_ext >&5
3182 rm -rf conftest*
3183 ac_cv_func_alloca_works=no
252b5132 3184fi
6be7c12c 3185rm -f conftest*
252b5132
RH
3186fi
3187
6be7c12c 3188echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
252b5132 3189if test $ac_cv_func_alloca_works = yes; then
6be7c12c 3190 cat >> confdefs.h <<\EOF
252b5132
RH
3191#define HAVE_ALLOCA 1
3192EOF
3193
6be7c12c 3194fi
b3baf5d0 3195
6be7c12c
AO
3196if test $ac_cv_func_alloca_works = no; then
3197 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3198 # that cause trouble. Some versions do not even contain alloca or
3199 # contain a buggy version. If you still want to use their alloca,
3200 # use ar to extract alloca.o from them instead of compiling alloca.c.
3201 ALLOCA=alloca.${ac_objext}
3202 cat >> confdefs.h <<\EOF
252b5132
RH
3203#define C_ALLOCA 1
3204EOF
3205
6be7c12c
AO
3206
3207echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4615568e 3208echo "configure:3209: checking whether alloca needs Cray hooks" >&5
6be7c12c
AO
3209if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3210 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3211else
6be7c12c 3212 cat > conftest.$ac_ext <<EOF
4615568e 3213#line 3214 "configure"
252b5132
RH
3214#include "confdefs.h"
3215#if defined(CRAY) && ! defined(CRAY2)
3216webecray
3217#else
3218wenotbecray
3219#endif
3220
6be7c12c 3221EOF
252b5132
RH
3222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3223 egrep "webecray" >/dev/null 2>&1; then
6be7c12c 3224 rm -rf conftest*
252b5132
RH
3225 ac_cv_os_cray=yes
3226else
6be7c12c 3227 rm -rf conftest*
252b5132
RH
3228 ac_cv_os_cray=no
3229fi
3230rm -f conftest*
3231
3232fi
6be7c12c
AO
3233
3234echo "$ac_t""$ac_cv_os_cray" 1>&6
252b5132 3235if test $ac_cv_os_cray = yes; then
6be7c12c
AO
3236for ac_func in _getb67 GETB67 getb67; do
3237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 3238echo "configure:3239: checking for $ac_func" >&5
6be7c12c
AO
3239if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3240 echo $ac_n "(cached) $ac_c" 1>&6
3241else
3242 cat > conftest.$ac_ext <<EOF
4615568e 3243#line 3244 "configure"
252b5132
RH
3244#include "confdefs.h"
3245/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3246 which can conflict with char $ac_func(); below. */
252b5132
RH
3247#include <assert.h>
3248/* Override any gcc2 internal prototype to avoid an error. */
3249/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3250 builtin and then its argument prototype would still apply. */
3251char $ac_func();
3252
3253int main() {
252b5132
RH
3254
3255/* The GNU C library defines this for functions which it implements
3256 to always fail with ENOSYS. Some functions are actually named
3257 something starting with __ and the normal name is an alias. */
3258#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3259choke me
3260#else
6be7c12c 3261$ac_func();
252b5132
RH
3262#endif
3263
6be7c12c
AO
3264; return 0; }
3265EOF
4615568e 3266if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3267 rm -rf conftest*
3268 eval "ac_cv_func_$ac_func=yes"
3269else
3270 echo "configure: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 rm -rf conftest*
3273 eval "ac_cv_func_$ac_func=no"
3274fi
3275rm -f conftest*
3276fi
3277
3278if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3279 echo "$ac_t""yes" 1>&6
3280 cat >> confdefs.h <<EOF
252b5132
RH
3281#define CRAY_STACKSEG_END $ac_func
3282EOF
3283
6be7c12c
AO
3284 break
3285else
3286 echo "$ac_t""no" 1>&6
252b5132
RH
3287fi
3288
6be7c12c 3289done
252b5132
RH
3290fi
3291
6be7c12c 3292echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4615568e 3293echo "configure:3294: checking stack direction for C alloca" >&5
6be7c12c
AO
3294if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3295 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3296else
3297 if test "$cross_compiling" = yes; then
3298 ac_cv_c_stack_direction=0
3299else
6be7c12c 3300 cat > conftest.$ac_ext <<EOF
4615568e 3301#line 3302 "configure"
252b5132
RH
3302#include "confdefs.h"
3303find_stack_direction ()
3304{
3305 static char *addr = 0;
3306 auto char dummy;
3307 if (addr == 0)
3308 {
3309 addr = &dummy;
3310 return find_stack_direction ();
3311 }
3312 else
3313 return (&dummy > addr) ? 1 : -1;
3314}
3315main ()
3316{
6be7c12c 3317 exit (find_stack_direction() < 0);
252b5132 3318}
6be7c12c 3319EOF
4615568e 3320if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 3321then
252b5132
RH
3322 ac_cv_c_stack_direction=1
3323else
6be7c12c
AO
3324 echo "configure: failed program was:" >&5
3325 cat conftest.$ac_ext >&5
3326 rm -fr conftest*
3327 ac_cv_c_stack_direction=-1
252b5132 3328fi
6be7c12c 3329rm -fr conftest*
252b5132 3330fi
6be7c12c 3331
252b5132
RH
3332fi
3333
6be7c12c
AO
3334echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3335cat >> confdefs.h <<EOF
252b5132
RH
3336#define STACK_DIRECTION $ac_cv_c_stack_direction
3337EOF
3338
3339fi
3340
4615568e 3341for ac_hdr in unistd.h
252b5132 3342do
6be7c12c
AO
3343ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3344echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615568e 3345echo "configure:3346: checking for $ac_hdr" >&5
6be7c12c
AO
3346if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3347 echo $ac_n "(cached) $ac_c" 1>&6
3348else
3349 cat > conftest.$ac_ext <<EOF
4615568e 3350#line 3351 "configure"
252b5132 3351#include "confdefs.h"
6be7c12c
AO
3352#include <$ac_hdr>
3353EOF
3354ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 3355{ (eval echo configure:3356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3356ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3357if test -z "$ac_err"; then
3358 rm -rf conftest*
3359 eval "ac_cv_header_$ac_safe=yes"
252b5132 3360else
6be7c12c
AO
3361 echo "$ac_err" >&5
3362 echo "configure: failed program was:" >&5
252b5132 3363 cat conftest.$ac_ext >&5
6be7c12c
AO
3364 rm -rf conftest*
3365 eval "ac_cv_header_$ac_safe=no"
252b5132 3366fi
6be7c12c 3367rm -f conftest*
252b5132 3368fi
6be7c12c
AO
3369if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3370 echo "$ac_t""yes" 1>&6
3371 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3372 cat >> confdefs.h <<EOF
3373#define $ac_tr_hdr 1
252b5132 3374EOF
6be7c12c
AO
3375
3376else
3377 echo "$ac_t""no" 1>&6
252b5132
RH
3378fi
3379done
3380
3381for ac_func in getpagesize
3382do
6be7c12c 3383echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 3384echo "configure:3385: checking for $ac_func" >&5
6be7c12c
AO
3385if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3386 echo $ac_n "(cached) $ac_c" 1>&6
3387else
3388 cat > conftest.$ac_ext <<EOF
4615568e 3389#line 3390 "configure"
252b5132
RH
3390#include "confdefs.h"
3391/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3392 which can conflict with char $ac_func(); below. */
252b5132
RH
3393#include <assert.h>
3394/* Override any gcc2 internal prototype to avoid an error. */
3395/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3396 builtin and then its argument prototype would still apply. */
3397char $ac_func();
3398
3399int main() {
252b5132
RH
3400
3401/* The GNU C library defines this for functions which it implements
3402 to always fail with ENOSYS. Some functions are actually named
3403 something starting with __ and the normal name is an alias. */
3404#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3405choke me
3406#else
6be7c12c 3407$ac_func();
252b5132
RH
3408#endif
3409
6be7c12c 3410; return 0; }
252b5132 3411EOF
4615568e 3412if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3413 rm -rf conftest*
3414 eval "ac_cv_func_$ac_func=yes"
3415else
3416 echo "configure: failed program was:" >&5
3417 cat conftest.$ac_ext >&5
3418 rm -rf conftest*
3419 eval "ac_cv_func_$ac_func=no"
3420fi
3421rm -f conftest*
3422fi
252b5132 3423
6be7c12c
AO
3424if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3425 echo "$ac_t""yes" 1>&6
3426 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3427 cat >> confdefs.h <<EOF
3428#define $ac_tr_func 1
3429EOF
3430
3431else
3432 echo "$ac_t""no" 1>&6
252b5132
RH
3433fi
3434done
3435
6be7c12c 3436echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4615568e 3437echo "configure:3438: checking for working mmap" >&5
6be7c12c
AO
3438if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3439 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3440else
3441 if test "$cross_compiling" = yes; then
3442 ac_cv_func_mmap_fixed_mapped=no
3443else
6be7c12c 3444 cat > conftest.$ac_ext <<EOF
4615568e 3445#line 3446 "configure"
252b5132 3446#include "confdefs.h"
6be7c12c 3447
252b5132
RH
3448/* Thanks to Mike Haertel and Jim Avera for this test.
3449 Here is a matrix of mmap possibilities:
3450 mmap private not fixed
3451 mmap private fixed at somewhere currently unmapped
3452 mmap private fixed at somewhere already mapped
3453 mmap shared not fixed
3454 mmap shared fixed at somewhere currently unmapped
3455 mmap shared fixed at somewhere already mapped
3456 For private mappings, we should verify that changes cannot be read()
3457 back from the file, nor mmap's back from the file at a different
3458 address. (There have been systems where private was not correctly
3459 implemented like the infamous i386 svr4.0, and systems where the
6be7c12c 3460 VM page cache was not coherent with the filesystem buffer cache
252b5132
RH
3461 like early versions of FreeBSD and possibly contemporary NetBSD.)
3462 For shared mappings, we should conversely verify that changes get
3463 propogated back to all the places they're supposed to be.
3464
3465 Grep wants private fixed already mapped.
3466 The main things grep needs to know about mmap are:
3467 * does it exist and is it safe to write into the mmap'd area
3468 * how to use it (BSD variants) */
3469#include <sys/types.h>
3470#include <fcntl.h>
3471#include <sys/mman.h>
3472
b3baf5d0 3473/* This mess was copied from the GNU getpagesize.h. */
6be7c12c 3474#ifndef HAVE_GETPAGESIZE
4615568e
NC
3475# ifdef HAVE_UNISTD_H
3476# include <unistd.h>
3477# endif
6be7c12c 3478
252b5132 3479/* Assume that all systems that can run configure have sys/param.h. */
6be7c12c 3480# ifndef HAVE_SYS_PARAM_H
252b5132
RH
3481# define HAVE_SYS_PARAM_H 1
3482# endif
3483
3484# ifdef _SC_PAGESIZE
3485# define getpagesize() sysconf(_SC_PAGESIZE)
3486# else /* no _SC_PAGESIZE */
6be7c12c 3487# ifdef HAVE_SYS_PARAM_H
252b5132
RH
3488# include <sys/param.h>
3489# ifdef EXEC_PAGESIZE
3490# define getpagesize() EXEC_PAGESIZE
3491# else /* no EXEC_PAGESIZE */
3492# ifdef NBPG
3493# define getpagesize() NBPG * CLSIZE
3494# ifndef CLSIZE
3495# define CLSIZE 1
3496# endif /* no CLSIZE */
3497# else /* no NBPG */
3498# ifdef NBPC
3499# define getpagesize() NBPC
3500# else /* no NBPC */
3501# ifdef PAGESIZE
3502# define getpagesize() PAGESIZE
3503# endif /* PAGESIZE */
3504# endif /* no NBPC */
3505# endif /* no NBPG */
3506# endif /* no EXEC_PAGESIZE */
3507# else /* no HAVE_SYS_PARAM_H */
3508# define getpagesize() 8192 /* punt totally */
3509# endif /* no HAVE_SYS_PARAM_H */
3510# endif /* no _SC_PAGESIZE */
3511
3512#endif /* no HAVE_GETPAGESIZE */
3513
6be7c12c
AO
3514#ifdef __cplusplus
3515extern "C" { void *malloc(unsigned); }
3516#else
3517char *malloc();
3518#endif
3519
252b5132 3520int
6be7c12c 3521main()
252b5132 3522{
6be7c12c
AO
3523 char *data, *data2, *data3;
3524 int i, pagesize;
3525 int fd;
3526
3527 pagesize = getpagesize();
3528
3529 /*
3530 * First, make a file with some known garbage in it.
3531 */
3532 data = malloc(pagesize);
3533 if (!data)
3534 exit(1);
3535 for (i = 0; i < pagesize; ++i)
3536 *(data + i) = rand();
3537 umask(0);
3538 fd = creat("conftestmmap", 0600);
3539 if (fd < 0)
3540 exit(1);
3541 if (write(fd, data, pagesize) != pagesize)
3542 exit(1);
3543 close(fd);
3544
3545 /*
3546 * Next, try to mmap the file at a fixed address which
3547 * already has something else allocated at it. If we can,
3548 * also make sure that we see the same garbage.
3549 */
3550 fd = open("conftestmmap", O_RDWR);
3551 if (fd < 0)
3552 exit(1);
3553 data2 = malloc(2 * pagesize);
3554 if (!data2)
3555 exit(1);
3556 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3557 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3558 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3559 exit(1);
3560 for (i = 0; i < pagesize; ++i)
3561 if (*(data + i) != *(data2 + i))
3562 exit(1);
3563
3564 /*
3565 * Finally, make sure that changes to the mapped area
3566 * do not percolate back to the file as seen by read().
3567 * (This is a bug on some variants of i386 svr4.0.)
3568 */
3569 for (i = 0; i < pagesize; ++i)
3570 *(data2 + i) = *(data2 + i) + 1;
3571 data3 = malloc(pagesize);
3572 if (!data3)
3573 exit(1);
3574 if (read(fd, data3, pagesize) != pagesize)
3575 exit(1);
3576 for (i = 0; i < pagesize; ++i)
3577 if (*(data + i) != *(data3 + i))
3578 exit(1);
3579 close(fd);
3580 unlink("conftestmmap");
3581 exit(0);
252b5132 3582}
6be7c12c
AO
3583
3584EOF
4615568e 3585if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 3586then
252b5132
RH
3587 ac_cv_func_mmap_fixed_mapped=yes
3588else
6be7c12c
AO
3589 echo "configure: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3591 rm -fr conftest*
3592 ac_cv_func_mmap_fixed_mapped=no
252b5132 3593fi
6be7c12c 3594rm -fr conftest*
252b5132 3595fi
6be7c12c 3596
252b5132 3597fi
b3baf5d0 3598
6be7c12c
AO
3599echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3600if test $ac_cv_func_mmap_fixed_mapped = yes; then
3601 cat >> confdefs.h <<\EOF
252b5132
RH
3602#define HAVE_MMAP 1
3603EOF
3604
3605fi
3606
6be7c12c
AO
3607
3608 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
252b5132
RH
3609unistd.h values.h sys/param.h
3610do
6be7c12c
AO
3611ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3612echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615568e 3613echo "configure:3614: checking for $ac_hdr" >&5
6be7c12c
AO
3614if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3616else
3617 cat > conftest.$ac_ext <<EOF
4615568e 3618#line 3619 "configure"
252b5132 3619#include "confdefs.h"
6be7c12c
AO
3620#include <$ac_hdr>
3621EOF
3622ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 3623{ (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3624ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3625if test -z "$ac_err"; then
3626 rm -rf conftest*
3627 eval "ac_cv_header_$ac_safe=yes"
252b5132 3628else
6be7c12c
AO
3629 echo "$ac_err" >&5
3630 echo "configure: failed program was:" >&5
252b5132 3631 cat conftest.$ac_ext >&5
6be7c12c
AO
3632 rm -rf conftest*
3633 eval "ac_cv_header_$ac_safe=no"
252b5132 3634fi
6be7c12c 3635rm -f conftest*
252b5132 3636fi
6be7c12c
AO
3637if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3638 echo "$ac_t""yes" 1>&6
3639 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3640 cat >> confdefs.h <<EOF
3641#define $ac_tr_hdr 1
252b5132 3642EOF
6be7c12c
AO
3643
3644else
3645 echo "$ac_t""no" 1>&6
252b5132
RH
3646fi
3647done
3648
6be7c12c 3649 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
252b5132
RH
3650__argz_count __argz_stringify __argz_next
3651do
6be7c12c 3652echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 3653echo "configure:3654: checking for $ac_func" >&5
6be7c12c
AO
3654if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3655 echo $ac_n "(cached) $ac_c" 1>&6
3656else
3657 cat > conftest.$ac_ext <<EOF
4615568e 3658#line 3659 "configure"
252b5132
RH
3659#include "confdefs.h"
3660/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3661 which can conflict with char $ac_func(); below. */
252b5132
RH
3662#include <assert.h>
3663/* Override any gcc2 internal prototype to avoid an error. */
3664/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3665 builtin and then its argument prototype would still apply. */
3666char $ac_func();
3667
3668int main() {
252b5132
RH
3669
3670/* The GNU C library defines this for functions which it implements
3671 to always fail with ENOSYS. Some functions are actually named
3672 something starting with __ and the normal name is an alias. */
3673#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3674choke me
3675#else
6be7c12c 3676$ac_func();
252b5132
RH
3677#endif
3678
6be7c12c 3679; return 0; }
252b5132 3680EOF
4615568e 3681if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3682 rm -rf conftest*
3683 eval "ac_cv_func_$ac_func=yes"
3684else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
3688 eval "ac_cv_func_$ac_func=no"
3689fi
3690rm -f conftest*
3691fi
252b5132 3692
6be7c12c
AO
3693if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3694 echo "$ac_t""yes" 1>&6
3695 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3696 cat >> confdefs.h <<EOF
3697#define $ac_tr_func 1
3698EOF
3699
3700else
3701 echo "$ac_t""no" 1>&6
252b5132
RH
3702fi
3703done
3704
b3baf5d0 3705
6be7c12c
AO
3706 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3707 for ac_func in stpcpy
252b5132 3708do
6be7c12c 3709echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 3710echo "configure:3711: checking for $ac_func" >&5
6be7c12c
AO
3711if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
3713else
3714 cat > conftest.$ac_ext <<EOF
4615568e 3715#line 3716 "configure"
252b5132
RH
3716#include "confdefs.h"
3717/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3718 which can conflict with char $ac_func(); below. */
252b5132
RH
3719#include <assert.h>
3720/* Override any gcc2 internal prototype to avoid an error. */
3721/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3722 builtin and then its argument prototype would still apply. */
3723char $ac_func();
3724
3725int main() {
252b5132
RH
3726
3727/* The GNU C library defines this for functions which it implements
3728 to always fail with ENOSYS. Some functions are actually named
3729 something starting with __ and the normal name is an alias. */
3730#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3731choke me
3732#else
6be7c12c 3733$ac_func();
252b5132
RH
3734#endif
3735
6be7c12c 3736; return 0; }
252b5132 3737EOF
4615568e 3738if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3739 rm -rf conftest*
3740 eval "ac_cv_func_$ac_func=yes"
3741else
3742 echo "configure: failed program was:" >&5
3743 cat conftest.$ac_ext >&5
3744 rm -rf conftest*
3745 eval "ac_cv_func_$ac_func=no"
3746fi
3747rm -f conftest*
3748fi
252b5132 3749
6be7c12c
AO
3750if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3751 echo "$ac_t""yes" 1>&6
3752 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3753 cat >> confdefs.h <<EOF
3754#define $ac_tr_func 1
3755EOF
3756
3757else
3758 echo "$ac_t""no" 1>&6
252b5132
RH
3759fi
3760done
3761
3762 fi
3763 if test "${ac_cv_func_stpcpy}" = "yes"; then
6be7c12c 3764 cat >> confdefs.h <<\EOF
252b5132
RH
3765#define HAVE_STPCPY 1
3766EOF
3767
3768 fi
3769
3770 if test $ac_cv_header_locale_h = yes; then
6be7c12c 3771 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4615568e 3772echo "configure:3773: checking for LC_MESSAGES" >&5
6be7c12c
AO
3773if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3774 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3775else
6be7c12c 3776 cat > conftest.$ac_ext <<EOF
4615568e 3777#line 3778 "configure"
252b5132
RH
3778#include "confdefs.h"
3779#include <locale.h>
6be7c12c 3780int main() {
252b5132 3781return LC_MESSAGES
6be7c12c
AO
3782; return 0; }
3783EOF
4615568e 3784if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3785 rm -rf conftest*
252b5132
RH
3786 am_cv_val_LC_MESSAGES=yes
3787else
6be7c12c
AO
3788 echo "configure: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790 rm -rf conftest*
3791 am_cv_val_LC_MESSAGES=no
252b5132 3792fi
6be7c12c 3793rm -f conftest*
252b5132 3794fi
b3baf5d0 3795
6be7c12c
AO
3796echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3797 if test $am_cv_val_LC_MESSAGES = yes; then
3798 cat >> confdefs.h <<\EOF
252b5132
RH
3799#define HAVE_LC_MESSAGES 1
3800EOF
3801
3802 fi
3803 fi
6be7c12c 3804 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4615568e 3805echo "configure:3806: checking whether NLS is requested" >&5
252b5132
RH
3806 # Check whether --enable-nls or --disable-nls was given.
3807if test "${enable_nls+set}" = set; then
3808 enableval="$enable_nls"
3809 USE_NLS=$enableval
3810else
3811 USE_NLS=yes
6be7c12c
AO
3812fi
3813
3814 echo "$ac_t""$USE_NLS" 1>&6
3815
252b5132
RH
3816
3817 USE_INCLUDED_LIBINTL=no
3818
3819 if test "$USE_NLS" = "yes"; then
6be7c12c 3820 cat >> confdefs.h <<\EOF
252b5132
RH
3821#define ENABLE_NLS 1
3822EOF
3823
6be7c12c 3824 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4615568e 3825echo "configure:3826: checking whether included gettext is requested" >&5
6be7c12c 3826 # Check whether --with-included-gettext or --without-included-gettext was given.
252b5132
RH
3827if test "${with_included_gettext+set}" = set; then
3828 withval="$with_included_gettext"
3829 nls_cv_force_use_gnu_gettext=$withval
3830else
3831 nls_cv_force_use_gnu_gettext=no
6be7c12c
AO
3832fi
3833
3834 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
252b5132
RH
3835
3836 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3837 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3838 nls_cv_header_intl=
3839 nls_cv_header_libgt=
3840 CATOBJEXT=NONE
3841
6be7c12c
AO
3842 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3843echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4615568e 3844echo "configure:3845: checking for libintl.h" >&5
6be7c12c
AO
3845if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3847else
6be7c12c 3848 cat > conftest.$ac_ext <<EOF
4615568e 3849#line 3850 "configure"
252b5132
RH
3850#include "confdefs.h"
3851#include <libintl.h>
6be7c12c
AO
3852EOF
3853ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 3854{ (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3855ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3856if test -z "$ac_err"; then
3857 rm -rf conftest*
3858 eval "ac_cv_header_$ac_safe=yes"
252b5132 3859else
6be7c12c
AO
3860 echo "$ac_err" >&5
3861 echo "configure: failed program was:" >&5
252b5132 3862 cat conftest.$ac_ext >&5
6be7c12c
AO
3863 rm -rf conftest*
3864 eval "ac_cv_header_$ac_safe=no"
252b5132 3865fi
6be7c12c 3866rm -f conftest*
252b5132 3867fi
6be7c12c
AO
3868if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3869 echo "$ac_t""yes" 1>&6
3870 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4615568e 3871echo "configure:3872: checking for gettext in libc" >&5
6be7c12c
AO
3872if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3874else
6be7c12c 3875 cat > conftest.$ac_ext <<EOF
4615568e 3876#line 3877 "configure"
252b5132
RH
3877#include "confdefs.h"
3878#include <libintl.h>
6be7c12c 3879int main() {
252b5132 3880return (int) gettext ("")
6be7c12c
AO
3881; return 0; }
3882EOF
4615568e 3883if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3884 rm -rf conftest*
252b5132
RH
3885 gt_cv_func_gettext_libc=yes
3886else
6be7c12c
AO
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889 rm -rf conftest*
3890 gt_cv_func_gettext_libc=no
252b5132 3891fi
6be7c12c 3892rm -f conftest*
252b5132 3893fi
6be7c12c
AO
3894
3895echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
252b5132
RH
3896
3897 if test "$gt_cv_func_gettext_libc" != "yes"; then
6be7c12c 3898 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4615568e 3899echo "configure:3900: checking for bindtextdomain in -lintl" >&5
6be7c12c
AO
3900ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3901if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3902 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3903else
6be7c12c 3904 ac_save_LIBS="$LIBS"
252b5132 3905LIBS="-lintl $LIBS"
6be7c12c 3906cat > conftest.$ac_ext <<EOF
4615568e 3907#line 3908 "configure"
252b5132
RH
3908#include "confdefs.h"
3909/* Override any gcc2 internal prototype to avoid an error. */
3910/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3911 builtin and then its argument prototype would still apply. */
3912char bindtextdomain();
3913
3914int main() {
3915bindtextdomain()
3916; return 0; }
3917EOF
4615568e 3918if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3919 rm -rf conftest*
3920 eval "ac_cv_lib_$ac_lib_var=yes"
3921else
3922 echo "configure: failed program was:" >&5
3923 cat conftest.$ac_ext >&5
3924 rm -rf conftest*
3925 eval "ac_cv_lib_$ac_lib_var=no"
3926fi
3927rm -f conftest*
3928LIBS="$ac_save_LIBS"
3929
3930fi
3931if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3932 echo "$ac_t""yes" 1>&6
3933 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4615568e 3934echo "configure:3935: checking for gettext in libintl" >&5
6be7c12c
AO
3935if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3936 echo $ac_n "(cached) $ac_c" 1>&6
3937else
3938 cat > conftest.$ac_ext <<EOF
4615568e 3939#line 3940 "configure"
252b5132
RH
3940#include "confdefs.h"
3941
6be7c12c 3942int main() {
252b5132 3943return (int) gettext ("")
6be7c12c
AO
3944; return 0; }
3945EOF
4615568e 3946if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3947 rm -rf conftest*
252b5132
RH
3948 gt_cv_func_gettext_libintl=yes
3949else
6be7c12c
AO
3950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -rf conftest*
3953 gt_cv_func_gettext_libintl=no
252b5132 3954fi
6be7c12c 3955rm -f conftest*
252b5132 3956fi
6be7c12c
AO
3957
3958echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3959else
3960 echo "$ac_t""no" 1>&6
252b5132
RH
3961fi
3962
3963 fi
3964
3965 if test "$gt_cv_func_gettext_libc" = "yes" \
3966 || test "$gt_cv_func_gettext_libintl" = "yes"; then
6be7c12c 3967 cat >> confdefs.h <<\EOF
252b5132
RH
3968#define HAVE_GETTEXT 1
3969EOF
3970
3971 # Extract the first word of "msgfmt", so it can be a program name with args.
3972set dummy msgfmt; ac_word=$2
6be7c12c 3973echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 3974echo "configure:3975: checking for $ac_word" >&5
6be7c12c
AO
3975if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3976 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3977else
3978 case "$MSGFMT" in
3979 /*)
3980 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3981 ;;
3982 *)
3983 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3984 for ac_dir in $PATH; do
3985 test -z "$ac_dir" && ac_dir=.
3986 if test -f $ac_dir/$ac_word; then
3987 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3988 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3989 break
3990 fi
3991 fi
3992 done
3993 IFS="$ac_save_ifs"
3994 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3995 ;;
3996esac
3997fi
3998MSGFMT="$ac_cv_path_MSGFMT"
3999if test -n "$MSGFMT"; then
6be7c12c 4000 echo "$ac_t""$MSGFMT" 1>&6
252b5132 4001else
6be7c12c 4002 echo "$ac_t""no" 1>&6
252b5132
RH
4003fi
4004 if test "$MSGFMT" != "no"; then
6be7c12c 4005 for ac_func in dcgettext
252b5132 4006do
6be7c12c 4007echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 4008echo "configure:4009: checking for $ac_func" >&5
6be7c12c
AO
4009if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011else
4012 cat > conftest.$ac_ext <<EOF
4615568e 4013#line 4014 "configure"
252b5132
RH
4014#include "confdefs.h"
4015/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 4016 which can conflict with char $ac_func(); below. */
252b5132
RH
4017#include <assert.h>
4018/* Override any gcc2 internal prototype to avoid an error. */
4019/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4020 builtin and then its argument prototype would still apply. */
4021char $ac_func();
4022
4023int main() {
252b5132
RH
4024
4025/* The GNU C library defines this for functions which it implements
4026 to always fail with ENOSYS. Some functions are actually named
4027 something starting with __ and the normal name is an alias. */
4028#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4029choke me
4030#else
6be7c12c 4031$ac_func();
252b5132
RH
4032#endif
4033
6be7c12c 4034; return 0; }
252b5132 4035EOF
4615568e 4036if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4037 rm -rf conftest*
4038 eval "ac_cv_func_$ac_func=yes"
4039else
4040 echo "configure: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 rm -rf conftest*
4043 eval "ac_cv_func_$ac_func=no"
4044fi
4045rm -f conftest*
4046fi
252b5132 4047
6be7c12c
AO
4048if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4049 echo "$ac_t""yes" 1>&6
4050 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4051 cat >> confdefs.h <<EOF
4052#define $ac_tr_func 1
4053EOF
4054
4055else
4056 echo "$ac_t""no" 1>&6
252b5132
RH
4057fi
4058done
4059
4060 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4061set dummy gmsgfmt; ac_word=$2
6be7c12c 4062echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 4063echo "configure:4064: checking for $ac_word" >&5
6be7c12c
AO
4064if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4065 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4066else
6be7c12c
AO
4067 case "$GMSGFMT" in
4068 /*)
252b5132
RH
4069 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4070 ;;
6be7c12c
AO
4071 ?:/*)
4072 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4073 ;;
252b5132 4074 *)
6be7c12c
AO
4075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4076 ac_dummy="$PATH"
4077 for ac_dir in $ac_dummy; do
4078 test -z "$ac_dir" && ac_dir=.
4079 if test -f $ac_dir/$ac_word; then
4080 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4081 break
4082 fi
4083 done
4084 IFS="$ac_save_ifs"
252b5132
RH
4085 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4086 ;;
4087esac
4088fi
6be7c12c 4089GMSGFMT="$ac_cv_path_GMSGFMT"
252b5132 4090if test -n "$GMSGFMT"; then
6be7c12c 4091 echo "$ac_t""$GMSGFMT" 1>&6
252b5132 4092else
6be7c12c 4093 echo "$ac_t""no" 1>&6
252b5132
RH
4094fi
4095
4096 # Extract the first word of "xgettext", so it can be a program name with args.
4097set dummy xgettext; ac_word=$2
6be7c12c 4098echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 4099echo "configure:4100: checking for $ac_word" >&5
6be7c12c
AO
4100if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4101 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4102else
4103 case "$XGETTEXT" in
4104 /*)
4105 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4106 ;;
4107 *)
4108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4109 for ac_dir in $PATH; do
4110 test -z "$ac_dir" && ac_dir=.
4111 if test -f $ac_dir/$ac_word; then
4112 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4113 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4114 break
4115 fi
4116 fi
4117 done
4118 IFS="$ac_save_ifs"
4119 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4120 ;;
4121esac
4122fi
4123XGETTEXT="$ac_cv_path_XGETTEXT"
4124if test -n "$XGETTEXT"; then
6be7c12c 4125 echo "$ac_t""$XGETTEXT" 1>&6
252b5132 4126else
6be7c12c 4127 echo "$ac_t""no" 1>&6
252b5132
RH
4128fi
4129
6be7c12c 4130 cat > conftest.$ac_ext <<EOF
4615568e 4131#line 4132 "configure"
252b5132
RH
4132#include "confdefs.h"
4133
6be7c12c 4134int main() {
252b5132
RH
4135extern int _nl_msg_cat_cntr;
4136 return _nl_msg_cat_cntr
6be7c12c
AO
4137; return 0; }
4138EOF
4615568e 4139if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 4140 rm -rf conftest*
252b5132
RH
4141 CATOBJEXT=.gmo
4142 DATADIRNAME=share
4143else
6be7c12c
AO
4144 echo "configure: failed program was:" >&5
4145 cat conftest.$ac_ext >&5
4146 rm -rf conftest*
4147 CATOBJEXT=.mo
252b5132
RH
4148 DATADIRNAME=lib
4149fi
6be7c12c 4150rm -f conftest*
252b5132
RH
4151 INSTOBJEXT=.mo
4152 fi
4153 fi
6be7c12c
AO
4154
4155else
4156 echo "$ac_t""no" 1>&6
b3baf5d0 4157fi
252b5132 4158
6be7c12c
AO
4159
4160
252b5132
RH
4161 if test "$CATOBJEXT" = "NONE"; then
4162 nls_cv_use_gnu_gettext=yes
4163 fi
4164 fi
4165
4166 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4167 INTLOBJS="\$(GETTOBJS)"
4168 # Extract the first word of "msgfmt", so it can be a program name with args.
4169set dummy msgfmt; ac_word=$2
6be7c12c 4170echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 4171echo "configure:4172: checking for $ac_word" >&5
6be7c12c
AO
4172if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4173 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4174else
4175 case "$MSGFMT" in
4176 /*)
4177 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4178 ;;
4179 *)
4180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4181 for ac_dir in $PATH; do
4182 test -z "$ac_dir" && ac_dir=.
4183 if test -f $ac_dir/$ac_word; then
4184 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4185 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4186 break
4187 fi
4188 fi
4189 done
4190 IFS="$ac_save_ifs"
4191 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4192 ;;
4193esac
4194fi
4195MSGFMT="$ac_cv_path_MSGFMT"
4196if test -n "$MSGFMT"; then
6be7c12c 4197 echo "$ac_t""$MSGFMT" 1>&6
252b5132 4198else
6be7c12c 4199 echo "$ac_t""no" 1>&6
252b5132
RH
4200fi
4201
4202 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4203set dummy gmsgfmt; ac_word=$2
6be7c12c 4204echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 4205echo "configure:4206: checking for $ac_word" >&5
6be7c12c
AO
4206if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4207 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4208else
6be7c12c
AO
4209 case "$GMSGFMT" in
4210 /*)
252b5132
RH
4211 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4212 ;;
6be7c12c
AO
4213 ?:/*)
4214 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4215 ;;
252b5132 4216 *)
6be7c12c
AO
4217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4218 ac_dummy="$PATH"
4219 for ac_dir in $ac_dummy; do
4220 test -z "$ac_dir" && ac_dir=.
4221 if test -f $ac_dir/$ac_word; then
4222 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4223 break
4224 fi
4225 done
4226 IFS="$ac_save_ifs"
252b5132
RH
4227 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4228 ;;
4229esac
4230fi
6be7c12c 4231GMSGFMT="$ac_cv_path_GMSGFMT"
252b5132 4232if test -n "$GMSGFMT"; then
6be7c12c 4233 echo "$ac_t""$GMSGFMT" 1>&6
252b5132 4234else
6be7c12c 4235 echo "$ac_t""no" 1>&6
252b5132
RH
4236fi
4237
4238 # Extract the first word of "xgettext", so it can be a program name with args.
4239set dummy xgettext; ac_word=$2
6be7c12c 4240echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4615568e 4241echo "configure:4242: checking for $ac_word" >&5
6be7c12c
AO
4242if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4243 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4244else
4245 case "$XGETTEXT" in
4246 /*)
4247 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4248 ;;
4249 *)
4250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4251 for ac_dir in $PATH; do
4252 test -z "$ac_dir" && ac_dir=.
4253 if test -f $ac_dir/$ac_word; then
4254 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4255 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4256 break
4257 fi
4258 fi
4259 done
4260 IFS="$ac_save_ifs"
4261 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4262 ;;
4263esac
4264fi
4265XGETTEXT="$ac_cv_path_XGETTEXT"
4266if test -n "$XGETTEXT"; then
6be7c12c 4267 echo "$ac_t""$XGETTEXT" 1>&6
252b5132 4268else
6be7c12c 4269 echo "$ac_t""no" 1>&6
252b5132
RH
4270fi
4271
6be7c12c 4272
252b5132
RH
4273 USE_INCLUDED_LIBINTL=yes
4274 CATOBJEXT=.gmo
4275 INSTOBJEXT=.mo
4276 DATADIRNAME=share
4277 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4278 INTLLIBS=$INTLDEPS
4279 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4280 nls_cv_header_intl=libintl.h
4281 nls_cv_header_libgt=libgettext.h
4282 fi
4283
4284 if test "$XGETTEXT" != ":"; then
4285 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4286 : ;
4287 else
6be7c12c 4288 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
252b5132
RH
4289 XGETTEXT=":"
4290 fi
4291 fi
4292
4293 # We need to process the po/ directory.
4294 POSUB=po
4295 else
4296 DATADIRNAME=share
4297 nls_cv_header_intl=libintl.h
4298 nls_cv_header_libgt=libgettext.h
4299 fi
4300
4301 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4302 # because some of the sources are only built for this goal.
4303 if test "$PACKAGE" = gettext; then
4304 USE_NLS=yes
4305 USE_INCLUDED_LIBINTL=yes
4306 fi
4307
4308 for lang in $ALL_LINGUAS; do
4309 GMOFILES="$GMOFILES $lang.gmo"
4310 POFILES="$POFILES $lang.po"
4311 done
4312
6be7c12c
AO
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
252b5132
RH
4326 if test "x$CATOBJEXT" != "x"; then
4327 if test "x$ALL_LINGUAS" = "x"; then
4328 LINGUAS=
4329 else
6be7c12c 4330 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4615568e 4331echo "configure:4332: checking for catalogs to be installed" >&5
252b5132
RH
4332 NEW_LINGUAS=
4333 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4334 case "$ALL_LINGUAS" in
4335 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4336 esac
4337 done
4338 LINGUAS=$NEW_LINGUAS
6be7c12c 4339 echo "$ac_t""$LINGUAS" 1>&6
252b5132
RH
4340 fi
4341
4342 if test -n "$LINGUAS"; then
4343 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4344 fi
4345 fi
4346
4347 if test $ac_cv_header_locale_h = yes; then
4348 INCLUDE_LOCALE_H="#include <locale.h>"
4349 else
4350 INCLUDE_LOCALE_H="\
4351/* The system does not provide the header <locale.h>. Take care yourself. */"
4352 fi
6be7c12c 4353
252b5132
RH
4354
4355 if test -f $srcdir/po2tbl.sed.in; then
4356 if test "$CATOBJEXT" = ".cat"; then
6be7c12c
AO
4357 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4358echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4615568e 4359echo "configure:4360: checking for linux/version.h" >&5
6be7c12c
AO
4360if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4361 echo $ac_n "(cached) $ac_c" 1>&6
4362else
4363 cat > conftest.$ac_ext <<EOF
4615568e 4364#line 4365 "configure"
252b5132
RH
4365#include "confdefs.h"
4366#include <linux/version.h>
6be7c12c
AO
4367EOF
4368ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 4369{ (eval echo configure:4370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4370ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4371if test -z "$ac_err"; then
4372 rm -rf conftest*
4373 eval "ac_cv_header_$ac_safe=yes"
252b5132 4374else
6be7c12c
AO
4375 echo "$ac_err" >&5
4376 echo "configure: failed program was:" >&5
252b5132 4377 cat conftest.$ac_ext >&5
6be7c12c
AO
4378 rm -rf conftest*
4379 eval "ac_cv_header_$ac_safe=no"
252b5132 4380fi
6be7c12c 4381rm -f conftest*
252b5132 4382fi
6be7c12c
AO
4383if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4384 echo "$ac_t""yes" 1>&6
252b5132
RH
4385 msgformat=linux
4386else
6be7c12c
AO
4387 echo "$ac_t""no" 1>&6
4388msgformat=xopen
252b5132
RH
4389fi
4390
6be7c12c 4391
252b5132
RH
4392 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4393 fi
4394 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4395 $srcdir/po2tbl.sed.in > po2tbl.sed
4396 fi
4397
4398 if test "$PACKAGE" = "gettext"; then
4399 GT_NO="#NO#"
4400 GT_YES=
4401 else
4402 GT_NO=
4403 GT_YES="#YES#"
4404 fi
6be7c12c
AO
4405
4406
252b5132
RH
4407
4408 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
6be7c12c 4409
252b5132
RH
4410
4411 l=
6be7c12c 4412
252b5132 4413
3c3bdf30 4414 if test -f $srcdir/po/POTFILES.in; then
252b5132
RH
4415 test -d po || mkdir po
4416 if test "x$srcdir" != "x."; then
4417 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4418 posrcprefix="$srcdir/"
4419 else
4420 posrcprefix="../$srcdir/"
4421 fi
4422 else
4423 posrcprefix="../"
4424 fi
4425 rm -f po/POTFILES
4426 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4427 < $srcdir/po/POTFILES.in > po/POTFILES
4428 fi
6be7c12c 4429
252b5132
RH
4430
4431# Permit host specific settings.
4432. ${srcdir}/configure.host
4433
6be7c12c 4434
252b5132
RH
4435# Find a good install program. We prefer a C program (faster),
4436# so one script is as good as another. But avoid the broken or
4437# incompatible versions:
4438# SysV /etc/install, /usr/sbin/install
4439# SunOS /usr/etc/install
4440# IRIX /sbin/install
4441# AIX /bin/install
4442# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4443# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4444# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4445# ./install, which can be erroneously created by make from ./install.sh.
6be7c12c 4446echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4615568e 4447echo "configure:4448: checking for a BSD compatible install" >&5
252b5132 4448if test -z "$INSTALL"; then
6be7c12c
AO
4449if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4451else
6be7c12c 4452 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
252b5132
RH
4453 for ac_dir in $PATH; do
4454 # Account for people who put trailing slashes in PATH elements.
6be7c12c
AO
4455 case "$ac_dir/" in
4456 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
252b5132
RH
4457 *)
4458 # OSF1 and SCO ODT 3.0 have their own names for install.
4459 # Don't use installbsd from OSF since it installs stuff as root
4460 # by default.
4461 for ac_prog in ginstall scoinst install; do
6be7c12c 4462 if test -f $ac_dir/$ac_prog; then
252b5132 4463 if test $ac_prog = install &&
6be7c12c 4464 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
252b5132
RH
4465 # AIX install. It has an incompatible calling convention.
4466 :
4467 else
4468 ac_cv_path_install="$ac_dir/$ac_prog -c"
4469 break 2
4470 fi
4471 fi
4472 done
4473 ;;
4474 esac
4475 done
6be7c12c 4476 IFS="$ac_save_IFS"
252b5132
RH
4477
4478fi
4479 if test "${ac_cv_path_install+set}" = set; then
6be7c12c 4480 INSTALL="$ac_cv_path_install"
252b5132
RH
4481 else
4482 # As a last resort, use the slow shell script. We don't cache a
4483 # path for INSTALL within a source directory, because that will
4484 # break other packages using the cache if that directory is
4485 # removed, or if the path is relative.
6be7c12c 4486 INSTALL="$ac_install_sh"
252b5132
RH
4487 fi
4488fi
6be7c12c 4489echo "$ac_t""$INSTALL" 1>&6
252b5132
RH
4490
4491# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4492# It thinks the first close brace ends the variable substitution.
4493test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4494
6be7c12c 4495test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
252b5132
RH
4496
4497test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4498
6be7c12c 4499
252b5132 4500BFD_HOST_64BIT_LONG=0
ec317fb1 4501BFD_HOST_LONG_LONG=0
252b5132
RH
4502BFD_HOST_64_BIT_DEFINED=0
4503BFD_HOST_64_BIT=
4504BFD_HOST_U_64_BIT=
252b5132 4505
ec317fb1 4506echo $ac_n "checking for long long""... $ac_c" 1>&6
4615568e 4507echo "configure:4508: checking for long long" >&5
ec317fb1
ILT
4508if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
4509 echo $ac_n "(cached) $ac_c" 1>&6
4510else
4511 cat > conftest.$ac_ext <<EOF
4615568e 4512#line 4513 "configure"
ec317fb1
ILT
4513#include "confdefs.h"
4514
4515int main() {
4516unsigned long long ll = 18446744073709551615ULL;
4517; return 0; }
4518EOF
4615568e 4519if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ec317fb1
ILT
4520 rm -rf conftest*
4521 bfd_cv_has_long_long=yes
4522else
4523 echo "configure: failed program was:" >&5
4524 cat conftest.$ac_ext >&5
4525 rm -rf conftest*
4526 bfd_cv_has_long_long=no
4527fi
4528rm -f conftest*
4529fi
4530
4531echo "$ac_t""$bfd_cv_has_long_long" 1>&6
4532if test $bfd_cv_has_long_long = yes; then
4533 BFD_HOST_LONG_LONG=1
6726e1ea 4534 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4615568e 4535echo "configure:4536: checking size of long long" >&5
6726e1ea
L
4536if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
4537 echo $ac_n "(cached) $ac_c" 1>&6
4538else
4539 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
4540 cat > conftest.$ac_ext <<EOF
4615568e 4541#line 4542 "configure"
6726e1ea
L
4542#include "confdefs.h"
4543#include "confdefs.h"
4544#include <sys/types.h>
4545
4546
4547int main() {
4548switch (0) case 0: case (sizeof (long long) == $ac_size):;
4549; return 0; }
4550EOF
4615568e 4551if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726e1ea
L
4552 rm -rf conftest*
4553 ac_cv_sizeof_long_long=$ac_size
4554else
4555 echo "configure: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
4557fi
4558rm -f conftest*
4559 if test x$ac_cv_sizeof_long_long != x ; then break; fi
4560done
4561
4562fi
4563
4564if test x$ac_cv_sizeof_long_long = x ; then
4565 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
4566fi
4567echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4568cat >> confdefs.h <<EOF
4569#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4570EOF
4571
4572
4573fi
4574
4575echo $ac_n "checking size of long""... $ac_c" 1>&6
4615568e 4576echo "configure:4577: checking size of long" >&5
6726e1ea
L
4577if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579else
4580 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
4581 cat > conftest.$ac_ext <<EOF
4615568e 4582#line 4583 "configure"
6726e1ea
L
4583#include "confdefs.h"
4584#include "confdefs.h"
4585#include <sys/types.h>
4586
4587
4588int main() {
4589switch (0) case 0: case (sizeof (long) == $ac_size):;
4590; return 0; }
4591EOF
4615568e 4592if { (eval echo configure:4593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726e1ea
L
4593 rm -rf conftest*
4594 ac_cv_sizeof_long=$ac_size
4595else
4596 echo "configure: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4598fi
4599rm -f conftest*
4600 if test x$ac_cv_sizeof_long != x ; then break; fi
4601done
4602
4603fi
4604
4605if test x$ac_cv_sizeof_long = x ; then
4606 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
4607fi
4608echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4609cat >> confdefs.h <<EOF
4610#define SIZEOF_LONG $ac_cv_sizeof_long
4611EOF
4612
4613
4614if test "x${ac_cv_sizeof_long}" = "x8"; then
4615 host64=true
4616 HOST_64BIT_TYPE="long"
4617elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
4618 HOST_64BIT_TYPE="long long"
4619 HOST_U_64BIT_TYPE="unsigned long long"
4620fi
4621
4622if test "x${HOST_64BIT_TYPE}" = "xlong"; then
4623 BFD_HOST_64BIT_LONG=1
4624elif test "x${HOST_64BIT_TYPE}" != "x"; then
4625 BFD_HOST_64_BIT_DEFINED=1
4626 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
4627 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
ec317fb1
ILT
4628fi
4629
4630
4631
6be7c12c
AO
4632
4633
4634
4635
252b5132
RH
4636# Put a plausible default for CC_FOR_BUILD in Makefile.
4637if test -z "$CC_FOR_BUILD"; then
4638 if test "x$cross_compiling" = "xno"; then
4639 CC_FOR_BUILD='$(CC)'
4640 else
4641 CC_FOR_BUILD=gcc
4642 fi
4643fi
4644
4645# Also set EXEEXT_FOR_BUILD.
4646if test "x$cross_compiling" = "xno"; then
4647 EXEEXT_FOR_BUILD='$(EXEEXT)'
4648else
6be7c12c 4649 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4615568e 4650echo "configure:4651: checking for build system executable suffix" >&5
6be7c12c
AO
4651if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4652 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4653else
aab08431
ILT
4654 rm -f conftest*
4655 echo 'int main () { return 0; }' > conftest.c
4656 bfd_cv_build_exeext=
4657 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
4658 for file in conftest.*; do
4659 case $file in
4660 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4661 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4662 esac
4663 done
4664 rm -f conftest*
4665 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
252b5132 4666fi
6be7c12c
AO
4667
4668echo "$ac_t""$bfd_cv_build_exeext" 1>&6
252b5132
RH
4669 EXEEXT_FOR_BUILD=""
4670 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4671fi
4672
6be7c12c
AO
4673
4674for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
252b5132 4675do
6be7c12c
AO
4676ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4677echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615568e 4678echo "configure:4679: checking for $ac_hdr" >&5
6be7c12c
AO
4679if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4680 echo $ac_n "(cached) $ac_c" 1>&6
4681else
4682 cat > conftest.$ac_ext <<EOF
4615568e 4683#line 4684 "configure"
252b5132 4684#include "confdefs.h"
6be7c12c
AO
4685#include <$ac_hdr>
4686EOF
4687ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 4688{ (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4689ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4690if test -z "$ac_err"; then
4691 rm -rf conftest*
4692 eval "ac_cv_header_$ac_safe=yes"
252b5132 4693else
6be7c12c
AO
4694 echo "$ac_err" >&5
4695 echo "configure: failed program was:" >&5
252b5132 4696 cat conftest.$ac_ext >&5
6be7c12c
AO
4697 rm -rf conftest*
4698 eval "ac_cv_header_$ac_safe=no"
252b5132 4699fi
6be7c12c 4700rm -f conftest*
252b5132 4701fi
6be7c12c
AO
4702if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4703 echo "$ac_t""yes" 1>&6
4704 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4705 cat >> confdefs.h <<EOF
4706#define $ac_tr_hdr 1
252b5132 4707EOF
6be7c12c
AO
4708
4709else
4710 echo "$ac_t""no" 1>&6
252b5132
RH
4711fi
4712done
4713
6be7c12c 4714for ac_hdr in fcntl.h sys/file.h sys/time.h
252b5132 4715do
6be7c12c
AO
4716ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4717echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615568e 4718echo "configure:4719: checking for $ac_hdr" >&5
6be7c12c
AO
4719if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4721else
4722 cat > conftest.$ac_ext <<EOF
4615568e 4723#line 4724 "configure"
252b5132 4724#include "confdefs.h"
6be7c12c
AO
4725#include <$ac_hdr>
4726EOF
4727ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4615568e 4728{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4729ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4730if test -z "$ac_err"; then
4731 rm -rf conftest*
4732 eval "ac_cv_header_$ac_safe=yes"
252b5132 4733else
6be7c12c
AO
4734 echo "$ac_err" >&5
4735 echo "configure: failed program was:" >&5
252b5132 4736 cat conftest.$ac_ext >&5
6be7c12c
AO
4737 rm -rf conftest*
4738 eval "ac_cv_header_$ac_safe=no"
252b5132 4739fi
6be7c12c 4740rm -f conftest*
252b5132 4741fi
6be7c12c
AO
4742if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4743 echo "$ac_t""yes" 1>&6
4744 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4745 cat >> confdefs.h <<EOF
4746#define $ac_tr_hdr 1
252b5132 4747EOF
6be7c12c
AO
4748
4749else
4750 echo "$ac_t""no" 1>&6
252b5132
RH
4751fi
4752done
4753
6be7c12c 4754echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4615568e 4755echo "configure:4756: checking whether time.h and sys/time.h may both be included" >&5
6be7c12c
AO
4756if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4758else
6be7c12c 4759 cat > conftest.$ac_ext <<EOF
4615568e 4760#line 4761 "configure"
252b5132
RH
4761#include "confdefs.h"
4762#include <sys/types.h>
4763#include <sys/time.h>
4764#include <time.h>
6be7c12c 4765int main() {
252b5132 4766struct tm *tp;
6be7c12c
AO
4767; return 0; }
4768EOF
4615568e 4769if { (eval echo configure:4770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 4770 rm -rf conftest*
252b5132
RH
4771 ac_cv_header_time=yes
4772else
6be7c12c
AO
4773 echo "configure: failed program was:" >&5
4774 cat conftest.$ac_ext >&5
4775 rm -rf conftest*
4776 ac_cv_header_time=no
252b5132 4777fi
6be7c12c 4778rm -f conftest*
252b5132 4779fi
b3baf5d0 4780
6be7c12c
AO
4781echo "$ac_t""$ac_cv_header_time" 1>&6
4782if test $ac_cv_header_time = yes; then
4783 cat >> confdefs.h <<\EOF
252b5132
RH
4784#define TIME_WITH_SYS_TIME 1
4785EOF
4786
4787fi
4788
4789ac_header_dirent=no
6be7c12c
AO
4790for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4791do
4792ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4793echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4615568e 4794echo "configure:4795: checking for $ac_hdr that defines DIR" >&5
6be7c12c
AO
4795if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4796 echo $ac_n "(cached) $ac_c" 1>&6
4797else
4798 cat > conftest.$ac_ext <<EOF
4615568e 4799#line 4800 "configure"
252b5132
RH
4800#include "confdefs.h"
4801#include <sys/types.h>
4802#include <$ac_hdr>
6be7c12c 4803int main() {
252b5132 4804DIR *dirp = 0;
6be7c12c
AO
4805; return 0; }
4806EOF
4615568e 4807if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
4808 rm -rf conftest*
4809 eval "ac_cv_header_dirent_$ac_safe=yes"
252b5132 4810else
6be7c12c
AO
4811 echo "configure: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 rm -rf conftest*
4814 eval "ac_cv_header_dirent_$ac_safe=no"
252b5132 4815fi
6be7c12c 4816rm -f conftest*
252b5132 4817fi
6be7c12c
AO
4818if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4819 echo "$ac_t""yes" 1>&6
4820 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4821 cat >> confdefs.h <<EOF
4822#define $ac_tr_hdr 1
252b5132 4823EOF
6be7c12c
AO
4824 ac_header_dirent=$ac_hdr; break
4825else
4826 echo "$ac_t""no" 1>&6
252b5132
RH
4827fi
4828done
4829# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4830if test $ac_header_dirent = dirent.h; then
6be7c12c 4831echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4615568e 4832echo "configure:4833: checking for opendir in -ldir" >&5
6be7c12c
AO
4833ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4834if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4835 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4836else
6be7c12c 4837 ac_save_LIBS="$LIBS"
252b5132 4838LIBS="-ldir $LIBS"
6be7c12c 4839cat > conftest.$ac_ext <<EOF
4615568e 4840#line 4841 "configure"
252b5132
RH
4841#include "confdefs.h"
4842/* Override any gcc2 internal prototype to avoid an error. */
4843/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4844 builtin and then its argument prototype would still apply. */
4845char opendir();
4846
4847int main() {
4848opendir()
4849; return 0; }
4850EOF
4615568e 4851if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4852 rm -rf conftest*
4853 eval "ac_cv_lib_$ac_lib_var=yes"
4854else
4855 echo "configure: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 rm -rf conftest*
4858 eval "ac_cv_lib_$ac_lib_var=no"
4859fi
4860rm -f conftest*
4861LIBS="$ac_save_LIBS"
4862
4863fi
4864if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4865 echo "$ac_t""yes" 1>&6
252b5132 4866 LIBS="$LIBS -ldir"
6be7c12c
AO
4867else
4868 echo "$ac_t""no" 1>&6
252b5132
RH
4869fi
4870
4871else
6be7c12c 4872echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4615568e 4873echo "configure:4874: checking for opendir in -lx" >&5
6be7c12c
AO
4874ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4875if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4876 echo $ac_n "(cached) $ac_c" 1>&6
b3baf5d0 4877else
6be7c12c 4878 ac_save_LIBS="$LIBS"
b3baf5d0 4879LIBS="-lx $LIBS"
6be7c12c 4880cat > conftest.$ac_ext <<EOF
4615568e 4881#line 4882 "configure"
b3baf5d0 4882#include "confdefs.h"
6be7c12c
AO
4883/* Override any gcc2 internal prototype to avoid an error. */
4884/* We use char because int might match the return type of a gcc2
4885 builtin and then its argument prototype would still apply. */
4886char opendir();
4887
4888int main() {
4889opendir()
4890; return 0; }
4891EOF
4615568e 4892if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4893 rm -rf conftest*
4894 eval "ac_cv_lib_$ac_lib_var=yes"
4895else
4896 echo "configure: failed program was:" >&5
4897 cat conftest.$ac_ext >&5
4898 rm -rf conftest*
4899 eval "ac_cv_lib_$ac_lib_var=no"
4900fi
4901rm -f conftest*
4902LIBS="$ac_save_LIBS"
252b5132 4903
6be7c12c
AO
4904fi
4905if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4906 echo "$ac_t""yes" 1>&6
252b5132 4907 LIBS="$LIBS -lx"
6be7c12c
AO
4908else
4909 echo "$ac_t""no" 1>&6
252b5132
RH
4910fi
4911
4912fi
4913
633fd09f 4914for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
252b5132 4915do
6be7c12c 4916echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 4917echo "configure:4918: checking for $ac_func" >&5
6be7c12c
AO
4918if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4919 echo $ac_n "(cached) $ac_c" 1>&6
4920else
4921 cat > conftest.$ac_ext <<EOF
4615568e 4922#line 4923 "configure"
252b5132
RH
4923#include "confdefs.h"
4924/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 4925 which can conflict with char $ac_func(); below. */
252b5132
RH
4926#include <assert.h>
4927/* Override any gcc2 internal prototype to avoid an error. */
4928/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4929 builtin and then its argument prototype would still apply. */
4930char $ac_func();
4931
4932int main() {
252b5132
RH
4933
4934/* The GNU C library defines this for functions which it implements
4935 to always fail with ENOSYS. Some functions are actually named
4936 something starting with __ and the normal name is an alias. */
4937#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4938choke me
4939#else
6be7c12c 4940$ac_func();
252b5132
RH
4941#endif
4942
6be7c12c 4943; return 0; }
252b5132 4944EOF
4615568e 4945if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4946 rm -rf conftest*
4947 eval "ac_cv_func_$ac_func=yes"
4948else
4949 echo "configure: failed program was:" >&5
4950 cat conftest.$ac_ext >&5
4951 rm -rf conftest*
4952 eval "ac_cv_func_$ac_func=no"
4953fi
4954rm -f conftest*
4955fi
252b5132 4956
6be7c12c
AO
4957if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4958 echo "$ac_t""yes" 1>&6
4959 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4960 cat >> confdefs.h <<EOF
4961#define $ac_tr_func 1
4962EOF
4963
4964else
4965 echo "$ac_t""no" 1>&6
252b5132
RH
4966fi
4967done
4968
49c97a80
ILT
4969for ac_func in strtoull
4970do
4971echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4615568e 4972echo "configure:4973: checking for $ac_func" >&5
49c97a80
ILT
4973if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4974 echo $ac_n "(cached) $ac_c" 1>&6
4975else
4976 cat > conftest.$ac_ext <<EOF
4615568e 4977#line 4978 "configure"
49c97a80
ILT
4978#include "confdefs.h"
4979/* System header to define __stub macros and hopefully few prototypes,
4980 which can conflict with char $ac_func(); below. */
4981#include <assert.h>
4982/* Override any gcc2 internal prototype to avoid an error. */
4983/* We use char because int might match the return type of a gcc2
4984 builtin and then its argument prototype would still apply. */
4985char $ac_func();
4986
4987int main() {
4988
4989/* The GNU C library defines this for functions which it implements
4990 to always fail with ENOSYS. Some functions are actually named
4991 something starting with __ and the normal name is an alias. */
4992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4993choke me
4994#else
4995$ac_func();
4996#endif
4997
4998; return 0; }
4999EOF
4615568e 5000if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
49c97a80
ILT
5001 rm -rf conftest*
5002 eval "ac_cv_func_$ac_func=yes"
5003else
5004 echo "configure: failed program was:" >&5
5005 cat conftest.$ac_ext >&5
5006 rm -rf conftest*
5007 eval "ac_cv_func_$ac_func=no"
5008fi
5009rm -f conftest*
5010fi
5011
5012if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5013 echo "$ac_t""yes" 1>&6
5014 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5015 cat >> confdefs.h <<EOF
5016#define $ac_tr_func 1
5017EOF
5018
5019else
5020 echo "$ac_t""no" 1>&6
5021fi
5022done
5023
6be7c12c
AO
5024
5025
252b5132 5026case "${host}" in
855b0be7 5027*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
6be7c12c 5028 cat >> confdefs.h <<\EOF
252b5132
RH
5029#define USE_BINARY_FOPEN 1
5030EOF
5031 ;;
5032esac
5033
6be7c12c 5034echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4615568e 5035echo "configure:5036: checking whether strstr must be declared" >&5
6be7c12c
AO
5036if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
5037 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5038else
6be7c12c 5039 cat > conftest.$ac_ext <<EOF
4615568e 5040#line 5041 "configure"
252b5132
RH
5041#include "confdefs.h"
5042
5043#include <stdio.h>
5044#ifdef HAVE_STRING_H
5045#include <string.h>
5046#else
5047#ifdef HAVE_STRINGS_H
5048#include <strings.h>
5049#endif
5050#endif
5051#ifdef HAVE_STDLIB_H
5052#include <stdlib.h>
5053#endif
5054#ifdef HAVE_UNISTD_H
5055#include <unistd.h>
5056#endif
6be7c12c 5057int main() {
252b5132 5058char *(*pfn) = (char *(*)) strstr
6be7c12c
AO
5059; return 0; }
5060EOF
4615568e 5061if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5062 rm -rf conftest*
252b5132
RH
5063 bfd_cv_decl_needed_strstr=no
5064else
6be7c12c
AO
5065 echo "configure: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5067 rm -rf conftest*
5068 bfd_cv_decl_needed_strstr=yes
252b5132 5069fi
6be7c12c 5070rm -f conftest*
252b5132
RH
5071fi
5072
6be7c12c 5073echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
252b5132 5074if test $bfd_cv_decl_needed_strstr = yes; then
6be7c12c 5075 cat >> confdefs.h <<\EOF
252b5132
RH
5076#define NEED_DECLARATION_STRSTR 1
5077EOF
5078
5079fi
5080
6be7c12c 5081echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4615568e 5082echo "configure:5083: checking whether malloc must be declared" >&5
6be7c12c
AO
5083if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
5084 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5085else
6be7c12c 5086 cat > conftest.$ac_ext <<EOF
4615568e 5087#line 5088 "configure"
252b5132
RH
5088#include "confdefs.h"
5089
5090#include <stdio.h>
5091#ifdef HAVE_STRING_H
5092#include <string.h>
5093#else
5094#ifdef HAVE_STRINGS_H
5095#include <strings.h>
5096#endif
5097#endif
5098#ifdef HAVE_STDLIB_H
5099#include <stdlib.h>
5100#endif
5101#ifdef HAVE_UNISTD_H
5102#include <unistd.h>
5103#endif
6be7c12c 5104int main() {
252b5132 5105char *(*pfn) = (char *(*)) malloc
6be7c12c
AO
5106; return 0; }
5107EOF
4615568e 5108if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5109 rm -rf conftest*
252b5132
RH
5110 bfd_cv_decl_needed_malloc=no
5111else
6be7c12c
AO
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115 bfd_cv_decl_needed_malloc=yes
252b5132 5116fi
6be7c12c 5117rm -f conftest*
252b5132
RH
5118fi
5119
6be7c12c 5120echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
252b5132 5121if test $bfd_cv_decl_needed_malloc = yes; then
6be7c12c 5122 cat >> confdefs.h <<\EOF
252b5132
RH
5123#define NEED_DECLARATION_MALLOC 1
5124EOF
5125
5126fi
5127
6be7c12c 5128echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4615568e 5129echo "configure:5130: checking whether realloc must be declared" >&5
6be7c12c
AO
5130if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5132else
6be7c12c 5133 cat > conftest.$ac_ext <<EOF
4615568e 5134#line 5135 "configure"
252b5132
RH
5135#include "confdefs.h"
5136
5137#include <stdio.h>
5138#ifdef HAVE_STRING_H
5139#include <string.h>
5140#else
5141#ifdef HAVE_STRINGS_H
5142#include <strings.h>
5143#endif
5144#endif
5145#ifdef HAVE_STDLIB_H
5146#include <stdlib.h>
5147#endif
5148#ifdef HAVE_UNISTD_H
5149#include <unistd.h>
5150#endif
6be7c12c 5151int main() {
252b5132 5152char *(*pfn) = (char *(*)) realloc
6be7c12c
AO
5153; return 0; }
5154EOF
4615568e 5155if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5156 rm -rf conftest*
252b5132
RH
5157 bfd_cv_decl_needed_realloc=no
5158else
6be7c12c
AO
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 bfd_cv_decl_needed_realloc=yes
252b5132 5163fi
6be7c12c 5164rm -f conftest*
252b5132
RH
5165fi
5166
6be7c12c 5167echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
252b5132 5168if test $bfd_cv_decl_needed_realloc = yes; then
6be7c12c 5169 cat >> confdefs.h <<\EOF
252b5132
RH
5170#define NEED_DECLARATION_REALLOC 1
5171EOF
5172
5173fi
5174
6be7c12c 5175echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4615568e 5176echo "configure:5177: checking whether free must be declared" >&5
6be7c12c
AO
5177if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
5178 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5179else
6be7c12c 5180 cat > conftest.$ac_ext <<EOF
4615568e 5181#line 5182 "configure"
252b5132
RH
5182#include "confdefs.h"
5183
5184#include <stdio.h>
5185#ifdef HAVE_STRING_H
5186#include <string.h>
5187#else
5188#ifdef HAVE_STRINGS_H
5189#include <strings.h>
5190#endif
5191#endif
5192#ifdef HAVE_STDLIB_H
5193#include <stdlib.h>
5194#endif
5195#ifdef HAVE_UNISTD_H
5196#include <unistd.h>
5197#endif
6be7c12c 5198int main() {
252b5132 5199char *(*pfn) = (char *(*)) free
6be7c12c
AO
5200; return 0; }
5201EOF
4615568e 5202if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5203 rm -rf conftest*
252b5132
RH
5204 bfd_cv_decl_needed_free=no
5205else
6be7c12c
AO
5206 echo "configure: failed program was:" >&5
5207 cat conftest.$ac_ext >&5
5208 rm -rf conftest*
5209 bfd_cv_decl_needed_free=yes
252b5132 5210fi
6be7c12c 5211rm -f conftest*
252b5132
RH
5212fi
5213
6be7c12c 5214echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
252b5132 5215if test $bfd_cv_decl_needed_free = yes; then
6be7c12c 5216 cat >> confdefs.h <<\EOF
252b5132
RH
5217#define NEED_DECLARATION_FREE 1
5218EOF
5219
5220fi
5221
6be7c12c 5222echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4615568e 5223echo "configure:5224: checking whether getenv must be declared" >&5
6be7c12c
AO
5224if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
5225 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5226else
6be7c12c 5227 cat > conftest.$ac_ext <<EOF
4615568e 5228#line 5229 "configure"
252b5132
RH
5229#include "confdefs.h"
5230
5231#include <stdio.h>
5232#ifdef HAVE_STRING_H
5233#include <string.h>
5234#else
5235#ifdef HAVE_STRINGS_H
5236#include <strings.h>
5237#endif
5238#endif
5239#ifdef HAVE_STDLIB_H
5240#include <stdlib.h>
5241#endif
5242#ifdef HAVE_UNISTD_H
5243#include <unistd.h>
5244#endif
6be7c12c 5245int main() {
252b5132 5246char *(*pfn) = (char *(*)) getenv
6be7c12c
AO
5247; return 0; }
5248EOF
4615568e 5249if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5250 rm -rf conftest*
252b5132
RH
5251 bfd_cv_decl_needed_getenv=no
5252else
6be7c12c
AO
5253 echo "configure: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 rm -rf conftest*
5256 bfd_cv_decl_needed_getenv=yes
252b5132 5257fi
6be7c12c 5258rm -f conftest*
252b5132
RH
5259fi
5260
6be7c12c 5261echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
252b5132 5262if test $bfd_cv_decl_needed_getenv = yes; then
6be7c12c 5263 cat >> confdefs.h <<\EOF
252b5132
RH
5264#define NEED_DECLARATION_GETENV 1
5265EOF
5266
5267fi
5268
6be7c12c 5269
252b5132
RH
5270# If we are configured native, pick a core file support file.
5271COREFILE=
5272COREFLAG=
5273TRAD_HEADER=
5274if test "${target}" = "${host}"; then
5275 case "${host}" in
13dfd2d0 5276 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
46d59bfa
DB
5277 COREFILE=''
5278 ;;
252b5132
RH
5279 alpha*-*-linux-gnu*)
5280 COREFILE=trad-core.lo
5281 TRAD_HEADER='"hosts/alphalinux.h"'
5282 ;;
690cc98b
NC
5283 alpha*-*-netbsd* | alpha*-*-openbsd*)
5284 COREFILE=netbsd-core.lo
5285 ;;
252b5132 5286 alpha*-*-*) COREFILE=osf-core.lo ;;
13dfd2d0
NC
5287 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
5288 COREFILE='' ;;
61d0bc33 5289 arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
252b5132
RH
5290 arm-*-riscix) COREFILE=trad-core.lo ;;
5291 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
5292 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
5293 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
5294 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
5295 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
dc810e39 5296 i370-*-*)
5b93d8bb
AM
5297 COREFILE=trad-core.lo
5298 TRAD_HEADER='"hosts/i370linux.h"'
5299 ;;
5300
80c7c40a 5301 i[3-7]86-sequent-bsd*)
5b93d8bb 5302 COREFILE=trad-core.lo
252b5132
RH
5303 TRAD_HEADER='"hosts/symmetry.h"'
5304 ;;
80c7c40a
NC
5305 i[3-7]86-sequent-sysv4*) ;;
5306 i[3-7]86-sequent-sysv*)
252b5132
RH
5307 COREFILE=trad-core.lo
5308 TRAD_HEADER='"hosts/symmetry.h"'
5309 ;;
80c7c40a 5310 i[3-7]86-*-bsdi)
7e3b3466
NC
5311 COREFILE=
5312 ;;
80c7c40a 5313 i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
252b5132
RH
5314 COREFILE=trad-core.lo
5315 TRAD_HEADER='"hosts/i386bsd.h"'
5316 ;;
13dfd2d0 5317 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
d4af9775
DB
5318 COREFILE=''
5319 TRAD_HEADER='"hosts/i386bsd.h"'
5320 ;;
4615568e 5321 i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
252b5132
RH
5322 COREFILE=netbsd-core.lo
5323 ;;
80c7c40a 5324 i[3-7]86-esix-sysv3*)
252b5132
RH
5325 COREFILE=trad-core.lo
5326 TRAD_HEADER='"hosts/esix.h"'
5327 ;;
80c7c40a 5328 i[3-7]86-*-sco3.2v5*)
252b5132
RH
5329 COREFILE=sco5-core.lo
5330 ;;
80c7c40a 5331 i[3-7]86-*-sco* | i[3-7]86-*-isc*)
252b5132
RH
5332 COREFILE=trad-core.lo
5333 TRAD_HEADER='"hosts/i386sco.h"'
5334 ;;
80c7c40a 5335 i[3-7]86-*-mach3*)
252b5132
RH
5336 COREFILE=trad-core.lo
5337 TRAD_HEADER='"hosts/i386mach3.h"'
5338 ;;
80c7c40a 5339 i[3-7]86-*-linux-gnu*)
252b5132
RH
5340 COREFILE=trad-core.lo
5341 TRAD_HEADER='"hosts/i386linux.h"'
5342 ;;
80c7c40a
NC
5343 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
5344 i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
252b5132
RH
5345 i860-*-mach3* | i860-*-osf1*)
5346 COREFILE=trad-core.lo
5347 TRAD_HEADER='"hosts/i860mach3.h"'
5348 ;;
5349 mips-dec-bsd*)
5350 COREFILE=trad-core.lo
5351 TRAD_HEADER='"hosts/mipsbsd.h"'
5352 ;;
5353 mips-dec-mach3*)
5354 COREFILE=trad-core.lo
5355 TRAD_HEADER='"hosts/mipsmach3.h"'
5356 ;;
5357 mips-*-netbsd* | mips*-*-openbsd*)
5358 COREFILE=netbsd-core.lo
5359 ;;
5360 mips-dec-*)
5361 COREFILE=trad-core.lo
5362 TRAD_HEADER='"hosts/decstation.h"'
5363 ;;
5364 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
5365 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
5366 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
5367 mips-*-mach3*)
5368 COREFILE=trad-core.lo
5369 TRAD_HEADER='"hosts/mipsmach3.h"'
5370 ;;
5371 mips-*-sysv4*) ;;
5372 mips-*-sysv* | mips-*-riscos*)
5373 COREFILE=trad-core.lo
5374 TRAD_HEADER='"hosts/riscos.h"'
5375 ;;
5376 mips-sony-bsd*)
5377 COREFILE=trad-core.lo
5378 TRAD_HEADER='"hosts/news-mips.h"'
5379 ;;
5380 m68*-bull*-sysv*)
5381 COREFILE=trad-core.lo
5382 TRAD_HEADER='"hosts/dpx2.h"'
5383 ;;
5384 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
5385 m68*-hp-bsd*)
5386 COREFILE=trad-core.lo
5387 TRAD_HEADER='"hosts/hp300bsd.h"'
5388 ;;
5389 m68*-*-linux-gnu*)
5390 COREFILE=trad-core.lo
5391 TRAD_HEADER='"hosts/m68klinux.h"'
5392 ;;
5393 m68*-motorola-sysv*)
5394 COREFILE=trad-core.lo
5395 TRAD_HEADER='"hosts/delta68.h"'
5396 ;;
5397 m68*-sony-*)
5398 COREFILE=trad-core.lo
5399 TRAD_HEADER='"hosts/news.h"'
5400 ;;
5401 m68*-*-netbsd* | m68*-*-openbsd*)
5402 COREFILE=netbsd-core.lo
5403 ;;
5404 m68*-apple-aux*)
5405 COREFILE=trad-core.lo
5406 TRAD_HEADER='"hosts/m68kaux.h"'
5407 ;;
eb1e0e80
NC
5408 m88*-*-sysv4*)
5409 ;;
5410 m88*-motorola-sysv*)
5411 COREFILE=ptrace-core.lo
5412 ;;
252b5132
RH
5413 m88*-*-mach3*)
5414 COREFILE=trad-core.lo
5415 TRAD_HEADER='"hosts/m88kmach3.h"'
5416 ;;
5417 ns32k-pc532-mach)
5418 COREFILE=trad-core.lo
5419 TRAD_HEADER='"hosts/pc532mach.h"'
5420 ;;
5421 ns32k-*-netbsd* | ns32k-*-openbsd*)
5422 COREFILE=netbsd-core.lo
5423 ;;
eb1e0e80
NC
5424 rs6000-*-lynx*)
5425 COREFILE=lynx-core.lo
5426 ;;
5427 rs6000-*-aix5.* | powerpc-*-aix5.*)
5428 COREFILE=rs6000-core.lo
5429 COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
5430 ;;
83954261 5431 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
653f71ca
KB
5432 COREFILE=rs6000-core.lo
5433 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
83954261
AM
5434 # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
5435 # have c_impl as a member of struct core_dumpx
5436 echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
4615568e 5437echo "configure:5438: checking for c_impl in struct core_dumpx" >&5
83954261 5438 cat > conftest.$ac_ext <<EOF
4615568e 5439#line 5440 "configure"
83954261
AM
5440#include "confdefs.h"
5441#include <core.h>
5442int main() {
5443struct core_dumpx c; c.c_impl = 0;
5444; return 0; }
5445EOF
4615568e 5446if { (eval echo configure:5447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
83954261
AM
5447 rm -rf conftest*
5448 cat >> confdefs.h <<\EOF
5449#define HAVE_ST_C_IMPL 1
5450EOF
5451
5452 echo "$ac_t""yes" 1>&6
5453else
5454 echo "configure: failed program was:" >&5
5455 cat conftest.$ac_ext >&5
5456 rm -rf conftest*
5457 echo "$ac_t""no" 1>&6
5458fi
5459rm -f conftest*
653f71ca 5460 ;;
252b5132
RH
5461 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
5462 rs6000-*-*) COREFILE=rs6000-core.lo ;;
252b5132
RH
5463 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
5464 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
5465 powerpc-*-beos*) ;;
13dfd2d0
NC
5466 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
5467 COREFILE='' ;;
252b5132 5468 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
d4af9775 5469 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
dc810e39 5470 s390*-*-*) COREFILE=trad-core.lo ;;
8d05742f 5471 sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
a9bf1154 5472 sparc-*-netbsd* | sparc*-*-openbsd*)
252b5132
RH
5473 COREFILE=netbsd-core.lo
5474 ;;
5475 tahoe-*-*)
5476 COREFILE=trad-core.lo
5477 TRAD_HEADER='"hosts/tahoe.h"'
5478 ;;
de6e5e1a
NC
5479 vax-*-netbsd* | vax-*-openbsd*)
5480 COREFILE=netbsd-core.lo
5481 ;;
252b5132
RH
5482 vax-*-ultrix2*)
5483 COREFILE=trad-core.lo
5484 TRAD_HEADER='"hosts/vaxult2.h"'
5485 ;;
5486 vax-*-ultrix*)
5487 COREFILE=trad-core.lo
5488 TRAD_HEADER='"hosts/vaxult2.h"'
5489 ;;
f8fc3443
NC
5490 vax-*-linux-gnu*)
5491 COREFILE=trad-core.lo
5492 TRAD_HEADER='"hosts/vaxlinux.h"'
5493 ;;
252b5132
RH
5494 vax-*-*)
5495 COREFILE=trad-core.lo
5496 TRAD_HEADER='"hosts/vaxbsd.h"'
5497 ;;
8a8b2d4b 5498 x86_64-*-netbsd*) COREFILE=netbsd-core.lo ;;
252b5132
RH
5499 esac
5500
5501 case "$COREFILE" in
5502 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
5503 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
5504 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
5505 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
5506 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
5507 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
5508 osf-core.lo) COREFLAG=-DOSF_CORE ;;
5509 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
5510 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
5511 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
5512 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
5513 esac
5514
5515 # ELF corefile support has several flavors, but all of
5516 # them use something called <sys/procfs.h>
6be7c12c 5517 for ac_hdr in sys/procfs.h
252b5132 5518do
6be7c12c
AO
5519ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5520echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f8fc3443 5521echo "configure:5522: checking for $ac_hdr" >&5
6be7c12c
AO
5522if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5523 echo $ac_n "(cached) $ac_c" 1>&6
5524else
5525 cat > conftest.$ac_ext <<EOF
f8fc3443 5526#line 5527 "configure"
252b5132 5527#include "confdefs.h"
6be7c12c
AO
5528#include <$ac_hdr>
5529EOF
5530ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f8fc3443 5531{ (eval echo configure:5532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
5532ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5533if test -z "$ac_err"; then
5534 rm -rf conftest*
5535 eval "ac_cv_header_$ac_safe=yes"
252b5132 5536else
6be7c12c
AO
5537 echo "$ac_err" >&5
5538 echo "configure: failed program was:" >&5
252b5132 5539 cat conftest.$ac_ext >&5
6be7c12c
AO
5540 rm -rf conftest*
5541 eval "ac_cv_header_$ac_safe=no"
252b5132 5542fi
6be7c12c 5543rm -f conftest*
252b5132 5544fi
6be7c12c
AO
5545if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5546 echo "$ac_t""yes" 1>&6
5547 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5548 cat >> confdefs.h <<EOF
5549#define $ac_tr_hdr 1
252b5132 5550EOF
6be7c12c
AO
5551
5552else
5553 echo "$ac_t""no" 1>&6
252b5132
RH
5554fi
5555done
5556
5557 if test "$ac_cv_header_sys_procfs_h" = yes; then
6be7c12c 5558 echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5559echo "configure:5560: checking for prstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5560 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
5561 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5562else
6be7c12c 5563 cat > conftest.$ac_ext <<EOF
f8fc3443 5564#line 5565 "configure"
252b5132 5565#include "confdefs.h"
7ee38065
MS
5566
5567#define _SYSCALL32
252b5132 5568#include <sys/procfs.h>
6be7c12c 5569int main() {
252b5132 5570prstatus_t avar
6be7c12c
AO
5571; return 0; }
5572EOF
f8fc3443 5573if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5574 rm -rf conftest*
252b5132
RH
5575 bfd_cv_have_sys_procfs_type_prstatus_t=yes
5576else
6be7c12c
AO
5577 echo "configure: failed program was:" >&5
5578 cat conftest.$ac_ext >&5
5579 rm -rf conftest*
5580 bfd_cv_have_sys_procfs_type_prstatus_t=no
5581
252b5132 5582fi
6be7c12c 5583rm -f conftest*
252b5132
RH
5584fi
5585
5586 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
6be7c12c 5587 cat >> confdefs.h <<\EOF
252b5132
RH
5588#define HAVE_PRSTATUS_T 1
5589EOF
5590
5591 fi
6be7c12c 5592 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
252b5132 5593
6be7c12c 5594 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5595echo "configure:5596: checking for prstatus32_t in sys/procfs.h" >&5
6be7c12c
AO
5596 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5598else
6be7c12c 5599 cat > conftest.$ac_ext <<EOF
f8fc3443 5600#line 5601 "configure"
7ee38065
MS
5601#include "confdefs.h"
5602
5603#define _SYSCALL32
5604#include <sys/procfs.h>
6be7c12c 5605int main() {
7ee38065 5606prstatus32_t avar
6be7c12c
AO
5607; return 0; }
5608EOF
f8fc3443 5609if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5610 rm -rf conftest*
7ee38065
MS
5611 bfd_cv_have_sys_procfs_type_prstatus32_t=yes
5612else
6be7c12c
AO
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 bfd_cv_have_sys_procfs_type_prstatus32_t=no
5617
7ee38065 5618fi
6be7c12c 5619rm -f conftest*
7ee38065
MS
5620fi
5621
5622 if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
6be7c12c 5623 cat >> confdefs.h <<\EOF
7ee38065
MS
5624#define HAVE_PRSTATUS32_T 1
5625EOF
5626
5627 fi
6be7c12c 5628 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
7ee38065 5629
6be7c12c 5630 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5631echo "configure:5632: checking for prstatus_t.pr_who in sys/procfs.h" >&5
6be7c12c
AO
5632 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
5633 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5634else
6be7c12c 5635 cat > conftest.$ac_ext <<EOF
f8fc3443 5636#line 5637 "configure"
252b5132 5637#include "confdefs.h"
7ee38065
MS
5638
5639#define _SYSCALL32
252b5132 5640#include <sys/procfs.h>
6be7c12c 5641int main() {
252b5132 5642prstatus_t avar; void* aref = (void*) &avar.pr_who
6be7c12c
AO
5643; return 0; }
5644EOF
f8fc3443 5645if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5646 rm -rf conftest*
252b5132
RH
5647 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
5648else
6be7c12c
AO
5649 echo "configure: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 rm -rf conftest*
5652 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
5653
252b5132 5654fi
6be7c12c 5655rm -f conftest*
252b5132
RH
5656fi
5657
5658 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
6be7c12c 5659 cat >> confdefs.h <<\EOF
252b5132
RH
5660#define HAVE_PRSTATUS_T_PR_WHO 1
5661EOF
5662
5663 fi
6be7c12c 5664 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
252b5132 5665
6be7c12c 5666 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5667echo "configure:5668: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
6be7c12c
AO
5668 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
5669 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5670else
6be7c12c 5671 cat > conftest.$ac_ext <<EOF
f8fc3443 5672#line 5673 "configure"
7ee38065
MS
5673#include "confdefs.h"
5674
5675#define _SYSCALL32
5676#include <sys/procfs.h>
6be7c12c 5677int main() {
7ee38065 5678prstatus32_t avar; void* aref = (void*) &avar.pr_who
6be7c12c
AO
5679; return 0; }
5680EOF
f8fc3443 5681if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5682 rm -rf conftest*
7ee38065
MS
5683 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
5684else
6be7c12c
AO
5685 echo "configure: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
5687 rm -rf conftest*
5688 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
5689
7ee38065 5690fi
6be7c12c 5691rm -f conftest*
7ee38065
MS
5692fi
5693
5694 if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
6be7c12c 5695 cat >> confdefs.h <<\EOF
7ee38065
MS
5696#define HAVE_PRSTATUS32_T_PR_WHO 1
5697EOF
5698
5699 fi
6be7c12c 5700 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
7ee38065 5701
6be7c12c 5702 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5703echo "configure:5704: checking for pstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5704 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5706else
6be7c12c 5707 cat > conftest.$ac_ext <<EOF
f8fc3443 5708#line 5709 "configure"
252b5132 5709#include "confdefs.h"
7ee38065
MS
5710
5711#define _SYSCALL32
252b5132 5712#include <sys/procfs.h>
6be7c12c 5713int main() {
252b5132 5714pstatus_t avar
6be7c12c
AO
5715; return 0; }
5716EOF
f8fc3443 5717if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5718 rm -rf conftest*
252b5132
RH
5719 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5720else
6be7c12c
AO
5721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5723 rm -rf conftest*
5724 bfd_cv_have_sys_procfs_type_pstatus_t=no
5725
252b5132 5726fi
6be7c12c 5727rm -f conftest*
252b5132
RH
5728fi
5729
5730 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
6be7c12c 5731 cat >> confdefs.h <<\EOF
252b5132
RH
5732#define HAVE_PSTATUS_T 1
5733EOF
5734
5735 fi
6be7c12c 5736 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
252b5132 5737
6be7c12c 5738 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5739echo "configure:5740: checking for pxstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5740 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
5741 echo $ac_n "(cached) $ac_c" 1>&6
f572a39d 5742else
6be7c12c 5743 cat > conftest.$ac_ext <<EOF
f8fc3443 5744#line 5745 "configure"
f572a39d
AM
5745#include "confdefs.h"
5746
5747#define _SYSCALL32
5748#include <sys/procfs.h>
6be7c12c 5749int main() {
f572a39d 5750pxstatus_t avar
6be7c12c
AO
5751; return 0; }
5752EOF
f8fc3443 5753if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5754 rm -rf conftest*
f572a39d
AM
5755 bfd_cv_have_sys_procfs_type_pxstatus_t=yes
5756else
6be7c12c
AO
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5759 rm -rf conftest*
5760 bfd_cv_have_sys_procfs_type_pxstatus_t=no
5761
f572a39d 5762fi
6be7c12c 5763rm -f conftest*
f572a39d
AM
5764fi
5765
5766 if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
6be7c12c 5767 cat >> confdefs.h <<\EOF
f572a39d
AM
5768#define HAVE_PXSTATUS_T 1
5769EOF
5770
5771 fi
6be7c12c 5772 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
f572a39d 5773
6be7c12c 5774 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5775echo "configure:5776: checking for pstatus32_t in sys/procfs.h" >&5
6be7c12c
AO
5776 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5778else
6be7c12c 5779 cat > conftest.$ac_ext <<EOF
f8fc3443 5780#line 5781 "configure"
7ee38065
MS
5781#include "confdefs.h"
5782
5783#define _SYSCALL32
5784#include <sys/procfs.h>
6be7c12c 5785int main() {
7ee38065 5786pstatus32_t avar
6be7c12c
AO
5787; return 0; }
5788EOF
f8fc3443 5789if { (eval echo configure:5790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5790 rm -rf conftest*
7ee38065
MS
5791 bfd_cv_have_sys_procfs_type_pstatus32_t=yes
5792else
6be7c12c
AO
5793 echo "configure: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 rm -rf conftest*
5796 bfd_cv_have_sys_procfs_type_pstatus32_t=no
5797
7ee38065 5798fi
6be7c12c 5799rm -f conftest*
7ee38065
MS
5800fi
5801
5802 if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
6be7c12c 5803 cat >> confdefs.h <<\EOF
7ee38065
MS
5804#define HAVE_PSTATUS32_T 1
5805EOF
5806
5807 fi
6be7c12c 5808 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
7ee38065 5809
6be7c12c 5810 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5811echo "configure:5812: checking for prpsinfo_t in sys/procfs.h" >&5
6be7c12c
AO
5812 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
5813 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5814else
6be7c12c 5815 cat > conftest.$ac_ext <<EOF
f8fc3443 5816#line 5817 "configure"
252b5132 5817#include "confdefs.h"
7ee38065
MS
5818
5819#define _SYSCALL32
252b5132 5820#include <sys/procfs.h>
6be7c12c 5821int main() {
252b5132 5822prpsinfo_t avar
6be7c12c
AO
5823; return 0; }
5824EOF
f8fc3443 5825if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5826 rm -rf conftest*
252b5132
RH
5827 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
5828else
6be7c12c
AO
5829 echo "configure: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5831 rm -rf conftest*
5832 bfd_cv_have_sys_procfs_type_prpsinfo_t=no
5833
252b5132 5834fi
6be7c12c 5835rm -f conftest*
252b5132
RH
5836fi
5837
5838 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
6be7c12c 5839 cat >> confdefs.h <<\EOF
252b5132
RH
5840#define HAVE_PRPSINFO_T 1
5841EOF
5842
5843 fi
6be7c12c 5844 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
252b5132 5845
6be7c12c 5846 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5847echo "configure:5848: checking for prpsinfo32_t in sys/procfs.h" >&5
6be7c12c
AO
5848 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
5849 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5850else
6be7c12c 5851 cat > conftest.$ac_ext <<EOF
f8fc3443 5852#line 5853 "configure"
7ee38065
MS
5853#include "confdefs.h"
5854
5855#define _SYSCALL32
5856#include <sys/procfs.h>
6be7c12c 5857int main() {
7ee38065 5858prpsinfo32_t avar
6be7c12c
AO
5859; return 0; }
5860EOF
f8fc3443 5861if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5862 rm -rf conftest*
7ee38065
MS
5863 bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
5864else
6be7c12c
AO
5865 echo "configure: failed program was:" >&5
5866 cat conftest.$ac_ext >&5
5867 rm -rf conftest*
5868 bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
5869
7ee38065 5870fi
6be7c12c 5871rm -f conftest*
7ee38065
MS
5872fi
5873
5874 if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
6be7c12c 5875 cat >> confdefs.h <<\EOF
7ee38065
MS
5876#define HAVE_PRPSINFO32_T 1
5877EOF
5878
5879 fi
6be7c12c 5880 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
7ee38065 5881
6be7c12c 5882 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5883echo "configure:5884: checking for psinfo_t in sys/procfs.h" >&5
6be7c12c
AO
5884 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5886else
6be7c12c 5887 cat > conftest.$ac_ext <<EOF
f8fc3443 5888#line 5889 "configure"
252b5132 5889#include "confdefs.h"
7ee38065
MS
5890
5891#define _SYSCALL32
252b5132 5892#include <sys/procfs.h>
6be7c12c 5893int main() {
252b5132 5894psinfo_t avar
6be7c12c
AO
5895; return 0; }
5896EOF
f8fc3443 5897if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5898 rm -rf conftest*
252b5132
RH
5899 bfd_cv_have_sys_procfs_type_psinfo_t=yes
5900else
6be7c12c
AO
5901 echo "configure: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 rm -rf conftest*
5904 bfd_cv_have_sys_procfs_type_psinfo_t=no
5905
252b5132 5906fi
6be7c12c 5907rm -f conftest*
252b5132
RH
5908fi
5909
5910 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
6be7c12c 5911 cat >> confdefs.h <<\EOF
252b5132
RH
5912#define HAVE_PSINFO_T 1
5913EOF
5914
5915 fi
6be7c12c 5916 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
252b5132 5917
6be7c12c 5918 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5919echo "configure:5920: checking for psinfo32_t in sys/procfs.h" >&5
6be7c12c
AO
5920 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
5921 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5922else
6be7c12c 5923 cat > conftest.$ac_ext <<EOF
f8fc3443 5924#line 5925 "configure"
7ee38065
MS
5925#include "confdefs.h"
5926
5927#define _SYSCALL32
5928#include <sys/procfs.h>
6be7c12c 5929int main() {
7ee38065 5930psinfo32_t avar
6be7c12c
AO
5931; return 0; }
5932EOF
f8fc3443 5933if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5934 rm -rf conftest*
7ee38065
MS
5935 bfd_cv_have_sys_procfs_type_psinfo32_t=yes
5936else
6be7c12c
AO
5937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 rm -rf conftest*
5940 bfd_cv_have_sys_procfs_type_psinfo32_t=no
5941
7ee38065 5942fi
6be7c12c 5943rm -f conftest*
7ee38065
MS
5944fi
5945
5946 if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
6be7c12c 5947 cat >> confdefs.h <<\EOF
7ee38065
MS
5948#define HAVE_PSINFO32_T 1
5949EOF
5950
5951 fi
6be7c12c 5952 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
7ee38065 5953
6be7c12c 5954 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5955echo "configure:5956: checking for lwpstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5956 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5958else
6be7c12c 5959 cat > conftest.$ac_ext <<EOF
f8fc3443 5960#line 5961 "configure"
252b5132 5961#include "confdefs.h"
7ee38065
MS
5962
5963#define _SYSCALL32
252b5132 5964#include <sys/procfs.h>
6be7c12c 5965int main() {
252b5132 5966lwpstatus_t avar
6be7c12c
AO
5967; return 0; }
5968EOF
f8fc3443 5969if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5970 rm -rf conftest*
252b5132
RH
5971 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
5972else
6be7c12c
AO
5973 echo "configure: failed program was:" >&5
5974 cat conftest.$ac_ext >&5
5975 rm -rf conftest*
5976 bfd_cv_have_sys_procfs_type_lwpstatus_t=no
5977
252b5132 5978fi
6be7c12c 5979rm -f conftest*
252b5132
RH
5980fi
5981
5982 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
6be7c12c 5983 cat >> confdefs.h <<\EOF
252b5132
RH
5984#define HAVE_LWPSTATUS_T 1
5985EOF
5986
5987 fi
6be7c12c 5988 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
252b5132 5989
6be7c12c 5990 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 5991echo "configure:5992: checking for lwpxstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5992 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
5993 echo $ac_n "(cached) $ac_c" 1>&6
f572a39d 5994else
6be7c12c 5995 cat > conftest.$ac_ext <<EOF
f8fc3443 5996#line 5997 "configure"
f572a39d
AM
5997#include "confdefs.h"
5998
5999#define _SYSCALL32
6000#include <sys/procfs.h>
6be7c12c 6001int main() {
f572a39d 6002lwpxstatus_t avar
6be7c12c
AO
6003; return 0; }
6004EOF
f8fc3443 6005if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6006 rm -rf conftest*
f572a39d
AM
6007 bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
6008else
6be7c12c
AO
6009 echo "configure: failed program was:" >&5
6010 cat conftest.$ac_ext >&5
6011 rm -rf conftest*
6012 bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
6013
f572a39d 6014fi
6be7c12c 6015rm -f conftest*
f572a39d
AM
6016fi
6017
6018 if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
6be7c12c 6019 cat >> confdefs.h <<\EOF
f572a39d
AM
6020#define HAVE_LWPXSTATUS_T 1
6021EOF
6022
6023 fi
6be7c12c 6024 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
f572a39d 6025
6be7c12c 6026 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 6027echo "configure:6028: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
6be7c12c
AO
6028 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 6030else
6be7c12c 6031 cat > conftest.$ac_ext <<EOF
f8fc3443 6032#line 6033 "configure"
252b5132 6033#include "confdefs.h"
7ee38065
MS
6034
6035#define _SYSCALL32
252b5132 6036#include <sys/procfs.h>
6be7c12c 6037int main() {
252b5132 6038lwpstatus_t avar; void* aref = (void*) &avar.pr_context
6be7c12c
AO
6039; return 0; }
6040EOF
f8fc3443 6041if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6042 rm -rf conftest*
252b5132
RH
6043 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
6044else
6be7c12c
AO
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
6049
252b5132 6050fi
6be7c12c 6051rm -f conftest*
252b5132
RH
6052fi
6053
6054 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
6be7c12c 6055 cat >> confdefs.h <<\EOF
252b5132
RH
6056#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
6057EOF
6058
6059 fi
6be7c12c 6060 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
252b5132 6061
6be7c12c 6062 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 6063echo "configure:6064: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
6be7c12c
AO
6064 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
6065 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 6066else
6be7c12c 6067 cat > conftest.$ac_ext <<EOF
f8fc3443 6068#line 6069 "configure"
252b5132 6069#include "confdefs.h"
7ee38065
MS
6070
6071#define _SYSCALL32
252b5132 6072#include <sys/procfs.h>
6be7c12c 6073int main() {
252b5132 6074lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
6be7c12c
AO
6075; return 0; }
6076EOF
f8fc3443 6077if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6078 rm -rf conftest*
252b5132
RH
6079 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
6080else
6be7c12c
AO
6081 echo "configure: failed program was:" >&5
6082 cat conftest.$ac_ext >&5
6083 rm -rf conftest*
6084 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
6085
252b5132 6086fi
6be7c12c 6087rm -f conftest*
252b5132
RH
6088fi
6089
6090 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
6be7c12c 6091 cat >> confdefs.h <<\EOF
252b5132
RH
6092#define HAVE_LWPSTATUS_T_PR_REG 1
6093EOF
6094
6095 fi
6be7c12c 6096 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
252b5132 6097
6be7c12c 6098 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
f8fc3443 6099echo "configure:6100: checking for win32_pstatus_t in sys/procfs.h" >&5
6be7c12c
AO
6100 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
6101 echo $ac_n "(cached) $ac_c" 1>&6
e3c976c4 6102else
6be7c12c 6103 cat > conftest.$ac_ext <<EOF
f8fc3443 6104#line 6105 "configure"
e3c976c4 6105#include "confdefs.h"
7ee38065
MS
6106
6107#define _SYSCALL32
e3c976c4 6108#include <sys/procfs.h>
6be7c12c 6109int main() {
e3c976c4 6110win32_pstatus_t avar
6be7c12c
AO
6111; return 0; }
6112EOF
f8fc3443 6113if { (eval echo configure:6114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6114 rm -rf conftest*
e3c976c4
ILT
6115 bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
6116else
6be7c12c
AO
6117 echo "configure: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6119 rm -rf conftest*
6120 bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
6121
e3c976c4 6122fi
6be7c12c 6123rm -f conftest*
252b5132
RH
6124fi
6125
e3c976c4 6126 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
6be7c12c 6127 cat >> confdefs.h <<\EOF
e3c976c4 6128#define HAVE_WIN32_PSTATUS_T 1
16e9c715
NC
6129EOF
6130
6131 fi
6be7c12c 6132 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
e3c976c4
ILT
6133
6134 fi
6135fi
16e9c715 6136
b3baf5d0 6137
6be7c12c
AO
6138if test -n "$TRAD_HEADER"; then
6139 cat >> confdefs.h <<EOF
252b5132
RH
6140#define TRAD_HEADER $TRAD_HEADER
6141EOF
6142
3f9b03b5 6143fi
252b5132
RH
6144
6145# Horrible hacks to build DLLs on Windows.
6146WIN32LDFLAGS=
6147WIN32LIBADD=
6148case "${host}" in
6149*-*-cygwin*)
6150 if test "$enable_shared" = "yes"; then
6151 WIN32LDFLAGS="-no-undefined"
6152 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
6153 fi
6154 ;;
78be1d6e 6155*-*-linux*)
39691762
L
6156 # We borrow WIN32LIBADD so that the shared libbfd won't depend on
6157 # libiberty.a.
ca51bfff
L
6158 case "${host}" in
6159 mips*-*-linux*)
6160 # Linux/MIPS uses PIC by default.
6161 if test "$enable_shared" = "yes"; then
6162 WIN32LIBADD="-L../libiberty -liberty"
6163 fi
6164 ;;
6165 *)
66e25bab 6166 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
bb2a49f2 6167 if test -n "$x"; then
ca51bfff
L
6168 WIN32LIBADD="-L../libiberty/pic -liberty"
6169 fi
6170 ;;
6171 esac
39691762 6172 ;;
252b5132
RH
6173esac
6174
6be7c12c
AO
6175
6176
252b5132
RH
6177# target stuff:
6178
6179# Canonicalize the secondary target names.
6180if test -n "$enable_targets" ; then
6181 for targ in `echo $enable_targets | sed 's/,/ /g'`
6182 do
6d83c84b 6183 result=`$ac_config_sub $targ 2>/dev/null`
252b5132
RH
6184 if test -n "$result" ; then
6185 canon_targets="$canon_targets $result"
6186 else
6187 # Allow targets that config.sub doesn't recognize, like "all".
6188 canon_targets="$canon_targets $targ"
6189 fi
6190 done
6191fi
6192
6193all_targets=false
6194defvec=
6195selvecs=
08f74004 6196assocvecs=
252b5132
RH
6197selarchs=
6198TDEFINES=
6199for targ in $target $canon_targets
6200do
6201 if test "x$targ" = "xall"; then
6202 all_targets=true
08f74004 6203 assocvecs="$assocvecs $targ_defvec $targ_selvecs"
252b5132
RH
6204 else
6205 . $srcdir/config.bfd
6206 if test "x$targ" = "x$target"; then
6207 defvec=$targ_defvec
6208 fi
6209 selvecs="$selvecs $targ_defvec $targ_selvecs"
6210 selarchs="$selarchs $targ_archs"
6211 TDEFINES="$TDEFINES $targ_cflags"
6212 fi
6213done
6214
6be7c12c 6215
252b5132
RH
6216# This processing still needs to be done if we're to decide properly whether
6217# 64-bit support needs to be compiled in. Currently, it will be included if
6218# the default or any other explicitly requested target requires it; it
6219# will not be included on a 32-bit host if no 64-bit target is requested, and
9eb7245e 6220# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
252b5132
RH
6221# used.
6222
6223# uniq the default and selected vectors in all the configured targets.
6224f=""
6225for i in $selvecs ; do
6226 case " $f " in
6227 *" $i "*) ;;
6228 *) f="$f $i" ;;
6229 esac
6230done
6231selvecs="$f"
6232
6be7c12c 6233
08f74004
AM
6234# uniq the associated vectors in all the configured targets.
6235f=""
6236for i in $assocvecs ; do
6237 case " $f " in
6238 *" $i "*) ;;
6239 *) f="$f $i" ;;
6240 esac
6241done
6242assocvecs="$f"
6243
6244
252b5132
RH
6245# uniq the architectures in all the configured targets.
6246f=""
6247for i in $selarchs ; do
6248 case " $f " in
6249 *" $i "*) ;;
6250 *) f="$f $i" ;;
6251 esac
6252done
6253selarchs="$f"
6254
6255# Target backend .o files.
6256tb=
6257
65765700 6258elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
252b5132
RH
6259
6260for vec in $selvecs
6261do
69263e90 6262 target_size=32
252b5132
RH
6263 case "$vec" in
6264 # This list is alphabetized to make it easy to compare
dc810e39
AM
6265 # with the two vector lists in targets.c. For the same reason,
6266 # use one entry per line, even though this leads to long lines.
252b5132
RH
6267 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
6268 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
341ca622 6269 aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
252b5132
RH
6270 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
6271 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
6272 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
6273 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
6274 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
6275 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
dc810e39
AM
6276 arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
6277 arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
6278 arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
6279 arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
6280 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
6281 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
6282 armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
6283 armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
6284 armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
6285 armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
6286 armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
252b5132
RH
6287 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
6288 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
fac41780 6289 bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
dc810e39 6290 bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
73c3cd1c 6291 bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
adde6300 6292 bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
dc810e39 6293 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
252b5132 6294 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
252b5132 6295 bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
b6821651 6296 bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
c6e90b02 6297 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
06c15ad7 6298 bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
252b5132
RH
6299 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
6300 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
d172d4ba 6301 bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
252b5132 6302 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
4e5ba5b7 6303 bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
e01b0e69 6304 bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
dc810e39
AM
6305 bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
6306 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5b93d8bb 6307 bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
b6821651
AM
6308 bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
6309 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
9d751335 6310 bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
dc810e39 6311 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
b2ef150d 6312 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
dc810e39 6313 bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
fcf12726 6314 bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
cf88bb9f 6315 bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
a75473eb 6316 bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
252b5132 6317 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
dc810e39
AM
6318 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
6319 bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
b6821651 6320 bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
c6e90b02 6321 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
252b5132 6322 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6edf0760
NC
6323 bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6324 bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6325 bfd_elf32_m32rlelin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
f5a6f915
SC
6326 bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
6327 bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
252b5132
RH
6328 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
6329 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
6330 bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
6331 bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
6332 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
6333 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
2469cfa2 6334 bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
8a397dad
TS
6335 bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6336 bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6337 bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6338 bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
b3baf5d0 6339 bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
3b16e843 6340 bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
0bcb993b
ILT
6341 bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
6342 bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
b6821651
AM
6343 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
6344 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
a85d7ed0 6345 bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
eb1e0e80
NC
6346 # FIXME: We include cofflink.lo not because it's needed for
6347 # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
6348 # which needs it but does not list it. Should be fixed in right place.
9cba27b2
JT
6349 bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6350 bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
2bc3c89a
AM
6351 bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6352 bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6353 bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
6354 bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
b6821651
AM
6355 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
6356 bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6357 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
6358 bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6359 bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6360 bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
252b5132 6361 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
c6e90b02
TS
6362 bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
6363 bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
dc810e39 6364 bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
252b5132 6365 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
90ace9e9 6366 bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
93fbbb04 6367 bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
e0001a05
NC
6368 bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
6369 bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
2238051f 6370 bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
dc810e39
AM
6371 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
6372 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02 6373 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
dc810e39
AM
6374 bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
6375 bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
dc810e39 6376 bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
fcf12726 6377 bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
dc810e39
AM
6378 bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6379 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02 6380 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
3c3bdf30 6381 bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
dc810e39
AM
6382 bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
6383 bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
6384 bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
341ca622
AM
6385 bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6386 bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
2bc3c89a
AM
6387 bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6388 bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6389 bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6390 bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
dc810e39 6391 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02
TS
6392 bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6393 bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
dc810e39 6394 bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
3c3bdf30 6395 bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
dc810e39
AM
6396 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6397 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
6398 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6399 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
06c15ad7 6400 cris_aout_vec) tb="$tb aout-cris.lo" ;;
dc810e39 6401 demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
252b5132 6402 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
252b5132 6403 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
dc810e39
AM
6404 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
6405 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
252b5132
RH
6406 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
6407 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
6408 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
6409 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
6410 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
6411 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
6412 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
6413 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
6414 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
6415 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
6416 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
6417 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
252b5132
RH
6418 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
6419 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
6420 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
6421 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
dc810e39 6422 i386msdos_vec) tb="$tb i386msdos.lo" ;;
252b5132
RH
6423 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
6424 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
dc810e39
AM
6425 i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
6426 i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
252b5132
RH
6427 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
6428 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
6429 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
6430 ieee_vec) tb="$tb ieee.lo" ;;
dc810e39
AM
6431 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
6432 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
252b5132
RH
6433 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
6434 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
6435 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
6436 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
6437 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
6438 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
252b5132
RH
6439 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
6440 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
341ca622 6441 m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
93509525
KD
6442 mach_o_be_vec) tb="$tb mach-o.lo" ;;
6443 mach_o_le_vec) tb="$tb mach-o.lo" ;;
6444 mach_o_fat_vec) tb="$tb mach-o.lo" ;;
277d1b5e
ILT
6445 mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6446 mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6447 mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
6448 mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
dc810e39
AM
6449 mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
6450 mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
252b5132 6451 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
dc810e39 6452 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
252b5132 6453 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
252b5132 6454 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
dc810e39 6455 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
3b16e843 6456 or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;;
252b5132 6457 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
dc810e39 6458 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
93509525
KD
6459 pef_vec) tb="$tb pef.lo" ;;
6460 pef_xlib_vec) tb="$tb pef.lo" ;;
e135f41b 6461 pdp11_aout_vec) tb="$tb pdp11.lo" ;;
6768c14a 6462 pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
252b5132 6463 ppcboot_vec) tb="$tb ppcboot.lo" ;;
dc810e39 6464 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
eb1e0e80 6465 rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
dc810e39 6466 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
252b5132 6467 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
dc810e39 6468 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
252b5132 6469 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
dc810e39 6470 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
60bcf0fa
NC
6471 shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
6472 shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
252b5132 6473 som_vec) tb="$tb som.lo" ;;
dc810e39 6474 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
252b5132
RH
6475 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
6476 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
6477 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
6478 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
6479 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
252b5132 6480 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
93509525 6481 sym_vec) tb="$tb xsym.lo" ;;
252b5132
RH
6482 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
6483 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
026df7c5
NC
6484 tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;;
6485 tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;;
6486 tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;;
6487 tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;;
6488 tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;;
6489 tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;;
81635ce4 6490 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6491 tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
81635ce4 6492 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6493 tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
81635ce4 6494 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6495 tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
252b5132 6496 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
90ace9e9 6497 vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
3c2bfad6 6498 vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
ba26fd96 6499 vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;;
252b5132 6500 versados_vec) tb="$tb versados.lo" ;;
dc810e39 6501 vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
252b5132
RH
6502 vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
6503 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
6504 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
6505 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
6506
341ca622
AM
6507 # These appear out of order in targets.c
6508 srec_vec) tb="$tb srec.lo" ;;
6509 symbolsrec_vec) tb="$tb srec.lo" ;;
6510 tekhex_vec) tb="$tb tekhex.lo" ;;
6511 cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
6512 cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
6513
252b5132 6514 "") ;;
6be7c12c 6515 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
252b5132 6516 esac
69263e90
AM
6517
6518 if test ${target_size} = 64; then
6519 target64=true
6520 fi
6521 if test x"${vec}" = x"${defvec}"; then
6522 bfd_default_target_size=${target_size}
6523 fi
252b5132
RH
6524done
6525
6526# Target architecture .o files.
6527# A couple of CPUs use shorter file names to avoid problems on DOS
6528# filesystems.
6529ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
6530
6531# Weed out duplicate .o files.
6532f=""
6533for i in $tb ; do
6534 case " $f " in
6535 *" $i "*) ;;
6536 *) f="$f $i" ;;
6537 esac
6538done
6539tb="$f"
6540
6541f=""
6542for i in $ta ; do
6543 case " $f " in
6544 *" $i "*) ;;
6545 *) f="$f $i" ;;
6546 esac
6547done
6548ta="$f"
6549
6550bfd_backends="$tb"
6551bfd_machines="$ta"
6552
6553if test x${all_targets} = xtrue ; then
6554 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
6555 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
6556 selvecs=
6557 havevecs=
6558 selarchs=
08f74004
AM
6559 test -n "$assocvecs" &&
6560 assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
252b5132
RH
6561else # all_targets is true
6562 # Only set these if they will be nonempty, for the clever echo.
6563 havevecs=
08f74004 6564 assocvecs=
252b5132
RH
6565 test -n "$selvecs" &&
6566 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
6567 test -n "$selvecs" &&
6568 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6569 test -n "$selarchs" &&
6570 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6571fi # all_targets is true
6572
6573case ${host64}-${target64}-${want64} in
6574 *true*)
6575 wordsize=64
2858ef35 6576 bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
252b5132
RH
6577 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
6578 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
6be7c12c
AO
6579 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
6580 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
252b5132 6581 fi
966abd70
HPN
6582 if test -n "$GCC" ; then
6583 bad_64bit_gcc=no;
6584 echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
6edf0760 6585echo "configure:6586: checking for gcc version with buggy 64-bit support" >&5
966abd70
HPN
6586 # Add more tests for gcc versions with non-working 64-bit support here.
6587 cat > conftest.$ac_ext <<EOF
6edf0760 6588#line 6589 "configure"
966abd70
HPN
6589#include "confdefs.h"
6590:__GNUC__:__GNUC_MINOR__:__i386__:
6591EOF
6592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6593 egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
6594 rm -rf conftest*
6595 bad_64bit_gcc=yes;
6596 echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
6597else
6598 rm -rf conftest*
6599 echo "$ac_t""no" 1>&6
6600fi
6601rm -f conftest*
6602
6603 if test $bad_64bit_gcc = yes ; then
6604 { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
6605 fi
6606 fi
252b5132
RH
6607 ;;
6608 false-false-false)
6609 wordsize=32
2858ef35 6610 bfd_libs='$(BFD32_LIBS)'
252b5132
RH
6611 all_backends='$(BFD32_BACKENDS)'
6612 ;;
6613esac
6614
6be7c12c
AO
6615
6616
6617
6618
6619
69263e90 6620
2858ef35 6621
252b5132
RH
6622tdefaults=""
6623test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
6624test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
08f74004 6625test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
252b5132
RH
6626test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
6627test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
6628
6be7c12c 6629
4615568e 6630for ac_hdr in unistd.h
252b5132 6631do
6be7c12c
AO
6632ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6633echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6edf0760 6634echo "configure:6635: checking for $ac_hdr" >&5
6be7c12c
AO
6635if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6636 echo $ac_n "(cached) $ac_c" 1>&6
6637else
6638 cat > conftest.$ac_ext <<EOF
6edf0760 6639#line 6640 "configure"
252b5132 6640#include "confdefs.h"
6be7c12c
AO
6641#include <$ac_hdr>
6642EOF
6643ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6edf0760 6644{ (eval echo configure:6645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
6645ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6646if test -z "$ac_err"; then
6647 rm -rf conftest*
6648 eval "ac_cv_header_$ac_safe=yes"
252b5132 6649else
6be7c12c
AO
6650 echo "$ac_err" >&5
6651 echo "configure: failed program was:" >&5
252b5132 6652 cat conftest.$ac_ext >&5
6be7c12c
AO
6653 rm -rf conftest*
6654 eval "ac_cv_header_$ac_safe=no"
252b5132 6655fi
6be7c12c 6656rm -f conftest*
252b5132 6657fi
6be7c12c
AO
6658if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6659 echo "$ac_t""yes" 1>&6
6660 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6661 cat >> confdefs.h <<EOF
6662#define $ac_tr_hdr 1
252b5132 6663EOF
6be7c12c
AO
6664
6665else
6666 echo "$ac_t""no" 1>&6
252b5132
RH
6667fi
6668done
6669
6670for ac_func in getpagesize
6671do
6be7c12c 6672echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6edf0760 6673echo "configure:6674: checking for $ac_func" >&5
6be7c12c
AO
6674if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6675 echo $ac_n "(cached) $ac_c" 1>&6
6676else
6677 cat > conftest.$ac_ext <<EOF
6edf0760 6678#line 6679 "configure"
252b5132
RH
6679#include "confdefs.h"
6680/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 6681 which can conflict with char $ac_func(); below. */
252b5132
RH
6682#include <assert.h>
6683/* Override any gcc2 internal prototype to avoid an error. */
6684/* We use char because int might match the return type of a gcc2
6be7c12c
AO
6685 builtin and then its argument prototype would still apply. */
6686char $ac_func();
6687
6688int main() {
252b5132
RH
6689
6690/* The GNU C library defines this for functions which it implements
6691 to always fail with ENOSYS. Some functions are actually named
6692 something starting with __ and the normal name is an alias. */
6693#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6694choke me
6695#else
6be7c12c 6696$ac_func();
252b5132
RH
6697#endif
6698
6be7c12c 6699; return 0; }
252b5132 6700EOF
6edf0760 6701if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
6702 rm -rf conftest*
6703 eval "ac_cv_func_$ac_func=yes"
6704else
6705 echo "configure: failed program was:" >&5
6706 cat conftest.$ac_ext >&5
6707 rm -rf conftest*
6708 eval "ac_cv_func_$ac_func=no"
6709fi
6710rm -f conftest*
6711fi
252b5132 6712
6be7c12c
AO
6713if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6714 echo "$ac_t""yes" 1>&6
6715 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6716 cat >> confdefs.h <<EOF
6717#define $ac_tr_func 1
6718EOF
6719
6720else
6721 echo "$ac_t""no" 1>&6
252b5132
RH
6722fi
6723done
6724
6be7c12c 6725echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6edf0760 6726echo "configure:6727: checking for working mmap" >&5
6be7c12c
AO
6727if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6728 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
6729else
6730 if test "$cross_compiling" = yes; then
6731 ac_cv_func_mmap_fixed_mapped=no
6732else
6be7c12c 6733 cat > conftest.$ac_ext <<EOF
6edf0760 6734#line 6735 "configure"
252b5132 6735#include "confdefs.h"
6be7c12c 6736
252b5132
RH
6737/* Thanks to Mike Haertel and Jim Avera for this test.
6738 Here is a matrix of mmap possibilities:
6739 mmap private not fixed
6740 mmap private fixed at somewhere currently unmapped
6741 mmap private fixed at somewhere already mapped
6742 mmap shared not fixed
6743 mmap shared fixed at somewhere currently unmapped
6744 mmap shared fixed at somewhere already mapped
6745 For private mappings, we should verify that changes cannot be read()
6746 back from the file, nor mmap's back from the file at a different
6747 address. (There have been systems where private was not correctly
6748 implemented like the infamous i386 svr4.0, and systems where the
6be7c12c 6749 VM page cache was not coherent with the filesystem buffer cache
252b5132
RH
6750 like early versions of FreeBSD and possibly contemporary NetBSD.)
6751 For shared mappings, we should conversely verify that changes get
6752 propogated back to all the places they're supposed to be.
6753
6754 Grep wants private fixed already mapped.
6755 The main things grep needs to know about mmap are:
6756 * does it exist and is it safe to write into the mmap'd area
6757 * how to use it (BSD variants) */
6758#include <sys/types.h>
6759#include <fcntl.h>
6760#include <sys/mman.h>
6761
b3baf5d0 6762/* This mess was copied from the GNU getpagesize.h. */
6be7c12c 6763#ifndef HAVE_GETPAGESIZE
4615568e
NC
6764# ifdef HAVE_UNISTD_H
6765# include <unistd.h>
6766# endif
6be7c12c 6767
252b5132 6768/* Assume that all systems that can run configure have sys/param.h. */
6be7c12c 6769# ifndef HAVE_SYS_PARAM_H
252b5132
RH
6770# define HAVE_SYS_PARAM_H 1
6771# endif
6772
6773# ifdef _SC_PAGESIZE
6774# define getpagesize() sysconf(_SC_PAGESIZE)
6775# else /* no _SC_PAGESIZE */
6be7c12c 6776# ifdef HAVE_SYS_PARAM_H
252b5132
RH
6777# include <sys/param.h>
6778# ifdef EXEC_PAGESIZE
6779# define getpagesize() EXEC_PAGESIZE
6780# else /* no EXEC_PAGESIZE */
6781# ifdef NBPG
6782# define getpagesize() NBPG * CLSIZE
6783# ifndef CLSIZE
6784# define CLSIZE 1
6785# endif /* no CLSIZE */
6786# else /* no NBPG */
6787# ifdef NBPC
6788# define getpagesize() NBPC
6789# else /* no NBPC */
6790# ifdef PAGESIZE
6791# define getpagesize() PAGESIZE
6792# endif /* PAGESIZE */
6793# endif /* no NBPC */
6794# endif /* no NBPG */
6795# endif /* no EXEC_PAGESIZE */
6796# else /* no HAVE_SYS_PARAM_H */
6797# define getpagesize() 8192 /* punt totally */
6798# endif /* no HAVE_SYS_PARAM_H */
6799# endif /* no _SC_PAGESIZE */
6800
6801#endif /* no HAVE_GETPAGESIZE */
6802
6be7c12c
AO
6803#ifdef __cplusplus
6804extern "C" { void *malloc(unsigned); }
6805#else
6806char *malloc();
6807#endif
6808
252b5132 6809int
6be7c12c 6810main()
252b5132 6811{
6be7c12c
AO
6812 char *data, *data2, *data3;
6813 int i, pagesize;
6814 int fd;
6815
6816 pagesize = getpagesize();
6817
6818 /*
6819 * First, make a file with some known garbage in it.
6820 */
6821 data = malloc(pagesize);
6822 if (!data)
6823 exit(1);
6824 for (i = 0; i < pagesize; ++i)
6825 *(data + i) = rand();
6826 umask(0);
6827 fd = creat("conftestmmap", 0600);
6828 if (fd < 0)
6829 exit(1);
6830 if (write(fd, data, pagesize) != pagesize)
6831 exit(1);
6832 close(fd);
6833
6834 /*
6835 * Next, try to mmap the file at a fixed address which
6836 * already has something else allocated at it. If we can,
6837 * also make sure that we see the same garbage.
6838 */
6839 fd = open("conftestmmap", O_RDWR);
6840 if (fd < 0)
6841 exit(1);
6842 data2 = malloc(2 * pagesize);
6843 if (!data2)
6844 exit(1);
6845 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6846 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6847 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6848 exit(1);
6849 for (i = 0; i < pagesize; ++i)
6850 if (*(data + i) != *(data2 + i))
6851 exit(1);
6852
6853 /*
6854 * Finally, make sure that changes to the mapped area
6855 * do not percolate back to the file as seen by read().
6856 * (This is a bug on some variants of i386 svr4.0.)
6857 */
6858 for (i = 0; i < pagesize; ++i)
6859 *(data2 + i) = *(data2 + i) + 1;
6860 data3 = malloc(pagesize);
6861 if (!data3)
6862 exit(1);
6863 if (read(fd, data3, pagesize) != pagesize)
6864 exit(1);
6865 for (i = 0; i < pagesize; ++i)
6866 if (*(data + i) != *(data3 + i))
6867 exit(1);
6868 close(fd);
6869 unlink("conftestmmap");
6870 exit(0);
252b5132 6871}
6be7c12c
AO
6872
6873EOF
6edf0760 6874if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 6875then
252b5132
RH
6876 ac_cv_func_mmap_fixed_mapped=yes
6877else
6be7c12c
AO
6878 echo "configure: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880 rm -fr conftest*
6881 ac_cv_func_mmap_fixed_mapped=no
252b5132 6882fi
6be7c12c 6883rm -fr conftest*
252b5132 6884fi
6be7c12c 6885
252b5132 6886fi
b3baf5d0 6887
6be7c12c
AO
6888echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6889if test $ac_cv_func_mmap_fixed_mapped = yes; then
6890 cat >> confdefs.h <<\EOF
252b5132
RH
6891#define HAVE_MMAP 1
6892EOF
6893
6894fi
6895
6896for ac_func in madvise mprotect
6897do
6be7c12c 6898echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6edf0760 6899echo "configure:6900: checking for $ac_func" >&5
6be7c12c
AO
6900if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6901 echo $ac_n "(cached) $ac_c" 1>&6
6902else
6903 cat > conftest.$ac_ext <<EOF
6edf0760 6904#line 6905 "configure"
252b5132
RH
6905#include "confdefs.h"
6906/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 6907 which can conflict with char $ac_func(); below. */
252b5132
RH
6908#include <assert.h>
6909/* Override any gcc2 internal prototype to avoid an error. */
6910/* We use char because int might match the return type of a gcc2
6be7c12c
AO
6911 builtin and then its argument prototype would still apply. */
6912char $ac_func();
6913
6914int main() {
252b5132
RH
6915
6916/* The GNU C library defines this for functions which it implements
6917 to always fail with ENOSYS. Some functions are actually named
6918 something starting with __ and the normal name is an alias. */
6919#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6920choke me
6921#else
6be7c12c 6922$ac_func();
252b5132
RH
6923#endif
6924
6be7c12c 6925; return 0; }
252b5132 6926EOF
6edf0760 6927if { (eval echo configure:6928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
6928 rm -rf conftest*
6929 eval "ac_cv_func_$ac_func=yes"
6930else
6931 echo "configure: failed program was:" >&5
6932 cat conftest.$ac_ext >&5
6933 rm -rf conftest*
6934 eval "ac_cv_func_$ac_func=no"
6935fi
6936rm -f conftest*
6937fi
252b5132 6938
6be7c12c
AO
6939if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6940 echo "$ac_t""yes" 1>&6
6941 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6942 cat >> confdefs.h <<EOF
6943#define $ac_tr_func 1
6944EOF
6945
6946else
6947 echo "$ac_t""no" 1>&6
252b5132
RH
6948fi
6949done
6950
6951case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
6be7c12c 6952 true+yes ) cat >> confdefs.h <<\EOF
252b5132
RH
6953#define USE_MMAP 1
6954EOF
6955 ;;
6956esac
6957
6958rm -f doc/config.status
6be7c12c
AO
6959trap '' 1 2 15
6960cat > confcache <<\EOF
252b5132
RH
6961# This file is a shell script that caches the results of configure
6962# tests run on this system so they can be shared between configure
6be7c12c
AO
6963# scripts and configure runs. It is not useful on other systems.
6964# If it contains results you don't want to keep, you may remove or edit it.
252b5132 6965#
6be7c12c
AO
6966# By default, configure uses ./config.cache as the cache file,
6967# creating it if it does not exist already. You can give configure
6968# the --cache-file=FILE option to use a different cache file; that is
6969# what configure does when it calls configure scripts in
6970# subdirectories, so they share the cache.
6971# Giving --cache-file=/dev/null disables caching, for debugging configure.
6972# config.status only pays attention to the cache file if you give it the
6973# --recheck option to rerun configure.
252b5132 6974#
6be7c12c 6975EOF
252b5132
RH
6976# The following way of writing the cache mishandles newlines in values,
6977# but we know of no workaround that is simple, portable, and efficient.
6978# So, don't put newlines in cache variables' values.
6979# Ultrix sh set writes to stderr and can't be redirected directly,
6980# and sets the high bit in the cache file unless we assign to the vars.
6be7c12c
AO
6981(set) 2>&1 |
6982 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6983 *ac_space=\ *)
6984 # `set' does not quote correctly, so add quotes (double-quote substitution
6985 # turns \\\\ into \\, and sed turns \\ into \).
6986 sed -n \
6987 -e "s/'/'\\\\''/g" \
6988 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6989 ;;
6990 *)
6991 # `set' quotes correctly as required by POSIX, so do not add quotes.
6992 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6993 ;;
6994 esac >> confcache
6995if cmp -s $cache_file confcache; then
6996 :
6997else
252b5132 6998 if test -w $cache_file; then
6be7c12c
AO
6999 echo "updating cache $cache_file"
7000 cat confcache > $cache_file
252b5132
RH
7001 else
7002 echo "not updating unwritable cache $cache_file"
7003 fi
7004fi
7005rm -f confcache
7006
6be7c12c
AO
7007trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7008
252b5132
RH
7009test "x$prefix" = xNONE && prefix=$ac_default_prefix
7010# Let make expand exec_prefix.
7011test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7012
6be7c12c
AO
7013# Any assignment to VPATH causes Sun make to only execute
7014# the first set of double-colon rules, so remove it if not needed.
7015# If there is a colon in the path, we need to keep it.
252b5132 7016if test "x$srcdir" = x.; then
6be7c12c 7017 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
252b5132
RH
7018fi
7019
6be7c12c
AO
7020trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7021
252b5132
RH
7022DEFS=-DHAVE_CONFIG_H
7023
6be7c12c 7024# Without the "./", some shells look in PATH for config.status.
252b5132 7025: ${CONFIG_STATUS=./config.status}
6be7c12c
AO
7026
7027echo creating $CONFIG_STATUS
7028rm -f $CONFIG_STATUS
7029cat > $CONFIG_STATUS <<EOF
7030#! /bin/sh
252b5132
RH
7031# Generated automatically by configure.
7032# Run this file to recreate the current configuration.
6be7c12c
AO
7033# This directory was configured as follows,
7034# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7035#
7036# $0 $ac_configure_args
7037#
252b5132 7038# Compiler output produced by configure, useful for debugging
6be7c12c 7039# configure, is in ./config.log if it exists.
b3baf5d0 7040
6be7c12c
AO
7041ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7042for ac_option
252b5132 7043do
6be7c12c 7044 case "\$ac_option" in
252b5132 7045 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6be7c12c
AO
7046 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7047 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7048 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7049 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7050 exit 0 ;;
7051 -help | --help | --hel | --he | --h)
7052 echo "\$ac_cs_usage"; exit 0 ;;
7053 *) echo "\$ac_cs_usage"; exit 1 ;;
252b5132
RH
7054 esac
7055done
7056
6be7c12c
AO
7057ac_given_srcdir=$srcdir
7058ac_given_INSTALL="$INSTALL"
b3baf5d0 7059
6a0735ef 7060trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
b3baf5d0 7061EOF
6be7c12c 7062cat >> $CONFIG_STATUS <<EOF
b3baf5d0 7063
6be7c12c
AO
7064# Protect against being on the right side of a sed subst in config.status.
7065sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7066 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7067$ac_vpsub
7068$extrasub
7069s%@SHELL@%$SHELL%g
7070s%@CFLAGS@%$CFLAGS%g
7071s%@CPPFLAGS@%$CPPFLAGS%g
7072s%@CXXFLAGS@%$CXXFLAGS%g
7073s%@FFLAGS@%$FFLAGS%g
7074s%@DEFS@%$DEFS%g
7075s%@LDFLAGS@%$LDFLAGS%g
7076s%@LIBS@%$LIBS%g
7077s%@exec_prefix@%$exec_prefix%g
7078s%@prefix@%$prefix%g
7079s%@program_transform_name@%$program_transform_name%g
7080s%@bindir@%$bindir%g
7081s%@sbindir@%$sbindir%g
7082s%@libexecdir@%$libexecdir%g
7083s%@datadir@%$datadir%g
7084s%@sysconfdir@%$sysconfdir%g
7085s%@sharedstatedir@%$sharedstatedir%g
7086s%@localstatedir@%$localstatedir%g
7087s%@libdir@%$libdir%g
7088s%@includedir@%$includedir%g
7089s%@oldincludedir@%$oldincludedir%g
7090s%@infodir@%$infodir%g
7091s%@mandir@%$mandir%g
7092s%@host@%$host%g
7093s%@host_alias@%$host_alias%g
7094s%@host_cpu@%$host_cpu%g
7095s%@host_vendor@%$host_vendor%g
7096s%@host_os@%$host_os%g
7097s%@target@%$target%g
7098s%@target_alias@%$target_alias%g
7099s%@target_cpu@%$target_cpu%g
7100s%@target_vendor@%$target_vendor%g
7101s%@target_os@%$target_os%g
7102s%@build@%$build%g
7103s%@build_alias@%$build_alias%g
7104s%@build_cpu@%$build_cpu%g
7105s%@build_vendor@%$build_vendor%g
7106s%@build_os@%$build_os%g
6be7c12c
AO
7107s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7108s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7109s%@INSTALL_DATA@%$INSTALL_DATA%g
7110s%@PACKAGE@%$PACKAGE%g
7111s%@VERSION@%$VERSION%g
7112s%@ACLOCAL@%$ACLOCAL%g
7113s%@AUTOCONF@%$AUTOCONF%g
7114s%@AUTOMAKE@%$AUTOMAKE%g
7115s%@AUTOHEADER@%$AUTOHEADER%g
7116s%@MAKEINFO@%$MAKEINFO%g
7117s%@SET_MAKE@%$SET_MAKE%g
e43d48cc 7118s%@bfd_version@%$bfd_version%g
e43d48cc 7119s%@bfd_version_string@%$bfd_version_string%g
6be7c12c
AO
7120s%@AR@%$AR%g
7121s%@RANLIB@%$RANLIB%g
c5d1701e 7122s%@CC@%$CC%g
6be7c12c
AO
7123s%@LN_S@%$LN_S%g
7124s%@OBJEXT@%$OBJEXT%g
7125s%@EXEEXT@%$EXEEXT%g
7126s%@STRIP@%$STRIP%g
7127s%@LIBTOOL@%$LIBTOOL%g
7128s%@WARN_CFLAGS@%$WARN_CFLAGS%g
7129s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7130s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7131s%@MAINT@%$MAINT%g
a703a6ea
AM
7132s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
7133s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
7134s%@bfdlibdir@%$bfdlibdir%g
7135s%@bfdincludedir@%$bfdincludedir%g
6be7c12c
AO
7136s%@CPP@%$CPP%g
7137s%@ALLOCA@%$ALLOCA%g
7138s%@USE_NLS@%$USE_NLS%g
7139s%@MSGFMT@%$MSGFMT%g
7140s%@GMSGFMT@%$GMSGFMT%g
7141s%@XGETTEXT@%$XGETTEXT%g
7142s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7143s%@CATALOGS@%$CATALOGS%g
7144s%@CATOBJEXT@%$CATOBJEXT%g
7145s%@DATADIRNAME@%$DATADIRNAME%g
7146s%@GMOFILES@%$GMOFILES%g
7147s%@INSTOBJEXT@%$INSTOBJEXT%g
7148s%@INTLDEPS@%$INTLDEPS%g
7149s%@INTLLIBS@%$INTLLIBS%g
7150s%@INTLOBJS@%$INTLOBJS%g
7151s%@POFILES@%$POFILES%g
7152s%@POSUB@%$POSUB%g
7153s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7154s%@GT_NO@%$GT_NO%g
7155s%@GT_YES@%$GT_YES%g
7156s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7157s%@l@%$l%g
7158s%@HDEFINES@%$HDEFINES%g
7159s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
ec317fb1 7160s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g
6be7c12c
AO
7161s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
7162s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
7163s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
7164s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7165s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
7166s%@COREFILE@%$COREFILE%g
7167s%@COREFLAG@%$COREFLAG%g
7168s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
7169s%@WIN32LIBADD@%$WIN32LIBADD%g
7170s%@TDEFINES@%$TDEFINES%g
7171s%@wordsize@%$wordsize%g
2858ef35 7172s%@bfd_libs@%$bfd_libs%g
6be7c12c
AO
7173s%@all_backends@%$all_backends%g
7174s%@bfd_backends@%$bfd_backends%g
7175s%@bfd_machines@%$bfd_machines%g
69263e90 7176s%@bfd_default_target_size@%$bfd_default_target_size%g
6be7c12c 7177s%@tdefaults@%$tdefaults%g
b3baf5d0 7178
252b5132
RH
7179CEOF
7180EOF
7181
6be7c12c
AO
7182cat >> $CONFIG_STATUS <<\EOF
7183
7184# Split the substitutions into bite-sized pieces for seds with
7185# small command number limits, like on Digital OSF/1 and HP-UX.
dc810e39 7186ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6be7c12c
AO
7187ac_file=1 # Number of current file.
7188ac_beg=1 # First line for current file.
7189ac_end=$ac_max_sed_cmds # Line after last line for current file.
7190ac_more_lines=:
7191ac_sed_cmds=""
7192while $ac_more_lines; do
7193 if test $ac_beg -gt 1; then
7194 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7195 else
7196 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7197 fi
7198 if test ! -s conftest.s$ac_file; then
7199 ac_more_lines=false
7200 rm -f conftest.s$ac_file
7201 else
7202 if test -z "$ac_sed_cmds"; then
7203 ac_sed_cmds="sed -f conftest.s$ac_file"
252b5132 7204 else
6be7c12c 7205 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
252b5132 7206 fi
6be7c12c
AO
7207 ac_file=`expr $ac_file + 1`
7208 ac_beg=$ac_end
7209 ac_end=`expr $ac_end + $ac_max_sed_cmds`
252b5132 7210 fi
6be7c12c
AO
7211done
7212if test -z "$ac_sed_cmds"; then
7213 ac_sed_cmds=cat
7214fi
7215EOF
7216
7217cat >> $CONFIG_STATUS <<EOF
252b5132 7218
6a0735ef 7219CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
252b5132 7220EOF
6be7c12c
AO
7221cat >> $CONFIG_STATUS <<\EOF
7222for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
252b5132 7223 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6be7c12c
AO
7224 case "$ac_file" in
7225 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7226 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7227 *) ac_file_in="${ac_file}.in" ;;
252b5132
RH
7228 esac
7229
6be7c12c 7230 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
b3baf5d0 7231
6be7c12c
AO
7232 # Remove last slash and all that follows it. Not all systems have dirname.
7233 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7234 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7235 # The file is in a subdirectory.
7236 test ! -d "$ac_dir" && mkdir "$ac_dir"
7237 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
252b5132 7238 # A "../" for each directory in $ac_dir_suffix.
6be7c12c 7239 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
252b5132
RH
7240 else
7241 ac_dir_suffix= ac_dots=
7242 fi
7243
6be7c12c
AO
7244 case "$ac_given_srcdir" in
7245 .) srcdir=.
7246 if test -z "$ac_dots"; then top_srcdir=.
7247 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7248 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
252b5132 7249 *) # Relative path.
6be7c12c
AO
7250 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7251 top_srcdir="$ac_dots$ac_given_srcdir" ;;
252b5132
RH
7252 esac
7253
6be7c12c
AO
7254 case "$ac_given_INSTALL" in
7255 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7256 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
252b5132
RH
7257 esac
7258
6be7c12c
AO
7259 echo creating "$ac_file"
7260 rm -f "$ac_file"
7261 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7262 case "$ac_file" in
7263 *Makefile*) ac_comsub="1i\\
7264# $configure_input" ;;
7265 *) ac_comsub= ;;
7266 esac
252b5132 7267
6be7c12c
AO
7268 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7269 sed -e "$ac_comsub
7270s%@configure_input@%$configure_input%g
7271s%@srcdir@%$srcdir%g
7272s%@top_srcdir@%$top_srcdir%g
7273s%@INSTALL@%$INSTALL%g
7274" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7275fi; done
7276rm -f conftest.s*
252b5132
RH
7277
7278# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7279# NAME is the cpp macro being defined and VALUE is the value it is being given.
7280#
7281# ac_d sets the value in "#define NAME VALUE" lines.
6be7c12c
AO
7282ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7283ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7284ac_dC='\3'
7285ac_dD='%g'
7286# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7287ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7288ac_uB='\([ ]\)%\1#\2define\3'
252b5132 7289ac_uC=' '
6be7c12c
AO
7290ac_uD='\4%g'
7291# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7292ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7293ac_eB='$%\1#\2define\3'
7294ac_eC=' '
7295ac_eD='%g'
7296
7297if test "${CONFIG_HEADERS+set}" != set; then
7298EOF
7299cat >> $CONFIG_STATUS <<EOF
7300 CONFIG_HEADERS="config.h:config.in"
7301EOF
7302cat >> $CONFIG_STATUS <<\EOF
7303fi
7304for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
252b5132 7305 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6be7c12c
AO
7306 case "$ac_file" in
7307 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7308 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7309 *) ac_file_in="${ac_file}.in" ;;
252b5132
RH
7310 esac
7311
6be7c12c
AO
7312 echo creating $ac_file
7313
7314 rm -f conftest.frag conftest.in conftest.out
7315 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7316 cat $ac_file_inputs > conftest.in
7317
7318EOF
7319
7320# Transform confdefs.h into a sed script conftest.vals that substitutes
7321# the proper values into config.h.in to produce config.h. And first:
7322# Protect against being on the right side of a sed subst in config.status.
7323# Protect against being in an unquoted here document in config.status.
7324rm -f conftest.vals
7325cat > conftest.hdr <<\EOF
7326s/[\\&%]/\\&/g
7327s%[\\$`]%\\&%g
7328s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7329s%ac_d%ac_u%gp
7330s%ac_u%ac_e%gp
7331EOF
7332sed -n -f conftest.hdr confdefs.h > conftest.vals
7333rm -f conftest.hdr
252b5132
RH
7334
7335# This sed command replaces #undef with comments. This is necessary, for
7336# example, in the case of _POSIX_SOURCE, which is predefined and required
7337# on some systems where configure will not decide to define it.
6be7c12c
AO
7338cat >> conftest.vals <<\EOF
7339s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
252b5132
RH
7340EOF
7341
6be7c12c
AO
7342# Break up conftest.vals because some shells have a limit on
7343# the size of here documents, and old seds have small limits too.
252b5132
RH
7344
7345rm -f conftest.tail
6be7c12c 7346while :
252b5132 7347do
6be7c12c
AO
7348 ac_lines=`grep -c . conftest.vals`
7349 # grep -c gives empty output for an empty file on some AIX systems.
7350 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7351 # Write a limited-size here document to conftest.frag.
7352 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7353 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
252b5132 7354 echo 'CEOF
6be7c12c
AO
7355 sed -f conftest.frag conftest.in > conftest.out
7356 rm -f conftest.in
7357 mv conftest.out conftest.in
7358' >> $CONFIG_STATUS
7359 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7360 rm -f conftest.vals
7361 mv conftest.tail conftest.vals
252b5132 7362done
6be7c12c
AO
7363rm -f conftest.vals
7364
7365cat >> $CONFIG_STATUS <<\EOF
7366 rm -f conftest.frag conftest.h
7367 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7368 cat conftest.in >> conftest.h
7369 rm -f conftest.in
7370 if cmp -s $ac_file conftest.h 2>/dev/null; then
7371 echo "$ac_file is unchanged"
7372 rm -f conftest.h
252b5132 7373 else
6be7c12c
AO
7374 # Remove last slash and all that follows it. Not all systems have dirname.
7375 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
252b5132 7376 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6be7c12c
AO
7377 # The file is in a subdirectory.
7378 test ! -d "$ac_dir" && mkdir "$ac_dir"
252b5132 7379 fi
6be7c12c
AO
7380 rm -f $ac_file
7381 mv conftest.h $ac_file
252b5132 7382 fi
6be7c12c 7383fi; done
252b5132
RH
7384
7385EOF
6be7c12c 7386cat >> $CONFIG_STATUS <<EOF
b3baf5d0 7387
b3baf5d0 7388
6be7c12c
AO
7389EOF
7390cat >> $CONFIG_STATUS <<\EOF
7391test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
7392sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
7393exit 0
252b5132
RH
7394EOF
7395chmod +x $CONFIG_STATUS
6be7c12c
AO
7396rm -fr confdefs* $ac_clean_files
7397test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
252b5132 7398
55c80943 7399
This page took 0.82211 seconds and 4 git commands to generate.