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