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