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