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