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