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