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