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