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