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