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