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