Add IBM 370 support.
[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 force libtool not to do file locking"
24 ac_help="$ac_help
25 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
26 ac_help="$ac_help
27 --enable-targets alternative target configurations"
28 ac_help="$ac_help
29 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
30 ac_help="$ac_help
31 --with-mmap try using mmap for BFD input files if available"
32 ac_help="$ac_help
33 --enable-maintainer-mode enable make rules and dependencies not useful
34 (and sometimes confusing) to the casual installer"
35 ac_help="$ac_help
36 --disable-nls do not use Native Language Support"
37 ac_help="$ac_help
38 --with-included-gettext use the GNU gettext library included here"
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}:"
1450 for ac_dir in $PATH; do
1451 test -z "$ac_dir" && ac_dir=.
1452 if test -f "$ac_dir/$ac_prog"; 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
1478 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1479 echo "configure:1480: checking if the linker ($LD) is GNU ld" >&5
1480 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
1481 echo $ac_n "(cached) $ac_c" 1>&6
1482 else
1483 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1484 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1485 ac_cv_prog_gnu_ld=yes
1486 else
1487 ac_cv_prog_gnu_ld=no
1488 fi
1489 fi
1490
1491 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1492
1493
1494 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1495 echo "configure:1496: checking for BSD-compatible nm" >&5
1496 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
1497 echo $ac_n "(cached) $ac_c" 1>&6
1498 else
1499 if test -n "$NM"; then
1500 # Let the user override the test.
1501 ac_cv_path_NM="$NM"
1502 else
1503 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1504 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1505 test -z "$ac_dir" && ac_dir=.
1506 if test -f $ac_dir/nm; then
1507 # Check to see if the nm accepts a BSD-compat flag.
1508 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1509 # nm: unknown option "B" ignored
1510 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1511 ac_cv_path_NM="$ac_dir/nm -B"
1512 break
1513 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1514 ac_cv_path_NM="$ac_dir/nm -p"
1515 break
1516 else
1517 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1518 continue # so that we can try to find one that supports BSD flags
1519 fi
1520 fi
1521 done
1522 IFS="$ac_save_ifs"
1523 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1524 fi
1525 fi
1526
1527 NM="$ac_cv_path_NM"
1528 echo "$ac_t""$NM" 1>&6
1529
1530
1531 # Check for command to grab the raw symbol name followed by C symbol from nm.
1532 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1533 echo "configure:1534: checking command to parse $NM output" >&5
1534 if eval "test \"\${ac_cv_sys_global_symbol_pipe+set}\" = set"; then
1535 echo $ac_n "(cached) $ac_c" 1>&6
1536 else
1537 # These are sane defaults that work on at least a few old systems.
1538 # {They come from Ultrix. What could be older than Ultrix?!! ;)}
1539
1540 # Character class describing NM global symbol codes.
1541 ac_symcode='[BCDEGRST]'
1542
1543 # Regexp to match symbols that can be accessed directly from C.
1544 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1545
1546 # Transform the above into a raw symbol and a C symbol.
1547 ac_symxfrm='\1 \2\3 \3'
1548
1549 # Transform an extracted symbol line into a proper C declaration
1550 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1551
1552 # Define system-specific variables.
1553 case "$host_os" in
1554 aix*)
1555 ac_symcode='[BCDT]'
1556 ;;
1557 cygwin* | mingw*)
1558 ac_symcode='[ABCDGISTW]'
1559 ;;
1560 hpux*)
1561 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1562 ;;
1563 irix*)
1564 ac_symcode='[BCDEGRST]'
1565 ;;
1566 solaris*)
1567 ac_symcode='[BDT]'
1568 ;;
1569 esac
1570
1571 # If we're using GNU nm, then use its standard symbol codes.
1572 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1573 ac_symcode='[ABCDGISTW]'
1574 fi
1575
1576 # Try without a prefix undercore, then with it.
1577 for ac_symprfx in "" "_"; do
1578
1579 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
1580
1581 # Check to see that the pipe works correctly.
1582 ac_pipe_works=no
1583 rm -f conftest.$ac_ext
1584 cat > conftest.$ac_ext <<EOF
1585 #ifdef __cplusplus
1586 extern "C" {
1587 #endif
1588 char nm_test_var;
1589 void nm_test_func(){}
1590 #ifdef __cplusplus
1591 }
1592 #endif
1593 int main(){nm_test_var='a';nm_test_func;return 0;}
1594 EOF
1595
1596 if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597 # Now try to grab the symbols.
1598 ac_nlist=conftest.nm
1599
1600 if { (eval echo configure:1601: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1601
1602 # Try sorting and uniquifying the output.
1603 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
1604 mv -f "$ac_nlist"T "$ac_nlist"
1605 else
1606 rm -f "$ac_nlist"T
1607 fi
1608
1609 # Make sure that we snagged all the symbols we need.
1610 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
1611 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
1612 cat <<EOF > conftest.c
1613 #ifdef __cplusplus
1614 extern "C" {
1615 #endif
1616
1617 EOF
1618 # Now generate the symbol file.
1619 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
1620
1621 cat <<EOF >> conftest.c
1622 #if defined (__STDC__) && __STDC__
1623 # define lt_ptr_t void *
1624 #else
1625 # define lt_ptr_t char *
1626 # define const
1627 #endif
1628
1629 /* The mapping between symbol names and symbols. */
1630 const struct {
1631 const char *name;
1632 lt_ptr_t address;
1633 }
1634 lt_preloaded_symbols[] =
1635 {
1636 EOF
1637 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1638 cat <<\EOF >> conftest.c
1639 {0, (lt_ptr_t) 0}
1640 };
1641
1642 #ifdef __cplusplus
1643 }
1644 #endif
1645 EOF
1646 # Now try linking the two files.
1647 mv conftest.$ac_objext conftestm.$ac_objext
1648 ac_save_LIBS="$LIBS"
1649 ac_save_CFLAGS="$CFLAGS"
1650 LIBS="conftestm.$ac_objext"
1651 CFLAGS="$CFLAGS$no_builtin_flag"
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1653 ac_pipe_works=yes
1654 else
1655 echo "configure: failed program was:" >&5
1656 cat conftest.c >&5
1657 fi
1658 LIBS="$ac_save_LIBS"
1659 CFLAGS="$ac_save_CFLAGS"
1660 else
1661 echo "cannot find nm_test_func in $ac_nlist" >&5
1662 fi
1663 else
1664 echo "cannot find nm_test_var in $ac_nlist" >&5
1665 fi
1666 else
1667 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
1668 fi
1669 else
1670 echo "$progname: failed program was:" >&5
1671 cat conftest.c >&5
1672 fi
1673 rm -rf conftest*
1674
1675 # Do not use the global_symbol_pipe unless it works.
1676 if test "$ac_pipe_works" = yes; then
1677 if test x"$ac_symprfx" = x"_"; then
1678 ac_cv_sys_symbol_underscore=yes
1679 else
1680 ac_cv_sys_symbol_underscore=no
1681 fi
1682 break
1683 else
1684 ac_cv_sys_global_symbol_pipe=
1685 fi
1686 done
1687
1688 fi
1689
1690
1691 ac_result=yes
1692 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1693 ac_result=no
1694 fi
1695 echo "$ac_t""$ac_result" 1>&6
1696
1697 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
1698 echo "configure:1699: checking for _ prefix in compiled symbols" >&5
1699 if eval "test \"\${ac_cv_sys_symbol_underscore+set}\" = set"; then
1700 echo $ac_n "(cached) $ac_c" 1>&6
1701 else
1702 ac_cv_sys_symbol_underscore=no
1703 cat > conftest.$ac_ext <<EOF
1704 void nm_test_func(){}
1705 int main(){nm_test_func;return 0;}
1706 EOF
1707 if { (eval echo configure:1708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1708 # Now try to grab the symbols.
1709 ac_nlist=conftest.nm
1710 if { (eval echo configure:1711: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1711 # See whether the symbols have a leading underscore.
1712 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1713 ac_cv_sys_symbol_underscore=yes
1714 else
1715 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1716 :
1717 else
1718 echo "configure: cannot find nm_test_func in $ac_nlist" >&5
1719 fi
1720 fi
1721 else
1722 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
1723 fi
1724 else
1725 echo "configure: failed program was:" >&5
1726 cat conftest.c >&5
1727 fi
1728 rm -rf conftest*
1729
1730 fi
1731
1732 echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
1733 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
1734
1735 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1736 echo "configure:1737: checking whether ln -s works" >&5
1737 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740 rm -f conftestdata
1741 if ln -s X conftestdata 2>/dev/null
1742 then
1743 rm -f conftestdata
1744 ac_cv_prog_LN_S="ln -s"
1745 else
1746 ac_cv_prog_LN_S=ln
1747 fi
1748 fi
1749 LN_S="$ac_cv_prog_LN_S"
1750 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1751 echo "$ac_t""yes" 1>&6
1752 else
1753 echo "$ac_t""no" 1>&6
1754 fi
1755
1756
1757 # Check for any special flags to pass to ltconfig.
1758 libtool_flags="--cache-file=$cache_file"
1759 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1760 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1761 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1762 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
1763 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1764 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1765 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1766
1767 # Some flags need to be propagated to the compiler or linker for good
1768 # libtool support.
1769 case "$host" in
1770 *-*-irix6*)
1771 # Find out which ABI we are using.
1772 echo '#line 1773 "configure"' > conftest.$ac_ext
1773 if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1774 case "`/usr/bin/file conftest.o`" in
1775 *32-bit*)
1776 LD="${LD-ld} -32"
1777 ;;
1778 *N32*)
1779 LD="${LD-ld} -n32"
1780 ;;
1781 *64-bit*)
1782 LD="${LD-ld} -64"
1783 ;;
1784 esac
1785 fi
1786 rm -rf conftest*
1787 ;;
1788
1789 *-*-sco3.2v5*)
1790 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1791 SAVE_CFLAGS="$CFLAGS"
1792 CFLAGS="$CFLAGS -belf"
1793 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1794 echo "configure:1795: checking whether the C compiler needs -belf" >&5
1795 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
1796 echo $ac_n "(cached) $ac_c" 1>&6
1797 else
1798 cat > conftest.$ac_ext <<EOF
1799 #line 1800 "configure"
1800 #include "confdefs.h"
1801
1802 int main() {
1803
1804 ; return 0; }
1805 EOF
1806 if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1807 rm -rf conftest*
1808 lt_cv_cc_needs_belf=yes
1809 else
1810 echo "configure: failed program was:" >&5
1811 cat conftest.$ac_ext >&5
1812 rm -rf conftest*
1813 lt_cv_cc_needs_belf=no
1814 fi
1815 rm -f conftest*
1816 fi
1817
1818 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1819 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1820 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1821 CFLAGS="$SAVE_CFLAGS"
1822 fi
1823 ;;
1824
1825 *-*-cygwin*)
1826 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1827 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1829 echo "configure:1830: checking for $ac_word" >&5
1830 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1832 else
1833 if test -n "$DLLTOOL"; then
1834 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1835 else
1836 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1837 ac_dummy="$PATH"
1838 for ac_dir in $ac_dummy; do
1839 test -z "$ac_dir" && ac_dir=.
1840 if test -f $ac_dir/$ac_word; then
1841 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1842 break
1843 fi
1844 done
1845 IFS="$ac_save_ifs"
1846 fi
1847 fi
1848 DLLTOOL="$ac_cv_prog_DLLTOOL"
1849 if test -n "$DLLTOOL"; then
1850 echo "$ac_t""$DLLTOOL" 1>&6
1851 else
1852 echo "$ac_t""no" 1>&6
1853 fi
1854
1855
1856 if test -z "$ac_cv_prog_DLLTOOL"; then
1857 if test -n "$ac_tool_prefix"; then
1858 # Extract the first word of "dlltool", so it can be a program name with args.
1859 set dummy dlltool; ac_word=$2
1860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1861 echo "configure:1862: checking for $ac_word" >&5
1862 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
1863 echo $ac_n "(cached) $ac_c" 1>&6
1864 else
1865 if test -n "$DLLTOOL"; then
1866 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1867 else
1868 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1869 ac_dummy="$PATH"
1870 for ac_dir in $ac_dummy; do
1871 test -z "$ac_dir" && ac_dir=.
1872 if test -f $ac_dir/$ac_word; then
1873 ac_cv_prog_DLLTOOL="dlltool"
1874 break
1875 fi
1876 done
1877 IFS="$ac_save_ifs"
1878 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1879 fi
1880 fi
1881 DLLTOOL="$ac_cv_prog_DLLTOOL"
1882 if test -n "$DLLTOOL"; then
1883 echo "$ac_t""$DLLTOOL" 1>&6
1884 else
1885 echo "$ac_t""no" 1>&6
1886 fi
1887
1888 else
1889 DLLTOOL="false"
1890 fi
1891 fi
1892
1893 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1894 set dummy ${ac_tool_prefix}as; ac_word=$2
1895 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1896 echo "configure:1897: checking for $ac_word" >&5
1897 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1899 else
1900 if test -n "$AS"; then
1901 ac_cv_prog_AS="$AS" # Let the user override the test.
1902 else
1903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1904 ac_dummy="$PATH"
1905 for ac_dir in $ac_dummy; do
1906 test -z "$ac_dir" && ac_dir=.
1907 if test -f $ac_dir/$ac_word; then
1908 ac_cv_prog_AS="${ac_tool_prefix}as"
1909 break
1910 fi
1911 done
1912 IFS="$ac_save_ifs"
1913 fi
1914 fi
1915 AS="$ac_cv_prog_AS"
1916 if test -n "$AS"; then
1917 echo "$ac_t""$AS" 1>&6
1918 else
1919 echo "$ac_t""no" 1>&6
1920 fi
1921
1922
1923 if test -z "$ac_cv_prog_AS"; then
1924 if test -n "$ac_tool_prefix"; then
1925 # Extract the first word of "as", so it can be a program name with args.
1926 set dummy as; ac_word=$2
1927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1928 echo "configure:1929: checking for $ac_word" >&5
1929 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932 if test -n "$AS"; then
1933 ac_cv_prog_AS="$AS" # Let the user override the test.
1934 else
1935 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1936 ac_dummy="$PATH"
1937 for ac_dir in $ac_dummy; do
1938 test -z "$ac_dir" && ac_dir=.
1939 if test -f $ac_dir/$ac_word; then
1940 ac_cv_prog_AS="as"
1941 break
1942 fi
1943 done
1944 IFS="$ac_save_ifs"
1945 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1946 fi
1947 fi
1948 AS="$ac_cv_prog_AS"
1949 if test -n "$AS"; then
1950 echo "$ac_t""$AS" 1>&6
1951 else
1952 echo "$ac_t""no" 1>&6
1953 fi
1954
1955 else
1956 AS="false"
1957 fi
1958 fi
1959
1960
1961 ;;
1962
1963 esac
1964
1965 # enable the --disable-libtool-lock switch
1966
1967 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1968 if test "${enable_libtool_lock+set}" = set; then
1969 enableval="$enable_libtool_lock"
1970 need_locks=$enableval
1971 else
1972 need_locks=yes
1973 fi
1974
1975
1976 if test x"$need_locks" = xno; then
1977 libtool_flags="$libtool_flags --disable-lock"
1978 fi
1979
1980
1981 # Save cache, so that ltconfig can load it
1982 cat > confcache <<\EOF
1983 # This file is a shell script that caches the results of configure
1984 # tests run on this system so they can be shared between configure
1985 # scripts and configure runs. It is not useful on other systems.
1986 # If it contains results you don't want to keep, you may remove or edit it.
1987 #
1988 # By default, configure uses ./config.cache as the cache file,
1989 # creating it if it does not exist already. You can give configure
1990 # the --cache-file=FILE option to use a different cache file; that is
1991 # what configure does when it calls configure scripts in
1992 # subdirectories, so they share the cache.
1993 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1994 # config.status only pays attention to the cache file if you give it the
1995 # --recheck option to rerun configure.
1996 #
1997 EOF
1998 # The following way of writing the cache mishandles newlines in values,
1999 # but we know of no workaround that is simple, portable, and efficient.
2000 # So, don't put newlines in cache variables' values.
2001 # Ultrix sh set writes to stderr and can't be redirected directly,
2002 # and sets the high bit in the cache file unless we assign to the vars.
2003 (set) 2>&1 |
2004 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2005 *ac_space=\ *)
2006 # `set' does not quote correctly, so add quotes (double-quote substitution
2007 # turns \\\\ into \\, and sed turns \\ into \).
2008 sed -n \
2009 -e "s/'/'\\\\''/g" \
2010 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2011 ;;
2012 *)
2013 # `set' quotes correctly as required by POSIX, so do not add quotes.
2014 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2015 ;;
2016 esac >> confcache
2017 if cmp -s $cache_file confcache; then
2018 :
2019 else
2020 if test -w $cache_file; then
2021 echo "updating cache $cache_file"
2022 cat confcache > $cache_file
2023 else
2024 echo "not updating unwritable cache $cache_file"
2025 fi
2026 fi
2027 rm -f confcache
2028
2029
2030 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2031 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2032 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2033 DLLTOOL="$DLLTOOL" AS="$AS" \
2034 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2035 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2036 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2037
2038 # Reload cache, that may have been modified by ltconfig
2039 if test -r "$cache_file"; then
2040 echo "loading cache $cache_file"
2041 test -f "$cache_file" && . $cache_file
2042 else
2043 echo "creating cache $cache_file"
2044 > $cache_file
2045 fi
2046
2047
2048 # This can be used to rebuild libtool when needed
2049 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2050
2051 # Always use our own libtool.
2052 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2053
2054 # Redirect the config.log output again, so that the ltconfig log is not
2055 # clobbered by the next message.
2056 exec 5>>./config.log
2057
2058
2059 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2060 if test "${enable_64_bit_bfd+set}" = set; then
2061 enableval="$enable_64_bit_bfd"
2062 case "${enableval}" in
2063 yes) want64=true ;;
2064 no) want64=false ;;
2065 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
2066 esac
2067 else
2068 want64=false
2069 fi
2070 # Check whether --enable-targets or --disable-targets was given.
2071 if test "${enable_targets+set}" = set; then
2072 enableval="$enable_targets"
2073 case "${enableval}" in
2074 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
2075 ;;
2076 no) enable_targets= ;;
2077 *) enable_targets=$enableval ;;
2078 esac
2079 fi
2080 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2081 if test "${enable_commonbfdlib+set}" = set; then
2082 enableval="$enable_commonbfdlib"
2083 case "${enableval}" in
2084 yes) commonbfdlib=true ;;
2085 no) commonbfdlib=false ;;
2086 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
2087 esac
2088 fi
2089 # Check whether --with-mmap or --without-mmap was given.
2090 if test "${with_mmap+set}" = set; then
2091 withval="$with_mmap"
2092 case "${withval}" in
2093 yes) want_mmap=true ;;
2094 no) want_mmap=false ;;
2095 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
2096 esac
2097 else
2098 want_mmap=false
2099 fi
2100
2101
2102
2103
2104
2105 if test -z "$target" ; then
2106 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2107 fi
2108 if test "$program_transform_name" = s,x,x,; then
2109 program_transform_name=
2110 else
2111 # Double any \ or $. echo might interpret backslashes.
2112 cat <<\EOF_SED > conftestsed
2113 s,\\,\\\\,g; s,\$,$$,g
2114 EOF_SED
2115 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2116 rm -f conftestsed
2117 fi
2118 test "$program_prefix" != NONE &&
2119 program_transform_name="s,^,${program_prefix},;$program_transform_name"
2120 # Use a double $ so make ignores it.
2121 test "$program_suffix" != NONE &&
2122 program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
2123
2124 # sed with no file args requires a program.
2125 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2126
2127
2128 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2129 echo "configure:2130: checking whether to enable maintainer-specific portions of Makefiles" >&5
2130 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2131 if test "${enable_maintainer_mode+set}" = set; then
2132 enableval="$enable_maintainer_mode"
2133 USE_MAINTAINER_MODE=$enableval
2134 else
2135 USE_MAINTAINER_MODE=no
2136 fi
2137
2138 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2139
2140
2141 if test $USE_MAINTAINER_MODE = yes; then
2142 MAINTAINER_MODE_TRUE=
2143 MAINTAINER_MODE_FALSE='#'
2144 else
2145 MAINTAINER_MODE_TRUE='#'
2146 MAINTAINER_MODE_FALSE=
2147 fi
2148 MAINT=$MAINTAINER_MODE_TRUE
2149
2150
2151 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2152 echo "configure:2153: checking for Cygwin environment" >&5
2153 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155 else
2156 cat > conftest.$ac_ext <<EOF
2157 #line 2158 "configure"
2158 #include "confdefs.h"
2159
2160 int main() {
2161
2162 #ifndef __CYGWIN__
2163 #define __CYGWIN__ __CYGWIN32__
2164 #endif
2165 return __CYGWIN__;
2166 ; return 0; }
2167 EOF
2168 if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2169 rm -rf conftest*
2170 ac_cv_cygwin=yes
2171 else
2172 echo "configure: failed program was:" >&5
2173 cat conftest.$ac_ext >&5
2174 rm -rf conftest*
2175 ac_cv_cygwin=no
2176 fi
2177 rm -f conftest*
2178 fi
2179
2180 echo "$ac_t""$ac_cv_cygwin" 1>&6
2181 CYGWIN=
2182 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2183 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2184 echo "configure:2185: checking for mingw32 environment" >&5
2185 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2186 echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188 cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191
2192 int main() {
2193 return __MINGW32__;
2194 ; return 0; }
2195 EOF
2196 if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2197 rm -rf conftest*
2198 ac_cv_mingw32=yes
2199 else
2200 echo "configure: failed program was:" >&5
2201 cat conftest.$ac_ext >&5
2202 rm -rf conftest*
2203 ac_cv_mingw32=no
2204 fi
2205 rm -f conftest*
2206 fi
2207
2208 echo "$ac_t""$ac_cv_mingw32" 1>&6
2209 MINGW32=
2210 test "$ac_cv_mingw32" = yes && MINGW32=yes
2211 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2212 echo "configure:2213: checking for EMX OS/2 environment" >&5
2213 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2214 echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216 cat > conftest.$ac_ext <<EOF
2217 #line 2218 "configure"
2218 #include "confdefs.h"
2219
2220 int main() {
2221 return __EMX__;
2222 ; return 0; }
2223 EOF
2224 if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2225 rm -rf conftest*
2226 ac_cv_emxos2=yes
2227 else
2228 echo "configure: failed program was:" >&5
2229 cat conftest.$ac_ext >&5
2230 rm -rf conftest*
2231 ac_cv_emxos2=no
2232 fi
2233 rm -f conftest*
2234 fi
2235
2236 echo "$ac_t""$ac_cv_emxos2" 1>&6
2237 EMXOS2=
2238 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2239
2240
2241
2242 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2243 echo "configure:2244: checking for executable suffix" >&5
2244 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
2245 echo $ac_n "(cached) $ac_c" 1>&6
2246 else
2247 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
2248 ac_cv_exeext=.exe
2249 else
2250 rm -f conftest*
2251 echo 'int main () { return 0; }' > conftest.$ac_ext
2252 ac_cv_exeext=
2253 if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2254 for file in conftest.*; do
2255 case $file in
2256 *.c | *.C | *.o | *.obj | *.xcoff) ;;
2257 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2258 esac
2259 done
2260 else
2261 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2262 fi
2263 rm -f conftest*
2264 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2265 fi
2266 fi
2267
2268 EXEEXT=""
2269 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2270 echo "$ac_t""${ac_cv_exeext}" 1>&6
2271 ac_exeext=$EXEEXT
2272
2273
2274 host64=false
2275 target64=false
2276
2277 # host stuff:
2278
2279 # Extract the first word of "gcc", so it can be a program name with args.
2280 set dummy gcc; ac_word=$2
2281 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2282 echo "configure:2283: checking for $ac_word" >&5
2283 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2284 echo $ac_n "(cached) $ac_c" 1>&6
2285 else
2286 if test -n "$CC"; then
2287 ac_cv_prog_CC="$CC" # Let the user override the test.
2288 else
2289 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2290 ac_dummy="$PATH"
2291 for ac_dir in $ac_dummy; do
2292 test -z "$ac_dir" && ac_dir=.
2293 if test -f $ac_dir/$ac_word; then
2294 ac_cv_prog_CC="gcc"
2295 break
2296 fi
2297 done
2298 IFS="$ac_save_ifs"
2299 fi
2300 fi
2301 CC="$ac_cv_prog_CC"
2302 if test -n "$CC"; then
2303 echo "$ac_t""$CC" 1>&6
2304 else
2305 echo "$ac_t""no" 1>&6
2306 fi
2307
2308 if test -z "$CC"; then
2309 # Extract the first word of "cc", so it can be a program name with args.
2310 set dummy cc; ac_word=$2
2311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2312 echo "configure:2313: checking for $ac_word" >&5
2313 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2315 else
2316 if test -n "$CC"; then
2317 ac_cv_prog_CC="$CC" # Let the user override the test.
2318 else
2319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2320 ac_prog_rejected=no
2321 ac_dummy="$PATH"
2322 for ac_dir in $ac_dummy; do
2323 test -z "$ac_dir" && ac_dir=.
2324 if test -f $ac_dir/$ac_word; then
2325 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2326 ac_prog_rejected=yes
2327 continue
2328 fi
2329 ac_cv_prog_CC="cc"
2330 break
2331 fi
2332 done
2333 IFS="$ac_save_ifs"
2334 if test $ac_prog_rejected = yes; then
2335 # We found a bogon in the path, so make sure we never use it.
2336 set dummy $ac_cv_prog_CC
2337 shift
2338 if test $# -gt 0; then
2339 # We chose a different compiler from the bogus one.
2340 # However, it has the same basename, so the bogon will be chosen
2341 # first if we set CC to just the basename; use the full file name.
2342 shift
2343 set dummy "$ac_dir/$ac_word" "$@"
2344 shift
2345 ac_cv_prog_CC="$@"
2346 fi
2347 fi
2348 fi
2349 fi
2350 CC="$ac_cv_prog_CC"
2351 if test -n "$CC"; then
2352 echo "$ac_t""$CC" 1>&6
2353 else
2354 echo "$ac_t""no" 1>&6
2355 fi
2356
2357 if test -z "$CC"; then
2358 case "`uname -s`" in
2359 *win32* | *WIN32* | *CYGWIN*)
2360 # Extract the first word of "cl", so it can be a program name with args.
2361 set dummy cl; ac_word=$2
2362 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2363 echo "configure:2364: checking for $ac_word" >&5
2364 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
2366 else
2367 if test -n "$CC"; then
2368 ac_cv_prog_CC="$CC" # Let the user override the test.
2369 else
2370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2371 ac_dummy="$PATH"
2372 for ac_dir in $ac_dummy; do
2373 test -z "$ac_dir" && ac_dir=.
2374 if test -f $ac_dir/$ac_word; then
2375 ac_cv_prog_CC="cl"
2376 break
2377 fi
2378 done
2379 IFS="$ac_save_ifs"
2380 fi
2381 fi
2382 CC="$ac_cv_prog_CC"
2383 if test -n "$CC"; then
2384 echo "$ac_t""$CC" 1>&6
2385 else
2386 echo "$ac_t""no" 1>&6
2387 fi
2388 ;;
2389 esac
2390 fi
2391 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2392 fi
2393
2394 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2395 echo "configure:2396: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2396
2397 ac_ext=c
2398 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2399 ac_cpp='$CPP $CPPFLAGS'
2400 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2401 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2402 cross_compiling=$ac_cv_prog_cc_cross
2403
2404 cat > conftest.$ac_ext << EOF
2405
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408
2409 main(){return(0);}
2410 EOF
2411 if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2412 ac_cv_prog_cc_works=yes
2413 # If we can't run a trivial program, we are probably using a cross compiler.
2414 if (./conftest; exit) 2>/dev/null; then
2415 ac_cv_prog_cc_cross=no
2416 else
2417 ac_cv_prog_cc_cross=yes
2418 fi
2419 else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 ac_cv_prog_cc_works=no
2423 fi
2424 rm -fr conftest*
2425 ac_ext=c
2426 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2427 ac_cpp='$CPP $CPPFLAGS'
2428 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2429 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2430 cross_compiling=$ac_cv_prog_cc_cross
2431
2432 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2433 if test $ac_cv_prog_cc_works = no; then
2434 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2435 fi
2436 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2437 echo "configure:2438: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2438 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2439 cross_compiling=$ac_cv_prog_cc_cross
2440
2441 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2442 echo "configure:2443: checking whether we are using GNU C" >&5
2443 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445 else
2446 cat > conftest.c <<EOF
2447 #ifdef __GNUC__
2448 yes;
2449 #endif
2450 EOF
2451 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2452 ac_cv_prog_gcc=yes
2453 else
2454 ac_cv_prog_gcc=no
2455 fi
2456 fi
2457
2458 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2459
2460 if test $ac_cv_prog_gcc = yes; then
2461 GCC=yes
2462 else
2463 GCC=
2464 fi
2465
2466 ac_test_CFLAGS="${CFLAGS+set}"
2467 ac_save_CFLAGS="$CFLAGS"
2468 CFLAGS=
2469 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2470 echo "configure:2471: checking whether ${CC-cc} accepts -g" >&5
2471 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2472 echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474 echo 'void f(){}' > conftest.c
2475 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2476 ac_cv_prog_cc_g=yes
2477 else
2478 ac_cv_prog_cc_g=no
2479 fi
2480 rm -f conftest*
2481
2482 fi
2483
2484 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2485 if test "$ac_test_CFLAGS" = set; then
2486 CFLAGS="$ac_save_CFLAGS"
2487 elif test $ac_cv_prog_cc_g = yes; then
2488 if test "$GCC" = yes; then
2489 CFLAGS="-g -O2"
2490 else
2491 CFLAGS="-g"
2492 fi
2493 else
2494 if test "$GCC" = yes; then
2495 CFLAGS="-O2"
2496 else
2497 CFLAGS=
2498 fi
2499 fi
2500
2501
2502 ALL_LINGUAS=
2503 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2504 echo "configure:2505: checking how to run the C preprocessor" >&5
2505 # On Suns, sometimes $CPP names a directory.
2506 if test -n "$CPP" && test -d "$CPP"; then
2507 CPP=
2508 fi
2509 if test -z "$CPP"; then
2510 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2511 echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513 # This must be in double quotes, not single quotes, because CPP may get
2514 # substituted into the Makefile and "${CC-cc}" will confuse make.
2515 CPP="${CC-cc} -E"
2516 # On the NeXT, cc -E runs the code through the compiler's parser,
2517 # not just through cpp.
2518 cat > conftest.$ac_ext <<EOF
2519 #line 2520 "configure"
2520 #include "confdefs.h"
2521 #include <assert.h>
2522 Syntax Error
2523 EOF
2524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2525 { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2527 if test -z "$ac_err"; then
2528 :
2529 else
2530 echo "$ac_err" >&5
2531 echo "configure: failed program was:" >&5
2532 cat conftest.$ac_ext >&5
2533 rm -rf conftest*
2534 CPP="${CC-cc} -E -traditional-cpp"
2535 cat > conftest.$ac_ext <<EOF
2536 #line 2537 "configure"
2537 #include "confdefs.h"
2538 #include <assert.h>
2539 Syntax Error
2540 EOF
2541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2542 { (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2544 if test -z "$ac_err"; then
2545 :
2546 else
2547 echo "$ac_err" >&5
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -rf conftest*
2551 CPP="${CC-cc} -nologo -E"
2552 cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #include <assert.h>
2556 Syntax Error
2557 EOF
2558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2559 { (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2561 if test -z "$ac_err"; then
2562 :
2563 else
2564 echo "$ac_err" >&5
2565 echo "configure: failed program was:" >&5
2566 cat conftest.$ac_ext >&5
2567 rm -rf conftest*
2568 CPP=/lib/cpp
2569 fi
2570 rm -f conftest*
2571 fi
2572 rm -f conftest*
2573 fi
2574 rm -f conftest*
2575 ac_cv_prog_CPP="$CPP"
2576 fi
2577 CPP="$ac_cv_prog_CPP"
2578 else
2579 ac_cv_prog_CPP="$CPP"
2580 fi
2581 echo "$ac_t""$CPP" 1>&6
2582
2583 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2584 echo "configure:2585: checking for ANSI C header files" >&5
2585 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
2586 echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588 cat > conftest.$ac_ext <<EOF
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591 #include <stdlib.h>
2592 #include <stdarg.h>
2593 #include <string.h>
2594 #include <float.h>
2595 EOF
2596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2597 { (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2599 if test -z "$ac_err"; then
2600 rm -rf conftest*
2601 ac_cv_header_stdc=yes
2602 else
2603 echo "$ac_err" >&5
2604 echo "configure: failed program was:" >&5
2605 cat conftest.$ac_ext >&5
2606 rm -rf conftest*
2607 ac_cv_header_stdc=no
2608 fi
2609 rm -f conftest*
2610
2611 if test $ac_cv_header_stdc = yes; then
2612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2613 cat > conftest.$ac_ext <<EOF
2614 #line 2615 "configure"
2615 #include "confdefs.h"
2616 #include <string.h>
2617 EOF
2618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2619 egrep "memchr" >/dev/null 2>&1; then
2620 :
2621 else
2622 rm -rf conftest*
2623 ac_cv_header_stdc=no
2624 fi
2625 rm -f conftest*
2626
2627 fi
2628
2629 if test $ac_cv_header_stdc = yes; then
2630 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 #include <stdlib.h>
2635 EOF
2636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2637 egrep "free" >/dev/null 2>&1; then
2638 :
2639 else
2640 rm -rf conftest*
2641 ac_cv_header_stdc=no
2642 fi
2643 rm -f conftest*
2644
2645 fi
2646
2647 if test $ac_cv_header_stdc = yes; then
2648 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2649 if test "$cross_compiling" = yes; then
2650 :
2651 else
2652 cat > conftest.$ac_ext <<EOF
2653 #line 2654 "configure"
2654 #include "confdefs.h"
2655 #include <ctype.h>
2656 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2657 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2658 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2659 int main () { int i; for (i = 0; i < 256; i++)
2660 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2661 exit (0); }
2662
2663 EOF
2664 if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2665 then
2666 :
2667 else
2668 echo "configure: failed program was:" >&5
2669 cat conftest.$ac_ext >&5
2670 rm -fr conftest*
2671 ac_cv_header_stdc=no
2672 fi
2673 rm -fr conftest*
2674 fi
2675
2676 fi
2677 fi
2678
2679 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2680 if test $ac_cv_header_stdc = yes; then
2681 cat >> confdefs.h <<\EOF
2682 #define STDC_HEADERS 1
2683 EOF
2684
2685 fi
2686
2687 echo $ac_n "checking for working const""... $ac_c" 1>&6
2688 echo "configure:2689: checking for working const" >&5
2689 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
2690 echo $ac_n "(cached) $ac_c" 1>&6
2691 else
2692 cat > conftest.$ac_ext <<EOF
2693 #line 2694 "configure"
2694 #include "confdefs.h"
2695
2696 int main() {
2697
2698 /* Ultrix mips cc rejects this. */
2699 typedef int charset[2]; const charset x;
2700 /* SunOS 4.1.1 cc rejects this. */
2701 char const *const *ccp;
2702 char **p;
2703 /* NEC SVR4.0.2 mips cc rejects this. */
2704 struct point {int x, y;};
2705 static struct point const zero = {0,0};
2706 /* AIX XL C 1.02.0.0 rejects this.
2707 It does not let you subtract one const X* pointer from another in an arm
2708 of an if-expression whose if-part is not a constant expression */
2709 const char *g = "string";
2710 ccp = &g + (g ? g-g : 0);
2711 /* HPUX 7.0 cc rejects these. */
2712 ++ccp;
2713 p = (char**) ccp;
2714 ccp = (char const *const *) p;
2715 { /* SCO 3.2v4 cc rejects this. */
2716 char *t;
2717 char const *s = 0 ? (char *) 0 : (char const *) 0;
2718
2719 *t++ = 0;
2720 }
2721 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2722 int x[] = {25, 17};
2723 const int *foo = &x[0];
2724 ++foo;
2725 }
2726 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2727 typedef const int *iptr;
2728 iptr p = 0;
2729 ++p;
2730 }
2731 { /* AIX XL C 1.02.0.0 rejects this saying
2732 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2733 struct s { int j; const int *ap[3]; };
2734 struct s *b; b->j = 5;
2735 }
2736 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2737 const int foo = 10;
2738 }
2739
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2743 rm -rf conftest*
2744 ac_cv_c_const=yes
2745 else
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2748 rm -rf conftest*
2749 ac_cv_c_const=no
2750 fi
2751 rm -f conftest*
2752 fi
2753
2754 echo "$ac_t""$ac_cv_c_const" 1>&6
2755 if test $ac_cv_c_const = no; then
2756 cat >> confdefs.h <<\EOF
2757 #define const
2758 EOF
2759
2760 fi
2761
2762 echo $ac_n "checking for inline""... $ac_c" 1>&6
2763 echo "configure:2764: checking for inline" >&5
2764 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2766 else
2767 ac_cv_c_inline=no
2768 for ac_kw in inline __inline__ __inline; do
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772
2773 int main() {
2774 } $ac_kw int foo() {
2775 ; return 0; }
2776 EOF
2777 if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2778 rm -rf conftest*
2779 ac_cv_c_inline=$ac_kw; break
2780 else
2781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
2783 fi
2784 rm -f conftest*
2785 done
2786
2787 fi
2788
2789 echo "$ac_t""$ac_cv_c_inline" 1>&6
2790 case "$ac_cv_c_inline" in
2791 inline | yes) ;;
2792 no) cat >> confdefs.h <<\EOF
2793 #define inline
2794 EOF
2795 ;;
2796 *) cat >> confdefs.h <<EOF
2797 #define inline $ac_cv_c_inline
2798 EOF
2799 ;;
2800 esac
2801
2802 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2803 echo "configure:2804: checking for off_t" >&5
2804 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
2805 echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <sys/types.h>
2811 #if STDC_HEADERS
2812 #include <stdlib.h>
2813 #include <stddef.h>
2814 #endif
2815 EOF
2816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2817 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2818 rm -rf conftest*
2819 eval "ac_cv_type_off_t=yes"
2820 else
2821 rm -rf conftest*
2822 eval "ac_cv_type_off_t=no"
2823 fi
2824 rm -f conftest*
2825
2826 fi
2827 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
2828 echo "$ac_t""yes" 1>&6
2829 else
2830 echo "$ac_t""no" 1>&6
2831 cat >> confdefs.h <<EOF
2832 #define off_t long
2833 EOF
2834
2835 fi
2836
2837 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2838 echo "configure:2839: checking for size_t" >&5
2839 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
2840 echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842 cat > conftest.$ac_ext <<EOF
2843 #line 2844 "configure"
2844 #include "confdefs.h"
2845 #include <sys/types.h>
2846 #if STDC_HEADERS
2847 #include <stdlib.h>
2848 #include <stddef.h>
2849 #endif
2850 EOF
2851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2852 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2853 rm -rf conftest*
2854 eval "ac_cv_type_size_t=yes"
2855 else
2856 rm -rf conftest*
2857 eval "ac_cv_type_size_t=no"
2858 fi
2859 rm -f conftest*
2860
2861 fi
2862 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
2863 echo "$ac_t""yes" 1>&6
2864 else
2865 echo "$ac_t""no" 1>&6
2866 cat >> confdefs.h <<EOF
2867 #define size_t unsigned
2868 EOF
2869
2870 fi
2871
2872 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2873 # for constant arguments. Useless!
2874 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2875 echo "configure:2876: checking for working alloca.h" >&5
2876 if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include <alloca.h>
2883 int main() {
2884 char *p = alloca(2 * sizeof(int));
2885 ; return 0; }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2888 rm -rf conftest*
2889 ac_cv_header_alloca_h=yes
2890 else
2891 echo "configure: failed program was:" >&5
2892 cat conftest.$ac_ext >&5
2893 rm -rf conftest*
2894 ac_cv_header_alloca_h=no
2895 fi
2896 rm -f conftest*
2897 fi
2898
2899 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2900 if test $ac_cv_header_alloca_h = yes; then
2901 cat >> confdefs.h <<\EOF
2902 #define HAVE_ALLOCA_H 1
2903 EOF
2904
2905 fi
2906
2907 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2908 echo "configure:2909: checking for alloca" >&5
2909 if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then
2910 echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915
2916 #ifdef __GNUC__
2917 # define alloca __builtin_alloca
2918 #else
2919 # ifdef _MSC_VER
2920 # include <malloc.h>
2921 # define alloca _alloca
2922 # else
2923 # if HAVE_ALLOCA_H
2924 # include <alloca.h>
2925 # else
2926 # ifdef _AIX
2927 #pragma alloca
2928 # else
2929 # ifndef alloca /* predefined by HP cc +Olibcalls */
2930 char *alloca ();
2931 # endif
2932 # endif
2933 # endif
2934 # endif
2935 #endif
2936
2937 int main() {
2938 char *p = (char *) alloca(1);
2939 ; return 0; }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942 rm -rf conftest*
2943 ac_cv_func_alloca_works=yes
2944 else
2945 echo "configure: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 rm -rf conftest*
2948 ac_cv_func_alloca_works=no
2949 fi
2950 rm -f conftest*
2951 fi
2952
2953 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2954 if test $ac_cv_func_alloca_works = yes; then
2955 cat >> confdefs.h <<\EOF
2956 #define HAVE_ALLOCA 1
2957 EOF
2958
2959 fi
2960
2961 if test $ac_cv_func_alloca_works = no; then
2962 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2963 # that cause trouble. Some versions do not even contain alloca or
2964 # contain a buggy version. If you still want to use their alloca,
2965 # use ar to extract alloca.o from them instead of compiling alloca.c.
2966 ALLOCA=alloca.${ac_objext}
2967 cat >> confdefs.h <<\EOF
2968 #define C_ALLOCA 1
2969 EOF
2970
2971
2972 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2973 echo "configure:2974: checking whether alloca needs Cray hooks" >&5
2974 if eval "test \"\${ac_cv_os_cray+set}\" = set"; then
2975 echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977 cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #if defined(CRAY) && ! defined(CRAY2)
2981 webecray
2982 #else
2983 wenotbecray
2984 #endif
2985
2986 EOF
2987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2988 egrep "webecray" >/dev/null 2>&1; then
2989 rm -rf conftest*
2990 ac_cv_os_cray=yes
2991 else
2992 rm -rf conftest*
2993 ac_cv_os_cray=no
2994 fi
2995 rm -f conftest*
2996
2997 fi
2998
2999 echo "$ac_t""$ac_cv_os_cray" 1>&6
3000 if test $ac_cv_os_cray = yes; then
3001 for ac_func in _getb67 GETB67 getb67; do
3002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3003 echo "configure:3004: checking for $ac_func" >&5
3004 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3005 echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007 cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010 /* System header to define __stub macros and hopefully few prototypes,
3011 which can conflict with char $ac_func(); below. */
3012 #include <assert.h>
3013 /* Override any gcc2 internal prototype to avoid an error. */
3014 /* We use char because int might match the return type of a gcc2
3015 builtin and then its argument prototype would still apply. */
3016 char $ac_func();
3017 char (*f)();
3018
3019 int main() {
3020
3021 /* The GNU C library defines this for functions which it implements
3022 to always fail with ENOSYS. Some functions are actually named
3023 something starting with __ and the normal name is an alias. */
3024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3025 choke me
3026 #else
3027 f = $ac_func;
3028 #endif
3029
3030 ; return 0; }
3031 EOF
3032 if { (eval echo configure:3033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3033 rm -rf conftest*
3034 eval "ac_cv_func_$ac_func=yes"
3035 else
3036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 rm -rf conftest*
3039 eval "ac_cv_func_$ac_func=no"
3040 fi
3041 rm -f conftest*
3042 fi
3043
3044 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3045 echo "$ac_t""yes" 1>&6
3046 cat >> confdefs.h <<EOF
3047 #define CRAY_STACKSEG_END $ac_func
3048 EOF
3049
3050 break
3051 else
3052 echo "$ac_t""no" 1>&6
3053 fi
3054
3055 done
3056 fi
3057
3058 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3059 echo "configure:3060: checking stack direction for C alloca" >&5
3060 if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then
3061 echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063 if test "$cross_compiling" = yes; then
3064 ac_cv_c_stack_direction=0
3065 else
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 find_stack_direction ()
3070 {
3071 static char *addr = 0;
3072 auto char dummy;
3073 if (addr == 0)
3074 {
3075 addr = &dummy;
3076 return find_stack_direction ();
3077 }
3078 else
3079 return (&dummy > addr) ? 1 : -1;
3080 }
3081 main ()
3082 {
3083 exit (find_stack_direction() < 0);
3084 }
3085 EOF
3086 if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3087 then
3088 ac_cv_c_stack_direction=1
3089 else
3090 echo "configure: failed program was:" >&5
3091 cat conftest.$ac_ext >&5
3092 rm -fr conftest*
3093 ac_cv_c_stack_direction=-1
3094 fi
3095 rm -fr conftest*
3096 fi
3097
3098 fi
3099
3100 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3101 cat >> confdefs.h <<EOF
3102 #define STACK_DIRECTION $ac_cv_c_stack_direction
3103 EOF
3104
3105 fi
3106
3107 for ac_hdr in unistd.h
3108 do
3109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3111 echo "configure:3112: checking for $ac_hdr" >&5
3112 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3113 echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115 cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118 #include <$ac_hdr>
3119 EOF
3120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3121 { (eval echo configure:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3123 if test -z "$ac_err"; then
3124 rm -rf conftest*
3125 eval "ac_cv_header_$ac_safe=yes"
3126 else
3127 echo "$ac_err" >&5
3128 echo "configure: failed program was:" >&5
3129 cat conftest.$ac_ext >&5
3130 rm -rf conftest*
3131 eval "ac_cv_header_$ac_safe=no"
3132 fi
3133 rm -f conftest*
3134 fi
3135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3136 echo "$ac_t""yes" 1>&6
3137 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3138 cat >> confdefs.h <<EOF
3139 #define $ac_tr_hdr 1
3140 EOF
3141
3142 else
3143 echo "$ac_t""no" 1>&6
3144 fi
3145 done
3146
3147 for ac_func in getpagesize
3148 do
3149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3150 echo "configure:3151: checking for $ac_func" >&5
3151 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3152 echo $ac_n "(cached) $ac_c" 1>&6
3153 else
3154 cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157 /* System header to define __stub macros and hopefully few prototypes,
3158 which can conflict with char $ac_func(); below. */
3159 #include <assert.h>
3160 /* Override any gcc2 internal prototype to avoid an error. */
3161 /* We use char because int might match the return type of a gcc2
3162 builtin and then its argument prototype would still apply. */
3163 char $ac_func();
3164 char (*f)();
3165
3166 int main() {
3167
3168 /* The GNU C library defines this for functions which it implements
3169 to always fail with ENOSYS. Some functions are actually named
3170 something starting with __ and the normal name is an alias. */
3171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3172 choke me
3173 #else
3174 f = $ac_func;
3175 #endif
3176
3177 ; return 0; }
3178 EOF
3179 if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3180 rm -rf conftest*
3181 eval "ac_cv_func_$ac_func=yes"
3182 else
3183 echo "configure: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3185 rm -rf conftest*
3186 eval "ac_cv_func_$ac_func=no"
3187 fi
3188 rm -f conftest*
3189 fi
3190
3191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3192 echo "$ac_t""yes" 1>&6
3193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3194 cat >> confdefs.h <<EOF
3195 #define $ac_tr_func 1
3196 EOF
3197
3198 else
3199 echo "$ac_t""no" 1>&6
3200 fi
3201 done
3202
3203 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3204 echo "configure:3205: checking for working mmap" >&5
3205 if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then
3206 echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208 if test "$cross_compiling" = yes; then
3209 ac_cv_func_mmap_fixed_mapped=no
3210 else
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214
3215 /* Thanks to Mike Haertel and Jim Avera for this test.
3216 Here is a matrix of mmap possibilities:
3217 mmap private not fixed
3218 mmap private fixed at somewhere currently unmapped
3219 mmap private fixed at somewhere already mapped
3220 mmap shared not fixed
3221 mmap shared fixed at somewhere currently unmapped
3222 mmap shared fixed at somewhere already mapped
3223 For private mappings, we should verify that changes cannot be read()
3224 back from the file, nor mmap's back from the file at a different
3225 address. (There have been systems where private was not correctly
3226 implemented like the infamous i386 svr4.0, and systems where the
3227 VM page cache was not coherent with the filesystem buffer cache
3228 like early versions of FreeBSD and possibly contemporary NetBSD.)
3229 For shared mappings, we should conversely verify that changes get
3230 propogated back to all the places they're supposed to be.
3231
3232 Grep wants private fixed already mapped.
3233 The main things grep needs to know about mmap are:
3234 * does it exist and is it safe to write into the mmap'd area
3235 * how to use it (BSD variants) */
3236 #include <sys/types.h>
3237 #include <fcntl.h>
3238 #include <sys/mman.h>
3239
3240 /* This mess was copied from the GNU getpagesize.h. */
3241 #ifndef HAVE_GETPAGESIZE
3242 # ifdef HAVE_UNISTD_H
3243 # include <unistd.h>
3244 # endif
3245
3246 /* Assume that all systems that can run configure have sys/param.h. */
3247 # ifndef HAVE_SYS_PARAM_H
3248 # define HAVE_SYS_PARAM_H 1
3249 # endif
3250
3251 # ifdef _SC_PAGESIZE
3252 # define getpagesize() sysconf(_SC_PAGESIZE)
3253 # else /* no _SC_PAGESIZE */
3254 # ifdef HAVE_SYS_PARAM_H
3255 # include <sys/param.h>
3256 # ifdef EXEC_PAGESIZE
3257 # define getpagesize() EXEC_PAGESIZE
3258 # else /* no EXEC_PAGESIZE */
3259 # ifdef NBPG
3260 # define getpagesize() NBPG * CLSIZE
3261 # ifndef CLSIZE
3262 # define CLSIZE 1
3263 # endif /* no CLSIZE */
3264 # else /* no NBPG */
3265 # ifdef NBPC
3266 # define getpagesize() NBPC
3267 # else /* no NBPC */
3268 # ifdef PAGESIZE
3269 # define getpagesize() PAGESIZE
3270 # endif /* PAGESIZE */
3271 # endif /* no NBPC */
3272 # endif /* no NBPG */
3273 # endif /* no EXEC_PAGESIZE */
3274 # else /* no HAVE_SYS_PARAM_H */
3275 # define getpagesize() 8192 /* punt totally */
3276 # endif /* no HAVE_SYS_PARAM_H */
3277 # endif /* no _SC_PAGESIZE */
3278
3279 #endif /* no HAVE_GETPAGESIZE */
3280
3281 #ifdef __cplusplus
3282 extern "C" { void *malloc(unsigned); }
3283 #else
3284 char *malloc();
3285 #endif
3286
3287 int
3288 main()
3289 {
3290 char *data, *data2, *data3;
3291 int i, pagesize;
3292 int fd;
3293
3294 pagesize = getpagesize();
3295
3296 /*
3297 * First, make a file with some known garbage in it.
3298 */
3299 data = malloc(pagesize);
3300 if (!data)
3301 exit(1);
3302 for (i = 0; i < pagesize; ++i)
3303 *(data + i) = rand();
3304 umask(0);
3305 fd = creat("conftestmmap", 0600);
3306 if (fd < 0)
3307 exit(1);
3308 if (write(fd, data, pagesize) != pagesize)
3309 exit(1);
3310 close(fd);
3311
3312 /*
3313 * Next, try to mmap the file at a fixed address which
3314 * already has something else allocated at it. If we can,
3315 * also make sure that we see the same garbage.
3316 */
3317 fd = open("conftestmmap", O_RDWR);
3318 if (fd < 0)
3319 exit(1);
3320 data2 = malloc(2 * pagesize);
3321 if (!data2)
3322 exit(1);
3323 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3324 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3325 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3326 exit(1);
3327 for (i = 0; i < pagesize; ++i)
3328 if (*(data + i) != *(data2 + i))
3329 exit(1);
3330
3331 /*
3332 * Finally, make sure that changes to the mapped area
3333 * do not percolate back to the file as seen by read().
3334 * (This is a bug on some variants of i386 svr4.0.)
3335 */
3336 for (i = 0; i < pagesize; ++i)
3337 *(data2 + i) = *(data2 + i) + 1;
3338 data3 = malloc(pagesize);
3339 if (!data3)
3340 exit(1);
3341 if (read(fd, data3, pagesize) != pagesize)
3342 exit(1);
3343 for (i = 0; i < pagesize; ++i)
3344 if (*(data + i) != *(data3 + i))
3345 exit(1);
3346 close(fd);
3347 unlink("conftestmmap");
3348 exit(0);
3349 }
3350
3351 EOF
3352 if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3353 then
3354 ac_cv_func_mmap_fixed_mapped=yes
3355 else
3356 echo "configure: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3358 rm -fr conftest*
3359 ac_cv_func_mmap_fixed_mapped=no
3360 fi
3361 rm -fr conftest*
3362 fi
3363
3364 fi
3365
3366 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3367 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3368 cat >> confdefs.h <<\EOF
3369 #define HAVE_MMAP 1
3370 EOF
3371
3372 fi
3373
3374
3375 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3376 unistd.h values.h sys/param.h
3377 do
3378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3380 echo "configure:3381: checking for $ac_hdr" >&5
3381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3382 echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384 cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 #include <$ac_hdr>
3388 EOF
3389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3390 { (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3392 if test -z "$ac_err"; then
3393 rm -rf conftest*
3394 eval "ac_cv_header_$ac_safe=yes"
3395 else
3396 echo "$ac_err" >&5
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 rm -rf conftest*
3400 eval "ac_cv_header_$ac_safe=no"
3401 fi
3402 rm -f conftest*
3403 fi
3404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3405 echo "$ac_t""yes" 1>&6
3406 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3407 cat >> confdefs.h <<EOF
3408 #define $ac_tr_hdr 1
3409 EOF
3410
3411 else
3412 echo "$ac_t""no" 1>&6
3413 fi
3414 done
3415
3416 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3417 __argz_count __argz_stringify __argz_next
3418 do
3419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3420 echo "configure:3421: checking for $ac_func" >&5
3421 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3422 echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 /* System header to define __stub macros and hopefully few prototypes,
3428 which can conflict with char $ac_func(); below. */
3429 #include <assert.h>
3430 /* Override any gcc2 internal prototype to avoid an error. */
3431 /* We use char because int might match the return type of a gcc2
3432 builtin and then its argument prototype would still apply. */
3433 char $ac_func();
3434 char (*f)();
3435
3436 int main() {
3437
3438 /* The GNU C library defines this for functions which it implements
3439 to always fail with ENOSYS. Some functions are actually named
3440 something starting with __ and the normal name is an alias. */
3441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3442 choke me
3443 #else
3444 f = $ac_func;
3445 #endif
3446
3447 ; return 0; }
3448 EOF
3449 if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3450 rm -rf conftest*
3451 eval "ac_cv_func_$ac_func=yes"
3452 else
3453 echo "configure: failed program was:" >&5
3454 cat conftest.$ac_ext >&5
3455 rm -rf conftest*
3456 eval "ac_cv_func_$ac_func=no"
3457 fi
3458 rm -f conftest*
3459 fi
3460
3461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3462 echo "$ac_t""yes" 1>&6
3463 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3464 cat >> confdefs.h <<EOF
3465 #define $ac_tr_func 1
3466 EOF
3467
3468 else
3469 echo "$ac_t""no" 1>&6
3470 fi
3471 done
3472
3473
3474 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3475 for ac_func in stpcpy
3476 do
3477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_func" >&5
3479 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 cat > conftest.$ac_ext <<EOF
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485 /* System header to define __stub macros and hopefully few prototypes,
3486 which can conflict with char $ac_func(); below. */
3487 #include <assert.h>
3488 /* Override any gcc2 internal prototype to avoid an error. */
3489 /* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491 char $ac_func();
3492 char (*f)();
3493
3494 int main() {
3495
3496 /* The GNU C library defines this for functions which it implements
3497 to always fail with ENOSYS. Some functions are actually named
3498 something starting with __ and the normal name is an alias. */
3499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3500 choke me
3501 #else
3502 f = $ac_func;
3503 #endif
3504
3505 ; return 0; }
3506 EOF
3507 if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3508 rm -rf conftest*
3509 eval "ac_cv_func_$ac_func=yes"
3510 else
3511 echo "configure: failed program was:" >&5
3512 cat conftest.$ac_ext >&5
3513 rm -rf conftest*
3514 eval "ac_cv_func_$ac_func=no"
3515 fi
3516 rm -f conftest*
3517 fi
3518
3519 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3520 echo "$ac_t""yes" 1>&6
3521 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3522 cat >> confdefs.h <<EOF
3523 #define $ac_tr_func 1
3524 EOF
3525
3526 else
3527 echo "$ac_t""no" 1>&6
3528 fi
3529 done
3530
3531 fi
3532 if test "${ac_cv_func_stpcpy}" = "yes"; then
3533 cat >> confdefs.h <<\EOF
3534 #define HAVE_STPCPY 1
3535 EOF
3536
3537 fi
3538
3539 if test $ac_cv_header_locale_h = yes; then
3540 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3541 echo "configure:3542: checking for LC_MESSAGES" >&5
3542 if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then
3543 echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545 cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548 #include <locale.h>
3549 int main() {
3550 return LC_MESSAGES
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3554 rm -rf conftest*
3555 am_cv_val_LC_MESSAGES=yes
3556 else
3557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
3559 rm -rf conftest*
3560 am_cv_val_LC_MESSAGES=no
3561 fi
3562 rm -f conftest*
3563 fi
3564
3565 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3566 if test $am_cv_val_LC_MESSAGES = yes; then
3567 cat >> confdefs.h <<\EOF
3568 #define HAVE_LC_MESSAGES 1
3569 EOF
3570
3571 fi
3572 fi
3573 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3574 echo "configure:3575: checking whether NLS is requested" >&5
3575 # Check whether --enable-nls or --disable-nls was given.
3576 if test "${enable_nls+set}" = set; then
3577 enableval="$enable_nls"
3578 USE_NLS=$enableval
3579 else
3580 USE_NLS=yes
3581 fi
3582
3583 echo "$ac_t""$USE_NLS" 1>&6
3584
3585
3586 USE_INCLUDED_LIBINTL=no
3587
3588 if test "$USE_NLS" = "yes"; then
3589 cat >> confdefs.h <<\EOF
3590 #define ENABLE_NLS 1
3591 EOF
3592
3593 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3594 echo "configure:3595: checking whether included gettext is requested" >&5
3595 # Check whether --with-included-gettext or --without-included-gettext was given.
3596 if test "${with_included_gettext+set}" = set; then
3597 withval="$with_included_gettext"
3598 nls_cv_force_use_gnu_gettext=$withval
3599 else
3600 nls_cv_force_use_gnu_gettext=no
3601 fi
3602
3603 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3604
3605 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3606 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3607 nls_cv_header_intl=
3608 nls_cv_header_libgt=
3609 CATOBJEXT=NONE
3610
3611 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3612 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3613 echo "configure:3614: checking for libintl.h" >&5
3614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3616 else
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <libintl.h>
3621 EOF
3622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3623 { (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3625 if test -z "$ac_err"; then
3626 rm -rf conftest*
3627 eval "ac_cv_header_$ac_safe=yes"
3628 else
3629 echo "$ac_err" >&5
3630 echo "configure: failed program was:" >&5
3631 cat conftest.$ac_ext >&5
3632 rm -rf conftest*
3633 eval "ac_cv_header_$ac_safe=no"
3634 fi
3635 rm -f conftest*
3636 fi
3637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3638 echo "$ac_t""yes" 1>&6
3639 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3640 echo "configure:3641: checking for gettext in libc" >&5
3641 if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then
3642 echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 #include <libintl.h>
3648 int main() {
3649 return (int) gettext ("")
3650 ; return 0; }
3651 EOF
3652 if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3653 rm -rf conftest*
3654 gt_cv_func_gettext_libc=yes
3655 else
3656 echo "configure: failed program was:" >&5
3657 cat conftest.$ac_ext >&5
3658 rm -rf conftest*
3659 gt_cv_func_gettext_libc=no
3660 fi
3661 rm -f conftest*
3662 fi
3663
3664 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3665
3666 if test "$gt_cv_func_gettext_libc" != "yes"; then
3667 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3668 echo "configure:3669: checking for bindtextdomain in -lintl" >&5
3669 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'`
3670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3671 echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673 ac_save_LIBS="$LIBS"
3674 LIBS="-lintl $LIBS"
3675 cat > conftest.$ac_ext <<EOF
3676 #line 3677 "configure"
3677 #include "confdefs.h"
3678 /* Override any gcc2 internal prototype to avoid an error. */
3679 /* We use char because int might match the return type of a gcc2
3680 builtin and then its argument prototype would still apply. */
3681 char bindtextdomain();
3682
3683 int main() {
3684 bindtextdomain()
3685 ; return 0; }
3686 EOF
3687 if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3688 rm -rf conftest*
3689 eval "ac_cv_lib_$ac_lib_var=yes"
3690 else
3691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
3693 rm -rf conftest*
3694 eval "ac_cv_lib_$ac_lib_var=no"
3695 fi
3696 rm -f conftest*
3697 LIBS="$ac_save_LIBS"
3698
3699 fi
3700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3701 echo "$ac_t""yes" 1>&6
3702 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3703 echo "configure:3704: checking for gettext in libintl" >&5
3704 if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then
3705 echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710
3711 int main() {
3712 return (int) gettext ("")
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3716 rm -rf conftest*
3717 gt_cv_func_gettext_libintl=yes
3718 else
3719 echo "configure: failed program was:" >&5
3720 cat conftest.$ac_ext >&5
3721 rm -rf conftest*
3722 gt_cv_func_gettext_libintl=no
3723 fi
3724 rm -f conftest*
3725 fi
3726
3727 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3728 else
3729 echo "$ac_t""no" 1>&6
3730 fi
3731
3732 fi
3733
3734 if test "$gt_cv_func_gettext_libc" = "yes" \
3735 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3736 cat >> confdefs.h <<\EOF
3737 #define HAVE_GETTEXT 1
3738 EOF
3739
3740 # Extract the first word of "msgfmt", so it can be a program name with args.
3741 set dummy msgfmt; ac_word=$2
3742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3743 echo "configure:3744: checking for $ac_word" >&5
3744 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
3745 echo $ac_n "(cached) $ac_c" 1>&6
3746 else
3747 case "$MSGFMT" in
3748 /*)
3749 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3750 ;;
3751 *)
3752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3753 for ac_dir in $PATH; do
3754 test -z "$ac_dir" && ac_dir=.
3755 if test -f $ac_dir/$ac_word; then
3756 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3757 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3758 break
3759 fi
3760 fi
3761 done
3762 IFS="$ac_save_ifs"
3763 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3764 ;;
3765 esac
3766 fi
3767 MSGFMT="$ac_cv_path_MSGFMT"
3768 if test -n "$MSGFMT"; then
3769 echo "$ac_t""$MSGFMT" 1>&6
3770 else
3771 echo "$ac_t""no" 1>&6
3772 fi
3773 if test "$MSGFMT" != "no"; then
3774 for ac_func in dcgettext
3775 do
3776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3777 echo "configure:3778: checking for $ac_func" >&5
3778 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3779 echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 /* System header to define __stub macros and hopefully few prototypes,
3785 which can conflict with char $ac_func(); below. */
3786 #include <assert.h>
3787 /* Override any gcc2 internal prototype to avoid an error. */
3788 /* We use char because int might match the return type of a gcc2
3789 builtin and then its argument prototype would still apply. */
3790 char $ac_func();
3791 char (*f)();
3792
3793 int main() {
3794
3795 /* The GNU C library defines this for functions which it implements
3796 to always fail with ENOSYS. Some functions are actually named
3797 something starting with __ and the normal name is an alias. */
3798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3799 choke me
3800 #else
3801 f = $ac_func;
3802 #endif
3803
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3807 rm -rf conftest*
3808 eval "ac_cv_func_$ac_func=yes"
3809 else
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3812 rm -rf conftest*
3813 eval "ac_cv_func_$ac_func=no"
3814 fi
3815 rm -f conftest*
3816 fi
3817
3818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3819 echo "$ac_t""yes" 1>&6
3820 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3821 cat >> confdefs.h <<EOF
3822 #define $ac_tr_func 1
3823 EOF
3824
3825 else
3826 echo "$ac_t""no" 1>&6
3827 fi
3828 done
3829
3830 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3831 set dummy gmsgfmt; ac_word=$2
3832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3833 echo "configure:3834: checking for $ac_word" >&5
3834 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
3835 echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837 case "$GMSGFMT" in
3838 /*)
3839 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3840 ;;
3841 ?:/*)
3842 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3843 ;;
3844 *)
3845 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3846 ac_dummy="$PATH"
3847 for ac_dir in $ac_dummy; do
3848 test -z "$ac_dir" && ac_dir=.
3849 if test -f $ac_dir/$ac_word; then
3850 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3851 break
3852 fi
3853 done
3854 IFS="$ac_save_ifs"
3855 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3856 ;;
3857 esac
3858 fi
3859 GMSGFMT="$ac_cv_path_GMSGFMT"
3860 if test -n "$GMSGFMT"; then
3861 echo "$ac_t""$GMSGFMT" 1>&6
3862 else
3863 echo "$ac_t""no" 1>&6
3864 fi
3865
3866 # Extract the first word of "xgettext", so it can be a program name with args.
3867 set dummy xgettext; ac_word=$2
3868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3869 echo "configure:3870: checking for $ac_word" >&5
3870 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873 case "$XGETTEXT" in
3874 /*)
3875 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3876 ;;
3877 *)
3878 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3879 for ac_dir in $PATH; do
3880 test -z "$ac_dir" && ac_dir=.
3881 if test -f $ac_dir/$ac_word; then
3882 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3883 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3884 break
3885 fi
3886 fi
3887 done
3888 IFS="$ac_save_ifs"
3889 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3890 ;;
3891 esac
3892 fi
3893 XGETTEXT="$ac_cv_path_XGETTEXT"
3894 if test -n "$XGETTEXT"; then
3895 echo "$ac_t""$XGETTEXT" 1>&6
3896 else
3897 echo "$ac_t""no" 1>&6
3898 fi
3899
3900 cat > conftest.$ac_ext <<EOF
3901 #line 3902 "configure"
3902 #include "confdefs.h"
3903
3904 int main() {
3905 extern int _nl_msg_cat_cntr;
3906 return _nl_msg_cat_cntr
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3910 rm -rf conftest*
3911 CATOBJEXT=.gmo
3912 DATADIRNAME=share
3913 else
3914 echo "configure: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3916 rm -rf conftest*
3917 CATOBJEXT=.mo
3918 DATADIRNAME=lib
3919 fi
3920 rm -f conftest*
3921 INSTOBJEXT=.mo
3922 fi
3923 fi
3924
3925 else
3926 echo "$ac_t""no" 1>&6
3927 fi
3928
3929
3930
3931 if test "$CATOBJEXT" = "NONE"; then
3932 nls_cv_use_gnu_gettext=yes
3933 fi
3934 fi
3935
3936 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3937 INTLOBJS="\$(GETTOBJS)"
3938 # Extract the first word of "msgfmt", so it can be a program name with args.
3939 set dummy msgfmt; ac_word=$2
3940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3941 echo "configure:3942: checking for $ac_word" >&5
3942 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then
3943 echo $ac_n "(cached) $ac_c" 1>&6
3944 else
3945 case "$MSGFMT" in
3946 /*)
3947 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3948 ;;
3949 *)
3950 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3951 for ac_dir in $PATH; do
3952 test -z "$ac_dir" && ac_dir=.
3953 if test -f $ac_dir/$ac_word; then
3954 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3955 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3956 break
3957 fi
3958 fi
3959 done
3960 IFS="$ac_save_ifs"
3961 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3962 ;;
3963 esac
3964 fi
3965 MSGFMT="$ac_cv_path_MSGFMT"
3966 if test -n "$MSGFMT"; then
3967 echo "$ac_t""$MSGFMT" 1>&6
3968 else
3969 echo "$ac_t""no" 1>&6
3970 fi
3971
3972 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3973 set dummy gmsgfmt; ac_word=$2
3974 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3975 echo "configure:3976: checking for $ac_word" >&5
3976 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then
3977 echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979 case "$GMSGFMT" in
3980 /*)
3981 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3982 ;;
3983 ?:/*)
3984 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3985 ;;
3986 *)
3987 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3988 ac_dummy="$PATH"
3989 for ac_dir in $ac_dummy; do
3990 test -z "$ac_dir" && ac_dir=.
3991 if test -f $ac_dir/$ac_word; then
3992 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3993 break
3994 fi
3995 done
3996 IFS="$ac_save_ifs"
3997 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3998 ;;
3999 esac
4000 fi
4001 GMSGFMT="$ac_cv_path_GMSGFMT"
4002 if test -n "$GMSGFMT"; then
4003 echo "$ac_t""$GMSGFMT" 1>&6
4004 else
4005 echo "$ac_t""no" 1>&6
4006 fi
4007
4008 # Extract the first word of "xgettext", so it can be a program name with args.
4009 set dummy xgettext; ac_word=$2
4010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4011 echo "configure:4012: checking for $ac_word" >&5
4012 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then
4013 echo $ac_n "(cached) $ac_c" 1>&6
4014 else
4015 case "$XGETTEXT" in
4016 /*)
4017 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4018 ;;
4019 *)
4020 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4021 for ac_dir in $PATH; do
4022 test -z "$ac_dir" && ac_dir=.
4023 if test -f $ac_dir/$ac_word; then
4024 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4025 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4026 break
4027 fi
4028 fi
4029 done
4030 IFS="$ac_save_ifs"
4031 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4032 ;;
4033 esac
4034 fi
4035 XGETTEXT="$ac_cv_path_XGETTEXT"
4036 if test -n "$XGETTEXT"; then
4037 echo "$ac_t""$XGETTEXT" 1>&6
4038 else
4039 echo "$ac_t""no" 1>&6
4040 fi
4041
4042
4043 USE_INCLUDED_LIBINTL=yes
4044 CATOBJEXT=.gmo
4045 INSTOBJEXT=.mo
4046 DATADIRNAME=share
4047 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4048 INTLLIBS=$INTLDEPS
4049 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4050 nls_cv_header_intl=libintl.h
4051 nls_cv_header_libgt=libgettext.h
4052 fi
4053
4054 if test "$XGETTEXT" != ":"; then
4055 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4056 : ;
4057 else
4058 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4059 XGETTEXT=":"
4060 fi
4061 fi
4062
4063 # We need to process the po/ directory.
4064 POSUB=po
4065 else
4066 DATADIRNAME=share
4067 nls_cv_header_intl=libintl.h
4068 nls_cv_header_libgt=libgettext.h
4069 fi
4070
4071 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4072 # because some of the sources are only built for this goal.
4073 if test "$PACKAGE" = gettext; then
4074 USE_NLS=yes
4075 USE_INCLUDED_LIBINTL=yes
4076 fi
4077
4078 for lang in $ALL_LINGUAS; do
4079 GMOFILES="$GMOFILES $lang.gmo"
4080 POFILES="$POFILES $lang.po"
4081 done
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096 if test "x$CATOBJEXT" != "x"; then
4097 if test "x$ALL_LINGUAS" = "x"; then
4098 LINGUAS=
4099 else
4100 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4101 echo "configure:4102: checking for catalogs to be installed" >&5
4102 NEW_LINGUAS=
4103 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4104 case "$ALL_LINGUAS" in
4105 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4106 esac
4107 done
4108 LINGUAS=$NEW_LINGUAS
4109 echo "$ac_t""$LINGUAS" 1>&6
4110 fi
4111
4112 if test -n "$LINGUAS"; then
4113 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4114 fi
4115 fi
4116
4117 if test $ac_cv_header_locale_h = yes; then
4118 INCLUDE_LOCALE_H="#include <locale.h>"
4119 else
4120 INCLUDE_LOCALE_H="\
4121 /* The system does not provide the header <locale.h>. Take care yourself. */"
4122 fi
4123
4124
4125 if test -f $srcdir/po2tbl.sed.in; then
4126 if test "$CATOBJEXT" = ".cat"; then
4127 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4128 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4129 echo "configure:4130: checking for linux/version.h" >&5
4130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4131 echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <linux/version.h>
4137 EOF
4138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4139 { (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4141 if test -z "$ac_err"; then
4142 rm -rf conftest*
4143 eval "ac_cv_header_$ac_safe=yes"
4144 else
4145 echo "$ac_err" >&5
4146 echo "configure: failed program was:" >&5
4147 cat conftest.$ac_ext >&5
4148 rm -rf conftest*
4149 eval "ac_cv_header_$ac_safe=no"
4150 fi
4151 rm -f conftest*
4152 fi
4153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4154 echo "$ac_t""yes" 1>&6
4155 msgformat=linux
4156 else
4157 echo "$ac_t""no" 1>&6
4158 msgformat=xopen
4159 fi
4160
4161
4162 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4163 fi
4164 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4165 $srcdir/po2tbl.sed.in > po2tbl.sed
4166 fi
4167
4168 if test "$PACKAGE" = "gettext"; then
4169 GT_NO="#NO#"
4170 GT_YES=
4171 else
4172 GT_NO=
4173 GT_YES="#YES#"
4174 fi
4175
4176
4177
4178 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4179
4180
4181 l=
4182
4183
4184 if test -d $srcdir/po; then
4185 test -d po || mkdir po
4186 if test "x$srcdir" != "x."; then
4187 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4188 posrcprefix="$srcdir/"
4189 else
4190 posrcprefix="../$srcdir/"
4191 fi
4192 else
4193 posrcprefix="../"
4194 fi
4195 rm -f po/POTFILES
4196 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4197 < $srcdir/po/POTFILES.in > po/POTFILES
4198 fi
4199
4200
4201 # Permit host specific settings.
4202 . ${srcdir}/configure.host
4203
4204
4205 # Find a good install program. We prefer a C program (faster),
4206 # so one script is as good as another. But avoid the broken or
4207 # incompatible versions:
4208 # SysV /etc/install, /usr/sbin/install
4209 # SunOS /usr/etc/install
4210 # IRIX /sbin/install
4211 # AIX /bin/install
4212 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4213 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4214 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4215 # ./install, which can be erroneously created by make from ./install.sh.
4216 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4217 echo "configure:4218: checking for a BSD compatible install" >&5
4218 if test -z "$INSTALL"; then
4219 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
4220 echo $ac_n "(cached) $ac_c" 1>&6
4221 else
4222 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4223 for ac_dir in $PATH; do
4224 # Account for people who put trailing slashes in PATH elements.
4225 case "$ac_dir/" in
4226 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4227 *)
4228 # OSF1 and SCO ODT 3.0 have their own names for install.
4229 # Don't use installbsd from OSF since it installs stuff as root
4230 # by default.
4231 for ac_prog in ginstall scoinst install; do
4232 if test -f $ac_dir/$ac_prog; then
4233 if test $ac_prog = install &&
4234 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4235 # AIX install. It has an incompatible calling convention.
4236 :
4237 elif test $ac_prog = install &&
4238 grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
4239 # program-specific install script used by HP pwplus--don't use.
4240 :
4241 else
4242 ac_cv_path_install="$ac_dir/$ac_prog -c"
4243 break 2
4244 fi
4245 fi
4246 done
4247 ;;
4248 esac
4249 done
4250 IFS="$ac_save_IFS"
4251
4252 fi
4253 if test "${ac_cv_path_install+set}" = set; then
4254 INSTALL="$ac_cv_path_install"
4255 else
4256 # As a last resort, use the slow shell script. We don't cache a
4257 # path for INSTALL within a source directory, because that will
4258 # break other packages using the cache if that directory is
4259 # removed, or if the path is relative.
4260 INSTALL="$ac_install_sh"
4261 fi
4262 fi
4263 echo "$ac_t""$INSTALL" 1>&6
4264
4265 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4266 # It thinks the first close brace ends the variable substitution.
4267 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4268
4269 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4270
4271 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4272
4273
4274 BFD_HOST_64BIT_LONG=0
4275 BFD_HOST_64_BIT_DEFINED=0
4276 BFD_HOST_64_BIT=
4277 BFD_HOST_U_64_BIT=
4278 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
4279 BFD_HOST_64BIT_LONG=1
4280 elif test "x${HOST_64BIT_TYPE}" != "x"; then
4281 BFD_HOST_64_BIT_DEFINED=1
4282 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
4283 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
4284 fi
4285
4286
4287
4288
4289
4290 # Put a plausible default for CC_FOR_BUILD in Makefile.
4291 if test -z "$CC_FOR_BUILD"; then
4292 if test "x$cross_compiling" = "xno"; then
4293 CC_FOR_BUILD='$(CC)'
4294 else
4295 CC_FOR_BUILD=gcc
4296 fi
4297 fi
4298
4299 # Also set EXEEXT_FOR_BUILD.
4300 if test "x$cross_compiling" = "xno"; then
4301 EXEEXT_FOR_BUILD='$(EXEEXT)'
4302 else
4303 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4304 echo "configure:4305: checking for build system executable suffix" >&5
4305 if eval "test \"\${bfd_cv_build_exeext+set}\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308 rm -f conftest*
4309 echo 'int main () { return 0; }' > conftest.c
4310 bfd_cv_build_exeext=
4311 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
4312 for file in conftest.*; do
4313 case $file in
4314 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4315 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4316 esac
4317 done
4318 rm -f conftest*
4319 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4320 fi
4321
4322 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4323 EXEEXT_FOR_BUILD=""
4324 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4325 fi
4326
4327
4328 for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
4329 do
4330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4332 echo "configure:4333: checking for $ac_hdr" >&5
4333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4334 echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 #include <$ac_hdr>
4340 EOF
4341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4342 { (eval echo configure:4343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4344 if test -z "$ac_err"; then
4345 rm -rf conftest*
4346 eval "ac_cv_header_$ac_safe=yes"
4347 else
4348 echo "$ac_err" >&5
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4351 rm -rf conftest*
4352 eval "ac_cv_header_$ac_safe=no"
4353 fi
4354 rm -f conftest*
4355 fi
4356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4357 echo "$ac_t""yes" 1>&6
4358 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4359 cat >> confdefs.h <<EOF
4360 #define $ac_tr_hdr 1
4361 EOF
4362
4363 else
4364 echo "$ac_t""no" 1>&6
4365 fi
4366 done
4367
4368 for ac_hdr in fcntl.h sys/file.h sys/time.h
4369 do
4370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4372 echo "configure:4373: checking for $ac_hdr" >&5
4373 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4374 echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376 cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379 #include <$ac_hdr>
4380 EOF
4381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4382 { (eval echo configure:4383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4384 if test -z "$ac_err"; then
4385 rm -rf conftest*
4386 eval "ac_cv_header_$ac_safe=yes"
4387 else
4388 echo "$ac_err" >&5
4389 echo "configure: failed program was:" >&5
4390 cat conftest.$ac_ext >&5
4391 rm -rf conftest*
4392 eval "ac_cv_header_$ac_safe=no"
4393 fi
4394 rm -f conftest*
4395 fi
4396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4397 echo "$ac_t""yes" 1>&6
4398 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4399 cat >> confdefs.h <<EOF
4400 #define $ac_tr_hdr 1
4401 EOF
4402
4403 else
4404 echo "$ac_t""no" 1>&6
4405 fi
4406 done
4407
4408 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4409 echo "configure:4410: checking whether time.h and sys/time.h may both be included" >&5
4410 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
4411 echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413 cat > conftest.$ac_ext <<EOF
4414 #line 4415 "configure"
4415 #include "confdefs.h"
4416 #include <sys/types.h>
4417 #include <sys/time.h>
4418 #include <time.h>
4419 int main() {
4420 struct tm *tp;
4421 ; return 0; }
4422 EOF
4423 if { (eval echo configure:4424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4424 rm -rf conftest*
4425 ac_cv_header_time=yes
4426 else
4427 echo "configure: failed program was:" >&5
4428 cat conftest.$ac_ext >&5
4429 rm -rf conftest*
4430 ac_cv_header_time=no
4431 fi
4432 rm -f conftest*
4433 fi
4434
4435 echo "$ac_t""$ac_cv_header_time" 1>&6
4436 if test $ac_cv_header_time = yes; then
4437 cat >> confdefs.h <<\EOF
4438 #define TIME_WITH_SYS_TIME 1
4439 EOF
4440
4441 fi
4442
4443 ac_header_dirent=no
4444 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4445 do
4446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4447 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4448 echo "configure:4449: checking for $ac_hdr that defines DIR" >&5
4449 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
4451 else
4452 cat > conftest.$ac_ext <<EOF
4453 #line 4454 "configure"
4454 #include "confdefs.h"
4455 #include <sys/types.h>
4456 #include <$ac_hdr>
4457 int main() {
4458 DIR *dirp = 0;
4459 ; return 0; }
4460 EOF
4461 if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4462 rm -rf conftest*
4463 eval "ac_cv_header_dirent_$ac_safe=yes"
4464 else
4465 echo "configure: failed program was:" >&5
4466 cat conftest.$ac_ext >&5
4467 rm -rf conftest*
4468 eval "ac_cv_header_dirent_$ac_safe=no"
4469 fi
4470 rm -f conftest*
4471 fi
4472 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4473 echo "$ac_t""yes" 1>&6
4474 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4475 cat >> confdefs.h <<EOF
4476 #define $ac_tr_hdr 1
4477 EOF
4478 ac_header_dirent=$ac_hdr; break
4479 else
4480 echo "$ac_t""no" 1>&6
4481 fi
4482 done
4483 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4484 if test $ac_header_dirent = dirent.h; then
4485 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4486 echo "configure:4487: checking for opendir in -ldir" >&5
4487 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4489 echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491 ac_save_LIBS="$LIBS"
4492 LIBS="-ldir $LIBS"
4493 cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496 /* Override any gcc2 internal prototype to avoid an error. */
4497 /* We use char because int might match the return type of a gcc2
4498 builtin and then its argument prototype would still apply. */
4499 char opendir();
4500
4501 int main() {
4502 opendir()
4503 ; return 0; }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506 rm -rf conftest*
4507 eval "ac_cv_lib_$ac_lib_var=yes"
4508 else
4509 echo "configure: failed program was:" >&5
4510 cat conftest.$ac_ext >&5
4511 rm -rf conftest*
4512 eval "ac_cv_lib_$ac_lib_var=no"
4513 fi
4514 rm -f conftest*
4515 LIBS="$ac_save_LIBS"
4516
4517 fi
4518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4519 echo "$ac_t""yes" 1>&6
4520 LIBS="$LIBS -ldir"
4521 else
4522 echo "$ac_t""no" 1>&6
4523 fi
4524
4525 else
4526 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4527 echo "configure:4528: checking for opendir in -lx" >&5
4528 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4530 echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532 ac_save_LIBS="$LIBS"
4533 LIBS="-lx $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* Override any gcc2 internal prototype to avoid an error. */
4538 /* We use char because int might match the return type of a gcc2
4539 builtin and then its argument prototype would still apply. */
4540 char opendir();
4541
4542 int main() {
4543 opendir()
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547 rm -rf conftest*
4548 eval "ac_cv_lib_$ac_lib_var=yes"
4549 else
4550 echo "configure: failed program was:" >&5
4551 cat conftest.$ac_ext >&5
4552 rm -rf conftest*
4553 eval "ac_cv_lib_$ac_lib_var=no"
4554 fi
4555 rm -f conftest*
4556 LIBS="$ac_save_LIBS"
4557
4558 fi
4559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4560 echo "$ac_t""yes" 1>&6
4561 LIBS="$LIBS -lx"
4562 else
4563 echo "$ac_t""no" 1>&6
4564 fi
4565
4566 fi
4567
4568 for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
4569 do
4570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4571 echo "configure:4572: checking for $ac_func" >&5
4572 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575 cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578 /* System header to define __stub macros and hopefully few prototypes,
4579 which can conflict with char $ac_func(); below. */
4580 #include <assert.h>
4581 /* Override any gcc2 internal prototype to avoid an error. */
4582 /* We use char because int might match the return type of a gcc2
4583 builtin and then its argument prototype would still apply. */
4584 char $ac_func();
4585 char (*f)();
4586
4587 int main() {
4588
4589 /* The GNU C library defines this for functions which it implements
4590 to always fail with ENOSYS. Some functions are actually named
4591 something starting with __ and the normal name is an alias. */
4592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4593 choke me
4594 #else
4595 f = $ac_func;
4596 #endif
4597
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4601 rm -rf conftest*
4602 eval "ac_cv_func_$ac_func=yes"
4603 else
4604 echo "configure: failed program was:" >&5
4605 cat conftest.$ac_ext >&5
4606 rm -rf conftest*
4607 eval "ac_cv_func_$ac_func=no"
4608 fi
4609 rm -f conftest*
4610 fi
4611
4612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4613 echo "$ac_t""yes" 1>&6
4614 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4615 cat >> confdefs.h <<EOF
4616 #define $ac_tr_func 1
4617 EOF
4618
4619 else
4620 echo "$ac_t""no" 1>&6
4621 fi
4622 done
4623
4624
4625
4626 case "${host}" in
4627 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
4628 cat >> confdefs.h <<\EOF
4629 #define USE_BINARY_FOPEN 1
4630 EOF
4631 ;;
4632 esac
4633
4634 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4635 echo "configure:4636: checking whether strstr must be declared" >&5
4636 if eval "test \"\${bfd_cv_decl_needed_strstr+set}\" = set"; then
4637 echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639 cat > conftest.$ac_ext <<EOF
4640 #line 4641 "configure"
4641 #include "confdefs.h"
4642
4643 #include <stdio.h>
4644 #ifdef HAVE_STRING_H
4645 #include <string.h>
4646 #else
4647 #ifdef HAVE_STRINGS_H
4648 #include <strings.h>
4649 #endif
4650 #endif
4651 #ifdef HAVE_STDLIB_H
4652 #include <stdlib.h>
4653 #endif
4654 #ifdef HAVE_UNISTD_H
4655 #include <unistd.h>
4656 #endif
4657 int main() {
4658 char *(*pfn) = (char *(*)) strstr
4659 ; return 0; }
4660 EOF
4661 if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4662 rm -rf conftest*
4663 bfd_cv_decl_needed_strstr=no
4664 else
4665 echo "configure: failed program was:" >&5
4666 cat conftest.$ac_ext >&5
4667 rm -rf conftest*
4668 bfd_cv_decl_needed_strstr=yes
4669 fi
4670 rm -f conftest*
4671 fi
4672
4673 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4674 if test $bfd_cv_decl_needed_strstr = yes; then
4675 cat >> confdefs.h <<\EOF
4676 #define NEED_DECLARATION_STRSTR 1
4677 EOF
4678
4679 fi
4680
4681 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4682 echo "configure:4683: checking whether malloc must be declared" >&5
4683 if eval "test \"\${bfd_cv_decl_needed_malloc+set}\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686 cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4689
4690 #include <stdio.h>
4691 #ifdef HAVE_STRING_H
4692 #include <string.h>
4693 #else
4694 #ifdef HAVE_STRINGS_H
4695 #include <strings.h>
4696 #endif
4697 #endif
4698 #ifdef HAVE_STDLIB_H
4699 #include <stdlib.h>
4700 #endif
4701 #ifdef HAVE_UNISTD_H
4702 #include <unistd.h>
4703 #endif
4704 int main() {
4705 char *(*pfn) = (char *(*)) malloc
4706 ; return 0; }
4707 EOF
4708 if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4709 rm -rf conftest*
4710 bfd_cv_decl_needed_malloc=no
4711 else
4712 echo "configure: failed program was:" >&5
4713 cat conftest.$ac_ext >&5
4714 rm -rf conftest*
4715 bfd_cv_decl_needed_malloc=yes
4716 fi
4717 rm -f conftest*
4718 fi
4719
4720 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4721 if test $bfd_cv_decl_needed_malloc = yes; then
4722 cat >> confdefs.h <<\EOF
4723 #define NEED_DECLARATION_MALLOC 1
4724 EOF
4725
4726 fi
4727
4728 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4729 echo "configure:4730: checking whether realloc must be declared" >&5
4730 if eval "test \"\${bfd_cv_decl_needed_realloc+set}\" = set"; then
4731 echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736
4737 #include <stdio.h>
4738 #ifdef HAVE_STRING_H
4739 #include <string.h>
4740 #else
4741 #ifdef HAVE_STRINGS_H
4742 #include <strings.h>
4743 #endif
4744 #endif
4745 #ifdef HAVE_STDLIB_H
4746 #include <stdlib.h>
4747 #endif
4748 #ifdef HAVE_UNISTD_H
4749 #include <unistd.h>
4750 #endif
4751 int main() {
4752 char *(*pfn) = (char *(*)) realloc
4753 ; return 0; }
4754 EOF
4755 if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4756 rm -rf conftest*
4757 bfd_cv_decl_needed_realloc=no
4758 else
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 bfd_cv_decl_needed_realloc=yes
4763 fi
4764 rm -f conftest*
4765 fi
4766
4767 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4768 if test $bfd_cv_decl_needed_realloc = yes; then
4769 cat >> confdefs.h <<\EOF
4770 #define NEED_DECLARATION_REALLOC 1
4771 EOF
4772
4773 fi
4774
4775 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4776 echo "configure:4777: checking whether free must be declared" >&5
4777 if eval "test \"\${bfd_cv_decl_needed_free+set}\" = set"; then
4778 echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780 cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783
4784 #include <stdio.h>
4785 #ifdef HAVE_STRING_H
4786 #include <string.h>
4787 #else
4788 #ifdef HAVE_STRINGS_H
4789 #include <strings.h>
4790 #endif
4791 #endif
4792 #ifdef HAVE_STDLIB_H
4793 #include <stdlib.h>
4794 #endif
4795 #ifdef HAVE_UNISTD_H
4796 #include <unistd.h>
4797 #endif
4798 int main() {
4799 char *(*pfn) = (char *(*)) free
4800 ; return 0; }
4801 EOF
4802 if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4803 rm -rf conftest*
4804 bfd_cv_decl_needed_free=no
4805 else
4806 echo "configure: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4808 rm -rf conftest*
4809 bfd_cv_decl_needed_free=yes
4810 fi
4811 rm -f conftest*
4812 fi
4813
4814 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4815 if test $bfd_cv_decl_needed_free = yes; then
4816 cat >> confdefs.h <<\EOF
4817 #define NEED_DECLARATION_FREE 1
4818 EOF
4819
4820 fi
4821
4822 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4823 echo "configure:4824: checking whether getenv must be declared" >&5
4824 if eval "test \"\${bfd_cv_decl_needed_getenv+set}\" = set"; then
4825 echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827 cat > conftest.$ac_ext <<EOF
4828 #line 4829 "configure"
4829 #include "confdefs.h"
4830
4831 #include <stdio.h>
4832 #ifdef HAVE_STRING_H
4833 #include <string.h>
4834 #else
4835 #ifdef HAVE_STRINGS_H
4836 #include <strings.h>
4837 #endif
4838 #endif
4839 #ifdef HAVE_STDLIB_H
4840 #include <stdlib.h>
4841 #endif
4842 #ifdef HAVE_UNISTD_H
4843 #include <unistd.h>
4844 #endif
4845 int main() {
4846 char *(*pfn) = (char *(*)) getenv
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4850 rm -rf conftest*
4851 bfd_cv_decl_needed_getenv=no
4852 else
4853 echo "configure: failed program was:" >&5
4854 cat conftest.$ac_ext >&5
4855 rm -rf conftest*
4856 bfd_cv_decl_needed_getenv=yes
4857 fi
4858 rm -f conftest*
4859 fi
4860
4861 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4862 if test $bfd_cv_decl_needed_getenv = yes; then
4863 cat >> confdefs.h <<\EOF
4864 #define NEED_DECLARATION_GETENV 1
4865 EOF
4866
4867 fi
4868
4869
4870 # If we are configured native, pick a core file support file.
4871 COREFILE=
4872 COREFLAG=
4873 TRAD_HEADER=
4874 if test "${target}" = "${host}"; then
4875 case "${host}" in
4876 alpha*-*-linux-gnu*)
4877 COREFILE=trad-core.lo
4878 TRAD_HEADER='"hosts/alphalinux.h"'
4879 ;;
4880 alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
4881 alpha*-*-*) COREFILE=osf-core.lo ;;
4882 arm-*-riscix) COREFILE=trad-core.lo ;;
4883 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
4884 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
4885 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
4886 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
4887 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
4888 i370-*-*)
4889 COREFILE=trad-core.lo
4890 TRAD_HEADER='"hosts/i370linux.h"'
4891 ;;
4892
4893 i[3456]86-sequent-bsd*)
4894 COREFILE=trad-core.lo
4895 TRAD_HEADER='"hosts/symmetry.h"'
4896 ;;
4897 i[3456]86-sequent-sysv4*) ;;
4898 i[3456]86-sequent-sysv*)
4899 COREFILE=trad-core.lo
4900 TRAD_HEADER='"hosts/symmetry.h"'
4901 ;;
4902 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
4903 COREFILE=trad-core.lo
4904 TRAD_HEADER='"hosts/i386bsd.h"'
4905 ;;
4906 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
4907 COREFILE=netbsd-core.lo
4908 ;;
4909 i[3456]86-esix-sysv3*)
4910 COREFILE=trad-core.lo
4911 TRAD_HEADER='"hosts/esix.h"'
4912 ;;
4913 i[3456]86-*-sco3.2v5*)
4914 COREFILE=sco5-core.lo
4915 ;;
4916 i[3456]86-*-sco* | i[3456]86-*-isc*)
4917 COREFILE=trad-core.lo
4918 TRAD_HEADER='"hosts/i386sco.h"'
4919 ;;
4920 i[3456]86-*-mach3*)
4921 COREFILE=trad-core.lo
4922 TRAD_HEADER='"hosts/i386mach3.h"'
4923 ;;
4924 i[3456]86-*-linux-gnu*)
4925 COREFILE=trad-core.lo
4926 TRAD_HEADER='"hosts/i386linux.h"'
4927 ;;
4928 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
4929 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
4930 i860-*-mach3* | i860-*-osf1*)
4931 COREFILE=trad-core.lo
4932 TRAD_HEADER='"hosts/i860mach3.h"'
4933 ;;
4934 mips-dec-bsd*)
4935 COREFILE=trad-core.lo
4936 TRAD_HEADER='"hosts/mipsbsd.h"'
4937 ;;
4938 mips-dec-mach3*)
4939 COREFILE=trad-core.lo
4940 TRAD_HEADER='"hosts/mipsmach3.h"'
4941 ;;
4942 mips-*-netbsd* | mips*-*-openbsd*)
4943 COREFILE=netbsd-core.lo
4944 ;;
4945 mips-dec-*)
4946 COREFILE=trad-core.lo
4947 TRAD_HEADER='"hosts/decstation.h"'
4948 ;;
4949 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
4950 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
4951 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
4952 mips-*-mach3*)
4953 COREFILE=trad-core.lo
4954 TRAD_HEADER='"hosts/mipsmach3.h"'
4955 ;;
4956 mips-*-sysv4*) ;;
4957 mips-*-sysv* | mips-*-riscos*)
4958 COREFILE=trad-core.lo
4959 TRAD_HEADER='"hosts/riscos.h"'
4960 ;;
4961 mips-sony-bsd*)
4962 COREFILE=trad-core.lo
4963 TRAD_HEADER='"hosts/news-mips.h"'
4964 ;;
4965 m68*-bull*-sysv*)
4966 COREFILE=trad-core.lo
4967 TRAD_HEADER='"hosts/dpx2.h"'
4968 ;;
4969 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
4970 m68*-hp-bsd*)
4971 COREFILE=trad-core.lo
4972 TRAD_HEADER='"hosts/hp300bsd.h"'
4973 ;;
4974 m68*-*-linux-gnu*)
4975 COREFILE=trad-core.lo
4976 TRAD_HEADER='"hosts/m68klinux.h"'
4977 ;;
4978 m68*-motorola-sysv*)
4979 COREFILE=trad-core.lo
4980 TRAD_HEADER='"hosts/delta68.h"'
4981 ;;
4982 m68*-sony-*)
4983 COREFILE=trad-core.lo
4984 TRAD_HEADER='"hosts/news.h"'
4985 ;;
4986 m68*-*-netbsd* | m68*-*-openbsd*)
4987 COREFILE=netbsd-core.lo
4988 ;;
4989 m68*-apple-aux*)
4990 COREFILE=trad-core.lo
4991 TRAD_HEADER='"hosts/m68kaux.h"'
4992 ;;
4993 m88*-*-sysv4*) ;;
4994 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
4995 m88*-*-mach3*)
4996 COREFILE=trad-core.lo
4997 TRAD_HEADER='"hosts/m88kmach3.h"'
4998 ;;
4999 ns32k-pc532-mach)
5000 COREFILE=trad-core.lo
5001 TRAD_HEADER='"hosts/pc532mach.h"'
5002 ;;
5003 ns32k-*-netbsd* | ns32k-*-openbsd*)
5004 COREFILE=netbsd-core.lo
5005 ;;
5006 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
5007 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
5008 rs6000-*-*) COREFILE=rs6000-core.lo ;;
5009 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
5010 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
5011 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
5012 powerpc-*-beos*) ;;
5013 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
5014 sparc-*-netbsd* | sparc-*-openbsd*)
5015 COREFILE=netbsd-core.lo
5016 ;;
5017 tahoe-*-*)
5018 COREFILE=trad-core.lo
5019 TRAD_HEADER='"hosts/tahoe.h"'
5020 ;;
5021 vax-*-ultrix2*)
5022 COREFILE=trad-core.lo
5023 TRAD_HEADER='"hosts/vaxult2.h"'
5024 ;;
5025 vax-*-ultrix*)
5026 COREFILE=trad-core.lo
5027 TRAD_HEADER='"hosts/vaxult2.h"'
5028 ;;
5029 vax-*-*)
5030 COREFILE=trad-core.lo
5031 TRAD_HEADER='"hosts/vaxbsd.h"'
5032 ;;
5033 esac
5034
5035 case "$COREFILE" in
5036 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
5037 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
5038 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
5039 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
5040 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
5041 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
5042 osf-core.lo) COREFLAG=-DOSF_CORE ;;
5043 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
5044 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
5045 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
5046 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
5047 esac
5048
5049 # ELF corefile support has several flavors, but all of
5050 # them use something called <sys/procfs.h>
5051 for ac_hdr in sys/procfs.h
5052 do
5053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5055 echo "configure:5056: checking for $ac_hdr" >&5
5056 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5057 echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059 cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062 #include <$ac_hdr>
5063 EOF
5064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5065 { (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5067 if test -z "$ac_err"; then
5068 rm -rf conftest*
5069 eval "ac_cv_header_$ac_safe=yes"
5070 else
5071 echo "$ac_err" >&5
5072 echo "configure: failed program was:" >&5
5073 cat conftest.$ac_ext >&5
5074 rm -rf conftest*
5075 eval "ac_cv_header_$ac_safe=no"
5076 fi
5077 rm -f conftest*
5078 fi
5079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5080 echo "$ac_t""yes" 1>&6
5081 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5082 cat >> confdefs.h <<EOF
5083 #define $ac_tr_hdr 1
5084 EOF
5085
5086 else
5087 echo "$ac_t""no" 1>&6
5088 fi
5089 done
5090
5091 if test "$ac_cv_header_sys_procfs_h" = yes; then
5092 echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
5093 echo "configure:5094: checking for prstatus_t in sys/procfs.h" >&5
5094 if eval "test \"\${bfd_cv_have_sys_procfs_type_prstatus_t+set}\" = set"; then
5095 echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 #include <sys/procfs.h>
5101 int main() {
5102 prstatus_t avar
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5106 rm -rf conftest*
5107 bfd_cv_have_sys_procfs_type_prstatus_t=yes
5108 else
5109 echo "configure: failed program was:" >&5
5110 cat conftest.$ac_ext >&5
5111 rm -rf conftest*
5112 bfd_cv_have_sys_procfs_type_prstatus_t=no
5113
5114 fi
5115 rm -f conftest*
5116 fi
5117
5118 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
5119 cat >> confdefs.h <<\EOF
5120 #define HAVE_PRSTATUS_T 1
5121 EOF
5122
5123 fi
5124 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
5125
5126 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
5127 echo "configure:5128: checking for prstatus_t.pr_who in sys/procfs.h" >&5
5128 if eval "test \"\${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}\" = set"; then
5129 echo $ac_n "(cached) $ac_c" 1>&6
5130 else
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134 #include <sys/procfs.h>
5135 int main() {
5136 prstatus_t avar; void* aref = (void*) &avar.pr_who
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5140 rm -rf conftest*
5141 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
5142 else
5143 echo "configure: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 rm -rf conftest*
5146 bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
5147
5148 fi
5149 rm -f conftest*
5150 fi
5151
5152 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
5153 cat >> confdefs.h <<\EOF
5154 #define HAVE_PRSTATUS_T_PR_WHO 1
5155 EOF
5156
5157 fi
5158 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
5159
5160 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5161 echo "configure:5162: checking for pstatus_t in sys/procfs.h" >&5
5162 if eval "test \"\${bfd_cv_have_sys_procfs_type_pstatus_t+set}\" = set"; then
5163 echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 #include <sys/procfs.h>
5169 int main() {
5170 pstatus_t avar
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5174 rm -rf conftest*
5175 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5176 else
5177 echo "configure: failed program was:" >&5
5178 cat conftest.$ac_ext >&5
5179 rm -rf conftest*
5180 bfd_cv_have_sys_procfs_type_pstatus_t=no
5181
5182 fi
5183 rm -f conftest*
5184 fi
5185
5186 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5187 cat >> confdefs.h <<\EOF
5188 #define HAVE_PSTATUS_T 1
5189 EOF
5190
5191 fi
5192 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5193
5194 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
5195 echo "configure:5196: checking for prpsinfo_t in sys/procfs.h" >&5
5196 if eval "test \"\${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}\" = set"; then
5197 echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 #include <sys/procfs.h>
5203 int main() {
5204 prpsinfo_t avar
5205 ; return 0; }
5206 EOF
5207 if { (eval echo configure:5208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5208 rm -rf conftest*
5209 bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
5210 else
5211 echo "configure: failed program was:" >&5
5212 cat conftest.$ac_ext >&5
5213 rm -rf conftest*
5214 bfd_cv_have_sys_procfs_type_prpsinfo_t=no
5215
5216 fi
5217 rm -f conftest*
5218 fi
5219
5220 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
5221 cat >> confdefs.h <<\EOF
5222 #define HAVE_PRPSINFO_T 1
5223 EOF
5224
5225 fi
5226 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
5227
5228 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
5229 echo "configure:5230: checking for psinfo_t in sys/procfs.h" >&5
5230 if eval "test \"\${bfd_cv_have_sys_procfs_type_psinfo_t+set}\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 #include <sys/procfs.h>
5237 int main() {
5238 psinfo_t avar
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242 rm -rf conftest*
5243 bfd_cv_have_sys_procfs_type_psinfo_t=yes
5244 else
5245 echo "configure: failed program was:" >&5
5246 cat conftest.$ac_ext >&5
5247 rm -rf conftest*
5248 bfd_cv_have_sys_procfs_type_psinfo_t=no
5249
5250 fi
5251 rm -f conftest*
5252 fi
5253
5254 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
5255 cat >> confdefs.h <<\EOF
5256 #define HAVE_PSINFO_T 1
5257 EOF
5258
5259 fi
5260 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
5261
5262 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
5263 echo "configure:5264: checking for lwpstatus_t in sys/procfs.h" >&5
5264 if eval "test \"\${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}\" = set"; then
5265 echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267 cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270 #include <sys/procfs.h>
5271 int main() {
5272 lwpstatus_t avar
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5276 rm -rf conftest*
5277 bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
5278 else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 bfd_cv_have_sys_procfs_type_lwpstatus_t=no
5283
5284 fi
5285 rm -f conftest*
5286 fi
5287
5288 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
5289 cat >> confdefs.h <<\EOF
5290 #define HAVE_LWPSTATUS_T 1
5291 EOF
5292
5293 fi
5294 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
5295
5296 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
5297 echo "configure:5298: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
5298 if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}\" = set"; then
5299 echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 #include <sys/procfs.h>
5305 int main() {
5306 lwpstatus_t avar; void* aref = (void*) &avar.pr_context
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5310 rm -rf conftest*
5311 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
5312 else
5313 echo "configure: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 rm -rf conftest*
5316 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
5317
5318 fi
5319 rm -f conftest*
5320 fi
5321
5322 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
5323 cat >> confdefs.h <<\EOF
5324 #define HAVE_LWPSTATUS_T_PR_CONTEXT 1
5325 EOF
5326
5327 fi
5328 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
5329
5330 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
5331 echo "configure:5332: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
5332 if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}\" = set"; then
5333 echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335 cat > conftest.$ac_ext <<EOF
5336 #line 5337 "configure"
5337 #include "confdefs.h"
5338 #include <sys/procfs.h>
5339 int main() {
5340 lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5344 rm -rf conftest*
5345 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
5346 else
5347 echo "configure: failed program was:" >&5
5348 cat conftest.$ac_ext >&5
5349 rm -rf conftest*
5350 bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
5351
5352 fi
5353 rm -f conftest*
5354 fi
5355
5356 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
5357 cat >> confdefs.h <<\EOF
5358 #define HAVE_LWPSTATUS_T_PR_REG 1
5359 EOF
5360
5361 fi
5362 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
5363
5364 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5365 echo "configure:5366: checking for win32_pstatus_t in sys/procfs.h" >&5
5366 if eval "test \"\${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}\" = set"; then
5367 echo $ac_n "(cached) $ac_c" 1>&6
5368 else
5369 cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5372 #include <sys/procfs.h>
5373 int main() {
5374 win32_pstatus_t avar
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5378 rm -rf conftest*
5379 bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
5380 else
5381 echo "configure: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 rm -rf conftest*
5384 bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
5385
5386 fi
5387 rm -f conftest*
5388 fi
5389
5390 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
5391 cat >> confdefs.h <<\EOF
5392 #define HAVE_WIN32_PSTATUS_T 1
5393 EOF
5394
5395 fi
5396 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
5397
5398 fi
5399 fi
5400
5401
5402 cat >> confdefs.h <<EOF
5403 #define TRAD_HEADER $TRAD_HEADER
5404 EOF
5405
5406
5407 # Horrible hacks to build DLLs on Windows.
5408 WIN32LDFLAGS=
5409 WIN32LIBADD=
5410 case "${host}" in
5411 *-*-cygwin*)
5412 if test "$enable_shared" = "yes"; then
5413 WIN32LDFLAGS="-no-undefined"
5414 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
5415 fi
5416 ;;
5417 esac
5418
5419
5420
5421 # target stuff:
5422
5423 # Canonicalize the secondary target names.
5424 if test -n "$enable_targets" ; then
5425 for targ in `echo $enable_targets | sed 's/,/ /g'`
5426 do
5427 result=`$ac_config_sub $targ 2>/dev/null`
5428 if test -n "$result" ; then
5429 canon_targets="$canon_targets $result"
5430 else
5431 # Allow targets that config.sub doesn't recognize, like "all".
5432 canon_targets="$canon_targets $targ"
5433 fi
5434 done
5435 fi
5436
5437 all_targets=false
5438 defvec=
5439 selvecs=
5440 selarchs=
5441 TDEFINES=
5442 for targ in $target $canon_targets
5443 do
5444 if test "x$targ" = "xall"; then
5445 all_targets=true
5446 else
5447 . $srcdir/config.bfd
5448 if test "x$targ" = "x$target"; then
5449 defvec=$targ_defvec
5450 fi
5451 selvecs="$selvecs $targ_defvec $targ_selvecs"
5452 selarchs="$selarchs $targ_archs"
5453 TDEFINES="$TDEFINES $targ_cflags"
5454 fi
5455 done
5456
5457
5458 # This processing still needs to be done if we're to decide properly whether
5459 # 64-bit support needs to be compiled in. Currently, it will be included if
5460 # the default or any other explicitly requested target requires it; it
5461 # will not be included on a 32-bit host if no 64-bit target is requested, and
5462 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
5463 # used.
5464
5465 # uniq the default and selected vectors in all the configured targets.
5466 f=""
5467 for i in $selvecs ; do
5468 case " $f " in
5469 *" $i "*) ;;
5470 *) f="$f $i" ;;
5471 esac
5472 done
5473 selvecs="$f"
5474
5475
5476 # uniq the architectures in all the configured targets.
5477 f=""
5478 for i in $selarchs ; do
5479 case " $f " in
5480 *" $i "*) ;;
5481 *) f="$f $i" ;;
5482 esac
5483 done
5484 selarchs="$f"
5485
5486 # Target backend .o files.
5487 tb=
5488
5489 elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
5490
5491 for vec in $selvecs
5492 do
5493 case "$vec" in
5494 # This list is alphabetized to make it easy to compare
5495 # with the two vector lists in targets.c.
5496 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
5497 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
5498 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
5499 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
5500 armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
5501 armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5502 armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5503 armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5504 armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5505 arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5506 arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5507 arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
5508 arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
5509 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
5510 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
5511 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
5512 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
5513 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
5514 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
5515 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
5516 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
5517 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
5518 target64=true ;;
5519 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5520 bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5521 bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5522 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5523 bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5524 bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5525 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5526 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5527 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
5528 target64=true ;;
5529 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
5530 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
5531 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
5532 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5533 bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
5534 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
5535 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
5536 bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
5537 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5538 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5539 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
5540 target64=true ;;
5541 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
5542 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
5543 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
5544 bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5545 bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5546 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
5547 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
5548 bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
5549 bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
5550 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5551 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5552 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5553 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5554 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
5555 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
5556 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
5557 target64=true ;;
5558 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
5559 target64=true ;;
5560 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
5561 target64=true ;;
5562 cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
5563 cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
5564 demo_64_vec) tb="$tb demo64.lo aout64.lo"
5565 target64=true ;;
5566 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5567 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5568 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
5569 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
5570 target64=true ;;
5571 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
5572 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
5573 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
5574 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
5575 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
5576 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
5577 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
5578 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
5579 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
5580 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
5581 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
5582 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
5583 i386msdos_vec) tb="$tb i386msdos.lo" ;;
5584 i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
5585 i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
5586 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
5587 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
5588 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
5589 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
5590 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
5591 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
5592 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
5593 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
5594 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
5595 ieee_vec) tb="$tb ieee.lo" ;;
5596 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
5597 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
5598 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
5599 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
5600 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
5601 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
5602 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
5603 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
5604 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
5605 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
5606 mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
5607 mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
5608 mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
5609 mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
5610 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
5611 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
5612 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
5613 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
5614 target64=true ;;
5615 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
5616 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
5617 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
5618 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
5619 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
5620 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
5621 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
5622 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
5623 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
5624 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
5625 ppcboot_vec) tb="$tb ppcboot.lo" ;;
5626 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5627 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5628 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5629 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5630 som_vec) tb="$tb som.lo" ;;
5631 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
5632 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
5633 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
5634 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
5635 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
5636 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
5637 srec_vec) tb="$tb srec.lo" ;;
5638 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
5639 symbolsrec_vec) tb="$tb srec.lo" ;;
5640 tekhex_vec) tb="$tb tekhex.lo" ;;
5641 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
5642 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
5643 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
5644 versados_vec) tb="$tb versados.lo" ;;
5645 vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
5646 target64=true ;;
5647 vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
5648 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
5649 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
5650 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
5651
5652 "") ;;
5653 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
5654 esac
5655 done
5656
5657 # Target architecture .o files.
5658 # A couple of CPUs use shorter file names to avoid problems on DOS
5659 # filesystems.
5660 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
5661
5662 # Weed out duplicate .o files.
5663 f=""
5664 for i in $tb ; do
5665 case " $f " in
5666 *" $i "*) ;;
5667 *) f="$f $i" ;;
5668 esac
5669 done
5670 tb="$f"
5671
5672 f=""
5673 for i in $ta ; do
5674 case " $f " in
5675 *" $i "*) ;;
5676 *) f="$f $i" ;;
5677 esac
5678 done
5679 ta="$f"
5680
5681 bfd_backends="$tb"
5682 bfd_machines="$ta"
5683
5684 if test x${all_targets} = xtrue ; then
5685 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
5686 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
5687 selvecs=
5688 havevecs=
5689 selarchs=
5690 else # all_targets is true
5691 # Only set these if they will be nonempty, for the clever echo.
5692 havevecs=
5693 test -n "$selvecs" &&
5694 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
5695 test -n "$selvecs" &&
5696 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
5697 test -n "$selarchs" &&
5698 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
5699 fi # all_targets is true
5700
5701 case ${host64}-${target64}-${want64} in
5702 *true*)
5703 wordsize=64
5704 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
5705 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
5706 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
5707 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
5708 fi
5709 ;;
5710 false-false-false)
5711 wordsize=32
5712 all_backends='$(BFD32_BACKENDS)'
5713 ;;
5714 esac
5715
5716
5717
5718
5719
5720
5721 tdefaults=""
5722 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
5723 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
5724 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
5725 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
5726
5727
5728 for ac_hdr in unistd.h
5729 do
5730 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5731 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_hdr" >&5
5733 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5734 echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736 cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 #include <$ac_hdr>
5740 EOF
5741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5742 { (eval echo configure:5743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5744 if test -z "$ac_err"; then
5745 rm -rf conftest*
5746 eval "ac_cv_header_$ac_safe=yes"
5747 else
5748 echo "$ac_err" >&5
5749 echo "configure: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 rm -rf conftest*
5752 eval "ac_cv_header_$ac_safe=no"
5753 fi
5754 rm -f conftest*
5755 fi
5756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5757 echo "$ac_t""yes" 1>&6
5758 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5759 cat >> confdefs.h <<EOF
5760 #define $ac_tr_hdr 1
5761 EOF
5762
5763 else
5764 echo "$ac_t""no" 1>&6
5765 fi
5766 done
5767
5768 for ac_func in getpagesize
5769 do
5770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5771 echo "configure:5772: checking for $ac_func" >&5
5772 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5773 echo $ac_n "(cached) $ac_c" 1>&6
5774 else
5775 cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778 /* System header to define __stub macros and hopefully few prototypes,
5779 which can conflict with char $ac_func(); below. */
5780 #include <assert.h>
5781 /* Override any gcc2 internal prototype to avoid an error. */
5782 /* We use char because int might match the return type of a gcc2
5783 builtin and then its argument prototype would still apply. */
5784 char $ac_func();
5785 char (*f)();
5786
5787 int main() {
5788
5789 /* The GNU C library defines this for functions which it implements
5790 to always fail with ENOSYS. Some functions are actually named
5791 something starting with __ and the normal name is an alias. */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 f = $ac_func;
5796 #endif
5797
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801 rm -rf conftest*
5802 eval "ac_cv_func_$ac_func=yes"
5803 else
5804 echo "configure: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5806 rm -rf conftest*
5807 eval "ac_cv_func_$ac_func=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811
5812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5813 echo "$ac_t""yes" 1>&6
5814 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5815 cat >> confdefs.h <<EOF
5816 #define $ac_tr_func 1
5817 EOF
5818
5819 else
5820 echo "$ac_t""no" 1>&6
5821 fi
5822 done
5823
5824 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5825 echo "configure:5826: checking for working mmap" >&5
5826 if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then
5827 echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829 if test "$cross_compiling" = yes; then
5830 ac_cv_func_mmap_fixed_mapped=no
5831 else
5832 cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835
5836 /* Thanks to Mike Haertel and Jim Avera for this test.
5837 Here is a matrix of mmap possibilities:
5838 mmap private not fixed
5839 mmap private fixed at somewhere currently unmapped
5840 mmap private fixed at somewhere already mapped
5841 mmap shared not fixed
5842 mmap shared fixed at somewhere currently unmapped
5843 mmap shared fixed at somewhere already mapped
5844 For private mappings, we should verify that changes cannot be read()
5845 back from the file, nor mmap's back from the file at a different
5846 address. (There have been systems where private was not correctly
5847 implemented like the infamous i386 svr4.0, and systems where the
5848 VM page cache was not coherent with the filesystem buffer cache
5849 like early versions of FreeBSD and possibly contemporary NetBSD.)
5850 For shared mappings, we should conversely verify that changes get
5851 propogated back to all the places they're supposed to be.
5852
5853 Grep wants private fixed already mapped.
5854 The main things grep needs to know about mmap are:
5855 * does it exist and is it safe to write into the mmap'd area
5856 * how to use it (BSD variants) */
5857 #include <sys/types.h>
5858 #include <fcntl.h>
5859 #include <sys/mman.h>
5860
5861 /* This mess was copied from the GNU getpagesize.h. */
5862 #ifndef HAVE_GETPAGESIZE
5863 # ifdef HAVE_UNISTD_H
5864 # include <unistd.h>
5865 # endif
5866
5867 /* Assume that all systems that can run configure have sys/param.h. */
5868 # ifndef HAVE_SYS_PARAM_H
5869 # define HAVE_SYS_PARAM_H 1
5870 # endif
5871
5872 # ifdef _SC_PAGESIZE
5873 # define getpagesize() sysconf(_SC_PAGESIZE)
5874 # else /* no _SC_PAGESIZE */
5875 # ifdef HAVE_SYS_PARAM_H
5876 # include <sys/param.h>
5877 # ifdef EXEC_PAGESIZE
5878 # define getpagesize() EXEC_PAGESIZE
5879 # else /* no EXEC_PAGESIZE */
5880 # ifdef NBPG
5881 # define getpagesize() NBPG * CLSIZE
5882 # ifndef CLSIZE
5883 # define CLSIZE 1
5884 # endif /* no CLSIZE */
5885 # else /* no NBPG */
5886 # ifdef NBPC
5887 # define getpagesize() NBPC
5888 # else /* no NBPC */
5889 # ifdef PAGESIZE
5890 # define getpagesize() PAGESIZE
5891 # endif /* PAGESIZE */
5892 # endif /* no NBPC */
5893 # endif /* no NBPG */
5894 # endif /* no EXEC_PAGESIZE */
5895 # else /* no HAVE_SYS_PARAM_H */
5896 # define getpagesize() 8192 /* punt totally */
5897 # endif /* no HAVE_SYS_PARAM_H */
5898 # endif /* no _SC_PAGESIZE */
5899
5900 #endif /* no HAVE_GETPAGESIZE */
5901
5902 #ifdef __cplusplus
5903 extern "C" { void *malloc(unsigned); }
5904 #else
5905 char *malloc();
5906 #endif
5907
5908 int
5909 main()
5910 {
5911 char *data, *data2, *data3;
5912 int i, pagesize;
5913 int fd;
5914
5915 pagesize = getpagesize();
5916
5917 /*
5918 * First, make a file with some known garbage in it.
5919 */
5920 data = malloc(pagesize);
5921 if (!data)
5922 exit(1);
5923 for (i = 0; i < pagesize; ++i)
5924 *(data + i) = rand();
5925 umask(0);
5926 fd = creat("conftestmmap", 0600);
5927 if (fd < 0)
5928 exit(1);
5929 if (write(fd, data, pagesize) != pagesize)
5930 exit(1);
5931 close(fd);
5932
5933 /*
5934 * Next, try to mmap the file at a fixed address which
5935 * already has something else allocated at it. If we can,
5936 * also make sure that we see the same garbage.
5937 */
5938 fd = open("conftestmmap", O_RDWR);
5939 if (fd < 0)
5940 exit(1);
5941 data2 = malloc(2 * pagesize);
5942 if (!data2)
5943 exit(1);
5944 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5945 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5946 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5947 exit(1);
5948 for (i = 0; i < pagesize; ++i)
5949 if (*(data + i) != *(data2 + i))
5950 exit(1);
5951
5952 /*
5953 * Finally, make sure that changes to the mapped area
5954 * do not percolate back to the file as seen by read().
5955 * (This is a bug on some variants of i386 svr4.0.)
5956 */
5957 for (i = 0; i < pagesize; ++i)
5958 *(data2 + i) = *(data2 + i) + 1;
5959 data3 = malloc(pagesize);
5960 if (!data3)
5961 exit(1);
5962 if (read(fd, data3, pagesize) != pagesize)
5963 exit(1);
5964 for (i = 0; i < pagesize; ++i)
5965 if (*(data + i) != *(data3 + i))
5966 exit(1);
5967 close(fd);
5968 unlink("conftestmmap");
5969 exit(0);
5970 }
5971
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5974 then
5975 ac_cv_func_mmap_fixed_mapped=yes
5976 else
5977 echo "configure: failed program was:" >&5
5978 cat conftest.$ac_ext >&5
5979 rm -fr conftest*
5980 ac_cv_func_mmap_fixed_mapped=no
5981 fi
5982 rm -fr conftest*
5983 fi
5984
5985 fi
5986
5987 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5988 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5989 cat >> confdefs.h <<\EOF
5990 #define HAVE_MMAP 1
5991 EOF
5992
5993 fi
5994
5995 for ac_func in madvise mprotect
5996 do
5997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5998 echo "configure:5999: checking for $ac_func" >&5
5999 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6000 echo $ac_n "(cached) $ac_c" 1>&6
6001 else
6002 cat > conftest.$ac_ext <<EOF
6003 #line 6004 "configure"
6004 #include "confdefs.h"
6005 /* System header to define __stub macros and hopefully few prototypes,
6006 which can conflict with char $ac_func(); below. */
6007 #include <assert.h>
6008 /* Override any gcc2 internal prototype to avoid an error. */
6009 /* We use char because int might match the return type of a gcc2
6010 builtin and then its argument prototype would still apply. */
6011 char $ac_func();
6012 char (*f)();
6013
6014 int main() {
6015
6016 /* The GNU C library defines this for functions which it implements
6017 to always fail with ENOSYS. Some functions are actually named
6018 something starting with __ and the normal name is an alias. */
6019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6020 choke me
6021 #else
6022 f = $ac_func;
6023 #endif
6024
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028 rm -rf conftest*
6029 eval "ac_cv_func_$ac_func=yes"
6030 else
6031 echo "configure: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
6033 rm -rf conftest*
6034 eval "ac_cv_func_$ac_func=no"
6035 fi
6036 rm -f conftest*
6037 fi
6038
6039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6040 echo "$ac_t""yes" 1>&6
6041 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6042 cat >> confdefs.h <<EOF
6043 #define $ac_tr_func 1
6044 EOF
6045
6046 else
6047 echo "$ac_t""no" 1>&6
6048 fi
6049 done
6050
6051 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
6052 true+yes ) cat >> confdefs.h <<\EOF
6053 #define USE_MMAP 1
6054 EOF
6055 ;;
6056 esac
6057
6058 rm -f doc/config.status
6059 trap '' 1 2 15
6060 cat > confcache <<\EOF
6061 # This file is a shell script that caches the results of configure
6062 # tests run on this system so they can be shared between configure
6063 # scripts and configure runs. It is not useful on other systems.
6064 # If it contains results you don't want to keep, you may remove or edit it.
6065 #
6066 # By default, configure uses ./config.cache as the cache file,
6067 # creating it if it does not exist already. You can give configure
6068 # the --cache-file=FILE option to use a different cache file; that is
6069 # what configure does when it calls configure scripts in
6070 # subdirectories, so they share the cache.
6071 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6072 # config.status only pays attention to the cache file if you give it the
6073 # --recheck option to rerun configure.
6074 #
6075 EOF
6076 # The following way of writing the cache mishandles newlines in values,
6077 # but we know of no workaround that is simple, portable, and efficient.
6078 # So, don't put newlines in cache variables' values.
6079 # Ultrix sh set writes to stderr and can't be redirected directly,
6080 # and sets the high bit in the cache file unless we assign to the vars.
6081 (set) 2>&1 |
6082 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6083 *ac_space=\ *)
6084 # `set' does not quote correctly, so add quotes (double-quote substitution
6085 # turns \\\\ into \\, and sed turns \\ into \).
6086 sed -n \
6087 -e "s/'/'\\\\''/g" \
6088 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6089 ;;
6090 *)
6091 # `set' quotes correctly as required by POSIX, so do not add quotes.
6092 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6093 ;;
6094 esac >> confcache
6095 if cmp -s $cache_file confcache; then
6096 :
6097 else
6098 if test -w $cache_file; then
6099 echo "updating cache $cache_file"
6100 cat confcache > $cache_file
6101 else
6102 echo "not updating unwritable cache $cache_file"
6103 fi
6104 fi
6105 rm -f confcache
6106
6107 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6108
6109 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6110 # Let make expand exec_prefix.
6111 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6112
6113 # Any assignment to VPATH causes Sun make to only execute
6114 # the first set of double-colon rules, so remove it if not needed.
6115 # If there is a colon in the path, we need to keep it.
6116 if test "x$srcdir" = x.; then
6117 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6118 fi
6119
6120 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6121
6122 DEFS=-DHAVE_CONFIG_H
6123
6124 # Without the "./", some shells look in PATH for config.status.
6125 : ${CONFIG_STATUS=./config.status}
6126
6127 echo creating $CONFIG_STATUS
6128 rm -f $CONFIG_STATUS
6129 cat > $CONFIG_STATUS <<EOF
6130 #! /bin/sh
6131 # Generated automatically by configure.
6132 # Run this file to recreate the current configuration.
6133 # This directory was configured as follows,
6134 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6135 #
6136 # $0 $ac_configure_args
6137 #
6138 # Compiler output produced by configure, useful for debugging
6139 # configure, is in ./config.log if it exists.
6140
6141 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6142 for ac_option
6143 do
6144 case "\$ac_option" in
6145 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6146 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6147 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6148 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6149 echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
6150 exit 0 ;;
6151 -help | --help | --hel | --he | --h)
6152 echo "\$ac_cs_usage"; exit 0 ;;
6153 *) echo "\$ac_cs_usage"; exit 1 ;;
6154 esac
6155 done
6156
6157 ac_given_srcdir=$srcdir
6158 ac_given_INSTALL="$INSTALL"
6159
6160 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
6161 EOF
6162 cat >> $CONFIG_STATUS <<EOF
6163
6164 # Protect against being on the right side of a sed subst in config.status.
6165 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6166 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6167 $ac_vpsub
6168 $extrasub
6169 s%@SHELL@%$SHELL%g
6170 s%@CFLAGS@%$CFLAGS%g
6171 s%@CPPFLAGS@%$CPPFLAGS%g
6172 s%@CXXFLAGS@%$CXXFLAGS%g
6173 s%@FFLAGS@%$FFLAGS%g
6174 s%@DEFS@%$DEFS%g
6175 s%@LDFLAGS@%$LDFLAGS%g
6176 s%@LIBS@%$LIBS%g
6177 s%@exec_prefix@%$exec_prefix%g
6178 s%@prefix@%$prefix%g
6179 s%@program_transform_name@%$program_transform_name%g
6180 s%@bindir@%$bindir%g
6181 s%@sbindir@%$sbindir%g
6182 s%@libexecdir@%$libexecdir%g
6183 s%@datadir@%$datadir%g
6184 s%@sysconfdir@%$sysconfdir%g
6185 s%@sharedstatedir@%$sharedstatedir%g
6186 s%@localstatedir@%$localstatedir%g
6187 s%@libdir@%$libdir%g
6188 s%@includedir@%$includedir%g
6189 s%@oldincludedir@%$oldincludedir%g
6190 s%@infodir@%$infodir%g
6191 s%@mandir@%$mandir%g
6192 s%@host@%$host%g
6193 s%@host_alias@%$host_alias%g
6194 s%@host_cpu@%$host_cpu%g
6195 s%@host_vendor@%$host_vendor%g
6196 s%@host_os@%$host_os%g
6197 s%@target@%$target%g
6198 s%@target_alias@%$target_alias%g
6199 s%@target_cpu@%$target_cpu%g
6200 s%@target_vendor@%$target_vendor%g
6201 s%@target_os@%$target_os%g
6202 s%@build@%$build%g
6203 s%@build_alias@%$build_alias%g
6204 s%@build_cpu@%$build_cpu%g
6205 s%@build_vendor@%$build_vendor%g
6206 s%@build_os@%$build_os%g
6207 s%@CC@%$CC%g
6208 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6209 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6210 s%@INSTALL_DATA@%$INSTALL_DATA%g
6211 s%@PACKAGE@%$PACKAGE%g
6212 s%@VERSION@%$VERSION%g
6213 s%@ACLOCAL@%$ACLOCAL%g
6214 s%@AUTOCONF@%$AUTOCONF%g
6215 s%@AUTOMAKE@%$AUTOMAKE%g
6216 s%@AUTOHEADER@%$AUTOHEADER%g
6217 s%@MAKEINFO@%$MAKEINFO%g
6218 s%@SET_MAKE@%$SET_MAKE%g
6219 s%@AR@%$AR%g
6220 s%@RANLIB@%$RANLIB%g
6221 s%@LD@%$LD%g
6222 s%@NM@%$NM%g
6223 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
6224 s%@LN_S@%$LN_S%g
6225 s%@DLLTOOL@%$DLLTOOL%g
6226 s%@AS@%$AS%g
6227 s%@LIBTOOL@%$LIBTOOL%g
6228 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6229 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6230 s%@MAINT@%$MAINT%g
6231 s%@EXEEXT@%$EXEEXT%g
6232 s%@CPP@%$CPP%g
6233 s%@ALLOCA@%$ALLOCA%g
6234 s%@USE_NLS@%$USE_NLS%g
6235 s%@MSGFMT@%$MSGFMT%g
6236 s%@GMSGFMT@%$GMSGFMT%g
6237 s%@XGETTEXT@%$XGETTEXT%g
6238 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6239 s%@CATALOGS@%$CATALOGS%g
6240 s%@CATOBJEXT@%$CATOBJEXT%g
6241 s%@DATADIRNAME@%$DATADIRNAME%g
6242 s%@GMOFILES@%$GMOFILES%g
6243 s%@INSTOBJEXT@%$INSTOBJEXT%g
6244 s%@INTLDEPS@%$INTLDEPS%g
6245 s%@INTLLIBS@%$INTLLIBS%g
6246 s%@INTLOBJS@%$INTLOBJS%g
6247 s%@POFILES@%$POFILES%g
6248 s%@POSUB@%$POSUB%g
6249 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6250 s%@GT_NO@%$GT_NO%g
6251 s%@GT_YES@%$GT_YES%g
6252 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6253 s%@l@%$l%g
6254 s%@HDEFINES@%$HDEFINES%g
6255 s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
6256 s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
6257 s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
6258 s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
6259 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
6260 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
6261 s%@COREFILE@%$COREFILE%g
6262 s%@COREFLAG@%$COREFLAG%g
6263 s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
6264 s%@WIN32LIBADD@%$WIN32LIBADD%g
6265 s%@TDEFINES@%$TDEFINES%g
6266 s%@wordsize@%$wordsize%g
6267 s%@all_backends@%$all_backends%g
6268 s%@bfd_backends@%$bfd_backends%g
6269 s%@bfd_machines@%$bfd_machines%g
6270 s%@tdefaults@%$tdefaults%g
6271
6272 CEOF
6273 EOF
6274
6275 cat >> $CONFIG_STATUS <<\EOF
6276
6277 # Split the substitutions into bite-sized pieces for seds with
6278 # small command number limits, like on Digital OSF/1 and HP-UX.
6279 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6280 ac_file=1 # Number of current file.
6281 ac_beg=1 # First line for current file.
6282 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6283 ac_more_lines=:
6284 ac_sed_cmds=""
6285 while $ac_more_lines; do
6286 if test $ac_beg -gt 1; then
6287 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6288 else
6289 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6290 fi
6291 if test ! -s conftest.s$ac_file; then
6292 ac_more_lines=false
6293 rm -f conftest.s$ac_file
6294 else
6295 if test -z "$ac_sed_cmds"; then
6296 ac_sed_cmds="sed -f conftest.s$ac_file"
6297 else
6298 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6299 fi
6300 ac_file=`expr $ac_file + 1`
6301 ac_beg=$ac_end
6302 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6303 fi
6304 done
6305 if test -z "$ac_sed_cmds"; then
6306 ac_sed_cmds=cat
6307 fi
6308 EOF
6309
6310 cat >> $CONFIG_STATUS <<EOF
6311
6312 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
6313 EOF
6314 cat >> $CONFIG_STATUS <<\EOF
6315 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6316 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6317 case "$ac_file" in
6318 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6319 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6320 *) ac_file_in="${ac_file}.in" ;;
6321 esac
6322
6323 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6324
6325 # Remove last slash and all that follows it. Not all systems have dirname.
6326 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6327 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6328 # The file is in a subdirectory.
6329 test ! -d "$ac_dir" && mkdir "$ac_dir"
6330 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6331 # A "../" for each directory in $ac_dir_suffix.
6332 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6333 else
6334 ac_dir_suffix= ac_dots=
6335 fi
6336
6337 case "$ac_given_srcdir" in
6338 .) srcdir=.
6339 if test -z "$ac_dots"; then top_srcdir=.
6340 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6341 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6342 *) # Relative path.
6343 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6344 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6345 esac
6346
6347 case "$ac_given_INSTALL" in
6348 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6349 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6350 esac
6351
6352 echo creating "$ac_file"
6353 rm -f "$ac_file"
6354 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6355 case "$ac_file" in
6356 *Makefile*) ac_comsub="1i\\
6357 # $configure_input" ;;
6358 *) ac_comsub= ;;
6359 esac
6360
6361 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6362 sed -e "$ac_comsub
6363 s%@configure_input@%$configure_input%g
6364 s%@srcdir@%$srcdir%g
6365 s%@top_srcdir@%$top_srcdir%g
6366 s%@INSTALL@%$INSTALL%g
6367 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6368 fi; done
6369 rm -f conftest.s*
6370
6371 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6372 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6373 #
6374 # ac_d sets the value in "#define NAME VALUE" lines.
6375 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6376 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6377 ac_dC='\3'
6378 ac_dD='%g'
6379 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6380 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6381 ac_uB='\([ ]\)%\1#\2define\3'
6382 ac_uC=' '
6383 ac_uD='\4%g'
6384 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6385 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6386 ac_eB='$%\1#\2define\3'
6387 ac_eC=' '
6388 ac_eD='%g'
6389
6390 if test "${CONFIG_HEADERS+set}" != set; then
6391 EOF
6392 cat >> $CONFIG_STATUS <<EOF
6393 CONFIG_HEADERS="config.h:config.in"
6394 EOF
6395 cat >> $CONFIG_STATUS <<\EOF
6396 fi
6397 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6398 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6399 case "$ac_file" in
6400 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6401 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6402 *) ac_file_in="${ac_file}.in" ;;
6403 esac
6404
6405 echo creating $ac_file
6406
6407 rm -f conftest.frag conftest.in conftest.out
6408 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6409 cat $ac_file_inputs > conftest.in
6410
6411 EOF
6412
6413 # Transform confdefs.h into a sed script conftest.vals that substitutes
6414 # the proper values into config.h.in to produce config.h. And first:
6415 # Protect against being on the right side of a sed subst in config.status.
6416 # Protect against being in an unquoted here document in config.status.
6417 rm -f conftest.vals
6418 cat > conftest.hdr <<\EOF
6419 s/[\\&%]/\\&/g
6420 s%[\\$`]%\\&%g
6421 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6422 s%ac_d%ac_u%gp
6423 s%ac_u%ac_e%gp
6424 EOF
6425 sed -n -f conftest.hdr confdefs.h > conftest.vals
6426 rm -f conftest.hdr
6427
6428 # This sed command replaces #undef with comments. This is necessary, for
6429 # example, in the case of _POSIX_SOURCE, which is predefined and required
6430 # on some systems where configure will not decide to define it.
6431 cat >> conftest.vals <<\EOF
6432 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6433 EOF
6434
6435 # Break up conftest.vals because some shells have a limit on
6436 # the size of here documents, and old seds have small limits too.
6437
6438 rm -f conftest.tail
6439 while :
6440 do
6441 ac_lines=`grep -c . conftest.vals`
6442 # grep -c gives empty output for an empty file on some AIX systems.
6443 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6444 # Write a limited-size here document to conftest.frag.
6445 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6446 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6447 echo 'CEOF
6448 sed -f conftest.frag conftest.in > conftest.out
6449 rm -f conftest.in
6450 mv conftest.out conftest.in
6451 ' >> $CONFIG_STATUS
6452 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6453 rm -f conftest.vals
6454 mv conftest.tail conftest.vals
6455 done
6456 rm -f conftest.vals
6457
6458 cat >> $CONFIG_STATUS <<\EOF
6459 rm -f conftest.frag conftest.h
6460 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6461 cat conftest.in >> conftest.h
6462 rm -f conftest.in
6463 if cmp -s $ac_file conftest.h 2>/dev/null; then
6464 echo "$ac_file is unchanged"
6465 rm -f conftest.h
6466 else
6467 # Remove last slash and all that follows it. Not all systems have dirname.
6468 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6469 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6470 # The file is in a subdirectory.
6471 test ! -d "$ac_dir" && mkdir "$ac_dir"
6472 fi
6473 rm -f $ac_file
6474 mv conftest.h $ac_file
6475 fi
6476 fi; done
6477
6478 EOF
6479 cat >> $CONFIG_STATUS <<EOF
6480
6481
6482 EOF
6483 cat >> $CONFIG_STATUS <<\EOF
6484 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6485 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6486 exit 0
6487 EOF
6488 chmod +x $CONFIG_STATUS
6489 rm -fr confdefs* $ac_clean_files
6490 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
6491