Thu Nov 12 17:27:21 1998 Geoffrey Noer <noer@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
b93f016b
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
304# Do all the work for Automake. This macro actually does too much --
305# some checks are only needed if your package does certain things.
306# But this isn't really a big deal.
307
308# serial 1
309
310
311
312
313
314# serial 1
315
316
317
318#
319# Check to make sure that the build environment is sane.
320#
321
322
323
324
325
326
327# serial 25 AM_PROG_LIBTOOL
328
329
330# AM_ENABLE_SHARED - implement the --enable-shared flag
331# Usage: AM_ENABLE_SHARED[(DEFAULT)]
332# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
333# `yes'.
334
335
336# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
337
338
339# AM_DISABLE_STATIC - set the default static flag to --disable-static
340
341
342# AM_ENABLE_STATIC - implement the --enable-static flag
343# Usage: AM_ENABLE_STATIC[(DEFAULT)]
344# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
345# `yes'.
346
347
348
349# AM_PROG_LD - find the path to the GNU or non-GNU linker
350
351
352
353
354# AM_PROG_NM - find the path to a BSD-compatible name lister
355
356
357# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
358
359
360# Like AC_CONFIG_HEADER, but automatically create stamp file.
361
362
363
364# Add --enable-maintainer-mode option to configure.
365# From Jim Meyering
366
367# serial 1
368
369
370
371# Check to see if we're running under Cygwin32, without using
372# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
373# Otherwise set it to "no".
374
375
376
377# Check to see if we're running under Win32, without using
378# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
379# Otherwise set it to "".
380
381
382
383# Check to see if we're running under Mingw, without using
384# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
385# Otherwise set it to "no".
386
387
388
389# This file is derived from `gettext.m4'. The difference is that the
390# included macros assume Cygnus-style source and build trees.
391
392# Macro to add for using GNU gettext.
393# Ulrich Drepper <drepper@cygnus.com>, 1995.
394#
395# This file file be copied and used freely without restrictions. It can
396# be used in projects which are not available under the GNU Public License
397# but which still want to provide support for the GNU gettext functionality.
398# Please note that the actual code is *not* freely available.
399
400# serial 3
401
402
403
404
405
406# Search path for a program which passes the given test.
407# Ulrich Drepper <drepper@cygnus.com>, 1996.
408#
409# This file file be copied and used freely without restrictions. It can
410# be used in projects which are not available under the GNU Public License
411# but which still want to provide support for the GNU gettext functionality.
412# Please note that the actual code is *not* freely available.
413
414# serial 1
415
416
417
418# Check whether LC_MESSAGES is available in <locale.h>.
419# Ulrich Drepper <drepper@cygnus.com>, 1995.
420#
421# This file file be copied and used freely without restrictions. It can
422# be used in projects which are not available under the GNU Public License
423# but which still want to provide support for the GNU gettext functionality.
424# Please note that the actual code is *not* freely available.
425
426# serial 1
427
428
429
430
431
432
433
434
435#
436# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
437# makes configure think it's cross compiling. If --target wasn't used, then
438# we can't configure, so something is wrong. We don't use the cache
439# here cause if somebody fixes their compiler install, we want this to work.
440
441
442
443
444
445
446
447# Defined as a separate macro so we don't have to cache the values
448# from PATH_TCLCONFIG (because this can also be cached).
449
450
451# Warning: Tk definitions are very similar to Tcl definitions but
452# are not precisely the same. There are a couple of differences,
453# so don't do changes to Tcl thinking you can cut and paste it do
454# the Tk differences and later simply substitute "Tk" for "Tcl".
455# Known differences:
456# - Acceptable Tcl major version #s is 7-9 while Tk is 4-9
457# - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
458# - Computing major/minor versions is different because Tk depends on
459# headers to Tcl, Tk, and X.
460# - Symbols in tkConfig.sh are different than tclConfig.sh
461# - Acceptable for Tk to be missing but not Tcl.
462
463
464
465
466
467
468# Defined as a separate macro so we don't have to cache the values
469# from PATH_TKCONFIG (because this can also be cached).
470
471
472
473# check for Itcl headers.
474
475
476
477# check for Tix headers.
478
479
5436fc65 480# Guess values for system-dependent variables and create Makefiles.
4b23e55c 481# Generated automatically using autoconf version 2.12.2
bc859e63 482# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5436fc65
C
483#
484# This configure script is free software; the Free Software Foundation
485# gives unlimited permission to copy, distribute and modify it.
486
487# Defaults:
488ac_help=
489ac_default_prefix=/usr/local
490# Any additions from configure.in:
fcfc3c0c
TT
491ac_help="$ac_help
492 --disable-nls do not use Native Language Support"
493ac_help="$ac_help
494 --with-included-gettext use the GNU gettext library included here"
5436fc65
C
495ac_help="$ac_help
496 --enable-netrom "
0728afad 497ac_help="$ac_help
b9a9cde4 498 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
ba68ad57
JM
499ac_help="$ac_help
500 --with-mmalloc Use memory mapped malloc package"
287026b7
AC
501ac_help="$ac_help
502 --enable-carp Configure alternative readaptive paradigm "
503ac_help="$ac_help
504 --enable-targets alternative target configurations"
2476848a
MH
505ac_help="$ac_help
506 --enable-ide Enable IDE support"
c076f1ed 507ac_help="$ac_help
ba68ad57 508 --with-foundry-libs=DIR Use the Foundry SDK in DIR"
5436fc65 509ac_help="$ac_help
ba68ad57 510 --enable-gdbtk Enable GDBTK GUI front end"
5436fc65 511ac_help="$ac_help
ba68ad57 512 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
4e327047 513ac_help="$ac_help
ba68ad57 514 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
4e327047 515ac_help="$ac_help
ba68ad57 516 --with-tclinclude=DIR Directory where tcl private headers are"
4e327047 517ac_help="$ac_help
ba68ad57 518 --with-tkinclude=DIR Directory where tk private headers are"
b236defa
FCE
519ac_help="$ac_help
520 --with-x use the X Window System"
521ac_help="$ac_help
ba68ad57 522 --with-sim-gpu2=DIR Use GPU2 library under given DIR"
75a55dc3 523ac_help="$ac_help
ba68ad57 524 --with-sim-funit=DIR Use target FP lib under given DIR"
1d5eb137 525ac_help="$ac_help
ba68ad57 526 --enable-shared Use shared libraries"
5436fc65
C
527
528# Initialize some variables set by options.
529# The variables have the same names as the options, with
530# dashes changed to underlines.
531build=NONE
532cache_file=./config.cache
533exec_prefix=NONE
534host=NONE
535no_create=
536nonopt=NONE
537no_recursion=
538prefix=NONE
539program_prefix=NONE
540program_suffix=NONE
541program_transform_name=s,x,x,
542silent=
543site=
544srcdir=
545target=NONE
546verbose=
547x_includes=NONE
548x_libraries=NONE
1a7b4b7c
DE
549bindir='${exec_prefix}/bin'
550sbindir='${exec_prefix}/sbin'
551libexecdir='${exec_prefix}/libexec'
552datadir='${prefix}/share'
553sysconfdir='${prefix}/etc'
554sharedstatedir='${prefix}/com'
555localstatedir='${prefix}/var'
556libdir='${exec_prefix}/lib'
557includedir='${prefix}/include'
558oldincludedir='/usr/include'
559infodir='${prefix}/info'
560mandir='${prefix}/man'
5436fc65
C
561
562# Initialize some other variables.
563subdirs=
1a7b4b7c 564MFLAGS= MAKEFLAGS=
4b23e55c 565SHELL=${CONFIG_SHELL-/bin/sh}
bfde4a67
SG
566# Maximum number of lines to put in a shell here document.
567ac_max_here_lines=12
5436fc65
C
568
569ac_prev=
570for ac_option
571do
572
573 # If the previous option needs an argument, assign it.
574 if test -n "$ac_prev"; then
575 eval "$ac_prev=\$ac_option"
576 ac_prev=
577 continue
578 fi
579
580 case "$ac_option" in
581 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
582 *) ac_optarg= ;;
583 esac
584
585 # Accept the important Cygnus configure options, so we can diagnose typos.
586
587 case "$ac_option" in
588
1a7b4b7c
DE
589 -bindir | --bindir | --bindi | --bind | --bin | --bi)
590 ac_prev=bindir ;;
591 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
592 bindir="$ac_optarg" ;;
593
594 -build | --build | --buil | --bui | --bu)
5436fc65 595 ac_prev=build ;;
1a7b4b7c 596 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
597 build="$ac_optarg" ;;
598
599 -cache-file | --cache-file | --cache-fil | --cache-fi \
600 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
601 ac_prev=cache_file ;;
602 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
603 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
604 cache_file="$ac_optarg" ;;
605
1a7b4b7c
DE
606 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
607 ac_prev=datadir ;;
608 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
609 | --da=*)
610 datadir="$ac_optarg" ;;
611
5436fc65
C
612 -disable-* | --disable-*)
613 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
614 # Reject names that are not valid shell variable names.
615 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
616 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
617 fi
618 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
619 eval "enable_${ac_feature}=no" ;;
620
621 -enable-* | --enable-*)
622 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
623 # Reject names that are not valid shell variable names.
624 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
625 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
626 fi
627 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
628 case "$ac_option" in
629 *=*) ;;
630 *) ac_optarg=yes ;;
631 esac
632 eval "enable_${ac_feature}='$ac_optarg'" ;;
633
634 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
635 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
636 | --exec | --exe | --ex)
637 ac_prev=exec_prefix ;;
638 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
639 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
640 | --exec=* | --exe=* | --ex=*)
641 exec_prefix="$ac_optarg" ;;
642
643 -gas | --gas | --ga | --g)
644 # Obsolete; use --with-gas.
645 with_gas=yes ;;
646
647 -help | --help | --hel | --he)
648 # Omit some internal or obsolete options to make the list less imposing.
649 # This message is too long to be a string in the A/UX 3.1 sh.
650 cat << EOF
651Usage: configure [options] [host]
652Options: [defaults in brackets after descriptions]
653Configuration:
654 --cache-file=FILE cache test results in FILE
655 --help print this message
656 --no-create do not create output files
657 --quiet, --silent do not print \`checking...' messages
658 --version print the version of autoconf that created configure
659Directory and file names:
660 --prefix=PREFIX install architecture-independent files in PREFIX
661 [$ac_default_prefix]
1a7b4b7c 662 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 663 [same as prefix]
1a7b4b7c
DE
664 --bindir=DIR user executables in DIR [EPREFIX/bin]
665 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
666 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
667 --datadir=DIR read-only architecture-independent data in DIR
668 [PREFIX/share]
669 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
670 --sharedstatedir=DIR modifiable architecture-independent data in DIR
671 [PREFIX/com]
672 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
673 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
674 --includedir=DIR C header files in DIR [PREFIX/include]
675 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
676 --infodir=DIR info documentation in DIR [PREFIX/info]
677 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
678 --srcdir=DIR find the sources in DIR [configure dir or ..]
679 --program-prefix=PREFIX prepend PREFIX to installed program names
680 --program-suffix=SUFFIX append SUFFIX to installed program names
1a7b4b7c
DE
681 --program-transform-name=PROGRAM
682 run sed PROGRAM on installed program names
683EOF
684 cat << EOF
5436fc65
C
685Host type:
686 --build=BUILD configure for building on BUILD [BUILD=HOST]
687 --host=HOST configure for HOST [guessed]
688 --target=TARGET configure for TARGET [TARGET=HOST]
689Features and packages:
690 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
691 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
692 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
693 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
694 --x-includes=DIR X include files are in DIR
695 --x-libraries=DIR X library files are in DIR
5436fc65 696EOF
1a7b4b7c
DE
697 if test -n "$ac_help"; then
698 echo "--enable and --with options recognized:$ac_help"
699 fi
5436fc65
C
700 exit 0 ;;
701
702 -host | --host | --hos | --ho)
703 ac_prev=host ;;
704 -host=* | --host=* | --hos=* | --ho=*)
705 host="$ac_optarg" ;;
706
1a7b4b7c
DE
707 -includedir | --includedir | --includedi | --included | --include \
708 | --includ | --inclu | --incl | --inc)
709 ac_prev=includedir ;;
710 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
711 | --includ=* | --inclu=* | --incl=* | --inc=*)
712 includedir="$ac_optarg" ;;
713
714 -infodir | --infodir | --infodi | --infod | --info | --inf)
715 ac_prev=infodir ;;
716 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
717 infodir="$ac_optarg" ;;
718
719 -libdir | --libdir | --libdi | --libd)
720 ac_prev=libdir ;;
721 -libdir=* | --libdir=* | --libdi=* | --libd=*)
722 libdir="$ac_optarg" ;;
723
724 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
725 | --libexe | --libex | --libe)
726 ac_prev=libexecdir ;;
727 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
728 | --libexe=* | --libex=* | --libe=*)
729 libexecdir="$ac_optarg" ;;
730
731 -localstatedir | --localstatedir | --localstatedi | --localstated \
732 | --localstate | --localstat | --localsta | --localst \
733 | --locals | --local | --loca | --loc | --lo)
734 ac_prev=localstatedir ;;
735 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
736 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
737 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
738 localstatedir="$ac_optarg" ;;
739
740 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
741 ac_prev=mandir ;;
742 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
743 mandir="$ac_optarg" ;;
744
5436fc65
C
745 -nfp | --nfp | --nf)
746 # Obsolete; use --without-fp.
747 with_fp=no ;;
748
749 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
750 | --no-cr | --no-c)
751 no_create=yes ;;
752
753 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
754 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
755 no_recursion=yes ;;
756
1a7b4b7c
DE
757 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
758 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
759 | --oldin | --oldi | --old | --ol | --o)
760 ac_prev=oldincludedir ;;
761 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
762 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
763 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
764 oldincludedir="$ac_optarg" ;;
765
5436fc65
C
766 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
767 ac_prev=prefix ;;
768 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
769 prefix="$ac_optarg" ;;
770
771 -program-prefix | --program-prefix | --program-prefi | --program-pref \
772 | --program-pre | --program-pr | --program-p)
773 ac_prev=program_prefix ;;
774 -program-prefix=* | --program-prefix=* | --program-prefi=* \
775 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
776 program_prefix="$ac_optarg" ;;
777
778 -program-suffix | --program-suffix | --program-suffi | --program-suff \
779 | --program-suf | --program-su | --program-s)
780 ac_prev=program_suffix ;;
781 -program-suffix=* | --program-suffix=* | --program-suffi=* \
782 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
783 program_suffix="$ac_optarg" ;;
784
785 -program-transform-name | --program-transform-name \
786 | --program-transform-nam | --program-transform-na \
787 | --program-transform-n | --program-transform- \
788 | --program-transform | --program-transfor \
789 | --program-transfo | --program-transf \
790 | --program-trans | --program-tran \
791 | --progr-tra | --program-tr | --program-t)
792 ac_prev=program_transform_name ;;
793 -program-transform-name=* | --program-transform-name=* \
794 | --program-transform-nam=* | --program-transform-na=* \
795 | --program-transform-n=* | --program-transform-=* \
796 | --program-transform=* | --program-transfor=* \
797 | --program-transfo=* | --program-transf=* \
798 | --program-trans=* | --program-tran=* \
799 | --progr-tra=* | --program-tr=* | --program-t=*)
800 program_transform_name="$ac_optarg" ;;
801
802 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
803 | -silent | --silent | --silen | --sile | --sil)
804 silent=yes ;;
805
1a7b4b7c
DE
806 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
807 ac_prev=sbindir ;;
808 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
809 | --sbi=* | --sb=*)
810 sbindir="$ac_optarg" ;;
811
812 -sharedstatedir | --sharedstatedir | --sharedstatedi \
813 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
814 | --sharedst | --shareds | --shared | --share | --shar \
815 | --sha | --sh)
816 ac_prev=sharedstatedir ;;
817 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
818 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
819 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
820 | --sha=* | --sh=*)
821 sharedstatedir="$ac_optarg" ;;
822
5436fc65
C
823 -site | --site | --sit)
824 ac_prev=site ;;
825 -site=* | --site=* | --sit=*)
826 site="$ac_optarg" ;;
827
828 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
829 ac_prev=srcdir ;;
830 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
831 srcdir="$ac_optarg" ;;
832
1a7b4b7c
DE
833 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
834 | --syscon | --sysco | --sysc | --sys | --sy)
835 ac_prev=sysconfdir ;;
836 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
837 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
838 sysconfdir="$ac_optarg" ;;
839
5436fc65
C
840 -target | --target | --targe | --targ | --tar | --ta | --t)
841 ac_prev=target ;;
842 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
843 target="$ac_optarg" ;;
844
845 -v | -verbose | --verbose | --verbos | --verbo | --verb)
846 verbose=yes ;;
847
848 -version | --version | --versio | --versi | --vers)
4b23e55c 849 echo "configure generated by autoconf version 2.12.2"
5436fc65
C
850 exit 0 ;;
851
852 -with-* | --with-*)
853 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
854 # Reject names that are not valid shell variable names.
855 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
856 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
857 fi
858 ac_package=`echo $ac_package| sed 's/-/_/g'`
859 case "$ac_option" in
860 *=*) ;;
861 *) ac_optarg=yes ;;
862 esac
863 eval "with_${ac_package}='$ac_optarg'" ;;
864
865 -without-* | --without-*)
866 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
867 # Reject names that are not valid shell variable names.
868 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
869 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
870 fi
871 ac_package=`echo $ac_package| sed 's/-/_/g'`
872 eval "with_${ac_package}=no" ;;
873
874 --x)
875 # Obsolete; use --with-x.
876 with_x=yes ;;
877
878 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
879 | --x-incl | --x-inc | --x-in | --x-i)
880 ac_prev=x_includes ;;
881 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
882 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
883 x_includes="$ac_optarg" ;;
884
885 -x-libraries | --x-libraries | --x-librarie | --x-librari \
886 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
887 ac_prev=x_libraries ;;
888 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
889 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
890 x_libraries="$ac_optarg" ;;
891
892 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
893 ;;
894
1a7b4b7c 895 *)
5436fc65
C
896 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
897 echo "configure: warning: $ac_option: invalid host type" 1>&2
898 fi
899 if test "x$nonopt" != xNONE; then
900 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
901 fi
902 nonopt="$ac_option"
903 ;;
904
905 esac
906done
907
908if test -n "$ac_prev"; then
909 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
910fi
911
912trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
913
914# File descriptor usage:
915# 0 standard input
916# 1 file creation
917# 2 errors and warnings
918# 3 some systems may open it to /dev/tty
919# 4 used on the Kubota Titan
920# 6 checking for... messages and results
921# 5 compiler messages saved in config.log
922if test "$silent" = yes; then
923 exec 6>/dev/null
924else
925 exec 6>&1
926fi
927exec 5>./config.log
928
929echo "\
930This file contains any messages produced by compilers while
931running configure, to aid debugging if configure makes a mistake.
932" 1>&5
933
934# Strip out --no-create and --no-recursion so they do not pile up.
935# Also quote any args containing shell metacharacters.
936ac_configure_args=
937for ac_arg
938do
939 case "$ac_arg" in
940 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
941 | --no-cr | --no-c) ;;
942 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
943 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
944 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
945 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
946 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
947 esac
948done
949
950# NLS nuisances.
bfde4a67
SG
951# Only set these to C if already set. These must not be set unconditionally
952# because not all systems understand e.g. LANG=C (notably SCO).
953# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
954# Non-C LC_CTYPE values break the ctype check.
ef6c51d1 955if test "${LANG+set}" = set; then LANG=C; export LANG; fi
bfde4a67
SG
956if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
957if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
958if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
5436fc65
C
959
960# confdefs.h avoids OS command line length limits that DEFS can exceed.
961rm -rf conftest* confdefs.h
962# AIX cpp loses on an empty file, so make sure it contains at least a newline.
963echo > confdefs.h
964
965# A filename unique to this package, relative to the directory that
966# configure is in, which we can look for to find out if srcdir is correct.
967ac_unique_file=main.c
968
969# Find the source files, if location was not specified.
970if test -z "$srcdir"; then
971 ac_srcdir_defaulted=yes
972 # Try the directory containing this script, then its parent.
973 ac_prog=$0
974 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
975 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
976 srcdir=$ac_confdir
977 if test ! -r $srcdir/$ac_unique_file; then
978 srcdir=..
979 fi
980else
981 ac_srcdir_defaulted=no
982fi
983if test ! -r $srcdir/$ac_unique_file; then
984 if test "$ac_srcdir_defaulted" = yes; then
985 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
986 else
987 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
988 fi
989fi
990srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
991
992# Prefer explicitly selected file to automatically selected ones.
993if test -z "$CONFIG_SITE"; then
994 if test "x$prefix" != xNONE; then
995 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
996 else
997 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
998 fi
999fi
1000for ac_site_file in $CONFIG_SITE; do
1001 if test -r "$ac_site_file"; then
1002 echo "loading site script $ac_site_file"
1003 . "$ac_site_file"
1004 fi
1005done
1006
1007if test -r "$cache_file"; then
1008 echo "loading cache $cache_file"
1009 . $cache_file
1010else
1011 echo "creating cache $cache_file"
1012 > $cache_file
1013fi
1014
1015ac_ext=c
1016# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3dedc867 1017ac_cpp='$CPP $CPPFLAGS'
1a7b4b7c 1018ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4b23e55c 1019ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
bfde4a67 1020cross_compiling=$ac_cv_prog_cc_cross
5436fc65 1021
4b23e55c
JM
1022ac_exeext=
1023ac_objext=o
5436fc65
C
1024if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
1025 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
1026 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
1027 ac_n= ac_c='
1028' ac_t=' '
1029 else
1030 ac_n=-n ac_c= ac_t=
1031 fi
1032else
1033 ac_n= ac_c='\c' ac_t=
1034fi
1035
1036
1037
db210d08 1038
5436fc65
C
1039# Extract the first word of "gcc", so it can be a program name with args.
1040set dummy gcc; ac_word=$2
1041echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 1042echo "configure:1043: checking for $ac_word" >&5
5436fc65
C
1043if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
1045else
1046 if test -n "$CC"; then
1047 ac_cv_prog_CC="$CC" # Let the user override the test.
1048else
4b23e55c 1049 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
1050 ac_dummy="$PATH"
1051 for ac_dir in $ac_dummy; do
5436fc65
C
1052 test -z "$ac_dir" && ac_dir=.
1053 if test -f $ac_dir/$ac_word; then
1054 ac_cv_prog_CC="gcc"
1055 break
1056 fi
1057 done
1058 IFS="$ac_save_ifs"
5436fc65
C
1059fi
1060fi
1061CC="$ac_cv_prog_CC"
1062if test -n "$CC"; then
1063 echo "$ac_t""$CC" 1>&6
1064else
1065 echo "$ac_t""no" 1>&6
1066fi
1067
1a7b4b7c
DE
1068if test -z "$CC"; then
1069 # Extract the first word of "cc", so it can be a program name with args.
1070set dummy cc; ac_word=$2
1071echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 1072echo "configure:1073: checking for $ac_word" >&5
1a7b4b7c
DE
1073if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075else
1076 if test -n "$CC"; then
1077 ac_cv_prog_CC="$CC" # Let the user override the test.
1078else
4b23e55c 1079 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1a7b4b7c 1080 ac_prog_rejected=no
b93f016b
GN
1081 ac_dummy="$PATH"
1082 for ac_dir in $ac_dummy; do
1a7b4b7c
DE
1083 test -z "$ac_dir" && ac_dir=.
1084 if test -f $ac_dir/$ac_word; then
1085 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1086 ac_prog_rejected=yes
1087 continue
1088 fi
1089 ac_cv_prog_CC="cc"
1090 break
1091 fi
1092 done
1093 IFS="$ac_save_ifs"
1094if test $ac_prog_rejected = yes; then
1095 # We found a bogon in the path, so make sure we never use it.
1096 set dummy $ac_cv_prog_CC
1097 shift
1098 if test $# -gt 0; then
1099 # We chose a different compiler from the bogus one.
1100 # However, it has the same basename, so the bogon will be chosen
1101 # first if we set CC to just the basename; use the full file name.
1102 shift
1103 set dummy "$ac_dir/$ac_word" "$@"
1104 shift
1105 ac_cv_prog_CC="$@"
1106 fi
1107fi
1108fi
1109fi
1110CC="$ac_cv_prog_CC"
1111if test -n "$CC"; then
1112 echo "$ac_t""$CC" 1>&6
1113else
1114 echo "$ac_t""no" 1>&6
1115fi
1116
4b23e55c
JM
1117 if test -z "$CC"; then
1118 case "`uname -s`" in
1119 *win32* | *WIN32*)
1120 # Extract the first word of "cl", so it can be a program name with args.
1121set dummy cl; ac_word=$2
1122echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 1123echo "configure:1124: checking for $ac_word" >&5
4b23e55c
JM
1124if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1125 echo $ac_n "(cached) $ac_c" 1>&6
1126else
1127 if test -n "$CC"; then
1128 ac_cv_prog_CC="$CC" # Let the user override the test.
1129else
1130 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
1131 ac_dummy="$PATH"
1132 for ac_dir in $ac_dummy; do
4b23e55c
JM
1133 test -z "$ac_dir" && ac_dir=.
1134 if test -f $ac_dir/$ac_word; then
1135 ac_cv_prog_CC="cl"
1136 break
1137 fi
1138 done
1139 IFS="$ac_save_ifs"
1140fi
1141fi
1142CC="$ac_cv_prog_CC"
1143if test -n "$CC"; then
1144 echo "$ac_t""$CC" 1>&6
1145else
1146 echo "$ac_t""no" 1>&6
1147fi
1148 ;;
1149 esac
1150 fi
1a7b4b7c
DE
1151 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1152fi
5436fc65 1153
bfde4a67 1154echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
b93f016b 1155echo "configure:1156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
bfde4a67
SG
1156
1157ac_ext=c
1158# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1159ac_cpp='$CPP $CPPFLAGS'
1160ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4b23e55c 1161ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
bfde4a67
SG
1162cross_compiling=$ac_cv_prog_cc_cross
1163
b93f016b
GN
1164cat > conftest.$ac_ext << EOF
1165
1166#line 1167 "configure"
bfde4a67 1167#include "confdefs.h"
b93f016b 1168
bfde4a67
SG
1169main(){return(0);}
1170EOF
b93f016b 1171if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bfde4a67
SG
1172 ac_cv_prog_cc_works=yes
1173 # If we can't run a trivial program, we are probably using a cross compiler.
1174 if (./conftest; exit) 2>/dev/null; then
1175 ac_cv_prog_cc_cross=no
1176 else
1177 ac_cv_prog_cc_cross=yes
1178 fi
1179else
1180 echo "configure: failed program was:" >&5
1181 cat conftest.$ac_ext >&5
1182 ac_cv_prog_cc_works=no
1183fi
1184rm -fr conftest*
b93f016b
GN
1185ac_ext=c
1186# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1187ac_cpp='$CPP $CPPFLAGS'
1188ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1189ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1190cross_compiling=$ac_cv_prog_cc_cross
bfde4a67
SG
1191
1192echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1193if test $ac_cv_prog_cc_works = no; then
1194 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1195fi
1196echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
b93f016b 1197echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
bfde4a67
SG
1198echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1199cross_compiling=$ac_cv_prog_cc_cross
1200
5436fc65 1201echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
b93f016b 1202echo "configure:1203: checking whether we are using GNU C" >&5
5436fc65
C
1203if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1204 echo $ac_n "(cached) $ac_c" 1>&6
1205else
1206 cat > conftest.c <<EOF
1207#ifdef __GNUC__
1208 yes;
1209#endif
1210EOF
b93f016b 1211if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
5436fc65
C
1212 ac_cv_prog_gcc=yes
1213else
1214 ac_cv_prog_gcc=no
1215fi
1216fi
1a7b4b7c 1217
5436fc65 1218echo "$ac_t""$ac_cv_prog_gcc" 1>&6
bfde4a67 1219
5436fc65
C
1220if test $ac_cv_prog_gcc = yes; then
1221 GCC=yes
4b23e55c
JM
1222else
1223 GCC=
1224fi
1225
1226ac_test_CFLAGS="${CFLAGS+set}"
1227ac_save_CFLAGS="$CFLAGS"
1228CFLAGS=
1229echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
b93f016b 1230echo "configure:1231: checking whether ${CC-cc} accepts -g" >&5
bfde4a67 1231if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
5436fc65
C
1232 echo $ac_n "(cached) $ac_c" 1>&6
1233else
1234 echo 'void f(){}' > conftest.c
1235if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
bfde4a67 1236 ac_cv_prog_cc_g=yes
5436fc65 1237else
bfde4a67 1238 ac_cv_prog_cc_g=no
5436fc65
C
1239fi
1240rm -f conftest*
1241
1242fi
1a7b4b7c 1243
bfde4a67 1244echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
4b23e55c
JM
1245if test "$ac_test_CFLAGS" = set; then
1246 CFLAGS="$ac_save_CFLAGS"
1247elif test $ac_cv_prog_cc_g = yes; then
1248 if test "$GCC" = yes; then
bfde4a67
SG
1249 CFLAGS="-g -O2"
1250 else
4b23e55c 1251 CFLAGS="-g"
6ee3e5d6 1252 fi
ba68ad57 1253else
4b23e55c
JM
1254 if test "$GCC" = yes; then
1255 CFLAGS="-O2"
1256 else
1257 CFLAGS=
1258 fi
5436fc65
C
1259fi
1260
1261echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b93f016b 1262echo "configure:1263: checking how to run the C preprocessor" >&5
5436fc65
C
1263# On Suns, sometimes $CPP names a directory.
1264if test -n "$CPP" && test -d "$CPP"; then
1265 CPP=
1266fi
1267if test -z "$CPP"; then
1268if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271 # This must be in double quotes, not single quotes, because CPP may get
1272 # substituted into the Makefile and "${CC-cc}" will confuse make.
1273 CPP="${CC-cc} -E"
1274 # On the NeXT, cc -E runs the code through the compiler's parser,
1275 # not just through cpp.
1276 cat > conftest.$ac_ext <<EOF
b93f016b 1277#line 1278 "configure"
5436fc65
C
1278#include "confdefs.h"
1279#include <assert.h>
1280Syntax Error
1281EOF
1a7b4b7c 1282ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 1283{ (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 1284ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436fc65
C
1285if test -z "$ac_err"; then
1286 :
1287else
1288 echo "$ac_err" >&5
bfde4a67
SG
1289 echo "configure: failed program was:" >&5
1290 cat conftest.$ac_ext >&5
5436fc65
C
1291 rm -rf conftest*
1292 CPP="${CC-cc} -E -traditional-cpp"
1293 cat > conftest.$ac_ext <<EOF
b93f016b 1294#line 1295 "configure"
4b23e55c
JM
1295#include "confdefs.h"
1296#include <assert.h>
1297Syntax Error
1298EOF
1299ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 1300{ (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c
JM
1301ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1302if test -z "$ac_err"; then
1303 :
1304else
1305 echo "$ac_err" >&5
1306 echo "configure: failed program was:" >&5
1307 cat conftest.$ac_ext >&5
1308 rm -rf conftest*
1309 CPP="${CC-cc} -nologo -E"
1310 cat > conftest.$ac_ext <<EOF
b93f016b 1311#line 1312 "configure"
eac4afd1
JM
1312#include "confdefs.h"
1313#include <assert.h>
1314Syntax Error
1315EOF
1316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 1317{ (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 1318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436fc65
C
1319if test -z "$ac_err"; then
1320 :
1321else
1322 echo "$ac_err" >&5
bfde4a67
SG
1323 echo "configure: failed program was:" >&5
1324 cat conftest.$ac_ext >&5
5436fc65 1325 rm -rf conftest*
fcfc3c0c
TT
1326 CPP=/lib/cpp
1327fi
1328rm -f conftest*
1329fi
4b23e55c
JM
1330rm -f conftest*
1331fi
fcfc3c0c
TT
1332rm -f conftest*
1333 ac_cv_prog_CPP="$CPP"
1334fi
1335 CPP="$ac_cv_prog_CPP"
1336else
1337 ac_cv_prog_CPP="$CPP"
1338fi
1339echo "$ac_t""$CPP" 1>&6
1340
1341echo $ac_n "checking for AIX""... $ac_c" 1>&6
b93f016b 1342echo "configure:1343: checking for AIX" >&5
fcfc3c0c 1343cat > conftest.$ac_ext <<EOF
b93f016b 1344#line 1345 "configure"
fcfc3c0c
TT
1345#include "confdefs.h"
1346#ifdef _AIX
1347 yes
1348#endif
1349
1350EOF
1351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1352 egrep "yes" >/dev/null 2>&1; then
1353 rm -rf conftest*
1354 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1355#define _ALL_SOURCE 1
1356EOF
1357
1358else
1359 rm -rf conftest*
1360 echo "$ac_t""no" 1>&6
1361fi
1362rm -f conftest*
1363
1364
fcfc3c0c 1365echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
b93f016b 1366echo "configure:1367: checking for POSIXized ISC" >&5
fcfc3c0c
TT
1367if test -d /etc/conf/kconfig.d &&
1368 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1369then
1370 echo "$ac_t""yes" 1>&6
1371 ISC=yes # If later tests want to check for ISC.
1372 cat >> confdefs.h <<\EOF
1373#define _POSIX_SOURCE 1
1374EOF
1375
1376 if test "$GCC" = yes; then
1377 CC="$CC -posix"
1378 else
1379 CC="$CC -Xp"
1380 fi
1381else
1382 echo "$ac_t""no" 1>&6
1383 ISC=
1384fi
1385
1386
fcfc3c0c
TT
1387ac_aux_dir=
1388for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1389 if test -f $ac_dir/install-sh; then
1390 ac_aux_dir=$ac_dir
1391 ac_install_sh="$ac_aux_dir/install-sh -c"
1392 break
1393 elif test -f $ac_dir/install.sh; then
1394 ac_aux_dir=$ac_dir
1395 ac_install_sh="$ac_aux_dir/install.sh -c"
1396 break
1397 fi
1398done
1399if test -z "$ac_aux_dir"; then
1400 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1401fi
1402ac_config_guess=$ac_aux_dir/config.guess
1403ac_config_sub=$ac_aux_dir/config.sub
1404ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1405
1406
1407# Do some error checking and defaulting for the host and target type.
1408# The inputs are:
1409# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1410#
1411# The rules are:
1412# 1. You are not allowed to specify --host, --target, and nonopt at the
1413# same time.
1414# 2. Host defaults to nonopt.
1415# 3. If nonopt is not specified, then host defaults to the current host,
1416# as determined by config.guess.
1417# 4. Target and build default to nonopt.
1418# 5. If nonopt is not specified, then target and build default to host.
1419
1420# The aliases save the names the user supplied, while $host etc.
1421# will get canonicalized.
1422case $host---$target---$nonopt in
1423NONE---*---* | *---NONE---* | *---*---NONE) ;;
1424*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1425esac
1426
1427
1428# Make sure we can run config.sub.
4b23e55c 1429if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
fcfc3c0c
TT
1430else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1431fi
1432
1433echo $ac_n "checking host system type""... $ac_c" 1>&6
b93f016b 1434echo "configure:1435: checking host system type" >&5
fcfc3c0c
TT
1435
1436host_alias=$host
1437case "$host_alias" in
1438NONE)
1439 case $nonopt in
1440 NONE)
4b23e55c 1441 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
fcfc3c0c
TT
1442 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1443 fi ;;
1444 *) host_alias=$nonopt ;;
1445 esac ;;
1446esac
1447
4b23e55c 1448host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
fcfc3c0c
TT
1449host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452echo "$ac_t""$host" 1>&6
1453
1454echo $ac_n "checking target system type""... $ac_c" 1>&6
b93f016b 1455echo "configure:1456: checking target system type" >&5
fcfc3c0c
TT
1456
1457target_alias=$target
1458case "$target_alias" in
1459NONE)
1460 case $nonopt in
1461 NONE) target_alias=$host_alias ;;
1462 *) target_alias=$nonopt ;;
1463 esac ;;
1464esac
1465
4b23e55c 1466target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
fcfc3c0c
TT
1467target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1468target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1469target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1470echo "$ac_t""$target" 1>&6
1471
1472echo $ac_n "checking build system type""... $ac_c" 1>&6
b93f016b 1473echo "configure:1474: checking build system type" >&5
fcfc3c0c
TT
1474
1475build_alias=$build
1476case "$build_alias" in
1477NONE)
1478 case $nonopt in
1479 NONE) build_alias=$host_alias ;;
1480 *) build_alias=$nonopt ;;
1481 esac ;;
1482esac
1483
4b23e55c 1484build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
fcfc3c0c
TT
1485build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1486build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1487build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1488echo "$ac_t""$build" 1>&6
1489
1490test "$host_alias" != "$target_alias" &&
1491 test "$program_prefix$program_suffix$program_transform_name" = \
1492 NONENONEs,x,x, &&
1493 program_prefix=${target_alias}-
1494
1495
1496ALL_LINGUAS=
1497echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
b93f016b 1498echo "configure:1499: checking whether ${MAKE-make} sets \${MAKE}" >&5
fcfc3c0c
TT
1499set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1500if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1501 echo $ac_n "(cached) $ac_c" 1>&6
1502else
1503 cat > conftestmake <<\EOF
1504all:
1505 @echo 'ac_maketemp="${MAKE}"'
1506EOF
1507# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1508eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1509if test -n "$ac_maketemp"; then
1510 eval ac_cv_prog_make_${ac_make}_set=yes
1511else
1512 eval ac_cv_prog_make_${ac_make}_set=no
1513fi
1514rm -f conftestmake
1515fi
1516if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1517 echo "$ac_t""yes" 1>&6
1518 SET_MAKE=
1519else
1520 echo "$ac_t""no" 1>&6
1521 SET_MAKE="MAKE=${MAKE-make}"
1522fi
1523
1524# Extract the first word of "ranlib", so it can be a program name with args.
1525set dummy ranlib; ac_word=$2
1526echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 1527echo "configure:1528: checking for $ac_word" >&5
fcfc3c0c
TT
1528if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1529 echo $ac_n "(cached) $ac_c" 1>&6
1530else
1531 if test -n "$RANLIB"; then
1532 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1533else
4b23e55c 1534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
1535 ac_dummy="$PATH"
1536 for ac_dir in $ac_dummy; do
fcfc3c0c
TT
1537 test -z "$ac_dir" && ac_dir=.
1538 if test -f $ac_dir/$ac_word; then
1539 ac_cv_prog_RANLIB="ranlib"
1540 break
1541 fi
1542 done
1543 IFS="$ac_save_ifs"
1544 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1545fi
1546fi
1547RANLIB="$ac_cv_prog_RANLIB"
1548if test -n "$RANLIB"; then
1549 echo "$ac_t""$RANLIB" 1>&6
1550else
1551 echo "$ac_t""no" 1>&6
1552fi
1553
1554echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
b93f016b 1555echo "configure:1556: checking for ANSI C header files" >&5
fcfc3c0c
TT
1556if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1557 echo $ac_n "(cached) $ac_c" 1>&6
1558else
1559 cat > conftest.$ac_ext <<EOF
b93f016b 1560#line 1561 "configure"
fcfc3c0c
TT
1561#include "confdefs.h"
1562#include <stdlib.h>
1563#include <stdarg.h>
1564#include <string.h>
1565#include <float.h>
1566EOF
1567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 1568{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 1569ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
fcfc3c0c
TT
1570if test -z "$ac_err"; then
1571 rm -rf conftest*
1572 ac_cv_header_stdc=yes
1573else
1574 echo "$ac_err" >&5
1575 echo "configure: failed program was:" >&5
1576 cat conftest.$ac_ext >&5
1577 rm -rf conftest*
1578 ac_cv_header_stdc=no
1579fi
1580rm -f conftest*
1581
1582if test $ac_cv_header_stdc = yes; then
1583 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1584cat > conftest.$ac_ext <<EOF
b93f016b 1585#line 1586 "configure"
fcfc3c0c
TT
1586#include "confdefs.h"
1587#include <string.h>
1588EOF
1589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1590 egrep "memchr" >/dev/null 2>&1; then
1591 :
1592else
1593 rm -rf conftest*
1594 ac_cv_header_stdc=no
1595fi
1596rm -f conftest*
1597
1598fi
1599
1600if test $ac_cv_header_stdc = yes; then
1601 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1602cat > conftest.$ac_ext <<EOF
b93f016b 1603#line 1604 "configure"
fcfc3c0c
TT
1604#include "confdefs.h"
1605#include <stdlib.h>
1606EOF
1607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1608 egrep "free" >/dev/null 2>&1; then
1609 :
1610else
1611 rm -rf conftest*
1612 ac_cv_header_stdc=no
1613fi
1614rm -f conftest*
1615
1616fi
1617
1618if test $ac_cv_header_stdc = yes; then
1619 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1620if test "$cross_compiling" = yes; then
1621 :
1622else
1623 cat > conftest.$ac_ext <<EOF
b93f016b 1624#line 1625 "configure"
fcfc3c0c
TT
1625#include "confdefs.h"
1626#include <ctype.h>
1627#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1628#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1629#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1630int main () { int i; for (i = 0; i < 256; i++)
1631if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1632exit (0); }
1633
1634EOF
b93f016b 1635if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
1636then
1637 :
1638else
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
1641 rm -fr conftest*
1642 ac_cv_header_stdc=no
1643fi
1644rm -fr conftest*
1645fi
1646
1647fi
1648fi
1649
1650echo "$ac_t""$ac_cv_header_stdc" 1>&6
1651if test $ac_cv_header_stdc = yes; then
1652 cat >> confdefs.h <<\EOF
1653#define STDC_HEADERS 1
1654EOF
1655
1656fi
1657
1658echo $ac_n "checking for working const""... $ac_c" 1>&6
b93f016b 1659echo "configure:1660: checking for working const" >&5
fcfc3c0c
TT
1660if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1661 echo $ac_n "(cached) $ac_c" 1>&6
1662else
1663 cat > conftest.$ac_ext <<EOF
b93f016b 1664#line 1665 "configure"
fcfc3c0c
TT
1665#include "confdefs.h"
1666
1667int main() {
1668
1669/* Ultrix mips cc rejects this. */
1670typedef int charset[2]; const charset x;
1671/* SunOS 4.1.1 cc rejects this. */
1672char const *const *ccp;
1673char **p;
1674/* NEC SVR4.0.2 mips cc rejects this. */
1675struct point {int x, y;};
1676static struct point const zero = {0,0};
1677/* AIX XL C 1.02.0.0 rejects this.
1678 It does not let you subtract one const X* pointer from another in an arm
1679 of an if-expression whose if-part is not a constant expression */
1680const char *g = "string";
1681ccp = &g + (g ? g-g : 0);
1682/* HPUX 7.0 cc rejects these. */
1683++ccp;
1684p = (char**) ccp;
1685ccp = (char const *const *) p;
1686{ /* SCO 3.2v4 cc rejects this. */
1687 char *t;
1688 char const *s = 0 ? (char *) 0 : (char const *) 0;
1689
1690 *t++ = 0;
1691}
1692{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1693 int x[] = {25, 17};
1694 const int *foo = &x[0];
1695 ++foo;
1696}
1697{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1698 typedef const int *iptr;
1699 iptr p = 0;
1700 ++p;
1701}
1702{ /* AIX XL C 1.02.0.0 rejects this saying
1703 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1704 struct s { int j; const int *ap[3]; };
1705 struct s *b; b->j = 5;
1706}
1707{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1708 const int foo = 10;
1709}
1710
1711; return 0; }
1712EOF
b93f016b 1713if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fcfc3c0c
TT
1714 rm -rf conftest*
1715 ac_cv_c_const=yes
1716else
1717 echo "configure: failed program was:" >&5
1718 cat conftest.$ac_ext >&5
1719 rm -rf conftest*
1720 ac_cv_c_const=no
1721fi
1722rm -f conftest*
1723fi
1724
1725echo "$ac_t""$ac_cv_c_const" 1>&6
1726if test $ac_cv_c_const = no; then
1727 cat >> confdefs.h <<\EOF
1728#define const
1729EOF
1730
1731fi
1732
1733echo $ac_n "checking for inline""... $ac_c" 1>&6
b93f016b 1734echo "configure:1735: checking for inline" >&5
fcfc3c0c
TT
1735if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1737else
1738 ac_cv_c_inline=no
1739for ac_kw in inline __inline__ __inline; do
1740 cat > conftest.$ac_ext <<EOF
b93f016b 1741#line 1742 "configure"
fcfc3c0c
TT
1742#include "confdefs.h"
1743
1744int main() {
1745} $ac_kw foo() {
1746; return 0; }
1747EOF
b93f016b 1748if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fcfc3c0c
TT
1749 rm -rf conftest*
1750 ac_cv_c_inline=$ac_kw; break
1751else
1752 echo "configure: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754fi
1755rm -f conftest*
1756done
1757
1758fi
1759
1760echo "$ac_t""$ac_cv_c_inline" 1>&6
1761case "$ac_cv_c_inline" in
1762 inline | yes) ;;
1763 no) cat >> confdefs.h <<\EOF
1764#define inline
1765EOF
1766 ;;
1767 *) cat >> confdefs.h <<EOF
1768#define inline $ac_cv_c_inline
1769EOF
1770 ;;
1771esac
1772
1773echo $ac_n "checking for off_t""... $ac_c" 1>&6
b93f016b 1774echo "configure:1775: checking for off_t" >&5
fcfc3c0c
TT
1775if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777else
1778 cat > conftest.$ac_ext <<EOF
b93f016b 1779#line 1780 "configure"
fcfc3c0c
TT
1780#include "confdefs.h"
1781#include <sys/types.h>
1782#if STDC_HEADERS
1783#include <stdlib.h>
1784#include <stddef.h>
1785#endif
1786EOF
1787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b93f016b 1788 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
fcfc3c0c
TT
1789 rm -rf conftest*
1790 ac_cv_type_off_t=yes
1791else
1792 rm -rf conftest*
1793 ac_cv_type_off_t=no
1794fi
1795rm -f conftest*
1796
1797fi
1798echo "$ac_t""$ac_cv_type_off_t" 1>&6
1799if test $ac_cv_type_off_t = no; then
1800 cat >> confdefs.h <<\EOF
1801#define off_t long
1802EOF
1803
1804fi
1805
1806echo $ac_n "checking for size_t""... $ac_c" 1>&6
b93f016b 1807echo "configure:1808: checking for size_t" >&5
fcfc3c0c
TT
1808if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1810else
1811 cat > conftest.$ac_ext <<EOF
b93f016b 1812#line 1813 "configure"
fcfc3c0c
TT
1813#include "confdefs.h"
1814#include <sys/types.h>
1815#if STDC_HEADERS
1816#include <stdlib.h>
1817#include <stddef.h>
1818#endif
1819EOF
1820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b93f016b 1821 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
fcfc3c0c
TT
1822 rm -rf conftest*
1823 ac_cv_type_size_t=yes
1824else
1825 rm -rf conftest*
1826 ac_cv_type_size_t=no
1827fi
1828rm -f conftest*
1829
1830fi
1831echo "$ac_t""$ac_cv_type_size_t" 1>&6
1832if test $ac_cv_type_size_t = no; then
1833 cat >> confdefs.h <<\EOF
1834#define size_t unsigned
1835EOF
1836
1837fi
1838
1839# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1840# for constant arguments. Useless!
1841echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
b93f016b 1842echo "configure:1843: checking for working alloca.h" >&5
fcfc3c0c
TT
1843if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846 cat > conftest.$ac_ext <<EOF
b93f016b 1847#line 1848 "configure"
fcfc3c0c
TT
1848#include "confdefs.h"
1849#include <alloca.h>
1850int main() {
1851char *p = alloca(2 * sizeof(int));
1852; return 0; }
1853EOF
b93f016b 1854if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
1855 rm -rf conftest*
1856 ac_cv_header_alloca_h=yes
1857else
1858 echo "configure: failed program was:" >&5
1859 cat conftest.$ac_ext >&5
1860 rm -rf conftest*
1861 ac_cv_header_alloca_h=no
1862fi
1863rm -f conftest*
1864fi
1865
1866echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1867if test $ac_cv_header_alloca_h = yes; then
1868 cat >> confdefs.h <<\EOF
1869#define HAVE_ALLOCA_H 1
1870EOF
1871
1872fi
1873
1874echo $ac_n "checking for alloca""... $ac_c" 1>&6
b93f016b 1875echo "configure:1876: checking for alloca" >&5
fcfc3c0c
TT
1876if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1877 echo $ac_n "(cached) $ac_c" 1>&6
1878else
1879 cat > conftest.$ac_ext <<EOF
b93f016b 1880#line 1881 "configure"
fcfc3c0c
TT
1881#include "confdefs.h"
1882
1883#ifdef __GNUC__
1884# define alloca __builtin_alloca
1885#else
4b23e55c
JM
1886# ifdef _MSC_VER
1887# include <malloc.h>
1888# define alloca _alloca
fcfc3c0c 1889# else
4b23e55c
JM
1890# if HAVE_ALLOCA_H
1891# include <alloca.h>
ba68ad57 1892# else
4b23e55c
JM
1893# ifdef _AIX
1894 #pragma alloca
1895# else
1896# ifndef alloca /* predefined by HP cc +Olibcalls */
fcfc3c0c 1897char *alloca ();
4b23e55c 1898# endif
fcfc3c0c
TT
1899# endif
1900# endif
1901# endif
1902#endif
1903
1904int main() {
1905char *p = (char *) alloca(1);
1906; return 0; }
1907EOF
b93f016b 1908if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
1909 rm -rf conftest*
1910 ac_cv_func_alloca_works=yes
1911else
1912 echo "configure: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 rm -rf conftest*
1915 ac_cv_func_alloca_works=no
1916fi
1917rm -f conftest*
1918fi
1919
1920echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1921if test $ac_cv_func_alloca_works = yes; then
1922 cat >> confdefs.h <<\EOF
1923#define HAVE_ALLOCA 1
1924EOF
1925
1926fi
1927
1928if test $ac_cv_func_alloca_works = no; then
1929 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1930 # that cause trouble. Some versions do not even contain alloca or
1931 # contain a buggy version. If you still want to use their alloca,
1932 # use ar to extract alloca.o from them instead of compiling alloca.c.
4b23e55c 1933 ALLOCA=alloca.${ac_objext}
fcfc3c0c
TT
1934 cat >> confdefs.h <<\EOF
1935#define C_ALLOCA 1
1936EOF
1937
1938
1939echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
b93f016b 1940echo "configure:1941: checking whether alloca needs Cray hooks" >&5
fcfc3c0c
TT
1941if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1943else
1944 cat > conftest.$ac_ext <<EOF
b93f016b 1945#line 1946 "configure"
fcfc3c0c
TT
1946#include "confdefs.h"
1947#if defined(CRAY) && ! defined(CRAY2)
1948webecray
1949#else
1950wenotbecray
1951#endif
1952
1953EOF
1954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1955 egrep "webecray" >/dev/null 2>&1; then
1956 rm -rf conftest*
1957 ac_cv_os_cray=yes
1958else
1959 rm -rf conftest*
1960 ac_cv_os_cray=no
1961fi
1962rm -f conftest*
1963
1964fi
1965
1966echo "$ac_t""$ac_cv_os_cray" 1>&6
1967if test $ac_cv_os_cray = yes; then
1968for ac_func in _getb67 GETB67 getb67; do
1969 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 1970echo "configure:1971: checking for $ac_func" >&5
fcfc3c0c
TT
1971if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1972 echo $ac_n "(cached) $ac_c" 1>&6
1973else
1974 cat > conftest.$ac_ext <<EOF
b93f016b 1975#line 1976 "configure"
fcfc3c0c
TT
1976#include "confdefs.h"
1977/* System header to define __stub macros and hopefully few prototypes,
1978 which can conflict with char $ac_func(); below. */
1979#include <assert.h>
1980/* Override any gcc2 internal prototype to avoid an error. */
1981/* We use char because int might match the return type of a gcc2
1982 builtin and then its argument prototype would still apply. */
1983char $ac_func();
1984
1985int main() {
1986
1987/* The GNU C library defines this for functions which it implements
1988 to always fail with ENOSYS. Some functions are actually named
1989 something starting with __ and the normal name is an alias. */
1990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1991choke me
1992#else
1993$ac_func();
1994#endif
1995
1996; return 0; }
1997EOF
b93f016b 1998if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
1999 rm -rf conftest*
2000 eval "ac_cv_func_$ac_func=yes"
2001else
2002 echo "configure: failed program was:" >&5
2003 cat conftest.$ac_ext >&5
2004 rm -rf conftest*
2005 eval "ac_cv_func_$ac_func=no"
2006fi
2007rm -f conftest*
2008fi
2009
2010if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2011 echo "$ac_t""yes" 1>&6
2012 cat >> confdefs.h <<EOF
2013#define CRAY_STACKSEG_END $ac_func
2014EOF
2015
2016 break
2017else
2018 echo "$ac_t""no" 1>&6
2019fi
2020
2021done
2022fi
2023
2024echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
b93f016b 2025echo "configure:2026: checking stack direction for C alloca" >&5
fcfc3c0c
TT
2026if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2027 echo $ac_n "(cached) $ac_c" 1>&6
2028else
2029 if test "$cross_compiling" = yes; then
2030 ac_cv_c_stack_direction=0
2031else
2032 cat > conftest.$ac_ext <<EOF
b93f016b 2033#line 2034 "configure"
fcfc3c0c
TT
2034#include "confdefs.h"
2035find_stack_direction ()
2036{
2037 static char *addr = 0;
2038 auto char dummy;
2039 if (addr == 0)
2040 {
2041 addr = &dummy;
2042 return find_stack_direction ();
2043 }
2044 else
2045 return (&dummy > addr) ? 1 : -1;
2046}
2047main ()
2048{
2049 exit (find_stack_direction() < 0);
2050}
2051EOF
b93f016b 2052if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
2053then
2054 ac_cv_c_stack_direction=1
2055else
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 rm -fr conftest*
2059 ac_cv_c_stack_direction=-1
2060fi
2061rm -fr conftest*
2062fi
2063
2064fi
2065
2066echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2067cat >> confdefs.h <<EOF
2068#define STACK_DIRECTION $ac_cv_c_stack_direction
2069EOF
2070
2071fi
2072
2073for ac_hdr in unistd.h
2074do
2075ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2076echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b93f016b 2077echo "configure:2078: checking for $ac_hdr" >&5
fcfc3c0c
TT
2078if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080else
2081 cat > conftest.$ac_ext <<EOF
b93f016b 2082#line 2083 "configure"
fcfc3c0c
TT
2083#include "confdefs.h"
2084#include <$ac_hdr>
2085EOF
2086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 2087{ (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 2088ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
fcfc3c0c
TT
2089if test -z "$ac_err"; then
2090 rm -rf conftest*
2091 eval "ac_cv_header_$ac_safe=yes"
2092else
2093 echo "$ac_err" >&5
2094 echo "configure: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=no"
2098fi
2099rm -f conftest*
2100fi
2101if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2102 echo "$ac_t""yes" 1>&6
2103 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2104 cat >> confdefs.h <<EOF
2105#define $ac_tr_hdr 1
2106EOF
2107
2108else
2109 echo "$ac_t""no" 1>&6
2110fi
2111done
2112
2113for ac_func in getpagesize
2114do
2115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 2116echo "configure:2117: checking for $ac_func" >&5
fcfc3c0c
TT
2117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119else
2120 cat > conftest.$ac_ext <<EOF
b93f016b 2121#line 2122 "configure"
fcfc3c0c
TT
2122#include "confdefs.h"
2123/* System header to define __stub macros and hopefully few prototypes,
2124 which can conflict with char $ac_func(); below. */
2125#include <assert.h>
2126/* Override any gcc2 internal prototype to avoid an error. */
2127/* We use char because int might match the return type of a gcc2
2128 builtin and then its argument prototype would still apply. */
2129char $ac_func();
2130
2131int main() {
2132
2133/* The GNU C library defines this for functions which it implements
2134 to always fail with ENOSYS. Some functions are actually named
2135 something starting with __ and the normal name is an alias. */
2136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2137choke me
2138#else
2139$ac_func();
2140#endif
2141
2142; return 0; }
2143EOF
b93f016b 2144if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2145 rm -rf conftest*
2146 eval "ac_cv_func_$ac_func=yes"
2147else
2148 echo "configure: failed program was:" >&5
2149 cat conftest.$ac_ext >&5
2150 rm -rf conftest*
2151 eval "ac_cv_func_$ac_func=no"
2152fi
2153rm -f conftest*
2154fi
2155
2156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2157 echo "$ac_t""yes" 1>&6
2158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2159 cat >> confdefs.h <<EOF
2160#define $ac_tr_func 1
2161EOF
2162
2163else
2164 echo "$ac_t""no" 1>&6
2165fi
2166done
2167
2168echo $ac_n "checking for working mmap""... $ac_c" 1>&6
b93f016b 2169echo "configure:2170: checking for working mmap" >&5
fcfc3c0c
TT
2170if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172else
2173 if test "$cross_compiling" = yes; then
2174 ac_cv_func_mmap_fixed_mapped=no
2175else
2176 cat > conftest.$ac_ext <<EOF
b93f016b 2177#line 2178 "configure"
fcfc3c0c
TT
2178#include "confdefs.h"
2179
2180/* Thanks to Mike Haertel and Jim Avera for this test.
2181 Here is a matrix of mmap possibilities:
2182 mmap private not fixed
2183 mmap private fixed at somewhere currently unmapped
2184 mmap private fixed at somewhere already mapped
2185 mmap shared not fixed
2186 mmap shared fixed at somewhere currently unmapped
2187 mmap shared fixed at somewhere already mapped
2188 For private mappings, we should verify that changes cannot be read()
2189 back from the file, nor mmap's back from the file at a different
2190 address. (There have been systems where private was not correctly
2191 implemented like the infamous i386 svr4.0, and systems where the
2192 VM page cache was not coherent with the filesystem buffer cache
2193 like early versions of FreeBSD and possibly contemporary NetBSD.)
2194 For shared mappings, we should conversely verify that changes get
2195 propogated back to all the places they're supposed to be.
2196
2197 Grep wants private fixed already mapped.
2198 The main things grep needs to know about mmap are:
2199 * does it exist and is it safe to write into the mmap'd area
2200 * how to use it (BSD variants) */
2201#include <sys/types.h>
2202#include <fcntl.h>
2203#include <sys/mman.h>
2204
2205/* This mess was copied from the GNU getpagesize.h. */
2206#ifndef HAVE_GETPAGESIZE
2207# ifdef HAVE_UNISTD_H
2208# include <unistd.h>
2209# endif
2210
2211/* Assume that all systems that can run configure have sys/param.h. */
2212# ifndef HAVE_SYS_PARAM_H
2213# define HAVE_SYS_PARAM_H 1
2214# endif
2215
2216# ifdef _SC_PAGESIZE
2217# define getpagesize() sysconf(_SC_PAGESIZE)
2218# else /* no _SC_PAGESIZE */
2219# ifdef HAVE_SYS_PARAM_H
2220# include <sys/param.h>
2221# ifdef EXEC_PAGESIZE
2222# define getpagesize() EXEC_PAGESIZE
2223# else /* no EXEC_PAGESIZE */
2224# ifdef NBPG
2225# define getpagesize() NBPG * CLSIZE
2226# ifndef CLSIZE
2227# define CLSIZE 1
2228# endif /* no CLSIZE */
2229# else /* no NBPG */
2230# ifdef NBPC
2231# define getpagesize() NBPC
2232# else /* no NBPC */
2233# ifdef PAGESIZE
2234# define getpagesize() PAGESIZE
2235# endif /* PAGESIZE */
2236# endif /* no NBPC */
2237# endif /* no NBPG */
2238# endif /* no EXEC_PAGESIZE */
2239# else /* no HAVE_SYS_PARAM_H */
2240# define getpagesize() 8192 /* punt totally */
2241# endif /* no HAVE_SYS_PARAM_H */
2242# endif /* no _SC_PAGESIZE */
2243
2244#endif /* no HAVE_GETPAGESIZE */
2245
2246#ifdef __cplusplus
2247extern "C" { void *malloc(unsigned); }
2248#else
2249char *malloc();
2250#endif
2251
2252int
2253main()
2254{
2255 char *data, *data2, *data3;
2256 int i, pagesize;
2257 int fd;
2258
2259 pagesize = getpagesize();
2260
2261 /*
2262 * First, make a file with some known garbage in it.
2263 */
2264 data = malloc(pagesize);
2265 if (!data)
2266 exit(1);
2267 for (i = 0; i < pagesize; ++i)
2268 *(data + i) = rand();
2269 umask(0);
2270 fd = creat("conftestmmap", 0600);
2271 if (fd < 0)
2272 exit(1);
2273 if (write(fd, data, pagesize) != pagesize)
2274 exit(1);
2275 close(fd);
2276
2277 /*
2278 * Next, try to mmap the file at a fixed address which
2279 * already has something else allocated at it. If we can,
2280 * also make sure that we see the same garbage.
2281 */
2282 fd = open("conftestmmap", O_RDWR);
2283 if (fd < 0)
2284 exit(1);
2285 data2 = malloc(2 * pagesize);
2286 if (!data2)
2287 exit(1);
2288 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2289 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2290 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2291 exit(1);
2292 for (i = 0; i < pagesize; ++i)
2293 if (*(data + i) != *(data2 + i))
2294 exit(1);
2295
2296 /*
2297 * Finally, make sure that changes to the mapped area
2298 * do not percolate back to the file as seen by read().
2299 * (This is a bug on some variants of i386 svr4.0.)
2300 */
2301 for (i = 0; i < pagesize; ++i)
2302 *(data2 + i) = *(data2 + i) + 1;
2303 data3 = malloc(pagesize);
2304 if (!data3)
2305 exit(1);
2306 if (read(fd, data3, pagesize) != pagesize)
2307 exit(1);
2308 for (i = 0; i < pagesize; ++i)
2309 if (*(data + i) != *(data3 + i))
2310 exit(1);
2311 close(fd);
2312 unlink("conftestmmap");
2313 exit(0);
2314}
2315
2316EOF
b93f016b 2317if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
2318then
2319 ac_cv_func_mmap_fixed_mapped=yes
2320else
2321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2323 rm -fr conftest*
2324 ac_cv_func_mmap_fixed_mapped=no
2325fi
2326rm -fr conftest*
2327fi
2328
2329fi
2330
2331echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2332if test $ac_cv_func_mmap_fixed_mapped = yes; then
2333 cat >> confdefs.h <<\EOF
2334#define HAVE_MMAP 1
2335EOF
2336
2337fi
2338
2339
2340 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2341unistd.h values.h sys/param.h
2342do
2343ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2344echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b93f016b 2345echo "configure:2346: checking for $ac_hdr" >&5
fcfc3c0c
TT
2346if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 cat > conftest.$ac_ext <<EOF
b93f016b 2350#line 2351 "configure"
fcfc3c0c
TT
2351#include "confdefs.h"
2352#include <$ac_hdr>
2353EOF
2354ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 2355{ (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 2356ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
fcfc3c0c
TT
2357if test -z "$ac_err"; then
2358 rm -rf conftest*
2359 eval "ac_cv_header_$ac_safe=yes"
2360else
2361 echo "$ac_err" >&5
2362 echo "configure: failed program was:" >&5
2363 cat conftest.$ac_ext >&5
2364 rm -rf conftest*
2365 eval "ac_cv_header_$ac_safe=no"
2366fi
2367rm -f conftest*
2368fi
2369if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2370 echo "$ac_t""yes" 1>&6
2371 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2372 cat >> confdefs.h <<EOF
2373#define $ac_tr_hdr 1
2374EOF
2375
2376else
2377 echo "$ac_t""no" 1>&6
2378fi
2379done
2380
2381 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2382__argz_count __argz_stringify __argz_next
2383do
2384echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 2385echo "configure:2386: checking for $ac_func" >&5
fcfc3c0c
TT
2386if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2387 echo $ac_n "(cached) $ac_c" 1>&6
2388else
2389 cat > conftest.$ac_ext <<EOF
b93f016b 2390#line 2391 "configure"
fcfc3c0c
TT
2391#include "confdefs.h"
2392/* System header to define __stub macros and hopefully few prototypes,
2393 which can conflict with char $ac_func(); below. */
2394#include <assert.h>
2395/* Override any gcc2 internal prototype to avoid an error. */
2396/* We use char because int might match the return type of a gcc2
2397 builtin and then its argument prototype would still apply. */
2398char $ac_func();
2399
2400int main() {
2401
2402/* The GNU C library defines this for functions which it implements
2403 to always fail with ENOSYS. Some functions are actually named
2404 something starting with __ and the normal name is an alias. */
2405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2406choke me
2407#else
2408$ac_func();
2409#endif
2410
2411; return 0; }
2412EOF
b93f016b 2413if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2414 rm -rf conftest*
2415 eval "ac_cv_func_$ac_func=yes"
2416else
2417 echo "configure: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 rm -rf conftest*
2420 eval "ac_cv_func_$ac_func=no"
2421fi
2422rm -f conftest*
2423fi
2424
2425if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2426 echo "$ac_t""yes" 1>&6
2427 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2428 cat >> confdefs.h <<EOF
2429#define $ac_tr_func 1
2430EOF
2431
2432else
2433 echo "$ac_t""no" 1>&6
2434fi
2435done
2436
2437
2438 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2439 for ac_func in stpcpy
2440do
2441echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 2442echo "configure:2443: checking for $ac_func" >&5
fcfc3c0c
TT
2443if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445else
2446 cat > conftest.$ac_ext <<EOF
b93f016b 2447#line 2448 "configure"
fcfc3c0c
TT
2448#include "confdefs.h"
2449/* System header to define __stub macros and hopefully few prototypes,
2450 which can conflict with char $ac_func(); below. */
2451#include <assert.h>
2452/* Override any gcc2 internal prototype to avoid an error. */
2453/* We use char because int might match the return type of a gcc2
2454 builtin and then its argument prototype would still apply. */
2455char $ac_func();
2456
2457int main() {
2458
2459/* The GNU C library defines this for functions which it implements
2460 to always fail with ENOSYS. Some functions are actually named
2461 something starting with __ and the normal name is an alias. */
2462#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2463choke me
2464#else
2465$ac_func();
2466#endif
2467
2468; return 0; }
2469EOF
b93f016b 2470if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2471 rm -rf conftest*
2472 eval "ac_cv_func_$ac_func=yes"
2473else
2474 echo "configure: failed program was:" >&5
2475 cat conftest.$ac_ext >&5
2476 rm -rf conftest*
2477 eval "ac_cv_func_$ac_func=no"
2478fi
2479rm -f conftest*
2480fi
2481
2482if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2483 echo "$ac_t""yes" 1>&6
2484 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2485 cat >> confdefs.h <<EOF
2486#define $ac_tr_func 1
2487EOF
2488
2489else
2490 echo "$ac_t""no" 1>&6
2491fi
2492done
2493
2494 fi
2495 if test "${ac_cv_func_stpcpy}" = "yes"; then
2496 cat >> confdefs.h <<\EOF
2497#define HAVE_STPCPY 1
2498EOF
2499
2500 fi
2501
2502 if test $ac_cv_header_locale_h = yes; then
2503 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
b93f016b 2504echo "configure:2505: checking for LC_MESSAGES" >&5
fcfc3c0c
TT
2505if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2506 echo $ac_n "(cached) $ac_c" 1>&6
2507else
2508 cat > conftest.$ac_ext <<EOF
b93f016b 2509#line 2510 "configure"
fcfc3c0c
TT
2510#include "confdefs.h"
2511#include <locale.h>
2512int main() {
2513return LC_MESSAGES
2514; return 0; }
2515EOF
b93f016b 2516if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2517 rm -rf conftest*
2518 am_cv_val_LC_MESSAGES=yes
2519else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 rm -rf conftest*
2523 am_cv_val_LC_MESSAGES=no
2524fi
2525rm -f conftest*
2526fi
2527
2528echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2529 if test $am_cv_val_LC_MESSAGES = yes; then
2530 cat >> confdefs.h <<\EOF
2531#define HAVE_LC_MESSAGES 1
2532EOF
2533
2534 fi
2535 fi
2536 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
b93f016b 2537echo "configure:2538: checking whether NLS is requested" >&5
fcfc3c0c
TT
2538 # Check whether --enable-nls or --disable-nls was given.
2539if test "${enable_nls+set}" = set; then
2540 enableval="$enable_nls"
2541 USE_NLS=$enableval
2542else
2543 USE_NLS=yes
2544fi
2545
2546 echo "$ac_t""$USE_NLS" 1>&6
2547
2548
2549 USE_INCLUDED_LIBINTL=no
2550
2551 if test "$USE_NLS" = "yes"; then
2552 cat >> confdefs.h <<\EOF
2553#define ENABLE_NLS 1
2554EOF
2555
2556 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
b93f016b 2557echo "configure:2558: checking whether included gettext is requested" >&5
fcfc3c0c
TT
2558 # Check whether --with-included-gettext or --without-included-gettext was given.
2559if test "${with_included_gettext+set}" = set; then
2560 withval="$with_included_gettext"
2561 nls_cv_force_use_gnu_gettext=$withval
2562else
2563 nls_cv_force_use_gnu_gettext=no
2564fi
2565
2566 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2567
2568 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2569 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2570 nls_cv_header_intl=
2571 nls_cv_header_libgt=
2572 CATOBJEXT=NONE
2573
2574 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2575echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
b93f016b 2576echo "configure:2577: checking for libintl.h" >&5
fcfc3c0c
TT
2577if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579else
2580 cat > conftest.$ac_ext <<EOF
b93f016b 2581#line 2582 "configure"
fcfc3c0c
TT
2582#include "confdefs.h"
2583#include <libintl.h>
2584EOF
2585ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 2586{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 2587ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
fcfc3c0c
TT
2588if test -z "$ac_err"; then
2589 rm -rf conftest*
2590 eval "ac_cv_header_$ac_safe=yes"
2591else
2592 echo "$ac_err" >&5
2593 echo "configure: failed program was:" >&5
2594 cat conftest.$ac_ext >&5
2595 rm -rf conftest*
2596 eval "ac_cv_header_$ac_safe=no"
2597fi
2598rm -f conftest*
2599fi
2600if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2601 echo "$ac_t""yes" 1>&6
2602 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
b93f016b 2603echo "configure:2604: checking for gettext in libc" >&5
fcfc3c0c
TT
2604if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2605 echo $ac_n "(cached) $ac_c" 1>&6
2606else
2607 cat > conftest.$ac_ext <<EOF
b93f016b 2608#line 2609 "configure"
fcfc3c0c
TT
2609#include "confdefs.h"
2610#include <libintl.h>
2611int main() {
2612return (int) gettext ("")
2613; return 0; }
2614EOF
b93f016b 2615if { (eval echo configure:2616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2616 rm -rf conftest*
2617 gt_cv_func_gettext_libc=yes
2618else
2619 echo "configure: failed program was:" >&5
2620 cat conftest.$ac_ext >&5
2621 rm -rf conftest*
2622 gt_cv_func_gettext_libc=no
2623fi
2624rm -f conftest*
2625fi
2626
2627echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2628
2629 if test "$gt_cv_func_gettext_libc" != "yes"; then
2630 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
b93f016b 2631echo "configure:2632: checking for bindtextdomain in -lintl" >&5
fcfc3c0c
TT
2632ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2633if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2634 echo $ac_n "(cached) $ac_c" 1>&6
2635else
2636 ac_save_LIBS="$LIBS"
2637LIBS="-lintl $LIBS"
2638cat > conftest.$ac_ext <<EOF
b93f016b 2639#line 2640 "configure"
fcfc3c0c
TT
2640#include "confdefs.h"
2641/* Override any gcc2 internal prototype to avoid an error. */
2642/* We use char because int might match the return type of a gcc2
2643 builtin and then its argument prototype would still apply. */
2644char bindtextdomain();
2645
2646int main() {
2647bindtextdomain()
2648; return 0; }
2649EOF
b93f016b 2650if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2651 rm -rf conftest*
2652 eval "ac_cv_lib_$ac_lib_var=yes"
2653else
2654 echo "configure: failed program was:" >&5
2655 cat conftest.$ac_ext >&5
2656 rm -rf conftest*
2657 eval "ac_cv_lib_$ac_lib_var=no"
2658fi
2659rm -f conftest*
2660LIBS="$ac_save_LIBS"
2661
2662fi
2663if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2664 echo "$ac_t""yes" 1>&6
2665 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
b93f016b 2666echo "configure:2667: checking for gettext in libintl" >&5
fcfc3c0c
TT
2667if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2668 echo $ac_n "(cached) $ac_c" 1>&6
2669else
2670 cat > conftest.$ac_ext <<EOF
b93f016b 2671#line 2672 "configure"
fcfc3c0c
TT
2672#include "confdefs.h"
2673
2674int main() {
2675return (int) gettext ("")
2676; return 0; }
2677EOF
b93f016b 2678if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2679 rm -rf conftest*
2680 gt_cv_func_gettext_libintl=yes
2681else
2682 echo "configure: failed program was:" >&5
2683 cat conftest.$ac_ext >&5
2684 rm -rf conftest*
2685 gt_cv_func_gettext_libintl=no
2686fi
2687rm -f conftest*
2688fi
2689
2690echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2691else
2692 echo "$ac_t""no" 1>&6
2693fi
2694
2695 fi
2696
2697 if test "$gt_cv_func_gettext_libc" = "yes" \
2698 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2699 cat >> confdefs.h <<\EOF
2700#define HAVE_GETTEXT 1
2701EOF
2702
2703 # Extract the first word of "msgfmt", so it can be a program name with args.
2704set dummy msgfmt; ac_word=$2
2705echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2706echo "configure:2707: checking for $ac_word" >&5
fcfc3c0c
TT
2707if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2708 echo $ac_n "(cached) $ac_c" 1>&6
2709else
2710 case "$MSGFMT" in
2711 /*)
2712 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2713 ;;
2714 *)
2715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2716 for ac_dir in $PATH; do
2717 test -z "$ac_dir" && ac_dir=.
2718 if test -f $ac_dir/$ac_word; then
2719 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2720 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2721 break
2722 fi
2723 fi
2724 done
2725 IFS="$ac_save_ifs"
2726 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2727 ;;
2728esac
2729fi
2730MSGFMT="$ac_cv_path_MSGFMT"
2731if test -n "$MSGFMT"; then
2732 echo "$ac_t""$MSGFMT" 1>&6
2733else
2734 echo "$ac_t""no" 1>&6
2735fi
2736 if test "$MSGFMT" != "no"; then
2737 for ac_func in dcgettext
2738do
2739echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 2740echo "configure:2741: checking for $ac_func" >&5
fcfc3c0c
TT
2741if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744 cat > conftest.$ac_ext <<EOF
b93f016b 2745#line 2746 "configure"
fcfc3c0c
TT
2746#include "confdefs.h"
2747/* System header to define __stub macros and hopefully few prototypes,
2748 which can conflict with char $ac_func(); below. */
2749#include <assert.h>
2750/* Override any gcc2 internal prototype to avoid an error. */
2751/* We use char because int might match the return type of a gcc2
2752 builtin and then its argument prototype would still apply. */
2753char $ac_func();
2754
2755int main() {
2756
2757/* The GNU C library defines this for functions which it implements
2758 to always fail with ENOSYS. Some functions are actually named
2759 something starting with __ and the normal name is an alias. */
2760#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2761choke me
2762#else
2763$ac_func();
2764#endif
2765
2766; return 0; }
2767EOF
b93f016b 2768if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2769 rm -rf conftest*
2770 eval "ac_cv_func_$ac_func=yes"
2771else
2772 echo "configure: failed program was:" >&5
2773 cat conftest.$ac_ext >&5
2774 rm -rf conftest*
2775 eval "ac_cv_func_$ac_func=no"
2776fi
2777rm -f conftest*
2778fi
2779
2780if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2781 echo "$ac_t""yes" 1>&6
2782 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2783 cat >> confdefs.h <<EOF
2784#define $ac_tr_func 1
2785EOF
2786
2787else
2788 echo "$ac_t""no" 1>&6
2789fi
2790done
2791
2792 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2793set dummy gmsgfmt; ac_word=$2
2794echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2795echo "configure:2796: checking for $ac_word" >&5
fcfc3c0c
TT
2796if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2797 echo $ac_n "(cached) $ac_c" 1>&6
2798else
2799 case "$GMSGFMT" in
2800 /*)
2801 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2802 ;;
4b23e55c
JM
2803 ?:/*)
2804 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2805 ;;
fcfc3c0c 2806 *)
4b23e55c 2807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
2808 ac_dummy="$PATH"
2809 for ac_dir in $ac_dummy; do
fcfc3c0c
TT
2810 test -z "$ac_dir" && ac_dir=.
2811 if test -f $ac_dir/$ac_word; then
2812 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2813 break
2814 fi
2815 done
2816 IFS="$ac_save_ifs"
2817 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2818 ;;
2819esac
2820fi
2821GMSGFMT="$ac_cv_path_GMSGFMT"
2822if test -n "$GMSGFMT"; then
2823 echo "$ac_t""$GMSGFMT" 1>&6
2824else
2825 echo "$ac_t""no" 1>&6
2826fi
2827
2828 # Extract the first word of "xgettext", so it can be a program name with args.
2829set dummy xgettext; ac_word=$2
2830echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2831echo "configure:2832: checking for $ac_word" >&5
fcfc3c0c
TT
2832if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2833 echo $ac_n "(cached) $ac_c" 1>&6
2834else
2835 case "$XGETTEXT" in
2836 /*)
2837 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2838 ;;
2839 *)
2840 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2841 for ac_dir in $PATH; do
2842 test -z "$ac_dir" && ac_dir=.
2843 if test -f $ac_dir/$ac_word; then
2844 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2845 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2846 break
2847 fi
2848 fi
2849 done
2850 IFS="$ac_save_ifs"
2851 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2852 ;;
2853esac
2854fi
2855XGETTEXT="$ac_cv_path_XGETTEXT"
2856if test -n "$XGETTEXT"; then
2857 echo "$ac_t""$XGETTEXT" 1>&6
2858else
2859 echo "$ac_t""no" 1>&6
2860fi
2861
2862 cat > conftest.$ac_ext <<EOF
b93f016b 2863#line 2864 "configure"
fcfc3c0c
TT
2864#include "confdefs.h"
2865
2866int main() {
2867extern int _nl_msg_cat_cntr;
2868 return _nl_msg_cat_cntr
2869; return 0; }
2870EOF
b93f016b 2871if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
fcfc3c0c
TT
2872 rm -rf conftest*
2873 CATOBJEXT=.gmo
2874 DATADIRNAME=share
2875else
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2878 rm -rf conftest*
2879 CATOBJEXT=.mo
2880 DATADIRNAME=lib
5436fc65
C
2881fi
2882rm -f conftest*
fcfc3c0c
TT
2883 INSTOBJEXT=.mo
2884 fi
2885 fi
2886
2887else
2888 echo "$ac_t""no" 1>&6
5436fc65 2889fi
fcfc3c0c
TT
2890
2891
2892
2893 if test "$CATOBJEXT" = "NONE"; then
2894 nls_cv_use_gnu_gettext=yes
2895 fi
2896 fi
2897
2898 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2899 INTLOBJS="\$(GETTOBJS)"
2900 # Extract the first word of "msgfmt", so it can be a program name with args.
2901set dummy msgfmt; ac_word=$2
2902echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2903echo "configure:2904: checking for $ac_word" >&5
fcfc3c0c
TT
2904if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2905 echo $ac_n "(cached) $ac_c" 1>&6
2906else
2907 case "$MSGFMT" in
2908 /*)
2909 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2910 ;;
2911 *)
2912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2913 for ac_dir in $PATH; do
2914 test -z "$ac_dir" && ac_dir=.
2915 if test -f $ac_dir/$ac_word; then
2916 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2917 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2918 break
2919 fi
2920 fi
2921 done
2922 IFS="$ac_save_ifs"
2923 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2924 ;;
2925esac
5436fc65 2926fi
fcfc3c0c
TT
2927MSGFMT="$ac_cv_path_MSGFMT"
2928if test -n "$MSGFMT"; then
2929 echo "$ac_t""$MSGFMT" 1>&6
dedcc91d 2930else
fcfc3c0c 2931 echo "$ac_t""no" 1>&6
5436fc65 2932fi
5436fc65 2933
fcfc3c0c
TT
2934 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2935set dummy gmsgfmt; ac_word=$2
2936echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2937echo "configure:2938: checking for $ac_word" >&5
fcfc3c0c
TT
2938if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2939 echo $ac_n "(cached) $ac_c" 1>&6
2940else
2941 case "$GMSGFMT" in
2942 /*)
2943 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2944 ;;
4b23e55c
JM
2945 ?:/*)
2946 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2947 ;;
fcfc3c0c 2948 *)
4b23e55c 2949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
2950 ac_dummy="$PATH"
2951 for ac_dir in $ac_dummy; do
fcfc3c0c
TT
2952 test -z "$ac_dir" && ac_dir=.
2953 if test -f $ac_dir/$ac_word; then
2954 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2955 break
2956 fi
2957 done
2958 IFS="$ac_save_ifs"
2959 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2960 ;;
2961esac
2962fi
2963GMSGFMT="$ac_cv_path_GMSGFMT"
2964if test -n "$GMSGFMT"; then
2965 echo "$ac_t""$GMSGFMT" 1>&6
2966else
2967 echo "$ac_t""no" 1>&6
2968fi
5436fc65 2969
fcfc3c0c
TT
2970 # Extract the first word of "xgettext", so it can be a program name with args.
2971set dummy xgettext; ac_word=$2
2972echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 2973echo "configure:2974: checking for $ac_word" >&5
fcfc3c0c
TT
2974if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2975 echo $ac_n "(cached) $ac_c" 1>&6
2976else
2977 case "$XGETTEXT" in
2978 /*)
2979 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2980 ;;
2981 *)
2982 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2983 for ac_dir in $PATH; do
2984 test -z "$ac_dir" && ac_dir=.
2985 if test -f $ac_dir/$ac_word; then
2986 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2987 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2988 break
2989 fi
2990 fi
2991 done
2992 IFS="$ac_save_ifs"
2993 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2994 ;;
2995esac
2996fi
2997XGETTEXT="$ac_cv_path_XGETTEXT"
2998if test -n "$XGETTEXT"; then
2999 echo "$ac_t""$XGETTEXT" 1>&6
5436fc65 3000else
5436fc65
C
3001 echo "$ac_t""no" 1>&6
3002fi
5436fc65 3003
fcfc3c0c
TT
3004
3005 USE_INCLUDED_LIBINTL=yes
3006 CATOBJEXT=.gmo
3007 INSTOBJEXT=.mo
3008 DATADIRNAME=share
3009 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3010 INTLLIBS=$INTLDEPS
3011 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3012 nls_cv_header_intl=libintl.h
3013 nls_cv_header_libgt=libgettext.h
3014 fi
5436fc65 3015
fcfc3c0c
TT
3016 if test "$XGETTEXT" != ":"; then
3017 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3018 : ;
3019 else
3020 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3021 XGETTEXT=":"
3022 fi
3023 fi
3024
3025 # We need to process the po/ directory.
3026 POSUB=po
3027 else
3028 DATADIRNAME=share
3029 nls_cv_header_intl=libintl.h
3030 nls_cv_header_libgt=libgettext.h
3031 fi
3032
3033 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3034 # because some of the sources are only built for this goal.
3035 if test "$PACKAGE" = gettext; then
3036 USE_NLS=yes
3037 USE_INCLUDED_LIBINTL=yes
3038 fi
3039
3040 for lang in $ALL_LINGUAS; do
3041 GMOFILES="$GMOFILES $lang.gmo"
3042 POFILES="$POFILES $lang.po"
3043 done
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058 if test "x$CATOBJEXT" != "x"; then
3059 if test "x$ALL_LINGUAS" = "x"; then
3060 LINGUAS=
3061 else
3062 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
b93f016b 3063echo "configure:3064: checking for catalogs to be installed" >&5
fcfc3c0c
TT
3064 NEW_LINGUAS=
3065 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3066 case "$ALL_LINGUAS" in
3067 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3068 esac
3069 done
3070 LINGUAS=$NEW_LINGUAS
3071 echo "$ac_t""$LINGUAS" 1>&6
3072 fi
3073
3074 if test -n "$LINGUAS"; then
3075 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3076 fi
3077 fi
3078
3079 if test $ac_cv_header_locale_h = yes; then
3080 INCLUDE_LOCALE_H="#include <locale.h>"
3081 else
3082 INCLUDE_LOCALE_H="\
3083/* The system does not provide the header <locale.h>. Take care yourself. */"
3084 fi
3085
3086
3087 if test -f $srcdir/po2tbl.sed.in; then
3088 if test "$CATOBJEXT" = ".cat"; then
3089 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3090echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
b93f016b 3091echo "configure:3092: checking for linux/version.h" >&5
5436fc65
C
3092if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3093 echo $ac_n "(cached) $ac_c" 1>&6
3094else
3095 cat > conftest.$ac_ext <<EOF
b93f016b 3096#line 3097 "configure"
5436fc65 3097#include "confdefs.h"
fcfc3c0c 3098#include <linux/version.h>
5436fc65 3099EOF
1a7b4b7c 3100ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 3101{ (eval echo configure:3102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 3102ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436fc65
C
3103if test -z "$ac_err"; then
3104 rm -rf conftest*
3105 eval "ac_cv_header_$ac_safe=yes"
3106else
3107 echo "$ac_err" >&5
bfde4a67
SG
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
5436fc65
C
3110 rm -rf conftest*
3111 eval "ac_cv_header_$ac_safe=no"
3112fi
3113rm -f conftest*
3114fi
3115if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3116 echo "$ac_t""yes" 1>&6
fcfc3c0c 3117 msgformat=linux
5436fc65
C
3118else
3119 echo "$ac_t""no" 1>&6
fcfc3c0c 3120msgformat=xopen
0579b53d
GN
3121fi
3122
0579b53d 3123
fcfc3c0c
TT
3124 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3125 fi
3126 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3127 $srcdir/po2tbl.sed.in > po2tbl.sed
3128 fi
3129
3130 if test "$PACKAGE" = "gettext"; then
3131 GT_NO="#NO#"
3132 GT_YES=
3133 else
3134 GT_NO=
3135 GT_YES="#YES#"
3136 fi
3137
3138
0579b53d 3139
fcfc3c0c
TT
3140 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3141
0579b53d 3142
fcfc3c0c
TT
3143 l=
3144
0579b53d 3145
fcfc3c0c
TT
3146 if test -d $srcdir/po; then
3147 test -d po || mkdir po
3148 if test "x$srcdir" != "x."; then
3149 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3150 posrcprefix="$srcdir/"
3151 else
3152 posrcprefix="../$srcdir/"
3153 fi
3154 else
3155 posrcprefix="../"
3156 fi
3157 rm -f po/POTFILES
3158 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3159 < $srcdir/po/POTFILES.in > po/POTFILES
3160 fi
3161
0579b53d 3162
bfde4a67
SG
3163
3164CONFIG_OBS=
018d76dd 3165CONFIG_DEPS=
c7bb1531 3166CONFIG_SRCS=
bfde4a67
SG
3167
3168configdirs="doc testsuite"
3169
3170
3171. ${srcdir}/configure.host
3172
3173. ${srcdir}/configure.tgt
3174
3175
5436fc65
C
3176# Find a good install program. We prefer a C program (faster),
3177# so one script is as good as another. But avoid the broken or
3178# incompatible versions:
3179# SysV /etc/install, /usr/sbin/install
3180# SunOS /usr/etc/install
3181# IRIX /sbin/install
3182# AIX /bin/install
4b23e55c 3183# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5436fc65
C
3184# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3185# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3186# ./install, which can be erroneously created by make from ./install.sh.
3187echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
b93f016b 3188echo "configure:3189: checking for a BSD compatible install" >&5
5436fc65
C
3189if test -z "$INSTALL"; then
3190if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3191 echo $ac_n "(cached) $ac_c" 1>&6
3192else
4b23e55c 3193 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
5436fc65
C
3194 for ac_dir in $PATH; do
3195 # Account for people who put trailing slashes in PATH elements.
3196 case "$ac_dir/" in
3197 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3198 *)
3199 # OSF1 and SCO ODT 3.0 have their own names for install.
4b23e55c
JM
3200 # Don't use installbsd from OSF since it installs stuff as root
3201 # by default.
3202 for ac_prog in ginstall scoinst install; do
5436fc65
C
3203 if test -f $ac_dir/$ac_prog; then
3204 if test $ac_prog = install &&
3205 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3206 # AIX install. It has an incompatible calling convention.
5436fc65
C
3207 :
3208 else
3209 ac_cv_path_install="$ac_dir/$ac_prog -c"
3210 break 2
3211 fi
3212 fi
3213 done
3214 ;;
3215 esac
3216 done
bfde4a67 3217 IFS="$ac_save_IFS"
1a7b4b7c 3218
5436fc65 3219fi
1a7b4b7c
DE
3220 if test "${ac_cv_path_install+set}" = set; then
3221 INSTALL="$ac_cv_path_install"
3222 else
3223 # As a last resort, use the slow shell script. We don't cache a
3224 # path for INSTALL within a source directory, because that will
3225 # break other packages using the cache if that directory is
3226 # removed, or if the path is relative.
3227 INSTALL="$ac_install_sh"
3228 fi
5436fc65
C
3229fi
3230echo "$ac_t""$INSTALL" 1>&6
3231
3232# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3233# It thinks the first close brace ends the variable substitution.
3234test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3235
b93f016b
GN
3236test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3237
5436fc65
C
3238test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3239
d8efbc66
FF
3240if test $host != $build; then
3241 ac_tool_prefix=${host_alias}-
3242else
3243 ac_tool_prefix=
3244fi
3245
3246# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3247set dummy ${ac_tool_prefix}ar; ac_word=$2
3248echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 3249echo "configure:3250: checking for $ac_word" >&5
d8efbc66
FF
3250if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3251 echo $ac_n "(cached) $ac_c" 1>&6
3252else
3253 if test -n "$AR"; then
3254 ac_cv_prog_AR="$AR" # Let the user override the test.
3255else
4b23e55c 3256 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
3257 ac_dummy="$PATH"
3258 for ac_dir in $ac_dummy; do
d8efbc66
FF
3259 test -z "$ac_dir" && ac_dir=.
3260 if test -f $ac_dir/$ac_word; then
3261 ac_cv_prog_AR="${ac_tool_prefix}ar"
3262 break
3263 fi
3264 done
3265 IFS="$ac_save_ifs"
3266 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3267fi
3268fi
3269AR="$ac_cv_prog_AR"
3270if test -n "$AR"; then
3271 echo "$ac_t""$AR" 1>&6
3272else
3273 echo "$ac_t""no" 1>&6
3274fi
3275
3276
3277
3278# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3279set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3280echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 3281echo "configure:3282: checking for $ac_word" >&5
d8efbc66
FF
3282if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284else
3285 if test -n "$RANLIB"; then
3286 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3287else
4b23e55c 3288 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
3289 ac_dummy="$PATH"
3290 for ac_dir in $ac_dummy; do
d8efbc66
FF
3291 test -z "$ac_dir" && ac_dir=.
3292 if test -f $ac_dir/$ac_word; then
3293 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3294 break
3295 fi
3296 done
3297 IFS="$ac_save_ifs"
3298fi
3299fi
3300RANLIB="$ac_cv_prog_RANLIB"
3301if test -n "$RANLIB"; then
3302 echo "$ac_t""$RANLIB" 1>&6
3303else
3304 echo "$ac_t""no" 1>&6
3305fi
3306
3307
3308if test -z "$ac_cv_prog_RANLIB"; then
3309if test -n "$ac_tool_prefix"; then
3310 # Extract the first word of "ranlib", so it can be a program name with args.
5436fc65
C
3311set dummy ranlib; ac_word=$2
3312echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 3313echo "configure:3314: checking for $ac_word" >&5
5436fc65
C
3314if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3315 echo $ac_n "(cached) $ac_c" 1>&6
3316else
3317 if test -n "$RANLIB"; then
3318 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3319else
4b23e55c 3320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
3321 ac_dummy="$PATH"
3322 for ac_dir in $ac_dummy; do
5436fc65
C
3323 test -z "$ac_dir" && ac_dir=.
3324 if test -f $ac_dir/$ac_word; then
3325 ac_cv_prog_RANLIB="ranlib"
3326 break
3327 fi
3328 done
3329 IFS="$ac_save_ifs"
3330 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3331fi
3332fi
3333RANLIB="$ac_cv_prog_RANLIB"
3334if test -n "$RANLIB"; then
3335 echo "$ac_t""$RANLIB" 1>&6
3336else
3337 echo "$ac_t""no" 1>&6
3338fi
3339
d8efbc66
FF
3340else
3341 RANLIB=":"
3342fi
3343fi
3344
204c8825
FF
3345for ac_prog in 'bison -y' byacc
3346do
3347# Extract the first word of "$ac_prog", so it can be a program name with args.
3348set dummy $ac_prog; ac_word=$2
3349echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b93f016b 3350echo "configure:3351: checking for $ac_word" >&5
204c8825
FF
3351if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353else
3354 if test -n "$YACC"; then
3355 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3356else
4b23e55c 3357 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b93f016b
GN
3358 ac_dummy="$PATH"
3359 for ac_dir in $ac_dummy; do
204c8825
FF
3360 test -z "$ac_dir" && ac_dir=.
3361 if test -f $ac_dir/$ac_word; then
3362 ac_cv_prog_YACC="$ac_prog"
3363 break
3364 fi
3365 done
3366 IFS="$ac_save_ifs"
3367fi
3368fi
3369YACC="$ac_cv_prog_YACC"
3370if test -n "$YACC"; then
3371 echo "$ac_t""$YACC" 1>&6
3372else
3373 echo "$ac_t""no" 1>&6
3374fi
3375
3376test -n "$YACC" && break
3377done
3378test -n "$YACC" || YACC="yacc"
3379
5436fc65 3380
5436fc65
C
3381if test "$program_transform_name" = s,x,x,; then
3382 program_transform_name=
3383else
1a7b4b7c
DE
3384 # Double any \ or $. echo might interpret backslashes.
3385 cat <<\EOF_SED > conftestsed
3386s,\\,\\\\,g; s,\$,$$,g
3387EOF_SED
5436fc65
C
3388 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3389 rm -f conftestsed
3390fi
3391test "$program_prefix" != NONE &&
3392 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3393# Use a double $ so make ignores it.
3394test "$program_suffix" != NONE &&
3395 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3396
3397# sed with no file args requires a program.
3398test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3399
3400
c14cabba 3401echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
b93f016b 3402echo "configure:3403: checking return type of signal handlers" >&5
c14cabba
AC
3403if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
3406 cat > conftest.$ac_ext <<EOF
b93f016b 3407#line 3408 "configure"
c14cabba
AC
3408#include "confdefs.h"
3409#include <sys/types.h>
3410#include <signal.h>
3411#ifdef signal
3412#undef signal
3413#endif
3414#ifdef __cplusplus
3415extern "C" void (*signal (int, void (*)(int)))(int);
3416#else
3417void (*signal ()) ();
3418#endif
3419
3420int main() {
3421int i;
3422; return 0; }
3423EOF
b93f016b 3424if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c14cabba
AC
3425 rm -rf conftest*
3426 ac_cv_type_signal=void
3427else
3428 echo "configure: failed program was:" >&5
3429 cat conftest.$ac_ext >&5
3430 rm -rf conftest*
3431 ac_cv_type_signal=int
3432fi
3433rm -f conftest*
3434fi
3435
3436echo "$ac_t""$ac_cv_type_signal" 1>&6
3437cat >> confdefs.h <<EOF
3438#define RETSIGTYPE $ac_cv_type_signal
3439EOF
3440
3441
3442
2b576293 3443echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
b93f016b 3444echo "configure:3445: checking for ANSI C header files" >&5
2b576293
C
3445if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3446 echo $ac_n "(cached) $ac_c" 1>&6
3447else
3448 cat > conftest.$ac_ext <<EOF
b93f016b 3449#line 3450 "configure"
2b576293
C
3450#include "confdefs.h"
3451#include <stdlib.h>
3452#include <stdarg.h>
3453#include <string.h>
3454#include <float.h>
3455EOF
1a7b4b7c 3456ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 3457{ (eval echo configure:3458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 3458ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2b576293
C
3459if test -z "$ac_err"; then
3460 rm -rf conftest*
3461 ac_cv_header_stdc=yes
3462else
3463 echo "$ac_err" >&5
bfde4a67
SG
3464 echo "configure: failed program was:" >&5
3465 cat conftest.$ac_ext >&5
2b576293
C
3466 rm -rf conftest*
3467 ac_cv_header_stdc=no
3468fi
3469rm -f conftest*
3470
3471if test $ac_cv_header_stdc = yes; then
3472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3473cat > conftest.$ac_ext <<EOF
b93f016b 3474#line 3475 "configure"
2b576293
C
3475#include "confdefs.h"
3476#include <string.h>
3477EOF
3478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3479 egrep "memchr" >/dev/null 2>&1; then
3480 :
3481else
3482 rm -rf conftest*
3483 ac_cv_header_stdc=no
3484fi
3485rm -f conftest*
3486
3487fi
3488
3489if test $ac_cv_header_stdc = yes; then
3490 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3491cat > conftest.$ac_ext <<EOF
b93f016b 3492#line 3493 "configure"
2b576293
C
3493#include "confdefs.h"
3494#include <stdlib.h>
3495EOF
3496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3497 egrep "free" >/dev/null 2>&1; then
3498 :
3499else
3500 rm -rf conftest*
3501 ac_cv_header_stdc=no
3502fi
3503rm -f conftest*
3504
3505fi
3506
3507if test $ac_cv_header_stdc = yes; then
3508 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3509if test "$cross_compiling" = yes; then
1a7b4b7c 3510 :
2b576293 3511else
bfde4a67 3512 cat > conftest.$ac_ext <<EOF
b93f016b 3513#line 3514 "configure"
2b576293
C
3514#include "confdefs.h"
3515#include <ctype.h>
3516#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3517#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3518#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3519int main () { int i; for (i = 0; i < 256; i++)
3520if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3521exit (0); }
3522
3523EOF
b93f016b 3524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bfde4a67 3525then
2b576293
C
3526 :
3527else
bfde4a67
SG
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 rm -fr conftest*
2b576293
C
3531 ac_cv_header_stdc=no
3532fi
ef6c51d1 3533rm -fr conftest*
bfde4a67
SG
3534fi
3535
2b576293
C
3536fi
3537fi
1a7b4b7c 3538
2b576293
C
3539echo "$ac_t""$ac_cv_header_stdc" 1>&6
3540if test $ac_cv_header_stdc = yes; then
3541 cat >> confdefs.h <<\EOF
3542#define STDC_HEADERS 1
3543EOF
3544
3545fi
3546
b0f33a03 3547for ac_hdr in ctype.h curses.h endian.h libintl.h link.h \
4ff3dfab 3548 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
b0f33a03 3549 string.h sys/procfs.h sys/ptrace.h sys/reg.h \
4ff3dfab 3550 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
1dee2761 3551 wchar.h wctype.h asm/debugreg.h
1a494973 3552do
bfde4a67 3553ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1a494973 3554echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b93f016b 3555echo "configure:3556: checking for $ac_hdr" >&5
1a494973
C
3556if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3557 echo $ac_n "(cached) $ac_c" 1>&6
3558else
3559 cat > conftest.$ac_ext <<EOF
b93f016b 3560#line 3561 "configure"
1a494973
C
3561#include "confdefs.h"
3562#include <$ac_hdr>
3563EOF
1a7b4b7c 3564ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 3565{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 3566ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1a494973
C
3567if test -z "$ac_err"; then
3568 rm -rf conftest*
3569 eval "ac_cv_header_$ac_safe=yes"
3570else
3571 echo "$ac_err" >&5
bfde4a67
SG
3572 echo "configure: failed program was:" >&5
3573 cat conftest.$ac_ext >&5
1a494973
C
3574 rm -rf conftest*
3575 eval "ac_cv_header_$ac_safe=no"
3576fi
3577rm -f conftest*
3578fi
3579if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3580 echo "$ac_t""yes" 1>&6
bfde4a67 3581 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1a494973
C
3582 cat >> confdefs.h <<EOF
3583#define $ac_tr_hdr 1
3584EOF
3585
3586else
3587 echo "$ac_t""no" 1>&6
3588fi
3589done
3590
eac4afd1 3591
2b576293 3592echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
b93f016b 3593echo "configure:3594: checking whether stat file-mode macros are broken" >&5
2b576293
C
3594if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
3596else
3597 cat > conftest.$ac_ext <<EOF
b93f016b 3598#line 3599 "configure"
2b576293
C
3599#include "confdefs.h"
3600#include <sys/types.h>
3601#include <sys/stat.h>
3602
3603#if defined(S_ISBLK) && defined(S_IFDIR)
3604# if S_ISBLK (S_IFDIR)
3605You lose.
3606# endif
3607#endif
3608
3609#if defined(S_ISBLK) && defined(S_IFCHR)
3610# if S_ISBLK (S_IFCHR)
3611You lose.
3612# endif
3613#endif
3614
3615#if defined(S_ISLNK) && defined(S_IFREG)
3616# if S_ISLNK (S_IFREG)
3617You lose.
3618# endif
3619#endif
3620
3621#if defined(S_ISSOCK) && defined(S_IFREG)
3622# if S_ISSOCK (S_IFREG)
3623You lose.
3624# endif
3625#endif
3626
3627EOF
3628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3629 egrep "You lose" >/dev/null 2>&1; then
3630 rm -rf conftest*
3631 ac_cv_header_stat_broken=yes
3632else
3633 rm -rf conftest*
3634 ac_cv_header_stat_broken=no
3635fi
3636rm -f conftest*
3637
3638fi
1a7b4b7c 3639
2b576293
C
3640echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3641if test $ac_cv_header_stat_broken = yes; then
3642 cat >> confdefs.h <<\EOF
3643#define STAT_MACROS_BROKEN 1
3644EOF
3645
3646fi
3647
3648
8501c742 3649echo $ac_n "checking for working const""... $ac_c" 1>&6
b93f016b 3650echo "configure:3651: checking for working const" >&5
8501c742
SG
3651if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
3653else
3654 cat > conftest.$ac_ext <<EOF
b93f016b 3655#line 3656 "configure"
8501c742
SG
3656#include "confdefs.h"
3657
bfde4a67 3658int main() {
8501c742
SG
3659
3660/* Ultrix mips cc rejects this. */
3661typedef int charset[2]; const charset x;
3662/* SunOS 4.1.1 cc rejects this. */
3663char const *const *ccp;
3664char **p;
3665/* NEC SVR4.0.2 mips cc rejects this. */
3666struct point {int x, y;};
3667static struct point const zero = {0,0};
3668/* AIX XL C 1.02.0.0 rejects this.
3669 It does not let you subtract one const X* pointer from another in an arm
3670 of an if-expression whose if-part is not a constant expression */
3671const char *g = "string";
3672ccp = &g + (g ? g-g : 0);
3673/* HPUX 7.0 cc rejects these. */
3674++ccp;
3675p = (char**) ccp;
3676ccp = (char const *const *) p;
3677{ /* SCO 3.2v4 cc rejects this. */
3678 char *t;
3679 char const *s = 0 ? (char *) 0 : (char const *) 0;
3680
3681 *t++ = 0;
3682}
3683{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3684 int x[] = {25, 17};
3685 const int *foo = &x[0];
3686 ++foo;
3687}
3688{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3689 typedef const int *iptr;
3690 iptr p = 0;
3691 ++p;
3692}
3693{ /* AIX XL C 1.02.0.0 rejects this saying
3694 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3695 struct s { int j; const int *ap[3]; };
3696 struct s *b; b->j = 5;
3697}
3698{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3699 const int foo = 10;
3700}
3701
3702; return 0; }
3703EOF
b93f016b 3704if { (eval echo configure:3705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8501c742
SG
3705 rm -rf conftest*
3706 ac_cv_c_const=yes
3707else
bfde4a67
SG
3708 echo "configure: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
8501c742
SG
3710 rm -rf conftest*
3711 ac_cv_c_const=no
3712fi
3713rm -f conftest*
8501c742
SG
3714fi
3715
3716echo "$ac_t""$ac_cv_c_const" 1>&6
3717if test $ac_cv_c_const = no; then
3718 cat >> confdefs.h <<\EOF
3719#define const
3720EOF
3721
3722fi
3723
3724
b0f33a03 3725for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc
72ae15f6
FF
3726do
3727echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 3728echo "configure:3729: checking for $ac_func" >&5
72ae15f6
FF
3729if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3731else
3732 cat > conftest.$ac_ext <<EOF
b93f016b 3733#line 3734 "configure"
72ae15f6
FF
3734#include "confdefs.h"
3735/* System header to define __stub macros and hopefully few prototypes,
3736 which can conflict with char $ac_func(); below. */
3737#include <assert.h>
3738/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
3739/* We use char because int might match the return type of a gcc2
3740 builtin and then its argument prototype would still apply. */
1a7b4b7c 3741char $ac_func();
72ae15f6 3742
bfde4a67 3743int main() {
72ae15f6
FF
3744
3745/* The GNU C library defines this for functions which it implements
3746 to always fail with ENOSYS. Some functions are actually named
3747 something starting with __ and the normal name is an alias. */
3748#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3749choke me
3750#else
3751$ac_func();
3752#endif
3753
3754; return 0; }
3755EOF
b93f016b 3756if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
72ae15f6
FF
3757 rm -rf conftest*
3758 eval "ac_cv_func_$ac_func=yes"
3759else
bfde4a67
SG
3760 echo "configure: failed program was:" >&5
3761 cat conftest.$ac_ext >&5
72ae15f6
FF
3762 rm -rf conftest*
3763 eval "ac_cv_func_$ac_func=no"
3764fi
3765rm -f conftest*
ef6c51d1 3766fi
bfde4a67 3767
72ae15f6
FF
3768if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3769 echo "$ac_t""yes" 1>&6
1a7b4b7c 3770 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
72ae15f6
FF
3771 cat >> confdefs.h <<EOF
3772#define $ac_tr_func 1
3773EOF
3774
3775else
3776 echo "$ac_t""no" 1>&6
3777fi
3778done
3779
0aa3233e
ILT
3780# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3781# for constant arguments. Useless!
3782echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
b93f016b 3783echo "configure:3784: checking for working alloca.h" >&5
0aa3233e
ILT
3784if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3785 echo $ac_n "(cached) $ac_c" 1>&6
3786else
3787 cat > conftest.$ac_ext <<EOF
b93f016b 3788#line 3789 "configure"
0aa3233e
ILT
3789#include "confdefs.h"
3790#include <alloca.h>
3791int main() {
3792char *p = alloca(2 * sizeof(int));
3793; return 0; }
3794EOF
b93f016b 3795if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0aa3233e
ILT
3796 rm -rf conftest*
3797 ac_cv_header_alloca_h=yes
3798else
3799 echo "configure: failed program was:" >&5
3800 cat conftest.$ac_ext >&5
3801 rm -rf conftest*
3802 ac_cv_header_alloca_h=no
3803fi
3804rm -f conftest*
3805fi
3806
3807echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3808if test $ac_cv_header_alloca_h = yes; then
3809 cat >> confdefs.h <<\EOF
3810#define HAVE_ALLOCA_H 1
3811EOF
3812
3813fi
3814
3815echo $ac_n "checking for alloca""... $ac_c" 1>&6
b93f016b 3816echo "configure:3817: checking for alloca" >&5
0aa3233e
ILT
3817if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3818 echo $ac_n "(cached) $ac_c" 1>&6
3819else
3820 cat > conftest.$ac_ext <<EOF
b93f016b 3821#line 3822 "configure"
0aa3233e
ILT
3822#include "confdefs.h"
3823
3824#ifdef __GNUC__
3825# define alloca __builtin_alloca
3826#else
4b23e55c
JM
3827# ifdef _MSC_VER
3828# include <malloc.h>
3829# define alloca _alloca
0aa3233e 3830# else
4b23e55c
JM
3831# if HAVE_ALLOCA_H
3832# include <alloca.h>
ba68ad57 3833# else
4b23e55c
JM
3834# ifdef _AIX
3835 #pragma alloca
3836# else
3837# ifndef alloca /* predefined by HP cc +Olibcalls */
0aa3233e 3838char *alloca ();
4b23e55c 3839# endif
0aa3233e
ILT
3840# endif
3841# endif
3842# endif
3843#endif
3844
3845int main() {
3846char *p = (char *) alloca(1);
3847; return 0; }
3848EOF
b93f016b 3849if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0aa3233e
ILT
3850 rm -rf conftest*
3851 ac_cv_func_alloca_works=yes
3852else
3853 echo "configure: failed program was:" >&5
3854 cat conftest.$ac_ext >&5
3855 rm -rf conftest*
3856 ac_cv_func_alloca_works=no
3857fi
3858rm -f conftest*
3859fi
3860
3861echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3862if test $ac_cv_func_alloca_works = yes; then
3863 cat >> confdefs.h <<\EOF
3864#define HAVE_ALLOCA 1
3865EOF
3866
3867fi
3868
3869if test $ac_cv_func_alloca_works = no; then
3870 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3871 # that cause trouble. Some versions do not even contain alloca or
3872 # contain a buggy version. If you still want to use their alloca,
3873 # use ar to extract alloca.o from them instead of compiling alloca.c.
4b23e55c 3874 ALLOCA=alloca.${ac_objext}
0aa3233e
ILT
3875 cat >> confdefs.h <<\EOF
3876#define C_ALLOCA 1
3877EOF
3878
3879
3880echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
b93f016b 3881echo "configure:3882: checking whether alloca needs Cray hooks" >&5
0aa3233e
ILT
3882if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3884else
3885 cat > conftest.$ac_ext <<EOF
b93f016b 3886#line 3887 "configure"
0aa3233e
ILT
3887#include "confdefs.h"
3888#if defined(CRAY) && ! defined(CRAY2)
3889webecray
3890#else
3891wenotbecray
3892#endif
3893
3894EOF
3895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3896 egrep "webecray" >/dev/null 2>&1; then
3897 rm -rf conftest*
3898 ac_cv_os_cray=yes
3899else
3900 rm -rf conftest*
3901 ac_cv_os_cray=no
3902fi
3903rm -f conftest*
3904
3905fi
3906
3907echo "$ac_t""$ac_cv_os_cray" 1>&6
3908if test $ac_cv_os_cray = yes; then
3909for ac_func in _getb67 GETB67 getb67; do
3910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 3911echo "configure:3912: checking for $ac_func" >&5
0aa3233e
ILT
3912if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3914else
3915 cat > conftest.$ac_ext <<EOF
b93f016b 3916#line 3917 "configure"
0aa3233e
ILT
3917#include "confdefs.h"
3918/* System header to define __stub macros and hopefully few prototypes,
3919 which can conflict with char $ac_func(); below. */
3920#include <assert.h>
3921/* Override any gcc2 internal prototype to avoid an error. */
3922/* We use char because int might match the return type of a gcc2
3923 builtin and then its argument prototype would still apply. */
3924char $ac_func();
3925
3926int main() {
3927
3928/* The GNU C library defines this for functions which it implements
3929 to always fail with ENOSYS. Some functions are actually named
3930 something starting with __ and the normal name is an alias. */
3931#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3932choke me
3933#else
3934$ac_func();
3935#endif
3936
3937; return 0; }
3938EOF
b93f016b 3939if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0aa3233e
ILT
3940 rm -rf conftest*
3941 eval "ac_cv_func_$ac_func=yes"
3942else
3943 echo "configure: failed program was:" >&5
3944 cat conftest.$ac_ext >&5
3945 rm -rf conftest*
3946 eval "ac_cv_func_$ac_func=no"
3947fi
3948rm -f conftest*
3949fi
3950
3951if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3952 echo "$ac_t""yes" 1>&6
3953 cat >> confdefs.h <<EOF
3954#define CRAY_STACKSEG_END $ac_func
3955EOF
3956
3957 break
3958else
3959 echo "$ac_t""no" 1>&6
3960fi
3961
3962done
3963fi
3964
3965echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
b93f016b 3966echo "configure:3967: checking stack direction for C alloca" >&5
0aa3233e
ILT
3967if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3968 echo $ac_n "(cached) $ac_c" 1>&6
3969else
3970 if test "$cross_compiling" = yes; then
3971 ac_cv_c_stack_direction=0
3972else
3973 cat > conftest.$ac_ext <<EOF
b93f016b 3974#line 3975 "configure"
0aa3233e
ILT
3975#include "confdefs.h"
3976find_stack_direction ()
3977{
3978 static char *addr = 0;
3979 auto char dummy;
3980 if (addr == 0)
3981 {
3982 addr = &dummy;
3983 return find_stack_direction ();
3984 }
3985 else
3986 return (&dummy > addr) ? 1 : -1;
3987}
3988main ()
3989{
3990 exit (find_stack_direction() < 0);
3991}
3992EOF
b93f016b 3993if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0aa3233e
ILT
3994then
3995 ac_cv_c_stack_direction=1
3996else
3997 echo "configure: failed program was:" >&5
3998 cat conftest.$ac_ext >&5
3999 rm -fr conftest*
4000 ac_cv_c_stack_direction=-1
4001fi
4002rm -fr conftest*
4003fi
4004
4005fi
4006
4007echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4008cat >> confdefs.h <<EOF
4009#define STACK_DIRECTION $ac_cv_c_stack_direction
4010EOF
4011
4012fi
4013
72ae15f6 4014
87feff9d 4015echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
b93f016b 4016echo "configure:4017: checking whether malloc must be declared" >&5
87feff9d
JM
4017if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020 cat > conftest.$ac_ext <<EOF
b93f016b 4021#line 4022 "configure"
87feff9d
JM
4022#include "confdefs.h"
4023
4024#include <stdio.h>
4025#ifdef HAVE_STRING_H
4026#include <string.h>
4027#else
4028#ifdef HAVE_STRINGS_H
4029#include <strings.h>
4030#endif
4031#endif
4032#ifdef HAVE_STDLIB_H
4033#include <stdlib.h>
4034#endif
4035#ifdef HAVE_UNISTD_H
4036#include <unistd.h>
4037#endif
4038int main() {
4039char *(*pfn) = (char *(*)) malloc
4040; return 0; }
4041EOF
b93f016b 4042if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
87feff9d
JM
4043 rm -rf conftest*
4044 bfd_cv_decl_needed_malloc=no
4045else
4046 echo "configure: failed program was:" >&5
4047 cat conftest.$ac_ext >&5
4048 rm -rf conftest*
4049 bfd_cv_decl_needed_malloc=yes
4050fi
4051rm -f conftest*
4052fi
4053
4054echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4055if test $bfd_cv_decl_needed_malloc = yes; then
4056 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4057 cat >> confdefs.h <<EOF
4058#define $bfd_tr_decl 1
4059EOF
4060
4061fi
4062
4063echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
b93f016b 4064echo "configure:4065: checking whether realloc must be declared" >&5
87feff9d
JM
4065if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4066 echo $ac_n "(cached) $ac_c" 1>&6
4067else
4068 cat > conftest.$ac_ext <<EOF
b93f016b 4069#line 4070 "configure"
87feff9d
JM
4070#include "confdefs.h"
4071
4072#include <stdio.h>
4073#ifdef HAVE_STRING_H
4074#include <string.h>
4075#else
4076#ifdef HAVE_STRINGS_H
4077#include <strings.h>
4078#endif
4079#endif
4080#ifdef HAVE_STDLIB_H
4081#include <stdlib.h>
4082#endif
4083#ifdef HAVE_UNISTD_H
4084#include <unistd.h>
4085#endif
4086int main() {
4087char *(*pfn) = (char *(*)) realloc
4088; return 0; }
4089EOF
b93f016b 4090if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
87feff9d
JM
4091 rm -rf conftest*
4092 bfd_cv_decl_needed_realloc=no
4093else
4094 echo "configure: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 rm -rf conftest*
4097 bfd_cv_decl_needed_realloc=yes
4098fi
4099rm -f conftest*
4100fi
4101
4102echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4103if test $bfd_cv_decl_needed_realloc = yes; then
4104 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4105 cat >> confdefs.h <<EOF
4106#define $bfd_tr_decl 1
4107EOF
4108
4109fi
4110
4111echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
b93f016b 4112echo "configure:4113: checking whether free must be declared" >&5
87feff9d
JM
4113if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4114 echo $ac_n "(cached) $ac_c" 1>&6
4115else
4116 cat > conftest.$ac_ext <<EOF
b93f016b 4117#line 4118 "configure"
87feff9d
JM
4118#include "confdefs.h"
4119
4120#include <stdio.h>
4121#ifdef HAVE_STRING_H
4122#include <string.h>
4123#else
4124#ifdef HAVE_STRINGS_H
4125#include <strings.h>
4126#endif
4127#endif
4128#ifdef HAVE_STDLIB_H
4129#include <stdlib.h>
4130#endif
4131#ifdef HAVE_UNISTD_H
4132#include <unistd.h>
4133#endif
4134int main() {
4135char *(*pfn) = (char *(*)) free
4136; return 0; }
4137EOF
b93f016b 4138if { (eval echo configure:4139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
87feff9d
JM
4139 rm -rf conftest*
4140 bfd_cv_decl_needed_free=no
4141else
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144 rm -rf conftest*
4145 bfd_cv_decl_needed_free=yes
4146fi
4147rm -f conftest*
4148fi
4149
4150echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4151if test $bfd_cv_decl_needed_free = yes; then
4152 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4153 cat >> confdefs.h <<EOF
4154#define $bfd_tr_decl 1
4155EOF
4156
4157fi
4158
4159echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
b93f016b 4160echo "configure:4161: checking whether strerror must be declared" >&5
87feff9d
JM
4161if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4162 echo $ac_n "(cached) $ac_c" 1>&6
4163else
4164 cat > conftest.$ac_ext <<EOF
b93f016b 4165#line 4166 "configure"
87feff9d
JM
4166#include "confdefs.h"
4167
4168#include <stdio.h>
4169#ifdef HAVE_STRING_H
4170#include <string.h>
4171#else
4172#ifdef HAVE_STRINGS_H
4173#include <strings.h>
4174#endif
4175#endif
4176#ifdef HAVE_STDLIB_H
4177#include <stdlib.h>
4178#endif
4179#ifdef HAVE_UNISTD_H
4180#include <unistd.h>
4181#endif
4182int main() {
4183char *(*pfn) = (char *(*)) strerror
4184; return 0; }
4185EOF
b93f016b 4186if { (eval echo configure:4187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
87feff9d
JM
4187 rm -rf conftest*
4188 bfd_cv_decl_needed_strerror=no
4189else
4190 echo "configure: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 rm -rf conftest*
4193 bfd_cv_decl_needed_strerror=yes
4194fi
4195rm -f conftest*
4196fi
4197
4198echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4199if test $bfd_cv_decl_needed_strerror = yes; then
4200 bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4201 cat >> confdefs.h <<EOF
4202#define $bfd_tr_decl 1
4203EOF
4204
4205fi
4206
4207echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
b93f016b 4208echo "configure:4209: checking whether strdup must be declared" >&5
87feff9d
JM
4209if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4210 echo $ac_n "(cached) $ac_c" 1>&6
4211else
4212 cat > conftest.$ac_ext <<EOF
b93f016b 4213#line 4214 "configure"
87feff9d
JM
4214#include "confdefs.h"
4215
4216#include <stdio.h>
4217#ifdef HAVE_STRING_H
4218#include <string.h>
4219#else
4220#ifdef HAVE_STRINGS_H
4221#include <strings.h>
4222#endif
4223#endif
4224#ifdef HAVE_STDLIB_H
4225#include <stdlib.h>
4226#endif
4227#ifdef HAVE_UNISTD_H
4228#include <unistd.h>
4229#endif
4230int main() {
4231char *(*pfn) = (char *(*)) strdup
4232; return 0; }
4233EOF
b93f016b 4234if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
87feff9d
JM
4235 rm -rf conftest*
4236 bfd_cv_decl_needed_strdup=no
4237else
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 rm -rf conftest*
4241 bfd_cv_decl_needed_strdup=yes
4242fi
4243rm -f conftest*
4244fi
4245
4246echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4247if test $bfd_cv_decl_needed_strdup = yes; then
4248 bfd_tr_decl=NEED_DECLARATION_`echo strdup | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4249 cat >> confdefs.h <<EOF
4250#define $bfd_tr_decl 1
4251EOF
4252
4253fi
4254
4255
75a55dc3 4256# If we are configured native on GNU/Linux, work around problems with sys/procfs.h
0d4c1152
FF
4257if test "${target}" = "${host}"; then
4258 case "${host}" in
0728afad 4259 i[3456]86-*-linux*)
0d4c1152 4260 cat >> confdefs.h <<\EOF
0728afad 4261#define START_INFERIOR_TRAPS_EXPECTED 2
0d4c1152
FF
4262EOF
4263
4264 cat >> confdefs.h <<\EOF
4265#define sys_quotactl 1
4266EOF
4267
4268 ;;
4269 esac
4270fi
4271
4708ac65 4272echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
b93f016b 4273echo "configure:4274: checking for gregset_t type" >&5
07b77f5c 4274if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
4708ac65
FF
4275 echo $ac_n "(cached) $ac_c" 1>&6
4276else
4277 cat > conftest.$ac_ext <<EOF
b93f016b 4278#line 4279 "configure"
4708ac65
FF
4279#include "confdefs.h"
4280#include <sys/procfs.h>
bfde4a67 4281int main() {
4708ac65
FF
4282gregset_t *gregsetp = 0
4283; return 0; }
4284EOF
b93f016b 4285if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708ac65 4286 rm -rf conftest*
07b77f5c 4287 gdb_cv_have_gregset_t=yes
4708ac65 4288else
bfde4a67
SG
4289 echo "configure: failed program was:" >&5
4290 cat conftest.$ac_ext >&5
4708ac65 4291 rm -rf conftest*
07b77f5c 4292 gdb_cv_have_gregset_t=no
4708ac65
FF
4293fi
4294rm -f conftest*
4708ac65
FF
4295fi
4296
07b77f5c
FF
4297echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
4298if test $gdb_cv_have_gregset_t = yes; then
4708ac65
FF
4299 cat >> confdefs.h <<\EOF
4300#define HAVE_GREGSET_T 1
4301EOF
4302
4303fi
4304
4305echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
b93f016b 4306echo "configure:4307: checking for fpregset_t type" >&5
07b77f5c 4307if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
4708ac65
FF
4308 echo $ac_n "(cached) $ac_c" 1>&6
4309else
4310 cat > conftest.$ac_ext <<EOF
b93f016b 4311#line 4312 "configure"
4708ac65
FF
4312#include "confdefs.h"
4313#include <sys/procfs.h>
bfde4a67 4314int main() {
4708ac65
FF
4315fpregset_t *fpregsetp = 0
4316; return 0; }
4317EOF
b93f016b 4318if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708ac65 4319 rm -rf conftest*
07b77f5c 4320 gdb_cv_have_fpregset_t=yes
4708ac65 4321else
bfde4a67
SG
4322 echo "configure: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
4708ac65 4324 rm -rf conftest*
07b77f5c 4325 gdb_cv_have_fpregset_t=no
4708ac65
FF
4326fi
4327rm -f conftest*
4708ac65
FF
4328fi
4329
07b77f5c
FF
4330echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
4331if test $gdb_cv_have_fpregset_t = yes; then
4708ac65
FF
4332 cat >> confdefs.h <<\EOF
4333#define HAVE_FPREGSET_T 1
4334EOF
4335
4336fi
4337
bfde4a67 4338echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
b93f016b 4339echo "configure:4340: checking for main in -lm" >&5
bfde4a67 4340ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
ef6c51d1
SG
4341if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344 ac_save_LIBS="$LIBS"
4345LIBS="-lm $LIBS"
4346cat > conftest.$ac_ext <<EOF
b93f016b 4347#line 4348 "configure"
ef6c51d1
SG
4348#include "confdefs.h"
4349
bfde4a67 4350int main() {
ef6c51d1
SG
4351main()
4352; return 0; }
4353EOF
b93f016b 4354if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ef6c51d1
SG
4355 rm -rf conftest*
4356 eval "ac_cv_lib_$ac_lib_var=yes"
4357else
bfde4a67
SG
4358 echo "configure: failed program was:" >&5
4359 cat conftest.$ac_ext >&5
ef6c51d1
SG
4360 rm -rf conftest*
4361 eval "ac_cv_lib_$ac_lib_var=no"
4362fi
4363rm -f conftest*
4364LIBS="$ac_save_LIBS"
4365
4366fi
4367if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4368 echo "$ac_t""yes" 1>&6
bfde4a67
SG
4369 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4370 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
ef6c51d1
SG
4371 cat >> confdefs.h <<EOF
4372#define $ac_tr_lib 1
4373EOF
4374
4375 LIBS="-lm $LIBS"
4376
4377else
4378 echo "$ac_t""no" 1>&6
4379fi
4380
4381
879c0417 4382echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
b93f016b 4383echo "configure:4384: checking for wctype in -lc" >&5
879c0417
JM
4384ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
4385if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4386 echo $ac_n "(cached) $ac_c" 1>&6
4387else
4388 ac_save_LIBS="$LIBS"
4389LIBS="-lc $LIBS"
4390cat > conftest.$ac_ext <<EOF
b93f016b 4391#line 4392 "configure"
879c0417
JM
4392#include "confdefs.h"
4393/* Override any gcc2 internal prototype to avoid an error. */
4394/* We use char because int might match the return type of a gcc2
4395 builtin and then its argument prototype would still apply. */
4396char wctype();
4397
4398int main() {
4399wctype()
4400; return 0; }
4401EOF
b93f016b 4402if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
879c0417
JM
4403 rm -rf conftest*
4404 eval "ac_cv_lib_$ac_lib_var=yes"
4405else
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 rm -rf conftest*
4409 eval "ac_cv_lib_$ac_lib_var=no"
4410fi
4411rm -f conftest*
4412LIBS="$ac_save_LIBS"
4413
4414fi
4415if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4416 echo "$ac_t""yes" 1>&6
4417 :
4418else
4419 echo "$ac_t""no" 1>&6
4420echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
b93f016b 4421echo "configure:4422: checking for wctype in -lw" >&5
879c0417
JM
4422ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
4423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4424 echo $ac_n "(cached) $ac_c" 1>&6
4425else
4426 ac_save_LIBS="$LIBS"
4427LIBS="-lw $LIBS"
4428cat > conftest.$ac_ext <<EOF
b93f016b 4429#line 4430 "configure"
879c0417
JM
4430#include "confdefs.h"
4431/* Override any gcc2 internal prototype to avoid an error. */
4432/* We use char because int might match the return type of a gcc2
4433 builtin and then its argument prototype would still apply. */
4434char wctype();
4435
4436int main() {
4437wctype()
4438; return 0; }
4439EOF
b93f016b 4440if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
879c0417
JM
4441 rm -rf conftest*
4442 eval "ac_cv_lib_$ac_lib_var=yes"
4443else
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 rm -rf conftest*
4447 eval "ac_cv_lib_$ac_lib_var=no"
4448fi
4449rm -f conftest*
4450LIBS="$ac_save_LIBS"
4451
4452fi
4453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454 echo "$ac_t""yes" 1>&6
4455 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
4456 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4457 cat >> confdefs.h <<EOF
4458#define $ac_tr_lib 1
4459EOF
4460
4461 LIBS="-lw $LIBS"
4462
4463else
4464 echo "$ac_t""no" 1>&6
4465fi
4466
4467fi
4468
4469
aa220473 4470
3f550b59 4471echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
b93f016b 4472echo "configure:4473: checking for long long support in compiler" >&5
3f550b59
FF
4473if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
4474 echo $ac_n "(cached) $ac_c" 1>&6
4475else
4476 cat > conftest.$ac_ext <<EOF
b93f016b 4477#line 4478 "configure"
3f550b59
FF
4478#include "confdefs.h"
4479
bfde4a67 4480int main() {
80f600a4 4481
d538f9cf
FF
4482 extern long long foo;
4483 switch (foo & 2) { case 0: return 1; }
4484
3f550b59
FF
4485; return 0; }
4486EOF
b93f016b 4487if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f550b59
FF
4488 rm -rf conftest*
4489 gdb_cv_c_long_long=yes
4490else
bfde4a67
SG
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
3f550b59
FF
4493 rm -rf conftest*
4494 gdb_cv_c_long_long=no
4495fi
4496rm -f conftest*
3f550b59
FF
4497fi
4498
4499echo "$ac_t""$gdb_cv_c_long_long" 1>&6
4500if test $gdb_cv_c_long_long = yes; then
4501 cat >> confdefs.h <<\EOF
4502#define CC_HAS_LONG_LONG 1
4503EOF
4504
4505fi
4506
4507
4508echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
b93f016b 4509echo "configure:4510: checking for long long support in printf" >&5
3f550b59
FF
4510if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512else
4513 if test "$cross_compiling" = yes; then
4514 gdb_cv_printf_has_long_long=no
4515else
bfde4a67 4516 cat > conftest.$ac_ext <<EOF
b93f016b 4517#line 4518 "configure"
3f550b59
FF
4518#include "confdefs.h"
4519
4520int main () {
f7b8c9ce
AC
4521 char buf[32];
4522 long long l = 0;
4523 l = (l << 16) + 0x0123;
4524 l = (l << 16) + 0x4567;
4525 l = (l << 16) + 0x89ab;
4526 l = (l << 16) + 0xcdef;
4527 sprintf (buf, "0x%016llx", l);
4528 return (strcmp ("0x0123456789abcdef", buf));
3f550b59
FF
4529}
4530EOF
b93f016b 4531if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bfde4a67 4532then
3f550b59
FF
4533 gdb_cv_printf_has_long_long=yes
4534else
bfde4a67
SG
4535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4537 rm -fr conftest*
3f550b59
FF
4538 gdb_cv_printf_has_long_long=no
4539fi
ef6c51d1 4540rm -fr conftest*
8b701284
ILT
4541fi
4542
bfde4a67
SG
4543fi
4544
3f550b59
FF
4545if test $gdb_cv_printf_has_long_long = yes; then
4546 cat >> confdefs.h <<\EOF
4547#define PRINTF_HAS_LONG_LONG 1
4548EOF
4549
4550fi
4551echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
4552
4553
07b77f5c 4554echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
b93f016b 4555echo "configure:4556: checking for long double support in compiler" >&5
aa220473
SG
4556if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
4557 echo $ac_n "(cached) $ac_c" 1>&6
4558else
4559 cat > conftest.$ac_ext <<EOF
b93f016b 4560#line 4561 "configure"
aa220473
SG
4561#include "confdefs.h"
4562
bfde4a67 4563int main() {
aa220473
SG
4564long double foo;
4565; return 0; }
4566EOF
b93f016b 4567if { (eval echo configure:4568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
aa220473
SG
4568 rm -rf conftest*
4569 ac_cv_c_long_double=yes
4570else
bfde4a67
SG
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
aa220473
SG
4573 rm -rf conftest*
4574 ac_cv_c_long_double=no
4575fi
4576rm -f conftest*
aa220473
SG
4577fi
4578
4579echo "$ac_t""$ac_cv_c_long_double" 1>&6
4580if test $ac_cv_c_long_double = yes; then
4581 cat >> confdefs.h <<\EOF
4582#define HAVE_LONG_DOUBLE 1
4583EOF
4584
4585fi
4586
07b77f5c
FF
4587
4588echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
b93f016b 4589echo "configure:4590: checking for long double support in printf" >&5
07b77f5c
FF
4590if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
4591 echo $ac_n "(cached) $ac_c" 1>&6
4592else
4593 if test "$cross_compiling" = yes; then
4594 gdb_cv_printf_has_long_double=no
4595else
bfde4a67 4596 cat > conftest.$ac_ext <<EOF
b93f016b 4597#line 4598 "configure"
07b77f5c
FF
4598#include "confdefs.h"
4599
4600int main () {
4601 char buf[16];
4602 long double f = 3.141592653;
4603 sprintf (buf, "%Lg", f);
4604 return (strncmp ("3.14159", buf, 7));
4605}
4606EOF
b93f016b 4607if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bfde4a67 4608then
07b77f5c
FF
4609 gdb_cv_printf_has_long_double=yes
4610else
bfde4a67
SG
4611 echo "configure: failed program was:" >&5
4612 cat conftest.$ac_ext >&5
4613 rm -fr conftest*
07b77f5c
FF
4614 gdb_cv_printf_has_long_double=no
4615fi
ef6c51d1 4616rm -fr conftest*
8b701284
ILT
4617fi
4618
bfde4a67
SG
4619fi
4620
07b77f5c
FF
4621if test $gdb_cv_printf_has_long_double = yes; then
4622 cat >> confdefs.h <<\EOF
4623#define PRINTF_HAS_LONG_DOUBLE 1
4624EOF
4625
4626fi
4627echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
4628
f7b8c9ce
AC
4629
4630echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
b93f016b 4631echo "configure:4632: checking for long double support in scanf" >&5
f7b8c9ce
AC
4632if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
4633 echo $ac_n "(cached) $ac_c" 1>&6
4634else
4635 if test "$cross_compiling" = yes; then
4636 gdb_cv_scanf_has_long_double=no
4637else
4638 cat > conftest.$ac_ext <<EOF
b93f016b 4639#line 4640 "configure"
f7b8c9ce
AC
4640#include "confdefs.h"
4641
4642int main () {
4643 char *buf = "3.141592653";
4644 long double f = 0;
4645 sscanf (buf, "%Lg", &f);
4646 return !(f > 3.14159 && f < 3.14160);
4647}
4648EOF
b93f016b 4649if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
f7b8c9ce
AC
4650then
4651 gdb_cv_scanf_has_long_double=yes
4652else
4653 echo "configure: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 rm -fr conftest*
4656 gdb_cv_scanf_has_long_double=no
4657fi
4658rm -fr conftest*
4659fi
4660
4661fi
4662
4663if test $gdb_cv_scanf_has_long_double = yes; then
4664 cat >> confdefs.h <<\EOF
4665#define SCANF_HAS_LONG_DOUBLE 1
4666EOF
4667
4668fi
4669echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
4670
bfde4a67
SG
4671for ac_hdr in unistd.h
4672do
4673ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4674echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b93f016b 4675echo "configure:4676: checking for $ac_hdr" >&5
bfde4a67
SG
4676if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4677 echo $ac_n "(cached) $ac_c" 1>&6
4678else
4679 cat > conftest.$ac_ext <<EOF
b93f016b 4680#line 4681 "configure"
bfde4a67
SG
4681#include "confdefs.h"
4682#include <$ac_hdr>
4683EOF
4684ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 4685{ (eval echo configure:4686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 4686ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
bfde4a67
SG
4687if test -z "$ac_err"; then
4688 rm -rf conftest*
4689 eval "ac_cv_header_$ac_safe=yes"
4690else
4691 echo "$ac_err" >&5
4692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
4694 rm -rf conftest*
4695 eval "ac_cv_header_$ac_safe=no"
4696fi
4697rm -f conftest*
4698fi
4699if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4700 echo "$ac_t""yes" 1>&6
4701 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4702 cat >> confdefs.h <<EOF
4703#define $ac_tr_hdr 1
4704EOF
4705
4706else
4707 echo "$ac_t""no" 1>&6
4708fi
4709done
4710
4711for ac_func in getpagesize
1a7b4b7c
DE
4712do
4713echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b93f016b 4714echo "configure:4715: checking for $ac_func" >&5
1a7b4b7c
DE
4715if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4716 echo $ac_n "(cached) $ac_c" 1>&6
4717else
4718 cat > conftest.$ac_ext <<EOF
b93f016b 4719#line 4720 "configure"
1a7b4b7c
DE
4720#include "confdefs.h"
4721/* System header to define __stub macros and hopefully few prototypes,
4722 which can conflict with char $ac_func(); below. */
4723#include <assert.h>
4724/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
4725/* We use char because int might match the return type of a gcc2
4726 builtin and then its argument prototype would still apply. */
1a7b4b7c
DE
4727char $ac_func();
4728
bfde4a67 4729int main() {
1a7b4b7c
DE
4730
4731/* The GNU C library defines this for functions which it implements
4732 to always fail with ENOSYS. Some functions are actually named
4733 something starting with __ and the normal name is an alias. */
4734#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4735choke me
4736#else
4737$ac_func();
4738#endif
4739
4740; return 0; }
4741EOF
b93f016b 4742if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1a7b4b7c
DE
4743 rm -rf conftest*
4744 eval "ac_cv_func_$ac_func=yes"
4745else
bfde4a67
SG
4746 echo "configure: failed program was:" >&5
4747 cat conftest.$ac_ext >&5
1a7b4b7c
DE
4748 rm -rf conftest*
4749 eval "ac_cv_func_$ac_func=no"
4750fi
4751rm -f conftest*
ef6c51d1 4752fi
bfde4a67 4753
1a7b4b7c
DE
4754if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4755 echo "$ac_t""yes" 1>&6
4756 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4757 cat >> confdefs.h <<EOF
4758#define $ac_tr_func 1
4759EOF
4760
4761else
4762 echo "$ac_t""no" 1>&6
4763fi
4764done
4765
2b576293 4766echo $ac_n "checking for working mmap""... $ac_c" 1>&6
b93f016b 4767echo "configure:4768: checking for working mmap" >&5
bfde4a67 4768if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2b576293
C
4769 echo $ac_n "(cached) $ac_c" 1>&6
4770else
4771 if test "$cross_compiling" = yes; then
bfde4a67 4772 ac_cv_func_mmap_fixed_mapped=no
2b576293 4773else
bfde4a67 4774 cat > conftest.$ac_ext <<EOF
b93f016b 4775#line 4776 "configure"
2b576293
C
4776#include "confdefs.h"
4777
bfde4a67
SG
4778/* Thanks to Mike Haertel and Jim Avera for this test.
4779 Here is a matrix of mmap possibilities:
4780 mmap private not fixed
4781 mmap private fixed at somewhere currently unmapped
4782 mmap private fixed at somewhere already mapped
4783 mmap shared not fixed
4784 mmap shared fixed at somewhere currently unmapped
4785 mmap shared fixed at somewhere already mapped
4786 For private mappings, we should verify that changes cannot be read()
4787 back from the file, nor mmap's back from the file at a different
4788 address. (There have been systems where private was not correctly
4789 implemented like the infamous i386 svr4.0, and systems where the
4790 VM page cache was not coherent with the filesystem buffer cache
4791 like early versions of FreeBSD and possibly contemporary NetBSD.)
4792 For shared mappings, we should conversely verify that changes get
4793 propogated back to all the places they're supposed to be.
4794
4795 Grep wants private fixed already mapped.
4796 The main things grep needs to know about mmap are:
4797 * does it exist and is it safe to write into the mmap'd area
4798 * how to use it (BSD variants) */
2b576293
C
4799#include <sys/types.h>
4800#include <fcntl.h>
4801#include <sys/mman.h>
4802
bfde4a67 4803/* This mess was copied from the GNU getpagesize.h. */
2b576293 4804#ifndef HAVE_GETPAGESIZE
bfde4a67
SG
4805# ifdef HAVE_UNISTD_H
4806# include <unistd.h>
8b701284
ILT
4807# endif
4808
bfde4a67
SG
4809/* Assume that all systems that can run configure have sys/param.h. */
4810# ifndef HAVE_SYS_PARAM_H
4811# define HAVE_SYS_PARAM_H 1
4812# endif
4813
4814# ifdef _SC_PAGESIZE
4815# define getpagesize() sysconf(_SC_PAGESIZE)
4816# else /* no _SC_PAGESIZE */
4817# ifdef HAVE_SYS_PARAM_H
4818# include <sys/param.h>
4819# ifdef EXEC_PAGESIZE
4820# define getpagesize() EXEC_PAGESIZE
4821# else /* no EXEC_PAGESIZE */
4822# ifdef NBPG
4823# define getpagesize() NBPG * CLSIZE
4824# ifndef CLSIZE
4825# define CLSIZE 1
4826# endif /* no CLSIZE */
4827# else /* no NBPG */
4828# ifdef NBPC
4829# define getpagesize() NBPC
4830# else /* no NBPC */
4831# ifdef PAGESIZE
4832# define getpagesize() PAGESIZE
4833# endif /* PAGESIZE */
4834# endif /* no NBPC */
4835# endif /* no NBPG */
4836# endif /* no EXEC_PAGESIZE */
4837# else /* no HAVE_SYS_PARAM_H */
4838# define getpagesize() 8192 /* punt totally */
4839# endif /* no HAVE_SYS_PARAM_H */
4840# endif /* no _SC_PAGESIZE */
4841
4842#endif /* no HAVE_GETPAGESIZE */
2b576293
C
4843
4844#ifdef __cplusplus
bfde4a67 4845extern "C" { void *malloc(unsigned); }
2b576293 4846#else
bfde4a67 4847char *malloc();
2b576293
C
4848#endif
4849
4850int
4851main()
4852{
bfde4a67
SG
4853 char *data, *data2, *data3;
4854 int i, pagesize;
4855 int fd;
4856
4857 pagesize = getpagesize();
4858
4859 /*
4860 * First, make a file with some known garbage in it.
4861 */
4862 data = malloc(pagesize);
4863 if (!data)
4864 exit(1);
4865 for (i = 0; i < pagesize; ++i)
4866 *(data + i) = rand();
4867 umask(0);
4868 fd = creat("conftestmmap", 0600);
4869 if (fd < 0)
4870 exit(1);
4871 if (write(fd, data, pagesize) != pagesize)
4872 exit(1);
4873 close(fd);
4874
4875 /*
4876 * Next, try to mmap the file at a fixed address which
4877 * already has something else allocated at it. If we can,
4878 * also make sure that we see the same garbage.
4879 */
4880 fd = open("conftestmmap", O_RDWR);
4881 if (fd < 0)
4882 exit(1);
4883 data2 = malloc(2 * pagesize);
4884 if (!data2)
4885 exit(1);
4886 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4887 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4888 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4889 exit(1);
4890 for (i = 0; i < pagesize; ++i)
4891 if (*(data + i) != *(data2 + i))
4892 exit(1);
4893
4894 /*
4895 * Finally, make sure that changes to the mapped area
4896 * do not percolate back to the file as seen by read().
4897 * (This is a bug on some variants of i386 svr4.0.)
4898 */
4899 for (i = 0; i < pagesize; ++i)
4900 *(data2 + i) = *(data2 + i) + 1;
4901 data3 = malloc(pagesize);
4902 if (!data3)
4903 exit(1);
4904 if (read(fd, data3, pagesize) != pagesize)
4905 exit(1);
4906 for (i = 0; i < pagesize; ++i)
4907 if (*(data + i) != *(data3 + i))
4908 exit(1);
4909 close(fd);
4910 unlink("conftestmmap");
4911 exit(0);
2b576293
C
4912}
4913
4914EOF
b93f016b 4915if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bfde4a67
SG
4916then
4917 ac_cv_func_mmap_fixed_mapped=yes
2b576293 4918else
bfde4a67
SG
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -fr conftest*
4922 ac_cv_func_mmap_fixed_mapped=no
2b576293 4923fi
ef6c51d1 4924rm -fr conftest*
8b701284
ILT
4925fi
4926
bfde4a67
SG
4927fi
4928
4929echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4930if test $ac_cv_func_mmap_fixed_mapped = yes; then
2b576293
C
4931 cat >> confdefs.h <<\EOF
4932#define HAVE_MMAP 1
4933EOF
4934
4935fi
4936
5436fc65 4937
47ef0da5 4938
89e673a4
SG
4939
4940if test ${build} = ${host} -a ${host} = ${target} ; then
4b95e9a1
JM
4941 case ${host_os} in
4942 hpux*)
4943 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
b93f016b 4944echo "configure:4945: checking for HPUX/OSF thread support" >&5
4b95e9a1
JM
4945 if test -f /usr/include/dce/cma_config.h ; then
4946 if test "$GCC" = "yes" ; then
4947 echo "$ac_t""yes" 1>&6
4948 cat >> confdefs.h <<\EOF
5d394f70
SG
4949#define HAVE_HPUX_THREAD_SUPPORT 1
4950EOF
4951
4b95e9a1 4952 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
c7bb1531 4953 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4b95e9a1
JM
4954 else
4955 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4956 fi
4957 else
4958 echo "$ac_t""no" 1>&6
4959 fi
4960 ;;
4961 solaris*)
4962 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
b93f016b 4963echo "configure:4964: checking for Solaris thread debugging library" >&5
4b95e9a1
JM
4964 if test -f /usr/lib/libthread_db.so.1 ; then
4965 echo "$ac_t""yes" 1>&6
4966 cat >> confdefs.h <<\EOF
6c310da8
SG
4967#define HAVE_THREAD_DB_LIB 1
4968EOF
4969
4b95e9a1 4970 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c7bb1531 4971 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4b95e9a1 4972 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
b93f016b 4973echo "configure:4974: checking for dlopen in -ldl" >&5
bfde4a67 4974ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
95b47547
SG
4975if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4977else
4978 ac_save_LIBS="$LIBS"
4979LIBS="-ldl $LIBS"
4980cat > conftest.$ac_ext <<EOF
b93f016b 4981#line 4982 "configure"
95b47547
SG
4982#include "confdefs.h"
4983/* Override any gcc2 internal prototype to avoid an error. */
4984/* We use char because int might match the return type of a gcc2
4985 builtin and then its argument prototype would still apply. */
4986char dlopen();
4987
bfde4a67 4988int main() {
95b47547
SG
4989dlopen()
4990; return 0; }
4991EOF
b93f016b 4992if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
95b47547
SG
4993 rm -rf conftest*
4994 eval "ac_cv_lib_$ac_lib_var=yes"
4995else
bfde4a67
SG
4996 echo "configure: failed program was:" >&5
4997 cat conftest.$ac_ext >&5
95b47547
SG
4998 rm -rf conftest*
4999 eval "ac_cv_lib_$ac_lib_var=no"
5000fi
5001rm -f conftest*
5002LIBS="$ac_save_LIBS"
5003
5004fi
5005if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5006 echo "$ac_t""yes" 1>&6
bfde4a67
SG
5007 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5008 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
95b47547
SG
5009 cat >> confdefs.h <<EOF
5010#define $ac_tr_lib 1
5011EOF
5012
5013 LIBS="-ldl $LIBS"
5014
5015else
5016 echo "$ac_t""no" 1>&6
5017fi
5018
4b95e9a1
JM
5019 if test "$GCC" = "yes" ; then
5020 # The GNU linker requires the -export-dynamic option to make
5021 # all symbols visible in the dynamic symbol table.
5022 hold_ldflags=$LDFLAGS
5023 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
b93f016b 5024echo "configure:5025: checking for the ld -export-dynamic flag" >&5
4b95e9a1
JM
5025 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
5026 cat > conftest.$ac_ext <<EOF
b93f016b 5027#line 5028 "configure"
4b95e9a1
JM
5028#include "confdefs.h"
5029
5030int main() {
5031int i;
5032; return 0; }
5033EOF
b93f016b 5034if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4b95e9a1
JM
5035 rm -rf conftest*
5036 found=yes
5037else
5038 echo "configure: failed program was:" >&5
5039 cat conftest.$ac_ext >&5
5040 rm -rf conftest*
5041 found=no
5042fi
5043rm -f conftest*
5044 LDFLAGS=$hold_ldflags
5045 echo "$ac_t""$found" 1>&6
5046 if test $found = yes; then
5047 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
5048 fi
5049 fi
37f58dce
FL
5050 # Sun randomly tweaked the prototypes in <proc_service.h>
5051 # at one point.
5052 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
b93f016b 5053echo "configure:5054: checking if <proc_service.h> is old" >&5
37f58dce
FL
5054 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
5055 echo $ac_n "(cached) $ac_c" 1>&6
5056else
5057
5058 cat > conftest.$ac_ext <<EOF
b93f016b 5059#line 5060 "configure"
37f58dce
FL
5060#include "confdefs.h"
5061
5062 #include <proc_service.h>
5063 ps_err_e ps_pdwrite
5064 (struct ps_prochandle*, psaddr_t, const void*, size_t);
5065
5066int main() {
5067
5068; return 0; }
5069EOF
b93f016b 5070if { (eval echo configure:5071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
37f58dce
FL
5071 rm -rf conftest*
5072 gdb_cv_proc_service_is_old=no
5073else
5074 echo "configure: failed program was:" >&5
5075 cat conftest.$ac_ext >&5
5076 rm -rf conftest*
5077 gdb_cv_proc_service_is_old=yes
5078fi
5079rm -f conftest*
5080
5081fi
5082
5083 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
5084 if test $gdb_cv_proc_service_is_old = yes; then
5085 cat >> confdefs.h <<\EOF
5086#define PROC_SERVICE_IS_OLD 1
5087EOF
5088
5089 fi
4b95e9a1
JM
5090 else
5091 echo "$ac_t""no" 1>&6
5092 fi
5093 ;;
5094 esac
5095
89e673a4 5096fi
47ef0da5 5097
5436fc65 5098ENABLE_CFLAGS=
5436fc65
C
5099
5100# Check whether --enable-netrom or --disable-netrom was given.
1a7b4b7c
DE
5101if test "${enable_netrom+set}" = set; then
5102 enableval="$enable_netrom"
5436fc65
C
5103 case "${enableval}" in
5104yes) enable_netrom=yes ;;
5105no) enable_netrom=no ;;
5106*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
5107esac
5108fi
5109
5110
5111if test "${enable_netrom}" = "yes"; then
6c310da8 5112 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
c7bb1531 5113 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
5436fc65
C
5114fi
5115
b9a9cde4
AC
5116# Check whether --enable-build-warnings or --disable-build-warnings was given.
5117if test "${enable_build_warnings+set}" = set; then
5118 enableval="$enable_build_warnings"
5119 build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
5120case "${enableval}" in
5121 yes) ;;
5122 no) build_warnings="-w";;
5123 *) ;;
ba68ad57 5124esac
b9a9cde4
AC
5125else
5126 build_warnings=""
ba68ad57
JM
5127fi
5128
b9a9cde4 5129if test "x${build_warnings}" != x -a "x$GCC" = xyes
ba68ad57 5130then
b9a9cde4 5131 WARN_CFLAGS="${build_warnings}"
ba68ad57
JM
5132else
5133 WARN_CFLAGS=""
5134fi
5135
5136
0728afad
FF
5137MMALLOC_CFLAGS=
5138MMALLOC=
5139
5140
5141
5142# Check whether --with-mmalloc or --without-mmalloc was given.
5143if test "${with_mmalloc+set}" = set; then
5144 withval="$with_mmalloc"
5145 case "${withval}" in
5146 yes) want_mmalloc=true ;;
5147 no) want_mmalloc=false;;
5148 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
5149esac
5150else
5151 want_mmalloc=false
5152fi
5153
5154if test x$want_mmalloc = xtrue; then
5155 cat >> confdefs.h <<\EOF
5156#define USE_MMALLOC 1
5157EOF
5158
5159 cat >> confdefs.h <<\EOF
dd600735 5160#define MMCHECK_FORCE 1
0728afad
FF
5161EOF
5162
5163 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
5164 MMALLOC='../mmalloc/libmmalloc.a'
5165fi
5166
287026b7
AC
5167# start-sanitize-carp
5168# The below takes an educated guess at the targets that
5169# should be built. It is an interum version that provides
5170# significant backward compatibility.
5171
5172# Check whether --enable-carp or --disable-carp was given.
5173if test "${enable_carp+set}" = set; then
5174 enableval="$enable_carp"
5175 case "${enableval}" in
5176 yes) enable_carp=yes ;;
5177 no) enable_carp=no ;;
5178 *) { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;;
5179esac
5180else
5181 enable_carp=no
5182fi
5183
5184# Check whether --enable-targets or --disable-targets was given.
5185if test "${enable_targets+set}" = set; then
5186 enableval="$enable_targets"
5187 case "${enableval}" in
5188 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
5189 ;;
5190 no) enable_targets= ;;
5191 *) enable_targets="$enableval" ;;
5192esac
5193fi
5194
5195# Canonicalize the secondary target names.
5196all_targets=false
5197if test -n "$enable_targets" ; then
5198 if test "$enable_targets" = all ; then
5199 all_targets=true
5200 else
5201 for targ in `echo $enable_targets | sed 's/,/ /g'`
5202 do
5203 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5204 if test -n "$result" ; then
5205 canon_targets="$canon_targets $result"
5206 fi
5207 done
5208 fi
5209fi
5210
5211# Convert the target names into GDB [*]-tdep.c names
5212selarchs=
5213for targ in $target $canon_targets
5214do
5215 if test "x$targ" = "xall" ; then
5216 all_targets=true
5217 else
b0f33a03 5218 t_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
287026b7 5219 t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
b0f33a03 5220 t_os=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
287026b7
AC
5221 mt=`
5222target=$targ
5223target_cpu=$t_cpu
5224target_vendor=$t_vendor
5225target_os=$t_os
5226. ${srcdir}/configure.tgt
5227echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
5228 if test -r ${mt} ; then
5229 # This gets confused over .mt files that have multiple -tdep.o
5230 tdep=`sed -n '
5231s/^.*[ =]\([^ ]*\)-tdep.o.*/\1/p
5232' $mt`
5233 selarchs="$selarchs $tdep"
5234 fi
5235 fi
5236done
5237
5238# We don't do any links based on the target system, just makefile config.
5239
5240if test x${all_targets} = xfalse ; then
5241
5242 # Target architecture .o files.
5243 ta=
5244
5245 for arch in $selarchs
5246 do
5247 archdefs="$archdefs -DARCH_$arch"
5248 ta="$ta ${arch}-tdep.o"
5249 # Special cases
5250 case "$arch" in
b0f33a03 5251 dvp) ta="$ta mips-tdep.o dvp-tdep.o" ;;
287026b7
AC
5252 esac
5253 done
5254
5255 # Weed out duplicate .o files.
5256 f=""
5257 for i in $ta ; do
5258 case " $f " in
b0f33a03
JM
5259 *" $i "*) ;;
5260 *) f="$f $i" ;;
287026b7
AC
5261 esac
5262 done
5263 ta="$f"
5264
5265 # And duplicate -D flags.
5266 f=""
5267 for i in $archdefs ; do
5268 case " $f " in
b0f33a03
JM
5269 *" $i "*) ;;
5270 *) f="$f $i" ;;
287026b7
AC
5271 esac
5272 done
5273 archdefs="$f"
5274
5275 MACHINE_OBS="$ta"
5276
5277else # all_targets is true
5278 archdefs=-DARCH_all
5279 MACHINE_OBS='$(ALL_MACHINES)'
5280fi
5281
5282if test "${enable_carp}" = yes ; then
5283 gdb_target=carp
5284 gdb_target_cpu=carp
5285else
5286 MACHINE_OBS="# $MACHINE_OBS"
5287fi
5288
5289
5290# end-sanitize-carp
5436fc65 5291# start-sanitize-gdbtk
fa41e1a3 5292# start-sanitize-ide
2476848a
MH
5293ENABLE_IDE=
5294# Check whether --enable-ide or --disable-ide was given.
5295if test "${enable_ide+set}" = set; then
5296 enableval="$enable_ide"
5297 :
5298fi
5299
5300if test "$enable_ide" = yes; then
5301 enable_ide=yes
5302 ENABLE_IDE=1
5303else
5304 enable_ide=no
5305fi
5306
5307
c076f1ed
DM
5308# Check whether --with-foundry-libs or --without-foundry-libs was given.
5309if test "${with_foundry_libs+set}" = set; then
5310 withval="$with_foundry_libs"
5311 FOUNDRY_LIB_BASE=${withval}
5312fi
5313
5314
5315
5316#
5317# This is the Foundry SDK
5318#
5319# These variables are used to determine where the Foundry libs and
5320# header files are located.
5321#
5322if test "$FOUNDRY_LIB_BASE" != ""; then
5323 LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
5324 GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
5325 if test x$enable_ide = xyes; then
5326 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
5327 IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
5328 else
5329 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
5330 fi
5331 LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
5332 LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
5333 IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
5334else
5335 LIBGUI="../libgui/src/libgui.a"
5336 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
5337 if test x$enable_ide = xyes; then
5338 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
5339 IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
5340 else
5341 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
5342 fi
5343 LIBIDETCL="../libidetcl/src/libidetcl.a"
5344 LIBIDE="../libide/src/libide.a"
5345 IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
5346fi
5347
5348
5349
5350
5351
5352
5353
fa41e1a3 5354# end-sanitize-ide
c076f1ed 5355
5436fc65
C
5356ENABLE_GDBTK=
5357
5358# Check whether --enable-gdbtk or --disable-gdbtk was given.
1a7b4b7c
DE
5359if test "${enable_gdbtk+set}" = set; then
5360 enableval="$enable_gdbtk"
5436fc65 5361 case "${enableval}" in
0fe1522a
SG
5362 yes)
5363 case "$host" in
5364 *go32*)
5365 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5366 enable_gdbtk=no ;;
8a19b35a 5367 *windows*)
b613bfbf
GN
5368 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5369 enable_gdbtk=no ;;
0fe1522a
SG
5370 *)
5371 enable_gdbtk=yes ;;
5372 esac ;;
5373 no)
5374 enable_gdbtk=no ;;
5375 *)
5376 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 5377esac
0fe1522a
SG
5378else
5379
b93f016b 5380# Default is on for everything but go32 and Cygwin
0fe1522a 5381case "$host" in
8a19b35a 5382 *go32* | *windows*)
b613bfbf 5383 ;;
0fe1522a
SG
5384 *)
5385 enable_gdbtk=yes ;;
5386 esac
5387
5436fc65
C
5388fi
5389
5390
b93f016b 5391# In the Cygwin environment, we need some additional flags.
9b119644 5392echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
b93f016b 5393echo "configure:5394: checking for cygwin32" >&5
9b119644
ILT
5394if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396else
5397 cat > conftest.$ac_ext <<EOF
b93f016b 5398#line 5399 "configure"
9b119644
ILT
5399#include "confdefs.h"
5400
5401#ifdef __CYGWIN32__
5402lose
5403#endif
5404EOF
5405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5406 egrep "lose" >/dev/null 2>&1; then
5407 rm -rf conftest*
5408 gdb_cv_os_cygwin32=yes
5409else
5410 rm -rf conftest*
5411 gdb_cv_os_cygwin32=no
5412fi
5413rm -f conftest*
5414
5415fi
5416
5417echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6
5418
5419WIN32LIBS=
5420WIN32LDAPP=
5421
5422
5423
b0f33a03 5424DLLTOOL=${DLLTOOL-dlltool}
929db6e5
EZ
5425WINDRES=${WINDRES-windres}
5426
5427
b0f33a03 5428
9b119644
ILT
5429if test x$gdb_cv_os_cygwin32 = xyes; then
5430 if test x$enable_ide = xyes; then
5431 WIN32LIBS="-ladvapi32"
5432 fi
5433fi
5434
5435configdir="unix"
8a19b35a 5436
b177bf84 5437GDBTKLIBS=
5436fc65 5438if test "${enable_gdbtk}" = "yes"; then
0fe1522a 5439
047465fd
TT
5440
5441#
5442# Ok, lets find the tcl configuration
5443# First, look for one uninstalled.
5444# the alternative search directory is invoked by --with-tclconfig
5445#
5436fc65 5446
047465fd
TT
5447if test x"${no_tcl}" = x ; then
5448 # we reset no_tcl in case something fails here
5449 no_tcl=true
5450 # Check whether --with-tclconfig or --without-tclconfig was given.
5451if test "${with_tclconfig+set}" = set; then
5452 withval="$with_tclconfig"
5453 with_tclconfig=${withval}
5436fc65
C
5454fi
5455
047465fd 5456 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
b93f016b 5457echo "configure:5458: checking for Tcl configuration" >&5
047465fd 5458 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5436fc65
C
5459 echo $ac_n "(cached) $ac_c" 1>&6
5460else
047465fd 5461
1a7b4b7c 5462
047465fd
TT
5463 # First check to see if --with-tclconfig was specified.
5464 if test x"${with_tclconfig}" != x ; then
5465 if test -f "${with_tclconfig}/tclConfig.sh" ; then
5466 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
5467 else
5468 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5436fc65 5469 fi
047465fd 5470 fi
5436fc65 5471
047465fd
TT
5472 # then check for a private Tcl installation
5473 if test x"${ac_cv_c_tclconfig}" = x ; then
5474 for i in \
5475 ../tcl \
5476 `ls -dr ../tcl[7-9]* 2>/dev/null` \
5477 ../../tcl \
5478 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
5479 ../../../tcl \
5480 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8a19b35a
MH
5481 if test -f "$i/${configdir}/tclConfig.sh" ; then
5482 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
5483 break
5484 fi
5485 done
5486 fi
5487 # check in a few common install locations
5488 if test x"${ac_cv_c_tclconfig}" = x ; then
5489 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5490 if test -f "$i/tclConfig.sh" ; then
5491 ac_cv_c_tclconfig=`(cd $i; pwd)`
5492 break
5493 fi
5494 done
5495 fi
5496 # check in a few other private locations
5497 if test x"${ac_cv_c_tclconfig}" = x ; then
5498 for i in \
5499 ${srcdir}/../tcl \
5500 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8a19b35a
MH
5501 if test -f "$i/${configdir}/tclConfig.sh" ; then
5502 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
5503 break
5504 fi
5505 done
5506 fi
5507
5436fc65 5508fi
1a7b4b7c 5509
047465fd
TT
5510 if test x"${ac_cv_c_tclconfig}" = x ; then
5511 TCLCONFIG="# no Tcl configs found"
5512 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
5513 else
5514 no_tcl=
5515 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
5516 echo "$ac_t""found $TCLCONFIG" 1>&6
5436fc65 5517 fi
5436fc65
C
5518fi
5519
0cf433d9
ILT
5520 if test -z "${no_tcl}"; then
5521
047465fd 5522 . $TCLCONFIG
5436fc65 5523
047465fd
TT
5524
5525
5526
5527
5528
5436fc65 5529
5436fc65 5530
5436fc65 5531
5436fc65 5532
047465fd
TT
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5436fc65 5545
5436fc65 5546
5436fc65 5547
0cf433d9 5548
047465fd
TT
5549#
5550# Ok, lets find the tk configuration
5551# First, look for one uninstalled.
5552# the alternative search directory is invoked by --with-tkconfig
5553#
5436fc65 5554
047465fd
TT
5555if test x"${no_tk}" = x ; then
5556 # we reset no_tk in case something fails here
5557 no_tk=true
5558 # Check whether --with-tkconfig or --without-tkconfig was given.
5559if test "${with_tkconfig+set}" = set; then
5560 withval="$with_tkconfig"
5561 with_tkconfig=${withval}
5436fc65
C
5562fi
5563
047465fd 5564 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
b93f016b 5565echo "configure:5566: checking for Tk configuration" >&5
047465fd 5566 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5436fc65
C
5567 echo $ac_n "(cached) $ac_c" 1>&6
5568else
047465fd 5569
5436fc65 5570
047465fd
TT
5571 # First check to see if --with-tkconfig was specified.
5572 if test x"${with_tkconfig}" != x ; then
5573 if test -f "${with_tkconfig}/tkConfig.sh" ; then
5574 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
5575 else
5576 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5436fc65 5577 fi
047465fd 5578 fi
5436fc65 5579
047465fd
TT
5580 # then check for a private Tk library
5581 if test x"${ac_cv_c_tkconfig}" = x ; then
5582 for i in \
5583 ../tk \
5584 `ls -dr ../tk[4-9]* 2>/dev/null` \
5585 ../../tk \
5586 `ls -dr ../../tk[4-9]* 2>/dev/null` \
5587 ../../../tk \
5588 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8a19b35a
MH
5589 if test -f "$i/${configdir}/tkConfig.sh" ; then
5590 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
5591 break
5592 fi
5593 done
5594 fi
5595 # check in a few common install locations
5596 if test x"${ac_cv_c_tkconfig}" = x ; then
5597 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5598 if test -f "$i/tkConfig.sh" ; then
5599 ac_cv_c_tkconfig=`(cd $i; pwd)`
5600 break
5601 fi
5602 done
5603 fi
5604 # check in a few other private locations
5605 if test x"${ac_cv_c_tkconfig}" = x ; then
5606 for i in \
5607 ${srcdir}/../tk \
5608 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8a19b35a
MH
5609 if test -f "$i/${configdir}/tkConfig.sh" ; then
5610 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
5611 break
5612 fi
5613 done
5614 fi
5615
5436fc65 5616fi
5436fc65 5617
047465fd
TT
5618 if test x"${ac_cv_c_tkconfig}" = x ; then
5619 TKCONFIG="# no Tk configs found"
5620 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
5621 else
5622 no_tk=
5623 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
5624 echo "$ac_t""found $TKCONFIG" 1>&6
5625 fi
5436fc65
C
5626fi
5627
5628
5436fc65 5629
0cf433d9
ILT
5630 # If $no_tk is nonempty, then we can't do Tk, and there is no
5631 # point to doing Tcl.
5632 if test -z "${no_tk}"; then
5633
047465fd
TT
5634 if test -f "$TKCONFIG" ; then
5635 . $TKCONFIG
5636 fi
5436fc65 5637
047465fd
TT
5638
5639
5436fc65 5640
047465fd 5641
5436fc65
C
5642
5643
a2b63bbd 5644
047465fd
TT
5645
5646
5647
9b119644 5648
047465fd 5649
0cf433d9 5650
5436fc65 5651#
4e327047
TT
5652# Ok, lets find the tcl source trees so we can use the headers
5653# Warning: transition of version 9 to 10 will break this algorithm
5654# because 10 sorts before 9. We also look for just tcl. We have to
5655# be careful that we don't match stuff like tclX by accident.
5656# the alternative search directory is involked by --with-tclinclude
5436fc65 5657#
8a19b35a 5658
4e327047 5659no_tcl=true
8a19b35a 5660echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
b93f016b 5661echo "configure:5662: checking for Tcl private headers. dir=${configdir}" >&5
4e327047 5662# Check whether --with-tclinclude or --without-tclinclude was given.
1a7b4b7c
DE
5663if test "${with_tclinclude+set}" = set; then
5664 withval="$with_tclinclude"
4e327047
TT
5665 with_tclinclude=${withval}
5666fi
5667
5668if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
5669 echo $ac_n "(cached) $ac_c" 1>&6
5670else
5671
5672# first check to see if --with-tclinclude was specified
5673if test x"${with_tclinclude}" != x ; then
5674 if test -f ${with_tclinclude}/tclInt.h ; then
5675 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
047465fd
TT
5676 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
5677 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
5436fc65 5678 else
4e327047
TT
5679 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5680 fi
5681fi
047465fd
TT
5682
5683# next check if it came with Tcl configuration file
5684if test x"${ac_cv_c_tclconfig}" = x ; then
5685 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
5686 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
5687 fi
5688fi
5689
4e327047
TT
5690# next check in private source directory
5691#
5692# since ls returns lowest version numbers first, reverse its output
5693if test x"${ac_cv_c_tclh}" = x ; then
5694 for i in \
5695 ${srcdir}/../tcl \
047465fd 5696 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
4e327047 5697 ${srcdir}/../../tcl \
047465fd 5698 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
4e327047 5699 ${srcdir}/../../../tcl \
047465fd 5700 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
4e327047 5701 if test -f $i/generic/tclInt.h ; then
047465fd 5702 ac_cv_c_tclh=`(cd $i/generic; pwd)`
1a7b4b7c 5703 break
4e327047
TT
5704 fi
5705 done
5706fi
5707# finally check in a few common install locations
5708#
5709# since ls returns lowest version numbers first, reverse its output
5710if test x"${ac_cv_c_tclh}" = x ; then
5711 for i in \
047465fd
TT
5712 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
5713 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
4e327047
TT
5714 /usr/local/src/tcl \
5715 /usr/local/lib/tcl \
5716 ${prefix}/include ; do
047465fd
TT
5717 if test -f $i/generic/tclInt.h ; then
5718 ac_cv_c_tclh=`(cd $i/generic; pwd)`
4e327047
TT
5719 break
5720 fi
5721 done
5722fi
5723# see if one is installed
5724if test x"${ac_cv_c_tclh}" = x ; then
bfde4a67 5725 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
4e327047 5726echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
b93f016b 5727echo "configure:5728: checking for tclInt.h" >&5
5436fc65
C
5728if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5729 echo $ac_n "(cached) $ac_c" 1>&6
5730else
5731 cat > conftest.$ac_ext <<EOF
b93f016b 5732#line 5733 "configure"
5436fc65 5733#include "confdefs.h"
4e327047 5734#include <tclInt.h>
5436fc65 5735EOF
1a7b4b7c 5736ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 5737{ (eval echo configure:5738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 5738ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436fc65
C
5739if test -z "$ac_err"; then
5740 rm -rf conftest*
5741 eval "ac_cv_header_$ac_safe=yes"
5742else
5743 echo "$ac_err" >&5
bfde4a67
SG
5744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5436fc65
C
5746 rm -rf conftest*
5747 eval "ac_cv_header_$ac_safe=no"
5748fi
5749rm -f conftest*
5750fi
5751if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5752 echo "$ac_t""yes" 1>&6
4e327047 5753 ac_cv_c_tclh=installed
5436fc65
C
5754else
5755 echo "$ac_t""no" 1>&6
4e327047 5756ac_cv_c_tclh=""
5436fc65
C
5757fi
5758
4e327047
TT
5759fi
5760
5761fi
5762
5763if test x"${ac_cv_c_tclh}" = x ; then
5764 TCLHDIR="# no Tcl private headers found"
5765 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
5766fi
5767if test x"${ac_cv_c_tclh}" != x ; then
5768 no_tcl=""
1a7b4b7c 5769 if test x"${ac_cv_c_tclh}" = x"installed" ; then
4e327047
TT
5770 echo "$ac_t""is installed" 1>&6
5771 TCLHDIR=""
5772 else
5773 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
5774 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
5775 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 5776 fi
5436fc65 5777fi
4e327047 5778
4e327047 5779
5436fc65 5780
0cf433d9 5781
5436fc65 5782#
4e327047
TT
5783# Ok, lets find the tk source trees so we can use the headers
5784# If the directory (presumably symlink) named "tk" exists, use that one
5785# in preference to any others. Same logic is used when choosing library
5786# and again with Tcl. The search order is the best place to look first, then in
5787# decreasing significance. The loop breaks if the trigger file is found.
5788# Note the gross little conversion here of srcdir by cd'ing to the found
5789# directory. This converts the path from a relative to an absolute, so
5790# recursive cache variables for the path will work right. We check all
5791# the possible paths in one loop rather than many seperate loops to speed
5792# things up.
047465fd 5793# the alternative search directory is involked by --with-tkinclude
5436fc65 5794#
047465fd 5795no_tk=true
4e327047 5796echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
b93f016b 5797echo "configure:5798: checking for Tk private headers" >&5
4e327047 5798# Check whether --with-tkinclude or --without-tkinclude was given.
1a7b4b7c
DE
5799if test "${with_tkinclude+set}" = set; then
5800 withval="$with_tkinclude"
4e327047
TT
5801 with_tkinclude=${withval}
5802fi
5803
4e327047
TT
5804if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
5805 echo $ac_n "(cached) $ac_c" 1>&6
5806else
5807
5808# first check to see if --with-tkinclude was specified
5809if test x"${with_tkinclude}" != x ; then
5810 if test -f ${with_tkinclude}/tk.h ; then
5811 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
047465fd
TT
5812 elif test -f ${with_tkinclude}/generic/tk.h ; then
5813 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5436fc65 5814 else
4e327047
TT
5815 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5816 fi
5817fi
047465fd
TT
5818
5819# next check if it came with Tk configuration file
5820if test x"${ac_cv_c_tkconfig}" = x ; then
5821 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
5822 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
5823 fi
5824fi
5825
4e327047
TT
5826# next check in private source directory
5827#
047465fd 5828# since ls returns lowest version numbers first, reverse its output
4e327047
TT
5829if test x"${ac_cv_c_tkh}" = x ; then
5830 for i in \
5831 ${srcdir}/../tk \
047465fd 5832 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
4e327047 5833 ${srcdir}/../../tk \
047465fd 5834 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
4e327047 5835 ${srcdir}/../../../tk \
047465fd
TT
5836 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
5837 if test -f $i/generic/tk.h ; then
5838 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
5839 break
5840 fi
4e327047
TT
5841 done
5842fi
5843# finally check in a few common install locations
5844#
047465fd 5845# since ls returns lowest version numbers first, reverse its output
4e327047
TT
5846if test x"${ac_cv_c_tkh}" = x ; then
5847 for i in \
047465fd
TT
5848 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
5849 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
4e327047
TT
5850 /usr/local/src/tk \
5851 /usr/local/lib/tk \
5852 ${prefix}/include ; do
047465fd
TT
5853 if test -f $i/generic/tk.h ; then
5854 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
5855 break
5856 fi
5857 done
5858fi
5859# see if one is installed
5860if test x"${ac_cv_c_tkh}" = x ; then
bfde4a67 5861 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
4e327047 5862echo $ac_n "checking for tk.h""... $ac_c" 1>&6
b93f016b 5863echo "configure:5864: checking for tk.h" >&5
5436fc65
C
5864if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5865 echo $ac_n "(cached) $ac_c" 1>&6
5866else
5867 cat > conftest.$ac_ext <<EOF
b93f016b 5868#line 5869 "configure"
5436fc65 5869#include "confdefs.h"
4e327047 5870#include <tk.h>
5436fc65 5871EOF
1a7b4b7c 5872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 5873{ (eval echo configure:5874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 5874ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5436fc65
C
5875if test -z "$ac_err"; then
5876 rm -rf conftest*
5877 eval "ac_cv_header_$ac_safe=yes"
5878else
5879 echo "$ac_err" >&5
bfde4a67
SG
5880 echo "configure: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5436fc65
C
5882 rm -rf conftest*
5883 eval "ac_cv_header_$ac_safe=no"
5884fi
5885rm -f conftest*
5886fi
5887if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5888 echo "$ac_t""yes" 1>&6
4e327047 5889 ac_cv_c_tkh=installed
5436fc65
C
5890else
5891 echo "$ac_t""no" 1>&6
047465fd 5892ac_cv_c_tkh=""
5436fc65
C
5893fi
5894
4e327047
TT
5895fi
5896
5897fi
5898
5899if test x"${ac_cv_c_tkh}" != x ; then
5900 no_tk=""
5901 if test x"${ac_cv_c_tkh}" = x"installed" ; then
5902 echo "$ac_t""is installed" 1>&6
5903 TKHDIR=""
5904 else
047465fd 5905 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
4e327047
TT
5906 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
5907 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
5908 fi
5909else
4e327047
TT
5910 TKHDIR="# no Tk directory found"
5911 echo "configure: warning: Can't find Tk private headers" 1>&2
5912 no_tk=true
5436fc65
C
5913fi
5914
5436fc65
C
5915
5916
2476848a
MH
5917
5918echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
b93f016b 5919echo "configure:5920: checking for Itcl private headers. srcdir=${srcdir}" >&5
2476848a
MH
5920if test x"${ac_cv_c_itclh}" = x ; then
5921 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
5922 if test -f $i/src/itcl.h ; then
5923 ac_cv_c_itclh=`(cd $i/src; pwd)`
5924 break
5925 fi
5926 done
5927fi
5928if test x"${ac_cv_c_itclh}" = x ; then
5929 ITCLHDIR="# no Itcl private headers found"
5930 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
5931fi
5932if test x"${ac_cv_c_itclh}" != x ; then
5933 ITCLHDIR="-I${ac_cv_c_itclh}"
5934fi
5935# should always be here
5936 ITCLLIB="../itcl/src/libitcl.a"
5937
5938
5939
5940
5941echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
b93f016b 5942echo "configure:5943: checking for Tix private headers. srcdir=${srcdir}" >&5
2476848a
MH
5943if test x"${ac_cv_c_tixh}" = x ; then
5944 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
5945 if test -f $i/generic/tix.h ; then
5946 ac_cv_c_tixh=`(cd $i/generic; pwd)`
5947 break
5948 fi
5949 done
5950fi
5951if test x"${ac_cv_c_tixh}" = x ; then
5952 TIXHDIR="# no Tix private headers found"
5953 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
5954fi
5955if test x"${ac_cv_c_tixh}" != x ; then
5956 TIXHDIR="-I${ac_cv_c_tixh}"
5957fi
2476848a
MH
5958
5959
5960
6bc5b2fa 5961 # now look for tix library stuff
1154b47a 5962 TIXVERSION=4.1.8.0
6bc5b2fa
MH
5963 . ${ac_cv_c_tclconfig}/tclConfig.sh
5964 case "${host}" in
b93f016b 5965 *-*-cygwin*)
f1f6dd9c 5966 tixdir=../tix/win/tcl8.0
6bc5b2fa
MH
5967 ;;
5968 *)
1154b47a 5969 tixdir=../tix/unix/tk8.0
6bc5b2fa
MH
5970 ;;
5971 esac
bb3d9f43
KS
5972 if test "${TCL_SHARED_BUILD}" = "1"; then
5973 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
11f91b2b
KS
5974
5975 # Can't win them all: SunOS 4 (others?) appends a version
5976 # number after the ".so"
5977 case "${host}" in
5978 *-*-sunos4*)
5979 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
5980 esac
5981
bb3d9f43
KS
5982 else
5983 TIX_LIB_EXT=".a"
5984 fi
11f91b2b 5985
6bc5b2fa
MH
5986 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
5987 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
bb3d9f43 5988 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
6bc5b2fa
MH
5989 else
5990 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
bb3d9f43 5991 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
6bc5b2fa 5992 fi
5436fc65 5993
0cf433d9 5994 ENABLE_GDBTK=1
509b70ac 5995 ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
5436fc65 5996
6c310da8 5997 # Include some libraries that Tcl and Tk want.
2476848a 5998 if test "${enable_ide}" = "yes"; then
8b5befef
ILT
5999 TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6000 CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
2476848a 6001 else
dafec9dd
ILT
6002 TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6003 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
2476848a 6004 fi
46964086
TT
6005 # Yes, the ordering seems wrong here. But it isn't.
6006 # TK_LIBS is the list of libraries that need to be linked
b177bf84
TT
6007 # after Tcl/Tk. Note that this isn't put into LIBS. If it
6008 # were in LIBS then any link tests after this point would
6009 # try to include things like `$(LIBGUI)', which wouldn't work.
6010 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
f3b86a30 6011 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o"
9b119644
ILT
6012
6013 if test x$gdb_cv_os_cygwin32 = xyes; then
018d76dd 6014 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32"
47792960 6015 WIN32LDAPP="-Wl,--subsystem,console"
929db6e5 6016 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9b119644 6017 fi
0cf433d9 6018 fi
1a57cd09 6019 fi
a2b63bbd 6020fi
66efdff9 6021
66efdff9 6022
5436fc65 6023
66efdff9
JM
6024
6025
6bc5b2fa 6026
018d76dd 6027
b177bf84 6028
5436fc65
C
6029# end-sanitize-gdbtk
6030
b236defa
FCE
6031# If we find X, set shell vars x_includes and x_libraries to the
6032# paths, otherwise set no_x=yes.
6033# Uses ac_ vars as temps to allow command line to override cache and checks.
6034# --without-x overrides everything else, but does not touch the cache.
6035echo $ac_n "checking for X""... $ac_c" 1>&6
b93f016b 6036echo "configure:6037: checking for X" >&5
b236defa
FCE
6037
6038# Check whether --with-x or --without-x was given.
6039if test "${with_x+set}" = set; then
6040 withval="$with_x"
6041 :
6042fi
6043
6044# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6045if test "x$with_x" = xno; then
6046 # The user explicitly disabled X.
6047 have_x=disabled
6048else
6049 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6050 # Both variables are already set.
6051 have_x=yes
6052 else
6053if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6054 echo $ac_n "(cached) $ac_c" 1>&6
6055else
6056 # One or both of the vars are not set, and there is no cached value.
6057ac_x_includes=NO ac_x_libraries=NO
6058rm -fr conftestdir
6059if mkdir conftestdir; then
6060 cd conftestdir
6061 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6062 cat > Imakefile <<'EOF'
6063acfindx:
6064 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6065EOF
6066 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6067 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6068 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6069 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6070 for ac_extension in a so sl; do
6071 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6072 test -f $ac_im_libdir/libX11.$ac_extension; then
6073 ac_im_usrlibdir=$ac_im_libdir; break
6074 fi
6075 done
6076 # Screen out bogus values from the imake configuration. They are
6077 # bogus both because they are the default anyway, and because
6078 # using them would break gcc on systems where it needs fixed includes.
6079 case "$ac_im_incroot" in
6080 /usr/include) ;;
6081 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6082 esac
6083 case "$ac_im_usrlibdir" in
6084 /usr/lib | /lib) ;;
6085 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6086 esac
6087 fi
6088 cd ..
6089 rm -fr conftestdir
6090fi
6091
6092if test "$ac_x_includes" = NO; then
6093 # Guess where to find include files, by looking for this one X11 .h file.
6094 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6095
6096 # First, try using that file with no special directory specified.
6097cat > conftest.$ac_ext <<EOF
b93f016b 6098#line 6099 "configure"
b236defa
FCE
6099#include "confdefs.h"
6100#include <$x_direct_test_include>
6101EOF
6102ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b93f016b 6103{ (eval echo configure:6104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4b23e55c 6104ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
b236defa
FCE
6105if test -z "$ac_err"; then
6106 rm -rf conftest*
6107 # We can compile using X headers with no special include directory.
6108ac_x_includes=
6109else
6110 echo "$ac_err" >&5
6111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 rm -rf conftest*
6114 # Look for the header file in a standard set of common directories.
6115# Check X11 before X11Rn because it is often a symlink to the current release.
6116 for ac_dir in \
6117 /usr/X11/include \
6118 /usr/X11R6/include \
6119 /usr/X11R5/include \
6120 /usr/X11R4/include \
6121 \
6122 /usr/include/X11 \
6123 /usr/include/X11R6 \
6124 /usr/include/X11R5 \
6125 /usr/include/X11R4 \
6126 \
6127 /usr/local/X11/include \
6128 /usr/local/X11R6/include \
6129 /usr/local/X11R5/include \
6130 /usr/local/X11R4/include \
6131 \
6132 /usr/local/include/X11 \
6133 /usr/local/include/X11R6 \
6134 /usr/local/include/X11R5 \
6135 /usr/local/include/X11R4 \
6136 \
6137 /usr/X386/include \
6138 /usr/x386/include \
6139 /usr/XFree86/include/X11 \
6140 \
6141 /usr/include \
6142 /usr/local/include \
6143 /usr/unsupported/include \
6144 /usr/athena/include \
6145 /usr/local/x11r5/include \
6146 /usr/lpp/Xamples/include \
6147 \
6148 /usr/openwin/include \
6149 /usr/openwin/share/include \
6150 ; \
6151 do
6152 if test -r "$ac_dir/$x_direct_test_include"; then
6153 ac_x_includes=$ac_dir
6154 break
6155 fi
6156 done
6157fi
6158rm -f conftest*
6159fi # $ac_x_includes = NO
6160
6161if test "$ac_x_libraries" = NO; then
6162 # Check for the libraries.
6163
6164 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6165 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6166
6167 # See if we find them without any special options.
6168 # Don't add to $LIBS permanently.
6169 ac_save_LIBS="$LIBS"
6170 LIBS="-l$x_direct_test_library $LIBS"
6171cat > conftest.$ac_ext <<EOF
b93f016b 6172#line 6173 "configure"
b236defa
FCE
6173#include "confdefs.h"
6174
6175int main() {
6176${x_direct_test_function}()
6177; return 0; }
6178EOF
b93f016b 6179if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b236defa
FCE
6180 rm -rf conftest*
6181 LIBS="$ac_save_LIBS"
6182# We can link X programs with no special library path.
6183ac_x_libraries=
6184else
6185 echo "configure: failed program was:" >&5
6186 cat conftest.$ac_ext >&5
6187 rm -rf conftest*
6188 LIBS="$ac_save_LIBS"
6189# First see if replacing the include by lib works.
6190# Check X11 before X11Rn because it is often a symlink to the current release.
6191for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6192 /usr/X11/lib \
6193 /usr/X11R6/lib \
6194 /usr/X11R5/lib \
6195 /usr/X11R4/lib \
6196 \
6197 /usr/lib/X11 \
6198 /usr/lib/X11R6 \
6199 /usr/lib/X11R5 \
6200 /usr/lib/X11R4 \
6201 \
6202 /usr/local/X11/lib \
6203 /usr/local/X11R6/lib \
6204 /usr/local/X11R5/lib \
6205 /usr/local/X11R4/lib \
6206 \
6207 /usr/local/lib/X11 \
6208 /usr/local/lib/X11R6 \
6209 /usr/local/lib/X11R5 \
6210 /usr/local/lib/X11R4 \
6211 \
6212 /usr/X386/lib \
6213 /usr/x386/lib \
6214 /usr/XFree86/lib/X11 \
6215 \
6216 /usr/lib \
6217 /usr/local/lib \
6218 /usr/unsupported/lib \
6219 /usr/athena/lib \
6220 /usr/local/x11r5/lib \
6221 /usr/lpp/Xamples/lib \
6222 /lib/usr/lib/X11 \
6223 \
6224 /usr/openwin/lib \
6225 /usr/openwin/share/lib \
6226 ; \
6227do
6228 for ac_extension in a so sl; do
6229 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6230 ac_x_libraries=$ac_dir
6231 break 2
6232 fi
6233 done
6234done
6235fi
6236rm -f conftest*
6237fi # $ac_x_libraries = NO
6238
6239if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6240 # Didn't find X anywhere. Cache the known absence of X.
6241 ac_cv_have_x="have_x=no"
6242else
6243 # Record where we found X for the cache.
6244 ac_cv_have_x="have_x=yes \
6245 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6246fi
6247fi
6248 fi
6249 eval "$ac_cv_have_x"
6250fi # $with_x != no
6251
6252if test "$have_x" != yes; then
6253 echo "$ac_t""$have_x" 1>&6
6254 no_x=yes
6255else
6256 # If each of the values was on the command line, it overrides each guess.
6257 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6258 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6259 # Update the cache value to reflect the command line values.
6260 ac_cv_have_x="have_x=yes \
6261 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6262 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6263fi
6264
6265# start-sanitize-sky
6266# Enable GPU2 library for MIPS simulator
6267# Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
6268if test "${with_sim_gpu2+set}" = set; then
6269 withval="$with_sim_gpu2"
bd5eafcd 6270 case "${target}" in
af3711e6 6271 mips*-sky*-*)
bd5eafcd
FCE
6272 if test -d "${withval}"
6273 then
f915cc91 6274 LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext"
bd5eafcd
FCE
6275 else
6276 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6277 fi ;;
6278 *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
6279esac
b236defa 6280fi
75a55dc3
JM
6281
6282# Enable target accurate FP library
6283# Check whether --with-sim-funit or --without-sim-funit was given.
6284if test "${with_sim_funit+set}" = set; then
6285 withval="$with_sim_funit"
6286 case "${target}" in
af3711e6 6287 mips*-sky*-*)
75a55dc3
JM
6288 if test -d "${withval}"
6289 then
6290 LIBS="${LIBS} -L${withval}/lib -lfunit"
6291 else
6292 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6293 fi ;;
6294 *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
6295esac
6296fi
b236defa
FCE
6297# end-sanitize-sky
6298
5436fc65
C
6299
6300
6301
6302
018d76dd 6303
c7bb1531 6304
1d5eb137
FF
6305# Begin stuff to support --enable-shared
6306# Check whether --enable-shared or --disable-shared was given.
6307if test "${enable_shared+set}" = set; then
6308 enableval="$enable_shared"
6309 case "${enableval}" in
6310 yes) shared=true ;;
6311 no) shared=false ;;
6312 *) shared=true ;;
6313esac
6314fi
6315
6316HLDFLAGS=
6317HLDENV=
6318# If we have shared libraries, try to set rpath reasonably.
6319if test "${shared}" = "true"; then
6320 case "${host}" in
6321 *-*-hpux*)
6322 HLDFLAGS='-Wl,+s,+b,$(libdir)'
6323 ;;
6324 *-*-irix5* | *-*-irix6*)
6325 HLDFLAGS='-Wl,-rpath,$(libdir)'
6326 ;;
6327 *-*-linux*aout*)
6328 ;;
8ddf07a2 6329 *-*-linux* | *-pc-linux-gnu)
1d5eb137
FF
6330 HLDFLAGS='-Wl,-rpath,$(libdir)'
6331 ;;
6332 *-*-solaris*)
6333 HLDFLAGS='-R $(libdir)'
6334 ;;
6335 *-*-sysv4*)
6336 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
6337 ;;
6338 esac
6339fi
6340
6341# On SunOS, if the linker supports the -rpath option, use it to
6342# prevent ../bfd and ../opcodes from being included in the run time
6343# search path.
6344case "${host}" in
6345 *-*-sunos*)
6346 echo 'main () { }' > conftest.c
6347 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
6348 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
6349 :
6350 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
6351 :
6352 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
6353 :
074d813d
PS
6354 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
6355 :
1d5eb137
FF
6356 elif test "${shared}" = "true"; then
6357 HLDFLAGS='-Wl,-rpath=$(libdir)'
6358 else
6359 HLDFLAGS='-Wl,-rpath='
6360 fi
6361 rm -f conftest.t conftest.c conftest
6362 ;;
6363esac
6364
6365
6366# End stuff to support --enable-shared
6367
7c40dd08
DE
6368# target_subdir is used by the testsuite to find the target libraries.
6369target_subdir=
6370if test "${host}" != "${target}"; then
6371 target_subdir="${target_alias}/"
6372fi
6373
5436fc65 6374
5f107900 6375frags=
5436fc65
C
6376host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
6377if test ! -f ${host_makefile_frag}; then
6378{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
6379fi
5f107900 6380frags="$frags $host_makefile_frag"
5436fc65
C
6381
6382target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
6383if test ! -f ${target_makefile_frag}; then
6384{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
6385fi
5f107900 6386frags="$frags $target_makefile_frag"
5436fc65
C
6387
6388
6389
6390
6391
094fd4ae
C
6392hostfile=`sed -n '
6393s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6394' ${host_makefile_frag}`
5436fc65 6395
094fd4ae
C
6396targetfile=`sed -n '
6397s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6398' ${target_makefile_frag}`
5436fc65
C
6399
6400# these really aren't orthogonal true/false values of the same condition,
6401# but shells are slow enough that I like to reuse the test conditions
6402# whenever possible
6403if test "${target}" = "${host}"; then
094fd4ae
C
6404nativefile=`sed -n '
6405s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6406' ${host_makefile_frag}`
33ef0f93 6407# else
5436fc65 6408# GDBserver is only useful in a "native" enviroment
33ef0f93 6409# configdirs=`echo $configdirs | sed 's/gdbserver//'`
5436fc65
C
6410fi
6411
094fd4ae 6412
5436fc65
C
6413# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6414# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
6415# corresponding links. But we have to remove the xm.h files and tm.h
6416# files anyway, e.g. when switching from "configure host" to
6417# "configure none".
6418
6419files=
6420links=
6421rm -f xm.h
6422if test "${hostfile}" != ""; then
6423files="${files} config/${gdb_host_cpu}/${hostfile}"
6424links="${links} xm.h"
6425fi
6426rm -f tm.h
6427if test "${targetfile}" != ""; then
6428files="${files} config/${gdb_target_cpu}/${targetfile}"
6429links="${links} tm.h"
6430fi
6431rm -f nm.h
6432if test "${nativefile}" != ""; then
6433files="${files} config/${gdb_host_cpu}/${nativefile}"
6434links="${links} nm.h"
6435else
6436# A cross-only configuration.
6437files="${files} config/nm-empty.h"
6438links="${links} nm.h"
6439fi
6440# start-sanitize-gdbtk
99174711 6441echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
b93f016b 6442echo "configure:6443: checking whether ln -s works" >&5
99174711
JM
6443if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
6444 echo $ac_n "(cached) $ac_c" 1>&6
6445else
6446 rm -f conftestdata
6447if ln -s X conftestdata 2>/dev/null
6448then
6449 rm -f conftestdata
6450 ac_cv_prog_LN_S="ln -s"
6451else
6452 ac_cv_prog_LN_S=ln
6453fi
6454fi
6455LN_S="$ac_cv_prog_LN_S"
6456if test "$ac_cv_prog_LN_S" = "ln -s"; then
6457 echo "$ac_t""yes" 1>&6
6458else
6459 echo "$ac_t""no" 1>&6
6460fi
5436fc65
C
6461
6462# Make it possible to use the GUI without doing a full install
454e0c7d
AC
6463if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then
6464 if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then
6465 echo linking $srcdir/gdbtcl2 to gdbtcl2
6466 $LN_S $srcdir/gdbtcl2 gdbtcl2
99174711 6467 else
454e0c7d 6468 echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2. You will need to do a
99174711
JM
6469 echo " " make install before you are able to run the GUI.
6470 fi
5436fc65
C
6471fi
6472# end-sanitize-gdbtk
6473
6474
6475
9c1fb2a7 6476echo $ac_n "checking for cygwin32 environment""... $ac_c" 1>&6
b93f016b 6477echo "configure:6478: checking for cygwin32 environment" >&5
9c1fb2a7 6478if eval "test \"`echo '$''{'ac_cv_cygwin32'+set}'`\" = set"; then
3fbb8cde
ILT
6479 echo $ac_n "(cached) $ac_c" 1>&6
6480else
6481 cat > conftest.$ac_ext <<EOF
b93f016b 6482#line 6483 "configure"
3fbb8cde
ILT
6483#include "confdefs.h"
6484
6485int main() {
b2b1c5da 6486return __CYGWIN32__;
3fbb8cde
ILT
6487; return 0; }
6488EOF
b93f016b 6489if { (eval echo configure:6490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3fbb8cde 6490 rm -rf conftest*
9c1fb2a7 6491 ac_cv_cygwin32=yes
3fbb8cde
ILT
6492else
6493 echo "configure: failed program was:" >&5
6494 cat conftest.$ac_ext >&5
6495 rm -rf conftest*
9c1fb2a7 6496 ac_cv_cygwin32=no
3fbb8cde
ILT
6497fi
6498rm -f conftest*
6499rm -f conftest*
6500fi
6501
9c1fb2a7 6502echo "$ac_t""$ac_cv_cygwin32" 1>&6
3fbb8cde 6503CYGWIN32=
9c1fb2a7
JM
6504test "$ac_cv_cygwin32" = yes && CYGWIN32=yes
6505echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
b93f016b 6506echo "configure:6507: checking for mingw32 environment" >&5
9c1fb2a7 6507if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
b2b1c5da
MM
6508 echo $ac_n "(cached) $ac_c" 1>&6
6509else
6510 cat > conftest.$ac_ext <<EOF
b93f016b 6511#line 6512 "configure"
b2b1c5da
MM
6512#include "confdefs.h"
6513
6514int main() {
6515return __MINGW32__;
6516; return 0; }
6517EOF
b93f016b 6518if { (eval echo configure:6519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2b1c5da 6519 rm -rf conftest*
9c1fb2a7 6520 ac_cv_mingw32=yes
b2b1c5da
MM
6521else
6522 echo "configure: failed program was:" >&5
6523 cat conftest.$ac_ext >&5
6524 rm -rf conftest*
9c1fb2a7 6525 ac_cv_mingw32=no
b2b1c5da
MM
6526fi
6527rm -f conftest*
6528rm -f conftest*
6529fi
6530
9c1fb2a7 6531echo "$ac_t""$ac_cv_mingw32" 1>&6
b2b1c5da 6532MINGW32=
9c1fb2a7 6533test "$ac_cv_mingw32" = yes && MINGW32=yes
b2b1c5da 6534
98fa4ade
GN
6535
6536echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
b93f016b 6537echo "configure:6538: checking for executable suffix" >&5
9c1fb2a7 6538if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
98fa4ade
GN
6539 echo $ac_n "(cached) $ac_c" 1>&6
6540else
dd600735 6541 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
9c1fb2a7
JM
6542 ac_cv_exeext=.exe
6543else
6544 rm -f conftest*
6545 echo 'int main () { return 0; }' > conftest.$ac_ext
6546 ac_cv_exeext=
b93f016b 6547 if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
9c1fb2a7
JM
6548 for file in conftest.*; do
6549 case $file in
b9a9cde4 6550 *.c | *.o | *.obj) ;;
9c1fb2a7
JM
6551 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
6552 esac
6553 done
6554 else
6555 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
6556 fi
6557 rm -f conftest*
6558 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
98fa4ade 6559fi
98fa4ade 6560fi
9c1fb2a7 6561
98fa4ade 6562EXEEXT=""
9c1fb2a7
JM
6563test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
6564echo "$ac_t""${ac_cv_exeext}" 1>&6
6565ac_exeext=$EXEEXT
98fa4ade
GN
6566
6567
5436fc65
C
6568subdirs="$configdirs"
6569
6570trap '' 1 2 15
6571cat > confcache <<\EOF
6572# This file is a shell script that caches the results of configure
6573# tests run on this system so they can be shared between configure
6574# scripts and configure runs. It is not useful on other systems.
6575# If it contains results you don't want to keep, you may remove or edit it.
6576#
6577# By default, configure uses ./config.cache as the cache file,
6578# creating it if it does not exist already. You can give configure
6579# the --cache-file=FILE option to use a different cache file; that is
6580# what configure does when it calls configure scripts in
6581# subdirectories, so they share the cache.
6582# Giving --cache-file=/dev/null disables caching, for debugging configure.
6583# config.status only pays attention to the cache file if you give it the
6584# --recheck option to rerun configure.
6585#
6586EOF
bfde4a67
SG
6587# The following way of writing the cache mishandles newlines in values,
6588# but we know of no workaround that is simple, portable, and efficient.
6589# So, don't put newlines in cache variables' values.
5436fc65
C
6590# Ultrix sh set writes to stderr and can't be redirected directly,
6591# and sets the high bit in the cache file unless we assign to the vars.
6592(set) 2>&1 |
b93f016b 6593 case `(ac_space=' '; set | grep ac_space) 2>&1` in
bfde4a67
SG
6594 *ac_space=\ *)
6595 # `set' does not quote correctly, so add quotes (double-quote substitution
6596 # turns \\\\ into \\, and sed turns \\ into \).
6597 sed -n \
6598 -e "s/'/'\\\\''/g" \
6599 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6600 ;;
6601 *)
6602 # `set' quotes correctly as required by POSIX, so do not add quotes.
6603 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6604 ;;
6605 esac >> confcache
5436fc65
C
6606if cmp -s $cache_file confcache; then
6607 :
6608else
6609 if test -w $cache_file; then
6610 echo "updating cache $cache_file"
6611 cat confcache > $cache_file
6612 else
6613 echo "not updating unwritable cache $cache_file"
6614 fi
6615fi
6616rm -f confcache
6617
6618trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6619
6620test "x$prefix" = xNONE && prefix=$ac_default_prefix
6621# Let make expand exec_prefix.
6622test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6623
6624# Any assignment to VPATH causes Sun make to only execute
6625# the first set of double-colon rules, so remove it if not needed.
6626# If there is a colon in the path, we need to keep it.
6627if test "x$srcdir" = x.; then
6628 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6629fi
6630
6631trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6632
db210d08 6633DEFS=-DHAVE_CONFIG_H
5436fc65
C
6634
6635# Without the "./", some shells look in PATH for config.status.
6636: ${CONFIG_STATUS=./config.status}
6637
6638echo creating $CONFIG_STATUS
6639rm -f $CONFIG_STATUS
6640cat > $CONFIG_STATUS <<EOF
6641#! /bin/sh
6642# Generated automatically by configure.
6643# Run this file to recreate the current configuration.
6644# This directory was configured as follows,
6645# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6646#
6647# $0 $ac_configure_args
6648#
6649# Compiler output produced by configure, useful for debugging
6650# configure, is in ./config.log if it exists.
6651
6652ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6653for ac_option
6654do
6655 case "\$ac_option" in
6656 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6657 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6658 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6659 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4b23e55c 6660 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
5436fc65
C
6661 exit 0 ;;
6662 -help | --help | --hel | --he | --h)
6663 echo "\$ac_cs_usage"; exit 0 ;;
6664 *) echo "\$ac_cs_usage"; exit 1 ;;
6665 esac
6666done
6667
6668ac_given_srcdir=$srcdir
6669ac_given_INSTALL="$INSTALL"
6670
0cb7d01d 6671trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1a7b4b7c
DE
6672EOF
6673cat >> $CONFIG_STATUS <<EOF
5436fc65 6674
1a7b4b7c
DE
6675# Protect against being on the right side of a sed subst in config.status.
6676sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6677 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
6678$ac_vpsub
6679$extrasub
4b23e55c 6680s%@SHELL@%$SHELL%g
5436fc65
C
6681s%@CFLAGS@%$CFLAGS%g
6682s%@CPPFLAGS@%$CPPFLAGS%g
6683s%@CXXFLAGS@%$CXXFLAGS%g
b93f016b 6684s%@FFLAGS@%$FFLAGS%g
5436fc65
C
6685s%@DEFS@%$DEFS%g
6686s%@LDFLAGS@%$LDFLAGS%g
6687s%@LIBS@%$LIBS%g
6688s%@exec_prefix@%$exec_prefix%g
6689s%@prefix@%$prefix%g
6690s%@program_transform_name@%$program_transform_name%g
1a7b4b7c
DE
6691s%@bindir@%$bindir%g
6692s%@sbindir@%$sbindir%g
6693s%@libexecdir@%$libexecdir%g
6694s%@datadir@%$datadir%g
6695s%@sysconfdir@%$sysconfdir%g
6696s%@sharedstatedir@%$sharedstatedir%g
6697s%@localstatedir@%$localstatedir%g
6698s%@libdir@%$libdir%g
6699s%@includedir@%$includedir%g
6700s%@oldincludedir@%$oldincludedir%g
6701s%@infodir@%$infodir%g
6702s%@mandir@%$mandir%g
5436fc65
C
6703s%@CC@%$CC%g
6704s%@CPP@%$CPP%g
5436fc65
C
6705s%@host@%$host%g
6706s%@host_alias@%$host_alias%g
6707s%@host_cpu@%$host_cpu%g
6708s%@host_vendor@%$host_vendor%g
6709s%@host_os@%$host_os%g
0579b53d
GN
6710s%@target@%$target%g
6711s%@target_alias@%$target_alias%g
6712s%@target_cpu@%$target_cpu%g
6713s%@target_vendor@%$target_vendor%g
6714s%@target_os@%$target_os%g
5436fc65
C
6715s%@build@%$build%g
6716s%@build_alias@%$build_alias%g
6717s%@build_cpu@%$build_cpu%g
6718s%@build_vendor@%$build_vendor%g
6719s%@build_os@%$build_os%g
fcfc3c0c
TT
6720s%@SET_MAKE@%$SET_MAKE%g
6721s%@RANLIB@%$RANLIB%g
6722s%@ALLOCA@%$ALLOCA%g
6723s%@USE_NLS@%$USE_NLS%g
6724s%@MSGFMT@%$MSGFMT%g
6725s%@GMSGFMT@%$GMSGFMT%g
6726s%@XGETTEXT@%$XGETTEXT%g
6727s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6728s%@CATALOGS@%$CATALOGS%g
6729s%@CATOBJEXT@%$CATOBJEXT%g
6730s%@DATADIRNAME@%$DATADIRNAME%g
6731s%@GMOFILES@%$GMOFILES%g
6732s%@INSTOBJEXT@%$INSTOBJEXT%g
6733s%@INTLDEPS@%$INTLDEPS%g
6734s%@INTLLIBS@%$INTLLIBS%g
6735s%@INTLOBJS@%$INTLOBJS%g
6736s%@POFILES@%$POFILES%g
6737s%@POSUB@%$POSUB%g
6738s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6739s%@GT_NO@%$GT_NO%g
6740s%@GT_YES@%$GT_YES%g
6741s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6742s%@l@%$l%g
0579b53d 6743s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
b93f016b 6744s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
0579b53d 6745s%@INSTALL_DATA@%$INSTALL_DATA%g
d8efbc66 6746s%@AR@%$AR%g
d8efbc66 6747s%@YACC@%$YACC%g
4915acad 6748s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
ba68ad57 6749s%@WARN_CFLAGS@%$WARN_CFLAGS%g
0728afad
FF
6750s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
6751s%@MMALLOC@%$MMALLOC%g
287026b7 6752s%@MACHINE_OBS@%$MACHINE_OBS%g
2476848a 6753s%@ENABLE_IDE@%$ENABLE_IDE%g
c076f1ed
DM
6754s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
6755s%@LIBGUI@%$LIBGUI%g
6756s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
6757s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
6758s%@IDE_X@%$IDE_X%g
6759s%@LIBIDETCL@%$LIBIDETCL%g
6760s%@LIBIDE@%$LIBIDE%g
6761s%@IDE_DEPS@%$IDE_DEPS%g
9b119644
ILT
6762s%@WIN32LIBS@%$WIN32LIBS%g
6763s%@WIN32LDAPP@%$WIN32LDAPP%g
b0f33a03 6764s%@DLLTOOL@%$DLLTOOL%g
929db6e5 6765s%@WINDRES@%$WINDRES%g
047465fd
TT
6766s%@TCL_VERSION@%$TCL_VERSION%g
6767s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
6768s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
6769s%@TCL_CC@%$TCL_CC%g
6770s%@TCL_DEFS@%$TCL_DEFS%g
6771s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
6772s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6773s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
6774s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
6775s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
6776s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6777s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
6778s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
6779s%@TCL_RANLIB@%$TCL_RANLIB%g
6780s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6781s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6782s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
6783s%@TK_VERSION@%$TK_VERSION%g
6784s%@TK_DEFS@%$TK_DEFS%g
9b119644 6785s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
047465fd
TT
6786s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6787s%@TK_XLIBSW@%$TK_XLIBSW%g
6788s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6789s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
5436fc65 6790s%@TCLHDIR@%$TCLHDIR%g
4e327047 6791s%@TKHDIR@%$TKHDIR%g
2476848a
MH
6792s%@ITCLHDIR@%$ITCLHDIR%g
6793s%@ITCLLIB@%$ITCLLIB%g
6794s%@TIXHDIR@%$TIXHDIR%g
5436fc65 6795s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
047465fd 6796s%@X_CFLAGS@%$X_CFLAGS%g
a2b63bbd 6797s%@X_LDFLAGS@%$X_LDFLAGS%g
047465fd 6798s%@X_LIBS@%$X_LIBS%g
6bc5b2fa 6799s%@TIXLIB@%$TIXLIB%g
018d76dd 6800s%@TIX_DEPS@%$TIX_DEPS%g
b177bf84 6801s%@GDBTKLIBS@%$GDBTKLIBS%g
5436fc65 6802s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6c310da8 6803s%@CONFIG_OBS@%$CONFIG_OBS%g
018d76dd 6804s%@CONFIG_DEPS@%$CONFIG_DEPS%g
c7bb1531 6805s%@CONFIG_SRCS@%$CONFIG_SRCS%g
1d5eb137
FF
6806s%@HLDFLAGS@%$HLDFLAGS%g
6807s%@HLDENV@%$HLDENV%g
7c40dd08 6808s%@target_subdir@%$target_subdir%g
5436fc65
C
6809/@host_makefile_frag@/r $host_makefile_frag
6810s%@host_makefile_frag@%%g
6811/@target_makefile_frag@/r $target_makefile_frag
6812s%@target_makefile_frag@%%g
5f107900 6813s%@frags@%$frags%g
99174711 6814s%@LN_S@%$LN_S%g
3fbb8cde 6815s%@EXEEXT@%$EXEEXT%g
5436fc65
C
6816s%@subdirs@%$subdirs%g
6817
6818CEOF
6819EOF
bfde4a67
SG
6820
6821cat >> $CONFIG_STATUS <<\EOF
6822
6823# Split the substitutions into bite-sized pieces for seds with
6824# small command number limits, like on Digital OSF/1 and HP-UX.
6825ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6826ac_file=1 # Number of current file.
6827ac_beg=1 # First line for current file.
6828ac_end=$ac_max_sed_cmds # Line after last line for current file.
6829ac_more_lines=:
6830ac_sed_cmds=""
6831while $ac_more_lines; do
6832 if test $ac_beg -gt 1; then
6833 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6834 else
6835 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6836 fi
6837 if test ! -s conftest.s$ac_file; then
6838 ac_more_lines=false
6839 rm -f conftest.s$ac_file
6840 else
6841 if test -z "$ac_sed_cmds"; then
6842 ac_sed_cmds="sed -f conftest.s$ac_file"
6843 else
6844 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6845 fi
6846 ac_file=`expr $ac_file + 1`
6847 ac_beg=$ac_end
6848 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6849 fi
6850done
6851if test -z "$ac_sed_cmds"; then
6852 ac_sed_cmds=cat
6853fi
6854EOF
6855
5436fc65
C
6856cat >> $CONFIG_STATUS <<EOF
6857
0cb7d01d 6858CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
5436fc65
C
6859EOF
6860cat >> $CONFIG_STATUS <<\EOF
6861for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
bfde4a67 6862 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5436fc65 6863 case "$ac_file" in
bfde4a67 6864 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5436fc65
C
6865 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6866 *) ac_file_in="${ac_file}.in" ;;
6867 esac
6868
bfde4a67 6869 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5436fc65
C
6870
6871 # Remove last slash and all that follows it. Not all systems have dirname.
6872 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6873 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6874 # The file is in a subdirectory.
6875 test ! -d "$ac_dir" && mkdir "$ac_dir"
6876 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6877 # A "../" for each directory in $ac_dir_suffix.
6878 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6879 else
6880 ac_dir_suffix= ac_dots=
6881 fi
6882
6883 case "$ac_given_srcdir" in
6884 .) srcdir=.
6885 if test -z "$ac_dots"; then top_srcdir=.
6886 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6887 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6888 *) # Relative path.
6889 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6890 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6891 esac
6892
6893 case "$ac_given_INSTALL" in
6894 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6895 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6896 esac
bfde4a67 6897
5436fc65
C
6898 echo creating "$ac_file"
6899 rm -f "$ac_file"
6900 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6901 case "$ac_file" in
6902 *Makefile*) ac_comsub="1i\\
6903# $configure_input" ;;
6904 *) ac_comsub= ;;
6905 esac
bfde4a67
SG
6906
6907 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5436fc65
C
6908 sed -e "$ac_comsub
6909s%@configure_input@%$configure_input%g
6910s%@srcdir@%$srcdir%g
6911s%@top_srcdir@%$top_srcdir%g
6912s%@INSTALL@%$INSTALL%g
bfde4a67 6913" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5436fc65 6914fi; done
bfde4a67 6915rm -f conftest.s*
5436fc65 6916
db210d08
FF
6917# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6918# NAME is the cpp macro being defined and VALUE is the value it is being given.
6919#
6920# ac_d sets the value in "#define NAME VALUE" lines.
6921ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6922ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6923ac_dC='\3'
6924ac_dD='%g'
6925# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6926ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6927ac_uB='\([ ]\)%\1#\2define\3'
6928ac_uC=' '
6929ac_uD='\4%g'
6930# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6931ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6932ac_eB='$%\1#\2define\3'
6933ac_eC=' '
6934ac_eD='%g'
6935
bfde4a67
SG
6936if test "${CONFIG_HEADERS+set}" != set; then
6937EOF
6938cat >> $CONFIG_STATUS <<EOF
6939 CONFIG_HEADERS="config.h:config.in"
6940EOF
6941cat >> $CONFIG_STATUS <<\EOF
6942fi
db210d08 6943for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
bfde4a67 6944 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
db210d08 6945 case "$ac_file" in
bfde4a67 6946 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
db210d08
FF
6947 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6948 *) ac_file_in="${ac_file}.in" ;;
6949 esac
6950
6951 echo creating $ac_file
6952
6953 rm -f conftest.frag conftest.in conftest.out
bfde4a67
SG
6954 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6955 cat $ac_file_inputs > conftest.in
db210d08
FF
6956
6957EOF
6958
6959# Transform confdefs.h into a sed script conftest.vals that substitutes
6960# the proper values into config.h.in to produce config.h. And first:
1a7b4b7c 6961# Protect against being on the right side of a sed subst in config.status.
db210d08
FF
6962# Protect against being in an unquoted here document in config.status.
6963rm -f conftest.vals
6964cat > conftest.hdr <<\EOF
6965s/[\\&%]/\\&/g
6966s%[\\$`]%\\&%g
bc859e63 6967s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
db210d08
FF
6968s%ac_d%ac_u%gp
6969s%ac_u%ac_e%gp
6970EOF
6971sed -n -f conftest.hdr confdefs.h > conftest.vals
6972rm -f conftest.hdr
6973
6974# This sed command replaces #undef with comments. This is necessary, for
6975# example, in the case of _POSIX_SOURCE, which is predefined and required
6976# on some systems where configure will not decide to define it.
6977cat >> conftest.vals <<\EOF
6978s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6979EOF
6980
6981# Break up conftest.vals because some shells have a limit on
6982# the size of here documents, and old seds have small limits too.
db210d08
FF
6983
6984rm -f conftest.tail
6985while :
6986do
6987 ac_lines=`grep -c . conftest.vals`
6988 # grep -c gives empty output for an empty file on some AIX systems.
6989 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6990 # Write a limited-size here document to conftest.frag.
6991 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6992 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6993 echo 'CEOF
6994 sed -f conftest.frag conftest.in > conftest.out
6995 rm -f conftest.in
6996 mv conftest.out conftest.in
6997' >> $CONFIG_STATUS
6998 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6999 rm -f conftest.vals
7000 mv conftest.tail conftest.vals
7001done
7002rm -f conftest.vals
7003
7004cat >> $CONFIG_STATUS <<\EOF
7005 rm -f conftest.frag conftest.h
7006 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7007 cat conftest.in >> conftest.h
7008 rm -f conftest.in
7009 if cmp -s $ac_file conftest.h 2>/dev/null; then
7010 echo "$ac_file is unchanged"
7011 rm -f conftest.h
7012 else
bc859e63
SG
7013 # Remove last slash and all that follows it. Not all systems have dirname.
7014 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7015 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7016 # The file is in a subdirectory.
7017 test ! -d "$ac_dir" && mkdir "$ac_dir"
7018 fi
db210d08
FF
7019 rm -f $ac_file
7020 mv conftest.h $ac_file
7021 fi
7022fi; done
7023
5436fc65
C
7024EOF
7025
7026cat >> $CONFIG_STATUS <<EOF
7027ac_sources="$files"
7028ac_dests="$links"
7029EOF
7030
7031cat >> $CONFIG_STATUS <<\EOF
7032srcdir=$ac_given_srcdir
7033while test -n "$ac_sources"; do
7034 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7035 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7036
7037 echo "linking $srcdir/$ac_source to $ac_dest"
7038
7039 if test ! -r $srcdir/$ac_source; then
7040 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7041 fi
7042 rm -f $ac_dest
7043
7044 # Make relative symlinks.
7045 # Remove last slash and all that follows it. Not all systems have dirname.
7046 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7047 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7048 # The dest file is in a subdirectory.
7049 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7050 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7051 # A "../" for each directory in $ac_dest_dir_suffix.
7052 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7053 else
7054 ac_dest_dir_suffix= ac_dots=
7055 fi
7056
7057 case "$srcdir" in
7058 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7059 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7060 esac
7061
7062 # Make a symlink if possible; otherwise try a hard link.
7063 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7064 ln $srcdir/$ac_source $ac_dest; then :
7065 else
7066 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7067 fi
7068done
0a5a1821
C
7069EOF
7070cat >> $CONFIG_STATUS <<EOF
5436fc65 7071
0a5a1821
C
7072gdb_host_cpu=$gdb_host_cpu
7073gdb_target_cpu=$gdb_target_cpu
7074nativefile=$nativefile
7075
7076EOF
7077cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
7078
7079if test "${nativefile}" = ""; then
7bd1f0c5 7080sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
5436fc65
C
7081 < Makefile > Makefile.tem
7082mv -f Makefile.tem Makefile
7083fi
7084
7085sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
7086/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
7087/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
7088mv -f Makefile.tmp Makefile
7089
31520669 7090case x$CONFIG_HEADERS in
18ea4416 7091xconfig.h:config.in)
31520669
FF
7092echo > stamp-h ;;
7093esac
7094
5436fc65
C
7095exit 0
7096EOF
7097chmod +x $CONFIG_STATUS
7098rm -fr confdefs* $ac_clean_files
7099test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7100
7101if test "$no_recursion" != yes; then
7102
7103 # Remove --cache-file and --srcdir arguments so they do not pile up.
7104 ac_sub_configure_args=
7105 ac_prev=
7106 for ac_arg in $ac_configure_args; do
7107 if test -n "$ac_prev"; then
7108 ac_prev=
7109 continue
7110 fi
7111 case "$ac_arg" in
7112 -cache-file | --cache-file | --cache-fil | --cache-fi \
7113 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7114 ac_prev=cache_file ;;
7115 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7116 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7117 ;;
7118 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7119 ac_prev=srcdir ;;
7120 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7121 ;;
7122 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7123 esac
7124 done
7125
7126 for ac_config_dir in $configdirs; do
7127
7128 # Do not complain, so a configure script can configure whichever
7129 # parts of a large source tree are present.
7130 if test ! -d $srcdir/$ac_config_dir; then
7131 continue
7132 fi
7133
7134 echo configuring in $ac_config_dir
7135
7136 case "$srcdir" in
7137 .) ;;
7138 *)
7139 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7140 else
7141 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7142 fi
7143 ;;
7144 esac
7145
7146 ac_popdir=`pwd`
7147 cd $ac_config_dir
7148
bfde4a67
SG
7149 # A "../" for each directory in /$ac_config_dir.
7150 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7151
5436fc65
C
7152 case "$srcdir" in
7153 .) # No --srcdir option. We are building in place.
7154 ac_sub_srcdir=$srcdir ;;
7155 /*) # Absolute path.
7156 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7157 *) # Relative path.
bfde4a67 7158 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5436fc65
C
7159 esac
7160
7161 # Check for guested configure; otherwise get Cygnus style configure.
7162 if test -f $ac_sub_srcdir/configure; then
7163 ac_sub_configure=$ac_sub_srcdir/configure
7164 elif test -f $ac_sub_srcdir/configure.in; then
7165 ac_sub_configure=$ac_configure
7166 else
7167 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7168 ac_sub_configure=
7169 fi
7170
7171 # The recursion is here.
7172 if test -n "$ac_sub_configure"; then
7173
7174 # Make the cache file name correct relative to the subdirectory.
5436fc65
C
7175 case "$cache_file" in
7176 /*) ac_sub_cache_file=$cache_file ;;
7177 *) # Relative path.
7178 ac_sub_cache_file="$ac_dots$cache_file" ;;
7179 esac
7180 case "$ac_given_INSTALL" in
7181 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7182 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7183 esac
7184
7185 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7186 # The eval makes quoting arguments work.
7187 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7188 then :
7189 else
7190 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7191 fi
7192 fi
7193
7194 cd $ac_popdir
7195 done
7196fi
7197
5e711e7f
PS
7198
7199exit 0
This page took 0.513408 seconds and 4 git commands to generate.