bfd/
[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 1621darwin* | rhapsody*)
43850d5b 1622 # this will be overwritten by pass_all, but leave it in just in case
55c80943 1623 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
b3baf5d0
NC
1624 lt_cv_file_magic_cmd='/usr/bin/file -L'
1625 case "$host_os" in
1626 rhapsody* | darwin1.012)
1627 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1628 ;;
1629 *) # Darwin 1.3 on
1630 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1631 ;;
1632 esac
43850d5b 1633 lt_cv_deplibs_check_method=pass_all
55c80943
NC
1634 ;;
1635
43850d5b 1636freebsd* | kfreebsd*-gnu)
ac48eca1 1637 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
55c80943 1638 case $host_cpu in
ac48eca1 1639 i*86 )
90f2472a
AO
1640 # Not sure whether the presence of OpenBSD here was a mistake.
1641 # Let's accept both of them until this is cleared up.
55c80943
NC
1642 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1643 lt_cv_file_magic_cmd=/usr/bin/file
ac48eca1
AO
1644 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1645 ;;
1646 esac
1647 else
1648 lt_cv_deplibs_check_method=pass_all
1649 fi
1650 ;;
1651
1652gnu*)
1653 lt_cv_deplibs_check_method=pass_all
1654 ;;
1655
55c80943 1656hpux10.20*|hpux11*)
4867be41
DJ
1657 case $host_cpu in
1658 hppa*)
1659 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1660 lt_cv_file_magic_cmd=/usr/bin/file
1661 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1662 ;;
1663 ia64*)
1664 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1665 lt_cv_file_magic_cmd=/usr/bin/file
1666 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1667 ;;
1668 esac
ac48eca1
AO
1669 ;;
1670
1671irix5* | irix6*)
55c80943 1672 case $host_os in
ac48eca1
AO
1673 irix5*)
1674 # this will be overridden with pass_all, but let us keep it just in case
1675 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1676 ;;
1677 *)
55c80943 1678 case $LD in
ac48eca1
AO
1679 *-32|*"-32 ") libmagic=32-bit;;
1680 *-n32|*"-n32 ") libmagic=N32;;
1681 *-64|*"-64 ") libmagic=64-bit;;
1682 *) libmagic=never-match;;
1683 esac
1684 # this will be overridden with pass_all, but let us keep it just in case
55c80943
NC
1685 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1686 ;;
ac48eca1
AO
1687 esac
1688 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1689 lt_cv_deplibs_check_method=pass_all
1690 ;;
1691
1692# This must be Linux ELF.
90f2472a 1693linux-gnu*)
55c80943 1694 case $host_cpu in
c5d1701e 1695 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
ac48eca1
AO
1696 lt_cv_deplibs_check_method=pass_all ;;
1697 *)
1698 # glibc up to 2.1.1 does not perform some relocations on ARM
55c80943
NC
1699 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1700 esac
ac48eca1
AO
1701 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1702 ;;
1703
43850d5b 1704netbsd* | knetbsd*-gnu)
55c80943 1705 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
b3baf5d0 1706 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
ac48eca1 1707 else
b3baf5d0 1708 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
ac48eca1 1709 fi
55c80943
NC
1710 ;;
1711
1712newsos6)
1713 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1714 lt_cv_file_magic_cmd=/usr/bin/file
1715 lt_cv_file_magic_test_file=/usr/lib/libnls.so
ac48eca1
AO
1716 ;;
1717
1718osf3* | osf4* | osf5*)
1719 # this will be overridden with pass_all, but let us keep it just in case
1720 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1721 lt_cv_file_magic_test_file=/shlib/libc.so
1722 lt_cv_deplibs_check_method=pass_all
1723 ;;
1724
1725sco3.2v5*)
1726 lt_cv_deplibs_check_method=pass_all
1727 ;;
1728
1729solaris*)
1730 lt_cv_deplibs_check_method=pass_all
1731 lt_cv_file_magic_test_file=/lib/libc.so
1732 ;;
1733
6be7c12c
AO
1734sysv5uw[78]* | sysv4*uw2*)
1735 lt_cv_deplibs_check_method=pass_all
1736 ;;
1737
ac48eca1 1738sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
55c80943 1739 case $host_vendor in
ac48eca1
AO
1740 ncr)
1741 lt_cv_deplibs_check_method=pass_all
1742 ;;
1743 motorola)
55c80943
NC
1744 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]'
1745 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
ac48eca1
AO
1746 ;;
1747 esac
1748 ;;
1749esac
1750
1751fi
6be7c12c
AO
1752
1753echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
ac48eca1
AO
1754file_magic_cmd=$lt_cv_file_magic_cmd
1755deplibs_check_method=$lt_cv_deplibs_check_method
1756
6be7c12c 1757echo $ac_n "checking for object suffix""... $ac_c" 1>&6
43850d5b 1758echo "configure:1759: checking for object suffix" >&5
6be7c12c
AO
1759if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1760 echo $ac_n "(cached) $ac_c" 1>&6
1761else
1762 rm -f conftest*
1763echo 'int i = 1;' > conftest.$ac_ext
43850d5b 1764if { (eval echo configure:1765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
1765 for ac_file in conftest.*; do
1766 case $ac_file in
1767 *.c) ;;
1768 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1769 esac
1770 done
1771else
1772 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1773fi
1774rm -f conftest*
1775fi
ac48eca1 1776
6be7c12c
AO
1777echo "$ac_t""$ac_cv_objext" 1>&6
1778OBJEXT=$ac_cv_objext
1779ac_objext=$ac_cv_objext
1780
1781
1782
1783echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
43850d5b 1784echo "configure:1785: checking for executable suffix" >&5
6be7c12c
AO
1785if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1786 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 1787else
6be7c12c
AO
1788 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1789 ac_cv_exeext=.exe
1790else
1791 rm -f conftest*
1792 echo 'int main () { return 0; }' > conftest.$ac_ext
1793 ac_cv_exeext=
43850d5b 1794 if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6be7c12c
AO
1795 for file in conftest.*; do
1796 case $file in
7dfb3b6b 1797 *.c | *.o | *.obj) ;;
6be7c12c
AO
1798 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1799 esac
1800 done
1801 else
1802 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1803 fi
1804 rm -f conftest*
1805 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1806fi
1807fi
1808
1809EXEEXT=""
1810test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1811echo "$ac_t""${ac_cv_exeext}" 1>&6
1812ac_exeext=$EXEEXT
1813
1814# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1815
1816# Only perform the check for file, if the check method requires it
1817case $deplibs_check_method in
1818file_magic*)
1819 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1820 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
43850d5b 1821echo "configure:1822: checking for ${ac_tool_prefix}file" >&5
6be7c12c
AO
1822if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1823 echo $ac_n "(cached) $ac_c" 1>&6
1824else
1825 case $MAGIC_CMD in
1826 /*)
1827 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1828 ;;
1829 ?:/*)
1830 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1831 ;;
1832 *)
d64552c5 1833 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1835 ac_dummy="/usr/bin:$PATH"
1836 for ac_dir in $ac_dummy; do
1837 test -z "$ac_dir" && ac_dir=.
1838 if test -f $ac_dir/${ac_tool_prefix}file; then
d64552c5 1839 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ac48eca1 1840 if test -n "$file_magic_test_file"; then
55c80943 1841 case $deplibs_check_method in
ac48eca1
AO
1842 "file_magic "*)
1843 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1844 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1845 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1846 egrep "$file_magic_regex" > /dev/null; then
1847 :
1848 else
1849 cat <<EOF 1>&2
1850
1851*** Warning: the command libtool uses to detect shared libraries,
1852*** $file_magic_cmd, produces output that libtool cannot recognize.
1853*** The result is that libtool may fail to recognize shared libraries
1854*** as such. This will affect the creation of libtool libraries that
1855*** depend on shared libraries, but programs linked with such libtool
1856*** libraries will work regardless of this problem. Nevertheless, you
1857*** may want to report the problem to your system manager and/or to
1858*** bug-libtool@gnu.org
1859
1860EOF
1861 fi ;;
1862 esac
1863 fi
1864 break
1865 fi
1866 done
1867 IFS="$ac_save_ifs"
d64552c5 1868 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1869 ;;
1870esac
1871fi
1872
d64552c5
AO
1873MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1874if test -n "$MAGIC_CMD"; then
6be7c12c 1875 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1 1876else
6be7c12c 1877 echo "$ac_t""no" 1>&6
ac48eca1
AO
1878fi
1879
d64552c5 1880if test -z "$lt_cv_path_MAGIC_CMD"; then
ac48eca1 1881 if test -n "$ac_tool_prefix"; then
6be7c12c 1882 echo $ac_n "checking for file""... $ac_c" 1>&6
43850d5b 1883echo "configure:1884: checking for file" >&5
6be7c12c
AO
1884if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 1886else
55c80943 1887 case $MAGIC_CMD in
ac48eca1 1888 /*)
d64552c5 1889 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
1890 ;;
1891 ?:/*)
d64552c5 1892 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
1893 ;;
1894 *)
d64552c5 1895 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1897 ac_dummy="/usr/bin:$PATH"
1898 for ac_dir in $ac_dummy; do
1899 test -z "$ac_dir" && ac_dir=.
1900 if test -f $ac_dir/file; then
d64552c5 1901 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ac48eca1 1902 if test -n "$file_magic_test_file"; then
55c80943 1903 case $deplibs_check_method in
ac48eca1
AO
1904 "file_magic "*)
1905 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1906 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1907 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1908 egrep "$file_magic_regex" > /dev/null; then
1909 :
1910 else
1911 cat <<EOF 1>&2
1912
1913*** Warning: the command libtool uses to detect shared libraries,
1914*** $file_magic_cmd, produces output that libtool cannot recognize.
1915*** The result is that libtool may fail to recognize shared libraries
1916*** as such. This will affect the creation of libtool libraries that
1917*** depend on shared libraries, but programs linked with such libtool
1918*** libraries will work regardless of this problem. Nevertheless, you
1919*** may want to report the problem to your system manager and/or to
1920*** bug-libtool@gnu.org
1921
1922EOF
1923 fi ;;
1924 esac
1925 fi
1926 break
1927 fi
1928 done
1929 IFS="$ac_save_ifs"
d64552c5 1930 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1931 ;;
1932esac
1933fi
1934
d64552c5
AO
1935MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1936if test -n "$MAGIC_CMD"; then
6be7c12c 1937 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1 1938else
6be7c12c 1939 echo "$ac_t""no" 1>&6
ac48eca1
AO
1940fi
1941
1942 else
d64552c5 1943 MAGIC_CMD=:
ac48eca1
AO
1944 fi
1945fi
1946
1947 fi
1948 ;;
1949esac
1950
6be7c12c 1951# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
ac48eca1 1952set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6be7c12c 1953echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 1954echo "configure:1955: checking for $ac_word" >&5
6be7c12c
AO
1955if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1956 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1
AO
1957else
1958 if test -n "$RANLIB"; then
1959 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1960else
6be7c12c
AO
1961 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1962 ac_dummy="$PATH"
1963 for ac_dir in $ac_dummy; do
1964 test -z "$ac_dir" && ac_dir=.
1965 if test -f $ac_dir/$ac_word; then
1966 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1967 break
1968 fi
1969 done
1970 IFS="$ac_save_ifs"
ac48eca1
AO
1971fi
1972fi
6be7c12c 1973RANLIB="$ac_cv_prog_RANLIB"
ac48eca1 1974if test -n "$RANLIB"; then
6be7c12c 1975 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 1976else
6be7c12c 1977 echo "$ac_t""no" 1>&6
ac48eca1
AO
1978fi
1979
6be7c12c 1980
ac48eca1 1981if test -z "$ac_cv_prog_RANLIB"; then
6be7c12c 1982if test -n "$ac_tool_prefix"; then
ac48eca1
AO
1983 # Extract the first word of "ranlib", so it can be a program name with args.
1984set dummy ranlib; ac_word=$2
6be7c12c 1985echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 1986echo "configure:1987: checking for $ac_word" >&5
6be7c12c
AO
1987if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1988 echo $ac_n "(cached) $ac_c" 1>&6
1989else
1990 if test -n "$RANLIB"; then
1991 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1992else
1993 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1994 ac_dummy="$PATH"
1995 for ac_dir in $ac_dummy; do
1996 test -z "$ac_dir" && ac_dir=.
1997 if test -f $ac_dir/$ac_word; then
1998 ac_cv_prog_RANLIB="ranlib"
1999 break
2000 fi
2001 done
2002 IFS="$ac_save_ifs"
2003 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
ac48eca1
AO
2004fi
2005fi
6be7c12c
AO
2006RANLIB="$ac_cv_prog_RANLIB"
2007if test -n "$RANLIB"; then
2008 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 2009else
6be7c12c 2010 echo "$ac_t""no" 1>&6
ac48eca1
AO
2011fi
2012
2013else
6be7c12c
AO
2014 RANLIB=":"
2015fi
ac48eca1
AO
2016fi
2017
6be7c12c 2018# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
ac48eca1 2019set dummy ${ac_tool_prefix}strip; ac_word=$2
6be7c12c 2020echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2021echo "configure:2022: checking for $ac_word" >&5
6be7c12c
AO
2022if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2023 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1
AO
2024else
2025 if test -n "$STRIP"; then
2026 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2027else
6be7c12c
AO
2028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2029 ac_dummy="$PATH"
2030 for ac_dir in $ac_dummy; do
2031 test -z "$ac_dir" && ac_dir=.
2032 if test -f $ac_dir/$ac_word; then
2033 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2034 break
2035 fi
2036 done
2037 IFS="$ac_save_ifs"
ac48eca1
AO
2038fi
2039fi
6be7c12c 2040STRIP="$ac_cv_prog_STRIP"
ac48eca1 2041if test -n "$STRIP"; then
6be7c12c 2042 echo "$ac_t""$STRIP" 1>&6
ac48eca1 2043else
6be7c12c 2044 echo "$ac_t""no" 1>&6
ac48eca1
AO
2045fi
2046
6be7c12c 2047
ac48eca1 2048if test -z "$ac_cv_prog_STRIP"; then
6be7c12c 2049if test -n "$ac_tool_prefix"; then
ac48eca1
AO
2050 # Extract the first word of "strip", so it can be a program name with args.
2051set dummy strip; ac_word=$2
6be7c12c 2052echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2053echo "configure:2054: checking for $ac_word" >&5
6be7c12c
AO
2054if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2055 echo $ac_n "(cached) $ac_c" 1>&6
2056else
2057 if test -n "$STRIP"; then
2058 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2059else
2060 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2061 ac_dummy="$PATH"
2062 for ac_dir in $ac_dummy; do
2063 test -z "$ac_dir" && ac_dir=.
2064 if test -f $ac_dir/$ac_word; then
2065 ac_cv_prog_STRIP="strip"
2066 break
2067 fi
2068 done
2069 IFS="$ac_save_ifs"
2070 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
ac48eca1
AO
2071fi
2072fi
6be7c12c
AO
2073STRIP="$ac_cv_prog_STRIP"
2074if test -n "$STRIP"; then
2075 echo "$ac_t""$STRIP" 1>&6
ac48eca1 2076else
6be7c12c 2077 echo "$ac_t""no" 1>&6
ac48eca1
AO
2078fi
2079
2080else
6be7c12c
AO
2081 STRIP=":"
2082fi
ac48eca1 2083fi
252b5132 2084
6be7c12c 2085
252b5132 2086# Check for any special flags to pass to ltconfig.
b2ef150d 2087libtool_flags="--cache-file=$cache_file"
252b5132
RH
2088test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2089test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
b2ef150d 2090test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
55c80943
NC
2091test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2092test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
252b5132 2093
6be7c12c 2094
a74801ba
ILT
2095# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2096if test "${enable_libtool_lock+set}" = set; then
2097 enableval="$enable_libtool_lock"
6be7c12c
AO
2098 :
2099fi
a74801ba
ILT
2100
2101test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2102test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2103
ac48eca1
AO
2104# Check whether --with-pic or --without-pic was given.
2105if test "${with_pic+set}" = set; then
2106 withval="$with_pic"
2107 pic_mode="$withval"
2108else
2109 pic_mode=default
6be7c12c
AO
2110fi
2111
ac48eca1
AO
2112test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2113test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2114
252b5132
RH
2115# Some flags need to be propagated to the compiler or linker for good
2116# libtool support.
55c80943 2117case $host in
252b5132
RH
2118*-*-irix6*)
2119 # Find out which ABI we are using.
43850d5b
AO
2120 echo '#line 2121 "configure"' > conftest.$ac_ext
2121 if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6a457e5c
NC
2122 if test "$lt_cv_prog_gnu_ld" = yes; then
2123 case `/usr/bin/file conftest.$ac_objext` in
2124 *32-bit*)
2125 LD="${LD-ld} -melf32bsmip"
2126 ;;
2127 *N32*)
2128 LD="${LD-ld} -melf32bmipn32"
2129 ;;
2130 *64-bit*)
2131 LD="${LD-ld} -melf64bmip"
2132 ;;
2133 esac
2134 else
55c80943 2135 case `/usr/bin/file conftest.$ac_objext` in
252b5132
RH
2136 *32-bit*)
2137 LD="${LD-ld} -32"
2138 ;;
2139 *N32*)
2140 LD="${LD-ld} -n32"
2141 ;;
2142 *64-bit*)
2143 LD="${LD-ld} -64"
2144 ;;
2145 esac
6a457e5c 2146 fi
252b5132
RH
2147 fi
2148 rm -rf conftest*
2149 ;;
2150
4867be41
DJ
2151ia64-*-hpux*)
2152 # Find out which ABI we are using.
2153 echo 'int i;' > conftest.$ac_ext
43850d5b 2154 if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4867be41
DJ
2155 case "`/usr/bin/file conftest.o`" in
2156 *ELF-32*)
2157 HPUX_IA64_MODE="32"
2158 ;;
2159 *ELF-64*)
2160 HPUX_IA64_MODE="64"
2161 ;;
2162 esac
2163 fi
2164 rm -rf conftest*
2165 ;;
2166
43850d5b
AO
2167x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2168 # Find out which ABI we are using.
2169 echo 'int i;' > conftest.$ac_ext
2170 if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2171 case "`/usr/bin/file conftest.o`" in
2172 *32-bit*)
2173 case $host in
2174 x86_64-*linux*)
2175 LD="${LD-ld} -m elf_i386"
2176 ;;
2177 ppc64-*linux*|powerpc64-*linux*)
2178 LD="${LD-ld} -m elf32ppclinux"
2179 ;;
2180 s390x-*linux*)
2181 LD="${LD-ld} -m elf_s390"
2182 ;;
2183 sparc64-*linux*)
2184 LD="${LD-ld} -m elf32_sparc"
2185 ;;
2186 esac
2187 ;;
2188 *64-bit*)
2189 case $host in
2190 x86_64-*linux*)
2191 LD="${LD-ld} -m elf_x86_64"
2192 ;;
2193 ppc*-*linux*|powerpc*-*linux*)
2194 LD="${LD-ld} -m elf64ppc"
2195 ;;
2196 s390*-*linux*)
2197 LD="${LD-ld} -m elf64_s390"
2198 ;;
2199 sparc*-*linux*)
2200 LD="${LD-ld} -m elf64_sparc"
2201 ;;
2202 esac
2203 ;;
2204 esac
2205 fi
2206 rm -rf conftest*
2207 ;;
2208
252b5132
RH
2209*-*-sco3.2v5*)
2210 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
b2ef150d 2211 SAVE_CFLAGS="$CFLAGS"
252b5132 2212 CFLAGS="$CFLAGS -belf"
6be7c12c 2213 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
43850d5b 2214echo "configure:2215: checking whether the C compiler needs -belf" >&5
6be7c12c
AO
2215if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2216 echo $ac_n "(cached) $ac_c" 1>&6
b2ef150d 2217else
6be7c12c 2218
ac48eca1 2219 ac_ext=c
6be7c12c 2220# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac48eca1 2221ac_cpp='$CPP $CPPFLAGS'
6be7c12c
AO
2222ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2223ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2224cross_compiling=$ac_cv_prog_cc_cross
ac48eca1 2225
6be7c12c 2226 cat > conftest.$ac_ext <<EOF
43850d5b 2227#line 2228 "configure"
b2ef150d
ILT
2228#include "confdefs.h"
2229
6be7c12c 2230int main() {
b2ef150d 2231
6be7c12c
AO
2232; return 0; }
2233EOF
43850d5b 2234if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 2235 rm -rf conftest*
b2ef150d
ILT
2236 lt_cv_cc_needs_belf=yes
2237else
6be7c12c
AO
2238 echo "configure: failed program was:" >&5
2239 cat conftest.$ac_ext >&5
2240 rm -rf conftest*
2241 lt_cv_cc_needs_belf=no
b2ef150d 2242fi
6be7c12c 2243rm -f conftest*
ac48eca1 2244 ac_ext=c
6be7c12c 2245# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac48eca1 2246ac_cpp='$CPP $CPPFLAGS'
6be7c12c
AO
2247ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2248ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2249cross_compiling=$ac_cv_prog_cc_cross
ac48eca1 2250
b2ef150d 2251fi
6be7c12c
AO
2252
2253echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
b2ef150d
ILT
2254 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2255 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2256 CFLAGS="$SAVE_CFLAGS"
2257 fi
252b5132
RH
2258 ;;
2259
6be7c12c 2260
252b5132
RH
2261esac
2262
6be7c12c 2263
b2ef150d 2264# Save cache, so that ltconfig can load it
6be7c12c 2265cat > confcache <<\EOF
b2ef150d
ILT
2266# This file is a shell script that caches the results of configure
2267# tests run on this system so they can be shared between configure
6be7c12c
AO
2268# scripts and configure runs. It is not useful on other systems.
2269# If it contains results you don't want to keep, you may remove or edit it.
b2ef150d 2270#
6be7c12c
AO
2271# By default, configure uses ./config.cache as the cache file,
2272# creating it if it does not exist already. You can give configure
2273# the --cache-file=FILE option to use a different cache file; that is
2274# what configure does when it calls configure scripts in
2275# subdirectories, so they share the cache.
2276# Giving --cache-file=/dev/null disables caching, for debugging configure.
2277# config.status only pays attention to the cache file if you give it the
2278# --recheck option to rerun configure.
b2ef150d 2279#
6be7c12c 2280EOF
b2ef150d
ILT
2281# The following way of writing the cache mishandles newlines in values,
2282# but we know of no workaround that is simple, portable, and efficient.
2283# So, don't put newlines in cache variables' values.
2284# Ultrix sh set writes to stderr and can't be redirected directly,
2285# and sets the high bit in the cache file unless we assign to the vars.
6be7c12c
AO
2286(set) 2>&1 |
2287 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2288 *ac_space=\ *)
2289 # `set' does not quote correctly, so add quotes (double-quote substitution
2290 # turns \\\\ into \\, and sed turns \\ into \).
2291 sed -n \
2292 -e "s/'/'\\\\''/g" \
2293 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2294 ;;
2295 *)
2296 # `set' quotes correctly as required by POSIX, so do not add quotes.
2297 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2298 ;;
2299 esac >> confcache
2300if cmp -s $cache_file confcache; then
2301 :
2302else
b2ef150d 2303 if test -w $cache_file; then
6be7c12c
AO
2304 echo "updating cache $cache_file"
2305 cat confcache > $cache_file
b2ef150d
ILT
2306 else
2307 echo "not updating unwritable cache $cache_file"
2308 fi
2309fi
2310rm -f confcache
2311
6be7c12c 2312
252b5132 2313# Actually configure libtool. ac_aux_dir is where install-sh is found.
ac48eca1 2314AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
d64552c5 2315MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
ac48eca1
AO
2316LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2317AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2318objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2319deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
252b5132 2320${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
ac48eca1 2321$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
6be7c12c 2322|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
252b5132 2323
b2ef150d
ILT
2324# Reload cache, that may have been modified by ltconfig
2325if test -r "$cache_file"; then
6be7c12c
AO
2326 echo "loading cache $cache_file"
2327 . $cache_file
b2ef150d 2328else
6be7c12c
AO
2329 echo "creating cache $cache_file"
2330 > $cache_file
b2ef150d
ILT
2331fi
2332
6be7c12c 2333
b2ef150d 2334# This can be used to rebuild libtool when needed
ac48eca1 2335LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
b2ef150d
ILT
2336
2337# Always use our own libtool.
2338LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2339
252b5132
RH
2340# Redirect the config.log output again, so that the ltconfig log is not
2341# clobbered by the next message.
2342exec 5>>./config.log
2343
6be7c12c
AO
2344
2345
2346
2347
2348
2349
252b5132
RH
2350# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2351if test "${enable_64_bit_bfd+set}" = set; then
2352 enableval="$enable_64_bit_bfd"
2353 case "${enableval}" in
2354 yes) want64=true ;;
2355 no) want64=false ;;
6be7c12c 2356 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
252b5132
RH
2357esac
2358else
2359 want64=false
6be7c12c
AO
2360fi
2361# Check whether --enable-targets or --disable-targets was given.
252b5132
RH
2362if test "${enable_targets+set}" = set; then
2363 enableval="$enable_targets"
2364 case "${enableval}" in
6be7c12c 2365 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
252b5132
RH
2366 ;;
2367 no) enable_targets= ;;
2368 *) enable_targets=$enableval ;;
2369esac
6be7c12c
AO
2370fi
2371# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
252b5132
RH
2372if test "${enable_commonbfdlib+set}" = set; then
2373 enableval="$enable_commonbfdlib"
2374 case "${enableval}" in
2375 yes) commonbfdlib=true ;;
2376 no) commonbfdlib=false ;;
6be7c12c 2377 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
252b5132 2378esac
6be7c12c 2379fi
252b5132
RH
2380# Check whether --with-mmap or --without-mmap was given.
2381if test "${with_mmap+set}" = set; then
2382 withval="$with_mmap"
2383 case "${withval}" in
2384 yes) want_mmap=true ;;
2385 no) want_mmap=false ;;
6be7c12c 2386 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
252b5132
RH
2387esac
2388else
2389 want_mmap=false
6be7c12c
AO
2390fi
2391
0218d1e4 2392build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
a2d91340
AC
2393# Check whether --enable-build-warnings or --disable-build-warnings was given.
2394if test "${enable_build_warnings+set}" = set; then
2395 enableval="$enable_build_warnings"
2396 case "${enableval}" in
2397 yes) ;;
2398 no) build_warnings="-w";;
2399 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2400 build_warnings="${build_warnings} ${t}";;
2401 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2402 build_warnings="${t} ${build_warnings}";;
2403 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2404esac
2405if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2406 echo "Setting warning flags = $build_warnings" 6>&1
2407fi
6be7c12c
AO
2408fi
2409WARN_CFLAGS=""
66e25bab 2410if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
a2d91340
AC
2411 WARN_CFLAGS="${build_warnings}"
2412fi
2413
2414
6be7c12c
AO
2415
2416
2417
252b5132
RH
2418
2419if test -z "$target" ; then
6be7c12c 2420 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
252b5132 2421fi
252b5132 2422
6be7c12c 2423echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
43850d5b 2424echo "configure:2425: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
2425 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2426if test "${enable_maintainer_mode+set}" = set; then
2427 enableval="$enable_maintainer_mode"
2428 USE_MAINTAINER_MODE=$enableval
2429else
2430 USE_MAINTAINER_MODE=no
6be7c12c
AO
2431fi
2432
2433 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2434
252b5132
RH
2435
2436if test $USE_MAINTAINER_MODE = yes; then
2437 MAINTAINER_MODE_TRUE=
2438 MAINTAINER_MODE_FALSE='#'
2439else
2440 MAINTAINER_MODE_TRUE='#'
2441 MAINTAINER_MODE_FALSE=
2442fi
2443 MAINT=$MAINTAINER_MODE_TRUE
6be7c12c 2444
252b5132 2445
a703a6ea 2446echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
43850d5b 2447echo "configure:2448: checking whether to install libbfd" >&5
a703a6ea
AM
2448 # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
2449if test "${enable_install_libbfd+set}" = set; then
2450 enableval="$enable_install_libbfd"
2451 install_libbfd_p=$enableval
2452else
66e25bab 2453 if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
a703a6ea
AM
2454 install_libbfd_p=yes
2455 else
2456 install_libbfd_p=no
2457 fi
2458fi
2459
2460 echo "$ac_t""$install_libbfd_p" 1>&6
2461
2462
2463if test $install_libbfd_p = yes; then
2464 INSTALL_LIBBFD_TRUE=
2465 INSTALL_LIBBFD_FALSE='#'
2466else
2467 INSTALL_LIBBFD_TRUE='#'
2468 INSTALL_LIBBFD_FALSE=
2469fi
2470 # libbfd.a is a host library containing target dependent code
2471 bfdlibdir='$(libdir)'
2472 bfdincludedir='$(includedir)'
2473 if test "${host}" != "${target}"; then
2474 bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
2475 bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
2476 fi
2477
2478
2479
2480
252b5132
RH
2481
2482
6be7c12c 2483echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
43850d5b 2484echo "configure:2485: checking for executable suffix" >&5
6be7c12c
AO
2485if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2486 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2487else
6be7c12c
AO
2488 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2489 ac_cv_exeext=.exe
252b5132 2490else
6be7c12c
AO
2491 rm -f conftest*
2492 echo 'int main () { return 0; }' > conftest.$ac_ext
2493 ac_cv_exeext=
43850d5b 2494 if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6be7c12c
AO
2495 for file in conftest.*; do
2496 case $file in
7dfb3b6b 2497 *.c | *.o | *.obj) ;;
6be7c12c
AO
2498 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2499 esac
2500 done
2501 else
2502 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2503 fi
2504 rm -f conftest*
2505 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
252b5132 2506fi
b3baf5d0 2507fi
252b5132 2508
6be7c12c
AO
2509EXEEXT=""
2510test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2511echo "$ac_t""${ac_cv_exeext}" 1>&6
2512ac_exeext=$EXEEXT
252b5132 2513
252b5132 2514
6be7c12c
AO
2515host64=false
2516target64=false
69263e90 2517bfd_default_target_size=32
252b5132 2518
6be7c12c
AO
2519# host stuff:
2520
2521# Extract the first word of "gcc", so it can be a program name with args.
2522set dummy gcc; ac_word=$2
2523echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2524echo "configure:2525: checking for $ac_word" >&5
6be7c12c
AO
2525if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2526 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2527else
2528 if test -n "$CC"; then
2529 ac_cv_prog_CC="$CC" # Let the user override the test.
2530else
6be7c12c
AO
2531 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2532 ac_dummy="$PATH"
2533 for ac_dir in $ac_dummy; do
2534 test -z "$ac_dir" && ac_dir=.
2535 if test -f $ac_dir/$ac_word; then
2536 ac_cv_prog_CC="gcc"
2537 break
2538 fi
2539 done
2540 IFS="$ac_save_ifs"
252b5132
RH
2541fi
2542fi
6be7c12c 2543CC="$ac_cv_prog_CC"
252b5132 2544if test -n "$CC"; then
6be7c12c 2545 echo "$ac_t""$CC" 1>&6
b3baf5d0 2546else
6be7c12c 2547 echo "$ac_t""no" 1>&6
b3baf5d0
NC
2548fi
2549
252b5132
RH
2550if test -z "$CC"; then
2551 # Extract the first word of "cc", so it can be a program name with args.
2552set dummy cc; ac_word=$2
6be7c12c 2553echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2554echo "configure:2555: checking for $ac_word" >&5
6be7c12c
AO
2555if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2557else
2558 if test -n "$CC"; then
2559 ac_cv_prog_CC="$CC" # Let the user override the test.
2560else
6be7c12c 2561 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
252b5132 2562 ac_prog_rejected=no
6be7c12c
AO
2563 ac_dummy="$PATH"
2564 for ac_dir in $ac_dummy; do
2565 test -z "$ac_dir" && ac_dir=.
2566 if test -f $ac_dir/$ac_word; then
2567 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2568 ac_prog_rejected=yes
2569 continue
2570 fi
2571 ac_cv_prog_CC="cc"
2572 break
2573 fi
2574 done
2575 IFS="$ac_save_ifs"
252b5132
RH
2576if test $ac_prog_rejected = yes; then
2577 # We found a bogon in the path, so make sure we never use it.
2578 set dummy $ac_cv_prog_CC
2579 shift
6be7c12c 2580 if test $# -gt 0; then
252b5132
RH
2581 # We chose a different compiler from the bogus one.
2582 # However, it has the same basename, so the bogon will be chosen
2583 # first if we set CC to just the basename; use the full file name.
2584 shift
6be7c12c 2585 set dummy "$ac_dir/$ac_word" "$@"
252b5132
RH
2586 shift
2587 ac_cv_prog_CC="$@"
2588 fi
2589fi
2590fi
2591fi
6be7c12c 2592CC="$ac_cv_prog_CC"
252b5132 2593if test -n "$CC"; then
6be7c12c 2594 echo "$ac_t""$CC" 1>&6
252b5132 2595else
6be7c12c 2596 echo "$ac_t""no" 1>&6
252b5132
RH
2597fi
2598
6be7c12c
AO
2599 if test -z "$CC"; then
2600 case "`uname -s`" in
2601 *win32* | *WIN32*)
2602 # Extract the first word of "cl", so it can be a program name with args.
2603set dummy cl; ac_word=$2
2604echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2605echo "configure:2606: checking for $ac_word" >&5
6be7c12c
AO
2606if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2607 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
2608else
2609 if test -n "$CC"; then
2610 ac_cv_prog_CC="$CC" # Let the user override the test.
2611else
6be7c12c
AO
2612 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2613 ac_dummy="$PATH"
2614 for ac_dir in $ac_dummy; do
2615 test -z "$ac_dir" && ac_dir=.
2616 if test -f $ac_dir/$ac_word; then
2617 ac_cv_prog_CC="cl"
2618 break
2619 fi
2620 done
2621 IFS="$ac_save_ifs"
252b5132
RH
2622fi
2623fi
6be7c12c 2624CC="$ac_cv_prog_CC"
252b5132 2625if test -n "$CC"; then
6be7c12c 2626 echo "$ac_t""$CC" 1>&6
252b5132 2627else
6be7c12c 2628 echo "$ac_t""no" 1>&6
252b5132 2629fi
6be7c12c
AO
2630 ;;
2631 esac
2632 fi
2633 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
b3baf5d0 2634fi
252b5132 2635
6be7c12c 2636echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
43850d5b 2637echo "configure:2638: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132 2638
6be7c12c
AO
2639ac_ext=c
2640# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2641ac_cpp='$CPP $CPPFLAGS'
2642ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2643ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2644cross_compiling=$ac_cv_prog_cc_cross
252b5132 2645
6be7c12c 2646cat > conftest.$ac_ext << EOF
252b5132 2647
43850d5b 2648#line 2649 "configure"
6be7c12c
AO
2649#include "confdefs.h"
2650
2651main(){return(0);}
2652EOF
43850d5b 2653if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
2654 ac_cv_prog_cc_works=yes
2655 # If we can't run a trivial program, we are probably using a cross compiler.
2656 if (./conftest; exit) 2>/dev/null; then
2657 ac_cv_prog_cc_cross=no
2658 else
2659 ac_cv_prog_cc_cross=yes
2660 fi
2661else
2662 echo "configure: failed program was:" >&5
2663 cat conftest.$ac_ext >&5
2664 ac_cv_prog_cc_works=no
252b5132 2665fi
6be7c12c
AO
2666rm -fr conftest*
2667ac_ext=c
2668# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2669ac_cpp='$CPP $CPPFLAGS'
2670ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2671ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2672cross_compiling=$ac_cv_prog_cc_cross
252b5132 2673
6be7c12c
AO
2674echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2675if test $ac_cv_prog_cc_works = no; then
2676 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2677fi
2678echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
43850d5b 2679echo "configure:2680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
6be7c12c
AO
2680echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2681cross_compiling=$ac_cv_prog_cc_cross
b3baf5d0 2682
6be7c12c 2683echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
43850d5b 2684echo "configure:2685: checking whether we are using GNU C" >&5
6be7c12c
AO
2685if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2686 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2687else
6be7c12c
AO
2688 cat > conftest.c <<EOF
2689#ifdef __GNUC__
2690 yes;
252b5132 2691#endif
6be7c12c 2692EOF
43850d5b 2693if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
6be7c12c
AO
2694 ac_cv_prog_gcc=yes
2695else
2696 ac_cv_prog_gcc=no
2697fi
2698fi
252b5132 2699
6be7c12c 2700echo "$ac_t""$ac_cv_prog_gcc" 1>&6
252b5132 2701
6be7c12c
AO
2702if test $ac_cv_prog_gcc = yes; then
2703 GCC=yes
2704else
2705 GCC=
2706fi
252b5132 2707
6be7c12c
AO
2708ac_test_CFLAGS="${CFLAGS+set}"
2709ac_save_CFLAGS="$CFLAGS"
2710CFLAGS=
2711echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
43850d5b 2712echo "configure:2713: checking whether ${CC-cc} accepts -g" >&5
6be7c12c
AO
2713if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
2715else
2716 echo 'void f(){}' > conftest.c
2717if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
252b5132
RH
2718 ac_cv_prog_cc_g=yes
2719else
6be7c12c 2720 ac_cv_prog_cc_g=no
252b5132 2721fi
6be7c12c
AO
2722rm -f conftest*
2723
252b5132 2724fi
6be7c12c
AO
2725
2726echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
252b5132 2727if test "$ac_test_CFLAGS" = set; then
6be7c12c 2728 CFLAGS="$ac_save_CFLAGS"
252b5132
RH
2729elif test $ac_cv_prog_cc_g = yes; then
2730 if test "$GCC" = yes; then
2731 CFLAGS="-g -O2"
2732 else
2733 CFLAGS="-g"
2734 fi
2735else
2736 if test "$GCC" = yes; then
2737 CFLAGS="-O2"
2738 else
2739 CFLAGS=
2740 fi
2741fi
2742
2743
f9d1e83f 2744ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
6be7c12c 2745echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
43850d5b 2746echo "configure:2747: checking how to run the C preprocessor" >&5
252b5132
RH
2747# On Suns, sometimes $CPP names a directory.
2748if test -n "$CPP" && test -d "$CPP"; then
2749 CPP=
2750fi
2751if test -z "$CPP"; then
6be7c12c
AO
2752if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2753 echo $ac_n "(cached) $ac_c" 1>&6
2754else
2755 # This must be in double quotes, not single quotes, because CPP may get
2756 # substituted into the Makefile and "${CC-cc}" will confuse make.
2757 CPP="${CC-cc} -E"
2758 # On the NeXT, cc -E runs the code through the compiler's parser,
2759 # not just through cpp.
2760 cat > conftest.$ac_ext <<EOF
43850d5b 2761#line 2762 "configure"
252b5132
RH
2762#include "confdefs.h"
2763#include <assert.h>
6be7c12c
AO
2764Syntax Error
2765EOF
2766ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 2767{ (eval echo configure:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2768ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2769if test -z "$ac_err"; then
2770 :
252b5132 2771else
6be7c12c
AO
2772 echo "$ac_err" >&5
2773 echo "configure: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 rm -rf conftest*
2776 CPP="${CC-cc} -E -traditional-cpp"
2777 cat > conftest.$ac_ext <<EOF
43850d5b 2778#line 2779 "configure"
252b5132 2779#include "confdefs.h"
6be7c12c
AO
2780#include <assert.h>
2781Syntax Error
2782EOF
2783ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 2784{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2785ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2786if test -z "$ac_err"; then
2787 :
252b5132 2788else
6be7c12c
AO
2789 echo "$ac_err" >&5
2790 echo "configure: failed program was:" >&5
252b5132 2791 cat conftest.$ac_ext >&5
6be7c12c
AO
2792 rm -rf conftest*
2793 CPP="${CC-cc} -nologo -E"
2794 cat > conftest.$ac_ext <<EOF
43850d5b 2795#line 2796 "configure"
6be7c12c
AO
2796#include "confdefs.h"
2797#include <assert.h>
2798Syntax Error
2799EOF
2800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 2801{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2802ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2803if test -z "$ac_err"; then
2804 :
b3baf5d0 2805else
6be7c12c
AO
2806 echo "$ac_err" >&5
2807 echo "configure: failed program was:" >&5
b3baf5d0 2808 cat conftest.$ac_ext >&5
6be7c12c
AO
2809 rm -rf conftest*
2810 CPP=/lib/cpp
252b5132 2811fi
6be7c12c 2812rm -f conftest*
252b5132 2813fi
6be7c12c 2814rm -f conftest*
252b5132 2815fi
6be7c12c
AO
2816rm -f conftest*
2817 ac_cv_prog_CPP="$CPP"
2818fi
2819 CPP="$ac_cv_prog_CPP"
ac48eca1 2820else
6be7c12c 2821 ac_cv_prog_CPP="$CPP"
b3baf5d0 2822fi
6be7c12c
AO
2823echo "$ac_t""$CPP" 1>&6
2824
2825# Extract the first word of "ranlib", so it can be a program name with args.
2826set dummy ranlib; ac_word=$2
2827echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 2828echo "configure:2829: checking for $ac_word" >&5
6be7c12c
AO
2829if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
ac48eca1 2831else
6be7c12c
AO
2832 if test -n "$RANLIB"; then
2833 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2834else
2835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2836 ac_dummy="$PATH"
2837 for ac_dir in $ac_dummy; do
2838 test -z "$ac_dir" && ac_dir=.
2839 if test -f $ac_dir/$ac_word; then
2840 ac_cv_prog_RANLIB="ranlib"
2841 break
ac48eca1 2842 fi
6be7c12c
AO
2843 done
2844 IFS="$ac_save_ifs"
2845 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
ac48eca1
AO
2846fi
2847fi
6be7c12c
AO
2848RANLIB="$ac_cv_prog_RANLIB"
2849if test -n "$RANLIB"; then
2850 echo "$ac_t""$RANLIB" 1>&6
ac48eca1 2851else
6be7c12c 2852 echo "$ac_t""no" 1>&6
b3baf5d0 2853fi
ac48eca1 2854
6be7c12c 2855echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
43850d5b 2856echo "configure:2857: checking for ANSI C header files" >&5
6be7c12c
AO
2857if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2858 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2859else
6be7c12c 2860 cat > conftest.$ac_ext <<EOF
43850d5b 2861#line 2862 "configure"
252b5132
RH
2862#include "confdefs.h"
2863#include <stdlib.h>
2864#include <stdarg.h>
2865#include <string.h>
2866#include <float.h>
6be7c12c
AO
2867EOF
2868ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 2869{ (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
2870ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2871if test -z "$ac_err"; then
2872 rm -rf conftest*
252b5132
RH
2873 ac_cv_header_stdc=yes
2874else
6be7c12c
AO
2875 echo "$ac_err" >&5
2876 echo "configure: failed program was:" >&5
252b5132 2877 cat conftest.$ac_ext >&5
6be7c12c 2878 rm -rf conftest*
252b5132
RH
2879 ac_cv_header_stdc=no
2880fi
6be7c12c 2881rm -f conftest*
252b5132
RH
2882
2883if test $ac_cv_header_stdc = yes; then
2884 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6be7c12c 2885cat > conftest.$ac_ext <<EOF
43850d5b 2886#line 2887 "configure"
252b5132
RH
2887#include "confdefs.h"
2888#include <string.h>
6be7c12c 2889EOF
252b5132
RH
2890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2891 egrep "memchr" >/dev/null 2>&1; then
2892 :
2893else
6be7c12c 2894 rm -rf conftest*
252b5132
RH
2895 ac_cv_header_stdc=no
2896fi
2897rm -f conftest*
2898
2899fi
2900
2901if test $ac_cv_header_stdc = yes; then
2902 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6be7c12c 2903cat > conftest.$ac_ext <<EOF
43850d5b 2904#line 2905 "configure"
252b5132
RH
2905#include "confdefs.h"
2906#include <stdlib.h>
6be7c12c 2907EOF
252b5132
RH
2908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2909 egrep "free" >/dev/null 2>&1; then
2910 :
2911else
6be7c12c 2912 rm -rf conftest*
252b5132
RH
2913 ac_cv_header_stdc=no
2914fi
2915rm -f conftest*
2916
2917fi
2918
2919if test $ac_cv_header_stdc = yes; then
2920 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6be7c12c 2921if test "$cross_compiling" = yes; then
252b5132
RH
2922 :
2923else
6be7c12c 2924 cat > conftest.$ac_ext <<EOF
43850d5b 2925#line 2926 "configure"
252b5132
RH
2926#include "confdefs.h"
2927#include <ctype.h>
6be7c12c
AO
2928#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2929#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
b3baf5d0 2930#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6be7c12c
AO
2931int main () { int i; for (i = 0; i < 256; i++)
2932if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2933exit (0); }
2934
2935EOF
43850d5b 2936if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 2937then
252b5132
RH
2938 :
2939else
6be7c12c
AO
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 rm -fr conftest*
2943 ac_cv_header_stdc=no
252b5132 2944fi
6be7c12c 2945rm -fr conftest*
252b5132 2946fi
6be7c12c 2947
252b5132
RH
2948fi
2949fi
b3baf5d0 2950
6be7c12c
AO
2951echo "$ac_t""$ac_cv_header_stdc" 1>&6
2952if test $ac_cv_header_stdc = yes; then
2953 cat >> confdefs.h <<\EOF
252b5132
RH
2954#define STDC_HEADERS 1
2955EOF
2956
2957fi
2958
6be7c12c 2959echo $ac_n "checking for working const""... $ac_c" 1>&6
43850d5b 2960echo "configure:2961: checking for working const" >&5
6be7c12c
AO
2961if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2962 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 2963else
6be7c12c 2964 cat > conftest.$ac_ext <<EOF
43850d5b 2965#line 2966 "configure"
252b5132 2966#include "confdefs.h"
6be7c12c
AO
2967
2968int main() {
2969
2970/* Ultrix mips cc rejects this. */
2971typedef int charset[2]; const charset x;
2972/* SunOS 4.1.1 cc rejects this. */
2973char const *const *ccp;
2974char **p;
2975/* NEC SVR4.0.2 mips cc rejects this. */
2976struct point {int x, y;};
2977static struct point const zero = {0,0};
2978/* AIX XL C 1.02.0.0 rejects this.
2979 It does not let you subtract one const X* pointer from another in an arm
2980 of an if-expression whose if-part is not a constant expression */
2981const char *g = "string";
2982ccp = &g + (g ? g-g : 0);
2983/* HPUX 7.0 cc rejects these. */
2984++ccp;
2985p = (char**) ccp;
2986ccp = (char const *const *) p;
2987{ /* SCO 3.2v4 cc rejects this. */
2988 char *t;
2989 char const *s = 0 ? (char *) 0 : (char const *) 0;
2990
2991 *t++ = 0;
252b5132 2992}
6be7c12c
AO
2993{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2994 int x[] = {25, 17};
2995 const int *foo = &x[0];
2996 ++foo;
252b5132 2997}
6be7c12c
AO
2998{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2999 typedef const int *iptr;
3000 iptr p = 0;
3001 ++p;
252b5132 3002}
6be7c12c
AO
3003{ /* AIX XL C 1.02.0.0 rejects this saying
3004 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3005 struct s { int j; const int *ap[3]; };
3006 struct s *b; b->j = 5;
b3baf5d0 3007}
6be7c12c
AO
3008{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3009 const int foo = 10;
3010}
3011
3012; return 0; }
3013EOF
43850d5b 3014if { (eval echo configure:3015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 3015 rm -rf conftest*
252b5132
RH
3016 ac_cv_c_const=yes
3017else
6be7c12c
AO
3018 echo "configure: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3020 rm -rf conftest*
3021 ac_cv_c_const=no
252b5132 3022fi
6be7c12c 3023rm -f conftest*
252b5132 3024fi
b3baf5d0 3025
6be7c12c
AO
3026echo "$ac_t""$ac_cv_c_const" 1>&6
3027if test $ac_cv_c_const = no; then
3028 cat >> confdefs.h <<\EOF
3029#define const
252b5132
RH
3030EOF
3031
3032fi
3033
6be7c12c 3034echo $ac_n "checking for inline""... $ac_c" 1>&6
43850d5b 3035echo "configure:3036: checking for inline" >&5
6be7c12c
AO
3036if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3038else
3039 ac_cv_c_inline=no
3040for ac_kw in inline __inline__ __inline; do
6be7c12c 3041 cat > conftest.$ac_ext <<EOF
43850d5b 3042#line 3043 "configure"
252b5132
RH
3043#include "confdefs.h"
3044
6be7c12c
AO
3045int main() {
3046} $ac_kw foo() {
3047; return 0; }
3048EOF
43850d5b 3049if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 3050 rm -rf conftest*
252b5132
RH
3051 ac_cv_c_inline=$ac_kw; break
3052else
6be7c12c
AO
3053 echo "configure: failed program was:" >&5
3054 cat conftest.$ac_ext >&5
252b5132 3055fi
6be7c12c 3056rm -f conftest*
252b5132
RH
3057done
3058
3059fi
6be7c12c
AO
3060
3061echo "$ac_t""$ac_cv_c_inline" 1>&6
3062case "$ac_cv_c_inline" in
252b5132 3063 inline | yes) ;;
6be7c12c
AO
3064 no) cat >> confdefs.h <<\EOF
3065#define inline
252b5132
RH
3066EOF
3067 ;;
6be7c12c 3068 *) cat >> confdefs.h <<EOF
252b5132
RH
3069#define inline $ac_cv_c_inline
3070EOF
3071 ;;
3072esac
3073
6be7c12c 3074echo $ac_n "checking for off_t""... $ac_c" 1>&6
43850d5b 3075echo "configure:3076: checking for off_t" >&5
6be7c12c
AO
3076if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
b3baf5d0 3078else
6be7c12c 3079 cat > conftest.$ac_ext <<EOF
43850d5b 3080#line 3081 "configure"
b3baf5d0 3081#include "confdefs.h"
6be7c12c
AO
3082#include <sys/types.h>
3083#if STDC_HEADERS
3084#include <stdlib.h>
3085#include <stddef.h>
3086#endif
3087EOF
3088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3089 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3090 rm -rf conftest*
653f71ca 3091 ac_cv_type_off_t=yes
252b5132 3092else
6be7c12c
AO
3093 rm -rf conftest*
3094 ac_cv_type_off_t=no
252b5132 3095fi
6be7c12c 3096rm -f conftest*
b3baf5d0 3097
6be7c12c
AO
3098fi
3099echo "$ac_t""$ac_cv_type_off_t" 1>&6
3100if test $ac_cv_type_off_t = no; then
3101 cat >> confdefs.h <<\EOF
252b5132
RH
3102#define off_t long
3103EOF
3104
3105fi
3106
6be7c12c 3107echo $ac_n "checking for size_t""... $ac_c" 1>&6
43850d5b 3108echo "configure:3109: checking for size_t" >&5
6be7c12c
AO
3109if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3110 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3111else
6be7c12c 3112 cat > conftest.$ac_ext <<EOF
43850d5b 3113#line 3114 "configure"
252b5132 3114#include "confdefs.h"
6be7c12c
AO
3115#include <sys/types.h>
3116#if STDC_HEADERS
3117#include <stdlib.h>
3118#include <stddef.h>
3119#endif
3120EOF
3121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3122 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3123 rm -rf conftest*
653f71ca 3124 ac_cv_type_size_t=yes
252b5132 3125else
6be7c12c
AO
3126 rm -rf conftest*
3127 ac_cv_type_size_t=no
252b5132 3128fi
6be7c12c 3129rm -f conftest*
b3baf5d0 3130
6be7c12c
AO
3131fi
3132echo "$ac_t""$ac_cv_type_size_t" 1>&6
3133if test $ac_cv_type_size_t = no; then
3134 cat >> confdefs.h <<\EOF
252b5132
RH
3135#define size_t unsigned
3136EOF
3137
3138fi
3139
3140# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3141# for constant arguments. Useless!
6be7c12c 3142echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
43850d5b 3143echo "configure:3144: checking for working alloca.h" >&5
6be7c12c
AO
3144if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3145 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3146else
6be7c12c 3147 cat > conftest.$ac_ext <<EOF
43850d5b 3148#line 3149 "configure"
252b5132
RH
3149#include "confdefs.h"
3150#include <alloca.h>
6be7c12c
AO
3151int main() {
3152char *p = alloca(2 * sizeof(int));
3153; return 0; }
3154EOF
43850d5b 3155if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3156 rm -rf conftest*
3157 ac_cv_header_alloca_h=yes
3158else
3159 echo "configure: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 rm -rf conftest*
3162 ac_cv_header_alloca_h=no
3163fi
3164rm -f conftest*
3165fi
3166
3167echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3168if test $ac_cv_header_alloca_h = yes; then
3169 cat >> confdefs.h <<\EOF
252b5132
RH
3170#define HAVE_ALLOCA_H 1
3171EOF
3172
3173fi
3174
6be7c12c 3175echo $ac_n "checking for alloca""... $ac_c" 1>&6
43850d5b 3176echo "configure:3177: checking for alloca" >&5
6be7c12c
AO
3177if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3178 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3179else
6be7c12c 3180 cat > conftest.$ac_ext <<EOF
43850d5b 3181#line 3182 "configure"
252b5132 3182#include "confdefs.h"
6be7c12c 3183
252b5132
RH
3184#ifdef __GNUC__
3185# define alloca __builtin_alloca
3186#else
3187# ifdef _MSC_VER
3188# include <malloc.h>
3189# define alloca _alloca
3190# else
3191# if HAVE_ALLOCA_H
3192# include <alloca.h>
3193# else
3194# ifdef _AIX
3195 #pragma alloca
3196# else
3197# ifndef alloca /* predefined by HP cc +Olibcalls */
3198char *alloca ();
3199# endif
3200# endif
3201# endif
3202# endif
3203#endif
3204
6be7c12c
AO
3205int main() {
3206char *p = (char *) alloca(1);
3207; return 0; }
3208EOF
43850d5b 3209if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3210 rm -rf conftest*
252b5132
RH
3211 ac_cv_func_alloca_works=yes
3212else
6be7c12c
AO
3213 echo "configure: failed program was:" >&5
3214 cat conftest.$ac_ext >&5
3215 rm -rf conftest*
3216 ac_cv_func_alloca_works=no
252b5132 3217fi
6be7c12c 3218rm -f conftest*
252b5132
RH
3219fi
3220
6be7c12c 3221echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
252b5132 3222if test $ac_cv_func_alloca_works = yes; then
6be7c12c 3223 cat >> confdefs.h <<\EOF
252b5132
RH
3224#define HAVE_ALLOCA 1
3225EOF
3226
6be7c12c 3227fi
b3baf5d0 3228
6be7c12c
AO
3229if test $ac_cv_func_alloca_works = no; then
3230 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3231 # that cause trouble. Some versions do not even contain alloca or
3232 # contain a buggy version. If you still want to use their alloca,
3233 # use ar to extract alloca.o from them instead of compiling alloca.c.
3234 ALLOCA=alloca.${ac_objext}
3235 cat >> confdefs.h <<\EOF
252b5132
RH
3236#define C_ALLOCA 1
3237EOF
3238
6be7c12c
AO
3239
3240echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
43850d5b 3241echo "configure:3242: checking whether alloca needs Cray hooks" >&5
6be7c12c
AO
3242if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3244else
6be7c12c 3245 cat > conftest.$ac_ext <<EOF
43850d5b 3246#line 3247 "configure"
252b5132
RH
3247#include "confdefs.h"
3248#if defined(CRAY) && ! defined(CRAY2)
3249webecray
3250#else
3251wenotbecray
3252#endif
3253
6be7c12c 3254EOF
252b5132
RH
3255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3256 egrep "webecray" >/dev/null 2>&1; then
6be7c12c 3257 rm -rf conftest*
252b5132
RH
3258 ac_cv_os_cray=yes
3259else
6be7c12c 3260 rm -rf conftest*
252b5132
RH
3261 ac_cv_os_cray=no
3262fi
3263rm -f conftest*
3264
3265fi
6be7c12c
AO
3266
3267echo "$ac_t""$ac_cv_os_cray" 1>&6
252b5132 3268if test $ac_cv_os_cray = yes; then
6be7c12c
AO
3269for ac_func in _getb67 GETB67 getb67; do
3270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 3271echo "configure:3272: checking for $ac_func" >&5
6be7c12c
AO
3272if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3273 echo $ac_n "(cached) $ac_c" 1>&6
3274else
3275 cat > conftest.$ac_ext <<EOF
43850d5b 3276#line 3277 "configure"
252b5132
RH
3277#include "confdefs.h"
3278/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3279 which can conflict with char $ac_func(); below. */
252b5132
RH
3280#include <assert.h>
3281/* Override any gcc2 internal prototype to avoid an error. */
3282/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3283 builtin and then its argument prototype would still apply. */
3284char $ac_func();
3285
3286int main() {
252b5132
RH
3287
3288/* The GNU C library defines this for functions which it implements
3289 to always fail with ENOSYS. Some functions are actually named
3290 something starting with __ and the normal name is an alias. */
3291#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3292choke me
3293#else
6be7c12c 3294$ac_func();
252b5132
RH
3295#endif
3296
6be7c12c
AO
3297; return 0; }
3298EOF
43850d5b 3299if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3300 rm -rf conftest*
3301 eval "ac_cv_func_$ac_func=yes"
3302else
3303 echo "configure: failed program was:" >&5
3304 cat conftest.$ac_ext >&5
3305 rm -rf conftest*
3306 eval "ac_cv_func_$ac_func=no"
3307fi
3308rm -f conftest*
3309fi
3310
3311if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3312 echo "$ac_t""yes" 1>&6
3313 cat >> confdefs.h <<EOF
252b5132
RH
3314#define CRAY_STACKSEG_END $ac_func
3315EOF
3316
6be7c12c
AO
3317 break
3318else
3319 echo "$ac_t""no" 1>&6
252b5132
RH
3320fi
3321
6be7c12c 3322done
252b5132
RH
3323fi
3324
6be7c12c 3325echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
43850d5b 3326echo "configure:3327: checking stack direction for C alloca" >&5
6be7c12c
AO
3327if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3328 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3329else
3330 if test "$cross_compiling" = yes; then
3331 ac_cv_c_stack_direction=0
3332else
6be7c12c 3333 cat > conftest.$ac_ext <<EOF
43850d5b 3334#line 3335 "configure"
252b5132
RH
3335#include "confdefs.h"
3336find_stack_direction ()
3337{
3338 static char *addr = 0;
3339 auto char dummy;
3340 if (addr == 0)
3341 {
3342 addr = &dummy;
3343 return find_stack_direction ();
3344 }
3345 else
3346 return (&dummy > addr) ? 1 : -1;
3347}
3348main ()
3349{
6be7c12c 3350 exit (find_stack_direction() < 0);
252b5132 3351}
6be7c12c 3352EOF
43850d5b 3353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 3354then
252b5132
RH
3355 ac_cv_c_stack_direction=1
3356else
6be7c12c
AO
3357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 rm -fr conftest*
3360 ac_cv_c_stack_direction=-1
252b5132 3361fi
6be7c12c 3362rm -fr conftest*
252b5132 3363fi
6be7c12c 3364
252b5132
RH
3365fi
3366
6be7c12c
AO
3367echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3368cat >> confdefs.h <<EOF
252b5132
RH
3369#define STACK_DIRECTION $ac_cv_c_stack_direction
3370EOF
3371
3372fi
3373
43850d5b 3374for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
252b5132 3375do
6be7c12c
AO
3376ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3377echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 3378echo "configure:3379: checking for $ac_hdr" >&5
6be7c12c
AO
3379if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3380 echo $ac_n "(cached) $ac_c" 1>&6
3381else
3382 cat > conftest.$ac_ext <<EOF
43850d5b 3383#line 3384 "configure"
252b5132 3384#include "confdefs.h"
6be7c12c
AO
3385#include <$ac_hdr>
3386EOF
3387ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 3388{ (eval echo configure:3389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3389ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3390if test -z "$ac_err"; then
3391 rm -rf conftest*
3392 eval "ac_cv_header_$ac_safe=yes"
252b5132 3393else
6be7c12c
AO
3394 echo "$ac_err" >&5
3395 echo "configure: failed program was:" >&5
252b5132 3396 cat conftest.$ac_ext >&5
6be7c12c
AO
3397 rm -rf conftest*
3398 eval "ac_cv_header_$ac_safe=no"
252b5132 3399fi
6be7c12c 3400rm -f conftest*
252b5132 3401fi
6be7c12c
AO
3402if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3403 echo "$ac_t""yes" 1>&6
3404 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3405 cat >> confdefs.h <<EOF
3406#define $ac_tr_hdr 1
252b5132 3407EOF
6be7c12c
AO
3408
3409else
3410 echo "$ac_t""no" 1>&6
252b5132
RH
3411fi
3412done
3413
3414for ac_func in getpagesize
3415do
6be7c12c 3416echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 3417echo "configure:3418: checking for $ac_func" >&5
6be7c12c
AO
3418if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3419 echo $ac_n "(cached) $ac_c" 1>&6
3420else
3421 cat > conftest.$ac_ext <<EOF
43850d5b 3422#line 3423 "configure"
252b5132
RH
3423#include "confdefs.h"
3424/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3425 which can conflict with char $ac_func(); below. */
252b5132
RH
3426#include <assert.h>
3427/* Override any gcc2 internal prototype to avoid an error. */
3428/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3429 builtin and then its argument prototype would still apply. */
3430char $ac_func();
3431
3432int main() {
252b5132
RH
3433
3434/* The GNU C library defines this for functions which it implements
3435 to always fail with ENOSYS. Some functions are actually named
3436 something starting with __ and the normal name is an alias. */
3437#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3438choke me
3439#else
6be7c12c 3440$ac_func();
252b5132
RH
3441#endif
3442
6be7c12c 3443; return 0; }
252b5132 3444EOF
43850d5b 3445if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3446 rm -rf conftest*
3447 eval "ac_cv_func_$ac_func=yes"
3448else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -rf conftest*
3452 eval "ac_cv_func_$ac_func=no"
3453fi
3454rm -f conftest*
3455fi
252b5132 3456
6be7c12c
AO
3457if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3458 echo "$ac_t""yes" 1>&6
3459 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3460 cat >> confdefs.h <<EOF
3461#define $ac_tr_func 1
3462EOF
3463
3464else
3465 echo "$ac_t""no" 1>&6
252b5132
RH
3466fi
3467done
3468
6be7c12c 3469echo $ac_n "checking for working mmap""... $ac_c" 1>&6
43850d5b 3470echo "configure:3471: checking for working mmap" >&5
6be7c12c
AO
3471if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
3473else
3474 if test "$cross_compiling" = yes; then
3475 ac_cv_func_mmap_fixed_mapped=no
3476else
6be7c12c 3477 cat > conftest.$ac_ext <<EOF
43850d5b 3478#line 3479 "configure"
252b5132 3479#include "confdefs.h"
6be7c12c 3480
252b5132
RH
3481/* Thanks to Mike Haertel and Jim Avera for this test.
3482 Here is a matrix of mmap possibilities:
3483 mmap private not fixed
3484 mmap private fixed at somewhere currently unmapped
3485 mmap private fixed at somewhere already mapped
3486 mmap shared not fixed
3487 mmap shared fixed at somewhere currently unmapped
3488 mmap shared fixed at somewhere already mapped
3489 For private mappings, we should verify that changes cannot be read()
3490 back from the file, nor mmap's back from the file at a different
3491 address. (There have been systems where private was not correctly
3492 implemented like the infamous i386 svr4.0, and systems where the
6be7c12c 3493 VM page cache was not coherent with the filesystem buffer cache
252b5132
RH
3494 like early versions of FreeBSD and possibly contemporary NetBSD.)
3495 For shared mappings, we should conversely verify that changes get
3496 propogated back to all the places they're supposed to be.
3497
3498 Grep wants private fixed already mapped.
3499 The main things grep needs to know about mmap are:
3500 * does it exist and is it safe to write into the mmap'd area
3501 * how to use it (BSD variants) */
3502#include <sys/types.h>
3503#include <fcntl.h>
3504#include <sys/mman.h>
3505
43850d5b
AO
3506#if HAVE_SYS_TYPES_H
3507# include <sys/types.h>
3508#endif
3509
3510#if HAVE_STDLIB_H
3511# include <stdlib.h>
3512#endif
3513
3514#if HAVE_SYS_STAT_H
3515# include <sys/stat.h>
3516#endif
3517
3518#if HAVE_UNISTD_H
3519# include <unistd.h>
3520#endif
3521
b3baf5d0 3522/* This mess was copied from the GNU getpagesize.h. */
6be7c12c 3523#ifndef HAVE_GETPAGESIZE
6be7c12c 3524
252b5132 3525/* Assume that all systems that can run configure have sys/param.h. */
6be7c12c 3526# ifndef HAVE_SYS_PARAM_H
252b5132
RH
3527# define HAVE_SYS_PARAM_H 1
3528# endif
3529
3530# ifdef _SC_PAGESIZE
3531# define getpagesize() sysconf(_SC_PAGESIZE)
3532# else /* no _SC_PAGESIZE */
6be7c12c 3533# ifdef HAVE_SYS_PARAM_H
252b5132
RH
3534# include <sys/param.h>
3535# ifdef EXEC_PAGESIZE
3536# define getpagesize() EXEC_PAGESIZE
3537# else /* no EXEC_PAGESIZE */
3538# ifdef NBPG
3539# define getpagesize() NBPG * CLSIZE
3540# ifndef CLSIZE
3541# define CLSIZE 1
3542# endif /* no CLSIZE */
3543# else /* no NBPG */
3544# ifdef NBPC
3545# define getpagesize() NBPC
3546# else /* no NBPC */
3547# ifdef PAGESIZE
3548# define getpagesize() PAGESIZE
3549# endif /* PAGESIZE */
3550# endif /* no NBPC */
3551# endif /* no NBPG */
3552# endif /* no EXEC_PAGESIZE */
3553# else /* no HAVE_SYS_PARAM_H */
3554# define getpagesize() 8192 /* punt totally */
3555# endif /* no HAVE_SYS_PARAM_H */
3556# endif /* no _SC_PAGESIZE */
3557
3558#endif /* no HAVE_GETPAGESIZE */
3559
6be7c12c
AO
3560#ifdef __cplusplus
3561extern "C" { void *malloc(unsigned); }
3562#else
3563char *malloc();
3564#endif
3565
252b5132 3566int
6be7c12c 3567main()
252b5132 3568{
6be7c12c
AO
3569 char *data, *data2, *data3;
3570 int i, pagesize;
3571 int fd;
3572
3573 pagesize = getpagesize();
3574
3575 /*
3576 * First, make a file with some known garbage in it.
3577 */
3578 data = malloc(pagesize);
3579 if (!data)
3580 exit(1);
3581 for (i = 0; i < pagesize; ++i)
3582 *(data + i) = rand();
3583 umask(0);
3584 fd = creat("conftestmmap", 0600);
3585 if (fd < 0)
3586 exit(1);
3587 if (write(fd, data, pagesize) != pagesize)
3588 exit(1);
3589 close(fd);
3590
3591 /*
3592 * Next, try to mmap the file at a fixed address which
3593 * already has something else allocated at it. If we can,
3594 * also make sure that we see the same garbage.
3595 */
3596 fd = open("conftestmmap", O_RDWR);
3597 if (fd < 0)
3598 exit(1);
3599 data2 = malloc(2 * pagesize);
3600 if (!data2)
3601 exit(1);
3602 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3603 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3604 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3605 exit(1);
3606 for (i = 0; i < pagesize; ++i)
3607 if (*(data + i) != *(data2 + i))
3608 exit(1);
3609
3610 /*
3611 * Finally, make sure that changes to the mapped area
3612 * do not percolate back to the file as seen by read().
3613 * (This is a bug on some variants of i386 svr4.0.)
3614 */
3615 for (i = 0; i < pagesize; ++i)
3616 *(data2 + i) = *(data2 + i) + 1;
3617 data3 = malloc(pagesize);
3618 if (!data3)
3619 exit(1);
3620 if (read(fd, data3, pagesize) != pagesize)
3621 exit(1);
3622 for (i = 0; i < pagesize; ++i)
3623 if (*(data + i) != *(data3 + i))
3624 exit(1);
3625 close(fd);
3626 unlink("conftestmmap");
3627 exit(0);
252b5132 3628}
6be7c12c
AO
3629
3630EOF
43850d5b 3631if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 3632then
252b5132
RH
3633 ac_cv_func_mmap_fixed_mapped=yes
3634else
6be7c12c
AO
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 rm -fr conftest*
3638 ac_cv_func_mmap_fixed_mapped=no
252b5132 3639fi
6be7c12c 3640rm -fr conftest*
252b5132 3641fi
6be7c12c 3642
252b5132 3643fi
b3baf5d0 3644
6be7c12c
AO
3645echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3646if test $ac_cv_func_mmap_fixed_mapped = yes; then
3647 cat >> confdefs.h <<\EOF
252b5132
RH
3648#define HAVE_MMAP 1
3649EOF
3650
3651fi
3652
6be7c12c
AO
3653
3654 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
252b5132
RH
3655unistd.h values.h sys/param.h
3656do
6be7c12c
AO
3657ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3658echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 3659echo "configure:3660: checking for $ac_hdr" >&5
6be7c12c
AO
3660if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3661 echo $ac_n "(cached) $ac_c" 1>&6
3662else
3663 cat > conftest.$ac_ext <<EOF
43850d5b 3664#line 3665 "configure"
252b5132 3665#include "confdefs.h"
6be7c12c
AO
3666#include <$ac_hdr>
3667EOF
3668ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 3669{ (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3670ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3671if test -z "$ac_err"; then
3672 rm -rf conftest*
3673 eval "ac_cv_header_$ac_safe=yes"
252b5132 3674else
6be7c12c
AO
3675 echo "$ac_err" >&5
3676 echo "configure: failed program was:" >&5
252b5132 3677 cat conftest.$ac_ext >&5
6be7c12c
AO
3678 rm -rf conftest*
3679 eval "ac_cv_header_$ac_safe=no"
252b5132 3680fi
6be7c12c 3681rm -f conftest*
252b5132 3682fi
6be7c12c
AO
3683if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3684 echo "$ac_t""yes" 1>&6
3685 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3686 cat >> confdefs.h <<EOF
3687#define $ac_tr_hdr 1
252b5132 3688EOF
6be7c12c
AO
3689
3690else
3691 echo "$ac_t""no" 1>&6
252b5132
RH
3692fi
3693done
3694
6be7c12c 3695 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
252b5132
RH
3696__argz_count __argz_stringify __argz_next
3697do
6be7c12c 3698echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 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
43850d5b 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
43850d5b 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
b3baf5d0 3751
6be7c12c
AO
3752 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3753 for ac_func in stpcpy
252b5132 3754do
6be7c12c 3755echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 3756echo "configure:3757: checking for $ac_func" >&5
6be7c12c
AO
3757if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3758 echo $ac_n "(cached) $ac_c" 1>&6
3759else
3760 cat > conftest.$ac_ext <<EOF
43850d5b 3761#line 3762 "configure"
252b5132
RH
3762#include "confdefs.h"
3763/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 3764 which can conflict with char $ac_func(); below. */
252b5132
RH
3765#include <assert.h>
3766/* Override any gcc2 internal prototype to avoid an error. */
3767/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3768 builtin and then its argument prototype would still apply. */
3769char $ac_func();
3770
3771int main() {
252b5132
RH
3772
3773/* The GNU C library defines this for functions which it implements
3774 to always fail with ENOSYS. Some functions are actually named
3775 something starting with __ and the normal name is an alias. */
3776#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3777choke me
3778#else
6be7c12c 3779$ac_func();
252b5132
RH
3780#endif
3781
6be7c12c 3782; return 0; }
252b5132 3783EOF
43850d5b 3784if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3785 rm -rf conftest*
3786 eval "ac_cv_func_$ac_func=yes"
3787else
3788 echo "configure: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790 rm -rf conftest*
3791 eval "ac_cv_func_$ac_func=no"
3792fi
3793rm -f conftest*
3794fi
252b5132 3795
6be7c12c
AO
3796if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3797 echo "$ac_t""yes" 1>&6
3798 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3799 cat >> confdefs.h <<EOF
3800#define $ac_tr_func 1
3801EOF
3802
3803else
3804 echo "$ac_t""no" 1>&6
252b5132
RH
3805fi
3806done
3807
3808 fi
3809 if test "${ac_cv_func_stpcpy}" = "yes"; then
6be7c12c 3810 cat >> confdefs.h <<\EOF
252b5132
RH
3811#define HAVE_STPCPY 1
3812EOF
3813
3814 fi
3815
3816 if test $ac_cv_header_locale_h = yes; then
6be7c12c 3817 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
43850d5b 3818echo "configure:3819: checking for LC_MESSAGES" >&5
6be7c12c
AO
3819if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3820 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3821else
6be7c12c 3822 cat > conftest.$ac_ext <<EOF
43850d5b 3823#line 3824 "configure"
252b5132
RH
3824#include "confdefs.h"
3825#include <locale.h>
6be7c12c 3826int main() {
252b5132 3827return LC_MESSAGES
6be7c12c
AO
3828; return 0; }
3829EOF
43850d5b 3830if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3831 rm -rf conftest*
252b5132
RH
3832 am_cv_val_LC_MESSAGES=yes
3833else
6be7c12c
AO
3834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
3836 rm -rf conftest*
3837 am_cv_val_LC_MESSAGES=no
252b5132 3838fi
6be7c12c 3839rm -f conftest*
252b5132 3840fi
b3baf5d0 3841
6be7c12c
AO
3842echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3843 if test $am_cv_val_LC_MESSAGES = yes; then
3844 cat >> confdefs.h <<\EOF
252b5132
RH
3845#define HAVE_LC_MESSAGES 1
3846EOF
3847
3848 fi
3849 fi
6be7c12c 3850 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
43850d5b 3851echo "configure:3852: checking whether NLS is requested" >&5
252b5132
RH
3852 # Check whether --enable-nls or --disable-nls was given.
3853if test "${enable_nls+set}" = set; then
3854 enableval="$enable_nls"
3855 USE_NLS=$enableval
3856else
3857 USE_NLS=yes
6be7c12c
AO
3858fi
3859
3860 echo "$ac_t""$USE_NLS" 1>&6
3861
252b5132
RH
3862
3863 USE_INCLUDED_LIBINTL=no
3864
3865 if test "$USE_NLS" = "yes"; then
6be7c12c 3866 cat >> confdefs.h <<\EOF
252b5132
RH
3867#define ENABLE_NLS 1
3868EOF
3869
6be7c12c 3870 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
43850d5b 3871echo "configure:3872: checking whether included gettext is requested" >&5
6be7c12c 3872 # Check whether --with-included-gettext or --without-included-gettext was given.
252b5132
RH
3873if test "${with_included_gettext+set}" = set; then
3874 withval="$with_included_gettext"
3875 nls_cv_force_use_gnu_gettext=$withval
3876else
3877 nls_cv_force_use_gnu_gettext=no
6be7c12c
AO
3878fi
3879
3880 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
252b5132
RH
3881
3882 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3883 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3884 nls_cv_header_intl=
3885 nls_cv_header_libgt=
3886 CATOBJEXT=NONE
3887
6be7c12c
AO
3888 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3889echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
43850d5b 3890echo "configure:3891: checking for libintl.h" >&5
6be7c12c
AO
3891if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3892 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3893else
6be7c12c 3894 cat > conftest.$ac_ext <<EOF
43850d5b 3895#line 3896 "configure"
252b5132
RH
3896#include "confdefs.h"
3897#include <libintl.h>
6be7c12c
AO
3898EOF
3899ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 3900{ (eval echo configure:3901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
3901ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3902if test -z "$ac_err"; then
3903 rm -rf conftest*
3904 eval "ac_cv_header_$ac_safe=yes"
252b5132 3905else
6be7c12c
AO
3906 echo "$ac_err" >&5
3907 echo "configure: failed program was:" >&5
252b5132 3908 cat conftest.$ac_ext >&5
6be7c12c
AO
3909 rm -rf conftest*
3910 eval "ac_cv_header_$ac_safe=no"
252b5132 3911fi
6be7c12c 3912rm -f conftest*
252b5132 3913fi
6be7c12c
AO
3914if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3915 echo "$ac_t""yes" 1>&6
3916 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
43850d5b 3917echo "configure:3918: checking for gettext in libc" >&5
6be7c12c
AO
3918if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3919 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3920else
6be7c12c 3921 cat > conftest.$ac_ext <<EOF
43850d5b 3922#line 3923 "configure"
252b5132
RH
3923#include "confdefs.h"
3924#include <libintl.h>
6be7c12c 3925int main() {
252b5132 3926return (int) gettext ("")
6be7c12c
AO
3927; return 0; }
3928EOF
43850d5b 3929if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3930 rm -rf conftest*
252b5132
RH
3931 gt_cv_func_gettext_libc=yes
3932else
6be7c12c
AO
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 gt_cv_func_gettext_libc=no
252b5132 3937fi
6be7c12c 3938rm -f conftest*
252b5132 3939fi
6be7c12c
AO
3940
3941echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
252b5132
RH
3942
3943 if test "$gt_cv_func_gettext_libc" != "yes"; then
6be7c12c 3944 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
43850d5b 3945echo "configure:3946: checking for bindtextdomain in -lintl" >&5
6be7c12c
AO
3946ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3947if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 3949else
6be7c12c 3950 ac_save_LIBS="$LIBS"
252b5132 3951LIBS="-lintl $LIBS"
6be7c12c 3952cat > conftest.$ac_ext <<EOF
43850d5b 3953#line 3954 "configure"
252b5132
RH
3954#include "confdefs.h"
3955/* Override any gcc2 internal prototype to avoid an error. */
3956/* We use char because int might match the return type of a gcc2
6be7c12c
AO
3957 builtin and then its argument prototype would still apply. */
3958char bindtextdomain();
3959
3960int main() {
3961bindtextdomain()
3962; return 0; }
3963EOF
43850d5b 3964if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
3965 rm -rf conftest*
3966 eval "ac_cv_lib_$ac_lib_var=yes"
3967else
3968 echo "configure: failed program was:" >&5
3969 cat conftest.$ac_ext >&5
3970 rm -rf conftest*
3971 eval "ac_cv_lib_$ac_lib_var=no"
3972fi
3973rm -f conftest*
3974LIBS="$ac_save_LIBS"
3975
3976fi
3977if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
43850d5b 3980echo "configure:3981: checking for gettext in libintl" >&5
6be7c12c
AO
3981if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3982 echo $ac_n "(cached) $ac_c" 1>&6
3983else
3984 cat > conftest.$ac_ext <<EOF
43850d5b 3985#line 3986 "configure"
252b5132
RH
3986#include "confdefs.h"
3987
6be7c12c 3988int main() {
252b5132 3989return (int) gettext ("")
6be7c12c
AO
3990; return 0; }
3991EOF
43850d5b 3992if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 3993 rm -rf conftest*
252b5132
RH
3994 gt_cv_func_gettext_libintl=yes
3995else
6be7c12c
AO
3996 echo "configure: failed program was:" >&5
3997 cat conftest.$ac_ext >&5
3998 rm -rf conftest*
3999 gt_cv_func_gettext_libintl=no
252b5132 4000fi
6be7c12c 4001rm -f conftest*
252b5132 4002fi
6be7c12c
AO
4003
4004echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4005else
4006 echo "$ac_t""no" 1>&6
252b5132
RH
4007fi
4008
4009 fi
4010
4011 if test "$gt_cv_func_gettext_libc" = "yes" \
4012 || test "$gt_cv_func_gettext_libintl" = "yes"; then
6be7c12c 4013 cat >> confdefs.h <<\EOF
252b5132
RH
4014#define HAVE_GETTEXT 1
4015EOF
4016
4017 # Extract the first word of "msgfmt", so it can be a program name with args.
4018set dummy msgfmt; ac_word=$2
6be7c12c 4019echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4020echo "configure:4021: checking for $ac_word" >&5
6be7c12c
AO
4021if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4022 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4023else
4024 case "$MSGFMT" in
4025 /*)
4026 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4027 ;;
4028 *)
4029 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4030 for ac_dir in $PATH; do
4031 test -z "$ac_dir" && ac_dir=.
4032 if test -f $ac_dir/$ac_word; then
4033 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4034 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4035 break
4036 fi
4037 fi
4038 done
4039 IFS="$ac_save_ifs"
4040 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4041 ;;
4042esac
4043fi
4044MSGFMT="$ac_cv_path_MSGFMT"
4045if test -n "$MSGFMT"; then
6be7c12c 4046 echo "$ac_t""$MSGFMT" 1>&6
252b5132 4047else
6be7c12c 4048 echo "$ac_t""no" 1>&6
252b5132
RH
4049fi
4050 if test "$MSGFMT" != "no"; then
6be7c12c 4051 for ac_func in dcgettext
252b5132 4052do
6be7c12c 4053echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 4054echo "configure:4055: checking for $ac_func" >&5
6be7c12c
AO
4055if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4056 echo $ac_n "(cached) $ac_c" 1>&6
4057else
4058 cat > conftest.$ac_ext <<EOF
43850d5b 4059#line 4060 "configure"
252b5132
RH
4060#include "confdefs.h"
4061/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 4062 which can conflict with char $ac_func(); below. */
252b5132
RH
4063#include <assert.h>
4064/* Override any gcc2 internal prototype to avoid an error. */
4065/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4066 builtin and then its argument prototype would still apply. */
4067char $ac_func();
4068
4069int main() {
252b5132
RH
4070
4071/* The GNU C library defines this for functions which it implements
4072 to always fail with ENOSYS. Some functions are actually named
4073 something starting with __ and the normal name is an alias. */
4074#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4075choke me
4076#else
6be7c12c 4077$ac_func();
252b5132
RH
4078#endif
4079
6be7c12c 4080; return 0; }
252b5132 4081EOF
43850d5b 4082if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4083 rm -rf conftest*
4084 eval "ac_cv_func_$ac_func=yes"
4085else
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4088 rm -rf conftest*
4089 eval "ac_cv_func_$ac_func=no"
4090fi
4091rm -f conftest*
4092fi
252b5132 4093
6be7c12c
AO
4094if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4095 echo "$ac_t""yes" 1>&6
4096 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4097 cat >> confdefs.h <<EOF
4098#define $ac_tr_func 1
4099EOF
4100
4101else
4102 echo "$ac_t""no" 1>&6
252b5132
RH
4103fi
4104done
4105
4106 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4107set dummy gmsgfmt; ac_word=$2
6be7c12c 4108echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4109echo "configure:4110: checking for $ac_word" >&5
6be7c12c
AO
4110if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4111 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4112else
6be7c12c
AO
4113 case "$GMSGFMT" in
4114 /*)
252b5132
RH
4115 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4116 ;;
6be7c12c
AO
4117 ?:/*)
4118 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4119 ;;
252b5132 4120 *)
6be7c12c
AO
4121 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124 test -z "$ac_dir" && ac_dir=.
4125 if test -f $ac_dir/$ac_word; then
4126 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4127 break
4128 fi
4129 done
4130 IFS="$ac_save_ifs"
252b5132
RH
4131 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4132 ;;
4133esac
4134fi
6be7c12c 4135GMSGFMT="$ac_cv_path_GMSGFMT"
252b5132 4136if test -n "$GMSGFMT"; then
6be7c12c 4137 echo "$ac_t""$GMSGFMT" 1>&6
252b5132 4138else
6be7c12c 4139 echo "$ac_t""no" 1>&6
252b5132
RH
4140fi
4141
4142 # Extract the first word of "xgettext", so it can be a program name with args.
4143set dummy xgettext; ac_word=$2
6be7c12c 4144echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4145echo "configure:4146: checking for $ac_word" >&5
6be7c12c
AO
4146if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4147 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4148else
4149 case "$XGETTEXT" in
4150 /*)
4151 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4152 ;;
4153 *)
4154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4155 for ac_dir in $PATH; do
4156 test -z "$ac_dir" && ac_dir=.
4157 if test -f $ac_dir/$ac_word; then
4158 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4159 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4160 break
4161 fi
4162 fi
4163 done
4164 IFS="$ac_save_ifs"
4165 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4166 ;;
4167esac
4168fi
4169XGETTEXT="$ac_cv_path_XGETTEXT"
4170if test -n "$XGETTEXT"; then
6be7c12c 4171 echo "$ac_t""$XGETTEXT" 1>&6
252b5132 4172else
6be7c12c 4173 echo "$ac_t""no" 1>&6
252b5132
RH
4174fi
4175
6be7c12c 4176 cat > conftest.$ac_ext <<EOF
43850d5b 4177#line 4178 "configure"
252b5132
RH
4178#include "confdefs.h"
4179
6be7c12c 4180int main() {
252b5132
RH
4181extern int _nl_msg_cat_cntr;
4182 return _nl_msg_cat_cntr
6be7c12c
AO
4183; return 0; }
4184EOF
43850d5b 4185if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c 4186 rm -rf conftest*
252b5132
RH
4187 CATOBJEXT=.gmo
4188 DATADIRNAME=share
4189else
6be7c12c
AO
4190 echo "configure: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 rm -rf conftest*
4193 CATOBJEXT=.mo
252b5132
RH
4194 DATADIRNAME=lib
4195fi
6be7c12c 4196rm -f conftest*
252b5132
RH
4197 INSTOBJEXT=.mo
4198 fi
4199 fi
6be7c12c
AO
4200
4201else
4202 echo "$ac_t""no" 1>&6
b3baf5d0 4203fi
252b5132 4204
6be7c12c
AO
4205
4206
252b5132
RH
4207 if test "$CATOBJEXT" = "NONE"; then
4208 nls_cv_use_gnu_gettext=yes
4209 fi
4210 fi
4211
4212 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4213 INTLOBJS="\$(GETTOBJS)"
4214 # Extract the first word of "msgfmt", so it can be a program name with args.
4215set dummy msgfmt; ac_word=$2
6be7c12c 4216echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4217echo "configure:4218: checking for $ac_word" >&5
6be7c12c
AO
4218if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4219 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4220else
4221 case "$MSGFMT" in
4222 /*)
4223 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4224 ;;
4225 *)
4226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4227 for ac_dir in $PATH; do
4228 test -z "$ac_dir" && ac_dir=.
4229 if test -f $ac_dir/$ac_word; then
4230 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4231 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4232 break
4233 fi
4234 fi
4235 done
4236 IFS="$ac_save_ifs"
4237 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4238 ;;
4239esac
4240fi
4241MSGFMT="$ac_cv_path_MSGFMT"
4242if test -n "$MSGFMT"; then
6be7c12c 4243 echo "$ac_t""$MSGFMT" 1>&6
252b5132 4244else
6be7c12c 4245 echo "$ac_t""no" 1>&6
252b5132
RH
4246fi
4247
4248 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4249set dummy gmsgfmt; ac_word=$2
6be7c12c 4250echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4251echo "configure:4252: checking for $ac_word" >&5
6be7c12c
AO
4252if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4253 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4254else
6be7c12c
AO
4255 case "$GMSGFMT" in
4256 /*)
252b5132
RH
4257 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4258 ;;
6be7c12c
AO
4259 ?:/*)
4260 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4261 ;;
252b5132 4262 *)
6be7c12c
AO
4263 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4264 ac_dummy="$PATH"
4265 for ac_dir in $ac_dummy; do
4266 test -z "$ac_dir" && ac_dir=.
4267 if test -f $ac_dir/$ac_word; then
4268 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4269 break
4270 fi
4271 done
4272 IFS="$ac_save_ifs"
252b5132
RH
4273 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4274 ;;
4275esac
4276fi
6be7c12c 4277GMSGFMT="$ac_cv_path_GMSGFMT"
252b5132 4278if test -n "$GMSGFMT"; then
6be7c12c 4279 echo "$ac_t""$GMSGFMT" 1>&6
252b5132 4280else
6be7c12c 4281 echo "$ac_t""no" 1>&6
252b5132
RH
4282fi
4283
4284 # Extract the first word of "xgettext", so it can be a program name with args.
4285set dummy xgettext; ac_word=$2
6be7c12c 4286echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
43850d5b 4287echo "configure:4288: checking for $ac_word" >&5
6be7c12c
AO
4288if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4289 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
4290else
4291 case "$XGETTEXT" in
4292 /*)
4293 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4294 ;;
4295 *)
4296 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4297 for ac_dir in $PATH; do
4298 test -z "$ac_dir" && ac_dir=.
4299 if test -f $ac_dir/$ac_word; then
4300 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4301 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4302 break
4303 fi
4304 fi
4305 done
4306 IFS="$ac_save_ifs"
4307 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4308 ;;
4309esac
4310fi
4311XGETTEXT="$ac_cv_path_XGETTEXT"
4312if test -n "$XGETTEXT"; then
6be7c12c 4313 echo "$ac_t""$XGETTEXT" 1>&6
252b5132 4314else
6be7c12c 4315 echo "$ac_t""no" 1>&6
252b5132
RH
4316fi
4317
6be7c12c 4318
252b5132
RH
4319 USE_INCLUDED_LIBINTL=yes
4320 CATOBJEXT=.gmo
4321 INSTOBJEXT=.mo
4322 DATADIRNAME=share
4323 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4324 INTLLIBS=$INTLDEPS
4325 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4326 nls_cv_header_intl=libintl.h
4327 nls_cv_header_libgt=libgettext.h
4328 fi
4329
4330 if test "$XGETTEXT" != ":"; then
4331 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4332 : ;
4333 else
6be7c12c 4334 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
252b5132
RH
4335 XGETTEXT=":"
4336 fi
4337 fi
4338
4339 # We need to process the po/ directory.
4340 POSUB=po
4341 else
4342 DATADIRNAME=share
4343 nls_cv_header_intl=libintl.h
4344 nls_cv_header_libgt=libgettext.h
4345 fi
4346
4347 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4348 # because some of the sources are only built for this goal.
4349 if test "$PACKAGE" = gettext; then
4350 USE_NLS=yes
4351 USE_INCLUDED_LIBINTL=yes
4352 fi
4353
4354 for lang in $ALL_LINGUAS; do
4355 GMOFILES="$GMOFILES $lang.gmo"
4356 POFILES="$POFILES $lang.po"
4357 done
4358
6be7c12c
AO
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
252b5132
RH
4372 if test "x$CATOBJEXT" != "x"; then
4373 if test "x$ALL_LINGUAS" = "x"; then
4374 LINGUAS=
4375 else
6be7c12c 4376 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
43850d5b 4377echo "configure:4378: checking for catalogs to be installed" >&5
252b5132
RH
4378 NEW_LINGUAS=
4379 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4380 case "$ALL_LINGUAS" in
4381 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4382 esac
4383 done
4384 LINGUAS=$NEW_LINGUAS
6be7c12c 4385 echo "$ac_t""$LINGUAS" 1>&6
252b5132
RH
4386 fi
4387
4388 if test -n "$LINGUAS"; then
4389 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4390 fi
4391 fi
4392
4393 if test $ac_cv_header_locale_h = yes; then
4394 INCLUDE_LOCALE_H="#include <locale.h>"
4395 else
4396 INCLUDE_LOCALE_H="\
4397/* The system does not provide the header <locale.h>. Take care yourself. */"
4398 fi
6be7c12c 4399
252b5132
RH
4400
4401 if test -f $srcdir/po2tbl.sed.in; then
4402 if test "$CATOBJEXT" = ".cat"; then
6be7c12c
AO
4403 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4404echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
43850d5b 4405echo "configure:4406: checking for linux/version.h" >&5
6be7c12c
AO
4406if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4407 echo $ac_n "(cached) $ac_c" 1>&6
4408else
4409 cat > conftest.$ac_ext <<EOF
43850d5b 4410#line 4411 "configure"
252b5132
RH
4411#include "confdefs.h"
4412#include <linux/version.h>
6be7c12c
AO
4413EOF
4414ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 4415{ (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4416ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4417if test -z "$ac_err"; then
4418 rm -rf conftest*
4419 eval "ac_cv_header_$ac_safe=yes"
252b5132 4420else
6be7c12c
AO
4421 echo "$ac_err" >&5
4422 echo "configure: failed program was:" >&5
252b5132 4423 cat conftest.$ac_ext >&5
6be7c12c
AO
4424 rm -rf conftest*
4425 eval "ac_cv_header_$ac_safe=no"
252b5132 4426fi
6be7c12c 4427rm -f conftest*
252b5132 4428fi
6be7c12c
AO
4429if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4430 echo "$ac_t""yes" 1>&6
252b5132
RH
4431 msgformat=linux
4432else
6be7c12c
AO
4433 echo "$ac_t""no" 1>&6
4434msgformat=xopen
252b5132
RH
4435fi
4436
6be7c12c 4437
252b5132
RH
4438 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4439 fi
4440 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4441 $srcdir/po2tbl.sed.in > po2tbl.sed
4442 fi
4443
4444 if test "$PACKAGE" = "gettext"; then
4445 GT_NO="#NO#"
4446 GT_YES=
4447 else
4448 GT_NO=
4449 GT_YES="#YES#"
4450 fi
6be7c12c
AO
4451
4452
252b5132
RH
4453
4454 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
6be7c12c 4455
252b5132
RH
4456
4457 l=
6be7c12c 4458
252b5132 4459
3c3bdf30 4460 if test -f $srcdir/po/POTFILES.in; then
252b5132
RH
4461 test -d po || mkdir po
4462 if test "x$srcdir" != "x."; then
4463 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4464 posrcprefix="$srcdir/"
4465 else
4466 posrcprefix="../$srcdir/"
4467 fi
4468 else
4469 posrcprefix="../"
4470 fi
4471 rm -f po/POTFILES
4472 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4473 < $srcdir/po/POTFILES.in > po/POTFILES
4474 fi
6be7c12c 4475
252b5132
RH
4476
4477# Permit host specific settings.
4478. ${srcdir}/configure.host
4479
6be7c12c 4480
252b5132
RH
4481# Find a good install program. We prefer a C program (faster),
4482# so one script is as good as another. But avoid the broken or
4483# incompatible versions:
4484# SysV /etc/install, /usr/sbin/install
4485# SunOS /usr/etc/install
4486# IRIX /sbin/install
4487# AIX /bin/install
4488# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4489# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4490# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4491# ./install, which can be erroneously created by make from ./install.sh.
6be7c12c 4492echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
43850d5b 4493echo "configure:4494: checking for a BSD compatible install" >&5
252b5132 4494if test -z "$INSTALL"; then
6be7c12c
AO
4495if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4496 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4497else
6be7c12c 4498 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
252b5132
RH
4499 for ac_dir in $PATH; do
4500 # Account for people who put trailing slashes in PATH elements.
6be7c12c
AO
4501 case "$ac_dir/" in
4502 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
252b5132
RH
4503 *)
4504 # OSF1 and SCO ODT 3.0 have their own names for install.
4505 # Don't use installbsd from OSF since it installs stuff as root
4506 # by default.
4507 for ac_prog in ginstall scoinst install; do
6be7c12c 4508 if test -f $ac_dir/$ac_prog; then
252b5132 4509 if test $ac_prog = install &&
6be7c12c 4510 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
252b5132
RH
4511 # AIX install. It has an incompatible calling convention.
4512 :
4513 else
4514 ac_cv_path_install="$ac_dir/$ac_prog -c"
4515 break 2
4516 fi
4517 fi
4518 done
4519 ;;
4520 esac
4521 done
6be7c12c 4522 IFS="$ac_save_IFS"
252b5132
RH
4523
4524fi
4525 if test "${ac_cv_path_install+set}" = set; then
6be7c12c 4526 INSTALL="$ac_cv_path_install"
252b5132
RH
4527 else
4528 # As a last resort, use the slow shell script. We don't cache a
4529 # path for INSTALL within a source directory, because that will
4530 # break other packages using the cache if that directory is
4531 # removed, or if the path is relative.
6be7c12c 4532 INSTALL="$ac_install_sh"
252b5132
RH
4533 fi
4534fi
6be7c12c 4535echo "$ac_t""$INSTALL" 1>&6
252b5132
RH
4536
4537# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4538# It thinks the first close brace ends the variable substitution.
4539test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4540
6be7c12c 4541test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
252b5132
RH
4542
4543test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4544
6be7c12c 4545
252b5132 4546BFD_HOST_64BIT_LONG=0
ec317fb1 4547BFD_HOST_LONG_LONG=0
252b5132
RH
4548BFD_HOST_64_BIT_DEFINED=0
4549BFD_HOST_64_BIT=
4550BFD_HOST_U_64_BIT=
252b5132 4551
ec317fb1 4552echo $ac_n "checking for long long""... $ac_c" 1>&6
43850d5b 4553echo "configure:4554: checking for long long" >&5
ec317fb1
ILT
4554if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
4555 echo $ac_n "(cached) $ac_c" 1>&6
4556else
4557 cat > conftest.$ac_ext <<EOF
43850d5b 4558#line 4559 "configure"
ec317fb1
ILT
4559#include "confdefs.h"
4560
4561int main() {
4562unsigned long long ll = 18446744073709551615ULL;
4563; return 0; }
4564EOF
43850d5b 4565if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ec317fb1
ILT
4566 rm -rf conftest*
4567 bfd_cv_has_long_long=yes
4568else
4569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
4571 rm -rf conftest*
4572 bfd_cv_has_long_long=no
4573fi
4574rm -f conftest*
4575fi
4576
4577echo "$ac_t""$bfd_cv_has_long_long" 1>&6
4578if test $bfd_cv_has_long_long = yes; then
4579 BFD_HOST_LONG_LONG=1
6726e1ea 4580 echo $ac_n "checking size of long long""... $ac_c" 1>&6
43850d5b 4581echo "configure:4582: checking size of long long" >&5
6726e1ea
L
4582if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
4583 echo $ac_n "(cached) $ac_c" 1>&6
4584else
4585 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
4586 cat > conftest.$ac_ext <<EOF
43850d5b 4587#line 4588 "configure"
6726e1ea
L
4588#include "confdefs.h"
4589#include "confdefs.h"
4590#include <sys/types.h>
4591
4592
4593int main() {
4594switch (0) case 0: case (sizeof (long long) == $ac_size):;
4595; return 0; }
4596EOF
43850d5b 4597if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726e1ea
L
4598 rm -rf conftest*
4599 ac_cv_sizeof_long_long=$ac_size
4600else
4601 echo "configure: failed program was:" >&5
4602 cat conftest.$ac_ext >&5
4603fi
4604rm -f conftest*
4605 if test x$ac_cv_sizeof_long_long != x ; then break; fi
4606done
4607
4608fi
4609
4610if test x$ac_cv_sizeof_long_long = x ; then
4611 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
4612fi
4613echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4614cat >> confdefs.h <<EOF
4615#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4616EOF
4617
4618
4619fi
4620
4621echo $ac_n "checking size of long""... $ac_c" 1>&6
43850d5b 4622echo "configure:4623: checking size of long" >&5
6726e1ea
L
4623if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4624 echo $ac_n "(cached) $ac_c" 1>&6
4625else
4626 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
4627 cat > conftest.$ac_ext <<EOF
43850d5b 4628#line 4629 "configure"
6726e1ea
L
4629#include "confdefs.h"
4630#include "confdefs.h"
4631#include <sys/types.h>
4632
4633
4634int main() {
4635switch (0) case 0: case (sizeof (long) == $ac_size):;
4636; return 0; }
4637EOF
43850d5b 4638if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6726e1ea
L
4639 rm -rf conftest*
4640 ac_cv_sizeof_long=$ac_size
4641else
4642 echo "configure: failed program was:" >&5
4643 cat conftest.$ac_ext >&5
4644fi
4645rm -f conftest*
4646 if test x$ac_cv_sizeof_long != x ; then break; fi
4647done
4648
4649fi
4650
4651if test x$ac_cv_sizeof_long = x ; then
4652 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
4653fi
4654echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4655cat >> confdefs.h <<EOF
4656#define SIZEOF_LONG $ac_cv_sizeof_long
4657EOF
4658
4659
4660if test "x${ac_cv_sizeof_long}" = "x8"; then
4661 host64=true
ccba357f
AM
4662 BFD_HOST_64BIT_LONG=1
4663 test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
4664 test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
6726e1ea 4665elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
ccba357f
AM
4666 test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
4667 test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
6726e1ea
L
4668fi
4669
ccba357f 4670if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
6726e1ea 4671 BFD_HOST_64_BIT_DEFINED=1
ccba357f
AM
4672 BFD_HOST_64_BIT="${HOST_64BIT_TYPE}"
4673 BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}"
ec317fb1
ILT
4674fi
4675
4676
4677
6be7c12c
AO
4678
4679
4680
4681
252b5132
RH
4682# Put a plausible default for CC_FOR_BUILD in Makefile.
4683if test -z "$CC_FOR_BUILD"; then
4684 if test "x$cross_compiling" = "xno"; then
4685 CC_FOR_BUILD='$(CC)'
4686 else
4687 CC_FOR_BUILD=gcc
4688 fi
4689fi
4690
4691# Also set EXEEXT_FOR_BUILD.
4692if test "x$cross_compiling" = "xno"; then
4693 EXEEXT_FOR_BUILD='$(EXEEXT)'
4694else
6be7c12c 4695 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
43850d5b 4696echo "configure:4697: checking for build system executable suffix" >&5
6be7c12c
AO
4697if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4698 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4699else
aab08431
ILT
4700 rm -f conftest*
4701 echo 'int main () { return 0; }' > conftest.c
4702 bfd_cv_build_exeext=
4703 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
4704 for file in conftest.*; do
4705 case $file in
4706 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4707 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4708 esac
4709 done
4710 rm -f conftest*
4711 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
252b5132 4712fi
6be7c12c
AO
4713
4714echo "$ac_t""$bfd_cv_build_exeext" 1>&6
252b5132
RH
4715 EXEEXT_FOR_BUILD=""
4716 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4717fi
4718
6be7c12c
AO
4719
4720for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
252b5132 4721do
6be7c12c
AO
4722ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4723echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 4724echo "configure:4725: checking for $ac_hdr" >&5
6be7c12c
AO
4725if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4726 echo $ac_n "(cached) $ac_c" 1>&6
4727else
4728 cat > conftest.$ac_ext <<EOF
43850d5b 4729#line 4730 "configure"
252b5132 4730#include "confdefs.h"
6be7c12c
AO
4731#include <$ac_hdr>
4732EOF
4733ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 4734{ (eval echo configure:4735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4735ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4736if test -z "$ac_err"; then
4737 rm -rf conftest*
4738 eval "ac_cv_header_$ac_safe=yes"
252b5132 4739else
6be7c12c
AO
4740 echo "$ac_err" >&5
4741 echo "configure: failed program was:" >&5
252b5132 4742 cat conftest.$ac_ext >&5
6be7c12c
AO
4743 rm -rf conftest*
4744 eval "ac_cv_header_$ac_safe=no"
252b5132 4745fi
6be7c12c 4746rm -f conftest*
252b5132 4747fi
6be7c12c
AO
4748if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4749 echo "$ac_t""yes" 1>&6
4750 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4751 cat >> confdefs.h <<EOF
4752#define $ac_tr_hdr 1
252b5132 4753EOF
6be7c12c
AO
4754
4755else
4756 echo "$ac_t""no" 1>&6
252b5132
RH
4757fi
4758done
4759
6be7c12c 4760for ac_hdr in fcntl.h sys/file.h sys/time.h
252b5132 4761do
6be7c12c
AO
4762ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4763echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 4764echo "configure:4765: checking for $ac_hdr" >&5
6be7c12c
AO
4765if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4766 echo $ac_n "(cached) $ac_c" 1>&6
4767else
4768 cat > conftest.$ac_ext <<EOF
43850d5b 4769#line 4770 "configure"
252b5132 4770#include "confdefs.h"
6be7c12c
AO
4771#include <$ac_hdr>
4772EOF
4773ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 4774{ (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
4775ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4776if test -z "$ac_err"; then
4777 rm -rf conftest*
4778 eval "ac_cv_header_$ac_safe=yes"
252b5132 4779else
6be7c12c
AO
4780 echo "$ac_err" >&5
4781 echo "configure: failed program was:" >&5
252b5132 4782 cat conftest.$ac_ext >&5
6be7c12c
AO
4783 rm -rf conftest*
4784 eval "ac_cv_header_$ac_safe=no"
252b5132 4785fi
6be7c12c 4786rm -f conftest*
252b5132 4787fi
6be7c12c
AO
4788if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4789 echo "$ac_t""yes" 1>&6
4790 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4791 cat >> confdefs.h <<EOF
4792#define $ac_tr_hdr 1
252b5132 4793EOF
6be7c12c
AO
4794
4795else
4796 echo "$ac_t""no" 1>&6
252b5132
RH
4797fi
4798done
4799
6be7c12c 4800echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
43850d5b 4801echo "configure:4802: checking whether time.h and sys/time.h may both be included" >&5
6be7c12c
AO
4802if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4804else
6be7c12c 4805 cat > conftest.$ac_ext <<EOF
43850d5b 4806#line 4807 "configure"
252b5132
RH
4807#include "confdefs.h"
4808#include <sys/types.h>
4809#include <sys/time.h>
4810#include <time.h>
6be7c12c 4811int main() {
252b5132 4812struct tm *tp;
6be7c12c
AO
4813; return 0; }
4814EOF
43850d5b 4815if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 4816 rm -rf conftest*
252b5132
RH
4817 ac_cv_header_time=yes
4818else
6be7c12c
AO
4819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
4821 rm -rf conftest*
4822 ac_cv_header_time=no
252b5132 4823fi
6be7c12c 4824rm -f conftest*
252b5132 4825fi
b3baf5d0 4826
6be7c12c
AO
4827echo "$ac_t""$ac_cv_header_time" 1>&6
4828if test $ac_cv_header_time = yes; then
4829 cat >> confdefs.h <<\EOF
252b5132
RH
4830#define TIME_WITH_SYS_TIME 1
4831EOF
4832
4833fi
4834
4835ac_header_dirent=no
6be7c12c
AO
4836for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4837do
4838ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4839echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
43850d5b 4840echo "configure:4841: checking for $ac_hdr that defines DIR" >&5
6be7c12c
AO
4841if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4842 echo $ac_n "(cached) $ac_c" 1>&6
4843else
4844 cat > conftest.$ac_ext <<EOF
43850d5b 4845#line 4846 "configure"
252b5132
RH
4846#include "confdefs.h"
4847#include <sys/types.h>
4848#include <$ac_hdr>
6be7c12c 4849int main() {
252b5132 4850DIR *dirp = 0;
6be7c12c
AO
4851; return 0; }
4852EOF
43850d5b 4853if { (eval echo configure:4854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c
AO
4854 rm -rf conftest*
4855 eval "ac_cv_header_dirent_$ac_safe=yes"
252b5132 4856else
6be7c12c
AO
4857 echo "configure: failed program was:" >&5
4858 cat conftest.$ac_ext >&5
4859 rm -rf conftest*
4860 eval "ac_cv_header_dirent_$ac_safe=no"
252b5132 4861fi
6be7c12c 4862rm -f conftest*
252b5132 4863fi
6be7c12c
AO
4864if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4865 echo "$ac_t""yes" 1>&6
4866 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4867 cat >> confdefs.h <<EOF
4868#define $ac_tr_hdr 1
252b5132 4869EOF
6be7c12c
AO
4870 ac_header_dirent=$ac_hdr; break
4871else
4872 echo "$ac_t""no" 1>&6
252b5132
RH
4873fi
4874done
4875# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4876if test $ac_header_dirent = dirent.h; then
6be7c12c 4877echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
43850d5b 4878echo "configure:4879: checking for opendir in -ldir" >&5
6be7c12c
AO
4879ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4880if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4881 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 4882else
6be7c12c 4883 ac_save_LIBS="$LIBS"
252b5132 4884LIBS="-ldir $LIBS"
6be7c12c 4885cat > conftest.$ac_ext <<EOF
43850d5b 4886#line 4887 "configure"
252b5132
RH
4887#include "confdefs.h"
4888/* Override any gcc2 internal prototype to avoid an error. */
4889/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4890 builtin and then its argument prototype would still apply. */
4891char opendir();
4892
4893int main() {
4894opendir()
4895; return 0; }
4896EOF
43850d5b 4897if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4898 rm -rf conftest*
4899 eval "ac_cv_lib_$ac_lib_var=yes"
4900else
4901 echo "configure: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4903 rm -rf conftest*
4904 eval "ac_cv_lib_$ac_lib_var=no"
4905fi
4906rm -f conftest*
4907LIBS="$ac_save_LIBS"
4908
4909fi
4910if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4911 echo "$ac_t""yes" 1>&6
252b5132 4912 LIBS="$LIBS -ldir"
6be7c12c
AO
4913else
4914 echo "$ac_t""no" 1>&6
252b5132
RH
4915fi
4916
4917else
6be7c12c 4918echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
43850d5b 4919echo "configure:4920: checking for opendir in -lx" >&5
6be7c12c
AO
4920ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4921if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4922 echo $ac_n "(cached) $ac_c" 1>&6
b3baf5d0 4923else
6be7c12c 4924 ac_save_LIBS="$LIBS"
b3baf5d0 4925LIBS="-lx $LIBS"
6be7c12c 4926cat > conftest.$ac_ext <<EOF
43850d5b 4927#line 4928 "configure"
b3baf5d0 4928#include "confdefs.h"
6be7c12c
AO
4929/* Override any gcc2 internal prototype to avoid an error. */
4930/* We use char because int might match the return type of a gcc2
4931 builtin and then its argument prototype would still apply. */
4932char opendir();
4933
4934int main() {
4935opendir()
4936; return 0; }
4937EOF
43850d5b 4938if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4939 rm -rf conftest*
4940 eval "ac_cv_lib_$ac_lib_var=yes"
4941else
4942 echo "configure: failed program was:" >&5
4943 cat conftest.$ac_ext >&5
4944 rm -rf conftest*
4945 eval "ac_cv_lib_$ac_lib_var=no"
4946fi
4947rm -f conftest*
4948LIBS="$ac_save_LIBS"
252b5132 4949
6be7c12c
AO
4950fi
4951if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4952 echo "$ac_t""yes" 1>&6
252b5132 4953 LIBS="$LIBS -lx"
6be7c12c
AO
4954else
4955 echo "$ac_t""no" 1>&6
252b5132
RH
4956fi
4957
4958fi
4959
633fd09f 4960for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
252b5132 4961do
6be7c12c 4962echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 4963echo "configure:4964: checking for $ac_func" >&5
6be7c12c
AO
4964if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966else
4967 cat > conftest.$ac_ext <<EOF
43850d5b 4968#line 4969 "configure"
252b5132
RH
4969#include "confdefs.h"
4970/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 4971 which can conflict with char $ac_func(); below. */
252b5132
RH
4972#include <assert.h>
4973/* Override any gcc2 internal prototype to avoid an error. */
4974/* We use char because int might match the return type of a gcc2
6be7c12c
AO
4975 builtin and then its argument prototype would still apply. */
4976char $ac_func();
4977
4978int main() {
252b5132
RH
4979
4980/* The GNU C library defines this for functions which it implements
4981 to always fail with ENOSYS. Some functions are actually named
4982 something starting with __ and the normal name is an alias. */
4983#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4984choke me
4985#else
6be7c12c 4986$ac_func();
252b5132
RH
4987#endif
4988
6be7c12c 4989; return 0; }
252b5132 4990EOF
43850d5b 4991if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
4992 rm -rf conftest*
4993 eval "ac_cv_func_$ac_func=yes"
4994else
4995 echo "configure: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 rm -rf conftest*
4998 eval "ac_cv_func_$ac_func=no"
4999fi
5000rm -f conftest*
5001fi
252b5132 5002
6be7c12c
AO
5003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5004 echo "$ac_t""yes" 1>&6
5005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5006 cat >> confdefs.h <<EOF
5007#define $ac_tr_func 1
5008EOF
5009
5010else
5011 echo "$ac_t""no" 1>&6
252b5132
RH
5012fi
5013done
5014
49c97a80
ILT
5015for ac_func in strtoull
5016do
5017echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 5018echo "configure:5019: checking for $ac_func" >&5
49c97a80
ILT
5019if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5020 echo $ac_n "(cached) $ac_c" 1>&6
5021else
5022 cat > conftest.$ac_ext <<EOF
43850d5b 5023#line 5024 "configure"
49c97a80
ILT
5024#include "confdefs.h"
5025/* System header to define __stub macros and hopefully few prototypes,
5026 which can conflict with char $ac_func(); below. */
5027#include <assert.h>
5028/* Override any gcc2 internal prototype to avoid an error. */
5029/* We use char because int might match the return type of a gcc2
5030 builtin and then its argument prototype would still apply. */
5031char $ac_func();
5032
5033int main() {
5034
5035/* The GNU C library defines this for functions which it implements
5036 to always fail with ENOSYS. Some functions are actually named
5037 something starting with __ and the normal name is an alias. */
5038#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5039choke me
5040#else
5041$ac_func();
5042#endif
5043
5044; return 0; }
5045EOF
43850d5b 5046if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
49c97a80
ILT
5047 rm -rf conftest*
5048 eval "ac_cv_func_$ac_func=yes"
5049else
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 eval "ac_cv_func_$ac_func=no"
5054fi
5055rm -f conftest*
5056fi
5057
5058if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5059 echo "$ac_t""yes" 1>&6
5060 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5061 cat >> confdefs.h <<EOF
5062#define $ac_tr_func 1
5063EOF
5064
5065else
5066 echo "$ac_t""no" 1>&6
5067fi
5068done
5069
6be7c12c
AO
5070
5071
252b5132 5072case "${host}" in
855b0be7 5073*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
6be7c12c 5074 cat >> confdefs.h <<\EOF
252b5132
RH
5075#define USE_BINARY_FOPEN 1
5076EOF
5077 ;;
5078esac
5079
6be7c12c 5080echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
43850d5b 5081echo "configure:5082: checking whether strstr must be declared" >&5
6be7c12c
AO
5082if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
5083 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5084else
6be7c12c 5085 cat > conftest.$ac_ext <<EOF
43850d5b 5086#line 5087 "configure"
252b5132
RH
5087#include "confdefs.h"
5088
5089#include <stdio.h>
5090#ifdef HAVE_STRING_H
5091#include <string.h>
5092#else
5093#ifdef HAVE_STRINGS_H
5094#include <strings.h>
5095#endif
5096#endif
5097#ifdef HAVE_STDLIB_H
5098#include <stdlib.h>
5099#endif
5100#ifdef HAVE_UNISTD_H
5101#include <unistd.h>
5102#endif
6be7c12c 5103int main() {
252b5132 5104char *(*pfn) = (char *(*)) strstr
6be7c12c
AO
5105; return 0; }
5106EOF
43850d5b 5107if { (eval echo configure:5108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5108 rm -rf conftest*
252b5132
RH
5109 bfd_cv_decl_needed_strstr=no
5110else
6be7c12c
AO
5111 echo "configure: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5113 rm -rf conftest*
5114 bfd_cv_decl_needed_strstr=yes
252b5132 5115fi
6be7c12c 5116rm -f conftest*
252b5132
RH
5117fi
5118
6be7c12c 5119echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
252b5132 5120if test $bfd_cv_decl_needed_strstr = yes; then
6be7c12c 5121 cat >> confdefs.h <<\EOF
252b5132
RH
5122#define NEED_DECLARATION_STRSTR 1
5123EOF
5124
5125fi
5126
6be7c12c 5127echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
43850d5b 5128echo "configure:5129: checking whether malloc must be declared" >&5
6be7c12c
AO
5129if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
5130 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5131else
6be7c12c 5132 cat > conftest.$ac_ext <<EOF
43850d5b 5133#line 5134 "configure"
252b5132
RH
5134#include "confdefs.h"
5135
5136#include <stdio.h>
5137#ifdef HAVE_STRING_H
5138#include <string.h>
5139#else
5140#ifdef HAVE_STRINGS_H
5141#include <strings.h>
5142#endif
5143#endif
5144#ifdef HAVE_STDLIB_H
5145#include <stdlib.h>
5146#endif
5147#ifdef HAVE_UNISTD_H
5148#include <unistd.h>
5149#endif
6be7c12c 5150int main() {
252b5132 5151char *(*pfn) = (char *(*)) malloc
6be7c12c
AO
5152; return 0; }
5153EOF
43850d5b 5154if { (eval echo configure:5155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5155 rm -rf conftest*
252b5132
RH
5156 bfd_cv_decl_needed_malloc=no
5157else
6be7c12c
AO
5158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5160 rm -rf conftest*
5161 bfd_cv_decl_needed_malloc=yes
252b5132 5162fi
6be7c12c 5163rm -f conftest*
252b5132
RH
5164fi
5165
6be7c12c 5166echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
252b5132 5167if test $bfd_cv_decl_needed_malloc = yes; then
6be7c12c 5168 cat >> confdefs.h <<\EOF
252b5132
RH
5169#define NEED_DECLARATION_MALLOC 1
5170EOF
5171
5172fi
5173
6be7c12c 5174echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
43850d5b 5175echo "configure:5176: checking whether realloc must be declared" >&5
6be7c12c
AO
5176if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
5177 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5178else
6be7c12c 5179 cat > conftest.$ac_ext <<EOF
43850d5b 5180#line 5181 "configure"
252b5132
RH
5181#include "confdefs.h"
5182
5183#include <stdio.h>
5184#ifdef HAVE_STRING_H
5185#include <string.h>
5186#else
5187#ifdef HAVE_STRINGS_H
5188#include <strings.h>
5189#endif
5190#endif
5191#ifdef HAVE_STDLIB_H
5192#include <stdlib.h>
5193#endif
5194#ifdef HAVE_UNISTD_H
5195#include <unistd.h>
5196#endif
6be7c12c 5197int main() {
252b5132 5198char *(*pfn) = (char *(*)) realloc
6be7c12c
AO
5199; return 0; }
5200EOF
43850d5b 5201if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5202 rm -rf conftest*
252b5132
RH
5203 bfd_cv_decl_needed_realloc=no
5204else
6be7c12c
AO
5205 echo "configure: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 rm -rf conftest*
5208 bfd_cv_decl_needed_realloc=yes
252b5132 5209fi
6be7c12c 5210rm -f conftest*
252b5132
RH
5211fi
5212
6be7c12c 5213echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
252b5132 5214if test $bfd_cv_decl_needed_realloc = yes; then
6be7c12c 5215 cat >> confdefs.h <<\EOF
252b5132
RH
5216#define NEED_DECLARATION_REALLOC 1
5217EOF
5218
5219fi
5220
6be7c12c 5221echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
43850d5b 5222echo "configure:5223: checking whether free must be declared" >&5
6be7c12c
AO
5223if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5225else
6be7c12c 5226 cat > conftest.$ac_ext <<EOF
43850d5b 5227#line 5228 "configure"
252b5132
RH
5228#include "confdefs.h"
5229
5230#include <stdio.h>
5231#ifdef HAVE_STRING_H
5232#include <string.h>
5233#else
5234#ifdef HAVE_STRINGS_H
5235#include <strings.h>
5236#endif
5237#endif
5238#ifdef HAVE_STDLIB_H
5239#include <stdlib.h>
5240#endif
5241#ifdef HAVE_UNISTD_H
5242#include <unistd.h>
5243#endif
6be7c12c 5244int main() {
252b5132 5245char *(*pfn) = (char *(*)) free
6be7c12c
AO
5246; return 0; }
5247EOF
43850d5b 5248if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5249 rm -rf conftest*
252b5132
RH
5250 bfd_cv_decl_needed_free=no
5251else
6be7c12c
AO
5252 echo "configure: failed program was:" >&5
5253 cat conftest.$ac_ext >&5
5254 rm -rf conftest*
5255 bfd_cv_decl_needed_free=yes
252b5132 5256fi
6be7c12c 5257rm -f conftest*
252b5132
RH
5258fi
5259
6be7c12c 5260echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
252b5132 5261if test $bfd_cv_decl_needed_free = yes; then
6be7c12c 5262 cat >> confdefs.h <<\EOF
252b5132
RH
5263#define NEED_DECLARATION_FREE 1
5264EOF
5265
5266fi
5267
6be7c12c 5268echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
43850d5b 5269echo "configure:5270: checking whether getenv must be declared" >&5
6be7c12c
AO
5270if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
5271 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5272else
6be7c12c 5273 cat > conftest.$ac_ext <<EOF
43850d5b 5274#line 5275 "configure"
252b5132
RH
5275#include "confdefs.h"
5276
5277#include <stdio.h>
5278#ifdef HAVE_STRING_H
5279#include <string.h>
5280#else
5281#ifdef HAVE_STRINGS_H
5282#include <strings.h>
5283#endif
5284#endif
5285#ifdef HAVE_STDLIB_H
5286#include <stdlib.h>
5287#endif
5288#ifdef HAVE_UNISTD_H
5289#include <unistd.h>
5290#endif
6be7c12c 5291int main() {
252b5132 5292char *(*pfn) = (char *(*)) getenv
6be7c12c
AO
5293; return 0; }
5294EOF
43850d5b 5295if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5296 rm -rf conftest*
252b5132
RH
5297 bfd_cv_decl_needed_getenv=no
5298else
6be7c12c
AO
5299 echo "configure: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5301 rm -rf conftest*
5302 bfd_cv_decl_needed_getenv=yes
252b5132 5303fi
6be7c12c 5304rm -f conftest*
252b5132
RH
5305fi
5306
6be7c12c 5307echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
252b5132 5308if test $bfd_cv_decl_needed_getenv = yes; then
6be7c12c 5309 cat >> confdefs.h <<\EOF
252b5132
RH
5310#define NEED_DECLARATION_GETENV 1
5311EOF
5312
5313fi
5314
6be7c12c 5315
252b5132
RH
5316# If we are configured native, pick a core file support file.
5317COREFILE=
5318COREFLAG=
5319TRAD_HEADER=
5320if test "${target}" = "${host}"; then
5321 case "${host}" in
13dfd2d0 5322 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
46d59bfa
DB
5323 COREFILE=''
5324 ;;
252b5132
RH
5325 alpha*-*-linux-gnu*)
5326 COREFILE=trad-core.lo
5327 TRAD_HEADER='"hosts/alphalinux.h"'
5328 ;;
690cc98b
NC
5329 alpha*-*-netbsd* | alpha*-*-openbsd*)
5330 COREFILE=netbsd-core.lo
5331 ;;
252b5132 5332 alpha*-*-*) COREFILE=osf-core.lo ;;
13dfd2d0
NC
5333 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
5334 COREFILE='' ;;
61d0bc33 5335 arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
252b5132
RH
5336 arm-*-riscix) COREFILE=trad-core.lo ;;
5337 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
5338 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
5339 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
5340 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
5341 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
dc810e39 5342 i370-*-*)
5b93d8bb
AM
5343 COREFILE=trad-core.lo
5344 TRAD_HEADER='"hosts/i370linux.h"'
5345 ;;
5346
80c7c40a 5347 i[3-7]86-sequent-bsd*)
5b93d8bb 5348 COREFILE=trad-core.lo
252b5132
RH
5349 TRAD_HEADER='"hosts/symmetry.h"'
5350 ;;
80c7c40a
NC
5351 i[3-7]86-sequent-sysv4*) ;;
5352 i[3-7]86-sequent-sysv*)
252b5132
RH
5353 COREFILE=trad-core.lo
5354 TRAD_HEADER='"hosts/symmetry.h"'
5355 ;;
80c7c40a 5356 i[3-7]86-*-bsdi)
7e3b3466
NC
5357 COREFILE=
5358 ;;
80c7c40a 5359 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
5360 COREFILE=trad-core.lo
5361 TRAD_HEADER='"hosts/i386bsd.h"'
5362 ;;
13dfd2d0 5363 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
d4af9775
DB
5364 COREFILE=''
5365 TRAD_HEADER='"hosts/i386bsd.h"'
5366 ;;
4615568e 5367 i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
252b5132
RH
5368 COREFILE=netbsd-core.lo
5369 ;;
80c7c40a 5370 i[3-7]86-esix-sysv3*)
252b5132
RH
5371 COREFILE=trad-core.lo
5372 TRAD_HEADER='"hosts/esix.h"'
5373 ;;
80c7c40a 5374 i[3-7]86-*-sco3.2v5*)
252b5132
RH
5375 COREFILE=sco5-core.lo
5376 ;;
80c7c40a 5377 i[3-7]86-*-sco* | i[3-7]86-*-isc*)
252b5132
RH
5378 COREFILE=trad-core.lo
5379 TRAD_HEADER='"hosts/i386sco.h"'
5380 ;;
80c7c40a 5381 i[3-7]86-*-mach3*)
252b5132
RH
5382 COREFILE=trad-core.lo
5383 TRAD_HEADER='"hosts/i386mach3.h"'
5384 ;;
80c7c40a 5385 i[3-7]86-*-linux-gnu*)
252b5132
RH
5386 COREFILE=trad-core.lo
5387 TRAD_HEADER='"hosts/i386linux.h"'
5388 ;;
80c7c40a
NC
5389 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
5390 i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
252b5132
RH
5391 i860-*-mach3* | i860-*-osf1*)
5392 COREFILE=trad-core.lo
5393 TRAD_HEADER='"hosts/i860mach3.h"'
5394 ;;
252b5132
RH
5395 mips-*-netbsd* | mips*-*-openbsd*)
5396 COREFILE=netbsd-core.lo
5397 ;;
5398 mips-dec-*)
5399 COREFILE=trad-core.lo
5400 TRAD_HEADER='"hosts/decstation.h"'
5401 ;;
5402 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
5403 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
5404 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
252b5132
RH
5405 mips-*-sysv4*) ;;
5406 mips-*-sysv* | mips-*-riscos*)
5407 COREFILE=trad-core.lo
5408 TRAD_HEADER='"hosts/riscos.h"'
5409 ;;
5410 mips-sony-bsd*)
5411 COREFILE=trad-core.lo
5412 TRAD_HEADER='"hosts/news-mips.h"'
5413 ;;
5414 m68*-bull*-sysv*)
5415 COREFILE=trad-core.lo
5416 TRAD_HEADER='"hosts/dpx2.h"'
5417 ;;
5418 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
5419 m68*-hp-bsd*)
5420 COREFILE=trad-core.lo
5421 TRAD_HEADER='"hosts/hp300bsd.h"'
5422 ;;
5423 m68*-*-linux-gnu*)
5424 COREFILE=trad-core.lo
5425 TRAD_HEADER='"hosts/m68klinux.h"'
5426 ;;
5427 m68*-motorola-sysv*)
5428 COREFILE=trad-core.lo
5429 TRAD_HEADER='"hosts/delta68.h"'
5430 ;;
5431 m68*-sony-*)
5432 COREFILE=trad-core.lo
5433 TRAD_HEADER='"hosts/news.h"'
5434 ;;
5435 m68*-*-netbsd* | m68*-*-openbsd*)
5436 COREFILE=netbsd-core.lo
5437 ;;
5438 m68*-apple-aux*)
5439 COREFILE=trad-core.lo
5440 TRAD_HEADER='"hosts/m68kaux.h"'
5441 ;;
eb1e0e80
NC
5442 m88*-*-sysv4*)
5443 ;;
5444 m88*-motorola-sysv*)
5445 COREFILE=ptrace-core.lo
5446 ;;
252b5132
RH
5447 m88*-*-mach3*)
5448 COREFILE=trad-core.lo
5449 TRAD_HEADER='"hosts/m88kmach3.h"'
5450 ;;
5451 ns32k-pc532-mach)
5452 COREFILE=trad-core.lo
5453 TRAD_HEADER='"hosts/pc532mach.h"'
5454 ;;
5455 ns32k-*-netbsd* | ns32k-*-openbsd*)
5456 COREFILE=netbsd-core.lo
5457 ;;
eb1e0e80
NC
5458 rs6000-*-lynx*)
5459 COREFILE=lynx-core.lo
5460 ;;
5461 rs6000-*-aix5.* | powerpc-*-aix5.*)
5462 COREFILE=rs6000-core.lo
5463 COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
5464 ;;
83954261 5465 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
653f71ca
KB
5466 COREFILE=rs6000-core.lo
5467 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
83954261
AM
5468 # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
5469 # have c_impl as a member of struct core_dumpx
5470 echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
43850d5b 5471echo "configure:5472: checking for c_impl in struct core_dumpx" >&5
83954261 5472 cat > conftest.$ac_ext <<EOF
43850d5b 5473#line 5474 "configure"
83954261
AM
5474#include "confdefs.h"
5475#include <core.h>
5476int main() {
5477struct core_dumpx c; c.c_impl = 0;
5478; return 0; }
5479EOF
43850d5b 5480if { (eval echo configure:5481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
83954261
AM
5481 rm -rf conftest*
5482 cat >> confdefs.h <<\EOF
5483#define HAVE_ST_C_IMPL 1
5484EOF
5485
5486 echo "$ac_t""yes" 1>&6
5487else
5488 echo "configure: failed program was:" >&5
5489 cat conftest.$ac_ext >&5
5490 rm -rf conftest*
5491 echo "$ac_t""no" 1>&6
5492fi
5493rm -f conftest*
653f71ca 5494 ;;
252b5132
RH
5495 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
5496 rs6000-*-*) COREFILE=rs6000-core.lo ;;
252b5132
RH
5497 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
5498 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
5499 powerpc-*-beos*) ;;
13dfd2d0
NC
5500 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
5501 COREFILE='' ;;
252b5132 5502 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
d4af9775 5503 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
dc810e39 5504 s390*-*-*) COREFILE=trad-core.lo ;;
8d05742f 5505 sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
a9bf1154 5506 sparc-*-netbsd* | sparc*-*-openbsd*)
252b5132
RH
5507 COREFILE=netbsd-core.lo
5508 ;;
5509 tahoe-*-*)
5510 COREFILE=trad-core.lo
5511 TRAD_HEADER='"hosts/tahoe.h"'
5512 ;;
de6e5e1a
NC
5513 vax-*-netbsd* | vax-*-openbsd*)
5514 COREFILE=netbsd-core.lo
5515 ;;
252b5132
RH
5516 vax-*-ultrix2*)
5517 COREFILE=trad-core.lo
5518 TRAD_HEADER='"hosts/vaxult2.h"'
5519 ;;
5520 vax-*-ultrix*)
5521 COREFILE=trad-core.lo
5522 TRAD_HEADER='"hosts/vaxult2.h"'
5523 ;;
f8fc3443
NC
5524 vax-*-linux-gnu*)
5525 COREFILE=trad-core.lo
5526 TRAD_HEADER='"hosts/vaxlinux.h"'
5527 ;;
252b5132
RH
5528 vax-*-*)
5529 COREFILE=trad-core.lo
5530 TRAD_HEADER='"hosts/vaxbsd.h"'
5531 ;;
85cfd8d3
MK
5532 x86_64-*-netbsd* | x86_64-*-openbsd*)
5533 COREFILE=netbsd-core.lo
5534 ;;
252b5132
RH
5535 esac
5536
5537 case "$COREFILE" in
5538 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
5539 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
5540 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
5541 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
5542 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
5543 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
5544 osf-core.lo) COREFLAG=-DOSF_CORE ;;
5545 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
5546 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
5547 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
5548 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
5549 esac
5550
5551 # ELF corefile support has several flavors, but all of
5552 # them use something called <sys/procfs.h>
6be7c12c 5553 for ac_hdr in sys/procfs.h
252b5132 5554do
6be7c12c
AO
5555ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5556echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 5557echo "configure:5558: checking for $ac_hdr" >&5
6be7c12c
AO
5558if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5559 echo $ac_n "(cached) $ac_c" 1>&6
5560else
5561 cat > conftest.$ac_ext <<EOF
43850d5b 5562#line 5563 "configure"
252b5132 5563#include "confdefs.h"
6be7c12c
AO
5564#include <$ac_hdr>
5565EOF
5566ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 5567{ (eval echo configure:5568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
5568ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5569if test -z "$ac_err"; then
5570 rm -rf conftest*
5571 eval "ac_cv_header_$ac_safe=yes"
252b5132 5572else
6be7c12c
AO
5573 echo "$ac_err" >&5
5574 echo "configure: failed program was:" >&5
252b5132 5575 cat conftest.$ac_ext >&5
6be7c12c
AO
5576 rm -rf conftest*
5577 eval "ac_cv_header_$ac_safe=no"
252b5132 5578fi
6be7c12c 5579rm -f conftest*
252b5132 5580fi
6be7c12c
AO
5581if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5582 echo "$ac_t""yes" 1>&6
5583 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5584 cat >> confdefs.h <<EOF
5585#define $ac_tr_hdr 1
252b5132 5586EOF
6be7c12c
AO
5587
5588else
5589 echo "$ac_t""no" 1>&6
252b5132
RH
5590fi
5591done
5592
5593 if test "$ac_cv_header_sys_procfs_h" = yes; then
6be7c12c 5594 echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5595echo "configure:5596: checking for prstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5596 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5598else
6be7c12c 5599 cat > conftest.$ac_ext <<EOF
43850d5b 5600#line 5601 "configure"
252b5132 5601#include "confdefs.h"
7ee38065
MS
5602
5603#define _SYSCALL32
252b5132 5604#include <sys/procfs.h>
6be7c12c 5605int main() {
252b5132 5606prstatus_t avar
6be7c12c
AO
5607; return 0; }
5608EOF
43850d5b 5609if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5610 rm -rf conftest*
252b5132
RH
5611 bfd_cv_have_sys_procfs_type_prstatus_t=yes
5612else
6be7c12c
AO
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 bfd_cv_have_sys_procfs_type_prstatus_t=no
5617
252b5132 5618fi
6be7c12c 5619rm -f conftest*
252b5132
RH
5620fi
5621
5622 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
6be7c12c 5623 cat >> confdefs.h <<\EOF
252b5132
RH
5624#define HAVE_PRSTATUS_T 1
5625EOF
5626
5627 fi
6be7c12c 5628 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
252b5132 5629
6be7c12c 5630 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5631echo "configure:5632: checking for prstatus32_t in sys/procfs.h" >&5
6be7c12c
AO
5632 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
5633 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5634else
6be7c12c 5635 cat > conftest.$ac_ext <<EOF
43850d5b 5636#line 5637 "configure"
7ee38065
MS
5637#include "confdefs.h"
5638
5639#define _SYSCALL32
5640#include <sys/procfs.h>
6be7c12c 5641int main() {
7ee38065 5642prstatus32_t avar
6be7c12c
AO
5643; return 0; }
5644EOF
43850d5b 5645if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5646 rm -rf conftest*
7ee38065
MS
5647 bfd_cv_have_sys_procfs_type_prstatus32_t=yes
5648else
6be7c12c
AO
5649 echo "configure: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 rm -rf conftest*
5652 bfd_cv_have_sys_procfs_type_prstatus32_t=no
5653
7ee38065 5654fi
6be7c12c 5655rm -f conftest*
7ee38065
MS
5656fi
5657
5658 if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
6be7c12c 5659 cat >> confdefs.h <<\EOF
7ee38065
MS
5660#define HAVE_PRSTATUS32_T 1
5661EOF
5662
5663 fi
6be7c12c 5664 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
7ee38065 5665
6be7c12c 5666 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5667echo "configure:5668: checking for prstatus_t.pr_who in sys/procfs.h" >&5
6be7c12c
AO
5668 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
5669 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5670else
6be7c12c 5671 cat > conftest.$ac_ext <<EOF
43850d5b 5672#line 5673 "configure"
252b5132 5673#include "confdefs.h"
7ee38065
MS
5674
5675#define _SYSCALL32
252b5132 5676#include <sys/procfs.h>
6be7c12c 5677int main() {
252b5132 5678prstatus_t avar; void* aref = (void*) &avar.pr_who
6be7c12c
AO
5679; return 0; }
5680EOF
43850d5b 5681if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5682 rm -rf conftest*
252b5132
RH
5683 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
5684else
6be7c12c
AO
5685 echo "configure: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
5687 rm -rf conftest*
5688 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
5689
252b5132 5690fi
6be7c12c 5691rm -f conftest*
252b5132
RH
5692fi
5693
5694 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
6be7c12c 5695 cat >> confdefs.h <<\EOF
252b5132
RH
5696#define HAVE_PRSTATUS_T_PR_WHO 1
5697EOF
5698
5699 fi
6be7c12c 5700 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
252b5132 5701
6be7c12c 5702 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5703echo "configure:5704: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
6be7c12c
AO
5704 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5706else
6be7c12c 5707 cat > conftest.$ac_ext <<EOF
43850d5b 5708#line 5709 "configure"
7ee38065
MS
5709#include "confdefs.h"
5710
5711#define _SYSCALL32
5712#include <sys/procfs.h>
6be7c12c 5713int main() {
7ee38065 5714prstatus32_t avar; void* aref = (void*) &avar.pr_who
6be7c12c
AO
5715; return 0; }
5716EOF
43850d5b 5717if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5718 rm -rf conftest*
7ee38065
MS
5719 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
5720else
6be7c12c
AO
5721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5723 rm -rf conftest*
5724 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
5725
7ee38065 5726fi
6be7c12c 5727rm -f conftest*
7ee38065
MS
5728fi
5729
5730 if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
6be7c12c 5731 cat >> confdefs.h <<\EOF
7ee38065
MS
5732#define HAVE_PRSTATUS32_T_PR_WHO 1
5733EOF
5734
5735 fi
6be7c12c 5736 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
7ee38065 5737
6be7c12c 5738 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5739echo "configure:5740: checking for pstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5740 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5741 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5742else
6be7c12c 5743 cat > conftest.$ac_ext <<EOF
43850d5b 5744#line 5745 "configure"
252b5132 5745#include "confdefs.h"
7ee38065
MS
5746
5747#define _SYSCALL32
252b5132 5748#include <sys/procfs.h>
6be7c12c 5749int main() {
252b5132 5750pstatus_t avar
6be7c12c
AO
5751; return 0; }
5752EOF
43850d5b 5753if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5754 rm -rf conftest*
252b5132
RH
5755 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5756else
6be7c12c
AO
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5759 rm -rf conftest*
5760 bfd_cv_have_sys_procfs_type_pstatus_t=no
5761
252b5132 5762fi
6be7c12c 5763rm -f conftest*
252b5132
RH
5764fi
5765
5766 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
6be7c12c 5767 cat >> confdefs.h <<\EOF
252b5132
RH
5768#define HAVE_PSTATUS_T 1
5769EOF
5770
5771 fi
6be7c12c 5772 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
252b5132 5773
6be7c12c 5774 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5775echo "configure:5776: checking for pxstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5776 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
f572a39d 5778else
6be7c12c 5779 cat > conftest.$ac_ext <<EOF
43850d5b 5780#line 5781 "configure"
f572a39d
AM
5781#include "confdefs.h"
5782
5783#define _SYSCALL32
5784#include <sys/procfs.h>
6be7c12c 5785int main() {
f572a39d 5786pxstatus_t avar
6be7c12c
AO
5787; return 0; }
5788EOF
43850d5b 5789if { (eval echo configure:5790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5790 rm -rf conftest*
f572a39d
AM
5791 bfd_cv_have_sys_procfs_type_pxstatus_t=yes
5792else
6be7c12c
AO
5793 echo "configure: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 rm -rf conftest*
5796 bfd_cv_have_sys_procfs_type_pxstatus_t=no
5797
f572a39d 5798fi
6be7c12c 5799rm -f conftest*
f572a39d
AM
5800fi
5801
5802 if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
6be7c12c 5803 cat >> confdefs.h <<\EOF
f572a39d
AM
5804#define HAVE_PXSTATUS_T 1
5805EOF
5806
5807 fi
6be7c12c 5808 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
f572a39d 5809
6be7c12c 5810 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5811echo "configure:5812: checking for pstatus32_t in sys/procfs.h" >&5
6be7c12c
AO
5812 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
5813 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5814else
6be7c12c 5815 cat > conftest.$ac_ext <<EOF
43850d5b 5816#line 5817 "configure"
7ee38065
MS
5817#include "confdefs.h"
5818
5819#define _SYSCALL32
5820#include <sys/procfs.h>
6be7c12c 5821int main() {
7ee38065 5822pstatus32_t avar
6be7c12c
AO
5823; return 0; }
5824EOF
43850d5b 5825if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5826 rm -rf conftest*
7ee38065
MS
5827 bfd_cv_have_sys_procfs_type_pstatus32_t=yes
5828else
6be7c12c
AO
5829 echo "configure: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5831 rm -rf conftest*
5832 bfd_cv_have_sys_procfs_type_pstatus32_t=no
5833
7ee38065 5834fi
6be7c12c 5835rm -f conftest*
7ee38065
MS
5836fi
5837
5838 if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
6be7c12c 5839 cat >> confdefs.h <<\EOF
7ee38065
MS
5840#define HAVE_PSTATUS32_T 1
5841EOF
5842
5843 fi
6be7c12c 5844 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
7ee38065 5845
6be7c12c 5846 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5847echo "configure:5848: checking for prpsinfo_t in sys/procfs.h" >&5
6be7c12c
AO
5848 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
5849 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5850else
6be7c12c 5851 cat > conftest.$ac_ext <<EOF
43850d5b 5852#line 5853 "configure"
252b5132 5853#include "confdefs.h"
7ee38065
MS
5854
5855#define _SYSCALL32
252b5132 5856#include <sys/procfs.h>
6be7c12c 5857int main() {
252b5132 5858prpsinfo_t avar
6be7c12c
AO
5859; return 0; }
5860EOF
43850d5b 5861if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5862 rm -rf conftest*
252b5132
RH
5863 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
5864else
6be7c12c
AO
5865 echo "configure: failed program was:" >&5
5866 cat conftest.$ac_ext >&5
5867 rm -rf conftest*
5868 bfd_cv_have_sys_procfs_type_prpsinfo_t=no
5869
252b5132 5870fi
6be7c12c 5871rm -f conftest*
252b5132
RH
5872fi
5873
5874 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
6be7c12c 5875 cat >> confdefs.h <<\EOF
252b5132
RH
5876#define HAVE_PRPSINFO_T 1
5877EOF
5878
5879 fi
6be7c12c 5880 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
252b5132 5881
6be7c12c 5882 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5883echo "configure:5884: checking for prpsinfo32_t in sys/procfs.h" >&5
6be7c12c
AO
5884 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5886else
6be7c12c 5887 cat > conftest.$ac_ext <<EOF
43850d5b 5888#line 5889 "configure"
7ee38065
MS
5889#include "confdefs.h"
5890
5891#define _SYSCALL32
5892#include <sys/procfs.h>
6be7c12c 5893int main() {
7ee38065 5894prpsinfo32_t avar
6be7c12c
AO
5895; return 0; }
5896EOF
43850d5b 5897if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5898 rm -rf conftest*
7ee38065
MS
5899 bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
5900else
6be7c12c
AO
5901 echo "configure: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 rm -rf conftest*
5904 bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
5905
7ee38065 5906fi
6be7c12c 5907rm -f conftest*
7ee38065
MS
5908fi
5909
5910 if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
6be7c12c 5911 cat >> confdefs.h <<\EOF
7ee38065
MS
5912#define HAVE_PRPSINFO32_T 1
5913EOF
5914
5915 fi
6be7c12c 5916 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
7ee38065 5917
6be7c12c 5918 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5919echo "configure:5920: checking for psinfo_t in sys/procfs.h" >&5
6be7c12c
AO
5920 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
5921 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5922else
6be7c12c 5923 cat > conftest.$ac_ext <<EOF
43850d5b 5924#line 5925 "configure"
252b5132 5925#include "confdefs.h"
7ee38065
MS
5926
5927#define _SYSCALL32
252b5132 5928#include <sys/procfs.h>
6be7c12c 5929int main() {
252b5132 5930psinfo_t avar
6be7c12c
AO
5931; return 0; }
5932EOF
43850d5b 5933if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5934 rm -rf conftest*
252b5132
RH
5935 bfd_cv_have_sys_procfs_type_psinfo_t=yes
5936else
6be7c12c
AO
5937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 rm -rf conftest*
5940 bfd_cv_have_sys_procfs_type_psinfo_t=no
5941
252b5132 5942fi
6be7c12c 5943rm -f conftest*
252b5132
RH
5944fi
5945
5946 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
6be7c12c 5947 cat >> confdefs.h <<\EOF
252b5132
RH
5948#define HAVE_PSINFO_T 1
5949EOF
5950
5951 fi
6be7c12c 5952 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
252b5132 5953
6be7c12c 5954 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5955echo "configure:5956: checking for psinfo32_t in sys/procfs.h" >&5
6be7c12c
AO
5956 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
7ee38065 5958else
6be7c12c 5959 cat > conftest.$ac_ext <<EOF
43850d5b 5960#line 5961 "configure"
7ee38065
MS
5961#include "confdefs.h"
5962
5963#define _SYSCALL32
5964#include <sys/procfs.h>
6be7c12c 5965int main() {
7ee38065 5966psinfo32_t avar
6be7c12c
AO
5967; return 0; }
5968EOF
43850d5b 5969if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 5970 rm -rf conftest*
7ee38065
MS
5971 bfd_cv_have_sys_procfs_type_psinfo32_t=yes
5972else
6be7c12c
AO
5973 echo "configure: failed program was:" >&5
5974 cat conftest.$ac_ext >&5
5975 rm -rf conftest*
5976 bfd_cv_have_sys_procfs_type_psinfo32_t=no
5977
7ee38065 5978fi
6be7c12c 5979rm -f conftest*
7ee38065
MS
5980fi
5981
5982 if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
6be7c12c 5983 cat >> confdefs.h <<\EOF
7ee38065
MS
5984#define HAVE_PSINFO32_T 1
5985EOF
5986
5987 fi
6be7c12c 5988 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
7ee38065 5989
6be7c12c 5990 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 5991echo "configure:5992: checking for lwpstatus_t in sys/procfs.h" >&5
6be7c12c
AO
5992 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
5993 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 5994else
6be7c12c 5995 cat > conftest.$ac_ext <<EOF
43850d5b 5996#line 5997 "configure"
252b5132 5997#include "confdefs.h"
7ee38065
MS
5998
5999#define _SYSCALL32
252b5132 6000#include <sys/procfs.h>
6be7c12c 6001int main() {
252b5132 6002lwpstatus_t avar
6be7c12c
AO
6003; return 0; }
6004EOF
43850d5b 6005if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6006 rm -rf conftest*
252b5132
RH
6007 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
6008else
6be7c12c
AO
6009 echo "configure: failed program was:" >&5
6010 cat conftest.$ac_ext >&5
6011 rm -rf conftest*
6012 bfd_cv_have_sys_procfs_type_lwpstatus_t=no
6013
252b5132 6014fi
6be7c12c 6015rm -f conftest*
252b5132
RH
6016fi
6017
6018 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
6be7c12c 6019 cat >> confdefs.h <<\EOF
252b5132
RH
6020#define HAVE_LWPSTATUS_T 1
6021EOF
6022
6023 fi
6be7c12c 6024 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
252b5132 6025
6be7c12c 6026 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 6027echo "configure:6028: checking for lwpxstatus_t in sys/procfs.h" >&5
6be7c12c
AO
6028 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
f572a39d 6030else
6be7c12c 6031 cat > conftest.$ac_ext <<EOF
43850d5b 6032#line 6033 "configure"
f572a39d
AM
6033#include "confdefs.h"
6034
6035#define _SYSCALL32
6036#include <sys/procfs.h>
6be7c12c 6037int main() {
f572a39d 6038lwpxstatus_t avar
6be7c12c
AO
6039; return 0; }
6040EOF
43850d5b 6041if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6042 rm -rf conftest*
f572a39d
AM
6043 bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
6044else
6be7c12c
AO
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
6049
f572a39d 6050fi
6be7c12c 6051rm -f conftest*
f572a39d
AM
6052fi
6053
6054 if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
6be7c12c 6055 cat >> confdefs.h <<\EOF
f572a39d
AM
6056#define HAVE_LWPXSTATUS_T 1
6057EOF
6058
6059 fi
6be7c12c 6060 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
f572a39d 6061
6be7c12c 6062 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
43850d5b 6063echo "configure:6064: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
6be7c12c
AO
6064 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
6065 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 6066else
6be7c12c 6067 cat > conftest.$ac_ext <<EOF
43850d5b 6068#line 6069 "configure"
252b5132 6069#include "confdefs.h"
7ee38065
MS
6070
6071#define _SYSCALL32
252b5132 6072#include <sys/procfs.h>
6be7c12c 6073int main() {
252b5132 6074lwpstatus_t avar; void* aref = (void*) &avar.pr_context
6be7c12c
AO
6075; return 0; }
6076EOF
43850d5b 6077if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6078 rm -rf conftest*
252b5132
RH
6079 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
6080else
6be7c12c
AO
6081 echo "configure: failed program was:" >&5
6082 cat conftest.$ac_ext >&5
6083 rm -rf conftest*
6084 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
6085
252b5132 6086fi
6be7c12c 6087rm -f conftest*
252b5132
RH
6088fi
6089
6090 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
6be7c12c 6091 cat >> confdefs.h <<\EOF
252b5132
RH
6092#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
6093EOF
6094
6095 fi
6be7c12c 6096 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
252b5132 6097
6be7c12c 6098 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
43850d5b 6099echo "configure:6100: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
6be7c12c
AO
6100 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
6101 echo $ac_n "(cached) $ac_c" 1>&6
252b5132 6102else
6be7c12c 6103 cat > conftest.$ac_ext <<EOF
43850d5b 6104#line 6105 "configure"
252b5132 6105#include "confdefs.h"
7ee38065
MS
6106
6107#define _SYSCALL32
252b5132 6108#include <sys/procfs.h>
6be7c12c 6109int main() {
252b5132 6110lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
6be7c12c
AO
6111; return 0; }
6112EOF
43850d5b 6113if { (eval echo configure:6114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6114 rm -rf conftest*
252b5132
RH
6115 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
6116else
6be7c12c
AO
6117 echo "configure: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6119 rm -rf conftest*
6120 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
6121
252b5132 6122fi
6be7c12c 6123rm -f conftest*
252b5132
RH
6124fi
6125
6126 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
6be7c12c 6127 cat >> confdefs.h <<\EOF
252b5132
RH
6128#define HAVE_LWPSTATUS_T_PR_REG 1
6129EOF
6130
6131 fi
6be7c12c 6132 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
252b5132 6133
6be7c12c 6134 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
43850d5b 6135echo "configure:6136: checking for win32_pstatus_t in sys/procfs.h" >&5
6be7c12c
AO
6136 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
6137 echo $ac_n "(cached) $ac_c" 1>&6
e3c976c4 6138else
6be7c12c 6139 cat > conftest.$ac_ext <<EOF
43850d5b 6140#line 6141 "configure"
e3c976c4 6141#include "confdefs.h"
7ee38065
MS
6142
6143#define _SYSCALL32
e3c976c4 6144#include <sys/procfs.h>
6be7c12c 6145int main() {
e3c976c4 6146win32_pstatus_t avar
6be7c12c
AO
6147; return 0; }
6148EOF
43850d5b 6149if { (eval echo configure:6150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6be7c12c 6150 rm -rf conftest*
e3c976c4
ILT
6151 bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
6152else
6be7c12c
AO
6153 echo "configure: failed program was:" >&5
6154 cat conftest.$ac_ext >&5
6155 rm -rf conftest*
6156 bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
6157
e3c976c4 6158fi
6be7c12c 6159rm -f conftest*
252b5132
RH
6160fi
6161
e3c976c4 6162 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
6be7c12c 6163 cat >> confdefs.h <<\EOF
e3c976c4 6164#define HAVE_WIN32_PSTATUS_T 1
16e9c715
NC
6165EOF
6166
6167 fi
6be7c12c 6168 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
e3c976c4
ILT
6169
6170 fi
6171fi
16e9c715 6172
b3baf5d0 6173
6be7c12c
AO
6174if test -n "$TRAD_HEADER"; then
6175 cat >> confdefs.h <<EOF
252b5132
RH
6176#define TRAD_HEADER $TRAD_HEADER
6177EOF
6178
3f9b03b5 6179fi
252b5132
RH
6180
6181# Horrible hacks to build DLLs on Windows.
6182WIN32LDFLAGS=
6183WIN32LIBADD=
6184case "${host}" in
6185*-*-cygwin*)
6186 if test "$enable_shared" = "yes"; then
6187 WIN32LDFLAGS="-no-undefined"
6188 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
6189 fi
6190 ;;
78be1d6e 6191*-*-linux*)
39691762
L
6192 # We borrow WIN32LIBADD so that the shared libbfd won't depend on
6193 # libiberty.a.
ca51bfff
L
6194 case "${host}" in
6195 mips*-*-linux*)
6196 # Linux/MIPS uses PIC by default.
6197 if test "$enable_shared" = "yes"; then
6198 WIN32LIBADD="-L../libiberty -liberty"
6199 fi
6200 ;;
6201 *)
66e25bab 6202 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
bb2a49f2 6203 if test -n "$x"; then
ca51bfff
L
6204 WIN32LIBADD="-L../libiberty/pic -liberty"
6205 fi
6206 ;;
6207 esac
39691762 6208 ;;
252b5132
RH
6209esac
6210
6be7c12c
AO
6211
6212
252b5132
RH
6213# target stuff:
6214
6215# Canonicalize the secondary target names.
6216if test -n "$enable_targets" ; then
6217 for targ in `echo $enable_targets | sed 's/,/ /g'`
6218 do
6d83c84b 6219 result=`$ac_config_sub $targ 2>/dev/null`
252b5132
RH
6220 if test -n "$result" ; then
6221 canon_targets="$canon_targets $result"
6222 else
6223 # Allow targets that config.sub doesn't recognize, like "all".
6224 canon_targets="$canon_targets $targ"
6225 fi
6226 done
6227fi
6228
6229all_targets=false
6230defvec=
6231selvecs=
08f74004 6232assocvecs=
252b5132
RH
6233selarchs=
6234TDEFINES=
6235for targ in $target $canon_targets
6236do
6237 if test "x$targ" = "xall"; then
6238 all_targets=true
08f74004 6239 assocvecs="$assocvecs $targ_defvec $targ_selvecs"
252b5132
RH
6240 else
6241 . $srcdir/config.bfd
6242 if test "x$targ" = "x$target"; then
6243 defvec=$targ_defvec
6244 fi
6245 selvecs="$selvecs $targ_defvec $targ_selvecs"
6246 selarchs="$selarchs $targ_archs"
6247 TDEFINES="$TDEFINES $targ_cflags"
6248 fi
6249done
6250
6be7c12c 6251
252b5132
RH
6252# This processing still needs to be done if we're to decide properly whether
6253# 64-bit support needs to be compiled in. Currently, it will be included if
6254# the default or any other explicitly requested target requires it; it
6255# will not be included on a 32-bit host if no 64-bit target is requested, and
9eb7245e 6256# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
252b5132
RH
6257# used.
6258
6259# uniq the default and selected vectors in all the configured targets.
6260f=""
6261for i in $selvecs ; do
6262 case " $f " in
6263 *" $i "*) ;;
6264 *) f="$f $i" ;;
6265 esac
6266done
6267selvecs="$f"
6268
6be7c12c 6269
08f74004
AM
6270# uniq the associated vectors in all the configured targets.
6271f=""
6272for i in $assocvecs ; do
6273 case " $f " in
6274 *" $i "*) ;;
6275 *) f="$f $i" ;;
6276 esac
6277done
6278assocvecs="$f"
6279
6280
252b5132
RH
6281# uniq the architectures in all the configured targets.
6282f=""
6283for i in $selarchs ; do
6284 case " $f " in
6285 *" $i "*) ;;
6286 *) f="$f $i" ;;
6287 esac
6288done
6289selarchs="$f"
6290
6291# Target backend .o files.
6292tb=
6293
65765700 6294elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
252b5132
RH
6295
6296for vec in $selvecs
6297do
69263e90 6298 target_size=32
252b5132
RH
6299 case "$vec" in
6300 # This list is alphabetized to make it easy to compare
dc810e39
AM
6301 # with the two vector lists in targets.c. For the same reason,
6302 # use one entry per line, even though this leads to long lines.
252b5132
RH
6303 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
6304 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
341ca622 6305 aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
252b5132
RH
6306 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
6307 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
6308 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
252b5132 6309 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
dc810e39
AM
6310 arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
6311 arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
6312 arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
6313 arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
6314 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
6315 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
6316 armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
6317 armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
6318 armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
6319 armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
6320 armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
252b5132
RH
6321 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
6322 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
fac41780 6323 bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
dc810e39 6324 bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
73c3cd1c 6325 bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
adde6300 6326 bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
dc810e39 6327 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
252b5132 6328 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
252b5132 6329 bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
b6821651 6330 bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
c6e90b02 6331 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
0949843d 6332 bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
06c15ad7 6333 bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
252b5132
RH
6334 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
6335 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
d172d4ba 6336 bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
252b5132 6337 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
4e5ba5b7 6338 bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
43850d5b 6339 bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
e01b0e69 6340 bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
dc810e39
AM
6341 bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
6342 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5b93d8bb 6343 bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
b6821651
AM
6344 bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
6345 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
9d751335 6346 bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
dc810e39 6347 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
b2ef150d 6348 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
dc810e39 6349 bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
fcf12726 6350 bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
cf88bb9f 6351 bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
a75473eb 6352 bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
252b5132 6353 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
dc810e39
AM
6354 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
6355 bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
b6821651 6356 bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
c6e90b02 6357 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
252b5132 6358 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6edf0760
NC
6359 bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6360 bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
6361 bfd_elf32_m32rlelin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
f5a6f915
SC
6362 bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
6363 bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
252b5132
RH
6364 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
6365 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
6366 bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
6367 bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
6368 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
6369 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
2469cfa2 6370 bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
8a397dad
TS
6371 bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6372 bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6373 bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6374 bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
b3baf5d0 6375 bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
3b16e843 6376 bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
0bcb993b
ILT
6377 bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
6378 bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
b6821651
AM
6379 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
6380 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
a85d7ed0 6381 bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
eb1e0e80
NC
6382 # FIXME: We include cofflink.lo not because it's needed for
6383 # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
6384 # which needs it but does not list it. Should be fixed in right place.
9cba27b2
JT
6385 bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6386 bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
2bc3c89a
AM
6387 bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6388 bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
6389 bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
6390 bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
b6821651
AM
6391 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
6392 bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6393 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
6394 bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6395 bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
6396 bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
252b5132 6397 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
c6e90b02
TS
6398 bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
6399 bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
dc810e39 6400 bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
252b5132 6401 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
90ace9e9 6402 bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
93fbbb04 6403 bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
e0001a05
NC
6404 bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
6405 bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
2238051f 6406 bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
dc810e39
AM
6407 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
6408 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02 6409 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
dc810e39
AM
6410 bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
6411 bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
dc810e39 6412 bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
fcf12726 6413 bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
dc810e39
AM
6414 bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6415 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02 6416 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
3c3bdf30 6417 bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
dc810e39
AM
6418 bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
6419 bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
6420 bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
341ca622
AM
6421 bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6422 bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
2bc3c89a
AM
6423 bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6424 bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6425 bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
6426 bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
dc810e39 6427 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
c6e90b02
TS
6428 bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6429 bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
dc810e39 6430 bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
3c3bdf30 6431 bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
dc810e39
AM
6432 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6433 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
6434 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6435 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
06c15ad7 6436 cris_aout_vec) tb="$tb aout-cris.lo" ;;
dc810e39 6437 demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
252b5132 6438 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
252b5132 6439 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
dc810e39
AM
6440 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
6441 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
252b5132
RH
6442 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
6443 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
6444 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
6445 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
6446 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
6447 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
6448 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
6449 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
6450 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
6451 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
6452 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
6453 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
252b5132
RH
6454 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
6455 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
6456 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
6457 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
dc810e39 6458 i386msdos_vec) tb="$tb i386msdos.lo" ;;
252b5132
RH
6459 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
6460 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
dc810e39
AM
6461 i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
6462 i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
252b5132
RH
6463 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
6464 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
6465 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
6466 ieee_vec) tb="$tb ieee.lo" ;;
dc810e39
AM
6467 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
6468 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
252b5132
RH
6469 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
6470 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
6471 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
6472 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
6473 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
6474 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
252b5132
RH
6475 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
6476 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
341ca622 6477 m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
93509525
KD
6478 mach_o_be_vec) tb="$tb mach-o.lo" ;;
6479 mach_o_le_vec) tb="$tb mach-o.lo" ;;
6480 mach_o_fat_vec) tb="$tb mach-o.lo" ;;
277d1b5e
ILT
6481 mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6482 mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6483 mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
6484 mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
dc810e39
AM
6485 mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
6486 mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
252b5132 6487 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
dc810e39 6488 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
252b5132 6489 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
252b5132 6490 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
dc810e39 6491 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
3b16e843 6492 or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;;
252b5132 6493 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
dc810e39 6494 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
93509525
KD
6495 pef_vec) tb="$tb pef.lo" ;;
6496 pef_xlib_vec) tb="$tb pef.lo" ;;
e135f41b 6497 pdp11_aout_vec) tb="$tb pdp11.lo" ;;
6768c14a 6498 pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
252b5132 6499 ppcboot_vec) tb="$tb ppcboot.lo" ;;
dc810e39 6500 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
eb1e0e80 6501 rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
dc810e39 6502 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
252b5132 6503 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
dc810e39 6504 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
252b5132 6505 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
dc810e39 6506 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
60bcf0fa
NC
6507 shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
6508 shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
252b5132 6509 som_vec) tb="$tb som.lo" ;;
dc810e39 6510 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
252b5132
RH
6511 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
6512 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
6513 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
6514 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
6515 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
252b5132 6516 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
93509525 6517 sym_vec) tb="$tb xsym.lo" ;;
252b5132
RH
6518 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
6519 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
026df7c5
NC
6520 tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;;
6521 tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;;
6522 tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;;
6523 tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;;
6524 tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;;
6525 tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;;
81635ce4 6526 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6527 tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
81635ce4 6528 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6529 tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
81635ce4 6530 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
dc810e39 6531 tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
252b5132 6532 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
90ace9e9 6533 vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
3c2bfad6 6534 vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
ba26fd96 6535 vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;;
252b5132 6536 versados_vec) tb="$tb versados.lo" ;;
dc810e39 6537 vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
252b5132
RH
6538 vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
6539 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
6540 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
6541 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
6542
341ca622
AM
6543 # These appear out of order in targets.c
6544 srec_vec) tb="$tb srec.lo" ;;
6545 symbolsrec_vec) tb="$tb srec.lo" ;;
6546 tekhex_vec) tb="$tb tekhex.lo" ;;
6547 cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
6548 cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
6549
252b5132 6550 "") ;;
6be7c12c 6551 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
252b5132 6552 esac
69263e90
AM
6553
6554 if test ${target_size} = 64; then
6555 target64=true
6556 fi
6557 if test x"${vec}" = x"${defvec}"; then
6558 bfd_default_target_size=${target_size}
6559 fi
252b5132
RH
6560done
6561
6562# Target architecture .o files.
6563# A couple of CPUs use shorter file names to avoid problems on DOS
6564# filesystems.
6565ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
6566
6567# Weed out duplicate .o files.
6568f=""
6569for i in $tb ; do
6570 case " $f " in
6571 *" $i "*) ;;
6572 *) f="$f $i" ;;
6573 esac
6574done
6575tb="$f"
6576
6577f=""
6578for i in $ta ; do
6579 case " $f " in
6580 *" $i "*) ;;
6581 *) f="$f $i" ;;
6582 esac
6583done
6584ta="$f"
6585
6586bfd_backends="$tb"
6587bfd_machines="$ta"
6588
6589if test x${all_targets} = xtrue ; then
6590 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
6591 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
6592 selvecs=
6593 havevecs=
6594 selarchs=
08f74004
AM
6595 test -n "$assocvecs" &&
6596 assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
252b5132
RH
6597else # all_targets is true
6598 # Only set these if they will be nonempty, for the clever echo.
6599 havevecs=
08f74004 6600 assocvecs=
252b5132
RH
6601 test -n "$selvecs" &&
6602 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
6603 test -n "$selvecs" &&
6604 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6605 test -n "$selarchs" &&
6606 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6607fi # all_targets is true
6608
6609case ${host64}-${target64}-${want64} in
6610 *true*)
6611 wordsize=64
2858ef35 6612 bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
252b5132 6613 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
ccba357f 6614 if test $BFD_HOST_64_BIT_DEFINED = 0; then
6be7c12c
AO
6615 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
6616 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
252b5132 6617 fi
966abd70
HPN
6618 if test -n "$GCC" ; then
6619 bad_64bit_gcc=no;
6620 echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
43850d5b 6621echo "configure:6622: checking for gcc version with buggy 64-bit support" >&5
966abd70
HPN
6622 # Add more tests for gcc versions with non-working 64-bit support here.
6623 cat > conftest.$ac_ext <<EOF
43850d5b 6624#line 6625 "configure"
966abd70
HPN
6625#include "confdefs.h"
6626:__GNUC__:__GNUC_MINOR__:__i386__:
6627EOF
6628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6629 egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
6630 rm -rf conftest*
6631 bad_64bit_gcc=yes;
6632 echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
6633else
6634 rm -rf conftest*
6635 echo "$ac_t""no" 1>&6
6636fi
6637rm -f conftest*
6638
6639 if test $bad_64bit_gcc = yes ; then
6640 { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
6641 fi
6642 fi
252b5132
RH
6643 ;;
6644 false-false-false)
6645 wordsize=32
2858ef35 6646 bfd_libs='$(BFD32_LIBS)'
252b5132
RH
6647 all_backends='$(BFD32_BACKENDS)'
6648 ;;
6649esac
6650
6be7c12c
AO
6651
6652
6653
6654
6655
69263e90 6656
2858ef35 6657
1012372a
AC
6658# Determine the host dependant file_ptr a.k.a. off_t type. In order
6659# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
6660# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
6661# Hopefully a reasonable assumption since fseeko et.al. should be
6662# upward compatible.
6663for ac_func in ftello ftello64 fseeko fseeko64
6664do
6665echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 6666echo "configure:6667: checking for $ac_func" >&5
1012372a
AC
6667if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6668 echo $ac_n "(cached) $ac_c" 1>&6
6669else
6670 cat > conftest.$ac_ext <<EOF
43850d5b 6671#line 6672 "configure"
1012372a
AC
6672#include "confdefs.h"
6673/* System header to define __stub macros and hopefully few prototypes,
6674 which can conflict with char $ac_func(); below. */
6675#include <assert.h>
6676/* Override any gcc2 internal prototype to avoid an error. */
6677/* We use char because int might match the return type of a gcc2
6678 builtin and then its argument prototype would still apply. */
6679char $ac_func();
6680
6681int main() {
6682
6683/* The GNU C library defines this for functions which it implements
6684 to always fail with ENOSYS. Some functions are actually named
6685 something starting with __ and the normal name is an alias. */
6686#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6687choke me
6688#else
6689$ac_func();
6690#endif
6691
6692; return 0; }
6693EOF
43850d5b 6694if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1012372a
AC
6695 rm -rf conftest*
6696 eval "ac_cv_func_$ac_func=yes"
6697else
6698 echo "configure: failed program was:" >&5
6699 cat conftest.$ac_ext >&5
6700 rm -rf conftest*
6701 eval "ac_cv_func_$ac_func=no"
6702fi
6703rm -f conftest*
6704fi
6705
6706if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6707 echo "$ac_t""yes" 1>&6
6708 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6709 cat >> confdefs.h <<EOF
6710#define $ac_tr_func 1
6711EOF
6712
6713else
6714 echo "$ac_t""no" 1>&6
6715fi
6716done
6717
1012372a
AC
6718if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
6719 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
43850d5b 6720echo "configure:6721: checking size of off_t" >&5
1012372a
AC
6721if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
6722 echo $ac_n "(cached) $ac_c" 1>&6
6723else
6724 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
6725 cat > conftest.$ac_ext <<EOF
43850d5b 6726#line 6727 "configure"
1012372a
AC
6727#include "confdefs.h"
6728#include "confdefs.h"
6729#include <sys/types.h>
6730
6731
6732int main() {
6733switch (0) case 0: case (sizeof (off_t) == $ac_size):;
6734; return 0; }
6735EOF
43850d5b 6736if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1012372a
AC
6737 rm -rf conftest*
6738 ac_cv_sizeof_off_t=$ac_size
6739else
6740 echo "configure: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742fi
6743rm -f conftest*
6744 if test x$ac_cv_sizeof_off_t != x ; then break; fi
6745done
6746
6747fi
6748
6749if test x$ac_cv_sizeof_off_t = x ; then
6750 { echo "configure: error: cannot determine a size for off_t" 1>&2; exit 1; }
6751fi
6752echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
6753cat >> confdefs.h <<EOF
6754#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
6755EOF
6756
6757
1012372a 6758fi
ccba357f 6759echo $ac_n "checking file_ptr type""... $ac_c" 1>&6
43850d5b 6760echo "configure:6761: checking file_ptr type" >&5
ccba357f
AM
6761bfd_file_ptr="long"
6762bfd_ufile_ptr="unsigned long"
6763if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
6764 -o x"${ac_cv_sizeof_off_t}" = x8; then
1012372a
AC
6765 bfd_file_ptr=BFD_HOST_64_BIT
6766 bfd_ufile_ptr=BFD_HOST_U_64_BIT
6767fi
6768echo "$ac_t""$bfd_file_ptr" 1>&6
6769
6770
6771
6772
252b5132
RH
6773tdefaults=""
6774test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
6775test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
08f74004 6776test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
252b5132
RH
6777test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
6778test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
6779
6be7c12c 6780
43850d5b 6781for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
252b5132 6782do
6be7c12c
AO
6783ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6784echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
43850d5b 6785echo "configure:6786: checking for $ac_hdr" >&5
6be7c12c
AO
6786if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6787 echo $ac_n "(cached) $ac_c" 1>&6
6788else
6789 cat > conftest.$ac_ext <<EOF
43850d5b 6790#line 6791 "configure"
252b5132 6791#include "confdefs.h"
6be7c12c
AO
6792#include <$ac_hdr>
6793EOF
6794ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
43850d5b 6795{ (eval echo configure:6796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6be7c12c
AO
6796ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6797if test -z "$ac_err"; then
6798 rm -rf conftest*
6799 eval "ac_cv_header_$ac_safe=yes"
252b5132 6800else
6be7c12c
AO
6801 echo "$ac_err" >&5
6802 echo "configure: failed program was:" >&5
252b5132 6803 cat conftest.$ac_ext >&5
6be7c12c
AO
6804 rm -rf conftest*
6805 eval "ac_cv_header_$ac_safe=no"
252b5132 6806fi
6be7c12c 6807rm -f conftest*
252b5132 6808fi
6be7c12c
AO
6809if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6810 echo "$ac_t""yes" 1>&6
6811 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6812 cat >> confdefs.h <<EOF
6813#define $ac_tr_hdr 1
252b5132 6814EOF
6be7c12c
AO
6815
6816else
6817 echo "$ac_t""no" 1>&6
252b5132
RH
6818fi
6819done
6820
6821for ac_func in getpagesize
6822do
6be7c12c 6823echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 6824echo "configure:6825: checking for $ac_func" >&5
6be7c12c
AO
6825if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6826 echo $ac_n "(cached) $ac_c" 1>&6
6827else
6828 cat > conftest.$ac_ext <<EOF
43850d5b 6829#line 6830 "configure"
252b5132
RH
6830#include "confdefs.h"
6831/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 6832 which can conflict with char $ac_func(); below. */
252b5132
RH
6833#include <assert.h>
6834/* Override any gcc2 internal prototype to avoid an error. */
6835/* We use char because int might match the return type of a gcc2
6be7c12c
AO
6836 builtin and then its argument prototype would still apply. */
6837char $ac_func();
6838
6839int main() {
252b5132
RH
6840
6841/* The GNU C library defines this for functions which it implements
6842 to always fail with ENOSYS. Some functions are actually named
6843 something starting with __ and the normal name is an alias. */
6844#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6845choke me
6846#else
6be7c12c 6847$ac_func();
252b5132
RH
6848#endif
6849
6be7c12c 6850; return 0; }
252b5132 6851EOF
43850d5b 6852if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
6853 rm -rf conftest*
6854 eval "ac_cv_func_$ac_func=yes"
6855else
6856 echo "configure: failed program was:" >&5
6857 cat conftest.$ac_ext >&5
6858 rm -rf conftest*
6859 eval "ac_cv_func_$ac_func=no"
6860fi
6861rm -f conftest*
6862fi
252b5132 6863
6be7c12c
AO
6864if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6865 echo "$ac_t""yes" 1>&6
6866 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6867 cat >> confdefs.h <<EOF
6868#define $ac_tr_func 1
6869EOF
6870
6871else
6872 echo "$ac_t""no" 1>&6
252b5132
RH
6873fi
6874done
6875
6be7c12c 6876echo $ac_n "checking for working mmap""... $ac_c" 1>&6
43850d5b 6877echo "configure:6878: checking for working mmap" >&5
6be7c12c
AO
6878if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6879 echo $ac_n "(cached) $ac_c" 1>&6
252b5132
RH
6880else
6881 if test "$cross_compiling" = yes; then
6882 ac_cv_func_mmap_fixed_mapped=no
6883else
6be7c12c 6884 cat > conftest.$ac_ext <<EOF
43850d5b 6885#line 6886 "configure"
252b5132 6886#include "confdefs.h"
6be7c12c 6887
252b5132
RH
6888/* Thanks to Mike Haertel and Jim Avera for this test.
6889 Here is a matrix of mmap possibilities:
6890 mmap private not fixed
6891 mmap private fixed at somewhere currently unmapped
6892 mmap private fixed at somewhere already mapped
6893 mmap shared not fixed
6894 mmap shared fixed at somewhere currently unmapped
6895 mmap shared fixed at somewhere already mapped
6896 For private mappings, we should verify that changes cannot be read()
6897 back from the file, nor mmap's back from the file at a different
6898 address. (There have been systems where private was not correctly
6899 implemented like the infamous i386 svr4.0, and systems where the
6be7c12c 6900 VM page cache was not coherent with the filesystem buffer cache
252b5132
RH
6901 like early versions of FreeBSD and possibly contemporary NetBSD.)
6902 For shared mappings, we should conversely verify that changes get
6903 propogated back to all the places they're supposed to be.
6904
6905 Grep wants private fixed already mapped.
6906 The main things grep needs to know about mmap are:
6907 * does it exist and is it safe to write into the mmap'd area
6908 * how to use it (BSD variants) */
6909#include <sys/types.h>
6910#include <fcntl.h>
6911#include <sys/mman.h>
6912
43850d5b
AO
6913#if HAVE_SYS_TYPES_H
6914# include <sys/types.h>
6915#endif
6916
6917#if HAVE_STDLIB_H
6918# include <stdlib.h>
6919#endif
6920
6921#if HAVE_SYS_STAT_H
6922# include <sys/stat.h>
6923#endif
6924
6925#if HAVE_UNISTD_H
6926# include <unistd.h>
6927#endif
6928
b3baf5d0 6929/* This mess was copied from the GNU getpagesize.h. */
6be7c12c 6930#ifndef HAVE_GETPAGESIZE
6be7c12c 6931
252b5132 6932/* Assume that all systems that can run configure have sys/param.h. */
6be7c12c 6933# ifndef HAVE_SYS_PARAM_H
252b5132
RH
6934# define HAVE_SYS_PARAM_H 1
6935# endif
6936
6937# ifdef _SC_PAGESIZE
6938# define getpagesize() sysconf(_SC_PAGESIZE)
6939# else /* no _SC_PAGESIZE */
6be7c12c 6940# ifdef HAVE_SYS_PARAM_H
252b5132
RH
6941# include <sys/param.h>
6942# ifdef EXEC_PAGESIZE
6943# define getpagesize() EXEC_PAGESIZE
6944# else /* no EXEC_PAGESIZE */
6945# ifdef NBPG
6946# define getpagesize() NBPG * CLSIZE
6947# ifndef CLSIZE
6948# define CLSIZE 1
6949# endif /* no CLSIZE */
6950# else /* no NBPG */
6951# ifdef NBPC
6952# define getpagesize() NBPC
6953# else /* no NBPC */
6954# ifdef PAGESIZE
6955# define getpagesize() PAGESIZE
6956# endif /* PAGESIZE */
6957# endif /* no NBPC */
6958# endif /* no NBPG */
6959# endif /* no EXEC_PAGESIZE */
6960# else /* no HAVE_SYS_PARAM_H */
6961# define getpagesize() 8192 /* punt totally */
6962# endif /* no HAVE_SYS_PARAM_H */
6963# endif /* no _SC_PAGESIZE */
6964
6965#endif /* no HAVE_GETPAGESIZE */
6966
6be7c12c
AO
6967#ifdef __cplusplus
6968extern "C" { void *malloc(unsigned); }
6969#else
6970char *malloc();
6971#endif
6972
252b5132 6973int
6be7c12c 6974main()
252b5132 6975{
6be7c12c
AO
6976 char *data, *data2, *data3;
6977 int i, pagesize;
6978 int fd;
6979
6980 pagesize = getpagesize();
6981
6982 /*
6983 * First, make a file with some known garbage in it.
6984 */
6985 data = malloc(pagesize);
6986 if (!data)
6987 exit(1);
6988 for (i = 0; i < pagesize; ++i)
6989 *(data + i) = rand();
6990 umask(0);
6991 fd = creat("conftestmmap", 0600);
6992 if (fd < 0)
6993 exit(1);
6994 if (write(fd, data, pagesize) != pagesize)
6995 exit(1);
6996 close(fd);
6997
6998 /*
6999 * Next, try to mmap the file at a fixed address which
7000 * already has something else allocated at it. If we can,
7001 * also make sure that we see the same garbage.
7002 */
7003 fd = open("conftestmmap", O_RDWR);
7004 if (fd < 0)
7005 exit(1);
7006 data2 = malloc(2 * pagesize);
7007 if (!data2)
7008 exit(1);
7009 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7010 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
7011 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7012 exit(1);
7013 for (i = 0; i < pagesize; ++i)
7014 if (*(data + i) != *(data2 + i))
7015 exit(1);
7016
7017 /*
7018 * Finally, make sure that changes to the mapped area
7019 * do not percolate back to the file as seen by read().
7020 * (This is a bug on some variants of i386 svr4.0.)
7021 */
7022 for (i = 0; i < pagesize; ++i)
7023 *(data2 + i) = *(data2 + i) + 1;
7024 data3 = malloc(pagesize);
7025 if (!data3)
7026 exit(1);
7027 if (read(fd, data3, pagesize) != pagesize)
7028 exit(1);
7029 for (i = 0; i < pagesize; ++i)
7030 if (*(data + i) != *(data3 + i))
7031 exit(1);
7032 close(fd);
7033 unlink("conftestmmap");
7034 exit(0);
252b5132 7035}
6be7c12c
AO
7036
7037EOF
43850d5b 7038if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6be7c12c 7039then
252b5132
RH
7040 ac_cv_func_mmap_fixed_mapped=yes
7041else
6be7c12c
AO
7042 echo "configure: failed program was:" >&5
7043 cat conftest.$ac_ext >&5
7044 rm -fr conftest*
7045 ac_cv_func_mmap_fixed_mapped=no
252b5132 7046fi
6be7c12c 7047rm -fr conftest*
252b5132 7048fi
6be7c12c 7049
252b5132 7050fi
b3baf5d0 7051
6be7c12c
AO
7052echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
7053if test $ac_cv_func_mmap_fixed_mapped = yes; then
7054 cat >> confdefs.h <<\EOF
252b5132
RH
7055#define HAVE_MMAP 1
7056EOF
7057
7058fi
7059
7060for ac_func in madvise mprotect
7061do
6be7c12c 7062echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
43850d5b 7063echo "configure:7064: checking for $ac_func" >&5
6be7c12c
AO
7064if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7065 echo $ac_n "(cached) $ac_c" 1>&6
7066else
7067 cat > conftest.$ac_ext <<EOF
43850d5b 7068#line 7069 "configure"
252b5132
RH
7069#include "confdefs.h"
7070/* System header to define __stub macros and hopefully few prototypes,
6be7c12c 7071 which can conflict with char $ac_func(); below. */
252b5132
RH
7072#include <assert.h>
7073/* Override any gcc2 internal prototype to avoid an error. */
7074/* We use char because int might match the return type of a gcc2
6be7c12c
AO
7075 builtin and then its argument prototype would still apply. */
7076char $ac_func();
7077
7078int main() {
252b5132
RH
7079
7080/* The GNU C library defines this for functions which it implements
7081 to always fail with ENOSYS. Some functions are actually named
7082 something starting with __ and the normal name is an alias. */
7083#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7084choke me
7085#else
6be7c12c 7086$ac_func();
252b5132
RH
7087#endif
7088
6be7c12c 7089; return 0; }
252b5132 7090EOF
43850d5b 7091if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6be7c12c
AO
7092 rm -rf conftest*
7093 eval "ac_cv_func_$ac_func=yes"
7094else
7095 echo "configure: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 rm -rf conftest*
7098 eval "ac_cv_func_$ac_func=no"
7099fi
7100rm -f conftest*
7101fi
252b5132 7102
6be7c12c
AO
7103if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7104 echo "$ac_t""yes" 1>&6
7105 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7106 cat >> confdefs.h <<EOF
7107#define $ac_tr_func 1
7108EOF
7109
7110else
7111 echo "$ac_t""no" 1>&6
252b5132
RH
7112fi
7113done
7114
7115case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
6be7c12c 7116 true+yes ) cat >> confdefs.h <<\EOF
252b5132
RH
7117#define USE_MMAP 1
7118EOF
7119 ;;
7120esac
7121
7122rm -f doc/config.status
6be7c12c
AO
7123trap '' 1 2 15
7124cat > confcache <<\EOF
252b5132
RH
7125# This file is a shell script that caches the results of configure
7126# tests run on this system so they can be shared between configure
6be7c12c
AO
7127# scripts and configure runs. It is not useful on other systems.
7128# If it contains results you don't want to keep, you may remove or edit it.
252b5132 7129#
6be7c12c
AO
7130# By default, configure uses ./config.cache as the cache file,
7131# creating it if it does not exist already. You can give configure
7132# the --cache-file=FILE option to use a different cache file; that is
7133# what configure does when it calls configure scripts in
7134# subdirectories, so they share the cache.
7135# Giving --cache-file=/dev/null disables caching, for debugging configure.
7136# config.status only pays attention to the cache file if you give it the
7137# --recheck option to rerun configure.
252b5132 7138#
6be7c12c 7139EOF
252b5132
RH
7140# The following way of writing the cache mishandles newlines in values,
7141# but we know of no workaround that is simple, portable, and efficient.
7142# So, don't put newlines in cache variables' values.
7143# Ultrix sh set writes to stderr and can't be redirected directly,
7144# and sets the high bit in the cache file unless we assign to the vars.
6be7c12c
AO
7145(set) 2>&1 |
7146 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7147 *ac_space=\ *)
7148 # `set' does not quote correctly, so add quotes (double-quote substitution
7149 # turns \\\\ into \\, and sed turns \\ into \).
7150 sed -n \
7151 -e "s/'/'\\\\''/g" \
7152 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7153 ;;
7154 *)
7155 # `set' quotes correctly as required by POSIX, so do not add quotes.
7156 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7157 ;;
7158 esac >> confcache
7159if cmp -s $cache_file confcache; then
7160 :
7161else
252b5132 7162 if test -w $cache_file; then
6be7c12c
AO
7163 echo "updating cache $cache_file"
7164 cat confcache > $cache_file
252b5132
RH
7165 else
7166 echo "not updating unwritable cache $cache_file"
7167 fi
7168fi
7169rm -f confcache
7170
6be7c12c
AO
7171trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7172
252b5132
RH
7173test "x$prefix" = xNONE && prefix=$ac_default_prefix
7174# Let make expand exec_prefix.
7175test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7176
6be7c12c
AO
7177# Any assignment to VPATH causes Sun make to only execute
7178# the first set of double-colon rules, so remove it if not needed.
7179# If there is a colon in the path, we need to keep it.
252b5132 7180if test "x$srcdir" = x.; then
6be7c12c 7181 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
252b5132
RH
7182fi
7183
6be7c12c
AO
7184trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7185
252b5132
RH
7186DEFS=-DHAVE_CONFIG_H
7187
6be7c12c 7188# Without the "./", some shells look in PATH for config.status.
252b5132 7189: ${CONFIG_STATUS=./config.status}
6be7c12c
AO
7190
7191echo creating $CONFIG_STATUS
7192rm -f $CONFIG_STATUS
7193cat > $CONFIG_STATUS <<EOF
7194#! /bin/sh
252b5132
RH
7195# Generated automatically by configure.
7196# Run this file to recreate the current configuration.
6be7c12c
AO
7197# This directory was configured as follows,
7198# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7199#
7200# $0 $ac_configure_args
7201#
252b5132 7202# Compiler output produced by configure, useful for debugging
6be7c12c 7203# configure, is in ./config.log if it exists.
b3baf5d0 7204
6be7c12c
AO
7205ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7206for ac_option
252b5132 7207do
6be7c12c 7208 case "\$ac_option" in
252b5132 7209 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6be7c12c
AO
7210 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7211 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7212 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7213 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7214 exit 0 ;;
7215 -help | --help | --hel | --he | --h)
7216 echo "\$ac_cs_usage"; exit 0 ;;
7217 *) echo "\$ac_cs_usage"; exit 1 ;;
252b5132
RH
7218 esac
7219done
7220
6be7c12c
AO
7221ac_given_srcdir=$srcdir
7222ac_given_INSTALL="$INSTALL"
b3baf5d0 7223
6a0735ef 7224trap '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 7225EOF
6be7c12c 7226cat >> $CONFIG_STATUS <<EOF
b3baf5d0 7227
6be7c12c
AO
7228# Protect against being on the right side of a sed subst in config.status.
7229sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7230 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7231$ac_vpsub
7232$extrasub
7233s%@SHELL@%$SHELL%g
7234s%@CFLAGS@%$CFLAGS%g
7235s%@CPPFLAGS@%$CPPFLAGS%g
7236s%@CXXFLAGS@%$CXXFLAGS%g
7237s%@FFLAGS@%$FFLAGS%g
7238s%@DEFS@%$DEFS%g
7239s%@LDFLAGS@%$LDFLAGS%g
7240s%@LIBS@%$LIBS%g
7241s%@exec_prefix@%$exec_prefix%g
7242s%@prefix@%$prefix%g
7243s%@program_transform_name@%$program_transform_name%g
7244s%@bindir@%$bindir%g
7245s%@sbindir@%$sbindir%g
7246s%@libexecdir@%$libexecdir%g
7247s%@datadir@%$datadir%g
7248s%@sysconfdir@%$sysconfdir%g
7249s%@sharedstatedir@%$sharedstatedir%g
7250s%@localstatedir@%$localstatedir%g
7251s%@libdir@%$libdir%g
7252s%@includedir@%$includedir%g
7253s%@oldincludedir@%$oldincludedir%g
7254s%@infodir@%$infodir%g
7255s%@mandir@%$mandir%g
7256s%@host@%$host%g
7257s%@host_alias@%$host_alias%g
7258s%@host_cpu@%$host_cpu%g
7259s%@host_vendor@%$host_vendor%g
7260s%@host_os@%$host_os%g
7261s%@target@%$target%g
7262s%@target_alias@%$target_alias%g
7263s%@target_cpu@%$target_cpu%g
7264s%@target_vendor@%$target_vendor%g
7265s%@target_os@%$target_os%g
7266s%@build@%$build%g
7267s%@build_alias@%$build_alias%g
7268s%@build_cpu@%$build_cpu%g
7269s%@build_vendor@%$build_vendor%g
7270s%@build_os@%$build_os%g
6be7c12c
AO
7271s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7272s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7273s%@INSTALL_DATA@%$INSTALL_DATA%g
7274s%@PACKAGE@%$PACKAGE%g
7275s%@VERSION@%$VERSION%g
7276s%@ACLOCAL@%$ACLOCAL%g
7277s%@AUTOCONF@%$AUTOCONF%g
7278s%@AUTOMAKE@%$AUTOMAKE%g
7279s%@AUTOHEADER@%$AUTOHEADER%g
7280s%@MAKEINFO@%$MAKEINFO%g
7281s%@SET_MAKE@%$SET_MAKE%g
e43d48cc 7282s%@bfd_version@%$bfd_version%g
e43d48cc 7283s%@bfd_version_string@%$bfd_version_string%g
6be7c12c
AO
7284s%@AR@%$AR%g
7285s%@RANLIB@%$RANLIB%g
c5d1701e 7286s%@CC@%$CC%g
6be7c12c
AO
7287s%@LN_S@%$LN_S%g
7288s%@OBJEXT@%$OBJEXT%g
7289s%@EXEEXT@%$EXEEXT%g
7290s%@STRIP@%$STRIP%g
7291s%@LIBTOOL@%$LIBTOOL%g
7292s%@WARN_CFLAGS@%$WARN_CFLAGS%g
7293s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7294s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7295s%@MAINT@%$MAINT%g
a703a6ea
AM
7296s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
7297s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
7298s%@bfdlibdir@%$bfdlibdir%g
7299s%@bfdincludedir@%$bfdincludedir%g
6be7c12c
AO
7300s%@CPP@%$CPP%g
7301s%@ALLOCA@%$ALLOCA%g
7302s%@USE_NLS@%$USE_NLS%g
7303s%@MSGFMT@%$MSGFMT%g
7304s%@GMSGFMT@%$GMSGFMT%g
7305s%@XGETTEXT@%$XGETTEXT%g
7306s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7307s%@CATALOGS@%$CATALOGS%g
7308s%@CATOBJEXT@%$CATOBJEXT%g
7309s%@DATADIRNAME@%$DATADIRNAME%g
7310s%@GMOFILES@%$GMOFILES%g
7311s%@INSTOBJEXT@%$INSTOBJEXT%g
7312s%@INTLDEPS@%$INTLDEPS%g
7313s%@INTLLIBS@%$INTLLIBS%g
7314s%@INTLOBJS@%$INTLOBJS%g
7315s%@POFILES@%$POFILES%g
7316s%@POSUB@%$POSUB%g
7317s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7318s%@GT_NO@%$GT_NO%g
7319s%@GT_YES@%$GT_YES%g
7320s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7321s%@l@%$l%g
7322s%@HDEFINES@%$HDEFINES%g
7323s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
ec317fb1 7324s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g
6be7c12c
AO
7325s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
7326s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
7327s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
7328s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
7329s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
7330s%@COREFILE@%$COREFILE%g
7331s%@COREFLAG@%$COREFLAG%g
7332s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
7333s%@WIN32LIBADD@%$WIN32LIBADD%g
7334s%@TDEFINES@%$TDEFINES%g
7335s%@wordsize@%$wordsize%g
2858ef35 7336s%@bfd_libs@%$bfd_libs%g
6be7c12c
AO
7337s%@all_backends@%$all_backends%g
7338s%@bfd_backends@%$bfd_backends%g
7339s%@bfd_machines@%$bfd_machines%g
69263e90 7340s%@bfd_default_target_size@%$bfd_default_target_size%g
1012372a
AC
7341s%@bfd_file_ptr@%$bfd_file_ptr%g
7342s%@bfd_ufile_ptr@%$bfd_ufile_ptr%g
6be7c12c 7343s%@tdefaults@%$tdefaults%g
b3baf5d0 7344
252b5132
RH
7345CEOF
7346EOF
7347
6be7c12c
AO
7348cat >> $CONFIG_STATUS <<\EOF
7349
7350# Split the substitutions into bite-sized pieces for seds with
7351# small command number limits, like on Digital OSF/1 and HP-UX.
dc810e39 7352ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6be7c12c
AO
7353ac_file=1 # Number of current file.
7354ac_beg=1 # First line for current file.
7355ac_end=$ac_max_sed_cmds # Line after last line for current file.
7356ac_more_lines=:
7357ac_sed_cmds=""
7358while $ac_more_lines; do
7359 if test $ac_beg -gt 1; then
7360 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7361 else
7362 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7363 fi
7364 if test ! -s conftest.s$ac_file; then
7365 ac_more_lines=false
7366 rm -f conftest.s$ac_file
7367 else
7368 if test -z "$ac_sed_cmds"; then
7369 ac_sed_cmds="sed -f conftest.s$ac_file"
252b5132 7370 else
6be7c12c 7371 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
252b5132 7372 fi
6be7c12c
AO
7373 ac_file=`expr $ac_file + 1`
7374 ac_beg=$ac_end
7375 ac_end=`expr $ac_end + $ac_max_sed_cmds`
252b5132 7376 fi
6be7c12c
AO
7377done
7378if test -z "$ac_sed_cmds"; then
7379 ac_sed_cmds=cat
7380fi
7381EOF
7382
7383cat >> $CONFIG_STATUS <<EOF
252b5132 7384
6a0735ef 7385CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
252b5132 7386EOF
6be7c12c
AO
7387cat >> $CONFIG_STATUS <<\EOF
7388for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
252b5132 7389 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6be7c12c
AO
7390 case "$ac_file" in
7391 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7392 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7393 *) ac_file_in="${ac_file}.in" ;;
252b5132
RH
7394 esac
7395
6be7c12c 7396 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
b3baf5d0 7397
6be7c12c
AO
7398 # Remove last slash and all that follows it. Not all systems have dirname.
7399 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7400 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7401 # The file is in a subdirectory.
7402 test ! -d "$ac_dir" && mkdir "$ac_dir"
7403 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
252b5132 7404 # A "../" for each directory in $ac_dir_suffix.
6be7c12c 7405 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
252b5132
RH
7406 else
7407 ac_dir_suffix= ac_dots=
7408 fi
7409
6be7c12c
AO
7410 case "$ac_given_srcdir" in
7411 .) srcdir=.
7412 if test -z "$ac_dots"; then top_srcdir=.
7413 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7414 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
252b5132 7415 *) # Relative path.
6be7c12c
AO
7416 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7417 top_srcdir="$ac_dots$ac_given_srcdir" ;;
252b5132
RH
7418 esac
7419
6be7c12c
AO
7420 case "$ac_given_INSTALL" in
7421 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7422 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
252b5132
RH
7423 esac
7424
6be7c12c
AO
7425 echo creating "$ac_file"
7426 rm -f "$ac_file"
7427 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7428 case "$ac_file" in
7429 *Makefile*) ac_comsub="1i\\
7430# $configure_input" ;;
7431 *) ac_comsub= ;;
7432 esac
252b5132 7433
6be7c12c
AO
7434 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7435 sed -e "$ac_comsub
7436s%@configure_input@%$configure_input%g
7437s%@srcdir@%$srcdir%g
7438s%@top_srcdir@%$top_srcdir%g
7439s%@INSTALL@%$INSTALL%g
7440" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7441fi; done
7442rm -f conftest.s*
252b5132
RH
7443
7444# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7445# NAME is the cpp macro being defined and VALUE is the value it is being given.
7446#
7447# ac_d sets the value in "#define NAME VALUE" lines.
6be7c12c
AO
7448ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7449ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7450ac_dC='\3'
7451ac_dD='%g'
7452# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7453ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7454ac_uB='\([ ]\)%\1#\2define\3'
252b5132 7455ac_uC=' '
6be7c12c
AO
7456ac_uD='\4%g'
7457# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7458ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7459ac_eB='$%\1#\2define\3'
7460ac_eC=' '
7461ac_eD='%g'
7462
7463if test "${CONFIG_HEADERS+set}" != set; then
7464EOF
7465cat >> $CONFIG_STATUS <<EOF
7466 CONFIG_HEADERS="config.h:config.in"
7467EOF
7468cat >> $CONFIG_STATUS <<\EOF
7469fi
7470for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
252b5132 7471 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6be7c12c
AO
7472 case "$ac_file" in
7473 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7474 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7475 *) ac_file_in="${ac_file}.in" ;;
252b5132
RH
7476 esac
7477
6be7c12c
AO
7478 echo creating $ac_file
7479
7480 rm -f conftest.frag conftest.in conftest.out
7481 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7482 cat $ac_file_inputs > conftest.in
7483
7484EOF
7485
7486# Transform confdefs.h into a sed script conftest.vals that substitutes
7487# the proper values into config.h.in to produce config.h. And first:
7488# Protect against being on the right side of a sed subst in config.status.
7489# Protect against being in an unquoted here document in config.status.
7490rm -f conftest.vals
7491cat > conftest.hdr <<\EOF
7492s/[\\&%]/\\&/g
7493s%[\\$`]%\\&%g
7494s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7495s%ac_d%ac_u%gp
7496s%ac_u%ac_e%gp
7497EOF
7498sed -n -f conftest.hdr confdefs.h > conftest.vals
7499rm -f conftest.hdr
252b5132
RH
7500
7501# This sed command replaces #undef with comments. This is necessary, for
7502# example, in the case of _POSIX_SOURCE, which is predefined and required
7503# on some systems where configure will not decide to define it.
6be7c12c
AO
7504cat >> conftest.vals <<\EOF
7505s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
252b5132
RH
7506EOF
7507
6be7c12c
AO
7508# Break up conftest.vals because some shells have a limit on
7509# the size of here documents, and old seds have small limits too.
252b5132
RH
7510
7511rm -f conftest.tail
6be7c12c 7512while :
252b5132 7513do
6be7c12c
AO
7514 ac_lines=`grep -c . conftest.vals`
7515 # grep -c gives empty output for an empty file on some AIX systems.
7516 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7517 # Write a limited-size here document to conftest.frag.
7518 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7519 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
252b5132 7520 echo 'CEOF
6be7c12c
AO
7521 sed -f conftest.frag conftest.in > conftest.out
7522 rm -f conftest.in
7523 mv conftest.out conftest.in
7524' >> $CONFIG_STATUS
7525 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7526 rm -f conftest.vals
7527 mv conftest.tail conftest.vals
252b5132 7528done
6be7c12c
AO
7529rm -f conftest.vals
7530
7531cat >> $CONFIG_STATUS <<\EOF
7532 rm -f conftest.frag conftest.h
7533 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7534 cat conftest.in >> conftest.h
7535 rm -f conftest.in
7536 if cmp -s $ac_file conftest.h 2>/dev/null; then
7537 echo "$ac_file is unchanged"
7538 rm -f conftest.h
252b5132 7539 else
6be7c12c
AO
7540 # Remove last slash and all that follows it. Not all systems have dirname.
7541 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
252b5132 7542 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6be7c12c
AO
7543 # The file is in a subdirectory.
7544 test ! -d "$ac_dir" && mkdir "$ac_dir"
252b5132 7545 fi
6be7c12c
AO
7546 rm -f $ac_file
7547 mv conftest.h $ac_file
252b5132 7548 fi
6be7c12c 7549fi; done
252b5132
RH
7550
7551EOF
6be7c12c 7552cat >> $CONFIG_STATUS <<EOF
b3baf5d0 7553
b3baf5d0 7554
6be7c12c
AO
7555EOF
7556cat >> $CONFIG_STATUS <<\EOF
7557test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
7558sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
7559exit 0
252b5132
RH
7560EOF
7561chmod +x $CONFIG_STATUS
6be7c12c
AO
7562rm -fr confdefs* $ac_clean_files
7563test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
252b5132 7564
55c80943 7565
This page took 0.745053 seconds and 4 git commands to generate.