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