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