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