1999-05-28 Martin Dorey <mdorey@madge.com>
[binutils.git] / bfd / configure
blob783a3932df82e77c3a81755b004f5442ca01b6a9
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=no]"
16 ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18 ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23 --disable-libtool-lock force libtool not to do file locking"
24 ac_help="$ac_help
25 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
26 ac_help="$ac_help
27 --enable-targets alternative target configurations"
28 ac_help="$ac_help
29 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
30 ac_help="$ac_help
31 --with-mmap try using mmap for BFD input files if available"
32 ac_help="$ac_help
33 --enable-maintainer-mode enable make rules and dependencies not useful
34 (and sometimes confusing) to the casual installer"
35 ac_help="$ac_help
36 --disable-nls do not use Native Language Support"
37 ac_help="$ac_help
38 --with-included-gettext use the GNU gettext library included here"
40 # Initialize some variables set by options.
41 # The variables have the same names as the options, with
42 # dashes changed to underlines.
43 build=NONE
44 cache_file=./config.cache
45 exec_prefix=NONE
46 host=NONE
47 no_create=
48 nonopt=NONE
49 no_recursion=
50 prefix=NONE
51 program_prefix=NONE
52 program_suffix=NONE
53 program_transform_name=s,x,x,
54 silent=
55 site=
56 srcdir=
57 target=NONE
58 verbose=
59 x_includes=NONE
60 x_libraries=NONE
61 bindir='${exec_prefix}/bin'
62 sbindir='${exec_prefix}/sbin'
63 libexecdir='${exec_prefix}/libexec'
64 datadir='${prefix}/share'
65 sysconfdir='${prefix}/etc'
66 sharedstatedir='${prefix}/com'
67 localstatedir='${prefix}/var'
68 libdir='${exec_prefix}/lib'
69 includedir='${prefix}/include'
70 oldincludedir='/usr/include'
71 infodir='${prefix}/info'
72 mandir='${prefix}/man'
74 # Initialize some other variables.
75 subdirs=
76 MFLAGS= MAKEFLAGS=
77 SHELL=${CONFIG_SHELL-/bin/sh}
78 # Maximum number of lines to put in a shell here document.
79 ac_max_here_lines=12
81 ac_prev=
82 for ac_option
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
92 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
97 # Accept the important Cygnus configure options, so we can diagnose typos.
99 case "$ac_option" in
101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
106 -build | --build | --buil | --bui | --bu)
107 ac_prev=build ;;
108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
109 build="$ac_optarg" ;;
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" ;;
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" ;;
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; }
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
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; }
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'" ;;
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" ;;
155 -gas | --gas | --ga | --g)
156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
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
163 Usage: configure [options] [host]
164 Options: [defaults in brackets after descriptions]
165 Configuration:
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
171 Directory 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
196 cat << EOF
197 Host 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]
201 Features 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
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
212 exit 0 ;;
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
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" ;;
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
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" ;;
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" ;;
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
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 ;;
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" ;;
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
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" ;;
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" ;;
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" ;;
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
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" ;;
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" ;;
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
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" ;;
352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
360 -version | --version | --versio | --versi | --vers)
361 echo "configure generated by autoconf version 2.13"
362 exit 0 ;;
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; }
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'" ;;
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; }
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
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" ;;
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" ;;
404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
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
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; }
414 nonopt="$ac_option"
417 esac
418 done
420 if test -n "$ac_prev"; then
421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
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
434 if test "$silent" = yes; then
435 exec 6>/dev/null
436 else
437 exec 6>&1
439 exec 5>./config.log
441 echo "\
442 This file contains any messages produced by compilers while
443 running configure, to aid debugging if configure makes a mistake.
444 " 1>&5
446 # Strip out --no-create and --no-recursion so they do not pile up.
447 # Also quote any args containing shell metacharacters.
448 ac_configure_args=
449 for ac_arg
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
460 done
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.
467 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
468 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
472 # confdefs.h avoids OS command line length limits that DEFS can exceed.
473 rm -rf conftest* confdefs.h
474 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
475 echo > confdefs.h
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.
479 ac_unique_file=libbfd.c
481 # Find the source files, if location was not specified.
482 if 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=..
492 else
493 ac_srcdir_defaulted=no
495 if 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; }
502 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
504 # Prefer explicitly selected file to automatically selected ones.
505 if 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"
512 for 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"
517 done
519 if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522 else
523 echo "creating cache $cache_file"
524 > $cache_file
527 ac_ext=c
528 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529 ac_cpp='$CPP $CPPFLAGS'
530 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532 cross_compiling=$ac_cv_prog_cc_cross
534 ac_exeext=
535 ac_objext=o
536 if (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=
544 else
545 ac_n= ac_c='\c' ac_t=
550 ac_aux_dir=
551 for 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
561 done
562 if 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; }
565 ac_config_guess=$ac_aux_dir/config.guess
566 ac_config_sub=$ac_aux_dir/config.sub
567 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
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
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.
583 # The aliases save the names the user supplied, while $host etc.
584 # will get canonicalized.
585 case $host---$target---$nonopt in
586 NONE---*---* | *---NONE---* | *---*---NONE) ;;
587 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
588 esac
591 # Make sure we can run config.sub.
592 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
593 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
596 echo $ac_n "checking host system type""... $ac_c" 1>&6
597 echo "configure:598: checking host system type" >&5
599 host_alias=$host
600 case "$host_alias" in
601 NONE)
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 ;;
609 esac
611 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
612 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
613 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
614 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
615 echo "$ac_t""$host" 1>&6
617 echo $ac_n "checking target system type""... $ac_c" 1>&6
618 echo "configure:619: checking target system type" >&5
620 target_alias=$target
621 case "$target_alias" in
622 NONE)
623 case $nonopt in
624 NONE) target_alias=$host_alias ;;
625 *) target_alias=$nonopt ;;
626 esac ;;
627 esac
629 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
630 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
631 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
632 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
633 echo "$ac_t""$target" 1>&6
635 echo $ac_n "checking build system type""... $ac_c" 1>&6
636 echo "configure:637: checking build system type" >&5
638 build_alias=$build
639 case "$build_alias" in
640 NONE)
641 case $nonopt in
642 NONE) build_alias=$host_alias ;;
643 *) build_alias=$nonopt ;;
644 esac ;;
645 esac
647 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
648 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
649 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
650 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
651 echo "$ac_t""$build" 1>&6
653 test "$host_alias" != "$target_alias" &&
654 test "$program_prefix$program_suffix$program_transform_name" = \
655 NONENONEs,x,x, &&
656 program_prefix=${target_alias}-
658 # Extract the first word of "gcc", so it can be a program name with args.
659 set dummy gcc; ac_word=$2
660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
661 echo "configure:662: checking for $ac_word" >&5
662 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
663 echo $ac_n "(cached) $ac_c" 1>&6
664 else
665 if test -n "$CC"; then
666 ac_cv_prog_CC="$CC" # Let the user override the test.
667 else
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
676 done
677 IFS="$ac_save_ifs"
680 CC="$ac_cv_prog_CC"
681 if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
683 else
684 echo "$ac_t""no" 1>&6
687 if test -z "$CC"; then
688 # Extract the first word of "cc", so it can be a program name with args.
689 set dummy cc; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694 else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697 else
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
708 ac_cv_prog_CC="cc"
709 break
711 done
712 IFS="$ac_save_ifs"
713 if 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="$@"
729 CC="$ac_cv_prog_CC"
730 if test -n "$CC"; then
731 echo "$ac_t""$CC" 1>&6
732 else
733 echo "$ac_t""no" 1>&6
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.
740 set dummy cl; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
744 echo $ac_n "(cached) $ac_c" 1>&6
745 else
746 if test -n "$CC"; then
747 ac_cv_prog_CC="$CC" # Let the user override the test.
748 else
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
757 done
758 IFS="$ac_save_ifs"
761 CC="$ac_cv_prog_CC"
762 if test -n "$CC"; then
763 echo "$ac_t""$CC" 1>&6
764 else
765 echo "$ac_t""no" 1>&6
768 esac
770 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
774 echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
776 ac_ext=c
777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
778 ac_cpp='$CPP $CPPFLAGS'
779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
780 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
781 cross_compiling=$ac_cv_prog_cc_cross
783 cat > conftest.$ac_ext << EOF
785 #line 786 "configure"
786 #include "confdefs.h"
788 main(){return(0);}
790 if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
798 else
799 echo "configure: failed program was:" >&5
800 cat conftest.$ac_ext >&5
801 ac_cv_prog_cc_works=no
803 rm -fr conftest*
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
811 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
812 if 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; }
815 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
816 echo "configure:817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
817 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
818 cross_compiling=$ac_cv_prog_cc_cross
820 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
821 echo "configure:822: checking whether we are using GNU C" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
823 echo $ac_n "(cached) $ac_c" 1>&6
824 else
825 cat > conftest.c <<EOF
826 #ifdef __GNUC__
827 yes;
828 #endif
830 if { 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
831 ac_cv_prog_gcc=yes
832 else
833 ac_cv_prog_gcc=no
837 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
839 if test $ac_cv_prog_gcc = yes; then
840 GCC=yes
841 else
842 GCC=
845 ac_test_CFLAGS="${CFLAGS+set}"
846 ac_save_CFLAGS="$CFLAGS"
847 CFLAGS=
848 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
849 echo "configure:850: checking whether ${CC-cc} accepts -g" >&5
850 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
851 echo $ac_n "(cached) $ac_c" 1>&6
852 else
853 echo 'void f(){}' > conftest.c
854 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
855 ac_cv_prog_cc_g=yes
856 else
857 ac_cv_prog_cc_g=no
859 rm -f conftest*
863 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
864 if test "$ac_test_CFLAGS" = set; then
865 CFLAGS="$ac_save_CFLAGS"
866 elif test $ac_cv_prog_cc_g = yes; then
867 if test "$GCC" = yes; then
868 CFLAGS="-g -O2"
869 else
870 CFLAGS="-g"
872 else
873 if test "$GCC" = yes; then
874 CFLAGS="-O2"
875 else
876 CFLAGS=
880 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
881 echo "configure:882: checking for POSIXized ISC" >&5
882 if test -d /etc/conf/kconfig.d &&
883 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
884 then
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
891 if test "$GCC" = yes; then
892 CC="$CC -posix"
893 else
894 CC="$CC -Xp"
896 else
897 echo "$ac_t""no" 1>&6
898 ISC=
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.
913 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
914 echo "configure:915: checking for a BSD compatible install" >&5
915 if test -z "$INSTALL"; then
916 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
917 echo $ac_n "(cached) $ac_c" 1>&6
918 else
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/*) ;;
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.
934 else
935 ac_cv_path_install="$ac_dir/$ac_prog -c"
936 break 2
939 done
941 esac
942 done
943 IFS="$ac_save_IFS"
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"
956 echo "$ac_t""$INSTALL" 1>&6
958 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
959 # It thinks the first close brace ends the variable substitution.
960 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
962 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
964 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
966 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
967 echo "configure:968: checking whether build environment is sane" >&5
968 # Just in case
969 sleep 1
970 echo 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).
976 if (
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`
982 if test "$*" != "X $srcdir/configure conftestfile" \
983 && test "$*" != "X conftestfile $srcdir/configure"; then
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
990 alias in your environment" 1>&2; exit 1; }
993 test "$2" = conftestfile
995 then
996 # Ok.
998 else
999 { echo "configure: error: newly created file is older than distributed files!
1000 Check your system clock" 1>&2; exit 1; }
1002 rm -f conftest*
1003 echo "$ac_t""yes" 1>&6
1004 if test "$program_transform_name" = s,x,x,; then
1005 program_transform_name=
1006 else
1007 # Double any \ or $. echo might interpret backslashes.
1008 cat <<\EOF_SED > conftestsed
1009 s,\\,\\\\,g; s,\$,$$,g
1010 EOF_SED
1011 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1012 rm -f conftestsed
1014 test "$program_prefix" != NONE &&
1015 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1016 # Use a double $ so make ignores it.
1017 test "$program_suffix" != NONE &&
1018 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1020 # sed with no file args requires a program.
1021 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1023 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1024 echo "configure:1025: checking whether ${MAKE-make} sets \${MAKE}" >&5
1025 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1026 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
1028 else
1029 cat > conftestmake <<\EOF
1030 all:
1031 @echo 'ac_maketemp="${MAKE}"'
1033 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1034 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1035 if test -n "$ac_maketemp"; then
1036 eval ac_cv_prog_make_${ac_make}_set=yes
1037 else
1038 eval ac_cv_prog_make_${ac_make}_set=no
1040 rm -f conftestmake
1042 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1043 echo "$ac_t""yes" 1>&6
1044 SET_MAKE=
1045 else
1046 echo "$ac_t""no" 1>&6
1047 SET_MAKE="MAKE=${MAKE-make}"
1051 PACKAGE=bfd
1053 VERSION=2.9.4
1055 if 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; }
1058 cat >> confdefs.h <<EOF
1059 #define PACKAGE "$PACKAGE"
1062 cat >> confdefs.h <<EOF
1063 #define VERSION "$VERSION"
1068 missing_dir=`cd $ac_aux_dir && pwd`
1069 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working aclocal" >&5
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.
1074 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1075 ACLOCAL=aclocal
1076 echo "$ac_t""found" 1>&6
1077 else
1078 ACLOCAL="$missing_dir/missing aclocal"
1079 echo "$ac_t""missing" 1>&6
1082 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working autoconf" >&5
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.
1087 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1088 AUTOCONF=autoconf
1089 echo "$ac_t""found" 1>&6
1090 else
1091 AUTOCONF="$missing_dir/missing autoconf"
1092 echo "$ac_t""missing" 1>&6
1095 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1096 echo "configure:1097: checking for working automake" >&5
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.
1100 if (automake --version) < /dev/null > /dev/null 2>&1; then
1101 AUTOMAKE=automake
1102 echo "$ac_t""found" 1>&6
1103 else
1104 AUTOMAKE="$missing_dir/missing automake"
1105 echo "$ac_t""missing" 1>&6
1108 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1109 echo "configure:1110: checking for working autoheader" >&5
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.
1113 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1114 AUTOHEADER=autoheader
1115 echo "$ac_t""found" 1>&6
1116 else
1117 AUTOHEADER="$missing_dir/missing autoheader"
1118 echo "$ac_t""missing" 1>&6
1121 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1122 echo "configure:1123: checking for working makeinfo" >&5
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.
1126 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1127 MAKEINFO=makeinfo
1128 echo "$ac_t""found" 1>&6
1129 else
1130 MAKEINFO="$missing_dir/missing makeinfo"
1131 echo "$ac_t""missing" 1>&6
1136 if test $host != $build; then
1137 ac_tool_prefix=${host_alias}-
1138 else
1139 ac_tool_prefix=
1142 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1143 set dummy ${ac_tool_prefix}ar; ac_word=$2
1144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1145 echo "configure:1146: checking for $ac_word" >&5
1146 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1147 echo $ac_n "(cached) $ac_c" 1>&6
1148 else
1149 if test -n "$AR"; then
1150 ac_cv_prog_AR="$AR" # Let the user override the test.
1151 else
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
1160 done
1161 IFS="$ac_save_ifs"
1162 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1165 AR="$ac_cv_prog_AR"
1166 if test -n "$AR"; then
1167 echo "$ac_t""$AR" 1>&6
1168 else
1169 echo "$ac_t""no" 1>&6
1174 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1175 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1176 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1177 echo "configure:1178: checking for $ac_word" >&5
1178 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180 else
1181 if test -n "$RANLIB"; then
1182 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1183 else
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
1192 done
1193 IFS="$ac_save_ifs"
1196 RANLIB="$ac_cv_prog_RANLIB"
1197 if test -n "$RANLIB"; then
1198 echo "$ac_t""$RANLIB" 1>&6
1199 else
1200 echo "$ac_t""no" 1>&6
1204 if test -z "$ac_cv_prog_RANLIB"; then
1205 if test -n "$ac_tool_prefix"; then
1206 # Extract the first word of "ranlib", so it can be a program name with args.
1207 set dummy ranlib; ac_word=$2
1208 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1209 echo "configure:1210: checking for $ac_word" >&5
1210 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1211 echo $ac_n "(cached) $ac_c" 1>&6
1212 else
1213 if test -n "$RANLIB"; then
1214 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1215 else
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
1224 done
1225 IFS="$ac_save_ifs"
1226 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1229 RANLIB="$ac_cv_prog_RANLIB"
1230 if test -n "$RANLIB"; then
1231 echo "$ac_t""$RANLIB" 1>&6
1232 else
1233 echo "$ac_t""no" 1>&6
1236 else
1237 RANLIB=":"
1242 # Check whether --enable-shared or --disable-shared was given.
1243 if test "${enable_shared+set}" = set; then
1244 enableval="$enable_shared"
1245 p=${PACKAGE-default}
1246 case "$enableval" in
1247 yes) enable_shared=yes ;;
1248 no) enable_shared=no ;;
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
1257 done
1258 IFS="$ac_save_ifs"
1260 esac
1261 else
1262 enable_shared=no
1266 # Check whether --enable-static or --disable-static was given.
1267 if test "${enable_static+set}" = set; then
1268 enableval="$enable_static"
1269 p=${PACKAGE-default}
1270 case "$enableval" in
1271 yes) enable_static=yes ;;
1272 no) enable_static=no ;;
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
1281 done
1282 IFS="$ac_save_ifs"
1284 esac
1285 else
1286 enable_static=yes
1289 # Check whether --enable-fast-install or --disable-fast-install was given.
1290 if test "${enable_fast_install+set}" = set; then
1291 enableval="$enable_fast_install"
1292 p=${PACKAGE-default}
1293 case "$enableval" in
1294 yes) enable_fast_install=yes ;;
1295 no) enable_fast_install=no ;;
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
1304 done
1305 IFS="$ac_save_ifs"
1307 esac
1308 else
1309 enable_fast_install=yes
1312 # Extract the first word of "ranlib", so it can be a program name with args.
1313 set dummy ranlib; ac_word=$2
1314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315 echo "configure:1316: checking for $ac_word" >&5
1316 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1317 echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319 if test -n "$RANLIB"; then
1320 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1321 else
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
1330 done
1331 IFS="$ac_save_ifs"
1332 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1335 RANLIB="$ac_cv_prog_RANLIB"
1336 if test -n "$RANLIB"; then
1337 echo "$ac_t""$RANLIB" 1>&6
1338 else
1339 echo "$ac_t""no" 1>&6
1342 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1343 if test "${with_gnu_ld+set}" = set; then
1344 withval="$with_gnu_ld"
1345 test "$withval" = no || with_gnu_ld=yes
1346 else
1347 with_gnu_ld=no
1350 ac_prog=ld
1351 if 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
1354 echo "configure:1355: checking for ld used by GCC" >&5
1355 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1356 case "$ac_prog" in
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"
1368 # If it fails, then pretend we aren't using GCC.
1369 ac_prog=ld
1372 # If it is relative, then search for the first ld in PATH.
1373 with_gnu_ld=unknown
1375 esac
1376 elif test "$with_gnu_ld" = yes; then
1377 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1378 echo "configure:1379: checking for GNU ld" >&5
1379 else
1380 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1381 echo "configure:1382: checking for non-GNU ld" >&5
1383 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1385 else
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
1398 test "$with_gnu_ld" != yes && break
1401 done
1402 IFS="$ac_save_ifs"
1403 else
1404 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1408 LD="$ac_cv_path_LD"
1409 if test -n "$LD"; then
1410 echo "$ac_t""$LD" 1>&6
1411 else
1412 echo "$ac_t""no" 1>&6
1414 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1416 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1417 echo "configure:1418: checking if the linker ($LD) is GNU ld" >&5
1418 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1419 echo $ac_n "(cached) $ac_c" 1>&6
1420 else
1421 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1422 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1423 ac_cv_prog_gnu_ld=yes
1424 else
1425 ac_cv_prog_gnu_ld=no
1429 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1432 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1433 echo "configure:1434: checking for BSD-compatible nm" >&5
1434 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1435 echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437 if test -n "$NM"; then
1438 # Let the user override the test.
1439 ac_cv_path_NM="$NM"
1440 else
1441 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1442 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
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
1449 ac_cv_path_NM="$ac_dir/nm -B"
1450 break
1451 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1452 ac_cv_path_NM="$ac_dir/nm -p"
1453 break
1454 else
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
1459 done
1460 IFS="$ac_save_ifs"
1461 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1465 NM="$ac_cv_path_NM"
1466 echo "$ac_t""$NM" 1>&6
1469 # Check for command to grab the raw symbol name followed by C symbol from nm.
1470 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1471 echo "configure:1472: checking command to parse $NM output" >&5
1472 if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1473 echo $ac_n "(cached) $ac_c" 1>&6
1474 else
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?!! ;)}
1478 # Character class describing NM global symbol codes.
1479 ac_symcode='[BCDEGRST]'
1481 # Regexp to match symbols that can be accessed directly from C.
1482 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1484 # Transform the above into a raw symbol and a C symbol.
1485 ac_symxfrm='\1 \2\3 \3'
1487 # Transform an extracted symbol line into a proper C declaration
1488 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1490 # Define system-specific variables.
1491 case "$host_os" in
1492 aix*)
1493 ac_symcode='[BCDT]'
1495 cygwin* | mingw*)
1496 ac_symcode='[ABCDGISTW]'
1498 hpux*)
1499 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1501 irix*)
1502 ac_symcode='[BCDEGRST]'
1504 solaris*)
1505 ac_symcode='[BDT]'
1507 esac
1509 # If we're using GNU nm, then use its standard symbol codes.
1510 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1511 ac_symcode='[ABCDGISTW]'
1514 # Try without a prefix undercore, then with it.
1515 for ac_symprfx in "" "_"; do
1517 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
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
1524 extern "C" {
1525 #endif
1526 char nm_test_var;
1527 void nm_test_func(){}
1528 #ifdef __cplusplus
1530 #endif
1531 int main(){nm_test_var='a';nm_test_func;return 0;}
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
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
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
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
1552 extern "C" {
1553 #endif
1556 # Now generate the symbol file.
1557 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
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
1567 /* The mapping between symbol names and symbols. */
1568 const struct {
1569 const char *name;
1570 lt_ptr_t address;
1572 lt_preloaded_symbols[] =
1575 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1576 cat <<\EOF >> conftest.c
1577 {0, (lt_ptr_t) 0}
1580 #ifdef __cplusplus
1582 #endif
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
1596 LIBS="$ac_save_LIBS"
1597 CFLAGS="$ac_save_CFLAGS"
1598 else
1599 echo "cannot find nm_test_func in $ac_nlist" >&5
1601 else
1602 echo "cannot find nm_test_var in $ac_nlist" >&5
1604 else
1605 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
1607 else
1608 echo "$progname: failed program was:" >&5
1609 cat conftest.c >&5
1611 rm -rf conftest*
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
1620 break
1621 else
1622 ac_cv_sys_global_symbol_pipe=
1624 done
1629 ac_result=yes
1630 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1631 ac_result=no
1633 echo "$ac_t""$ac_result" 1>&6
1635 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
1636 echo "configure:1637: checking for _ prefix in compiled symbols" >&5
1637 if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640 ac_cv_sys_symbol_underscore=no
1641 cat > conftest.$ac_ext <<EOF
1642 void nm_test_func(){}
1643 int main(){nm_test_func;return 0;}
1645 if { (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
1655 else
1656 echo "configure: cannot find nm_test_func in $ac_nlist" >&5
1659 else
1660 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
1662 else
1663 echo "configure: failed program was:" >&5
1664 cat conftest.c >&5
1666 rm -rf conftest*
1670 echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
1671 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
1673 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1674 echo "configure:1675: checking whether ln -s works" >&5
1675 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1676 echo $ac_n "(cached) $ac_c" 1>&6
1677 else
1678 rm -f conftestdata
1679 if ln -s X conftestdata 2>/dev/null
1680 then
1681 rm -f conftestdata
1682 ac_cv_prog_LN_S="ln -s"
1683 else
1684 ac_cv_prog_LN_S=ln
1687 LN_S="$ac_cv_prog_LN_S"
1688 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1689 echo "$ac_t""yes" 1>&6
1690 else
1691 echo "$ac_t""no" 1>&6
1695 # Check for any special flags to pass to ltconfig.
1696 libtool_flags="--cache-file=$cache_file"
1697 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1698 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1699 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1700 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
1701 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1702 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1703 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1705 # Some flags need to be propagated to the compiler or linker for good
1706 # libtool support.
1707 case "$host" in
1708 *-*-irix6*)
1709 # Find out which ABI we are using.
1710 echo '#line 1711 "configure"' > conftest.$ac_ext
1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1712 case "`/usr/bin/file conftest.o`" in
1713 *32-bit*)
1714 LD="${LD-ld} -32"
1716 *N32*)
1717 LD="${LD-ld} -n32"
1719 *64-bit*)
1720 LD="${LD-ld} -64"
1722 esac
1724 rm -rf conftest*
1727 *-*-sco3.2v5*)
1728 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1729 SAVE_CFLAGS="$CFLAGS"
1730 CFLAGS="$CFLAGS -belf"
1731 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1732 echo "configure:1733: checking whether the C compiler needs -belf" >&5
1733 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1734 echo $ac_n "(cached) $ac_c" 1>&6
1735 else
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1740 int main() {
1742 ; return 0; }
1744 if { (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
1747 else
1748 echo "configure: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 rm -rf conftest*
1751 lt_cv_cc_needs_belf=no
1753 rm -f conftest*
1756 echo "$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"
1763 *-*-cygwin*)
1764 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1765 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1767 echo "configure:1768: checking for $ac_word" >&5
1768 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1769 echo $ac_n "(cached) $ac_c" 1>&6
1770 else
1771 if test -n "$DLLTOOL"; then
1772 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1773 else
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
1782 done
1783 IFS="$ac_save_ifs"
1786 DLLTOOL="$ac_cv_prog_DLLTOOL"
1787 if test -n "$DLLTOOL"; then
1788 echo "$ac_t""$DLLTOOL" 1>&6
1789 else
1790 echo "$ac_t""no" 1>&6
1794 if test -z "$ac_cv_prog_DLLTOOL"; then
1795 if test -n "$ac_tool_prefix"; then
1796 # Extract the first word of "dlltool", so it can be a program name with args.
1797 set dummy dlltool; ac_word=$2
1798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1799 echo "configure:1800: checking for $ac_word" >&5
1800 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1801 echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803 if test -n "$DLLTOOL"; then
1804 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1805 else
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
1814 done
1815 IFS="$ac_save_ifs"
1816 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1819 DLLTOOL="$ac_cv_prog_DLLTOOL"
1820 if test -n "$DLLTOOL"; then
1821 echo "$ac_t""$DLLTOOL" 1>&6
1822 else
1823 echo "$ac_t""no" 1>&6
1826 else
1827 DLLTOOL="false"
1831 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1832 set dummy ${ac_tool_prefix}as; ac_word=$2
1833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1834 echo "configure:1835: checking for $ac_word" >&5
1835 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1836 echo $ac_n "(cached) $ac_c" 1>&6
1837 else
1838 if test -n "$AS"; then
1839 ac_cv_prog_AS="$AS" # Let the user override the test.
1840 else
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
1849 done
1850 IFS="$ac_save_ifs"
1853 AS="$ac_cv_prog_AS"
1854 if test -n "$AS"; then
1855 echo "$ac_t""$AS" 1>&6
1856 else
1857 echo "$ac_t""no" 1>&6
1861 if test -z "$ac_cv_prog_AS"; then
1862 if test -n "$ac_tool_prefix"; then
1863 # Extract the first word of "as", so it can be a program name with args.
1864 set dummy as; ac_word=$2
1865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_word" >&5
1867 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870 if test -n "$AS"; then
1871 ac_cv_prog_AS="$AS" # Let the user override the test.
1872 else
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
1881 done
1882 IFS="$ac_save_ifs"
1883 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1886 AS="$ac_cv_prog_AS"
1887 if test -n "$AS"; then
1888 echo "$ac_t""$AS" 1>&6
1889 else
1890 echo "$ac_t""no" 1>&6
1893 else
1894 AS="false"
1901 esac
1903 # enable the --disable-libtool-lock switch
1905 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1906 if test "${enable_libtool_lock+set}" = set; then
1907 enableval="$enable_libtool_lock"
1908 need_locks=$enableval
1909 else
1910 need_locks=yes
1914 if test x"$need_locks" = xno; then
1915 libtool_flags="$libtool_flags --disable-lock"
1919 # Save cache, so that ltconfig can load it
1920 cat > 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.
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.
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"
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'
1954 esac >> confcache
1955 if cmp -s $cache_file confcache; then
1957 else
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"
1965 rm -f confcache
1968 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1969 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1970 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1971 DLLTOOL="$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; }
1976 # Reload cache, that may have been modified by ltconfig
1977 if test -r "$cache_file"; then
1978 echo "loading cache $cache_file"
1979 . $cache_file
1980 else
1981 echo "creating cache $cache_file"
1982 > $cache_file
1986 # This can be used to rebuild libtool when needed
1987 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1989 # Always use our own libtool.
1990 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1992 # Redirect the config.log output again, so that the ltconfig log is not
1993 # clobbered by the next message.
1994 exec 5>>./config.log
1997 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1998 if 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; } ;;
2004 esac
2005 else
2006 want64=false
2008 # Check whether --enable-targets or --disable-targets was given.
2009 if 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; }
2014 no) enable_targets= ;;
2015 *) enable_targets=$enableval ;;
2016 esac
2018 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2019 if 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; } ;;
2025 esac
2027 # Check whether --with-mmap or --without-mmap was given.
2028 if 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; } ;;
2034 esac
2035 else
2036 want_mmap=false
2043 if test -z "$target" ; then
2044 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2046 if test "$program_transform_name" = s,x,x,; then
2047 program_transform_name=
2048 else
2049 # Double any \ or $. echo might interpret backslashes.
2050 cat <<\EOF_SED > conftestsed
2051 s,\\,\\\\,g; s,\$,$$,g
2052 EOF_SED
2053 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2054 rm -f conftestsed
2056 test "$program_prefix" != NONE &&
2057 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2058 # Use a double $ so make ignores it.
2059 test "$program_suffix" != NONE &&
2060 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2062 # sed with no file args requires a program.
2063 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2066 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2067 echo "configure:2068: checking whether to enable maintainer-specific portions of Makefiles" >&5
2068 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2069 if test "${enable_maintainer_mode+set}" = set; then
2070 enableval="$enable_maintainer_mode"
2071 USE_MAINTAINER_MODE=$enableval
2072 else
2073 USE_MAINTAINER_MODE=no
2076 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2079 if test $USE_MAINTAINER_MODE = yes; then
2080 MAINTAINER_MODE_TRUE=
2081 MAINTAINER_MODE_FALSE='#'
2082 else
2083 MAINTAINER_MODE_TRUE='#'
2084 MAINTAINER_MODE_FALSE=
2086 MAINT=$MAINTAINER_MODE_TRUE
2089 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2090 echo "configure:2091: checking for Cygwin environment" >&5
2091 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093 else
2094 cat > conftest.$ac_ext <<EOF
2095 #line 2096 "configure"
2096 #include "confdefs.h"
2098 int main() {
2100 #ifndef __CYGWIN__
2101 #define __CYGWIN__ __CYGWIN32__
2102 #endif
2103 return __CYGWIN__;
2104 ; return 0; }
2106 if { (eval echo configure:2107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2107 rm -rf conftest*
2108 ac_cv_cygwin=yes
2109 else
2110 echo "configure: failed program was:" >&5
2111 cat conftest.$ac_ext >&5
2112 rm -rf conftest*
2113 ac_cv_cygwin=no
2115 rm -f conftest*
2116 rm -f conftest*
2119 echo "$ac_t""$ac_cv_cygwin" 1>&6
2120 CYGWIN=
2121 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2122 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2123 echo "configure:2124: checking for mingw32 environment" >&5
2124 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126 else
2127 cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2131 int main() {
2132 return __MINGW32__;
2133 ; return 0; }
2135 if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2136 rm -rf conftest*
2137 ac_cv_mingw32=yes
2138 else
2139 echo "configure: failed program was:" >&5
2140 cat conftest.$ac_ext >&5
2141 rm -rf conftest*
2142 ac_cv_mingw32=no
2144 rm -f conftest*
2145 rm -f conftest*
2148 echo "$ac_t""$ac_cv_mingw32" 1>&6
2149 MINGW32=
2150 test "$ac_cv_mingw32" = yes && MINGW32=yes
2153 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2154 echo "configure:2155: checking for executable suffix" >&5
2155 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2156 echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2159 ac_cv_exeext=.exe
2160 else
2161 rm -f conftest*
2162 echo 'int main () { return 0; }' > conftest.$ac_ext
2163 ac_cv_exeext=
2164 if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
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; }
2174 rm -f conftest*
2175 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2179 EXEEXT=""
2180 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2181 echo "$ac_t""${ac_cv_exeext}" 1>&6
2182 ac_exeext=$EXEEXT
2185 host64=false
2186 target64=false
2188 # host stuff:
2190 # Extract the first word of "gcc", so it can be a program name with args.
2191 set dummy gcc; ac_word=$2
2192 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2193 echo "configure:2194: checking for $ac_word" >&5
2194 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2196 else
2197 if test -n "$CC"; then
2198 ac_cv_prog_CC="$CC" # Let the user override the test.
2199 else
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
2208 done
2209 IFS="$ac_save_ifs"
2212 CC="$ac_cv_prog_CC"
2213 if test -n "$CC"; then
2214 echo "$ac_t""$CC" 1>&6
2215 else
2216 echo "$ac_t""no" 1>&6
2219 if test -z "$CC"; then
2220 # Extract the first word of "cc", so it can be a program name with args.
2221 set dummy cc; ac_word=$2
2222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2223 echo "configure:2224: checking for $ac_word" >&5
2224 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 if test -n "$CC"; then
2228 ac_cv_prog_CC="$CC" # Let the user override the test.
2229 else
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
2240 ac_cv_prog_CC="cc"
2241 break
2243 done
2244 IFS="$ac_save_ifs"
2245 if 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="$@"
2261 CC="$ac_cv_prog_CC"
2262 if test -n "$CC"; then
2263 echo "$ac_t""$CC" 1>&6
2264 else
2265 echo "$ac_t""no" 1>&6
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.
2272 set dummy cl; ac_word=$2
2273 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2274 echo "configure:2275: checking for $ac_word" >&5
2275 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2276 echo $ac_n "(cached) $ac_c" 1>&6
2277 else
2278 if test -n "$CC"; then
2279 ac_cv_prog_CC="$CC" # Let the user override the test.
2280 else
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
2289 done
2290 IFS="$ac_save_ifs"
2293 CC="$ac_cv_prog_CC"
2294 if test -n "$CC"; then
2295 echo "$ac_t""$CC" 1>&6
2296 else
2297 echo "$ac_t""no" 1>&6
2300 esac
2302 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2305 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2306 echo "configure:2307: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2308 ac_ext=c
2309 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2312 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2313 cross_compiling=$ac_cv_prog_cc_cross
2315 cat > conftest.$ac_ext << EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2320 main(){return(0);}
2322 if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2330 else
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 ac_cv_prog_cc_works=no
2335 rm -fr conftest*
2336 ac_ext=c
2337 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2338 ac_cpp='$CPP $CPPFLAGS'
2339 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2340 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2341 cross_compiling=$ac_cv_prog_cc_cross
2343 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2344 if 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; }
2347 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2348 echo "configure:2349: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2349 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2350 cross_compiling=$ac_cv_prog_cc_cross
2352 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2353 echo "configure:2354: checking whether we are using GNU C" >&5
2354 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357 cat > conftest.c <<EOF
2358 #ifdef __GNUC__
2359 yes;
2360 #endif
2362 if { 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
2363 ac_cv_prog_gcc=yes
2364 else
2365 ac_cv_prog_gcc=no
2369 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2371 if test $ac_cv_prog_gcc = yes; then
2372 GCC=yes
2373 else
2374 GCC=
2377 ac_test_CFLAGS="${CFLAGS+set}"
2378 ac_save_CFLAGS="$CFLAGS"
2379 CFLAGS=
2380 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2381 echo "configure:2382: checking whether ${CC-cc} accepts -g" >&5
2382 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385 echo 'void f(){}' > conftest.c
2386 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2387 ac_cv_prog_cc_g=yes
2388 else
2389 ac_cv_prog_cc_g=no
2391 rm -f conftest*
2395 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2396 if test "$ac_test_CFLAGS" = set; then
2397 CFLAGS="$ac_save_CFLAGS"
2398 elif test $ac_cv_prog_cc_g = yes; then
2399 if test "$GCC" = yes; then
2400 CFLAGS="-g -O2"
2401 else
2402 CFLAGS="-g"
2404 else
2405 if test "$GCC" = yes; then
2406 CFLAGS="-O2"
2407 else
2408 CFLAGS=
2413 ALL_LINGUAS=
2414 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2415 echo "configure:2416: checking how to run the C preprocessor" >&5
2416 # On Suns, sometimes $CPP names a directory.
2417 if test -n "$CPP" && test -d "$CPP"; then
2418 CPP=
2420 if test -z "$CPP"; then
2421 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2422 echo $ac_n "(cached) $ac_c" 1>&6
2423 else
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
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <assert.h>
2433 Syntax Error
2435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2436 { (eval echo configure:2437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2438 if test -z "$ac_err"; then
2440 else
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
2447 #line 2448 "configure"
2448 #include "confdefs.h"
2449 #include <assert.h>
2450 Syntax Error
2452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2453 { (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2455 if test -z "$ac_err"; then
2457 else
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
2464 #line 2465 "configure"
2465 #include "confdefs.h"
2466 #include <assert.h>
2467 Syntax Error
2469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2470 { (eval echo configure:2471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2472 if test -z "$ac_err"; then
2474 else
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
2481 rm -f conftest*
2483 rm -f conftest*
2485 rm -f conftest*
2486 ac_cv_prog_CPP="$CPP"
2488 CPP="$ac_cv_prog_CPP"
2489 else
2490 ac_cv_prog_CPP="$CPP"
2492 echo "$ac_t""$CPP" 1>&6
2494 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2495 echo "configure:2496: checking for ANSI C header files" >&5
2496 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2497 echo $ac_n "(cached) $ac_c" 1>&6
2498 else
2499 cat > conftest.$ac_ext <<EOF
2500 #line 2501 "configure"
2501 #include "confdefs.h"
2502 #include <stdlib.h>
2503 #include <stdarg.h>
2504 #include <string.h>
2505 #include <float.h>
2507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2508 { (eval echo configure:2509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2510 if test -z "$ac_err"; then
2511 rm -rf conftest*
2512 ac_cv_header_stdc=yes
2513 else
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
2520 rm -f conftest*
2522 if test $ac_cv_header_stdc = yes; then
2523 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2524 cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <string.h>
2529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2530 egrep "memchr" >/dev/null 2>&1; then
2532 else
2533 rm -rf conftest*
2534 ac_cv_header_stdc=no
2536 rm -f conftest*
2540 if test $ac_cv_header_stdc = yes; then
2541 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2542 cat > conftest.$ac_ext <<EOF
2543 #line 2544 "configure"
2544 #include "confdefs.h"
2545 #include <stdlib.h>
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548 egrep "free" >/dev/null 2>&1; then
2550 else
2551 rm -rf conftest*
2552 ac_cv_header_stdc=no
2554 rm -f conftest*
2558 if test $ac_cv_header_stdc = yes; then
2559 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2560 if test "$cross_compiling" = yes; then
2562 else
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
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)))
2570 int main () { int i; for (i = 0; i < 256; i++)
2571 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2572 exit (0); }
2575 if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2576 then
2578 else
2579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 rm -fr conftest*
2582 ac_cv_header_stdc=no
2584 rm -fr conftest*
2590 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2591 if test $ac_cv_header_stdc = yes; then
2592 cat >> confdefs.h <<\EOF
2593 #define STDC_HEADERS 1
2598 echo $ac_n "checking for working const""... $ac_c" 1>&6
2599 echo "configure:2600: checking for working const" >&5
2600 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2601 echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603 cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2607 int main() {
2609 /* Ultrix mips cc rejects this. */
2610 typedef int charset[2]; const charset x;
2611 /* SunOS 4.1.1 cc rejects this. */
2612 char const *const *ccp;
2613 char **p;
2614 /* NEC SVR4.0.2 mips cc rejects this. */
2615 struct point {int x, y;};
2616 static 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 */
2620 const char *g = "string";
2621 ccp = &g + (g ? g-g : 0);
2622 /* HPUX 7.0 cc rejects these. */
2623 ++ccp;
2624 p = (char**) ccp;
2625 ccp = (char const *const *) p;
2626 { /* SCO 3.2v4 cc rejects this. */
2627 char *t;
2628 char const *s = 0 ? (char *) 0 : (char const *) 0;
2630 *t++ = 0;
2632 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2633 int x[] = {25, 17};
2634 const int *foo = &x[0];
2635 ++foo;
2637 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2638 typedef const int *iptr;
2639 iptr p = 0;
2640 ++p;
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;
2647 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2648 const int foo = 10;
2651 ; return 0; }
2653 if { (eval echo configure:2654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2654 rm -rf conftest*
2655 ac_cv_c_const=yes
2656 else
2657 echo "configure: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 rm -rf conftest*
2660 ac_cv_c_const=no
2662 rm -f conftest*
2665 echo "$ac_t""$ac_cv_c_const" 1>&6
2666 if test $ac_cv_c_const = no; then
2667 cat >> confdefs.h <<\EOF
2668 #define const
2673 echo $ac_n "checking for inline""... $ac_c" 1>&6
2674 echo "configure:2675: checking for inline" >&5
2675 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2676 echo $ac_n "(cached) $ac_c" 1>&6
2677 else
2678 ac_cv_c_inline=no
2679 for ac_kw in inline __inline__ __inline; do
2680 cat > conftest.$ac_ext <<EOF
2681 #line 2682 "configure"
2682 #include "confdefs.h"
2684 int main() {
2685 } $ac_kw foo() {
2686 ; return 0; }
2688 if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2689 rm -rf conftest*
2690 ac_cv_c_inline=$ac_kw; break
2691 else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2695 rm -f conftest*
2696 done
2700 echo "$ac_t""$ac_cv_c_inline" 1>&6
2701 case "$ac_cv_c_inline" in
2702 inline | yes) ;;
2703 no) cat >> confdefs.h <<\EOF
2704 #define inline
2707 *) cat >> confdefs.h <<EOF
2708 #define inline $ac_cv_c_inline
2711 esac
2713 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2714 echo "configure:2715: checking for off_t" >&5
2715 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2716 echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 #include <sys/types.h>
2722 #if STDC_HEADERS
2723 #include <stdlib.h>
2724 #include <stddef.h>
2725 #endif
2727 if (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
2731 else
2732 rm -rf conftest*
2733 ac_cv_type_off_t=no
2735 rm -f conftest*
2738 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2739 if test $ac_cv_type_off_t = no; then
2740 cat >> confdefs.h <<\EOF
2741 #define off_t long
2746 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2747 echo "configure:2748: checking for size_t" >&5
2748 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2749 echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751 cat > conftest.$ac_ext <<EOF
2752 #line 2753 "configure"
2753 #include "confdefs.h"
2754 #include <sys/types.h>
2755 #if STDC_HEADERS
2756 #include <stdlib.h>
2757 #include <stddef.h>
2758 #endif
2760 if (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
2764 else
2765 rm -rf conftest*
2766 ac_cv_type_size_t=no
2768 rm -f conftest*
2771 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2772 if test $ac_cv_type_size_t = no; then
2773 cat >> confdefs.h <<\EOF
2774 #define size_t unsigned
2779 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2780 # for constant arguments. Useless!
2781 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2782 echo "configure:2783: checking for working alloca.h" >&5
2783 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2784 echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786 cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789 #include <alloca.h>
2790 int main() {
2791 char *p = alloca(2 * sizeof(int));
2792 ; return 0; }
2794 if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2795 rm -rf conftest*
2796 ac_cv_header_alloca_h=yes
2797 else
2798 echo "configure: failed program was:" >&5
2799 cat conftest.$ac_ext >&5
2800 rm -rf conftest*
2801 ac_cv_header_alloca_h=no
2803 rm -f conftest*
2806 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2807 if test $ac_cv_header_alloca_h = yes; then
2808 cat >> confdefs.h <<\EOF
2809 #define HAVE_ALLOCA_H 1
2814 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2815 echo "configure:2816: checking for alloca" >&5
2816 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2817 echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
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 */
2837 char *alloca ();
2838 # endif
2839 # endif
2840 # endif
2841 # endif
2842 #endif
2844 int main() {
2845 char *p = (char *) alloca(1);
2846 ; return 0; }
2848 if { (eval echo configure:2849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2849 rm -rf conftest*
2850 ac_cv_func_alloca_works=yes
2851 else
2852 echo "configure: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2854 rm -rf conftest*
2855 ac_cv_func_alloca_works=no
2857 rm -f conftest*
2860 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2861 if test $ac_cv_func_alloca_works = yes; then
2862 cat >> confdefs.h <<\EOF
2863 #define HAVE_ALLOCA 1
2868 if 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
2879 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2880 echo "configure:2881: checking whether alloca needs Cray hooks" >&5
2881 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2882 echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884 cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 #if defined(CRAY) && ! defined(CRAY2)
2888 webecray
2889 #else
2890 wenotbecray
2891 #endif
2894 if (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
2898 else
2899 rm -rf conftest*
2900 ac_cv_os_cray=no
2902 rm -f conftest*
2906 echo "$ac_t""$ac_cv_os_cray" 1>&6
2907 if test $ac_cv_os_cray = yes; then
2908 for ac_func in _getb67 GETB67 getb67; do
2909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2910 echo "configure:2911: checking for $ac_func" >&5
2911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2912 echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
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. */
2923 char $ac_func();
2925 int main() {
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)
2931 choke me
2932 #else
2933 $ac_func();
2934 #endif
2936 ; return 0; }
2938 if { (eval echo configure:2939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2939 rm -rf conftest*
2940 eval "ac_cv_func_$ac_func=yes"
2941 else
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"
2947 rm -f conftest*
2950 if 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
2956 break
2957 else
2958 echo "$ac_t""no" 1>&6
2961 done
2964 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2965 echo "configure:2966: checking stack direction for C alloca" >&5
2966 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2967 echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969 if test "$cross_compiling" = yes; then
2970 ac_cv_c_stack_direction=0
2971 else
2972 cat > conftest.$ac_ext <<EOF
2973 #line 2974 "configure"
2974 #include "confdefs.h"
2975 find_stack_direction ()
2977 static char *addr = 0;
2978 auto char dummy;
2979 if (addr == 0)
2981 addr = &dummy;
2982 return find_stack_direction ();
2984 else
2985 return (&dummy > addr) ? 1 : -1;
2987 main ()
2989 exit (find_stack_direction() < 0);
2992 if { (eval echo configure:2993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2993 then
2994 ac_cv_c_stack_direction=1
2995 else
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2998 rm -fr conftest*
2999 ac_cv_c_stack_direction=-1
3001 rm -fr conftest*
3006 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3007 cat >> confdefs.h <<EOF
3008 #define STACK_DIRECTION $ac_cv_c_stack_direction
3013 for ac_hdr in unistd.h
3015 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3016 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3017 echo "configure:3018: checking for $ac_hdr" >&5
3018 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3019 echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021 cat > conftest.$ac_ext <<EOF
3022 #line 3023 "configure"
3023 #include "confdefs.h"
3024 #include <$ac_hdr>
3026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3027 { (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3029 if test -z "$ac_err"; then
3030 rm -rf conftest*
3031 eval "ac_cv_header_$ac_safe=yes"
3032 else
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"
3039 rm -f conftest*
3041 if 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
3048 else
3049 echo "$ac_t""no" 1>&6
3051 done
3053 for ac_func in getpagesize
3055 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3056 echo "configure:3057: checking for $ac_func" >&5
3057 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3058 echo $ac_n "(cached) $ac_c" 1>&6
3059 else
3060 cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
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. */
3069 char $ac_func();
3071 int main() {
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)
3077 choke me
3078 #else
3079 $ac_func();
3080 #endif
3082 ; return 0; }
3084 if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 rm -rf conftest*
3086 eval "ac_cv_func_$ac_func=yes"
3087 else
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"
3093 rm -f conftest*
3096 if 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
3103 else
3104 echo "$ac_t""no" 1>&6
3106 done
3108 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3109 echo "configure:3110: checking for working mmap" >&5
3110 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113 if test "$cross_compiling" = yes; then
3114 ac_cv_func_mmap_fixed_mapped=no
3115 else
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
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.
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>
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
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
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 */
3184 #endif /* no HAVE_GETPAGESIZE */
3186 #ifdef __cplusplus
3187 extern "C" { void *malloc(unsigned); }
3188 #else
3189 char *malloc();
3190 #endif
3193 main()
3195 char *data, *data2, *data3;
3196 int i, pagesize;
3197 int fd;
3199 pagesize = getpagesize();
3202 * First, make a file with some known garbage in it.
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);
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.
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);
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.)
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);
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3258 then
3259 ac_cv_func_mmap_fixed_mapped=yes
3260 else
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
3266 rm -fr conftest*
3271 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3272 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3273 cat >> confdefs.h <<\EOF
3274 #define HAVE_MMAP 1
3280 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3281 unistd.h values.h sys/param.h
3283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3285 echo "configure:3286: checking for $ac_hdr" >&5
3286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3287 echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289 cat > conftest.$ac_ext <<EOF
3290 #line 3291 "configure"
3291 #include "confdefs.h"
3292 #include <$ac_hdr>
3294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3295 { (eval echo configure:3296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3297 if test -z "$ac_err"; then
3298 rm -rf conftest*
3299 eval "ac_cv_header_$ac_safe=yes"
3300 else
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"
3307 rm -f conftest*
3309 if 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
3316 else
3317 echo "$ac_t""no" 1>&6
3319 done
3321 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3322 __argz_count __argz_stringify __argz_next
3324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_func" >&5
3326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3327 echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329 cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
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. */
3338 char $ac_func();
3340 int main() {
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)
3346 choke me
3347 #else
3348 $ac_func();
3349 #endif
3351 ; return 0; }
3353 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354 rm -rf conftest*
3355 eval "ac_cv_func_$ac_func=yes"
3356 else
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"
3362 rm -f conftest*
3365 if 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
3372 else
3373 echo "$ac_t""no" 1>&6
3375 done
3378 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3379 for ac_func in stpcpy
3381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3382 echo "configure:3383: checking for $ac_func" >&5
3383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3384 echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
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. */
3395 char $ac_func();
3397 int main() {
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)
3403 choke me
3404 #else
3405 $ac_func();
3406 #endif
3408 ; return 0; }
3410 if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3411 rm -rf conftest*
3412 eval "ac_cv_func_$ac_func=yes"
3413 else
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"
3419 rm -f conftest*
3422 if 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
3429 else
3430 echo "$ac_t""no" 1>&6
3432 done
3435 if test "${ac_cv_func_stpcpy}" = "yes"; then
3436 cat >> confdefs.h <<\EOF
3437 #define HAVE_STPCPY 1
3442 if test $ac_cv_header_locale_h = yes; then
3443 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3444 echo "configure:3445: checking for LC_MESSAGES" >&5
3445 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3446 echo $ac_n "(cached) $ac_c" 1>&6
3447 else
3448 cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <locale.h>
3452 int main() {
3453 return LC_MESSAGES
3454 ; return 0; }
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457 rm -rf conftest*
3458 am_cv_val_LC_MESSAGES=yes
3459 else
3460 echo "configure: failed program was:" >&5
3461 cat conftest.$ac_ext >&5
3462 rm -rf conftest*
3463 am_cv_val_LC_MESSAGES=no
3465 rm -f conftest*
3468 echo "$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
3476 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3477 echo "configure:3478: checking whether NLS is requested" >&5
3478 # Check whether --enable-nls or --disable-nls was given.
3479 if test "${enable_nls+set}" = set; then
3480 enableval="$enable_nls"
3481 USE_NLS=$enableval
3482 else
3483 USE_NLS=yes
3486 echo "$ac_t""$USE_NLS" 1>&6
3489 USE_INCLUDED_LIBINTL=no
3491 if test "$USE_NLS" = "yes"; then
3492 cat >> confdefs.h <<\EOF
3493 #define ENABLE_NLS 1
3496 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether included gettext is requested" >&5
3498 # Check whether --with-included-gettext or --without-included-gettext was given.
3499 if test "${with_included_gettext+set}" = set; then
3500 withval="$with_included_gettext"
3501 nls_cv_force_use_gnu_gettext=$withval
3502 else
3503 nls_cv_force_use_gnu_gettext=no
3506 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
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
3514 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3515 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3516 echo "configure:3517: checking for libintl.h" >&5
3517 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3518 echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520 cat > conftest.$ac_ext <<EOF
3521 #line 3522 "configure"
3522 #include "confdefs.h"
3523 #include <libintl.h>
3525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3526 { (eval echo configure:3527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3528 if test -z "$ac_err"; then
3529 rm -rf conftest*
3530 eval "ac_cv_header_$ac_safe=yes"
3531 else
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"
3538 rm -f conftest*
3540 if 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
3543 echo "configure:3544: checking for gettext in libc" >&5
3544 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3545 echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547 cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 #include <libintl.h>
3551 int main() {
3552 return (int) gettext ("")
3553 ; return 0; }
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3556 rm -rf conftest*
3557 gt_cv_func_gettext_libc=yes
3558 else
3559 echo "configure: failed program was:" >&5
3560 cat conftest.$ac_ext >&5
3561 rm -rf conftest*
3562 gt_cv_func_gettext_libc=no
3564 rm -f conftest*
3567 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3569 if test "$gt_cv_func_gettext_libc" != "yes"; then
3570 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3571 echo "configure:3572: checking for bindtextdomain in -lintl" >&5
3572 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3574 echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576 ac_save_LIBS="$LIBS"
3577 LIBS="-lintl $LIBS"
3578 cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
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. */
3584 char bindtextdomain();
3586 int main() {
3587 bindtextdomain()
3588 ; return 0; }
3590 if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3591 rm -rf conftest*
3592 eval "ac_cv_lib_$ac_lib_var=yes"
3593 else
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"
3599 rm -f conftest*
3600 LIBS="$ac_save_LIBS"
3603 if 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
3606 echo "configure:3607: checking for gettext in libintl" >&5
3607 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3608 echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3614 int main() {
3615 return (int) gettext ("")
3616 ; return 0; }
3618 if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3619 rm -rf conftest*
3620 gt_cv_func_gettext_libintl=yes
3621 else
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3624 rm -rf conftest*
3625 gt_cv_func_gettext_libintl=no
3627 rm -f conftest*
3630 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3631 else
3632 echo "$ac_t""no" 1>&6
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
3643 # Extract the first word of "msgfmt", so it can be a program name with args.
3644 set dummy msgfmt; ac_word=$2
3645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3646 echo "configure:3647: checking for $ac_word" >&5
3647 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3648 echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650 case "$MSGFMT" in
3652 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
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
3664 done
3665 IFS="$ac_save_ifs"
3666 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3668 esac
3670 MSGFMT="$ac_cv_path_MSGFMT"
3671 if test -n "$MSGFMT"; then
3672 echo "$ac_t""$MSGFMT" 1>&6
3673 else
3674 echo "$ac_t""no" 1>&6
3676 if test "$MSGFMT" != "no"; then
3677 for ac_func in dcgettext
3679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3680 echo "configure:3681: checking for $ac_func" >&5
3681 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3682 echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684 cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
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. */
3693 char $ac_func();
3695 int main() {
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)
3701 choke me
3702 #else
3703 $ac_func();
3704 #endif
3706 ; return 0; }
3708 if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3709 rm -rf conftest*
3710 eval "ac_cv_func_$ac_func=yes"
3711 else
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"
3717 rm -f conftest*
3720 if 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
3727 else
3728 echo "$ac_t""no" 1>&6
3730 done
3732 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3733 set dummy gmsgfmt; ac_word=$2
3734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3735 echo "configure:3736: checking for $ac_word" >&5
3736 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3737 echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739 case "$GMSGFMT" in
3741 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3743 ?:/*)
3744 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
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
3755 done
3756 IFS="$ac_save_ifs"
3757 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3759 esac
3761 GMSGFMT="$ac_cv_path_GMSGFMT"
3762 if test -n "$GMSGFMT"; then
3763 echo "$ac_t""$GMSGFMT" 1>&6
3764 else
3765 echo "$ac_t""no" 1>&6
3768 # Extract the first word of "xgettext", so it can be a program name with args.
3769 set dummy xgettext; ac_word=$2
3770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3771 echo "configure:3772: checking for $ac_word" >&5
3772 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775 case "$XGETTEXT" in
3777 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
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
3789 done
3790 IFS="$ac_save_ifs"
3791 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3793 esac
3795 XGETTEXT="$ac_cv_path_XGETTEXT"
3796 if test -n "$XGETTEXT"; then
3797 echo "$ac_t""$XGETTEXT" 1>&6
3798 else
3799 echo "$ac_t""no" 1>&6
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3806 int main() {
3807 extern int _nl_msg_cat_cntr;
3808 return _nl_msg_cat_cntr
3809 ; return 0; }
3811 if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3812 rm -rf conftest*
3813 CATOBJEXT=.gmo
3814 DATADIRNAME=share
3815 else
3816 echo "configure: failed program was:" >&5
3817 cat conftest.$ac_ext >&5
3818 rm -rf conftest*
3819 CATOBJEXT=.mo
3820 DATADIRNAME=lib
3822 rm -f conftest*
3823 INSTOBJEXT=.mo
3827 else
3828 echo "$ac_t""no" 1>&6
3833 if test "$CATOBJEXT" = "NONE"; then
3834 nls_cv_use_gnu_gettext=yes
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.
3841 set dummy msgfmt; ac_word=$2
3842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3843 echo "configure:3844: checking for $ac_word" >&5
3844 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3845 echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847 case "$MSGFMT" in
3849 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
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
3861 done
3862 IFS="$ac_save_ifs"
3863 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3865 esac
3867 MSGFMT="$ac_cv_path_MSGFMT"
3868 if test -n "$MSGFMT"; then
3869 echo "$ac_t""$MSGFMT" 1>&6
3870 else
3871 echo "$ac_t""no" 1>&6
3874 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3875 set dummy gmsgfmt; ac_word=$2
3876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3877 echo "configure:3878: checking for $ac_word" >&5
3878 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3879 echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881 case "$GMSGFMT" in
3883 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3885 ?:/*)
3886 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
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
3897 done
3898 IFS="$ac_save_ifs"
3899 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3901 esac
3903 GMSGFMT="$ac_cv_path_GMSGFMT"
3904 if test -n "$GMSGFMT"; then
3905 echo "$ac_t""$GMSGFMT" 1>&6
3906 else
3907 echo "$ac_t""no" 1>&6
3910 # Extract the first word of "xgettext", so it can be a program name with args.
3911 set dummy xgettext; ac_word=$2
3912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3913 echo "configure:3914: checking for $ac_word" >&5
3914 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917 case "$XGETTEXT" in
3919 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
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
3931 done
3932 IFS="$ac_save_ifs"
3933 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3935 esac
3937 XGETTEXT="$ac_cv_path_XGETTEXT"
3938 if test -n "$XGETTEXT"; then
3939 echo "$ac_t""$XGETTEXT" 1>&6
3940 else
3941 echo "$ac_t""no" 1>&6
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
3956 if test "$XGETTEXT" != ":"; then
3957 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3959 else
3960 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3961 XGETTEXT=":"
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
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
3980 for lang in $ALL_LINGUAS; do
3981 GMOFILES="$GMOFILES $lang.gmo"
3982 POFILES="$POFILES $lang.po"
3983 done
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
4003 echo "configure:4004: checking for catalogs to be installed" >&5
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
4014 if test -n "$LINGUAS"; then
4015 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
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. */"
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_%'`
4030 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4031 echo "configure:4032: checking for linux/version.h" >&5
4032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4033 echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <linux/version.h>
4040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4041 { (eval echo configure:4042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4043 if test -z "$ac_err"; then
4044 rm -rf conftest*
4045 eval "ac_cv_header_$ac_safe=yes"
4046 else
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"
4053 rm -f conftest*
4055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4056 echo "$ac_t""yes" 1>&6
4057 msgformat=linux
4058 else
4059 echo "$ac_t""no" 1>&6
4060 msgformat=xopen
4064 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4066 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4067 $srcdir/po2tbl.sed.in > po2tbl.sed
4070 if test "$PACKAGE" = "gettext"; then
4071 GT_NO="#NO#"
4072 GT_YES=
4073 else
4074 GT_NO=
4075 GT_YES="#YES#"
4080 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
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/"
4094 else
4095 posrcprefix="../"
4097 rm -f po/POTFILES
4098 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4099 < $srcdir/po/POTFILES.in > po/POTFILES
4103 # Permit host specific settings.
4104 . ${srcdir}/configure.host
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.
4118 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4119 echo "configure:4120: checking for a BSD compatible install" >&5
4120 if test -z "$INSTALL"; then
4121 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4122 echo $ac_n "(cached) $ac_c" 1>&6
4123 else
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/*) ;;
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.
4139 else
4140 ac_cv_path_install="$ac_dir/$ac_prog -c"
4141 break 2
4144 done
4146 esac
4147 done
4148 IFS="$ac_save_IFS"
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"
4161 echo "$ac_t""$INSTALL" 1>&6
4163 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4164 # It thinks the first close brace ends the variable substitution.
4165 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4167 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4169 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4172 BFD_HOST_64BIT_LONG=0
4173 BFD_HOST_64_BIT_DEFINED=0
4174 BFD_HOST_64_BIT=
4175 BFD_HOST_U_64_BIT=
4176 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
4177 BFD_HOST_64BIT_LONG=1
4178 elif 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}
4188 # Put a plausible default for CC_FOR_BUILD in Makefile.
4189 if 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
4197 # Also set EXEEXT_FOR_BUILD.
4198 if test "x$cross_compiling" = "xno"; then
4199 EXEEXT_FOR_BUILD='$(EXEEXT)'
4200 else
4201 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4202 echo "configure:4203: checking for build system executable suffix" >&5
4203 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4204 echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206 cat > ac_c_test.c << 'EOF'
4207 int main() {
4208 /* Nothing needed here */
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
4217 echo "$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}
4223 for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
4225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4227 echo "configure:4228: checking for $ac_hdr" >&5
4228 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4229 echo $ac_n "(cached) $ac_c" 1>&6
4230 else
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <$ac_hdr>
4236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4237 { (eval echo configure:4238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4239 if test -z "$ac_err"; then
4240 rm -rf conftest*
4241 eval "ac_cv_header_$ac_safe=yes"
4242 else
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"
4249 rm -f conftest*
4251 if 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
4258 else
4259 echo "$ac_t""no" 1>&6
4261 done
4263 for ac_hdr in fcntl.h sys/file.h sys/time.h
4265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4267 echo "configure:4268: checking for $ac_hdr" >&5
4268 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4269 echo $ac_n "(cached) $ac_c" 1>&6
4270 else
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <$ac_hdr>
4276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4277 { (eval echo configure:4278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4279 if test -z "$ac_err"; then
4280 rm -rf conftest*
4281 eval "ac_cv_header_$ac_safe=yes"
4282 else
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"
4289 rm -f conftest*
4291 if 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
4298 else
4299 echo "$ac_t""no" 1>&6
4301 done
4303 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4304 echo "configure:4305: checking whether time.h and sys/time.h may both be included" >&5
4305 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <sys/types.h>
4312 #include <sys/time.h>
4313 #include <time.h>
4314 int main() {
4315 struct tm *tp;
4316 ; return 0; }
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319 rm -rf conftest*
4320 ac_cv_header_time=yes
4321 else
4322 echo "configure: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
4324 rm -rf conftest*
4325 ac_cv_header_time=no
4327 rm -f conftest*
4330 echo "$ac_t""$ac_cv_header_time" 1>&6
4331 if test $ac_cv_header_time = yes; then
4332 cat >> confdefs.h <<\EOF
4333 #define TIME_WITH_SYS_TIME 1
4338 ac_header_dirent=no
4339 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4342 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4343 echo "configure:4344: checking for $ac_hdr that defines DIR" >&5
4344 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4345 echo $ac_n "(cached) $ac_c" 1>&6
4346 else
4347 cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 #include <sys/types.h>
4351 #include <$ac_hdr>
4352 int main() {
4353 DIR *dirp = 0;
4354 ; return 0; }
4356 if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4357 rm -rf conftest*
4358 eval "ac_cv_header_dirent_$ac_safe=yes"
4359 else
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"
4365 rm -f conftest*
4367 if 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
4373 ac_header_dirent=$ac_hdr; break
4374 else
4375 echo "$ac_t""no" 1>&6
4377 done
4378 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4379 if test $ac_header_dirent = dirent.h; then
4380 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4381 echo "configure:4382: checking for opendir in -ldir" >&5
4382 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4384 echo $ac_n "(cached) $ac_c" 1>&6
4385 else
4386 ac_save_LIBS="$LIBS"
4387 LIBS="-ldir $LIBS"
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
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. */
4394 char opendir();
4396 int main() {
4397 opendir()
4398 ; return 0; }
4400 if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4401 rm -rf conftest*
4402 eval "ac_cv_lib_$ac_lib_var=yes"
4403 else
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"
4409 rm -f conftest*
4410 LIBS="$ac_save_LIBS"
4413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4414 echo "$ac_t""yes" 1>&6
4415 LIBS="$LIBS -ldir"
4416 else
4417 echo "$ac_t""no" 1>&6
4420 else
4421 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4422 echo "configure:4423: checking for opendir in -lx" >&5
4423 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4424 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4425 echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427 ac_save_LIBS="$LIBS"
4428 LIBS="-lx $LIBS"
4429 cat > conftest.$ac_ext <<EOF
4430 #line 4431 "configure"
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. */
4435 char opendir();
4437 int main() {
4438 opendir()
4439 ; return 0; }
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4442 rm -rf conftest*
4443 eval "ac_cv_lib_$ac_lib_var=yes"
4444 else
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"
4450 rm -f conftest*
4451 LIBS="$ac_save_LIBS"
4454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4455 echo "$ac_t""yes" 1>&6
4456 LIBS="$LIBS -lx"
4457 else
4458 echo "$ac_t""no" 1>&6
4463 for ac_func in fcntl getpagesize setitimer sysconf fdopen
4465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4466 echo "configure:4467: checking for $ac_func" >&5
4467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4468 echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
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. */
4479 char $ac_func();
4481 int main() {
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)
4487 choke me
4488 #else
4489 $ac_func();
4490 #endif
4492 ; return 0; }
4494 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4495 rm -rf conftest*
4496 eval "ac_cv_func_$ac_func=yes"
4497 else
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"
4503 rm -f conftest*
4506 if 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
4513 else
4514 echo "$ac_t""no" 1>&6
4516 done
4520 case "${host}" in
4521 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
4522 cat >> confdefs.h <<\EOF
4523 #define USE_BINARY_FOPEN 1
4526 esac
4528 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether strstr must be declared" >&5
4530 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
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
4551 int main() {
4552 char *(*pfn) = (char *(*)) strstr
4553 ; return 0; }
4555 if { (eval echo configure:4556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4556 rm -rf conftest*
4557 bfd_cv_decl_needed_strstr=no
4558 else
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 bfd_cv_decl_needed_strstr=yes
4564 rm -f conftest*
4567 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4568 if test $bfd_cv_decl_needed_strstr = yes; then
4569 cat >> confdefs.h <<\EOF
4570 #define NEED_DECLARATION_STRSTR 1
4575 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4576 echo "configure:4577: checking whether malloc must be declared" >&5
4577 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
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
4598 int main() {
4599 char *(*pfn) = (char *(*)) malloc
4600 ; return 0; }
4602 if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4603 rm -rf conftest*
4604 bfd_cv_decl_needed_malloc=no
4605 else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 bfd_cv_decl_needed_malloc=yes
4611 rm -f conftest*
4614 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4615 if test $bfd_cv_decl_needed_malloc = yes; then
4616 cat >> confdefs.h <<\EOF
4617 #define NEED_DECLARATION_MALLOC 1
4622 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4623 echo "configure:4624: checking whether realloc must be declared" >&5
4624 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4625 echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
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
4645 int main() {
4646 char *(*pfn) = (char *(*)) realloc
4647 ; return 0; }
4649 if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4650 rm -rf conftest*
4651 bfd_cv_decl_needed_realloc=no
4652 else
4653 echo "configure: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 rm -rf conftest*
4656 bfd_cv_decl_needed_realloc=yes
4658 rm -f conftest*
4661 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4662 if test $bfd_cv_decl_needed_realloc = yes; then
4663 cat >> confdefs.h <<\EOF
4664 #define NEED_DECLARATION_REALLOC 1
4669 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4670 echo "configure:4671: checking whether free must be declared" >&5
4671 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4672 echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
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
4692 int main() {
4693 char *(*pfn) = (char *(*)) free
4694 ; return 0; }
4696 if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4697 rm -rf conftest*
4698 bfd_cv_decl_needed_free=no
4699 else
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -rf conftest*
4703 bfd_cv_decl_needed_free=yes
4705 rm -f conftest*
4708 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4709 if test $bfd_cv_decl_needed_free = yes; then
4710 cat >> confdefs.h <<\EOF
4711 #define NEED_DECLARATION_FREE 1
4716 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4717 echo "configure:4718: checking whether getenv must be declared" >&5
4718 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4719 echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721 cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
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
4739 int main() {
4740 char *(*pfn) = (char *(*)) getenv
4741 ; return 0; }
4743 if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4744 rm -rf conftest*
4745 bfd_cv_decl_needed_getenv=no
4746 else
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 rm -rf conftest*
4750 bfd_cv_decl_needed_getenv=yes
4752 rm -f conftest*
4755 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4756 if test $bfd_cv_decl_needed_getenv = yes; then
4757 cat >> confdefs.h <<\EOF
4758 #define NEED_DECLARATION_GETENV 1
4764 # If we are configured native, pick a core file support file.
4765 COREFILE=
4766 COREFLAG=
4767 TRAD_HEADER=
4768 if test "${target}" = "${host}"; then
4769 case "${host}" in
4770 alpha*-*-linux-gnu*)
4771 COREFILE=trad-core.lo
4772 TRAD_HEADER='"hosts/alphalinux.h"'
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"'
4786 i[3456]86-sequent-sysv4*) ;;
4787 i[3456]86-sequent-sysv*)
4788 COREFILE=trad-core.lo
4789 TRAD_HEADER='"hosts/symmetry.h"'
4791 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
4792 COREFILE=trad-core.lo
4793 TRAD_HEADER='"hosts/i386bsd.h"'
4795 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
4796 COREFILE=netbsd-core.lo
4798 i[3456]86-esix-sysv3*)
4799 COREFILE=trad-core.lo
4800 TRAD_HEADER='"hosts/esix.h"'
4802 i[3456]86-*-sco3.2v5*)
4803 COREFILE=sco5-core.lo
4805 i[3456]86-*-sco* | i[3456]86-*-isc*)
4806 COREFILE=trad-core.lo
4807 TRAD_HEADER='"hosts/i386sco.h"'
4809 i[3456]86-*-mach3*)
4810 COREFILE=trad-core.lo
4811 TRAD_HEADER='"hosts/i386mach3.h"'
4813 i[3456]86-*-linux-gnu*)
4814 COREFILE=trad-core.lo
4815 TRAD_HEADER='"hosts/i386linux.h"'
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"'
4823 mips-dec-bsd*)
4824 COREFILE=trad-core.lo
4825 TRAD_HEADER='"hosts/mipsbsd.h"'
4827 mips-dec-mach3*)
4828 COREFILE=trad-core.lo
4829 TRAD_HEADER='"hosts/mipsmach3.h"'
4831 mips-*-netbsd* | mips*-*-openbsd*)
4832 COREFILE=netbsd-core.lo
4834 mips-dec-*)
4835 COREFILE=trad-core.lo
4836 TRAD_HEADER='"hosts/decstation.h"'
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"'
4845 mips-*-sysv4*) ;;
4846 mips-*-sysv* | mips-*-riscos*)
4847 COREFILE=trad-core.lo
4848 TRAD_HEADER='"hosts/riscos.h"'
4850 mips-sony-bsd*)
4851 COREFILE=trad-core.lo
4852 TRAD_HEADER='"hosts/news-mips.h"'
4854 m68*-bull*-sysv*)
4855 COREFILE=trad-core.lo
4856 TRAD_HEADER='"hosts/dpx2.h"'
4858 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
4859 m68*-hp-bsd*)
4860 COREFILE=trad-core.lo
4861 TRAD_HEADER='"hosts/hp300bsd.h"'
4863 m68*-*-linux-gnu*)
4864 COREFILE=trad-core.lo
4865 TRAD_HEADER='"hosts/m68klinux.h"'
4867 m68*-motorola-sysv*)
4868 COREFILE=trad-core.lo
4869 TRAD_HEADER='"hosts/delta68.h"'
4871 m68*-sony-*)
4872 COREFILE=trad-core.lo
4873 TRAD_HEADER='"hosts/news.h"'
4875 m68*-*-netbsd* | m68*-*-openbsd*)
4876 COREFILE=netbsd-core.lo
4878 m68*-apple-aux*)
4879 COREFILE=trad-core.lo
4880 TRAD_HEADER='"hosts/m68kaux.h"'
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"'
4888 ns32k-pc532-mach)
4889 COREFILE=trad-core.lo
4890 TRAD_HEADER='"hosts/pc532mach.h"'
4892 ns32k-*-netbsd* | ns32k-*-openbsd*)
4893 COREFILE=netbsd-core.lo
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
4906 tahoe-*-*)
4907 COREFILE=trad-core.lo
4908 TRAD_HEADER='"hosts/tahoe.h"'
4910 vax-*-ultrix2*)
4911 COREFILE=trad-core.lo
4912 TRAD_HEADER='"hosts/vaxult2.h"'
4914 vax-*-ultrix*)
4915 COREFILE=trad-core.lo
4916 TRAD_HEADER='"hosts/vaxult2.h"'
4918 vax-*-*)
4919 COREFILE=trad-core.lo
4920 TRAD_HEADER='"hosts/vaxbsd.h"'
4922 esac
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
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
4942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4944 echo "configure:4945: checking for $ac_hdr" >&5
4945 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4946 echo $ac_n "(cached) $ac_c" 1>&6
4947 else
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 #include <$ac_hdr>
4953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4954 { (eval echo configure:4955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4956 if test -z "$ac_err"; then
4957 rm -rf conftest*
4958 eval "ac_cv_header_$ac_safe=yes"
4959 else
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"
4966 rm -f conftest*
4968 if 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
4975 else
4976 echo "$ac_t""no" 1>&6
4978 done
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
4982 echo "configure:4983: checking for prstatus_t in sys/procfs.h" >&5
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
4985 else
4986 cat > conftest.$ac_ext <<EOF
4987 #line 4988 "configure"
4988 #include "confdefs.h"
4989 #include <sys/procfs.h>
4990 int main() {
4991 prstatus_t avar
4992 ; return 0; }
4994 if { (eval echo configure:4995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4995 rm -rf conftest*
4996 bfd_cv_have_sys_procfs_type_prstatus_t=yes
4997 else
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
5004 rm -f conftest*
5007 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
5008 cat >> confdefs.h <<\EOF
5009 #define HAVE_PRSTATUS_T 1
5013 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
5015 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
5016 echo "configure:5017: checking for prstatus_t.pr_who in sys/procfs.h" >&5
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
5019 else
5020 cat > conftest.$ac_ext <<EOF
5021 #line 5022 "configure"
5022 #include "confdefs.h"
5023 #include <sys/procfs.h>
5024 int main() {
5025 prstatus_t avar; void* aref = (void*) &avar.pr_who
5026 ; return 0; }
5028 if { (eval echo configure:5029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5029 rm -rf conftest*
5030 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
5031 else
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
5038 rm -f conftest*
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
5047 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
5049 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5050 echo "configure:5051: checking for pstatus_t in sys/procfs.h" >&5
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
5053 else
5054 cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057 #include <sys/procfs.h>
5058 int main() {
5059 pstatus_t avar
5060 ; return 0; }
5062 if { (eval echo configure:5063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5063 rm -rf conftest*
5064 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5065 else
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
5072 rm -f conftest*
5075 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5076 cat >> confdefs.h <<\EOF
5077 #define HAVE_PSTATUS_T 1
5081 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5083 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
5084 echo "configure:5085: checking for prpsinfo_t in sys/procfs.h" >&5
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
5087 else
5088 cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091 #include <sys/procfs.h>
5092 int main() {
5093 prpsinfo_t avar
5094 ; return 0; }
5096 if { (eval echo configure:5097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5097 rm -rf conftest*
5098 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
5099 else
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
5106 rm -f conftest*
5109 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
5110 cat >> confdefs.h <<\EOF
5111 #define HAVE_PRPSINFO_T 1
5115 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
5117 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
5118 echo "configure:5119: checking for psinfo_t in sys/procfs.h" >&5
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
5121 else
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5125 #include <sys/procfs.h>
5126 int main() {
5127 psinfo_t avar
5128 ; return 0; }
5130 if { (eval echo configure:5131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5131 rm -rf conftest*
5132 bfd_cv_have_sys_procfs_type_psinfo_t=yes
5133 else
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
5140 rm -f conftest*
5143 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
5144 cat >> confdefs.h <<\EOF
5145 #define HAVE_PSINFO_T 1
5149 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
5151 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
5152 echo "configure:5153: checking for lwpstatus_t in sys/procfs.h" >&5
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
5155 else
5156 cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159 #include <sys/procfs.h>
5160 int main() {
5161 lwpstatus_t avar
5162 ; return 0; }
5164 if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5165 rm -rf conftest*
5166 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
5167 else
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
5174 rm -f conftest*
5177 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
5178 cat >> confdefs.h <<\EOF
5179 #define HAVE_LWPSTATUS_T 1
5183 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
5185 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
5186 echo "configure:5187: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
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
5189 else
5190 cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 #include <sys/procfs.h>
5194 int main() {
5195 lwpstatus_t avar; void* aref = (void*) &avar.pr_context
5196 ; return 0; }
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199 rm -rf conftest*
5200 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
5201 else
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
5208 rm -f conftest*
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
5217 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
5219 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
5220 echo "configure:5221: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
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
5223 else
5224 cat > conftest.$ac_ext <<EOF
5225 #line 5226 "configure"
5226 #include "confdefs.h"
5227 #include <sys/procfs.h>
5228 int main() {
5229 lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
5230 ; return 0; }
5232 if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5233 rm -rf conftest*
5234 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
5235 else
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
5242 rm -f conftest*
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
5251 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
5257 cat >> confdefs.h <<EOF
5258 #define TRAD_HEADER $TRAD_HEADER
5262 # Horrible hacks to build DLLs on Windows.
5263 WIN32LDFLAGS=
5264 WIN32LIBADD=
5265 case "${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"
5272 esac
5276 # target stuff:
5278 # Canonicalize the secondary target names.
5279 if test -n "$enable_targets" ; then
5280 for targ in `echo $enable_targets | sed 's/,/ /g'`
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"
5289 done
5292 all_targets=false
5293 defvec=
5294 selvecs=
5295 selarchs=
5296 TDEFINES=
5297 for targ in $target $canon_targets
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
5306 selvecs="$selvecs $targ_defvec $targ_selvecs"
5307 selarchs="$selarchs $targ_archs"
5308 TDEFINES="$TDEFINES $targ_cflags"
5310 done
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.
5320 # uniq the default and selected vectors in all the configured targets.
5321 f=""
5322 for i in $selvecs ; do
5323 case " $f " in
5324 *" $i "*) ;;
5325 *) f="$f $i" ;;
5326 esac
5327 done
5328 selvecs="$f"
5331 # uniq the architectures in all the configured targets.
5332 f=""
5333 for i in $selarchs ; do
5334 case " $f " in
5335 *" $i "*) ;;
5336 *) f="$f $i" ;;
5337 esac
5338 done
5339 selarchs="$f"
5341 # Target backend .o files.
5344 elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
5346 for vec in $selvecs
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 " ;;
5355 armpe_little_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
5356 armpe_big_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
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" ;;
5389 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
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" ;;
5502 "") ;;
5503 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
5504 esac
5505 done
5507 # Target architecture .o files.
5508 # A couple of CPUs use shorter file names to avoid problems on DOS
5509 # filesystems.
5510 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
5512 # Weed out duplicate .o files.
5513 f=""
5514 for i in $tb ; do
5515 case " $f " in
5516 *" $i "*) ;;
5517 *) f="$f $i" ;;
5518 esac
5519 done
5520 tb="$f"
5522 f=""
5523 for i in $ta ; do
5524 case " $f " in
5525 *" $i "*) ;;
5526 *) f="$f $i" ;;
5527 esac
5528 done
5529 ta="$f"
5531 bfd_backends="$tb"
5532 bfd_machines="$ta"
5534 if 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=
5540 else # 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'`
5549 fi # all_targets is true
5551 case ${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
5560 false-false-false)
5561 wordsize=32
5562 all_backends='$(BFD32_BACKENDS)'
5564 esac
5571 tdefaults=""
5572 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
5573 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
5574 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
5575 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
5578 for ac_hdr in unistd.h
5580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5582 echo "configure:5583: checking for $ac_hdr" >&5
5583 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5584 echo $ac_n "(cached) $ac_c" 1>&6
5585 else
5586 cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 #include <$ac_hdr>
5591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5592 { (eval echo configure:5593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5594 if test -z "$ac_err"; then
5595 rm -rf conftest*
5596 eval "ac_cv_header_$ac_safe=yes"
5597 else
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"
5604 rm -f conftest*
5606 if 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
5613 else
5614 echo "$ac_t""no" 1>&6
5616 done
5618 for ac_func in getpagesize
5620 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5621 echo "configure:5622: checking for $ac_func" >&5
5622 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5623 echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625 cat > conftest.$ac_ext <<EOF
5626 #line 5627 "configure"
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. */
5634 char $ac_func();
5636 int main() {
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)
5642 choke me
5643 #else
5644 $ac_func();
5645 #endif
5647 ; return 0; }
5649 if { (eval echo configure:5650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5650 rm -rf conftest*
5651 eval "ac_cv_func_$ac_func=yes"
5652 else
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"
5658 rm -f conftest*
5661 if 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
5668 else
5669 echo "$ac_t""no" 1>&6
5671 done
5673 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5674 echo "configure:5675: checking for working mmap" >&5
5675 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5676 echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678 if test "$cross_compiling" = yes; then
5679 ac_cv_func_mmap_fixed_mapped=no
5680 else
5681 cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
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.
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>
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
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
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 */
5749 #endif /* no HAVE_GETPAGESIZE */
5751 #ifdef __cplusplus
5752 extern "C" { void *malloc(unsigned); }
5753 #else
5754 char *malloc();
5755 #endif
5758 main()
5760 char *data, *data2, *data3;
5761 int i, pagesize;
5762 int fd;
5764 pagesize = getpagesize();
5767 * First, make a file with some known garbage in it.
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);
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.
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);
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.)
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);
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5823 then
5824 ac_cv_func_mmap_fixed_mapped=yes
5825 else
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
5831 rm -fr conftest*
5836 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5837 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5838 cat >> confdefs.h <<\EOF
5839 #define HAVE_MMAP 1
5844 for ac_func in madvise mprotect
5846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5847 echo "configure:5848: checking for $ac_func" >&5
5848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5849 echo $ac_n "(cached) $ac_c" 1>&6
5850 else
5851 cat > conftest.$ac_ext <<EOF
5852 #line 5853 "configure"
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. */
5860 char $ac_func();
5862 int main() {
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)
5868 choke me
5869 #else
5870 $ac_func();
5871 #endif
5873 ; return 0; }
5875 if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5876 rm -rf conftest*
5877 eval "ac_cv_func_$ac_func=yes"
5878 else
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"
5884 rm -f conftest*
5887 if 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
5894 else
5895 echo "$ac_t""no" 1>&6
5897 done
5899 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
5900 true+yes ) cat >> confdefs.h <<\EOF
5901 #define USE_MMAP 1
5904 esac
5906 rm -f doc/config.status
5907 trap '' 1 2 15
5908 cat > 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.
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.
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"
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'
5942 esac >> confcache
5943 if cmp -s $cache_file confcache; then
5945 else
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"
5953 rm -f confcache
5955 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5957 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5958 # Let make expand exec_prefix.
5959 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
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.
5964 if test "x$srcdir" = x.; then
5965 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5968 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5970 DEFS=-DHAVE_CONFIG_H
5972 # Without the "./", some shells look in PATH for config.status.
5973 : ${CONFIG_STATUS=./config.status}
5975 echo creating $CONFIG_STATUS
5976 rm -f $CONFIG_STATUS
5977 cat > $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`:
5984 # $0 $ac_configure_args
5986 # Compiler output produced by configure, useful for debugging
5987 # configure, is in ./config.log if it exists.
5989 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5990 for ac_option
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
6003 done
6005 ac_given_srcdir=$srcdir
6006 ac_given_INSTALL="$INSTALL"
6008 trap '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
6010 cat >> $CONFIG_STATUS <<EOF
6012 # Protect against being on the right side of a sed subst in config.status.
6013 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6014 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6015 $ac_vpsub
6016 $extrasub
6017 s%@SHELL@%$SHELL%g
6018 s%@CFLAGS@%$CFLAGS%g
6019 s%@CPPFLAGS@%$CPPFLAGS%g
6020 s%@CXXFLAGS@%$CXXFLAGS%g
6021 s%@FFLAGS@%$FFLAGS%g
6022 s%@DEFS@%$DEFS%g
6023 s%@LDFLAGS@%$LDFLAGS%g
6024 s%@LIBS@%$LIBS%g
6025 s%@exec_prefix@%$exec_prefix%g
6026 s%@prefix@%$prefix%g
6027 s%@program_transform_name@%$program_transform_name%g
6028 s%@bindir@%$bindir%g
6029 s%@sbindir@%$sbindir%g
6030 s%@libexecdir@%$libexecdir%g
6031 s%@datadir@%$datadir%g
6032 s%@sysconfdir@%$sysconfdir%g
6033 s%@sharedstatedir@%$sharedstatedir%g
6034 s%@localstatedir@%$localstatedir%g
6035 s%@libdir@%$libdir%g
6036 s%@includedir@%$includedir%g
6037 s%@oldincludedir@%$oldincludedir%g
6038 s%@infodir@%$infodir%g
6039 s%@mandir@%$mandir%g
6040 s%@host@%$host%g
6041 s%@host_alias@%$host_alias%g
6042 s%@host_cpu@%$host_cpu%g
6043 s%@host_vendor@%$host_vendor%g
6044 s%@host_os@%$host_os%g
6045 s%@target@%$target%g
6046 s%@target_alias@%$target_alias%g
6047 s%@target_cpu@%$target_cpu%g
6048 s%@target_vendor@%$target_vendor%g
6049 s%@target_os@%$target_os%g
6050 s%@build@%$build%g
6051 s%@build_alias@%$build_alias%g
6052 s%@build_cpu@%$build_cpu%g
6053 s%@build_vendor@%$build_vendor%g
6054 s%@build_os@%$build_os%g
6055 s%@CC@%$CC%g
6056 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6057 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6058 s%@INSTALL_DATA@%$INSTALL_DATA%g
6059 s%@PACKAGE@%$PACKAGE%g
6060 s%@VERSION@%$VERSION%g
6061 s%@ACLOCAL@%$ACLOCAL%g
6062 s%@AUTOCONF@%$AUTOCONF%g
6063 s%@AUTOMAKE@%$AUTOMAKE%g
6064 s%@AUTOHEADER@%$AUTOHEADER%g
6065 s%@MAKEINFO@%$MAKEINFO%g
6066 s%@SET_MAKE@%$SET_MAKE%g
6067 s%@AR@%$AR%g
6068 s%@RANLIB@%$RANLIB%g
6069 s%@LD@%$LD%g
6070 s%@NM@%$NM%g
6071 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
6072 s%@LN_S@%$LN_S%g
6073 s%@DLLTOOL@%$DLLTOOL%g
6074 s%@AS@%$AS%g
6075 s%@LIBTOOL@%$LIBTOOL%g
6076 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6077 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6078 s%@MAINT@%$MAINT%g
6079 s%@EXEEXT@%$EXEEXT%g
6080 s%@CPP@%$CPP%g
6081 s%@ALLOCA@%$ALLOCA%g
6082 s%@USE_NLS@%$USE_NLS%g
6083 s%@MSGFMT@%$MSGFMT%g
6084 s%@GMSGFMT@%$GMSGFMT%g
6085 s%@XGETTEXT@%$XGETTEXT%g
6086 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6087 s%@CATALOGS@%$CATALOGS%g
6088 s%@CATOBJEXT@%$CATOBJEXT%g
6089 s%@DATADIRNAME@%$DATADIRNAME%g
6090 s%@GMOFILES@%$GMOFILES%g
6091 s%@INSTOBJEXT@%$INSTOBJEXT%g
6092 s%@INTLDEPS@%$INTLDEPS%g
6093 s%@INTLLIBS@%$INTLLIBS%g
6094 s%@INTLOBJS@%$INTLOBJS%g
6095 s%@POFILES@%$POFILES%g
6096 s%@POSUB@%$POSUB%g
6097 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6098 s%@GT_NO@%$GT_NO%g
6099 s%@GT_YES@%$GT_YES%g
6100 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6101 s%@l@%$l%g
6102 s%@HDEFINES@%$HDEFINES%g
6103 s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
6104 s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
6105 s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
6106 s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
6107 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
6108 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
6109 s%@COREFILE@%$COREFILE%g
6110 s%@COREFLAG@%$COREFLAG%g
6111 s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
6112 s%@WIN32LIBADD@%$WIN32LIBADD%g
6113 s%@TDEFINES@%$TDEFINES%g
6114 s%@wordsize@%$wordsize%g
6115 s%@all_backends@%$all_backends%g
6116 s%@bfd_backends@%$bfd_backends%g
6117 s%@bfd_machines@%$bfd_machines%g
6118 s%@tdefaults@%$tdefaults%g
6120 CEOF
6123 cat >> $CONFIG_STATUS <<\EOF
6125 # Split the substitutions into bite-sized pieces for seds with
6126 # small command number limits, like on Digital OSF/1 and HP-UX.
6127 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6128 ac_file=1 # Number of current file.
6129 ac_beg=1 # First line for current file.
6130 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6131 ac_more_lines=:
6132 ac_sed_cmds=""
6133 while $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
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"
6148 ac_file=`expr $ac_file + 1`
6149 ac_beg=$ac_end
6150 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6152 done
6153 if test -z "$ac_sed_cmds"; then
6154 ac_sed_cmds=cat
6158 cat >> $CONFIG_STATUS <<EOF
6160 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
6162 cat >> $CONFIG_STATUS <<\EOF
6163 for 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
6171 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
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=
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
6195 case "$ac_given_INSTALL" in
6196 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6197 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6198 esac
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
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
6211 s%@configure_input@%$configure_input%g
6212 s%@srcdir@%$srcdir%g
6213 s%@top_srcdir@%$top_srcdir%g
6214 s%@INSTALL@%$INSTALL%g
6215 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6216 fi; done
6217 rm -f conftest.s*
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.
6222 # ac_d sets the value in "#define NAME VALUE" lines.
6223 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6224 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6225 ac_dC='\3'
6226 ac_dD='%g'
6227 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6228 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6229 ac_uB='\([ ]\)%\1#\2define\3'
6230 ac_uC=' '
6231 ac_uD='\4%g'
6232 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6233 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6234 ac_eB='$%\1#\2define\3'
6235 ac_eC=' '
6236 ac_eD='%g'
6238 if test "${CONFIG_HEADERS+set}" != set; then
6240 cat >> $CONFIG_STATUS <<EOF
6241 CONFIG_HEADERS="config.h:config.in"
6243 cat >> $CONFIG_STATUS <<\EOF
6245 for 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
6253 echo creating $ac_file
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
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.
6265 rm -f conftest.vals
6266 cat > conftest.hdr <<\EOF
6267 s/[\\&%]/\\&/g
6268 s%[\\$`]%\\&%g
6269 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6270 s%ac_d%ac_u%gp
6271 s%ac_u%ac_e%gp
6273 sed -n -f conftest.hdr confdefs.h > conftest.vals
6274 rm -f conftest.hdr
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.
6279 cat >> conftest.vals <<\EOF
6280 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
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.
6286 rm -f conftest.tail
6287 while :
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
6303 done
6304 rm -f conftest.vals
6306 cat >> $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"
6321 rm -f $ac_file
6322 mv conftest.h $ac_file
6324 fi; done
6327 cat >> $CONFIG_STATUS <<EOF
6331 cat >> $CONFIG_STATUS <<\EOF
6332 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6333 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6334 exit 0
6336 chmod +x $CONFIG_STATUS
6337 rm -fr confdefs* $ac_clean_files
6338 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1