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