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