]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/configure
2000-07-20 H.J. Lu <hjl@gnu.org>
[thirdparty/binutils-gdb.git] / bfd / configure
CommitLineData
252b5132
RH
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
653f71ca 4# Generated automatically using autoconf version 2.13
252b5132
RH
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=no]"
16ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
b2ef150d
ILT
18ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
252b5132
RH
20ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
b2ef150d 22ac_help="$ac_help
a74801ba 23 --disable-libtool-lock avoid locking (might break parallel builds)"
252b5132
RH
24ac_help="$ac_help
25 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
26ac_help="$ac_help
27 --enable-targets alternative target configurations"
28ac_help="$ac_help
29 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
30ac_help="$ac_help
31 --with-mmap try using mmap for BFD input files if available"
a2d91340
AC
32ac_help="$ac_help
33 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
252b5132
RH
34ac_help="$ac_help
35 --enable-maintainer-mode enable make rules and dependencies not useful
36 (and sometimes confusing) to the casual installer"
37ac_help="$ac_help
38 --disable-nls do not use Native Language Support"
39ac_help="$ac_help
40 --with-included-gettext use the GNU gettext library included here"
41
42# Initialize some variables set by options.
43# The variables have the same names as the options, with
44# dashes changed to underlines.
45build=NONE
46cache_file=./config.cache
47exec_prefix=NONE
48host=NONE
49no_create=
50nonopt=NONE
51no_recursion=
52prefix=NONE
53program_prefix=NONE
54program_suffix=NONE
55program_transform_name=s,x,x,
56silent=
57site=
3f9b03b5 58sitefile=
252b5132
RH
59srcdir=
60target=NONE
61verbose=
62x_includes=NONE
63x_libraries=NONE
64bindir='${exec_prefix}/bin'
65sbindir='${exec_prefix}/sbin'
66libexecdir='${exec_prefix}/libexec'
67datadir='${prefix}/share'
68sysconfdir='${prefix}/etc'
69sharedstatedir='${prefix}/com'
70localstatedir='${prefix}/var'
71libdir='${exec_prefix}/lib'
72includedir='${prefix}/include'
73oldincludedir='/usr/include'
74infodir='${prefix}/info'
75mandir='${prefix}/man'
76
77# Initialize some other variables.
78subdirs=
79MFLAGS= MAKEFLAGS=
80SHELL=${CONFIG_SHELL-/bin/sh}
81# Maximum number of lines to put in a shell here document.
82ac_max_here_lines=12
83
84ac_prev=
85for ac_option
86do
87
88 # If the previous option needs an argument, assign it.
89 if test -n "$ac_prev"; then
90 eval "$ac_prev=\$ac_option"
91 ac_prev=
92 continue
93 fi
94
95 case "$ac_option" in
96 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
97 *) ac_optarg= ;;
98 esac
99
100 # Accept the important Cygnus configure options, so we can diagnose typos.
101
102 case "$ac_option" in
103
104 -bindir | --bindir | --bindi | --bind | --bin | --bi)
105 ac_prev=bindir ;;
106 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
107 bindir="$ac_optarg" ;;
108
109 -build | --build | --buil | --bui | --bu)
110 ac_prev=build ;;
111 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
112 build="$ac_optarg" ;;
113
114 -cache-file | --cache-file | --cache-fil | --cache-fi \
115 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
116 ac_prev=cache_file ;;
117 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
118 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
119 cache_file="$ac_optarg" ;;
120
121 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
122 ac_prev=datadir ;;
123 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
124 | --da=*)
125 datadir="$ac_optarg" ;;
126
127 -disable-* | --disable-*)
128 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
129 # Reject names that are not valid shell variable names.
130 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
131 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132 fi
133 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134 eval "enable_${ac_feature}=no" ;;
135
136 -enable-* | --enable-*)
137 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
138 # Reject names that are not valid shell variable names.
139 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
140 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141 fi
142 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143 case "$ac_option" in
144 *=*) ;;
145 *) ac_optarg=yes ;;
146 esac
147 eval "enable_${ac_feature}='$ac_optarg'" ;;
148
149 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
150 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
151 | --exec | --exe | --ex)
152 ac_prev=exec_prefix ;;
153 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
154 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
155 | --exec=* | --exe=* | --ex=*)
156 exec_prefix="$ac_optarg" ;;
157
158 -gas | --gas | --ga | --g)
159 # Obsolete; use --with-gas.
160 with_gas=yes ;;
161
162 -help | --help | --hel | --he)
163 # Omit some internal or obsolete options to make the list less imposing.
164 # This message is too long to be a string in the A/UX 3.1 sh.
165 cat << EOF
166Usage: configure [options] [host]
167Options: [defaults in brackets after descriptions]
168Configuration:
169 --cache-file=FILE cache test results in FILE
170 --help print this message
171 --no-create do not create output files
172 --quiet, --silent do not print \`checking...' messages
3f9b03b5 173 --site-file=FILE use FILE as the site file
252b5132
RH
174 --version print the version of autoconf that created configure
175Directory and file names:
176 --prefix=PREFIX install architecture-independent files in PREFIX
177 [$ac_default_prefix]
178 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
179 [same as prefix]
180 --bindir=DIR user executables in DIR [EPREFIX/bin]
181 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
182 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
183 --datadir=DIR read-only architecture-independent data in DIR
184 [PREFIX/share]
185 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
186 --sharedstatedir=DIR modifiable architecture-independent data in DIR
187 [PREFIX/com]
188 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
189 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
190 --includedir=DIR C header files in DIR [PREFIX/include]
191 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
192 --infodir=DIR info documentation in DIR [PREFIX/info]
193 --mandir=DIR man documentation in DIR [PREFIX/man]
194 --srcdir=DIR find the sources in DIR [configure dir or ..]
195 --program-prefix=PREFIX prepend PREFIX to installed program names
196 --program-suffix=SUFFIX append SUFFIX to installed program names
197 --program-transform-name=PROGRAM
198 run sed PROGRAM on installed program names
199EOF
200 cat << EOF
201Host type:
202 --build=BUILD configure for building on BUILD [BUILD=HOST]
203 --host=HOST configure for HOST [guessed]
204 --target=TARGET configure for TARGET [TARGET=HOST]
205Features and packages:
206 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
207 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
208 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
209 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
210 --x-includes=DIR X include files are in DIR
211 --x-libraries=DIR X library files are in DIR
212EOF
213 if test -n "$ac_help"; then
214 echo "--enable and --with options recognized:$ac_help"
215 fi
216 exit 0 ;;
217
218 -host | --host | --hos | --ho)
219 ac_prev=host ;;
220 -host=* | --host=* | --hos=* | --ho=*)
221 host="$ac_optarg" ;;
222
223 -includedir | --includedir | --includedi | --included | --include \
224 | --includ | --inclu | --incl | --inc)
225 ac_prev=includedir ;;
226 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227 | --includ=* | --inclu=* | --incl=* | --inc=*)
228 includedir="$ac_optarg" ;;
229
230 -infodir | --infodir | --infodi | --infod | --info | --inf)
231 ac_prev=infodir ;;
232 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233 infodir="$ac_optarg" ;;
234
235 -libdir | --libdir | --libdi | --libd)
236 ac_prev=libdir ;;
237 -libdir=* | --libdir=* | --libdi=* | --libd=*)
238 libdir="$ac_optarg" ;;
239
240 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241 | --libexe | --libex | --libe)
242 ac_prev=libexecdir ;;
243 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244 | --libexe=* | --libex=* | --libe=*)
245 libexecdir="$ac_optarg" ;;
246
247 -localstatedir | --localstatedir | --localstatedi | --localstated \
248 | --localstate | --localstat | --localsta | --localst \
249 | --locals | --local | --loca | --loc | --lo)
250 ac_prev=localstatedir ;;
251 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254 localstatedir="$ac_optarg" ;;
255
256 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257 ac_prev=mandir ;;
258 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259 mandir="$ac_optarg" ;;
260
261 -nfp | --nfp | --nf)
262 # Obsolete; use --without-fp.
263 with_fp=no ;;
264
265 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266 | --no-cr | --no-c)
267 no_create=yes ;;
268
269 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271 no_recursion=yes ;;
272
273 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275 | --oldin | --oldi | --old | --ol | --o)
276 ac_prev=oldincludedir ;;
277 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280 oldincludedir="$ac_optarg" ;;
281
282 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283 ac_prev=prefix ;;
284 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285 prefix="$ac_optarg" ;;
286
287 -program-prefix | --program-prefix | --program-prefi | --program-pref \
288 | --program-pre | --program-pr | --program-p)
289 ac_prev=program_prefix ;;
290 -program-prefix=* | --program-prefix=* | --program-prefi=* \
291 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292 program_prefix="$ac_optarg" ;;
293
294 -program-suffix | --program-suffix | --program-suffi | --program-suff \
295 | --program-suf | --program-su | --program-s)
296 ac_prev=program_suffix ;;
297 -program-suffix=* | --program-suffix=* | --program-suffi=* \
298 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299 program_suffix="$ac_optarg" ;;
300
301 -program-transform-name | --program-transform-name \
302 | --program-transform-nam | --program-transform-na \
303 | --program-transform-n | --program-transform- \
304 | --program-transform | --program-transfor \
305 | --program-transfo | --program-transf \
306 | --program-trans | --program-tran \
307 | --progr-tra | --program-tr | --program-t)
308 ac_prev=program_transform_name ;;
309 -program-transform-name=* | --program-transform-name=* \
310 | --program-transform-nam=* | --program-transform-na=* \
311 | --program-transform-n=* | --program-transform-=* \
312 | --program-transform=* | --program-transfor=* \
313 | --program-transfo=* | --program-transf=* \
314 | --program-trans=* | --program-tran=* \
315 | --progr-tra=* | --program-tr=* | --program-t=*)
316 program_transform_name="$ac_optarg" ;;
317
318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319 | -silent | --silent | --silen | --sile | --sil)
320 silent=yes ;;
321
322 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323 ac_prev=sbindir ;;
324 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325 | --sbi=* | --sb=*)
326 sbindir="$ac_optarg" ;;
327
328 -sharedstatedir | --sharedstatedir | --sharedstatedi \
329 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330 | --sharedst | --shareds | --shared | --share | --shar \
331 | --sha | --sh)
332 ac_prev=sharedstatedir ;;
333 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336 | --sha=* | --sh=*)
337 sharedstatedir="$ac_optarg" ;;
338
339 -site | --site | --sit)
340 ac_prev=site ;;
341 -site=* | --site=* | --sit=*)
342 site="$ac_optarg" ;;
343
3f9b03b5
AM
344 -site-file | --site-file | --site-fil | --site-fi | --site-f)
345 ac_prev=sitefile ;;
346 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
347 sitefile="$ac_optarg" ;;
348
252b5132
RH
349 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
350 ac_prev=srcdir ;;
351 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
352 srcdir="$ac_optarg" ;;
353
354 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
355 | --syscon | --sysco | --sysc | --sys | --sy)
356 ac_prev=sysconfdir ;;
357 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
358 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
359 sysconfdir="$ac_optarg" ;;
360
361 -target | --target | --targe | --targ | --tar | --ta | --t)
362 ac_prev=target ;;
363 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
364 target="$ac_optarg" ;;
365
366 -v | -verbose | --verbose | --verbos | --verbo | --verb)
367 verbose=yes ;;
368
369 -version | --version | --versio | --versi | --vers)
653f71ca 370 echo "configure generated by autoconf version 2.13"
252b5132
RH
371 exit 0 ;;
372
373 -with-* | --with-*)
374 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
375 # Reject names that are not valid shell variable names.
376 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
377 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
378 fi
379 ac_package=`echo $ac_package| sed 's/-/_/g'`
380 case "$ac_option" in
381 *=*) ;;
382 *) ac_optarg=yes ;;
383 esac
384 eval "with_${ac_package}='$ac_optarg'" ;;
385
386 -without-* | --without-*)
387 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
388 # Reject names that are not valid shell variable names.
389 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 eval "with_${ac_package}=no" ;;
394
395 --x)
396 # Obsolete; use --with-x.
397 with_x=yes ;;
398
399 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
400 | --x-incl | --x-inc | --x-in | --x-i)
401 ac_prev=x_includes ;;
402 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
403 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
404 x_includes="$ac_optarg" ;;
405
406 -x-libraries | --x-libraries | --x-librarie | --x-librari \
407 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
408 ac_prev=x_libraries ;;
409 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
410 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
411 x_libraries="$ac_optarg" ;;
412
413 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
414 ;;
415
416 *)
417 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
418 echo "configure: warning: $ac_option: invalid host type" 1>&2
419 fi
420 if test "x$nonopt" != xNONE; then
421 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
422 fi
423 nonopt="$ac_option"
424 ;;
425
426 esac
427done
428
429if test -n "$ac_prev"; then
430 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
431fi
432
433trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
434
435# File descriptor usage:
436# 0 standard input
437# 1 file creation
438# 2 errors and warnings
439# 3 some systems may open it to /dev/tty
440# 4 used on the Kubota Titan
441# 6 checking for... messages and results
442# 5 compiler messages saved in config.log
443if test "$silent" = yes; then
444 exec 6>/dev/null
445else
446 exec 6>&1
447fi
448exec 5>./config.log
449
450echo "\
451This file contains any messages produced by compilers while
452running configure, to aid debugging if configure makes a mistake.
453" 1>&5
454
455# Strip out --no-create and --no-recursion so they do not pile up.
456# Also quote any args containing shell metacharacters.
457ac_configure_args=
458for ac_arg
459do
460 case "$ac_arg" in
461 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
462 | --no-cr | --no-c) ;;
463 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
464 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
465 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
466 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
467 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
468 esac
469done
470
471# NLS nuisances.
472# Only set these to C if already set. These must not be set unconditionally
473# because not all systems understand e.g. LANG=C (notably SCO).
474# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
475# Non-C LC_CTYPE values break the ctype check.
476if test "${LANG+set}" = set; then LANG=C; export LANG; fi
477if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
478if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
479if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
480
481# confdefs.h avoids OS command line length limits that DEFS can exceed.
482rm -rf conftest* confdefs.h
483# AIX cpp loses on an empty file, so make sure it contains at least a newline.
484echo > confdefs.h
485
486# A filename unique to this package, relative to the directory that
487# configure is in, which we can look for to find out if srcdir is correct.
488ac_unique_file=libbfd.c
489
490# Find the source files, if location was not specified.
491if test -z "$srcdir"; then
492 ac_srcdir_defaulted=yes
493 # Try the directory containing this script, then its parent.
494 ac_prog=$0
495 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
496 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
497 srcdir=$ac_confdir
498 if test ! -r $srcdir/$ac_unique_file; then
499 srcdir=..
500 fi
501else
502 ac_srcdir_defaulted=no
503fi
504if test ! -r $srcdir/$ac_unique_file; then
505 if test "$ac_srcdir_defaulted" = yes; then
506 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
507 else
508 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
509 fi
510fi
511srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
512
513# Prefer explicitly selected file to automatically selected ones.
3f9b03b5
AM
514if test -z "$sitefile"; then
515 if test -z "$CONFIG_SITE"; then
516 if test "x$prefix" != xNONE; then
517 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
518 else
519 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
520 fi
252b5132 521 fi
3f9b03b5
AM
522else
523 CONFIG_SITE="$sitefile"
252b5132
RH
524fi
525for ac_site_file in $CONFIG_SITE; do
526 if test -r "$ac_site_file"; then
527 echo "loading site script $ac_site_file"
528 . "$ac_site_file"
529 fi
530done
531
532if test -r "$cache_file"; then
533 echo "loading cache $cache_file"
653f71ca 534 . $cache_file
252b5132
RH
535else
536 echo "creating cache $cache_file"
537 > $cache_file
538fi
539
540ac_ext=c
541# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
542ac_cpp='$CPP $CPPFLAGS'
543ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
544ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
545cross_compiling=$ac_cv_prog_cc_cross
546
547ac_exeext=
548ac_objext=o
549if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
550 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
551 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
552 ac_n= ac_c='
553' ac_t=' '
554 else
555 ac_n=-n ac_c= ac_t=
556 fi
557else
558 ac_n= ac_c='\c' ac_t=
559fi
560
561
562
563ac_aux_dir=
564for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
565 if test -f $ac_dir/install-sh; then
566 ac_aux_dir=$ac_dir
567 ac_install_sh="$ac_aux_dir/install-sh -c"
568 break
569 elif test -f $ac_dir/install.sh; then
570 ac_aux_dir=$ac_dir
571 ac_install_sh="$ac_aux_dir/install.sh -c"
572 break
573 fi
574done
575if test -z "$ac_aux_dir"; then
576 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
577fi
653f71ca
KB
578ac_config_guess=$ac_aux_dir/config.guess
579ac_config_sub=$ac_aux_dir/config.sub
580ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
252b5132
RH
581
582
583# Do some error checking and defaulting for the host and target type.
584# The inputs are:
585# configure --host=HOST --target=TARGET --build=BUILD NONOPT
586#
587# The rules are:
588# 1. You are not allowed to specify --host, --target, and nonopt at the
589# same time.
590# 2. Host defaults to nonopt.
591# 3. If nonopt is not specified, then host defaults to the current host,
592# as determined by config.guess.
593# 4. Target and build default to nonopt.
594# 5. If nonopt is not specified, then target and build default to host.
595
596# The aliases save the names the user supplied, while $host etc.
597# will get canonicalized.
598case $host---$target---$nonopt in
599NONE---*---* | *---NONE---* | *---*---NONE) ;;
600*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
601esac
602
653f71ca
KB
603
604# Make sure we can run config.sub.
605if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
606else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
607fi
608
609echo $ac_n "checking host system type""... $ac_c" 1>&6
3f9b03b5 610echo "configure:611: checking host system type" >&5
653f71ca
KB
611
612host_alias=$host
613case "$host_alias" in
614NONE)
615 case $nonopt in
616 NONE)
617 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
618 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
619 fi ;;
620 *) host_alias=$nonopt ;;
621 esac ;;
622esac
623
624host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
625host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628echo "$ac_t""$host" 1>&6
629
630echo $ac_n "checking target system type""... $ac_c" 1>&6
3f9b03b5 631echo "configure:632: checking target system type" >&5
653f71ca
KB
632
633target_alias=$target
634case "$target_alias" in
635NONE)
636 case $nonopt in
637 NONE) target_alias=$host_alias ;;
638 *) target_alias=$nonopt ;;
639 esac ;;
640esac
641
642target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
643target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646echo "$ac_t""$target" 1>&6
647
648echo $ac_n "checking build system type""... $ac_c" 1>&6
3f9b03b5 649echo "configure:650: checking build system type" >&5
653f71ca
KB
650
651build_alias=$build
652case "$build_alias" in
653NONE)
654 case $nonopt in
655 NONE) build_alias=$host_alias ;;
656 *) build_alias=$nonopt ;;
657 esac ;;
658esac
659
660build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
661build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
662build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
663build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
664echo "$ac_t""$build" 1>&6
665
252b5132
RH
666test "$host_alias" != "$target_alias" &&
667 test "$program_prefix$program_suffix$program_transform_name" = \
668 NONENONEs,x,x, &&
669 program_prefix=${target_alias}-
670
671# Extract the first word of "gcc", so it can be a program name with args.
672set dummy gcc; ac_word=$2
673echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 674echo "configure:675: checking for $ac_word" >&5
653f71ca 675if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
676 echo $ac_n "(cached) $ac_c" 1>&6
677else
678 if test -n "$CC"; then
679 ac_cv_prog_CC="$CC" # Let the user override the test.
680else
681 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
682 ac_dummy="$PATH"
683 for ac_dir in $ac_dummy; do
684 test -z "$ac_dir" && ac_dir=.
685 if test -f $ac_dir/$ac_word; then
686 ac_cv_prog_CC="gcc"
687 break
688 fi
689 done
690 IFS="$ac_save_ifs"
691fi
692fi
693CC="$ac_cv_prog_CC"
694if test -n "$CC"; then
695 echo "$ac_t""$CC" 1>&6
696else
697 echo "$ac_t""no" 1>&6
698fi
699
700if test -z "$CC"; then
701 # Extract the first word of "cc", so it can be a program name with args.
702set dummy cc; ac_word=$2
703echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 704echo "configure:705: checking for $ac_word" >&5
653f71ca 705if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
706 echo $ac_n "(cached) $ac_c" 1>&6
707else
708 if test -n "$CC"; then
709 ac_cv_prog_CC="$CC" # Let the user override the test.
710else
711 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
712 ac_prog_rejected=no
713 ac_dummy="$PATH"
714 for ac_dir in $ac_dummy; do
715 test -z "$ac_dir" && ac_dir=.
716 if test -f $ac_dir/$ac_word; then
717 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
718 ac_prog_rejected=yes
719 continue
720 fi
721 ac_cv_prog_CC="cc"
722 break
723 fi
724 done
725 IFS="$ac_save_ifs"
726if test $ac_prog_rejected = yes; then
727 # We found a bogon in the path, so make sure we never use it.
728 set dummy $ac_cv_prog_CC
729 shift
730 if test $# -gt 0; then
731 # We chose a different compiler from the bogus one.
732 # However, it has the same basename, so the bogon will be chosen
733 # first if we set CC to just the basename; use the full file name.
734 shift
735 set dummy "$ac_dir/$ac_word" "$@"
736 shift
737 ac_cv_prog_CC="$@"
738 fi
739fi
740fi
741fi
742CC="$ac_cv_prog_CC"
743if test -n "$CC"; then
744 echo "$ac_t""$CC" 1>&6
745else
746 echo "$ac_t""no" 1>&6
747fi
748
749 if test -z "$CC"; then
750 case "`uname -s`" in
653f71ca 751 *win32* | *WIN32*)
252b5132
RH
752 # Extract the first word of "cl", so it can be a program name with args.
753set dummy cl; ac_word=$2
754echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 755echo "configure:756: checking for $ac_word" >&5
653f71ca 756if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
757 echo $ac_n "(cached) $ac_c" 1>&6
758else
759 if test -n "$CC"; then
760 ac_cv_prog_CC="$CC" # Let the user override the test.
761else
762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
763 ac_dummy="$PATH"
764 for ac_dir in $ac_dummy; do
765 test -z "$ac_dir" && ac_dir=.
766 if test -f $ac_dir/$ac_word; then
767 ac_cv_prog_CC="cl"
768 break
769 fi
770 done
771 IFS="$ac_save_ifs"
772fi
773fi
774CC="$ac_cv_prog_CC"
775if test -n "$CC"; then
776 echo "$ac_t""$CC" 1>&6
777else
778 echo "$ac_t""no" 1>&6
779fi
780 ;;
781 esac
782 fi
783 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
784fi
785
653f71ca 786echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3f9b03b5 787echo "configure:788: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
788
789ac_ext=c
790# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791ac_cpp='$CPP $CPPFLAGS'
792ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794cross_compiling=$ac_cv_prog_cc_cross
795
796cat > conftest.$ac_ext << EOF
797
3f9b03b5 798#line 799 "configure"
252b5132
RH
799#include "confdefs.h"
800
801main(){return(0);}
802EOF
3f9b03b5 803if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
804 ac_cv_prog_cc_works=yes
805 # If we can't run a trivial program, we are probably using a cross compiler.
806 if (./conftest; exit) 2>/dev/null; then
807 ac_cv_prog_cc_cross=no
808 else
809 ac_cv_prog_cc_cross=yes
810 fi
811else
812 echo "configure: failed program was:" >&5
813 cat conftest.$ac_ext >&5
814 ac_cv_prog_cc_works=no
815fi
816rm -fr conftest*
817ac_ext=c
818# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819ac_cpp='$CPP $CPPFLAGS'
820ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822cross_compiling=$ac_cv_prog_cc_cross
823
824echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
825if test $ac_cv_prog_cc_works = no; then
826 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
827fi
653f71ca 828echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3f9b03b5 829echo "configure:830: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
830echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
831cross_compiling=$ac_cv_prog_cc_cross
832
833echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3f9b03b5 834echo "configure:835: checking whether we are using GNU C" >&5
653f71ca 835if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
252b5132
RH
836 echo $ac_n "(cached) $ac_c" 1>&6
837else
838 cat > conftest.c <<EOF
839#ifdef __GNUC__
840 yes;
841#endif
842EOF
3f9b03b5 843if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
844 ac_cv_prog_gcc=yes
845else
846 ac_cv_prog_gcc=no
847fi
848fi
849
850echo "$ac_t""$ac_cv_prog_gcc" 1>&6
851
852if test $ac_cv_prog_gcc = yes; then
853 GCC=yes
854else
855 GCC=
856fi
857
858ac_test_CFLAGS="${CFLAGS+set}"
859ac_save_CFLAGS="$CFLAGS"
860CFLAGS=
861echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3f9b03b5 862echo "configure:863: checking whether ${CC-cc} accepts -g" >&5
653f71ca 863if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
252b5132
RH
864 echo $ac_n "(cached) $ac_c" 1>&6
865else
866 echo 'void f(){}' > conftest.c
867if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
868 ac_cv_prog_cc_g=yes
869else
870 ac_cv_prog_cc_g=no
871fi
872rm -f conftest*
873
874fi
875
876echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
877if test "$ac_test_CFLAGS" = set; then
878 CFLAGS="$ac_save_CFLAGS"
879elif test $ac_cv_prog_cc_g = yes; then
880 if test "$GCC" = yes; then
881 CFLAGS="-g -O2"
882 else
883 CFLAGS="-g"
884 fi
885else
886 if test "$GCC" = yes; then
887 CFLAGS="-O2"
888 else
889 CFLAGS=
890 fi
891fi
892
893echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3f9b03b5 894echo "configure:895: checking for POSIXized ISC" >&5
252b5132
RH
895if test -d /etc/conf/kconfig.d &&
896 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
897then
898 echo "$ac_t""yes" 1>&6
899 ISC=yes # If later tests want to check for ISC.
900 cat >> confdefs.h <<\EOF
901#define _POSIX_SOURCE 1
902EOF
903
904 if test "$GCC" = yes; then
905 CC="$CC -posix"
906 else
907 CC="$CC -Xp"
908 fi
909else
910 echo "$ac_t""no" 1>&6
911 ISC=
912fi
913
914
915# Find a good install program. We prefer a C program (faster),
916# so one script is as good as another. But avoid the broken or
917# incompatible versions:
918# SysV /etc/install, /usr/sbin/install
919# SunOS /usr/etc/install
920# IRIX /sbin/install
921# AIX /bin/install
922# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
923# AFS /usr/afsws/bin/install, which mishandles nonexistent args
924# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
925# ./install, which can be erroneously created by make from ./install.sh.
926echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3f9b03b5 927echo "configure:928: checking for a BSD compatible install" >&5
252b5132 928if test -z "$INSTALL"; then
653f71ca 929if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
252b5132
RH
930 echo $ac_n "(cached) $ac_c" 1>&6
931else
932 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
933 for ac_dir in $PATH; do
934 # Account for people who put trailing slashes in PATH elements.
935 case "$ac_dir/" in
936 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
937 *)
938 # OSF1 and SCO ODT 3.0 have their own names for install.
939 # Don't use installbsd from OSF since it installs stuff as root
940 # by default.
941 for ac_prog in ginstall scoinst install; do
942 if test -f $ac_dir/$ac_prog; then
943 if test $ac_prog = install &&
944 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
945 # AIX install. It has an incompatible calling convention.
946 :
947 else
948 ac_cv_path_install="$ac_dir/$ac_prog -c"
949 break 2
950 fi
951 fi
952 done
953 ;;
954 esac
955 done
956 IFS="$ac_save_IFS"
957
958fi
959 if test "${ac_cv_path_install+set}" = set; then
960 INSTALL="$ac_cv_path_install"
961 else
962 # As a last resort, use the slow shell script. We don't cache a
963 # path for INSTALL within a source directory, because that will
964 # break other packages using the cache if that directory is
965 # removed, or if the path is relative.
966 INSTALL="$ac_install_sh"
967 fi
968fi
969echo "$ac_t""$INSTALL" 1>&6
970
971# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
972# It thinks the first close brace ends the variable substitution.
973test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
974
653f71ca 975test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
252b5132
RH
976
977test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
978
979echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
3f9b03b5 980echo "configure:981: checking whether build environment is sane" >&5
252b5132
RH
981# Just in case
982sleep 1
983echo timestamp > conftestfile
984# Do `set' in a subshell so we don't clobber the current shell's
985# arguments. Must try -L first in case configure is actually a
986# symlink; some systems play weird games with the mod time of symlinks
987# (eg FreeBSD returns the mod time of the symlink's containing
988# directory).
989if (
990 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
991 if test "$*" = "X"; then
992 # -L didn't work.
993 set X `ls -t $srcdir/configure conftestfile`
994 fi
995 if test "$*" != "X $srcdir/configure conftestfile" \
996 && test "$*" != "X conftestfile $srcdir/configure"; then
997
998 # If neither matched, then we have a broken ls. This can happen
999 # if, for instance, CONFIG_SHELL is bash and it inherits a
1000 # broken ls alias from the environment. This has actually
1001 # happened. Such a system could not be considered "sane".
1002 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
1003alias in your environment" 1>&2; exit 1; }
1004 fi
1005
1006 test "$2" = conftestfile
1007 )
1008then
1009 # Ok.
1010 :
1011else
1012 { echo "configure: error: newly created file is older than distributed files!
1013Check your system clock" 1>&2; exit 1; }
1014fi
1015rm -f conftest*
1016echo "$ac_t""yes" 1>&6
1017if test "$program_transform_name" = s,x,x,; then
1018 program_transform_name=
1019else
1020 # Double any \ or $. echo might interpret backslashes.
1021 cat <<\EOF_SED > conftestsed
1022s,\\,\\\\,g; s,\$,$$,g
1023EOF_SED
1024 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1025 rm -f conftestsed
1026fi
1027test "$program_prefix" != NONE &&
653f71ca 1028 program_transform_name="s,^,${program_prefix},; $program_transform_name"
252b5132
RH
1029# Use a double $ so make ignores it.
1030test "$program_suffix" != NONE &&
653f71ca 1031 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
252b5132
RH
1032
1033# sed with no file args requires a program.
1034test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1035
1036echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3f9b03b5 1037echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
252b5132 1038set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
653f71ca 1039if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
252b5132
RH
1040 echo $ac_n "(cached) $ac_c" 1>&6
1041else
1042 cat > conftestmake <<\EOF
1043all:
1044 @echo 'ac_maketemp="${MAKE}"'
1045EOF
1046# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1047eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1048if test -n "$ac_maketemp"; then
1049 eval ac_cv_prog_make_${ac_make}_set=yes
1050else
1051 eval ac_cv_prog_make_${ac_make}_set=no
1052fi
1053rm -f conftestmake
1054fi
1055if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1056 echo "$ac_t""yes" 1>&6
1057 SET_MAKE=
1058else
1059 echo "$ac_t""no" 1>&6
1060 SET_MAKE="MAKE=${MAKE-make}"
1061fi
1062
1063
1064PACKAGE=bfd
1065
bcef29e6 1066VERSION=2.10.90
252b5132
RH
1067
1068if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1069 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1070fi
1071cat >> confdefs.h <<EOF
1072#define PACKAGE "$PACKAGE"
1073EOF
1074
1075cat >> confdefs.h <<EOF
1076#define VERSION "$VERSION"
1077EOF
1078
1079
1080
1081missing_dir=`cd $ac_aux_dir && pwd`
1082echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
3f9b03b5 1083echo "configure:1084: checking for working aclocal" >&5
252b5132
RH
1084# Run test in a subshell; some versions of sh will print an error if
1085# an executable is not found, even if stderr is redirected.
1086# Redirect stdin to placate older versions of autoconf. Sigh.
1087if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1088 ACLOCAL=aclocal
1089 echo "$ac_t""found" 1>&6
1090else
1091 ACLOCAL="$missing_dir/missing aclocal"
1092 echo "$ac_t""missing" 1>&6
1093fi
1094
1095echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
3f9b03b5 1096echo "configure:1097: checking for working autoconf" >&5
252b5132
RH
1097# Run test in a subshell; some versions of sh will print an error if
1098# an executable is not found, even if stderr is redirected.
1099# Redirect stdin to placate older versions of autoconf. Sigh.
1100if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1101 AUTOCONF=autoconf
1102 echo "$ac_t""found" 1>&6
1103else
1104 AUTOCONF="$missing_dir/missing autoconf"
1105 echo "$ac_t""missing" 1>&6
1106fi
1107
1108echo $ac_n "checking for working automake""... $ac_c" 1>&6
3f9b03b5 1109echo "configure:1110: checking for working automake" >&5
252b5132
RH
1110# Run test in a subshell; some versions of sh will print an error if
1111# an executable is not found, even if stderr is redirected.
1112# Redirect stdin to placate older versions of autoconf. Sigh.
1113if (automake --version) < /dev/null > /dev/null 2>&1; then
1114 AUTOMAKE=automake
1115 echo "$ac_t""found" 1>&6
1116else
1117 AUTOMAKE="$missing_dir/missing automake"
1118 echo "$ac_t""missing" 1>&6
1119fi
1120
1121echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
3f9b03b5 1122echo "configure:1123: checking for working autoheader" >&5
252b5132
RH
1123# Run test in a subshell; some versions of sh will print an error if
1124# an executable is not found, even if stderr is redirected.
1125# Redirect stdin to placate older versions of autoconf. Sigh.
1126if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1127 AUTOHEADER=autoheader
1128 echo "$ac_t""found" 1>&6
1129else
1130 AUTOHEADER="$missing_dir/missing autoheader"
1131 echo "$ac_t""missing" 1>&6
1132fi
1133
1134echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
3f9b03b5 1135echo "configure:1136: checking for working makeinfo" >&5
252b5132
RH
1136# Run test in a subshell; some versions of sh will print an error if
1137# an executable is not found, even if stderr is redirected.
1138# Redirect stdin to placate older versions of autoconf. Sigh.
1139if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1140 MAKEINFO=makeinfo
1141 echo "$ac_t""found" 1>&6
1142else
1143 MAKEINFO="$missing_dir/missing makeinfo"
1144 echo "$ac_t""missing" 1>&6
1145fi
1146
1147
1148
1149if test $host != $build; then
1150 ac_tool_prefix=${host_alias}-
1151else
1152 ac_tool_prefix=
1153fi
1154
1155# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1156set dummy ${ac_tool_prefix}ar; ac_word=$2
1157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 1158echo "configure:1159: checking for $ac_word" >&5
653f71ca 1159if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
252b5132
RH
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161else
1162 if test -n "$AR"; then
1163 ac_cv_prog_AR="$AR" # Let the user override the test.
1164else
1165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1166 ac_dummy="$PATH"
1167 for ac_dir in $ac_dummy; do
1168 test -z "$ac_dir" && ac_dir=.
1169 if test -f $ac_dir/$ac_word; then
1170 ac_cv_prog_AR="${ac_tool_prefix}ar"
1171 break
1172 fi
1173 done
1174 IFS="$ac_save_ifs"
1175 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1176fi
1177fi
1178AR="$ac_cv_prog_AR"
1179if test -n "$AR"; then
1180 echo "$ac_t""$AR" 1>&6
1181else
1182 echo "$ac_t""no" 1>&6
1183fi
1184
1185
1186
1187# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1188set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 1190echo "configure:1191: checking for $ac_word" >&5
653f71ca 1191if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
252b5132
RH
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193else
1194 if test -n "$RANLIB"; then
1195 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1196else
1197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200 test -z "$ac_dir" && ac_dir=.
1201 if test -f $ac_dir/$ac_word; then
1202 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1203 break
1204 fi
1205 done
1206 IFS="$ac_save_ifs"
1207fi
1208fi
1209RANLIB="$ac_cv_prog_RANLIB"
1210if test -n "$RANLIB"; then
1211 echo "$ac_t""$RANLIB" 1>&6
1212else
1213 echo "$ac_t""no" 1>&6
1214fi
1215
1216
1217if test -z "$ac_cv_prog_RANLIB"; then
1218if test -n "$ac_tool_prefix"; then
1219 # Extract the first word of "ranlib", so it can be a program name with args.
1220set dummy ranlib; ac_word=$2
1221echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 1222echo "configure:1223: checking for $ac_word" >&5
653f71ca 1223if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
252b5132
RH
1224 echo $ac_n "(cached) $ac_c" 1>&6
1225else
1226 if test -n "$RANLIB"; then
1227 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1228else
1229 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1230 ac_dummy="$PATH"
1231 for ac_dir in $ac_dummy; do
1232 test -z "$ac_dir" && ac_dir=.
1233 if test -f $ac_dir/$ac_word; then
1234 ac_cv_prog_RANLIB="ranlib"
1235 break
1236 fi
1237 done
1238 IFS="$ac_save_ifs"
1239 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1240fi
1241fi
1242RANLIB="$ac_cv_prog_RANLIB"
1243if test -n "$RANLIB"; then
1244 echo "$ac_t""$RANLIB" 1>&6
1245else
1246 echo "$ac_t""no" 1>&6
1247fi
1248
1249else
1250 RANLIB=":"
1251fi
1252fi
1253
1254
1255# Check whether --enable-shared or --disable-shared was given.
1256if test "${enable_shared+set}" = set; then
1257 enableval="$enable_shared"
1258 p=${PACKAGE-default}
1259case "$enableval" in
1260yes) enable_shared=yes ;;
1261no) enable_shared=no ;;
1262*)
1263 enable_shared=no
1264 # Look at the argument we got. We use all the common list separators.
1265 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1266 for pkg in $enableval; do
1267 if test "X$pkg" = "X$p"; then
1268 enable_shared=yes
1269 fi
1270 done
1271 IFS="$ac_save_ifs"
1272 ;;
1273esac
1274else
1275 enable_shared=no
1276fi
1277
1278
1279# Check whether --enable-static or --disable-static was given.
1280if test "${enable_static+set}" = set; then
1281 enableval="$enable_static"
1282 p=${PACKAGE-default}
1283case "$enableval" in
1284yes) enable_static=yes ;;
1285no) enable_static=no ;;
1286*)
1287 enable_static=no
1288 # Look at the argument we got. We use all the common list separators.
1289 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1290 for pkg in $enableval; do
1291 if test "X$pkg" = "X$p"; then
1292 enable_static=yes
1293 fi
1294 done
1295 IFS="$ac_save_ifs"
1296 ;;
1297esac
1298else
1299 enable_static=yes
1300fi
1301
b2ef150d
ILT
1302# Check whether --enable-fast-install or --disable-fast-install was given.
1303if test "${enable_fast_install+set}" = set; then
1304 enableval="$enable_fast_install"
1305 p=${PACKAGE-default}
1306case "$enableval" in
1307yes) enable_fast_install=yes ;;
1308no) enable_fast_install=no ;;
1309*)
1310 enable_fast_install=no
1311 # Look at the argument we got. We use all the common list separators.
1312 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1313 for pkg in $enableval; do
1314 if test "X$pkg" = "X$p"; then
1315 enable_fast_install=yes
1316 fi
1317 done
1318 IFS="$ac_save_ifs"
1319 ;;
1320esac
1321else
1322 enable_fast_install=yes
1323fi
1324
252b5132
RH
1325# Extract the first word of "ranlib", so it can be a program name with args.
1326set dummy ranlib; ac_word=$2
1327echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3f9b03b5 1328echo "configure:1329: checking for $ac_word" >&5
653f71ca 1329if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
252b5132
RH
1330 echo $ac_n "(cached) $ac_c" 1>&6
1331else
1332 if test -n "$RANLIB"; then
1333 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1334else
1335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1336 ac_dummy="$PATH"
1337 for ac_dir in $ac_dummy; do
1338 test -z "$ac_dir" && ac_dir=.
1339 if test -f $ac_dir/$ac_word; then
1340 ac_cv_prog_RANLIB="ranlib"
1341 break
1342 fi
1343 done
1344 IFS="$ac_save_ifs"
1345 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1346fi
1347fi
1348RANLIB="$ac_cv_prog_RANLIB"
1349if test -n "$RANLIB"; then
1350 echo "$ac_t""$RANLIB" 1>&6
1351else
1352 echo "$ac_t""no" 1>&6
1353fi
1354
1355# Check whether --with-gnu-ld or --without-gnu-ld was given.
1356if test "${with_gnu_ld+set}" = set; then
1357 withval="$with_gnu_ld"
1358 test "$withval" = no || with_gnu_ld=yes
1359else
1360 with_gnu_ld=no
1361fi
1362
252b5132
RH
1363ac_prog=ld
1364if test "$ac_cv_prog_gcc" = yes; then
1365 # Check if gcc -print-prog-name=ld gives a path.
1366 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3f9b03b5 1367echo "configure:1368: checking for ld used by GCC" >&5
252b5132
RH
1368 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1369 case "$ac_prog" in
b2ef150d 1370 # Accept absolute paths.
a74801ba 1371 [\\/]* | [A-Za-z]:[\\/]*)
b2ef150d
ILT
1372 re_direlt='/[^/][^/]*/\.\./'
1373 # Canonicalize the path of ld
1374 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1375 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1376 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1377 done
1378 test -z "$LD" && LD="$ac_prog"
1379 ;;
252b5132
RH
1380 "")
1381 # If it fails, then pretend we aren't using GCC.
1382 ac_prog=ld
1383 ;;
1384 *)
1385 # If it is relative, then search for the first ld in PATH.
1386 with_gnu_ld=unknown
1387 ;;
1388 esac
1389elif test "$with_gnu_ld" = yes; then
1390 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3f9b03b5 1391echo "configure:1392: checking for GNU ld" >&5
252b5132
RH
1392else
1393 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3f9b03b5 1394echo "configure:1395: checking for non-GNU ld" >&5
252b5132 1395fi
653f71ca 1396if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
252b5132
RH
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398else
1399 if test -z "$LD"; then
a74801ba 1400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1401 for ac_dir in $PATH; do
1402 test -z "$ac_dir" && ac_dir=.
a74801ba 1403 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
252b5132
RH
1404 ac_cv_path_LD="$ac_dir/$ac_prog"
1405 # Check to see if the program is GNU ld. I'd rather use --version,
1406 # but apparently some GNU ld's only accept -v.
1407 # Break only if it was the GNU/non-GNU ld that we prefer.
1408 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1409 test "$with_gnu_ld" != no && break
1410 else
b2ef150d 1411 test "$with_gnu_ld" != yes && break
252b5132
RH
1412 fi
1413 fi
1414 done
1415 IFS="$ac_save_ifs"
1416else
1417 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1418fi
1419fi
1420
1421LD="$ac_cv_path_LD"
1422if test -n "$LD"; then
1423 echo "$ac_t""$LD" 1>&6
1424else
1425 echo "$ac_t""no" 1>&6
1426fi
1427test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
252b5132 1428echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3f9b03b5 1429echo "configure:1430: checking if the linker ($LD) is GNU ld" >&5
653f71ca 1430if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
252b5132
RH
1431 echo $ac_n "(cached) $ac_c" 1>&6
1432else
1433 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1434if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1435 ac_cv_prog_gnu_ld=yes
1436else
1437 ac_cv_prog_gnu_ld=no
1438fi
1439fi
1440
1441echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1442
1443
1444echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3f9b03b5 1445echo "configure:1446: checking for BSD-compatible nm" >&5
653f71ca 1446if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
252b5132
RH
1447 echo $ac_n "(cached) $ac_c" 1>&6
1448else
1449 if test -n "$NM"; then
1450 # Let the user override the test.
1451 ac_cv_path_NM="$NM"
1452else
a74801ba 1453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
b2ef150d 1454 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132 1455 test -z "$ac_dir" && ac_dir=.
a74801ba 1456 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
252b5132
RH
1457 # Check to see if the nm accepts a BSD-compat flag.
1458 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1459 # nm: unknown option "B" ignored
1460 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
b2ef150d
ILT
1461 ac_cv_path_NM="$ac_dir/nm -B"
1462 break
252b5132 1463 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
b2ef150d
ILT
1464 ac_cv_path_NM="$ac_dir/nm -p"
1465 break
252b5132 1466 else
b2ef150d
ILT
1467 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1468 continue # so that we can try to find one that supports BSD flags
252b5132 1469 fi
252b5132
RH
1470 fi
1471 done
1472 IFS="$ac_save_ifs"
1473 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1474fi
1475fi
1476
1477NM="$ac_cv_path_NM"
1478echo "$ac_t""$NM" 1>&6
1479
252b5132 1480echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3f9b03b5 1481echo "configure:1482: checking whether ln -s works" >&5
653f71ca 1482if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
252b5132
RH
1483 echo $ac_n "(cached) $ac_c" 1>&6
1484else
1485 rm -f conftestdata
1486if ln -s X conftestdata 2>/dev/null
1487then
1488 rm -f conftestdata
1489 ac_cv_prog_LN_S="ln -s"
1490else
1491 ac_cv_prog_LN_S=ln
1492fi
1493fi
1494LN_S="$ac_cv_prog_LN_S"
1495if test "$ac_cv_prog_LN_S" = "ln -s"; then
1496 echo "$ac_t""yes" 1>&6
1497else
1498 echo "$ac_t""no" 1>&6
1499fi
1500
252b5132
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.
289c596c 1522case "$host" in
252b5132
RH
1523*-*-irix6*)
1524 # Find out which ABI we are using.
289c596c
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
289c596c 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
289c596c 1552#line 1553 "configure"
b2ef150d
ILT
1553#include "confdefs.h"
1554
1555int main() {
1556
1557; return 0; }
1558EOF
289c596c 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 \
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 1815#line 1816 "configure"
252b5132
RH
1816#include "confdefs.h"
1817
1818int main() {
1819return __MINGW32__;
1820; return 0; }
1821EOF
289c596c 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
289c596c 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=
289c596c 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
3f9b03b5 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 2004#line 2005 "configure"
252b5132
RH
2005#include "confdefs.h"
2006
2007main(){return(0);}
2008EOF
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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"
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 2368#line 2369 "configure"
252b5132
RH
2369#include "confdefs.h"
2370
2371int main() {
653f71ca 2372} $ac_kw foo() {
252b5132
RH
2373; return 0; }
2374EOF
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 3136#line 3137 "configure"
252b5132
RH
3137#include "confdefs.h"
3138#include <locale.h>
3139int main() {
3140return LC_MESSAGES
3141; return 0; }
3142EOF
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 3235#line 3236 "configure"
252b5132
RH
3236#include "confdefs.h"
3237#include <libintl.h>
3238int main() {
3239return (int) gettext ("")
3240; return 0; }
3241EOF
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 3298#line 3299 "configure"
252b5132
RH
3299#include "confdefs.h"
3300
3301int main() {
3302return (int) gettext ("")
3303; return 0; }
3304EOF
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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
289c596c 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"
289c596c 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
289c596c 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
289c596c 4686#line 4687 "configure"
252b5132
RH
4687#include "confdefs.h"
4688#include <sys/procfs.h>
4689int main() {
4690prstatus_t avar
4691; return 0; }
4692EOF
289c596c 4693if { (eval echo configure:4694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4694 rm -rf conftest*
4695 bfd_cv_have_sys_procfs_type_prstatus_t=yes
4696else
4697 echo "configure: failed program was:" >&5
4698 cat conftest.$ac_ext >&5
4699 rm -rf conftest*
4700 bfd_cv_have_sys_procfs_type_prstatus_t=no
4701
4702fi
4703rm -f conftest*
4704fi
4705
4706 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
4707 cat >> confdefs.h <<\EOF
4708#define HAVE_PRSTATUS_T 1
4709EOF
4710
4711 fi
4712 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
4713
4714 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
289c596c 4715echo "configure:4716: checking for prstatus_t.pr_who in sys/procfs.h" >&5
653f71ca 4716 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
252b5132
RH
4717 echo $ac_n "(cached) $ac_c" 1>&6
4718else
4719 cat > conftest.$ac_ext <<EOF
289c596c 4720#line 4721 "configure"
252b5132
RH
4721#include "confdefs.h"
4722#include <sys/procfs.h>
4723int main() {
4724prstatus_t avar; void* aref = (void*) &avar.pr_who
4725; return 0; }
4726EOF
289c596c 4727if { (eval echo configure:4728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4728 rm -rf conftest*
4729 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
4730else
4731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
4733 rm -rf conftest*
4734 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
4735
4736fi
4737rm -f conftest*
4738fi
4739
4740 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
4741 cat >> confdefs.h <<\EOF
4742#define HAVE_PRSTATUS_T_PR_WHO 1
4743EOF
4744
4745 fi
4746 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
4747
4748 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
289c596c 4749echo "configure:4750: checking for pstatus_t in sys/procfs.h" >&5
653f71ca 4750 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
252b5132
RH
4751 echo $ac_n "(cached) $ac_c" 1>&6
4752else
4753 cat > conftest.$ac_ext <<EOF
289c596c 4754#line 4755 "configure"
252b5132
RH
4755#include "confdefs.h"
4756#include <sys/procfs.h>
4757int main() {
4758pstatus_t avar
4759; return 0; }
4760EOF
289c596c 4761if { (eval echo configure:4762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4762 rm -rf conftest*
4763 bfd_cv_have_sys_procfs_type_pstatus_t=yes
4764else
4765 echo "configure: failed program was:" >&5
4766 cat conftest.$ac_ext >&5
4767 rm -rf conftest*
4768 bfd_cv_have_sys_procfs_type_pstatus_t=no
4769
4770fi
4771rm -f conftest*
4772fi
4773
4774 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4775 cat >> confdefs.h <<\EOF
4776#define HAVE_PSTATUS_T 1
4777EOF
4778
4779 fi
4780 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4781
4782 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
289c596c 4783echo "configure:4784: checking for prpsinfo_t in sys/procfs.h" >&5
653f71ca 4784 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
252b5132
RH
4785 echo $ac_n "(cached) $ac_c" 1>&6
4786else
4787 cat > conftest.$ac_ext <<EOF
289c596c 4788#line 4789 "configure"
252b5132
RH
4789#include "confdefs.h"
4790#include <sys/procfs.h>
4791int main() {
4792prpsinfo_t avar
4793; return 0; }
4794EOF
289c596c 4795if { (eval echo configure:4796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4796 rm -rf conftest*
4797 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
4798else
4799 echo "configure: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
4801 rm -rf conftest*
4802 bfd_cv_have_sys_procfs_type_prpsinfo_t=no
4803
4804fi
4805rm -f conftest*
4806fi
4807
4808 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
4809 cat >> confdefs.h <<\EOF
4810#define HAVE_PRPSINFO_T 1
4811EOF
4812
4813 fi
4814 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
4815
4816 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
289c596c 4817echo "configure:4818: checking for psinfo_t in sys/procfs.h" >&5
653f71ca 4818 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
252b5132
RH
4819 echo $ac_n "(cached) $ac_c" 1>&6
4820else
4821 cat > conftest.$ac_ext <<EOF
289c596c 4822#line 4823 "configure"
252b5132
RH
4823#include "confdefs.h"
4824#include <sys/procfs.h>
4825int main() {
4826psinfo_t avar
4827; return 0; }
4828EOF
289c596c 4829if { (eval echo configure:4830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4830 rm -rf conftest*
4831 bfd_cv_have_sys_procfs_type_psinfo_t=yes
4832else
4833 echo "configure: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4835 rm -rf conftest*
4836 bfd_cv_have_sys_procfs_type_psinfo_t=no
4837
4838fi
4839rm -f conftest*
4840fi
4841
4842 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
4843 cat >> confdefs.h <<\EOF
4844#define HAVE_PSINFO_T 1
4845EOF
4846
4847 fi
4848 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
4849
4850 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
289c596c 4851echo "configure:4852: checking for lwpstatus_t in sys/procfs.h" >&5
653f71ca 4852 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
252b5132
RH
4853 echo $ac_n "(cached) $ac_c" 1>&6
4854else
4855 cat > conftest.$ac_ext <<EOF
289c596c 4856#line 4857 "configure"
252b5132
RH
4857#include "confdefs.h"
4858#include <sys/procfs.h>
4859int main() {
4860lwpstatus_t avar
4861; return 0; }
4862EOF
289c596c 4863if { (eval echo configure:4864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4864 rm -rf conftest*
4865 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
4866else
4867 echo "configure: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 rm -rf conftest*
4870 bfd_cv_have_sys_procfs_type_lwpstatus_t=no
4871
4872fi
4873rm -f conftest*
4874fi
4875
4876 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
4877 cat >> confdefs.h <<\EOF
4878#define HAVE_LWPSTATUS_T 1
4879EOF
4880
4881 fi
4882 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
4883
4884 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
289c596c 4885echo "configure:4886: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
653f71ca 4886 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
252b5132
RH
4887 echo $ac_n "(cached) $ac_c" 1>&6
4888else
4889 cat > conftest.$ac_ext <<EOF
289c596c 4890#line 4891 "configure"
252b5132
RH
4891#include "confdefs.h"
4892#include <sys/procfs.h>
4893int main() {
4894lwpstatus_t avar; void* aref = (void*) &avar.pr_context
4895; return 0; }
4896EOF
289c596c 4897if { (eval echo configure:4898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4898 rm -rf conftest*
4899 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
4900else
4901 echo "configure: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4903 rm -rf conftest*
4904 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
4905
4906fi
4907rm -f conftest*
4908fi
4909
4910 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
4911 cat >> confdefs.h <<\EOF
4912#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
4913EOF
4914
4915 fi
4916 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
4917
4918 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
289c596c 4919echo "configure:4920: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
653f71ca 4920 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
252b5132
RH
4921 echo $ac_n "(cached) $ac_c" 1>&6
4922else
4923 cat > conftest.$ac_ext <<EOF
289c596c 4924#line 4925 "configure"
252b5132
RH
4925#include "confdefs.h"
4926#include <sys/procfs.h>
4927int main() {
4928lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
4929; return 0; }
4930EOF
289c596c 4931if { (eval echo configure:4932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4932 rm -rf conftest*
4933 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
4934else
4935 echo "configure: failed program was:" >&5
4936 cat conftest.$ac_ext >&5
4937 rm -rf conftest*
4938 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
4939
4940fi
4941rm -f conftest*
4942fi
4943
4944 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
4945 cat >> confdefs.h <<\EOF
4946#define HAVE_LWPSTATUS_T_PR_REG 1
4947EOF
4948
4949 fi
4950 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
4951
e3c976c4 4952 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
289c596c 4953echo "configure:4954: checking for win32_pstatus_t in sys/procfs.h" >&5
653f71ca 4954 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
e3c976c4
ILT
4955 echo $ac_n "(cached) $ac_c" 1>&6
4956else
4957 cat > conftest.$ac_ext <<EOF
289c596c 4958#line 4959 "configure"
e3c976c4
ILT
4959#include "confdefs.h"
4960#include <sys/procfs.h>
4961int main() {
4962win32_pstatus_t avar
4963; return 0; }
4964EOF
289c596c 4965if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e3c976c4
ILT
4966 rm -rf conftest*
4967 bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
4968else
4969 echo "configure: failed program was:" >&5
4970 cat conftest.$ac_ext >&5
4971 rm -rf conftest*
4972 bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
4973
4974fi
4975rm -f conftest*
252b5132
RH
4976fi
4977
e3c976c4 4978 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
16e9c715 4979 cat >> confdefs.h <<\EOF
e3c976c4 4980#define HAVE_WIN32_PSTATUS_T 1
16e9c715
NC
4981EOF
4982
4983 fi
e3c976c4
ILT
4984 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
4985
4986 fi
4987fi
16e9c715 4988
252b5132 4989
3f9b03b5
AM
4990if test -n "$TRAD_HEADER"; then
4991 cat >> confdefs.h <<EOF
252b5132
RH
4992#define TRAD_HEADER $TRAD_HEADER
4993EOF
4994
3f9b03b5 4995fi
252b5132
RH
4996
4997# Horrible hacks to build DLLs on Windows.
4998WIN32LDFLAGS=
4999WIN32LIBADD=
5000case "${host}" in
5001*-*-cygwin*)
5002 if test "$enable_shared" = "yes"; then
5003 WIN32LDFLAGS="-no-undefined"
5004 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
5005 fi
5006 ;;
5007esac
5008
5009
5010
5011# target stuff:
5012
5013# Canonicalize the secondary target names.
5014if test -n "$enable_targets" ; then
5015 for targ in `echo $enable_targets | sed 's/,/ /g'`
5016 do
6d83c84b 5017 result=`$ac_config_sub $targ 2>/dev/null`
252b5132
RH
5018 if test -n "$result" ; then
5019 canon_targets="$canon_targets $result"
5020 else
5021 # Allow targets that config.sub doesn't recognize, like "all".
5022 canon_targets="$canon_targets $targ"
5023 fi
5024 done
5025fi
5026
5027all_targets=false
5028defvec=
5029selvecs=
5030selarchs=
5031TDEFINES=
5032for targ in $target $canon_targets
5033do
5034 if test "x$targ" = "xall"; then
5035 all_targets=true
5036 else
5037 . $srcdir/config.bfd
5038 if test "x$targ" = "x$target"; then
5039 defvec=$targ_defvec
5040 fi
5041 selvecs="$selvecs $targ_defvec $targ_selvecs"
5042 selarchs="$selarchs $targ_archs"
5043 TDEFINES="$TDEFINES $targ_cflags"
5044 fi
5045done
5046
5047
5048# This processing still needs to be done if we're to decide properly whether
5049# 64-bit support needs to be compiled in. Currently, it will be included if
5050# the default or any other explicitly requested target requires it; it
5051# will not be included on a 32-bit host if no 64-bit target is requested, and
9eb7245e 5052# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
252b5132
RH
5053# used.
5054
5055# uniq the default and selected vectors in all the configured targets.
5056f=""
5057for i in $selvecs ; do
5058 case " $f " in
5059 *" $i "*) ;;
5060 *) f="$f $i" ;;
5061 esac
5062done
5063selvecs="$f"
5064
5065
5066# uniq the architectures in all the configured targets.
5067f=""
5068for i in $selarchs ; do
5069 case " $f " in
5070 *" $i "*) ;;
5071 *) f="$f $i" ;;
5072 esac
5073done
5074selarchs="$f"
5075
5076# Target backend .o files.
5077tb=
5078
5079elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
5080
5081for vec in $selvecs
5082do
5083 case "$vec" in
5084 # This list is alphabetized to make it easy to compare
5085 # with the two vector lists in targets.c.
5086 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
5087 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
5088 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
5089 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
021e3cc0 5090 armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
277d1b5e
ILT
5091 armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5092 armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5093 armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5094 armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5095 arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5096 arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5097 arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
5098 arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
252b5132
RH
5099 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
5100 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
5101 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
5102 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
5103 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
5104 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
5105 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
5106 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
fac41780
JW
5107 bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
5108 bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo"
5109 target64=true ;;
252b5132
RH
5110 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
5111 target64=true ;;
e59db122
JL
5112 bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"
5113 target64=true ;;
800eeca4
JW
5114 bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
5115 target64=true ;;
5116 bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
5117 target64=true ;;
adde6300 5118 bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
252b5132
RH
5119 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5120 bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5121 bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5122 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5123 bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5124 bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5125 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5126 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5127 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
5128 target64=true ;;
5129 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
5130 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
5131 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
5132 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5b93d8bb 5133 bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
252b5132
RH
5134 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
5135 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
b2ef150d 5136 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
252b5132
RH
5137 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5138 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5139 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
5140 target64=true ;;
5141 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
60bcf0fa
NC
5142 bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
5143 bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
252b5132
RH
5144 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
5145 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
5146 bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5147 bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5148 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
5149 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
0bcb993b
ILT
5150 bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
5151 bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
252b5132
RH
5152 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5153 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5154 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5155 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5156 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
dd745cfa
UC
5157 bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5158 bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
252b5132
RH
5159 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
5160 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
5161 target64=true ;;
5162 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
5163 target64=true ;;
5164 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
5165 target64=true ;;
f4bda984
RH
5166 cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
5167 cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
252b5132
RH
5168 demo_64_vec) tb="$tb demo64.lo aout64.lo"
5169 target64=true ;;
5170 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5171 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5172 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5173 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
5174 target64=true ;;
5175 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
5176 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
5177 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
5178 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
5179 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
5180 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
5181 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
5182 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
5183 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
5184 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
5185 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
5186 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
5187 i386msdos_vec) tb="$tb i386msdos.lo" ;;
277d1b5e
ILT
5188 i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
5189 i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
252b5132
RH
5190 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
5191 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
5192 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
5193 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
5194 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
5195 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
5196 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
5197 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
5198 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
5199 ieee_vec) tb="$tb ieee.lo" ;;
5200 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
5201 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
5202 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
5203 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
5204 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
5205 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
5206 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
5207 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
5208 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
5209 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
fb67355a
NC
5210 mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
5211 mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
277d1b5e
ILT
5212 mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
5213 mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
5214 mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
5215 mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
252b5132
RH
5216 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
5217 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
7f6d05e8
CP
5218 rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
5219 target64=true ;;
252b5132
RH
5220 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
5221 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
5222 target64=true ;;
5223 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
5224 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
5225 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
5226 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
5227 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
5228 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
277d1b5e
ILT
5229 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
5230 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
5231 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
5232 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
252b5132
RH
5233 ppcboot_vec) tb="$tb ppcboot.lo" ;;
5234 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5235 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5236 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5237 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
60bcf0fa
NC
5238 shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
5239 shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
252b5132
RH
5240 som_vec) tb="$tb som.lo" ;;
5241 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
5242 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
5243 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
5244 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
5245 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
5246 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
5247 srec_vec) tb="$tb srec.lo" ;;
5248 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
5249 symbolsrec_vec) tb="$tb srec.lo" ;;
5250 tekhex_vec) tb="$tb tekhex.lo" ;;
5251 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
5252 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
81635ce4
TW
5253 tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
5254 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
5255 tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
5256 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
5257 tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
5258 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
252b5132
RH
5259 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
5260 versados_vec) tb="$tb versados.lo" ;;
5261 vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
5262 target64=true ;;
5263 vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
5264 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
5265 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
5266 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
5267
5268 "") ;;
5269 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
5270 esac
5271done
5272
5273# Target architecture .o files.
5274# A couple of CPUs use shorter file names to avoid problems on DOS
5275# filesystems.
5276ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
5277
5278# Weed out duplicate .o files.
5279f=""
5280for i in $tb ; do
5281 case " $f " in
5282 *" $i "*) ;;
5283 *) f="$f $i" ;;
5284 esac
5285done
5286tb="$f"
5287
5288f=""
5289for i in $ta ; do
5290 case " $f " in
5291 *" $i "*) ;;
5292 *) f="$f $i" ;;
5293 esac
5294done
5295ta="$f"
5296
5297bfd_backends="$tb"
5298bfd_machines="$ta"
5299
5300if test x${all_targets} = xtrue ; then
5301 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
5302 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
5303 selvecs=
5304 havevecs=
5305 selarchs=
5306else # all_targets is true
5307 # Only set these if they will be nonempty, for the clever echo.
5308 havevecs=
5309 test -n "$selvecs" &&
5310 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
5311 test -n "$selvecs" &&
5312 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
5313 test -n "$selarchs" &&
5314 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
5315fi # all_targets is true
5316
5317case ${host64}-${target64}-${want64} in
5318 *true*)
5319 wordsize=64
5320 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
5321 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
5322 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
5323 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
5324 fi
5325 ;;
5326 false-false-false)
5327 wordsize=32
5328 all_backends='$(BFD32_BACKENDS)'
5329 ;;
5330esac
5331
5332
5333
5334
5335
5336
5337tdefaults=""
5338test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
5339test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
5340test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
5341test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
5342
5343
5344for ac_hdr in unistd.h
5345do
5346ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5347echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
289c596c 5348echo "configure:5349: checking for $ac_hdr" >&5
653f71ca 5349if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
5350 echo $ac_n "(cached) $ac_c" 1>&6
5351else
5352 cat > conftest.$ac_ext <<EOF
289c596c 5353#line 5354 "configure"
252b5132
RH
5354#include "confdefs.h"
5355#include <$ac_hdr>
5356EOF
5357ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
289c596c 5358{ (eval echo configure:5359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
5359ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5360if test -z "$ac_err"; then
5361 rm -rf conftest*
5362 eval "ac_cv_header_$ac_safe=yes"
5363else
5364 echo "$ac_err" >&5
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 rm -rf conftest*
5368 eval "ac_cv_header_$ac_safe=no"
5369fi
5370rm -f conftest*
5371fi
5372if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5373 echo "$ac_t""yes" 1>&6
5374 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5375 cat >> confdefs.h <<EOF
5376#define $ac_tr_hdr 1
5377EOF
5378
5379else
5380 echo "$ac_t""no" 1>&6
5381fi
5382done
5383
5384for ac_func in getpagesize
5385do
5386echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
289c596c 5387echo "configure:5388: checking for $ac_func" >&5
653f71ca 5388if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
5389 echo $ac_n "(cached) $ac_c" 1>&6
5390else
5391 cat > conftest.$ac_ext <<EOF
289c596c 5392#line 5393 "configure"
252b5132
RH
5393#include "confdefs.h"
5394/* System header to define __stub macros and hopefully few prototypes,
5395 which can conflict with char $ac_func(); below. */
5396#include <assert.h>
5397/* Override any gcc2 internal prototype to avoid an error. */
5398/* We use char because int might match the return type of a gcc2
5399 builtin and then its argument prototype would still apply. */
5400char $ac_func();
5401
5402int main() {
5403
5404/* The GNU C library defines this for functions which it implements
5405 to always fail with ENOSYS. Some functions are actually named
5406 something starting with __ and the normal name is an alias. */
5407#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5408choke me
5409#else
653f71ca 5410$ac_func();
252b5132
RH
5411#endif
5412
5413; return 0; }
5414EOF
289c596c 5415if { (eval echo configure:5416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5416 rm -rf conftest*
5417 eval "ac_cv_func_$ac_func=yes"
5418else
5419 echo "configure: failed program was:" >&5
5420 cat conftest.$ac_ext >&5
5421 rm -rf conftest*
5422 eval "ac_cv_func_$ac_func=no"
5423fi
5424rm -f conftest*
5425fi
5426
5427if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5428 echo "$ac_t""yes" 1>&6
5429 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5430 cat >> confdefs.h <<EOF
5431#define $ac_tr_func 1
5432EOF
5433
5434else
5435 echo "$ac_t""no" 1>&6
5436fi
5437done
5438
5439echo $ac_n "checking for working mmap""... $ac_c" 1>&6
289c596c 5440echo "configure:5441: checking for working mmap" >&5
653f71ca 5441if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
252b5132
RH
5442 echo $ac_n "(cached) $ac_c" 1>&6
5443else
5444 if test "$cross_compiling" = yes; then
5445 ac_cv_func_mmap_fixed_mapped=no
5446else
5447 cat > conftest.$ac_ext <<EOF
289c596c 5448#line 5449 "configure"
252b5132
RH
5449#include "confdefs.h"
5450
5451/* Thanks to Mike Haertel and Jim Avera for this test.
5452 Here is a matrix of mmap possibilities:
5453 mmap private not fixed
5454 mmap private fixed at somewhere currently unmapped
5455 mmap private fixed at somewhere already mapped
5456 mmap shared not fixed
5457 mmap shared fixed at somewhere currently unmapped
5458 mmap shared fixed at somewhere already mapped
5459 For private mappings, we should verify that changes cannot be read()
5460 back from the file, nor mmap's back from the file at a different
5461 address. (There have been systems where private was not correctly
5462 implemented like the infamous i386 svr4.0, and systems where the
5463 VM page cache was not coherent with the filesystem buffer cache
5464 like early versions of FreeBSD and possibly contemporary NetBSD.)
5465 For shared mappings, we should conversely verify that changes get
5466 propogated back to all the places they're supposed to be.
5467
5468 Grep wants private fixed already mapped.
5469 The main things grep needs to know about mmap are:
5470 * does it exist and is it safe to write into the mmap'd area
5471 * how to use it (BSD variants) */
5472#include <sys/types.h>
5473#include <fcntl.h>
5474#include <sys/mman.h>
5475
5476/* This mess was copied from the GNU getpagesize.h. */
5477#ifndef HAVE_GETPAGESIZE
5478# ifdef HAVE_UNISTD_H
5479# include <unistd.h>
5480# endif
5481
5482/* Assume that all systems that can run configure have sys/param.h. */
5483# ifndef HAVE_SYS_PARAM_H
5484# define HAVE_SYS_PARAM_H 1
5485# endif
5486
5487# ifdef _SC_PAGESIZE
5488# define getpagesize() sysconf(_SC_PAGESIZE)
5489# else /* no _SC_PAGESIZE */
5490# ifdef HAVE_SYS_PARAM_H
5491# include <sys/param.h>
5492# ifdef EXEC_PAGESIZE
5493# define getpagesize() EXEC_PAGESIZE
5494# else /* no EXEC_PAGESIZE */
5495# ifdef NBPG
5496# define getpagesize() NBPG * CLSIZE
5497# ifndef CLSIZE
5498# define CLSIZE 1
5499# endif /* no CLSIZE */
5500# else /* no NBPG */
5501# ifdef NBPC
5502# define getpagesize() NBPC
5503# else /* no NBPC */
5504# ifdef PAGESIZE
5505# define getpagesize() PAGESIZE
5506# endif /* PAGESIZE */
5507# endif /* no NBPC */
5508# endif /* no NBPG */
5509# endif /* no EXEC_PAGESIZE */
5510# else /* no HAVE_SYS_PARAM_H */
5511# define getpagesize() 8192 /* punt totally */
5512# endif /* no HAVE_SYS_PARAM_H */
5513# endif /* no _SC_PAGESIZE */
5514
5515#endif /* no HAVE_GETPAGESIZE */
5516
5517#ifdef __cplusplus
5518extern "C" { void *malloc(unsigned); }
5519#else
5520char *malloc();
5521#endif
5522
5523int
5524main()
5525{
5526 char *data, *data2, *data3;
5527 int i, pagesize;
5528 int fd;
5529
5530 pagesize = getpagesize();
5531
5532 /*
5533 * First, make a file with some known garbage in it.
5534 */
5535 data = malloc(pagesize);
5536 if (!data)
5537 exit(1);
5538 for (i = 0; i < pagesize; ++i)
5539 *(data + i) = rand();
5540 umask(0);
5541 fd = creat("conftestmmap", 0600);
5542 if (fd < 0)
5543 exit(1);
5544 if (write(fd, data, pagesize) != pagesize)
5545 exit(1);
5546 close(fd);
5547
5548 /*
5549 * Next, try to mmap the file at a fixed address which
5550 * already has something else allocated at it. If we can,
5551 * also make sure that we see the same garbage.
5552 */
5553 fd = open("conftestmmap", O_RDWR);
5554 if (fd < 0)
5555 exit(1);
5556 data2 = malloc(2 * pagesize);
5557 if (!data2)
5558 exit(1);
5559 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5560 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5561 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5562 exit(1);
5563 for (i = 0; i < pagesize; ++i)
5564 if (*(data + i) != *(data2 + i))
5565 exit(1);
5566
5567 /*
5568 * Finally, make sure that changes to the mapped area
5569 * do not percolate back to the file as seen by read().
5570 * (This is a bug on some variants of i386 svr4.0.)
5571 */
5572 for (i = 0; i < pagesize; ++i)
5573 *(data2 + i) = *(data2 + i) + 1;
5574 data3 = malloc(pagesize);
5575 if (!data3)
5576 exit(1);
5577 if (read(fd, data3, pagesize) != pagesize)
5578 exit(1);
5579 for (i = 0; i < pagesize; ++i)
5580 if (*(data + i) != *(data3 + i))
5581 exit(1);
5582 close(fd);
5583 unlink("conftestmmap");
5584 exit(0);
5585}
5586
5587EOF
289c596c 5588if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
5589then
5590 ac_cv_func_mmap_fixed_mapped=yes
5591else
5592 echo "configure: failed program was:" >&5
5593 cat conftest.$ac_ext >&5
5594 rm -fr conftest*
5595 ac_cv_func_mmap_fixed_mapped=no
5596fi
5597rm -fr conftest*
5598fi
5599
5600fi
5601
5602echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5603if test $ac_cv_func_mmap_fixed_mapped = yes; then
5604 cat >> confdefs.h <<\EOF
5605#define HAVE_MMAP 1
5606EOF
5607
5608fi
5609
5610for ac_func in madvise mprotect
5611do
5612echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
289c596c 5613echo "configure:5614: checking for $ac_func" >&5
653f71ca 5614if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
5615 echo $ac_n "(cached) $ac_c" 1>&6
5616else
5617 cat > conftest.$ac_ext <<EOF
289c596c 5618#line 5619 "configure"
252b5132
RH
5619#include "confdefs.h"
5620/* System header to define __stub macros and hopefully few prototypes,
5621 which can conflict with char $ac_func(); below. */
5622#include <assert.h>
5623/* Override any gcc2 internal prototype to avoid an error. */
5624/* We use char because int might match the return type of a gcc2
5625 builtin and then its argument prototype would still apply. */
5626char $ac_func();
5627
5628int main() {
5629
5630/* The GNU C library defines this for functions which it implements
5631 to always fail with ENOSYS. Some functions are actually named
5632 something starting with __ and the normal name is an alias. */
5633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5634choke me
5635#else
653f71ca 5636$ac_func();
252b5132
RH
5637#endif
5638
5639; return 0; }
5640EOF
289c596c 5641if { (eval echo configure:5642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5642 rm -rf conftest*
5643 eval "ac_cv_func_$ac_func=yes"
5644else
5645 echo "configure: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5647 rm -rf conftest*
5648 eval "ac_cv_func_$ac_func=no"
5649fi
5650rm -f conftest*
5651fi
5652
5653if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5654 echo "$ac_t""yes" 1>&6
5655 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5656 cat >> confdefs.h <<EOF
5657#define $ac_tr_func 1
5658EOF
5659
5660else
5661 echo "$ac_t""no" 1>&6
5662fi
5663done
5664
5665case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
5666 true+yes ) cat >> confdefs.h <<\EOF
5667#define USE_MMAP 1
5668EOF
5669 ;;
5670esac
5671
5672rm -f doc/config.status
5673trap '' 1 2 15
5674cat > confcache <<\EOF
5675# This file is a shell script that caches the results of configure
5676# tests run on this system so they can be shared between configure
5677# scripts and configure runs. It is not useful on other systems.
5678# If it contains results you don't want to keep, you may remove or edit it.
5679#
5680# By default, configure uses ./config.cache as the cache file,
5681# creating it if it does not exist already. You can give configure
5682# the --cache-file=FILE option to use a different cache file; that is
5683# what configure does when it calls configure scripts in
5684# subdirectories, so they share the cache.
5685# Giving --cache-file=/dev/null disables caching, for debugging configure.
5686# config.status only pays attention to the cache file if you give it the
5687# --recheck option to rerun configure.
5688#
5689EOF
5690# The following way of writing the cache mishandles newlines in values,
5691# but we know of no workaround that is simple, portable, and efficient.
5692# So, don't put newlines in cache variables' values.
5693# Ultrix sh set writes to stderr and can't be redirected directly,
5694# and sets the high bit in the cache file unless we assign to the vars.
5695(set) 2>&1 |
5696 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5697 *ac_space=\ *)
5698 # `set' does not quote correctly, so add quotes (double-quote substitution
5699 # turns \\\\ into \\, and sed turns \\ into \).
5700 sed -n \
5701 -e "s/'/'\\\\''/g" \
5702 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5703 ;;
5704 *)
5705 # `set' quotes correctly as required by POSIX, so do not add quotes.
5706 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5707 ;;
5708 esac >> confcache
5709if cmp -s $cache_file confcache; then
5710 :
5711else
5712 if test -w $cache_file; then
5713 echo "updating cache $cache_file"
5714 cat confcache > $cache_file
5715 else
5716 echo "not updating unwritable cache $cache_file"
5717 fi
5718fi
5719rm -f confcache
5720
5721trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5722
5723test "x$prefix" = xNONE && prefix=$ac_default_prefix
5724# Let make expand exec_prefix.
5725test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5726
5727# Any assignment to VPATH causes Sun make to only execute
5728# the first set of double-colon rules, so remove it if not needed.
5729# If there is a colon in the path, we need to keep it.
5730if test "x$srcdir" = x.; then
5731 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5732fi
5733
5734trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5735
5736DEFS=-DHAVE_CONFIG_H
5737
5738# Without the "./", some shells look in PATH for config.status.
5739: ${CONFIG_STATUS=./config.status}
5740
5741echo creating $CONFIG_STATUS
5742rm -f $CONFIG_STATUS
5743cat > $CONFIG_STATUS <<EOF
5744#! /bin/sh
5745# Generated automatically by configure.
5746# Run this file to recreate the current configuration.
5747# This directory was configured as follows,
5748# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5749#
5750# $0 $ac_configure_args
5751#
5752# Compiler output produced by configure, useful for debugging
5753# configure, is in ./config.log if it exists.
5754
5755ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5756for ac_option
5757do
5758 case "\$ac_option" in
5759 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5760 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5761 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5762 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
653f71ca 5763 echo "$CONFIG_STATUS generated by autoconf version 2.13"
252b5132
RH
5764 exit 0 ;;
5765 -help | --help | --hel | --he | --h)
5766 echo "\$ac_cs_usage"; exit 0 ;;
5767 *) echo "\$ac_cs_usage"; exit 1 ;;
5768 esac
5769done
5770
5771ac_given_srcdir=$srcdir
5772ac_given_INSTALL="$INSTALL"
5773
5774trap '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
5775EOF
5776cat >> $CONFIG_STATUS <<EOF
5777
5778# Protect against being on the right side of a sed subst in config.status.
5779sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5780 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5781$ac_vpsub
5782$extrasub
5783s%@SHELL@%$SHELL%g
5784s%@CFLAGS@%$CFLAGS%g
5785s%@CPPFLAGS@%$CPPFLAGS%g
5786s%@CXXFLAGS@%$CXXFLAGS%g
5787s%@FFLAGS@%$FFLAGS%g
5788s%@DEFS@%$DEFS%g
5789s%@LDFLAGS@%$LDFLAGS%g
5790s%@LIBS@%$LIBS%g
5791s%@exec_prefix@%$exec_prefix%g
5792s%@prefix@%$prefix%g
5793s%@program_transform_name@%$program_transform_name%g
5794s%@bindir@%$bindir%g
5795s%@sbindir@%$sbindir%g
5796s%@libexecdir@%$libexecdir%g
5797s%@datadir@%$datadir%g
5798s%@sysconfdir@%$sysconfdir%g
5799s%@sharedstatedir@%$sharedstatedir%g
5800s%@localstatedir@%$localstatedir%g
5801s%@libdir@%$libdir%g
5802s%@includedir@%$includedir%g
5803s%@oldincludedir@%$oldincludedir%g
5804s%@infodir@%$infodir%g
5805s%@mandir@%$mandir%g
5806s%@host@%$host%g
5807s%@host_alias@%$host_alias%g
5808s%@host_cpu@%$host_cpu%g
5809s%@host_vendor@%$host_vendor%g
5810s%@host_os@%$host_os%g
5811s%@target@%$target%g
5812s%@target_alias@%$target_alias%g
5813s%@target_cpu@%$target_cpu%g
5814s%@target_vendor@%$target_vendor%g
5815s%@target_os@%$target_os%g
5816s%@build@%$build%g
5817s%@build_alias@%$build_alias%g
5818s%@build_cpu@%$build_cpu%g
5819s%@build_vendor@%$build_vendor%g
5820s%@build_os@%$build_os%g
5821s%@CC@%$CC%g
5822s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5823s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5824s%@INSTALL_DATA@%$INSTALL_DATA%g
5825s%@PACKAGE@%$PACKAGE%g
5826s%@VERSION@%$VERSION%g
5827s%@ACLOCAL@%$ACLOCAL%g
5828s%@AUTOCONF@%$AUTOCONF%g
5829s%@AUTOMAKE@%$AUTOMAKE%g
5830s%@AUTOHEADER@%$AUTOHEADER%g
5831s%@MAKEINFO@%$MAKEINFO%g
5832s%@SET_MAKE@%$SET_MAKE%g
5833s%@AR@%$AR%g
5834s%@RANLIB@%$RANLIB%g
252b5132 5835s%@LN_S@%$LN_S%g
b2ef150d 5836s%@LIBTOOL@%$LIBTOOL%g
a2d91340 5837s%@WARN_CFLAGS@%$WARN_CFLAGS%g
252b5132
RH
5838s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5839s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5840s%@MAINT@%$MAINT%g
5841s%@EXEEXT@%$EXEEXT%g
5842s%@CPP@%$CPP%g
5843s%@ALLOCA@%$ALLOCA%g
5844s%@USE_NLS@%$USE_NLS%g
5845s%@MSGFMT@%$MSGFMT%g
5846s%@GMSGFMT@%$GMSGFMT%g
5847s%@XGETTEXT@%$XGETTEXT%g
5848s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5849s%@CATALOGS@%$CATALOGS%g
5850s%@CATOBJEXT@%$CATOBJEXT%g
5851s%@DATADIRNAME@%$DATADIRNAME%g
5852s%@GMOFILES@%$GMOFILES%g
5853s%@INSTOBJEXT@%$INSTOBJEXT%g
5854s%@INTLDEPS@%$INTLDEPS%g
5855s%@INTLLIBS@%$INTLLIBS%g
5856s%@INTLOBJS@%$INTLOBJS%g
5857s%@POFILES@%$POFILES%g
5858s%@POSUB@%$POSUB%g
5859s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5860s%@GT_NO@%$GT_NO%g
5861s%@GT_YES@%$GT_YES%g
5862s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5863s%@l@%$l%g
5864s%@HDEFINES@%$HDEFINES%g
5865s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
5866s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
5867s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
5868s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
5869s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5870s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5871s%@COREFILE@%$COREFILE%g
5872s%@COREFLAG@%$COREFLAG%g
5873s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
5874s%@WIN32LIBADD@%$WIN32LIBADD%g
5875s%@TDEFINES@%$TDEFINES%g
5876s%@wordsize@%$wordsize%g
5877s%@all_backends@%$all_backends%g
5878s%@bfd_backends@%$bfd_backends%g
5879s%@bfd_machines@%$bfd_machines%g
5880s%@tdefaults@%$tdefaults%g
5881
5882CEOF
5883EOF
5884
5885cat >> $CONFIG_STATUS <<\EOF
5886
5887# Split the substitutions into bite-sized pieces for seds with
5888# small command number limits, like on Digital OSF/1 and HP-UX.
5889ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5890ac_file=1 # Number of current file.
5891ac_beg=1 # First line for current file.
5892ac_end=$ac_max_sed_cmds # Line after last line for current file.
5893ac_more_lines=:
5894ac_sed_cmds=""
5895while $ac_more_lines; do
5896 if test $ac_beg -gt 1; then
5897 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5898 else
5899 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5900 fi
5901 if test ! -s conftest.s$ac_file; then
5902 ac_more_lines=false
5903 rm -f conftest.s$ac_file
5904 else
5905 if test -z "$ac_sed_cmds"; then
5906 ac_sed_cmds="sed -f conftest.s$ac_file"
5907 else
5908 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5909 fi
5910 ac_file=`expr $ac_file + 1`
5911 ac_beg=$ac_end
5912 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5913 fi
5914done
5915if test -z "$ac_sed_cmds"; then
5916 ac_sed_cmds=cat
5917fi
5918EOF
5919
5920cat >> $CONFIG_STATUS <<EOF
5921
5922CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
5923EOF
5924cat >> $CONFIG_STATUS <<\EOF
5925for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5926 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5927 case "$ac_file" in
5928 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5929 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5930 *) ac_file_in="${ac_file}.in" ;;
5931 esac
5932
5933 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5934
5935 # Remove last slash and all that follows it. Not all systems have dirname.
5936 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5937 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5938 # The file is in a subdirectory.
5939 test ! -d "$ac_dir" && mkdir "$ac_dir"
5940 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5941 # A "../" for each directory in $ac_dir_suffix.
5942 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5943 else
5944 ac_dir_suffix= ac_dots=
5945 fi
5946
5947 case "$ac_given_srcdir" in
5948 .) srcdir=.
5949 if test -z "$ac_dots"; then top_srcdir=.
5950 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5951 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5952 *) # Relative path.
5953 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5954 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5955 esac
5956
5957 case "$ac_given_INSTALL" in
5958 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5959 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5960 esac
5961
5962 echo creating "$ac_file"
5963 rm -f "$ac_file"
5964 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5965 case "$ac_file" in
5966 *Makefile*) ac_comsub="1i\\
5967# $configure_input" ;;
5968 *) ac_comsub= ;;
5969 esac
5970
5971 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5972 sed -e "$ac_comsub
5973s%@configure_input@%$configure_input%g
5974s%@srcdir@%$srcdir%g
5975s%@top_srcdir@%$top_srcdir%g
5976s%@INSTALL@%$INSTALL%g
5977" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5978fi; done
5979rm -f conftest.s*
5980
5981# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5982# NAME is the cpp macro being defined and VALUE is the value it is being given.
5983#
5984# ac_d sets the value in "#define NAME VALUE" lines.
5985ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5986ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5987ac_dC='\3'
5988ac_dD='%g'
5989# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5990ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5991ac_uB='\([ ]\)%\1#\2define\3'
5992ac_uC=' '
5993ac_uD='\4%g'
5994# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5995ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5996ac_eB='$%\1#\2define\3'
5997ac_eC=' '
5998ac_eD='%g'
5999
6000if test "${CONFIG_HEADERS+set}" != set; then
6001EOF
6002cat >> $CONFIG_STATUS <<EOF
6003 CONFIG_HEADERS="config.h:config.in"
6004EOF
6005cat >> $CONFIG_STATUS <<\EOF
6006fi
6007for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6008 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6009 case "$ac_file" in
6010 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6011 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6012 *) ac_file_in="${ac_file}.in" ;;
6013 esac
6014
6015 echo creating $ac_file
6016
6017 rm -f conftest.frag conftest.in conftest.out
6018 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6019 cat $ac_file_inputs > conftest.in
6020
6021EOF
6022
6023# Transform confdefs.h into a sed script conftest.vals that substitutes
6024# the proper values into config.h.in to produce config.h. And first:
6025# Protect against being on the right side of a sed subst in config.status.
6026# Protect against being in an unquoted here document in config.status.
6027rm -f conftest.vals
6028cat > conftest.hdr <<\EOF
6029s/[\\&%]/\\&/g
6030s%[\\$`]%\\&%g
6031s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6032s%ac_d%ac_u%gp
6033s%ac_u%ac_e%gp
6034EOF
6035sed -n -f conftest.hdr confdefs.h > conftest.vals
6036rm -f conftest.hdr
6037
6038# This sed command replaces #undef with comments. This is necessary, for
6039# example, in the case of _POSIX_SOURCE, which is predefined and required
6040# on some systems where configure will not decide to define it.
6041cat >> conftest.vals <<\EOF
6042s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6043EOF
6044
6045# Break up conftest.vals because some shells have a limit on
6046# the size of here documents, and old seds have small limits too.
6047
6048rm -f conftest.tail
6049while :
6050do
6051 ac_lines=`grep -c . conftest.vals`
6052 # grep -c gives empty output for an empty file on some AIX systems.
6053 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6054 # Write a limited-size here document to conftest.frag.
6055 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6056 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6057 echo 'CEOF
6058 sed -f conftest.frag conftest.in > conftest.out
6059 rm -f conftest.in
6060 mv conftest.out conftest.in
6061' >> $CONFIG_STATUS
6062 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6063 rm -f conftest.vals
6064 mv conftest.tail conftest.vals
6065done
6066rm -f conftest.vals
6067
6068cat >> $CONFIG_STATUS <<\EOF
6069 rm -f conftest.frag conftest.h
6070 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6071 cat conftest.in >> conftest.h
6072 rm -f conftest.in
6073 if cmp -s $ac_file conftest.h 2>/dev/null; then
6074 echo "$ac_file is unchanged"
6075 rm -f conftest.h
6076 else
6077 # Remove last slash and all that follows it. Not all systems have dirname.
6078 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6079 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6080 # The file is in a subdirectory.
6081 test ! -d "$ac_dir" && mkdir "$ac_dir"
6082 fi
6083 rm -f $ac_file
6084 mv conftest.h $ac_file
6085 fi
6086fi; done
6087
6088EOF
6089cat >> $CONFIG_STATUS <<EOF
6090
6091
6092EOF
6093cat >> $CONFIG_STATUS <<\EOF
6094test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6095sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6096exit 0
6097EOF
6098chmod +x $CONFIG_STATUS
6099rm -fr confdefs* $ac_clean_files
653f71ca 6100test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
252b5132 6101