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