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