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