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