Add support for FR30
[deliverable/binutils-gdb.git] / bfd / configure
CommitLineData
8c693660
KR
1#! /bin/sh
2
1c18e77a
GN
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
8c693660 429# Guess values for system-dependent variables and create Makefiles.
1c18e77a 430# Generated automatically using autoconf version 2.12.2
a4322a77 431# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
8c693660
KR
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:
437ac_help=
438ac_default_prefix=/usr/local
439# Any additions from configure.in:
c0734708 440ac_help="$ac_help
1c18e77a 441 --enable-shared[=PKGS] build shared libraries [default=no]"
c0734708 442ac_help="$ac_help
1c18e77a 443 --enable-static[=PKGS] build static libraries [default=yes]"
c0734708 444ac_help="$ac_help
b9bf4aff 445 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
8c693660 446ac_help="$ac_help
e818c22e 447 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
8c693660 448ac_help="$ac_help
e818c22e 449 --enable-targets alternative target configurations"
44f795f7
ILT
450ac_help="$ac_help
451 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
85e493f0
ILT
452ac_help="$ac_help
453 --with-mmap try using mmap for BFD input files if available"
c0734708
ILT
454ac_help="$ac_help
455 --enable-maintainer-mode enable make rules and dependencies not useful
456 (and sometimes confusing) to the casual installer"
53d3ce37
TT
457ac_help="$ac_help
458 --disable-nls do not use Native Language Support"
459ac_help="$ac_help
460 --with-included-gettext use the GNU gettext library included here"
8c693660
KR
461
462# Initialize some variables set by options.
463# The variables have the same names as the options, with
464# dashes changed to underlines.
465build=NONE
466cache_file=./config.cache
467exec_prefix=NONE
468host=NONE
469no_create=
470nonopt=NONE
471no_recursion=
472prefix=NONE
473program_prefix=NONE
474program_suffix=NONE
475program_transform_name=s,x,x,
476silent=
477site=
478srcdir=
479target=NONE
480verbose=
481x_includes=NONE
482x_libraries=NONE
85e493f0
ILT
483bindir='${exec_prefix}/bin'
484sbindir='${exec_prefix}/sbin'
485libexecdir='${exec_prefix}/libexec'
486datadir='${prefix}/share'
487sysconfdir='${prefix}/etc'
488sharedstatedir='${prefix}/com'
489localstatedir='${prefix}/var'
490libdir='${exec_prefix}/lib'
491includedir='${prefix}/include'
492oldincludedir='/usr/include'
493infodir='${prefix}/info'
494mandir='${prefix}/man'
8c693660
KR
495
496# Initialize some other variables.
497subdirs=
85e493f0 498MFLAGS= MAKEFLAGS=
372b296c 499SHELL=${CONFIG_SHELL-/bin/sh}
ac388f2a
ILT
500# Maximum number of lines to put in a shell here document.
501ac_max_here_lines=12
8c693660
KR
502
503ac_prev=
504for ac_option
505do
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
85e493f0
ILT
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)
8c693660 529 ac_prev=build ;;
85e493f0 530 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
8c693660
KR
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
85e493f0
ILT
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
8c693660
KR
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
585Usage: configure [options] [host]
586Options: [defaults in brackets after descriptions]
587Configuration:
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
593Directory and file names:
594 --prefix=PREFIX install architecture-independent files in PREFIX
595 [$ac_default_prefix]
85e493f0 596 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
8c693660 597 [same as prefix]
85e493f0
ILT
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]
8c693660
KR
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
85e493f0
ILT
615 --program-transform-name=PROGRAM
616 run sed PROGRAM on installed program names
617EOF
618 cat << EOF
8c693660
KR
619Host 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]
623Features 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
8c693660 630EOF
85e493f0
ILT
631 if test -n "$ac_help"; then
632 echo "--enable and --with options recognized:$ac_help"
633 fi
8c693660
KR
634 exit 0 ;;
635
636 -host | --host | --hos | --ho)
637 ac_prev=host ;;
638 -host=* | --host=* | --hos=* | --ho=*)
639 host="$ac_optarg" ;;
640
85e493f0
ILT
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
8c693660
KR
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
85e493f0
ILT
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
8c693660
KR
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
85e493f0
ILT
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
8c693660
KR
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
85e493f0
ILT
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
8c693660
KR
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)
1c18e77a 783 echo "configure generated by autoconf version 2.12.2"
8c693660
KR
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
85e493f0 829 *)
8c693660
KR
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
840done
841
842if test -n "$ac_prev"; then
843 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
844fi
845
846trap '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
856if test "$silent" = yes; then
857 exec 6>/dev/null
858else
859 exec 6>&1
860fi
861exec 5>./config.log
862
863echo "\
864This file contains any messages produced by compilers while
865running 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.
870ac_configure_args=
871for ac_arg
872do
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
882done
883
884# NLS nuisances.
ac388f2a
ILT
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.
fd8d7c31 889if test "${LANG+set}" = set; then LANG=C; export LANG; fi
ac388f2a
ILT
890if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
891if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
892if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
8c693660
KR
893
894# confdefs.h avoids OS command line length limits that DEFS can exceed.
895rm -rf conftest* confdefs.h
896# AIX cpp loses on an empty file, so make sure it contains at least a newline.
897echo > 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.
901ac_unique_file=libbfd.c
902
903# Find the source files, if location was not specified.
904if 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
914else
915 ac_srcdir_defaulted=no
916fi
917if 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
923fi
924srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
925
926# Prefer explicitly selected file to automatically selected ones.
927if 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
933fi
934for 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
939done
940
941if test -r "$cache_file"; then
942 echo "loading cache $cache_file"
943 . $cache_file
944else
945 echo "creating cache $cache_file"
946 > $cache_file
947fi
948
949ac_ext=c
950# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
986cf3b8
ILT
951ac_cpp='$CPP $CPPFLAGS'
952ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1c18e77a 953ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac388f2a 954cross_compiling=$ac_cv_prog_cc_cross
8c693660 955
1c18e77a
GN
956ac_exeext=
957ac_objext=o
8c693660
KR
958if (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
966else
967 ac_n= ac_c='\c' ac_t=
968fi
969
970
971
8c693660 972ac_aux_dir=
c0734708 973for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
8c693660
KR
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
983done
984if test -z "$ac_aux_dir"; then
c0734708 985 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
8c693660
KR
986fi
987ac_config_guess=$ac_aux_dir/config.guess
988ac_config_sub=$ac_aux_dir/config.sub
989ac_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
85e493f0 998# same time.
8c693660
KR
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.
1007case $host---$target---$nonopt in
1008NONE---*---* | *---NONE---* | *---*---NONE) ;;
1009*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1010esac
1011
1012
c0734708 1013# Make sure we can run config.sub.
372b296c 1014if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
c0734708
ILT
1015else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1016fi
1017
1018echo $ac_n "checking host system type""... $ac_c" 1>&6
1c18e77a 1019echo "configure:1020: checking host system type" >&5
c0734708
ILT
1020
1021host_alias=$host
1022case "$host_alias" in
1023NONE)
1024 case $nonopt in
1025 NONE)
372b296c 1026 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
c0734708
ILT
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 ;;
1031esac
1032
372b296c 1033host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
c0734708
ILT
1034host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1035host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1036host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1037echo "$ac_t""$host" 1>&6
1038
1039echo $ac_n "checking target system type""... $ac_c" 1>&6
1c18e77a 1040echo "configure:1041: checking target system type" >&5
c0734708
ILT
1041
1042target_alias=$target
1043case "$target_alias" in
1044NONE)
1045 case $nonopt in
1046 NONE) target_alias=$host_alias ;;
1047 *) target_alias=$nonopt ;;
1048 esac ;;
1049esac
1050
372b296c 1051target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
c0734708
ILT
1052target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1053target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1054target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1055echo "$ac_t""$target" 1>&6
1056
1057echo $ac_n "checking build system type""... $ac_c" 1>&6
1c18e77a 1058echo "configure:1059: checking build system type" >&5
c0734708
ILT
1059
1060build_alias=$build
1061case "$build_alias" in
1062NONE)
1063 case $nonopt in
1064 NONE) build_alias=$host_alias ;;
1065 *) build_alias=$nonopt ;;
1066 esac ;;
1067esac
1068
372b296c 1069build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
c0734708
ILT
1070build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1071build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1072build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1073echo "$ac_t""$build" 1>&6
1074
1075test "$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.
1081set dummy gcc; ac_word=$2
1082echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1083echo "configure:1084: checking for $ac_word" >&5
c0734708
ILT
1084if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1085 echo $ac_n "(cached) $ac_c" 1>&6
1086else
1087 if test -n "$CC"; then
1088 ac_cv_prog_CC="$CC" # Let the user override the test.
1089else
1c18e77a
GN
1090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1091 ac_dummy="$PATH"
1092 for ac_dir in $ac_dummy; do
c0734708
ILT
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"
1100fi
1101fi
1102CC="$ac_cv_prog_CC"
1103if test -n "$CC"; then
1104 echo "$ac_t""$CC" 1>&6
1105else
1106 echo "$ac_t""no" 1>&6
1107fi
1108
1109if test -z "$CC"; then
1110 # Extract the first word of "cc", so it can be a program name with args.
1111set dummy cc; ac_word=$2
1112echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1113echo "configure:1114: checking for $ac_word" >&5
c0734708
ILT
1114if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116else
1117 if test -n "$CC"; then
1118 ac_cv_prog_CC="$CC" # Let the user override the test.
1119else
1c18e77a 1120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
c0734708 1121 ac_prog_rejected=no
1c18e77a
GN
1122 ac_dummy="$PATH"
1123 for ac_dir in $ac_dummy; do
c0734708
ILT
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"
1135if 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
1148fi
1149fi
1150fi
1151CC="$ac_cv_prog_CC"
1152if test -n "$CC"; then
1153 echo "$ac_t""$CC" 1>&6
1154else
1155 echo "$ac_t""no" 1>&6
1156fi
1157
1c18e77a
GN
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.
1162set dummy cl; ac_word=$2
1163echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164echo "configure:1165: checking for $ac_word" >&5
1165if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
1168 if test -n "$CC"; then
1169 ac_cv_prog_CC="$CC" # Let the user override the test.
1170else
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"
1181fi
1182fi
1183CC="$ac_cv_prog_CC"
1184if test -n "$CC"; then
1185 echo "$ac_t""$CC" 1>&6
1186else
1187 echo "$ac_t""no" 1>&6
1188fi
1189 ;;
1190 esac
1191 fi
c0734708
ILT
1192 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1193fi
1194
1195echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1c18e77a 1196echo "configure:1197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c0734708
ILT
1197
1198ac_ext=c
1199# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1200ac_cpp='$CPP $CPPFLAGS'
1201ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1c18e77a 1202ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
c0734708
ILT
1203cross_compiling=$ac_cv_prog_cc_cross
1204
1c18e77a
GN
1205cat > conftest.$ac_ext << EOF
1206
1207#line 1208 "configure"
c0734708 1208#include "confdefs.h"
1c18e77a 1209
c0734708
ILT
1210main(){return(0);}
1211EOF
1c18e77a 1212if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c0734708
ILT
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
1220else
1221 echo "configure: failed program was:" >&5
1222 cat conftest.$ac_ext >&5
1223 ac_cv_prog_cc_works=no
1224fi
1225rm -fr conftest*
1c18e77a
GN
1226ac_ext=c
1227# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1228ac_cpp='$CPP $CPPFLAGS'
1229ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1230ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1231cross_compiling=$ac_cv_prog_cc_cross
c0734708
ILT
1232
1233echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1234if 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; }
1236fi
1237echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1c18e77a 1238echo "configure:1239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c0734708
ILT
1239echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1240cross_compiling=$ac_cv_prog_cc_cross
1241
1242echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1c18e77a 1243echo "configure:1244: checking whether we are using GNU C" >&5
c0734708
ILT
1244if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1246else
1247 cat > conftest.c <<EOF
1248#ifdef __GNUC__
1249 yes;
1250#endif
1251EOF
1c18e77a 1252if { 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
c0734708
ILT
1253 ac_cv_prog_gcc=yes
1254else
1255 ac_cv_prog_gcc=no
1256fi
1257fi
1258
1259echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1260
1261if test $ac_cv_prog_gcc = yes; then
1262 GCC=yes
1c18e77a
GN
1263else
1264 GCC=
1265fi
1266
1267ac_test_CFLAGS="${CFLAGS+set}"
1268ac_save_CFLAGS="$CFLAGS"
1269CFLAGS=
1270echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1271echo "configure:1272: checking whether ${CC-cc} accepts -g" >&5
c0734708
ILT
1272if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1273 echo $ac_n "(cached) $ac_c" 1>&6
1274else
1275 echo 'void f(){}' > conftest.c
1276if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1277 ac_cv_prog_cc_g=yes
1278else
1279 ac_cv_prog_cc_g=no
1280fi
1281rm -f conftest*
1282
1283fi
1284
1285echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1c18e77a
GN
1286if test "$ac_test_CFLAGS" = set; then
1287 CFLAGS="$ac_save_CFLAGS"
1288elif test $ac_cv_prog_cc_g = yes; then
1289 if test "$GCC" = yes; then
c0734708
ILT
1290 CFLAGS="-g -O2"
1291 else
1c18e77a 1292 CFLAGS="-g"
c0734708
ILT
1293 fi
1294else
1c18e77a
GN
1295 if test "$GCC" = yes; then
1296 CFLAGS="-O2"
1297 else
1298 CFLAGS=
1299 fi
c0734708
ILT
1300fi
1301
1302echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1c18e77a 1303echo "configure:1304: checking for POSIXized ISC" >&5
c0734708
ILT
1304if test -d /etc/conf/kconfig.d &&
1305 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1306then
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
1311EOF
1312
1313 if test "$GCC" = yes; then
1314 CC="$CC -posix"
1315 else
1316 CC="$CC -Xp"
1317 fi
1318else
1319 echo "$ac_t""no" 1>&6
1320 ISC=
1321fi
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
372b296c 1331# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
c0734708
ILT
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.
1335echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1c18e77a 1336echo "configure:1337: checking for a BSD compatible install" >&5
c0734708
ILT
1337if test -z "$INSTALL"; then
1338if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1339 echo $ac_n "(cached) $ac_c" 1>&6
1340else
1c18e77a 1341 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
c0734708
ILT
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.
372b296c
ILT
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
c0734708
ILT
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.
c0734708
ILT
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
1367fi
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
1377fi
1378echo "$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.
1382test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1383
1c18e77a
GN
1384test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1385
c0734708
ILT
1386test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1387
1388
1389test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1390
c0734708 1391echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1c18e77a 1392echo "configure:1393: checking whether build environment is sane" >&5
c0734708
ILT
1393# Just in case
1394sleep 1
1395echo 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).
1401if (
1402 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
b9bf4aff 1403 if test "$*" = "X"; then
c0734708
ILT
1404 # -L didn't work.
1405 set X `ls -t $srcdir/configure conftestfile`
1406 fi
b9bf4aff
ILT
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
1415alias in your environment" 1>&2; exit 1; }
1416 fi
1417
c0734708
ILT
1418 test "$2" = conftestfile
1419 )
1420then
1421 # Ok.
1422 :
1423else
1424 { echo "configure: error: newly created file is older than distributed files!
1425Check your system clock" 1>&2; exit 1; }
1426fi
1427rm -f conftest*
1428echo "$ac_t""yes" 1>&6
1429if test "$program_transform_name" = s,x,x,; then
1430 program_transform_name=
1431else
1432 # Double any \ or $. echo might interpret backslashes.
1433 cat <<\EOF_SED > conftestsed
1434s,\\,\\\\,g; s,\$,$$,g
1435EOF_SED
1436 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1437 rm -f conftestsed
1438fi
1439test "$program_prefix" != NONE &&
1440 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1441# Use a double $ so make ignores it.
1442test "$program_suffix" != NONE &&
1443 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1444
1445# sed with no file args requires a program.
1446test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1447
b9bf4aff 1448echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1c18e77a 1449echo "configure:1450: checking whether ${MAKE-make} sets \${MAKE}" >&5
b9bf4aff
ILT
1450set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1451if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1452 echo $ac_n "(cached) $ac_c" 1>&6
1453else
1454 cat > conftestmake <<\EOF
1455all:
1456 @echo 'ac_maketemp="${MAKE}"'
1457EOF
1458# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1459eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1460if test -n "$ac_maketemp"; then
1461 eval ac_cv_prog_make_${ac_make}_set=yes
1462else
1463 eval ac_cv_prog_make_${ac_make}_set=no
1464fi
1465rm -f conftestmake
1466fi
1467if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1468 echo "$ac_t""yes" 1>&6
1469 SET_MAKE=
1470else
1471 echo "$ac_t""no" 1>&6
1472 SET_MAKE="MAKE=${MAKE-make}"
1473fi
1474
1475
1476PACKAGE=bfd
1477
d510976d 1478VERSION=2.9.4
b9bf4aff
ILT
1479
1480if 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; }
1482fi
1483cat >> confdefs.h <<EOF
1484#define PACKAGE "$PACKAGE"
1485EOF
1486
1487cat >> confdefs.h <<EOF
1488#define VERSION "$VERSION"
1489EOF
1490
1491
1492
c0734708
ILT
1493missing_dir=`cd $ac_aux_dir && pwd`
1494echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1c18e77a 1495echo "configure:1496: checking for working aclocal" >&5
c0734708
ILT
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.
1499if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1500 ACLOCAL=aclocal
1501 echo "$ac_t""found" 1>&6
1502else
1503 ACLOCAL="$missing_dir/missing aclocal"
1504 echo "$ac_t""missing" 1>&6
1505fi
1506
1507echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1c18e77a 1508echo "configure:1509: checking for working autoconf" >&5
c0734708
ILT
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.
1512if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1513 AUTOCONF=autoconf
1514 echo "$ac_t""found" 1>&6
1515else
1516 AUTOCONF="$missing_dir/missing autoconf"
1517 echo "$ac_t""missing" 1>&6
1518fi
1519
1520echo $ac_n "checking for working automake""... $ac_c" 1>&6
1c18e77a 1521echo "configure:1522: checking for working automake" >&5
c0734708
ILT
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.
1525if (automake --version) < /dev/null > /dev/null 2>&1; then
1526 AUTOMAKE=automake
1527 echo "$ac_t""found" 1>&6
1528else
1529 AUTOMAKE="$missing_dir/missing automake"
1530 echo "$ac_t""missing" 1>&6
1531fi
1532
1533echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1c18e77a 1534echo "configure:1535: checking for working autoheader" >&5
c0734708
ILT
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.
1538if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1539 AUTOHEADER=autoheader
1540 echo "$ac_t""found" 1>&6
1541else
1542 AUTOHEADER="$missing_dir/missing autoheader"
1543 echo "$ac_t""missing" 1>&6
1544fi
1545
1546echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1c18e77a 1547echo "configure:1548: checking for working makeinfo" >&5
c0734708
ILT
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.
1551if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1552 MAKEINFO=makeinfo
1553 echo "$ac_t""found" 1>&6
1554else
1555 MAKEINFO="$missing_dir/missing makeinfo"
1556 echo "$ac_t""missing" 1>&6
1557fi
1558
c0734708
ILT
1559
1560
7810074c
ILT
1561if test $host != $build; then
1562 ac_tool_prefix=${host_alias}-
1563else
1564 ac_tool_prefix=
1565fi
1566
1567# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1568set dummy ${ac_tool_prefix}ar; ac_word=$2
1569echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1570echo "configure:1571: checking for $ac_word" >&5
7810074c
ILT
1571if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1572 echo $ac_n "(cached) $ac_c" 1>&6
1573else
1574 if test -n "$AR"; then
1575 ac_cv_prog_AR="$AR" # Let the user override the test.
1576else
1c18e77a
GN
1577 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1578 ac_dummy="$PATH"
1579 for ac_dir in $ac_dummy; do
7810074c
ILT
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"
1588fi
1589fi
1590AR="$ac_cv_prog_AR"
1591if test -n "$AR"; then
1592 echo "$ac_t""$AR" 1>&6
1593else
1594 echo "$ac_t""no" 1>&6
1595fi
1596
1597
1598
1599# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1600set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1601echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1602echo "configure:1603: checking for $ac_word" >&5
7810074c
ILT
1603if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605else
1606 if test -n "$RANLIB"; then
1607 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1608else
1c18e77a
GN
1609 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
7810074c
ILT
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"
1619fi
1620fi
1621RANLIB="$ac_cv_prog_RANLIB"
1622if test -n "$RANLIB"; then
1623 echo "$ac_t""$RANLIB" 1>&6
1624else
1625 echo "$ac_t""no" 1>&6
1626fi
1627
1628
1629if test -z "$ac_cv_prog_RANLIB"; then
1630if test -n "$ac_tool_prefix"; then
1631 # Extract the first word of "ranlib", so it can be a program name with args.
1632set dummy ranlib; ac_word=$2
1633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1634echo "configure:1635: checking for $ac_word" >&5
7810074c
ILT
1635if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1636 echo $ac_n "(cached) $ac_c" 1>&6
1637else
1638 if test -n "$RANLIB"; then
1639 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1640else
1c18e77a
GN
1641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1642 ac_dummy="$PATH"
1643 for ac_dir in $ac_dummy; do
7810074c
ILT
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=":"
1652fi
1653fi
1654RANLIB="$ac_cv_prog_RANLIB"
1655if test -n "$RANLIB"; then
1656 echo "$ac_t""$RANLIB" 1>&6
1657else
1658 echo "$ac_t""no" 1>&6
1659fi
1660
1661else
1662 RANLIB=":"
1663fi
1664fi
1665
1666
b9bf4aff
ILT
1667# Check whether --enable-shared or --disable-shared was given.
1668if test "${enable_shared+set}" = set; then
1669 enableval="$enable_shared"
1670 p=${PACKAGE-default}
1671case "$enableval" in
1672yes) enable_shared=yes ;;
1673no) 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 ;;
1685esac
1686else
1687 enable_shared=no
1688fi
1689
1690
1691# Check whether --enable-static or --disable-static was given.
1692if test "${enable_static+set}" = set; then
1693 enableval="$enable_static"
1694 p=${PACKAGE-default}
1695case "$enableval" in
1696yes) enable_static=yes ;;
1697no) 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 ;;
1709esac
1710else
1711 enable_static=yes
1712fi
9a837903 1713
c0734708
ILT
1714# Extract the first word of "ranlib", so it can be a program name with args.
1715set dummy ranlib; ac_word=$2
1716echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1717echo "configure:1718: checking for $ac_word" >&5
c0734708
ILT
1718if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1719 echo $ac_n "(cached) $ac_c" 1>&6
1720else
1721 if test -n "$RANLIB"; then
1722 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1723else
1c18e77a
GN
1724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1725 ac_dummy="$PATH"
1726 for ac_dir in $ac_dummy; do
c0734708
ILT
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=":"
1735fi
1736fi
1737RANLIB="$ac_cv_prog_RANLIB"
1738if test -n "$RANLIB"; then
1739 echo "$ac_t""$RANLIB" 1>&6
1740else
1741 echo "$ac_t""no" 1>&6
1742fi
1743
1744# Check whether --with-gnu-ld or --without-gnu-ld was given.
1745if test "${with_gnu_ld+set}" = set; then
1746 withval="$with_gnu_ld"
1747 test "$withval" = no || with_gnu_ld=yes
1748else
1749 with_gnu_ld=no
1750fi
1751
9a837903
ILT
1752
1753ac_prog=ld
1754if 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
1c18e77a 1757echo "configure:1758: checking for ld used by GCC" >&5
9a837903
ILT
1758 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1759 case "$ac_prog" in
1760 # Accept absolute paths.
5a83fcdd 1761 /* | [A-Za-z]:\\*)
9a837903
ILT
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
1773elif test "$with_gnu_ld" = yes; then
c0734708 1774 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1c18e77a 1775echo "configure:1776: checking for GNU ld" >&5
c0734708
ILT
1776else
1777 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1c18e77a 1778echo "configure:1779: checking for non-GNU ld" >&5
c0734708
ILT
1779fi
1780if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1781 echo $ac_n "(cached) $ac_c" 1>&6
1782else
9a837903 1783 if test -z "$LD"; then
c0734708
ILT
1784 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1785 for ac_dir in $PATH; do
1786 test -z "$ac_dir" && ac_dir=.
9a837903
ILT
1787 if test -f "$ac_dir/$ac_prog"; then
1788 ac_cv_path_LD="$ac_dir/$ac_prog"
c0734708
ILT
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.
9a837903
ILT
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
c0734708
ILT
1794 else
1795 test "$with_gnu_ld" != yes && break
1796 fi
1797 fi
1798 done
1799 IFS="$ac_save_ifs"
9a837903 1800else
7810074c 1801 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9a837903 1802fi
c0734708
ILT
1803fi
1804
1805LD="$ac_cv_path_LD"
1806if test -n "$LD"; then
1807 echo "$ac_t""$LD" 1>&6
1808else
1809 echo "$ac_t""no" 1>&6
1810fi
1811test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1812
9a837903 1813echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1c18e77a 1814echo "configure:1815: checking if the linker ($LD) is GNU ld" >&5
c0734708
ILT
1815if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1817else
1818 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9a837903 1819if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
c0734708
ILT
1820 ac_cv_prog_gnu_ld=yes
1821else
1822 ac_cv_prog_gnu_ld=no
1823fi
1824fi
1825
1826echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1827
1828
9a837903 1829echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1c18e77a 1830echo "configure:1831: checking for BSD-compatible nm" >&5
9a837903
ILT
1831if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1833else
1c18e77a
GN
1834 if test -n "$NM"; then
1835 # Let the user override the test.
1836 ac_cv_path_NM="$NM"
1837else
9a837903
ILT
1838 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1839 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
b9bf4aff 1840 test -z "$ac_dir" && ac_dir=.
9a837903
ILT
1841 if test -f $ac_dir/nm; then
1842 # Check to see if the nm accepts a BSD-compat flag.
b9bf4aff 1843 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
9a837903 1844 # nm: unknown option "B" ignored
b9bf4aff 1845 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
9a837903 1846 ac_cv_path_NM="$ac_dir/nm -B"
b9bf4aff 1847 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
9a837903
ILT
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
5a83fcdd 1857fi
9a837903
ILT
1858fi
1859
1860NM="$ac_cv_path_NM"
1861echo "$ac_t""$NM" 1>&6
1862
1863
c0734708 1864echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1c18e77a 1865echo "configure:1866: checking whether ln -s works" >&5
c0734708
ILT
1866if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868else
1869 rm -f conftestdata
1870if ln -s X conftestdata 2>/dev/null
1871then
1872 rm -f conftestdata
1873 ac_cv_prog_LN_S="ln -s"
1874else
1875 ac_cv_prog_LN_S=ln
1876fi
1877fi
1878LN_S="$ac_cv_prog_LN_S"
1879if test "$ac_cv_prog_LN_S" = "ln -s"; then
1880 echo "$ac_t""yes" 1>&6
1881else
1882 echo "$ac_t""no" 1>&6
1883fi
1884
c0734708 1885# Always use our own libtool.
36df40e0 1886LIBTOOL='$(SHELL) $(top_builddir)/libtool'
c0734708 1887
b9bf4aff
ILT
1888# Check for any special flags to pass to ltconfig.
1889libtool_flags=
1890test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1891test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
c0734708
ILT
1892test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1893test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1894test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
8c693660 1895
c0734708
ILT
1896# Some flags need to be propagated to the compiler or linker for good
1897# libtool support.
1898case "$host" in
b9bf4aff 1899*-*-irix6*)
7ee4e307 1900 # Find out which ABI we are using.
1c18e77a
GN
1901 echo '#line 1902 "configure"' > conftest.$ac_ext
1902 if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7ee4e307
ILT
1903 case "`/usr/bin/file conftest.o`" in
1904 *32-bit*)
1905 LD="${LD-ld} -32"
9a837903 1906 ;;
7ee4e307
ILT
1907 *N32*)
1908 LD="${LD-ld} -n32"
1909 ;;
1910 *64-bit*)
1911 LD="${LD-ld} -64"
9a837903
ILT
1912 ;;
1913 esac
7ee4e307
ILT
1914 fi
1915 rm -rf conftest*
c0734708 1916 ;;
8c693660 1917
c0734708
ILT
1918*-*-sco3.2v5*)
1919 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1920 CFLAGS="$CFLAGS -belf"
1921 ;;
5a83fcdd
ILT
1922
1923*-*-cygwin32*)
1924 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1925set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1927echo "configure:1928: checking for $ac_word" >&5
5a83fcdd
ILT
1928if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1929 echo $ac_n "(cached) $ac_c" 1>&6
1930else
1931 if test -n "$DLLTOOL"; then
1932 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1933else
1c18e77a
GN
1934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1935 ac_dummy="$PATH"
1936 for ac_dir in $ac_dummy; do
5a83fcdd
ILT
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"
1944fi
1945fi
1946DLLTOOL="$ac_cv_prog_DLLTOOL"
1947if test -n "$DLLTOOL"; then
1948 echo "$ac_t""$DLLTOOL" 1>&6
1949else
1950 echo "$ac_t""no" 1>&6
1951fi
1952
1953
1954if test -z "$ac_cv_prog_DLLTOOL"; then
1955if test -n "$ac_tool_prefix"; then
1956 # Extract the first word of "dlltool", so it can be a program name with args.
1957set dummy dlltool; ac_word=$2
1958echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1959echo "configure:1960: checking for $ac_word" >&5
5a83fcdd
ILT
1960if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1961 echo $ac_n "(cached) $ac_c" 1>&6
1962else
1963 if test -n "$DLLTOOL"; then
1964 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1965else
1c18e77a
GN
1966 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1967 ac_dummy="$PATH"
1968 for ac_dir in $ac_dummy; do
5a83fcdd
ILT
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"
1977fi
1978fi
1979DLLTOOL="$ac_cv_prog_DLLTOOL"
1980if test -n "$DLLTOOL"; then
1981 echo "$ac_t""$DLLTOOL" 1>&6
1982else
1983 echo "$ac_t""no" 1>&6
1984fi
1985
1986else
1987 DLLTOOL="false"
1988fi
1989fi
1990
1991# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1992set dummy ${ac_tool_prefix}as; ac_word=$2
1993echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 1994echo "configure:1995: checking for $ac_word" >&5
5a83fcdd
ILT
1995if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1996 echo $ac_n "(cached) $ac_c" 1>&6
1997else
1998 if test -n "$AS"; then
1999 ac_cv_prog_AS="$AS" # Let the user override the test.
2000else
1c18e77a
GN
2001 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2002 ac_dummy="$PATH"
2003 for ac_dir in $ac_dummy; do
5a83fcdd
ILT
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"
2011fi
2012fi
2013AS="$ac_cv_prog_AS"
2014if test -n "$AS"; then
2015 echo "$ac_t""$AS" 1>&6
2016else
2017 echo "$ac_t""no" 1>&6
2018fi
2019
2020
2021if test -z "$ac_cv_prog_AS"; then
2022if test -n "$ac_tool_prefix"; then
2023 # Extract the first word of "as", so it can be a program name with args.
2024set dummy as; ac_word=$2
2025echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 2026echo "configure:2027: checking for $ac_word" >&5
5a83fcdd
ILT
2027if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2028 echo $ac_n "(cached) $ac_c" 1>&6
2029else
2030 if test -n "$AS"; then
2031 ac_cv_prog_AS="$AS" # Let the user override the test.
2032else
1c18e77a
GN
2033 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2034 ac_dummy="$PATH"
2035 for ac_dir in $ac_dummy; do
5a83fcdd
ILT
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"
2044fi
2045fi
2046AS="$ac_cv_prog_AS"
2047if test -n "$AS"; then
2048 echo "$ac_t""$AS" 1>&6
2049else
2050 echo "$ac_t""no" 1>&6
2051fi
2052
2053else
2054 AS="false"
2055fi
2056fi
2057
2058
2059 ;;
2060
8c693660
KR
2061esac
2062
c0734708
ILT
2063# Actually configure libtool. ac_aux_dir is where install-sh is found.
2064CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
9a837903 2065LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
5a83fcdd 2066DLLTOOL="$DLLTOOL" AS="$AS" \
1c18e77a 2067${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
c0734708
ILT
2068$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2069|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
8c693660 2070
1c18e77a
GN
2071# Redirect the config.log output again, so that the ltconfig log is not
2072# clobbered by the next message.
2073exec 5>>./config.log
2074
8c693660 2075
c0734708
ILT
2076# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2077if 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; } ;;
2083esac
2084else
2085 want64=false
2086fi
2087# Check whether --enable-targets or --disable-targets was given.
2088if 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 ;;
2095esac
2096fi
2097# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2098if 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; } ;;
2104esac
2105fi
2106# Check whether --with-mmap or --without-mmap was given.
2107if 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; } ;;
8c693660 2113esac
c0734708
ILT
2114else
2115 want_mmap=false
2116fi
2117
2118
8c693660 2119
8c693660 2120
8c693660
KR
2121
2122if test -z "$target" ; then
2123 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2124fi
2125if test "$program_transform_name" = s,x,x,; then
2126 program_transform_name=
2127else
d19df9b5
ILT
2128 # Double any \ or $. echo might interpret backslashes.
2129 cat <<\EOF_SED > conftestsed
2130s,\\,\\\\,g; s,\$,$$,g
2131EOF_SED
8c693660
KR
2132 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2133 rm -f conftestsed
2134fi
2135test "$program_prefix" != NONE &&
2136 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2137# Use a double $ so make ignores it.
2138test "$program_suffix" != NONE &&
2139 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2140
2141# sed with no file args requires a program.
2142test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2143
2144
c0734708 2145echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1c18e77a 2146echo "configure:2147: checking whether to enable maintainer-specific portions of Makefiles" >&5
c0734708
ILT
2147 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2148if test "${enable_maintainer_mode+set}" = set; then
2149 enableval="$enable_maintainer_mode"
2150 USE_MAINTAINER_MODE=$enableval
2151else
2152 USE_MAINTAINER_MODE=no
2153fi
8c693660 2154
c0734708
ILT
2155 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2156 if test $USE_MAINTAINER_MODE = yes; then
2157 MAINT=
44f795f7 2158 else
c0734708 2159 MAINT='#M#'
44f795f7 2160 fi
c0734708
ILT
2161
2162
2163echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
1c18e77a 2164echo "configure:2165: checking for Cygwin32 environment" >&5
c0734708
ILT
2165if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
2166 echo $ac_n "(cached) $ac_c" 1>&6
2167else
2168 cat > conftest.$ac_ext <<EOF
1c18e77a 2169#line 2170 "configure"
c0734708
ILT
2170#include "confdefs.h"
2171
2172int main() {
3607f666 2173return __CYGWIN32__;
c0734708
ILT
2174; return 0; }
2175EOF
1c18e77a 2176if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c0734708
ILT
2177 rm -rf conftest*
2178 am_cv_cygwin32=yes
2179else
2180 echo "configure: failed program was:" >&5
2181 cat conftest.$ac_ext >&5
2182 rm -rf conftest*
2183 am_cv_cygwin32=no
2184fi
2185rm -f conftest*
2186rm -f conftest*
2187fi
2188
2189echo "$ac_t""$am_cv_cygwin32" 1>&6
2190CYGWIN32=
2191test "$am_cv_cygwin32" = yes && CYGWIN32=yes
3607f666 2192echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
1c18e77a 2193echo "configure:2194: checking for Mingw32 environment" >&5
3607f666
BK
2194if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2196else
2197 cat > conftest.$ac_ext <<EOF
1c18e77a 2198#line 2199 "configure"
3607f666
BK
2199#include "confdefs.h"
2200
2201int main() {
2202return __MINGW32__;
2203; return 0; }
2204EOF
1c18e77a 2205if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607f666
BK
2206 rm -rf conftest*
2207 am_cv_mingw32=yes
2208else
2209 echo "configure: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 rm -rf conftest*
2212 am_cv_mingw32=no
2213fi
2214rm -f conftest*
2215rm -f conftest*
2216fi
2217
2218echo "$ac_t""$am_cv_mingw32" 1>&6
2219MINGW32=
2220test "$am_cv_mingw32" = yes && MINGW32=yes
2221
70e8e585 2222
c0734708 2223echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1c18e77a 2224echo "configure:2225: checking for executable suffix" >&5
c0734708
ILT
2225if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227else
b9bf4aff 2228 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
c0734708
ILT
2229am_cv_exeext=.exe
2230else
2231cat > am_c_test.c << 'EOF'
2232int main() {
2233/* Nothing needed here */
2234}
2235EOF
2236${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
53d3ce37
TT
2237am_cv_exeext=
2238for 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
2244done
c0734708
ILT
2245rm -f am_c_test*
2246fi
2247
2248test x"${am_cv_exeext}" = x && am_cv_exeext=no
44f795f7 2249fi
c0734708
ILT
2250EXEEXT=""
2251test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
2252echo "$ac_t""${am_cv_exeext}" 1>&6
2253
2254
2255host64=false
2256target64=false
2257
2258# host stuff:
44f795f7 2259
85e493f0
ILT
2260# Extract the first word of "gcc", so it can be a program name with args.
2261set dummy gcc; ac_word=$2
2262echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 2263echo "configure:2264: checking for $ac_word" >&5
85e493f0
ILT
2264if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2265 echo $ac_n "(cached) $ac_c" 1>&6
2266else
2267 if test -n "$CC"; then
2268 ac_cv_prog_CC="$CC" # Let the user override the test.
2269else
1c18e77a
GN
2270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2271 ac_dummy="$PATH"
2272 for ac_dir in $ac_dummy; do
85e493f0
ILT
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"
85e493f0
ILT
2280fi
2281fi
2282CC="$ac_cv_prog_CC"
2283if test -n "$CC"; then
2284 echo "$ac_t""$CC" 1>&6
2285else
2286 echo "$ac_t""no" 1>&6
2287fi
2288
986cf3b8
ILT
2289if test -z "$CC"; then
2290 # Extract the first word of "cc", so it can be a program name with args.
2291set dummy cc; ac_word=$2
2292echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 2293echo "configure:2294: checking for $ac_word" >&5
986cf3b8
ILT
2294if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2295 echo $ac_n "(cached) $ac_c" 1>&6
2296else
2297 if test -n "$CC"; then
2298 ac_cv_prog_CC="$CC" # Let the user override the test.
2299else
1c18e77a 2300 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
986cf3b8 2301 ac_prog_rejected=no
1c18e77a
GN
2302 ac_dummy="$PATH"
2303 for ac_dir in $ac_dummy; do
986cf3b8
ILT
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"
1c18e77a
GN
2315if 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
2328fi
2329fi
2330fi
2331CC="$ac_cv_prog_CC"
2332if test -n "$CC"; then
2333 echo "$ac_t""$CC" 1>&6
2334else
2335 echo "$ac_t""no" 1>&6
2336fi
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.
2342set dummy cl; ac_word=$2
2343echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2344echo "configure:2345: checking for $ac_word" >&5
2345if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2346 echo $ac_n "(cached) $ac_c" 1>&6
2347else
2348 if test -n "$CC"; then
2349 ac_cv_prog_CC="$CC" # Let the user override the test.
2350else
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"
986cf3b8
ILT
2361fi
2362fi
2363CC="$ac_cv_prog_CC"
2364if test -n "$CC"; then
2365 echo "$ac_t""$CC" 1>&6
2366else
2367 echo "$ac_t""no" 1>&6
2368fi
1c18e77a
GN
2369 ;;
2370 esac
2371 fi
986cf3b8
ILT
2372 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2373fi
f515fb2f 2374
ac388f2a 2375echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1c18e77a 2376echo "configure:2377: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac388f2a
ILT
2377
2378ac_ext=c
2379# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2380ac_cpp='$CPP $CPPFLAGS'
2381ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1c18e77a 2382ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac388f2a
ILT
2383cross_compiling=$ac_cv_prog_cc_cross
2384
1c18e77a
GN
2385cat > conftest.$ac_ext << EOF
2386
2387#line 2388 "configure"
ac388f2a 2388#include "confdefs.h"
1c18e77a 2389
ac388f2a
ILT
2390main(){return(0);}
2391EOF
1c18e77a 2392if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac388f2a
ILT
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
2400else
2401 echo "configure: failed program was:" >&5
2402 cat conftest.$ac_ext >&5
2403 ac_cv_prog_cc_works=no
2404fi
2405rm -fr conftest*
1c18e77a
GN
2406ac_ext=c
2407# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2408ac_cpp='$CPP $CPPFLAGS'
2409ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2410ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2411cross_compiling=$ac_cv_prog_cc_cross
ac388f2a
ILT
2412
2413echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2414if 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; }
2416fi
2417echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1c18e77a 2418echo "configure:2419: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ac388f2a
ILT
2419echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2420cross_compiling=$ac_cv_prog_cc_cross
2421
85e493f0 2422echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1c18e77a 2423echo "configure:2424: checking whether we are using GNU C" >&5
85e493f0
ILT
2424if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2425 echo $ac_n "(cached) $ac_c" 1>&6
2426else
2427 cat > conftest.c <<EOF
f515fb2f
ILT
2428#ifdef __GNUC__
2429 yes;
2430#endif
2431EOF
1c18e77a 2432if { 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
85e493f0
ILT
2433 ac_cv_prog_gcc=yes
2434else
2435 ac_cv_prog_gcc=no
2436fi
2437fi
2438
2439echo "$ac_t""$ac_cv_prog_gcc" 1>&6
ac388f2a 2440
85e493f0 2441if test $ac_cv_prog_gcc = yes; then
f515fb2f 2442 GCC=yes
1c18e77a
GN
2443else
2444 GCC=
2445fi
2446
2447ac_test_CFLAGS="${CFLAGS+set}"
2448ac_save_CFLAGS="$CFLAGS"
2449CFLAGS=
2450echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2451echo "configure:2452: checking whether ${CC-cc} accepts -g" >&5
ac388f2a 2452if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
85e493f0
ILT
2453 echo $ac_n "(cached) $ac_c" 1>&6
2454else
2455 echo 'void f(){}' > conftest.c
2456if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac388f2a 2457 ac_cv_prog_cc_g=yes
85e493f0 2458else
ac388f2a 2459 ac_cv_prog_cc_g=no
85e493f0
ILT
2460fi
2461rm -f conftest*
2462
2463fi
2464
ac388f2a 2465echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1c18e77a
GN
2466if test "$ac_test_CFLAGS" = set; then
2467 CFLAGS="$ac_save_CFLAGS"
2468elif test $ac_cv_prog_cc_g = yes; then
2469 if test "$GCC" = yes; then
ac388f2a
ILT
2470 CFLAGS="-g -O2"
2471 else
1c18e77a 2472 CFLAGS="-g"
f515fb2f
ILT
2473 fi
2474else
1c18e77a
GN
2475 if test "$GCC" = yes; then
2476 CFLAGS="-O2"
2477 else
2478 CFLAGS=
2479 fi
f515fb2f 2480fi
f515fb2f
ILT
2481
2482
53d3ce37 2483ALL_LINGUAS=
b7577823 2484echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1c18e77a 2485echo "configure:2486: checking how to run the C preprocessor" >&5
b7577823
ILT
2486# On Suns, sometimes $CPP names a directory.
2487if test -n "$CPP" && test -d "$CPP"; then
2488 CPP=
2489fi
2490if test -z "$CPP"; then
2491if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2492 echo $ac_n "(cached) $ac_c" 1>&6
2493else
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
1c18e77a 2500#line 2501 "configure"
b7577823
ILT
2501#include "confdefs.h"
2502#include <assert.h>
2503Syntax Error
2504EOF
986cf3b8 2505ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
2506{ (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2507ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
b7577823
ILT
2508if test -z "$ac_err"; then
2509 :
2510else
2511 echo "$ac_err" >&5
ac388f2a
ILT
2512 echo "configure: failed program was:" >&5
2513 cat conftest.$ac_ext >&5
b7577823
ILT
2514 rm -rf conftest*
2515 CPP="${CC-cc} -E -traditional-cpp"
2516 cat > conftest.$ac_ext <<EOF
1c18e77a
GN
2517#line 2518 "configure"
2518#include "confdefs.h"
2519#include <assert.h>
2520Syntax Error
2521EOF
2522ac_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; }
2524ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2525if test -z "$ac_err"; then
2526 :
2527else
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"
b7577823
ILT
2535#include "confdefs.h"
2536#include <assert.h>
2537Syntax Error
2538EOF
986cf3b8 2539ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
2540{ (eval echo configure:2541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2541ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
b7577823
ILT
2542if test -z "$ac_err"; then
2543 :
2544else
2545 echo "$ac_err" >&5
ac388f2a
ILT
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
b7577823
ILT
2548 rm -rf conftest*
2549 CPP=/lib/cpp
2550fi
2551rm -f conftest*
2552fi
1c18e77a
GN
2553rm -f conftest*
2554fi
b7577823
ILT
2555rm -f conftest*
2556 ac_cv_prog_CPP="$CPP"
2557fi
2558 CPP="$ac_cv_prog_CPP"
2559else
2560 ac_cv_prog_CPP="$CPP"
2561fi
2562echo "$ac_t""$CPP" 1>&6
2563
53d3ce37 2564echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1c18e77a 2565echo "configure:2566: checking for ANSI C header files" >&5
53d3ce37 2566if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
b7577823
ILT
2567 echo $ac_n "(cached) $ac_c" 1>&6
2568else
2569 cat > conftest.$ac_ext <<EOF
1c18e77a 2570#line 2571 "configure"
b7577823 2571#include "confdefs.h"
53d3ce37
TT
2572#include <stdlib.h>
2573#include <stdarg.h>
2574#include <string.h>
2575#include <float.h>
b7577823 2576EOF
986cf3b8 2577ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
2578{ (eval echo configure:2579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2579ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
b7577823
ILT
2580if test -z "$ac_err"; then
2581 rm -rf conftest*
53d3ce37 2582 ac_cv_header_stdc=yes
b7577823
ILT
2583else
2584 echo "$ac_err" >&5
ac388f2a
ILT
2585 echo "configure: failed program was:" >&5
2586 cat conftest.$ac_ext >&5
b7577823 2587 rm -rf conftest*
53d3ce37 2588 ac_cv_header_stdc=no
b7577823
ILT
2589fi
2590rm -f conftest*
53d3ce37
TT
2591
2592if test $ac_cv_header_stdc = yes; then
2593 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2594cat > conftest.$ac_ext <<EOF
1c18e77a 2595#line 2596 "configure"
53d3ce37
TT
2596#include "confdefs.h"
2597#include <string.h>
2598EOF
2599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2600 egrep "memchr" >/dev/null 2>&1; then
2601 :
2602else
2603 rm -rf conftest*
2604 ac_cv_header_stdc=no
b7577823 2605fi
53d3ce37
TT
2606rm -f conftest*
2607
2608fi
2609
2610if test $ac_cv_header_stdc = yes; then
2611 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2612cat > conftest.$ac_ext <<EOF
1c18e77a 2613#line 2614 "configure"
53d3ce37
TT
2614#include "confdefs.h"
2615#include <stdlib.h>
b7577823 2616EOF
53d3ce37
TT
2617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2618 egrep "free" >/dev/null 2>&1; then
2619 :
b7577823 2620else
53d3ce37
TT
2621 rm -rf conftest*
2622 ac_cv_header_stdc=no
b7577823 2623fi
53d3ce37 2624rm -f conftest*
b7577823 2625
53d3ce37
TT
2626fi
2627
2628if test $ac_cv_header_stdc = yes; then
2629 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2630if test "$cross_compiling" = yes; then
2631 :
b7577823
ILT
2632else
2633 cat > conftest.$ac_ext <<EOF
1c18e77a 2634#line 2635 "configure"
b7577823 2635#include "confdefs.h"
53d3ce37
TT
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)))
2640int main () { int i; for (i = 0; i < 256; i++)
2641if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2642exit (0); }
2643
b7577823 2644EOF
1c18e77a 2645if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
53d3ce37
TT
2646then
2647 :
b7577823 2648else
ac388f2a
ILT
2649 echo "configure: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
53d3ce37
TT
2651 rm -fr conftest*
2652 ac_cv_header_stdc=no
b7577823 2653fi
53d3ce37 2654rm -fr conftest*
b7577823 2655fi
53d3ce37
TT
2656
2657fi
2658fi
2659
2660echo "$ac_t""$ac_cv_header_stdc" 1>&6
2661if test $ac_cv_header_stdc = yes; then
2662 cat >> confdefs.h <<\EOF
2663#define STDC_HEADERS 1
b7577823 2664EOF
53d3ce37 2665
b7577823 2666fi
b7577823 2667
53d3ce37 2668echo $ac_n "checking for working const""... $ac_c" 1>&6
1c18e77a 2669echo "configure:2670: checking for working const" >&5
53d3ce37 2670if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
ab1aa5cd
FF
2671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
2673 cat > conftest.$ac_ext <<EOF
1c18e77a 2674#line 2675 "configure"
ab1aa5cd 2675#include "confdefs.h"
53d3ce37 2676
ac388f2a 2677int main() {
53d3ce37
TT
2678
2679/* Ultrix mips cc rejects this. */
2680typedef int charset[2]; const charset x;
2681/* SunOS 4.1.1 cc rejects this. */
2682char const *const *ccp;
2683char **p;
2684/* NEC SVR4.0.2 mips cc rejects this. */
2685struct point {int x, y;};
2686static 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 */
2690const char *g = "string";
2691ccp = &g + (g ? g-g : 0);
2692/* HPUX 7.0 cc rejects these. */
2693++ccp;
2694p = (char**) ccp;
2695ccp = (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
ab1aa5cd
FF
2721; return 0; }
2722EOF
1c18e77a 2723if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab1aa5cd 2724 rm -rf conftest*
53d3ce37 2725 ac_cv_c_const=yes
ab1aa5cd 2726else
ac388f2a
ILT
2727 echo "configure: failed program was:" >&5
2728 cat conftest.$ac_ext >&5
ab1aa5cd 2729 rm -rf conftest*
53d3ce37 2730 ac_cv_c_const=no
ab1aa5cd
FF
2731fi
2732rm -f conftest*
ab1aa5cd
FF
2733fi
2734
53d3ce37
TT
2735echo "$ac_t""$ac_cv_c_const" 1>&6
2736if test $ac_cv_c_const = no; then
ab1aa5cd 2737 cat >> confdefs.h <<\EOF
53d3ce37 2738#define const
ab1aa5cd
FF
2739EOF
2740
2741fi
2742
53d3ce37 2743echo $ac_n "checking for inline""... $ac_c" 1>&6
1c18e77a 2744echo "configure:2745: checking for inline" >&5
53d3ce37 2745if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
b7577823
ILT
2746 echo $ac_n "(cached) $ac_c" 1>&6
2747else
53d3ce37
TT
2748 ac_cv_c_inline=no
2749for ac_kw in inline __inline__ __inline; do
b7577823 2750 cat > conftest.$ac_ext <<EOF
1c18e77a 2751#line 2752 "configure"
b7577823 2752#include "confdefs.h"
b7577823 2753
ac388f2a 2754int main() {
53d3ce37 2755} $ac_kw foo() {
b7577823
ILT
2756; return 0; }
2757EOF
1c18e77a 2758if { (eval echo configure:2759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823 2759 rm -rf conftest*
53d3ce37 2760 ac_cv_c_inline=$ac_kw; break
b7577823 2761else
ac388f2a
ILT
2762 echo "configure: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
b7577823
ILT
2764fi
2765rm -f conftest*
b7577823
ILT
2766done
2767
53d3ce37 2768fi
b7577823 2769
53d3ce37
TT
2770echo "$ac_t""$ac_cv_c_inline" 1>&6
2771case "$ac_cv_c_inline" in
2772 inline | yes) ;;
2773 no) cat >> confdefs.h <<\EOF
2774#define inline
2775EOF
2776 ;;
2777 *) cat >> confdefs.h <<EOF
2778#define inline $ac_cv_c_inline
b7577823
ILT
2779EOF
2780 ;;
2781esac
2782
53d3ce37 2783echo $ac_n "checking for off_t""... $ac_c" 1>&6
1c18e77a 2784echo "configure:2785: checking for off_t" >&5
53d3ce37 2785if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
f7954d86
MM
2786 echo $ac_n "(cached) $ac_c" 1>&6
2787else
2788 cat > conftest.$ac_ext <<EOF
1c18e77a 2789#line 2790 "configure"
f7954d86 2790#include "confdefs.h"
53d3ce37
TT
2791#include <sys/types.h>
2792#if STDC_HEADERS
f7954d86 2793#include <stdlib.h>
53d3ce37 2794#include <stddef.h>
f7954d86 2795#endif
f7954d86 2796EOF
53d3ce37 2797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1c18e77a 2798 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
f7954d86 2799 rm -rf conftest*
53d3ce37 2800 ac_cv_type_off_t=yes
f7954d86
MM
2801else
2802 rm -rf conftest*
53d3ce37 2803 ac_cv_type_off_t=no
f7954d86
MM
2804fi
2805rm -f conftest*
f7954d86 2806
53d3ce37
TT
2807fi
2808echo "$ac_t""$ac_cv_type_off_t" 1>&6
2809if test $ac_cv_type_off_t = no; then
2810 cat >> confdefs.h <<\EOF
2811#define off_t long
f7954d86
MM
2812EOF
2813
2814fi
2815
53d3ce37 2816echo $ac_n "checking for size_t""... $ac_c" 1>&6
1c18e77a 2817echo "configure:2818: checking for size_t" >&5
53d3ce37 2818if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
b7577823
ILT
2819 echo $ac_n "(cached) $ac_c" 1>&6
2820else
2821 cat > conftest.$ac_ext <<EOF
1c18e77a 2822#line 2823 "configure"
b7577823 2823#include "confdefs.h"
53d3ce37
TT
2824#include <sys/types.h>
2825#if STDC_HEADERS
b7577823 2826#include <stdlib.h>
53d3ce37 2827#include <stddef.h>
b7577823 2828#endif
b7577823 2829EOF
53d3ce37 2830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1c18e77a 2831 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b7577823 2832 rm -rf conftest*
53d3ce37 2833 ac_cv_type_size_t=yes
b7577823
ILT
2834else
2835 rm -rf conftest*
53d3ce37
TT
2836 ac_cv_type_size_t=no
2837fi
2838rm -f conftest*
2839
2840fi
2841echo "$ac_t""$ac_cv_type_size_t" 1>&6
2842if test $ac_cv_type_size_t = no; then
2843 cat >> confdefs.h <<\EOF
2844#define size_t unsigned
2845EOF
2846
2847fi
2848
2849# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2850# for constant arguments. Useless!
2851echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1c18e77a 2852echo "configure:2853: checking for working alloca.h" >&5
53d3ce37
TT
2853if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2854 echo $ac_n "(cached) $ac_c" 1>&6
2855else
2856 cat > conftest.$ac_ext <<EOF
1c18e77a 2857#line 2858 "configure"
53d3ce37
TT
2858#include "confdefs.h"
2859#include <alloca.h>
2860int main() {
2861char *p = alloca(2 * sizeof(int));
2862; return 0; }
2863EOF
1c18e77a 2864if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
2865 rm -rf conftest*
2866 ac_cv_header_alloca_h=yes
2867else
2868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 rm -rf conftest*
2871 ac_cv_header_alloca_h=no
2872fi
2873rm -f conftest*
2874fi
2875
2876echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2877if test $ac_cv_header_alloca_h = yes; then
2878 cat >> confdefs.h <<\EOF
2879#define HAVE_ALLOCA_H 1
2880EOF
2881
2882fi
2883
2884echo $ac_n "checking for alloca""... $ac_c" 1>&6
1c18e77a 2885echo "configure:2886: checking for alloca" >&5
53d3ce37
TT
2886if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2887 echo $ac_n "(cached) $ac_c" 1>&6
2888else
2889 cat > conftest.$ac_ext <<EOF
1c18e77a 2890#line 2891 "configure"
53d3ce37
TT
2891#include "confdefs.h"
2892
2893#ifdef __GNUC__
2894# define alloca __builtin_alloca
2895#else
1c18e77a
GN
2896# ifdef _MSC_VER
2897# include <malloc.h>
2898# define alloca _alloca
53d3ce37 2899# else
1c18e77a
GN
2900# if HAVE_ALLOCA_H
2901# include <alloca.h>
53d3ce37 2902# else
1c18e77a
GN
2903# ifdef _AIX
2904 #pragma alloca
2905# else
2906# ifndef alloca /* predefined by HP cc +Olibcalls */
53d3ce37 2907char *alloca ();
1c18e77a 2908# endif
53d3ce37
TT
2909# endif
2910# endif
2911# endif
2912#endif
2913
2914int main() {
2915char *p = (char *) alloca(1);
2916; return 0; }
2917EOF
1c18e77a 2918if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
2919 rm -rf conftest*
2920 ac_cv_func_alloca_works=yes
2921else
2922 echo "configure: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 rm -rf conftest*
2925 ac_cv_func_alloca_works=no
2926fi
2927rm -f conftest*
2928fi
2929
2930echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2931if test $ac_cv_func_alloca_works = yes; then
2932 cat >> confdefs.h <<\EOF
2933#define HAVE_ALLOCA 1
2934EOF
2935
2936fi
2937
2938if 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.
1c18e77a 2943 ALLOCA=alloca.${ac_objext}
53d3ce37
TT
2944 cat >> confdefs.h <<\EOF
2945#define C_ALLOCA 1
2946EOF
2947
2948
2949echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1c18e77a 2950echo "configure:2951: checking whether alloca needs Cray hooks" >&5
53d3ce37
TT
2951if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
2953else
2954 cat > conftest.$ac_ext <<EOF
1c18e77a 2955#line 2956 "configure"
53d3ce37
TT
2956#include "confdefs.h"
2957#if defined(CRAY) && ! defined(CRAY2)
2958webecray
2959#else
2960wenotbecray
2961#endif
2962
2963EOF
2964if (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
2968else
2969 rm -rf conftest*
2970 ac_cv_os_cray=no
2971fi
2972rm -f conftest*
2973
2974fi
2975
2976echo "$ac_t""$ac_cv_os_cray" 1>&6
2977if test $ac_cv_os_cray = yes; then
2978for ac_func in _getb67 GETB67 getb67; do
2979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 2980echo "configure:2981: checking for $ac_func" >&5
53d3ce37
TT
2981if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2982 echo $ac_n "(cached) $ac_c" 1>&6
2983else
2984 cat > conftest.$ac_ext <<EOF
1c18e77a 2985#line 2986 "configure"
53d3ce37
TT
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. */
2993char $ac_func();
2994
2995int 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)
3001choke me
3002#else
3003$ac_func();
3004#endif
3005
3006; return 0; }
3007EOF
1c18e77a 3008if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3009 rm -rf conftest*
3010 eval "ac_cv_func_$ac_func=yes"
3011else
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"
3016fi
3017rm -f conftest*
3018fi
3019
3020if 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
3024EOF
3025
3026 break
3027else
3028 echo "$ac_t""no" 1>&6
3029fi
3030
3031done
3032fi
3033
3034echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1c18e77a 3035echo "configure:3036: checking stack direction for C alloca" >&5
53d3ce37
TT
3036if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
3038else
3039 if test "$cross_compiling" = yes; then
3040 ac_cv_c_stack_direction=0
3041else
3042 cat > conftest.$ac_ext <<EOF
1c18e77a 3043#line 3044 "configure"
53d3ce37
TT
3044#include "confdefs.h"
3045find_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}
3057main ()
3058{
3059 exit (find_stack_direction() < 0);
3060}
3061EOF
1c18e77a 3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
53d3ce37
TT
3063then
3064 ac_cv_c_stack_direction=1
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 rm -fr conftest*
3069 ac_cv_c_stack_direction=-1
3070fi
3071rm -fr conftest*
3072fi
3073
3074fi
3075
3076echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3077cat >> confdefs.h <<EOF
3078#define STACK_DIRECTION $ac_cv_c_stack_direction
3079EOF
3080
3081fi
3082
3083for ac_hdr in unistd.h
3084do
3085ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3086echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1c18e77a 3087echo "configure:3088: checking for $ac_hdr" >&5
53d3ce37
TT
3088if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3089 echo $ac_n "(cached) $ac_c" 1>&6
3090else
3091 cat > conftest.$ac_ext <<EOF
1c18e77a 3092#line 3093 "configure"
53d3ce37
TT
3093#include "confdefs.h"
3094#include <$ac_hdr>
3095EOF
3096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
3097{ (eval echo configure:3098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3098ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
3099if test -z "$ac_err"; then
3100 rm -rf conftest*
3101 eval "ac_cv_header_$ac_safe=yes"
3102else
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"
3108fi
3109rm -f conftest*
3110fi
3111if 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
3116EOF
3117
3118else
3119 echo "$ac_t""no" 1>&6
3120fi
3121done
3122
3123for ac_func in getpagesize
3124do
3125echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 3126echo "configure:3127: checking for $ac_func" >&5
53d3ce37
TT
3127if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3128 echo $ac_n "(cached) $ac_c" 1>&6
3129else
3130 cat > conftest.$ac_ext <<EOF
1c18e77a 3131#line 3132 "configure"
53d3ce37
TT
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. */
3139char $ac_func();
3140
3141int 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)
3147choke me
3148#else
3149$ac_func();
3150#endif
3151
3152; return 0; }
3153EOF
1c18e77a 3154if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3155 rm -rf conftest*
3156 eval "ac_cv_func_$ac_func=yes"
3157else
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"
3162fi
3163rm -f conftest*
3164fi
3165
3166if 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
3171EOF
3172
3173else
3174 echo "$ac_t""no" 1>&6
3175fi
3176done
3177
3178echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1c18e77a 3179echo "configure:3180: checking for working mmap" >&5
53d3ce37
TT
3180if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3181 echo $ac_n "(cached) $ac_c" 1>&6
3182else
3183 if test "$cross_compiling" = yes; then
3184 ac_cv_func_mmap_fixed_mapped=no
3185else
3186 cat > conftest.$ac_ext <<EOF
1c18e77a 3187#line 3188 "configure"
53d3ce37
TT
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
3257extern "C" { void *malloc(unsigned); }
3258#else
3259char *malloc();
3260#endif
3261
3262int
3263main()
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
3326EOF
1c18e77a 3327if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
53d3ce37
TT
3328then
3329 ac_cv_func_mmap_fixed_mapped=yes
3330else
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
3335fi
3336rm -fr conftest*
3337fi
3338
3339fi
3340
3341echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3342if test $ac_cv_func_mmap_fixed_mapped = yes; then
3343 cat >> confdefs.h <<\EOF
3344#define HAVE_MMAP 1
3345EOF
3346
3347fi
3348
3349
3350 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3351unistd.h values.h sys/param.h
3352do
3353ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3354echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1c18e77a 3355echo "configure:3356: checking for $ac_hdr" >&5
53d3ce37
TT
3356if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358else
3359 cat > conftest.$ac_ext <<EOF
1c18e77a 3360#line 3361 "configure"
53d3ce37
TT
3361#include "confdefs.h"
3362#include <$ac_hdr>
3363EOF
3364ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
3365{ (eval echo configure:3366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3366ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
3367if test -z "$ac_err"; then
3368 rm -rf conftest*
3369 eval "ac_cv_header_$ac_safe=yes"
3370else
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"
3376fi
3377rm -f conftest*
3378fi
3379if 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
3384EOF
3385
3386else
3387 echo "$ac_t""no" 1>&6
3388fi
3389done
3390
3391 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3392__argz_count __argz_stringify __argz_next
3393do
3394echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 3395echo "configure:3396: checking for $ac_func" >&5
53d3ce37
TT
3396if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3397 echo $ac_n "(cached) $ac_c" 1>&6
3398else
3399 cat > conftest.$ac_ext <<EOF
1c18e77a 3400#line 3401 "configure"
53d3ce37
TT
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. */
3408char $ac_func();
3409
3410int 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)
3416choke me
3417#else
3418$ac_func();
3419#endif
3420
3421; return 0; }
3422EOF
1c18e77a 3423if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3424 rm -rf conftest*
3425 eval "ac_cv_func_$ac_func=yes"
3426else
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"
3431fi
3432rm -f conftest*
3433fi
3434
3435if 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
3440EOF
3441
3442else
3443 echo "$ac_t""no" 1>&6
3444fi
3445done
3446
3447
3448 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3449 for ac_func in stpcpy
3450do
3451echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 3452echo "configure:3453: checking for $ac_func" >&5
53d3ce37
TT
3453if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3454 echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456 cat > conftest.$ac_ext <<EOF
1c18e77a 3457#line 3458 "configure"
53d3ce37
TT
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. */
3465char $ac_func();
3466
3467int 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)
3473choke me
3474#else
3475$ac_func();
3476#endif
3477
3478; return 0; }
3479EOF
1c18e77a 3480if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3481 rm -rf conftest*
3482 eval "ac_cv_func_$ac_func=yes"
3483else
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"
3488fi
3489rm -f conftest*
3490fi
3491
3492if 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
3497EOF
3498
3499else
3500 echo "$ac_t""no" 1>&6
3501fi
3502done
3503
3504 fi
3505 if test "${ac_cv_func_stpcpy}" = "yes"; then
3506 cat >> confdefs.h <<\EOF
3507#define HAVE_STPCPY 1
3508EOF
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
1c18e77a 3514echo "configure:3515: checking for LC_MESSAGES" >&5
53d3ce37
TT
3515if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3516 echo $ac_n "(cached) $ac_c" 1>&6
3517else
3518 cat > conftest.$ac_ext <<EOF
1c18e77a 3519#line 3520 "configure"
53d3ce37
TT
3520#include "confdefs.h"
3521#include <locale.h>
3522int main() {
3523return LC_MESSAGES
3524; return 0; }
3525EOF
1c18e77a 3526if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3527 rm -rf conftest*
3528 am_cv_val_LC_MESSAGES=yes
3529else
3530 echo "configure: failed program was:" >&5
3531 cat conftest.$ac_ext >&5
3532 rm -rf conftest*
3533 am_cv_val_LC_MESSAGES=no
3534fi
3535rm -f conftest*
3536fi
3537
3538echo "$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
3542EOF
3543
3544 fi
3545 fi
3546 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
1c18e77a 3547echo "configure:3548: checking whether NLS is requested" >&5
53d3ce37
TT
3548 # Check whether --enable-nls or --disable-nls was given.
3549if test "${enable_nls+set}" = set; then
3550 enableval="$enable_nls"
3551 USE_NLS=$enableval
3552else
3553 USE_NLS=yes
3554fi
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
3564EOF
3565
3566 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
1c18e77a 3567echo "configure:3568: checking whether included gettext is requested" >&5
53d3ce37
TT
3568 # Check whether --with-included-gettext or --without-included-gettext was given.
3569if test "${with_included_gettext+set}" = set; then
3570 withval="$with_included_gettext"
3571 nls_cv_force_use_gnu_gettext=$withval
3572else
3573 nls_cv_force_use_gnu_gettext=no
3574fi
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_%'`
3585echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
1c18e77a 3586echo "configure:3587: checking for libintl.h" >&5
53d3ce37
TT
3587if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3588 echo $ac_n "(cached) $ac_c" 1>&6
3589else
3590 cat > conftest.$ac_ext <<EOF
1c18e77a 3591#line 3592 "configure"
53d3ce37
TT
3592#include "confdefs.h"
3593#include <libintl.h>
3594EOF
3595ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
3596{ (eval echo configure:3597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3597ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
3598if test -z "$ac_err"; then
3599 rm -rf conftest*
3600 eval "ac_cv_header_$ac_safe=yes"
3601else
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"
3607fi
3608rm -f conftest*
3609fi
3610if 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
1c18e77a 3613echo "configure:3614: checking for gettext in libc" >&5
53d3ce37
TT
3614if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3616else
3617 cat > conftest.$ac_ext <<EOF
1c18e77a 3618#line 3619 "configure"
53d3ce37
TT
3619#include "confdefs.h"
3620#include <libintl.h>
3621int main() {
3622return (int) gettext ("")
3623; return 0; }
3624EOF
1c18e77a 3625if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3626 rm -rf conftest*
3627 gt_cv_func_gettext_libc=yes
3628else
3629 echo "configure: failed program was:" >&5
3630 cat conftest.$ac_ext >&5
3631 rm -rf conftest*
3632 gt_cv_func_gettext_libc=no
3633fi
3634rm -f conftest*
3635fi
3636
3637echo "$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
1c18e77a 3641echo "configure:3642: checking for bindtextdomain in -lintl" >&5
53d3ce37
TT
3642ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 ac_save_LIBS="$LIBS"
3647LIBS="-lintl $LIBS"
3648cat > conftest.$ac_ext <<EOF
1c18e77a 3649#line 3650 "configure"
53d3ce37
TT
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. */
3654char bindtextdomain();
3655
3656int main() {
3657bindtextdomain()
3658; return 0; }
3659EOF
1c18e77a 3660if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3661 rm -rf conftest*
3662 eval "ac_cv_lib_$ac_lib_var=yes"
3663else
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"
3668fi
3669rm -f conftest*
3670LIBS="$ac_save_LIBS"
3671
3672fi
3673if 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
1c18e77a 3676echo "configure:3677: checking for gettext in libintl" >&5
53d3ce37
TT
3677if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3678 echo $ac_n "(cached) $ac_c" 1>&6
3679else
3680 cat > conftest.$ac_ext <<EOF
1c18e77a 3681#line 3682 "configure"
53d3ce37
TT
3682#include "confdefs.h"
3683
3684int main() {
3685return (int) gettext ("")
3686; return 0; }
3687EOF
1c18e77a 3688if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3689 rm -rf conftest*
3690 gt_cv_func_gettext_libintl=yes
3691else
3692 echo "configure: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3694 rm -rf conftest*
3695 gt_cv_func_gettext_libintl=no
3696fi
3697rm -f conftest*
3698fi
3699
3700echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3701else
3702 echo "$ac_t""no" 1>&6
3703fi
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
3711EOF
3712
3713 # Extract the first word of "msgfmt", so it can be a program name with args.
3714set dummy msgfmt; ac_word=$2
3715echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3716echo "configure:3717: checking for $ac_word" >&5
53d3ce37
TT
3717if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3718 echo $ac_n "(cached) $ac_c" 1>&6
3719else
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 ;;
3738esac
3739fi
3740MSGFMT="$ac_cv_path_MSGFMT"
3741if test -n "$MSGFMT"; then
3742 echo "$ac_t""$MSGFMT" 1>&6
3743else
3744 echo "$ac_t""no" 1>&6
3745fi
3746 if test "$MSGFMT" != "no"; then
3747 for ac_func in dcgettext
3748do
3749echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 3750echo "configure:3751: checking for $ac_func" >&5
53d3ce37
TT
3751if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753else
3754 cat > conftest.$ac_ext <<EOF
1c18e77a 3755#line 3756 "configure"
53d3ce37
TT
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. */
3763char $ac_func();
3764
3765int 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)
3771choke me
3772#else
3773$ac_func();
3774#endif
3775
3776; return 0; }
3777EOF
1c18e77a 3778if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3779 rm -rf conftest*
3780 eval "ac_cv_func_$ac_func=yes"
3781else
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"
3786fi
3787rm -f conftest*
3788fi
3789
3790if 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
3795EOF
3796
3797else
3798 echo "$ac_t""no" 1>&6
3799fi
3800done
3801
3802 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3803set dummy gmsgfmt; ac_word=$2
3804echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3805echo "configure:3806: checking for $ac_word" >&5
53d3ce37
TT
3806if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3807 echo $ac_n "(cached) $ac_c" 1>&6
3808else
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 *)
1c18e77a
GN
3817 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
53d3ce37
TT
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 ;;
3829esac
3830fi
3831GMSGFMT="$ac_cv_path_GMSGFMT"
3832if test -n "$GMSGFMT"; then
3833 echo "$ac_t""$GMSGFMT" 1>&6
3834else
3835 echo "$ac_t""no" 1>&6
3836fi
3837
3838 # Extract the first word of "xgettext", so it can be a program name with args.
3839set dummy xgettext; ac_word=$2
3840echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3841echo "configure:3842: checking for $ac_word" >&5
53d3ce37
TT
3842if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3843 echo $ac_n "(cached) $ac_c" 1>&6
3844else
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 ;;
3863esac
3864fi
3865XGETTEXT="$ac_cv_path_XGETTEXT"
3866if test -n "$XGETTEXT"; then
3867 echo "$ac_t""$XGETTEXT" 1>&6
3868else
3869 echo "$ac_t""no" 1>&6
3870fi
3871
3872 cat > conftest.$ac_ext <<EOF
1c18e77a 3873#line 3874 "configure"
53d3ce37
TT
3874#include "confdefs.h"
3875
3876int main() {
3877extern int _nl_msg_cat_cntr;
3878 return _nl_msg_cat_cntr
3879; return 0; }
3880EOF
1c18e77a 3881if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
3882 rm -rf conftest*
3883 CATOBJEXT=.gmo
3884 DATADIRNAME=share
3885else
3886 echo "configure: failed program was:" >&5
3887 cat conftest.$ac_ext >&5
3888 rm -rf conftest*
3889 CATOBJEXT=.mo
3890 DATADIRNAME=lib
3891fi
3892rm -f conftest*
3893 INSTOBJEXT=.mo
3894 fi
3895 fi
3896
3897else
3898 echo "$ac_t""no" 1>&6
3899fi
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.
3911set dummy msgfmt; ac_word=$2
3912echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3913echo "configure:3914: checking for $ac_word" >&5
53d3ce37
TT
3914if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
3916else
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 ;;
3935esac
3936fi
3937MSGFMT="$ac_cv_path_MSGFMT"
3938if test -n "$MSGFMT"; then
3939 echo "$ac_t""$MSGFMT" 1>&6
3940else
3941 echo "$ac_t""no" 1>&6
3942fi
3943
3944 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3945set dummy gmsgfmt; ac_word=$2
3946echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3947echo "configure:3948: checking for $ac_word" >&5
53d3ce37
TT
3948if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3949 echo $ac_n "(cached) $ac_c" 1>&6
3950else
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 *)
1c18e77a
GN
3959 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3960 ac_dummy="$PATH"
3961 for ac_dir in $ac_dummy; do
53d3ce37
TT
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 ;;
3971esac
3972fi
3973GMSGFMT="$ac_cv_path_GMSGFMT"
3974if test -n "$GMSGFMT"; then
3975 echo "$ac_t""$GMSGFMT" 1>&6
3976else
3977 echo "$ac_t""no" 1>&6
3978fi
3979
3980 # Extract the first word of "xgettext", so it can be a program name with args.
3981set dummy xgettext; ac_word=$2
3982echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1c18e77a 3983echo "configure:3984: checking for $ac_word" >&5
53d3ce37
TT
3984if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3985 echo $ac_n "(cached) $ac_c" 1>&6
3986else
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 ;;
4005esac
4006fi
4007XGETTEXT="$ac_cv_path_XGETTEXT"
4008if test -n "$XGETTEXT"; then
4009 echo "$ac_t""$XGETTEXT" 1>&6
4010else
4011 echo "$ac_t""no" 1>&6
4012fi
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
1c18e77a 4073echo "configure:4074: checking for catalogs to be installed" >&5
53d3ce37
TT
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_%'`
4100echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
1c18e77a 4101echo "configure:4102: checking for linux/version.h" >&5
53d3ce37
TT
4102if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4103 echo $ac_n "(cached) $ac_c" 1>&6
4104else
4105 cat > conftest.$ac_ext <<EOF
1c18e77a 4106#line 4107 "configure"
53d3ce37
TT
4107#include "confdefs.h"
4108#include <linux/version.h>
4109EOF
4110ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
4111{ (eval echo configure:4112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4112ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
4113if test -z "$ac_err"; then
4114 rm -rf conftest*
4115 eval "ac_cv_header_$ac_safe=yes"
4116else
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"
4122fi
4123rm -f conftest*
4124fi
4125if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4126 echo "$ac_t""yes" 1>&6
4127 msgformat=linux
4128else
4129 echo "$ac_t""no" 1>&6
4130msgformat=xopen
4131fi
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
4178test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4179
4180
4181BFD_HOST_64BIT_LONG=0
4182BFD_HOST_64_BIT_DEFINED=0
4183BFD_HOST_64_BIT=
4184BFD_HOST_U_64_BIT=
4185if test "x${HOST_64BIT_TYPE}" = "xlong"; then
4186 BFD_HOST_64BIT_LONG=1
4187elif 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}
4191fi
4192
4193
4194
4195
4196
4197# Put a plausible default for CC_FOR_BUILD in Makefile.
4198if 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
4204fi
4205
4206# Also set EXEEXT_FOR_BUILD.
4207if test "x$cross_compiling" = "xno"; then
4208 EXEEXT_FOR_BUILD='$(EXEEXT)'
4209else
4210 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
1c18e77a 4211echo "configure:4212: checking for build system executable suffix" >&5
53d3ce37
TT
4212if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4213 echo $ac_n "(cached) $ac_c" 1>&6
4214else
4215 cat > ac_c_test.c << 'EOF'
4216int main() {
4217/* Nothing needed here */
4218}
4219EOF
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
4224fi
4225
4226echo "$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}
4229fi
4230
4231
4232for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
4233do
4234ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4235echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1c18e77a 4236echo "configure:4237: checking for $ac_hdr" >&5
53d3ce37
TT
4237if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4238 echo $ac_n "(cached) $ac_c" 1>&6
4239else
4240 cat > conftest.$ac_ext <<EOF
1c18e77a 4241#line 4242 "configure"
53d3ce37
TT
4242#include "confdefs.h"
4243#include <$ac_hdr>
4244EOF
4245ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
4246{ (eval echo configure:4247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4247ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
4248if test -z "$ac_err"; then
4249 rm -rf conftest*
4250 eval "ac_cv_header_$ac_safe=yes"
4251else
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"
4257fi
4258rm -f conftest*
4259fi
4260if 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
4265EOF
4266
4267else
4268 echo "$ac_t""no" 1>&6
4269fi
4270done
4271
4272for ac_hdr in fcntl.h sys/file.h sys/time.h
4273do
4274ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4275echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1c18e77a 4276echo "configure:4277: checking for $ac_hdr" >&5
53d3ce37
TT
4277if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4278 echo $ac_n "(cached) $ac_c" 1>&6
4279else
4280 cat > conftest.$ac_ext <<EOF
1c18e77a 4281#line 4282 "configure"
53d3ce37
TT
4282#include "confdefs.h"
4283#include <$ac_hdr>
4284EOF
4285ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
4286{ (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4287ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
53d3ce37
TT
4288if test -z "$ac_err"; then
4289 rm -rf conftest*
4290 eval "ac_cv_header_$ac_safe=yes"
4291else
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"
4297fi
4298rm -f conftest*
4299fi
4300if 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
4305EOF
4306
4307else
4308 echo "$ac_t""no" 1>&6
4309fi
4310done
4311
4312echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1c18e77a 4313echo "configure:4314: checking whether time.h and sys/time.h may both be included" >&5
53d3ce37
TT
4314if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4315 echo $ac_n "(cached) $ac_c" 1>&6
4316else
4317 cat > conftest.$ac_ext <<EOF
1c18e77a 4318#line 4319 "configure"
53d3ce37
TT
4319#include "confdefs.h"
4320#include <sys/types.h>
4321#include <sys/time.h>
4322#include <time.h>
4323int main() {
4324struct tm *tp;
4325; return 0; }
4326EOF
1c18e77a 4327if { (eval echo configure:4328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
53d3ce37
TT
4328 rm -rf conftest*
4329 ac_cv_header_time=yes
4330else
4331 echo "configure: failed program was:" >&5
4332 cat conftest.$ac_ext >&5
4333 rm -rf conftest*
4334 ac_cv_header_time=no
4335fi
4336rm -f conftest*
4337fi
4338
4339echo "$ac_t""$ac_cv_header_time" 1>&6
4340if test $ac_cv_header_time = yes; then
4341 cat >> confdefs.h <<\EOF
4342#define TIME_WITH_SYS_TIME 1
4343EOF
4344
4345fi
4346
4347for ac_func in fcntl getpagesize setitimer sysconf fdopen
4348do
4349echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 4350echo "configure:4351: checking for $ac_func" >&5
53d3ce37
TT
4351if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4352 echo $ac_n "(cached) $ac_c" 1>&6
4353else
4354 cat > conftest.$ac_ext <<EOF
1c18e77a 4355#line 4356 "configure"
53d3ce37
TT
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. */
4363char $ac_func();
4364
4365int 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)
4371choke me
4372#else
4373$ac_func();
4374#endif
4375
4376; return 0; }
4377EOF
1c18e77a 4378if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53d3ce37
TT
4379 rm -rf conftest*
4380 eval "ac_cv_func_$ac_func=yes"
4381else
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"
4386fi
4387rm -f conftest*
4388fi
4389
4390if 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
4395EOF
4396
4397else
4398 echo "$ac_t""no" 1>&6
4399fi
4400done
4401
4402
4403
4404case "${host}" in
4405i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
4406 cat >> confdefs.h <<\EOF
4407#define USE_BINARY_FOPEN 1
4408EOF
4409 ;;
4410esac
4411
4412echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
1c18e77a 4413echo "configure:4414: checking whether strstr must be declared" >&5
53d3ce37
TT
4414if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416else
4417 cat > conftest.$ac_ext <<EOF
1c18e77a 4418#line 4419 "configure"
53d3ce37
TT
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
4435int main() {
4436char *(*pfn) = (char *(*)) strstr
4437; return 0; }
4438EOF
1c18e77a 4439if { (eval echo configure:4440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
53d3ce37
TT
4440 rm -rf conftest*
4441 bfd_cv_decl_needed_strstr=no
4442else
4443 echo "configure: failed program was:" >&5
4444 cat conftest.$ac_ext >&5
4445 rm -rf conftest*
4446 bfd_cv_decl_needed_strstr=yes
4447fi
4448rm -f conftest*
4449fi
4450
4451echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4452if 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
4456EOF
4457
4458fi
4459
4460echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
1c18e77a 4461echo "configure:4462: checking whether malloc must be declared" >&5
53d3ce37
TT
4462if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4463 echo $ac_n "(cached) $ac_c" 1>&6
4464else
4465 cat > conftest.$ac_ext <<EOF
1c18e77a 4466#line 4467 "configure"
53d3ce37
TT
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
4483int main() {
4484char *(*pfn) = (char *(*)) malloc
4485; return 0; }
4486EOF
1c18e77a 4487if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
53d3ce37
TT
4488 rm -rf conftest*
4489 bfd_cv_decl_needed_malloc=no
4490else
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493 rm -rf conftest*
4494 bfd_cv_decl_needed_malloc=yes
b7577823
ILT
4495fi
4496rm -f conftest*
b7577823
ILT
4497fi
4498
4499echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4500if test $bfd_cv_decl_needed_malloc = yes; then
85e493f0
ILT
4501 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4502 cat >> confdefs.h <<EOF
4503#define $bfd_tr_decl 1
b7577823 4504EOF
f515fb2f 4505
2b79a104
ILT
4506fi
4507
f7954d86 4508echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
1c18e77a 4509echo "configure:4510: checking whether realloc must be declared" >&5
f7954d86
MM
4510if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512else
4513 cat > conftest.$ac_ext <<EOF
1c18e77a 4514#line 4515 "configure"
f7954d86
MM
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
ac388f2a 4531int main() {
f7954d86
MM
4532char *(*pfn) = (char *(*)) realloc
4533; return 0; }
4534EOF
1c18e77a 4535if { (eval echo configure:4536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f7954d86
MM
4536 rm -rf conftest*
4537 bfd_cv_decl_needed_realloc=no
4538else
ac388f2a
ILT
4539 echo "configure: failed program was:" >&5
4540 cat conftest.$ac_ext >&5
f7954d86
MM
4541 rm -rf conftest*
4542 bfd_cv_decl_needed_realloc=yes
4543fi
4544rm -f conftest*
f7954d86
MM
4545fi
4546
4547echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4548if 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
4552EOF
4553
4554fi
4555
b7577823 4556echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
1c18e77a 4557echo "configure:4558: checking whether free must be declared" >&5
b7577823
ILT
4558if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4560else
4561 cat > conftest.$ac_ext <<EOF
1c18e77a 4562#line 4563 "configure"
b7577823 4563#include "confdefs.h"
8c693660 4564
b7577823 4565#include <stdio.h>
f7954d86
MM
4566#ifdef HAVE_STRING_H
4567#include <string.h>
4568#else
4569#ifdef HAVE_STRINGS_H
4570#include <strings.h>
4571#endif
4572#endif
b7577823
ILT
4573#ifdef HAVE_STDLIB_H
4574#include <stdlib.h>
4575#endif
4576#ifdef HAVE_UNISTD_H
4577#include <unistd.h>
4578#endif
ac388f2a 4579int main() {
85e493f0 4580char *(*pfn) = (char *(*)) free
b7577823
ILT
4581; return 0; }
4582EOF
1c18e77a 4583if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
4584 rm -rf conftest*
4585 bfd_cv_decl_needed_free=no
4586else
ac388f2a
ILT
4587 echo "configure: failed program was:" >&5
4588 cat conftest.$ac_ext >&5
b7577823
ILT
4589 rm -rf conftest*
4590 bfd_cv_decl_needed_free=yes
4591fi
4592rm -f conftest*
b7577823
ILT
4593fi
4594
4595echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4596if test $bfd_cv_decl_needed_free = yes; then
85e493f0
ILT
4597 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4598 cat >> confdefs.h <<EOF
4599#define $bfd_tr_decl 1
b7577823
ILT
4600EOF
4601
4602fi
f515fb2f 4603
dee99794 4604echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
1c18e77a 4605echo "configure:4606: checking whether getenv must be declared" >&5
dee99794
ILT
4606if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4607 echo $ac_n "(cached) $ac_c" 1>&6
4608else
4609 cat > conftest.$ac_ext <<EOF
1c18e77a 4610#line 4611 "configure"
dee99794
ILT
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
ac388f2a 4627int main() {
dee99794
ILT
4628char *(*pfn) = (char *(*)) getenv
4629; return 0; }
4630EOF
1c18e77a 4631if { (eval echo configure:4632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
dee99794
ILT
4632 rm -rf conftest*
4633 bfd_cv_decl_needed_getenv=no
4634else
ac388f2a
ILT
4635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
dee99794
ILT
4637 rm -rf conftest*
4638 bfd_cv_decl_needed_getenv=yes
4639fi
4640rm -f conftest*
dee99794
ILT
4641fi
4642
4643echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4644if 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
4648EOF
4649
4650fi
4651
85e493f0 4652
a52a3ce8
ILT
4653# If we are configured native, pick a core file support file.
4654COREFILE=
4655COREFLAG=
4656if test "${target}" = "${host}"; then
4657 case "${host}" in
5303c574 4658 alpha*-*-linux-gnu*)
c0734708 4659 COREFILE=trad-core.lo
999cc186
ILT
4660 cat >> confdefs.h <<\EOF
4661#define TRAD_HEADER "hosts/alphalinux.h"
4662EOF
4663
4664 ;;
eee4e8ca 4665 alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
c0734708
ILT
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"
a52a3ce8 4671 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
f7954d86 4672 i[3456]86-sequent-bsd*)
c0734708 4673 COREFILE=trad-core.lo;
b7577823
ILT
4674 cat >> confdefs.h <<\EOF
4675#define TRAD_HEADER "hosts/symmetry.h"
4676EOF
4677
4678 ;;
f7954d86
MM
4679 i[3456]86-sequent-sysv4*) ;;
4680 i[3456]86-sequent-sysv*)
c0734708 4681 COREFILE=trad-core.lo
b7577823
ILT
4682 cat >> confdefs.h <<\EOF
4683#define TRAD_HEADER "hosts/symmetry.h"
4684EOF
4685
4686 ;;
f7954d86 4687 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
c0734708 4688 COREFILE=trad-core.lo
b7577823
ILT
4689 cat >> confdefs.h <<\EOF
4690#define TRAD_HEADER "hosts/i386bsd.h"
69a374c0
NH
4691EOF
4692
4693 ;;
3b1b0308 4694 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
c0734708 4695 COREFILE=netbsd-core.lo
b7577823 4696 ;;
f7954d86 4697 i[3456]86-esix-sysv3*)
c0734708 4698 COREFILE=trad-core.lo
b7577823
ILT
4699 cat >> confdefs.h <<\EOF
4700#define TRAD_HEADER "hosts/esix.h"
4701EOF
4702
4703 ;;
f7954d86 4704 i[3456]86-*-sco* | i[3456]86-*-isc*)
c0734708 4705 COREFILE=trad-core.lo
b7577823
ILT
4706 cat >> confdefs.h <<\EOF
4707#define TRAD_HEADER "hosts/i386sco.h"
4708EOF
4709
4710 ;;
f7954d86 4711 i[3456]86-*-mach3*)
c0734708 4712 COREFILE=trad-core.lo
b7577823
ILT
4713 cat >> confdefs.h <<\EOF
4714#define TRAD_HEADER "hosts/i386mach3.h"
4715EOF
4716
4717 ;;
5303c574 4718 i[3456]86-*-linux-gnu*)
c0734708 4719 COREFILE=trad-core.lo
b7577823
ILT
4720 cat >> confdefs.h <<\EOF
4721#define TRAD_HEADER "hosts/i386linux.h"
4722EOF
4723
4724 ;;
c0734708
ILT
4725 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
4726 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
cf587de8 4727 i860-*-mach3* | i860-*-osf1*)
c0734708 4728 COREFILE=trad-core.lo
cf587de8
ILT
4729 cat >> confdefs.h <<\EOF
4730#define TRAD_HEADER "hosts/i860mach3.h"
4731EOF
4732
4733 ;;
b7577823 4734 mips-dec-bsd*)
c0734708 4735 COREFILE=trad-core.lo
b7577823
ILT
4736 cat >> confdefs.h <<\EOF
4737#define TRAD_HEADER "hosts/mipsbsd.h"
4738EOF
4739
4740 ;;
4741 mips-dec-mach3*)
c0734708 4742 COREFILE=trad-core.lo
b7577823
ILT
4743 cat >> confdefs.h <<\EOF
4744#define TRAD_HEADER "hosts/mipsmach3.h"
4745EOF
4746
4747 ;;
3b1b0308 4748 mips-*-netbsd* | mips*-*-openbsd*)
c0734708 4749 COREFILE=netbsd-core.lo
69a374c0 4750 ;;
b7577823 4751 mips-dec-*)
c0734708 4752 COREFILE=trad-core.lo
b7577823
ILT
4753 cat >> confdefs.h <<\EOF
4754#define TRAD_HEADER "hosts/decstation.h"
4755EOF
4756
4757 ;;
c0734708
ILT
4758 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
4759 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
4760 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
b7577823 4761 mips-*-mach3*)
c0734708 4762 COREFILE=trad-core.lo
b7577823
ILT
4763 cat >> confdefs.h <<\EOF
4764#define TRAD_HEADER "hosts/mipsmach3.h"
4765EOF
4766
4767 ;;
a52a3ce8 4768 mips-*-sysv4*) ;;
b7577823 4769 mips-*-sysv* | mips-*-riscos*)
c0734708 4770 COREFILE=trad-core.lo
b7577823
ILT
4771 cat >> confdefs.h <<\EOF
4772#define TRAD_HEADER "hosts/riscos.h"
4773EOF
4774
4775 ;;
4776 mips-sony-bsd*)
c0734708 4777 COREFILE=trad-core.lo
b7577823 4778 cat >> confdefs.h <<\EOF
ab1aa5cd 4779#define TRAD_HEADER "hosts/news-mips.h"
b7577823
ILT
4780EOF
4781
4782 ;;
4783 m68*-bull*-sysv*)
c0734708 4784 COREFILE=trad-core.lo
b7577823
ILT
4785 cat >> confdefs.h <<\EOF
4786#define TRAD_HEADER "hosts/dpx2.h"
4787EOF
4788
4789 ;;
c0734708 4790 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
b7577823 4791 m68*-hp-bsd*)
c0734708 4792 COREFILE=trad-core.lo
b7577823
ILT
4793 cat >> confdefs.h <<\EOF
4794#define TRAD_HEADER "hosts/hp300bsd.h"
55626bf0
ILT
4795EOF
4796
4797 ;;
5303c574 4798 m68*-*-linux-gnu*)
c0734708 4799 COREFILE=trad-core.lo
55626bf0
ILT
4800 cat >> confdefs.h <<\EOF
4801#define TRAD_HEADER "hosts/m68klinux.h"
7f82c7e1
ILT
4802EOF
4803
4804 ;;
4c8b9746 4805 m68*-motorola-sysv*)
c0734708 4806 COREFILE=trad-core.lo
7f82c7e1
ILT
4807 cat >> confdefs.h <<\EOF
4808#define TRAD_HEADER "hosts/delta68.h"
b7577823
ILT
4809EOF
4810
4811 ;;
b7577823 4812 m68*-sony-*)
c0734708 4813 COREFILE=trad-core.lo
b7577823
ILT
4814 cat >> confdefs.h <<\EOF
4815#define TRAD_HEADER "hosts/news.h"
69a374c0
NH
4816EOF
4817
4818 ;;
3b1b0308 4819 m68*-*-netbsd* | m68*-*-openbsd*)
c0734708 4820 COREFILE=netbsd-core.lo
d19df9b5
ILT
4821 ;;
4822 m68*-apple-aux*)
c0734708 4823 COREFILE=trad-core.lo
d19df9b5
ILT
4824 cat >> confdefs.h <<\EOF
4825#define TRAD_HEADER "hosts/m68kaux.h"
b7577823
ILT
4826EOF
4827
4828 ;;
a52a3ce8 4829 m88*-*-sysv4*) ;;
c0734708 4830 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
b7577823 4831 m88*-*-mach3*)
c0734708 4832 COREFILE=trad-core.lo
b7577823
ILT
4833 cat >> confdefs.h <<\EOF
4834#define TRAD_HEADER "hosts/m88kmach3.h"
4835EOF
4836
4837 ;;
4838 ns32k-pc532-mach)
c0734708 4839 COREFILE=trad-core.lo
b7577823
ILT
4840 cat >> confdefs.h <<\EOF
4841#define TRAD_HEADER "hosts/pc532mach.h"
69a374c0
NH
4842EOF
4843
4844 ;;
3b1b0308 4845 ns32k-*-netbsd* | ns32k-*-openbsd*)
c0734708 4846 COREFILE=netbsd-core.lo
b7577823 4847 ;;
c0734708
ILT
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 ;;
ac388f2a 4854 powerpc-*-beos*) ;;
eee4e8ca 4855 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
3b1b0308 4856 sparc-*-netbsd* | sparc-*-openbsd*)
c0734708 4857 COREFILE=netbsd-core.lo
69a374c0 4858 ;;
b7577823 4859 tahoe-*-*)
c0734708 4860 COREFILE=trad-core.lo
b7577823
ILT
4861 cat >> confdefs.h <<\EOF
4862#define TRAD_HEADER "hosts/tahoe.h"
4863EOF
4864
4865 ;;
4866 vax-*-ultrix2*)
c0734708 4867 COREFILE=trad-core.lo
b7577823
ILT
4868 cat >> confdefs.h <<\EOF
4869#define TRAD_HEADER "hosts/vaxult2.h"
4870EOF
4871
4872 ;;
4873 vax-*-ultrix*)
c0734708 4874 COREFILE=trad-core.lo
b7577823
ILT
4875 cat >> confdefs.h <<\EOF
4876#define TRAD_HEADER "hosts/vaxult2.h"
4877EOF
4878
4879 ;;
4880 vax-*-*)
c0734708 4881 COREFILE=trad-core.lo
b7577823
ILT
4882 cat >> confdefs.h <<\EOF
4883#define TRAD_HEADER "hosts/vaxbsd.h"
4884EOF
4885
4886 ;;
a52a3ce8
ILT
4887 esac
4888
4889 case "$COREFILE" in
c0734708
ILT
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 ;;
eee4e8ca 4895 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
c0734708
ILT
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" ;;
a52a3ce8 4900 esac
1dff7902 4901
1c18e77a
GN
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
4905do
4906ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4907echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4908echo "configure:4909: checking for $ac_hdr" >&5
4909if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4911else
4912 cat > conftest.$ac_ext <<EOF
4913#line 4914 "configure"
4914#include "confdefs.h"
4915#include <$ac_hdr>
4916EOF
4917ac_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; }
4919ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4920if test -z "$ac_err"; then
4921 rm -rf conftest*
4922 eval "ac_cv_header_$ac_safe=yes"
4923else
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"
4929fi
4930rm -f conftest*
4931fi
4932if 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
4937EOF
4938
4939else
4940 echo "$ac_t""no" 1>&6
4941fi
4942done
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
4946echo "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
1dff7902
ILT
4948 echo $ac_n "(cached) $ac_c" 1>&6
4949else
4950 cat > conftest.$ac_ext <<EOF
1c18e77a 4951#line 4952 "configure"
1dff7902
ILT
4952#include "confdefs.h"
4953#include <sys/procfs.h>
ac388f2a 4954int main() {
1c18e77a 4955prstatus_t avar
1dff7902
ILT
4956; return 0; }
4957EOF
1c18e77a 4958if { (eval echo configure:4959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1dff7902 4959 rm -rf conftest*
1c18e77a
GN
4960 bfd_cv_have_sys_procfs_type_prstatus_t=yes
4961 cat >> confdefs.h <<\EOF
4962#define HAVE_PRSTATUS_T 1
4963EOF
4964
1dff7902 4965else
ac388f2a
ILT
4966 echo "configure: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
1dff7902 4968 rm -rf conftest*
1c18e77a
GN
4969 bfd_cv_have_sys_procfs_type_prstatus_t=no
4970
1dff7902
ILT
4971fi
4972rm -f conftest*
1dff7902
ILT
4973fi
4974
1c18e77a
GN
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
4978echo "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
4981else
4982 cat > conftest.$ac_ext <<EOF
4983#line 4984 "configure"
4984#include "confdefs.h"
4985#include <sys/procfs.h>
4986int main() {
4987prstatus_t avar; void* aref = (void*) &avar.pr_who
4988; return 0; }
4989EOF
4990if { (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
1dff7902
ILT
4995EOF
4996
1c18e77a
GN
4997else
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
5003fi
5004rm -f conftest*
5005fi
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
5010echo "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
5013else
5014 cat > conftest.$ac_ext <<EOF
5015#line 5016 "configure"
5016#include "confdefs.h"
5017#include <sys/procfs.h>
5018int main() {
5019pstatus_t avar
5020; return 0; }
5021EOF
5022if { (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
5027EOF
5028
5029else
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
5035fi
5036rm -f conftest*
5037fi
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
5042echo "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
5045else
5046 cat > conftest.$ac_ext <<EOF
5047#line 5048 "configure"
5048#include "confdefs.h"
5049#include <sys/procfs.h>
5050int main() {
5051prpsinfo_t avar
5052; return 0; }
5053EOF
5054if { (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
5059EOF
5060
5061else
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
5067fi
5068rm -f conftest*
5069fi
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
5074echo "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
5077else
5078 cat > conftest.$ac_ext <<EOF
5079#line 5080 "configure"
5080#include "confdefs.h"
5081#include <sys/procfs.h>
5082int main() {
5083psinfo_t avar
5084; return 0; }
5085EOF
5086if { (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
5091EOF
5092
5093else
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
5099fi
5100rm -f conftest*
5101fi
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
5106echo "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
5109else
5110 cat > conftest.$ac_ext <<EOF
5111#line 5112 "configure"
5112#include "confdefs.h"
5113#include <sys/procfs.h>
5114int main() {
5115lwpstatus_t avar
5116; return 0; }
5117EOF
5118if { (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
5123EOF
5124
5125else
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
5131fi
5132rm -f conftest*
5133fi
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
5138echo "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
5141else
5142 cat > conftest.$ac_ext <<EOF
5143#line 5144 "configure"
5144#include "confdefs.h"
5145#include <sys/procfs.h>
5146int main() {
5147lwpstatus_t avar; void* aref = (void*) &avar.pr_context
5148; return 0; }
5149EOF
5150if { (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
5155EOF
5156
5157else
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
5163fi
5164rm -f conftest*
5165fi
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
5170echo "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
5173else
5174 cat > conftest.$ac_ext <<EOF
5175#line 5176 "configure"
5176#include "confdefs.h"
5177#include <sys/procfs.h>
5178int main() {
5179lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
5180; return 0; }
5181EOF
5182if { (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
5187EOF
5188
5189else
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
5195fi
5196rm -f conftest*
5197fi
5198
5199 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
1dff7902 5200
1c18e77a 5201 fi
a52a3ce8
ILT
5202fi
5203
5204
5205
5a83fcdd
ILT
5206# Horrible hacks to build DLLs on Windows.
5207WIN32LDFLAGS=
5208WIN32LIBADD=
5209case "${host}" in
1c18e77a 5210*-*-cygwin*)
5a83fcdd
ILT
5211 if test "$enable_shared" = "yes"; then
5212 WIN32LDFLAGS="-no-undefined"
1c18e77a 5213 WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
5a83fcdd
ILT
5214 fi
5215 ;;
5216esac
5217
5218
5219
8c693660
KR
5220# target stuff:
5221
5222# Canonicalize the secondary target names.
5223if test -n "$enable_targets" ; then
5224 for targ in `echo $enable_targets | sed 's/,/ /g'`
5225 do
60f1ad85 5226 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
8c693660
KR
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
5234fi
5235
5236all_targets=false
2b79a104
ILT
5237defvec=
5238selvecs=
5239selarchs=
5240TDEFINES=
8c693660
KR
5241for targ in $target $canon_targets
5242do
2b79a104 5243 if test "x$targ" = "xall"; then
8c693660
KR
5244 all_targets=true
5245 else
2b79a104
ILT
5246 . $srcdir/config.bfd
5247 if test "x$targ" = "x$target"; then
5248 defvec=$targ_defvec
8c693660 5249 fi
2b79a104
ILT
5250 selvecs="$selvecs $targ_defvec $targ_selvecs"
5251 selarchs="$selarchs $targ_archs"
5252 TDEFINES="$TDEFINES $targ_cflags"
8c693660
KR
5253 fi
5254done
5255
8c693660
KR
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
2b79a104 5264# uniq the default and selected vectors in all the configured targets.
8c693660 5265f=""
2b79a104 5266for i in $selvecs ; do
8c693660
KR
5267 case " $f " in
5268 *" $i "*) ;;
5269 *) f="$f $i" ;;
5270 esac
5271done
2b79a104 5272selvecs="$f"
8c693660 5273
36df40e0
DE
5274# start-sanitize-sky
5275# dvp is really mips, but we need to distinguish it from mips for opcodes
5276selarchs=`echo $selarchs | sed -e s/dvp/mips/g`
5277# end-sanitize-sky
5278
2b79a104 5279# uniq the architectures in all the configured targets.
8c693660 5280f=""
2b79a104 5281for i in $selarchs ; do
8c693660
KR
5282 case " $f " in
5283 *" $i "*) ;;
5284 *) f="$f $i" ;;
5285 esac
5286done
2b79a104 5287selarchs="$f"
8c693660
KR
5288
5289# Target backend .o files.
5290tb=
5291
1c18e77a 5292elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo"
a52a3ce8 5293
2b79a104 5294for vec in $selvecs
8c693660
KR
5295do
5296 case "$vec" in
5297 # This list is alphabetized to make it easy to compare
5298 # with the two vector lists in targets.c.
c0734708
ILT
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 " ;;
5a83fcdd
ILT
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 " ;;
c0734708
ILT
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"
50bd50d4 5316 target64=true ;;
c0734708 5317 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
1c18e77a 5318 bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;;
c0734708 5319 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
1c18e77a 5320 bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;;
c0734708
ILT
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"
d1bf45aa 5324 target64=true ;;
c0734708 5325 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
c0734708 5326 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
c0734708
ILT
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"
d1bf45aa 5333 target64=true ;;
c0734708
ILT
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" ;;
c0734708 5344 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
c0734708 5345 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 5346 target64=true ;;
c0734708 5347 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 5348 target64=true ;;
c0734708 5349 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
8c693660 5350 target64=true ;;
c0734708
ILT
5351 cisco_core_vec) tb="$tb cisco-core.lo" ;;
5352 demo_64_vec) tb="$tb demo64.lo aout64.lo"
8c693660 5353 target64=true ;;
c0734708
ILT
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"
8c693660 5358 target64=true ;;
c0734708 5359 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
70e8e585 5360 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
c0734708 5361 evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
50bd50d4 5362 target64=true ;;
c0734708
ILT
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"
8c693660 5400 target64=true ;;
c0734708
ILT
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" ;;
18ed85fd
ILT
5414 shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
5415 shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
c0734708
ILT
5416 som_vec) tb="$tb som.lo" ;;
5417 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
eee4e8ca 5418 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
c0734708
ILT
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" ;;
229811d1
JM
5427 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
5428 tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
cd6213ff 5429# start-sanitize-tic80
c0734708 5430 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
cd6213ff 5431# end-sanitize-tic80
c0734708
ILT
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" ;;
8c693660
KR
5436
5437 "") ;;
5438 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
5439 esac
5440done
5441
5442# Target architecture .o files.
b872076e
ILT
5443# A couple of CPUs use shorter file names to avoid problems on DOS
5444# filesystems.
c0734708 5445ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
8c693660
KR
5446
5447# Weed out duplicate .o files.
5448f=""
5449for i in $tb ; do
5450 case " $f " in
5451 *" $i "*) ;;
5452 *) f="$f $i" ;;
5453 esac
5454done
5455tb="$f"
5456
5457f=""
5458for i in $ta ; do
5459 case " $f " in
5460 *" $i "*) ;;
5461 *) f="$f $i" ;;
5462 esac
5463done
5464ta="$f"
5465
5466bfd_backends="$tb"
5467bfd_machines="$ta"
5468
5469if test x${all_targets} = xtrue ; then
5470 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
5471 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
2b79a104 5472 selvecs=
dee99794 5473 havevecs=
2b79a104 5474 selarchs=
8c693660
KR
5475else # all_targets is true
5476 # Only set these if they will be nonempty, for the clever echo.
dee99794
ILT
5477 havevecs=
5478 test -n "$selvecs" &&
5479 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
2b79a104
ILT
5480 test -n "$selvecs" &&
5481 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
5482 test -n "$selarchs" &&
2ffbb79a 5483 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
8c693660
KR
5484fi # all_targets is true
5485
5486case ${host64}-${target64}-${want64} in
5487 *true*)
5488 wordsize=64
5489 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
194141a9 5490 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
50bd50d4
MH
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
8c693660
KR
5494 ;;
5495 false-false-false)
5496 wordsize=32
5497 all_backends='$(BFD32_BACKENDS)'
5498 ;;
5499esac
5500
5501
5502
5503
5504
5505
8c693660
KR
5506tdefaults=""
5507test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
5508test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
5509test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
dee99794 5510test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
8c693660
KR
5511
5512
ac388f2a
ILT
5513for ac_hdr in unistd.h
5514do
5515ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5516echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1c18e77a 5517echo "configure:5518: checking for $ac_hdr" >&5
ac388f2a 5518if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
dfc7020d
ILT
5519 echo $ac_n "(cached) $ac_c" 1>&6
5520else
ac388f2a 5521 cat > conftest.$ac_ext <<EOF
1c18e77a 5522#line 5523 "configure"
dfc7020d 5523#include "confdefs.h"
ac388f2a 5524#include <$ac_hdr>
dfc7020d 5525EOF
ac388f2a 5526ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1c18e77a
GN
5527{ (eval echo configure:5528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5528ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ac388f2a
ILT
5529if test -z "$ac_err"; then
5530 rm -rf conftest*
5531 eval "ac_cv_header_$ac_safe=yes"
dfc7020d 5532else
ac388f2a
ILT
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"
dfc7020d 5538fi
ac388f2a 5539rm -f conftest*
dfc7020d 5540fi
ac388f2a
ILT
5541if 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
5546EOF
5547
5548else
5549 echo "$ac_t""no" 1>&6
dfc7020d 5550fi
ac388f2a 5551done
dfc7020d 5552
ac388f2a 5553for ac_func in getpagesize
d19df9b5
ILT
5554do
5555echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 5556echo "configure:5557: checking for $ac_func" >&5
d19df9b5
ILT
5557if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5558 echo $ac_n "(cached) $ac_c" 1>&6
5559else
5560 cat > conftest.$ac_ext <<EOF
1c18e77a 5561#line 5562 "configure"
d19df9b5
ILT
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. */
a4322a77
ILT
5567/* We use char because int might match the return type of a gcc2
5568 builtin and then its argument prototype would still apply. */
d19df9b5
ILT
5569char $ac_func();
5570
ac388f2a 5571int main() {
d19df9b5
ILT
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)
5577choke me
5578#else
5579$ac_func();
5580#endif
5581
5582; return 0; }
5583EOF
1c18e77a 5584if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d19df9b5
ILT
5585 rm -rf conftest*
5586 eval "ac_cv_func_$ac_func=yes"
5587else
ac388f2a
ILT
5588 echo "configure: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
d19df9b5
ILT
5590 rm -rf conftest*
5591 eval "ac_cv_func_$ac_func=no"
5592fi
5593rm -f conftest*
fd8d7c31 5594fi
ac388f2a 5595
d19df9b5
ILT
5596if 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
5601EOF
5602
5603else
5604 echo "$ac_t""no" 1>&6
5605fi
5606done
5607
4fe6d901 5608echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1c18e77a 5609echo "configure:5610: checking for working mmap" >&5
ac388f2a 5610if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4fe6d901
KR
5611 echo $ac_n "(cached) $ac_c" 1>&6
5612else
5613 if test "$cross_compiling" = yes; then
ac388f2a 5614 ac_cv_func_mmap_fixed_mapped=no
4fe6d901 5615else
ac388f2a 5616 cat > conftest.$ac_ext <<EOF
1c18e77a 5617#line 5618 "configure"
4fe6d901
KR
5618#include "confdefs.h"
5619
ac388f2a
ILT
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) */
4fe6d901
KR
5641#include <sys/types.h>
5642#include <fcntl.h>
5643#include <sys/mman.h>
5644
ac388f2a 5645/* This mess was copied from the GNU getpagesize.h. */
4fe6d901 5646#ifndef HAVE_GETPAGESIZE
ac388f2a
ILT
5647# ifdef HAVE_UNISTD_H
5648# include <unistd.h>
dfc7020d
ILT
5649# endif
5650
ac388f2a
ILT
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 */
4fe6d901
KR
5685
5686#ifdef __cplusplus
ac388f2a 5687extern "C" { void *malloc(unsigned); }
4fe6d901 5688#else
ac388f2a 5689char *malloc();
4fe6d901
KR
5690#endif
5691
5692int
5693main()
5694{
ac388f2a
ILT
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);
4fe6d901
KR
5754}
5755
5756EOF
1c18e77a 5757if { (eval echo configure:5758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ac388f2a
ILT
5758then
5759 ac_cv_func_mmap_fixed_mapped=yes
4fe6d901 5760else
ac388f2a
ILT
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
4fe6d901 5765fi
fd8d7c31 5766rm -fr conftest*
dfc7020d
ILT
5767fi
5768
ac388f2a
ILT
5769fi
5770
5771echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5772if test $ac_cv_func_mmap_fixed_mapped = yes; then
4fe6d901
KR
5773 cat >> confdefs.h <<\EOF
5774#define HAVE_MMAP 1
5775EOF
5776
5777fi
5778
5779for ac_func in madvise mprotect
5780do
5781echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1c18e77a 5782echo "configure:5783: checking for $ac_func" >&5
4fe6d901
KR
5783if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5784 echo $ac_n "(cached) $ac_c" 1>&6
5785else
5786 cat > conftest.$ac_ext <<EOF
1c18e77a 5787#line 5788 "configure"
4fe6d901
KR
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. */
a4322a77
ILT
5793/* We use char because int might match the return type of a gcc2
5794 builtin and then its argument prototype would still apply. */
85e493f0 5795char $ac_func();
4fe6d901 5796
ac388f2a 5797int main() {
4fe6d901
KR
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)
5803choke me
5804#else
5805$ac_func();
5806#endif
5807
5808; return 0; }
5809EOF
1c18e77a 5810if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4fe6d901
KR
5811 rm -rf conftest*
5812 eval "ac_cv_func_$ac_func=yes"
5813else
ac388f2a
ILT
5814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
4fe6d901
KR
5816 rm -rf conftest*
5817 eval "ac_cv_func_$ac_func=no"
5818fi
5819rm -f conftest*
fd8d7c31 5820fi
ac388f2a 5821
4fe6d901
KR
5822if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5823 echo "$ac_t""yes" 1>&6
85e493f0 5824 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4fe6d901
KR
5825 cat >> confdefs.h <<EOF
5826#define $ac_tr_func 1
5827EOF
5828
5829else
5830 echo "$ac_t""no" 1>&6
5831fi
5832done
5833
fd8d7c31 5834case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
85e493f0
ILT
5835 true+yes ) cat >> confdefs.h <<\EOF
5836#define USE_MMAP 1
5837EOF
5838 ;;
5839esac
4fe6d901 5840
8c693660
KR
5841rm -f doc/config.status
5842trap '' 1 2 15
5843cat > 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#
5858EOF
ac388f2a
ILT
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.
8c693660
KR
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 |
1c18e77a 5865 case `(ac_space=' '; set | grep ac_space) 2>&1` in
ac388f2a
ILT
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
8c693660
KR
5878if cmp -s $cache_file confcache; then
5879 :
5880else
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
5887fi
5888rm -f confcache
5889
5890trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5891
5892test "x$prefix" = xNONE && prefix=$ac_default_prefix
5893# Let make expand exec_prefix.
5894test "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.
5899if test "x$srcdir" = x.; then
5900 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5901fi
5902
5903trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5904
b7577823 5905DEFS=-DHAVE_CONFIG_H
8c693660
KR
5906
5907# Without the "./", some shells look in PATH for config.status.
5908: ${CONFIG_STATUS=./config.status}
5909
5910echo creating $CONFIG_STATUS
5911rm -f $CONFIG_STATUS
5912cat > $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
5924ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5925for ac_option
5926do
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)
1c18e77a 5932 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
8c693660
KR
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
5938done
5939
5940ac_given_srcdir=$srcdir
f515fb2f 5941ac_given_INSTALL="$INSTALL"
8c693660 5942
53d3ce37 5943trap '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
d19df9b5
ILT
5944EOF
5945cat >> $CONFIG_STATUS <<EOF
8c693660 5946
85e493f0 5947# Protect against being on the right side of a sed subst in config.status.
d19df9b5
ILT
5948sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5949 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8c693660
KR
5950$ac_vpsub
5951$extrasub
372b296c 5952s%@SHELL@%$SHELL%g
8c693660
KR
5953s%@CFLAGS@%$CFLAGS%g
5954s%@CPPFLAGS@%$CPPFLAGS%g
5955s%@CXXFLAGS@%$CXXFLAGS%g
1c18e77a 5956s%@FFLAGS@%$FFLAGS%g
8c693660
KR
5957s%@DEFS@%$DEFS%g
5958s%@LDFLAGS@%$LDFLAGS%g
5959s%@LIBS@%$LIBS%g
5960s%@exec_prefix@%$exec_prefix%g
5961s%@prefix@%$prefix%g
5962s%@program_transform_name@%$program_transform_name%g
85e493f0
ILT
5963s%@bindir@%$bindir%g
5964s%@sbindir@%$sbindir%g
5965s%@libexecdir@%$libexecdir%g
5966s%@datadir@%$datadir%g
5967s%@sysconfdir@%$sysconfdir%g
5968s%@sharedstatedir@%$sharedstatedir%g
5969s%@localstatedir@%$localstatedir%g
5970s%@libdir@%$libdir%g
5971s%@includedir@%$includedir%g
5972s%@oldincludedir@%$oldincludedir%g
5973s%@infodir@%$infodir%g
5974s%@mandir@%$mandir%g
8c693660
KR
5975s%@host@%$host%g
5976s%@host_alias@%$host_alias%g
5977s%@host_cpu@%$host_cpu%g
5978s%@host_vendor@%$host_vendor%g
5979s%@host_os@%$host_os%g
5980s%@target@%$target%g
5981s%@target_alias@%$target_alias%g
5982s%@target_cpu@%$target_cpu%g
5983s%@target_vendor@%$target_vendor%g
5984s%@target_os@%$target_os%g
5985s%@build@%$build%g
5986s%@build_alias@%$build_alias%g
5987s%@build_cpu@%$build_cpu%g
5988s%@build_vendor@%$build_vendor%g
5989s%@build_os@%$build_os%g
f515fb2f 5990s%@CC@%$CC%g
f515fb2f 5991s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
c0734708 5992s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1c18e77a 5993s%@INSTALL_DATA@%$INSTALL_DATA%g
c0734708 5994s%@PACKAGE@%$PACKAGE%g
f4e14cb9 5995s%@VERSION@%$VERSION%g
c0734708
ILT
5996s%@ACLOCAL@%$ACLOCAL%g
5997s%@AUTOCONF@%$AUTOCONF%g
5998s%@AUTOMAKE@%$AUTOMAKE%g
5999s%@AUTOHEADER@%$AUTOHEADER%g
6000s%@MAKEINFO@%$MAKEINFO%g
6001s%@SET_MAKE@%$SET_MAKE%g
7810074c 6002s%@AR@%$AR%g
c0734708
ILT
6003s%@RANLIB@%$RANLIB%g
6004s%@LD@%$LD%g
9a837903 6005s%@NM@%$NM%g
c0734708
ILT
6006s%@LN_S@%$LN_S%g
6007s%@LIBTOOL@%$LIBTOOL%g
5a83fcdd
ILT
6008s%@DLLTOOL@%$DLLTOOL%g
6009s%@AS@%$AS%g
c0734708
ILT
6010s%@MAINT@%$MAINT%g
6011s%@EXEEXT@%$EXEEXT%g
53d3ce37
TT
6012s%@CPP@%$CPP%g
6013s%@ALLOCA@%$ALLOCA%g
6014s%@USE_NLS@%$USE_NLS%g
6015s%@MSGFMT@%$MSGFMT%g
6016s%@GMSGFMT@%$GMSGFMT%g
6017s%@XGETTEXT@%$XGETTEXT%g
6018s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6019s%@CATALOGS@%$CATALOGS%g
6020s%@CATOBJEXT@%$CATOBJEXT%g
6021s%@DATADIRNAME@%$DATADIRNAME%g
6022s%@GMOFILES@%$GMOFILES%g
6023s%@INSTOBJEXT@%$INSTOBJEXT%g
6024s%@INTLDEPS@%$INTLDEPS%g
6025s%@INTLLIBS@%$INTLLIBS%g
6026s%@INTLOBJS@%$INTLOBJS%g
6027s%@POFILES@%$POFILES%g
6028s%@POSUB@%$POSUB%g
6029s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6030s%@GT_NO@%$GT_NO%g
6031s%@GT_YES@%$GT_YES%g
6032s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6033s%@l@%$l%g
c0734708 6034s%@HDEFINES@%$HDEFINES%g
f4e14cb9
ILT
6035s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
6036s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
6037s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
6038s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
f515fb2f 6039s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2c66160c 6040s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
a52a3ce8
ILT
6041s%@COREFILE@%$COREFILE%g
6042s%@COREFLAG@%$COREFLAG%g
5a83fcdd
ILT
6043s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
6044s%@WIN32LIBADD@%$WIN32LIBADD%g
2b79a104 6045s%@TDEFINES@%$TDEFINES%g
8c693660
KR
6046s%@wordsize@%$wordsize%g
6047s%@all_backends@%$all_backends%g
6048s%@bfd_backends@%$bfd_backends%g
6049s%@bfd_machines@%$bfd_machines%g
6050s%@tdefaults@%$tdefaults%g
6051
6052CEOF
6053EOF
ac388f2a
ILT
6054
6055cat >> $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.
6059ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6060ac_file=1 # Number of current file.
6061ac_beg=1 # First line for current file.
6062ac_end=$ac_max_sed_cmds # Line after last line for current file.
6063ac_more_lines=:
6064ac_sed_cmds=""
6065while $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
6084done
6085if test -z "$ac_sed_cmds"; then
6086 ac_sed_cmds=cat
6087fi
6088EOF
6089
8c693660
KR
6090cat >> $CONFIG_STATUS <<EOF
6091
53d3ce37 6092CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
8c693660
KR
6093EOF
6094cat >> $CONFIG_STATUS <<\EOF
6095for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
ac388f2a 6096 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8c693660 6097 case "$ac_file" in
ac388f2a 6098 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8c693660
KR
6099 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6100 *) ac_file_in="${ac_file}.in" ;;
6101 esac
6102
ac388f2a 6103 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8c693660
KR
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
f515fb2f
ILT
6127 case "$ac_given_INSTALL" in
6128 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6129 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6130 esac
ac388f2a 6131
8c693660
KR
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
ac388f2a 6140
c0734708 6141 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8c693660
KR
6142 sed -e "$ac_comsub
6143s%@configure_input@%$configure_input%g
6144s%@srcdir@%$srcdir%g
6145s%@top_srcdir@%$top_srcdir%g
f515fb2f 6146s%@INSTALL@%$INSTALL%g
ac388f2a 6147" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8c693660 6148fi; done
ac388f2a 6149rm -f conftest.s*
8c693660 6150
b7577823
ILT
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.
6155ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6156ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6157ac_dC='\3'
6158ac_dD='%g'
6159# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6160ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6161ac_uB='\([ ]\)%\1#\2define\3'
6162ac_uC=' '
6163ac_uD='\4%g'
6164# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6165ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6166ac_eB='$%\1#\2define\3'
6167ac_eC=' '
6168ac_eD='%g'
6169
ac388f2a
ILT
6170if test "${CONFIG_HEADERS+set}" != set; then
6171EOF
6172cat >> $CONFIG_STATUS <<EOF
6173 CONFIG_HEADERS="config.h:config.in"
6174EOF
6175cat >> $CONFIG_STATUS <<\EOF
6176fi
b7577823 6177for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
ac388f2a 6178 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b7577823 6179 case "$ac_file" in
ac388f2a 6180 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b7577823
ILT
6181 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6182 *) ac_file_in="${ac_file}.in" ;;
6183 esac
8c693660 6184
b7577823 6185 echo creating $ac_file
8c693660 6186
b7577823 6187 rm -f conftest.frag conftest.in conftest.out
c0734708 6188 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ac388f2a 6189 cat $ac_file_inputs > conftest.in
8c693660 6190
b7577823 6191EOF
8c693660 6192
b7577823
ILT
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:
85e493f0 6195# Protect against being on the right side of a sed subst in config.status.
b7577823
ILT
6196# Protect against being in an unquoted here document in config.status.
6197rm -f conftest.vals
6198cat > conftest.hdr <<\EOF
6199s/[\\&%]/\\&/g
6200s%[\\$`]%\\&%g
a4322a77 6201s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b7577823
ILT
6202s%ac_d%ac_u%gp
6203s%ac_u%ac_e%gp
6204EOF
6205sed -n -f conftest.hdr confdefs.h > conftest.vals
6206rm -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.
6211cat >> conftest.vals <<\EOF
6212s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6213EOF
8c693660 6214
b7577823
ILT
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.
8c693660 6217
b7577823
ILT
6218rm -f conftest.tail
6219while :
6220do
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
6235done
6236rm -f conftest.vals
8c693660 6237
b7577823
ILT
6238cat >> $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
8c693660 6246 else
a4322a77
ILT
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
b7577823
ILT
6253 rm -f $ac_file
6254 mv conftest.h $ac_file
8c693660 6255 fi
b7577823
ILT
6256fi; done
6257
ac388f2a
ILT
6258EOF
6259cat >> $CONFIG_STATUS <<EOF
8c693660 6260
c0734708 6261
ac388f2a
ILT
6262EOF
6263cat >> $CONFIG_STATUS <<\EOF
c0734708 6264test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
53d3ce37 6265sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
8c693660
KR
6266exit 0
6267EOF
6268chmod +x $CONFIG_STATUS
6269rm -fr confdefs* $ac_clean_files
6270test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6271
This page took 0.412391 seconds and 4 git commands to generate.