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