* cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
[deliverable/binutils-gdb.git] / bfd / configure
CommitLineData
8c693660
KR
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
372b296c 4# Generated automatically using autoconf version 2.12.1
a4322a77 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
8c693660
KR
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
c0734708 14ac_help="$ac_help
b9bf4aff
ILT
15 --enable-shared build shared libraries [default=no]
16 --enable-shared=PKGS only build shared libraries if the current package
17 appears as an element in the PKGS list"
c0734708 18ac_help="$ac_help
b9bf4aff
ILT
19 --enable-static build static libraries [default=yes]
20 --enable-static=PKGS only build shared libraries if the current package
21 appears as an element in the PKGS list"
c0734708 22ac_help="$ac_help
b9bf4aff 23 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
8c693660 24ac_help="$ac_help
e818c22e 25 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
8c693660 26ac_help="$ac_help
e818c22e 27 --enable-targets alternative target configurations"
44f795f7
ILT
28ac_help="$ac_help
29 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
85e493f0
ILT
30ac_help="$ac_help
31 --with-mmap try using mmap for BFD input files if available"
c0734708
ILT
32ac_help="$ac_help
33 --enable-maintainer-mode enable make rules and dependencies not useful
34 (and sometimes confusing) to the casual installer"
53d3ce37
TT
35ac_help="$ac_help
36 --disable-nls do not use Native Language Support"
37ac_help="$ac_help
38 --with-included-gettext use the GNU gettext library included here"
8c693660
KR
39
40# Initialize some variables set by options.
41# The variables have the same names as the options, with
42# dashes changed to underlines.
43build=NONE
44cache_file=./config.cache
45exec_prefix=NONE
46host=NONE
47no_create=
48nonopt=NONE
49no_recursion=
50prefix=NONE
51program_prefix=NONE
52program_suffix=NONE
53program_transform_name=s,x,x,
54silent=
55site=
56srcdir=
57target=NONE
58verbose=
59x_includes=NONE
60x_libraries=NONE
85e493f0
ILT
61bindir='${exec_prefix}/bin'
62sbindir='${exec_prefix}/sbin'
63libexecdir='${exec_prefix}/libexec'
64datadir='${prefix}/share'
65sysconfdir='${prefix}/etc'
66sharedstatedir='${prefix}/com'
67localstatedir='${prefix}/var'
68libdir='${exec_prefix}/lib'
69includedir='${prefix}/include'
70oldincludedir='/usr/include'
71infodir='${prefix}/info'
72mandir='${prefix}/man'
8c693660
KR
73
74# Initialize some other variables.
75subdirs=
85e493f0 76MFLAGS= MAKEFLAGS=
372b296c 77SHELL=${CONFIG_SHELL-/bin/sh}
ac388f2a
ILT
78# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
8c693660
KR
80
81ac_prev=
82for ac_option
83do
84
85 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
90 fi
91
92 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
97 # Accept the important Cygnus configure options, so we can diagnose typos.
98
99 case "$ac_option" in
100
85e493f0
ILT
101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
8c693660 107 ac_prev=build ;;
85e493f0 108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
8c693660
KR
109 build="$ac_optarg" ;;
110
111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
85e493f0
ILT
118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
8c693660
KR
124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
126 # Reject names that are not valid shell variable names.
127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
135 # Reject names that are not valid shell variable names.
136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
158
159 -help | --help | --hel | --he)
160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
162 cat << EOF
163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
85e493f0 174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
8c693660 175 [same as prefix]
85e493f0
ILT
176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
8c693660
KR
190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
85e493f0
ILT
193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
8c693660
KR
197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
8c693660 208EOF
85e493f0
ILT
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
8c693660
KR
212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
85e493f0
ILT
219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
8c693660
KR
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
268
85e493f0
ILT
269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
8c693660
KR
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
85e493f0
ILT
318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
8c693660
KR
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
85e493f0
ILT
345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
8c693660
KR
352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
372b296c 361 echo "configure generated by autoconf version 2.12.1"
8c693660
KR
362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
379 # Reject names that are not valid shell variable names.
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
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
385
386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
405 ;;
406
85e493f0 407 *)
8c693660
KR
408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
409 echo "configure: warning: $ac_option: invalid host type" 1>&2
410 fi
411 if test "x$nonopt" != xNONE; then
412 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
418done
419
420if test -n "$ac_prev"; then
421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422fi
423
424trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425
426# File descriptor usage:
427# 0 standard input
428# 1 file creation
429# 2 errors and warnings
430# 3 some systems may open it to /dev/tty
431# 4 used on the Kubota Titan
432# 6 checking for... messages and results
433# 5 compiler messages saved in config.log
434if test "$silent" = yes; then
435 exec 6>/dev/null
436else
437 exec 6>&1
438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running configure, to aid debugging if configure makes a mistake.
444" 1>&5
445
446# Strip out --no-create and --no-recursion so they do not pile up.
447# Also quote any args containing shell metacharacters.
448ac_configure_args=
449for ac_arg
450do
451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459 esac
460done
461
462# NLS nuisances.
ac388f2a
ILT
463# Only set these to C if already set. These must not be set unconditionally
464# because not all systems understand e.g. LANG=C (notably SCO).
465# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466# Non-C LC_CTYPE values break the ctype check.
fd8d7c31 467if test "${LANG+set}" = set; then LANG=C; export LANG; fi
ac388f2a
ILT
468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
8c693660
KR
471
472# confdefs.h avoids OS command line length limits that DEFS can exceed.
473rm -rf conftest* confdefs.h
474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > confdefs.h
476
477# A filename unique to this package, relative to the directory that
478# configure is in, which we can look for to find out if srcdir is correct.
479ac_unique_file=libbfd.c
480
481# Find the source files, if location was not specified.
482if test -z "$srcdir"; then
483 ac_srcdir_defaulted=yes
484 # Try the directory containing this script, then its parent.
485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
490 srcdir=..
491 fi
492else
493 ac_srcdir_defaulted=no
494fi
495if test ! -r $srcdir/$ac_unique_file; then
496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498 else
499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
500 fi
501fi
502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511fi
512for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517done
518
519if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522else
523 echo "creating cache $cache_file"
524 > $cache_file
525fi
526
527ac_ext=c
528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
986cf3b8
ILT
529ac_cpp='$CPP $CPPFLAGS'
530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac388f2a 532cross_compiling=$ac_cv_prog_cc_cross
8c693660
KR
533
534if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542else
543 ac_n= ac_c='\c' ac_t=
544fi
545
546
547
8c693660 548ac_aux_dir=
c0734708 549for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
8c693660
KR
550 if test -f $ac_dir/install-sh; then
551 ac_aux_dir=$ac_dir
552 ac_install_sh="$ac_aux_dir/install-sh -c"
553 break
554 elif test -f $ac_dir/install.sh; then
555 ac_aux_dir=$ac_dir
556 ac_install_sh="$ac_aux_dir/install.sh -c"
557 break
558 fi
559done
560if test -z "$ac_aux_dir"; then
c0734708 561 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
8c693660
KR
562fi
563ac_config_guess=$ac_aux_dir/config.guess
564ac_config_sub=$ac_aux_dir/config.sub
565ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
566
567
568# Do some error checking and defaulting for the host and target type.
569# The inputs are:
570# configure --host=HOST --target=TARGET --build=BUILD NONOPT
571#
572# The rules are:
573# 1. You are not allowed to specify --host, --target, and nonopt at the
85e493f0 574# same time.
8c693660
KR
575# 2. Host defaults to nonopt.
576# 3. If nonopt is not specified, then host defaults to the current host,
577# as determined by config.guess.
578# 4. Target and build default to nonopt.
579# 5. If nonopt is not specified, then target and build default to host.
580
581# The aliases save the names the user supplied, while $host etc.
582# will get canonicalized.
583case $host---$target---$nonopt in
584NONE---*---* | *---NONE---* | *---*---NONE) ;;
585*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
586esac
587
588
c0734708 589# Make sure we can run config.sub.
372b296c 590if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
c0734708
ILT
591else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
592fi
593
594echo $ac_n "checking host system type""... $ac_c" 1>&6
53d3ce37 595echo "configure:596: checking host system type" >&5
c0734708
ILT
596
597host_alias=$host
598case "$host_alias" in
599NONE)
600 case $nonopt in
601 NONE)
372b296c 602 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
c0734708
ILT
603 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
604 fi ;;
605 *) host_alias=$nonopt ;;
606 esac ;;
607esac
608
372b296c 609host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
c0734708
ILT
610host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
611host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
612host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
613echo "$ac_t""$host" 1>&6
614
615echo $ac_n "checking target system type""... $ac_c" 1>&6
53d3ce37 616echo "configure:617: checking target system type" >&5
c0734708
ILT
617
618target_alias=$target
619case "$target_alias" in
620NONE)
621 case $nonopt in
622 NONE) target_alias=$host_alias ;;
623 *) target_alias=$nonopt ;;
624 esac ;;
625esac
626
372b296c 627target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
c0734708
ILT
628target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
629target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
630target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
631echo "$ac_t""$target" 1>&6
632
633echo $ac_n "checking build system type""... $ac_c" 1>&6
53d3ce37 634echo "configure:635: checking build system type" >&5
c0734708
ILT
635
636build_alias=$build
637case "$build_alias" in
638NONE)
639 case $nonopt in
640 NONE) build_alias=$host_alias ;;
641 *) build_alias=$nonopt ;;
642 esac ;;
643esac
644
372b296c 645build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
c0734708
ILT
646build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
647build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
648build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
649echo "$ac_t""$build" 1>&6
650
651test "$host_alias" != "$target_alias" &&
652 test "$program_prefix$program_suffix$program_transform_name" = \
653 NONENONEs,x,x, &&
654 program_prefix=${target_alias}-
655
656# Extract the first word of "gcc", so it can be a program name with args.
657set dummy gcc; ac_word=$2
658echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 659echo "configure:660: checking for $ac_word" >&5
c0734708
ILT
660if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
661 echo $ac_n "(cached) $ac_c" 1>&6
662else
663 if test -n "$CC"; then
664 ac_cv_prog_CC="$CC" # Let the user override the test.
665else
666 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
667 for ac_dir in $PATH; do
668 test -z "$ac_dir" && ac_dir=.
669 if test -f $ac_dir/$ac_word; then
670 ac_cv_prog_CC="gcc"
671 break
672 fi
673 done
674 IFS="$ac_save_ifs"
675fi
676fi
677CC="$ac_cv_prog_CC"
678if test -n "$CC"; then
679 echo "$ac_t""$CC" 1>&6
680else
681 echo "$ac_t""no" 1>&6
682fi
683
684if test -z "$CC"; then
685 # Extract the first word of "cc", so it can be a program name with args.
686set dummy cc; ac_word=$2
687echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 688echo "configure:689: checking for $ac_word" >&5
c0734708
ILT
689if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
690 echo $ac_n "(cached) $ac_c" 1>&6
691else
692 if test -n "$CC"; then
693 ac_cv_prog_CC="$CC" # Let the user override the test.
694else
695 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
696 ac_prog_rejected=no
697 for ac_dir in $PATH; do
698 test -z "$ac_dir" && ac_dir=.
699 if test -f $ac_dir/$ac_word; then
700 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701 ac_prog_rejected=yes
702 continue
703 fi
704 ac_cv_prog_CC="cc"
705 break
706 fi
707 done
708 IFS="$ac_save_ifs"
709if test $ac_prog_rejected = yes; then
710 # We found a bogon in the path, so make sure we never use it.
711 set dummy $ac_cv_prog_CC
712 shift
713 if test $# -gt 0; then
714 # We chose a different compiler from the bogus one.
715 # However, it has the same basename, so the bogon will be chosen
716 # first if we set CC to just the basename; use the full file name.
717 shift
718 set dummy "$ac_dir/$ac_word" "$@"
719 shift
720 ac_cv_prog_CC="$@"
721 fi
722fi
723fi
724fi
725CC="$ac_cv_prog_CC"
726if test -n "$CC"; then
727 echo "$ac_t""$CC" 1>&6
728else
729 echo "$ac_t""no" 1>&6
730fi
731
732 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
733fi
734
735echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
53d3ce37 736echo "configure:737: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c0734708
ILT
737
738ac_ext=c
739# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
740ac_cpp='$CPP $CPPFLAGS'
741ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
742ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
743cross_compiling=$ac_cv_prog_cc_cross
744
745cat > conftest.$ac_ext <<EOF
53d3ce37 746#line 747 "configure"
c0734708
ILT
747#include "confdefs.h"
748main(){return(0);}
749EOF
53d3ce37 750if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
c0734708
ILT
751 ac_cv_prog_cc_works=yes
752 # If we can't run a trivial program, we are probably using a cross compiler.
753 if (./conftest; exit) 2>/dev/null; then
754 ac_cv_prog_cc_cross=no
755 else
756 ac_cv_prog_cc_cross=yes
757 fi
758else
759 echo "configure: failed program was:" >&5
760 cat conftest.$ac_ext >&5
761 ac_cv_prog_cc_works=no
762fi
763rm -fr conftest*
764
765echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
766if test $ac_cv_prog_cc_works = no; then
767 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
768fi
769echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
53d3ce37 770echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c0734708
ILT
771echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
772cross_compiling=$ac_cv_prog_cc_cross
773
774echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
53d3ce37 775echo "configure:776: checking whether we are using GNU C" >&5
c0734708
ILT
776if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
777 echo $ac_n "(cached) $ac_c" 1>&6
778else
779 cat > conftest.c <<EOF
780#ifdef __GNUC__
781 yes;
782#endif
783EOF
53d3ce37 784if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c0734708
ILT
785 ac_cv_prog_gcc=yes
786else
787 ac_cv_prog_gcc=no
788fi
789fi
790
791echo "$ac_t""$ac_cv_prog_gcc" 1>&6
792
793if test $ac_cv_prog_gcc = yes; then
794 GCC=yes
795 ac_test_CFLAGS="${CFLAGS+set}"
796 ac_save_CFLAGS="$CFLAGS"
797 CFLAGS=
798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
53d3ce37 799echo "configure:800: checking whether ${CC-cc} accepts -g" >&5
c0734708
ILT
800if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
801 echo $ac_n "(cached) $ac_c" 1>&6
802else
803 echo 'void f(){}' > conftest.c
804if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
805 ac_cv_prog_cc_g=yes
806else
807 ac_cv_prog_cc_g=no
808fi
809rm -f conftest*
810
811fi
812
813echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
814 if test "$ac_test_CFLAGS" = set; then
815 CFLAGS="$ac_save_CFLAGS"
816 elif test $ac_cv_prog_cc_g = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-O2"
820 fi
821else
822 GCC=
823 test "${CFLAGS+set}" = set || CFLAGS="-g"
824fi
825
826echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
53d3ce37 827echo "configure:828: checking for POSIXized ISC" >&5
c0734708
ILT
828if test -d /etc/conf/kconfig.d &&
829 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
830then
831 echo "$ac_t""yes" 1>&6
832 ISC=yes # If later tests want to check for ISC.
833 cat >> confdefs.h <<\EOF
834#define _POSIX_SOURCE 1
835EOF
836
837 if test "$GCC" = yes; then
838 CC="$CC -posix"
839 else
840 CC="$CC -Xp"
841 fi
842else
843 echo "$ac_t""no" 1>&6
844 ISC=
845fi
846
847
848# Find a good install program. We prefer a C program (faster),
849# so one script is as good as another. But avoid the broken or
850# incompatible versions:
851# SysV /etc/install, /usr/sbin/install
852# SunOS /usr/etc/install
853# IRIX /sbin/install
854# AIX /bin/install
372b296c 855# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
c0734708
ILT
856# AFS /usr/afsws/bin/install, which mishandles nonexistent args
857# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
858# ./install, which can be erroneously created by make from ./install.sh.
859echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
53d3ce37 860echo "configure:861: checking for a BSD compatible install" >&5
c0734708
ILT
861if test -z "$INSTALL"; then
862if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
863 echo $ac_n "(cached) $ac_c" 1>&6
864else
865 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
866 for ac_dir in $PATH; do
867 # Account for people who put trailing slashes in PATH elements.
868 case "$ac_dir/" in
869 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
870 *)
871 # OSF1 and SCO ODT 3.0 have their own names for install.
372b296c
ILT
872 # Don't use installbsd from OSF since it installs stuff as root
873 # by default.
874 for ac_prog in ginstall scoinst install; do
c0734708
ILT
875 if test -f $ac_dir/$ac_prog; then
876 if test $ac_prog = install &&
877 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
878 # AIX install. It has an incompatible calling convention.
c0734708
ILT
879 :
880 else
881 ac_cv_path_install="$ac_dir/$ac_prog -c"
882 break 2
883 fi
884 fi
885 done
886 ;;
887 esac
888 done
889 IFS="$ac_save_IFS"
890
891fi
892 if test "${ac_cv_path_install+set}" = set; then
893 INSTALL="$ac_cv_path_install"
894 else
895 # As a last resort, use the slow shell script. We don't cache a
896 # path for INSTALL within a source directory, because that will
897 # break other packages using the cache if that directory is
898 # removed, or if the path is relative.
899 INSTALL="$ac_install_sh"
900 fi
901fi
902echo "$ac_t""$INSTALL" 1>&6
903
904# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
905# It thinks the first close brace ends the variable substitution.
906test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
907
908test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
909
910
911test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
912
c0734708 913echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
53d3ce37 914echo "configure:915: checking whether build environment is sane" >&5
c0734708
ILT
915# Just in case
916sleep 1
917echo timestamp > conftestfile
918# Do `set' in a subshell so we don't clobber the current shell's
919# arguments. Must try -L first in case configure is actually a
920# symlink; some systems play weird games with the mod time of symlinks
921# (eg FreeBSD returns the mod time of the symlink's containing
922# directory).
923if (
924 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
b9bf4aff 925 if test "$*" = "X"; then
c0734708
ILT
926 # -L didn't work.
927 set X `ls -t $srcdir/configure conftestfile`
928 fi
b9bf4aff
ILT
929 if test "$*" != "X $srcdir/configure conftestfile" \
930 && test "$*" != "X conftestfile $srcdir/configure"; then
931
932 # If neither matched, then we have a broken ls. This can happen
933 # if, for instance, CONFIG_SHELL is bash and it inherits a
934 # broken ls alias from the environment. This has actually
935 # happened. Such a system could not be considered "sane".
936 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
937alias in your environment" 1>&2; exit 1; }
938 fi
939
c0734708
ILT
940 test "$2" = conftestfile
941 )
942then
943 # Ok.
944 :
945else
946 { echo "configure: error: newly created file is older than distributed files!
947Check your system clock" 1>&2; exit 1; }
948fi
949rm -f conftest*
950echo "$ac_t""yes" 1>&6
951if test "$program_transform_name" = s,x,x,; then
952 program_transform_name=
953else
954 # Double any \ or $. echo might interpret backslashes.
955 cat <<\EOF_SED > conftestsed
956s,\\,\\\\,g; s,\$,$$,g
957EOF_SED
958 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
959 rm -f conftestsed
960fi
961test "$program_prefix" != NONE &&
962 program_transform_name="s,^,${program_prefix},; $program_transform_name"
963# Use a double $ so make ignores it.
964test "$program_suffix" != NONE &&
965 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
966
967# sed with no file args requires a program.
968test "$program_transform_name" = "" && program_transform_name="s,x,x,"
969
b9bf4aff 970echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
53d3ce37 971echo "configure:972: checking whether ${MAKE-make} sets \${MAKE}" >&5
b9bf4aff
ILT
972set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
973if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
975else
976 cat > conftestmake <<\EOF
977all:
978 @echo 'ac_maketemp="${MAKE}"'
979EOF
980# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
981eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
982if test -n "$ac_maketemp"; then
983 eval ac_cv_prog_make_${ac_make}_set=yes
984else
985 eval ac_cv_prog_make_${ac_make}_set=no
986fi
987rm -f conftestmake
988fi
989if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
990 echo "$ac_t""yes" 1>&6
991 SET_MAKE=
992else
993 echo "$ac_t""no" 1>&6
994 SET_MAKE="MAKE=${MAKE-make}"
995fi
996
997
998PACKAGE=bfd
999
d510976d 1000VERSION=2.9.4
b9bf4aff
ILT
1001
1002if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1003 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1004fi
1005cat >> confdefs.h <<EOF
1006#define PACKAGE "$PACKAGE"
1007EOF
1008
1009cat >> confdefs.h <<EOF
1010#define VERSION "$VERSION"
1011EOF
1012
1013
1014
c0734708
ILT
1015missing_dir=`cd $ac_aux_dir && pwd`
1016echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
53d3ce37 1017echo "configure:1018: checking for working aclocal" >&5
c0734708
ILT
1018# Run test in a subshell; some versions of sh will print an error if
1019# an executable is not found, even if stderr is redirected.
1020# Redirect stdin to placate older versions of autoconf. Sigh.
1021if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1022 ACLOCAL=aclocal
1023 echo "$ac_t""found" 1>&6
1024else
1025 ACLOCAL="$missing_dir/missing aclocal"
1026 echo "$ac_t""missing" 1>&6
1027fi
1028
1029echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
53d3ce37 1030echo "configure:1031: checking for working autoconf" >&5
c0734708
ILT
1031# Run test in a subshell; some versions of sh will print an error if
1032# an executable is not found, even if stderr is redirected.
1033# Redirect stdin to placate older versions of autoconf. Sigh.
1034if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1035 AUTOCONF=autoconf
1036 echo "$ac_t""found" 1>&6
1037else
1038 AUTOCONF="$missing_dir/missing autoconf"
1039 echo "$ac_t""missing" 1>&6
1040fi
1041
1042echo $ac_n "checking for working automake""... $ac_c" 1>&6
53d3ce37 1043echo "configure:1044: checking for working automake" >&5
c0734708
ILT
1044# Run test in a subshell; some versions of sh will print an error if
1045# an executable is not found, even if stderr is redirected.
1046# Redirect stdin to placate older versions of autoconf. Sigh.
1047if (automake --version) < /dev/null > /dev/null 2>&1; then
1048 AUTOMAKE=automake
1049 echo "$ac_t""found" 1>&6
1050else
1051 AUTOMAKE="$missing_dir/missing automake"
1052 echo "$ac_t""missing" 1>&6
1053fi
1054
1055echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
53d3ce37 1056echo "configure:1057: checking for working autoheader" >&5
c0734708
ILT
1057# Run test in a subshell; some versions of sh will print an error if
1058# an executable is not found, even if stderr is redirected.
1059# Redirect stdin to placate older versions of autoconf. Sigh.
1060if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1061 AUTOHEADER=autoheader
1062 echo "$ac_t""found" 1>&6
1063else
1064 AUTOHEADER="$missing_dir/missing autoheader"
1065 echo "$ac_t""missing" 1>&6
1066fi
1067
1068echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
53d3ce37 1069echo "configure:1070: checking for working makeinfo" >&5
c0734708
ILT
1070# Run test in a subshell; some versions of sh will print an error if
1071# an executable is not found, even if stderr is redirected.
1072# Redirect stdin to placate older versions of autoconf. Sigh.
1073if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1074 MAKEINFO=makeinfo
1075 echo "$ac_t""found" 1>&6
1076else
1077 MAKEINFO="$missing_dir/missing makeinfo"
1078 echo "$ac_t""missing" 1>&6
1079fi
1080
c0734708
ILT
1081
1082
7810074c
ILT
1083if test $host != $build; then
1084 ac_tool_prefix=${host_alias}-
1085else
1086 ac_tool_prefix=
1087fi
1088
1089# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1090set dummy ${ac_tool_prefix}ar; ac_word=$2
1091echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1092echo "configure:1093: checking for $ac_word" >&5
7810074c
ILT
1093if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096 if test -n "$AR"; then
1097 ac_cv_prog_AR="$AR" # Let the user override the test.
1098else
1099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1100 for ac_dir in $PATH; do
1101 test -z "$ac_dir" && ac_dir=.
1102 if test -f $ac_dir/$ac_word; then
1103 ac_cv_prog_AR="${ac_tool_prefix}ar"
1104 break
1105 fi
1106 done
1107 IFS="$ac_save_ifs"
1108 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1109fi
1110fi
1111AR="$ac_cv_prog_AR"
1112if test -n "$AR"; then
1113 echo "$ac_t""$AR" 1>&6
1114else
1115 echo "$ac_t""no" 1>&6
1116fi
1117
1118
1119
1120# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1121set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1122echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1123echo "configure:1124: checking for $ac_word" >&5
7810074c
ILT
1124if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1125 echo $ac_n "(cached) $ac_c" 1>&6
1126else
1127 if test -n "$RANLIB"; then
1128 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1129else
1130 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1131 for ac_dir in $PATH; do
1132 test -z "$ac_dir" && ac_dir=.
1133 if test -f $ac_dir/$ac_word; then
1134 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1135 break
1136 fi
1137 done
1138 IFS="$ac_save_ifs"
1139fi
1140fi
1141RANLIB="$ac_cv_prog_RANLIB"
1142if test -n "$RANLIB"; then
1143 echo "$ac_t""$RANLIB" 1>&6
1144else
1145 echo "$ac_t""no" 1>&6
1146fi
1147
1148
1149if test -z "$ac_cv_prog_RANLIB"; then
1150if test -n "$ac_tool_prefix"; then
1151 # Extract the first word of "ranlib", so it can be a program name with args.
1152set dummy ranlib; ac_word=$2
1153echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1154echo "configure:1155: checking for $ac_word" >&5
7810074c
ILT
1155if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157else
1158 if test -n "$RANLIB"; then
1159 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1160else
1161 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1162 for ac_dir in $PATH; do
1163 test -z "$ac_dir" && ac_dir=.
1164 if test -f $ac_dir/$ac_word; then
1165 ac_cv_prog_RANLIB="ranlib"
1166 break
1167 fi
1168 done
1169 IFS="$ac_save_ifs"
1170 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1171fi
1172fi
1173RANLIB="$ac_cv_prog_RANLIB"
1174if test -n "$RANLIB"; then
1175 echo "$ac_t""$RANLIB" 1>&6
1176else
1177 echo "$ac_t""no" 1>&6
1178fi
1179
1180else
1181 RANLIB=":"
1182fi
1183fi
1184
1185
b9bf4aff
ILT
1186# Check whether --enable-shared or --disable-shared was given.
1187if test "${enable_shared+set}" = set; then
1188 enableval="$enable_shared"
1189 p=${PACKAGE-default}
1190case "$enableval" in
1191yes) enable_shared=yes ;;
1192no) enable_shared=no ;;
1193*)
1194 enable_shared=no
1195 # Look at the argument we got. We use all the common list separators.
1196 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1197 for pkg in $enableval; do
1198 if test "X$pkg" = "X$p"; then
1199 enable_shared=yes
1200 fi
1201 done
1202 IFS="$ac_save_ifs"
1203 ;;
1204esac
1205else
1206 enable_shared=no
1207fi
1208
1209
1210# Check whether --enable-static or --disable-static was given.
1211if test "${enable_static+set}" = set; then
1212 enableval="$enable_static"
1213 p=${PACKAGE-default}
1214case "$enableval" in
1215yes) enable_static=yes ;;
1216no) enable_static=no ;;
1217*)
1218 enable_static=no
1219 # Look at the argument we got. We use all the common list separators.
1220 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1221 for pkg in $enableval; do
1222 if test "X$pkg" = "X$p"; then
1223 enable_static=yes
1224 fi
1225 done
1226 IFS="$ac_save_ifs"
1227 ;;
1228esac
1229else
1230 enable_static=yes
1231fi
9a837903 1232
c0734708
ILT
1233# Extract the first word of "ranlib", so it can be a program name with args.
1234set dummy ranlib; ac_word=$2
1235echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1236echo "configure:1237: checking for $ac_word" >&5
c0734708
ILT
1237if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239else
1240 if test -n "$RANLIB"; then
1241 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1242else
1243 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1244 for ac_dir in $PATH; do
1245 test -z "$ac_dir" && ac_dir=.
1246 if test -f $ac_dir/$ac_word; then
1247 ac_cv_prog_RANLIB="ranlib"
1248 break
1249 fi
1250 done
1251 IFS="$ac_save_ifs"
1252 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1253fi
1254fi
1255RANLIB="$ac_cv_prog_RANLIB"
1256if test -n "$RANLIB"; then
1257 echo "$ac_t""$RANLIB" 1>&6
1258else
1259 echo "$ac_t""no" 1>&6
1260fi
1261
1262# Check whether --with-gnu-ld or --without-gnu-ld was given.
1263if test "${with_gnu_ld+set}" = set; then
1264 withval="$with_gnu_ld"
1265 test "$withval" = no || with_gnu_ld=yes
1266else
1267 with_gnu_ld=no
1268fi
1269
9a837903
ILT
1270
1271ac_prog=ld
1272if test "$ac_cv_prog_gcc" = yes; then
1273 # Check if gcc -print-prog-name=ld gives a path.
1274 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
53d3ce37 1275echo "configure:1276: checking for ld used by GCC" >&5
9a837903
ILT
1276 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1277 case "$ac_prog" in
1278 # Accept absolute paths.
5a83fcdd 1279 /* | [A-Za-z]:\\*)
9a837903
ILT
1280 test -z "$LD" && LD="$ac_prog"
1281 ;;
1282 "")
1283 # If it fails, then pretend we aren't using GCC.
1284 ac_prog=ld
1285 ;;
1286 *)
1287 # If it is relative, then search for the first ld in PATH.
1288 with_gnu_ld=unknown
1289 ;;
1290 esac
1291elif test "$with_gnu_ld" = yes; then
c0734708 1292 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
53d3ce37 1293echo "configure:1294: checking for GNU ld" >&5
c0734708
ILT
1294else
1295 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
53d3ce37 1296echo "configure:1297: checking for non-GNU ld" >&5
c0734708
ILT
1297fi
1298if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300else
9a837903 1301 if test -z "$LD"; then
c0734708
ILT
1302 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1303 for ac_dir in $PATH; do
1304 test -z "$ac_dir" && ac_dir=.
9a837903
ILT
1305 if test -f "$ac_dir/$ac_prog"; then
1306 ac_cv_path_LD="$ac_dir/$ac_prog"
c0734708
ILT
1307 # Check to see if the program is GNU ld. I'd rather use --version,
1308 # but apparently some GNU ld's only accept -v.
1309 # Break only if it was the GNU/non-GNU ld that we prefer.
9a837903
ILT
1310 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1311 test "$with_gnu_ld" != no && break
c0734708
ILT
1312 else
1313 test "$with_gnu_ld" != yes && break
1314 fi
1315 fi
1316 done
1317 IFS="$ac_save_ifs"
9a837903 1318else
7810074c 1319 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9a837903 1320fi
c0734708
ILT
1321fi
1322
1323LD="$ac_cv_path_LD"
1324if test -n "$LD"; then
1325 echo "$ac_t""$LD" 1>&6
1326else
1327 echo "$ac_t""no" 1>&6
1328fi
1329test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1330
9a837903 1331echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
53d3ce37 1332echo "configure:1333: checking if the linker ($LD) is GNU ld" >&5
c0734708
ILT
1333if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1334 echo $ac_n "(cached) $ac_c" 1>&6
1335else
1336 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9a837903 1337if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
c0734708
ILT
1338 ac_cv_prog_gnu_ld=yes
1339else
1340 ac_cv_prog_gnu_ld=no
1341fi
1342fi
1343
1344echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1345
1346
9a837903 1347echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
53d3ce37 1348echo "configure:1349: checking for BSD-compatible nm" >&5
9a837903
ILT
1349if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1350 echo $ac_n "(cached) $ac_c" 1>&6
1351else
5a83fcdd 1352 if test -z "$NM"; then
9a837903
ILT
1353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1354 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
b9bf4aff 1355 test -z "$ac_dir" && ac_dir=.
9a837903
ILT
1356 if test -f $ac_dir/nm; then
1357 # Check to see if the nm accepts a BSD-compat flag.
b9bf4aff 1358 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
9a837903 1359 # nm: unknown option "B" ignored
b9bf4aff 1360 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
9a837903 1361 ac_cv_path_NM="$ac_dir/nm -B"
b9bf4aff 1362 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
9a837903
ILT
1363 ac_cv_path_NM="$ac_dir/nm -p"
1364 else
1365 ac_cv_path_NM="$ac_dir/nm"
1366 fi
1367 break
1368 fi
1369 done
1370 IFS="$ac_save_ifs"
1371 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
5a83fcdd
ILT
1372else
1373 ac_cv_path_NM="$NM" # Let the user override the test with a path.
1374fi
9a837903
ILT
1375fi
1376
1377NM="$ac_cv_path_NM"
1378echo "$ac_t""$NM" 1>&6
1379
1380
c0734708 1381echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
53d3ce37 1382echo "configure:1383: checking whether ln -s works" >&5
c0734708
ILT
1383if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1385else
1386 rm -f conftestdata
1387if ln -s X conftestdata 2>/dev/null
1388then
1389 rm -f conftestdata
1390 ac_cv_prog_LN_S="ln -s"
1391else
1392 ac_cv_prog_LN_S=ln
1393fi
1394fi
1395LN_S="$ac_cv_prog_LN_S"
1396if test "$ac_cv_prog_LN_S" = "ln -s"; then
1397 echo "$ac_t""yes" 1>&6
1398else
1399 echo "$ac_t""no" 1>&6
1400fi
1401
c0734708 1402# Always use our own libtool.
36df40e0 1403LIBTOOL='$(SHELL) $(top_builddir)/libtool'
c0734708 1404
b9bf4aff
ILT
1405# Check for any special flags to pass to ltconfig.
1406libtool_flags=
1407test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1408test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
c0734708
ILT
1409test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1410test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1411test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
8c693660 1412
c0734708
ILT
1413# Some flags need to be propagated to the compiler or linker for good
1414# libtool support.
1415case "$host" in
b9bf4aff 1416*-*-irix6*)
7ee4e307 1417 # Find out which ABI we are using.
53d3ce37
TT
1418 echo '#line 1419 "configure"' > conftest.$ac_ext
1419 if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7ee4e307
ILT
1420 case "`/usr/bin/file conftest.o`" in
1421 *32-bit*)
1422 LD="${LD-ld} -32"
9a837903 1423 ;;
7ee4e307
ILT
1424 *N32*)
1425 LD="${LD-ld} -n32"
1426 ;;
1427 *64-bit*)
1428 LD="${LD-ld} -64"
9a837903
ILT
1429 ;;
1430 esac
7ee4e307
ILT
1431 fi
1432 rm -rf conftest*
c0734708 1433 ;;
8c693660 1434
c0734708
ILT
1435*-*-sco3.2v5*)
1436 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1437 CFLAGS="$CFLAGS -belf"
1438 ;;
5a83fcdd
ILT
1439
1440*-*-cygwin32*)
1441 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1442set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1444echo "configure:1445: checking for $ac_word" >&5
5a83fcdd
ILT
1445if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1447else
1448 if test -n "$DLLTOOL"; then
1449 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1450else
1451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1452 for ac_dir in $PATH; do
1453 test -z "$ac_dir" && ac_dir=.
1454 if test -f $ac_dir/$ac_word; then
1455 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1456 break
1457 fi
1458 done
1459 IFS="$ac_save_ifs"
1460fi
1461fi
1462DLLTOOL="$ac_cv_prog_DLLTOOL"
1463if test -n "$DLLTOOL"; then
1464 echo "$ac_t""$DLLTOOL" 1>&6
1465else
1466 echo "$ac_t""no" 1>&6
1467fi
1468
1469
1470if test -z "$ac_cv_prog_DLLTOOL"; then
1471if test -n "$ac_tool_prefix"; then
1472 # Extract the first word of "dlltool", so it can be a program name with args.
1473set dummy dlltool; ac_word=$2
1474echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1475echo "configure:1476: checking for $ac_word" >&5
5a83fcdd
ILT
1476if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
1478else
1479 if test -n "$DLLTOOL"; then
1480 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1481else
1482 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1483 for ac_dir in $PATH; do
1484 test -z "$ac_dir" && ac_dir=.
1485 if test -f $ac_dir/$ac_word; then
1486 ac_cv_prog_DLLTOOL="dlltool"
1487 break
1488 fi
1489 done
1490 IFS="$ac_save_ifs"
1491 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1492fi
1493fi
1494DLLTOOL="$ac_cv_prog_DLLTOOL"
1495if test -n "$DLLTOOL"; then
1496 echo "$ac_t""$DLLTOOL" 1>&6
1497else
1498 echo "$ac_t""no" 1>&6
1499fi
1500
1501else
1502 DLLTOOL="false"
1503fi
1504fi
1505
1506# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1507set dummy ${ac_tool_prefix}as; ac_word=$2
1508echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1509echo "configure:1510: checking for $ac_word" >&5
5a83fcdd
ILT
1510if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1512else
1513 if test -n "$AS"; then
1514 ac_cv_prog_AS="$AS" # Let the user override the test.
1515else
1516 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1517 for ac_dir in $PATH; do
1518 test -z "$ac_dir" && ac_dir=.
1519 if test -f $ac_dir/$ac_word; then
1520 ac_cv_prog_AS="${ac_tool_prefix}as"
1521 break
1522 fi
1523 done
1524 IFS="$ac_save_ifs"
1525fi
1526fi
1527AS="$ac_cv_prog_AS"
1528if test -n "$AS"; then
1529 echo "$ac_t""$AS" 1>&6
1530else
1531 echo "$ac_t""no" 1>&6
1532fi
1533
1534
1535if test -z "$ac_cv_prog_AS"; then
1536if test -n "$ac_tool_prefix"; then
1537 # Extract the first word of "as", so it can be a program name with args.
1538set dummy as; ac_word=$2
1539echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1540echo "configure:1541: checking for $ac_word" >&5
5a83fcdd
ILT
1541if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1542 echo $ac_n "(cached) $ac_c" 1>&6
1543else
1544 if test -n "$AS"; then
1545 ac_cv_prog_AS="$AS" # Let the user override the test.
1546else
1547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1548 for ac_dir in $PATH; do
1549 test -z "$ac_dir" && ac_dir=.
1550 if test -f $ac_dir/$ac_word; then
1551 ac_cv_prog_AS="as"
1552 break
1553 fi
1554 done
1555 IFS="$ac_save_ifs"
1556 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1557fi
1558fi
1559AS="$ac_cv_prog_AS"
1560if test -n "$AS"; then
1561 echo "$ac_t""$AS" 1>&6
1562else
1563 echo "$ac_t""no" 1>&6
1564fi
1565
1566else
1567 AS="false"
1568fi
1569fi
1570
1571
1572 ;;
1573
8c693660
KR
1574esac
1575
c0734708
ILT
1576# Actually configure libtool. ac_aux_dir is where install-sh is found.
1577CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
9a837903 1578LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
5a83fcdd 1579DLLTOOL="$DLLTOOL" AS="$AS" \
c0734708
ILT
1580${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1581$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1582|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
8c693660 1583
8c693660 1584
c0734708
ILT
1585# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1586if test "${enable_64_bit_bfd+set}" = set; then
1587 enableval="$enable_64_bit_bfd"
1588 case "${enableval}" in
1589 yes) want64=true ;;
1590 no) want64=false ;;
1591 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
1592esac
1593else
1594 want64=false
1595fi
1596# Check whether --enable-targets or --disable-targets was given.
1597if test "${enable_targets+set}" = set; then
1598 enableval="$enable_targets"
1599 case "${enableval}" in
1600 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1601 ;;
1602 no) enable_targets= ;;
1603 *) enable_targets=$enableval ;;
1604esac
1605fi
1606# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1607if test "${enable_commonbfdlib+set}" = set; then
1608 enableval="$enable_commonbfdlib"
1609 case "${enableval}" in
1610 yes) commonbfdlib=true ;;
1611 no) commonbfdlib=false ;;
1612 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1613esac
1614fi
1615# Check whether --with-mmap or --without-mmap was given.
1616if test "${with_mmap+set}" = set; then
1617 withval="$with_mmap"
1618 case "${withval}" in
1619 yes) want_mmap=true ;;
1620 no) want_mmap=false ;;
1621 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
8c693660 1622esac
c0734708
ILT
1623else
1624 want_mmap=false
1625fi
1626
1627
8c693660 1628
8c693660 1629
8c693660
KR
1630
1631if test -z "$target" ; then
1632 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1633fi
1634if test "$program_transform_name" = s,x,x,; then
1635 program_transform_name=
1636else
d19df9b5
ILT
1637 # Double any \ or $. echo might interpret backslashes.
1638 cat <<\EOF_SED > conftestsed
1639s,\\,\\\\,g; s,\$,$$,g
1640EOF_SED
8c693660
KR
1641 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1642 rm -f conftestsed
1643fi
1644test "$program_prefix" != NONE &&
1645 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1646# Use a double $ so make ignores it.
1647test "$program_suffix" != NONE &&
1648 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1649
1650# sed with no file args requires a program.
1651test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1652
1653
c0734708 1654echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
53d3ce37 1655echo "configure:1656: checking whether to enable maintainer-specific portions of Makefiles" >&5
c0734708
ILT
1656 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1657if test "${enable_maintainer_mode+set}" = set; then
1658 enableval="$enable_maintainer_mode"
1659 USE_MAINTAINER_MODE=$enableval
1660else
1661 USE_MAINTAINER_MODE=no
1662fi
8c693660 1663
c0734708
ILT
1664 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1665 if test $USE_MAINTAINER_MODE = yes; then
1666 MAINT=
44f795f7 1667 else
c0734708 1668 MAINT='#M#'
44f795f7 1669 fi
c0734708
ILT
1670
1671
1672echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
53d3ce37 1673echo "configure:1674: checking for Cygwin32 environment" >&5
c0734708
ILT
1674if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676else
1677 cat > conftest.$ac_ext <<EOF
53d3ce37 1678#line 1679 "configure"
c0734708
ILT
1679#include "confdefs.h"
1680
1681int main() {
3607f666 1682return __CYGWIN32__;
c0734708
ILT
1683; return 0; }
1684EOF
53d3ce37 1685if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c0734708
ILT
1686 rm -rf conftest*
1687 am_cv_cygwin32=yes
1688else
1689 echo "configure: failed program was:" >&5
1690 cat conftest.$ac_ext >&5
1691 rm -rf conftest*
1692 am_cv_cygwin32=no
1693fi
1694rm -f conftest*
1695rm -f conftest*
1696fi
1697
1698echo "$ac_t""$am_cv_cygwin32" 1>&6
1699CYGWIN32=
1700test "$am_cv_cygwin32" = yes && CYGWIN32=yes
3607f666 1701echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
53d3ce37 1702echo "configure:1703: checking for Mingw32 environment" >&5
3607f666
BK
1703if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705else
1706 cat > conftest.$ac_ext <<EOF
53d3ce37 1707#line 1708 "configure"
3607f666
BK
1708#include "confdefs.h"
1709
1710int main() {
1711return __MINGW32__;
1712; return 0; }
1713EOF
53d3ce37 1714if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607f666
BK
1715 rm -rf conftest*
1716 am_cv_mingw32=yes
1717else
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1720 rm -rf conftest*
1721 am_cv_mingw32=no
1722fi
1723rm -f conftest*
1724rm -f conftest*
1725fi
1726
1727echo "$ac_t""$am_cv_mingw32" 1>&6
1728MINGW32=
1729test "$am_cv_mingw32" = yes && MINGW32=yes
1730
70e8e585 1731
c0734708 1732echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
53d3ce37 1733echo "configure:1734: checking for executable suffix" >&5
c0734708
ILT
1734if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
b9bf4aff 1737 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
c0734708
ILT
1738am_cv_exeext=.exe
1739else
1740cat > am_c_test.c << 'EOF'
1741int main() {
1742/* Nothing needed here */
1743}
1744EOF
1745${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
53d3ce37
TT
1746am_cv_exeext=
1747for file in am_c_test.*; do
1748 case $file in
1749 *.c) ;;
1750 *.o) ;;
1751 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
1752 esac
1753done
c0734708
ILT
1754rm -f am_c_test*
1755fi
1756
1757test x"${am_cv_exeext}" = x && am_cv_exeext=no
44f795f7 1758fi
c0734708
ILT
1759EXEEXT=""
1760test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1761echo "$ac_t""${am_cv_exeext}" 1>&6
1762
1763
1764host64=false
1765target64=false
1766
1767# host stuff:
44f795f7 1768
85e493f0
ILT
1769# Extract the first word of "gcc", so it can be a program name with args.
1770set dummy gcc; ac_word=$2
1771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1772echo "configure:1773: checking for $ac_word" >&5
85e493f0
ILT
1773if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 if test -n "$CC"; then
1777 ac_cv_prog_CC="$CC" # Let the user override the test.
1778else
1779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1780 for ac_dir in $PATH; do
1781 test -z "$ac_dir" && ac_dir=.
1782 if test -f $ac_dir/$ac_word; then
1783 ac_cv_prog_CC="gcc"
1784 break
1785 fi
1786 done
1787 IFS="$ac_save_ifs"
85e493f0
ILT
1788fi
1789fi
1790CC="$ac_cv_prog_CC"
1791if test -n "$CC"; then
1792 echo "$ac_t""$CC" 1>&6
1793else
1794 echo "$ac_t""no" 1>&6
1795fi
1796
986cf3b8
ILT
1797if test -z "$CC"; then
1798 # Extract the first word of "cc", so it can be a program name with args.
1799set dummy cc; ac_word=$2
1800echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
53d3ce37 1801echo "configure:1802: checking for $ac_word" >&5
986cf3b8
ILT
1802if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
1804else
1805 if test -n "$CC"; then
1806 ac_cv_prog_CC="$CC" # Let the user override the test.
1807else
1808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1809 ac_prog_rejected=no
1810 for ac_dir in $PATH; do
1811 test -z "$ac_dir" && ac_dir=.
1812 if test -f $ac_dir/$ac_word; then
1813 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1814 ac_prog_rejected=yes
1815 continue
1816 fi
1817 ac_cv_prog_CC="cc"
1818 break
1819 fi
1820 done
1821 IFS="$ac_save_ifs"
1822if test $ac_prog_rejected = yes; then
1823 # We found a bogon in the path, so make sure we never use it.
1824 set dummy $ac_cv_prog_CC
1825 shift
1826 if test $# -gt 0; then
1827 # We chose a different compiler from the bogus one.
1828 # However, it has the same basename, so the bogon will be chosen
1829 # first if we set CC to just the basename; use the full file name.
1830 shift
1831 set dummy "$ac_dir/$ac_word" "$@"
1832 shift
1833 ac_cv_prog_CC="$@"
1834 fi
1835fi
1836fi
1837fi
1838CC="$ac_cv_prog_CC"
1839if test -n "$CC"; then
1840 echo "$ac_t""$CC" 1>&6
1841else
1842 echo "$ac_t""no" 1>&6
1843fi
1844
1845 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1846fi
f515fb2f 1847
ac388f2a 1848echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
53d3ce37 1849echo "configure:1850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac388f2a
ILT
1850
1851ac_ext=c
1852# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1853ac_cpp='$CPP $CPPFLAGS'
1854ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1855ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1856cross_compiling=$ac_cv_prog_cc_cross
1857
1858cat > conftest.$ac_ext <<EOF
53d3ce37 1859#line 1860 "configure"
ac388f2a
ILT
1860#include "confdefs.h"
1861main(){return(0);}
1862EOF
53d3ce37 1863if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac388f2a
ILT
1864 ac_cv_prog_cc_works=yes
1865 # If we can't run a trivial program, we are probably using a cross compiler.
1866 if (./conftest; exit) 2>/dev/null; then
1867 ac_cv_prog_cc_cross=no
1868 else
1869 ac_cv_prog_cc_cross=yes
1870 fi
1871else
1872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 ac_cv_prog_cc_works=no
1875fi
1876rm -fr conftest*
1877
1878echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1879if test $ac_cv_prog_cc_works = no; then
1880 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1881fi
1882echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
53d3ce37 1883echo "configure:1884: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ac388f2a
ILT
1884echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1885cross_compiling=$ac_cv_prog_cc_cross
1886
85e493f0 1887echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
53d3ce37 1888echo "configure:1889: checking whether we are using GNU C" >&5
85e493f0
ILT
1889if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891else
1892 cat > conftest.c <<EOF
f515fb2f
ILT
1893#ifdef __GNUC__
1894 yes;
1895#endif
1896EOF
53d3ce37 1897if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
85e493f0
ILT
1898 ac_cv_prog_gcc=yes
1899else
1900 ac_cv_prog_gcc=no
1901fi
1902fi
1903
1904echo "$ac_t""$ac_cv_prog_gcc" 1>&6
ac388f2a 1905
85e493f0 1906if test $ac_cv_prog_gcc = yes; then
f515fb2f 1907 GCC=yes
ac388f2a
ILT
1908 ac_test_CFLAGS="${CFLAGS+set}"
1909 ac_save_CFLAGS="$CFLAGS"
1910 CFLAGS=
1911 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
53d3ce37 1912echo "configure:1913: checking whether ${CC-cc} accepts -g" >&5
ac388f2a 1913if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
85e493f0
ILT
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915else
1916 echo 'void f(){}' > conftest.c
1917if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac388f2a 1918 ac_cv_prog_cc_g=yes
85e493f0 1919else
ac388f2a 1920 ac_cv_prog_cc_g=no
85e493f0
ILT
1921fi
1922rm -f conftest*
1923
1924fi
1925
ac388f2a
ILT
1926echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1927 if test "$ac_test_CFLAGS" = set; then
1928 CFLAGS="$ac_save_CFLAGS"
1929 elif test $ac_cv_prog_cc_g = yes; then
1930 CFLAGS="-g -O2"
1931 else
1932 CFLAGS="-O2"
f515fb2f
ILT
1933 fi
1934else
1935 GCC=
1936 test "${CFLAGS+set}" = set || CFLAGS="-g"
1937fi
f515fb2f
ILT
1938
1939
53d3ce37 1940ALL_LINGUAS=
b7577823 1941echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
53d3ce37 1942echo "configure:1943: checking how to run the C preprocessor" >&5
b7577823
ILT
1943# On Suns, sometimes $CPP names a directory.
1944if test -n "$CPP" && test -d "$CPP"; then
1945 CPP=
1946fi
1947if test -z "$CPP"; then
1948if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1949 echo $ac_n "(cached) $ac_c" 1>&6
1950else
1951 # This must be in double quotes, not single quotes, because CPP may get
1952 # substituted into the Makefile and "${CC-cc}" will confuse make.
1953 CPP="${CC-cc} -E"
1954 # On the NeXT, cc -E runs the code through the compiler's parser,
1955 # not just through cpp.
1956 cat > conftest.$ac_ext <<EOF
53d3ce37 1957#line 1958 "configure"
b7577823
ILT
1958#include "confdefs.h"
1959#include <assert.h>
1960Syntax Error
1961EOF
986cf3b8 1962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
53d3ce37 1963{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1964ac_err=`grep -v '^ *+' conftest.out`
1965if test -z "$ac_err"; then
1966 :
1967else
1968 echo "$ac_err" >&5
ac388f2a
ILT
1969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
b7577823
ILT
1971 rm -rf conftest*
1972 CPP="${CC-cc} -E -traditional-cpp"
1973 cat > conftest.$ac_ext <<EOF
53d3ce37 1974#line 1975 "configure"
b7577823
ILT
1975#include "confdefs.h"
1976#include <assert.h>
1977Syntax Error
1978EOF
986cf3b8 1979ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
53d3ce37 1980{ (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1981ac_err=`grep -v '^ *+' conftest.out`
1982if test -z "$ac_err"; then
1983 :
1984else
1985 echo "$ac_err" >&5
ac388f2a
ILT
1986 echo "configure: failed program was:" >&5
1987 cat conftest.$ac_ext >&5
b7577823
ILT
1988 rm -rf conftest*
1989 CPP=/lib/cpp
1990fi
1991rm -f conftest*
1992fi
1993rm -f conftest*
1994 ac_cv_prog_CPP="$CPP"
1995fi
1996 CPP="$ac_cv_prog_CPP"
1997else
1998 ac_cv_prog_CPP="$CPP"
1999fi
2000echo "$ac_t""$CPP" 1>&6
2001
53d3ce37
TT
2002echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2003echo "configure:2004: checking for ANSI C header files" >&5
2004if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
b7577823
ILT
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006else
2007 cat > conftest.$ac_ext <<EOF
53d3ce37 2008#line 2009 "configure"
b7577823 2009#include "confdefs.h"
53d3ce37
TT
2010#include <stdlib.h>
2011#include <stdarg.h>
2012#include <string.h>
2013#include <float.h>
b7577823 2014EOF
986cf3b8 2015ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
53d3ce37 2016{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
2017ac_err=`grep -v '^ *+' conftest.out`
2018if test -z "$ac_err"; then
2019 rm -rf conftest*
53d3ce37 2020 ac_cv_header_stdc=yes
b7577823
ILT
2021else
2022 echo "$ac_err" >&5
ac388f2a
ILT
2023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
b7577823 2025 rm -rf conftest*
53d3ce37 2026 ac_cv_header_stdc=no
b7577823
ILT
2027fi
2028rm -f conftest*
53d3ce37
TT
2029
2030if test $ac_cv_header_stdc = yes; then
2031 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2032cat > conftest.$ac_ext <<EOF
2033#line 2034 "configure"
2034#include "confdefs.h"
2035#include <string.h>
2036EOF
2037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2038 egrep "memchr" >/dev/null 2>&1; then
2039 :
2040else
2041 rm -rf conftest*
2042 ac_cv_header_stdc=no
b7577823 2043fi
53d3ce37
TT
2044rm -f conftest*
2045
2046fi
2047
2048if test $ac_cv_header_stdc = yes; then
2049 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2050cat > conftest.$ac_ext <<EOF
2051#line 2052 "configure"
2052#include "confdefs.h"
2053#include <stdlib.h>
b7577823 2054EOF
53d3ce37
TT
2055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2056 egrep "free" >/dev/null 2>&1; then
2057 :
b7577823 2058else
53d3ce37
TT
2059 rm -rf conftest*
2060 ac_cv_header_stdc=no
b7577823 2061fi
53d3ce37 2062rm -f conftest*
b7577823 2063
53d3ce37
TT
2064fi
2065
2066if test $ac_cv_header_stdc = yes; then
2067 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2068if test "$cross_compiling" = yes; then
2069 :
b7577823
ILT
2070else
2071 cat > conftest.$ac_ext <<EOF
53d3ce37 2072#line 2073 "configure"
b7577823 2073#include "confdefs.h"
53d3ce37
TT
2074#include <ctype.h>
2075#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2076#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2077#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2078int main () { int i; for (i = 0; i < 256; i++)
2079if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2080exit (0); }
2081
b7577823 2082EOF
53d3ce37
TT
2083if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2084then
2085 :
b7577823 2086else
ac388f2a
ILT
2087 echo "configure: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
53d3ce37
TT
2089 rm -fr conftest*
2090 ac_cv_header_stdc=no
b7577823 2091fi
53d3ce37 2092rm -fr conftest*
b7577823 2093fi
53d3ce37
TT
2094
2095fi
2096fi
2097
2098echo "$ac_t""$ac_cv_header_stdc" 1>&6
2099if test $ac_cv_header_stdc = yes; then
2100 cat >> confdefs.h <<\EOF
2101#define STDC_HEADERS 1
b7577823 2102EOF
53d3ce37 2103
b7577823 2104fi
b7577823 2105
53d3ce37
TT
2106echo $ac_n "checking for working const""... $ac_c" 1>&6
2107echo "configure:2108: checking for working const" >&5
2108if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
ab1aa5cd
FF
2109 echo $ac_n "(cached) $ac_c" 1>&6
2110else
2111 cat > conftest.$ac_ext <<EOF
53d3ce37 2112#line 2113 "configure"
ab1aa5cd 2113#include "confdefs.h"
53d3ce37 2114
ac388f2a 2115int main() {
53d3ce37
TT
2116
2117/* Ultrix mips cc rejects this. */
2118typedef int charset[2]; const charset x;
2119/* SunOS 4.1.1 cc rejects this. */
2120char const *const *ccp;
2121char **p;
2122/* NEC SVR4.0.2 mips cc rejects this. */
2123struct point {int x, y;};
2124static struct point const zero = {0,0};
2125/* AIX XL C 1.02.0.0 rejects this.
2126 It does not let you subtract one const X* pointer from another in an arm
2127 of an if-expression whose if-part is not a constant expression */
2128const char *g = "string";
2129ccp = &g + (g ? g-g : 0);
2130/* HPUX 7.0 cc rejects these. */
2131++ccp;
2132p = (char**) ccp;
2133ccp = (char const *const *) p;
2134{ /* SCO 3.2v4 cc rejects this. */
2135 char *t;
2136 char const *s = 0 ? (char *) 0 : (char const *) 0;
2137
2138 *t++ = 0;
2139}
2140{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2141 int x[] = {25, 17};
2142 const int *foo = &x[0];
2143 ++foo;
2144}
2145{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2146 typedef const int *iptr;
2147 iptr p = 0;
2148 ++p;
2149}
2150{ /* AIX XL C 1.02.0.0 rejects this saying
2151 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2152 struct s { int j; const int *ap[3]; };
2153 struct s *b; b->j = 5;
2154}
2155{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2156 const int foo = 10;
2157}
2158
ab1aa5cd
FF
2159; return 0; }
2160EOF
53d3ce37 2161if { (eval echo configure:2162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab1aa5cd 2162 rm -rf conftest*
53d3ce37 2163 ac_cv_c_const=yes
ab1aa5cd 2164else
ac388f2a
ILT
2165 echo "configure: failed program was:" >&5
2166 cat conftest.$ac_ext >&5
ab1aa5cd 2167 rm -rf conftest*
53d3ce37 2168 ac_cv_c_const=no
ab1aa5cd
FF
2169fi
2170rm -f conftest*
ab1aa5cd
FF
2171fi
2172
53d3ce37
TT
2173echo "$ac_t""$ac_cv_c_const" 1>&6
2174if test $ac_cv_c_const = no; then
ab1aa5cd 2175 cat >> confdefs.h <<\EOF
53d3ce37 2176#define const
ab1aa5cd
FF
2177EOF
2178
2179fi
2180
53d3ce37
TT
2181echo $ac_n "checking for inline""... $ac_c" 1>&6
2182echo "configure:2183: checking for inline" >&5
2183if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
b7577823
ILT
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
53d3ce37
TT
2186 ac_cv_c_inline=no
2187for ac_kw in inline __inline__ __inline; do
b7577823 2188 cat > conftest.$ac_ext <<EOF
53d3ce37 2189#line 2190 "configure"
b7577823 2190#include "confdefs.h"
b7577823 2191
ac388f2a 2192int main() {
53d3ce37 2193} $ac_kw foo() {
b7577823
ILT
2194; return 0; }
2195EOF
53d3ce37 2196if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823 2197 rm -rf conftest*
53d3ce37 2198 ac_cv_c_inline=$ac_kw; break
b7577823 2199else
ac388f2a
ILT
2200 echo "configure: failed program was:" >&5
2201 cat conftest.$ac_ext >&5
b7577823
ILT
2202fi
2203rm -f conftest*
b7577823
ILT
2204done
2205
53d3ce37 2206fi
b7577823 2207
53d3ce37
TT
2208echo "$ac_t""$ac_cv_c_inline" 1>&6
2209case "$ac_cv_c_inline" in
2210 inline | yes) ;;
2211 no) cat >> confdefs.h <<\EOF
2212#define inline
2213EOF
2214 ;;
2215 *) cat >> confdefs.h <<EOF
2216#define inline $ac_cv_c_inline
b7577823
ILT
2217EOF
2218 ;;
2219esac
2220
53d3ce37
TT
2221echo $ac_n "checking for off_t""... $ac_c" 1>&6
2222echo "configure:2223: checking for off_t" >&5
2223if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
f7954d86
MM
2224 echo $ac_n "(cached) $ac_c" 1>&6
2225else
2226 cat > conftest.$ac_ext <<EOF
53d3ce37 2227#line 2228 "configure"
f7954d86 2228#include "confdefs.h"
53d3ce37
TT
2229#include <sys/types.h>
2230#if STDC_HEADERS
f7954d86 2231#include <stdlib.h>
53d3ce37 2232#include <stddef.h>
f7954d86 2233#endif
f7954d86 2234EOF
53d3ce37
TT
2235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2236 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
f7954d86 2237 rm -rf conftest*
53d3ce37 2238 ac_cv_type_off_t=yes
f7954d86
MM
2239else
2240 rm -rf conftest*
53d3ce37 2241 ac_cv_type_off_t=no
f7954d86
MM
2242fi
2243rm -f conftest*
f7954d86 2244
53d3ce37
TT
2245fi
2246echo "$ac_t""$ac_cv_type_off_t" 1>&6
2247if test $ac_cv_type_off_t = no; then
2248 cat >> confdefs.h <<\EOF
2249#define off_t long
f7954d86
MM
2250EOF
2251
2252fi
2253
53d3ce37
TT
2254echo $ac_n "checking for size_t""... $ac_c" 1>&6
2255echo "configure:2256: checking for size_t" >&5
2256if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
b7577823
ILT
2257 echo $ac_n "(cached) $ac_c" 1>&6
2258else
2259 cat > conftest.$ac_ext <<EOF
53d3ce37 2260#line 2261 "configure"
b7577823 2261#include "confdefs.h"
53d3ce37
TT
2262#include <sys/types.h>
2263#if STDC_HEADERS
b7577823 2264#include <stdlib.h>
53d3ce37 2265#include <stddef.h>
b7577823 2266#endif
b7577823 2267EOF
53d3ce37
TT
2268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2269 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b7577823 2270 rm -rf conftest*
53d3ce37 2271 ac_cv_type_size_t=yes
b7577823
ILT
2272else
2273 rm -rf conftest*
53d3ce37
TT
2274 ac_cv_type_size_t=no
2275fi
2276rm -f conftest*
2277
2278fi
2279echo "$ac_t""$ac_cv_type_size_t" 1>&6
2280if test $ac_cv_type_size_t = no; then
2281 cat >> confdefs.h <<\EOF
2282#define size_t unsigned
2283EOF
2284
2285fi
2286
2287# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2288# for constant arguments. Useless!
2289echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2290echo "configure:2291: checking for working alloca.h" >&5
2291if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2292 echo $ac_n "(cached) $ac_c" 1>&6
2293else
2294 cat > conftest.$ac_ext <<EOF
2295#line 2296 "configure"
2296#include "confdefs.h"
2297#include <alloca.h>
2298int main() {
2299char *p = alloca(2 * sizeof(int));
2300; return 0; }
2301EOF
2302if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2303 rm -rf conftest*
2304 ac_cv_header_alloca_h=yes
2305else
2306 echo "configure: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2308 rm -rf conftest*
2309 ac_cv_header_alloca_h=no
2310fi
2311rm -f conftest*
2312fi
2313
2314echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2315if test $ac_cv_header_alloca_h = yes; then
2316 cat >> confdefs.h <<\EOF
2317#define HAVE_ALLOCA_H 1
2318EOF
2319
2320fi
2321
2322echo $ac_n "checking for alloca""... $ac_c" 1>&6
2323echo "configure:2324: checking for alloca" >&5
2324if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2326else
2327 cat > conftest.$ac_ext <<EOF
2328#line 2329 "configure"
2329#include "confdefs.h"
2330
2331#ifdef __GNUC__
2332# define alloca __builtin_alloca
2333#else
2334# if HAVE_ALLOCA_H
2335# include <alloca.h>
2336# else
2337# ifdef _AIX
2338 #pragma alloca
2339# else
2340# ifndef alloca /* predefined by HP cc +Olibcalls */
2341char *alloca ();
2342# endif
2343# endif
2344# endif
2345#endif
2346
2347int main() {
2348char *p = (char *) alloca(1);
2349; return 0; }
2350EOF
2351if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2352 rm -rf conftest*
2353 ac_cv_func_alloca_works=yes
2354else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357 rm -rf conftest*
2358 ac_cv_func_alloca_works=no
2359fi
2360rm -f conftest*
2361fi
2362
2363echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2364if test $ac_cv_func_alloca_works = yes; then
2365 cat >> confdefs.h <<\EOF
2366#define HAVE_ALLOCA 1
2367EOF
2368
2369fi
2370
2371if test $ac_cv_func_alloca_works = no; then
2372 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2373 # that cause trouble. Some versions do not even contain alloca or
2374 # contain a buggy version. If you still want to use their alloca,
2375 # use ar to extract alloca.o from them instead of compiling alloca.c.
2376 ALLOCA=alloca.o
2377 cat >> confdefs.h <<\EOF
2378#define C_ALLOCA 1
2379EOF
2380
2381
2382echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2383echo "configure:2384: checking whether alloca needs Cray hooks" >&5
2384if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2385 echo $ac_n "(cached) $ac_c" 1>&6
2386else
2387 cat > conftest.$ac_ext <<EOF
2388#line 2389 "configure"
2389#include "confdefs.h"
2390#if defined(CRAY) && ! defined(CRAY2)
2391webecray
2392#else
2393wenotbecray
2394#endif
2395
2396EOF
2397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2398 egrep "webecray" >/dev/null 2>&1; then
2399 rm -rf conftest*
2400 ac_cv_os_cray=yes
2401else
2402 rm -rf conftest*
2403 ac_cv_os_cray=no
2404fi
2405rm -f conftest*
2406
2407fi
2408
2409echo "$ac_t""$ac_cv_os_cray" 1>&6
2410if test $ac_cv_os_cray = yes; then
2411for ac_func in _getb67 GETB67 getb67; do
2412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2413echo "configure:2414: checking for $ac_func" >&5
2414if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2415 echo $ac_n "(cached) $ac_c" 1>&6
2416else
2417 cat > conftest.$ac_ext <<EOF
2418#line 2419 "configure"
2419#include "confdefs.h"
2420/* System header to define __stub macros and hopefully few prototypes,
2421 which can conflict with char $ac_func(); below. */
2422#include <assert.h>
2423/* Override any gcc2 internal prototype to avoid an error. */
2424/* We use char because int might match the return type of a gcc2
2425 builtin and then its argument prototype would still apply. */
2426char $ac_func();
2427
2428int main() {
2429
2430/* The GNU C library defines this for functions which it implements
2431 to always fail with ENOSYS. Some functions are actually named
2432 something starting with __ and the normal name is an alias. */
2433#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2434choke me
2435#else
2436$ac_func();
2437#endif
2438
2439; return 0; }
2440EOF
2441if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2442 rm -rf conftest*
2443 eval "ac_cv_func_$ac_func=yes"
2444else
2445 echo "configure: failed program was:" >&5
2446 cat conftest.$ac_ext >&5
2447 rm -rf conftest*
2448 eval "ac_cv_func_$ac_func=no"
2449fi
2450rm -f conftest*
2451fi
2452
2453if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2454 echo "$ac_t""yes" 1>&6
2455 cat >> confdefs.h <<EOF
2456#define CRAY_STACKSEG_END $ac_func
2457EOF
2458
2459 break
2460else
2461 echo "$ac_t""no" 1>&6
2462fi
2463
2464done
2465fi
2466
2467echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2468echo "configure:2469: checking stack direction for C alloca" >&5
2469if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2471else
2472 if test "$cross_compiling" = yes; then
2473 ac_cv_c_stack_direction=0
2474else
2475 cat > conftest.$ac_ext <<EOF
2476#line 2477 "configure"
2477#include "confdefs.h"
2478find_stack_direction ()
2479{
2480 static char *addr = 0;
2481 auto char dummy;
2482 if (addr == 0)
2483 {
2484 addr = &dummy;
2485 return find_stack_direction ();
2486 }
2487 else
2488 return (&dummy > addr) ? 1 : -1;
2489}
2490main ()
2491{
2492 exit (find_stack_direction() < 0);
2493}
2494EOF
2495if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2496then
2497 ac_cv_c_stack_direction=1
2498else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -fr conftest*
2502 ac_cv_c_stack_direction=-1
2503fi
2504rm -fr conftest*
2505fi
2506
2507fi
2508
2509echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2510cat >> confdefs.h <<EOF
2511#define STACK_DIRECTION $ac_cv_c_stack_direction
2512EOF
2513
2514fi
2515
2516for ac_hdr in unistd.h
2517do
2518ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2519echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2520echo "configure:2521: checking for $ac_hdr" >&5
2521if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2522 echo $ac_n "(cached) $ac_c" 1>&6
2523else
2524 cat > conftest.$ac_ext <<EOF
2525#line 2526 "configure"
2526#include "confdefs.h"
2527#include <$ac_hdr>
2528EOF
2529ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2530{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2531ac_err=`grep -v '^ *+' conftest.out`
2532if test -z "$ac_err"; then
2533 rm -rf conftest*
2534 eval "ac_cv_header_$ac_safe=yes"
2535else
2536 echo "$ac_err" >&5
2537 echo "configure: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 rm -rf conftest*
2540 eval "ac_cv_header_$ac_safe=no"
2541fi
2542rm -f conftest*
2543fi
2544if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2545 echo "$ac_t""yes" 1>&6
2546 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2547 cat >> confdefs.h <<EOF
2548#define $ac_tr_hdr 1
2549EOF
2550
2551else
2552 echo "$ac_t""no" 1>&6
2553fi
2554done
2555
2556for ac_func in getpagesize
2557do
2558echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2559echo "configure:2560: checking for $ac_func" >&5
2560if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2561 echo $ac_n "(cached) $ac_c" 1>&6
2562else
2563 cat > conftest.$ac_ext <<EOF
2564#line 2565 "configure"
2565#include "confdefs.h"
2566/* System header to define __stub macros and hopefully few prototypes,
2567 which can conflict with char $ac_func(); below. */
2568#include <assert.h>
2569/* Override any gcc2 internal prototype to avoid an error. */
2570/* We use char because int might match the return type of a gcc2
2571 builtin and then its argument prototype would still apply. */
2572char $ac_func();
2573
2574int main() {
2575
2576/* The GNU C library defines this for functions which it implements
2577 to always fail with ENOSYS. Some functions are actually named
2578 something starting with __ and the normal name is an alias. */
2579#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2580choke me
2581#else
2582$ac_func();
2583#endif
2584
2585; return 0; }
2586EOF
2587if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2588 rm -rf conftest*
2589 eval "ac_cv_func_$ac_func=yes"
2590else
2591 echo "configure: failed program was:" >&5
2592 cat conftest.$ac_ext >&5
2593 rm -rf conftest*
2594 eval "ac_cv_func_$ac_func=no"
2595fi
2596rm -f conftest*
2597fi
2598
2599if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2600 echo "$ac_t""yes" 1>&6
2601 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2602 cat >> confdefs.h <<EOF
2603#define $ac_tr_func 1
2604EOF
2605
2606else
2607 echo "$ac_t""no" 1>&6
2608fi
2609done
2610
2611echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2612echo "configure:2613: checking for working mmap" >&5
2613if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615else
2616 if test "$cross_compiling" = yes; then
2617 ac_cv_func_mmap_fixed_mapped=no
2618else
2619 cat > conftest.$ac_ext <<EOF
2620#line 2621 "configure"
2621#include "confdefs.h"
2622
2623/* Thanks to Mike Haertel and Jim Avera for this test.
2624 Here is a matrix of mmap possibilities:
2625 mmap private not fixed
2626 mmap private fixed at somewhere currently unmapped
2627 mmap private fixed at somewhere already mapped
2628 mmap shared not fixed
2629 mmap shared fixed at somewhere currently unmapped
2630 mmap shared fixed at somewhere already mapped
2631 For private mappings, we should verify that changes cannot be read()
2632 back from the file, nor mmap's back from the file at a different
2633 address. (There have been systems where private was not correctly
2634 implemented like the infamous i386 svr4.0, and systems where the
2635 VM page cache was not coherent with the filesystem buffer cache
2636 like early versions of FreeBSD and possibly contemporary NetBSD.)
2637 For shared mappings, we should conversely verify that changes get
2638 propogated back to all the places they're supposed to be.
2639
2640 Grep wants private fixed already mapped.
2641 The main things grep needs to know about mmap are:
2642 * does it exist and is it safe to write into the mmap'd area
2643 * how to use it (BSD variants) */
2644#include <sys/types.h>
2645#include <fcntl.h>
2646#include <sys/mman.h>
2647
2648/* This mess was copied from the GNU getpagesize.h. */
2649#ifndef HAVE_GETPAGESIZE
2650# ifdef HAVE_UNISTD_H
2651# include <unistd.h>
2652# endif
2653
2654/* Assume that all systems that can run configure have sys/param.h. */
2655# ifndef HAVE_SYS_PARAM_H
2656# define HAVE_SYS_PARAM_H 1
2657# endif
2658
2659# ifdef _SC_PAGESIZE
2660# define getpagesize() sysconf(_SC_PAGESIZE)
2661# else /* no _SC_PAGESIZE */
2662# ifdef HAVE_SYS_PARAM_H
2663# include <sys/param.h>
2664# ifdef EXEC_PAGESIZE
2665# define getpagesize() EXEC_PAGESIZE
2666# else /* no EXEC_PAGESIZE */
2667# ifdef NBPG
2668# define getpagesize() NBPG * CLSIZE
2669# ifndef CLSIZE
2670# define CLSIZE 1
2671# endif /* no CLSIZE */
2672# else /* no NBPG */
2673# ifdef NBPC
2674# define getpagesize() NBPC
2675# else /* no NBPC */
2676# ifdef PAGESIZE
2677# define getpagesize() PAGESIZE
2678# endif /* PAGESIZE */
2679# endif /* no NBPC */
2680# endif /* no NBPG */
2681# endif /* no EXEC_PAGESIZE */
2682# else /* no HAVE_SYS_PARAM_H */
2683# define getpagesize() 8192 /* punt totally */
2684# endif /* no HAVE_SYS_PARAM_H */
2685# endif /* no _SC_PAGESIZE */
2686
2687#endif /* no HAVE_GETPAGESIZE */
2688
2689#ifdef __cplusplus
2690extern "C" { void *malloc(unsigned); }
2691#else
2692char *malloc();
2693#endif
2694
2695int
2696main()
2697{
2698 char *data, *data2, *data3;
2699 int i, pagesize;
2700 int fd;
2701
2702 pagesize = getpagesize();
2703
2704 /*
2705 * First, make a file with some known garbage in it.
2706 */
2707 data = malloc(pagesize);
2708 if (!data)
2709 exit(1);
2710 for (i = 0; i < pagesize; ++i)
2711 *(data + i) = rand();
2712 umask(0);
2713 fd = creat("conftestmmap", 0600);
2714 if (fd < 0)
2715 exit(1);
2716 if (write(fd, data, pagesize) != pagesize)
2717 exit(1);
2718 close(fd);
2719
2720 /*
2721 * Next, try to mmap the file at a fixed address which
2722 * already has something else allocated at it. If we can,
2723 * also make sure that we see the same garbage.
2724 */
2725 fd = open("conftestmmap", O_RDWR);
2726 if (fd < 0)
2727 exit(1);
2728 data2 = malloc(2 * pagesize);
2729 if (!data2)
2730 exit(1);
2731 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2732 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2733 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2734 exit(1);
2735 for (i = 0; i < pagesize; ++i)
2736 if (*(data + i) != *(data2 + i))
2737 exit(1);
2738
2739 /*
2740 * Finally, make sure that changes to the mapped area
2741 * do not percolate back to the file as seen by read().
2742 * (This is a bug on some variants of i386 svr4.0.)
2743 */
2744 for (i = 0; i < pagesize; ++i)
2745 *(data2 + i) = *(data2 + i) + 1;
2746 data3 = malloc(pagesize);
2747 if (!data3)
2748 exit(1);
2749 if (read(fd, data3, pagesize) != pagesize)
2750 exit(1);
2751 for (i = 0; i < pagesize; ++i)
2752 if (*(data + i) != *(data3 + i))
2753 exit(1);
2754 close(fd);
2755 unlink("conftestmmap");
2756 exit(0);
2757}
2758
2759EOF
2760if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2761then
2762 ac_cv_func_mmap_fixed_mapped=yes
2763else
2764 echo "configure: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 rm -fr conftest*
2767 ac_cv_func_mmap_fixed_mapped=no
2768fi
2769rm -fr conftest*
2770fi
2771
2772fi
2773
2774echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2775if test $ac_cv_func_mmap_fixed_mapped = yes; then
2776 cat >> confdefs.h <<\EOF
2777#define HAVE_MMAP 1
2778EOF
2779
2780fi
2781
2782
2783 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2784unistd.h values.h sys/param.h
2785do
2786ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2787echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2788echo "configure:2789: checking for $ac_hdr" >&5
2789if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2790 echo $ac_n "(cached) $ac_c" 1>&6
2791else
2792 cat > conftest.$ac_ext <<EOF
2793#line 2794 "configure"
2794#include "confdefs.h"
2795#include <$ac_hdr>
2796EOF
2797ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2798{ (eval echo configure:2799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2799ac_err=`grep -v '^ *+' conftest.out`
2800if test -z "$ac_err"; then
2801 rm -rf conftest*
2802 eval "ac_cv_header_$ac_safe=yes"
2803else
2804 echo "$ac_err" >&5
2805 echo "configure: failed program was:" >&5
2806 cat conftest.$ac_ext >&5
2807 rm -rf conftest*
2808 eval "ac_cv_header_$ac_safe=no"
2809fi
2810rm -f conftest*
2811fi
2812if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2813 echo "$ac_t""yes" 1>&6
2814 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2815 cat >> confdefs.h <<EOF
2816#define $ac_tr_hdr 1
2817EOF
2818
2819else
2820 echo "$ac_t""no" 1>&6
2821fi
2822done
2823
2824 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2825__argz_count __argz_stringify __argz_next
2826do
2827echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2828echo "configure:2829: checking for $ac_func" >&5
2829if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
2831else
2832 cat > conftest.$ac_ext <<EOF
2833#line 2834 "configure"
2834#include "confdefs.h"
2835/* System header to define __stub macros and hopefully few prototypes,
2836 which can conflict with char $ac_func(); below. */
2837#include <assert.h>
2838/* Override any gcc2 internal prototype to avoid an error. */
2839/* We use char because int might match the return type of a gcc2
2840 builtin and then its argument prototype would still apply. */
2841char $ac_func();
2842
2843int main() {
2844
2845/* The GNU C library defines this for functions which it implements
2846 to always fail with ENOSYS. Some functions are actually named
2847 something starting with __ and the normal name is an alias. */
2848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2849choke me
2850#else
2851$ac_func();
2852#endif
2853
2854; return 0; }
2855EOF
2856if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2857 rm -rf conftest*
2858 eval "ac_cv_func_$ac_func=yes"
2859else
2860 echo "configure: failed program was:" >&5
2861 cat conftest.$ac_ext >&5
2862 rm -rf conftest*
2863 eval "ac_cv_func_$ac_func=no"
2864fi
2865rm -f conftest*
2866fi
2867
2868if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2869 echo "$ac_t""yes" 1>&6
2870 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2871 cat >> confdefs.h <<EOF
2872#define $ac_tr_func 1
2873EOF
2874
2875else
2876 echo "$ac_t""no" 1>&6
2877fi
2878done
2879
2880
2881 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2882 for ac_func in stpcpy
2883do
2884echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2885echo "configure:2886: checking for $ac_func" >&5
2886if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2888else
2889 cat > conftest.$ac_ext <<EOF
2890#line 2891 "configure"
2891#include "confdefs.h"
2892/* System header to define __stub macros and hopefully few prototypes,
2893 which can conflict with char $ac_func(); below. */
2894#include <assert.h>
2895/* Override any gcc2 internal prototype to avoid an error. */
2896/* We use char because int might match the return type of a gcc2
2897 builtin and then its argument prototype would still apply. */
2898char $ac_func();
2899
2900int main() {
2901
2902/* The GNU C library defines this for functions which it implements
2903 to always fail with ENOSYS. Some functions are actually named
2904 something starting with __ and the normal name is an alias. */
2905#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2906choke me
2907#else
2908$ac_func();
2909#endif
2910
2911; return 0; }
2912EOF
2913if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2914 rm -rf conftest*
2915 eval "ac_cv_func_$ac_func=yes"
2916else
2917 echo "configure: failed program was:" >&5
2918 cat conftest.$ac_ext >&5
2919 rm -rf conftest*
2920 eval "ac_cv_func_$ac_func=no"
2921fi
2922rm -f conftest*
2923fi
2924
2925if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2926 echo "$ac_t""yes" 1>&6
2927 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2928 cat >> confdefs.h <<EOF
2929#define $ac_tr_func 1
2930EOF
2931
2932else
2933 echo "$ac_t""no" 1>&6
2934fi
2935done
2936
2937 fi
2938 if test "${ac_cv_func_stpcpy}" = "yes"; then
2939 cat >> confdefs.h <<\EOF
2940#define HAVE_STPCPY 1
2941EOF
2942
2943 fi
2944
2945 if test $ac_cv_header_locale_h = yes; then
2946 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2947echo "configure:2948: checking for LC_MESSAGES" >&5
2948if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2949 echo $ac_n "(cached) $ac_c" 1>&6
2950else
2951 cat > conftest.$ac_ext <<EOF
2952#line 2953 "configure"
2953#include "confdefs.h"
2954#include <locale.h>
2955int main() {
2956return LC_MESSAGES
2957; return 0; }
2958EOF
2959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2960 rm -rf conftest*
2961 am_cv_val_LC_MESSAGES=yes
2962else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 am_cv_val_LC_MESSAGES=no
2967fi
2968rm -f conftest*
2969fi
2970
2971echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2972 if test $am_cv_val_LC_MESSAGES = yes; then
2973 cat >> confdefs.h <<\EOF
2974#define HAVE_LC_MESSAGES 1
2975EOF
2976
2977 fi
2978 fi
2979 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2980echo "configure:2981: checking whether NLS is requested" >&5
2981 # Check whether --enable-nls or --disable-nls was given.
2982if test "${enable_nls+set}" = set; then
2983 enableval="$enable_nls"
2984 USE_NLS=$enableval
2985else
2986 USE_NLS=yes
2987fi
2988
2989 echo "$ac_t""$USE_NLS" 1>&6
2990
2991
2992 USE_INCLUDED_LIBINTL=no
2993
2994 if test "$USE_NLS" = "yes"; then
2995 cat >> confdefs.h <<\EOF
2996#define ENABLE_NLS 1
2997EOF
2998
2999 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3000echo "configure:3001: checking whether included gettext is requested" >&5
3001 # Check whether --with-included-gettext or --without-included-gettext was given.
3002if test "${with_included_gettext+set}" = set; then
3003 withval="$with_included_gettext"
3004 nls_cv_force_use_gnu_gettext=$withval
3005else
3006 nls_cv_force_use_gnu_gettext=no
3007fi
3008
3009 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3010
3011 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3012 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3013 nls_cv_header_intl=
3014 nls_cv_header_libgt=
3015 CATOBJEXT=NONE
3016
3017 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3018echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3019echo "configure:3020: checking for libintl.h" >&5
3020if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022else
3023 cat > conftest.$ac_ext <<EOF
3024#line 3025 "configure"
3025#include "confdefs.h"
3026#include <libintl.h>
3027EOF
3028ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3029{ (eval echo configure:3030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3030ac_err=`grep -v '^ *+' conftest.out`
3031if test -z "$ac_err"; then
3032 rm -rf conftest*
3033 eval "ac_cv_header_$ac_safe=yes"
3034else
3035 echo "$ac_err" >&5
3036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 rm -rf conftest*
3039 eval "ac_cv_header_$ac_safe=no"
3040fi
3041rm -f conftest*
3042fi
3043if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3044 echo "$ac_t""yes" 1>&6
3045 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3046echo "configure:3047: checking for gettext in libc" >&5
3047if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3048 echo $ac_n "(cached) $ac_c" 1>&6
3049else
3050 cat > conftest.$ac_ext <<EOF
3051#line 3052 "configure"
3052#include "confdefs.h"
3053#include <libintl.h>
3054int main() {
3055return (int) gettext ("")
3056; return 0; }
3057EOF
3058if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3059 rm -rf conftest*
3060 gt_cv_func_gettext_libc=yes
3061else
3062 echo "configure: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 rm -rf conftest*
3065 gt_cv_func_gettext_libc=no
3066fi
3067rm -f conftest*
3068fi
3069
3070echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3071
3072 if test "$gt_cv_func_gettext_libc" != "yes"; then
3073 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3074echo "configure:3075: checking for bindtextdomain in -lintl" >&5
3075ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3076if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078else
3079 ac_save_LIBS="$LIBS"
3080LIBS="-lintl $LIBS"
3081cat > conftest.$ac_ext <<EOF
3082#line 3083 "configure"
3083#include "confdefs.h"
3084/* Override any gcc2 internal prototype to avoid an error. */
3085/* We use char because int might match the return type of a gcc2
3086 builtin and then its argument prototype would still apply. */
3087char bindtextdomain();
3088
3089int main() {
3090bindtextdomain()
3091; return 0; }
3092EOF
3093if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3094 rm -rf conftest*
3095 eval "ac_cv_lib_$ac_lib_var=yes"
3096else
3097 echo "configure: failed program was:" >&5
3098 cat conftest.$ac_ext >&5
3099 rm -rf conftest*
3100 eval "ac_cv_lib_$ac_lib_var=no"
3101fi
3102rm -f conftest*
3103LIBS="$ac_save_LIBS"
3104
3105fi
3106if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3107 echo "$ac_t""yes" 1>&6
3108 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3109echo "configure:3110: checking for gettext in libintl" >&5
3110if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3112else
3113 cat > conftest.$ac_ext <<EOF
3114#line 3115 "configure"
3115#include "confdefs.h"
3116
3117int main() {
3118return (int) gettext ("")
3119; return 0; }
3120EOF
3121if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3122 rm -rf conftest*
3123 gt_cv_func_gettext_libintl=yes
3124else
3125 echo "configure: failed program was:" >&5
3126 cat conftest.$ac_ext >&5
3127 rm -rf conftest*
3128 gt_cv_func_gettext_libintl=no
3129fi
3130rm -f conftest*
3131fi
3132
3133echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3134else
3135 echo "$ac_t""no" 1>&6
3136fi
3137
3138 fi
3139
3140 if test "$gt_cv_func_gettext_libc" = "yes" \
3141 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3142 cat >> confdefs.h <<\EOF
3143#define HAVE_GETTEXT 1
3144EOF
3145
3146 # Extract the first word of "msgfmt", so it can be a program name with args.
3147set dummy msgfmt; ac_word=$2
3148echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3149echo "configure:3150: checking for $ac_word" >&5
3150if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153 case "$MSGFMT" in
3154 /*)
3155 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3156 ;;
3157 *)
3158 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3159 for ac_dir in $PATH; do
3160 test -z "$ac_dir" && ac_dir=.
3161 if test -f $ac_dir/$ac_word; then
3162 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3163 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3164 break
3165 fi
3166 fi
3167 done
3168 IFS="$ac_save_ifs"
3169 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3170 ;;
3171esac
3172fi
3173MSGFMT="$ac_cv_path_MSGFMT"
3174if test -n "$MSGFMT"; then
3175 echo "$ac_t""$MSGFMT" 1>&6
3176else
3177 echo "$ac_t""no" 1>&6
3178fi
3179 if test "$MSGFMT" != "no"; then
3180 for ac_func in dcgettext
3181do
3182echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3183echo "configure:3184: checking for $ac_func" >&5
3184if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3185 echo $ac_n "(cached) $ac_c" 1>&6
3186else
3187 cat > conftest.$ac_ext <<EOF
3188#line 3189 "configure"
3189#include "confdefs.h"
3190/* System header to define __stub macros and hopefully few prototypes,
3191 which can conflict with char $ac_func(); below. */
3192#include <assert.h>
3193/* Override any gcc2 internal prototype to avoid an error. */
3194/* We use char because int might match the return type of a gcc2
3195 builtin and then its argument prototype would still apply. */
3196char $ac_func();
3197
3198int main() {
3199
3200/* The GNU C library defines this for functions which it implements
3201 to always fail with ENOSYS. Some functions are actually named
3202 something starting with __ and the normal name is an alias. */
3203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3204choke me
3205#else
3206$ac_func();
3207#endif
3208
3209; return 0; }
3210EOF
3211if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3212 rm -rf conftest*
3213 eval "ac_cv_func_$ac_func=yes"
3214else
3215 echo "configure: failed program was:" >&5
3216 cat conftest.$ac_ext >&5
3217 rm -rf conftest*
3218 eval "ac_cv_func_$ac_func=no"
3219fi
3220rm -f conftest*
3221fi
3222
3223if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3224 echo "$ac_t""yes" 1>&6
3225 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3226 cat >> confdefs.h <<EOF
3227#define $ac_tr_func 1
3228EOF
3229
3230else
3231 echo "$ac_t""no" 1>&6
3232fi
3233done
3234
3235 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3236set dummy gmsgfmt; ac_word=$2
3237echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3238echo "configure:3239: checking for $ac_word" >&5
3239if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3240 echo $ac_n "(cached) $ac_c" 1>&6
3241else
3242 case "$GMSGFMT" in
3243 /*)
3244 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3245 ;;
3246 ?:/*)
3247 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3248 ;;
3249 *)
3250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3251 for ac_dir in $PATH; do
3252 test -z "$ac_dir" && ac_dir=.
3253 if test -f $ac_dir/$ac_word; then
3254 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3255 break
3256 fi
3257 done
3258 IFS="$ac_save_ifs"
3259 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3260 ;;
3261esac
3262fi
3263GMSGFMT="$ac_cv_path_GMSGFMT"
3264if test -n "$GMSGFMT"; then
3265 echo "$ac_t""$GMSGFMT" 1>&6
3266else
3267 echo "$ac_t""no" 1>&6
3268fi
3269
3270 # Extract the first word of "xgettext", so it can be a program name with args.
3271set dummy xgettext; ac_word=$2
3272echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3273echo "configure:3274: checking for $ac_word" >&5
3274if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3276else
3277 case "$XGETTEXT" in
3278 /*)
3279 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3283 for ac_dir in $PATH; do
3284 test -z "$ac_dir" && ac_dir=.
3285 if test -f $ac_dir/$ac_word; then
3286 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3287 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3288 break
3289 fi
3290 fi
3291 done
3292 IFS="$ac_save_ifs"
3293 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3294 ;;
3295esac
3296fi
3297XGETTEXT="$ac_cv_path_XGETTEXT"
3298if test -n "$XGETTEXT"; then
3299 echo "$ac_t""$XGETTEXT" 1>&6
3300else
3301 echo "$ac_t""no" 1>&6
3302fi
3303
3304 cat > conftest.$ac_ext <<EOF
3305#line 3306 "configure"
3306#include "confdefs.h"
3307
3308int main() {
3309extern int _nl_msg_cat_cntr;
3310 return _nl_msg_cat_cntr
3311; return 0; }
3312EOF
3313if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3314 rm -rf conftest*
3315 CATOBJEXT=.gmo
3316 DATADIRNAME=share
3317else
3318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
3320 rm -rf conftest*
3321 CATOBJEXT=.mo
3322 DATADIRNAME=lib
3323fi
3324rm -f conftest*
3325 INSTOBJEXT=.mo
3326 fi
3327 fi
3328
3329else
3330 echo "$ac_t""no" 1>&6
3331fi
3332
3333
3334
3335 if test "$CATOBJEXT" = "NONE"; then
3336 nls_cv_use_gnu_gettext=yes
3337 fi
3338 fi
3339
3340 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3341 INTLOBJS="\$(GETTOBJS)"
3342 # Extract the first word of "msgfmt", so it can be a program name with args.
3343set dummy msgfmt; ac_word=$2
3344echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3345echo "configure:3346: checking for $ac_word" >&5
3346if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3347 echo $ac_n "(cached) $ac_c" 1>&6
3348else
3349 case "$MSGFMT" in
3350 /*)
3351 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3352 ;;
3353 *)
3354 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3355 for ac_dir in $PATH; do
3356 test -z "$ac_dir" && ac_dir=.
3357 if test -f $ac_dir/$ac_word; then
3358 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3359 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3360 break
3361 fi
3362 fi
3363 done
3364 IFS="$ac_save_ifs"
3365 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3366 ;;
3367esac
3368fi
3369MSGFMT="$ac_cv_path_MSGFMT"
3370if test -n "$MSGFMT"; then
3371 echo "$ac_t""$MSGFMT" 1>&6
3372else
3373 echo "$ac_t""no" 1>&6
3374fi
3375
3376 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3377set dummy gmsgfmt; ac_word=$2
3378echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3379echo "configure:3380: checking for $ac_word" >&5
3380if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3381 echo $ac_n "(cached) $ac_c" 1>&6
3382else
3383 case "$GMSGFMT" in
3384 /*)
3385 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3386 ;;
3387 ?:/*)
3388 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3389 ;;
3390 *)
3391 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3392 for ac_dir in $PATH; do
3393 test -z "$ac_dir" && ac_dir=.
3394 if test -f $ac_dir/$ac_word; then
3395 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3396 break
3397 fi
3398 done
3399 IFS="$ac_save_ifs"
3400 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3401 ;;
3402esac
3403fi
3404GMSGFMT="$ac_cv_path_GMSGFMT"
3405if test -n "$GMSGFMT"; then
3406 echo "$ac_t""$GMSGFMT" 1>&6
3407else
3408 echo "$ac_t""no" 1>&6
3409fi
3410
3411 # Extract the first word of "xgettext", so it can be a program name with args.
3412set dummy xgettext; ac_word=$2
3413echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3414echo "configure:3415: checking for $ac_word" >&5
3415if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3416 echo $ac_n "(cached) $ac_c" 1>&6
3417else
3418 case "$XGETTEXT" in
3419 /*)
3420 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3421 ;;
3422 *)
3423 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3424 for ac_dir in $PATH; do
3425 test -z "$ac_dir" && ac_dir=.
3426 if test -f $ac_dir/$ac_word; then
3427 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3428 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3429 break
3430 fi
3431 fi
3432 done
3433 IFS="$ac_save_ifs"
3434 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3435 ;;
3436esac
3437fi
3438XGETTEXT="$ac_cv_path_XGETTEXT"
3439if test -n "$XGETTEXT"; then
3440 echo "$ac_t""$XGETTEXT" 1>&6
3441else
3442 echo "$ac_t""no" 1>&6
3443fi
3444
3445
3446 USE_INCLUDED_LIBINTL=yes
3447 CATOBJEXT=.gmo
3448 INSTOBJEXT=.mo
3449 DATADIRNAME=share
3450 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3451 INTLLIBS=$INTLDEPS
3452 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3453 nls_cv_header_intl=libintl.h
3454 nls_cv_header_libgt=libgettext.h
3455 fi
3456
3457 if test "$XGETTEXT" != ":"; then
3458 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3459 : ;
3460 else
3461 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3462 XGETTEXT=":"
3463 fi
3464 fi
3465
3466 # We need to process the po/ directory.
3467 POSUB=po
3468 else
3469 DATADIRNAME=share
3470 nls_cv_header_intl=libintl.h
3471 nls_cv_header_libgt=libgettext.h
3472 fi
3473
3474 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3475 # because some of the sources are only built for this goal.
3476 if test "$PACKAGE" = gettext; then
3477 USE_NLS=yes
3478 USE_INCLUDED_LIBINTL=yes
3479 fi
3480
3481 for lang in $ALL_LINGUAS; do
3482 GMOFILES="$GMOFILES $lang.gmo"
3483 POFILES="$POFILES $lang.po"
3484 done
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499 if test "x$CATOBJEXT" != "x"; then
3500 if test "x$ALL_LINGUAS" = "x"; then
3501 LINGUAS=
3502 else
3503 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3504echo "configure:3505: checking for catalogs to be installed" >&5
3505 NEW_LINGUAS=
3506 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3507 case "$ALL_LINGUAS" in
3508 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3509 esac
3510 done
3511 LINGUAS=$NEW_LINGUAS
3512 echo "$ac_t""$LINGUAS" 1>&6
3513 fi
3514
3515 if test -n "$LINGUAS"; then
3516 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3517 fi
3518 fi
3519
3520 if test $ac_cv_header_locale_h = yes; then
3521 INCLUDE_LOCALE_H="#include <locale.h>"
3522 else
3523 INCLUDE_LOCALE_H="\
3524/* The system does not provide the header <locale.h>. Take care yourself. */"
3525 fi
3526
3527
3528 if test -f $srcdir/po2tbl.sed.in; then
3529 if test "$CATOBJEXT" = ".cat"; then
3530 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3531echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3532echo "configure:3533: checking for linux/version.h" >&5
3533if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3534 echo $ac_n "(cached) $ac_c" 1>&6
3535else
3536 cat > conftest.$ac_ext <<EOF
3537#line 3538 "configure"
3538#include "confdefs.h"
3539#include <linux/version.h>
3540EOF
3541ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3542{ (eval echo configure:3543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3543ac_err=`grep -v '^ *+' conftest.out`
3544if test -z "$ac_err"; then
3545 rm -rf conftest*
3546 eval "ac_cv_header_$ac_safe=yes"
3547else
3548 echo "$ac_err" >&5
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
3551 rm -rf conftest*
3552 eval "ac_cv_header_$ac_safe=no"
3553fi
3554rm -f conftest*
3555fi
3556if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3557 echo "$ac_t""yes" 1>&6
3558 msgformat=linux
3559else
3560 echo "$ac_t""no" 1>&6
3561msgformat=xopen
3562fi
3563
3564
3565 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3566 fi
3567 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3568 $srcdir/po2tbl.sed.in > po2tbl.sed
3569 fi
3570
3571 if test "$PACKAGE" = "gettext"; then
3572 GT_NO="#NO#"
3573 GT_YES=
3574 else
3575 GT_NO=
3576 GT_YES="#YES#"
3577 fi
3578
3579
3580
3581 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3582
3583
3584 l=
3585
3586
3587 if test -d $srcdir/po; then
3588 test -d po || mkdir po
3589 if test "x$srcdir" != "x."; then
3590 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3591 posrcprefix="$srcdir/"
3592 else
3593 posrcprefix="../$srcdir/"
3594 fi
3595 else
3596 posrcprefix="../"
3597 fi
3598 rm -f po/POTFILES
3599 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3600 < $srcdir/po/POTFILES.in > po/POTFILES
3601 fi
3602
3603
3604# Permit host specific settings.
3605. ${srcdir}/configure.host
3606
3607
3608
3609test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3610
3611
3612BFD_HOST_64BIT_LONG=0
3613BFD_HOST_64_BIT_DEFINED=0
3614BFD_HOST_64_BIT=
3615BFD_HOST_U_64_BIT=
3616if test "x${HOST_64BIT_TYPE}" = "xlong"; then
3617 BFD_HOST_64BIT_LONG=1
3618elif test "x${HOST_64BIT_TYPE}" != "x"; then
3619 BFD_HOST_64_BIT_DEFINED=1
3620 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
3621 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
3622fi
3623
3624
3625
3626
3627
3628# Put a plausible default for CC_FOR_BUILD in Makefile.
3629if test -z "$CC_FOR_BUILD"; then
3630 if test "x$cross_compiling" = "xno"; then
3631 CC_FOR_BUILD='$(CC)'
3632 else
3633 CC_FOR_BUILD=gcc
3634 fi
3635fi
3636
3637# Also set EXEEXT_FOR_BUILD.
3638if test "x$cross_compiling" = "xno"; then
3639 EXEEXT_FOR_BUILD='$(EXEEXT)'
3640else
3641 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
3642echo "configure:3643: checking for build system executable suffix" >&5
3643if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 cat > ac_c_test.c << 'EOF'
3647int main() {
3648/* Nothing needed here */
3649}
3650EOF
3651 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
3652 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
3653 rm -f ac_c_test*
3654 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
3655fi
3656
3657echo "$ac_t""$bfd_cv_build_exeext" 1>&6
3658 EXEEXT_FOR_BUILD=""
3659 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
3660fi
3661
3662
3663for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
3664do
3665ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3666echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3667echo "configure:3668: checking for $ac_hdr" >&5
3668if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3669 echo $ac_n "(cached) $ac_c" 1>&6
3670else
3671 cat > conftest.$ac_ext <<EOF
3672#line 3673 "configure"
3673#include "confdefs.h"
3674#include <$ac_hdr>
3675EOF
3676ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3677{ (eval echo configure:3678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3678ac_err=`grep -v '^ *+' conftest.out`
3679if test -z "$ac_err"; then
3680 rm -rf conftest*
3681 eval "ac_cv_header_$ac_safe=yes"
3682else
3683 echo "$ac_err" >&5
3684 echo "configure: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 rm -rf conftest*
3687 eval "ac_cv_header_$ac_safe=no"
3688fi
3689rm -f conftest*
3690fi
3691if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3692 echo "$ac_t""yes" 1>&6
3693 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3694 cat >> confdefs.h <<EOF
3695#define $ac_tr_hdr 1
3696EOF
3697
3698else
3699 echo "$ac_t""no" 1>&6
3700fi
3701done
3702
3703for ac_hdr in fcntl.h sys/file.h sys/time.h
3704do
3705ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3706echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3707echo "configure:3708: checking for $ac_hdr" >&5
3708if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3710else
3711 cat > conftest.$ac_ext <<EOF
3712#line 3713 "configure"
3713#include "confdefs.h"
3714#include <$ac_hdr>
3715EOF
3716ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3717{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3718ac_err=`grep -v '^ *+' conftest.out`
3719if test -z "$ac_err"; then
3720 rm -rf conftest*
3721 eval "ac_cv_header_$ac_safe=yes"
3722else
3723 echo "$ac_err" >&5
3724 echo "configure: failed program was:" >&5
3725 cat conftest.$ac_ext >&5
3726 rm -rf conftest*
3727 eval "ac_cv_header_$ac_safe=no"
3728fi
3729rm -f conftest*
3730fi
3731if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3734 cat >> confdefs.h <<EOF
3735#define $ac_tr_hdr 1
3736EOF
3737
3738else
3739 echo "$ac_t""no" 1>&6
3740fi
3741done
3742
3743echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3744echo "configure:3745: checking whether time.h and sys/time.h may both be included" >&5
3745if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747else
3748 cat > conftest.$ac_ext <<EOF
3749#line 3750 "configure"
3750#include "confdefs.h"
3751#include <sys/types.h>
3752#include <sys/time.h>
3753#include <time.h>
3754int main() {
3755struct tm *tp;
3756; return 0; }
3757EOF
3758if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3759 rm -rf conftest*
3760 ac_cv_header_time=yes
3761else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 ac_cv_header_time=no
3766fi
3767rm -f conftest*
3768fi
3769
3770echo "$ac_t""$ac_cv_header_time" 1>&6
3771if test $ac_cv_header_time = yes; then
3772 cat >> confdefs.h <<\EOF
3773#define TIME_WITH_SYS_TIME 1
3774EOF
3775
3776fi
3777
3778for ac_func in fcntl getpagesize setitimer sysconf fdopen
3779do
3780echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3781echo "configure:3782: checking for $ac_func" >&5
3782if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784else
3785 cat > conftest.$ac_ext <<EOF
3786#line 3787 "configure"
3787#include "confdefs.h"
3788/* System header to define __stub macros and hopefully few prototypes,
3789 which can conflict with char $ac_func(); below. */
3790#include <assert.h>
3791/* Override any gcc2 internal prototype to avoid an error. */
3792/* We use char because int might match the return type of a gcc2
3793 builtin and then its argument prototype would still apply. */
3794char $ac_func();
3795
3796int main() {
3797
3798/* The GNU C library defines this for functions which it implements
3799 to always fail with ENOSYS. Some functions are actually named
3800 something starting with __ and the normal name is an alias. */
3801#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3802choke me
3803#else
3804$ac_func();
3805#endif
3806
3807; return 0; }
3808EOF
3809if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3810 rm -rf conftest*
3811 eval "ac_cv_func_$ac_func=yes"
3812else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
3816 eval "ac_cv_func_$ac_func=no"
3817fi
3818rm -f conftest*
3819fi
3820
3821if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3822 echo "$ac_t""yes" 1>&6
3823 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3824 cat >> confdefs.h <<EOF
3825#define $ac_tr_func 1
3826EOF
3827
3828else
3829 echo "$ac_t""no" 1>&6
3830fi
3831done
3832
3833
3834
3835case "${host}" in
3836i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
3837 cat >> confdefs.h <<\EOF
3838#define USE_BINARY_FOPEN 1
3839EOF
3840 ;;
3841esac
3842
3843echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
3844echo "configure:3845: checking whether strstr must be declared" >&5
3845if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3847else
3848 cat > conftest.$ac_ext <<EOF
3849#line 3850 "configure"
3850#include "confdefs.h"
3851
3852#include <stdio.h>
3853#ifdef HAVE_STRING_H
3854#include <string.h>
3855#else
3856#ifdef HAVE_STRINGS_H
3857#include <strings.h>
3858#endif
3859#endif
3860#ifdef HAVE_STDLIB_H
3861#include <stdlib.h>
3862#endif
3863#ifdef HAVE_UNISTD_H
3864#include <unistd.h>
3865#endif
3866int main() {
3867char *(*pfn) = (char *(*)) strstr
3868; return 0; }
3869EOF
3870if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3871 rm -rf conftest*
3872 bfd_cv_decl_needed_strstr=no
3873else
3874 echo "configure: failed program was:" >&5
3875 cat conftest.$ac_ext >&5
3876 rm -rf conftest*
3877 bfd_cv_decl_needed_strstr=yes
3878fi
3879rm -f conftest*
3880fi
3881
3882echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
3883if test $bfd_cv_decl_needed_strstr = yes; then
3884 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3885 cat >> confdefs.h <<EOF
3886#define $bfd_tr_decl 1
3887EOF
3888
3889fi
3890
3891echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
3892echo "configure:3893: checking whether malloc must be declared" >&5
3893if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3894 echo $ac_n "(cached) $ac_c" 1>&6
3895else
3896 cat > conftest.$ac_ext <<EOF
3897#line 3898 "configure"
3898#include "confdefs.h"
3899
3900#include <stdio.h>
3901#ifdef HAVE_STRING_H
3902#include <string.h>
3903#else
3904#ifdef HAVE_STRINGS_H
3905#include <strings.h>
3906#endif
3907#endif
3908#ifdef HAVE_STDLIB_H
3909#include <stdlib.h>
3910#endif
3911#ifdef HAVE_UNISTD_H
3912#include <unistd.h>
3913#endif
3914int main() {
3915char *(*pfn) = (char *(*)) malloc
3916; return 0; }
3917EOF
3918if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3919 rm -rf conftest*
3920 bfd_cv_decl_needed_malloc=no
3921else
3922 echo "configure: failed program was:" >&5
3923 cat conftest.$ac_ext >&5
3924 rm -rf conftest*
3925 bfd_cv_decl_needed_malloc=yes
b7577823
ILT
3926fi
3927rm -f conftest*
b7577823
ILT
3928fi
3929
3930echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3931if test $bfd_cv_decl_needed_malloc = yes; then
85e493f0
ILT
3932 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3933 cat >> confdefs.h <<EOF
3934#define $bfd_tr_decl 1
b7577823 3935EOF
f515fb2f 3936
2b79a104
ILT
3937fi
3938
f7954d86 3939echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
53d3ce37 3940echo "configure:3941: checking whether realloc must be declared" >&5
f7954d86
MM
3941if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3942 echo $ac_n "(cached) $ac_c" 1>&6
3943else
3944 cat > conftest.$ac_ext <<EOF
53d3ce37 3945#line 3946 "configure"
f7954d86
MM
3946#include "confdefs.h"
3947
3948#include <stdio.h>
3949#ifdef HAVE_STRING_H
3950#include <string.h>
3951#else
3952#ifdef HAVE_STRINGS_H
3953#include <strings.h>
3954#endif
3955#endif
3956#ifdef HAVE_STDLIB_H
3957#include <stdlib.h>
3958#endif
3959#ifdef HAVE_UNISTD_H
3960#include <unistd.h>
3961#endif
ac388f2a 3962int main() {
f7954d86
MM
3963char *(*pfn) = (char *(*)) realloc
3964; return 0; }
3965EOF
53d3ce37 3966if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f7954d86
MM
3967 rm -rf conftest*
3968 bfd_cv_decl_needed_realloc=no
3969else
ac388f2a
ILT
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
f7954d86
MM
3972 rm -rf conftest*
3973 bfd_cv_decl_needed_realloc=yes
3974fi
3975rm -f conftest*
f7954d86
MM
3976fi
3977
3978echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3979if test $bfd_cv_decl_needed_realloc = yes; then
3980 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3981 cat >> confdefs.h <<EOF
3982#define $bfd_tr_decl 1
3983EOF
3984
3985fi
3986
b7577823 3987echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
53d3ce37 3988echo "configure:3989: checking whether free must be declared" >&5
b7577823
ILT
3989if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3990 echo $ac_n "(cached) $ac_c" 1>&6
3991else
3992 cat > conftest.$ac_ext <<EOF
53d3ce37 3993#line 3994 "configure"
b7577823 3994#include "confdefs.h"
8c693660 3995
b7577823 3996#include <stdio.h>
f7954d86
MM
3997#ifdef HAVE_STRING_H
3998#include <string.h>
3999#else
4000#ifdef HAVE_STRINGS_H
4001#include <strings.h>
4002#endif
4003#endif
b7577823
ILT
4004#ifdef HAVE_STDLIB_H
4005#include <stdlib.h>
4006#endif
4007#ifdef HAVE_UNISTD_H
4008#include <unistd.h>
4009#endif
ac388f2a 4010int main() {
85e493f0 4011char *(*pfn) = (char *(*)) free
b7577823
ILT
4012; return 0; }
4013EOF
53d3ce37 4014if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
4015 rm -rf conftest*
4016 bfd_cv_decl_needed_free=no
4017else
ac388f2a
ILT
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
b7577823
ILT
4020 rm -rf conftest*
4021 bfd_cv_decl_needed_free=yes
4022fi
4023rm -f conftest*
b7577823
ILT
4024fi
4025
4026echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4027if test $bfd_cv_decl_needed_free = yes; then
85e493f0
ILT
4028 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4029 cat >> confdefs.h <<EOF
4030#define $bfd_tr_decl 1
b7577823
ILT
4031EOF
4032
4033fi
f515fb2f 4034
dee99794 4035echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
53d3ce37 4036echo "configure:4037: checking whether getenv must be declared" >&5
dee99794
ILT
4037if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
4039else
4040 cat > conftest.$ac_ext <<EOF
53d3ce37 4041#line 4042 "configure"
dee99794
ILT
4042#include "confdefs.h"
4043
4044#include <stdio.h>
4045#ifdef HAVE_STRING_H
4046#include <string.h>
4047#else
4048#ifdef HAVE_STRINGS_H
4049#include <strings.h>
4050#endif
4051#endif
4052#ifdef HAVE_STDLIB_H
4053#include <stdlib.h>
4054#endif
4055#ifdef HAVE_UNISTD_H
4056#include <unistd.h>
4057#endif
ac388f2a 4058int main() {
dee99794
ILT
4059char *(*pfn) = (char *(*)) getenv
4060; return 0; }
4061EOF
53d3ce37 4062if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
dee99794
ILT
4063 rm -rf conftest*
4064 bfd_cv_decl_needed_getenv=no
4065else
ac388f2a
ILT
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
dee99794
ILT
4068 rm -rf conftest*
4069 bfd_cv_decl_needed_getenv=yes
4070fi
4071rm -f conftest*
dee99794
ILT
4072fi
4073
4074echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4075if test $bfd_cv_decl_needed_getenv = yes; then
4076 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4077 cat >> confdefs.h <<EOF
4078#define $bfd_tr_decl 1
4079EOF
4080
4081fi
4082
85e493f0 4083
a52a3ce8
ILT
4084# If we are configured native, pick a core file support file.
4085COREFILE=
4086COREFLAG=
4087if test "${target}" = "${host}"; then
4088 case "${host}" in
5303c574 4089 alpha*-*-linux-gnu*)
c0734708 4090 COREFILE=trad-core.lo
999cc186
ILT
4091 cat >> confdefs.h <<\EOF
4092#define TRAD_HEADER "hosts/alphalinux.h"
4093EOF
4094
4095 ;;
eee4e8ca 4096 alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
c0734708
ILT
4097 alpha*-*-*) COREFILE=osf-core.lo ;;
4098 arm-*-riscix) COREFILE=trad-core.lo ;;
4099 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
4100 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
4101 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
a52a3ce8 4102 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
f7954d86 4103 i[3456]86-sequent-bsd*)
c0734708 4104 COREFILE=trad-core.lo;
b7577823
ILT
4105 cat >> confdefs.h <<\EOF
4106#define TRAD_HEADER "hosts/symmetry.h"
4107EOF
4108
4109 ;;
f7954d86
MM
4110 i[3456]86-sequent-sysv4*) ;;
4111 i[3456]86-sequent-sysv*)
c0734708 4112 COREFILE=trad-core.lo
b7577823
ILT
4113 cat >> confdefs.h <<\EOF
4114#define TRAD_HEADER "hosts/symmetry.h"
4115EOF
4116
4117 ;;
f7954d86 4118 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
c0734708 4119 COREFILE=trad-core.lo
b7577823
ILT
4120 cat >> confdefs.h <<\EOF
4121#define TRAD_HEADER "hosts/i386bsd.h"
69a374c0
NH
4122EOF
4123
4124 ;;
3b1b0308 4125 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
c0734708 4126 COREFILE=netbsd-core.lo
b7577823 4127 ;;
f7954d86 4128 i[3456]86-esix-sysv3*)
c0734708 4129 COREFILE=trad-core.lo
b7577823
ILT
4130 cat >> confdefs.h <<\EOF
4131#define TRAD_HEADER "hosts/esix.h"
4132EOF
4133
4134 ;;
f7954d86 4135 i[3456]86-*-sco* | i[3456]86-*-isc*)
c0734708 4136 COREFILE=trad-core.lo
b7577823
ILT
4137 cat >> confdefs.h <<\EOF
4138#define TRAD_HEADER "hosts/i386sco.h"
4139EOF
4140
4141 ;;
f7954d86 4142 i[3456]86-*-mach3*)
c0734708 4143 COREFILE=trad-core.lo
b7577823
ILT
4144 cat >> confdefs.h <<\EOF
4145#define TRAD_HEADER "hosts/i386mach3.h"
4146EOF
4147
4148 ;;
5303c574 4149 i[3456]86-*-linux-gnu*)
c0734708 4150 COREFILE=trad-core.lo
b7577823
ILT
4151 cat >> confdefs.h <<\EOF
4152#define TRAD_HEADER "hosts/i386linux.h"
4153EOF
4154
4155 ;;
c0734708
ILT
4156 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
4157 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
cf587de8 4158 i860-*-mach3* | i860-*-osf1*)
c0734708 4159 COREFILE=trad-core.lo
cf587de8
ILT
4160 cat >> confdefs.h <<\EOF
4161#define TRAD_HEADER "hosts/i860mach3.h"
4162EOF
4163
4164 ;;
b7577823 4165 mips-dec-bsd*)
c0734708 4166 COREFILE=trad-core.lo
b7577823
ILT
4167 cat >> confdefs.h <<\EOF
4168#define TRAD_HEADER "hosts/mipsbsd.h"
4169EOF
4170
4171 ;;
4172 mips-dec-mach3*)
c0734708 4173 COREFILE=trad-core.lo
b7577823
ILT
4174 cat >> confdefs.h <<\EOF
4175#define TRAD_HEADER "hosts/mipsmach3.h"
4176EOF
4177
4178 ;;
3b1b0308 4179 mips-*-netbsd* | mips*-*-openbsd*)
c0734708 4180 COREFILE=netbsd-core.lo
69a374c0 4181 ;;
b7577823 4182 mips-dec-*)
c0734708 4183 COREFILE=trad-core.lo
b7577823
ILT
4184 cat >> confdefs.h <<\EOF
4185#define TRAD_HEADER "hosts/decstation.h"
4186EOF
4187
4188 ;;
c0734708
ILT
4189 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
4190 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
4191 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
b7577823 4192 mips-*-mach3*)
c0734708 4193 COREFILE=trad-core.lo
b7577823
ILT
4194 cat >> confdefs.h <<\EOF
4195#define TRAD_HEADER "hosts/mipsmach3.h"
4196EOF
4197
4198 ;;
a52a3ce8 4199 mips-*-sysv4*) ;;
b7577823 4200 mips-*-sysv* | mips-*-riscos*)
c0734708 4201 COREFILE=trad-core.lo
b7577823
ILT
4202 cat >> confdefs.h <<\EOF
4203#define TRAD_HEADER "hosts/riscos.h"
4204EOF
4205
4206 ;;
4207 mips-sony-bsd*)
c0734708 4208 COREFILE=trad-core.lo
b7577823 4209 cat >> confdefs.h <<\EOF
ab1aa5cd 4210#define TRAD_HEADER "hosts/news-mips.h"
b7577823
ILT
4211EOF
4212
4213 ;;
4214 m68*-bull*-sysv*)
c0734708 4215 COREFILE=trad-core.lo
b7577823
ILT
4216 cat >> confdefs.h <<\EOF
4217#define TRAD_HEADER "hosts/dpx2.h"
4218EOF
4219
4220 ;;
c0734708 4221 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
b7577823 4222 m68*-hp-bsd*)
c0734708 4223 COREFILE=trad-core.lo
b7577823
ILT
4224 cat >> confdefs.h <<\EOF
4225#define TRAD_HEADER "hosts/hp300bsd.h"
55626bf0
ILT
4226EOF
4227
4228 ;;
5303c574 4229 m68*-*-linux-gnu*)
c0734708 4230 COREFILE=trad-core.lo
55626bf0
ILT
4231 cat >> confdefs.h <<\EOF
4232#define TRAD_HEADER "hosts/m68klinux.h"
7f82c7e1
ILT
4233EOF
4234
4235 ;;
4c8b9746 4236 m68*-motorola-sysv*)
c0734708 4237 COREFILE=trad-core.lo
7f82c7e1
ILT
4238 cat >> confdefs.h <<\EOF
4239#define TRAD_HEADER "hosts/delta68.h"
b7577823
ILT
4240EOF
4241
4242 ;;
b7577823 4243 m68*-sony-*)
c0734708 4244 COREFILE=trad-core.lo
b7577823
ILT
4245 cat >> confdefs.h <<\EOF
4246#define TRAD_HEADER "hosts/news.h"
69a374c0
NH
4247EOF
4248
4249 ;;
3b1b0308 4250 m68*-*-netbsd* | m68*-*-openbsd*)
c0734708 4251 COREFILE=netbsd-core.lo
d19df9b5
ILT
4252 ;;
4253 m68*-apple-aux*)
c0734708 4254 COREFILE=trad-core.lo
d19df9b5
ILT
4255 cat >> confdefs.h <<\EOF
4256#define TRAD_HEADER "hosts/m68kaux.h"
b7577823
ILT
4257EOF
4258
4259 ;;
a52a3ce8 4260 m88*-*-sysv4*) ;;
c0734708 4261 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
b7577823 4262 m88*-*-mach3*)
c0734708 4263 COREFILE=trad-core.lo
b7577823
ILT
4264 cat >> confdefs.h <<\EOF
4265#define TRAD_HEADER "hosts/m88kmach3.h"
4266EOF
4267
4268 ;;
4269 ns32k-pc532-mach)
c0734708 4270 COREFILE=trad-core.lo
b7577823
ILT
4271 cat >> confdefs.h <<\EOF
4272#define TRAD_HEADER "hosts/pc532mach.h"
69a374c0
NH
4273EOF
4274
4275 ;;
3b1b0308 4276 ns32k-*-netbsd* | ns32k-*-openbsd*)
c0734708 4277 COREFILE=netbsd-core.lo
b7577823 4278 ;;
c0734708
ILT
4279 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
4280 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
4281 rs6000-*-*) COREFILE=rs6000-core.lo ;;
4282 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
4283 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
4284 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
ac388f2a 4285 powerpc-*-beos*) ;;
eee4e8ca 4286 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
3b1b0308 4287 sparc-*-netbsd* | sparc-*-openbsd*)
c0734708 4288 COREFILE=netbsd-core.lo
69a374c0 4289 ;;
b7577823 4290 tahoe-*-*)
c0734708 4291 COREFILE=trad-core.lo
b7577823
ILT
4292 cat >> confdefs.h <<\EOF
4293#define TRAD_HEADER "hosts/tahoe.h"
4294EOF
4295
4296 ;;
4297 vax-*-ultrix2*)
c0734708 4298 COREFILE=trad-core.lo
b7577823
ILT
4299 cat >> confdefs.h <<\EOF
4300#define TRAD_HEADER "hosts/vaxult2.h"
4301EOF
4302
4303 ;;
4304 vax-*-ultrix*)
c0734708 4305 COREFILE=trad-core.lo
b7577823
ILT
4306 cat >> confdefs.h <<\EOF
4307#define TRAD_HEADER "hosts/vaxult2.h"
4308EOF
4309
4310 ;;
4311 vax-*-*)
c0734708 4312 COREFILE=trad-core.lo
b7577823
ILT
4313 cat >> confdefs.h <<\EOF
4314#define TRAD_HEADER "hosts/vaxbsd.h"
4315EOF
4316
4317 ;;
a52a3ce8
ILT
4318 esac
4319
4320 case "$COREFILE" in
c0734708
ILT
4321 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
4322 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
4323 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
4324 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
4325 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
eee4e8ca 4326 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
c0734708
ILT
4327 osf-core.lo) COREFLAG=-DOSF_CORE ;;
4328 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
4329 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
4330 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
a52a3ce8 4331 esac
1dff7902
ILT
4332
4333 # The ELF code uses the native <sys/procfs.h> to handle core files.
4334 # Define HAVE_SYS_PROCFS_H if the file exists and defines
4335 # prstatus_t.
4336 echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
53d3ce37 4337echo "configure:4338: checking for sys/procfs.h" >&5
1dff7902
ILT
4338 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
4339 echo $ac_n "(cached) $ac_c" 1>&6
4340else
4341 cat > conftest.$ac_ext <<EOF
53d3ce37 4342#line 4343 "configure"
1dff7902
ILT
4343#include "confdefs.h"
4344#include <sys/procfs.h>
ac388f2a 4345int main() {
1dff7902
ILT
4346prstatus_t t;
4347; return 0; }
4348EOF
53d3ce37 4349if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1dff7902
ILT
4350 rm -rf conftest*
4351 bfd_cv_header_sys_procfs_h=yes
4352else
ac388f2a
ILT
4353 echo "configure: failed program was:" >&5
4354 cat conftest.$ac_ext >&5
1dff7902
ILT
4355 rm -rf conftest*
4356 bfd_cv_header_sys_procfs_h=no
4357fi
4358rm -f conftest*
1dff7902
ILT
4359fi
4360
4361 echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
4362 if test $bfd_cv_header_sys_procfs_h = yes; then
4363 cat >> confdefs.h <<\EOF
4364#define HAVE_SYS_PROCFS_H 1
4365EOF
4366
4367 fi
4368
a52a3ce8
ILT
4369fi
4370
4371
4372
5a83fcdd
ILT
4373# Horrible hacks to build DLLs on Windows.
4374WIN32LDFLAGS=
4375WIN32LIBADD=
4376case "${host}" in
4377*-*-cygwin32*)
4378 if test "$enable_shared" = "yes"; then
4379 WIN32LDFLAGS="-no-undefined"
53d3ce37 4380 WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin -lkernel32"
5a83fcdd
ILT
4381 fi
4382 ;;
4383esac
4384
4385
4386
8c693660
KR
4387# target stuff:
4388
4389# Canonicalize the secondary target names.
4390if test -n "$enable_targets" ; then
4391 for targ in `echo $enable_targets | sed 's/,/ /g'`
4392 do
60f1ad85 4393 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
8c693660
KR
4394 if test -n "$result" ; then
4395 canon_targets="$canon_targets $result"
4396 else
4397 # Allow targets that config.sub doesn't recognize, like "all".
4398 canon_targets="$canon_targets $targ"
4399 fi
4400 done
4401fi
4402
4403all_targets=false
2b79a104
ILT
4404defvec=
4405selvecs=
4406selarchs=
4407TDEFINES=
8c693660
KR
4408for targ in $target $canon_targets
4409do
2b79a104 4410 if test "x$targ" = "xall"; then
8c693660
KR
4411 all_targets=true
4412 else
2b79a104
ILT
4413 . $srcdir/config.bfd
4414 if test "x$targ" = "x$target"; then
4415 defvec=$targ_defvec
8c693660 4416 fi
2b79a104
ILT
4417 selvecs="$selvecs $targ_defvec $targ_selvecs"
4418 selarchs="$selarchs $targ_archs"
4419 TDEFINES="$TDEFINES $targ_cflags"
8c693660
KR
4420 fi
4421done
4422
8c693660
KR
4423
4424# This processing still needs to be done if we're to decide properly whether
4425# 64-bit support needs to be compiled in. Currently, it will be included if
4426# the default or any other explicitly requested target requires it; it
4427# will not be included on a 32-bit host if no 64-bit target is requested, and
4428# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
4429# used.
4430
2b79a104 4431# uniq the default and selected vectors in all the configured targets.
8c693660 4432f=""
2b79a104 4433for i in $selvecs ; do
8c693660
KR
4434 case " $f " in
4435 *" $i "*) ;;
4436 *) f="$f $i" ;;
4437 esac
4438done
2b79a104 4439selvecs="$f"
8c693660 4440
36df40e0
DE
4441# start-sanitize-sky
4442# dvp is really mips, but we need to distinguish it from mips for opcodes
4443selarchs=`echo $selarchs | sed -e s/dvp/mips/g`
4444# end-sanitize-sky
4445
2b79a104 4446# uniq the architectures in all the configured targets.
8c693660 4447f=""
2b79a104 4448for i in $selarchs ; do
8c693660
KR
4449 case " $f " in
4450 *" $i "*) ;;
4451 *) f="$f $i" ;;
4452 esac
4453done
2b79a104 4454selarchs="$f"
8c693660
KR
4455
4456# Target backend .o files.
4457tb=
4458
b9bf4aff 4459elf="elf.lo elflink.lo dwarf2.lo"
a52a3ce8 4460
2b79a104 4461for vec in $selvecs
8c693660
KR
4462do
4463 case "$vec" in
4464 # This list is alphabetized to make it easy to compare
4465 # with the two vector lists in targets.c.
c0734708
ILT
4466 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
4467 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
4468 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
4469 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
5a83fcdd
ILT
4470 armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
4471 armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
c0734708
ILT
4472 armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
4473 armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
4474 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
4475 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4476 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4477 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4478 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4479 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
4480 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
4481 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
4482 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
50bd50d4 4483 target64=true ;;
c0734708
ILT
4484 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
4485 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
c0734708
ILT
4486 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4487 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4488 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
d1bf45aa 4489 target64=true ;;
c0734708 4490 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
fd8d7c31 4491# start-sanitize-d30v
c0734708 4492 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
fd8d7c31 4493# end-sanitize-d30v
c0734708
ILT
4494 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
4495 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
4496 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
4497 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4498 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4499 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
d1bf45aa 4500 target64=true ;;
c0734708
ILT
4501 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
4502 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
4503 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
4504 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
4505 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
4506 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4507 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4508 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4509 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4510 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
c0734708 4511 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
c0734708 4512 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 4513 target64=true ;;
c0734708 4514 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 4515 target64=true ;;
c0734708 4516 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
8c693660 4517 target64=true ;;
c0734708
ILT
4518 cisco_core_vec) tb="$tb cisco-core.lo" ;;
4519 demo_64_vec) tb="$tb demo64.lo aout64.lo"
8c693660 4520 target64=true ;;
c0734708
ILT
4521 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4522 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4523 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4524 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
8c693660 4525 target64=true ;;
c0734708 4526 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
70e8e585 4527 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
c0734708 4528 evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
50bd50d4 4529 target64=true ;;
c0734708
ILT
4530 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
4531 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
4532 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
4533 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
4534 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
4535 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
4536 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
4537 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
4538 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
4539 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
4540 i386msdos_vec) tb="$tb i386msdos.lo" ;;
4541 i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
4542 i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
4543 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
4544 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
4545 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
4546 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
4547 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
4548 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
4549 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
4550 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4551 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4552 ieee_vec) tb="$tb ieee.lo" ;;
4553 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
4554 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
4555 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
4556 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
4557 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
4558 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
4559 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
4560 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
4561 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
4562 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
4563 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
4564 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
4565 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
4566 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
8c693660 4567 target64=true ;;
c0734708
ILT
4568 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
4569 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
4570 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
4571 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
4572 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
4573 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
4574 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
4575 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
4576 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
4577 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
4578 ppcboot_vec) tb="$tb ppcboot.lo" ;;
4579 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4580 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
18ed85fd
ILT
4581 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4582 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
c0734708
ILT
4583 som_vec) tb="$tb som.lo" ;;
4584 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
eee4e8ca 4585 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
c0734708
ILT
4586 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
4587 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
4588 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
4589 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
4590 srec_vec) tb="$tb srec.lo" ;;
4591 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
4592 symbolsrec_vec) tb="$tb srec.lo" ;;
4593 tekhex_vec) tb="$tb tekhex.lo" ;;
229811d1
JM
4594 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
4595 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
cd6213ff 4596# start-sanitize-tic80
c0734708 4597 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
cd6213ff 4598# end-sanitize-tic80
c0734708
ILT
4599 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
4600 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
4601 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
4602 versados_vec) tb="$tb versados.lo" ;;
8c693660
KR
4603
4604 "") ;;
4605 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
4606 esac
4607done
4608
4609# Target architecture .o files.
b872076e
ILT
4610# A couple of CPUs use shorter file names to avoid problems on DOS
4611# filesystems.
c0734708 4612ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
8c693660
KR
4613
4614# Weed out duplicate .o files.
4615f=""
4616for i in $tb ; do
4617 case " $f " in
4618 *" $i "*) ;;
4619 *) f="$f $i" ;;
4620 esac
4621done
4622tb="$f"
4623
4624f=""
4625for i in $ta ; do
4626 case " $f " in
4627 *" $i "*) ;;
4628 *) f="$f $i" ;;
4629 esac
4630done
4631ta="$f"
4632
4633bfd_backends="$tb"
4634bfd_machines="$ta"
4635
4636if test x${all_targets} = xtrue ; then
4637 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
4638 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
2b79a104 4639 selvecs=
dee99794 4640 havevecs=
2b79a104 4641 selarchs=
8c693660
KR
4642else # all_targets is true
4643 # Only set these if they will be nonempty, for the clever echo.
dee99794
ILT
4644 havevecs=
4645 test -n "$selvecs" &&
4646 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
2b79a104
ILT
4647 test -n "$selvecs" &&
4648 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
4649 test -n "$selarchs" &&
2ffbb79a 4650 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
8c693660
KR
4651fi # all_targets is true
4652
4653case ${host64}-${target64}-${want64} in
4654 *true*)
4655 wordsize=64
4656 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
194141a9 4657 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
50bd50d4
MH
4658 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
4659 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
4660 fi
8c693660
KR
4661 ;;
4662 false-false-false)
4663 wordsize=32
4664 all_backends='$(BFD32_BACKENDS)'
4665 ;;
4666esac
4667
4668
4669
4670
4671
4672
8c693660
KR
4673tdefaults=""
4674test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
4675test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
4676test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
dee99794 4677test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
8c693660
KR
4678
4679
ac388f2a
ILT
4680for ac_hdr in unistd.h
4681do
4682ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4683echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
53d3ce37 4684echo "configure:4685: checking for $ac_hdr" >&5
ac388f2a 4685if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
dfc7020d
ILT
4686 echo $ac_n "(cached) $ac_c" 1>&6
4687else
ac388f2a 4688 cat > conftest.$ac_ext <<EOF
53d3ce37 4689#line 4690 "configure"
dfc7020d 4690#include "confdefs.h"
ac388f2a 4691#include <$ac_hdr>
dfc7020d 4692EOF
ac388f2a 4693ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
53d3ce37 4694{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac388f2a
ILT
4695ac_err=`grep -v '^ *+' conftest.out`
4696if test -z "$ac_err"; then
4697 rm -rf conftest*
4698 eval "ac_cv_header_$ac_safe=yes"
dfc7020d 4699else
ac388f2a
ILT
4700 echo "$ac_err" >&5
4701 echo "configure: failed program was:" >&5
4702 cat conftest.$ac_ext >&5
4703 rm -rf conftest*
4704 eval "ac_cv_header_$ac_safe=no"
dfc7020d 4705fi
ac388f2a 4706rm -f conftest*
dfc7020d 4707fi
ac388f2a
ILT
4708if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4709 echo "$ac_t""yes" 1>&6
4710 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4711 cat >> confdefs.h <<EOF
4712#define $ac_tr_hdr 1
4713EOF
4714
4715else
4716 echo "$ac_t""no" 1>&6
dfc7020d 4717fi
ac388f2a 4718done
dfc7020d 4719
ac388f2a 4720for ac_func in getpagesize
d19df9b5
ILT
4721do
4722echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
53d3ce37 4723echo "configure:4724: checking for $ac_func" >&5
d19df9b5
ILT
4724if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4725 echo $ac_n "(cached) $ac_c" 1>&6
4726else
4727 cat > conftest.$ac_ext <<EOF
53d3ce37 4728#line 4729 "configure"
d19df9b5
ILT
4729#include "confdefs.h"
4730/* System header to define __stub macros and hopefully few prototypes,
4731 which can conflict with char $ac_func(); below. */
4732#include <assert.h>
4733/* Override any gcc2 internal prototype to avoid an error. */
a4322a77
ILT
4734/* We use char because int might match the return type of a gcc2
4735 builtin and then its argument prototype would still apply. */
d19df9b5
ILT
4736char $ac_func();
4737
ac388f2a 4738int main() {
d19df9b5
ILT
4739
4740/* The GNU C library defines this for functions which it implements
4741 to always fail with ENOSYS. Some functions are actually named
4742 something starting with __ and the normal name is an alias. */
4743#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4744choke me
4745#else
4746$ac_func();
4747#endif
4748
4749; return 0; }
4750EOF
53d3ce37 4751if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d19df9b5
ILT
4752 rm -rf conftest*
4753 eval "ac_cv_func_$ac_func=yes"
4754else
ac388f2a
ILT
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
d19df9b5
ILT
4757 rm -rf conftest*
4758 eval "ac_cv_func_$ac_func=no"
4759fi
4760rm -f conftest*
fd8d7c31 4761fi
ac388f2a 4762
d19df9b5
ILT
4763if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4764 echo "$ac_t""yes" 1>&6
4765 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4766 cat >> confdefs.h <<EOF
4767#define $ac_tr_func 1
4768EOF
4769
4770else
4771 echo "$ac_t""no" 1>&6
4772fi
4773done
4774
4fe6d901 4775echo $ac_n "checking for working mmap""... $ac_c" 1>&6
53d3ce37 4776echo "configure:4777: checking for working mmap" >&5
ac388f2a 4777if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4fe6d901
KR
4778 echo $ac_n "(cached) $ac_c" 1>&6
4779else
4780 if test "$cross_compiling" = yes; then
ac388f2a 4781 ac_cv_func_mmap_fixed_mapped=no
4fe6d901 4782else
ac388f2a 4783 cat > conftest.$ac_ext <<EOF
53d3ce37 4784#line 4785 "configure"
4fe6d901
KR
4785#include "confdefs.h"
4786
ac388f2a
ILT
4787/* Thanks to Mike Haertel and Jim Avera for this test.
4788 Here is a matrix of mmap possibilities:
4789 mmap private not fixed
4790 mmap private fixed at somewhere currently unmapped
4791 mmap private fixed at somewhere already mapped
4792 mmap shared not fixed
4793 mmap shared fixed at somewhere currently unmapped
4794 mmap shared fixed at somewhere already mapped
4795 For private mappings, we should verify that changes cannot be read()
4796 back from the file, nor mmap's back from the file at a different
4797 address. (There have been systems where private was not correctly
4798 implemented like the infamous i386 svr4.0, and systems where the
4799 VM page cache was not coherent with the filesystem buffer cache
4800 like early versions of FreeBSD and possibly contemporary NetBSD.)
4801 For shared mappings, we should conversely verify that changes get
4802 propogated back to all the places they're supposed to be.
4803
4804 Grep wants private fixed already mapped.
4805 The main things grep needs to know about mmap are:
4806 * does it exist and is it safe to write into the mmap'd area
4807 * how to use it (BSD variants) */
4fe6d901
KR
4808#include <sys/types.h>
4809#include <fcntl.h>
4810#include <sys/mman.h>
4811
ac388f2a 4812/* This mess was copied from the GNU getpagesize.h. */
4fe6d901 4813#ifndef HAVE_GETPAGESIZE
ac388f2a
ILT
4814# ifdef HAVE_UNISTD_H
4815# include <unistd.h>
dfc7020d
ILT
4816# endif
4817
ac388f2a
ILT
4818/* Assume that all systems that can run configure have sys/param.h. */
4819# ifndef HAVE_SYS_PARAM_H
4820# define HAVE_SYS_PARAM_H 1
4821# endif
4822
4823# ifdef _SC_PAGESIZE
4824# define getpagesize() sysconf(_SC_PAGESIZE)
4825# else /* no _SC_PAGESIZE */
4826# ifdef HAVE_SYS_PARAM_H
4827# include <sys/param.h>
4828# ifdef EXEC_PAGESIZE
4829# define getpagesize() EXEC_PAGESIZE
4830# else /* no EXEC_PAGESIZE */
4831# ifdef NBPG
4832# define getpagesize() NBPG * CLSIZE
4833# ifndef CLSIZE
4834# define CLSIZE 1
4835# endif /* no CLSIZE */
4836# else /* no NBPG */
4837# ifdef NBPC
4838# define getpagesize() NBPC
4839# else /* no NBPC */
4840# ifdef PAGESIZE
4841# define getpagesize() PAGESIZE
4842# endif /* PAGESIZE */
4843# endif /* no NBPC */
4844# endif /* no NBPG */
4845# endif /* no EXEC_PAGESIZE */
4846# else /* no HAVE_SYS_PARAM_H */
4847# define getpagesize() 8192 /* punt totally */
4848# endif /* no HAVE_SYS_PARAM_H */
4849# endif /* no _SC_PAGESIZE */
4850
4851#endif /* no HAVE_GETPAGESIZE */
4fe6d901
KR
4852
4853#ifdef __cplusplus
ac388f2a 4854extern "C" { void *malloc(unsigned); }
4fe6d901 4855#else
ac388f2a 4856char *malloc();
4fe6d901
KR
4857#endif
4858
4859int
4860main()
4861{
ac388f2a
ILT
4862 char *data, *data2, *data3;
4863 int i, pagesize;
4864 int fd;
4865
4866 pagesize = getpagesize();
4867
4868 /*
4869 * First, make a file with some known garbage in it.
4870 */
4871 data = malloc(pagesize);
4872 if (!data)
4873 exit(1);
4874 for (i = 0; i < pagesize; ++i)
4875 *(data + i) = rand();
4876 umask(0);
4877 fd = creat("conftestmmap", 0600);
4878 if (fd < 0)
4879 exit(1);
4880 if (write(fd, data, pagesize) != pagesize)
4881 exit(1);
4882 close(fd);
4883
4884 /*
4885 * Next, try to mmap the file at a fixed address which
4886 * already has something else allocated at it. If we can,
4887 * also make sure that we see the same garbage.
4888 */
4889 fd = open("conftestmmap", O_RDWR);
4890 if (fd < 0)
4891 exit(1);
4892 data2 = malloc(2 * pagesize);
4893 if (!data2)
4894 exit(1);
4895 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4896 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4897 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4898 exit(1);
4899 for (i = 0; i < pagesize; ++i)
4900 if (*(data + i) != *(data2 + i))
4901 exit(1);
4902
4903 /*
4904 * Finally, make sure that changes to the mapped area
4905 * do not percolate back to the file as seen by read().
4906 * (This is a bug on some variants of i386 svr4.0.)
4907 */
4908 for (i = 0; i < pagesize; ++i)
4909 *(data2 + i) = *(data2 + i) + 1;
4910 data3 = malloc(pagesize);
4911 if (!data3)
4912 exit(1);
4913 if (read(fd, data3, pagesize) != pagesize)
4914 exit(1);
4915 for (i = 0; i < pagesize; ++i)
4916 if (*(data + i) != *(data3 + i))
4917 exit(1);
4918 close(fd);
4919 unlink("conftestmmap");
4920 exit(0);
4fe6d901
KR
4921}
4922
4923EOF
53d3ce37 4924if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ac388f2a
ILT
4925then
4926 ac_cv_func_mmap_fixed_mapped=yes
4fe6d901 4927else
ac388f2a
ILT
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -fr conftest*
4931 ac_cv_func_mmap_fixed_mapped=no
4fe6d901 4932fi
fd8d7c31 4933rm -fr conftest*
dfc7020d
ILT
4934fi
4935
ac388f2a
ILT
4936fi
4937
4938echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4939if test $ac_cv_func_mmap_fixed_mapped = yes; then
4fe6d901
KR
4940 cat >> confdefs.h <<\EOF
4941#define HAVE_MMAP 1
4942EOF
4943
4944fi
4945
4946for ac_func in madvise mprotect
4947do
4948echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
53d3ce37 4949echo "configure:4950: checking for $ac_func" >&5
4fe6d901
KR
4950if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
4952else
4953 cat > conftest.$ac_ext <<EOF
53d3ce37 4954#line 4955 "configure"
4fe6d901
KR
4955#include "confdefs.h"
4956/* System header to define __stub macros and hopefully few prototypes,
4957 which can conflict with char $ac_func(); below. */
4958#include <assert.h>
4959/* Override any gcc2 internal prototype to avoid an error. */
a4322a77
ILT
4960/* We use char because int might match the return type of a gcc2
4961 builtin and then its argument prototype would still apply. */
85e493f0 4962char $ac_func();
4fe6d901 4963
ac388f2a 4964int main() {
4fe6d901
KR
4965
4966/* The GNU C library defines this for functions which it implements
4967 to always fail with ENOSYS. Some functions are actually named
4968 something starting with __ and the normal name is an alias. */
4969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4970choke me
4971#else
4972$ac_func();
4973#endif
4974
4975; return 0; }
4976EOF
53d3ce37 4977if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4fe6d901
KR
4978 rm -rf conftest*
4979 eval "ac_cv_func_$ac_func=yes"
4980else
ac388f2a
ILT
4981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4fe6d901
KR
4983 rm -rf conftest*
4984 eval "ac_cv_func_$ac_func=no"
4985fi
4986rm -f conftest*
fd8d7c31 4987fi
ac388f2a 4988
4fe6d901
KR
4989if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4990 echo "$ac_t""yes" 1>&6
85e493f0 4991 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4fe6d901
KR
4992 cat >> confdefs.h <<EOF
4993#define $ac_tr_func 1
4994EOF
4995
4996else
4997 echo "$ac_t""no" 1>&6
4998fi
4999done
5000
fd8d7c31 5001case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
85e493f0
ILT
5002 true+yes ) cat >> confdefs.h <<\EOF
5003#define USE_MMAP 1
5004EOF
5005 ;;
5006esac
4fe6d901 5007
8c693660
KR
5008rm -f doc/config.status
5009trap '' 1 2 15
5010cat > confcache <<\EOF
5011# This file is a shell script that caches the results of configure
5012# tests run on this system so they can be shared between configure
5013# scripts and configure runs. It is not useful on other systems.
5014# If it contains results you don't want to keep, you may remove or edit it.
5015#
5016# By default, configure uses ./config.cache as the cache file,
5017# creating it if it does not exist already. You can give configure
5018# the --cache-file=FILE option to use a different cache file; that is
5019# what configure does when it calls configure scripts in
5020# subdirectories, so they share the cache.
5021# Giving --cache-file=/dev/null disables caching, for debugging configure.
5022# config.status only pays attention to the cache file if you give it the
5023# --recheck option to rerun configure.
5024#
5025EOF
ac388f2a
ILT
5026# The following way of writing the cache mishandles newlines in values,
5027# but we know of no workaround that is simple, portable, and efficient.
5028# So, don't put newlines in cache variables' values.
8c693660
KR
5029# Ultrix sh set writes to stderr and can't be redirected directly,
5030# and sets the high bit in the cache file unless we assign to the vars.
5031(set) 2>&1 |
372b296c 5032 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
ac388f2a
ILT
5033 *ac_space=\ *)
5034 # `set' does not quote correctly, so add quotes (double-quote substitution
5035 # turns \\\\ into \\, and sed turns \\ into \).
5036 sed -n \
5037 -e "s/'/'\\\\''/g" \
5038 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5039 ;;
5040 *)
5041 # `set' quotes correctly as required by POSIX, so do not add quotes.
5042 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5043 ;;
5044 esac >> confcache
8c693660
KR
5045if cmp -s $cache_file confcache; then
5046 :
5047else
5048 if test -w $cache_file; then
5049 echo "updating cache $cache_file"
5050 cat confcache > $cache_file
5051 else
5052 echo "not updating unwritable cache $cache_file"
5053 fi
5054fi
5055rm -f confcache
5056
5057trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5058
5059test "x$prefix" = xNONE && prefix=$ac_default_prefix
5060# Let make expand exec_prefix.
5061test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5062
5063# Any assignment to VPATH causes Sun make to only execute
5064# the first set of double-colon rules, so remove it if not needed.
5065# If there is a colon in the path, we need to keep it.
5066if test "x$srcdir" = x.; then
5067 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5068fi
5069
5070trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5071
b7577823 5072DEFS=-DHAVE_CONFIG_H
8c693660
KR
5073
5074# Without the "./", some shells look in PATH for config.status.
5075: ${CONFIG_STATUS=./config.status}
5076
5077echo creating $CONFIG_STATUS
5078rm -f $CONFIG_STATUS
5079cat > $CONFIG_STATUS <<EOF
5080#! /bin/sh
5081# Generated automatically by configure.
5082# Run this file to recreate the current configuration.
5083# This directory was configured as follows,
5084# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5085#
5086# $0 $ac_configure_args
5087#
5088# Compiler output produced by configure, useful for debugging
5089# configure, is in ./config.log if it exists.
5090
5091ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5092for ac_option
5093do
5094 case "\$ac_option" in
5095 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5096 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5097 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5098 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
372b296c 5099 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
8c693660
KR
5100 exit 0 ;;
5101 -help | --help | --hel | --he | --h)
5102 echo "\$ac_cs_usage"; exit 0 ;;
5103 *) echo "\$ac_cs_usage"; exit 1 ;;
5104 esac
5105done
5106
5107ac_given_srcdir=$srcdir
f515fb2f 5108ac_given_INSTALL="$INSTALL"
8c693660 5109
53d3ce37 5110trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
d19df9b5
ILT
5111EOF
5112cat >> $CONFIG_STATUS <<EOF
8c693660 5113
85e493f0 5114# Protect against being on the right side of a sed subst in config.status.
d19df9b5
ILT
5115sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5116 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8c693660
KR
5117$ac_vpsub
5118$extrasub
372b296c 5119s%@SHELL@%$SHELL%g
8c693660
KR
5120s%@CFLAGS@%$CFLAGS%g
5121s%@CPPFLAGS@%$CPPFLAGS%g
5122s%@CXXFLAGS@%$CXXFLAGS%g
5123s%@DEFS@%$DEFS%g
5124s%@LDFLAGS@%$LDFLAGS%g
5125s%@LIBS@%$LIBS%g
5126s%@exec_prefix@%$exec_prefix%g
5127s%@prefix@%$prefix%g
5128s%@program_transform_name@%$program_transform_name%g
85e493f0
ILT
5129s%@bindir@%$bindir%g
5130s%@sbindir@%$sbindir%g
5131s%@libexecdir@%$libexecdir%g
5132s%@datadir@%$datadir%g
5133s%@sysconfdir@%$sysconfdir%g
5134s%@sharedstatedir@%$sharedstatedir%g
5135s%@localstatedir@%$localstatedir%g
5136s%@libdir@%$libdir%g
5137s%@includedir@%$includedir%g
5138s%@oldincludedir@%$oldincludedir%g
5139s%@infodir@%$infodir%g
5140s%@mandir@%$mandir%g
8c693660
KR
5141s%@host@%$host%g
5142s%@host_alias@%$host_alias%g
5143s%@host_cpu@%$host_cpu%g
5144s%@host_vendor@%$host_vendor%g
5145s%@host_os@%$host_os%g
5146s%@target@%$target%g
5147s%@target_alias@%$target_alias%g
5148s%@target_cpu@%$target_cpu%g
5149s%@target_vendor@%$target_vendor%g
5150s%@target_os@%$target_os%g
5151s%@build@%$build%g
5152s%@build_alias@%$build_alias%g
5153s%@build_cpu@%$build_cpu%g
5154s%@build_vendor@%$build_vendor%g
5155s%@build_os@%$build_os%g
f515fb2f 5156s%@CC@%$CC%g
f515fb2f
ILT
5157s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5158s%@INSTALL_DATA@%$INSTALL_DATA%g
c0734708
ILT
5159s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5160s%@PACKAGE@%$PACKAGE%g
f4e14cb9 5161s%@VERSION@%$VERSION%g
c0734708
ILT
5162s%@ACLOCAL@%$ACLOCAL%g
5163s%@AUTOCONF@%$AUTOCONF%g
5164s%@AUTOMAKE@%$AUTOMAKE%g
5165s%@AUTOHEADER@%$AUTOHEADER%g
5166s%@MAKEINFO@%$MAKEINFO%g
5167s%@SET_MAKE@%$SET_MAKE%g
7810074c 5168s%@AR@%$AR%g
c0734708
ILT
5169s%@RANLIB@%$RANLIB%g
5170s%@LD@%$LD%g
9a837903 5171s%@NM@%$NM%g
c0734708
ILT
5172s%@LN_S@%$LN_S%g
5173s%@LIBTOOL@%$LIBTOOL%g
5a83fcdd
ILT
5174s%@DLLTOOL@%$DLLTOOL%g
5175s%@AS@%$AS%g
c0734708
ILT
5176s%@MAINT@%$MAINT%g
5177s%@EXEEXT@%$EXEEXT%g
53d3ce37
TT
5178s%@CPP@%$CPP%g
5179s%@ALLOCA@%$ALLOCA%g
5180s%@USE_NLS@%$USE_NLS%g
5181s%@MSGFMT@%$MSGFMT%g
5182s%@GMSGFMT@%$GMSGFMT%g
5183s%@XGETTEXT@%$XGETTEXT%g
5184s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5185s%@CATALOGS@%$CATALOGS%g
5186s%@CATOBJEXT@%$CATOBJEXT%g
5187s%@DATADIRNAME@%$DATADIRNAME%g
5188s%@GMOFILES@%$GMOFILES%g
5189s%@INSTOBJEXT@%$INSTOBJEXT%g
5190s%@INTLDEPS@%$INTLDEPS%g
5191s%@INTLLIBS@%$INTLLIBS%g
5192s%@INTLOBJS@%$INTLOBJS%g
5193s%@POFILES@%$POFILES%g
5194s%@POSUB@%$POSUB%g
5195s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5196s%@GT_NO@%$GT_NO%g
5197s%@GT_YES@%$GT_YES%g
5198s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5199s%@l@%$l%g
c0734708 5200s%@HDEFINES@%$HDEFINES%g
f4e14cb9
ILT
5201s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
5202s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
5203s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
5204s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
f515fb2f 5205s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2c66160c 5206s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
a52a3ce8
ILT
5207s%@COREFILE@%$COREFILE%g
5208s%@COREFLAG@%$COREFLAG%g
5a83fcdd
ILT
5209s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
5210s%@WIN32LIBADD@%$WIN32LIBADD%g
2b79a104 5211s%@TDEFINES@%$TDEFINES%g
8c693660
KR
5212s%@wordsize@%$wordsize%g
5213s%@all_backends@%$all_backends%g
5214s%@bfd_backends@%$bfd_backends%g
5215s%@bfd_machines@%$bfd_machines%g
5216s%@tdefaults@%$tdefaults%g
5217
5218CEOF
5219EOF
ac388f2a
ILT
5220
5221cat >> $CONFIG_STATUS <<\EOF
5222
5223# Split the substitutions into bite-sized pieces for seds with
5224# small command number limits, like on Digital OSF/1 and HP-UX.
5225ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5226ac_file=1 # Number of current file.
5227ac_beg=1 # First line for current file.
5228ac_end=$ac_max_sed_cmds # Line after last line for current file.
5229ac_more_lines=:
5230ac_sed_cmds=""
5231while $ac_more_lines; do
5232 if test $ac_beg -gt 1; then
5233 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5234 else
5235 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5236 fi
5237 if test ! -s conftest.s$ac_file; then
5238 ac_more_lines=false
5239 rm -f conftest.s$ac_file
5240 else
5241 if test -z "$ac_sed_cmds"; then
5242 ac_sed_cmds="sed -f conftest.s$ac_file"
5243 else
5244 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5245 fi
5246 ac_file=`expr $ac_file + 1`
5247 ac_beg=$ac_end
5248 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5249 fi
5250done
5251if test -z "$ac_sed_cmds"; then
5252 ac_sed_cmds=cat
5253fi
5254EOF
5255
8c693660
KR
5256cat >> $CONFIG_STATUS <<EOF
5257
53d3ce37 5258CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
8c693660
KR
5259EOF
5260cat >> $CONFIG_STATUS <<\EOF
5261for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
ac388f2a 5262 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8c693660 5263 case "$ac_file" in
ac388f2a 5264 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8c693660
KR
5265 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5266 *) ac_file_in="${ac_file}.in" ;;
5267 esac
5268
ac388f2a 5269 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8c693660
KR
5270
5271 # Remove last slash and all that follows it. Not all systems have dirname.
5272 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5273 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5274 # The file is in a subdirectory.
5275 test ! -d "$ac_dir" && mkdir "$ac_dir"
5276 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5277 # A "../" for each directory in $ac_dir_suffix.
5278 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5279 else
5280 ac_dir_suffix= ac_dots=
5281 fi
5282
5283 case "$ac_given_srcdir" in
5284 .) srcdir=.
5285 if test -z "$ac_dots"; then top_srcdir=.
5286 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5287 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5288 *) # Relative path.
5289 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5290 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5291 esac
5292
f515fb2f
ILT
5293 case "$ac_given_INSTALL" in
5294 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5295 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5296 esac
ac388f2a 5297
8c693660
KR
5298 echo creating "$ac_file"
5299 rm -f "$ac_file"
5300 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5301 case "$ac_file" in
5302 *Makefile*) ac_comsub="1i\\
5303# $configure_input" ;;
5304 *) ac_comsub= ;;
5305 esac
ac388f2a 5306
c0734708 5307 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8c693660
KR
5308 sed -e "$ac_comsub
5309s%@configure_input@%$configure_input%g
5310s%@srcdir@%$srcdir%g
5311s%@top_srcdir@%$top_srcdir%g
f515fb2f 5312s%@INSTALL@%$INSTALL%g
ac388f2a 5313" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8c693660 5314fi; done
ac388f2a 5315rm -f conftest.s*
8c693660 5316
b7577823
ILT
5317# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5318# NAME is the cpp macro being defined and VALUE is the value it is being given.
5319#
5320# ac_d sets the value in "#define NAME VALUE" lines.
5321ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5322ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5323ac_dC='\3'
5324ac_dD='%g'
5325# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5326ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5327ac_uB='\([ ]\)%\1#\2define\3'
5328ac_uC=' '
5329ac_uD='\4%g'
5330# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5331ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5332ac_eB='$%\1#\2define\3'
5333ac_eC=' '
5334ac_eD='%g'
5335
ac388f2a
ILT
5336if test "${CONFIG_HEADERS+set}" != set; then
5337EOF
5338cat >> $CONFIG_STATUS <<EOF
5339 CONFIG_HEADERS="config.h:config.in"
5340EOF
5341cat >> $CONFIG_STATUS <<\EOF
5342fi
b7577823 5343for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
ac388f2a 5344 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b7577823 5345 case "$ac_file" in
ac388f2a 5346 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b7577823
ILT
5347 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5348 *) ac_file_in="${ac_file}.in" ;;
5349 esac
8c693660 5350
b7577823 5351 echo creating $ac_file
8c693660 5352
b7577823 5353 rm -f conftest.frag conftest.in conftest.out
c0734708 5354 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ac388f2a 5355 cat $ac_file_inputs > conftest.in
8c693660 5356
b7577823 5357EOF
8c693660 5358
b7577823
ILT
5359# Transform confdefs.h into a sed script conftest.vals that substitutes
5360# the proper values into config.h.in to produce config.h. And first:
85e493f0 5361# Protect against being on the right side of a sed subst in config.status.
b7577823
ILT
5362# Protect against being in an unquoted here document in config.status.
5363rm -f conftest.vals
5364cat > conftest.hdr <<\EOF
5365s/[\\&%]/\\&/g
5366s%[\\$`]%\\&%g
a4322a77 5367s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b7577823
ILT
5368s%ac_d%ac_u%gp
5369s%ac_u%ac_e%gp
5370EOF
5371sed -n -f conftest.hdr confdefs.h > conftest.vals
5372rm -f conftest.hdr
5373
5374# This sed command replaces #undef with comments. This is necessary, for
5375# example, in the case of _POSIX_SOURCE, which is predefined and required
5376# on some systems where configure will not decide to define it.
5377cat >> conftest.vals <<\EOF
5378s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5379EOF
8c693660 5380
b7577823
ILT
5381# Break up conftest.vals because some shells have a limit on
5382# the size of here documents, and old seds have small limits too.
8c693660 5383
b7577823
ILT
5384rm -f conftest.tail
5385while :
5386do
5387 ac_lines=`grep -c . conftest.vals`
5388 # grep -c gives empty output for an empty file on some AIX systems.
5389 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5390 # Write a limited-size here document to conftest.frag.
5391 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5392 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5393 echo 'CEOF
5394 sed -f conftest.frag conftest.in > conftest.out
5395 rm -f conftest.in
5396 mv conftest.out conftest.in
5397' >> $CONFIG_STATUS
5398 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5399 rm -f conftest.vals
5400 mv conftest.tail conftest.vals
5401done
5402rm -f conftest.vals
8c693660 5403
b7577823
ILT
5404cat >> $CONFIG_STATUS <<\EOF
5405 rm -f conftest.frag conftest.h
5406 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5407 cat conftest.in >> conftest.h
5408 rm -f conftest.in
5409 if cmp -s $ac_file conftest.h 2>/dev/null; then
5410 echo "$ac_file is unchanged"
5411 rm -f conftest.h
8c693660 5412 else
a4322a77
ILT
5413 # Remove last slash and all that follows it. Not all systems have dirname.
5414 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5415 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5416 # The file is in a subdirectory.
5417 test ! -d "$ac_dir" && mkdir "$ac_dir"
5418 fi
b7577823
ILT
5419 rm -f $ac_file
5420 mv conftest.h $ac_file
8c693660 5421 fi
b7577823
ILT
5422fi; done
5423
ac388f2a
ILT
5424EOF
5425cat >> $CONFIG_STATUS <<EOF
8c693660 5426
c0734708 5427
ac388f2a
ILT
5428EOF
5429cat >> $CONFIG_STATUS <<\EOF
c0734708 5430test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
53d3ce37 5431sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
8c693660
KR
5432exit 0
5433EOF
5434chmod +x $CONFIG_STATUS
5435rm -fr confdefs* $ac_clean_files
5436test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5437
This page took 0.395847 seconds and 4 git commands to generate.