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