source: trunk/src/binutils/bfd/configure@ 106

Last change on this file since 106 was 106, checked in by bird, 22 years ago

Regenerated.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 160.5 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
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]"
18ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22ac_help="$ac_help
23 --disable-libtool-lock avoid locking (might break parallel builds)"
24ac_help="$ac_help
25 --with-pic try to use only PIC/non-PIC objects [default=use both]"
26ac_help="$ac_help
27 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
28ac_help="$ac_help
29 --enable-targets alternative target configurations"
30ac_help="$ac_help
31 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
32ac_help="$ac_help
33 --with-mmap try using mmap for BFD input files if available"
34ac_help="$ac_help
35 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
36ac_help="$ac_help
37 --enable-maintainer-mode enable make rules and dependencies not useful
38 (and sometimes confusing) to the casual installer"
39
40# Initialize some variables set by options.
41# The variables have the same names as the options, with
42# dashes changed to underlines.
43build=NONE
44cache_file=./config.cache
45exec_prefix=NONE
46host=NONE
47no_create=
48nonopt=NONE
49no_recursion=
50prefix=NONE
51program_prefix=NONE
52program_suffix=NONE
53program_transform_name=s,x,x,
54silent=
55site=
56srcdir=
57target=NONE
58verbose=
59x_includes=NONE
60x_libraries=NONE
61bindir='${exec_prefix}/bin'
62sbindir='${exec_prefix}/sbin'
63libexecdir='${exec_prefix}/libexec'
64datadir='${prefix}/share'
65sysconfdir='${prefix}/etc'
66sharedstatedir='${prefix}/com'
67localstatedir='${prefix}/var'
68libdir='${exec_prefix}/lib'
69includedir='${prefix}/include'
70oldincludedir='/usr/include'
71infodir='${prefix}/info'
72mandir='${prefix}/man'
73
74# Initialize some other variables.
75subdirs=
76MFLAGS= MAKEFLAGS=
77SHELL=${CONFIG_SHELL-/bin/sh}
78# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
80
81ac_prev=
82for ac_option
83do
84
85 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
90 fi
91
92 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
97 # Accept the important Cygnus configure options, so we can diagnose typos.
98
99 case "$ac_option" in
100
101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
107 ac_prev=build ;;
108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
109 build="$ac_optarg" ;;
110
111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
126 # Reject names that are not valid shell variable names.
127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
135 # Reject names that are not valid shell variable names.
136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
158
159 -help | --help | --hel | --he)
160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
162 cat << EOF
163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 [same as prefix]
176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
208EOF
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
268
269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
361 echo "configure generated by autoconf version 2.13"
362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
379 # Reject names that are not valid shell variable names.
380 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
385
386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
405 ;;
406
407 *)
408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
409 echo "configure: warning: $ac_option: invalid host type" 1>&2
410 fi
411 if test "x$nonopt" != xNONE; then
412 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
418done
419
420if test -n "$ac_prev"; then
421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422fi
423
424trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425
426# File descriptor usage:
427# 0 standard input
428# 1 file creation
429# 2 errors and warnings
430# 3 some systems may open it to /dev/tty
431# 4 used on the Kubota Titan
432# 6 checking for... messages and results
433# 5 compiler messages saved in config.log
434if test "$silent" = yes; then
435 exec 6>/dev/null
436else
437 exec 6>&1
438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running configure, to aid debugging if configure makes a mistake.
444" 1>&5
445
446# Strip out --no-create and --no-recursion so they do not pile up.
447# Also quote any args containing shell metacharacters.
448ac_configure_args=
449for ac_arg
450do
451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459 esac
460done
461
462# NLS nuisances.
463# Only set these to C if already set. These must not be set unconditionally
464# because not all systems understand e.g. LANG=C (notably SCO).
465# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466# Non-C LC_CTYPE values break the ctype check.
467if test "${LANG+set}" = set; then LANG=C; export LANG; fi
468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
471
472# confdefs.h avoids OS command line length limits that DEFS can exceed.
473rm -rf conftest* confdefs.h
474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > confdefs.h
476
477# A filename unique to this package, relative to the directory that
478# configure is in, which we can look for to find out if srcdir is correct.
479ac_unique_file=libbfd.c
480
481# Find the source files, if location was not specified.
482if test -z "$srcdir"; then
483 ac_srcdir_defaulted=yes
484 # Try the directory containing this script, then its parent.
485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
490 srcdir=..
491 fi
492else
493 ac_srcdir_defaulted=no
494fi
495if test ! -r $srcdir/$ac_unique_file; then
496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498 else
499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
500 fi
501fi
502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511fi
512for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517done
518
519if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522else
523 echo "creating cache $cache_file"
524 > $cache_file
525fi
526
527ac_ext=c
528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529ac_cpp='$CPP $CPPFLAGS'
530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532cross_compiling=$ac_cv_prog_cc_cross
533
534ac_exeext=
535ac_objext=o
536if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
537 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
538 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
539 ac_n= ac_c='
540' ac_t=' '
541 else
542 ac_n=-n ac_c= ac_t=
543 fi
544else
545 ac_n= ac_c='\c' ac_t=
546fi
547
548echo $ac_n "checking for path separator""... $ac_c" 1>&6
549echo "configure:550: checking for path separator" >&5
550# Filter path to get backslahes into forwardslashes
551case "`uname -s 2> /dev/null`" in
552OS/2)
553 PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'`
554 PATH_IFS=';'
555 ;;
556*)
557 PATH_IFS=':'
558 ;;
559esac
560echo "$ac_t""${PATH_IFS}" 1>&6
561
562echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
563echo "configure:564: checking for Cygwin environment" >&5
564if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
565 echo $ac_n "(cached) $ac_c" 1>&6
566else
567 cat > conftest.$ac_ext <<EOF
568#line 569 "configure"
569#include "confdefs.h"
570
571int main() {
572
573#ifndef __CYGWIN__
574#define __CYGWIN__ __CYGWIN32__
575#endif
576return __CYGWIN__;
577; return 0; }
578EOF
579if { (eval echo configure:580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
580 rm -rf conftest*
581 ac_cv_cygwin=yes
582else
583 echo "configure: failed program was:" >&5
584 cat conftest.$ac_ext >&5
585 rm -rf conftest*
586 ac_cv_cygwin=no
587fi
588rm -f conftest*
589rm -f conftest*
590fi
591
592echo "$ac_t""$ac_cv_cygwin" 1>&6
593CYGWIN=
594test "$ac_cv_cygwin" = yes && CYGWIN=yes
595echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
596echo "configure:597: checking for mingw32 environment" >&5
597if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
598 echo $ac_n "(cached) $ac_c" 1>&6
599else
600 cat > conftest.$ac_ext <<EOF
601#line 602 "configure"
602#include "confdefs.h"
603
604int main() {
605return __MINGW32__;
606; return 0; }
607EOF
608if { (eval echo configure:609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
609 rm -rf conftest*
610 ac_cv_mingw32=yes
611else
612 echo "configure: failed program was:" >&5
613 cat conftest.$ac_ext >&5
614 rm -rf conftest*
615 ac_cv_mingw32=no
616fi
617rm -f conftest*
618rm -f conftest*
619fi
620
621echo "$ac_t""$ac_cv_mingw32" 1>&6
622MINGW32=
623test "$ac_cv_mingw32" = yes && MINGW32=yes
624echo $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6
625echo "configure:626: checking for EMX/OS2 environment" >&5
626if eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then
627 echo $ac_n "(cached) $ac_c" 1>&6
628else
629 : ${CC=gcc.exe}
630cat > conftest.$ac_ext <<EOF
631#line 632 "configure"
632#include "confdefs.h"
633
634int main() {
635return __EMX__;
636; return 0; }
637EOF
638if { (eval echo configure:639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
639 rm -rf conftest*
640 ac_cv_emxos2=yes
641else
642 echo "configure: failed program was:" >&5
643 cat conftest.$ac_ext >&5
644 rm -rf conftest*
645 ac_cv_emxos2=no
646fi
647rm -f conftest*
648rm -f conftest*
649fi
650
651echo "$ac_t""$ac_cv_emxos2" 1>&6
652if eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then
653 echo $ac_n "(cached) $ac_c" 1>&6
654else
655 if test "$ac_cv_emxos2" = yes ; then
656 ac_cv_libpre=
657else
658 ac_cv_libpre=lib
659fi
660
661fi
662
663EMXOS2=
664test "$ac_cv_emxos2" = yes && EMXOS2=yes
665
666
667
668echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
669echo "configure:670: checking for executable suffix" >&5
670if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
671 echo $ac_n "(cached) $ac_c" 1>&6
672else
673 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
674 ac_cv_exeext=.exe
675else
676 rm -f conftest*
677 echo 'int main () { return 0; }' > conftest.$ac_ext
678 ac_cv_exeext=
679 if { (eval echo configure:680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
680 for file in conftest.*; do
681 case $file in
682 *.c | *.o | *.obj) ;;
683 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
684 esac
685 done
686 else
687 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
688 fi
689 rm -f conftest*
690 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
691fi
692fi
693
694EXEEXT=""
695test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
696echo "$ac_t""${ac_cv_exeext}" 1>&6
697ac_exeext=$EXEEXT
698
699
700
701ac_aux_dir=
702for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
703 if test -f $ac_dir/install-sh; then
704 ac_aux_dir=$ac_dir
705 ac_install_sh="$ac_aux_dir/install-sh -c"
706 break
707 elif test -f $ac_dir/install.sh; then
708 ac_aux_dir=$ac_dir
709 ac_install_sh="$ac_aux_dir/install.sh -c"
710 break
711 fi
712done
713if test -z "$ac_aux_dir"; then
714 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
715fi
716ac_config_guess=$ac_aux_dir/config.guess
717ac_config_sub=$ac_aux_dir/config.sub
718ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
719
720
721# Do some error checking and defaulting for the host and target type.
722# The inputs are:
723# configure --host=HOST --target=TARGET --build=BUILD NONOPT
724#
725# The rules are:
726# 1. You are not allowed to specify --host, --target, and nonopt at the
727# same time.
728# 2. Host defaults to nonopt.
729# 3. If nonopt is not specified, then host defaults to the current host,
730# as determined by config.guess.
731# 4. Target and build default to nonopt.
732# 5. If nonopt is not specified, then target and build default to host.
733
734# The aliases save the names the user supplied, while $host etc.
735# will get canonicalized.
736case $host---$target---$nonopt in
737NONE---*---* | *---NONE---* | *---*---NONE) ;;
738*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
739esac
740
741
742# Make sure we can run config.sub.
743if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
744else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
745fi
746
747echo $ac_n "checking host system type""... $ac_c" 1>&6
748echo "configure:749: checking host system type" >&5
749
750host_alias=$host
751case "$host_alias" in
752NONE)
753 case $nonopt in
754 NONE)
755 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
756 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
757 fi ;;
758 *) host_alias=$nonopt ;;
759 esac ;;
760esac
761
762host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
763host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
764host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
765host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
766echo "$ac_t""$host" 1>&6
767
768echo $ac_n "checking target system type""... $ac_c" 1>&6
769echo "configure:770: checking target system type" >&5
770
771target_alias=$target
772case "$target_alias" in
773NONE)
774 case $nonopt in
775 NONE) target_alias=$host_alias ;;
776 *) target_alias=$nonopt ;;
777 esac ;;
778esac
779
780target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
781target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
782target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
783target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
784echo "$ac_t""$target" 1>&6
785
786echo $ac_n "checking build system type""... $ac_c" 1>&6
787echo "configure:788: checking build system type" >&5
788
789build_alias=$build
790case "$build_alias" in
791NONE)
792 case $nonopt in
793 NONE) build_alias=$host_alias ;;
794 *) build_alias=$nonopt ;;
795 esac ;;
796esac
797
798build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
799build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
800build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
801build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
802echo "$ac_t""$build" 1>&6
803
804test "$host_alias" != "$target_alias" &&
805 test "$program_prefix$program_suffix$program_transform_name" = \
806 NONENONEs,x,x, &&
807 program_prefix=${target_alias}-
808
809# Extract the first word of "gcc", so it can be a program name with args.
810set dummy gcc; ac_word=$2
811echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
812echo "configure:813: checking for $ac_word" >&5
813if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
815else
816 if test -n "$CC"; then
817 ac_cv_prog_CC="$CC" # Let the user override the test.
818else
819 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
820 ac_dummy="$PATH"
821 for ac_dir in $ac_dummy; do
822 test -z "$ac_dir" && ac_dir=.
823 if test -f $ac_dir/$ac_word -o \
824 -f $ac_dir/$ac_word$ac_exeext ; then
825 ac_cv_prog_CC="gcc"
826 break
827 fi
828 done
829 IFS="$ac_save_ifs"
830fi
831fi
832CC="$ac_cv_prog_CC"
833if test -n "$CC"; then
834 echo "$ac_t""$CC" 1>&6
835else
836 echo "$ac_t""no" 1>&6
837fi
838
839if test -z "$CC"; then
840 # Extract the first word of "cc", so it can be a program name with args.
841set dummy cc; ac_word=$2
842echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
843echo "configure:844: checking for $ac_word" >&5
844if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
845 echo $ac_n "(cached) $ac_c" 1>&6
846else
847 if test -n "$CC"; then
848 ac_cv_prog_CC="$CC" # Let the user override the test.
849else
850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
851 ac_prog_rejected=no
852 ac_dummy="$PATH"
853 for ac_dir in $ac_dummy; do
854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word -o \
856 -f $ac_dir/$ac_word$ac_exeext ; then
857 if test "$ac_dir/$ac_word" = "/usr/ucb/cc" -o \
858 "$ac_dir/$ac_word$ac_exeext" = "/usr/ucb/cc" ; then
859 ac_prog_rejected=yes
860 continue
861 fi
862 ac_cv_prog_CC="cc"
863 break
864 fi
865 done
866 IFS="$ac_save_ifs"
867if test $ac_prog_rejected = yes; then
868 # We found a bogon in the path, so make sure we never use it.
869 set dummy $ac_cv_prog_CC
870 shift
871 if test $# -gt 0; then
872 # We chose a different compiler from the bogus one.
873 # However, it has the same basename, so the bogon will be chosen
874 # first if we set CC to just the basename; use the full file name.
875 shift
876 set dummy "$ac_dir/$ac_word" "$@"
877 shift
878 ac_cv_prog_CC="$@"
879 fi
880fi
881fi
882fi
883CC="$ac_cv_prog_CC"
884if test -n "$CC"; then
885 echo "$ac_t""$CC" 1>&6
886else
887 echo "$ac_t""no" 1>&6
888fi
889
890 if test -z "$CC"; then
891 case "`uname -s`" in
892 *win32* | *WIN32*)
893 # Extract the first word of "cl", so it can be a program name with args.
894set dummy cl; ac_word=$2
895echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
896echo "configure:897: checking for $ac_word" >&5
897if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
898 echo $ac_n "(cached) $ac_c" 1>&6
899else
900 if test -n "$CC"; then
901 ac_cv_prog_CC="$CC" # Let the user override the test.
902else
903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
904 ac_dummy="$PATH"
905 for ac_dir in $ac_dummy; do
906 test -z "$ac_dir" && ac_dir=.
907 if test -f $ac_dir/$ac_word -o \
908 -f $ac_dir/$ac_word$ac_exeext ; then
909 ac_cv_prog_CC="cl"
910 break
911 fi
912 done
913 IFS="$ac_save_ifs"
914fi
915fi
916CC="$ac_cv_prog_CC"
917if test -n "$CC"; then
918 echo "$ac_t""$CC" 1>&6
919else
920 echo "$ac_t""no" 1>&6
921fi
922 ;;
923 esac
924 fi
925 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
926fi
927
928echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
929echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
930
931ac_ext=c
932# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
933ac_cpp='$CPP $CPPFLAGS'
934ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
935ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
936cross_compiling=$ac_cv_prog_cc_cross
937
938cat > conftest.$ac_ext << EOF
939
940#line 941 "configure"
941#include "confdefs.h"
942
943main(){return(0);}
944EOF
945if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
946 ac_cv_prog_cc_works=yes
947 # If we can't run a trivial program, we are probably using a cross compiler.
948 if (./conftest; exit) 2>/dev/null; then
949 ac_cv_prog_cc_cross=no
950 else
951 ac_cv_prog_cc_cross=yes
952 fi
953else
954 echo "configure: failed program was:" >&5
955 cat conftest.$ac_ext >&5
956 ac_cv_prog_cc_works=no
957fi
958rm -fr conftest*
959ac_ext=c
960# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
961ac_cpp='$CPP $CPPFLAGS'
962ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
963ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
964cross_compiling=$ac_cv_prog_cc_cross
965
966echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
967if test $ac_cv_prog_cc_works = no; then
968 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
969fi
970echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
971echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
972echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
973cross_compiling=$ac_cv_prog_cc_cross
974
975echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
976echo "configure:977: checking whether we are using GNU C" >&5
977if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
978 echo $ac_n "(cached) $ac_c" 1>&6
979else
980 cat > conftest.c <<EOF
981#ifdef __GNUC__
982 yes;
983#endif
984EOF
985if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
986 ac_cv_prog_gcc=yes
987else
988 ac_cv_prog_gcc=no
989fi
990fi
991
992echo "$ac_t""$ac_cv_prog_gcc" 1>&6
993
994if test $ac_cv_prog_gcc = yes; then
995 GCC=yes
996else
997 GCC=
998fi
999
1000ac_test_CFLAGS="${CFLAGS+set}"
1001ac_save_CFLAGS="$CFLAGS"
1002CFLAGS=
1003echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1004echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5
1005if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1006 echo $ac_n "(cached) $ac_c" 1>&6
1007else
1008 echo 'void f(){}' > conftest.c
1009if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1010 ac_cv_prog_cc_g=yes
1011else
1012 ac_cv_prog_cc_g=no
1013fi
1014rm -f conftest*
1015
1016fi
1017
1018echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1019if test "$ac_test_CFLAGS" = set; then
1020 CFLAGS="$ac_save_CFLAGS"
1021elif test $ac_cv_prog_cc_g = yes; then
1022 if test "$GCC" = yes; then
1023 CFLAGS="-g -O2"
1024 else
1025 CFLAGS="-g"
1026 fi
1027else
1028 if test "$GCC" = yes; then
1029 CFLAGS="-O2"
1030 else
1031 CFLAGS=
1032 fi
1033fi
1034
1035echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1036echo "configure:1037: checking for POSIXized ISC" >&5
1037if test -d /etc/conf/kconfig.d &&
1038 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1039then
1040 echo "$ac_t""yes" 1>&6
1041 ISC=yes # If later tests want to check for ISC.
1042 cat >> confdefs.h <<\EOF
1043#define _POSIX_SOURCE 1
1044EOF
1045
1046 if test "$GCC" = yes; then
1047 CC="$CC -posix"
1048 else
1049 CC="$CC -Xp"
1050 fi
1051else
1052 echo "$ac_t""no" 1>&6
1053 ISC=
1054fi
1055
1056
1057# Find a good install program. We prefer a C program (faster),
1058# so one script is as good as another. But avoid the broken or
1059# incompatible versions:
1060# SysV /etc/install, /usr/sbin/install
1061# SunOS /usr/etc/install
1062# IRIX /sbin/install
1063# AIX /bin/install
1064# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1065# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1066# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1067# ./install, which can be erroneously created by make from ./install.sh.
1068echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1069echo "configure:1070: checking for a BSD compatible install" >&5
1070if test -z "$INSTALL"; then
1071if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1073else
1074 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$PATH_IFS"
1075 for ac_dir in $PATH; do
1076 # Account for people who put trailing slashes in PATH elements.
1077 case "$ac_dir/" in
1078 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1079 # We reject the install program from OS/2 or W3.1
1080 */OS2|*/OS2/*|*/WINDOWS|*/WINDOWS/*) ;;
1081 *)
1082 # OSF1 and SCO ODT 3.0 have their own names for install.
1083 # Don't use installbsd from OSF since it installs stuff as root
1084 # by default.
1085 for ac_prog in ginstall scoinst install; do
1086 if test -f $ac_dir/$ac_prog$ac_exeext; then
1087 if test $ac_prog = install &&
1088 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1089 # AIX install. It has an incompatible calling convention.
1090 :
1091 else
1092 ac_cv_path_install="$ac_dir/$ac_prog$ac_exeext -c"
1093 break 2
1094 fi
1095 fi
1096 done
1097 ;;
1098 esac
1099 done
1100 IFS="$ac_save_IFS"
1101
1102fi
1103 if test "${ac_cv_path_install+set}" = set; then
1104 INSTALL="$ac_cv_path_install"
1105 else
1106 # As a last resort, use the slow shell script. We don't cache a
1107 # path for INSTALL within a source directory, because that will
1108 # break other packages using the cache if that directory is
1109 # removed, or if the path is relative.
1110 INSTALL="$ac_install_sh"
1111 fi
1112fi
1113echo "$ac_t""$INSTALL" 1>&6
1114
1115# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1116# It thinks the first close brace ends the variable substitution.
1117test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1118
1119test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1120
1121test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1122
1123echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1124echo "configure:1125: checking whether build environment is sane" >&5
1125# Just in case
1126sleep 1
1127echo timestamp > conftestfile
1128# Do `set' in a subshell so we don't clobber the current shell's
1129# arguments. Must try -L first in case configure is actually a
1130# symlink; some systems play weird games with the mod time of symlinks
1131# (eg FreeBSD returns the mod time of the symlink's containing
1132# directory).
1133if (
1134 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1135 if test "$*" = "X"; then
1136 # -L didn't work.
1137 set X `ls -t $srcdir/configure conftestfile`
1138 fi
1139 if test "$*" != "X $srcdir/configure conftestfile" \
1140 && test "$*" != "X conftestfile $srcdir/configure"; then
1141
1142 # If neither matched, then we have a broken ls. This can happen
1143 # if, for instance, CONFIG_SHELL is bash and it inherits a
1144 # broken ls alias from the environment. This has actually
1145 # happened. Such a system could not be considered "sane".
1146 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
1147alias in your environment" 1>&2; exit 1; }
1148 fi
1149
1150 test "$2" = conftestfile
1151 )
1152then
1153 # Ok.
1154 :
1155else
1156 { echo "configure: error: newly created file is older than distributed files!
1157Check your system clock" 1>&2; exit 1; }
1158fi
1159rm -f conftest*
1160echo "$ac_t""yes" 1>&6
1161if test "$program_transform_name" = s,x,x,; then
1162 program_transform_name=
1163else
1164 # Double any \ or $. echo might interpret backslashes.
1165 cat <<\EOF_SED > conftestsed
1166s,\\,\\\\,g; s,\$,$$,g
1167EOF_SED
1168 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1169 rm -f conftestsed
1170fi
1171test "$program_prefix" != NONE &&
1172 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1173# Use a double $ so make ignores it.
1174test "$program_suffix" != NONE &&
1175 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1176
1177# sed with no file args requires a program.
1178test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1179
1180echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1181echo "configure:1182: checking whether ${MAKE-make} sets \${MAKE}" >&5
1182set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1183if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1184 echo $ac_n "(cached) $ac_c" 1>&6
1185else
1186 cat > conftestmake <<\EOF
1187all:
1188 @echo 'ac_maketemp="${MAKE}"'
1189EOF
1190# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1191eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1192if test -n "$ac_maketemp"; then
1193 eval ac_cv_prog_make_${ac_make}_set=yes
1194else
1195 eval ac_cv_prog_make_${ac_make}_set=no
1196fi
1197rm -f conftestmake
1198fi
1199if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1200 echo "$ac_t""yes" 1>&6
1201 SET_MAKE=
1202else
1203 echo "$ac_t""no" 1>&6
1204 SET_MAKE="MAKE=${MAKE-make}"
1205fi
1206
1207
1208PACKAGE=bfd
1209
1210VERSION=2.11.2
1211
1212if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1213 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1214fi
1215cat >> confdefs.h <<EOF
1216#define PACKAGE "$PACKAGE"
1217EOF
1218
1219cat >> confdefs.h <<EOF
1220#define VERSION "$VERSION"
1221EOF
1222
1223
1224
1225missing_dir=`cd $ac_aux_dir && pwd`
1226echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1227echo "configure:1228: checking for working aclocal" >&5
1228# Run test in a subshell; some versions of sh will print an error if
1229# an executable is not found, even if stderr is redirected.
1230# Redirect stdin to placate older versions of autoconf. Sigh.
1231if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1232 ACLOCAL=aclocal
1233 echo "$ac_t""found" 1>&6
1234else
1235 ACLOCAL="$missing_dir/missing aclocal"
1236 echo "$ac_t""missing" 1>&6
1237fi
1238
1239echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1240echo "configure:1241: checking for working autoconf" >&5
1241# Run test in a subshell; some versions of sh will print an error if
1242# an executable is not found, even if stderr is redirected.
1243# Redirect stdin to placate older versions of autoconf. Sigh.
1244if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1245 AUTOCONF=autoconf
1246 echo "$ac_t""found" 1>&6
1247else
1248 AUTOCONF="$missing_dir/missing autoconf"
1249 echo "$ac_t""missing" 1>&6
1250fi
1251
1252echo $ac_n "checking for working automake""... $ac_c" 1>&6
1253echo "configure:1254: checking for working automake" >&5
1254# Run test in a subshell; some versions of sh will print an error if
1255# an executable is not found, even if stderr is redirected.
1256# Redirect stdin to placate older versions of autoconf. Sigh.
1257if (automake --version) < /dev/null > /dev/null 2>&1; then
1258 AUTOMAKE=automake
1259 echo "$ac_t""found" 1>&6
1260else
1261 AUTOMAKE="$missing_dir/missing automake"
1262 echo "$ac_t""missing" 1>&6
1263fi
1264
1265echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1266echo "configure:1267: checking for working autoheader" >&5
1267# Run test in a subshell; some versions of sh will print an error if
1268# an executable is not found, even if stderr is redirected.
1269# Redirect stdin to placate older versions of autoconf. Sigh.
1270if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1271 AUTOHEADER=autoheader
1272 echo "$ac_t""found" 1>&6
1273else
1274 AUTOHEADER="$missing_dir/missing autoheader"
1275 echo "$ac_t""missing" 1>&6
1276fi
1277
1278echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1279echo "configure:1280: checking for working makeinfo" >&5
1280# Run test in a subshell; some versions of sh will print an error if
1281# an executable is not found, even if stderr is redirected.
1282# Redirect stdin to placate older versions of autoconf. Sigh.
1283if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1284 MAKEINFO=makeinfo
1285 echo "$ac_t""found" 1>&6
1286else
1287 MAKEINFO="$missing_dir/missing makeinfo"
1288 echo "$ac_t""missing" 1>&6
1289fi
1290
1291
1292
1293if test $host != $build; then
1294 ac_tool_prefix=${host_alias}-
1295else
1296 ac_tool_prefix=
1297fi
1298
1299# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1300set dummy ${ac_tool_prefix}ar; ac_word=$2
1301echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302echo "configure:1303: checking for $ac_word" >&5
1303if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 if test -n "$AR"; then
1307 ac_cv_prog_AR="$AR" # Let the user override the test.
1308else
1309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
1310 ac_dummy="$PATH"
1311 for ac_dir in $ac_dummy; do
1312 test -z "$ac_dir" && ac_dir=.
1313 if test -f $ac_dir/$ac_word -o \
1314 -f $ac_dir/$ac_word$ac_exeext ; then
1315 ac_cv_prog_AR="${ac_tool_prefix}ar"
1316 break
1317 fi
1318 done
1319 IFS="$ac_save_ifs"
1320 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1321fi
1322fi
1323AR="$ac_cv_prog_AR"
1324if test -n "$AR"; then
1325 echo "$ac_t""$AR" 1>&6
1326else
1327 echo "$ac_t""no" 1>&6
1328fi
1329
1330
1331
1332# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1333set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1334echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1335echo "configure:1336: checking for $ac_word" >&5
1336if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1337 echo $ac_n "(cached) $ac_c" 1>&6
1338else
1339 if test -n "$RANLIB"; then
1340 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1341else
1342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
1343 ac_dummy="$PATH"
1344 for ac_dir in $ac_dummy; do
1345 test -z "$ac_dir" && ac_dir=.
1346 if test -f $ac_dir/$ac_word -o \
1347 -f $ac_dir/$ac_word$ac_exeext ; then
1348 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1349 break
1350 fi
1351 done
1352 IFS="$ac_save_ifs"
1353fi
1354fi
1355RANLIB="$ac_cv_prog_RANLIB"
1356if test -n "$RANLIB"; then
1357 echo "$ac_t""$RANLIB" 1>&6
1358else
1359 echo "$ac_t""no" 1>&6
1360fi
1361
1362
1363if test -z "$ac_cv_prog_RANLIB"; then
1364if test -n "$ac_tool_prefix"; then
1365 # Extract the first word of "ranlib", so it can be a program name with args.
1366set dummy ranlib; ac_word=$2
1367echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1368echo "configure:1369: checking for $ac_word" >&5
1369if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371else
1372 if test -n "$RANLIB"; then
1373 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1374else
1375 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
1376 ac_dummy="$PATH"
1377 for ac_dir in $ac_dummy; do
1378 test -z "$ac_dir" && ac_dir=.
1379 if test -f $ac_dir/$ac_word -o \
1380 -f $ac_dir/$ac_word$ac_exeext ; then
1381 ac_cv_prog_RANLIB="ranlib"
1382 break
1383 fi
1384 done
1385 IFS="$ac_save_ifs"
1386 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1387fi
1388fi
1389RANLIB="$ac_cv_prog_RANLIB"
1390if test -n "$RANLIB"; then
1391 echo "$ac_t""$RANLIB" 1>&6
1392else
1393 echo "$ac_t""no" 1>&6
1394fi
1395
1396else
1397 RANLIB=":"
1398fi
1399fi
1400
1401
1402# Check whether --enable-shared or --disable-shared was given.
1403if test "${enable_shared+set}" = set; then
1404 enableval="$enable_shared"
1405 p=${PACKAGE-default}
1406case $enableval in
1407yes) enable_shared=yes ;;
1408no) enable_shared=no ;;
1409*)
1410 enable_shared=no
1411 # Look at the argument we got. We use all the common list separators.
1412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1413 for pkg in $enableval; do
1414 if test "X$pkg" = "X$p"; then
1415 enable_shared=yes
1416 fi
1417 done
1418 IFS="$ac_save_ifs"
1419 ;;
1420esac
1421else
1422 enable_shared=no
1423fi
1424
1425
1426# Check whether --enable-static or --disable-static was given.
1427if test "${enable_static+set}" = set; then
1428 enableval="$enable_static"
1429 p=${PACKAGE-default}
1430case $enableval in
1431yes) enable_static=yes ;;
1432no) enable_static=no ;;
1433*)
1434 enable_static=no
1435 # Look at the argument we got. We use all the common list separators.
1436 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1437 for pkg in $enableval; do
1438 if test "X$pkg" = "X$p"; then
1439 enable_static=yes
1440 fi
1441 done
1442 IFS="$ac_save_ifs"
1443 ;;
1444esac
1445else
1446 enable_static=yes
1447fi
1448
1449# Check whether --enable-fast-install or --disable-fast-install was given.
1450if test "${enable_fast_install+set}" = set; then
1451 enableval="$enable_fast_install"
1452 p=${PACKAGE-default}
1453case $enableval in
1454yes) enable_fast_install=yes ;;
1455no) enable_fast_install=no ;;
1456*)
1457 enable_fast_install=no
1458 # Look at the argument we got. We use all the common list separators.
1459 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1460 for pkg in $enableval; do
1461 if test "X$pkg" = "X$p"; then
1462 enable_fast_install=yes
1463 fi
1464 done
1465 IFS="$ac_save_ifs"
1466 ;;
1467esac
1468else
1469 enable_fast_install=yes
1470fi
1471
1472# Check whether --with-gnu-ld or --without-gnu-ld was given.
1473if test "${with_gnu_ld+set}" = set; then
1474 withval="$with_gnu_ld"
1475 test "$withval" = no || with_gnu_ld=yes
1476else
1477 with_gnu_ld=no
1478fi
1479
1480ac_prog=ld
1481if test "$GCC" = yes; then
1482 # Check if gcc -print-prog-name=ld gives a path.
1483 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1484echo "configure:1485: checking for ld used by GCC" >&5
1485 case $host in
1486 *-*-mingw*)
1487 # gcc leaves a trailing carriage return which upsets mingw
1488 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1489 *)
1490 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1491 esac
1492 case $ac_prog in
1493 # Accept absolute paths.
1494 [\\/]* | [A-Za-z]:[\\/]*)
1495 re_direlt='/[^/][^/]*/\.\./'
1496 # Canonicalize the path of ld
1497 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1498 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1499 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1500 done
1501 test -z "$LD" && LD="$ac_prog"
1502 ;;
1503 "")
1504 # If it fails, then pretend we aren't using GCC.
1505 ac_prog=ld
1506 ;;
1507 *)
1508 # If it is relative, then search for the first ld in PATH.
1509 with_gnu_ld=unknown
1510 ;;
1511 esac
1512elif test "$with_gnu_ld" = yes; then
1513 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1514echo "configure:1515: checking for GNU ld" >&5
1515else
1516 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1517echo "configure:1518: checking for non-GNU ld" >&5
1518fi
1519if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1521else
1522 if test -z "$LD"; then
1523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1524 for ac_dir in $PATH; do
1525 test -z "$ac_dir" && ac_dir=.
1526 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1527 lt_cv_path_LD="$ac_dir/$ac_prog"
1528 # Check to see if the program is GNU ld. I'd rather use --version,
1529 # but apparently some GNU ld's only accept -v.
1530 # Break only if it was the GNU/non-GNU ld that we prefer.
1531 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1532 test "$with_gnu_ld" != no && break
1533 else
1534 test "$with_gnu_ld" != yes && break
1535 fi
1536 fi
1537 done
1538 IFS="$ac_save_ifs"
1539else
1540 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1541fi
1542fi
1543
1544LD="$lt_cv_path_LD"
1545if test -n "$LD"; then
1546 echo "$ac_t""$LD" 1>&6
1547else
1548 echo "$ac_t""no" 1>&6
1549fi
1550test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1551echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1552echo "configure:1553: checking if the linker ($LD) is GNU ld" >&5
1553if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1554 echo $ac_n "(cached) $ac_c" 1>&6
1555else
1556 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1557if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1558 lt_cv_prog_gnu_ld=yes
1559else
1560 lt_cv_prog_gnu_ld=no
1561fi
1562fi
1563
1564echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1565with_gnu_ld=$lt_cv_prog_gnu_ld
1566
1567
1568echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1569echo "configure:1570: checking for $LD option to reload object files" >&5
1570if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573 lt_cv_ld_reload_flag='-r'
1574fi
1575
1576echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1577reload_flag=$lt_cv_ld_reload_flag
1578test -n "$reload_flag" && reload_flag=" $reload_flag"
1579
1580echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1581echo "configure:1582: checking for BSD-compatible nm" >&5
1582if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1583 echo $ac_n "(cached) $ac_c" 1>&6
1584else
1585 if test -n "$NM"; then
1586 # Let the user override the test.
1587 lt_cv_path_NM="$NM"
1588else
1589 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1590 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1591 test -z "$ac_dir" && ac_dir=.
1592 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1593 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1594 # Check to see if the nm accepts a BSD-compat flag.
1595 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1596 # nm: unknown option "B" ignored
1597 # Tru64's nm complains that /dev/null is an invalid object file
1598 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1599 lt_cv_path_NM="$tmp_nm -B"
1600 break
1601 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1602 lt_cv_path_NM="$tmp_nm -p"
1603 break
1604 else
1605 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1606 continue # so that we can try to find one that supports BSD flags
1607 fi
1608 fi
1609 done
1610 IFS="$ac_save_ifs"
1611 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1612fi
1613fi
1614
1615NM="$lt_cv_path_NM"
1616echo "$ac_t""$NM" 1>&6
1617
1618echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1619echo "configure:1620: checking whether ln -s works" >&5
1620if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1621 echo $ac_n "(cached) $ac_c" 1>&6
1622else
1623 rm -f conftestdata
1624if ln -s X conftestdata 2>/dev/null
1625then
1626 rm -f conftestdata
1627 ac_cv_prog_LN_S="ln -s"
1628else
1629 echo A > conftestdata;
1630 if ln conftestdata conftestdata2 2>/dev/null; then
1631 ac_cv_prog_LN_S=ln
1632 else
1633 ac_cv_prog_LN_S=cp
1634 fi
1635fi
1636rm -f conftestdata*
1637fi
1638LN_S="$ac_cv_prog_LN_S"
1639if test "$ac_cv_prog_LN_S" = "ln -s"; then
1640 echo "$ac_t""yes" 1>&6
1641else
1642 echo "$ac_t""no" 1>&6
1643fi
1644
1645echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1646echo "configure:1647: checking how to recognise dependant libraries" >&5
1647if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1648 echo $ac_n "(cached) $ac_c" 1>&6
1649else
1650 lt_cv_file_magic_cmd='$MAGIC_CMD'
1651lt_cv_file_magic_test_file=
1652lt_cv_deplibs_check_method='unknown'
1653# Need to set the preceding variable on all platforms that support
1654# interlibrary dependencies.
1655# 'none' -- dependencies not supported.
1656# `unknown' -- same as none, but documents that we really don't know.
1657# 'pass_all' -- all dependencies passed with no checks.
1658# 'test_compile' -- check by making test program.
1659# 'file_magic [regex]' -- check by looking for files in library path
1660# which responds to the $file_magic_cmd with a given egrep regex.
1661# If you have `file' or equivalent on your system and you're not sure
1662# whether `pass_all' will *always* work, you probably want this one.
1663
1664case $host_os in
1665aix*)
1666 lt_cv_deplibs_check_method=pass_all
1667 ;;
1668
1669beos*)
1670 lt_cv_deplibs_check_method=pass_all
1671 ;;
1672
1673bsdi4*)
1674 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1675 lt_cv_file_magic_cmd='/usr/bin/file -L'
1676 lt_cv_file_magic_test_file=/shlib/libc.so
1677 ;;
1678
1679cygwin* | mingw* |pw32*)
1680 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1681 lt_cv_file_magic_cmd='$OBJDUMP -f'
1682 ;;
1683
1684darwin* | rhapsody*)
1685 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1686 lt_cv_file_magic_cmd='/usr/bin/file -L'
1687 case "$host_os" in
1688 rhapsody* | darwin1.012)
1689 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1690 ;;
1691 *) # Darwin 1.3 on
1692 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1693 ;;
1694 esac
1695 ;;
1696
1697freebsd* )
1698 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1699 case $host_cpu in
1700 i*86 )
1701 # Not sure whether the presence of OpenBSD here was a mistake.
1702 # Let's accept both of them until this is cleared up.
1703 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1704 lt_cv_file_magic_cmd=/usr/bin/file
1705 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1706 ;;
1707 esac
1708 else
1709 lt_cv_deplibs_check_method=pass_all
1710 fi
1711 ;;
1712
1713gnu*)
1714 lt_cv_deplibs_check_method=pass_all
1715 ;;
1716
1717hpux10.20*|hpux11*)
1718 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1719 lt_cv_file_magic_cmd=/usr/bin/file
1720 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1721 ;;
1722
1723irix5* | irix6*)
1724 case $host_os in
1725 irix5*)
1726 # this will be overridden with pass_all, but let us keep it just in case
1727 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1728 ;;
1729 *)
1730 case $LD in
1731 *-32|*"-32 ") libmagic=32-bit;;
1732 *-n32|*"-n32 ") libmagic=N32;;
1733 *-64|*"-64 ") libmagic=64-bit;;
1734 *) libmagic=never-match;;
1735 esac
1736 # this will be overridden with pass_all, but let us keep it just in case
1737 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1738 ;;
1739 esac
1740 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1741 lt_cv_deplibs_check_method=pass_all
1742 ;;
1743
1744# This must be Linux ELF.
1745linux-gnu*)
1746 case $host_cpu in
1747 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1748 lt_cv_deplibs_check_method=pass_all ;;
1749 *)
1750 # glibc up to 2.1.1 does not perform some relocations on ARM
1751 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1752 esac
1753 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1754 ;;
1755
1756netbsd*)
1757 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1758 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1759 else
1760 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1761 fi
1762 ;;
1763
1764newsos6)
1765 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1766 lt_cv_file_magic_cmd=/usr/bin/file
1767 lt_cv_file_magic_test_file=/usr/lib/libnls.so
1768 ;;
1769
1770osf3* | osf4* | osf5*)
1771 # this will be overridden with pass_all, but let us keep it just in case
1772 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1773 lt_cv_file_magic_test_file=/shlib/libc.so
1774 lt_cv_deplibs_check_method=pass_all
1775 ;;
1776
1777sco3.2v5*)
1778 lt_cv_deplibs_check_method=pass_all
1779 ;;
1780
1781solaris*)
1782 lt_cv_deplibs_check_method=pass_all
1783 lt_cv_file_magic_test_file=/lib/libc.so
1784 ;;
1785
1786sysv5uw[78]* | sysv4*uw2*)
1787 lt_cv_deplibs_check_method=pass_all
1788 ;;
1789
1790sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1791 case $host_vendor in
1792 ncr)
1793 lt_cv_deplibs_check_method=pass_all
1794 ;;
1795 motorola)
1796 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]'
1797 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1798 ;;
1799 esac
1800 ;;
1801esac
1802
1803fi
1804
1805echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1806file_magic_cmd=$lt_cv_file_magic_cmd
1807deplibs_check_method=$lt_cv_deplibs_check_method
1808
1809echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1810echo "configure:1811: checking for object suffix" >&5
1811if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1813else
1814 rm -f conftest*
1815echo 'int i = 1;' > conftest.$ac_ext
1816if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1817 for ac_file in conftest.*; do
1818 case $ac_file in
1819 *.c) ;;
1820 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1821 esac
1822 done
1823else
1824 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1825fi
1826rm -f conftest*
1827fi
1828
1829echo "$ac_t""$ac_cv_objext" 1>&6
1830OBJEXT=$ac_cv_objext
1831ac_objext=$ac_cv_objext
1832
1833# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1834
1835# Only perform the check for file, if the check method requires it
1836case $deplibs_check_method in
1837file_magic*)
1838 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1839 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1840echo "configure:1841: checking for ${ac_tool_prefix}file" >&5
1841if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1842 echo $ac_n "(cached) $ac_c" 1>&6
1843else
1844 case $MAGIC_CMD in
1845 /*)
1846 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1847 ;;
1848 ?:/*)
1849 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1850 ;;
1851 *)
1852 ac_save_MAGIC_CMD="$MAGIC_CMD"
1853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1854 ac_dummy="/usr/bin:$PATH"
1855 for ac_dir in $ac_dummy; do
1856 test -z "$ac_dir" && ac_dir=.
1857 if test -f $ac_dir/${ac_tool_prefix}file; then
1858 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1859 if test -n "$file_magic_test_file"; then
1860 case $deplibs_check_method in
1861 "file_magic "*)
1862 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1863 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1864 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1865 egrep "$file_magic_regex" > /dev/null; then
1866 :
1867 else
1868 cat <<EOF 1>&2
1869
1870*** Warning: the command libtool uses to detect shared libraries,
1871*** $file_magic_cmd, produces output that libtool cannot recognize.
1872*** The result is that libtool may fail to recognize shared libraries
1873*** as such. This will affect the creation of libtool libraries that
1874*** depend on shared libraries, but programs linked with such libtool
1875*** libraries will work regardless of this problem. Nevertheless, you
1876*** may want to report the problem to your system manager and/or to
1877*** bug-libtool@gnu.org
1878
1879EOF
1880 fi ;;
1881 esac
1882 fi
1883 break
1884 fi
1885 done
1886 IFS="$ac_save_ifs"
1887 MAGIC_CMD="$ac_save_MAGIC_CMD"
1888 ;;
1889esac
1890fi
1891
1892MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1893if test -n "$MAGIC_CMD"; then
1894 echo "$ac_t""$MAGIC_CMD" 1>&6
1895else
1896 echo "$ac_t""no" 1>&6
1897fi
1898
1899if test -z "$lt_cv_path_MAGIC_CMD"; then
1900 if test -n "$ac_tool_prefix"; then
1901 echo $ac_n "checking for file""... $ac_c" 1>&6
1902echo "configure:1903: checking for file" >&5
1903if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1905else
1906 case $MAGIC_CMD in
1907 /*)
1908 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1909 ;;
1910 ?:/*)
1911 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1912 ;;
1913 *)
1914 ac_save_MAGIC_CMD="$MAGIC_CMD"
1915 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1916 ac_dummy="/usr/bin:$PATH"
1917 for ac_dir in $ac_dummy; do
1918 test -z "$ac_dir" && ac_dir=.
1919 if test -f $ac_dir/file; then
1920 lt_cv_path_MAGIC_CMD="$ac_dir/file"
1921 if test -n "$file_magic_test_file"; then
1922 case $deplibs_check_method in
1923 "file_magic "*)
1924 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1925 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1926 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1927 egrep "$file_magic_regex" > /dev/null; then
1928 :
1929 else
1930 cat <<EOF 1>&2
1931
1932*** Warning: the command libtool uses to detect shared libraries,
1933*** $file_magic_cmd, produces output that libtool cannot recognize.
1934*** The result is that libtool may fail to recognize shared libraries
1935*** as such. This will affect the creation of libtool libraries that
1936*** depend on shared libraries, but programs linked with such libtool
1937*** libraries will work regardless of this problem. Nevertheless, you
1938*** may want to report the problem to your system manager and/or to
1939*** bug-libtool@gnu.org
1940
1941EOF
1942 fi ;;
1943 esac
1944 fi
1945 break
1946 fi
1947 done
1948 IFS="$ac_save_ifs"
1949 MAGIC_CMD="$ac_save_MAGIC_CMD"
1950 ;;
1951esac
1952fi
1953
1954MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1955if test -n "$MAGIC_CMD"; then
1956 echo "$ac_t""$MAGIC_CMD" 1>&6
1957else
1958 echo "$ac_t""no" 1>&6
1959fi
1960
1961 else
1962 MAGIC_CMD=:
1963 fi
1964fi
1965
1966 fi
1967 ;;
1968esac
1969
1970# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1971set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1972echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1973echo "configure:1974: checking for $ac_word" >&5
1974if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1975 echo $ac_n "(cached) $ac_c" 1>&6
1976else
1977 if test -n "$RANLIB"; then
1978 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1979else
1980 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
1981 ac_dummy="$PATH"
1982 for ac_dir in $ac_dummy; do
1983 test -z "$ac_dir" && ac_dir=.
1984 if test -f $ac_dir/$ac_word -o \
1985 -f $ac_dir/$ac_word$ac_exeext ; then
1986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1987 break
1988 fi
1989 done
1990 IFS="$ac_save_ifs"
1991fi
1992fi
1993RANLIB="$ac_cv_prog_RANLIB"
1994if test -n "$RANLIB"; then
1995 echo "$ac_t""$RANLIB" 1>&6
1996else
1997 echo "$ac_t""no" 1>&6
1998fi
1999
2000
2001if test -z "$ac_cv_prog_RANLIB"; then
2002if test -n "$ac_tool_prefix"; then
2003 # Extract the first word of "ranlib", so it can be a program name with args.
2004set dummy ranlib; ac_word=$2
2005echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2006echo "configure:2007: checking for $ac_word" >&5
2007if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2008 echo $ac_n "(cached) $ac_c" 1>&6
2009else
2010 if test -n "$RANLIB"; then
2011 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2012else
2013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2014 ac_dummy="$PATH"
2015 for ac_dir in $ac_dummy; do
2016 test -z "$ac_dir" && ac_dir=.
2017 if test -f $ac_dir/$ac_word -o \
2018 -f $ac_dir/$ac_word$ac_exeext ; then
2019 ac_cv_prog_RANLIB="ranlib"
2020 break
2021 fi
2022 done
2023 IFS="$ac_save_ifs"
2024 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2025fi
2026fi
2027RANLIB="$ac_cv_prog_RANLIB"
2028if test -n "$RANLIB"; then
2029 echo "$ac_t""$RANLIB" 1>&6
2030else
2031 echo "$ac_t""no" 1>&6
2032fi
2033
2034else
2035 RANLIB=":"
2036fi
2037fi
2038
2039# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2040set dummy ${ac_tool_prefix}strip; ac_word=$2
2041echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2042echo "configure:2043: checking for $ac_word" >&5
2043if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
2045else
2046 if test -n "$STRIP"; then
2047 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2048else
2049 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2050 ac_dummy="$PATH"
2051 for ac_dir in $ac_dummy; do
2052 test -z "$ac_dir" && ac_dir=.
2053 if test -f $ac_dir/$ac_word -o \
2054 -f $ac_dir/$ac_word$ac_exeext ; then
2055 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2056 break
2057 fi
2058 done
2059 IFS="$ac_save_ifs"
2060fi
2061fi
2062STRIP="$ac_cv_prog_STRIP"
2063if test -n "$STRIP"; then
2064 echo "$ac_t""$STRIP" 1>&6
2065else
2066 echo "$ac_t""no" 1>&6
2067fi
2068
2069
2070if test -z "$ac_cv_prog_STRIP"; then
2071if test -n "$ac_tool_prefix"; then
2072 # Extract the first word of "strip", so it can be a program name with args.
2073set dummy strip; ac_word=$2
2074echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2075echo "configure:2076: checking for $ac_word" >&5
2076if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2077 echo $ac_n "(cached) $ac_c" 1>&6
2078else
2079 if test -n "$STRIP"; then
2080 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2081else
2082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2083 ac_dummy="$PATH"
2084 for ac_dir in $ac_dummy; do
2085 test -z "$ac_dir" && ac_dir=.
2086 if test -f $ac_dir/$ac_word -o \
2087 -f $ac_dir/$ac_word$ac_exeext ; then
2088 ac_cv_prog_STRIP="strip"
2089 break
2090 fi
2091 done
2092 IFS="$ac_save_ifs"
2093 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2094fi
2095fi
2096STRIP="$ac_cv_prog_STRIP"
2097if test -n "$STRIP"; then
2098 echo "$ac_t""$STRIP" 1>&6
2099else
2100 echo "$ac_t""no" 1>&6
2101fi
2102
2103else
2104 STRIP=":"
2105fi
2106fi
2107
2108
2109# Check for any special flags to pass to ltconfig.
2110libtool_flags="--cache-file=$cache_file"
2111test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2112test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2113test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2114test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2115test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2116
2117
2118# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2119if test "${enable_libtool_lock+set}" = set; then
2120 enableval="$enable_libtool_lock"
2121 :
2122fi
2123
2124test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2125test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2126
2127# Check whether --with-pic or --without-pic was given.
2128if test "${with_pic+set}" = set; then
2129 withval="$with_pic"
2130 pic_mode="$withval"
2131else
2132 pic_mode=default
2133fi
2134
2135test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2136test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2137
2138# Some flags need to be propagated to the compiler or linker for good
2139# libtool support.
2140case $host in
2141*-*-irix6*)
2142 # Find out which ABI we are using.
2143 echo '#line 2144 "configure"' > conftest.$ac_ext
2144 if { (eval echo configure:2145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2145 case `/usr/bin/file conftest.$ac_objext` in
2146 *32-bit*)
2147 LD="${LD-ld} -32"
2148 ;;
2149 *N32*)
2150 LD="${LD-ld} -n32"
2151 ;;
2152 *64-bit*)
2153 LD="${LD-ld} -64"
2154 ;;
2155 esac
2156 fi
2157 rm -rf conftest*
2158 ;;
2159
2160*-*-sco3.2v5*)
2161 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2162 SAVE_CFLAGS="$CFLAGS"
2163 CFLAGS="$CFLAGS -belf"
2164 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2165echo "configure:2166: checking whether the C compiler needs -belf" >&5
2166if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2167 echo $ac_n "(cached) $ac_c" 1>&6
2168else
2169
2170 ac_ext=c
2171# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2172ac_cpp='$CPP $CPPFLAGS'
2173ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2174ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2175cross_compiling=$ac_cv_prog_cc_cross
2176
2177 cat > conftest.$ac_ext <<EOF
2178#line 2179 "configure"
2179#include "confdefs.h"
2180
2181int main() {
2182
2183; return 0; }
2184EOF
2185if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2186 rm -rf conftest*
2187 lt_cv_cc_needs_belf=yes
2188else
2189 echo "configure: failed program was:" >&5
2190 cat conftest.$ac_ext >&5
2191 rm -rf conftest*
2192 lt_cv_cc_needs_belf=no
2193fi
2194rm -f conftest*
2195 ac_ext=c
2196# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2197ac_cpp='$CPP $CPPFLAGS'
2198ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2199ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2200cross_compiling=$ac_cv_prog_cc_cross
2201
2202fi
2203
2204echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2205 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2206 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2207 CFLAGS="$SAVE_CFLAGS"
2208 fi
2209 ;;
2210
2211
2212esac
2213
2214
2215# Save cache, so that ltconfig can load it
2216cat > confcache <<\EOF
2217# This file is a shell script that caches the results of configure
2218# tests run on this system so they can be shared between configure
2219# scripts and configure runs. It is not useful on other systems.
2220# If it contains results you don't want to keep, you may remove or edit it.
2221#
2222# By default, configure uses ./config.cache as the cache file,
2223# creating it if it does not exist already. You can give configure
2224# the --cache-file=FILE option to use a different cache file; that is
2225# what configure does when it calls configure scripts in
2226# subdirectories, so they share the cache.
2227# Giving --cache-file=/dev/null disables caching, for debugging configure.
2228# config.status only pays attention to the cache file if you give it the
2229# --recheck option to rerun configure.
2230#
2231EOF
2232# The following way of writing the cache mishandles newlines in values,
2233# but we know of no workaround that is simple, portable, and efficient.
2234# So, don't put newlines in cache variables' values.
2235# Ultrix sh set writes to stderr and can't be redirected directly,
2236# and sets the high bit in the cache file unless we assign to the vars.
2237(set) 2>&1 |
2238 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2239 *ac_space=\ *)
2240 # `set' does not quote correctly, so add quotes (double-quote substitution
2241 # turns \\\\ into \\, and sed turns \\ into \).
2242 sed -n \
2243 -e "s/'/'\\\\''/g" \
2244 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2245 ;;
2246 *)
2247 # `set' quotes correctly as required by POSIX, so do not add quotes.
2248 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2249 ;;
2250 esac >> confcache
2251if cmp -s $cache_file confcache; then
2252 :
2253else
2254 if test -w $cache_file; then
2255 echo "updating cache $cache_file"
2256 cat confcache > $cache_file
2257 else
2258 echo "not updating unwritable cache $cache_file"
2259 fi
2260fi
2261rm -f confcache
2262
2263
2264# Actually configure libtool. ac_aux_dir is where install-sh is found.
2265AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2266MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2267LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2268AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2269objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2270deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2271${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2272$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2273|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2274
2275# Reload cache, that may have been modified by ltconfig
2276if test -r "$cache_file"; then
2277 echo "loading cache $cache_file"
2278 . $cache_file
2279else
2280 echo "creating cache $cache_file"
2281 > $cache_file
2282fi
2283
2284
2285# This can be used to rebuild libtool when needed
2286LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2287
2288# Always use our own libtool.
2289LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2290
2291# Redirect the config.log output again, so that the ltconfig log is not
2292# clobbered by the next message.
2293exec 5>>./config.log
2294
2295
2296
2297
2298
2299
2300
2301# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2302if test "${enable_64_bit_bfd+set}" = set; then
2303 enableval="$enable_64_bit_bfd"
2304 case "${enableval}" in
2305 yes) want64=true ;;
2306 no) want64=false ;;
2307 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
2308esac
2309else
2310 want64=false
2311fi
2312# Check whether --enable-targets or --disable-targets was given.
2313if test "${enable_targets+set}" = set; then
2314 enableval="$enable_targets"
2315 case "${enableval}" in
2316 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
2317 ;;
2318 no) enable_targets= ;;
2319 *) enable_targets=$enableval ;;
2320esac
2321fi
2322# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2323if test "${enable_commonbfdlib+set}" = set; then
2324 enableval="$enable_commonbfdlib"
2325 case "${enableval}" in
2326 yes) commonbfdlib=true ;;
2327 no) commonbfdlib=false ;;
2328 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
2329esac
2330fi
2331# Check whether --with-mmap or --without-mmap was given.
2332if test "${with_mmap+set}" = set; then
2333 withval="$with_mmap"
2334 case "${withval}" in
2335 yes) want_mmap=true ;;
2336 no) want_mmap=false ;;
2337 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
2338esac
2339else
2340 want_mmap=false
2341fi
2342
2343build_warnings="-W -Wall"
2344# Check whether --enable-build-warnings or --disable-build-warnings was given.
2345if test "${enable_build_warnings+set}" = set; then
2346 enableval="$enable_build_warnings"
2347 case "${enableval}" in
2348 yes) ;;
2349 no) build_warnings="-w";;
2350 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2351 build_warnings="${build_warnings} ${t}";;
2352 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2353 build_warnings="${t} ${build_warnings}";;
2354 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2355esac
2356if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2357 echo "Setting warning flags = $build_warnings" 6>&1
2358fi
2359fi
2360WARN_CFLAGS=""
2361if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
2362 WARN_CFLAGS="${build_warnings}"
2363fi
2364
2365
2366
2367
2368
2369
2370if test -z "$target" ; then
2371 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2372fi
2373if test "$program_transform_name" = s,x,x,; then
2374 program_transform_name=
2375else
2376 # Double any \ or $. echo might interpret backslashes.
2377 cat <<\EOF_SED > conftestsed
2378s,\\,\\\\,g; s,\$,$$,g
2379EOF_SED
2380 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2381 rm -f conftestsed
2382fi
2383test "$program_prefix" != NONE &&
2384 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2385# Use a double $ so make ignores it.
2386test "$program_suffix" != NONE &&
2387 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2388
2389# sed with no file args requires a program.
2390test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2391
2392
2393echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2394echo "configure:2395: checking whether to enable maintainer-specific portions of Makefiles" >&5
2395 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2396if test "${enable_maintainer_mode+set}" = set; then
2397 enableval="$enable_maintainer_mode"
2398 USE_MAINTAINER_MODE=$enableval
2399else
2400 USE_MAINTAINER_MODE=no
2401fi
2402
2403 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2404
2405
2406if test $USE_MAINTAINER_MODE = yes; then
2407 MAINTAINER_MODE_TRUE=
2408 MAINTAINER_MODE_FALSE='#'
2409else
2410 MAINTAINER_MODE_TRUE='#'
2411 MAINTAINER_MODE_FALSE=
2412fi
2413 MAINT=$MAINTAINER_MODE_TRUE
2414
2415
2416
2417
2418
2419echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2420echo "configure:2421: checking for executable suffix" >&5
2421if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2422 echo $ac_n "(cached) $ac_c" 1>&6
2423else
2424 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
2425 ac_cv_exeext=.exe
2426else
2427 rm -f conftest*
2428 echo 'int main () { return 0; }' > conftest.$ac_ext
2429 ac_cv_exeext=
2430 if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2431 for file in conftest.*; do
2432 case $file in
2433 *.c | *.o | *.obj) ;;
2434 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2435 esac
2436 done
2437 else
2438 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2439 fi
2440 rm -f conftest*
2441 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2442fi
2443fi
2444
2445EXEEXT=""
2446test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2447echo "$ac_t""${ac_cv_exeext}" 1>&6
2448ac_exeext=$EXEEXT
2449
2450
2451host64=false
2452target64=false
2453
2454# host stuff:
2455
2456# Extract the first word of "gcc", so it can be a program name with args.
2457set dummy gcc; ac_word=$2
2458echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2459echo "configure:2460: checking for $ac_word" >&5
2460if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2461 echo $ac_n "(cached) $ac_c" 1>&6
2462else
2463 if test -n "$CC"; then
2464 ac_cv_prog_CC="$CC" # Let the user override the test.
2465else
2466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2467 ac_dummy="$PATH"
2468 for ac_dir in $ac_dummy; do
2469 test -z "$ac_dir" && ac_dir=.
2470 if test -f $ac_dir/$ac_word -o \
2471 -f $ac_dir/$ac_word$ac_exeext ; then
2472 ac_cv_prog_CC="gcc"
2473 break
2474 fi
2475 done
2476 IFS="$ac_save_ifs"
2477fi
2478fi
2479CC="$ac_cv_prog_CC"
2480if test -n "$CC"; then
2481 echo "$ac_t""$CC" 1>&6
2482else
2483 echo "$ac_t""no" 1>&6
2484fi
2485
2486if test -z "$CC"; then
2487 # Extract the first word of "cc", so it can be a program name with args.
2488set dummy cc; ac_word=$2
2489echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2490echo "configure:2491: checking for $ac_word" >&5
2491if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2492 echo $ac_n "(cached) $ac_c" 1>&6
2493else
2494 if test -n "$CC"; then
2495 ac_cv_prog_CC="$CC" # Let the user override the test.
2496else
2497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2498 ac_prog_rejected=no
2499 ac_dummy="$PATH"
2500 for ac_dir in $ac_dummy; do
2501 test -z "$ac_dir" && ac_dir=.
2502 if test -f $ac_dir/$ac_word -o \
2503 -f $ac_dir/$ac_word$ac_exeext ; then
2504 if test "$ac_dir/$ac_word" = "/usr/ucb/cc" -o \
2505 "$ac_dir/$ac_word$ac_exeext" = "/usr/ucb/cc" ; then
2506 ac_prog_rejected=yes
2507 continue
2508 fi
2509 ac_cv_prog_CC="cc"
2510 break
2511 fi
2512 done
2513 IFS="$ac_save_ifs"
2514if test $ac_prog_rejected = yes; then
2515 # We found a bogon in the path, so make sure we never use it.
2516 set dummy $ac_cv_prog_CC
2517 shift
2518 if test $# -gt 0; then
2519 # We chose a different compiler from the bogus one.
2520 # However, it has the same basename, so the bogon will be chosen
2521 # first if we set CC to just the basename; use the full file name.
2522 shift
2523 set dummy "$ac_dir/$ac_word" "$@"
2524 shift
2525 ac_cv_prog_CC="$@"
2526 fi
2527fi
2528fi
2529fi
2530CC="$ac_cv_prog_CC"
2531if test -n "$CC"; then
2532 echo "$ac_t""$CC" 1>&6
2533else
2534 echo "$ac_t""no" 1>&6
2535fi
2536
2537 if test -z "$CC"; then
2538 case "`uname -s`" in
2539 *win32* | *WIN32*)
2540 # Extract the first word of "cl", so it can be a program name with args.
2541set dummy cl; ac_word=$2
2542echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2543echo "configure:2544: checking for $ac_word" >&5
2544if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2545 echo $ac_n "(cached) $ac_c" 1>&6
2546else
2547 if test -n "$CC"; then
2548 ac_cv_prog_CC="$CC" # Let the user override the test.
2549else
2550 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2551 ac_dummy="$PATH"
2552 for ac_dir in $ac_dummy; do
2553 test -z "$ac_dir" && ac_dir=.
2554 if test -f $ac_dir/$ac_word -o \
2555 -f $ac_dir/$ac_word$ac_exeext ; then
2556 ac_cv_prog_CC="cl"
2557 break
2558 fi
2559 done
2560 IFS="$ac_save_ifs"
2561fi
2562fi
2563CC="$ac_cv_prog_CC"
2564if test -n "$CC"; then
2565 echo "$ac_t""$CC" 1>&6
2566else
2567 echo "$ac_t""no" 1>&6
2568fi
2569 ;;
2570 esac
2571 fi
2572 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2573fi
2574
2575echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2576echo "configure:2577: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2577
2578ac_ext=c
2579# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2580ac_cpp='$CPP $CPPFLAGS'
2581ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2582ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2583cross_compiling=$ac_cv_prog_cc_cross
2584
2585cat > conftest.$ac_ext << EOF
2586
2587#line 2588 "configure"
2588#include "confdefs.h"
2589
2590main(){return(0);}
2591EOF
2592if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2593 ac_cv_prog_cc_works=yes
2594 # If we can't run a trivial program, we are probably using a cross compiler.
2595 if (./conftest; exit) 2>/dev/null; then
2596 ac_cv_prog_cc_cross=no
2597 else
2598 ac_cv_prog_cc_cross=yes
2599 fi
2600else
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603 ac_cv_prog_cc_works=no
2604fi
2605rm -fr conftest*
2606ac_ext=c
2607# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2608ac_cpp='$CPP $CPPFLAGS'
2609ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2610ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2611cross_compiling=$ac_cv_prog_cc_cross
2612
2613echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2614if test $ac_cv_prog_cc_works = no; then
2615 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2616fi
2617echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2618echo "configure:2619: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2619echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2620cross_compiling=$ac_cv_prog_cc_cross
2621
2622echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2623echo "configure:2624: checking whether we are using GNU C" >&5
2624if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626else
2627 cat > conftest.c <<EOF
2628#ifdef __GNUC__
2629 yes;
2630#endif
2631EOF
2632if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2633 ac_cv_prog_gcc=yes
2634else
2635 ac_cv_prog_gcc=no
2636fi
2637fi
2638
2639echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2640
2641if test $ac_cv_prog_gcc = yes; then
2642 GCC=yes
2643else
2644 GCC=
2645fi
2646
2647ac_test_CFLAGS="${CFLAGS+set}"
2648ac_save_CFLAGS="$CFLAGS"
2649CFLAGS=
2650echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2651echo "configure:2652: checking whether ${CC-cc} accepts -g" >&5
2652if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
2654else
2655 echo 'void f(){}' > conftest.c
2656if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2657 ac_cv_prog_cc_g=yes
2658else
2659 ac_cv_prog_cc_g=no
2660fi
2661rm -f conftest*
2662
2663fi
2664
2665echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2666if test "$ac_test_CFLAGS" = set; then
2667 CFLAGS="$ac_save_CFLAGS"
2668elif test $ac_cv_prog_cc_g = yes; then
2669 if test "$GCC" = yes; then
2670 CFLAGS="-g -O2"
2671 else
2672 CFLAGS="-g"
2673 fi
2674else
2675 if test "$GCC" = yes; then
2676 CFLAGS="-O2"
2677 else
2678 CFLAGS=
2679 fi
2680fi
2681
2682
2683ALL_LINGUAS=
2684CY_GNU_GETTEXT
2685
2686# Permit host specific settings.
2687. ${srcdir}/configure.host
2688
2689
2690# Find a good install program. We prefer a C program (faster),
2691# so one script is as good as another. But avoid the broken or
2692# incompatible versions:
2693# SysV /etc/install, /usr/sbin/install
2694# SunOS /usr/etc/install
2695# IRIX /sbin/install
2696# AIX /bin/install
2697# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2698# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2699# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2700# ./install, which can be erroneously created by make from ./install.sh.
2701echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2702echo "configure:2703: checking for a BSD compatible install" >&5
2703if test -z "$INSTALL"; then
2704if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
2706else
2707 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$PATH_IFS"
2708 for ac_dir in $PATH; do
2709 # Account for people who put trailing slashes in PATH elements.
2710 case "$ac_dir/" in
2711 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2712 # We reject the install program from OS/2 or W3.1
2713 */OS2|*/OS2/*|*/WINDOWS|*/WINDOWS/*) ;;
2714 *)
2715 # OSF1 and SCO ODT 3.0 have their own names for install.
2716 # Don't use installbsd from OSF since it installs stuff as root
2717 # by default.
2718 for ac_prog in ginstall scoinst install; do
2719 if test -f $ac_dir/$ac_prog$ac_exeext; then
2720 if test $ac_prog = install &&
2721 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2722 # AIX install. It has an incompatible calling convention.
2723 :
2724 else
2725 ac_cv_path_install="$ac_dir/$ac_prog$ac_exeext -c"
2726 break 2
2727 fi
2728 fi
2729 done
2730 ;;
2731 esac
2732 done
2733 IFS="$ac_save_IFS"
2734
2735fi
2736 if test "${ac_cv_path_install+set}" = set; then
2737 INSTALL="$ac_cv_path_install"
2738 else
2739 # As a last resort, use the slow shell script. We don't cache a
2740 # path for INSTALL within a source directory, because that will
2741 # break other packages using the cache if that directory is
2742 # removed, or if the path is relative.
2743 INSTALL="$ac_install_sh"
2744 fi
2745fi
2746echo "$ac_t""$INSTALL" 1>&6
2747
2748# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2749# It thinks the first close brace ends the variable substitution.
2750test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2751
2752test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2753
2754test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2755
2756
2757BFD_HOST_64BIT_LONG=0
2758BFD_HOST_64_BIT_DEFINED=0
2759BFD_HOST_64_BIT=
2760BFD_HOST_U_64_BIT=
2761if test "x${HOST_64BIT_TYPE}" = "xlong"; then
2762 BFD_HOST_64BIT_LONG=1
2763elif test "x${HOST_64BIT_TYPE}" != "x"; then
2764 BFD_HOST_64_BIT_DEFINED=1
2765 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
2766 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
2767fi
2768
2769
2770
2771
2772
2773# Put a plausible default for CC_FOR_BUILD in Makefile.
2774if test -z "$CC_FOR_BUILD"; then
2775 if test "x$cross_compiling" = "xno"; then
2776 CC_FOR_BUILD='$(CC)'
2777 else
2778 CC_FOR_BUILD=gcc
2779 fi
2780fi
2781
2782# Also set EXEEXT_FOR_BUILD.
2783if test "x$cross_compiling" = "xno"; then
2784 EXEEXT_FOR_BUILD='$(EXEEXT)'
2785else
2786 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
2787echo "configure:2788: checking for build system executable suffix" >&5
2788if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2790else
2791 rm -f conftest*
2792 echo 'int main () { return 0; }' > conftest.c
2793 bfd_cv_build_exeext=
2794 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
2795 for file in conftest.*; do
2796 case $file in
2797 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
2798 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
2799 esac
2800 done
2801 rm -f conftest*
2802 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
2803fi
2804
2805echo "$ac_t""$bfd_cv_build_exeext" 1>&6
2806 EXEEXT_FOR_BUILD=""
2807 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
2808fi
2809
2810
2811echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2812echo "configure:2813: checking how to run the C preprocessor" >&5
2813# On Suns, sometimes $CPP names a directory.
2814if test -n "$CPP" && test -d "$CPP"; then
2815 CPP=
2816fi
2817if test -z "$CPP"; then
2818if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2819 echo $ac_n "(cached) $ac_c" 1>&6
2820else
2821 # This must be in double quotes, not single quotes, because CPP may get
2822 # substituted into the Makefile and "${CC-cc}" will confuse make.
2823 CPP="${CC-cc} -E"
2824 # On the NeXT, cc -E runs the code through the compiler's parser,
2825 # not just through cpp.
2826 cat > conftest.$ac_ext <<EOF
2827#include <sys/types.h>
2828#line 2829 "configure"
2829#include "confdefs.h"
2830#include <assert.h>
2831Syntax Error
2832EOF
2833ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2834{ (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2835ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2836if test -z "$ac_err"; then
2837 :
2838else
2839 echo "$ac_err" >&5
2840 echo "configure: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 rm -rf conftest*
2843 CPP="${CC-cc} -E -traditional-cpp"
2844 cat > conftest.$ac_ext <<EOF
2845#include <sys/types.h>
2846#line 2847 "configure"
2847#include "confdefs.h"
2848#include <assert.h>
2849Syntax Error
2850EOF
2851ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2852{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2853ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2854if test -z "$ac_err"; then
2855 :
2856else
2857 echo "$ac_err" >&5
2858 echo "configure: failed program was:" >&5
2859 cat conftest.$ac_ext >&5
2860 rm -rf conftest*
2861 CPP="${CC-cc} -nologo -E"
2862 cat > conftest.$ac_ext <<EOF
2863#include <sys/types.h>
2864#line 2865 "configure"
2865#include "confdefs.h"
2866#include <assert.h>
2867Syntax Error
2868EOF
2869ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2870{ (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2871ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2872if test -z "$ac_err"; then
2873 :
2874else
2875 echo "$ac_err" >&5
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2878 rm -rf conftest*
2879 CPP=/lib/cpp
2880fi
2881rm -f conftest*
2882fi
2883rm -f conftest*
2884fi
2885rm -f conftest*
2886 ac_cv_prog_CPP="$CPP"
2887fi
2888 CPP="$ac_cv_prog_CPP"
2889else
2890 ac_cv_prog_CPP="$CPP"
2891fi
2892echo "$ac_t""$CPP" 1>&6
2893
2894for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
2895do
2896ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2897echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2898echo "configure:2899: checking for $ac_hdr" >&5
2899if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2901else
2902 cat > conftest.$ac_ext <<EOF
2903#include <sys/types.h>
2904#line 2905 "configure"
2905#include "confdefs.h"
2906#include <$ac_hdr>
2907EOF
2908ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2909{ (eval echo configure:2910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2910ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2911if test -z "$ac_err"; then
2912 rm -rf conftest*
2913 eval "ac_cv_header_$ac_safe=yes"
2914else
2915 echo "$ac_err" >&5
2916 echo "configure: failed program was:" >&5
2917 cat conftest.$ac_ext >&5
2918 rm -rf conftest*
2919 eval "ac_cv_header_$ac_safe=no"
2920fi
2921rm -f conftest*
2922fi
2923if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2924 echo "$ac_t""yes" 1>&6
2925 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2926 cat >> confdefs.h <<EOF
2927#define $ac_tr_hdr 1
2928EOF
2929
2930else
2931 echo "$ac_t""no" 1>&6
2932fi
2933done
2934
2935for ac_hdr in fcntl.h sys/file.h sys/time.h
2936do
2937ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2938echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2939echo "configure:2940: checking for $ac_hdr" >&5
2940if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2941 echo $ac_n "(cached) $ac_c" 1>&6
2942else
2943 cat > conftest.$ac_ext <<EOF
2944#include <sys/types.h>
2945#line 2946 "configure"
2946#include "confdefs.h"
2947#include <$ac_hdr>
2948EOF
2949ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2950{ (eval echo configure:2951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2951ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2952if test -z "$ac_err"; then
2953 rm -rf conftest*
2954 eval "ac_cv_header_$ac_safe=yes"
2955else
2956 echo "$ac_err" >&5
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 eval "ac_cv_header_$ac_safe=no"
2961fi
2962rm -f conftest*
2963fi
2964if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2965 echo "$ac_t""yes" 1>&6
2966 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2967 cat >> confdefs.h <<EOF
2968#define $ac_tr_hdr 1
2969EOF
2970
2971else
2972 echo "$ac_t""no" 1>&6
2973fi
2974done
2975
2976echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2977echo "configure:2978: checking whether time.h and sys/time.h may both be included" >&5
2978if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2980else
2981 cat > conftest.$ac_ext <<EOF
2982#line 2983 "configure"
2983#include "confdefs.h"
2984#include <sys/types.h>
2985#include <sys/time.h>
2986#include <time.h>
2987int main() {
2988struct tm *tp;
2989; return 0; }
2990EOF
2991if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2992 rm -rf conftest*
2993 ac_cv_header_time=yes
2994else
2995 echo "configure: failed program was:" >&5
2996 cat conftest.$ac_ext >&5
2997 rm -rf conftest*
2998 ac_cv_header_time=no
2999fi
3000rm -f conftest*
3001fi
3002
3003echo "$ac_t""$ac_cv_header_time" 1>&6
3004if test $ac_cv_header_time = yes; then
3005 cat >> confdefs.h <<\EOF
3006#define TIME_WITH_SYS_TIME 1
3007EOF
3008
3009fi
3010
3011ac_header_dirent=no
3012for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3013do
3014ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3015echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3016echo "configure:3017: checking for $ac_hdr that defines DIR" >&5
3017if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3018 echo $ac_n "(cached) $ac_c" 1>&6
3019else
3020 cat > conftest.$ac_ext <<EOF
3021#line 3022 "configure"
3022#include "confdefs.h"
3023#include <sys/types.h>
3024#include <$ac_hdr>
3025int main() {
3026DIR *dirp = 0;
3027; return 0; }
3028EOF
3029if { (eval echo configure:3030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3030 rm -rf conftest*
3031 eval "ac_cv_header_dirent_$ac_safe=yes"
3032else
3033 echo "configure: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3035 rm -rf conftest*
3036 eval "ac_cv_header_dirent_$ac_safe=no"
3037fi
3038rm -f conftest*
3039fi
3040if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3041 echo "$ac_t""yes" 1>&6
3042 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3043 cat >> confdefs.h <<EOF
3044#define $ac_tr_hdr 1
3045EOF
3046 ac_header_dirent=$ac_hdr; break
3047else
3048 echo "$ac_t""no" 1>&6
3049fi
3050done
3051# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3052if test $ac_header_dirent = dirent.h; then
3053echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3054echo "configure:3055: checking for opendir in -ldir" >&5
3055ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3056if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3057 echo $ac_n "(cached) $ac_c" 1>&6
3058else
3059 ac_save_LIBS="$LIBS"
3060LIBS="-ldir $LIBS"
3061cat > conftest.$ac_ext <<EOF
3062#line 3063 "configure"
3063#include "confdefs.h"
3064/* Override any gcc2 internal prototype to avoid an error. */
3065/* We use char because int might match the return type of a gcc2
3066 builtin and then its argument prototype would still apply. */
3067char opendir();
3068
3069int main() {
3070opendir()
3071; return 0; }
3072EOF
3073if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3074 rm -rf conftest*
3075 eval "ac_cv_lib_$ac_lib_var=yes"
3076else
3077 echo "configure: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
3079 rm -rf conftest*
3080 eval "ac_cv_lib_$ac_lib_var=no"
3081fi
3082rm -f conftest*
3083LIBS="$ac_save_LIBS"
3084
3085fi
3086if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3087 echo "$ac_t""yes" 1>&6
3088 LIBS="$LIBS -ldir"
3089else
3090 echo "$ac_t""no" 1>&6
3091fi
3092
3093else
3094echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3095echo "configure:3096: checking for opendir in -lx" >&5
3096ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3097if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3099else
3100 ac_save_LIBS="$LIBS"
3101LIBS="-lx $LIBS"
3102cat > conftest.$ac_ext <<EOF
3103#line 3104 "configure"
3104#include "confdefs.h"
3105/* Override any gcc2 internal prototype to avoid an error. */
3106/* We use char because int might match the return type of a gcc2
3107 builtin and then its argument prototype would still apply. */
3108char opendir();
3109
3110int main() {
3111opendir()
3112; return 0; }
3113EOF
3114if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3115 rm -rf conftest*
3116 eval "ac_cv_lib_$ac_lib_var=yes"
3117else
3118 echo "configure: failed program was:" >&5
3119 cat conftest.$ac_ext >&5
3120 rm -rf conftest*
3121 eval "ac_cv_lib_$ac_lib_var=no"
3122fi
3123rm -f conftest*
3124LIBS="$ac_save_LIBS"
3125
3126fi
3127if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3128 echo "$ac_t""yes" 1>&6
3129 LIBS="$LIBS -lx"
3130else
3131 echo "$ac_t""no" 1>&6
3132fi
3133
3134fi
3135
3136for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
3137do
3138echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3139echo "configure:3140: checking for $ac_func" >&5
3140if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3141 echo $ac_n "(cached) $ac_c" 1>&6
3142else
3143 cat > conftest.$ac_ext <<EOF
3144#line 3145 "configure"
3145#include "confdefs.h"
3146/* System header to define __stub macros and hopefully few prototypes,
3147 which can conflict with char $ac_func(); below. */
3148#include <assert.h>
3149/* Override any gcc2 internal prototype to avoid an error. */
3150/* We use char because int might match the return type of a gcc2
3151 builtin and then its argument prototype would still apply. */
3152char $ac_func();
3153
3154int main() {
3155
3156/* The GNU C library defines this for functions which it implements
3157 to always fail with ENOSYS. Some functions are actually named
3158 something starting with __ and the normal name is an alias. */
3159#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3160choke me
3161#else
3162$ac_func();
3163#endif
3164
3165; return 0; }
3166EOF
3167if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3168 rm -rf conftest*
3169 eval "ac_cv_func_$ac_func=yes"
3170else
3171 echo "configure: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 rm -rf conftest*
3174 eval "ac_cv_func_$ac_func=no"
3175fi
3176rm -f conftest*
3177fi
3178
3179if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3180 echo "$ac_t""yes" 1>&6
3181 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3182 cat >> confdefs.h <<EOF
3183#define $ac_tr_func 1
3184EOF
3185
3186else
3187 echo "$ac_t""no" 1>&6
3188fi
3189done
3190
3191
3192
3193case "${host}" in
3194*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows* | *-*-os2*)
3195 cat >> confdefs.h <<\EOF
3196#define USE_BINARY_FOPEN 1
3197EOF
3198 ;;
3199esac
3200
3201echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
3202echo "configure:3203: checking whether strstr must be declared" >&5
3203if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3204 echo $ac_n "(cached) $ac_c" 1>&6
3205else
3206 cat > conftest.$ac_ext <<EOF
3207#line 3208 "configure"
3208#include "confdefs.h"
3209
3210#include <stdio.h>
3211#ifdef HAVE_STRING_H
3212#include <string.h>
3213#else
3214#ifdef HAVE_STRINGS_H
3215#include <strings.h>
3216#endif
3217#endif
3218#ifdef HAVE_STDLIB_H
3219#include <stdlib.h>
3220#endif
3221#ifdef HAVE_UNISTD_H
3222#include <unistd.h>
3223#endif
3224int main() {
3225char *(*pfn) = (char *(*)) strstr
3226; return 0; }
3227EOF
3228if { (eval echo configure:3229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3229 rm -rf conftest*
3230 bfd_cv_decl_needed_strstr=no
3231else
3232 echo "configure: failed program was:" >&5
3233 cat conftest.$ac_ext >&5
3234 rm -rf conftest*
3235 bfd_cv_decl_needed_strstr=yes
3236fi
3237rm -f conftest*
3238fi
3239
3240echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
3241if test $bfd_cv_decl_needed_strstr = yes; then
3242 cat >> confdefs.h <<\EOF
3243#define NEED_DECLARATION_STRSTR 1
3244EOF
3245
3246fi
3247
3248echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
3249echo "configure:3250: checking whether malloc must be declared" >&5
3250if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3251 echo $ac_n "(cached) $ac_c" 1>&6
3252else
3253 cat > conftest.$ac_ext <<EOF
3254#line 3255 "configure"
3255#include "confdefs.h"
3256
3257#include <stdio.h>
3258#ifdef HAVE_STRING_H
3259#include <string.h>
3260#else
3261#ifdef HAVE_STRINGS_H
3262#include <strings.h>
3263#endif
3264#endif
3265#ifdef HAVE_STDLIB_H
3266#include <stdlib.h>
3267#endif
3268#ifdef HAVE_UNISTD_H
3269#include <unistd.h>
3270#endif
3271int main() {
3272char *(*pfn) = (char *(*)) malloc
3273; return 0; }
3274EOF
3275if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3276 rm -rf conftest*
3277 bfd_cv_decl_needed_malloc=no
3278else
3279 echo "configure: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3281 rm -rf conftest*
3282 bfd_cv_decl_needed_malloc=yes
3283fi
3284rm -f conftest*
3285fi
3286
3287echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3288if test $bfd_cv_decl_needed_malloc = yes; then
3289 cat >> confdefs.h <<\EOF
3290#define NEED_DECLARATION_MALLOC 1
3291EOF
3292
3293fi
3294
3295echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
3296echo "configure:3297: checking whether realloc must be declared" >&5
3297if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3298 echo $ac_n "(cached) $ac_c" 1>&6
3299else
3300 cat > conftest.$ac_ext <<EOF
3301#line 3302 "configure"
3302#include "confdefs.h"
3303
3304#include <stdio.h>
3305#ifdef HAVE_STRING_H
3306#include <string.h>
3307#else
3308#ifdef HAVE_STRINGS_H
3309#include <strings.h>
3310#endif
3311#endif
3312#ifdef HAVE_STDLIB_H
3313#include <stdlib.h>
3314#endif
3315#ifdef HAVE_UNISTD_H
3316#include <unistd.h>
3317#endif
3318int main() {
3319char *(*pfn) = (char *(*)) realloc
3320; return 0; }
3321EOF
3322if { (eval echo configure:3323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3323 rm -rf conftest*
3324 bfd_cv_decl_needed_realloc=no
3325else
3326 echo "configure: failed program was:" >&5
3327 cat conftest.$ac_ext >&5
3328 rm -rf conftest*
3329 bfd_cv_decl_needed_realloc=yes
3330fi
3331rm -f conftest*
3332fi
3333
3334echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3335if test $bfd_cv_decl_needed_realloc = yes; then
3336 cat >> confdefs.h <<\EOF
3337#define NEED_DECLARATION_REALLOC 1
3338EOF
3339
3340fi
3341
3342echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
3343echo "configure:3344: checking whether free must be declared" >&5
3344if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3345 echo $ac_n "(cached) $ac_c" 1>&6
3346else
3347 cat > conftest.$ac_ext <<EOF
3348#line 3349 "configure"
3349#include "confdefs.h"
3350
3351#include <stdio.h>
3352#ifdef HAVE_STRING_H
3353#include <string.h>
3354#else
3355#ifdef HAVE_STRINGS_H
3356#include <strings.h>
3357#endif
3358#endif
3359#ifdef HAVE_STDLIB_H
3360#include <stdlib.h>
3361#endif
3362#ifdef HAVE_UNISTD_H
3363#include <unistd.h>
3364#endif
3365int main() {
3366char *(*pfn) = (char *(*)) free
3367; return 0; }
3368EOF
3369if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3370 rm -rf conftest*
3371 bfd_cv_decl_needed_free=no
3372else
3373 echo "configure: failed program was:" >&5
3374 cat conftest.$ac_ext >&5
3375 rm -rf conftest*
3376 bfd_cv_decl_needed_free=yes
3377fi
3378rm -f conftest*
3379fi
3380
3381echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
3382if test $bfd_cv_decl_needed_free = yes; then
3383 cat >> confdefs.h <<\EOF
3384#define NEED_DECLARATION_FREE 1
3385EOF
3386
3387fi
3388
3389echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
3390echo "configure:3391: checking whether getenv must be declared" >&5
3391if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
3392 echo $ac_n "(cached) $ac_c" 1>&6
3393else
3394 cat > conftest.$ac_ext <<EOF
3395#line 3396 "configure"
3396#include "confdefs.h"
3397
3398#include <stdio.h>
3399#ifdef HAVE_STRING_H
3400#include <string.h>
3401#else
3402#ifdef HAVE_STRINGS_H
3403#include <strings.h>
3404#endif
3405#endif
3406#ifdef HAVE_STDLIB_H
3407#include <stdlib.h>
3408#endif
3409#ifdef HAVE_UNISTD_H
3410#include <unistd.h>
3411#endif
3412int main() {
3413char *(*pfn) = (char *(*)) getenv
3414; return 0; }
3415EOF
3416if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3417 rm -rf conftest*
3418 bfd_cv_decl_needed_getenv=no
3419else
3420 echo "configure: failed program was:" >&5
3421 cat conftest.$ac_ext >&5
3422 rm -rf conftest*
3423 bfd_cv_decl_needed_getenv=yes
3424fi
3425rm -f conftest*
3426fi
3427
3428echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
3429if test $bfd_cv_decl_needed_getenv = yes; then
3430 cat >> confdefs.h <<\EOF
3431#define NEED_DECLARATION_GETENV 1
3432EOF
3433
3434fi
3435
3436
3437# If we are configured native, pick a core file support file.
3438COREFILE=
3439COREFLAG=
3440TRAD_HEADER=
3441if test "${target}" = "${host}"; then
3442 case "${host}" in
3443 alpha*-*-freebsd*)
3444 COREFILE=''
3445 ;;
3446 alpha*-*-linux-gnu*)
3447 COREFILE=trad-core.lo
3448 TRAD_HEADER='"hosts/alphalinux.h"'
3449 ;;
3450 alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
3451 alpha*-*-*) COREFILE=osf-core.lo ;;
3452 arm-*-freebsd*) COREFILE='' ;;
3453 arm-*-riscix) COREFILE=trad-core.lo ;;
3454 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
3455 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
3456 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
3457 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
3458 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
3459 i370-*-*)
3460 COREFILE=trad-core.lo
3461 TRAD_HEADER='"hosts/i370linux.h"'
3462 ;;
3463
3464 i[3456]86-sequent-bsd*)
3465 COREFILE=trad-core.lo
3466 TRAD_HEADER='"hosts/symmetry.h"'
3467 ;;
3468 i[3456]86-sequent-sysv4*) ;;
3469 i[3456]86-sequent-sysv*)
3470 COREFILE=trad-core.lo
3471 TRAD_HEADER='"hosts/symmetry.h"'
3472 ;;
3473 i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
3474 COREFILE=trad-core.lo
3475 TRAD_HEADER='"hosts/i386bsd.h"'
3476 ;;
3477 i[3456]86-*-freebsd*)
3478 COREFILE=''
3479 TRAD_HEADER='"hosts/i386bsd.h"'
3480 ;;
3481 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
3482 COREFILE=netbsd-core.lo
3483 ;;
3484 i[3456]86-esix-sysv3*)
3485 COREFILE=trad-core.lo
3486 TRAD_HEADER='"hosts/esix.h"'
3487 ;;
3488 i[3456]86-*-sco3.2v5*)
3489 COREFILE=sco5-core.lo
3490 ;;
3491 i[3456]86-*-sco* | i[3456]86-*-isc*)
3492 COREFILE=trad-core.lo
3493 TRAD_HEADER='"hosts/i386sco.h"'
3494 ;;
3495 i[3456]86-*-mach3*)
3496 COREFILE=trad-core.lo
3497 TRAD_HEADER='"hosts/i386mach3.h"'
3498 ;;
3499 i[3456]86-*-linux-gnu*)
3500 COREFILE=trad-core.lo
3501 TRAD_HEADER='"hosts/i386linux.h"'
3502 ;;
3503 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
3504 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
3505 i[3456]86-*-os2*)
3506 COREFILE=trad-core.lo
3507 cat >> confdefs.h <<\EOF
3508#define TRAD_HEADER "hosts/i386emx.h"
3509EOF
3510
3511 ;;
3512 i860-*-mach3* | i860-*-osf1*)
3513 COREFILE=trad-core.lo
3514 TRAD_HEADER='"hosts/i860mach3.h"'
3515 ;;
3516 mips-dec-bsd*)
3517 COREFILE=trad-core.lo
3518 TRAD_HEADER='"hosts/mipsbsd.h"'
3519 ;;
3520 mips-dec-mach3*)
3521 COREFILE=trad-core.lo
3522 TRAD_HEADER='"hosts/mipsmach3.h"'
3523 ;;
3524 mips-*-netbsd* | mips*-*-openbsd*)
3525 COREFILE=netbsd-core.lo
3526 ;;
3527 mips-dec-*)
3528 COREFILE=trad-core.lo
3529 TRAD_HEADER='"hosts/decstation.h"'
3530 ;;
3531 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
3532 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
3533 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
3534 mips-*-mach3*)
3535 COREFILE=trad-core.lo
3536 TRAD_HEADER='"hosts/mipsmach3.h"'
3537 ;;
3538 mips-*-sysv4*) ;;
3539 mips-*-sysv* | mips-*-riscos*)
3540 COREFILE=trad-core.lo
3541 TRAD_HEADER='"hosts/riscos.h"'
3542 ;;
3543 mips-sony-bsd*)
3544 COREFILE=trad-core.lo
3545 TRAD_HEADER='"hosts/news-mips.h"'
3546 ;;
3547 m68*-bull*-sysv*)
3548 COREFILE=trad-core.lo
3549 TRAD_HEADER='"hosts/dpx2.h"'
3550 ;;
3551 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
3552 m68*-hp-bsd*)
3553 COREFILE=trad-core.lo
3554 TRAD_HEADER='"hosts/hp300bsd.h"'
3555 ;;
3556 m68*-*-linux-gnu*)
3557 COREFILE=trad-core.lo
3558 TRAD_HEADER='"hosts/m68klinux.h"'
3559 ;;
3560 m68*-motorola-sysv*)
3561 COREFILE=trad-core.lo
3562 TRAD_HEADER='"hosts/delta68.h"'
3563 ;;
3564 m68*-sony-*)
3565 COREFILE=trad-core.lo
3566 TRAD_HEADER='"hosts/news.h"'
3567 ;;
3568 m68*-*-netbsd* | m68*-*-openbsd*)
3569 COREFILE=netbsd-core.lo
3570 ;;
3571 m68*-apple-aux*)
3572 COREFILE=trad-core.lo
3573 TRAD_HEADER='"hosts/m68kaux.h"'
3574 ;;
3575 m88*-*-sysv4*) ;;
3576 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
3577 m88*-*-mach3*)
3578 COREFILE=trad-core.lo
3579 TRAD_HEADER='"hosts/m88kmach3.h"'
3580 ;;
3581 ns32k-pc532-mach)
3582 COREFILE=trad-core.lo
3583 TRAD_HEADER='"hosts/pc532mach.h"'
3584 ;;
3585 ns32k-*-netbsd* | ns32k-*-openbsd*)
3586 COREFILE=netbsd-core.lo
3587 ;;
3588 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
3589 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
3590 COREFILE=rs6000-core.lo
3591 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
3592 ;;
3593 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
3594 rs6000-*-*) COREFILE=rs6000-core.lo ;;
3595 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
3596 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
3597 powerpc-*-beos*) ;;
3598 powerpc-*-freebsd*) COREFILE='' ;;
3599 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
3600 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
3601 sparc-*-netbsd* | sparc-*-openbsd*)
3602 COREFILE=netbsd-core.lo
3603 ;;
3604 tahoe-*-*)
3605 COREFILE=trad-core.lo
3606 TRAD_HEADER='"hosts/tahoe.h"'
3607 ;;
3608 vax-*-ultrix2*)
3609 COREFILE=trad-core.lo
3610 TRAD_HEADER='"hosts/vaxult2.h"'
3611 ;;
3612 vax-*-ultrix*)
3613 COREFILE=trad-core.lo
3614 TRAD_HEADER='"hosts/vaxult2.h"'
3615 ;;
3616 vax-*-*)
3617 COREFILE=trad-core.lo
3618 TRAD_HEADER='"hosts/vaxbsd.h"'
3619 ;;
3620 esac
3621
3622 case "$COREFILE" in
3623 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
3624 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
3625 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
3626 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
3627 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
3628 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
3629 osf-core.lo) COREFLAG=-DOSF_CORE ;;
3630 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
3631 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
3632 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
3633 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
3634 esac
3635
3636 # ELF corefile support has several flavors, but all of
3637 # them use something called <sys/procfs.h>
3638 for ac_hdr in sys/procfs.h
3639do
3640ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3641echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3642echo "configure:3643: checking for $ac_hdr" >&5
3643if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 cat > conftest.$ac_ext <<EOF
3647#include <sys/types.h>
3648#line 3649 "configure"
3649#include "confdefs.h"
3650#include <$ac_hdr>
3651EOF
3652ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3653{ (eval echo configure:3654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3654ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3655if test -z "$ac_err"; then
3656 rm -rf conftest*
3657 eval "ac_cv_header_$ac_safe=yes"
3658else
3659 echo "$ac_err" >&5
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3662 rm -rf conftest*
3663 eval "ac_cv_header_$ac_safe=no"
3664fi
3665rm -f conftest*
3666fi
3667if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3668 echo "$ac_t""yes" 1>&6
3669 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3670 cat >> confdefs.h <<EOF
3671#define $ac_tr_hdr 1
3672EOF
3673
3674else
3675 echo "$ac_t""no" 1>&6
3676fi
3677done
3678
3679 if test "$ac_cv_header_sys_procfs_h" = yes; then
3680 echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
3681echo "configure:3682: checking for prstatus_t in sys/procfs.h" >&5
3682 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
3683 echo $ac_n "(cached) $ac_c" 1>&6
3684else
3685 cat > conftest.$ac_ext <<EOF
3686#line 3687 "configure"
3687#include "confdefs.h"
3688
3689#define _SYSCALL32
3690#include <sys/procfs.h>
3691int main() {
3692prstatus_t avar
3693; return 0; }
3694EOF
3695if { (eval echo configure:3696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3696 rm -rf conftest*
3697 bfd_cv_have_sys_procfs_type_prstatus_t=yes
3698else
3699 echo "configure: failed program was:" >&5
3700 cat conftest.$ac_ext >&5
3701 rm -rf conftest*
3702 bfd_cv_have_sys_procfs_type_prstatus_t=no
3703
3704fi
3705rm -f conftest*
3706fi
3707
3708 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
3709 cat >> confdefs.h <<\EOF
3710#define HAVE_PRSTATUS_T 1
3711EOF
3712
3713 fi
3714 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
3715
3716 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
3717echo "configure:3718: checking for prstatus32_t in sys/procfs.h" >&5
3718 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
3720else
3721 cat > conftest.$ac_ext <<EOF
3722#line 3723 "configure"
3723#include "confdefs.h"
3724
3725#define _SYSCALL32
3726#include <sys/procfs.h>
3727int main() {
3728prstatus32_t avar
3729; return 0; }
3730EOF
3731if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3732 rm -rf conftest*
3733 bfd_cv_have_sys_procfs_type_prstatus32_t=yes
3734else
3735 echo "configure: failed program was:" >&5
3736 cat conftest.$ac_ext >&5
3737 rm -rf conftest*
3738 bfd_cv_have_sys_procfs_type_prstatus32_t=no
3739
3740fi
3741rm -f conftest*
3742fi
3743
3744 if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
3745 cat >> confdefs.h <<\EOF
3746#define HAVE_PRSTATUS32_T 1
3747EOF
3748
3749 fi
3750 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
3751
3752 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
3753echo "configure:3754: checking for prstatus_t.pr_who in sys/procfs.h" >&5
3754 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
3755 echo $ac_n "(cached) $ac_c" 1>&6
3756else
3757 cat > conftest.$ac_ext <<EOF
3758#line 3759 "configure"
3759#include "confdefs.h"
3760
3761#define _SYSCALL32
3762#include <sys/procfs.h>
3763int main() {
3764prstatus_t avar; void* aref = (void*) &avar.pr_who
3765; return 0; }
3766EOF
3767if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3768 rm -rf conftest*
3769 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
3770else
3771 echo "configure: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3773 rm -rf conftest*
3774 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
3775
3776fi
3777rm -f conftest*
3778fi
3779
3780 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
3781 cat >> confdefs.h <<\EOF
3782#define HAVE_PRSTATUS_T_PR_WHO 1
3783EOF
3784
3785 fi
3786 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
3787
3788 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
3789echo "configure:3790: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
3790 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
3791 echo $ac_n "(cached) $ac_c" 1>&6
3792else
3793 cat > conftest.$ac_ext <<EOF
3794#line 3795 "configure"
3795#include "confdefs.h"
3796
3797#define _SYSCALL32
3798#include <sys/procfs.h>
3799int main() {
3800prstatus32_t avar; void* aref = (void*) &avar.pr_who
3801; return 0; }
3802EOF
3803if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3804 rm -rf conftest*
3805 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
3806else
3807 echo "configure: failed program was:" >&5
3808 cat conftest.$ac_ext >&5
3809 rm -rf conftest*
3810 bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
3811
3812fi
3813rm -f conftest*
3814fi
3815
3816 if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
3817 cat >> confdefs.h <<\EOF
3818#define HAVE_PRSTATUS32_T_PR_WHO 1
3819EOF
3820
3821 fi
3822 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
3823
3824 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
3825echo "configure:3826: checking for pstatus_t in sys/procfs.h" >&5
3826 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
3827 echo $ac_n "(cached) $ac_c" 1>&6
3828else
3829 cat > conftest.$ac_ext <<EOF
3830#line 3831 "configure"
3831#include "confdefs.h"
3832
3833#define _SYSCALL32
3834#include <sys/procfs.h>
3835int main() {
3836pstatus_t avar
3837; return 0; }
3838EOF
3839if { (eval echo configure:3840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3840 rm -rf conftest*
3841 bfd_cv_have_sys_procfs_type_pstatus_t=yes
3842else
3843 echo "configure: failed program was:" >&5
3844 cat conftest.$ac_ext >&5
3845 rm -rf conftest*
3846 bfd_cv_have_sys_procfs_type_pstatus_t=no
3847
3848fi
3849rm -f conftest*
3850fi
3851
3852 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
3853 cat >> confdefs.h <<\EOF
3854#define HAVE_PSTATUS_T 1
3855EOF
3856
3857 fi
3858 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
3859
3860 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
3861echo "configure:3862: checking for pxstatus_t in sys/procfs.h" >&5
3862 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
3863 echo $ac_n "(cached) $ac_c" 1>&6
3864else
3865 cat > conftest.$ac_ext <<EOF
3866#line 3867 "configure"
3867#include "confdefs.h"
3868
3869#define _SYSCALL32
3870#include <sys/procfs.h>
3871int main() {
3872pxstatus_t avar
3873; return 0; }
3874EOF
3875if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3876 rm -rf conftest*
3877 bfd_cv_have_sys_procfs_type_pxstatus_t=yes
3878else
3879 echo "configure: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
3881 rm -rf conftest*
3882 bfd_cv_have_sys_procfs_type_pxstatus_t=no
3883
3884fi
3885rm -f conftest*
3886fi
3887
3888 if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
3889 cat >> confdefs.h <<\EOF
3890#define HAVE_PXSTATUS_T 1
3891EOF
3892
3893 fi
3894 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
3895
3896 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
3897echo "configure:3898: checking for pstatus32_t in sys/procfs.h" >&5
3898 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
3899 echo $ac_n "(cached) $ac_c" 1>&6
3900else
3901 cat > conftest.$ac_ext <<EOF
3902#line 3903 "configure"
3903#include "confdefs.h"
3904
3905#define _SYSCALL32
3906#include <sys/procfs.h>
3907int main() {
3908pstatus32_t avar
3909; return 0; }
3910EOF
3911if { (eval echo configure:3912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3912 rm -rf conftest*
3913 bfd_cv_have_sys_procfs_type_pstatus32_t=yes
3914else
3915 echo "configure: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 rm -rf conftest*
3918 bfd_cv_have_sys_procfs_type_pstatus32_t=no
3919
3920fi
3921rm -f conftest*
3922fi
3923
3924 if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
3925 cat >> confdefs.h <<\EOF
3926#define HAVE_PSTATUS32_T 1
3927EOF
3928
3929 fi
3930 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
3931
3932 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
3933echo "configure:3934: checking for prpsinfo_t in sys/procfs.h" >&5
3934 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
3935 echo $ac_n "(cached) $ac_c" 1>&6
3936else
3937 cat > conftest.$ac_ext <<EOF
3938#line 3939 "configure"
3939#include "confdefs.h"
3940
3941#define _SYSCALL32
3942#include <sys/procfs.h>
3943int main() {
3944prpsinfo_t avar
3945; return 0; }
3946EOF
3947if { (eval echo configure:3948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3948 rm -rf conftest*
3949 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
3950else
3951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953 rm -rf conftest*
3954 bfd_cv_have_sys_procfs_type_prpsinfo_t=no
3955
3956fi
3957rm -f conftest*
3958fi
3959
3960 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
3961 cat >> confdefs.h <<\EOF
3962#define HAVE_PRPSINFO_T 1
3963EOF
3964
3965 fi
3966 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
3967
3968 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
3969echo "configure:3970: checking for prpsinfo32_t in sys/procfs.h" >&5
3970 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
3971 echo $ac_n "(cached) $ac_c" 1>&6
3972else
3973 cat > conftest.$ac_ext <<EOF
3974#line 3975 "configure"
3975#include "confdefs.h"
3976
3977#define _SYSCALL32
3978#include <sys/procfs.h>
3979int main() {
3980prpsinfo32_t avar
3981; return 0; }
3982EOF
3983if { (eval echo configure:3984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3984 rm -rf conftest*
3985 bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
3986else
3987 echo "configure: failed program was:" >&5
3988 cat conftest.$ac_ext >&5
3989 rm -rf conftest*
3990 bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
3991
3992fi
3993rm -f conftest*
3994fi
3995
3996 if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
3997 cat >> confdefs.h <<\EOF
3998#define HAVE_PRPSINFO32_T 1
3999EOF
4000
4001 fi
4002 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
4003
4004 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
4005echo "configure:4006: checking for psinfo_t in sys/procfs.h" >&5
4006 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
4007 echo $ac_n "(cached) $ac_c" 1>&6
4008else
4009 cat > conftest.$ac_ext <<EOF
4010#line 4011 "configure"
4011#include "confdefs.h"
4012
4013#define _SYSCALL32
4014#include <sys/procfs.h>
4015int main() {
4016psinfo_t avar
4017; return 0; }
4018EOF
4019if { (eval echo configure:4020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4020 rm -rf conftest*
4021 bfd_cv_have_sys_procfs_type_psinfo_t=yes
4022else
4023 echo "configure: failed program was:" >&5
4024 cat conftest.$ac_ext >&5
4025 rm -rf conftest*
4026 bfd_cv_have_sys_procfs_type_psinfo_t=no
4027
4028fi
4029rm -f conftest*
4030fi
4031
4032 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
4033 cat >> confdefs.h <<\EOF
4034#define HAVE_PSINFO_T 1
4035EOF
4036
4037 fi
4038 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
4039
4040 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
4041echo "configure:4042: checking for psinfo32_t in sys/procfs.h" >&5
4042 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
4043 echo $ac_n "(cached) $ac_c" 1>&6
4044else
4045 cat > conftest.$ac_ext <<EOF
4046#line 4047 "configure"
4047#include "confdefs.h"
4048
4049#define _SYSCALL32
4050#include <sys/procfs.h>
4051int main() {
4052psinfo32_t avar
4053; return 0; }
4054EOF
4055if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4056 rm -rf conftest*
4057 bfd_cv_have_sys_procfs_type_psinfo32_t=yes
4058else
4059 echo "configure: failed program was:" >&5
4060 cat conftest.$ac_ext >&5
4061 rm -rf conftest*
4062 bfd_cv_have_sys_procfs_type_psinfo32_t=no
4063
4064fi
4065rm -f conftest*
4066fi
4067
4068 if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
4069 cat >> confdefs.h <<\EOF
4070#define HAVE_PSINFO32_T 1
4071EOF
4072
4073 fi
4074 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
4075
4076 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
4077echo "configure:4078: checking for lwpstatus_t in sys/procfs.h" >&5
4078 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
4079 echo $ac_n "(cached) $ac_c" 1>&6
4080else
4081 cat > conftest.$ac_ext <<EOF
4082#line 4083 "configure"
4083#include "confdefs.h"
4084
4085#define _SYSCALL32
4086#include <sys/procfs.h>
4087int main() {
4088lwpstatus_t avar
4089; return 0; }
4090EOF
4091if { (eval echo configure:4092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4092 rm -rf conftest*
4093 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
4094else
4095 echo "configure: failed program was:" >&5
4096 cat conftest.$ac_ext >&5
4097 rm -rf conftest*
4098 bfd_cv_have_sys_procfs_type_lwpstatus_t=no
4099
4100fi
4101rm -f conftest*
4102fi
4103
4104 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
4105 cat >> confdefs.h <<\EOF
4106#define HAVE_LWPSTATUS_T 1
4107EOF
4108
4109 fi
4110 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
4111
4112 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
4113echo "configure:4114: checking for lwpxstatus_t in sys/procfs.h" >&5
4114 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
4115 echo $ac_n "(cached) $ac_c" 1>&6
4116else
4117 cat > conftest.$ac_ext <<EOF
4118#line 4119 "configure"
4119#include "confdefs.h"
4120
4121#define _SYSCALL32
4122#include <sys/procfs.h>
4123int main() {
4124lwpxstatus_t avar
4125; return 0; }
4126EOF
4127if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4128 rm -rf conftest*
4129 bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
4130else
4131 echo "configure: failed program was:" >&5
4132 cat conftest.$ac_ext >&5
4133 rm -rf conftest*
4134 bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
4135
4136fi
4137rm -f conftest*
4138fi
4139
4140 if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
4141 cat >> confdefs.h <<\EOF
4142#define HAVE_LWPXSTATUS_T 1
4143EOF
4144
4145 fi
4146 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
4147
4148 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
4149echo "configure:4150: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
4150 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
4151 echo $ac_n "(cached) $ac_c" 1>&6
4152else
4153 cat > conftest.$ac_ext <<EOF
4154#line 4155 "configure"
4155#include "confdefs.h"
4156
4157#define _SYSCALL32
4158#include <sys/procfs.h>
4159int main() {
4160lwpstatus_t avar; void* aref = (void*) &avar.pr_context
4161; return 0; }
4162EOF
4163if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4164 rm -rf conftest*
4165 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
4166else
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169 rm -rf conftest*
4170 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
4171
4172fi
4173rm -f conftest*
4174fi
4175
4176 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
4177 cat >> confdefs.h <<\EOF
4178#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
4179EOF
4180
4181 fi
4182 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
4183
4184 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
4185echo "configure:4186: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
4186 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
4187 echo $ac_n "(cached) $ac_c" 1>&6
4188else
4189 cat > conftest.$ac_ext <<EOF
4190#line 4191 "configure"
4191#include "confdefs.h"
4192
4193#define _SYSCALL32
4194#include <sys/procfs.h>
4195int main() {
4196lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
4197; return 0; }
4198EOF
4199if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4200 rm -rf conftest*
4201 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
4202else
4203 echo "configure: failed program was:" >&5
4204 cat conftest.$ac_ext >&5
4205 rm -rf conftest*
4206 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
4207
4208fi
4209rm -f conftest*
4210fi
4211
4212 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
4213 cat >> confdefs.h <<\EOF
4214#define HAVE_LWPSTATUS_T_PR_REG 1
4215EOF
4216
4217 fi
4218 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
4219
4220 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
4221echo "configure:4222: checking for win32_pstatus_t in sys/procfs.h" >&5
4222 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
4223 echo $ac_n "(cached) $ac_c" 1>&6
4224else
4225 cat > conftest.$ac_ext <<EOF
4226#line 4227 "configure"
4227#include "confdefs.h"
4228
4229#define _SYSCALL32
4230#include <sys/procfs.h>
4231int main() {
4232win32_pstatus_t avar
4233; return 0; }
4234EOF
4235if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4236 rm -rf conftest*
4237 bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
4238else
4239 echo "configure: failed program was:" >&5
4240 cat conftest.$ac_ext >&5
4241 rm -rf conftest*
4242 bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
4243
4244fi
4245rm -f conftest*
4246fi
4247
4248 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
4249 cat >> confdefs.h <<\EOF
4250#define HAVE_WIN32_PSTATUS_T 1
4251EOF
4252
4253 fi
4254 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
4255
4256 fi
4257fi
4258
4259
4260if test -n "$TRAD_HEADER"; then
4261 cat >> confdefs.h <<EOF
4262#define TRAD_HEADER $TRAD_HEADER
4263EOF
4264
4265fi
4266
4267# Horrible hacks to build DLLs on Windows.
4268WIN32LDFLAGS=
4269WIN32LIBADD=
4270case "${host}" in
4271*-*-cygwin*)
4272 if test "$enable_shared" = "yes"; then
4273 WIN32LDFLAGS="-no-undefined"
4274 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
4275 fi
4276 ;;
4277esac
4278
4279
4280
4281# target stuff:
4282
4283# Canonicalize the secondary target names.
4284if test -n "$enable_targets" ; then
4285 for targ in `echo $enable_targets | sed 's/,/ /g'`
4286 do
4287 result=`$ac_config_sub $targ 2>/dev/null`
4288 if test -n "$result" ; then
4289 canon_targets="$canon_targets $result"
4290 else
4291 # Allow targets that config.sub doesn't recognize, like "all".
4292 canon_targets="$canon_targets $targ"
4293 fi
4294 done
4295fi
4296
4297all_targets=false
4298defvec=
4299selvecs=
4300selarchs=
4301TDEFINES=
4302for targ in $target $canon_targets
4303do
4304 if test "x$targ" = "xall"; then
4305 all_targets=true
4306 else
4307 . $srcdir/config.bfd
4308 if test "x$targ" = "x$target"; then
4309 defvec=$targ_defvec
4310 fi
4311 selvecs="$selvecs $targ_defvec $targ_selvecs"
4312 selarchs="$selarchs $targ_archs"
4313 TDEFINES="$TDEFINES $targ_cflags"
4314 fi
4315done
4316
4317
4318# This processing still needs to be done if we're to decide properly whether
4319# 64-bit support needs to be compiled in. Currently, it will be included if
4320# the default or any other explicitly requested target requires it; it
4321# will not be included on a 32-bit host if no 64-bit target is requested, and
4322# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
4323# used.
4324
4325# uniq the default and selected vectors in all the configured targets.
4326f=""
4327for i in $selvecs ; do
4328 case " $f " in
4329 *" $i "*) ;;
4330 *) f="$f $i" ;;
4331 esac
4332done
4333selvecs="$f"
4334
4335
4336# uniq the architectures in all the configured targets.
4337f=""
4338for i in $selarchs ; do
4339 case " $f " in
4340 *" $i "*) ;;
4341 *) f="$f $i" ;;
4342 esac
4343done
4344selarchs="$f"
4345
4346# Target backend .o files.
4347tb=
4348
4349elf="elf.lo elflink.lo dwarf1.lo"
4350
4351for vec in $selvecs
4352do
4353 case "$vec" in
4354 # This list is alphabetized to make it easy to compare
4355 # with the two vector lists in targets.c.
4356 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
4357 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
4358 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
4359 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
4360 armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
4361 armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
4362 armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
4363 armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
4364 armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
4365 arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
4366 arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
4367 arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
4368 arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
4369 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
4370 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4371 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4372 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4373 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4374 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
4375 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
4376 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
4377 bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
4378 bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"
4379 target64=true ;;
4380 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
4381 target64=true ;;
4382 bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec)
4383 tb="$tb elf64-hppa.lo elf64.lo $elf"
4384 target64=true ;;
4385 bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
4386 target64=true ;;
4387 bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
4388 target64=true ;;
4389 bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
4390 bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
4391 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
4392 bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
4393 bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
4394 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
4395 bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
4396 bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
4397 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4398 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4399 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
4400 target64=true ;;
4401 bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
4402 bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
4403 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
4404 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
4405 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
4406 bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec)
4407 tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
4408 bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
4409 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
4410 bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"
4411 target64=true ;;
4412 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
4413 bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
4414 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
4415 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4416 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4417 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
4418 target64=true ;;
4419 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
4420 bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
4421 bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
4422 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
4423 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
4424 bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
4425 bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
4426 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
4427 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
4428 bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
4429 bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
4430 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4431 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4432 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4433 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4434 bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
4435 bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
4436 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
4437 bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4438 bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4439 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
4440 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
4441 target64=true ;;
4442 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
4443 target64=true ;;
4444 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
4445 target64=true ;;
4446 bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
4447 target64=true ;;
4448 bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
4449 target64=true ;;
4450 cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
4451 cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
4452 cris_aout_vec) tb="$tb aout-cris.lo" ;;
4453 demo_64_vec) tb="$tb demo64.lo aout64.lo"
4454 target64=true ;;
4455 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4456 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4457 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4458 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
4459 target64=true ;;
4460 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
4461 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
4462 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
4463 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
4464 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
4465 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
4466 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
4467 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
4468 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
4469 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
4470 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
4471 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
4472 i386msdos_vec) tb="$tb i386msdos.lo" ;;
4473 i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
4474 i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
4475 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
4476 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
4477 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
4478 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
4479 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
4480 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
4481 i386aout_emx_vec) tb="$tb i386aoutemx.lo aout32.lo " ;;
4482 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
4483 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4484 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4485 ieee_vec) tb="$tb ieee.lo" ;;
4486 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
4487 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
4488 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
4489 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
4490 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
4491 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
4492 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
4493 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
4494 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
4495 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
4496 mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
4497 mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
4498 mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
4499 mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
4500 mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
4501 mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
4502 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
4503 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
4504 rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
4505 target64=true ;;
4506 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
4507 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
4508 target64=true ;;
4509 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
4510 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
4511 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
4512 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
4513 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
4514 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
4515 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
4516 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
4517 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
4518 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
4519 ppcboot_vec) tb="$tb ppcboot.lo" ;;
4520 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4521 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4522 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4523 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4524 shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
4525 shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
4526 som_vec) tb="$tb som.lo" ;;
4527 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
4528 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
4529 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
4530 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
4531 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
4532 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
4533 srec_vec) tb="$tb srec.lo" ;;
4534 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
4535 symbolsrec_vec) tb="$tb srec.lo" ;;
4536 tekhex_vec) tb="$tb tekhex.lo" ;;
4537 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
4538 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
4539 tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
4540 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
4541 tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
4542 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
4543 tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
4544 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
4545 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
4546 versados_vec) tb="$tb versados.lo" ;;
4547 vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
4548 target64=true ;;
4549 vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
4550 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
4551 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
4552 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
4553
4554 "") ;;
4555 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
4556 esac
4557done
4558
4559# Target architecture .o files.
4560# A couple of CPUs use shorter file names to avoid problems on DOS
4561# filesystems.
4562ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
4563
4564# Weed out duplicate .o files.
4565f=""
4566for i in $tb ; do
4567 case " $f " in
4568 *" $i "*) ;;
4569 *) f="$f $i" ;;
4570 esac
4571done
4572tb="$f"
4573
4574f=""
4575for i in $ta ; do
4576 case " $f " in
4577 *" $i "*) ;;
4578 *) f="$f $i" ;;
4579 esac
4580done
4581ta="$f"
4582
4583bfd_backends="$tb"
4584bfd_machines="$ta"
4585
4586if test x${all_targets} = xtrue ; then
4587 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
4588 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
4589 selvecs=
4590 havevecs=
4591 selarchs=
4592else # all_targets is true
4593 # Only set these if they will be nonempty, for the clever echo.
4594 havevecs=
4595 test -n "$selvecs" &&
4596 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
4597 test -n "$selvecs" &&
4598 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
4599 test -n "$selarchs" &&
4600 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
4601fi # all_targets is true
4602
4603case ${host64}-${target64}-${want64} in
4604 *true*)
4605 wordsize=64
4606 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
4607 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
4608 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
4609 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
4610 fi
4611 ;;
4612 false-false-false)
4613 wordsize=32
4614 all_backends='$(BFD32_BACKENDS)'
4615 ;;
4616esac
4617
4618
4619
4620
4621
4622
4623tdefaults=""
4624test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
4625test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
4626test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
4627test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
4628
4629
4630for ac_hdr in unistd.h
4631do
4632ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4633echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4634echo "configure:4635: checking for $ac_hdr" >&5
4635if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4636 echo $ac_n "(cached) $ac_c" 1>&6
4637else
4638 cat > conftest.$ac_ext <<EOF
4639#include <sys/types.h>
4640#line 4641 "configure"
4641#include "confdefs.h"
4642#include <$ac_hdr>
4643EOF
4644ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4645{ (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4646ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4647if test -z "$ac_err"; then
4648 rm -rf conftest*
4649 eval "ac_cv_header_$ac_safe=yes"
4650else
4651 echo "$ac_err" >&5
4652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 rm -rf conftest*
4655 eval "ac_cv_header_$ac_safe=no"
4656fi
4657rm -f conftest*
4658fi
4659if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4660 echo "$ac_t""yes" 1>&6
4661 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4662 cat >> confdefs.h <<EOF
4663#define $ac_tr_hdr 1
4664EOF
4665
4666else
4667 echo "$ac_t""no" 1>&6
4668fi
4669done
4670
4671for ac_func in getpagesize
4672do
4673echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4674echo "configure:4675: checking for $ac_func" >&5
4675if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4676 echo $ac_n "(cached) $ac_c" 1>&6
4677else
4678 cat > conftest.$ac_ext <<EOF
4679#line 4680 "configure"
4680#include "confdefs.h"
4681/* System header to define __stub macros and hopefully few prototypes,
4682 which can conflict with char $ac_func(); below. */
4683#include <assert.h>
4684/* Override any gcc2 internal prototype to avoid an error. */
4685/* We use char because int might match the return type of a gcc2
4686 builtin and then its argument prototype would still apply. */
4687char $ac_func();
4688
4689int main() {
4690
4691/* The GNU C library defines this for functions which it implements
4692 to always fail with ENOSYS. Some functions are actually named
4693 something starting with __ and the normal name is an alias. */
4694#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4695choke me
4696#else
4697$ac_func();
4698#endif
4699
4700; return 0; }
4701EOF
4702if { (eval echo configure:4703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4703 rm -rf conftest*
4704 eval "ac_cv_func_$ac_func=yes"
4705else
4706 echo "configure: failed program was:" >&5
4707 cat conftest.$ac_ext >&5
4708 rm -rf conftest*
4709 eval "ac_cv_func_$ac_func=no"
4710fi
4711rm -f conftest*
4712fi
4713
4714if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4715 echo "$ac_t""yes" 1>&6
4716 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4717 cat >> confdefs.h <<EOF
4718#define $ac_tr_func 1
4719EOF
4720
4721else
4722 echo "$ac_t""no" 1>&6
4723fi
4724done
4725
4726echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4727echo "configure:4728: checking for working mmap" >&5
4728if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4729 echo $ac_n "(cached) $ac_c" 1>&6
4730else
4731 if test "$cross_compiling" = yes; then
4732 ac_cv_func_mmap_fixed_mapped=no
4733else
4734 cat > conftest.$ac_ext <<EOF
4735#line 4736 "configure"
4736#include "confdefs.h"
4737
4738/* Thanks to Mike Haertel and Jim Avera for this test.
4739 Here is a matrix of mmap possibilities:
4740 mmap private not fixed
4741 mmap private fixed at somewhere currently unmapped
4742 mmap private fixed at somewhere already mapped
4743 mmap shared not fixed
4744 mmap shared fixed at somewhere currently unmapped
4745 mmap shared fixed at somewhere already mapped
4746 For private mappings, we should verify that changes cannot be read()
4747 back from the file, nor mmap's back from the file at a different
4748 address. (There have been systems where private was not correctly
4749 implemented like the infamous i386 svr4.0, and systems where the
4750 VM page cache was not coherent with the filesystem buffer cache
4751 like early versions of FreeBSD and possibly contemporary NetBSD.)
4752 For shared mappings, we should conversely verify that changes get
4753 propogated back to all the places they're supposed to be.
4754
4755 Grep wants private fixed already mapped.
4756 The main things grep needs to know about mmap are:
4757 * does it exist and is it safe to write into the mmap'd area
4758 * how to use it (BSD variants) */
4759#include <sys/types.h>
4760#include <fcntl.h>
4761#include <sys/mman.h>
4762
4763/* This mess was copied from the GNU getpagesize.h. */
4764#ifndef HAVE_GETPAGESIZE
4765# ifdef HAVE_UNISTD_H
4766# include <unistd.h>
4767# endif
4768
4769/* Assume that all systems that can run configure have sys/param.h. */
4770# ifndef HAVE_SYS_PARAM_H
4771# define HAVE_SYS_PARAM_H 1
4772# endif
4773
4774# ifdef _SC_PAGESIZE
4775# define getpagesize() sysconf(_SC_PAGESIZE)
4776# else /* no _SC_PAGESIZE */
4777# ifdef HAVE_SYS_PARAM_H
4778# include <sys/param.h>
4779# ifdef EXEC_PAGESIZE
4780# define getpagesize() EXEC_PAGESIZE
4781# else /* no EXEC_PAGESIZE */
4782# ifdef NBPG
4783# define getpagesize() NBPG * CLSIZE
4784# ifndef CLSIZE
4785# define CLSIZE 1
4786# endif /* no CLSIZE */
4787# else /* no NBPG */
4788# ifdef NBPC
4789# define getpagesize() NBPC
4790# else /* no NBPC */
4791# ifdef PAGESIZE
4792# define getpagesize() PAGESIZE
4793# endif /* PAGESIZE */
4794# endif /* no NBPC */
4795# endif /* no NBPG */
4796# endif /* no EXEC_PAGESIZE */
4797# else /* no HAVE_SYS_PARAM_H */
4798# define getpagesize() 8192 /* punt totally */
4799# endif /* no HAVE_SYS_PARAM_H */
4800# endif /* no _SC_PAGESIZE */
4801
4802#endif /* no HAVE_GETPAGESIZE */
4803
4804#ifdef __cplusplus
4805extern "C" { void *malloc(unsigned); }
4806#else
4807char *malloc();
4808#endif
4809
4810int
4811main()
4812{
4813 char *data, *data2, *data3;
4814 int i, pagesize;
4815 int fd;
4816
4817 pagesize = getpagesize();
4818
4819 /*
4820 * First, make a file with some known garbage in it.
4821 */
4822 data = malloc(pagesize);
4823 if (!data)
4824 exit(1);
4825 for (i = 0; i < pagesize; ++i)
4826 *(data + i) = rand();
4827 umask(0);
4828 fd = creat("conftestmmap", 0600);
4829 if (fd < 0)
4830 exit(1);
4831 if (write(fd, data, pagesize) != pagesize)
4832 exit(1);
4833 close(fd);
4834
4835 /*
4836 * Next, try to mmap the file at a fixed address which
4837 * already has something else allocated at it. If we can,
4838 * also make sure that we see the same garbage.
4839 */
4840 fd = open("conftestmmap", O_RDWR);
4841 if (fd < 0)
4842 exit(1);
4843 data2 = malloc(2 * pagesize);
4844 if (!data2)
4845 exit(1);
4846 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4847 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4848 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4849 exit(1);
4850 for (i = 0; i < pagesize; ++i)
4851 if (*(data + i) != *(data2 + i))
4852 exit(1);
4853
4854 /*
4855 * Finally, make sure that changes to the mapped area
4856 * do not percolate back to the file as seen by read().
4857 * (This is a bug on some variants of i386 svr4.0.)
4858 */
4859 for (i = 0; i < pagesize; ++i)
4860 *(data2 + i) = *(data2 + i) + 1;
4861 data3 = malloc(pagesize);
4862 if (!data3)
4863 exit(1);
4864 if (read(fd, data3, pagesize) != pagesize)
4865 exit(1);
4866 for (i = 0; i < pagesize; ++i)
4867 if (*(data + i) != *(data3 + i))
4868 exit(1);
4869 close(fd);
4870 unlink("conftestmmap");
4871 exit(0);
4872}
4873
4874EOF
4875if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4876then
4877 ac_cv_func_mmap_fixed_mapped=yes
4878else
4879 echo "configure: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4881 rm -fr conftest*
4882 ac_cv_func_mmap_fixed_mapped=no
4883fi
4884rm -fr conftest*
4885fi
4886
4887fi
4888
4889echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4890if test $ac_cv_func_mmap_fixed_mapped = yes; then
4891 cat >> confdefs.h <<\EOF
4892#define HAVE_MMAP 1
4893EOF
4894
4895fi
4896
4897for ac_func in madvise mprotect
4898do
4899echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4900echo "configure:4901: checking for $ac_func" >&5
4901if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4902 echo $ac_n "(cached) $ac_c" 1>&6
4903else
4904 cat > conftest.$ac_ext <<EOF
4905#line 4906 "configure"
4906#include "confdefs.h"
4907/* System header to define __stub macros and hopefully few prototypes,
4908 which can conflict with char $ac_func(); below. */
4909#include <assert.h>
4910/* Override any gcc2 internal prototype to avoid an error. */
4911/* We use char because int might match the return type of a gcc2
4912 builtin and then its argument prototype would still apply. */
4913char $ac_func();
4914
4915int main() {
4916
4917/* The GNU C library defines this for functions which it implements
4918 to always fail with ENOSYS. Some functions are actually named
4919 something starting with __ and the normal name is an alias. */
4920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4921choke me
4922#else
4923$ac_func();
4924#endif
4925
4926; return 0; }
4927EOF
4928if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929 rm -rf conftest*
4930 eval "ac_cv_func_$ac_func=yes"
4931else
4932 echo "configure: failed program was:" >&5
4933 cat conftest.$ac_ext >&5
4934 rm -rf conftest*
4935 eval "ac_cv_func_$ac_func=no"
4936fi
4937rm -f conftest*
4938fi
4939
4940if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4941 echo "$ac_t""yes" 1>&6
4942 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4943 cat >> confdefs.h <<EOF
4944#define $ac_tr_func 1
4945EOF
4946
4947else
4948 echo "$ac_t""no" 1>&6
4949fi
4950done
4951
4952case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
4953 true+yes ) cat >> confdefs.h <<\EOF
4954#define USE_MMAP 1
4955EOF
4956 ;;
4957esac
4958
4959rm -f doc/config.status
4960trap '' 1 2 15
4961cat > confcache <<\EOF
4962# This file is a shell script that caches the results of configure
4963# tests run on this system so they can be shared between configure
4964# scripts and configure runs. It is not useful on other systems.
4965# If it contains results you don't want to keep, you may remove or edit it.
4966#
4967# By default, configure uses ./config.cache as the cache file,
4968# creating it if it does not exist already. You can give configure
4969# the --cache-file=FILE option to use a different cache file; that is
4970# what configure does when it calls configure scripts in
4971# subdirectories, so they share the cache.
4972# Giving --cache-file=/dev/null disables caching, for debugging configure.
4973# config.status only pays attention to the cache file if you give it the
4974# --recheck option to rerun configure.
4975#
4976EOF
4977# The following way of writing the cache mishandles newlines in values,
4978# but we know of no workaround that is simple, portable, and efficient.
4979# So, don't put newlines in cache variables' values.
4980# Ultrix sh set writes to stderr and can't be redirected directly,
4981# and sets the high bit in the cache file unless we assign to the vars.
4982(set) 2>&1 |
4983 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4984 *ac_space=\ *)
4985 # `set' does not quote correctly, so add quotes (double-quote substitution
4986 # turns \\\\ into \\, and sed turns \\ into \).
4987 sed -n \
4988 -e "s/'/'\\\\''/g" \
4989 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4990 ;;
4991 *)
4992 # `set' quotes correctly as required by POSIX, so do not add quotes.
4993 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4994 ;;
4995 esac >> confcache
4996if cmp -s $cache_file confcache; then
4997 :
4998else
4999 if test -w $cache_file; then
5000 echo "updating cache $cache_file"
5001 cat confcache > $cache_file
5002 else
5003 echo "not updating unwritable cache $cache_file"
5004 fi
5005fi
5006rm -f confcache
5007
5008trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5009
5010test "x$prefix" = xNONE && prefix=$ac_default_prefix
5011# Let make expand exec_prefix.
5012test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5013
5014# Any assignment to VPATH causes Sun make to only execute
5015# the first set of double-colon rules, so remove it if not needed.
5016# If there is a colon in the path, we need to keep it.
5017if test "x$srcdir" = x.; then
5018 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5019fi
5020
5021trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5022
5023DEFS=-DHAVE_CONFIG_H
5024
5025# Without the "./", some shells look in PATH for config.status.
5026: ${CONFIG_STATUS=./config.status}
5027
5028echo creating $CONFIG_STATUS
5029rm -f $CONFIG_STATUS
5030cat > $CONFIG_STATUS <<EOF
5031#! /bin/sh
5032# Generated automatically by configure.
5033# Run this file to recreate the current configuration.
5034# This directory was configured as follows,
5035EOF
5036echo ': ${CONFIG_SHELL='"${CONFIG_SHELL-/bin/sh}"'}' >> $CONFIG_STATUS
5037cat >> $CONFIG_STATUS <<EOF
5038# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5039#
5040# $0 $ac_configure_args
5041#
5042# Compiler output produced by configure, useful for debugging
5043# configure, is in ./config.log if it exists.
5044
5045ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5046for ac_option
5047do
5048 case "\$ac_option" in
5049 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5050 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5051 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5052 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5053 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5054 exit 0 ;;
5055 -help | --help | --hel | --he | --h)
5056 echo "\$ac_cs_usage"; exit 0 ;;
5057 *) echo "\$ac_cs_usage"; exit 1 ;;
5058 esac
5059done
5060
5061ac_given_srcdir=$srcdir
5062ac_given_INSTALL="$INSTALL"
5063PATHIFS="$PATH_IFS"
5064
5065trap '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
5066EOF
5067cat >> $CONFIG_STATUS <<EOF
5068
5069# Protect against being on the right side of a sed subst in config.status.
5070sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5071 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5072$ac_vpsub
5073$extrasub
5074s,\([^a-zA-Z0-9:]\)/bin/sh\(.exe\),\1${CONFIG_SHELL-/bin/sh}\2,g
5075s%@SHELL@%$SHELL%g
5076s%@CFLAGS@%$CFLAGS%g
5077s%@CPPFLAGS@%$CPPFLAGS%g
5078s%@CXXFLAGS@%$CXXFLAGS%g
5079s%@FFLAGS@%$FFLAGS%g
5080s%@DEFS@%$DEFS%g
5081s%@LDFLAGS@%$LDFLAGS%g
5082s%@LIBS@%$LIBS%g
5083s%@exec_prefix@%$exec_prefix%g
5084s%@prefix@%$prefix%g
5085s%@program_transform_name@%$program_transform_name%g
5086s%@bindir@%$bindir%g
5087s%@sbindir@%$sbindir%g
5088s%@libexecdir@%$libexecdir%g
5089s%@datadir@%$datadir%g
5090s%@sysconfdir@%$sysconfdir%g
5091s%@sharedstatedir@%$sharedstatedir%g
5092s%@localstatedir@%$localstatedir%g
5093s%@libdir@%$libdir%g
5094s%@includedir@%$includedir%g
5095s%@oldincludedir@%$oldincludedir%g
5096s%@infodir@%$infodir%g
5097s%@mandir@%$mandir%g
5098s%@PATH_IFS@%$PATH_IFS%g
5099s%@EXEEXT@%$EXEEXT%g
5100s%@host@%$host%g
5101s%@host_alias@%$host_alias%g
5102s%@host_cpu@%$host_cpu%g
5103s%@host_vendor@%$host_vendor%g
5104s%@host_os@%$host_os%g
5105s%@target@%$target%g
5106s%@target_alias@%$target_alias%g
5107s%@target_cpu@%$target_cpu%g
5108s%@target_vendor@%$target_vendor%g
5109s%@target_os@%$target_os%g
5110s%@build@%$build%g
5111s%@build_alias@%$build_alias%g
5112s%@build_cpu@%$build_cpu%g
5113s%@build_vendor@%$build_vendor%g
5114s%@build_os@%$build_os%g
5115s%@CC@%$CC%g
5116s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5117s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5118s%@INSTALL_DATA@%$INSTALL_DATA%g
5119s%@PACKAGE@%$PACKAGE%g
5120s%@VERSION@%$VERSION%g
5121s%@ACLOCAL@%$ACLOCAL%g
5122s%@AUTOCONF@%$AUTOCONF%g
5123s%@AUTOMAKE@%$AUTOMAKE%g
5124s%@AUTOHEADER@%$AUTOHEADER%g
5125s%@MAKEINFO@%$MAKEINFO%g
5126s%@SET_MAKE@%$SET_MAKE%g
5127s%@AR@%$AR%g
5128s%@RANLIB@%$RANLIB%g
5129s%@LN_S@%$LN_S%g
5130s%@OBJEXT@%$OBJEXT%g
5131s%@STRIP@%$STRIP%g
5132s%@LIBTOOL@%$LIBTOOL%g
5133s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5134s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5135s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5136s%@MAINT@%$MAINT%g
5137s%@HDEFINES@%$HDEFINES%g
5138s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
5139s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
5140s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
5141s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
5142s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5143s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5144s%@CPP@%$CPP%g
5145s%@COREFILE@%$COREFILE%g
5146s%@COREFLAG@%$COREFLAG%g
5147s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
5148s%@WIN32LIBADD@%$WIN32LIBADD%g
5149s%@TDEFINES@%$TDEFINES%g
5150s%@wordsize@%$wordsize%g
5151s%@all_backends@%$all_backends%g
5152s%@bfd_backends@%$bfd_backends%g
5153s%@bfd_machines@%$bfd_machines%g
5154s%@tdefaults@%$tdefaults%g
5155
5156CEOF
5157EOF
5158
5159cat >> $CONFIG_STATUS <<\EOF
5160
5161# Split the substitutions into bite-sized pieces for seds with
5162# small command number limits, like on Digital OSF/1 and HP-UX.
5163ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5164ac_file=1 # Number of current file.
5165ac_beg=1 # First line for current file.
5166ac_end=$ac_max_sed_cmds # Line after last line for current file.
5167ac_more_lines=:
5168ac_sed_cmds=""
5169while $ac_more_lines; do
5170 if test $ac_beg -gt 1; then
5171 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5172 else
5173 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5174 fi
5175 if test ! -s conftest.s$ac_file; then
5176 ac_more_lines=false
5177 rm -f conftest.s$ac_file
5178 else
5179 if test -z "$ac_sed_cmds"; then
5180 ac_sed_cmds="sed -f conftest.s$ac_file"
5181 else
5182 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5183 fi
5184 ac_file=`expr $ac_file + 1`
5185 ac_beg=$ac_end
5186 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5187 fi
5188done
5189if test -z "$ac_sed_cmds"; then
5190 ac_sed_cmds=cat
5191fi
5192EOF
5193
5194cat >> $CONFIG_STATUS <<EOF
5195
5196CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
5197EOF
5198cat >> $CONFIG_STATUS <<\EOF
5199for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5200 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5201 case "$ac_file" in
5202 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5203 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5204 *) ac_file_in="${ac_file}.in" ;;
5205 esac
5206
5207 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5208
5209 # Remove last slash and all that follows it. Not all systems have dirname.
5210 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5211 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5212 # The file is in a subdirectory.
5213 test ! -d "$ac_dir" && mkdir "$ac_dir"
5214 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5215 # A "../" for each directory in $ac_dir_suffix.
5216 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5217 else
5218 ac_dir_suffix= ac_dots=
5219 fi
5220
5221 case "$ac_given_srcdir" in
5222 .) srcdir=.
5223 if test -z "$ac_dots"; then top_srcdir=.
5224 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5225 /* | [A-Za-z]:*)
5226 srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5227 *) # Relative path.
5228 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5229 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5230 esac
5231
5232 case "$ac_given_INSTALL" in
5233 [/$]* | [A-Za-z]:*) INSTALL="$ac_given_INSTALL" ;;
5234 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5235 esac
5236
5237 echo creating "$ac_file"
5238 rm -f "$ac_file"
5239 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5240 case "$ac_file" in
5241 *Makefile*) ac_comsub="1i\\
5242# $configure_input" ;;
5243 *) ac_comsub= ;;
5244 esac
5245
5246 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%$PATHIFS% $ac_given_srcdir/%g"`
5247 sed -e "$ac_comsub
5248s%@configure_input@%$configure_input%g
5249s%@srcdir@%$srcdir%g
5250s%@top_srcdir@%$top_srcdir%g
5251s%@INSTALL@%$INSTALL%g
5252" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5253fi; done
5254rm -f conftest.s*
5255
5256# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5257# NAME is the cpp macro being defined and VALUE is the value it is being given.
5258#
5259# ac_d sets the value in "#define NAME VALUE" lines.
5260ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5261ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5262ac_dC='\3'
5263ac_dD='%g'
5264# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5265ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5266ac_uB='\([ ]\)%\1#\2define\3'
5267ac_uC=' '
5268ac_uD='\4%g'
5269# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5270ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5271ac_eB='$%\1#\2define\3'
5272ac_eC=' '
5273ac_eD='%g'
5274
5275if test "${CONFIG_HEADERS+set}" != set; then
5276EOF
5277cat >> $CONFIG_STATUS <<EOF
5278 CONFIG_HEADERS="config.h:config.in"
5279EOF
5280cat >> $CONFIG_STATUS <<\EOF
5281fi
5282for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5283 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5284 case "$ac_file" in
5285 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5286 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5287 *) ac_file_in="${ac_file}.in" ;;
5288 esac
5289
5290 echo creating $ac_file
5291
5292 rm -f conftest.frag conftest.in conftest.out
5293# kso the other way around might work better with drive letters and such.
5294# ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5295 ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%" `
5296 cat $ac_file_inputs > conftest.in
5297
5298EOF
5299
5300# Transform confdefs.h into a sed script conftest.vals that substitutes
5301# the proper values into config.h.in to produce config.h. And first:
5302# Protect against being on the right side of a sed subst in config.status.
5303# Protect against being in an unquoted here document in config.status.
5304rm -f conftest.vals
5305cat > conftest.hdr <<\EOF
5306s/[\\&%]/\\&/g
5307s%[\\$`]%\\&%g
5308s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5309s%ac_d%ac_u%gp
5310s%ac_u%ac_e%gp
5311EOF
5312sed -n -f conftest.hdr confdefs.h > conftest.vals
5313rm -f conftest.hdr
5314
5315# This sed command replaces #undef with comments. This is necessary, for
5316# example, in the case of _POSIX_SOURCE, which is predefined and required
5317# on some systems where configure will not decide to define it.
5318cat >> conftest.vals <<\EOF
5319s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5320EOF
5321
5322# Break up conftest.vals because some shells have a limit on
5323# the size of here documents, and old seds have small limits too.
5324
5325rm -f conftest.tail
5326while :
5327do
5328 ac_lines=`grep -c . conftest.vals`
5329 # grep -c gives empty output for an empty file on some AIX systems.
5330 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5331 # Write a limited-size here document to conftest.frag.
5332 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5333 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5334 echo 'CEOF
5335 sed -f conftest.frag conftest.in > conftest.out
5336 rm -f conftest.in
5337 mv conftest.out conftest.in
5338' >> $CONFIG_STATUS
5339 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5340 rm -f conftest.vals
5341 mv conftest.tail conftest.vals
5342done
5343rm -f conftest.vals
5344
5345cat >> $CONFIG_STATUS <<\EOF
5346 rm -f conftest.frag conftest.h
5347 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5348 cat conftest.in >> conftest.h
5349 rm -f conftest.in
5350 if cmp -s $ac_file conftest.h 2>/dev/null; then
5351 echo "$ac_file is unchanged"
5352 rm -f conftest.h
5353 else
5354 # Remove last slash and all that follows it. Not all systems have dirname.
5355 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5356 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5357 # The file is in a subdirectory.
5358 test ! -d "$ac_dir" && mkdir "$ac_dir"
5359 fi
5360 rm -f $ac_file
5361 mv conftest.h $ac_file
5362 fi
5363fi; done
5364
5365EOF
5366cat >> $CONFIG_STATUS <<EOF
5367
5368
5369EOF
5370cat >> $CONFIG_STATUS <<\EOF
5371test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5372sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
5373exit 0
5374EOF
5375chmod +x $CONFIG_STATUS
5376rm -fr confdefs* $ac_clean_files
5377test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5378
5379
Note: See TracBrowser for help on using the repository browser.