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