Tue Jul 14 15:37:41 1998 Geoffrey Noer <noer@cygnus.com>
[deliverable/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.12.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 build shared libraries [default=no]
16 --enable-shared=PKGS only build shared libraries if the current package
17 appears as an element in the PKGS list"
18 ac_help="$ac_help
19 --enable-static build static libraries [default=yes]
20 --enable-static=PKGS only build shared libraries if the current package
21 appears as an element in the PKGS list"
22 ac_help="$ac_help
23 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
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.12.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 . $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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532 cross_compiling=$ac_cv_prog_cc_cross
533
534 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538 ' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542 else
543 ac_n= ac_c='\c' ac_t=
544 fi
545
546
547
548 ac_aux_dir=
549 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
550 if test -f $ac_dir/install-sh; then
551 ac_aux_dir=$ac_dir
552 ac_install_sh="$ac_aux_dir/install-sh -c"
553 break
554 elif test -f $ac_dir/install.sh; then
555 ac_aux_dir=$ac_dir
556 ac_install_sh="$ac_aux_dir/install.sh -c"
557 break
558 fi
559 done
560 if test -z "$ac_aux_dir"; then
561 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
562 fi
563 ac_config_guess=$ac_aux_dir/config.guess
564 ac_config_sub=$ac_aux_dir/config.sub
565 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
566
567
568 # Do some error checking and defaulting for the host and target type.
569 # The inputs are:
570 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
571 #
572 # The rules are:
573 # 1. You are not allowed to specify --host, --target, and nonopt at the
574 # same time.
575 # 2. Host defaults to nonopt.
576 # 3. If nonopt is not specified, then host defaults to the current host,
577 # as determined by config.guess.
578 # 4. Target and build default to nonopt.
579 # 5. If nonopt is not specified, then target and build default to host.
580
581 # The aliases save the names the user supplied, while $host etc.
582 # will get canonicalized.
583 case $host---$target---$nonopt in
584 NONE---*---* | *---NONE---* | *---*---NONE) ;;
585 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
586 esac
587
588
589 # Make sure we can run config.sub.
590 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
591 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
592 fi
593
594 echo $ac_n "checking host system type""... $ac_c" 1>&6
595 echo "configure:596: checking host system type" >&5
596
597 host_alias=$host
598 case "$host_alias" in
599 NONE)
600 case $nonopt in
601 NONE)
602 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
603 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
604 fi ;;
605 *) host_alias=$nonopt ;;
606 esac ;;
607 esac
608
609 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
610 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
611 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
612 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
613 echo "$ac_t""$host" 1>&6
614
615 echo $ac_n "checking target system type""... $ac_c" 1>&6
616 echo "configure:617: checking target system type" >&5
617
618 target_alias=$target
619 case "$target_alias" in
620 NONE)
621 case $nonopt in
622 NONE) target_alias=$host_alias ;;
623 *) target_alias=$nonopt ;;
624 esac ;;
625 esac
626
627 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
628 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
629 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
630 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
631 echo "$ac_t""$target" 1>&6
632
633 echo $ac_n "checking build system type""... $ac_c" 1>&6
634 echo "configure:635: checking build system type" >&5
635
636 build_alias=$build
637 case "$build_alias" in
638 NONE)
639 case $nonopt in
640 NONE) build_alias=$host_alias ;;
641 *) build_alias=$nonopt ;;
642 esac ;;
643 esac
644
645 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
646 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
647 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
648 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
649 echo "$ac_t""$build" 1>&6
650
651 test "$host_alias" != "$target_alias" &&
652 test "$program_prefix$program_suffix$program_transform_name" = \
653 NONENONEs,x,x, &&
654 program_prefix=${target_alias}-
655
656 # Extract the first word of "gcc", so it can be a program name with args.
657 set dummy gcc; ac_word=$2
658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
659 echo "configure:660: checking for $ac_word" >&5
660 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
661 echo $ac_n "(cached) $ac_c" 1>&6
662 else
663 if test -n "$CC"; then
664 ac_cv_prog_CC="$CC" # Let the user override the test.
665 else
666 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
667 for ac_dir in $PATH; do
668 test -z "$ac_dir" && ac_dir=.
669 if test -f $ac_dir/$ac_word; then
670 ac_cv_prog_CC="gcc"
671 break
672 fi
673 done
674 IFS="$ac_save_ifs"
675 fi
676 fi
677 CC="$ac_cv_prog_CC"
678 if test -n "$CC"; then
679 echo "$ac_t""$CC" 1>&6
680 else
681 echo "$ac_t""no" 1>&6
682 fi
683
684 if test -z "$CC"; then
685 # Extract the first word of "cc", so it can be a program name with args.
686 set dummy cc; ac_word=$2
687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
688 echo "configure:689: checking for $ac_word" >&5
689 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
690 echo $ac_n "(cached) $ac_c" 1>&6
691 else
692 if test -n "$CC"; then
693 ac_cv_prog_CC="$CC" # Let the user override the test.
694 else
695 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
696 ac_prog_rejected=no
697 for ac_dir in $PATH; do
698 test -z "$ac_dir" && ac_dir=.
699 if test -f $ac_dir/$ac_word; then
700 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701 ac_prog_rejected=yes
702 continue
703 fi
704 ac_cv_prog_CC="cc"
705 break
706 fi
707 done
708 IFS="$ac_save_ifs"
709 if test $ac_prog_rejected = yes; then
710 # We found a bogon in the path, so make sure we never use it.
711 set dummy $ac_cv_prog_CC
712 shift
713 if test $# -gt 0; then
714 # We chose a different compiler from the bogus one.
715 # However, it has the same basename, so the bogon will be chosen
716 # first if we set CC to just the basename; use the full file name.
717 shift
718 set dummy "$ac_dir/$ac_word" "$@"
719 shift
720 ac_cv_prog_CC="$@"
721 fi
722 fi
723 fi
724 fi
725 CC="$ac_cv_prog_CC"
726 if test -n "$CC"; then
727 echo "$ac_t""$CC" 1>&6
728 else
729 echo "$ac_t""no" 1>&6
730 fi
731
732 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
733 fi
734
735 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
736 echo "configure:737: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
737
738 ac_ext=c
739 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
740 ac_cpp='$CPP $CPPFLAGS'
741 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
742 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
743 cross_compiling=$ac_cv_prog_cc_cross
744
745 cat > conftest.$ac_ext <<EOF
746 #line 747 "configure"
747 #include "confdefs.h"
748 main(){return(0);}
749 EOF
750 if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
751 ac_cv_prog_cc_works=yes
752 # If we can't run a trivial program, we are probably using a cross compiler.
753 if (./conftest; exit) 2>/dev/null; then
754 ac_cv_prog_cc_cross=no
755 else
756 ac_cv_prog_cc_cross=yes
757 fi
758 else
759 echo "configure: failed program was:" >&5
760 cat conftest.$ac_ext >&5
761 ac_cv_prog_cc_works=no
762 fi
763 rm -fr conftest*
764
765 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
766 if test $ac_cv_prog_cc_works = no; then
767 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
768 fi
769 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
770 echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
771 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
772 cross_compiling=$ac_cv_prog_cc_cross
773
774 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
775 echo "configure:776: checking whether we are using GNU C" >&5
776 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
777 echo $ac_n "(cached) $ac_c" 1>&6
778 else
779 cat > conftest.c <<EOF
780 #ifdef __GNUC__
781 yes;
782 #endif
783 EOF
784 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
785 ac_cv_prog_gcc=yes
786 else
787 ac_cv_prog_gcc=no
788 fi
789 fi
790
791 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
792
793 if test $ac_cv_prog_gcc = yes; then
794 GCC=yes
795 ac_test_CFLAGS="${CFLAGS+set}"
796 ac_save_CFLAGS="$CFLAGS"
797 CFLAGS=
798 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
799 echo "configure:800: checking whether ${CC-cc} accepts -g" >&5
800 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
801 echo $ac_n "(cached) $ac_c" 1>&6
802 else
803 echo 'void f(){}' > conftest.c
804 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
805 ac_cv_prog_cc_g=yes
806 else
807 ac_cv_prog_cc_g=no
808 fi
809 rm -f conftest*
810
811 fi
812
813 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
814 if test "$ac_test_CFLAGS" = set; then
815 CFLAGS="$ac_save_CFLAGS"
816 elif test $ac_cv_prog_cc_g = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-O2"
820 fi
821 else
822 GCC=
823 test "${CFLAGS+set}" = set || CFLAGS="-g"
824 fi
825
826 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
827 echo "configure:828: checking for POSIXized ISC" >&5
828 if test -d /etc/conf/kconfig.d &&
829 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
830 then
831 echo "$ac_t""yes" 1>&6
832 ISC=yes # If later tests want to check for ISC.
833 cat >> confdefs.h <<\EOF
834 #define _POSIX_SOURCE 1
835 EOF
836
837 if test "$GCC" = yes; then
838 CC="$CC -posix"
839 else
840 CC="$CC -Xp"
841 fi
842 else
843 echo "$ac_t""no" 1>&6
844 ISC=
845 fi
846
847
848 # Find a good install program. We prefer a C program (faster),
849 # so one script is as good as another. But avoid the broken or
850 # incompatible versions:
851 # SysV /etc/install, /usr/sbin/install
852 # SunOS /usr/etc/install
853 # IRIX /sbin/install
854 # AIX /bin/install
855 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
856 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
857 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
858 # ./install, which can be erroneously created by make from ./install.sh.
859 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
860 echo "configure:861: checking for a BSD compatible install" >&5
861 if test -z "$INSTALL"; then
862 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
863 echo $ac_n "(cached) $ac_c" 1>&6
864 else
865 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
866 for ac_dir in $PATH; do
867 # Account for people who put trailing slashes in PATH elements.
868 case "$ac_dir/" in
869 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
870 *)
871 # OSF1 and SCO ODT 3.0 have their own names for install.
872 # Don't use installbsd from OSF since it installs stuff as root
873 # by default.
874 for ac_prog in ginstall scoinst install; do
875 if test -f $ac_dir/$ac_prog; then
876 if test $ac_prog = install &&
877 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
878 # AIX install. It has an incompatible calling convention.
879 :
880 else
881 ac_cv_path_install="$ac_dir/$ac_prog -c"
882 break 2
883 fi
884 fi
885 done
886 ;;
887 esac
888 done
889 IFS="$ac_save_IFS"
890
891 fi
892 if test "${ac_cv_path_install+set}" = set; then
893 INSTALL="$ac_cv_path_install"
894 else
895 # As a last resort, use the slow shell script. We don't cache a
896 # path for INSTALL within a source directory, because that will
897 # break other packages using the cache if that directory is
898 # removed, or if the path is relative.
899 INSTALL="$ac_install_sh"
900 fi
901 fi
902 echo "$ac_t""$INSTALL" 1>&6
903
904 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
905 # It thinks the first close brace ends the variable substitution.
906 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
907
908 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
909
910
911 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
912
913 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
914 echo "configure:915: checking whether build environment is sane" >&5
915 # Just in case
916 sleep 1
917 echo timestamp > conftestfile
918 # Do `set' in a subshell so we don't clobber the current shell's
919 # arguments. Must try -L first in case configure is actually a
920 # symlink; some systems play weird games with the mod time of symlinks
921 # (eg FreeBSD returns the mod time of the symlink's containing
922 # directory).
923 if (
924 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
925 if test "$*" = "X"; then
926 # -L didn't work.
927 set X `ls -t $srcdir/configure conftestfile`
928 fi
929 if test "$*" != "X $srcdir/configure conftestfile" \
930 && test "$*" != "X conftestfile $srcdir/configure"; then
931
932 # If neither matched, then we have a broken ls. This can happen
933 # if, for instance, CONFIG_SHELL is bash and it inherits a
934 # broken ls alias from the environment. This has actually
935 # happened. Such a system could not be considered "sane".
936 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
937 alias in your environment" 1>&2; exit 1; }
938 fi
939
940 test "$2" = conftestfile
941 )
942 then
943 # Ok.
944 :
945 else
946 { echo "configure: error: newly created file is older than distributed files!
947 Check your system clock" 1>&2; exit 1; }
948 fi
949 rm -f conftest*
950 echo "$ac_t""yes" 1>&6
951 if test "$program_transform_name" = s,x,x,; then
952 program_transform_name=
953 else
954 # Double any \ or $. echo might interpret backslashes.
955 cat <<\EOF_SED > conftestsed
956 s,\\,\\\\,g; s,\$,$$,g
957 EOF_SED
958 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
959 rm -f conftestsed
960 fi
961 test "$program_prefix" != NONE &&
962 program_transform_name="s,^,${program_prefix},; $program_transform_name"
963 # Use a double $ so make ignores it.
964 test "$program_suffix" != NONE &&
965 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
966
967 # sed with no file args requires a program.
968 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
969
970 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
971 echo "configure:972: checking whether ${MAKE-make} sets \${MAKE}" >&5
972 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
973 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
975 else
976 cat > conftestmake <<\EOF
977 all:
978 @echo 'ac_maketemp="${MAKE}"'
979 EOF
980 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
981 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
982 if test -n "$ac_maketemp"; then
983 eval ac_cv_prog_make_${ac_make}_set=yes
984 else
985 eval ac_cv_prog_make_${ac_make}_set=no
986 fi
987 rm -f conftestmake
988 fi
989 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
990 echo "$ac_t""yes" 1>&6
991 SET_MAKE=
992 else
993 echo "$ac_t""no" 1>&6
994 SET_MAKE="MAKE=${MAKE-make}"
995 fi
996
997
998 PACKAGE=bfd
999
1000 VERSION=2.9.4
1001
1002 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1003 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1004 fi
1005 cat >> confdefs.h <<EOF
1006 #define PACKAGE "$PACKAGE"
1007 EOF
1008
1009 cat >> confdefs.h <<EOF
1010 #define VERSION "$VERSION"
1011 EOF
1012
1013
1014
1015 missing_dir=`cd $ac_aux_dir && pwd`
1016 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1017 echo "configure:1018: checking for working aclocal" >&5
1018 # Run test in a subshell; some versions of sh will print an error if
1019 # an executable is not found, even if stderr is redirected.
1020 # Redirect stdin to placate older versions of autoconf. Sigh.
1021 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1022 ACLOCAL=aclocal
1023 echo "$ac_t""found" 1>&6
1024 else
1025 ACLOCAL="$missing_dir/missing aclocal"
1026 echo "$ac_t""missing" 1>&6
1027 fi
1028
1029 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1030 echo "configure:1031: checking for working autoconf" >&5
1031 # Run test in a subshell; some versions of sh will print an error if
1032 # an executable is not found, even if stderr is redirected.
1033 # Redirect stdin to placate older versions of autoconf. Sigh.
1034 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1035 AUTOCONF=autoconf
1036 echo "$ac_t""found" 1>&6
1037 else
1038 AUTOCONF="$missing_dir/missing autoconf"
1039 echo "$ac_t""missing" 1>&6
1040 fi
1041
1042 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1043 echo "configure:1044: checking for working automake" >&5
1044 # Run test in a subshell; some versions of sh will print an error if
1045 # an executable is not found, even if stderr is redirected.
1046 # Redirect stdin to placate older versions of autoconf. Sigh.
1047 if (automake --version) < /dev/null > /dev/null 2>&1; then
1048 AUTOMAKE=automake
1049 echo "$ac_t""found" 1>&6
1050 else
1051 AUTOMAKE="$missing_dir/missing automake"
1052 echo "$ac_t""missing" 1>&6
1053 fi
1054
1055 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1056 echo "configure:1057: checking for working autoheader" >&5
1057 # Run test in a subshell; some versions of sh will print an error if
1058 # an executable is not found, even if stderr is redirected.
1059 # Redirect stdin to placate older versions of autoconf. Sigh.
1060 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1061 AUTOHEADER=autoheader
1062 echo "$ac_t""found" 1>&6
1063 else
1064 AUTOHEADER="$missing_dir/missing autoheader"
1065 echo "$ac_t""missing" 1>&6
1066 fi
1067
1068 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1069 echo "configure:1070: checking for working makeinfo" >&5
1070 # Run test in a subshell; some versions of sh will print an error if
1071 # an executable is not found, even if stderr is redirected.
1072 # Redirect stdin to placate older versions of autoconf. Sigh.
1073 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1074 MAKEINFO=makeinfo
1075 echo "$ac_t""found" 1>&6
1076 else
1077 MAKEINFO="$missing_dir/missing makeinfo"
1078 echo "$ac_t""missing" 1>&6
1079 fi
1080
1081
1082
1083 if test $host != $build; then
1084 ac_tool_prefix=${host_alias}-
1085 else
1086 ac_tool_prefix=
1087 fi
1088
1089 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1090 set dummy ${ac_tool_prefix}ar; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096 if test -n "$AR"; then
1097 ac_cv_prog_AR="$AR" # Let the user override the test.
1098 else
1099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1100 for ac_dir in $PATH; do
1101 test -z "$ac_dir" && ac_dir=.
1102 if test -f $ac_dir/$ac_word; then
1103 ac_cv_prog_AR="${ac_tool_prefix}ar"
1104 break
1105 fi
1106 done
1107 IFS="$ac_save_ifs"
1108 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1109 fi
1110 fi
1111 AR="$ac_cv_prog_AR"
1112 if test -n "$AR"; then
1113 echo "$ac_t""$AR" 1>&6
1114 else
1115 echo "$ac_t""no" 1>&6
1116 fi
1117
1118
1119
1120 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1121 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1123 echo "configure:1124: checking for $ac_word" >&5
1124 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1125 echo $ac_n "(cached) $ac_c" 1>&6
1126 else
1127 if test -n "$RANLIB"; then
1128 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1129 else
1130 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1131 for ac_dir in $PATH; do
1132 test -z "$ac_dir" && ac_dir=.
1133 if test -f $ac_dir/$ac_word; then
1134 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1135 break
1136 fi
1137 done
1138 IFS="$ac_save_ifs"
1139 fi
1140 fi
1141 RANLIB="$ac_cv_prog_RANLIB"
1142 if test -n "$RANLIB"; then
1143 echo "$ac_t""$RANLIB" 1>&6
1144 else
1145 echo "$ac_t""no" 1>&6
1146 fi
1147
1148
1149 if test -z "$ac_cv_prog_RANLIB"; then
1150 if test -n "$ac_tool_prefix"; then
1151 # Extract the first word of "ranlib", so it can be a program name with args.
1152 set dummy ranlib; ac_word=$2
1153 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1154 echo "configure:1155: checking for $ac_word" >&5
1155 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158 if test -n "$RANLIB"; then
1159 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1160 else
1161 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1162 for ac_dir in $PATH; do
1163 test -z "$ac_dir" && ac_dir=.
1164 if test -f $ac_dir/$ac_word; then
1165 ac_cv_prog_RANLIB="ranlib"
1166 break
1167 fi
1168 done
1169 IFS="$ac_save_ifs"
1170 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1171 fi
1172 fi
1173 RANLIB="$ac_cv_prog_RANLIB"
1174 if test -n "$RANLIB"; then
1175 echo "$ac_t""$RANLIB" 1>&6
1176 else
1177 echo "$ac_t""no" 1>&6
1178 fi
1179
1180 else
1181 RANLIB=":"
1182 fi
1183 fi
1184
1185
1186 # Check whether --enable-shared or --disable-shared was given.
1187 if test "${enable_shared+set}" = set; then
1188 enableval="$enable_shared"
1189 p=${PACKAGE-default}
1190 case "$enableval" in
1191 yes) enable_shared=yes ;;
1192 no) enable_shared=no ;;
1193 *)
1194 enable_shared=no
1195 # Look at the argument we got. We use all the common list separators.
1196 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1197 for pkg in $enableval; do
1198 if test "X$pkg" = "X$p"; then
1199 enable_shared=yes
1200 fi
1201 done
1202 IFS="$ac_save_ifs"
1203 ;;
1204 esac
1205 else
1206 enable_shared=no
1207 fi
1208
1209
1210 # Check whether --enable-static or --disable-static was given.
1211 if test "${enable_static+set}" = set; then
1212 enableval="$enable_static"
1213 p=${PACKAGE-default}
1214 case "$enableval" in
1215 yes) enable_static=yes ;;
1216 no) enable_static=no ;;
1217 *)
1218 enable_static=no
1219 # Look at the argument we got. We use all the common list separators.
1220 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1221 for pkg in $enableval; do
1222 if test "X$pkg" = "X$p"; then
1223 enable_static=yes
1224 fi
1225 done
1226 IFS="$ac_save_ifs"
1227 ;;
1228 esac
1229 else
1230 enable_static=yes
1231 fi
1232
1233 # Extract the first word of "ranlib", so it can be a program name with args.
1234 set dummy ranlib; ac_word=$2
1235 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1236 echo "configure:1237: checking for $ac_word" >&5
1237 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239 else
1240 if test -n "$RANLIB"; then
1241 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1242 else
1243 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1244 for ac_dir in $PATH; do
1245 test -z "$ac_dir" && ac_dir=.
1246 if test -f $ac_dir/$ac_word; then
1247 ac_cv_prog_RANLIB="ranlib"
1248 break
1249 fi
1250 done
1251 IFS="$ac_save_ifs"
1252 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1253 fi
1254 fi
1255 RANLIB="$ac_cv_prog_RANLIB"
1256 if test -n "$RANLIB"; then
1257 echo "$ac_t""$RANLIB" 1>&6
1258 else
1259 echo "$ac_t""no" 1>&6
1260 fi
1261
1262 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1263 if test "${with_gnu_ld+set}" = set; then
1264 withval="$with_gnu_ld"
1265 test "$withval" = no || with_gnu_ld=yes
1266 else
1267 with_gnu_ld=no
1268 fi
1269
1270
1271 ac_prog=ld
1272 if test "$ac_cv_prog_gcc" = yes; then
1273 # Check if gcc -print-prog-name=ld gives a path.
1274 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1275 echo "configure:1276: checking for ld used by GCC" >&5
1276 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1277 case "$ac_prog" in
1278 # Accept absolute paths.
1279 /* | [A-Za-z]:\\*)
1280 test -z "$LD" && LD="$ac_prog"
1281 ;;
1282 "")
1283 # If it fails, then pretend we aren't using GCC.
1284 ac_prog=ld
1285 ;;
1286 *)
1287 # If it is relative, then search for the first ld in PATH.
1288 with_gnu_ld=unknown
1289 ;;
1290 esac
1291 elif test "$with_gnu_ld" = yes; then
1292 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1293 echo "configure:1294: checking for GNU ld" >&5
1294 else
1295 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1296 echo "configure:1297: checking for non-GNU ld" >&5
1297 fi
1298 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301 if test -z "$LD"; then
1302 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1303 for ac_dir in $PATH; do
1304 test -z "$ac_dir" && ac_dir=.
1305 if test -f "$ac_dir/$ac_prog"; then
1306 ac_cv_path_LD="$ac_dir/$ac_prog"
1307 # Check to see if the program is GNU ld. I'd rather use --version,
1308 # but apparently some GNU ld's only accept -v.
1309 # Break only if it was the GNU/non-GNU ld that we prefer.
1310 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1311 test "$with_gnu_ld" != no && break
1312 else
1313 test "$with_gnu_ld" != yes && break
1314 fi
1315 fi
1316 done
1317 IFS="$ac_save_ifs"
1318 else
1319 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1320 fi
1321 fi
1322
1323 LD="$ac_cv_path_LD"
1324 if test -n "$LD"; then
1325 echo "$ac_t""$LD" 1>&6
1326 else
1327 echo "$ac_t""no" 1>&6
1328 fi
1329 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1330
1331 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1332 echo "configure:1333: checking if the linker ($LD) is GNU ld" >&5
1333 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1334 echo $ac_n "(cached) $ac_c" 1>&6
1335 else
1336 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1337 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1338 ac_cv_prog_gnu_ld=yes
1339 else
1340 ac_cv_prog_gnu_ld=no
1341 fi
1342 fi
1343
1344 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1345
1346
1347 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1348 echo "configure:1349: checking for BSD-compatible nm" >&5
1349 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1350 echo $ac_n "(cached) $ac_c" 1>&6
1351 else
1352 if test -z "$NM"; then
1353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1354 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1355 test -z "$ac_dir" && ac_dir=.
1356 if test -f $ac_dir/nm; then
1357 # Check to see if the nm accepts a BSD-compat flag.
1358 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1359 # nm: unknown option "B" ignored
1360 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1361 ac_cv_path_NM="$ac_dir/nm -B"
1362 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1363 ac_cv_path_NM="$ac_dir/nm -p"
1364 else
1365 ac_cv_path_NM="$ac_dir/nm"
1366 fi
1367 break
1368 fi
1369 done
1370 IFS="$ac_save_ifs"
1371 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1372 else
1373 ac_cv_path_NM="$NM" # Let the user override the test with a path.
1374 fi
1375 fi
1376
1377 NM="$ac_cv_path_NM"
1378 echo "$ac_t""$NM" 1>&6
1379
1380
1381 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1382 echo "configure:1383: checking whether ln -s works" >&5
1383 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1385 else
1386 rm -f conftestdata
1387 if ln -s X conftestdata 2>/dev/null
1388 then
1389 rm -f conftestdata
1390 ac_cv_prog_LN_S="ln -s"
1391 else
1392 ac_cv_prog_LN_S=ln
1393 fi
1394 fi
1395 LN_S="$ac_cv_prog_LN_S"
1396 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1397 echo "$ac_t""yes" 1>&6
1398 else
1399 echo "$ac_t""no" 1>&6
1400 fi
1401
1402 # Always use our own libtool.
1403 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1404
1405 # Check for any special flags to pass to ltconfig.
1406 libtool_flags=
1407 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1408 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1409 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1410 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1411 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1412
1413 # Some flags need to be propagated to the compiler or linker for good
1414 # libtool support.
1415 case "$host" in
1416 *-*-irix6*)
1417 # Find out which ABI we are using.
1418 echo '#line 1419 "configure"' > conftest.$ac_ext
1419 if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1420 case "`/usr/bin/file conftest.o`" in
1421 *32-bit*)
1422 LD="${LD-ld} -32"
1423 ;;
1424 *N32*)
1425 LD="${LD-ld} -n32"
1426 ;;
1427 *64-bit*)
1428 LD="${LD-ld} -64"
1429 ;;
1430 esac
1431 fi
1432 rm -rf conftest*
1433 ;;
1434
1435 *-*-sco3.2v5*)
1436 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1437 CFLAGS="$CFLAGS -belf"
1438 ;;
1439
1440 *-*-cygwin32*)
1441 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1442 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1444 echo "configure:1445: checking for $ac_word" >&5
1445 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1447 else
1448 if test -n "$DLLTOOL"; then
1449 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1450 else
1451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1452 for ac_dir in $PATH; do
1453 test -z "$ac_dir" && ac_dir=.
1454 if test -f $ac_dir/$ac_word; then
1455 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1456 break
1457 fi
1458 done
1459 IFS="$ac_save_ifs"
1460 fi
1461 fi
1462 DLLTOOL="$ac_cv_prog_DLLTOOL"
1463 if test -n "$DLLTOOL"; then
1464 echo "$ac_t""$DLLTOOL" 1>&6
1465 else
1466 echo "$ac_t""no" 1>&6
1467 fi
1468
1469
1470 if test -z "$ac_cv_prog_DLLTOOL"; then
1471 if test -n "$ac_tool_prefix"; then
1472 # Extract the first word of "dlltool", so it can be a program name with args.
1473 set dummy dlltool; ac_word=$2
1474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1475 echo "configure:1476: checking for $ac_word" >&5
1476 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479 if test -n "$DLLTOOL"; then
1480 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1481 else
1482 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1483 for ac_dir in $PATH; do
1484 test -z "$ac_dir" && ac_dir=.
1485 if test -f $ac_dir/$ac_word; then
1486 ac_cv_prog_DLLTOOL="dlltool"
1487 break
1488 fi
1489 done
1490 IFS="$ac_save_ifs"
1491 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1492 fi
1493 fi
1494 DLLTOOL="$ac_cv_prog_DLLTOOL"
1495 if test -n "$DLLTOOL"; then
1496 echo "$ac_t""$DLLTOOL" 1>&6
1497 else
1498 echo "$ac_t""no" 1>&6
1499 fi
1500
1501 else
1502 DLLTOOL="false"
1503 fi
1504 fi
1505
1506 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1507 set dummy ${ac_tool_prefix}as; ac_word=$2
1508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1509 echo "configure:1510: checking for $ac_word" >&5
1510 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1512 else
1513 if test -n "$AS"; then
1514 ac_cv_prog_AS="$AS" # Let the user override the test.
1515 else
1516 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1517 for ac_dir in $PATH; do
1518 test -z "$ac_dir" && ac_dir=.
1519 if test -f $ac_dir/$ac_word; then
1520 ac_cv_prog_AS="${ac_tool_prefix}as"
1521 break
1522 fi
1523 done
1524 IFS="$ac_save_ifs"
1525 fi
1526 fi
1527 AS="$ac_cv_prog_AS"
1528 if test -n "$AS"; then
1529 echo "$ac_t""$AS" 1>&6
1530 else
1531 echo "$ac_t""no" 1>&6
1532 fi
1533
1534
1535 if test -z "$ac_cv_prog_AS"; then
1536 if test -n "$ac_tool_prefix"; then
1537 # Extract the first word of "as", so it can be a program name with args.
1538 set dummy as; ac_word=$2
1539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1540 echo "configure:1541: checking for $ac_word" >&5
1541 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1542 echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544 if test -n "$AS"; then
1545 ac_cv_prog_AS="$AS" # Let the user override the test.
1546 else
1547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1548 for ac_dir in $PATH; do
1549 test -z "$ac_dir" && ac_dir=.
1550 if test -f $ac_dir/$ac_word; then
1551 ac_cv_prog_AS="as"
1552 break
1553 fi
1554 done
1555 IFS="$ac_save_ifs"
1556 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1557 fi
1558 fi
1559 AS="$ac_cv_prog_AS"
1560 if test -n "$AS"; then
1561 echo "$ac_t""$AS" 1>&6
1562 else
1563 echo "$ac_t""no" 1>&6
1564 fi
1565
1566 else
1567 AS="false"
1568 fi
1569 fi
1570
1571
1572 ;;
1573
1574 esac
1575
1576 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1577 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1578 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1579 DLLTOOL="$DLLTOOL" AS="$AS" \
1580 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1581 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1582 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1583
1584
1585 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1586 if test "${enable_64_bit_bfd+set}" = set; then
1587 enableval="$enable_64_bit_bfd"
1588 case "${enableval}" in
1589 yes) want64=true ;;
1590 no) want64=false ;;
1591 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
1592 esac
1593 else
1594 want64=false
1595 fi
1596 # Check whether --enable-targets or --disable-targets was given.
1597 if test "${enable_targets+set}" = set; then
1598 enableval="$enable_targets"
1599 case "${enableval}" in
1600 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1601 ;;
1602 no) enable_targets= ;;
1603 *) enable_targets=$enableval ;;
1604 esac
1605 fi
1606 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1607 if test "${enable_commonbfdlib+set}" = set; then
1608 enableval="$enable_commonbfdlib"
1609 case "${enableval}" in
1610 yes) commonbfdlib=true ;;
1611 no) commonbfdlib=false ;;
1612 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1613 esac
1614 fi
1615 # Check whether --with-mmap or --without-mmap was given.
1616 if test "${with_mmap+set}" = set; then
1617 withval="$with_mmap"
1618 case "${withval}" in
1619 yes) want_mmap=true ;;
1620 no) want_mmap=false ;;
1621 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
1622 esac
1623 else
1624 want_mmap=false
1625 fi
1626
1627
1628
1629
1630
1631 if test -z "$target" ; then
1632 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1633 fi
1634 if test "$program_transform_name" = s,x,x,; then
1635 program_transform_name=
1636 else
1637 # Double any \ or $. echo might interpret backslashes.
1638 cat <<\EOF_SED > conftestsed
1639 s,\\,\\\\,g; s,\$,$$,g
1640 EOF_SED
1641 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1642 rm -f conftestsed
1643 fi
1644 test "$program_prefix" != NONE &&
1645 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1646 # Use a double $ so make ignores it.
1647 test "$program_suffix" != NONE &&
1648 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1649
1650 # sed with no file args requires a program.
1651 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1652
1653
1654 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1655 echo "configure:1656: checking whether to enable maintainer-specific portions of Makefiles" >&5
1656 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1657 if test "${enable_maintainer_mode+set}" = set; then
1658 enableval="$enable_maintainer_mode"
1659 USE_MAINTAINER_MODE=$enableval
1660 else
1661 USE_MAINTAINER_MODE=no
1662 fi
1663
1664 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1665 if test $USE_MAINTAINER_MODE = yes; then
1666 MAINT=
1667 else
1668 MAINT='#M#'
1669 fi
1670
1671
1672 echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
1673 echo "configure:1674: checking for Cygwin32 environment" >&5
1674 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677 cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680
1681 int main() {
1682 return __CYGWIN32__;
1683 ; return 0; }
1684 EOF
1685 if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1686 rm -rf conftest*
1687 am_cv_cygwin32=yes
1688 else
1689 echo "configure: failed program was:" >&5
1690 cat conftest.$ac_ext >&5
1691 rm -rf conftest*
1692 am_cv_cygwin32=no
1693 fi
1694 rm -f conftest*
1695 rm -f conftest*
1696 fi
1697
1698 echo "$ac_t""$am_cv_cygwin32" 1>&6
1699 CYGWIN32=
1700 test "$am_cv_cygwin32" = yes && CYGWIN32=yes
1701 echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
1702 echo "configure:1703: checking for Mingw32 environment" >&5
1703 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706 cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1709
1710 int main() {
1711 return __MINGW32__;
1712 ; return 0; }
1713 EOF
1714 if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1715 rm -rf conftest*
1716 am_cv_mingw32=yes
1717 else
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1720 rm -rf conftest*
1721 am_cv_mingw32=no
1722 fi
1723 rm -f conftest*
1724 rm -f conftest*
1725 fi
1726
1727 echo "$ac_t""$am_cv_mingw32" 1>&6
1728 MINGW32=
1729 test "$am_cv_mingw32" = yes && MINGW32=yes
1730
1731
1732 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1733 echo "configure:1734: checking for executable suffix" >&5
1734 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736 else
1737 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
1738 am_cv_exeext=.exe
1739 else
1740 cat > am_c_test.c << 'EOF'
1741 int main() {
1742 /* Nothing needed here */
1743 }
1744 EOF
1745 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
1746 am_cv_exeext=
1747 for file in am_c_test.*; do
1748 case $file in
1749 *.c) ;;
1750 *.o) ;;
1751 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
1752 esac
1753 done
1754 rm -f am_c_test*
1755 fi
1756
1757 test x"${am_cv_exeext}" = x && am_cv_exeext=no
1758 fi
1759 EXEEXT=""
1760 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1761 echo "$ac_t""${am_cv_exeext}" 1>&6
1762
1763
1764 host64=false
1765 target64=false
1766
1767 # host stuff:
1768
1769 # Extract the first word of "gcc", so it can be a program name with args.
1770 set dummy gcc; ac_word=$2
1771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1772 echo "configure:1773: checking for $ac_word" >&5
1773 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776 if test -n "$CC"; then
1777 ac_cv_prog_CC="$CC" # Let the user override the test.
1778 else
1779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1780 for ac_dir in $PATH; do
1781 test -z "$ac_dir" && ac_dir=.
1782 if test -f $ac_dir/$ac_word; then
1783 ac_cv_prog_CC="gcc"
1784 break
1785 fi
1786 done
1787 IFS="$ac_save_ifs"
1788 fi
1789 fi
1790 CC="$ac_cv_prog_CC"
1791 if test -n "$CC"; then
1792 echo "$ac_t""$CC" 1>&6
1793 else
1794 echo "$ac_t""no" 1>&6
1795 fi
1796
1797 if test -z "$CC"; then
1798 # Extract the first word of "cc", so it can be a program name with args.
1799 set dummy cc; ac_word=$2
1800 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1801 echo "configure:1802: checking for $ac_word" >&5
1802 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805 if test -n "$CC"; then
1806 ac_cv_prog_CC="$CC" # Let the user override the test.
1807 else
1808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1809 ac_prog_rejected=no
1810 for ac_dir in $PATH; do
1811 test -z "$ac_dir" && ac_dir=.
1812 if test -f $ac_dir/$ac_word; then
1813 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1814 ac_prog_rejected=yes
1815 continue
1816 fi
1817 ac_cv_prog_CC="cc"
1818 break
1819 fi
1820 done
1821 IFS="$ac_save_ifs"
1822 if test $ac_prog_rejected = yes; then
1823 # We found a bogon in the path, so make sure we never use it.
1824 set dummy $ac_cv_prog_CC
1825 shift
1826 if test $# -gt 0; then
1827 # We chose a different compiler from the bogus one.
1828 # However, it has the same basename, so the bogon will be chosen
1829 # first if we set CC to just the basename; use the full file name.
1830 shift
1831 set dummy "$ac_dir/$ac_word" "$@"
1832 shift
1833 ac_cv_prog_CC="$@"
1834 fi
1835 fi
1836 fi
1837 fi
1838 CC="$ac_cv_prog_CC"
1839 if test -n "$CC"; then
1840 echo "$ac_t""$CC" 1>&6
1841 else
1842 echo "$ac_t""no" 1>&6
1843 fi
1844
1845 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1846 fi
1847
1848 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1849 echo "configure:1850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1850
1851 ac_ext=c
1852 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1853 ac_cpp='$CPP $CPPFLAGS'
1854 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1855 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1856 cross_compiling=$ac_cv_prog_cc_cross
1857
1858 cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861 main(){return(0);}
1862 EOF
1863 if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1864 ac_cv_prog_cc_works=yes
1865 # If we can't run a trivial program, we are probably using a cross compiler.
1866 if (./conftest; exit) 2>/dev/null; then
1867 ac_cv_prog_cc_cross=no
1868 else
1869 ac_cv_prog_cc_cross=yes
1870 fi
1871 else
1872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 ac_cv_prog_cc_works=no
1875 fi
1876 rm -fr conftest*
1877
1878 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1879 if test $ac_cv_prog_cc_works = no; then
1880 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1881 fi
1882 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1883 echo "configure:1884: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1884 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1885 cross_compiling=$ac_cv_prog_cc_cross
1886
1887 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1888 echo "configure:1889: checking whether we are using GNU C" >&5
1889 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892 cat > conftest.c <<EOF
1893 #ifdef __GNUC__
1894 yes;
1895 #endif
1896 EOF
1897 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1898 ac_cv_prog_gcc=yes
1899 else
1900 ac_cv_prog_gcc=no
1901 fi
1902 fi
1903
1904 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1905
1906 if test $ac_cv_prog_gcc = yes; then
1907 GCC=yes
1908 ac_test_CFLAGS="${CFLAGS+set}"
1909 ac_save_CFLAGS="$CFLAGS"
1910 CFLAGS=
1911 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1912 echo "configure:1913: checking whether ${CC-cc} accepts -g" >&5
1913 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916 echo 'void f(){}' > conftest.c
1917 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1918 ac_cv_prog_cc_g=yes
1919 else
1920 ac_cv_prog_cc_g=no
1921 fi
1922 rm -f conftest*
1923
1924 fi
1925
1926 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1927 if test "$ac_test_CFLAGS" = set; then
1928 CFLAGS="$ac_save_CFLAGS"
1929 elif test $ac_cv_prog_cc_g = yes; then
1930 CFLAGS="-g -O2"
1931 else
1932 CFLAGS="-O2"
1933 fi
1934 else
1935 GCC=
1936 test "${CFLAGS+set}" = set || CFLAGS="-g"
1937 fi
1938
1939
1940 ALL_LINGUAS=
1941 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1942 echo "configure:1943: checking how to run the C preprocessor" >&5
1943 # On Suns, sometimes $CPP names a directory.
1944 if test -n "$CPP" && test -d "$CPP"; then
1945 CPP=
1946 fi
1947 if test -z "$CPP"; then
1948 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1949 echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951 # This must be in double quotes, not single quotes, because CPP may get
1952 # substituted into the Makefile and "${CC-cc}" will confuse make.
1953 CPP="${CC-cc} -E"
1954 # On the NeXT, cc -E runs the code through the compiler's parser,
1955 # not just through cpp.
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 #include <assert.h>
1960 Syntax Error
1961 EOF
1962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1963 { (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1964 ac_err=`grep -v '^ *+' conftest.out`
1965 if test -z "$ac_err"; then
1966 :
1967 else
1968 echo "$ac_err" >&5
1969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 rm -rf conftest*
1972 CPP="${CC-cc} -E -traditional-cpp"
1973 cat > conftest.$ac_ext <<EOF
1974 #line 1975 "configure"
1975 #include "confdefs.h"
1976 #include <assert.h>
1977 Syntax Error
1978 EOF
1979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1980 { (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1981 ac_err=`grep -v '^ *+' conftest.out`
1982 if test -z "$ac_err"; then
1983 :
1984 else
1985 echo "$ac_err" >&5
1986 echo "configure: failed program was:" >&5
1987 cat conftest.$ac_ext >&5
1988 rm -rf conftest*
1989 CPP=/lib/cpp
1990 fi
1991 rm -f conftest*
1992 fi
1993 rm -f conftest*
1994 ac_cv_prog_CPP="$CPP"
1995 fi
1996 CPP="$ac_cv_prog_CPP"
1997 else
1998 ac_cv_prog_CPP="$CPP"
1999 fi
2000 echo "$ac_t""$CPP" 1>&6
2001
2002 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2003 echo "configure:2004: checking for ANSI C header files" >&5
2004 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010 #include <stdlib.h>
2011 #include <stdarg.h>
2012 #include <string.h>
2013 #include <float.h>
2014 EOF
2015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2016 { (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2017 ac_err=`grep -v '^ *+' conftest.out`
2018 if test -z "$ac_err"; then
2019 rm -rf conftest*
2020 ac_cv_header_stdc=yes
2021 else
2022 echo "$ac_err" >&5
2023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 rm -rf conftest*
2026 ac_cv_header_stdc=no
2027 fi
2028 rm -f conftest*
2029
2030 if test $ac_cv_header_stdc = yes; then
2031 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2032 cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 #include <string.h>
2036 EOF
2037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2038 egrep "memchr" >/dev/null 2>&1; then
2039 :
2040 else
2041 rm -rf conftest*
2042 ac_cv_header_stdc=no
2043 fi
2044 rm -f conftest*
2045
2046 fi
2047
2048 if test $ac_cv_header_stdc = yes; then
2049 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 #include <stdlib.h>
2054 EOF
2055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2056 egrep "free" >/dev/null 2>&1; then
2057 :
2058 else
2059 rm -rf conftest*
2060 ac_cv_header_stdc=no
2061 fi
2062 rm -f conftest*
2063
2064 fi
2065
2066 if test $ac_cv_header_stdc = yes; then
2067 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2068 if test "$cross_compiling" = yes; then
2069 :
2070 else
2071 cat > conftest.$ac_ext <<EOF
2072 #line 2073 "configure"
2073 #include "confdefs.h"
2074 #include <ctype.h>
2075 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2076 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2077 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2078 int main () { int i; for (i = 0; i < 256; i++)
2079 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2080 exit (0); }
2081
2082 EOF
2083 if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2084 then
2085 :
2086 else
2087 echo "configure: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
2089 rm -fr conftest*
2090 ac_cv_header_stdc=no
2091 fi
2092 rm -fr conftest*
2093 fi
2094
2095 fi
2096 fi
2097
2098 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2099 if test $ac_cv_header_stdc = yes; then
2100 cat >> confdefs.h <<\EOF
2101 #define STDC_HEADERS 1
2102 EOF
2103
2104 fi
2105
2106 echo $ac_n "checking for working const""... $ac_c" 1>&6
2107 echo "configure:2108: checking for working const" >&5
2108 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2109 echo $ac_n "(cached) $ac_c" 1>&6
2110 else
2111 cat > conftest.$ac_ext <<EOF
2112 #line 2113 "configure"
2113 #include "confdefs.h"
2114
2115 int main() {
2116
2117 /* Ultrix mips cc rejects this. */
2118 typedef int charset[2]; const charset x;
2119 /* SunOS 4.1.1 cc rejects this. */
2120 char const *const *ccp;
2121 char **p;
2122 /* NEC SVR4.0.2 mips cc rejects this. */
2123 struct point {int x, y;};
2124 static struct point const zero = {0,0};
2125 /* AIX XL C 1.02.0.0 rejects this.
2126 It does not let you subtract one const X* pointer from another in an arm
2127 of an if-expression whose if-part is not a constant expression */
2128 const char *g = "string";
2129 ccp = &g + (g ? g-g : 0);
2130 /* HPUX 7.0 cc rejects these. */
2131 ++ccp;
2132 p = (char**) ccp;
2133 ccp = (char const *const *) p;
2134 { /* SCO 3.2v4 cc rejects this. */
2135 char *t;
2136 char const *s = 0 ? (char *) 0 : (char const *) 0;
2137
2138 *t++ = 0;
2139 }
2140 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2141 int x[] = {25, 17};
2142 const int *foo = &x[0];
2143 ++foo;
2144 }
2145 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2146 typedef const int *iptr;
2147 iptr p = 0;
2148 ++p;
2149 }
2150 { /* AIX XL C 1.02.0.0 rejects this saying
2151 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2152 struct s { int j; const int *ap[3]; };
2153 struct s *b; b->j = 5;
2154 }
2155 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2156 const int foo = 10;
2157 }
2158
2159 ; return 0; }
2160 EOF
2161 if { (eval echo configure:2162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2162 rm -rf conftest*
2163 ac_cv_c_const=yes
2164 else
2165 echo "configure: failed program was:" >&5
2166 cat conftest.$ac_ext >&5
2167 rm -rf conftest*
2168 ac_cv_c_const=no
2169 fi
2170 rm -f conftest*
2171 fi
2172
2173 echo "$ac_t""$ac_cv_c_const" 1>&6
2174 if test $ac_cv_c_const = no; then
2175 cat >> confdefs.h <<\EOF
2176 #define const
2177 EOF
2178
2179 fi
2180
2181 echo $ac_n "checking for inline""... $ac_c" 1>&6
2182 echo "configure:2183: checking for inline" >&5
2183 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186 ac_cv_c_inline=no
2187 for ac_kw in inline __inline__ __inline; do
2188 cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191
2192 int main() {
2193 } $ac_kw foo() {
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_c_inline=$ac_kw; break
2199 else
2200 echo "configure: failed program was:" >&5
2201 cat conftest.$ac_ext >&5
2202 fi
2203 rm -f conftest*
2204 done
2205
2206 fi
2207
2208 echo "$ac_t""$ac_cv_c_inline" 1>&6
2209 case "$ac_cv_c_inline" in
2210 inline | yes) ;;
2211 no) cat >> confdefs.h <<\EOF
2212 #define inline
2213 EOF
2214 ;;
2215 *) cat >> confdefs.h <<EOF
2216 #define inline $ac_cv_c_inline
2217 EOF
2218 ;;
2219 esac
2220
2221 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2222 echo "configure:2223: checking for off_t" >&5
2223 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2224 echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226 cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <sys/types.h>
2230 #if STDC_HEADERS
2231 #include <stdlib.h>
2232 #include <stddef.h>
2233 #endif
2234 EOF
2235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2236 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2237 rm -rf conftest*
2238 ac_cv_type_off_t=yes
2239 else
2240 rm -rf conftest*
2241 ac_cv_type_off_t=no
2242 fi
2243 rm -f conftest*
2244
2245 fi
2246 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2247 if test $ac_cv_type_off_t = no; then
2248 cat >> confdefs.h <<\EOF
2249 #define off_t long
2250 EOF
2251
2252 fi
2253
2254 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2255 echo "configure:2256: checking for size_t" >&5
2256 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2258 else
2259 cat > conftest.$ac_ext <<EOF
2260 #line 2261 "configure"
2261 #include "confdefs.h"
2262 #include <sys/types.h>
2263 #if STDC_HEADERS
2264 #include <stdlib.h>
2265 #include <stddef.h>
2266 #endif
2267 EOF
2268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2269 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2270 rm -rf conftest*
2271 ac_cv_type_size_t=yes
2272 else
2273 rm -rf conftest*
2274 ac_cv_type_size_t=no
2275 fi
2276 rm -f conftest*
2277
2278 fi
2279 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2280 if test $ac_cv_type_size_t = no; then
2281 cat >> confdefs.h <<\EOF
2282 #define size_t unsigned
2283 EOF
2284
2285 fi
2286
2287 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2288 # for constant arguments. Useless!
2289 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2290 echo "configure:2291: checking for working alloca.h" >&5
2291 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2292 echo $ac_n "(cached) $ac_c" 1>&6
2293 else
2294 cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 #include <alloca.h>
2298 int main() {
2299 char *p = alloca(2 * sizeof(int));
2300 ; return 0; }
2301 EOF
2302 if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2303 rm -rf conftest*
2304 ac_cv_header_alloca_h=yes
2305 else
2306 echo "configure: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2308 rm -rf conftest*
2309 ac_cv_header_alloca_h=no
2310 fi
2311 rm -f conftest*
2312 fi
2313
2314 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2315 if test $ac_cv_header_alloca_h = yes; then
2316 cat >> confdefs.h <<\EOF
2317 #define HAVE_ALLOCA_H 1
2318 EOF
2319
2320 fi
2321
2322 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2323 echo "configure:2324: checking for alloca" >&5
2324 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2326 else
2327 cat > conftest.$ac_ext <<EOF
2328 #line 2329 "configure"
2329 #include "confdefs.h"
2330
2331 #ifdef __GNUC__
2332 # define alloca __builtin_alloca
2333 #else
2334 # if HAVE_ALLOCA_H
2335 # include <alloca.h>
2336 # else
2337 # ifdef _AIX
2338 #pragma alloca
2339 # else
2340 # ifndef alloca /* predefined by HP cc +Olibcalls */
2341 char *alloca ();
2342 # endif
2343 # endif
2344 # endif
2345 #endif
2346
2347 int main() {
2348 char *p = (char *) alloca(1);
2349 ; return 0; }
2350 EOF
2351 if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2352 rm -rf conftest*
2353 ac_cv_func_alloca_works=yes
2354 else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357 rm -rf conftest*
2358 ac_cv_func_alloca_works=no
2359 fi
2360 rm -f conftest*
2361 fi
2362
2363 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2364 if test $ac_cv_func_alloca_works = yes; then
2365 cat >> confdefs.h <<\EOF
2366 #define HAVE_ALLOCA 1
2367 EOF
2368
2369 fi
2370
2371 if test $ac_cv_func_alloca_works = no; then
2372 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2373 # that cause trouble. Some versions do not even contain alloca or
2374 # contain a buggy version. If you still want to use their alloca,
2375 # use ar to extract alloca.o from them instead of compiling alloca.c.
2376 ALLOCA=alloca.o
2377 cat >> confdefs.h <<\EOF
2378 #define C_ALLOCA 1
2379 EOF
2380
2381
2382 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2383 echo "configure:2384: checking whether alloca needs Cray hooks" >&5
2384 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2385 echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387 cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 #if defined(CRAY) && ! defined(CRAY2)
2391 webecray
2392 #else
2393 wenotbecray
2394 #endif
2395
2396 EOF
2397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2398 egrep "webecray" >/dev/null 2>&1; then
2399 rm -rf conftest*
2400 ac_cv_os_cray=yes
2401 else
2402 rm -rf conftest*
2403 ac_cv_os_cray=no
2404 fi
2405 rm -f conftest*
2406
2407 fi
2408
2409 echo "$ac_t""$ac_cv_os_cray" 1>&6
2410 if test $ac_cv_os_cray = yes; then
2411 for ac_func in _getb67 GETB67 getb67; do
2412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2413 echo "configure:2414: checking for $ac_func" >&5
2414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2415 echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417 cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420 /* System header to define __stub macros and hopefully few prototypes,
2421 which can conflict with char $ac_func(); below. */
2422 #include <assert.h>
2423 /* Override any gcc2 internal prototype to avoid an error. */
2424 /* We use char because int might match the return type of a gcc2
2425 builtin and then its argument prototype would still apply. */
2426 char $ac_func();
2427
2428 int main() {
2429
2430 /* The GNU C library defines this for functions which it implements
2431 to always fail with ENOSYS. Some functions are actually named
2432 something starting with __ and the normal name is an alias. */
2433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2434 choke me
2435 #else
2436 $ac_func();
2437 #endif
2438
2439 ; return 0; }
2440 EOF
2441 if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2442 rm -rf conftest*
2443 eval "ac_cv_func_$ac_func=yes"
2444 else
2445 echo "configure: failed program was:" >&5
2446 cat conftest.$ac_ext >&5
2447 rm -rf conftest*
2448 eval "ac_cv_func_$ac_func=no"
2449 fi
2450 rm -f conftest*
2451 fi
2452
2453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2454 echo "$ac_t""yes" 1>&6
2455 cat >> confdefs.h <<EOF
2456 #define CRAY_STACKSEG_END $ac_func
2457 EOF
2458
2459 break
2460 else
2461 echo "$ac_t""no" 1>&6
2462 fi
2463
2464 done
2465 fi
2466
2467 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2468 echo "configure:2469: checking stack direction for C alloca" >&5
2469 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472 if test "$cross_compiling" = yes; then
2473 ac_cv_c_stack_direction=0
2474 else
2475 cat > conftest.$ac_ext <<EOF
2476 #line 2477 "configure"
2477 #include "confdefs.h"
2478 find_stack_direction ()
2479 {
2480 static char *addr = 0;
2481 auto char dummy;
2482 if (addr == 0)
2483 {
2484 addr = &dummy;
2485 return find_stack_direction ();
2486 }
2487 else
2488 return (&dummy > addr) ? 1 : -1;
2489 }
2490 main ()
2491 {
2492 exit (find_stack_direction() < 0);
2493 }
2494 EOF
2495 if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2496 then
2497 ac_cv_c_stack_direction=1
2498 else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -fr conftest*
2502 ac_cv_c_stack_direction=-1
2503 fi
2504 rm -fr conftest*
2505 fi
2506
2507 fi
2508
2509 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2510 cat >> confdefs.h <<EOF
2511 #define STACK_DIRECTION $ac_cv_c_stack_direction
2512 EOF
2513
2514 fi
2515
2516 for ac_hdr in unistd.h
2517 do
2518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2520 echo "configure:2521: checking for $ac_hdr" >&5
2521 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2522 echo $ac_n "(cached) $ac_c" 1>&6
2523 else
2524 cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <$ac_hdr>
2528 EOF
2529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2530 { (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2531 ac_err=`grep -v '^ *+' conftest.out`
2532 if test -z "$ac_err"; then
2533 rm -rf conftest*
2534 eval "ac_cv_header_$ac_safe=yes"
2535 else
2536 echo "$ac_err" >&5
2537 echo "configure: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 rm -rf conftest*
2540 eval "ac_cv_header_$ac_safe=no"
2541 fi
2542 rm -f conftest*
2543 fi
2544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2545 echo "$ac_t""yes" 1>&6
2546 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2547 cat >> confdefs.h <<EOF
2548 #define $ac_tr_hdr 1
2549 EOF
2550
2551 else
2552 echo "$ac_t""no" 1>&6
2553 fi
2554 done
2555
2556 for ac_func in getpagesize
2557 do
2558 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2559 echo "configure:2560: checking for $ac_func" >&5
2560 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2561 echo $ac_n "(cached) $ac_c" 1>&6
2562 else
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 /* System header to define __stub macros and hopefully few prototypes,
2567 which can conflict with char $ac_func(); below. */
2568 #include <assert.h>
2569 /* Override any gcc2 internal prototype to avoid an error. */
2570 /* We use char because int might match the return type of a gcc2
2571 builtin and then its argument prototype would still apply. */
2572 char $ac_func();
2573
2574 int main() {
2575
2576 /* The GNU C library defines this for functions which it implements
2577 to always fail with ENOSYS. Some functions are actually named
2578 something starting with __ and the normal name is an alias. */
2579 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2580 choke me
2581 #else
2582 $ac_func();
2583 #endif
2584
2585 ; return 0; }
2586 EOF
2587 if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2588 rm -rf conftest*
2589 eval "ac_cv_func_$ac_func=yes"
2590 else
2591 echo "configure: failed program was:" >&5
2592 cat conftest.$ac_ext >&5
2593 rm -rf conftest*
2594 eval "ac_cv_func_$ac_func=no"
2595 fi
2596 rm -f conftest*
2597 fi
2598
2599 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2600 echo "$ac_t""yes" 1>&6
2601 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2602 cat >> confdefs.h <<EOF
2603 #define $ac_tr_func 1
2604 EOF
2605
2606 else
2607 echo "$ac_t""no" 1>&6
2608 fi
2609 done
2610
2611 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2612 echo "configure:2613: checking for working mmap" >&5
2613 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 if test "$cross_compiling" = yes; then
2617 ac_cv_func_mmap_fixed_mapped=no
2618 else
2619 cat > conftest.$ac_ext <<EOF
2620 #line 2621 "configure"
2621 #include "confdefs.h"
2622
2623 /* Thanks to Mike Haertel and Jim Avera for this test.
2624 Here is a matrix of mmap possibilities:
2625 mmap private not fixed
2626 mmap private fixed at somewhere currently unmapped
2627 mmap private fixed at somewhere already mapped
2628 mmap shared not fixed
2629 mmap shared fixed at somewhere currently unmapped
2630 mmap shared fixed at somewhere already mapped
2631 For private mappings, we should verify that changes cannot be read()
2632 back from the file, nor mmap's back from the file at a different
2633 address. (There have been systems where private was not correctly
2634 implemented like the infamous i386 svr4.0, and systems where the
2635 VM page cache was not coherent with the filesystem buffer cache
2636 like early versions of FreeBSD and possibly contemporary NetBSD.)
2637 For shared mappings, we should conversely verify that changes get
2638 propogated back to all the places they're supposed to be.
2639
2640 Grep wants private fixed already mapped.
2641 The main things grep needs to know about mmap are:
2642 * does it exist and is it safe to write into the mmap'd area
2643 * how to use it (BSD variants) */
2644 #include <sys/types.h>
2645 #include <fcntl.h>
2646 #include <sys/mman.h>
2647
2648 /* This mess was copied from the GNU getpagesize.h. */
2649 #ifndef HAVE_GETPAGESIZE
2650 # ifdef HAVE_UNISTD_H
2651 # include <unistd.h>
2652 # endif
2653
2654 /* Assume that all systems that can run configure have sys/param.h. */
2655 # ifndef HAVE_SYS_PARAM_H
2656 # define HAVE_SYS_PARAM_H 1
2657 # endif
2658
2659 # ifdef _SC_PAGESIZE
2660 # define getpagesize() sysconf(_SC_PAGESIZE)
2661 # else /* no _SC_PAGESIZE */
2662 # ifdef HAVE_SYS_PARAM_H
2663 # include <sys/param.h>
2664 # ifdef EXEC_PAGESIZE
2665 # define getpagesize() EXEC_PAGESIZE
2666 # else /* no EXEC_PAGESIZE */
2667 # ifdef NBPG
2668 # define getpagesize() NBPG * CLSIZE
2669 # ifndef CLSIZE
2670 # define CLSIZE 1
2671 # endif /* no CLSIZE */
2672 # else /* no NBPG */
2673 # ifdef NBPC
2674 # define getpagesize() NBPC
2675 # else /* no NBPC */
2676 # ifdef PAGESIZE
2677 # define getpagesize() PAGESIZE
2678 # endif /* PAGESIZE */
2679 # endif /* no NBPC */
2680 # endif /* no NBPG */
2681 # endif /* no EXEC_PAGESIZE */
2682 # else /* no HAVE_SYS_PARAM_H */
2683 # define getpagesize() 8192 /* punt totally */
2684 # endif /* no HAVE_SYS_PARAM_H */
2685 # endif /* no _SC_PAGESIZE */
2686
2687 #endif /* no HAVE_GETPAGESIZE */
2688
2689 #ifdef __cplusplus
2690 extern "C" { void *malloc(unsigned); }
2691 #else
2692 char *malloc();
2693 #endif
2694
2695 int
2696 main()
2697 {
2698 char *data, *data2, *data3;
2699 int i, pagesize;
2700 int fd;
2701
2702 pagesize = getpagesize();
2703
2704 /*
2705 * First, make a file with some known garbage in it.
2706 */
2707 data = malloc(pagesize);
2708 if (!data)
2709 exit(1);
2710 for (i = 0; i < pagesize; ++i)
2711 *(data + i) = rand();
2712 umask(0);
2713 fd = creat("conftestmmap", 0600);
2714 if (fd < 0)
2715 exit(1);
2716 if (write(fd, data, pagesize) != pagesize)
2717 exit(1);
2718 close(fd);
2719
2720 /*
2721 * Next, try to mmap the file at a fixed address which
2722 * already has something else allocated at it. If we can,
2723 * also make sure that we see the same garbage.
2724 */
2725 fd = open("conftestmmap", O_RDWR);
2726 if (fd < 0)
2727 exit(1);
2728 data2 = malloc(2 * pagesize);
2729 if (!data2)
2730 exit(1);
2731 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2732 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2733 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2734 exit(1);
2735 for (i = 0; i < pagesize; ++i)
2736 if (*(data + i) != *(data2 + i))
2737 exit(1);
2738
2739 /*
2740 * Finally, make sure that changes to the mapped area
2741 * do not percolate back to the file as seen by read().
2742 * (This is a bug on some variants of i386 svr4.0.)
2743 */
2744 for (i = 0; i < pagesize; ++i)
2745 *(data2 + i) = *(data2 + i) + 1;
2746 data3 = malloc(pagesize);
2747 if (!data3)
2748 exit(1);
2749 if (read(fd, data3, pagesize) != pagesize)
2750 exit(1);
2751 for (i = 0; i < pagesize; ++i)
2752 if (*(data + i) != *(data3 + i))
2753 exit(1);
2754 close(fd);
2755 unlink("conftestmmap");
2756 exit(0);
2757 }
2758
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2761 then
2762 ac_cv_func_mmap_fixed_mapped=yes
2763 else
2764 echo "configure: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 rm -fr conftest*
2767 ac_cv_func_mmap_fixed_mapped=no
2768 fi
2769 rm -fr conftest*
2770 fi
2771
2772 fi
2773
2774 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2775 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2776 cat >> confdefs.h <<\EOF
2777 #define HAVE_MMAP 1
2778 EOF
2779
2780 fi
2781
2782
2783 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2784 unistd.h values.h sys/param.h
2785 do
2786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2788 echo "configure:2789: checking for $ac_hdr" >&5
2789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2790 echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792 cat > conftest.$ac_ext <<EOF
2793 #line 2794 "configure"
2794 #include "confdefs.h"
2795 #include <$ac_hdr>
2796 EOF
2797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2798 { (eval echo configure:2799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2799 ac_err=`grep -v '^ *+' conftest.out`
2800 if test -z "$ac_err"; then
2801 rm -rf conftest*
2802 eval "ac_cv_header_$ac_safe=yes"
2803 else
2804 echo "$ac_err" >&5
2805 echo "configure: failed program was:" >&5
2806 cat conftest.$ac_ext >&5
2807 rm -rf conftest*
2808 eval "ac_cv_header_$ac_safe=no"
2809 fi
2810 rm -f conftest*
2811 fi
2812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2813 echo "$ac_t""yes" 1>&6
2814 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2815 cat >> confdefs.h <<EOF
2816 #define $ac_tr_hdr 1
2817 EOF
2818
2819 else
2820 echo "$ac_t""no" 1>&6
2821 fi
2822 done
2823
2824 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2825 __argz_count __argz_stringify __argz_next
2826 do
2827 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2828 echo "configure:2829: checking for $ac_func" >&5
2829 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2830 echo $ac_n "(cached) $ac_c" 1>&6
2831 else
2832 cat > conftest.$ac_ext <<EOF
2833 #line 2834 "configure"
2834 #include "confdefs.h"
2835 /* System header to define __stub macros and hopefully few prototypes,
2836 which can conflict with char $ac_func(); below. */
2837 #include <assert.h>
2838 /* Override any gcc2 internal prototype to avoid an error. */
2839 /* We use char because int might match the return type of a gcc2
2840 builtin and then its argument prototype would still apply. */
2841 char $ac_func();
2842
2843 int main() {
2844
2845 /* The GNU C library defines this for functions which it implements
2846 to always fail with ENOSYS. Some functions are actually named
2847 something starting with __ and the normal name is an alias. */
2848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2849 choke me
2850 #else
2851 $ac_func();
2852 #endif
2853
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2857 rm -rf conftest*
2858 eval "ac_cv_func_$ac_func=yes"
2859 else
2860 echo "configure: failed program was:" >&5
2861 cat conftest.$ac_ext >&5
2862 rm -rf conftest*
2863 eval "ac_cv_func_$ac_func=no"
2864 fi
2865 rm -f conftest*
2866 fi
2867
2868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2869 echo "$ac_t""yes" 1>&6
2870 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2871 cat >> confdefs.h <<EOF
2872 #define $ac_tr_func 1
2873 EOF
2874
2875 else
2876 echo "$ac_t""no" 1>&6
2877 fi
2878 done
2879
2880
2881 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2882 for ac_func in stpcpy
2883 do
2884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2885 echo "configure:2886: checking for $ac_func" >&5
2886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2888 else
2889 cat > conftest.$ac_ext <<EOF
2890 #line 2891 "configure"
2891 #include "confdefs.h"
2892 /* System header to define __stub macros and hopefully few prototypes,
2893 which can conflict with char $ac_func(); below. */
2894 #include <assert.h>
2895 /* Override any gcc2 internal prototype to avoid an error. */
2896 /* We use char because int might match the return type of a gcc2
2897 builtin and then its argument prototype would still apply. */
2898 char $ac_func();
2899
2900 int main() {
2901
2902 /* The GNU C library defines this for functions which it implements
2903 to always fail with ENOSYS. Some functions are actually named
2904 something starting with __ and the normal name is an alias. */
2905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2906 choke me
2907 #else
2908 $ac_func();
2909 #endif
2910
2911 ; return 0; }
2912 EOF
2913 if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2914 rm -rf conftest*
2915 eval "ac_cv_func_$ac_func=yes"
2916 else
2917 echo "configure: failed program was:" >&5
2918 cat conftest.$ac_ext >&5
2919 rm -rf conftest*
2920 eval "ac_cv_func_$ac_func=no"
2921 fi
2922 rm -f conftest*
2923 fi
2924
2925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2926 echo "$ac_t""yes" 1>&6
2927 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2928 cat >> confdefs.h <<EOF
2929 #define $ac_tr_func 1
2930 EOF
2931
2932 else
2933 echo "$ac_t""no" 1>&6
2934 fi
2935 done
2936
2937 fi
2938 if test "${ac_cv_func_stpcpy}" = "yes"; then
2939 cat >> confdefs.h <<\EOF
2940 #define HAVE_STPCPY 1
2941 EOF
2942
2943 fi
2944
2945 if test $ac_cv_header_locale_h = yes; then
2946 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2947 echo "configure:2948: checking for LC_MESSAGES" >&5
2948 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2949 echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951 cat > conftest.$ac_ext <<EOF
2952 #line 2953 "configure"
2953 #include "confdefs.h"
2954 #include <locale.h>
2955 int main() {
2956 return LC_MESSAGES
2957 ; return 0; }
2958 EOF
2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2960 rm -rf conftest*
2961 am_cv_val_LC_MESSAGES=yes
2962 else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 am_cv_val_LC_MESSAGES=no
2967 fi
2968 rm -f conftest*
2969 fi
2970
2971 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2972 if test $am_cv_val_LC_MESSAGES = yes; then
2973 cat >> confdefs.h <<\EOF
2974 #define HAVE_LC_MESSAGES 1
2975 EOF
2976
2977 fi
2978 fi
2979 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2980 echo "configure:2981: checking whether NLS is requested" >&5
2981 # Check whether --enable-nls or --disable-nls was given.
2982 if test "${enable_nls+set}" = set; then
2983 enableval="$enable_nls"
2984 USE_NLS=$enableval
2985 else
2986 USE_NLS=yes
2987 fi
2988
2989 echo "$ac_t""$USE_NLS" 1>&6
2990
2991
2992 USE_INCLUDED_LIBINTL=no
2993
2994 if test "$USE_NLS" = "yes"; then
2995 cat >> confdefs.h <<\EOF
2996 #define ENABLE_NLS 1
2997 EOF
2998
2999 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3000 echo "configure:3001: checking whether included gettext is requested" >&5
3001 # Check whether --with-included-gettext or --without-included-gettext was given.
3002 if test "${with_included_gettext+set}" = set; then
3003 withval="$with_included_gettext"
3004 nls_cv_force_use_gnu_gettext=$withval
3005 else
3006 nls_cv_force_use_gnu_gettext=no
3007 fi
3008
3009 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3010
3011 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3012 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3013 nls_cv_header_intl=
3014 nls_cv_header_libgt=
3015 CATOBJEXT=NONE
3016
3017 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3018 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3019 echo "configure:3020: checking for libintl.h" >&5
3020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026 #include <libintl.h>
3027 EOF
3028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3029 { (eval echo configure:3030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3030 ac_err=`grep -v '^ *+' conftest.out`
3031 if test -z "$ac_err"; then
3032 rm -rf conftest*
3033 eval "ac_cv_header_$ac_safe=yes"
3034 else
3035 echo "$ac_err" >&5
3036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 rm -rf conftest*
3039 eval "ac_cv_header_$ac_safe=no"
3040 fi
3041 rm -f conftest*
3042 fi
3043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3044 echo "$ac_t""yes" 1>&6
3045 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3046 echo "configure:3047: checking for gettext in libc" >&5
3047 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3048 echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050 cat > conftest.$ac_ext <<EOF
3051 #line 3052 "configure"
3052 #include "confdefs.h"
3053 #include <libintl.h>
3054 int main() {
3055 return (int) gettext ("")
3056 ; return 0; }
3057 EOF
3058 if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3059 rm -rf conftest*
3060 gt_cv_func_gettext_libc=yes
3061 else
3062 echo "configure: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 rm -rf conftest*
3065 gt_cv_func_gettext_libc=no
3066 fi
3067 rm -f conftest*
3068 fi
3069
3070 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3071
3072 if test "$gt_cv_func_gettext_libc" != "yes"; then
3073 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3074 echo "configure:3075: checking for bindtextdomain in -lintl" >&5
3075 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3076 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079 ac_save_LIBS="$LIBS"
3080 LIBS="-lintl $LIBS"
3081 cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084 /* Override any gcc2 internal prototype to avoid an error. */
3085 /* We use char because int might match the return type of a gcc2
3086 builtin and then its argument prototype would still apply. */
3087 char bindtextdomain();
3088
3089 int main() {
3090 bindtextdomain()
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3094 rm -rf conftest*
3095 eval "ac_cv_lib_$ac_lib_var=yes"
3096 else
3097 echo "configure: failed program was:" >&5
3098 cat conftest.$ac_ext >&5
3099 rm -rf conftest*
3100 eval "ac_cv_lib_$ac_lib_var=no"
3101 fi
3102 rm -f conftest*
3103 LIBS="$ac_save_LIBS"
3104
3105 fi
3106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3107 echo "$ac_t""yes" 1>&6
3108 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3109 echo "configure:3110: checking for gettext in libintl" >&5
3110 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113 cat > conftest.$ac_ext <<EOF
3114 #line 3115 "configure"
3115 #include "confdefs.h"
3116
3117 int main() {
3118 return (int) gettext ("")
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3122 rm -rf conftest*
3123 gt_cv_func_gettext_libintl=yes
3124 else
3125 echo "configure: failed program was:" >&5
3126 cat conftest.$ac_ext >&5
3127 rm -rf conftest*
3128 gt_cv_func_gettext_libintl=no
3129 fi
3130 rm -f conftest*
3131 fi
3132
3133 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3134 else
3135 echo "$ac_t""no" 1>&6
3136 fi
3137
3138 fi
3139
3140 if test "$gt_cv_func_gettext_libc" = "yes" \
3141 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3142 cat >> confdefs.h <<\EOF
3143 #define HAVE_GETTEXT 1
3144 EOF
3145
3146 # Extract the first word of "msgfmt", so it can be a program name with args.
3147 set dummy msgfmt; ac_word=$2
3148 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3149 echo "configure:3150: checking for $ac_word" >&5
3150 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153 case "$MSGFMT" in
3154 /*)
3155 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3156 ;;
3157 *)
3158 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3159 for ac_dir in $PATH; do
3160 test -z "$ac_dir" && ac_dir=.
3161 if test -f $ac_dir/$ac_word; then
3162 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3163 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3164 break
3165 fi
3166 fi
3167 done
3168 IFS="$ac_save_ifs"
3169 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3170 ;;
3171 esac
3172 fi
3173 MSGFMT="$ac_cv_path_MSGFMT"
3174 if test -n "$MSGFMT"; then
3175 echo "$ac_t""$MSGFMT" 1>&6
3176 else
3177 echo "$ac_t""no" 1>&6
3178 fi
3179 if test "$MSGFMT" != "no"; then
3180 for ac_func in dcgettext
3181 do
3182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3183 echo "configure:3184: checking for $ac_func" >&5
3184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3185 echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187 cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 /* System header to define __stub macros and hopefully few prototypes,
3191 which can conflict with char $ac_func(); below. */
3192 #include <assert.h>
3193 /* Override any gcc2 internal prototype to avoid an error. */
3194 /* We use char because int might match the return type of a gcc2
3195 builtin and then its argument prototype would still apply. */
3196 char $ac_func();
3197
3198 int main() {
3199
3200 /* The GNU C library defines this for functions which it implements
3201 to always fail with ENOSYS. Some functions are actually named
3202 something starting with __ and the normal name is an alias. */
3203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3204 choke me
3205 #else
3206 $ac_func();
3207 #endif
3208
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3212 rm -rf conftest*
3213 eval "ac_cv_func_$ac_func=yes"
3214 else
3215 echo "configure: failed program was:" >&5
3216 cat conftest.$ac_ext >&5
3217 rm -rf conftest*
3218 eval "ac_cv_func_$ac_func=no"
3219 fi
3220 rm -f conftest*
3221 fi
3222
3223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3224 echo "$ac_t""yes" 1>&6
3225 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3226 cat >> confdefs.h <<EOF
3227 #define $ac_tr_func 1
3228 EOF
3229
3230 else
3231 echo "$ac_t""no" 1>&6
3232 fi
3233 done
3234
3235 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3236 set dummy gmsgfmt; ac_word=$2
3237 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3238 echo "configure:3239: checking for $ac_word" >&5
3239 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3240 echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242 case "$GMSGFMT" in
3243 /*)
3244 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3245 ;;
3246 ?:/*)
3247 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3248 ;;
3249 *)
3250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3251 for ac_dir in $PATH; do
3252 test -z "$ac_dir" && ac_dir=.
3253 if test -f $ac_dir/$ac_word; then
3254 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3255 break
3256 fi
3257 done
3258 IFS="$ac_save_ifs"
3259 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3260 ;;
3261 esac
3262 fi
3263 GMSGFMT="$ac_cv_path_GMSGFMT"
3264 if test -n "$GMSGFMT"; then
3265 echo "$ac_t""$GMSGFMT" 1>&6
3266 else
3267 echo "$ac_t""no" 1>&6
3268 fi
3269
3270 # Extract the first word of "xgettext", so it can be a program name with args.
3271 set dummy xgettext; ac_word=$2
3272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3273 echo "configure:3274: checking for $ac_word" >&5
3274 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3276 else
3277 case "$XGETTEXT" in
3278 /*)
3279 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3283 for ac_dir in $PATH; do
3284 test -z "$ac_dir" && ac_dir=.
3285 if test -f $ac_dir/$ac_word; then
3286 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3287 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3288 break
3289 fi
3290 fi
3291 done
3292 IFS="$ac_save_ifs"
3293 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3294 ;;
3295 esac
3296 fi
3297 XGETTEXT="$ac_cv_path_XGETTEXT"
3298 if test -n "$XGETTEXT"; then
3299 echo "$ac_t""$XGETTEXT" 1>&6
3300 else
3301 echo "$ac_t""no" 1>&6
3302 fi
3303
3304 cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307
3308 int main() {
3309 extern int _nl_msg_cat_cntr;
3310 return _nl_msg_cat_cntr
3311 ; return 0; }
3312 EOF
3313 if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3314 rm -rf conftest*
3315 CATOBJEXT=.gmo
3316 DATADIRNAME=share
3317 else
3318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
3320 rm -rf conftest*
3321 CATOBJEXT=.mo
3322 DATADIRNAME=lib
3323 fi
3324 rm -f conftest*
3325 INSTOBJEXT=.mo
3326 fi
3327 fi
3328
3329 else
3330 echo "$ac_t""no" 1>&6
3331 fi
3332
3333
3334
3335 if test "$CATOBJEXT" = "NONE"; then
3336 nls_cv_use_gnu_gettext=yes
3337 fi
3338 fi
3339
3340 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3341 INTLOBJS="\$(GETTOBJS)"
3342 # Extract the first word of "msgfmt", so it can be a program name with args.
3343 set dummy msgfmt; ac_word=$2
3344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3345 echo "configure:3346: checking for $ac_word" >&5
3346 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3347 echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349 case "$MSGFMT" in
3350 /*)
3351 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3352 ;;
3353 *)
3354 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3355 for ac_dir in $PATH; do
3356 test -z "$ac_dir" && ac_dir=.
3357 if test -f $ac_dir/$ac_word; then
3358 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3359 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3360 break
3361 fi
3362 fi
3363 done
3364 IFS="$ac_save_ifs"
3365 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3366 ;;
3367 esac
3368 fi
3369 MSGFMT="$ac_cv_path_MSGFMT"
3370 if test -n "$MSGFMT"; then
3371 echo "$ac_t""$MSGFMT" 1>&6
3372 else
3373 echo "$ac_t""no" 1>&6
3374 fi
3375
3376 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3377 set dummy gmsgfmt; ac_word=$2
3378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3379 echo "configure:3380: checking for $ac_word" >&5
3380 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3381 echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383 case "$GMSGFMT" in
3384 /*)
3385 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3386 ;;
3387 ?:/*)
3388 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3389 ;;
3390 *)
3391 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3392 for ac_dir in $PATH; do
3393 test -z "$ac_dir" && ac_dir=.
3394 if test -f $ac_dir/$ac_word; then
3395 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3396 break
3397 fi
3398 done
3399 IFS="$ac_save_ifs"
3400 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3401 ;;
3402 esac
3403 fi
3404 GMSGFMT="$ac_cv_path_GMSGFMT"
3405 if test -n "$GMSGFMT"; then
3406 echo "$ac_t""$GMSGFMT" 1>&6
3407 else
3408 echo "$ac_t""no" 1>&6
3409 fi
3410
3411 # Extract the first word of "xgettext", so it can be a program name with args.
3412 set dummy xgettext; ac_word=$2
3413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3414 echo "configure:3415: checking for $ac_word" >&5
3415 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3416 echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418 case "$XGETTEXT" in
3419 /*)
3420 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3421 ;;
3422 *)
3423 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3424 for ac_dir in $PATH; do
3425 test -z "$ac_dir" && ac_dir=.
3426 if test -f $ac_dir/$ac_word; then
3427 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3428 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3429 break
3430 fi
3431 fi
3432 done
3433 IFS="$ac_save_ifs"
3434 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3435 ;;
3436 esac
3437 fi
3438 XGETTEXT="$ac_cv_path_XGETTEXT"
3439 if test -n "$XGETTEXT"; then
3440 echo "$ac_t""$XGETTEXT" 1>&6
3441 else
3442 echo "$ac_t""no" 1>&6
3443 fi
3444
3445
3446 USE_INCLUDED_LIBINTL=yes
3447 CATOBJEXT=.gmo
3448 INSTOBJEXT=.mo
3449 DATADIRNAME=share
3450 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3451 INTLLIBS=$INTLDEPS
3452 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3453 nls_cv_header_intl=libintl.h
3454 nls_cv_header_libgt=libgettext.h
3455 fi
3456
3457 if test "$XGETTEXT" != ":"; then
3458 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3459 : ;
3460 else
3461 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3462 XGETTEXT=":"
3463 fi
3464 fi
3465
3466 # We need to process the po/ directory.
3467 POSUB=po
3468 else
3469 DATADIRNAME=share
3470 nls_cv_header_intl=libintl.h
3471 nls_cv_header_libgt=libgettext.h
3472 fi
3473
3474 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3475 # because some of the sources are only built for this goal.
3476 if test "$PACKAGE" = gettext; then
3477 USE_NLS=yes
3478 USE_INCLUDED_LIBINTL=yes
3479 fi
3480
3481 for lang in $ALL_LINGUAS; do
3482 GMOFILES="$GMOFILES $lang.gmo"
3483 POFILES="$POFILES $lang.po"
3484 done
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499 if test "x$CATOBJEXT" != "x"; then
3500 if test "x$ALL_LINGUAS" = "x"; then
3501 LINGUAS=
3502 else
3503 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3504 echo "configure:3505: checking for catalogs to be installed" >&5
3505 NEW_LINGUAS=
3506 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3507 case "$ALL_LINGUAS" in
3508 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3509 esac
3510 done
3511 LINGUAS=$NEW_LINGUAS
3512 echo "$ac_t""$LINGUAS" 1>&6
3513 fi
3514
3515 if test -n "$LINGUAS"; then
3516 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3517 fi
3518 fi
3519
3520 if test $ac_cv_header_locale_h = yes; then
3521 INCLUDE_LOCALE_H="#include <locale.h>"
3522 else
3523 INCLUDE_LOCALE_H="\
3524 /* The system does not provide the header <locale.h>. Take care yourself. */"
3525 fi
3526
3527
3528 if test -f $srcdir/po2tbl.sed.in; then
3529 if test "$CATOBJEXT" = ".cat"; then
3530 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3531 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3532 echo "configure:3533: checking for linux/version.h" >&5
3533 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3534 echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536 cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 #include <linux/version.h>
3540 EOF
3541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3542 { (eval echo configure:3543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3543 ac_err=`grep -v '^ *+' conftest.out`
3544 if test -z "$ac_err"; then
3545 rm -rf conftest*
3546 eval "ac_cv_header_$ac_safe=yes"
3547 else
3548 echo "$ac_err" >&5
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
3551 rm -rf conftest*
3552 eval "ac_cv_header_$ac_safe=no"
3553 fi
3554 rm -f conftest*
3555 fi
3556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3557 echo "$ac_t""yes" 1>&6
3558 msgformat=linux
3559 else
3560 echo "$ac_t""no" 1>&6
3561 msgformat=xopen
3562 fi
3563
3564
3565 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3566 fi
3567 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3568 $srcdir/po2tbl.sed.in > po2tbl.sed
3569 fi
3570
3571 if test "$PACKAGE" = "gettext"; then
3572 GT_NO="#NO#"
3573 GT_YES=
3574 else
3575 GT_NO=
3576 GT_YES="#YES#"
3577 fi
3578
3579
3580
3581 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3582
3583
3584 l=
3585
3586
3587 if test -d $srcdir/po; then
3588 test -d po || mkdir po
3589 if test "x$srcdir" != "x."; then
3590 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3591 posrcprefix="$srcdir/"
3592 else
3593 posrcprefix="../$srcdir/"
3594 fi
3595 else
3596 posrcprefix="../"
3597 fi
3598 rm -f po/POTFILES
3599 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3600 < $srcdir/po/POTFILES.in > po/POTFILES
3601 fi
3602
3603
3604 # Permit host specific settings.
3605 . ${srcdir}/configure.host
3606
3607
3608
3609 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3610
3611
3612 BFD_HOST_64BIT_LONG=0
3613 BFD_HOST_64_BIT_DEFINED=0
3614 BFD_HOST_64_BIT=
3615 BFD_HOST_U_64_BIT=
3616 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
3617 BFD_HOST_64BIT_LONG=1
3618 elif test "x${HOST_64BIT_TYPE}" != "x"; then
3619 BFD_HOST_64_BIT_DEFINED=1
3620 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
3621 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
3622 fi
3623
3624
3625
3626
3627
3628 # Put a plausible default for CC_FOR_BUILD in Makefile.
3629 if test -z "$CC_FOR_BUILD"; then
3630 if test "x$cross_compiling" = "xno"; then
3631 CC_FOR_BUILD='$(CC)'
3632 else
3633 CC_FOR_BUILD=gcc
3634 fi
3635 fi
3636
3637 # Also set EXEEXT_FOR_BUILD.
3638 if test "x$cross_compiling" = "xno"; then
3639 EXEEXT_FOR_BUILD='$(EXEEXT)'
3640 else
3641 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
3642 echo "configure:3643: checking for build system executable suffix" >&5
3643 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646 cat > ac_c_test.c << 'EOF'
3647 int main() {
3648 /* Nothing needed here */
3649 }
3650 EOF
3651 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
3652 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
3653 rm -f ac_c_test*
3654 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
3655 fi
3656
3657 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
3658 EXEEXT_FOR_BUILD=""
3659 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
3660 fi
3661
3662
3663 for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
3664 do
3665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3667 echo "configure:3668: checking for $ac_hdr" >&5
3668 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3669 echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #include <$ac_hdr>
3675 EOF
3676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3677 { (eval echo configure:3678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3678 ac_err=`grep -v '^ *+' conftest.out`
3679 if test -z "$ac_err"; then
3680 rm -rf conftest*
3681 eval "ac_cv_header_$ac_safe=yes"
3682 else
3683 echo "$ac_err" >&5
3684 echo "configure: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 rm -rf conftest*
3687 eval "ac_cv_header_$ac_safe=no"
3688 fi
3689 rm -f conftest*
3690 fi
3691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3692 echo "$ac_t""yes" 1>&6
3693 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3694 cat >> confdefs.h <<EOF
3695 #define $ac_tr_hdr 1
3696 EOF
3697
3698 else
3699 echo "$ac_t""no" 1>&6
3700 fi
3701 done
3702
3703 for ac_hdr in fcntl.h sys/file.h sys/time.h
3704 do
3705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3707 echo "configure:3708: checking for $ac_hdr" >&5
3708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <$ac_hdr>
3715 EOF
3716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3717 { (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3718 ac_err=`grep -v '^ *+' conftest.out`
3719 if test -z "$ac_err"; then
3720 rm -rf conftest*
3721 eval "ac_cv_header_$ac_safe=yes"
3722 else
3723 echo "$ac_err" >&5
3724 echo "configure: failed program was:" >&5
3725 cat conftest.$ac_ext >&5
3726 rm -rf conftest*
3727 eval "ac_cv_header_$ac_safe=no"
3728 fi
3729 rm -f conftest*
3730 fi
3731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3734 cat >> confdefs.h <<EOF
3735 #define $ac_tr_hdr 1
3736 EOF
3737
3738 else
3739 echo "$ac_t""no" 1>&6
3740 fi
3741 done
3742
3743 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3744 echo "configure:3745: checking whether time.h and sys/time.h may both be included" >&5
3745 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748 cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <sys/types.h>
3752 #include <sys/time.h>
3753 #include <time.h>
3754 int main() {
3755 struct tm *tp;
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3759 rm -rf conftest*
3760 ac_cv_header_time=yes
3761 else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 ac_cv_header_time=no
3766 fi
3767 rm -f conftest*
3768 fi
3769
3770 echo "$ac_t""$ac_cv_header_time" 1>&6
3771 if test $ac_cv_header_time = yes; then
3772 cat >> confdefs.h <<\EOF
3773 #define TIME_WITH_SYS_TIME 1
3774 EOF
3775
3776 fi
3777
3778 for ac_func in fcntl getpagesize setitimer sysconf fdopen
3779 do
3780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3781 echo "configure:3782: checking for $ac_func" >&5
3782 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785 cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 /* System header to define __stub macros and hopefully few prototypes,
3789 which can conflict with char $ac_func(); below. */
3790 #include <assert.h>
3791 /* Override any gcc2 internal prototype to avoid an error. */
3792 /* We use char because int might match the return type of a gcc2
3793 builtin and then its argument prototype would still apply. */
3794 char $ac_func();
3795
3796 int main() {
3797
3798 /* The GNU C library defines this for functions which it implements
3799 to always fail with ENOSYS. Some functions are actually named
3800 something starting with __ and the normal name is an alias. */
3801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3802 choke me
3803 #else
3804 $ac_func();
3805 #endif
3806
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3810 rm -rf conftest*
3811 eval "ac_cv_func_$ac_func=yes"
3812 else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
3816 eval "ac_cv_func_$ac_func=no"
3817 fi
3818 rm -f conftest*
3819 fi
3820
3821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3822 echo "$ac_t""yes" 1>&6
3823 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3824 cat >> confdefs.h <<EOF
3825 #define $ac_tr_func 1
3826 EOF
3827
3828 else
3829 echo "$ac_t""no" 1>&6
3830 fi
3831 done
3832
3833
3834
3835 case "${host}" in
3836 i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
3837 cat >> confdefs.h <<\EOF
3838 #define USE_BINARY_FOPEN 1
3839 EOF
3840 ;;
3841 esac
3842
3843 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
3844 echo "configure:3845: checking whether strstr must be declared" >&5
3845 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848 cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851
3852 #include <stdio.h>
3853 #ifdef HAVE_STRING_H
3854 #include <string.h>
3855 #else
3856 #ifdef HAVE_STRINGS_H
3857 #include <strings.h>
3858 #endif
3859 #endif
3860 #ifdef HAVE_STDLIB_H
3861 #include <stdlib.h>
3862 #endif
3863 #ifdef HAVE_UNISTD_H
3864 #include <unistd.h>
3865 #endif
3866 int main() {
3867 char *(*pfn) = (char *(*)) strstr
3868 ; return 0; }
3869 EOF
3870 if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3871 rm -rf conftest*
3872 bfd_cv_decl_needed_strstr=no
3873 else
3874 echo "configure: failed program was:" >&5
3875 cat conftest.$ac_ext >&5
3876 rm -rf conftest*
3877 bfd_cv_decl_needed_strstr=yes
3878 fi
3879 rm -f conftest*
3880 fi
3881
3882 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
3883 if test $bfd_cv_decl_needed_strstr = yes; then
3884 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3885 cat >> confdefs.h <<EOF
3886 #define $bfd_tr_decl 1
3887 EOF
3888
3889 fi
3890
3891 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
3892 echo "configure:3893: checking whether malloc must be declared" >&5
3893 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3894 echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3896 cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899
3900 #include <stdio.h>
3901 #ifdef HAVE_STRING_H
3902 #include <string.h>
3903 #else
3904 #ifdef HAVE_STRINGS_H
3905 #include <strings.h>
3906 #endif
3907 #endif
3908 #ifdef HAVE_STDLIB_H
3909 #include <stdlib.h>
3910 #endif
3911 #ifdef HAVE_UNISTD_H
3912 #include <unistd.h>
3913 #endif
3914 int main() {
3915 char *(*pfn) = (char *(*)) malloc
3916 ; return 0; }
3917 EOF
3918 if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3919 rm -rf conftest*
3920 bfd_cv_decl_needed_malloc=no
3921 else
3922 echo "configure: failed program was:" >&5
3923 cat conftest.$ac_ext >&5
3924 rm -rf conftest*
3925 bfd_cv_decl_needed_malloc=yes
3926 fi
3927 rm -f conftest*
3928 fi
3929
3930 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3931 if test $bfd_cv_decl_needed_malloc = yes; then
3932 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3933 cat >> confdefs.h <<EOF
3934 #define $bfd_tr_decl 1
3935 EOF
3936
3937 fi
3938
3939 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
3940 echo "configure:3941: checking whether realloc must be declared" >&5
3941 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3942 echo $ac_n "(cached) $ac_c" 1>&6
3943 else
3944 cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947
3948 #include <stdio.h>
3949 #ifdef HAVE_STRING_H
3950 #include <string.h>
3951 #else
3952 #ifdef HAVE_STRINGS_H
3953 #include <strings.h>
3954 #endif
3955 #endif
3956 #ifdef HAVE_STDLIB_H
3957 #include <stdlib.h>
3958 #endif
3959 #ifdef HAVE_UNISTD_H
3960 #include <unistd.h>
3961 #endif
3962 int main() {
3963 char *(*pfn) = (char *(*)) realloc
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3967 rm -rf conftest*
3968 bfd_cv_decl_needed_realloc=no
3969 else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 bfd_cv_decl_needed_realloc=yes
3974 fi
3975 rm -f conftest*
3976 fi
3977
3978 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3979 if test $bfd_cv_decl_needed_realloc = yes; then
3980 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3981 cat >> confdefs.h <<EOF
3982 #define $bfd_tr_decl 1
3983 EOF
3984
3985 fi
3986
3987 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
3988 echo "configure:3989: checking whether free must be declared" >&5
3989 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3990 echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995
3996 #include <stdio.h>
3997 #ifdef HAVE_STRING_H
3998 #include <string.h>
3999 #else
4000 #ifdef HAVE_STRINGS_H
4001 #include <strings.h>
4002 #endif
4003 #endif
4004 #ifdef HAVE_STDLIB_H
4005 #include <stdlib.h>
4006 #endif
4007 #ifdef HAVE_UNISTD_H
4008 #include <unistd.h>
4009 #endif
4010 int main() {
4011 char *(*pfn) = (char *(*)) free
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4015 rm -rf conftest*
4016 bfd_cv_decl_needed_free=no
4017 else
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
4020 rm -rf conftest*
4021 bfd_cv_decl_needed_free=yes
4022 fi
4023 rm -f conftest*
4024 fi
4025
4026 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4027 if test $bfd_cv_decl_needed_free = yes; then
4028 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4029 cat >> confdefs.h <<EOF
4030 #define $bfd_tr_decl 1
4031 EOF
4032
4033 fi
4034
4035 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4036 echo "configure:4037: checking whether getenv must be declared" >&5
4037 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040 cat > conftest.$ac_ext <<EOF
4041 #line 4042 "configure"
4042 #include "confdefs.h"
4043
4044 #include <stdio.h>
4045 #ifdef HAVE_STRING_H
4046 #include <string.h>
4047 #else
4048 #ifdef HAVE_STRINGS_H
4049 #include <strings.h>
4050 #endif
4051 #endif
4052 #ifdef HAVE_STDLIB_H
4053 #include <stdlib.h>
4054 #endif
4055 #ifdef HAVE_UNISTD_H
4056 #include <unistd.h>
4057 #endif
4058 int main() {
4059 char *(*pfn) = (char *(*)) getenv
4060 ; return 0; }
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4063 rm -rf conftest*
4064 bfd_cv_decl_needed_getenv=no
4065 else
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4068 rm -rf conftest*
4069 bfd_cv_decl_needed_getenv=yes
4070 fi
4071 rm -f conftest*
4072 fi
4073
4074 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4075 if test $bfd_cv_decl_needed_getenv = yes; then
4076 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4077 cat >> confdefs.h <<EOF
4078 #define $bfd_tr_decl 1
4079 EOF
4080
4081 fi
4082
4083
4084 # If we are configured native, pick a core file support file.
4085 COREFILE=
4086 COREFLAG=
4087 if test "${target}" = "${host}"; then
4088 case "${host}" in
4089 alpha*-*-linux-gnu*)
4090 COREFILE=trad-core.lo
4091 cat >> confdefs.h <<\EOF
4092 #define TRAD_HEADER "hosts/alphalinux.h"
4093 EOF
4094
4095 ;;
4096 alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
4097 alpha*-*-*) COREFILE=osf-core.lo ;;
4098 arm-*-riscix) COREFILE=trad-core.lo ;;
4099 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
4100 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
4101 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
4102 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
4103 i[3456]86-sequent-bsd*)
4104 COREFILE=trad-core.lo;
4105 cat >> confdefs.h <<\EOF
4106 #define TRAD_HEADER "hosts/symmetry.h"
4107 EOF
4108
4109 ;;
4110 i[3456]86-sequent-sysv4*) ;;
4111 i[3456]86-sequent-sysv*)
4112 COREFILE=trad-core.lo
4113 cat >> confdefs.h <<\EOF
4114 #define TRAD_HEADER "hosts/symmetry.h"
4115 EOF
4116
4117 ;;
4118 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
4119 COREFILE=trad-core.lo
4120 cat >> confdefs.h <<\EOF
4121 #define TRAD_HEADER "hosts/i386bsd.h"
4122 EOF
4123
4124 ;;
4125 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
4126 COREFILE=netbsd-core.lo
4127 ;;
4128 i[3456]86-esix-sysv3*)
4129 COREFILE=trad-core.lo
4130 cat >> confdefs.h <<\EOF
4131 #define TRAD_HEADER "hosts/esix.h"
4132 EOF
4133
4134 ;;
4135 i[3456]86-*-sco* | i[3456]86-*-isc*)
4136 COREFILE=trad-core.lo
4137 cat >> confdefs.h <<\EOF
4138 #define TRAD_HEADER "hosts/i386sco.h"
4139 EOF
4140
4141 ;;
4142 i[3456]86-*-mach3*)
4143 COREFILE=trad-core.lo
4144 cat >> confdefs.h <<\EOF
4145 #define TRAD_HEADER "hosts/i386mach3.h"
4146 EOF
4147
4148 ;;
4149 i[3456]86-*-linux-gnu*)
4150 COREFILE=trad-core.lo
4151 cat >> confdefs.h <<\EOF
4152 #define TRAD_HEADER "hosts/i386linux.h"
4153 EOF
4154
4155 ;;
4156 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
4157 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
4158 i860-*-mach3* | i860-*-osf1*)
4159 COREFILE=trad-core.lo
4160 cat >> confdefs.h <<\EOF
4161 #define TRAD_HEADER "hosts/i860mach3.h"
4162 EOF
4163
4164 ;;
4165 mips-dec-bsd*)
4166 COREFILE=trad-core.lo
4167 cat >> confdefs.h <<\EOF
4168 #define TRAD_HEADER "hosts/mipsbsd.h"
4169 EOF
4170
4171 ;;
4172 mips-dec-mach3*)
4173 COREFILE=trad-core.lo
4174 cat >> confdefs.h <<\EOF
4175 #define TRAD_HEADER "hosts/mipsmach3.h"
4176 EOF
4177
4178 ;;
4179 mips-*-netbsd* | mips*-*-openbsd*)
4180 COREFILE=netbsd-core.lo
4181 ;;
4182 mips-dec-*)
4183 COREFILE=trad-core.lo
4184 cat >> confdefs.h <<\EOF
4185 #define TRAD_HEADER "hosts/decstation.h"
4186 EOF
4187
4188 ;;
4189 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
4190 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
4191 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
4192 mips-*-mach3*)
4193 COREFILE=trad-core.lo
4194 cat >> confdefs.h <<\EOF
4195 #define TRAD_HEADER "hosts/mipsmach3.h"
4196 EOF
4197
4198 ;;
4199 mips-*-sysv4*) ;;
4200 mips-*-sysv* | mips-*-riscos*)
4201 COREFILE=trad-core.lo
4202 cat >> confdefs.h <<\EOF
4203 #define TRAD_HEADER "hosts/riscos.h"
4204 EOF
4205
4206 ;;
4207 mips-sony-bsd*)
4208 COREFILE=trad-core.lo
4209 cat >> confdefs.h <<\EOF
4210 #define TRAD_HEADER "hosts/news-mips.h"
4211 EOF
4212
4213 ;;
4214 m68*-bull*-sysv*)
4215 COREFILE=trad-core.lo
4216 cat >> confdefs.h <<\EOF
4217 #define TRAD_HEADER "hosts/dpx2.h"
4218 EOF
4219
4220 ;;
4221 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
4222 m68*-hp-bsd*)
4223 COREFILE=trad-core.lo
4224 cat >> confdefs.h <<\EOF
4225 #define TRAD_HEADER "hosts/hp300bsd.h"
4226 EOF
4227
4228 ;;
4229 m68*-*-linux-gnu*)
4230 COREFILE=trad-core.lo
4231 cat >> confdefs.h <<\EOF
4232 #define TRAD_HEADER "hosts/m68klinux.h"
4233 EOF
4234
4235 ;;
4236 m68*-motorola-sysv*)
4237 COREFILE=trad-core.lo
4238 cat >> confdefs.h <<\EOF
4239 #define TRAD_HEADER "hosts/delta68.h"
4240 EOF
4241
4242 ;;
4243 m68*-sony-*)
4244 COREFILE=trad-core.lo
4245 cat >> confdefs.h <<\EOF
4246 #define TRAD_HEADER "hosts/news.h"
4247 EOF
4248
4249 ;;
4250 m68*-*-netbsd* | m68*-*-openbsd*)
4251 COREFILE=netbsd-core.lo
4252 ;;
4253 m68*-apple-aux*)
4254 COREFILE=trad-core.lo
4255 cat >> confdefs.h <<\EOF
4256 #define TRAD_HEADER "hosts/m68kaux.h"
4257 EOF
4258
4259 ;;
4260 m88*-*-sysv4*) ;;
4261 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
4262 m88*-*-mach3*)
4263 COREFILE=trad-core.lo
4264 cat >> confdefs.h <<\EOF
4265 #define TRAD_HEADER "hosts/m88kmach3.h"
4266 EOF
4267
4268 ;;
4269 ns32k-pc532-mach)
4270 COREFILE=trad-core.lo
4271 cat >> confdefs.h <<\EOF
4272 #define TRAD_HEADER "hosts/pc532mach.h"
4273 EOF
4274
4275 ;;
4276 ns32k-*-netbsd* | ns32k-*-openbsd*)
4277 COREFILE=netbsd-core.lo
4278 ;;
4279 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
4280 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
4281 rs6000-*-*) COREFILE=rs6000-core.lo ;;
4282 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
4283 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
4284 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
4285 powerpc-*-beos*) ;;
4286 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
4287 sparc-*-netbsd* | sparc-*-openbsd*)
4288 COREFILE=netbsd-core.lo
4289 ;;
4290 tahoe-*-*)
4291 COREFILE=trad-core.lo
4292 cat >> confdefs.h <<\EOF
4293 #define TRAD_HEADER "hosts/tahoe.h"
4294 EOF
4295
4296 ;;
4297 vax-*-ultrix2*)
4298 COREFILE=trad-core.lo
4299 cat >> confdefs.h <<\EOF
4300 #define TRAD_HEADER "hosts/vaxult2.h"
4301 EOF
4302
4303 ;;
4304 vax-*-ultrix*)
4305 COREFILE=trad-core.lo
4306 cat >> confdefs.h <<\EOF
4307 #define TRAD_HEADER "hosts/vaxult2.h"
4308 EOF
4309
4310 ;;
4311 vax-*-*)
4312 COREFILE=trad-core.lo
4313 cat >> confdefs.h <<\EOF
4314 #define TRAD_HEADER "hosts/vaxbsd.h"
4315 EOF
4316
4317 ;;
4318 esac
4319
4320 case "$COREFILE" in
4321 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
4322 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
4323 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
4324 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
4325 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
4326 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
4327 osf-core.lo) COREFLAG=-DOSF_CORE ;;
4328 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
4329 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
4330 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
4331 esac
4332
4333 # The ELF code uses the native <sys/procfs.h> to handle core files.
4334 # Define HAVE_SYS_PROCFS_H if the file exists and defines
4335 # prstatus_t.
4336 echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
4337 echo "configure:4338: checking for sys/procfs.h" >&5
4338 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
4339 echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 #include <sys/procfs.h>
4345 int main() {
4346 prstatus_t t;
4347 ; return 0; }
4348 EOF
4349 if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4350 rm -rf conftest*
4351 bfd_cv_header_sys_procfs_h=yes
4352 else
4353 echo "configure: failed program was:" >&5
4354 cat conftest.$ac_ext >&5
4355 rm -rf conftest*
4356 bfd_cv_header_sys_procfs_h=no
4357 fi
4358 rm -f conftest*
4359 fi
4360
4361 echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
4362 if test $bfd_cv_header_sys_procfs_h = yes; then
4363 cat >> confdefs.h <<\EOF
4364 #define HAVE_SYS_PROCFS_H 1
4365 EOF
4366
4367 fi
4368
4369 fi
4370
4371
4372
4373 # Horrible hacks to build DLLs on Windows.
4374 WIN32LDFLAGS=
4375 WIN32LIBADD=
4376 case "${host}" in
4377 *-*-cygwin32*)
4378 if test "$enable_shared" = "yes"; then
4379 WIN32LDFLAGS="-no-undefined"
4380 WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin -lkernel32"
4381 fi
4382 ;;
4383 esac
4384
4385
4386
4387 # target stuff:
4388
4389 # Canonicalize the secondary target names.
4390 if test -n "$enable_targets" ; then
4391 for targ in `echo $enable_targets | sed 's/,/ /g'`
4392 do
4393 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
4394 if test -n "$result" ; then
4395 canon_targets="$canon_targets $result"
4396 else
4397 # Allow targets that config.sub doesn't recognize, like "all".
4398 canon_targets="$canon_targets $targ"
4399 fi
4400 done
4401 fi
4402
4403 all_targets=false
4404 defvec=
4405 selvecs=
4406 selarchs=
4407 TDEFINES=
4408 for targ in $target $canon_targets
4409 do
4410 if test "x$targ" = "xall"; then
4411 all_targets=true
4412 else
4413 . $srcdir/config.bfd
4414 if test "x$targ" = "x$target"; then
4415 defvec=$targ_defvec
4416 fi
4417 selvecs="$selvecs $targ_defvec $targ_selvecs"
4418 selarchs="$selarchs $targ_archs"
4419 TDEFINES="$TDEFINES $targ_cflags"
4420 fi
4421 done
4422
4423
4424 # This processing still needs to be done if we're to decide properly whether
4425 # 64-bit support needs to be compiled in. Currently, it will be included if
4426 # the default or any other explicitly requested target requires it; it
4427 # will not be included on a 32-bit host if no 64-bit target is requested, and
4428 # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
4429 # used.
4430
4431 # uniq the default and selected vectors in all the configured targets.
4432 f=""
4433 for i in $selvecs ; do
4434 case " $f " in
4435 *" $i "*) ;;
4436 *) f="$f $i" ;;
4437 esac
4438 done
4439 selvecs="$f"
4440
4441 # start-sanitize-sky
4442 # dvp is really mips, but we need to distinguish it from mips for opcodes
4443 selarchs=`echo $selarchs | sed -e s/dvp/mips/g`
4444 # end-sanitize-sky
4445
4446 # uniq the architectures in all the configured targets.
4447 f=""
4448 for i in $selarchs ; do
4449 case " $f " in
4450 *" $i "*) ;;
4451 *) f="$f $i" ;;
4452 esac
4453 done
4454 selarchs="$f"
4455
4456 # Target backend .o files.
4457 tb=
4458
4459 elf="elf.lo elflink.lo dwarf2.lo"
4460
4461 for vec in $selvecs
4462 do
4463 case "$vec" in
4464 # This list is alphabetized to make it easy to compare
4465 # with the two vector lists in targets.c.
4466 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
4467 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
4468 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
4469 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
4470 armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
4471 armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
4472 armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
4473 armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
4474 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
4475 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4476 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
4477 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4478 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
4479 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
4480 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
4481 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
4482 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
4483 target64=true ;;
4484 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
4485 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
4486 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4487 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4488 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
4489 target64=true ;;
4490 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
4491 # start-sanitize-d30v
4492 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
4493 # end-sanitize-d30v
4494 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
4495 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
4496 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
4497 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
4498 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
4499 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
4500 target64=true ;;
4501 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
4502 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
4503 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
4504 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
4505 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
4506 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4507 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
4508 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4509 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
4510 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
4511 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
4512 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
4513 target64=true ;;
4514 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
4515 target64=true ;;
4516 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
4517 target64=true ;;
4518 cisco_core_vec) tb="$tb cisco-core.lo" ;;
4519 demo_64_vec) tb="$tb demo64.lo aout64.lo"
4520 target64=true ;;
4521 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4522 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4523 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
4524 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
4525 target64=true ;;
4526 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
4527 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
4528 evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
4529 target64=true ;;
4530 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
4531 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
4532 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
4533 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
4534 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
4535 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
4536 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
4537 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
4538 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
4539 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
4540 i386msdos_vec) tb="$tb i386msdos.lo" ;;
4541 i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
4542 i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
4543 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
4544 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
4545 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
4546 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
4547 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
4548 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
4549 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
4550 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4551 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
4552 ieee_vec) tb="$tb ieee.lo" ;;
4553 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
4554 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
4555 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
4556 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
4557 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
4558 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
4559 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
4560 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
4561 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
4562 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
4563 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
4564 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
4565 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
4566 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
4567 target64=true ;;
4568 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
4569 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
4570 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
4571 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
4572 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
4573 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
4574 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
4575 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
4576 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
4577 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
4578 ppcboot_vec) tb="$tb ppcboot.lo" ;;
4579 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4580 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4581 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4582 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
4583 som_vec) tb="$tb som.lo" ;;
4584 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
4585 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
4586 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
4587 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
4588 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
4589 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
4590 srec_vec) tb="$tb srec.lo" ;;
4591 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
4592 symbolsrec_vec) tb="$tb srec.lo" ;;
4593 tekhex_vec) tb="$tb tekhex.lo" ;;
4594 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
4595 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
4596 # start-sanitize-tic80
4597 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
4598 # end-sanitize-tic80
4599 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
4600 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
4601 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
4602 versados_vec) tb="$tb versados.lo" ;;
4603
4604 "") ;;
4605 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
4606 esac
4607 done
4608
4609 # Target architecture .o files.
4610 # A couple of CPUs use shorter file names to avoid problems on DOS
4611 # filesystems.
4612 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
4613
4614 # Weed out duplicate .o files.
4615 f=""
4616 for i in $tb ; do
4617 case " $f " in
4618 *" $i "*) ;;
4619 *) f="$f $i" ;;
4620 esac
4621 done
4622 tb="$f"
4623
4624 f=""
4625 for i in $ta ; do
4626 case " $f " in
4627 *" $i "*) ;;
4628 *) f="$f $i" ;;
4629 esac
4630 done
4631 ta="$f"
4632
4633 bfd_backends="$tb"
4634 bfd_machines="$ta"
4635
4636 if test x${all_targets} = xtrue ; then
4637 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
4638 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
4639 selvecs=
4640 havevecs=
4641 selarchs=
4642 else # all_targets is true
4643 # Only set these if they will be nonempty, for the clever echo.
4644 havevecs=
4645 test -n "$selvecs" &&
4646 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
4647 test -n "$selvecs" &&
4648 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
4649 test -n "$selarchs" &&
4650 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
4651 fi # all_targets is true
4652
4653 case ${host64}-${target64}-${want64} in
4654 *true*)
4655 wordsize=64
4656 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
4657 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
4658 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
4659 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
4660 fi
4661 ;;
4662 false-false-false)
4663 wordsize=32
4664 all_backends='$(BFD32_BACKENDS)'
4665 ;;
4666 esac
4667
4668
4669
4670
4671
4672
4673 tdefaults=""
4674 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
4675 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
4676 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
4677 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
4678
4679
4680 for ac_hdr in unistd.h
4681 do
4682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4684 echo "configure:4685: checking for $ac_hdr" >&5
4685 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4686 echo $ac_n "(cached) $ac_c" 1>&6
4687 else
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 #include <$ac_hdr>
4692 EOF
4693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4694 { (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4695 ac_err=`grep -v '^ *+' conftest.out`
4696 if test -z "$ac_err"; then
4697 rm -rf conftest*
4698 eval "ac_cv_header_$ac_safe=yes"
4699 else
4700 echo "$ac_err" >&5
4701 echo "configure: failed program was:" >&5
4702 cat conftest.$ac_ext >&5
4703 rm -rf conftest*
4704 eval "ac_cv_header_$ac_safe=no"
4705 fi
4706 rm -f conftest*
4707 fi
4708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4709 echo "$ac_t""yes" 1>&6
4710 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4711 cat >> confdefs.h <<EOF
4712 #define $ac_tr_hdr 1
4713 EOF
4714
4715 else
4716 echo "$ac_t""no" 1>&6
4717 fi
4718 done
4719
4720 for ac_func in getpagesize
4721 do
4722 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4723 echo "configure:4724: checking for $ac_func" >&5
4724 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4725 echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727 cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 /* System header to define __stub macros and hopefully few prototypes,
4731 which can conflict with char $ac_func(); below. */
4732 #include <assert.h>
4733 /* Override any gcc2 internal prototype to avoid an error. */
4734 /* We use char because int might match the return type of a gcc2
4735 builtin and then its argument prototype would still apply. */
4736 char $ac_func();
4737
4738 int main() {
4739
4740 /* The GNU C library defines this for functions which it implements
4741 to always fail with ENOSYS. Some functions are actually named
4742 something starting with __ and the normal name is an alias. */
4743 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4744 choke me
4745 #else
4746 $ac_func();
4747 #endif
4748
4749 ; return 0; }
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4752 rm -rf conftest*
4753 eval "ac_cv_func_$ac_func=yes"
4754 else
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -rf conftest*
4758 eval "ac_cv_func_$ac_func=no"
4759 fi
4760 rm -f conftest*
4761 fi
4762
4763 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4764 echo "$ac_t""yes" 1>&6
4765 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4766 cat >> confdefs.h <<EOF
4767 #define $ac_tr_func 1
4768 EOF
4769
4770 else
4771 echo "$ac_t""no" 1>&6
4772 fi
4773 done
4774
4775 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4776 echo "configure:4777: checking for working mmap" >&5
4777 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4778 echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780 if test "$cross_compiling" = yes; then
4781 ac_cv_func_mmap_fixed_mapped=no
4782 else
4783 cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4786
4787 /* Thanks to Mike Haertel and Jim Avera for this test.
4788 Here is a matrix of mmap possibilities:
4789 mmap private not fixed
4790 mmap private fixed at somewhere currently unmapped
4791 mmap private fixed at somewhere already mapped
4792 mmap shared not fixed
4793 mmap shared fixed at somewhere currently unmapped
4794 mmap shared fixed at somewhere already mapped
4795 For private mappings, we should verify that changes cannot be read()
4796 back from the file, nor mmap's back from the file at a different
4797 address. (There have been systems where private was not correctly
4798 implemented like the infamous i386 svr4.0, and systems where the
4799 VM page cache was not coherent with the filesystem buffer cache
4800 like early versions of FreeBSD and possibly contemporary NetBSD.)
4801 For shared mappings, we should conversely verify that changes get
4802 propogated back to all the places they're supposed to be.
4803
4804 Grep wants private fixed already mapped.
4805 The main things grep needs to know about mmap are:
4806 * does it exist and is it safe to write into the mmap'd area
4807 * how to use it (BSD variants) */
4808 #include <sys/types.h>
4809 #include <fcntl.h>
4810 #include <sys/mman.h>
4811
4812 /* This mess was copied from the GNU getpagesize.h. */
4813 #ifndef HAVE_GETPAGESIZE
4814 # ifdef HAVE_UNISTD_H
4815 # include <unistd.h>
4816 # endif
4817
4818 /* Assume that all systems that can run configure have sys/param.h. */
4819 # ifndef HAVE_SYS_PARAM_H
4820 # define HAVE_SYS_PARAM_H 1
4821 # endif
4822
4823 # ifdef _SC_PAGESIZE
4824 # define getpagesize() sysconf(_SC_PAGESIZE)
4825 # else /* no _SC_PAGESIZE */
4826 # ifdef HAVE_SYS_PARAM_H
4827 # include <sys/param.h>
4828 # ifdef EXEC_PAGESIZE
4829 # define getpagesize() EXEC_PAGESIZE
4830 # else /* no EXEC_PAGESIZE */
4831 # ifdef NBPG
4832 # define getpagesize() NBPG * CLSIZE
4833 # ifndef CLSIZE
4834 # define CLSIZE 1
4835 # endif /* no CLSIZE */
4836 # else /* no NBPG */
4837 # ifdef NBPC
4838 # define getpagesize() NBPC
4839 # else /* no NBPC */
4840 # ifdef PAGESIZE
4841 # define getpagesize() PAGESIZE
4842 # endif /* PAGESIZE */
4843 # endif /* no NBPC */
4844 # endif /* no NBPG */
4845 # endif /* no EXEC_PAGESIZE */
4846 # else /* no HAVE_SYS_PARAM_H */
4847 # define getpagesize() 8192 /* punt totally */
4848 # endif /* no HAVE_SYS_PARAM_H */
4849 # endif /* no _SC_PAGESIZE */
4850
4851 #endif /* no HAVE_GETPAGESIZE */
4852
4853 #ifdef __cplusplus
4854 extern "C" { void *malloc(unsigned); }
4855 #else
4856 char *malloc();
4857 #endif
4858
4859 int
4860 main()
4861 {
4862 char *data, *data2, *data3;
4863 int i, pagesize;
4864 int fd;
4865
4866 pagesize = getpagesize();
4867
4868 /*
4869 * First, make a file with some known garbage in it.
4870 */
4871 data = malloc(pagesize);
4872 if (!data)
4873 exit(1);
4874 for (i = 0; i < pagesize; ++i)
4875 *(data + i) = rand();
4876 umask(0);
4877 fd = creat("conftestmmap", 0600);
4878 if (fd < 0)
4879 exit(1);
4880 if (write(fd, data, pagesize) != pagesize)
4881 exit(1);
4882 close(fd);
4883
4884 /*
4885 * Next, try to mmap the file at a fixed address which
4886 * already has something else allocated at it. If we can,
4887 * also make sure that we see the same garbage.
4888 */
4889 fd = open("conftestmmap", O_RDWR);
4890 if (fd < 0)
4891 exit(1);
4892 data2 = malloc(2 * pagesize);
4893 if (!data2)
4894 exit(1);
4895 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4896 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4897 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4898 exit(1);
4899 for (i = 0; i < pagesize; ++i)
4900 if (*(data + i) != *(data2 + i))
4901 exit(1);
4902
4903 /*
4904 * Finally, make sure that changes to the mapped area
4905 * do not percolate back to the file as seen by read().
4906 * (This is a bug on some variants of i386 svr4.0.)
4907 */
4908 for (i = 0; i < pagesize; ++i)
4909 *(data2 + i) = *(data2 + i) + 1;
4910 data3 = malloc(pagesize);
4911 if (!data3)
4912 exit(1);
4913 if (read(fd, data3, pagesize) != pagesize)
4914 exit(1);
4915 for (i = 0; i < pagesize; ++i)
4916 if (*(data + i) != *(data3 + i))
4917 exit(1);
4918 close(fd);
4919 unlink("conftestmmap");
4920 exit(0);
4921 }
4922
4923 EOF
4924 if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4925 then
4926 ac_cv_func_mmap_fixed_mapped=yes
4927 else
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -fr conftest*
4931 ac_cv_func_mmap_fixed_mapped=no
4932 fi
4933 rm -fr conftest*
4934 fi
4935
4936 fi
4937
4938 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4939 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4940 cat >> confdefs.h <<\EOF
4941 #define HAVE_MMAP 1
4942 EOF
4943
4944 fi
4945
4946 for ac_func in madvise mprotect
4947 do
4948 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4949 echo "configure:4950: checking for $ac_func" >&5
4950 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953 cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 /* System header to define __stub macros and hopefully few prototypes,
4957 which can conflict with char $ac_func(); below. */
4958 #include <assert.h>
4959 /* Override any gcc2 internal prototype to avoid an error. */
4960 /* We use char because int might match the return type of a gcc2
4961 builtin and then its argument prototype would still apply. */
4962 char $ac_func();
4963
4964 int main() {
4965
4966 /* The GNU C library defines this for functions which it implements
4967 to always fail with ENOSYS. Some functions are actually named
4968 something starting with __ and the normal name is an alias. */
4969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4970 choke me
4971 #else
4972 $ac_func();
4973 #endif
4974
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4978 rm -rf conftest*
4979 eval "ac_cv_func_$ac_func=yes"
4980 else
4981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 rm -rf conftest*
4984 eval "ac_cv_func_$ac_func=no"
4985 fi
4986 rm -f conftest*
4987 fi
4988
4989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4990 echo "$ac_t""yes" 1>&6
4991 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4992 cat >> confdefs.h <<EOF
4993 #define $ac_tr_func 1
4994 EOF
4995
4996 else
4997 echo "$ac_t""no" 1>&6
4998 fi
4999 done
5000
5001 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
5002 true+yes ) cat >> confdefs.h <<\EOF
5003 #define USE_MMAP 1
5004 EOF
5005 ;;
5006 esac
5007
5008 rm -f doc/config.status
5009 trap '' 1 2 15
5010 cat > confcache <<\EOF
5011 # This file is a shell script that caches the results of configure
5012 # tests run on this system so they can be shared between configure
5013 # scripts and configure runs. It is not useful on other systems.
5014 # If it contains results you don't want to keep, you may remove or edit it.
5015 #
5016 # By default, configure uses ./config.cache as the cache file,
5017 # creating it if it does not exist already. You can give configure
5018 # the --cache-file=FILE option to use a different cache file; that is
5019 # what configure does when it calls configure scripts in
5020 # subdirectories, so they share the cache.
5021 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5022 # config.status only pays attention to the cache file if you give it the
5023 # --recheck option to rerun configure.
5024 #
5025 EOF
5026 # The following way of writing the cache mishandles newlines in values,
5027 # but we know of no workaround that is simple, portable, and efficient.
5028 # So, don't put newlines in cache variables' values.
5029 # Ultrix sh set writes to stderr and can't be redirected directly,
5030 # and sets the high bit in the cache file unless we assign to the vars.
5031 (set) 2>&1 |
5032 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
5033 *ac_space=\ *)
5034 # `set' does not quote correctly, so add quotes (double-quote substitution
5035 # turns \\\\ into \\, and sed turns \\ into \).
5036 sed -n \
5037 -e "s/'/'\\\\''/g" \
5038 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5039 ;;
5040 *)
5041 # `set' quotes correctly as required by POSIX, so do not add quotes.
5042 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5043 ;;
5044 esac >> confcache
5045 if cmp -s $cache_file confcache; then
5046 :
5047 else
5048 if test -w $cache_file; then
5049 echo "updating cache $cache_file"
5050 cat confcache > $cache_file
5051 else
5052 echo "not updating unwritable cache $cache_file"
5053 fi
5054 fi
5055 rm -f confcache
5056
5057 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5058
5059 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5060 # Let make expand exec_prefix.
5061 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5062
5063 # Any assignment to VPATH causes Sun make to only execute
5064 # the first set of double-colon rules, so remove it if not needed.
5065 # If there is a colon in the path, we need to keep it.
5066 if test "x$srcdir" = x.; then
5067 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5068 fi
5069
5070 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5071
5072 DEFS=-DHAVE_CONFIG_H
5073
5074 # Without the "./", some shells look in PATH for config.status.
5075 : ${CONFIG_STATUS=./config.status}
5076
5077 echo creating $CONFIG_STATUS
5078 rm -f $CONFIG_STATUS
5079 cat > $CONFIG_STATUS <<EOF
5080 #! /bin/sh
5081 # Generated automatically by configure.
5082 # Run this file to recreate the current configuration.
5083 # This directory was configured as follows,
5084 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5085 #
5086 # $0 $ac_configure_args
5087 #
5088 # Compiler output produced by configure, useful for debugging
5089 # configure, is in ./config.log if it exists.
5090
5091 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5092 for ac_option
5093 do
5094 case "\$ac_option" in
5095 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5096 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5097 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5098 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5099 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
5100 exit 0 ;;
5101 -help | --help | --hel | --he | --h)
5102 echo "\$ac_cs_usage"; exit 0 ;;
5103 *) echo "\$ac_cs_usage"; exit 1 ;;
5104 esac
5105 done
5106
5107 ac_given_srcdir=$srcdir
5108 ac_given_INSTALL="$INSTALL"
5109
5110 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
5111 EOF
5112 cat >> $CONFIG_STATUS <<EOF
5113
5114 # Protect against being on the right side of a sed subst in config.status.
5115 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5116 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5117 $ac_vpsub
5118 $extrasub
5119 s%@SHELL@%$SHELL%g
5120 s%@CFLAGS@%$CFLAGS%g
5121 s%@CPPFLAGS@%$CPPFLAGS%g
5122 s%@CXXFLAGS@%$CXXFLAGS%g
5123 s%@DEFS@%$DEFS%g
5124 s%@LDFLAGS@%$LDFLAGS%g
5125 s%@LIBS@%$LIBS%g
5126 s%@exec_prefix@%$exec_prefix%g
5127 s%@prefix@%$prefix%g
5128 s%@program_transform_name@%$program_transform_name%g
5129 s%@bindir@%$bindir%g
5130 s%@sbindir@%$sbindir%g
5131 s%@libexecdir@%$libexecdir%g
5132 s%@datadir@%$datadir%g
5133 s%@sysconfdir@%$sysconfdir%g
5134 s%@sharedstatedir@%$sharedstatedir%g
5135 s%@localstatedir@%$localstatedir%g
5136 s%@libdir@%$libdir%g
5137 s%@includedir@%$includedir%g
5138 s%@oldincludedir@%$oldincludedir%g
5139 s%@infodir@%$infodir%g
5140 s%@mandir@%$mandir%g
5141 s%@host@%$host%g
5142 s%@host_alias@%$host_alias%g
5143 s%@host_cpu@%$host_cpu%g
5144 s%@host_vendor@%$host_vendor%g
5145 s%@host_os@%$host_os%g
5146 s%@target@%$target%g
5147 s%@target_alias@%$target_alias%g
5148 s%@target_cpu@%$target_cpu%g
5149 s%@target_vendor@%$target_vendor%g
5150 s%@target_os@%$target_os%g
5151 s%@build@%$build%g
5152 s%@build_alias@%$build_alias%g
5153 s%@build_cpu@%$build_cpu%g
5154 s%@build_vendor@%$build_vendor%g
5155 s%@build_os@%$build_os%g
5156 s%@CC@%$CC%g
5157 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5158 s%@INSTALL_DATA@%$INSTALL_DATA%g
5159 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5160 s%@PACKAGE@%$PACKAGE%g
5161 s%@VERSION@%$VERSION%g
5162 s%@ACLOCAL@%$ACLOCAL%g
5163 s%@AUTOCONF@%$AUTOCONF%g
5164 s%@AUTOMAKE@%$AUTOMAKE%g
5165 s%@AUTOHEADER@%$AUTOHEADER%g
5166 s%@MAKEINFO@%$MAKEINFO%g
5167 s%@SET_MAKE@%$SET_MAKE%g
5168 s%@AR@%$AR%g
5169 s%@RANLIB@%$RANLIB%g
5170 s%@LD@%$LD%g
5171 s%@NM@%$NM%g
5172 s%@LN_S@%$LN_S%g
5173 s%@LIBTOOL@%$LIBTOOL%g
5174 s%@DLLTOOL@%$DLLTOOL%g
5175 s%@AS@%$AS%g
5176 s%@MAINT@%$MAINT%g
5177 s%@EXEEXT@%$EXEEXT%g
5178 s%@CPP@%$CPP%g
5179 s%@ALLOCA@%$ALLOCA%g
5180 s%@USE_NLS@%$USE_NLS%g
5181 s%@MSGFMT@%$MSGFMT%g
5182 s%@GMSGFMT@%$GMSGFMT%g
5183 s%@XGETTEXT@%$XGETTEXT%g
5184 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5185 s%@CATALOGS@%$CATALOGS%g
5186 s%@CATOBJEXT@%$CATOBJEXT%g
5187 s%@DATADIRNAME@%$DATADIRNAME%g
5188 s%@GMOFILES@%$GMOFILES%g
5189 s%@INSTOBJEXT@%$INSTOBJEXT%g
5190 s%@INTLDEPS@%$INTLDEPS%g
5191 s%@INTLLIBS@%$INTLLIBS%g
5192 s%@INTLOBJS@%$INTLOBJS%g
5193 s%@POFILES@%$POFILES%g
5194 s%@POSUB@%$POSUB%g
5195 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5196 s%@GT_NO@%$GT_NO%g
5197 s%@GT_YES@%$GT_YES%g
5198 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5199 s%@l@%$l%g
5200 s%@HDEFINES@%$HDEFINES%g
5201 s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
5202 s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
5203 s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
5204 s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
5205 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5206 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5207 s%@COREFILE@%$COREFILE%g
5208 s%@COREFLAG@%$COREFLAG%g
5209 s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
5210 s%@WIN32LIBADD@%$WIN32LIBADD%g
5211 s%@TDEFINES@%$TDEFINES%g
5212 s%@wordsize@%$wordsize%g
5213 s%@all_backends@%$all_backends%g
5214 s%@bfd_backends@%$bfd_backends%g
5215 s%@bfd_machines@%$bfd_machines%g
5216 s%@tdefaults@%$tdefaults%g
5217
5218 CEOF
5219 EOF
5220
5221 cat >> $CONFIG_STATUS <<\EOF
5222
5223 # Split the substitutions into bite-sized pieces for seds with
5224 # small command number limits, like on Digital OSF/1 and HP-UX.
5225 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5226 ac_file=1 # Number of current file.
5227 ac_beg=1 # First line for current file.
5228 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5229 ac_more_lines=:
5230 ac_sed_cmds=""
5231 while $ac_more_lines; do
5232 if test $ac_beg -gt 1; then
5233 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5234 else
5235 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5236 fi
5237 if test ! -s conftest.s$ac_file; then
5238 ac_more_lines=false
5239 rm -f conftest.s$ac_file
5240 else
5241 if test -z "$ac_sed_cmds"; then
5242 ac_sed_cmds="sed -f conftest.s$ac_file"
5243 else
5244 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5245 fi
5246 ac_file=`expr $ac_file + 1`
5247 ac_beg=$ac_end
5248 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5249 fi
5250 done
5251 if test -z "$ac_sed_cmds"; then
5252 ac_sed_cmds=cat
5253 fi
5254 EOF
5255
5256 cat >> $CONFIG_STATUS <<EOF
5257
5258 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
5259 EOF
5260 cat >> $CONFIG_STATUS <<\EOF
5261 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5262 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5263 case "$ac_file" in
5264 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5265 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5266 *) ac_file_in="${ac_file}.in" ;;
5267 esac
5268
5269 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5270
5271 # Remove last slash and all that follows it. Not all systems have dirname.
5272 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5273 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5274 # The file is in a subdirectory.
5275 test ! -d "$ac_dir" && mkdir "$ac_dir"
5276 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5277 # A "../" for each directory in $ac_dir_suffix.
5278 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5279 else
5280 ac_dir_suffix= ac_dots=
5281 fi
5282
5283 case "$ac_given_srcdir" in
5284 .) srcdir=.
5285 if test -z "$ac_dots"; then top_srcdir=.
5286 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5287 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5288 *) # Relative path.
5289 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5290 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5291 esac
5292
5293 case "$ac_given_INSTALL" in
5294 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5295 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5296 esac
5297
5298 echo creating "$ac_file"
5299 rm -f "$ac_file"
5300 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5301 case "$ac_file" in
5302 *Makefile*) ac_comsub="1i\\
5303 # $configure_input" ;;
5304 *) ac_comsub= ;;
5305 esac
5306
5307 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5308 sed -e "$ac_comsub
5309 s%@configure_input@%$configure_input%g
5310 s%@srcdir@%$srcdir%g
5311 s%@top_srcdir@%$top_srcdir%g
5312 s%@INSTALL@%$INSTALL%g
5313 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5314 fi; done
5315 rm -f conftest.s*
5316
5317 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5318 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5319 #
5320 # ac_d sets the value in "#define NAME VALUE" lines.
5321 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5322 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5323 ac_dC='\3'
5324 ac_dD='%g'
5325 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5326 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5327 ac_uB='\([ ]\)%\1#\2define\3'
5328 ac_uC=' '
5329 ac_uD='\4%g'
5330 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5331 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5332 ac_eB='$%\1#\2define\3'
5333 ac_eC=' '
5334 ac_eD='%g'
5335
5336 if test "${CONFIG_HEADERS+set}" != set; then
5337 EOF
5338 cat >> $CONFIG_STATUS <<EOF
5339 CONFIG_HEADERS="config.h:config.in"
5340 EOF
5341 cat >> $CONFIG_STATUS <<\EOF
5342 fi
5343 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5344 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5345 case "$ac_file" in
5346 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5347 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5348 *) ac_file_in="${ac_file}.in" ;;
5349 esac
5350
5351 echo creating $ac_file
5352
5353 rm -f conftest.frag conftest.in conftest.out
5354 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5355 cat $ac_file_inputs > conftest.in
5356
5357 EOF
5358
5359 # Transform confdefs.h into a sed script conftest.vals that substitutes
5360 # the proper values into config.h.in to produce config.h. And first:
5361 # Protect against being on the right side of a sed subst in config.status.
5362 # Protect against being in an unquoted here document in config.status.
5363 rm -f conftest.vals
5364 cat > conftest.hdr <<\EOF
5365 s/[\\&%]/\\&/g
5366 s%[\\$`]%\\&%g
5367 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5368 s%ac_d%ac_u%gp
5369 s%ac_u%ac_e%gp
5370 EOF
5371 sed -n -f conftest.hdr confdefs.h > conftest.vals
5372 rm -f conftest.hdr
5373
5374 # This sed command replaces #undef with comments. This is necessary, for
5375 # example, in the case of _POSIX_SOURCE, which is predefined and required
5376 # on some systems where configure will not decide to define it.
5377 cat >> conftest.vals <<\EOF
5378 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5379 EOF
5380
5381 # Break up conftest.vals because some shells have a limit on
5382 # the size of here documents, and old seds have small limits too.
5383
5384 rm -f conftest.tail
5385 while :
5386 do
5387 ac_lines=`grep -c . conftest.vals`
5388 # grep -c gives empty output for an empty file on some AIX systems.
5389 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5390 # Write a limited-size here document to conftest.frag.
5391 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5392 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5393 echo 'CEOF
5394 sed -f conftest.frag conftest.in > conftest.out
5395 rm -f conftest.in
5396 mv conftest.out conftest.in
5397 ' >> $CONFIG_STATUS
5398 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5399 rm -f conftest.vals
5400 mv conftest.tail conftest.vals
5401 done
5402 rm -f conftest.vals
5403
5404 cat >> $CONFIG_STATUS <<\EOF
5405 rm -f conftest.frag conftest.h
5406 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5407 cat conftest.in >> conftest.h
5408 rm -f conftest.in
5409 if cmp -s $ac_file conftest.h 2>/dev/null; then
5410 echo "$ac_file is unchanged"
5411 rm -f conftest.h
5412 else
5413 # Remove last slash and all that follows it. Not all systems have dirname.
5414 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5415 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5416 # The file is in a subdirectory.
5417 test ! -d "$ac_dir" && mkdir "$ac_dir"
5418 fi
5419 rm -f $ac_file
5420 mv conftest.h $ac_file
5421 fi
5422 fi; done
5423
5424 EOF
5425 cat >> $CONFIG_STATUS <<EOF
5426
5427
5428 EOF
5429 cat >> $CONFIG_STATUS <<\EOF
5430 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5431 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5432 exit 0
5433 EOF
5434 chmod +x $CONFIG_STATUS
5435 rm -fr confdefs* $ac_clean_files
5436 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5437
This page took 0.178465 seconds and 4 git commands to generate.