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