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