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