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