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