]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
2002-08-14 H.J. Lu <hjl@gnu.org>
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
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:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
d318976c
FN
23ac_help="$ac_help
24 --enable-gdbcli Enable GDB-CLI interface"
fb40c209
AC
25ac_help="$ac_help
26 --enable-gdbmi Enable GDB-MI interface"
b4df4f68 27ac_help="$ac_help
6c5cfe5b 28 --with-uiout Use new uiout functions instead of *printf's"
c906108c
SS
29ac_help="$ac_help
30 --enable-tui Enable full-screen terminal user interface"
31ac_help="$ac_help
32 --enable-netrom Enable NetROM support"
33ac_help="$ac_help
34 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
35ac_help="$ac_help
36 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
37ac_help="$ac_help
38 --with-mmalloc Use memory mapped malloc package"
88987551
L
39ac_help="$ac_help
40 --with-included-regex Use included regex"
7a292a7a
SS
41ac_help="$ac_help
42 --with-cpu=CPU Set the default CPU variant to debug"
43ac_help="$ac_help
44 --enable-gdbtk Enable GDBTK GUI front end"
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
57ac_help="$ac_help
58 --with-tixconfig Directory containing tix configuration (tixConfig.sh)"
c906108c
SS
59ac_help="$ac_help
60 --with-x use the X Window System"
7a292a7a
SS
61ac_help="$ac_help
62 --enable-sim Link gdb with simulator"
c906108c
SS
63ac_help="$ac_help
64 --enable-shared Use shared libraries"
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
a534e424 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
a534e424 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
a534e424
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
a534e424
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
a534e424
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
a534e424 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
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
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
a534e424 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
a534e424 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
a534e424 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
a534e424 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
a534e424 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
a534e424 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
a534e424 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
833echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
a534e424 834echo "configure:835: checking how to run the C preprocessor" >&5
c906108c
SS
835# On Suns, sometimes $CPP names a directory.
836if test -n "$CPP" && test -d "$CPP"; then
837 CPP=
838fi
839if test -z "$CPP"; then
840if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842else
843 # This must be in double quotes, not single quotes, because CPP may get
844 # substituted into the Makefile and "${CC-cc}" will confuse make.
845 CPP="${CC-cc} -E"
846 # On the NeXT, cc -E runs the code through the compiler's parser,
847 # not just through cpp.
848 cat > conftest.$ac_ext <<EOF
a534e424 849#line 850 "configure"
c906108c
SS
850#include "confdefs.h"
851#include <assert.h>
852Syntax Error
853EOF
854ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 855{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
856ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
857if test -z "$ac_err"; then
858 :
859else
860 echo "$ac_err" >&5
861 echo "configure: failed program was:" >&5
862 cat conftest.$ac_ext >&5
863 rm -rf conftest*
864 CPP="${CC-cc} -E -traditional-cpp"
865 cat > conftest.$ac_ext <<EOF
a534e424 866#line 867 "configure"
c906108c
SS
867#include "confdefs.h"
868#include <assert.h>
869Syntax Error
870EOF
871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 872{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
874if test -z "$ac_err"; then
875 :
876else
877 echo "$ac_err" >&5
878 echo "configure: failed program was:" >&5
879 cat conftest.$ac_ext >&5
880 rm -rf conftest*
881 CPP="${CC-cc} -nologo -E"
882 cat > conftest.$ac_ext <<EOF
a534e424 883#line 884 "configure"
c906108c
SS
884#include "confdefs.h"
885#include <assert.h>
886Syntax Error
887EOF
888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 889{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
891if test -z "$ac_err"; then
892 :
893else
894 echo "$ac_err" >&5
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
897 rm -rf conftest*
898 CPP=/lib/cpp
899fi
900rm -f conftest*
901fi
902rm -f conftest*
903fi
904rm -f conftest*
905 ac_cv_prog_CPP="$CPP"
906fi
907 CPP="$ac_cv_prog_CPP"
908else
909 ac_cv_prog_CPP="$CPP"
910fi
911echo "$ac_t""$CPP" 1>&6
912
913echo $ac_n "checking for AIX""... $ac_c" 1>&6
a534e424 914echo "configure:915: checking for AIX" >&5
c906108c 915cat > conftest.$ac_ext <<EOF
a534e424 916#line 917 "configure"
c906108c
SS
917#include "confdefs.h"
918#ifdef _AIX
919 yes
920#endif
921
922EOF
923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
924 egrep "yes" >/dev/null 2>&1; then
925 rm -rf conftest*
926 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
927#define _ALL_SOURCE 1
928EOF
929
930else
931 rm -rf conftest*
932 echo "$ac_t""no" 1>&6
933fi
934rm -f conftest*
935
936
56157b4a 937echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
a534e424 938echo "configure:939: checking for POSIXized ISC" >&5
56157b4a
AC
939if test -d /etc/conf/kconfig.d &&
940 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
941then
942 echo "$ac_t""yes" 1>&6
943 ISC=yes # If later tests want to check for ISC.
944 cat >> confdefs.h <<\EOF
945#define _POSIX_SOURCE 1
c906108c
SS
946EOF
947
56157b4a
AC
948 if test "$GCC" = yes; then
949 CC="$CC -posix"
950 else
951 CC="$CC -Xp"
952 fi
c906108c
SS
953else
954 echo "$ac_t""no" 1>&6
56157b4a 955 ISC=
c906108c
SS
956fi
957
958
959
960
961echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
a534e424 962echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
963if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
965else
966 am_cv_prog_cc_stdc=no
967ac_save_CC="$CC"
968# Don't try gcc -ansi; that turns off useful extensions and
969# breaks some systems' header files.
970# AIX -qlanglvl=ansi
971# Ultrix and OSF/1 -std1
56157b4a
AC
972# HP-UX 10.20 and later -Ae
973# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 974# SVR4 -Xc -D__EXTENSIONS__
56157b4a 975for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
976do
977 CC="$ac_save_CC $ac_arg"
978 cat > conftest.$ac_ext <<EOF
a534e424 979#line 980 "configure"
c906108c
SS
980#include "confdefs.h"
981#include <stdarg.h>
982#include <stdio.h>
983#include <sys/types.h>
984#include <sys/stat.h>
985/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
986struct buf { int x; };
987FILE * (*rcsopen) (struct buf *, struct stat *, int);
988static char *e (p, i)
989 char **p;
990 int i;
991{
992 return p[i];
993}
994static char *f (char * (*g) (char **, int), char **p, ...)
995{
996 char *s;
997 va_list v;
998 va_start (v,p);
999 s = g (p, va_arg (v,int));
1000 va_end (v);
1001 return s;
1002}
1003int test (int i, double x);
1004struct s1 {int (*f) (int a);};
1005struct s2 {int (*f) (double a);};
1006int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1007int argc;
1008char **argv;
1009
1010int main() {
1011
1012return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1013
1014; return 0; }
1015EOF
a534e424 1016if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1017 rm -rf conftest*
1018 am_cv_prog_cc_stdc="$ac_arg"; break
1019else
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022fi
1023rm -f conftest*
1024done
1025CC="$ac_save_CC"
1026
1027fi
1028
1029if test -z "$am_cv_prog_cc_stdc"; then
1030 echo "$ac_t""none needed" 1>&6
1031else
1032 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1033fi
1034case "x$am_cv_prog_cc_stdc" in
1035 x|xno) ;;
1036 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1037esac
1038
1039
1040ac_aux_dir=
1041for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1042 if test -f $ac_dir/install-sh; then
1043 ac_aux_dir=$ac_dir
1044 ac_install_sh="$ac_aux_dir/install-sh -c"
1045 break
1046 elif test -f $ac_dir/install.sh; then
1047 ac_aux_dir=$ac_dir
1048 ac_install_sh="$ac_aux_dir/install.sh -c"
1049 break
1050 fi
1051done
1052if test -z "$ac_aux_dir"; then
1053 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1054fi
1055ac_config_guess=$ac_aux_dir/config.guess
1056ac_config_sub=$ac_aux_dir/config.sub
1057ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1058
1059
1060# Do some error checking and defaulting for the host and target type.
1061# The inputs are:
1062# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1063#
1064# The rules are:
1065# 1. You are not allowed to specify --host, --target, and nonopt at the
1066# same time.
1067# 2. Host defaults to nonopt.
1068# 3. If nonopt is not specified, then host defaults to the current host,
1069# as determined by config.guess.
1070# 4. Target and build default to nonopt.
1071# 5. If nonopt is not specified, then target and build default to host.
1072
1073# The aliases save the names the user supplied, while $host etc.
1074# will get canonicalized.
1075case $host---$target---$nonopt in
1076NONE---*---* | *---NONE---* | *---*---NONE) ;;
1077*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1078esac
1079
1080
1081# Make sure we can run config.sub.
1082if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1083else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1084fi
1085
1086echo $ac_n "checking host system type""... $ac_c" 1>&6
a534e424 1087echo "configure:1088: checking host system type" >&5
c906108c
SS
1088
1089host_alias=$host
1090case "$host_alias" in
1091NONE)
1092 case $nonopt in
1093 NONE)
1094 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1095 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1096 fi ;;
1097 *) host_alias=$nonopt ;;
1098 esac ;;
1099esac
1100
1101host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1102host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1103host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1104host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1105echo "$ac_t""$host" 1>&6
1106
1107echo $ac_n "checking target system type""... $ac_c" 1>&6
a534e424 1108echo "configure:1109: checking target system type" >&5
c906108c
SS
1109
1110target_alias=$target
1111case "$target_alias" in
1112NONE)
1113 case $nonopt in
1114 NONE) target_alias=$host_alias ;;
1115 *) target_alias=$nonopt ;;
1116 esac ;;
1117esac
1118
1119target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1120target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123echo "$ac_t""$target" 1>&6
1124
1125echo $ac_n "checking build system type""... $ac_c" 1>&6
a534e424 1126echo "configure:1127: checking build system type" >&5
c906108c
SS
1127
1128build_alias=$build
1129case "$build_alias" in
1130NONE)
1131 case $nonopt in
1132 NONE) build_alias=$host_alias ;;
1133 *) build_alias=$nonopt ;;
1134 esac ;;
1135esac
1136
1137build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1138build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1139build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1140build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141echo "$ac_t""$build" 1>&6
1142
1143test "$host_alias" != "$target_alias" &&
1144 test "$program_prefix$program_suffix$program_transform_name" = \
1145 NONENONEs,x,x, &&
1146 program_prefix=${target_alias}-
1147
1148
1149ALL_LINGUAS=
1150echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
a534e424 1151echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1152set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1153if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155else
1156 cat > conftestmake <<\EOF
1157all:
1158 @echo 'ac_maketemp="${MAKE}"'
1159EOF
1160# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1161eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1162if test -n "$ac_maketemp"; then
1163 eval ac_cv_prog_make_${ac_make}_set=yes
1164else
1165 eval ac_cv_prog_make_${ac_make}_set=no
1166fi
1167rm -f conftestmake
1168fi
1169if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1170 echo "$ac_t""yes" 1>&6
1171 SET_MAKE=
1172else
1173 echo "$ac_t""no" 1>&6
1174 SET_MAKE="MAKE=${MAKE-make}"
1175fi
1176
1177# Extract the first word of "ranlib", so it can be a program name with args.
1178set dummy ranlib; ac_word=$2
1179echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 1180echo "configure:1181: checking for $ac_word" >&5
c906108c
SS
1181if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184 if test -n "$RANLIB"; then
1185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1186else
1187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1188 ac_dummy="$PATH"
1189 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 if test -f $ac_dir/$ac_word; then
1192 ac_cv_prog_RANLIB="ranlib"
1193 break
1194 fi
1195 done
1196 IFS="$ac_save_ifs"
1197 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1198fi
1199fi
1200RANLIB="$ac_cv_prog_RANLIB"
1201if test -n "$RANLIB"; then
1202 echo "$ac_t""$RANLIB" 1>&6
1203else
1204 echo "$ac_t""no" 1>&6
1205fi
1206
1207echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
a534e424 1208echo "configure:1209: checking for ANSI C header files" >&5
c906108c
SS
1209if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1211else
1212 cat > conftest.$ac_ext <<EOF
a534e424 1213#line 1214 "configure"
c906108c
SS
1214#include "confdefs.h"
1215#include <stdlib.h>
1216#include <stdarg.h>
1217#include <string.h>
1218#include <float.h>
1219EOF
1220ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 1221{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1222ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1223if test -z "$ac_err"; then
1224 rm -rf conftest*
1225 ac_cv_header_stdc=yes
1226else
1227 echo "$ac_err" >&5
1228 echo "configure: failed program was:" >&5
1229 cat conftest.$ac_ext >&5
1230 rm -rf conftest*
1231 ac_cv_header_stdc=no
1232fi
1233rm -f conftest*
1234
1235if test $ac_cv_header_stdc = yes; then
1236 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1237cat > conftest.$ac_ext <<EOF
a534e424 1238#line 1239 "configure"
c906108c
SS
1239#include "confdefs.h"
1240#include <string.h>
1241EOF
1242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1243 egrep "memchr" >/dev/null 2>&1; then
1244 :
1245else
1246 rm -rf conftest*
1247 ac_cv_header_stdc=no
1248fi
1249rm -f conftest*
1250
1251fi
1252
1253if test $ac_cv_header_stdc = yes; then
1254 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1255cat > conftest.$ac_ext <<EOF
a534e424 1256#line 1257 "configure"
c906108c
SS
1257#include "confdefs.h"
1258#include <stdlib.h>
1259EOF
1260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1261 egrep "free" >/dev/null 2>&1; then
1262 :
1263else
1264 rm -rf conftest*
1265 ac_cv_header_stdc=no
1266fi
1267rm -f conftest*
1268
1269fi
1270
1271if test $ac_cv_header_stdc = yes; then
1272 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1273if test "$cross_compiling" = yes; then
1274 :
1275else
1276 cat > conftest.$ac_ext <<EOF
a534e424 1277#line 1278 "configure"
c906108c
SS
1278#include "confdefs.h"
1279#include <ctype.h>
1280#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1281#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1282#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1283int main () { int i; for (i = 0; i < 256; i++)
1284if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1285exit (0); }
1286
1287EOF
a534e424 1288if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1289then
1290 :
1291else
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -fr conftest*
1295 ac_cv_header_stdc=no
1296fi
1297rm -fr conftest*
1298fi
1299
1300fi
1301fi
1302
1303echo "$ac_t""$ac_cv_header_stdc" 1>&6
1304if test $ac_cv_header_stdc = yes; then
1305 cat >> confdefs.h <<\EOF
1306#define STDC_HEADERS 1
1307EOF
1308
1309fi
1310
1311echo $ac_n "checking for working const""... $ac_c" 1>&6
a534e424 1312echo "configure:1313: checking for working const" >&5
c906108c
SS
1313if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315else
1316 cat > conftest.$ac_ext <<EOF
a534e424 1317#line 1318 "configure"
c906108c
SS
1318#include "confdefs.h"
1319
1320int main() {
1321
1322/* Ultrix mips cc rejects this. */
1323typedef int charset[2]; const charset x;
1324/* SunOS 4.1.1 cc rejects this. */
1325char const *const *ccp;
1326char **p;
1327/* NEC SVR4.0.2 mips cc rejects this. */
1328struct point {int x, y;};
1329static struct point const zero = {0,0};
1330/* AIX XL C 1.02.0.0 rejects this.
1331 It does not let you subtract one const X* pointer from another in an arm
1332 of an if-expression whose if-part is not a constant expression */
1333const char *g = "string";
1334ccp = &g + (g ? g-g : 0);
1335/* HPUX 7.0 cc rejects these. */
1336++ccp;
1337p = (char**) ccp;
1338ccp = (char const *const *) p;
1339{ /* SCO 3.2v4 cc rejects this. */
1340 char *t;
1341 char const *s = 0 ? (char *) 0 : (char const *) 0;
1342
1343 *t++ = 0;
1344}
1345{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1346 int x[] = {25, 17};
1347 const int *foo = &x[0];
1348 ++foo;
1349}
1350{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1351 typedef const int *iptr;
1352 iptr p = 0;
1353 ++p;
1354}
1355{ /* AIX XL C 1.02.0.0 rejects this saying
1356 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1357 struct s { int j; const int *ap[3]; };
1358 struct s *b; b->j = 5;
1359}
1360{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1361 const int foo = 10;
1362}
1363
1364; return 0; }
1365EOF
a534e424 1366if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1367 rm -rf conftest*
1368 ac_cv_c_const=yes
1369else
1370 echo "configure: failed program was:" >&5
1371 cat conftest.$ac_ext >&5
1372 rm -rf conftest*
1373 ac_cv_c_const=no
1374fi
1375rm -f conftest*
1376fi
1377
1378echo "$ac_t""$ac_cv_c_const" 1>&6
1379if test $ac_cv_c_const = no; then
1380 cat >> confdefs.h <<\EOF
1381#define const
1382EOF
1383
1384fi
1385
1386echo $ac_n "checking for inline""... $ac_c" 1>&6
a534e424 1387echo "configure:1388: checking for inline" >&5
c906108c
SS
1388if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1389 echo $ac_n "(cached) $ac_c" 1>&6
1390else
1391 ac_cv_c_inline=no
1392for ac_kw in inline __inline__ __inline; do
1393 cat > conftest.$ac_ext <<EOF
a534e424 1394#line 1395 "configure"
c906108c
SS
1395#include "confdefs.h"
1396
1397int main() {
1398} $ac_kw foo() {
1399; return 0; }
1400EOF
a534e424 1401if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1402 rm -rf conftest*
1403 ac_cv_c_inline=$ac_kw; break
1404else
1405 echo "configure: failed program was:" >&5
1406 cat conftest.$ac_ext >&5
1407fi
1408rm -f conftest*
1409done
1410
1411fi
1412
1413echo "$ac_t""$ac_cv_c_inline" 1>&6
1414case "$ac_cv_c_inline" in
1415 inline | yes) ;;
1416 no) cat >> confdefs.h <<\EOF
1417#define inline
1418EOF
1419 ;;
1420 *) cat >> confdefs.h <<EOF
1421#define inline $ac_cv_c_inline
1422EOF
1423 ;;
1424esac
1425
1426echo $ac_n "checking for off_t""... $ac_c" 1>&6
a534e424 1427echo "configure:1428: checking for off_t" >&5
c906108c
SS
1428if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1429 echo $ac_n "(cached) $ac_c" 1>&6
1430else
1431 cat > conftest.$ac_ext <<EOF
a534e424 1432#line 1433 "configure"
c906108c
SS
1433#include "confdefs.h"
1434#include <sys/types.h>
1435#if STDC_HEADERS
1436#include <stdlib.h>
1437#include <stddef.h>
1438#endif
1439EOF
1440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1441 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1442 rm -rf conftest*
1443 ac_cv_type_off_t=yes
1444else
1445 rm -rf conftest*
1446 ac_cv_type_off_t=no
1447fi
1448rm -f conftest*
1449
1450fi
1451echo "$ac_t""$ac_cv_type_off_t" 1>&6
1452if test $ac_cv_type_off_t = no; then
1453 cat >> confdefs.h <<\EOF
1454#define off_t long
1455EOF
1456
1457fi
1458
1459echo $ac_n "checking for size_t""... $ac_c" 1>&6
a534e424 1460echo "configure:1461: checking for size_t" >&5
c906108c
SS
1461if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463else
1464 cat > conftest.$ac_ext <<EOF
a534e424 1465#line 1466 "configure"
c906108c
SS
1466#include "confdefs.h"
1467#include <sys/types.h>
1468#if STDC_HEADERS
1469#include <stdlib.h>
1470#include <stddef.h>
1471#endif
1472EOF
1473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1474 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1475 rm -rf conftest*
1476 ac_cv_type_size_t=yes
1477else
1478 rm -rf conftest*
1479 ac_cv_type_size_t=no
1480fi
1481rm -f conftest*
1482
1483fi
1484echo "$ac_t""$ac_cv_type_size_t" 1>&6
1485if test $ac_cv_type_size_t = no; then
1486 cat >> confdefs.h <<\EOF
1487#define size_t unsigned
1488EOF
1489
1490fi
1491
1492# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1493# for constant arguments. Useless!
1494echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a534e424 1495echo "configure:1496: checking for working alloca.h" >&5
c906108c
SS
1496if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1497 echo $ac_n "(cached) $ac_c" 1>&6
1498else
1499 cat > conftest.$ac_ext <<EOF
a534e424 1500#line 1501 "configure"
c906108c
SS
1501#include "confdefs.h"
1502#include <alloca.h>
1503int main() {
1504char *p = alloca(2 * sizeof(int));
1505; return 0; }
1506EOF
a534e424 1507if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1508 rm -rf conftest*
1509 ac_cv_header_alloca_h=yes
1510else
1511 echo "configure: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1513 rm -rf conftest*
1514 ac_cv_header_alloca_h=no
1515fi
1516rm -f conftest*
1517fi
1518
1519echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1520if test $ac_cv_header_alloca_h = yes; then
1521 cat >> confdefs.h <<\EOF
1522#define HAVE_ALLOCA_H 1
1523EOF
1524
1525fi
1526
1527echo $ac_n "checking for alloca""... $ac_c" 1>&6
a534e424 1528echo "configure:1529: checking for alloca" >&5
c906108c
SS
1529if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1530 echo $ac_n "(cached) $ac_c" 1>&6
1531else
1532 cat > conftest.$ac_ext <<EOF
a534e424 1533#line 1534 "configure"
c906108c
SS
1534#include "confdefs.h"
1535
1536#ifdef __GNUC__
1537# define alloca __builtin_alloca
1538#else
1539# ifdef _MSC_VER
1540# include <malloc.h>
1541# define alloca _alloca
1542# else
1543# if HAVE_ALLOCA_H
1544# include <alloca.h>
1545# else
1546# ifdef _AIX
1547 #pragma alloca
1548# else
1549# ifndef alloca /* predefined by HP cc +Olibcalls */
1550char *alloca ();
1551# endif
1552# endif
1553# endif
1554# endif
1555#endif
1556
1557int main() {
1558char *p = (char *) alloca(1);
1559; return 0; }
1560EOF
a534e424 1561if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1562 rm -rf conftest*
1563 ac_cv_func_alloca_works=yes
1564else
1565 echo "configure: failed program was:" >&5
1566 cat conftest.$ac_ext >&5
1567 rm -rf conftest*
1568 ac_cv_func_alloca_works=no
1569fi
1570rm -f conftest*
1571fi
1572
1573echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1574if test $ac_cv_func_alloca_works = yes; then
1575 cat >> confdefs.h <<\EOF
1576#define HAVE_ALLOCA 1
1577EOF
1578
1579fi
1580
1581if test $ac_cv_func_alloca_works = no; then
1582 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1583 # that cause trouble. Some versions do not even contain alloca or
1584 # contain a buggy version. If you still want to use their alloca,
1585 # use ar to extract alloca.o from them instead of compiling alloca.c.
1586 ALLOCA=alloca.${ac_objext}
1587 cat >> confdefs.h <<\EOF
1588#define C_ALLOCA 1
1589EOF
1590
1591
1592echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a534e424 1593echo "configure:1594: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1594if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1595 echo $ac_n "(cached) $ac_c" 1>&6
1596else
1597 cat > conftest.$ac_ext <<EOF
a534e424 1598#line 1599 "configure"
c906108c
SS
1599#include "confdefs.h"
1600#if defined(CRAY) && ! defined(CRAY2)
1601webecray
1602#else
1603wenotbecray
1604#endif
1605
1606EOF
1607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1608 egrep "webecray" >/dev/null 2>&1; then
1609 rm -rf conftest*
1610 ac_cv_os_cray=yes
1611else
1612 rm -rf conftest*
1613 ac_cv_os_cray=no
1614fi
1615rm -f conftest*
1616
1617fi
1618
1619echo "$ac_t""$ac_cv_os_cray" 1>&6
1620if test $ac_cv_os_cray = yes; then
1621for ac_func in _getb67 GETB67 getb67; do
1622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 1623echo "configure:1624: checking for $ac_func" >&5
c906108c
SS
1624if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
1626else
1627 cat > conftest.$ac_ext <<EOF
a534e424 1628#line 1629 "configure"
c906108c
SS
1629#include "confdefs.h"
1630/* System header to define __stub macros and hopefully few prototypes,
1631 which can conflict with char $ac_func(); below. */
1632#include <assert.h>
1633/* Override any gcc2 internal prototype to avoid an error. */
1634/* We use char because int might match the return type of a gcc2
1635 builtin and then its argument prototype would still apply. */
1636char $ac_func();
1637
1638int main() {
1639
1640/* The GNU C library defines this for functions which it implements
1641 to always fail with ENOSYS. Some functions are actually named
1642 something starting with __ and the normal name is an alias. */
1643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1644choke me
1645#else
1646$ac_func();
1647#endif
1648
1649; return 0; }
1650EOF
a534e424 1651if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1652 rm -rf conftest*
1653 eval "ac_cv_func_$ac_func=yes"
1654else
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1657 rm -rf conftest*
1658 eval "ac_cv_func_$ac_func=no"
1659fi
1660rm -f conftest*
1661fi
1662
1663if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1664 echo "$ac_t""yes" 1>&6
1665 cat >> confdefs.h <<EOF
1666#define CRAY_STACKSEG_END $ac_func
1667EOF
1668
1669 break
1670else
1671 echo "$ac_t""no" 1>&6
1672fi
1673
1674done
1675fi
1676
1677echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a534e424 1678echo "configure:1679: checking stack direction for C alloca" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 if test "$cross_compiling" = yes; then
1683 ac_cv_c_stack_direction=0
1684else
1685 cat > conftest.$ac_ext <<EOF
a534e424 1686#line 1687 "configure"
c906108c
SS
1687#include "confdefs.h"
1688find_stack_direction ()
1689{
1690 static char *addr = 0;
1691 auto char dummy;
1692 if (addr == 0)
1693 {
1694 addr = &dummy;
1695 return find_stack_direction ();
1696 }
1697 else
1698 return (&dummy > addr) ? 1 : -1;
1699}
1700main ()
1701{
1702 exit (find_stack_direction() < 0);
1703}
1704EOF
a534e424 1705if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1706then
1707 ac_cv_c_stack_direction=1
1708else
1709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -fr conftest*
1712 ac_cv_c_stack_direction=-1
1713fi
1714rm -fr conftest*
1715fi
1716
1717fi
1718
1719echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1720cat >> confdefs.h <<EOF
1721#define STACK_DIRECTION $ac_cv_c_stack_direction
1722EOF
1723
1724fi
1725
a534e424 1726for ac_hdr in unistd.h
c906108c
SS
1727do
1728ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1729echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 1730echo "configure:1731: checking for $ac_hdr" >&5
c906108c
SS
1731if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734 cat > conftest.$ac_ext <<EOF
a534e424 1735#line 1736 "configure"
c906108c
SS
1736#include "confdefs.h"
1737#include <$ac_hdr>
1738EOF
1739ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 1740{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1741ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1742if test -z "$ac_err"; then
1743 rm -rf conftest*
1744 eval "ac_cv_header_$ac_safe=yes"
1745else
1746 echo "$ac_err" >&5
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 rm -rf conftest*
1750 eval "ac_cv_header_$ac_safe=no"
1751fi
1752rm -f conftest*
1753fi
1754if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1755 echo "$ac_t""yes" 1>&6
1756 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1757 cat >> confdefs.h <<EOF
1758#define $ac_tr_hdr 1
1759EOF
1760
1761else
1762 echo "$ac_t""no" 1>&6
1763fi
1764done
1765
1766for ac_func in getpagesize
1767do
1768echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 1769echo "configure:1770: checking for $ac_func" >&5
c906108c
SS
1770if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1771 echo $ac_n "(cached) $ac_c" 1>&6
1772else
1773 cat > conftest.$ac_ext <<EOF
a534e424 1774#line 1775 "configure"
c906108c
SS
1775#include "confdefs.h"
1776/* System header to define __stub macros and hopefully few prototypes,
1777 which can conflict with char $ac_func(); below. */
1778#include <assert.h>
1779/* Override any gcc2 internal prototype to avoid an error. */
1780/* We use char because int might match the return type of a gcc2
1781 builtin and then its argument prototype would still apply. */
1782char $ac_func();
1783
1784int main() {
1785
1786/* The GNU C library defines this for functions which it implements
1787 to always fail with ENOSYS. Some functions are actually named
1788 something starting with __ and the normal name is an alias. */
1789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1790choke me
1791#else
1792$ac_func();
1793#endif
1794
1795; return 0; }
1796EOF
a534e424 1797if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1798 rm -rf conftest*
1799 eval "ac_cv_func_$ac_func=yes"
1800else
1801 echo "configure: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 rm -rf conftest*
1804 eval "ac_cv_func_$ac_func=no"
1805fi
1806rm -f conftest*
1807fi
1808
1809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1810 echo "$ac_t""yes" 1>&6
1811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1812 cat >> confdefs.h <<EOF
1813#define $ac_tr_func 1
1814EOF
1815
1816else
1817 echo "$ac_t""no" 1>&6
1818fi
1819done
1820
1821echo $ac_n "checking for working mmap""... $ac_c" 1>&6
a534e424 1822echo "configure:1823: checking for working mmap" >&5
c906108c
SS
1823if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826 if test "$cross_compiling" = yes; then
1827 ac_cv_func_mmap_fixed_mapped=no
1828else
1829 cat > conftest.$ac_ext <<EOF
a534e424 1830#line 1831 "configure"
c906108c
SS
1831#include "confdefs.h"
1832
1833/* Thanks to Mike Haertel and Jim Avera for this test.
1834 Here is a matrix of mmap possibilities:
1835 mmap private not fixed
1836 mmap private fixed at somewhere currently unmapped
1837 mmap private fixed at somewhere already mapped
1838 mmap shared not fixed
1839 mmap shared fixed at somewhere currently unmapped
1840 mmap shared fixed at somewhere already mapped
1841 For private mappings, we should verify that changes cannot be read()
1842 back from the file, nor mmap's back from the file at a different
1843 address. (There have been systems where private was not correctly
1844 implemented like the infamous i386 svr4.0, and systems where the
1845 VM page cache was not coherent with the filesystem buffer cache
1846 like early versions of FreeBSD and possibly contemporary NetBSD.)
1847 For shared mappings, we should conversely verify that changes get
1848 propogated back to all the places they're supposed to be.
1849
1850 Grep wants private fixed already mapped.
1851 The main things grep needs to know about mmap are:
1852 * does it exist and is it safe to write into the mmap'd area
1853 * how to use it (BSD variants) */
1854#include <sys/types.h>
1855#include <fcntl.h>
1856#include <sys/mman.h>
1857
1858/* This mess was copied from the GNU getpagesize.h. */
1859#ifndef HAVE_GETPAGESIZE
a534e424
AC
1860# ifdef HAVE_UNISTD_H
1861# include <unistd.h>
1862# endif
c906108c
SS
1863
1864/* Assume that all systems that can run configure have sys/param.h. */
1865# ifndef HAVE_SYS_PARAM_H
1866# define HAVE_SYS_PARAM_H 1
1867# endif
1868
1869# ifdef _SC_PAGESIZE
1870# define getpagesize() sysconf(_SC_PAGESIZE)
1871# else /* no _SC_PAGESIZE */
1872# ifdef HAVE_SYS_PARAM_H
1873# include <sys/param.h>
1874# ifdef EXEC_PAGESIZE
1875# define getpagesize() EXEC_PAGESIZE
1876# else /* no EXEC_PAGESIZE */
1877# ifdef NBPG
1878# define getpagesize() NBPG * CLSIZE
1879# ifndef CLSIZE
1880# define CLSIZE 1
1881# endif /* no CLSIZE */
1882# else /* no NBPG */
1883# ifdef NBPC
1884# define getpagesize() NBPC
1885# else /* no NBPC */
1886# ifdef PAGESIZE
1887# define getpagesize() PAGESIZE
1888# endif /* PAGESIZE */
1889# endif /* no NBPC */
1890# endif /* no NBPG */
1891# endif /* no EXEC_PAGESIZE */
1892# else /* no HAVE_SYS_PARAM_H */
1893# define getpagesize() 8192 /* punt totally */
1894# endif /* no HAVE_SYS_PARAM_H */
1895# endif /* no _SC_PAGESIZE */
1896
1897#endif /* no HAVE_GETPAGESIZE */
1898
1899#ifdef __cplusplus
1900extern "C" { void *malloc(unsigned); }
1901#else
1902char *malloc();
1903#endif
1904
1905int
1906main()
1907{
1908 char *data, *data2, *data3;
1909 int i, pagesize;
1910 int fd;
1911
1912 pagesize = getpagesize();
1913
1914 /*
1915 * First, make a file with some known garbage in it.
1916 */
1917 data = malloc(pagesize);
1918 if (!data)
1919 exit(1);
1920 for (i = 0; i < pagesize; ++i)
1921 *(data + i) = rand();
1922 umask(0);
1923 fd = creat("conftestmmap", 0600);
1924 if (fd < 0)
1925 exit(1);
1926 if (write(fd, data, pagesize) != pagesize)
1927 exit(1);
1928 close(fd);
1929
1930 /*
1931 * Next, try to mmap the file at a fixed address which
1932 * already has something else allocated at it. If we can,
1933 * also make sure that we see the same garbage.
1934 */
1935 fd = open("conftestmmap", O_RDWR);
1936 if (fd < 0)
1937 exit(1);
1938 data2 = malloc(2 * pagesize);
1939 if (!data2)
1940 exit(1);
1941 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1942 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1943 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1944 exit(1);
1945 for (i = 0; i < pagesize; ++i)
1946 if (*(data + i) != *(data2 + i))
1947 exit(1);
1948
1949 /*
1950 * Finally, make sure that changes to the mapped area
1951 * do not percolate back to the file as seen by read().
1952 * (This is a bug on some variants of i386 svr4.0.)
1953 */
1954 for (i = 0; i < pagesize; ++i)
1955 *(data2 + i) = *(data2 + i) + 1;
1956 data3 = malloc(pagesize);
1957 if (!data3)
1958 exit(1);
1959 if (read(fd, data3, pagesize) != pagesize)
1960 exit(1);
1961 for (i = 0; i < pagesize; ++i)
1962 if (*(data + i) != *(data3 + i))
1963 exit(1);
1964 close(fd);
1965 unlink("conftestmmap");
1966 exit(0);
1967}
1968
1969EOF
a534e424 1970if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1971then
1972 ac_cv_func_mmap_fixed_mapped=yes
1973else
1974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -fr conftest*
1977 ac_cv_func_mmap_fixed_mapped=no
1978fi
1979rm -fr conftest*
1980fi
1981
1982fi
1983
1984echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1985if test $ac_cv_func_mmap_fixed_mapped = yes; then
1986 cat >> confdefs.h <<\EOF
1987#define HAVE_MMAP 1
1988EOF
1989
1990fi
1991
1992
1993 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1994unistd.h values.h sys/param.h
1995do
1996ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1997echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 1998echo "configure:1999: checking for $ac_hdr" >&5
c906108c
SS
1999if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2000 echo $ac_n "(cached) $ac_c" 1>&6
2001else
2002 cat > conftest.$ac_ext <<EOF
a534e424 2003#line 2004 "configure"
c906108c
SS
2004#include "confdefs.h"
2005#include <$ac_hdr>
2006EOF
2007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2008{ (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2010if test -z "$ac_err"; then
2011 rm -rf conftest*
2012 eval "ac_cv_header_$ac_safe=yes"
2013else
2014 echo "$ac_err" >&5
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 rm -rf conftest*
2018 eval "ac_cv_header_$ac_safe=no"
2019fi
2020rm -f conftest*
2021fi
2022if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2023 echo "$ac_t""yes" 1>&6
2024 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2025 cat >> confdefs.h <<EOF
2026#define $ac_tr_hdr 1
2027EOF
2028
2029else
2030 echo "$ac_t""no" 1>&6
2031fi
2032done
2033
2034 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2035__argz_count __argz_stringify __argz_next
2036do
2037echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2038echo "configure:2039: checking for $ac_func" >&5
c906108c
SS
2039if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042 cat > conftest.$ac_ext <<EOF
a534e424 2043#line 2044 "configure"
c906108c
SS
2044#include "confdefs.h"
2045/* System header to define __stub macros and hopefully few prototypes,
2046 which can conflict with char $ac_func(); below. */
2047#include <assert.h>
2048/* Override any gcc2 internal prototype to avoid an error. */
2049/* We use char because int might match the return type of a gcc2
2050 builtin and then its argument prototype would still apply. */
2051char $ac_func();
2052
2053int main() {
2054
2055/* The GNU C library defines this for functions which it implements
2056 to always fail with ENOSYS. Some functions are actually named
2057 something starting with __ and the normal name is an alias. */
2058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2059choke me
2060#else
2061$ac_func();
2062#endif
2063
2064; return 0; }
2065EOF
a534e424 2066if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2067 rm -rf conftest*
2068 eval "ac_cv_func_$ac_func=yes"
2069else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -rf conftest*
2073 eval "ac_cv_func_$ac_func=no"
2074fi
2075rm -f conftest*
2076fi
2077
2078if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2079 echo "$ac_t""yes" 1>&6
2080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2081 cat >> confdefs.h <<EOF
2082#define $ac_tr_func 1
2083EOF
2084
2085else
2086 echo "$ac_t""no" 1>&6
2087fi
2088done
2089
2090
2091 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2092 for ac_func in stpcpy
2093do
2094echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2095echo "configure:2096: checking for $ac_func" >&5
c906108c
SS
2096if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2097 echo $ac_n "(cached) $ac_c" 1>&6
2098else
2099 cat > conftest.$ac_ext <<EOF
a534e424 2100#line 2101 "configure"
c906108c
SS
2101#include "confdefs.h"
2102/* System header to define __stub macros and hopefully few prototypes,
2103 which can conflict with char $ac_func(); below. */
2104#include <assert.h>
2105/* Override any gcc2 internal prototype to avoid an error. */
2106/* We use char because int might match the return type of a gcc2
2107 builtin and then its argument prototype would still apply. */
2108char $ac_func();
2109
2110int main() {
2111
2112/* The GNU C library defines this for functions which it implements
2113 to always fail with ENOSYS. Some functions are actually named
2114 something starting with __ and the normal name is an alias. */
2115#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116choke me
2117#else
2118$ac_func();
2119#endif
2120
2121; return 0; }
2122EOF
a534e424 2123if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2124 rm -rf conftest*
2125 eval "ac_cv_func_$ac_func=yes"
2126else
2127 echo "configure: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2129 rm -rf conftest*
2130 eval "ac_cv_func_$ac_func=no"
2131fi
2132rm -f conftest*
2133fi
2134
2135if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2136 echo "$ac_t""yes" 1>&6
2137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2138 cat >> confdefs.h <<EOF
2139#define $ac_tr_func 1
2140EOF
2141
2142else
2143 echo "$ac_t""no" 1>&6
2144fi
2145done
2146
2147 fi
2148 if test "${ac_cv_func_stpcpy}" = "yes"; then
2149 cat >> confdefs.h <<\EOF
2150#define HAVE_STPCPY 1
2151EOF
2152
2153 fi
2154
2155 if test $ac_cv_header_locale_h = yes; then
2156 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
a534e424 2157echo "configure:2158: checking for LC_MESSAGES" >&5
c906108c
SS
2158if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2159 echo $ac_n "(cached) $ac_c" 1>&6
2160else
2161 cat > conftest.$ac_ext <<EOF
a534e424 2162#line 2163 "configure"
c906108c
SS
2163#include "confdefs.h"
2164#include <locale.h>
2165int main() {
2166return LC_MESSAGES
2167; return 0; }
2168EOF
a534e424 2169if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2170 rm -rf conftest*
2171 am_cv_val_LC_MESSAGES=yes
2172else
2173 echo "configure: failed program was:" >&5
2174 cat conftest.$ac_ext >&5
2175 rm -rf conftest*
2176 am_cv_val_LC_MESSAGES=no
2177fi
2178rm -f conftest*
2179fi
2180
2181echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2182 if test $am_cv_val_LC_MESSAGES = yes; then
2183 cat >> confdefs.h <<\EOF
2184#define HAVE_LC_MESSAGES 1
2185EOF
2186
2187 fi
2188 fi
2189 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
a534e424 2190echo "configure:2191: checking whether NLS is requested" >&5
c906108c
SS
2191 # Check whether --enable-nls or --disable-nls was given.
2192if test "${enable_nls+set}" = set; then
2193 enableval="$enable_nls"
2194 USE_NLS=$enableval
2195else
2196 USE_NLS=yes
2197fi
2198
2199 echo "$ac_t""$USE_NLS" 1>&6
2200
2201
2202 USE_INCLUDED_LIBINTL=no
2203
2204 if test "$USE_NLS" = "yes"; then
2205 cat >> confdefs.h <<\EOF
2206#define ENABLE_NLS 1
2207EOF
2208
2209 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
a534e424 2210echo "configure:2211: checking whether included gettext is requested" >&5
c906108c
SS
2211 # Check whether --with-included-gettext or --without-included-gettext was given.
2212if test "${with_included_gettext+set}" = set; then
2213 withval="$with_included_gettext"
2214 nls_cv_force_use_gnu_gettext=$withval
2215else
2216 nls_cv_force_use_gnu_gettext=no
2217fi
2218
2219 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2220
2221 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2222 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2223 nls_cv_header_intl=
2224 nls_cv_header_libgt=
2225 CATOBJEXT=NONE
2226
2227 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2228echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
a534e424 2229echo "configure:2230: checking for libintl.h" >&5
c906108c
SS
2230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233 cat > conftest.$ac_ext <<EOF
a534e424 2234#line 2235 "configure"
c906108c
SS
2235#include "confdefs.h"
2236#include <libintl.h>
2237EOF
2238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2239{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2241if test -z "$ac_err"; then
2242 rm -rf conftest*
2243 eval "ac_cv_header_$ac_safe=yes"
2244else
2245 echo "$ac_err" >&5
2246 echo "configure: failed program was:" >&5
2247 cat conftest.$ac_ext >&5
2248 rm -rf conftest*
2249 eval "ac_cv_header_$ac_safe=no"
2250fi
2251rm -f conftest*
2252fi
2253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2254 echo "$ac_t""yes" 1>&6
2255 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
a534e424 2256echo "configure:2257: checking for gettext in libc" >&5
c906108c
SS
2257if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2258 echo $ac_n "(cached) $ac_c" 1>&6
2259else
2260 cat > conftest.$ac_ext <<EOF
a534e424 2261#line 2262 "configure"
c906108c
SS
2262#include "confdefs.h"
2263#include <libintl.h>
2264int main() {
2265return (int) gettext ("")
2266; return 0; }
2267EOF
a534e424 2268if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2269 rm -rf conftest*
2270 gt_cv_func_gettext_libc=yes
2271else
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2274 rm -rf conftest*
2275 gt_cv_func_gettext_libc=no
2276fi
2277rm -f conftest*
2278fi
2279
2280echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2281
2282 if test "$gt_cv_func_gettext_libc" != "yes"; then
2283 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
a534e424 2284echo "configure:2285: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2285ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2287 echo $ac_n "(cached) $ac_c" 1>&6
2288else
2289 ac_save_LIBS="$LIBS"
2290LIBS="-lintl $LIBS"
2291cat > conftest.$ac_ext <<EOF
a534e424 2292#line 2293 "configure"
c906108c
SS
2293#include "confdefs.h"
2294/* Override any gcc2 internal prototype to avoid an error. */
2295/* We use char because int might match the return type of a gcc2
2296 builtin and then its argument prototype would still apply. */
2297char bindtextdomain();
2298
2299int main() {
2300bindtextdomain()
2301; return 0; }
2302EOF
a534e424 2303if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2304 rm -rf conftest*
2305 eval "ac_cv_lib_$ac_lib_var=yes"
2306else
2307 echo "configure: failed program was:" >&5
2308 cat conftest.$ac_ext >&5
2309 rm -rf conftest*
2310 eval "ac_cv_lib_$ac_lib_var=no"
2311fi
2312rm -f conftest*
2313LIBS="$ac_save_LIBS"
2314
2315fi
2316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2317 echo "$ac_t""yes" 1>&6
2318 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
a534e424 2319echo "configure:2320: checking for gettext in libintl" >&5
c906108c
SS
2320if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2322else
2323 cat > conftest.$ac_ext <<EOF
a534e424 2324#line 2325 "configure"
c906108c
SS
2325#include "confdefs.h"
2326
2327int main() {
2328return (int) gettext ("")
2329; return 0; }
2330EOF
a534e424 2331if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2332 rm -rf conftest*
2333 gt_cv_func_gettext_libintl=yes
2334else
2335 echo "configure: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 rm -rf conftest*
2338 gt_cv_func_gettext_libintl=no
2339fi
2340rm -f conftest*
2341fi
2342
2343echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2344else
2345 echo "$ac_t""no" 1>&6
2346fi
2347
2348 fi
2349
2350 if test "$gt_cv_func_gettext_libc" = "yes" \
2351 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2352 cat >> confdefs.h <<\EOF
2353#define HAVE_GETTEXT 1
2354EOF
2355
2356 # Extract the first word of "msgfmt", so it can be a program name with args.
2357set dummy msgfmt; ac_word=$2
2358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2359echo "configure:2360: checking for $ac_word" >&5
c906108c
SS
2360if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362else
2363 case "$MSGFMT" in
2364 /*)
2365 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2366 ;;
2367 *)
2368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2369 for ac_dir in $PATH; do
2370 test -z "$ac_dir" && ac_dir=.
2371 if test -f $ac_dir/$ac_word; then
2372 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2373 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2374 break
2375 fi
2376 fi
2377 done
2378 IFS="$ac_save_ifs"
2379 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2380 ;;
2381esac
2382fi
2383MSGFMT="$ac_cv_path_MSGFMT"
2384if test -n "$MSGFMT"; then
2385 echo "$ac_t""$MSGFMT" 1>&6
2386else
2387 echo "$ac_t""no" 1>&6
2388fi
2389 if test "$MSGFMT" != "no"; then
2390 for ac_func in dcgettext
2391do
2392echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2393echo "configure:2394: checking for $ac_func" >&5
c906108c
SS
2394if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2396else
2397 cat > conftest.$ac_ext <<EOF
a534e424 2398#line 2399 "configure"
c906108c
SS
2399#include "confdefs.h"
2400/* System header to define __stub macros and hopefully few prototypes,
2401 which can conflict with char $ac_func(); below. */
2402#include <assert.h>
2403/* Override any gcc2 internal prototype to avoid an error. */
2404/* We use char because int might match the return type of a gcc2
2405 builtin and then its argument prototype would still apply. */
2406char $ac_func();
2407
2408int main() {
2409
2410/* The GNU C library defines this for functions which it implements
2411 to always fail with ENOSYS. Some functions are actually named
2412 something starting with __ and the normal name is an alias. */
2413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2414choke me
2415#else
2416$ac_func();
2417#endif
2418
2419; return 0; }
2420EOF
a534e424 2421if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2422 rm -rf conftest*
2423 eval "ac_cv_func_$ac_func=yes"
2424else
2425 echo "configure: failed program was:" >&5
2426 cat conftest.$ac_ext >&5
2427 rm -rf conftest*
2428 eval "ac_cv_func_$ac_func=no"
2429fi
2430rm -f conftest*
2431fi
2432
2433if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2434 echo "$ac_t""yes" 1>&6
2435 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2436 cat >> confdefs.h <<EOF
2437#define $ac_tr_func 1
2438EOF
2439
2440else
2441 echo "$ac_t""no" 1>&6
2442fi
2443done
2444
2445 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2446set dummy gmsgfmt; ac_word=$2
2447echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2448echo "configure:2449: checking for $ac_word" >&5
c906108c
SS
2449if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451else
2452 case "$GMSGFMT" in
2453 /*)
2454 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2455 ;;
2456 ?:/*)
2457 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2458 ;;
2459 *)
2460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2461 ac_dummy="$PATH"
2462 for ac_dir in $ac_dummy; do
2463 test -z "$ac_dir" && ac_dir=.
2464 if test -f $ac_dir/$ac_word; then
2465 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2466 break
2467 fi
2468 done
2469 IFS="$ac_save_ifs"
2470 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2471 ;;
2472esac
2473fi
2474GMSGFMT="$ac_cv_path_GMSGFMT"
2475if test -n "$GMSGFMT"; then
2476 echo "$ac_t""$GMSGFMT" 1>&6
2477else
2478 echo "$ac_t""no" 1>&6
2479fi
2480
2481 # Extract the first word of "xgettext", so it can be a program name with args.
2482set dummy xgettext; ac_word=$2
2483echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2484echo "configure:2485: checking for $ac_word" >&5
c906108c
SS
2485if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2486 echo $ac_n "(cached) $ac_c" 1>&6
2487else
2488 case "$XGETTEXT" in
2489 /*)
2490 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2491 ;;
2492 *)
2493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2494 for ac_dir in $PATH; do
2495 test -z "$ac_dir" && ac_dir=.
2496 if test -f $ac_dir/$ac_word; then
2497 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2498 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2499 break
2500 fi
2501 fi
2502 done
2503 IFS="$ac_save_ifs"
2504 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2505 ;;
2506esac
2507fi
2508XGETTEXT="$ac_cv_path_XGETTEXT"
2509if test -n "$XGETTEXT"; then
2510 echo "$ac_t""$XGETTEXT" 1>&6
2511else
2512 echo "$ac_t""no" 1>&6
2513fi
2514
2515 cat > conftest.$ac_ext <<EOF
a534e424 2516#line 2517 "configure"
c906108c
SS
2517#include "confdefs.h"
2518
2519int main() {
2520extern int _nl_msg_cat_cntr;
2521 return _nl_msg_cat_cntr
2522; return 0; }
2523EOF
a534e424 2524if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2525 rm -rf conftest*
2526 CATOBJEXT=.gmo
2527 DATADIRNAME=share
2528else
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531 rm -rf conftest*
2532 CATOBJEXT=.mo
2533 DATADIRNAME=lib
2534fi
2535rm -f conftest*
2536 INSTOBJEXT=.mo
2537 fi
2538 fi
2539
2540else
2541 echo "$ac_t""no" 1>&6
2542fi
2543
2544
2545
2546 if test "$CATOBJEXT" = "NONE"; then
2547 nls_cv_use_gnu_gettext=yes
2548 fi
2549 fi
2550
2551 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2552 INTLOBJS="\$(GETTOBJS)"
2553 # Extract the first word of "msgfmt", so it can be a program name with args.
2554set dummy msgfmt; ac_word=$2
2555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2556echo "configure:2557: checking for $ac_word" >&5
c906108c
SS
2557if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2558 echo $ac_n "(cached) $ac_c" 1>&6
2559else
2560 case "$MSGFMT" in
2561 /*)
2562 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2563 ;;
2564 *)
2565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2566 for ac_dir in $PATH; do
2567 test -z "$ac_dir" && ac_dir=.
2568 if test -f $ac_dir/$ac_word; then
2569 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2570 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2571 break
2572 fi
2573 fi
2574 done
2575 IFS="$ac_save_ifs"
2576 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2577 ;;
2578esac
2579fi
2580MSGFMT="$ac_cv_path_MSGFMT"
2581if test -n "$MSGFMT"; then
2582 echo "$ac_t""$MSGFMT" 1>&6
2583else
2584 echo "$ac_t""no" 1>&6
2585fi
2586
2587 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2588set dummy gmsgfmt; ac_word=$2
2589echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2590echo "configure:2591: checking for $ac_word" >&5
c906108c
SS
2591if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
2593else
2594 case "$GMSGFMT" in
2595 /*)
2596 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2597 ;;
2598 ?:/*)
2599 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2600 ;;
2601 *)
2602 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2603 ac_dummy="$PATH"
2604 for ac_dir in $ac_dummy; do
2605 test -z "$ac_dir" && ac_dir=.
2606 if test -f $ac_dir/$ac_word; then
2607 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2608 break
2609 fi
2610 done
2611 IFS="$ac_save_ifs"
2612 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2613 ;;
2614esac
2615fi
2616GMSGFMT="$ac_cv_path_GMSGFMT"
2617if test -n "$GMSGFMT"; then
2618 echo "$ac_t""$GMSGFMT" 1>&6
2619else
2620 echo "$ac_t""no" 1>&6
2621fi
2622
2623 # Extract the first word of "xgettext", so it can be a program name with args.
2624set dummy xgettext; ac_word=$2
2625echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2626echo "configure:2627: checking for $ac_word" >&5
c906108c
SS
2627if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629else
2630 case "$XGETTEXT" in
2631 /*)
2632 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2633 ;;
2634 *)
2635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2636 for ac_dir in $PATH; do
2637 test -z "$ac_dir" && ac_dir=.
2638 if test -f $ac_dir/$ac_word; then
2639 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2640 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2641 break
2642 fi
2643 fi
2644 done
2645 IFS="$ac_save_ifs"
2646 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2647 ;;
2648esac
2649fi
2650XGETTEXT="$ac_cv_path_XGETTEXT"
2651if test -n "$XGETTEXT"; then
2652 echo "$ac_t""$XGETTEXT" 1>&6
2653else
2654 echo "$ac_t""no" 1>&6
2655fi
2656
2657
2658 USE_INCLUDED_LIBINTL=yes
2659 CATOBJEXT=.gmo
2660 INSTOBJEXT=.mo
2661 DATADIRNAME=share
2662 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2663 INTLLIBS=$INTLDEPS
2664 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2665 nls_cv_header_intl=libintl.h
2666 nls_cv_header_libgt=libgettext.h
2667 fi
2668
2669 if test "$XGETTEXT" != ":"; then
2670 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2671 : ;
2672 else
2673 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2674 XGETTEXT=":"
2675 fi
2676 fi
2677
2678 # We need to process the po/ directory.
2679 POSUB=po
2680 else
2681 DATADIRNAME=share
2682 nls_cv_header_intl=libintl.h
2683 nls_cv_header_libgt=libgettext.h
2684 fi
2685
2686 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2687 # because some of the sources are only built for this goal.
2688 if test "$PACKAGE" = gettext; then
2689 USE_NLS=yes
2690 USE_INCLUDED_LIBINTL=yes
2691 fi
2692
2693 for lang in $ALL_LINGUAS; do
2694 GMOFILES="$GMOFILES $lang.gmo"
2695 POFILES="$POFILES $lang.po"
2696 done
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711 if test "x$CATOBJEXT" != "x"; then
2712 if test "x$ALL_LINGUAS" = "x"; then
2713 LINGUAS=
2714 else
2715 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
a534e424 2716echo "configure:2717: checking for catalogs to be installed" >&5
c906108c
SS
2717 NEW_LINGUAS=
2718 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2719 case "$ALL_LINGUAS" in
2720 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2721 esac
2722 done
2723 LINGUAS=$NEW_LINGUAS
2724 echo "$ac_t""$LINGUAS" 1>&6
2725 fi
2726
2727 if test -n "$LINGUAS"; then
2728 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2729 fi
2730 fi
2731
2732 if test $ac_cv_header_locale_h = yes; then
2733 INCLUDE_LOCALE_H="#include <locale.h>"
2734 else
2735 INCLUDE_LOCALE_H="\
2736/* The system does not provide the header <locale.h>. Take care yourself. */"
2737 fi
2738
2739
2740 if test -f $srcdir/po2tbl.sed.in; then
2741 if test "$CATOBJEXT" = ".cat"; then
2742 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2743echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
a534e424 2744echo "configure:2745: checking for linux/version.h" >&5
c906108c
SS
2745if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2746 echo $ac_n "(cached) $ac_c" 1>&6
2747else
2748 cat > conftest.$ac_ext <<EOF
a534e424 2749#line 2750 "configure"
c906108c
SS
2750#include "confdefs.h"
2751#include <linux/version.h>
2752EOF
2753ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2754{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2755ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2756if test -z "$ac_err"; then
2757 rm -rf conftest*
2758 eval "ac_cv_header_$ac_safe=yes"
2759else
2760 echo "$ac_err" >&5
2761 echo "configure: failed program was:" >&5
2762 cat conftest.$ac_ext >&5
2763 rm -rf conftest*
2764 eval "ac_cv_header_$ac_safe=no"
2765fi
2766rm -f conftest*
2767fi
2768if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2769 echo "$ac_t""yes" 1>&6
2770 msgformat=linux
2771else
2772 echo "$ac_t""no" 1>&6
2773msgformat=xopen
2774fi
2775
2776
2777 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2778 fi
2779 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2780 $srcdir/po2tbl.sed.in > po2tbl.sed
2781 fi
2782
2783 if test "$PACKAGE" = "gettext"; then
2784 GT_NO="#NO#"
2785 GT_YES=
2786 else
2787 GT_NO=
2788 GT_YES="#YES#"
2789 fi
2790
2791
2792
2793 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2794
2795
2796 l=
2797
2798
4536bbc6 2799 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2800 test -d po || mkdir po
2801 if test "x$srcdir" != "x."; then
2802 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2803 posrcprefix="$srcdir/"
2804 else
2805 posrcprefix="../$srcdir/"
2806 fi
2807 else
2808 posrcprefix="../"
2809 fi
2810 rm -f po/POTFILES
2811 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2812 < $srcdir/po/POTFILES.in > po/POTFILES
2813 fi
2814
0fbb3da7
TT
2815cat >> confdefs.h <<\EOF
2816#define PACKAGE "gdb"
2817EOF
2818
2819
c906108c
SS
2820
2821
2822CONFIG_OBS=
66b965bb 2823CONFIG_LIB_OBS=
c906108c
SS
2824CONFIG_DEPS=
2825CONFIG_SRCS=
fb40c209
AC
2826CONFIG_INITS=
2827ENABLE_CFLAGS=
b3a90332
AC
2828CONFIG_ALL=
2829CONFIG_CLEAN=
e56ac5c3
AC
2830CONFIG_INSTALL=
2831CONFIG_UNINSTALL=
c906108c
SS
2832
2833configdirs="doc testsuite"
2834
96baa820
JM
2835# Check whether --enable-multi-ice or --disable-multi-ice was given.
2836if test "${enable_multi_ice+set}" = set; then
2837 enableval="$enable_multi_ice"
2838 case "${enableval}" in
2839 yes ) enable_multi_ice="yes" ;;
2840 no) enable_multi_ice="no" ;;
2841 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2842 esac
2843
2844fi
2845
2846
2847if test "${enable_multi_ice}" = "yes"; then
2848 configdirs="${configdirs} multi-ice"
2849fi
2850
c906108c
SS
2851
2852. ${srcdir}/configure.host
2853
2854. ${srcdir}/configure.tgt
2855
1ba607ad
AC
2856targ=${target} ; . ${srcdir}/../bfd/config.bfd
2857
2858
2859targ=${target}
2860. ${srcdir}/../bfd/config.bfd
5c8cc331
AC
2861
2862targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2863
1ba607ad
AC
2864if test x"${targ_archs}" != x ; then
2865 cat >> confdefs.h <<EOF
2866#define DEFAULT_BFD_ARCH ${targ_archs}
2867EOF
2868
2869fi
2870if test x"${targ_defvec}" != x ; then
2871 cat >> confdefs.h <<EOF
2872#define DEFAULT_BFD_VEC ${targ_defvec}
2873EOF
2874
2875fi
c906108c 2876
a534e424 2877for ac_prog in mawk gawk nawk awk
7a292a7a
SS
2878do
2879# Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2882echo "configure:2883: checking for $ac_word" >&5
7a292a7a
SS
2883if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2884 echo $ac_n "(cached) $ac_c" 1>&6
2885else
2886 if test -n "$AWK"; then
2887 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2888else
2889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2890 ac_dummy="$PATH"
2891 for ac_dir in $ac_dummy; do
2892 test -z "$ac_dir" && ac_dir=.
2893 if test -f $ac_dir/$ac_word; then
2894 ac_cv_prog_AWK="$ac_prog"
2895 break
2896 fi
2897 done
2898 IFS="$ac_save_ifs"
2899fi
2900fi
2901AWK="$ac_cv_prog_AWK"
2902if test -n "$AWK"; then
2903 echo "$ac_t""$AWK" 1>&6
2904else
2905 echo "$ac_t""no" 1>&6
2906fi
2907
2908test -n "$AWK" && break
2909done
2910
c906108c
SS
2911# Find a good install program. We prefer a C program (faster),
2912# so one script is as good as another. But avoid the broken or
2913# incompatible versions:
2914# SysV /etc/install, /usr/sbin/install
2915# SunOS /usr/etc/install
2916# IRIX /sbin/install
2917# AIX /bin/install
2918# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2919# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2920# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2921# ./install, which can be erroneously created by make from ./install.sh.
2922echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
a534e424 2923echo "configure:2924: checking for a BSD compatible install" >&5
c906108c
SS
2924if test -z "$INSTALL"; then
2925if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2926 echo $ac_n "(cached) $ac_c" 1>&6
2927else
2928 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2929 for ac_dir in $PATH; do
2930 # Account for people who put trailing slashes in PATH elements.
2931 case "$ac_dir/" in
2932 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2933 *)
2934 # OSF1 and SCO ODT 3.0 have their own names for install.
2935 # Don't use installbsd from OSF since it installs stuff as root
2936 # by default.
2937 for ac_prog in ginstall scoinst install; do
2938 if test -f $ac_dir/$ac_prog; then
2939 if test $ac_prog = install &&
2940 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2941 # AIX install. It has an incompatible calling convention.
2942 :
2943 else
2944 ac_cv_path_install="$ac_dir/$ac_prog -c"
2945 break 2
2946 fi
2947 fi
2948 done
2949 ;;
2950 esac
2951 done
2952 IFS="$ac_save_IFS"
2953
2954fi
2955 if test "${ac_cv_path_install+set}" = set; then
2956 INSTALL="$ac_cv_path_install"
2957 else
2958 # As a last resort, use the slow shell script. We don't cache a
2959 # path for INSTALL within a source directory, because that will
2960 # break other packages using the cache if that directory is
2961 # removed, or if the path is relative.
2962 INSTALL="$ac_install_sh"
2963 fi
2964fi
2965echo "$ac_t""$INSTALL" 1>&6
2966
2967# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2968# It thinks the first close brace ends the variable substitution.
2969test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2970
2971test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2972
2973test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2974
2975if test $host != $build; then
2976 ac_tool_prefix=${host_alias}-
2977else
2978 ac_tool_prefix=
2979fi
2980
2981# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2982set dummy ${ac_tool_prefix}ar; ac_word=$2
2983echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2984echo "configure:2985: checking for $ac_word" >&5
c906108c
SS
2985if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2986 echo $ac_n "(cached) $ac_c" 1>&6
2987else
2988 if test -n "$AR"; then
2989 ac_cv_prog_AR="$AR" # Let the user override the test.
2990else
2991 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2992 ac_dummy="$PATH"
2993 for ac_dir in $ac_dummy; do
2994 test -z "$ac_dir" && ac_dir=.
2995 if test -f $ac_dir/$ac_word; then
2996 ac_cv_prog_AR="${ac_tool_prefix}ar"
2997 break
2998 fi
2999 done
3000 IFS="$ac_save_ifs"
3001 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3002fi
3003fi
3004AR="$ac_cv_prog_AR"
3005if test -n "$AR"; then
3006 echo "$ac_t""$AR" 1>&6
3007else
3008 echo "$ac_t""no" 1>&6
3009fi
3010
3011
3012
3013# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3014set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3015echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3016echo "configure:3017: checking for $ac_word" >&5
c906108c
SS
3017if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3018 echo $ac_n "(cached) $ac_c" 1>&6
3019else
3020 if test -n "$RANLIB"; then
3021 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3022else
3023 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3024 ac_dummy="$PATH"
3025 for ac_dir in $ac_dummy; do
3026 test -z "$ac_dir" && ac_dir=.
3027 if test -f $ac_dir/$ac_word; then
3028 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3029 break
3030 fi
3031 done
3032 IFS="$ac_save_ifs"
3033fi
3034fi
3035RANLIB="$ac_cv_prog_RANLIB"
3036if test -n "$RANLIB"; then
3037 echo "$ac_t""$RANLIB" 1>&6
3038else
3039 echo "$ac_t""no" 1>&6
3040fi
3041
3042
3043if test -z "$ac_cv_prog_RANLIB"; then
3044if test -n "$ac_tool_prefix"; then
3045 # Extract the first word of "ranlib", so it can be a program name with args.
3046set dummy ranlib; ac_word=$2
3047echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3048echo "configure:3049: checking for $ac_word" >&5
c906108c
SS
3049if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3051else
3052 if test -n "$RANLIB"; then
3053 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3054else
3055 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3056 ac_dummy="$PATH"
3057 for ac_dir in $ac_dummy; do
3058 test -z "$ac_dir" && ac_dir=.
3059 if test -f $ac_dir/$ac_word; then
3060 ac_cv_prog_RANLIB="ranlib"
3061 break
3062 fi
3063 done
3064 IFS="$ac_save_ifs"
3065 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3066fi
3067fi
3068RANLIB="$ac_cv_prog_RANLIB"
3069if test -n "$RANLIB"; then
3070 echo "$ac_t""$RANLIB" 1>&6
3071else
3072 echo "$ac_t""no" 1>&6
3073fi
3074
3075else
3076 RANLIB=":"
3077fi
3078fi
3079
95ca63c4
CF
3080# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3081set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3082echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3083echo "configure:3084: checking for $ac_word" >&5
95ca63c4
CF
3084if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3085 echo $ac_n "(cached) $ac_c" 1>&6
3086else
3087 if test -n "$DLLTOOL"; then
3088 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3089else
3090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3091 ac_dummy="$PATH"
3092 for ac_dir in $ac_dummy; do
3093 test -z "$ac_dir" && ac_dir=.
3094 if test -f $ac_dir/$ac_word; then
3095 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3096 break
3097 fi
3098 done
3099 IFS="$ac_save_ifs"
3100 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3101fi
3102fi
3103DLLTOOL="$ac_cv_prog_DLLTOOL"
3104if test -n "$DLLTOOL"; then
3105 echo "$ac_t""$DLLTOOL" 1>&6
3106else
3107 echo "$ac_t""no" 1>&6
3108fi
3109
3110
3111
3112# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3113set dummy ${ac_tool_prefix}windres; ac_word=$2
3114echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3115echo "configure:3116: checking for $ac_word" >&5
95ca63c4
CF
3116if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3117 echo $ac_n "(cached) $ac_c" 1>&6
3118else
3119 if test -n "$WINDRES"; then
3120 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3121else
3122 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3123 ac_dummy="$PATH"
3124 for ac_dir in $ac_dummy; do
3125 test -z "$ac_dir" && ac_dir=.
3126 if test -f $ac_dir/$ac_word; then
3127 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3128 break
3129 fi
3130 done
3131 IFS="$ac_save_ifs"
3132 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3133fi
3134fi
3135WINDRES="$ac_cv_prog_WINDRES"
3136if test -n "$WINDRES"; then
3137 echo "$ac_t""$WINDRES" 1>&6
3138else
3139 echo "$ac_t""no" 1>&6
3140fi
3141
3142
3143
c906108c
SS
3144for ac_prog in 'bison -y' byacc
3145do
3146# Extract the first word of "$ac_prog", so it can be a program name with args.
3147set dummy $ac_prog; ac_word=$2
3148echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3149echo "configure:3150: checking for $ac_word" >&5
c906108c
SS
3150if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153 if test -n "$YACC"; then
3154 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3155else
3156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3157 ac_dummy="$PATH"
3158 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if test -f $ac_dir/$ac_word; then
3161 ac_cv_prog_YACC="$ac_prog"
3162 break
3163 fi
3164 done
3165 IFS="$ac_save_ifs"
3166fi
3167fi
3168YACC="$ac_cv_prog_YACC"
3169if test -n "$YACC"; then
3170 echo "$ac_t""$YACC" 1>&6
3171else
3172 echo "$ac_t""no" 1>&6
3173fi
3174
3175test -n "$YACC" && break
3176done
3177test -n "$YACC" || YACC="yacc"
3178
3179
75c6e08a
MK
3180# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3181set dummy ${ac_tool_prefix}mig; ac_word=$2
3182echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 3183echo "configure:3184: checking for $ac_word" >&5
75c6e08a
MK
3184if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3185 echo $ac_n "(cached) $ac_c" 1>&6
3186else
3187 if test -n "$MIG"; then
3188 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3189else
3190 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3191 ac_dummy="$PATH"
3192 for ac_dir in $ac_dummy; do
3193 test -z "$ac_dir" && ac_dir=.
3194 if test -f $ac_dir/$ac_word; then
3195 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3196 break
3197 fi
3198 done
3199 IFS="$ac_save_ifs"
3200 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3201fi
3202fi
3203MIG="$ac_cv_prog_MIG"
3204if test -n "$MIG"; then
3205 echo "$ac_t""$MIG" 1>&6
3206else
3207 echo "$ac_t""no" 1>&6
3208fi
3209
3210
3211
3212
c906108c
SS
3213if test "$program_transform_name" = s,x,x,; then
3214 program_transform_name=
3215else
3216 # Double any \ or $. echo might interpret backslashes.
3217 cat <<\EOF_SED > conftestsed
3218s,\\,\\\\,g; s,\$,$$,g
3219EOF_SED
3220 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3221 rm -f conftestsed
3222fi
3223test "$program_prefix" != NONE &&
3224 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3225# Use a double $ so make ignores it.
3226test "$program_suffix" != NONE &&
3227 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3228
3229# sed with no file args requires a program.
3230test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3231
3232
3233echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
a534e424 3234echo "configure:3235: checking return type of signal handlers" >&5
c906108c
SS
3235if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3236 echo $ac_n "(cached) $ac_c" 1>&6
3237else
3238 cat > conftest.$ac_ext <<EOF
a534e424 3239#line 3240 "configure"
c906108c
SS
3240#include "confdefs.h"
3241#include <sys/types.h>
3242#include <signal.h>
3243#ifdef signal
3244#undef signal
3245#endif
3246#ifdef __cplusplus
3247extern "C" void (*signal (int, void (*)(int)))(int);
3248#else
3249void (*signal ()) ();
3250#endif
3251
3252int main() {
3253int i;
3254; return 0; }
3255EOF
a534e424 3256if { (eval echo configure:3257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3257 rm -rf conftest*
3258 ac_cv_type_signal=void
3259else
3260 echo "configure: failed program was:" >&5
3261 cat conftest.$ac_ext >&5
3262 rm -rf conftest*
3263 ac_cv_type_signal=int
3264fi
3265rm -f conftest*
3266fi
3267
3268echo "$ac_t""$ac_cv_type_signal" 1>&6
3269cat >> confdefs.h <<EOF
3270#define RETSIGTYPE $ac_cv_type_signal
3271EOF
3272
3273
3274
3275echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
a534e424 3276echo "configure:3277: checking for ANSI C header files" >&5
c906108c
SS
3277if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3278 echo $ac_n "(cached) $ac_c" 1>&6
3279else
3280 cat > conftest.$ac_ext <<EOF
a534e424 3281#line 3282 "configure"
c906108c
SS
3282#include "confdefs.h"
3283#include <stdlib.h>
3284#include <stdarg.h>
3285#include <string.h>
3286#include <float.h>
3287EOF
3288ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 3289{ (eval echo configure:3290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3290ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3291if test -z "$ac_err"; then
3292 rm -rf conftest*
3293 ac_cv_header_stdc=yes
3294else
3295 echo "$ac_err" >&5
3296 echo "configure: failed program was:" >&5
3297 cat conftest.$ac_ext >&5
3298 rm -rf conftest*
3299 ac_cv_header_stdc=no
3300fi
3301rm -f conftest*
3302
3303if test $ac_cv_header_stdc = yes; then
3304 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3305cat > conftest.$ac_ext <<EOF
a534e424 3306#line 3307 "configure"
c906108c
SS
3307#include "confdefs.h"
3308#include <string.h>
3309EOF
3310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3311 egrep "memchr" >/dev/null 2>&1; then
3312 :
3313else
3314 rm -rf conftest*
3315 ac_cv_header_stdc=no
3316fi
3317rm -f conftest*
3318
3319fi
3320
3321if test $ac_cv_header_stdc = yes; then
3322 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3323cat > conftest.$ac_ext <<EOF
a534e424 3324#line 3325 "configure"
c906108c
SS
3325#include "confdefs.h"
3326#include <stdlib.h>
3327EOF
3328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3329 egrep "free" >/dev/null 2>&1; then
3330 :
3331else
3332 rm -rf conftest*
3333 ac_cv_header_stdc=no
3334fi
3335rm -f conftest*
3336
3337fi
3338
3339if test $ac_cv_header_stdc = yes; then
3340 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3341if test "$cross_compiling" = yes; then
3342 :
3343else
3344 cat > conftest.$ac_ext <<EOF
a534e424 3345#line 3346 "configure"
c906108c
SS
3346#include "confdefs.h"
3347#include <ctype.h>
3348#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3349#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3350#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3351int main () { int i; for (i = 0; i < 256; i++)
3352if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3353exit (0); }
3354
3355EOF
a534e424 3356if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3357then
3358 :
3359else
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -fr conftest*
3363 ac_cv_header_stdc=no
3364fi
3365rm -fr conftest*
3366fi
3367
3368fi
3369fi
3370
3371echo "$ac_t""$ac_cv_header_stdc" 1>&6
3372if test $ac_cv_header_stdc = yes; then
3373 cat >> confdefs.h <<\EOF
3374#define STDC_HEADERS 1
3375EOF
3376
3377fi
3378
3379
6abadcf8 3380
3e0bf9f1 3381case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
6abadcf8
ND
3382 cat >> confdefs.h <<\EOF
3383#define _MSE_INT_H 1
3384EOF
3385
3386esac; esac
3387
9299404e 3388for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
c906108c 3389 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
f15f768e 3390 string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
c906108c 3391 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
104c1213 3392 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
596c9d4b 3393 time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
0cf3e697 3394 dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
409a3f64
AC
3395 curses.h ncurses.h \
3396 poll.h sys/poll.h
c906108c
SS
3397do
3398ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3399echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 3400echo "configure:3401: checking for $ac_hdr" >&5
c906108c
SS
3401if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3402 echo $ac_n "(cached) $ac_c" 1>&6
3403else
3404 cat > conftest.$ac_ext <<EOF
a534e424 3405#line 3406 "configure"
c906108c
SS
3406#include "confdefs.h"
3407#include <$ac_hdr>
3408EOF
3409ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 3410{ (eval echo configure:3411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3411ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3412if test -z "$ac_err"; then
3413 rm -rf conftest*
3414 eval "ac_cv_header_$ac_safe=yes"
3415else
3416 echo "$ac_err" >&5
3417 echo "configure: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
3419 rm -rf conftest*
3420 eval "ac_cv_header_$ac_safe=no"
3421fi
3422rm -f conftest*
3423fi
3424if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3425 echo "$ac_t""yes" 1>&6
3426 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3427 cat >> confdefs.h <<EOF
3428#define $ac_tr_hdr 1
3429EOF
3430
3431else
3432 echo "$ac_t""no" 1>&6
3433fi
3434done
3435
3436echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
a534e424 3437echo "configure:3438: checking whether stat file-mode macros are broken" >&5
c906108c
SS
3438if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3439 echo $ac_n "(cached) $ac_c" 1>&6
3440else
3441 cat > conftest.$ac_ext <<EOF
a534e424 3442#line 3443 "configure"
c906108c
SS
3443#include "confdefs.h"
3444#include <sys/types.h>
3445#include <sys/stat.h>
3446
3447#if defined(S_ISBLK) && defined(S_IFDIR)
3448# if S_ISBLK (S_IFDIR)
3449You lose.
3450# endif
3451#endif
3452
3453#if defined(S_ISBLK) && defined(S_IFCHR)
3454# if S_ISBLK (S_IFCHR)
3455You lose.
3456# endif
3457#endif
3458
3459#if defined(S_ISLNK) && defined(S_IFREG)
3460# if S_ISLNK (S_IFREG)
3461You lose.
3462# endif
3463#endif
3464
3465#if defined(S_ISSOCK) && defined(S_IFREG)
3466# if S_ISSOCK (S_IFREG)
3467You lose.
3468# endif
3469#endif
3470
3471EOF
3472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3473 egrep "You lose" >/dev/null 2>&1; then
3474 rm -rf conftest*
3475 ac_cv_header_stat_broken=yes
3476else
3477 rm -rf conftest*
3478 ac_cv_header_stat_broken=no
3479fi
3480rm -f conftest*
3481
3482fi
3483
3484echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3485if test $ac_cv_header_stat_broken = yes; then
3486 cat >> confdefs.h <<\EOF
3487#define STAT_MACROS_BROKEN 1
3488EOF
3489
3490fi
3491
3492
3493echo $ac_n "checking for working const""... $ac_c" 1>&6
a534e424 3494echo "configure:3495: checking for working const" >&5
c906108c
SS
3495if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3496 echo $ac_n "(cached) $ac_c" 1>&6
3497else
3498 cat > conftest.$ac_ext <<EOF
a534e424 3499#line 3500 "configure"
c906108c
SS
3500#include "confdefs.h"
3501
3502int main() {
3503
3504/* Ultrix mips cc rejects this. */
3505typedef int charset[2]; const charset x;
3506/* SunOS 4.1.1 cc rejects this. */
3507char const *const *ccp;
3508char **p;
3509/* NEC SVR4.0.2 mips cc rejects this. */
3510struct point {int x, y;};
3511static struct point const zero = {0,0};
3512/* AIX XL C 1.02.0.0 rejects this.
3513 It does not let you subtract one const X* pointer from another in an arm
3514 of an if-expression whose if-part is not a constant expression */
3515const char *g = "string";
3516ccp = &g + (g ? g-g : 0);
3517/* HPUX 7.0 cc rejects these. */
3518++ccp;
3519p = (char**) ccp;
3520ccp = (char const *const *) p;
3521{ /* SCO 3.2v4 cc rejects this. */
3522 char *t;
3523 char const *s = 0 ? (char *) 0 : (char const *) 0;
3524
3525 *t++ = 0;
3526}
3527{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3528 int x[] = {25, 17};
3529 const int *foo = &x[0];
3530 ++foo;
3531}
3532{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3533 typedef const int *iptr;
3534 iptr p = 0;
3535 ++p;
3536}
3537{ /* AIX XL C 1.02.0.0 rejects this saying
3538 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3539 struct s { int j; const int *ap[3]; };
3540 struct s *b; b->j = 5;
3541}
3542{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3543 const int foo = 10;
3544}
3545
3546; return 0; }
3547EOF
a534e424 3548if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3549 rm -rf conftest*
3550 ac_cv_c_const=yes
3551else
3552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
3554 rm -rf conftest*
3555 ac_cv_c_const=no
3556fi
3557rm -f conftest*
3558fi
3559
3560echo "$ac_t""$ac_cv_c_const" 1>&6
3561if test $ac_cv_c_const = no; then
3562 cat >> confdefs.h <<\EOF
3563#define const
3564EOF
3565
3566fi
3567
bce58c09 3568echo $ac_n "checking for inline""... $ac_c" 1>&6
a534e424 3569echo "configure:3570: checking for inline" >&5
bce58c09
JB
3570if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3571 echo $ac_n "(cached) $ac_c" 1>&6
3572else
3573 ac_cv_c_inline=no
3574for ac_kw in inline __inline__ __inline; do
3575 cat > conftest.$ac_ext <<EOF
a534e424 3576#line 3577 "configure"
bce58c09
JB
3577#include "confdefs.h"
3578
3579int main() {
3580} $ac_kw foo() {
3581; return 0; }
3582EOF
a534e424 3583if { (eval echo configure:3584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
3584 rm -rf conftest*
3585 ac_cv_c_inline=$ac_kw; break
3586else
3587 echo "configure: failed program was:" >&5
3588 cat conftest.$ac_ext >&5
3589fi
3590rm -f conftest*
3591done
3592
3593fi
3594
3595echo "$ac_t""$ac_cv_c_inline" 1>&6
3596case "$ac_cv_c_inline" in
3597 inline | yes) ;;
3598 no) cat >> confdefs.h <<\EOF
3599#define inline
3600EOF
3601 ;;
3602 *) cat >> confdefs.h <<EOF
3603#define inline $ac_cv_c_inline
3604EOF
3605 ;;
3606esac
3607
c906108c 3608
27aac7ff
AC
3609for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
3610 realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
c906108c
SS
3611do
3612echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 3613echo "configure:3614: checking for $ac_func" >&5
c906108c
SS
3614if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3616else
3617 cat > conftest.$ac_ext <<EOF
a534e424 3618#line 3619 "configure"
c906108c
SS
3619#include "confdefs.h"
3620/* System header to define __stub macros and hopefully few prototypes,
3621 which can conflict with char $ac_func(); below. */
3622#include <assert.h>
3623/* Override any gcc2 internal prototype to avoid an error. */
3624/* We use char because int might match the return type of a gcc2
3625 builtin and then its argument prototype would still apply. */
3626char $ac_func();
3627
3628int main() {
3629
3630/* The GNU C library defines this for functions which it implements
3631 to always fail with ENOSYS. Some functions are actually named
3632 something starting with __ and the normal name is an alias. */
3633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3634choke me
3635#else
3636$ac_func();
3637#endif
3638
3639; return 0; }
3640EOF
a534e424 3641if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3642 rm -rf conftest*
3643 eval "ac_cv_func_$ac_func=yes"
3644else
3645 echo "configure: failed program was:" >&5
3646 cat conftest.$ac_ext >&5
3647 rm -rf conftest*
3648 eval "ac_cv_func_$ac_func=no"
3649fi
3650rm -f conftest*
3651fi
3652
3653if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3654 echo "$ac_t""yes" 1>&6
3655 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3656 cat >> confdefs.h <<EOF
3657#define $ac_tr_func 1
3658EOF
3659
3660else
3661 echo "$ac_t""no" 1>&6
3662fi
3663done
3664
46711df8
MK
3665# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3666# for constant arguments. Useless!
3667echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a534e424 3668echo "configure:3669: checking for working alloca.h" >&5
46711df8
MK
3669if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3670 echo $ac_n "(cached) $ac_c" 1>&6
3671else
3672 cat > conftest.$ac_ext <<EOF
a534e424 3673#line 3674 "configure"
46711df8
MK
3674#include "confdefs.h"
3675#include <alloca.h>
3676int main() {
3677char *p = alloca(2 * sizeof(int));
3678; return 0; }
3679EOF
a534e424 3680if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3681 rm -rf conftest*
3682 ac_cv_header_alloca_h=yes
3683else
3684 echo "configure: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 rm -rf conftest*
3687 ac_cv_header_alloca_h=no
3688fi
3689rm -f conftest*
3690fi
3691
3692echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3693if test $ac_cv_header_alloca_h = yes; then
3694 cat >> confdefs.h <<\EOF
3695#define HAVE_ALLOCA_H 1
3696EOF
3697
3698fi
3699
3700echo $ac_n "checking for alloca""... $ac_c" 1>&6
a534e424 3701echo "configure:3702: checking for alloca" >&5
46711df8
MK
3702if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3703 echo $ac_n "(cached) $ac_c" 1>&6
3704else
3705 cat > conftest.$ac_ext <<EOF
a534e424 3706#line 3707 "configure"
46711df8
MK
3707#include "confdefs.h"
3708
3709#ifdef __GNUC__
3710# define alloca __builtin_alloca
3711#else
3712# ifdef _MSC_VER
3713# include <malloc.h>
3714# define alloca _alloca
3715# else
3716# if HAVE_ALLOCA_H
3717# include <alloca.h>
3718# else
3719# ifdef _AIX
3720 #pragma alloca
3721# else
3722# ifndef alloca /* predefined by HP cc +Olibcalls */
3723char *alloca ();
3724# endif
3725# endif
3726# endif
3727# endif
3728#endif
3729
3730int main() {
3731char *p = (char *) alloca(1);
3732; return 0; }
3733EOF
a534e424 3734if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3735 rm -rf conftest*
3736 ac_cv_func_alloca_works=yes
3737else
3738 echo "configure: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
3740 rm -rf conftest*
3741 ac_cv_func_alloca_works=no
3742fi
3743rm -f conftest*
3744fi
3745
3746echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3747if test $ac_cv_func_alloca_works = yes; then
3748 cat >> confdefs.h <<\EOF
3749#define HAVE_ALLOCA 1
3750EOF
3751
3752fi
3753
3754if test $ac_cv_func_alloca_works = no; then
3755 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3756 # that cause trouble. Some versions do not even contain alloca or
3757 # contain a buggy version. If you still want to use their alloca,
3758 # use ar to extract alloca.o from them instead of compiling alloca.c.
3759 ALLOCA=alloca.${ac_objext}
3760 cat >> confdefs.h <<\EOF
3761#define C_ALLOCA 1
3762EOF
3763
3764
3765echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a534e424 3766echo "configure:3767: checking whether alloca needs Cray hooks" >&5
46711df8
MK
3767if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3768 echo $ac_n "(cached) $ac_c" 1>&6
3769else
3770 cat > conftest.$ac_ext <<EOF
a534e424 3771#line 3772 "configure"
46711df8
MK
3772#include "confdefs.h"
3773#if defined(CRAY) && ! defined(CRAY2)
3774webecray
3775#else
3776wenotbecray
3777#endif
3778
3779EOF
3780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3781 egrep "webecray" >/dev/null 2>&1; then
3782 rm -rf conftest*
3783 ac_cv_os_cray=yes
3784else
3785 rm -rf conftest*
3786 ac_cv_os_cray=no
3787fi
3788rm -f conftest*
3789
3790fi
3791
3792echo "$ac_t""$ac_cv_os_cray" 1>&6
3793if test $ac_cv_os_cray = yes; then
3794for ac_func in _getb67 GETB67 getb67; do
3795 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 3796echo "configure:3797: checking for $ac_func" >&5
46711df8
MK
3797if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3799else
3800 cat > conftest.$ac_ext <<EOF
a534e424 3801#line 3802 "configure"
46711df8
MK
3802#include "confdefs.h"
3803/* System header to define __stub macros and hopefully few prototypes,
3804 which can conflict with char $ac_func(); below. */
3805#include <assert.h>
3806/* Override any gcc2 internal prototype to avoid an error. */
3807/* We use char because int might match the return type of a gcc2
3808 builtin and then its argument prototype would still apply. */
3809char $ac_func();
3810
3811int main() {
3812
3813/* The GNU C library defines this for functions which it implements
3814 to always fail with ENOSYS. Some functions are actually named
3815 something starting with __ and the normal name is an alias. */
3816#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3817choke me
3818#else
3819$ac_func();
3820#endif
3821
3822; return 0; }
3823EOF
a534e424 3824if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3825 rm -rf conftest*
3826 eval "ac_cv_func_$ac_func=yes"
3827else
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3830 rm -rf conftest*
3831 eval "ac_cv_func_$ac_func=no"
3832fi
3833rm -f conftest*
3834fi
3835
3836if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3837 echo "$ac_t""yes" 1>&6
3838 cat >> confdefs.h <<EOF
3839#define CRAY_STACKSEG_END $ac_func
3840EOF
3841
3842 break
3843else
3844 echo "$ac_t""no" 1>&6
3845fi
3846
3847done
3848fi
3849
3850echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a534e424 3851echo "configure:3852: checking stack direction for C alloca" >&5
46711df8
MK
3852if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3853 echo $ac_n "(cached) $ac_c" 1>&6
3854else
3855 if test "$cross_compiling" = yes; then
3856 ac_cv_c_stack_direction=0
3857else
3858 cat > conftest.$ac_ext <<EOF
a534e424 3859#line 3860 "configure"
46711df8
MK
3860#include "confdefs.h"
3861find_stack_direction ()
3862{
3863 static char *addr = 0;
3864 auto char dummy;
3865 if (addr == 0)
3866 {
3867 addr = &dummy;
3868 return find_stack_direction ();
3869 }
3870 else
3871 return (&dummy > addr) ? 1 : -1;
3872}
3873main ()
3874{
3875 exit (find_stack_direction() < 0);
3876}
3877EOF
a534e424 3878if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
3879then
3880 ac_cv_c_stack_direction=1
3881else
3882 echo "configure: failed program was:" >&5
3883 cat conftest.$ac_ext >&5
3884 rm -fr conftest*
3885 ac_cv_c_stack_direction=-1
3886fi
3887rm -fr conftest*
3888fi
3889
3890fi
3891
3892echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3893cat >> confdefs.h <<EOF
3894#define STACK_DIRECTION $ac_cv_c_stack_direction
3895EOF
3896
3897fi
3898
74c1b268 3899echo $ac_n "checking for pid_t""... $ac_c" 1>&6
a534e424 3900echo "configure:3901: checking for pid_t" >&5
74c1b268
AC
3901if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3902 echo $ac_n "(cached) $ac_c" 1>&6
3903else
3904 cat > conftest.$ac_ext <<EOF
a534e424 3905#line 3906 "configure"
74c1b268
AC
3906#include "confdefs.h"
3907#include <sys/types.h>
3908#if STDC_HEADERS
3909#include <stdlib.h>
3910#include <stddef.h>
3911#endif
3912EOF
3913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3914 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3915 rm -rf conftest*
3916 ac_cv_type_pid_t=yes
3917else
3918 rm -rf conftest*
3919 ac_cv_type_pid_t=no
3920fi
3921rm -f conftest*
3922
3923fi
3924echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3925if test $ac_cv_type_pid_t = no; then
3926 cat >> confdefs.h <<\EOF
3927#define pid_t int
3928EOF
3929
3930fi
3931
3932ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3933echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
a534e424 3934echo "configure:3935: checking for vfork.h" >&5
74c1b268
AC
3935if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3936 echo $ac_n "(cached) $ac_c" 1>&6
3937else
3938 cat > conftest.$ac_ext <<EOF
a534e424 3939#line 3940 "configure"
74c1b268
AC
3940#include "confdefs.h"
3941#include <vfork.h>
3942EOF
3943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 3944{ (eval echo configure:3945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
3945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3946if test -z "$ac_err"; then
3947 rm -rf conftest*
3948 eval "ac_cv_header_$ac_safe=yes"
3949else
3950 echo "$ac_err" >&5
3951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953 rm -rf conftest*
3954 eval "ac_cv_header_$ac_safe=no"
3955fi
3956rm -f conftest*
3957fi
3958if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3959 echo "$ac_t""yes" 1>&6
3960 cat >> confdefs.h <<\EOF
3961#define HAVE_VFORK_H 1
3962EOF
3963
3964else
3965 echo "$ac_t""no" 1>&6
3966fi
3967
3968echo $ac_n "checking for working vfork""... $ac_c" 1>&6
a534e424 3969echo "configure:3970: checking for working vfork" >&5
74c1b268
AC
3970if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3971 echo $ac_n "(cached) $ac_c" 1>&6
3972else
3973 if test "$cross_compiling" = yes; then
3974 echo $ac_n "checking for vfork""... $ac_c" 1>&6
a534e424 3975echo "configure:3976: checking for vfork" >&5
74c1b268
AC
3976if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3977 echo $ac_n "(cached) $ac_c" 1>&6
3978else
3979 cat > conftest.$ac_ext <<EOF
a534e424 3980#line 3981 "configure"
74c1b268
AC
3981#include "confdefs.h"
3982/* System header to define __stub macros and hopefully few prototypes,
3983 which can conflict with char vfork(); below. */
3984#include <assert.h>
3985/* Override any gcc2 internal prototype to avoid an error. */
3986/* We use char because int might match the return type of a gcc2
3987 builtin and then its argument prototype would still apply. */
3988char vfork();
3989
3990int main() {
3991
3992/* The GNU C library defines this for functions which it implements
3993 to always fail with ENOSYS. Some functions are actually named
3994 something starting with __ and the normal name is an alias. */
3995#if defined (__stub_vfork) || defined (__stub___vfork)
3996choke me
3997#else
3998vfork();
3999#endif
4000
4001; return 0; }
4002EOF
a534e424 4003if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268
AC
4004 rm -rf conftest*
4005 eval "ac_cv_func_vfork=yes"
4006else
4007 echo "configure: failed program was:" >&5
4008 cat conftest.$ac_ext >&5
4009 rm -rf conftest*
4010 eval "ac_cv_func_vfork=no"
4011fi
4012rm -f conftest*
4013fi
4014
4015if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4016 echo "$ac_t""yes" 1>&6
4017 :
4018else
4019 echo "$ac_t""no" 1>&6
4020fi
4021
4022ac_cv_func_vfork_works=$ac_cv_func_vfork
4023else
4024 cat > conftest.$ac_ext <<EOF
a534e424 4025#line 4026 "configure"
74c1b268
AC
4026#include "confdefs.h"
4027/* Thanks to Paul Eggert for this test. */
4028#include <stdio.h>
4029#include <sys/types.h>
4030#include <sys/stat.h>
4031#ifdef HAVE_UNISTD_H
4032#include <unistd.h>
4033#endif
4034#ifdef HAVE_VFORK_H
4035#include <vfork.h>
4036#endif
4037/* On some sparc systems, changes by the child to local and incoming
4038 argument registers are propagated back to the parent.
4039 The compiler is told about this with #include <vfork.h>,
4040 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4041 Test for this by using a static variable whose address
4042 is put into a register that is clobbered by the vfork. */
4043static
4044#ifdef __cplusplus
4045sparc_address_test (int arg)
4046#else
4047sparc_address_test (arg) int arg;
4048#endif
4049{
4050 static pid_t child;
4051 if (!child) {
4052 child = vfork ();
4053 if (child < 0) {
4054 perror ("vfork");
4055 _exit(2);
4056 }
4057 if (!child) {
4058 arg = getpid();
4059 write(-1, "", 0);
4060 _exit (arg);
4061 }
4062 }
4063}
4064main() {
4065 pid_t parent = getpid ();
4066 pid_t child;
4067
4068 sparc_address_test ();
4069
4070 child = vfork ();
4071
4072 if (child == 0) {
4073 /* Here is another test for sparc vfork register problems.
4074 This test uses lots of local variables, at least
4075 as many local variables as main has allocated so far
4076 including compiler temporaries. 4 locals are enough for
4077 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4078 A buggy compiler should reuse the register of parent
4079 for one of the local variables, since it will think that
4080 parent can't possibly be used any more in this routine.
4081 Assigning to the local variable will thus munge parent
4082 in the parent process. */
4083 pid_t
4084 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4085 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4086 /* Convince the compiler that p..p7 are live; otherwise, it might
4087 use the same hardware register for all 8 local variables. */
4088 if (p != p1 || p != p2 || p != p3 || p != p4
4089 || p != p5 || p != p6 || p != p7)
4090 _exit(1);
4091
4092 /* On some systems (e.g. IRIX 3.3),
4093 vfork doesn't separate parent from child file descriptors.
4094 If the child closes a descriptor before it execs or exits,
4095 this munges the parent's descriptor as well.
4096 Test for this by closing stdout in the child. */
4097 _exit(close(fileno(stdout)) != 0);
4098 } else {
4099 int status;
4100 struct stat st;
4101
4102 while (wait(&status) != child)
4103 ;
4104 exit(
4105 /* Was there some problem with vforking? */
4106 child < 0
4107
4108 /* Did the child fail? (This shouldn't happen.) */
4109 || status
4110
4111 /* Did the vfork/compiler bug occur? */
4112 || parent != getpid()
4113
4114 /* Did the file descriptor bug occur? */
4115 || fstat(fileno(stdout), &st) != 0
4116 );
4117 }
4118}
4119EOF
a534e424 4120if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268
AC
4121then
4122 ac_cv_func_vfork_works=yes
4123else
4124 echo "configure: failed program was:" >&5
4125 cat conftest.$ac_ext >&5
4126 rm -fr conftest*
4127 ac_cv_func_vfork_works=no
4128fi
4129rm -fr conftest*
4130fi
4131
4132fi
4133
4134echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4135if test $ac_cv_func_vfork_works = no; then
4136 cat >> confdefs.h <<\EOF
4137#define vfork fork
4138EOF
4139
4140fi
4141
72473524
DJ
4142if test "$cross_compiling" = no; then
4143 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
a534e424 4144echo "configure:4145: checking whether setpgrp takes no argument" >&5
0200359f
MK
4145if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147else
4148 if test "$cross_compiling" = yes; then
4149 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4150else
4151 cat > conftest.$ac_ext <<EOF
a534e424 4152#line 4153 "configure"
0200359f
MK
4153#include "confdefs.h"
4154
4155#ifdef HAVE_UNISTD_H
4156#include <unistd.h>
4157#endif
4158
4159/*
4160 * If this system has a BSD-style setpgrp, which takes arguments, exit
4161 * successfully.
4162 */
4163main()
4164{
4165 if (setpgrp(1,1) == -1)
4166 exit(0);
4167 else
4168 exit(1);
4169}
4170
4171EOF
a534e424 4172if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0200359f
MK
4173then
4174 ac_cv_func_setpgrp_void=no
4175else
4176 echo "configure: failed program was:" >&5
4177 cat conftest.$ac_ext >&5
4178 rm -fr conftest*
4179 ac_cv_func_setpgrp_void=yes
4180fi
4181rm -fr conftest*
4182fi
4183
4184
4185fi
4186
4187echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4188if test $ac_cv_func_setpgrp_void = yes; then
4189 cat >> confdefs.h <<\EOF
4190#define SETPGRP_VOID 1
4191EOF
4192
4193fi
4194
72473524
DJ
4195else
4196 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
a534e424 4197echo "configure:4198: checking whether setpgrp takes no argument" >&5
72473524
DJ
4198if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4199 echo $ac_n "(cached) $ac_c" 1>&6
4200else
4201 cat > conftest.$ac_ext <<EOF
a534e424 4202#line 4203 "configure"
72473524
DJ
4203#include "confdefs.h"
4204
4205#include <unistd.h>
4206
4207int main() {
4208
4209 if (setpgrp(1,1) == -1)
4210 exit (0);
4211 else
4212 exit (1);
4213
4214; return 0; }
4215EOF
a534e424 4216if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
72473524
DJ
4217 rm -rf conftest*
4218 ac_cv_func_setpgrp_void=no
4219else
4220 echo "configure: failed program was:" >&5
4221 cat conftest.$ac_ext >&5
4222 rm -rf conftest*
4223 ac_cv_func_setpgrp_void=yes
4224fi
4225rm -f conftest*
4226fi
4227
4228echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4229if test $ac_cv_func_setpgrp_void = yes; then
4230 cat >> confdefs.h <<\EOF
4231#define SETPGRP_VOID 1
4232EOF
4233
4234fi
4235fi
c906108c 4236
2b2d558c
MK
4237# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
4238# since sigsetjmp might only be defined as a macro.
4239echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
a534e424 4240echo "configure:4241: checking for sigsetjmp" >&5
2b2d558c
MK
4241if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4242 echo $ac_n "(cached) $ac_c" 1>&6
4243else
4244 cat > conftest.$ac_ext <<EOF
a534e424 4245#line 4246 "configure"
2b2d558c
MK
4246#include "confdefs.h"
4247
4248#include <setjmp.h>
4249
4250int main() {
4251sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4252; return 0; }
4253EOF
a534e424 4254if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2b2d558c
MK
4255 rm -rf conftest*
4256 gdb_cv_func_sigsetjmp=yes
4257else
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4260 rm -rf conftest*
4261 gdb_cv_func_sigsetjmp=no
4262fi
4263rm -f conftest*
4264fi
4265
4266echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4267if test $gdb_cv_func_sigsetjmp = yes; then
4268 cat >> confdefs.h <<\EOF
4269#define HAVE_SIGSETJMP 1
4270EOF
4271
4272fi
4273
0afdd437 4274# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7dfa765c
MK
4275# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4276echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
a534e424 4277echo "configure:4278: checking for r_fs in struct reg" >&5
422ea4b8 4278if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7dfa765c
MK
4279 echo $ac_n "(cached) $ac_c" 1>&6
4280else
4281 cat > conftest.$ac_ext <<EOF
a534e424 4282#line 4283 "configure"
7dfa765c
MK
4283#include "confdefs.h"
4284#include <machine/reg.h>
4285int main() {
4286struct reg r; r.r_fs;
4287; return 0; }
4288EOF
a534e424 4289if { (eval echo configure:4290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4290 rm -rf conftest*
422ea4b8 4291 gdb_cv_struct_reg_r_fs=yes
7dfa765c
MK
4292else
4293 echo "configure: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
4295 rm -rf conftest*
422ea4b8 4296 gdb_cv_struct_reg_r_fs=no
7dfa765c
MK
4297fi
4298rm -f conftest*
4299fi
4300
422ea4b8
MK
4301echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4302if test $gdb_cv_struct_reg_r_fs = yes; then
7dfa765c 4303 cat >> confdefs.h <<\EOF
422ea4b8 4304#define HAVE_STRUCT_REG_R_FS 1
7dfa765c
MK
4305EOF
4306
4307fi
4308echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
a534e424 4309echo "configure:4310: checking for r_gs in struct reg" >&5
422ea4b8 4310if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7dfa765c
MK
4311 echo $ac_n "(cached) $ac_c" 1>&6
4312else
4313 cat > conftest.$ac_ext <<EOF
a534e424 4314#line 4315 "configure"
7dfa765c
MK
4315#include "confdefs.h"
4316#include <machine/reg.h>
4317int main() {
4318struct reg r; r.r_gs;
4319; return 0; }
4320EOF
a534e424 4321if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4322 rm -rf conftest*
422ea4b8 4323 gdb_cv_struct_reg_r_gs=yes
7dfa765c
MK
4324else
4325 echo "configure: failed program was:" >&5
4326 cat conftest.$ac_ext >&5
4327 rm -rf conftest*
422ea4b8 4328 gdb_cv_struct_reg_r_gs=no
7dfa765c
MK
4329fi
4330rm -f conftest*
4331fi
4332
422ea4b8
MK
4333echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4334if test $gdb_cv_struct_reg_r_gs = yes; then
7dfa765c 4335 cat >> confdefs.h <<\EOF
422ea4b8 4336#define HAVE_STRUCT_REG_R_GS 1
7dfa765c
MK
4337EOF
4338
4339fi
4340
0afdd437 4341# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
64bb1671 4342echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
a534e424 4343echo "configure:4344: checking for PTRACE_GETREGS" >&5
64bb1671
MK
4344if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4345 echo $ac_n "(cached) $ac_c" 1>&6
4346else
4347 cat > conftest.$ac_ext <<EOF
a534e424 4348#line 4349 "configure"
64bb1671
MK
4349#include "confdefs.h"
4350#include <sys/ptrace.h>
4351int main() {
4352PTRACE_GETREGS;
4353; return 0; }
4354EOF
a534e424 4355if { (eval echo configure:4356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
64bb1671
MK
4356 rm -rf conftest*
4357 gdb_cv_have_ptrace_getregs=yes
4358else
4359 echo "configure: failed program was:" >&5
4360 cat conftest.$ac_ext >&5
4361 rm -rf conftest*
4362 gdb_cv_have_ptrace_getregs=no
4363fi
4364rm -f conftest*
4365fi
4366
4397a6ab 4367echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
64bb1671
MK
4368if test $gdb_cv_have_ptrace_getregs = yes; then
4369 cat >> confdefs.h <<\EOF
4370#define HAVE_PTRACE_GETREGS 1
4371EOF
4372
4373fi
4374
0afdd437 4375# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6ce2ac0b 4376echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
a534e424 4377echo "configure:4378: checking for PTRACE_GETFPXREGS" >&5
6ce2ac0b 4378if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
5c44784c
JM
4379 echo $ac_n "(cached) $ac_c" 1>&6
4380else
4381 cat > conftest.$ac_ext <<EOF
a534e424 4382#line 4383 "configure"
5c44784c
JM
4383#include "confdefs.h"
4384#include <sys/ptrace.h>
4385int main() {
6ce2ac0b 4386PTRACE_GETFPXREGS;
5c44784c
JM
4387; return 0; }
4388EOF
a534e424 4389if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c44784c 4390 rm -rf conftest*
6ce2ac0b 4391 gdb_cv_have_ptrace_getfpxregs=yes
5c44784c
JM
4392else
4393 echo "configure: failed program was:" >&5
4394 cat conftest.$ac_ext >&5
4395 rm -rf conftest*
6ce2ac0b 4396 gdb_cv_have_ptrace_getfpxregs=no
5c44784c
JM
4397fi
4398rm -f conftest*
4399fi
4400
6ce2ac0b
MK
4401echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4402if test $gdb_cv_have_ptrace_getfpxregs = yes; then
5c44784c 4403 cat >> confdefs.h <<\EOF
6ce2ac0b 4404#define HAVE_PTRACE_GETFPXREGS 1
5c44784c
JM
4405EOF
4406
4407fi
4408
0afdd437
MK
4409# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4410echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
a534e424 4411echo "configure:4412: checking for PT_GETDBREGS" >&5
0afdd437
MK
4412if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
4413 echo $ac_n "(cached) $ac_c" 1>&6
4414else
4415 cat > conftest.$ac_ext <<EOF
a534e424 4416#line 4417 "configure"
0afdd437
MK
4417#include "confdefs.h"
4418#include <sys/types.h>
4419#include <sys/ptrace.h>
4420int main() {
4421PT_GETDBREGS;
4422; return 0; }
4423EOF
a534e424 4424if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0afdd437
MK
4425 rm -rf conftest*
4426 gdb_cv_have_pt_getdbregs=yes
4427else
4428 echo "configure: failed program was:" >&5
4429 cat conftest.$ac_ext >&5
4430 rm -rf conftest*
4431 gdb_cv_have_pt_getdbregs=no
4432fi
4433rm -f conftest*
4434fi
4435
4436echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4437if test $gdb_cv_have_pt_getdbregs = yes; then
4438 cat >> confdefs.h <<\EOF
4439#define HAVE_PT_GETDBREGS 1
4440EOF
4441
4442fi
4443
7e89e357
JT
4444# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
4445echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
a534e424 4446echo "configure:4447: checking for PT_GETXMMREGS" >&5
7e89e357
JT
4447if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
4448 echo $ac_n "(cached) $ac_c" 1>&6
4449else
4450 cat > conftest.$ac_ext <<EOF
a534e424 4451#line 4452 "configure"
7e89e357
JT
4452#include "confdefs.h"
4453#include <sys/types.h>
4454#include <sys/ptrace.h>
4455int main() {
4456PT_GETXMMREGS;
4457; return 0; }
4458EOF
a534e424 4459if { (eval echo configure:4460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7e89e357
JT
4460 rm -rf conftest*
4461 gdb_cv_have_pt_getxmmregs=yes
4462else
4463 echo "configure: failed program was:" >&5
4464 cat conftest.$ac_ext >&5
4465 rm -rf conftest*
4466 gdb_cv_have_pt_getxmmregs=no
4467fi
4468rm -f conftest*
4469fi
4470
4471echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
4472if test $gdb_cv_have_pt_getxmmregs = yes; then
4473 cat >> confdefs.h <<\EOF
4474#define HAVE_PT_GETXMMREGS 1
4475EOF
4476
4477fi
4478
0afdd437 4479
7be570e7 4480echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
a534e424 4481echo "configure:4482: checking for socketpair in -lsocket" >&5
7be570e7
JM
4482ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
4483if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
4485else
4486 ac_save_LIBS="$LIBS"
4487LIBS="-lsocket $LIBS"
4488cat > conftest.$ac_ext <<EOF
a534e424 4489#line 4490 "configure"
7be570e7
JM
4490#include "confdefs.h"
4491/* Override any gcc2 internal prototype to avoid an error. */
4492/* We use char because int might match the return type of a gcc2
4493 builtin and then its argument prototype would still apply. */
4494char socketpair();
4495
4496int main() {
4497socketpair()
4498; return 0; }
4499EOF
a534e424 4500if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4501 rm -rf conftest*
4502 eval "ac_cv_lib_$ac_lib_var=yes"
4503else
4504 echo "configure: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 rm -rf conftest*
4507 eval "ac_cv_lib_$ac_lib_var=no"
4508fi
4509rm -f conftest*
4510LIBS="$ac_save_LIBS"
4511
4512fi
4513if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4514 echo "$ac_t""yes" 1>&6
4515 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4516 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4517 cat >> confdefs.h <<EOF
4518#define $ac_tr_lib 1
4519EOF
4520
4521 LIBS="-lsocket $LIBS"
4522
4523else
4524 echo "$ac_t""no" 1>&6
4525fi
4526
4527for ac_func in socketpair
4528do
4529echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 4530echo "configure:4531: checking for $ac_func" >&5
7be570e7
JM
4531if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4532 echo $ac_n "(cached) $ac_c" 1>&6
4533else
4534 cat > conftest.$ac_ext <<EOF
a534e424 4535#line 4536 "configure"
7be570e7
JM
4536#include "confdefs.h"
4537/* System header to define __stub macros and hopefully few prototypes,
4538 which can conflict with char $ac_func(); below. */
4539#include <assert.h>
4540/* Override any gcc2 internal prototype to avoid an error. */
4541/* We use char because int might match the return type of a gcc2
4542 builtin and then its argument prototype would still apply. */
4543char $ac_func();
4544
4545int main() {
4546
4547/* The GNU C library defines this for functions which it implements
4548 to always fail with ENOSYS. Some functions are actually named
4549 something starting with __ and the normal name is an alias. */
4550#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4551choke me
4552#else
4553$ac_func();
4554#endif
4555
4556; return 0; }
4557EOF
a534e424 4558if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4559 rm -rf conftest*
4560 eval "ac_cv_func_$ac_func=yes"
4561else
4562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 rm -rf conftest*
4565 eval "ac_cv_func_$ac_func=no"
4566fi
4567rm -f conftest*
4568fi
4569
4570if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4571 echo "$ac_t""yes" 1>&6
4572 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4573 cat >> confdefs.h <<EOF
4574#define $ac_tr_func 1
4575EOF
4576
4577else
4578 echo "$ac_t""no" 1>&6
4579fi
4580done
4581
4582
4583
c906108c 4584echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
a534e424 4585echo "configure:4586: checking whether malloc must be declared" >&5
c906108c
SS
4586if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4587 echo $ac_n "(cached) $ac_c" 1>&6
4588else
4589 cat > conftest.$ac_ext <<EOF
a534e424 4590#line 4591 "configure"
c906108c
SS
4591#include "confdefs.h"
4592
4593#include <stdio.h>
4594#ifdef HAVE_STRING_H
4595#include <string.h>
4596#else
4597#ifdef HAVE_STRINGS_H
4598#include <strings.h>
4599#endif
4600#endif
4601#ifdef HAVE_STDLIB_H
4602#include <stdlib.h>
4603#endif
4604#ifdef HAVE_UNISTD_H
4605#include <unistd.h>
4606#endif
4607int main() {
4608char *(*pfn) = (char *(*)) malloc
4609; return 0; }
4610EOF
a534e424 4611if { (eval echo configure:4612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4612 rm -rf conftest*
4613 bfd_cv_decl_needed_malloc=no
4614else
4615 echo "configure: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4617 rm -rf conftest*
4618 bfd_cv_decl_needed_malloc=yes
4619fi
4620rm -f conftest*
4621fi
4622
4623echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4624if test $bfd_cv_decl_needed_malloc = yes; then
4625 cat >> confdefs.h <<\EOF
4626#define NEED_DECLARATION_MALLOC 1
4627EOF
4628
4629fi
4630
4631echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
a534e424 4632echo "configure:4633: checking whether realloc must be declared" >&5
c906108c
SS
4633if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4634 echo $ac_n "(cached) $ac_c" 1>&6
4635else
4636 cat > conftest.$ac_ext <<EOF
a534e424 4637#line 4638 "configure"
c906108c
SS
4638#include "confdefs.h"
4639
4640#include <stdio.h>
4641#ifdef HAVE_STRING_H
4642#include <string.h>
4643#else
4644#ifdef HAVE_STRINGS_H
4645#include <strings.h>
4646#endif
4647#endif
4648#ifdef HAVE_STDLIB_H
4649#include <stdlib.h>
4650#endif
4651#ifdef HAVE_UNISTD_H
4652#include <unistd.h>
4653#endif
4654int main() {
4655char *(*pfn) = (char *(*)) realloc
4656; return 0; }
4657EOF
a534e424 4658if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4659 rm -rf conftest*
4660 bfd_cv_decl_needed_realloc=no
4661else
4662 echo "configure: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4664 rm -rf conftest*
4665 bfd_cv_decl_needed_realloc=yes
4666fi
4667rm -f conftest*
4668fi
4669
4670echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4671if test $bfd_cv_decl_needed_realloc = yes; then
4672 cat >> confdefs.h <<\EOF
4673#define NEED_DECLARATION_REALLOC 1
4674EOF
4675
4676fi
4677
4678echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
a534e424 4679echo "configure:4680: checking whether free must be declared" >&5
c906108c
SS
4680if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4681 echo $ac_n "(cached) $ac_c" 1>&6
4682else
4683 cat > conftest.$ac_ext <<EOF
a534e424 4684#line 4685 "configure"
c906108c
SS
4685#include "confdefs.h"
4686
4687#include <stdio.h>
4688#ifdef HAVE_STRING_H
4689#include <string.h>
4690#else
4691#ifdef HAVE_STRINGS_H
4692#include <strings.h>
4693#endif
4694#endif
4695#ifdef HAVE_STDLIB_H
4696#include <stdlib.h>
4697#endif
4698#ifdef HAVE_UNISTD_H
4699#include <unistd.h>
4700#endif
4701int main() {
4702char *(*pfn) = (char *(*)) free
4703; return 0; }
4704EOF
a534e424 4705if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4706 rm -rf conftest*
4707 bfd_cv_decl_needed_free=no
4708else
4709 echo "configure: failed program was:" >&5
4710 cat conftest.$ac_ext >&5
4711 rm -rf conftest*
4712 bfd_cv_decl_needed_free=yes
4713fi
4714rm -f conftest*
4715fi
4716
4717echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4718if test $bfd_cv_decl_needed_free = yes; then
4719 cat >> confdefs.h <<\EOF
4720#define NEED_DECLARATION_FREE 1
4721EOF
4722
4723fi
4724
4725echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
a534e424 4726echo "configure:4727: checking whether strerror must be declared" >&5
c906108c
SS
4727if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4728 echo $ac_n "(cached) $ac_c" 1>&6
4729else
4730 cat > conftest.$ac_ext <<EOF
a534e424 4731#line 4732 "configure"
c906108c
SS
4732#include "confdefs.h"
4733
4734#include <stdio.h>
4735#ifdef HAVE_STRING_H
4736#include <string.h>
4737#else
4738#ifdef HAVE_STRINGS_H
4739#include <strings.h>
4740#endif
4741#endif
4742#ifdef HAVE_STDLIB_H
4743#include <stdlib.h>
4744#endif
4745#ifdef HAVE_UNISTD_H
4746#include <unistd.h>
4747#endif
4748int main() {
4749char *(*pfn) = (char *(*)) strerror
4750; return 0; }
4751EOF
a534e424 4752if { (eval echo configure:4753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4753 rm -rf conftest*
4754 bfd_cv_decl_needed_strerror=no
4755else
4756 echo "configure: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
4758 rm -rf conftest*
4759 bfd_cv_decl_needed_strerror=yes
4760fi
4761rm -f conftest*
4762fi
4763
4764echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4765if test $bfd_cv_decl_needed_strerror = yes; then
4766 cat >> confdefs.h <<\EOF
4767#define NEED_DECLARATION_STRERROR 1
4768EOF
4769
4770fi
4771
4772echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
a534e424 4773echo "configure:4774: checking whether strdup must be declared" >&5
c906108c
SS
4774if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4775 echo $ac_n "(cached) $ac_c" 1>&6
4776else
4777 cat > conftest.$ac_ext <<EOF
a534e424 4778#line 4779 "configure"
c906108c
SS
4779#include "confdefs.h"
4780
4781#include <stdio.h>
4782#ifdef HAVE_STRING_H
4783#include <string.h>
4784#else
4785#ifdef HAVE_STRINGS_H
4786#include <strings.h>
4787#endif
4788#endif
4789#ifdef HAVE_STDLIB_H
4790#include <stdlib.h>
4791#endif
4792#ifdef HAVE_UNISTD_H
4793#include <unistd.h>
4794#endif
4795int main() {
4796char *(*pfn) = (char *(*)) strdup
4797; return 0; }
4798EOF
a534e424 4799if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4800 rm -rf conftest*
4801 bfd_cv_decl_needed_strdup=no
4802else
4803 echo "configure: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4805 rm -rf conftest*
4806 bfd_cv_decl_needed_strdup=yes
4807fi
4808rm -f conftest*
4809fi
4810
4811echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4812if test $bfd_cv_decl_needed_strdup = yes; then
4813 cat >> confdefs.h <<\EOF
4814#define NEED_DECLARATION_STRDUP 1
4815EOF
4816
4817fi
4818
b83266a0 4819echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
a534e424 4820echo "configure:4821: checking whether strstr must be declared" >&5
b83266a0
SS
4821if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4822 echo $ac_n "(cached) $ac_c" 1>&6
4823else
4824 cat > conftest.$ac_ext <<EOF
a534e424 4825#line 4826 "configure"
b83266a0
SS
4826#include "confdefs.h"
4827
4828#include <stdio.h>
4829#ifdef HAVE_STRING_H
4830#include <string.h>
4831#else
4832#ifdef HAVE_STRINGS_H
4833#include <strings.h>
4834#endif
4835#endif
4836#ifdef HAVE_STDLIB_H
4837#include <stdlib.h>
4838#endif
4839#ifdef HAVE_UNISTD_H
4840#include <unistd.h>
4841#endif
4842int main() {
4843char *(*pfn) = (char *(*)) strstr
4844; return 0; }
4845EOF
a534e424 4846if { (eval echo configure:4847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0
SS
4847 rm -rf conftest*
4848 bfd_cv_decl_needed_strstr=no
4849else
4850 echo "configure: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 rm -rf conftest*
4853 bfd_cv_decl_needed_strstr=yes
4854fi
4855rm -f conftest*
4856fi
4857
4858echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4859if test $bfd_cv_decl_needed_strstr = yes; then
4860 cat >> confdefs.h <<\EOF
4861#define NEED_DECLARATION_STRSTR 1
4862EOF
4863
4864fi
4865
a4db0f07 4866echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
a534e424 4867echo "configure:4868: checking whether canonicalize_file_name must be declared" >&5
a4db0f07
RH
4868if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870else
4871 cat > conftest.$ac_ext <<EOF
a534e424 4872#line 4873 "configure"
a4db0f07
RH
4873#include "confdefs.h"
4874
4875#include <stdio.h>
4876#ifdef HAVE_STRING_H
4877#include <string.h>
4878#else
4879#ifdef HAVE_STRINGS_H
4880#include <strings.h>
4881#endif
4882#endif
4883#ifdef HAVE_STDLIB_H
4884#include <stdlib.h>
4885#endif
4886#ifdef HAVE_UNISTD_H
4887#include <unistd.h>
4888#endif
4889int main() {
4890char *(*pfn) = (char *(*)) canonicalize_file_name
4891; return 0; }
4892EOF
a534e424 4893if { (eval echo configure:4894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07
RH
4894 rm -rf conftest*
4895 bfd_cv_decl_needed_canonicalize_file_name=no
4896else
4897 echo "configure: failed program was:" >&5
4898 cat conftest.$ac_ext >&5
4899 rm -rf conftest*
4900 bfd_cv_decl_needed_canonicalize_file_name=yes
4901fi
4902rm -f conftest*
4903fi
4904
4905echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
4906if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
4907 cat >> confdefs.h <<\EOF
4908#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
4909EOF
4910
4911fi
c906108c
SS
4912
4913
4914# The following save_state_t checkery is only necessary for HPUX
4915# versions earlier than 10.20. When those fade from memory, this
4916# could be expunged. --jsm 1999-03-22
4917
4918echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
a534e424 4919echo "configure:4920: checking for HPUX save_state structure" >&5
c906108c 4920cat > conftest.$ac_ext <<EOF
a534e424 4921#line 4922 "configure"
c906108c
SS
4922#include "confdefs.h"
4923#include <machine/save_state.h>
4924EOF
4925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4926 egrep "save_state_t" >/dev/null 2>&1; then
4927 rm -rf conftest*
4928 gdb_cv_hpux_savestate=yes
4929else
4930 rm -rf conftest*
4931 gdb_cv_hpux_savestate=no
4932fi
4933rm -f conftest*
4934
4935cat > conftest.$ac_ext <<EOF
a534e424 4936#line 4937 "configure"
c906108c
SS
4937#include "confdefs.h"
4938#include <machine/save_state.h>
4939EOF
4940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4941 egrep "ss_wide" >/dev/null 2>&1; then
4942 rm -rf conftest*
4943 gdb_cv_hpux_sswide=yes
4944else
4945 rm -rf conftest*
4946 gdb_cv_hpux_sswide=no
4947fi
4948rm -f conftest*
4949
4950if test $gdb_cv_hpux_savestate = yes
4951then
4952 cat >> confdefs.h <<\EOF
4953#define HAVE_STRUCT_SAVE_STATE_T 1
4954EOF
4955
4956fi
4957if test $gdb_cv_hpux_sswide = yes
4958then
4959 cat >> confdefs.h <<\EOF
4960#define HAVE_STRUCT_MEMBER_SS_WIDE 1
4961EOF
4962
4963fi
4964echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4965
4966
4967# If we are configured native on GNU/Linux, work around problems with
4968# sys/procfs.h
c3f6f71d 4969# Also detect which type of /proc is in use, such as for Unixware or Solaris.
c906108c
SS
4970
4971if test "${target}" = "${host}"; then
4972 case "${host}" in
4973 i[3456]86-*-linux*)
4974 cat >> confdefs.h <<\EOF
4975#define START_INFERIOR_TRAPS_EXPECTED 2
4976EOF
4977
4978 cat >> confdefs.h <<\EOF
4979#define sys_quotactl 1
4980EOF
4981
4982 ;;
596c9d4b
KB
4983 ia64-*-aix*)
4984 cat >> confdefs.h <<\EOF
4985#define NEW_PROC_API 1
4986EOF
4987
4988 ;;
c5394b80 4989 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
c3f6f71d
JM
4990 cat >> confdefs.h <<\EOF
4991#define NEW_PROC_API 1
c906108c
SS
4992EOF
4993
c3f6f71d 4994 ;;
3423db82 4995 *-*-solaris2.[678])
c3f6f71d
JM
4996 cat >> confdefs.h <<\EOF
4997#define NEW_PROC_API 1
4998EOF
4999
5000 ;;
5001 esac
c906108c
SS
5002fi
5003
5004if test "$ac_cv_header_sys_procfs_h" = yes; then
5005 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5006echo "configure:5007: checking for pstatus_t in sys/procfs.h" >&5
c906108c
SS
5007 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5008 echo $ac_n "(cached) $ac_c" 1>&6
5009else
5010 cat > conftest.$ac_ext <<EOF
a534e424 5011#line 5012 "configure"
c906108c 5012#include "confdefs.h"
e17bf198
AO
5013
5014#define _SYSCALL32
c906108c
SS
5015#include <sys/procfs.h>
5016int main() {
5017pstatus_t avar
5018; return 0; }
5019EOF
a534e424 5020if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5021 rm -rf conftest*
5022 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5023else
5024 echo "configure: failed program was:" >&5
5025 cat conftest.$ac_ext >&5
5026 rm -rf conftest*
5027 bfd_cv_have_sys_procfs_type_pstatus_t=no
5028
5029fi
5030rm -f conftest*
5031fi
5032
5033 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5034 cat >> confdefs.h <<\EOF
5035#define HAVE_PSTATUS_T 1
5036EOF
5037
5038 fi
5039 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5040
5041 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5042echo "configure:5043: checking for prrun_t in sys/procfs.h" >&5
c906108c
SS
5043 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
5044 echo $ac_n "(cached) $ac_c" 1>&6
5045else
5046 cat > conftest.$ac_ext <<EOF
a534e424 5047#line 5048 "configure"
c906108c 5048#include "confdefs.h"
e17bf198
AO
5049
5050#define _SYSCALL32
c906108c
SS
5051#include <sys/procfs.h>
5052int main() {
5053prrun_t avar
5054; return 0; }
5055EOF
a534e424 5056if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5057 rm -rf conftest*
5058 bfd_cv_have_sys_procfs_type_prrun_t=yes
5059else
5060 echo "configure: failed program was:" >&5
5061 cat conftest.$ac_ext >&5
5062 rm -rf conftest*
5063 bfd_cv_have_sys_procfs_type_prrun_t=no
5064
5065fi
5066rm -f conftest*
5067fi
5068
5069 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
5070 cat >> confdefs.h <<\EOF
5071#define HAVE_PRRUN_T 1
5072EOF
5073
5074 fi
5075 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
5076
5077 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5078echo "configure:5079: checking for gregset_t in sys/procfs.h" >&5
c906108c
SS
5079 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
5080 echo $ac_n "(cached) $ac_c" 1>&6
5081else
5082 cat > conftest.$ac_ext <<EOF
a534e424 5083#line 5084 "configure"
c906108c 5084#include "confdefs.h"
e17bf198
AO
5085
5086#define _SYSCALL32
c906108c
SS
5087#include <sys/procfs.h>
5088int main() {
5089gregset_t avar
5090; return 0; }
5091EOF
a534e424 5092if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5093 rm -rf conftest*
5094 bfd_cv_have_sys_procfs_type_gregset_t=yes
5095else
5096 echo "configure: failed program was:" >&5
5097 cat conftest.$ac_ext >&5
5098 rm -rf conftest*
5099 bfd_cv_have_sys_procfs_type_gregset_t=no
5100
5101fi
5102rm -f conftest*
5103fi
5104
5105 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5106 cat >> confdefs.h <<\EOF
5107#define HAVE_GREGSET_T 1
5108EOF
5109
5110 fi
5111 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
5112
5113 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5114echo "configure:5115: checking for fpregset_t in sys/procfs.h" >&5
c906108c
SS
5115 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
5116 echo $ac_n "(cached) $ac_c" 1>&6
5117else
5118 cat > conftest.$ac_ext <<EOF
a534e424 5119#line 5120 "configure"
c906108c 5120#include "confdefs.h"
e17bf198
AO
5121
5122#define _SYSCALL32
c906108c
SS
5123#include <sys/procfs.h>
5124int main() {
5125fpregset_t avar
5126; return 0; }
5127EOF
a534e424 5128if { (eval echo configure:5129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5129 rm -rf conftest*
5130 bfd_cv_have_sys_procfs_type_fpregset_t=yes
5131else
5132 echo "configure: failed program was:" >&5
5133 cat conftest.$ac_ext >&5
5134 rm -rf conftest*
5135 bfd_cv_have_sys_procfs_type_fpregset_t=no
5136
5137fi
5138rm -f conftest*
5139fi
5140
5141 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5142 cat >> confdefs.h <<\EOF
5143#define HAVE_FPREGSET_T 1
5144EOF
5145
5146 fi
5147 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5148
3862412b 5149 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5150echo "configure:5151: checking for prgregset_t in sys/procfs.h" >&5
3862412b
MK
5151 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5152 echo $ac_n "(cached) $ac_c" 1>&6
5153else
5154 cat > conftest.$ac_ext <<EOF
a534e424 5155#line 5156 "configure"
3862412b 5156#include "confdefs.h"
e17bf198
AO
5157
5158#define _SYSCALL32
3862412b
MK
5159#include <sys/procfs.h>
5160int main() {
5161prgregset_t avar
5162; return 0; }
5163EOF
a534e424 5164if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5165 rm -rf conftest*
5166 bfd_cv_have_sys_procfs_type_prgregset_t=yes
5167else
5168 echo "configure: failed program was:" >&5
5169 cat conftest.$ac_ext >&5
5170 rm -rf conftest*
5171 bfd_cv_have_sys_procfs_type_prgregset_t=no
5172
5173fi
5174rm -f conftest*
5175fi
5176
5177 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5178 cat >> confdefs.h <<\EOF
5179#define HAVE_PRGREGSET_T 1
5180EOF
5181
5182 fi
5183 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5184
5185 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5186echo "configure:5187: checking for prfpregset_t in sys/procfs.h" >&5
3862412b
MK
5187 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5188 echo $ac_n "(cached) $ac_c" 1>&6
5189else
5190 cat > conftest.$ac_ext <<EOF
a534e424 5191#line 5192 "configure"
3862412b 5192#include "confdefs.h"
e17bf198
AO
5193
5194#define _SYSCALL32
3862412b
MK
5195#include <sys/procfs.h>
5196int main() {
5197prfpregset_t avar
5198; return 0; }
5199EOF
a534e424 5200if { (eval echo configure:5201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5201 rm -rf conftest*
5202 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5203else
5204 echo "configure: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5206 rm -rf conftest*
5207 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5208
5209fi
5210rm -f conftest*
5211fi
5212
5213 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5214 cat >> confdefs.h <<\EOF
5215#define HAVE_PRFPREGSET_T 1
5216EOF
5217
5218 fi
5219 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5220
451928c5 5221 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5222echo "configure:5223: checking for prgregset32_t in sys/procfs.h" >&5
451928c5
AC
5223 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
5225else
5226 cat > conftest.$ac_ext <<EOF
a534e424 5227#line 5228 "configure"
451928c5 5228#include "confdefs.h"
e17bf198
AO
5229
5230#define _SYSCALL32
451928c5
AC
5231#include <sys/procfs.h>
5232int main() {
5233prgregset32_t avar
5234; return 0; }
5235EOF
a534e424 5236if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5237 rm -rf conftest*
5238 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5239else
5240 echo "configure: failed program was:" >&5
5241 cat conftest.$ac_ext >&5
5242 rm -rf conftest*
5243 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5244
5245fi
5246rm -f conftest*
5247fi
5248
5249 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5250 cat >> confdefs.h <<\EOF
5251#define HAVE_PRGREGSET32_T 1
5252EOF
5253
5254 fi
5255 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5256
5257 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5258echo "configure:5259: checking for prfpregset32_t in sys/procfs.h" >&5
451928c5
AC
5259 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5260 echo $ac_n "(cached) $ac_c" 1>&6
5261else
5262 cat > conftest.$ac_ext <<EOF
a534e424 5263#line 5264 "configure"
451928c5 5264#include "confdefs.h"
e17bf198
AO
5265
5266#define _SYSCALL32
451928c5
AC
5267#include <sys/procfs.h>
5268int main() {
5269prfpregset32_t avar
5270; return 0; }
5271EOF
a534e424 5272if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5273 rm -rf conftest*
5274 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5275else
5276 echo "configure: failed program was:" >&5
5277 cat conftest.$ac_ext >&5
5278 rm -rf conftest*
5279 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5280
5281fi
5282rm -f conftest*
5283fi
5284
5285 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5286 cat >> confdefs.h <<\EOF
5287#define HAVE_PRFPREGSET32_T 1
5288EOF
5289
5290 fi
5291 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5292
3862412b 5293 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5294echo "configure:5295: checking for lwpid_t in sys/procfs.h" >&5
3862412b
MK
5295 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5296 echo $ac_n "(cached) $ac_c" 1>&6
5297else
5298 cat > conftest.$ac_ext <<EOF
a534e424 5299#line 5300 "configure"
3862412b 5300#include "confdefs.h"
e17bf198
AO
5301
5302#define _SYSCALL32
3862412b
MK
5303#include <sys/procfs.h>
5304int main() {
5305lwpid_t avar
5306; return 0; }
5307EOF
a534e424 5308if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5309 rm -rf conftest*
5310 bfd_cv_have_sys_procfs_type_lwpid_t=yes
5311else
5312 echo "configure: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 rm -rf conftest*
5315 bfd_cv_have_sys_procfs_type_lwpid_t=no
5316
5317fi
5318rm -f conftest*
5319fi
5320
5321 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5322 cat >> confdefs.h <<\EOF
5323#define HAVE_LWPID_T 1
5324EOF
5325
5326 fi
5327 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5328
5329 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5330echo "configure:5331: checking for psaddr_t in sys/procfs.h" >&5
3862412b
MK
5331 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5332 echo $ac_n "(cached) $ac_c" 1>&6
5333else
5334 cat > conftest.$ac_ext <<EOF
a534e424 5335#line 5336 "configure"
3862412b 5336#include "confdefs.h"
e17bf198
AO
5337
5338#define _SYSCALL32
3862412b
MK
5339#include <sys/procfs.h>
5340int main() {
5341psaddr_t avar
5342; return 0; }
5343EOF
a534e424 5344if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5345 rm -rf conftest*
5346 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5347else
5348 echo "configure: failed program was:" >&5
5349 cat conftest.$ac_ext >&5
5350 rm -rf conftest*
5351 bfd_cv_have_sys_procfs_type_psaddr_t=no
5352
5353fi
5354rm -f conftest*
5355fi
5356
5357 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5358 cat >> confdefs.h <<\EOF
5359#define HAVE_PSADDR_T 1
5360EOF
5361
5362 fi
5363 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5364
596c9d4b 5365 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5366echo "configure:5367: checking for prsysent_t in sys/procfs.h" >&5
596c9d4b
KB
5367 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5368 echo $ac_n "(cached) $ac_c" 1>&6
5369else
5370 cat > conftest.$ac_ext <<EOF
a534e424 5371#line 5372 "configure"
596c9d4b
KB
5372#include "confdefs.h"
5373
5374#define _SYSCALL32
5375#include <sys/procfs.h>
5376int main() {
5377prsysent_t avar
5378; return 0; }
5379EOF
a534e424 5380if { (eval echo configure:5381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5381 rm -rf conftest*
5382 bfd_cv_have_sys_procfs_type_prsysent_t=yes
5383else
5384 echo "configure: failed program was:" >&5
5385 cat conftest.$ac_ext >&5
5386 rm -rf conftest*
5387 bfd_cv_have_sys_procfs_type_prsysent_t=no
5388
5389fi
5390rm -f conftest*
5391fi
5392
5393 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5394 cat >> confdefs.h <<\EOF
5395#define HAVE_PRSYSENT_T 1
5396EOF
5397
5398 fi
5399 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5400
5401 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5402echo "configure:5403: checking for pr_sigset_t in sys/procfs.h" >&5
596c9d4b
KB
5403 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5404 echo $ac_n "(cached) $ac_c" 1>&6
5405else
5406 cat > conftest.$ac_ext <<EOF
a534e424 5407#line 5408 "configure"
596c9d4b
KB
5408#include "confdefs.h"
5409
5410#define _SYSCALL32
5411#include <sys/procfs.h>
5412int main() {
5413pr_sigset_t avar
5414; return 0; }
5415EOF
a534e424 5416if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5417 rm -rf conftest*
5418 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5419else
5420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 rm -rf conftest*
5423 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5424
5425fi
5426rm -f conftest*
5427fi
5428
5429 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5430 cat >> confdefs.h <<\EOF
5431#define HAVE_PR_SIGSET_T 1
5432EOF
5433
5434 fi
5435 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5436
5437 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5438echo "configure:5439: checking for pr_sigaction64_t in sys/procfs.h" >&5
596c9d4b
KB
5439 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5441else
5442 cat > conftest.$ac_ext <<EOF
a534e424 5443#line 5444 "configure"
596c9d4b
KB
5444#include "confdefs.h"
5445
5446#define _SYSCALL32
5447#include <sys/procfs.h>
5448int main() {
5449pr_sigaction64_t avar
5450; return 0; }
5451EOF
a534e424 5452if { (eval echo configure:5453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5453 rm -rf conftest*
5454 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5455else
5456 echo "configure: failed program was:" >&5
5457 cat conftest.$ac_ext >&5
5458 rm -rf conftest*
5459 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5460
5461fi
5462rm -f conftest*
5463fi
5464
5465 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5466 cat >> confdefs.h <<\EOF
5467#define HAVE_PR_SIGACTION64_T 1
5468EOF
5469
5470 fi
5471 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5472
5473 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
a534e424 5474echo "configure:5475: checking for pr_siginfo64_t in sys/procfs.h" >&5
596c9d4b
KB
5475 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5476 echo $ac_n "(cached) $ac_c" 1>&6
5477else
5478 cat > conftest.$ac_ext <<EOF
a534e424 5479#line 5480 "configure"
596c9d4b
KB
5480#include "confdefs.h"
5481
5482#define _SYSCALL32
5483#include <sys/procfs.h>
5484int main() {
5485pr_siginfo64_t avar
5486; return 0; }
5487EOF
a534e424 5488if { (eval echo configure:5489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5489 rm -rf conftest*
5490 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5491else
5492 echo "configure: failed program was:" >&5
5493 cat conftest.$ac_ext >&5
5494 rm -rf conftest*
5495 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5496
5497fi
5498rm -f conftest*
5499fi
5500
5501 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5502 cat >> confdefs.h <<\EOF
5503#define HAVE_PR_SIGINFO64_T 1
5504EOF
5505
5506 fi
5507 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5508
c906108c 5509
451928c5 5510
c906108c 5511
746a987d 5512
d84dd0c5
MK
5513 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5514 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
a534e424 5515echo "configure:5516: checking whether prfpregset_t type is broken" >&5
d84dd0c5
MK
5516 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5517 echo $ac_n "(cached) $ac_c" 1>&6
5518else
5519 if test "$cross_compiling" = yes; then
5520 gdb_cv_prfpregset_t_broken=yes
5521else
5522 cat > conftest.$ac_ext <<EOF
a534e424 5523#line 5524 "configure"
d84dd0c5
MK
5524#include "confdefs.h"
5525#include <sys/procfs.h>
5526 int main ()
5527 {
5528 if (sizeof (prfpregset_t) == sizeof (void *))
5529 return 1;
5530 return 0;
5531 }
5532EOF
a534e424 5533if { (eval echo configure:5534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
d84dd0c5
MK
5534then
5535 gdb_cv_prfpregset_t_broken=no
5536else
5537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -fr conftest*
5540 gdb_cv_prfpregset_t_broken=yes
5541fi
5542rm -fr conftest*
5543fi
5544
5545fi
5546
5547 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5548 if test $gdb_cv_prfpregset_t_broken = yes; then
5549 cat >> confdefs.h <<\EOF
5550#define PRFPREGSET_T_BROKEN 1
5551EOF
5552
5553 fi
5554 fi
5555
5556
c906108c 5557 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
a534e424 5558echo "configure:5559: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
c906108c
SS
5559 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5560 echo $ac_n "(cached) $ac_c" 1>&6
5561else
5562 cat > conftest.$ac_ext <<EOF
a534e424 5563#line 5564 "configure"
c906108c
SS
5564#include "confdefs.h"
5565#include <unistd.h>
5566#include <sys/types.h>
5567#include <sys/procfs.h>
5568
5569int main() {
5570
5571 int dummy;;
5572 dummy = ioctl(0, PIOCSET, &dummy);
5573
5574; return 0; }
5575EOF
a534e424 5576if { (eval echo configure:5577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5577 rm -rf conftest*
5578 gdb_cv_have_procfs_piocset=yes
5579else
5580 echo "configure: failed program was:" >&5
5581 cat conftest.$ac_ext >&5
5582 rm -rf conftest*
5583 gdb_cv_have_procfs_piocset=no
5584fi
5585rm -f conftest*
5586fi
5587
5588 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5589 if test $gdb_cv_have_procfs_piocset = yes; then
5590 cat >> confdefs.h <<\EOF
5591#define HAVE_PROCFS_PIOCSET 1
5592EOF
5593
5594 fi
5595fi
5596
d45fe813
KB
5597if test ${host} = ${target} ; then
5598
5599 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
a534e424 5600echo "configure:5601: checking for member l_addr in struct link_map" >&5
d45fe813
KB
5601 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5602 echo $ac_n "(cached) $ac_c" 1>&6
5603else
5604 cat > conftest.$ac_ext <<EOF
a534e424 5605#line 5606 "configure"
d45fe813
KB
5606#include "confdefs.h"
5607#include <link.h>
5608int main() {
5609struct link_map lm; (void) lm.l_addr;
5610; return 0; }
5611EOF
a534e424 5612if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5613 rm -rf conftest*
5614 gdb_cv_have_struct_link_map_with_l_members=yes
5615else
5616 echo "configure: failed program was:" >&5
5617 cat conftest.$ac_ext >&5
5618 rm -rf conftest*
5619 gdb_cv_have_struct_link_map_with_l_members=no
5620fi
5621rm -f conftest*
5622fi
5623
5624 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5625 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5626 cat >> confdefs.h <<\EOF
5627#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5628EOF
5629
5630 fi
5631
5632
5633 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
a534e424 5634echo "configure:5635: checking for member lm_addr in struct link_map" >&5
d45fe813
KB
5635 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5637else
5638 cat > conftest.$ac_ext <<EOF
a534e424 5639#line 5640 "configure"
d45fe813
KB
5640#include "confdefs.h"
5641#include <sys/types.h>
5642#include <link.h>
5643int main() {
5644struct link_map lm; (void) lm.lm_addr;
5645; return 0; }
5646EOF
a534e424 5647if { (eval echo configure:5648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5648 rm -rf conftest*
5649 gdb_cv_have_struct_link_map_with_lm_members=yes
5650else
5651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
5653 rm -rf conftest*
5654 gdb_cv_have_struct_link_map_with_lm_members=no
5655fi
5656rm -f conftest*
5657fi
5658
5659 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
5660 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
5661 cat >> confdefs.h <<\EOF
5662#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
5663EOF
5664
5665 fi
5666
5667
5668 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
a534e424 5669echo "configure:5670: checking for member som_addr in struct so_map" >&5
d45fe813
KB
5670 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
5671 echo $ac_n "(cached) $ac_c" 1>&6
5672else
5673 cat > conftest.$ac_ext <<EOF
a534e424 5674#line 5675 "configure"
d45fe813
KB
5675#include "confdefs.h"
5676#include <sys/types.h>
39812ceb
C
5677#ifdef HAVE_NLIST_H
5678#include <nlist.h>
5679#endif
d45fe813
KB
5680#include <link.h>
5681int main() {
5682struct so_map lm; (void) lm.som_addr;
5683; return 0; }
5684EOF
a534e424 5685if { (eval echo configure:5686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5686 rm -rf conftest*
5687 gdb_cv_have_struct_so_map_with_som_members=yes
5688else
5689 echo "configure: failed program was:" >&5
5690 cat conftest.$ac_ext >&5
5691 rm -rf conftest*
5692 gdb_cv_have_struct_so_map_with_som_members=no
5693fi
5694rm -f conftest*
5695fi
5696
5697 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
5698 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
5699 cat >> confdefs.h <<\EOF
5700#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
5701EOF
5702
5703 fi
5704
5705
5706 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
a534e424 5707echo "configure:5708: checking for struct link_map32 in sys/link.h" >&5
d45fe813
KB
5708 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
5709 echo $ac_n "(cached) $ac_c" 1>&6
5710else
5711 cat > conftest.$ac_ext <<EOF
a534e424 5712#line 5713 "configure"
d45fe813
KB
5713#include "confdefs.h"
5714#define _SYSCALL32
5715#include <sys/link.h>
5716int main() {
5717struct link_map32 l;
5718; return 0; }
5719EOF
a534e424 5720if { (eval echo configure:5721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5721 rm -rf conftest*
5722 gdb_cv_have_struct_link_map32=yes
5723else
5724 echo "configure: failed program was:" >&5
5725 cat conftest.$ac_ext >&5
5726 rm -rf conftest*
5727 gdb_cv_have_struct_link_map32=no
5728fi
5729rm -f conftest*
5730fi
5731
5732 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
5733 if test $gdb_cv_have_struct_link_map32 = yes; then
5734 cat >> confdefs.h <<\EOF
5735#define HAVE_STRUCT_LINK_MAP32 1
943c9c25
MS
5736EOF
5737
5738 cat >> confdefs.h <<\EOF
5739#define _SYSCALL32 1
d45fe813
KB
5740EOF
5741
5742 fi
5743fi
5744
c906108c 5745echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
a534e424 5746echo "configure:5747: checking for main in -lm" >&5
c906108c
SS
5747ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5748if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5749 echo $ac_n "(cached) $ac_c" 1>&6
5750else
5751 ac_save_LIBS="$LIBS"
5752LIBS="-lm $LIBS"
5753cat > conftest.$ac_ext <<EOF
a534e424 5754#line 5755 "configure"
c906108c
SS
5755#include "confdefs.h"
5756
5757int main() {
5758main()
5759; return 0; }
5760EOF
a534e424 5761if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5762 rm -rf conftest*
5763 eval "ac_cv_lib_$ac_lib_var=yes"
5764else
5765 echo "configure: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5767 rm -rf conftest*
5768 eval "ac_cv_lib_$ac_lib_var=no"
5769fi
5770rm -f conftest*
5771LIBS="$ac_save_LIBS"
5772
5773fi
5774if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5775 echo "$ac_t""yes" 1>&6
5776 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5777 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5778 cat >> confdefs.h <<EOF
5779#define $ac_tr_lib 1
5780EOF
5781
5782 LIBS="-lm $LIBS"
5783
5784else
5785 echo "$ac_t""no" 1>&6
5786fi
5787
5788
5789echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
a534e424 5790echo "configure:5791: checking for wctype in -lc" >&5
c906108c
SS
5791ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
5792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5793 echo $ac_n "(cached) $ac_c" 1>&6
5794else
5795 ac_save_LIBS="$LIBS"
5796LIBS="-lc $LIBS"
5797cat > conftest.$ac_ext <<EOF
a534e424 5798#line 5799 "configure"
c906108c
SS
5799#include "confdefs.h"
5800/* Override any gcc2 internal prototype to avoid an error. */
5801/* We use char because int might match the return type of a gcc2
5802 builtin and then its argument prototype would still apply. */
5803char wctype();
5804
5805int main() {
5806wctype()
5807; return 0; }
5808EOF
a534e424 5809if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5810 rm -rf conftest*
5811 eval "ac_cv_lib_$ac_lib_var=yes"
5812else
5813 echo "configure: failed program was:" >&5
5814 cat conftest.$ac_ext >&5
5815 rm -rf conftest*
5816 eval "ac_cv_lib_$ac_lib_var=no"
5817fi
5818rm -f conftest*
5819LIBS="$ac_save_LIBS"
5820
5821fi
5822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5823 echo "$ac_t""yes" 1>&6
5824 :
5825else
5826 echo "$ac_t""no" 1>&6
5827echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
a534e424 5828echo "configure:5829: checking for wctype in -lw" >&5
c906108c
SS
5829ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5830if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5831 echo $ac_n "(cached) $ac_c" 1>&6
5832else
5833 ac_save_LIBS="$LIBS"
5834LIBS="-lw $LIBS"
5835cat > conftest.$ac_ext <<EOF
a534e424 5836#line 5837 "configure"
c906108c
SS
5837#include "confdefs.h"
5838/* Override any gcc2 internal prototype to avoid an error. */
5839/* We use char because int might match the return type of a gcc2
5840 builtin and then its argument prototype would still apply. */
5841char wctype();
5842
5843int main() {
5844wctype()
5845; return 0; }
5846EOF
a534e424 5847if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5848 rm -rf conftest*
5849 eval "ac_cv_lib_$ac_lib_var=yes"
5850else
5851 echo "configure: failed program was:" >&5
5852 cat conftest.$ac_ext >&5
5853 rm -rf conftest*
5854 eval "ac_cv_lib_$ac_lib_var=no"
5855fi
5856rm -f conftest*
5857LIBS="$ac_save_LIBS"
5858
5859fi
5860if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5861 echo "$ac_t""yes" 1>&6
5862 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5863 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5864 cat >> confdefs.h <<EOF
5865#define $ac_tr_lib 1
5866EOF
5867
5868 LIBS="-lw $LIBS"
5869
5870else
5871 echo "$ac_t""no" 1>&6
5872fi
5873
5874fi
5875
5876
5877
5878echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
a534e424 5879echo "configure:5880: checking for long long support in compiler" >&5
c906108c
SS
5880if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
5881 echo $ac_n "(cached) $ac_c" 1>&6
5882else
5883 cat > conftest.$ac_ext <<EOF
a534e424 5884#line 5885 "configure"
c906108c
SS
5885#include "confdefs.h"
5886
5887int main() {
5888
5889 extern long long foo;
5890 switch (foo & 2) { case 0: return 1; }
5891
5892; return 0; }
5893EOF
a534e424 5894if { (eval echo configure:5895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5895 rm -rf conftest*
5896 gdb_cv_c_long_long=yes
5897else
5898 echo "configure: failed program was:" >&5
5899 cat conftest.$ac_ext >&5
5900 rm -rf conftest*
5901 gdb_cv_c_long_long=no
5902fi
5903rm -f conftest*
5904fi
5905
5906echo "$ac_t""$gdb_cv_c_long_long" 1>&6
5907if test $gdb_cv_c_long_long = yes; then
5908 cat >> confdefs.h <<\EOF
5909#define CC_HAS_LONG_LONG 1
5910EOF
5911
5912fi
5913
5914
5915echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
a534e424 5916echo "configure:5917: checking for long long support in printf" >&5
c906108c
SS
5917if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
5918 echo $ac_n "(cached) $ac_c" 1>&6
5919else
5920 if test "$cross_compiling" = yes; then
5921 gdb_cv_printf_has_long_long=no
5922else
5923 cat > conftest.$ac_ext <<EOF
a534e424 5924#line 5925 "configure"
c906108c
SS
5925#include "confdefs.h"
5926
5927int main () {
5928 char buf[32];
5929 long long l = 0;
5930 l = (l << 16) + 0x0123;
5931 l = (l << 16) + 0x4567;
5932 l = (l << 16) + 0x89ab;
5933 l = (l << 16) + 0xcdef;
5934 sprintf (buf, "0x%016llx", l);
5935 return (strcmp ("0x0123456789abcdef", buf));
5936}
5937EOF
a534e424 5938if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5939then
5940 gdb_cv_printf_has_long_long=yes
5941else
5942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 rm -fr conftest*
5945 gdb_cv_printf_has_long_long=no
5946fi
5947rm -fr conftest*
5948fi
5949
5950fi
5951
5952if test $gdb_cv_printf_has_long_long = yes; then
5953 cat >> confdefs.h <<\EOF
5954#define PRINTF_HAS_LONG_LONG 1
5955EOF
5956
5957fi
5958echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
5959
5960
5961echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
a534e424 5962echo "configure:5963: checking for long double support in compiler" >&5
c906108c
SS
5963if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
5964 echo $ac_n "(cached) $ac_c" 1>&6
5965else
5966 cat > conftest.$ac_ext <<EOF
a534e424 5967#line 5968 "configure"
c906108c
SS
5968#include "confdefs.h"
5969
5970int main() {
5971long double foo;
5972; return 0; }
5973EOF
a534e424 5974if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5975 rm -rf conftest*
5976 ac_cv_c_long_double=yes
5977else
5978 echo "configure: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 rm -rf conftest*
5981 ac_cv_c_long_double=no
5982fi
5983rm -f conftest*
5984fi
5985
5986echo "$ac_t""$ac_cv_c_long_double" 1>&6
5987if test $ac_cv_c_long_double = yes; then
5988 cat >> confdefs.h <<\EOF
5989#define HAVE_LONG_DOUBLE 1
5990EOF
5991
5992fi
5993
5994
5995echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
a534e424 5996echo "configure:5997: checking for long double support in printf" >&5
c906108c
SS
5997if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
5998 echo $ac_n "(cached) $ac_c" 1>&6
5999else
6000 if test "$cross_compiling" = yes; then
6001 gdb_cv_printf_has_long_double=no
6002else
6003 cat > conftest.$ac_ext <<EOF
a534e424 6004#line 6005 "configure"
c906108c
SS
6005#include "confdefs.h"
6006
6007int main () {
6008 char buf[16];
6009 long double f = 3.141592653;
6010 sprintf (buf, "%Lg", f);
6011 return (strncmp ("3.14159", buf, 7));
6012}
6013EOF
a534e424 6014if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6015then
6016 gdb_cv_printf_has_long_double=yes
6017else
6018 echo "configure: failed program was:" >&5
6019 cat conftest.$ac_ext >&5
6020 rm -fr conftest*
6021 gdb_cv_printf_has_long_double=no
6022fi
6023rm -fr conftest*
6024fi
6025
6026fi
6027
6028if test $gdb_cv_printf_has_long_double = yes; then
6029 cat >> confdefs.h <<\EOF
6030#define PRINTF_HAS_LONG_DOUBLE 1
6031EOF
6032
6033fi
6034echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
6035
6036
6037echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
a534e424 6038echo "configure:6039: checking for long double support in scanf" >&5
c906108c
SS
6039if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
6040 echo $ac_n "(cached) $ac_c" 1>&6
6041else
6042 if test "$cross_compiling" = yes; then
6043 gdb_cv_scanf_has_long_double=no
6044else
6045 cat > conftest.$ac_ext <<EOF
a534e424 6046#line 6047 "configure"
c906108c
SS
6047#include "confdefs.h"
6048
6049int main () {
6050 char *buf = "3.141592653";
6051 long double f = 0;
6052 sscanf (buf, "%Lg", &f);
6053 return !(f > 3.14159 && f < 3.14160);
6054}
6055EOF
a534e424 6056if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6057then
6058 gdb_cv_scanf_has_long_double=yes
6059else
6060 echo "configure: failed program was:" >&5
6061 cat conftest.$ac_ext >&5
6062 rm -fr conftest*
6063 gdb_cv_scanf_has_long_double=no
6064fi
6065rm -fr conftest*
6066fi
6067
6068fi
6069
6070if test $gdb_cv_scanf_has_long_double = yes; then
6071 cat >> confdefs.h <<\EOF
6072#define SCANF_HAS_LONG_DOUBLE 1
6073EOF
6074
6075fi
6076echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
6077
a534e424 6078for ac_hdr in unistd.h
c906108c
SS
6079do
6080ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6081echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 6082echo "configure:6083: checking for $ac_hdr" >&5
c906108c
SS
6083if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6084 echo $ac_n "(cached) $ac_c" 1>&6
6085else
6086 cat > conftest.$ac_ext <<EOF
a534e424 6087#line 6088 "configure"
c906108c
SS
6088#include "confdefs.h"
6089#include <$ac_hdr>
6090EOF
6091ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 6092{ (eval echo configure:6093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
6093ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6094if test -z "$ac_err"; then
6095 rm -rf conftest*
6096 eval "ac_cv_header_$ac_safe=yes"
6097else
6098 echo "$ac_err" >&5
6099 echo "configure: failed program was:" >&5
6100 cat conftest.$ac_ext >&5
6101 rm -rf conftest*
6102 eval "ac_cv_header_$ac_safe=no"
6103fi
6104rm -f conftest*
6105fi
6106if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6107 echo "$ac_t""yes" 1>&6
6108 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6109 cat >> confdefs.h <<EOF
6110#define $ac_tr_hdr 1
6111EOF
6112
6113else
6114 echo "$ac_t""no" 1>&6
6115fi
6116done
6117
6118for ac_func in getpagesize
6119do
6120echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 6121echo "configure:6122: checking for $ac_func" >&5
c906108c
SS
6122if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6123 echo $ac_n "(cached) $ac_c" 1>&6
6124else
6125 cat > conftest.$ac_ext <<EOF
a534e424 6126#line 6127 "configure"
c906108c
SS
6127#include "confdefs.h"
6128/* System header to define __stub macros and hopefully few prototypes,
6129 which can conflict with char $ac_func(); below. */
6130#include <assert.h>
6131/* Override any gcc2 internal prototype to avoid an error. */
6132/* We use char because int might match the return type of a gcc2
6133 builtin and then its argument prototype would still apply. */
6134char $ac_func();
6135
6136int main() {
6137
6138/* The GNU C library defines this for functions which it implements
6139 to always fail with ENOSYS. Some functions are actually named
6140 something starting with __ and the normal name is an alias. */
6141#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6142choke me
6143#else
6144$ac_func();
6145#endif
6146
6147; return 0; }
6148EOF
a534e424 6149if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6150 rm -rf conftest*
6151 eval "ac_cv_func_$ac_func=yes"
6152else
6153 echo "configure: failed program was:" >&5
6154 cat conftest.$ac_ext >&5
6155 rm -rf conftest*
6156 eval "ac_cv_func_$ac_func=no"
6157fi
6158rm -f conftest*
6159fi
6160
6161if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6162 echo "$ac_t""yes" 1>&6
6163 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6164 cat >> confdefs.h <<EOF
6165#define $ac_tr_func 1
6166EOF
6167
6168else
6169 echo "$ac_t""no" 1>&6
6170fi
6171done
6172
6173echo $ac_n "checking for working mmap""... $ac_c" 1>&6
a534e424 6174echo "configure:6175: checking for working mmap" >&5
c906108c
SS
6175if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6176 echo $ac_n "(cached) $ac_c" 1>&6
6177else
6178 if test "$cross_compiling" = yes; then
6179 ac_cv_func_mmap_fixed_mapped=no
6180else
6181 cat > conftest.$ac_ext <<EOF
a534e424 6182#line 6183 "configure"
c906108c
SS
6183#include "confdefs.h"
6184
6185/* Thanks to Mike Haertel and Jim Avera for this test.
6186 Here is a matrix of mmap possibilities:
6187 mmap private not fixed
6188 mmap private fixed at somewhere currently unmapped
6189 mmap private fixed at somewhere already mapped
6190 mmap shared not fixed
6191 mmap shared fixed at somewhere currently unmapped
6192 mmap shared fixed at somewhere already mapped
6193 For private mappings, we should verify that changes cannot be read()
6194 back from the file, nor mmap's back from the file at a different
6195 address. (There have been systems where private was not correctly
6196 implemented like the infamous i386 svr4.0, and systems where the
6197 VM page cache was not coherent with the filesystem buffer cache
6198 like early versions of FreeBSD and possibly contemporary NetBSD.)
6199 For shared mappings, we should conversely verify that changes get
6200 propogated back to all the places they're supposed to be.
6201
6202 Grep wants private fixed already mapped.
6203 The main things grep needs to know about mmap are:
6204 * does it exist and is it safe to write into the mmap'd area
6205 * how to use it (BSD variants) */
6206#include <sys/types.h>
6207#include <fcntl.h>
6208#include <sys/mman.h>
6209
6210/* This mess was copied from the GNU getpagesize.h. */
6211#ifndef HAVE_GETPAGESIZE
a534e424
AC
6212# ifdef HAVE_UNISTD_H
6213# include <unistd.h>
6214# endif
c906108c
SS
6215
6216/* Assume that all systems that can run configure have sys/param.h. */
6217# ifndef HAVE_SYS_PARAM_H
6218# define HAVE_SYS_PARAM_H 1
6219# endif
6220
6221# ifdef _SC_PAGESIZE
6222# define getpagesize() sysconf(_SC_PAGESIZE)
6223# else /* no _SC_PAGESIZE */
6224# ifdef HAVE_SYS_PARAM_H
6225# include <sys/param.h>
6226# ifdef EXEC_PAGESIZE
6227# define getpagesize() EXEC_PAGESIZE
6228# else /* no EXEC_PAGESIZE */
6229# ifdef NBPG
6230# define getpagesize() NBPG * CLSIZE
6231# ifndef CLSIZE
6232# define CLSIZE 1
6233# endif /* no CLSIZE */
6234# else /* no NBPG */
6235# ifdef NBPC
6236# define getpagesize() NBPC
6237# else /* no NBPC */
6238# ifdef PAGESIZE
6239# define getpagesize() PAGESIZE
6240# endif /* PAGESIZE */
6241# endif /* no NBPC */
6242# endif /* no NBPG */
6243# endif /* no EXEC_PAGESIZE */
6244# else /* no HAVE_SYS_PARAM_H */
6245# define getpagesize() 8192 /* punt totally */
6246# endif /* no HAVE_SYS_PARAM_H */
6247# endif /* no _SC_PAGESIZE */
6248
6249#endif /* no HAVE_GETPAGESIZE */
6250
6251#ifdef __cplusplus
6252extern "C" { void *malloc(unsigned); }
6253#else
6254char *malloc();
6255#endif
6256
6257int
6258main()
6259{
6260 char *data, *data2, *data3;
6261 int i, pagesize;
6262 int fd;
6263
6264 pagesize = getpagesize();
6265
6266 /*
6267 * First, make a file with some known garbage in it.
6268 */
6269 data = malloc(pagesize);
6270 if (!data)
6271 exit(1);
6272 for (i = 0; i < pagesize; ++i)
6273 *(data + i) = rand();
6274 umask(0);
6275 fd = creat("conftestmmap", 0600);
6276 if (fd < 0)
6277 exit(1);
6278 if (write(fd, data, pagesize) != pagesize)
6279 exit(1);
6280 close(fd);
6281
6282 /*
6283 * Next, try to mmap the file at a fixed address which
6284 * already has something else allocated at it. If we can,
6285 * also make sure that we see the same garbage.
6286 */
6287 fd = open("conftestmmap", O_RDWR);
6288 if (fd < 0)
6289 exit(1);
6290 data2 = malloc(2 * pagesize);
6291 if (!data2)
6292 exit(1);
6293 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6294 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6295 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6296 exit(1);
6297 for (i = 0; i < pagesize; ++i)
6298 if (*(data + i) != *(data2 + i))
6299 exit(1);
6300
6301 /*
6302 * Finally, make sure that changes to the mapped area
6303 * do not percolate back to the file as seen by read().
6304 * (This is a bug on some variants of i386 svr4.0.)
6305 */
6306 for (i = 0; i < pagesize; ++i)
6307 *(data2 + i) = *(data2 + i) + 1;
6308 data3 = malloc(pagesize);
6309 if (!data3)
6310 exit(1);
6311 if (read(fd, data3, pagesize) != pagesize)
6312 exit(1);
6313 for (i = 0; i < pagesize; ++i)
6314 if (*(data + i) != *(data3 + i))
6315 exit(1);
6316 close(fd);
6317 unlink("conftestmmap");
6318 exit(0);
6319}
6320
6321EOF
a534e424 6322if { (eval echo configure:6323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6323then
6324 ac_cv_func_mmap_fixed_mapped=yes
6325else
6326 echo "configure: failed program was:" >&5
6327 cat conftest.$ac_ext >&5
6328 rm -fr conftest*
6329 ac_cv_func_mmap_fixed_mapped=no
6330fi
6331rm -fr conftest*
6332fi
6333
6334fi
6335
6336echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6337if test $ac_cv_func_mmap_fixed_mapped = yes; then
6338 cat >> confdefs.h <<\EOF
6339#define HAVE_MMAP 1
6340EOF
6341
6342fi
6343
6344
438013df
AO
6345case ${host_os} in
6346aix*)
6347 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
a534e424 6348echo "configure:6349: checking for -bbigtoc option" >&5
438013df
AO
6349if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
6350 echo $ac_n "(cached) $ac_c" 1>&6
6351else
6352
6353 SAVE_LDFLAGS=$LDFLAGS
6354
6355 case $GCC in
6356 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
6357 *) gdb_cv_bigtoc=-bbigtoc ;;
6358 esac
6359
6360 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
6361 cat > conftest.$ac_ext <<EOF
a534e424 6362#line 6363 "configure"
438013df
AO
6363#include "confdefs.h"
6364
6365int main() {
6366int i;
6367; return 0; }
6368EOF
a534e424 6369if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
6370 :
6371else
6372 echo "configure: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 rm -rf conftest*
6375 gdb_cv_bigtoc=
6376fi
6377rm -f conftest*
6378
6379fi
6380
6381echo "$ac_t""$gdb_cv_bigtoc" 1>&6
6382 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
6383 ;;
6384esac
6385
c906108c
SS
6386
6387
6388if test ${build} = ${host} -a ${host} = ${target} ; then
6389 case ${host_os} in
6390 hpux*)
6391 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
a534e424 6392echo "configure:6393: checking for HPUX/OSF thread support" >&5
c906108c
SS
6393 if test -f /usr/include/dce/cma_config.h ; then
6394 if test "$GCC" = "yes" ; then
6395 echo "$ac_t""yes" 1>&6
6396 cat >> confdefs.h <<\EOF
6397#define HAVE_HPUX_THREAD_SUPPORT 1
6398EOF
6399
66b965bb 6400 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
6401 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6402 else
6403 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6404 fi
6405 else
6406 echo "$ac_t""no" 1>&6
6407 fi
6408 ;;
6409 solaris*)
6410 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
a534e424 6411echo "configure:6412: checking for Solaris thread debugging library" >&5
c906108c
SS
6412 if test -f /usr/lib/libthread_db.so.1 ; then
6413 echo "$ac_t""yes" 1>&6
6414 cat >> confdefs.h <<\EOF
6415#define HAVE_THREAD_DB_LIB 1
6416EOF
6417
66b965bb 6418 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
6419 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6420 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
a534e424 6421echo "configure:6422: checking for dlopen in -ldl" >&5
c906108c
SS
6422ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6424 echo $ac_n "(cached) $ac_c" 1>&6
6425else
6426 ac_save_LIBS="$LIBS"
6427LIBS="-ldl $LIBS"
6428cat > conftest.$ac_ext <<EOF
a534e424 6429#line 6430 "configure"
c906108c
SS
6430#include "confdefs.h"
6431/* Override any gcc2 internal prototype to avoid an error. */
6432/* We use char because int might match the return type of a gcc2
6433 builtin and then its argument prototype would still apply. */
6434char dlopen();
6435
6436int main() {
6437dlopen()
6438; return 0; }
6439EOF
a534e424 6440if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6441 rm -rf conftest*
6442 eval "ac_cv_lib_$ac_lib_var=yes"
6443else
6444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 rm -rf conftest*
6447 eval "ac_cv_lib_$ac_lib_var=no"
6448fi
6449rm -f conftest*
6450LIBS="$ac_save_LIBS"
6451
6452fi
6453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6454 echo "$ac_t""yes" 1>&6
6455 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6456 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6457 cat >> confdefs.h <<EOF
6458#define $ac_tr_lib 1
6459EOF
6460
6461 LIBS="-ldl $LIBS"
6462
6463else
6464 echo "$ac_t""no" 1>&6
6465fi
6466
6467 if test "$GCC" = "yes" ; then
6468 # The GNU linker requires the -export-dynamic option to make
6469 # all symbols visible in the dynamic symbol table.
6470 hold_ldflags=$LDFLAGS
6471 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
a534e424 6472echo "configure:6473: checking for the ld -export-dynamic flag" >&5
c906108c
SS
6473 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6474 cat > conftest.$ac_ext <<EOF
a534e424 6475#line 6476 "configure"
c906108c
SS
6476#include "confdefs.h"
6477
6478int main() {
6479int i;
6480; return 0; }
6481EOF
a534e424 6482if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6483 rm -rf conftest*
6484 found=yes
6485else
6486 echo "configure: failed program was:" >&5
6487 cat conftest.$ac_ext >&5
6488 rm -rf conftest*
6489 found=no
6490fi
6491rm -f conftest*
6492 LDFLAGS=$hold_ldflags
6493 echo "$ac_t""$found" 1>&6
6494 if test $found = yes; then
6495 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6496 fi
6497 fi
6498 # Sun randomly tweaked the prototypes in <proc_service.h>
6499 # at one point.
6500 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
a534e424 6501echo "configure:6502: checking if <proc_service.h> is old" >&5
c906108c
SS
6502 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6503 echo $ac_n "(cached) $ac_c" 1>&6
6504else
6505
6506 cat > conftest.$ac_ext <<EOF
a534e424 6507#line 6508 "configure"
c906108c
SS
6508#include "confdefs.h"
6509
6510 #include <proc_service.h>
6511 ps_err_e ps_pdwrite
6512 (struct ps_prochandle*, psaddr_t, const void*, size_t);
6513
6514int main() {
6515
6516; return 0; }
6517EOF
a534e424 6518if { (eval echo configure:6519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
6519 rm -rf conftest*
6520 gdb_cv_proc_service_is_old=no
6521else
6522 echo "configure: failed program was:" >&5
6523 cat conftest.$ac_ext >&5
6524 rm -rf conftest*
6525 gdb_cv_proc_service_is_old=yes
6526fi
6527rm -f conftest*
6528
6529fi
6530
6531 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6532 if test $gdb_cv_proc_service_is_old = yes; then
6533 cat >> confdefs.h <<\EOF
6534#define PROC_SERVICE_IS_OLD 1
6535EOF
6536
6537 fi
6538 else
6539 echo "$ac_t""no" 1>&6
6540 fi
6541 ;;
6542 esac
6543
6544fi
6545
fb40c209 6546
d318976c
FN
6547# Check whether --enable-gdbcli or --disable-gdbcli was given.
6548if test "${enable_gdbcli+set}" = set; then
6549 enableval="$enable_gdbcli"
6550
6bad8db2
FN
6551 case "${enableval}" in
6552 yes) enable_gdbcli=yes ;;
6553 "") enable_gdbcli=yes ;;
d318976c
FN
6554 no)
6555 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6556 ;;
6557 *)
6bad8db2 6558 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
d318976c
FN
6559 ;;
6560 esac
6561
6562else
6563 enable_gdbcli=yes
6564fi
6565
6566case ${enable_gdbcli} in
6567 "yes" )
6bad8db2 6568 if test -d "${srcdir}/cli" ; then
d318976c
FN
6569 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6570 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
486697a0 6571 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
d318976c
FN
6572 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6573 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6574 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6575 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6576 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6577 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6578 fi
6579 ;;
6580esac
6581
6582
fb40c209
AC
6583# Check whether --enable-gdbmi or --disable-gdbmi was given.
6584if test "${enable_gdbmi+set}" = set; then
6585 enableval="$enable_gdbmi"
6586
6587 case "${enable_gdbmi}" in
6588 yes | no) ;;
6589 "") enable_gdbmi=yes ;;
6590 *)
6591 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6592 ;;
6593 esac
6594
b0e2e90a
AC
6595else
6596 enable_gdbmi=yes
fb40c209
AC
6597fi
6598
6599case ${enable_gdbmi} in
6600 "yes" )
6601 if test -d "${srcdir}/mi" ; then
6602 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6603 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
486697a0 6604 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
fb40c209 6605 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 6606 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
b3a90332
AC
6607 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6608 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
e56ac5c3
AC
6609 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6610 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
6611 fi
6612 ;;
6613esac
c906108c 6614
b4df4f68
FN
6615# Configure UI_OUT by default (before 5.2 it can be disabled)
6616# It must be configured if gdbmi is configured
6617
6618UIOUT_CFLAGS=
6619
6620
6621# Check whether --with-uiout or --without-uiout was given.
6622if test "${with_uiout+set}" = set; then
6623 withval="$with_uiout"
6624 case "${withval}" in
6625 yes) want_uiout=true ;;
6626 no) if test $enable_gdbmi = yes; then
6627 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6628 else
6629 want_uiout=false
6630 fi ;;
6631 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6632esac
6633else
6634 want_uiout=true
6635fi
6636
6637if test $want_uiout = true; then
6638 UIOUT_CFLAGS="-DUI_OUT=1"
6639fi
6640
c906108c
SS
6641# Check whether --enable-tui or --disable-tui was given.
6642if test "${enable_tui+set}" = set; then
6643 enableval="$enable_tui"
6644
6645 case "${enable_tui}" in
6646 yes | no) ;;
6647 "") enable_tui=yes ;;
6648 *)
6649 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6650 ;;
6651 esac
6652
6653fi
6654
6655case ${enable_tui} in
6656 "yes" )
ed952ac5
AC
6657 if test -d "${srcdir}/tui" ; then
6658 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6659 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
486697a0 6660 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
ed952ac5
AC
6661 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6662 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6663 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6664 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6665 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6666 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6667 fi
6668 ;;
c906108c
SS
6669esac
6670
c906108c
SS
6671# Check whether --enable-netrom or --disable-netrom was given.
6672if test "${enable_netrom+set}" = set; then
6673 enableval="$enable_netrom"
6674 case "${enableval}" in
6675yes) enable_netrom=yes ;;
6676no) enable_netrom=no ;;
6677*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
6678esac
6679fi
6680
6681
6682if test "${enable_netrom}" = "yes"; then
66b965bb 6683 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
6684 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
6685fi
6686
1decb323 6687
3b851bce
AC
6688# NOTE: Don't add -Wall or -Wunused, they both include
6689# -Wunused-parameter which reports bogus warnings.
6690# NOTE: If you add to this list, remember to update
6691# gdb/doc/gdbint.texinfo.
1decb323 6692build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 6693-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
6694# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
6695# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 6696# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
6697# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
6698# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
6699# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
6700# Check whether --enable-build-warnings or --disable-build-warnings was given.
6701if test "${enable_build_warnings+set}" = set; then
6702 enableval="$enable_build_warnings"
1decb323 6703 case "${enableval}" in
c906108c
SS
6704 yes) ;;
6705 no) build_warnings="-w";;
6706 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6707 build_warnings="${build_warnings} ${t}";;
6708 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6709 build_warnings="${t} ${build_warnings}";;
6710 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6711esac
d4f3574e 6712if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 6713 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 6714fi
1decb323 6715fi
3b851bce
AC
6716# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
6717if test "${enable_gdb_build_warnings+set}" = set; then
6718 enableval="$enable_gdb_build_warnings"
6719 case "${enableval}" in
6720 yes) ;;
6721 no) build_warnings="-w";;
6722 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6723 build_warnings="${build_warnings} ${t}";;
6724 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6725 build_warnings="${t} ${build_warnings}";;
6726 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6727esac
6728if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6729 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
6730fi
6731fi
104c1213
JM
6732WARN_CFLAGS=""
6733WERROR_CFLAGS=""
c906108c
SS
6734if test "x${build_warnings}" != x -a "x$GCC" = xyes
6735then
746a987d 6736 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
a534e424 6737echo "configure:6738: checking compiler warning flags" >&5
746a987d
AC
6738 # Separate out the -Werror flag as some files just cannot be
6739 # compiled with it enabled.
6740 for w in ${build_warnings}; do
6741 case $w in
6742 -Werr*) WERROR_CFLAGS=-Werror ;;
6743 *) # Check that GCC accepts it
4536bbc6
AC
6744 saved_CFLAGS="$CFLAGS"
6745 CFLAGS="$CFLAGS $w"
6746 cat > conftest.$ac_ext <<EOF
a534e424 6747#line 6748 "configure"
4536bbc6
AC
6748#include "confdefs.h"
6749
6750int main() {
6751
6752; return 0; }
6753EOF
a534e424 6754if { (eval echo configure:6755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
6755 rm -rf conftest*
6756 WARN_CFLAGS="${WARN_CFLAGS} $w"
6757else
6758 echo "configure: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6760fi
6761rm -f conftest*
6762 CFLAGS="$saved_CFLAGS"
746a987d
AC
6763 esac
6764 done
6765 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
6766fi
6767
6768
104c1213 6769
c906108c
SS
6770MMALLOC_CFLAGS=
6771MMALLOC=
6772
6773
6774
6775# Check whether --with-mmalloc or --without-mmalloc was given.
6776if test "${with_mmalloc+set}" = set; then
6777 withval="$with_mmalloc"
6778 case "${withval}" in
6779 yes) want_mmalloc=true ;;
6780 no) want_mmalloc=false;;
6781 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
6782esac
6783else
6784 want_mmalloc=false
6785fi
6786
6787if test x$want_mmalloc = xtrue; then
6788 cat >> confdefs.h <<\EOF
6789#define USE_MMALLOC 1
6790EOF
6791
6792 cat >> confdefs.h <<\EOF
6793#define MMCHECK_FORCE 1
6794EOF
6795
6796 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
6797 MMALLOC='../mmalloc/libmmalloc.a'
6798fi
6799
88987551
L
6800# Check whether --with-included-regex or --without-included-regex was given.
6801if test "${with_included_regex+set}" = set; then
6802 withval="$with_included_regex"
6803 case "${withval}" in
6804 yes) want_included_regex=true ;;
6805 no) want_included_regex=false;;
6806 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
6807esac
6808else
6809 want_included_regex=true
6810fi
6811
88987551
L
6812if test $want_included_regex = false; then
6813 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
a534e424 6814echo "configure:6815: checking for GNU regex" >&5
88987551
L
6815 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6816 echo $ac_n "(cached) $ac_c" 1>&6
6817else
6818 cat > conftest.$ac_ext <<EOF
a534e424 6819#line 6820 "configure"
88987551
L
6820#include "confdefs.h"
6821#include <gnu-versions.h>
6822#include <sys/types.h>
6823#include <regex.h>
6824int main() {
6825#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
6826#error No valid GNU regex.
6827#endif
6828
6829; return 0; }
6830EOF
a534e424 6831if { (eval echo configure:6832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
88987551
L
6832 rm -rf conftest*
6833 gdb_cv_have_gnu_regex=yes
6834else
6835 echo "configure: failed program was:" >&5
6836 cat conftest.$ac_ext >&5
6837 rm -rf conftest*
6838 gdb_cv_have_gnu_regex=no
6839fi
6840rm -f conftest*
6841fi
6842
6843 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
e48f66e4
AC
6844 if test $gdb_cv_have_gnu_regex = no; then
6845 want_included_regex=true
88987551
L
6846 fi
6847fi
6848
e48f66e4
AC
6849if test x${want_included_regex} = xtrue; then
6850 REGEX="gnu-regex.o"
6851 cat >> confdefs.h <<\EOF
6852#define USE_INCLUDED_REGEX 1
6853EOF
6854
6855fi
88987551 6856
7a292a7a
SS
6857
6858# In the Cygwin environment, we need some additional flags.
6859echo $ac_n "checking for cygwin""... $ac_c" 1>&6
a534e424 6860echo "configure:6861: checking for cygwin" >&5
7a292a7a
SS
6861if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
6862 echo $ac_n "(cached) $ac_c" 1>&6
6863else
6864 cat > conftest.$ac_ext <<EOF
a534e424 6865#line 6866 "configure"
7a292a7a
SS
6866#include "confdefs.h"
6867
6868#if defined (__CYGWIN__) || defined (__CYGWIN32__)
6869lose
6870#endif
6871EOF
6872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6873 egrep "lose" >/dev/null 2>&1; then
6874 rm -rf conftest*
6875 gdb_cv_os_cygwin=yes
6876else
6877 rm -rf conftest*
6878 gdb_cv_os_cygwin=no
6879fi
6880rm -f conftest*
6881
6882fi
6883
6884echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
6885
aff38e61
AC
6886
6887SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
6888case ${host} in
95cbc983
AC
6889 *go32* ) SER_HARDWIRE=ser-go32.o ;;
6890 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
6891esac
6892
6893
6894
b83266a0
SS
6895if test x$gdb_host = xgo32; then
6896 TERM_LIB=
6897else
c906108c
SS
6898if test x$gdb_cv_os_cygwin = xyes; then
6899 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
6900else
6901 TERM_LIB=
6902 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
a534e424 6903echo "configure:6904: checking for tgetent in -lncurses" >&5
c906108c
SS
6904ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
6905if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6906 echo $ac_n "(cached) $ac_c" 1>&6
6907else
6908 ac_save_LIBS="$LIBS"
6909LIBS="-lncurses $LIBS"
6910cat > conftest.$ac_ext <<EOF
a534e424 6911#line 6912 "configure"
c906108c
SS
6912#include "confdefs.h"
6913/* Override any gcc2 internal prototype to avoid an error. */
6914/* We use char because int might match the return type of a gcc2
6915 builtin and then its argument prototype would still apply. */
6916char tgetent();
6917
6918int main() {
6919tgetent()
6920; return 0; }
6921EOF
a534e424 6922if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6923 rm -rf conftest*
6924 eval "ac_cv_lib_$ac_lib_var=yes"
6925else
6926 echo "configure: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 rm -rf conftest*
6929 eval "ac_cv_lib_$ac_lib_var=no"
6930fi
6931rm -f conftest*
6932LIBS="$ac_save_LIBS"
6933
6934fi
6935if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6936 echo "$ac_t""yes" 1>&6
6937 TERM_LIB=-lncurses
6938else
6939 echo "$ac_t""no" 1>&6
6940echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
a534e424 6941echo "configure:6942: checking for tgetent in -lHcurses" >&5
c906108c
SS
6942ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
6943if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6944 echo $ac_n "(cached) $ac_c" 1>&6
6945else
6946 ac_save_LIBS="$LIBS"
6947LIBS="-lHcurses $LIBS"
6948cat > conftest.$ac_ext <<EOF
a534e424 6949#line 6950 "configure"
c906108c
SS
6950#include "confdefs.h"
6951/* Override any gcc2 internal prototype to avoid an error. */
6952/* We use char because int might match the return type of a gcc2
6953 builtin and then its argument prototype would still apply. */
6954char tgetent();
6955
6956int main() {
6957tgetent()
6958; return 0; }
6959EOF
a534e424 6960if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6961 rm -rf conftest*
6962 eval "ac_cv_lib_$ac_lib_var=yes"
6963else
6964 echo "configure: failed program was:" >&5
6965 cat conftest.$ac_ext >&5
6966 rm -rf conftest*
6967 eval "ac_cv_lib_$ac_lib_var=no"
6968fi
6969rm -f conftest*
6970LIBS="$ac_save_LIBS"
6971
6972fi
6973if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6974 echo "$ac_t""yes" 1>&6
6975 TERM_LIB=-lHcurses
6976else
6977 echo "$ac_t""no" 1>&6
6978echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
a534e424 6979echo "configure:6980: checking for tgetent in -ltermlib" >&5
c906108c
SS
6980ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
6981if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6983else
6984 ac_save_LIBS="$LIBS"
6985LIBS="-ltermlib $LIBS"
6986cat > conftest.$ac_ext <<EOF
a534e424 6987#line 6988 "configure"
c906108c
SS
6988#include "confdefs.h"
6989/* Override any gcc2 internal prototype to avoid an error. */
6990/* We use char because int might match the return type of a gcc2
6991 builtin and then its argument prototype would still apply. */
6992char tgetent();
6993
6994int main() {
6995tgetent()
6996; return 0; }
6997EOF
a534e424 6998if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6999 rm -rf conftest*
7000 eval "ac_cv_lib_$ac_lib_var=yes"
7001else
7002 echo "configure: failed program was:" >&5
7003 cat conftest.$ac_ext >&5
7004 rm -rf conftest*
7005 eval "ac_cv_lib_$ac_lib_var=no"
7006fi
7007rm -f conftest*
7008LIBS="$ac_save_LIBS"
7009
7010fi
7011if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7012 echo "$ac_t""yes" 1>&6
7013 TERM_LIB=-ltermlib
7014else
7015 echo "$ac_t""no" 1>&6
7016echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
a534e424 7017echo "configure:7018: checking for tgetent in -ltermcap" >&5
c906108c
SS
7018ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
7019if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7020 echo $ac_n "(cached) $ac_c" 1>&6
7021else
7022 ac_save_LIBS="$LIBS"
7023LIBS="-ltermcap $LIBS"
7024cat > conftest.$ac_ext <<EOF
a534e424 7025#line 7026 "configure"
c906108c
SS
7026#include "confdefs.h"
7027/* Override any gcc2 internal prototype to avoid an error. */
7028/* We use char because int might match the return type of a gcc2
7029 builtin and then its argument prototype would still apply. */
7030char tgetent();
7031
7032int main() {
7033tgetent()
7034; return 0; }
7035EOF
a534e424 7036if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7037 rm -rf conftest*
7038 eval "ac_cv_lib_$ac_lib_var=yes"
7039else
7040 echo "configure: failed program was:" >&5
7041 cat conftest.$ac_ext >&5
7042 rm -rf conftest*
7043 eval "ac_cv_lib_$ac_lib_var=no"
7044fi
7045rm -f conftest*
7046LIBS="$ac_save_LIBS"
7047
7048fi
7049if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7050 echo "$ac_t""yes" 1>&6
7051 TERM_LIB=-ltermcap
7052else
7053 echo "$ac_t""no" 1>&6
7054echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
a534e424 7055echo "configure:7056: checking for tgetent in -lcurses" >&5
c906108c
SS
7056ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
7057if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7058 echo $ac_n "(cached) $ac_c" 1>&6
7059else
7060 ac_save_LIBS="$LIBS"
7061LIBS="-lcurses $LIBS"
7062cat > conftest.$ac_ext <<EOF
a534e424 7063#line 7064 "configure"
c906108c
SS
7064#include "confdefs.h"
7065/* Override any gcc2 internal prototype to avoid an error. */
7066/* We use char because int might match the return type of a gcc2
7067 builtin and then its argument prototype would still apply. */
7068char tgetent();
7069
7070int main() {
7071tgetent()
7072; return 0; }
7073EOF
a534e424 7074if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7075 rm -rf conftest*
7076 eval "ac_cv_lib_$ac_lib_var=yes"
7077else
7078 echo "configure: failed program was:" >&5
7079 cat conftest.$ac_ext >&5
7080 rm -rf conftest*
7081 eval "ac_cv_lib_$ac_lib_var=no"
7082fi
7083rm -f conftest*
7084LIBS="$ac_save_LIBS"
7085
7086fi
7087if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7088 echo "$ac_t""yes" 1>&6
7089 TERM_LIB=-lcurses
7090else
7091 echo "$ac_t""no" 1>&6
7092echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
a534e424 7093echo "configure:7094: checking for tgetent in -lterminfo" >&5
c906108c
SS
7094ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
7095if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7096 echo $ac_n "(cached) $ac_c" 1>&6
7097else
7098 ac_save_LIBS="$LIBS"
7099LIBS="-lterminfo $LIBS"
7100cat > conftest.$ac_ext <<EOF
a534e424 7101#line 7102 "configure"
c906108c
SS
7102#include "confdefs.h"
7103/* Override any gcc2 internal prototype to avoid an error. */
7104/* We use char because int might match the return type of a gcc2
7105 builtin and then its argument prototype would still apply. */
7106char tgetent();
7107
7108int main() {
7109tgetent()
7110; return 0; }
7111EOF
a534e424 7112if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7113 rm -rf conftest*
7114 eval "ac_cv_lib_$ac_lib_var=yes"
7115else
7116 echo "configure: failed program was:" >&5
7117 cat conftest.$ac_ext >&5
7118 rm -rf conftest*
7119 eval "ac_cv_lib_$ac_lib_var=no"
7120fi
7121rm -f conftest*
7122LIBS="$ac_save_LIBS"
7123
7124fi
7125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7126 echo "$ac_t""yes" 1>&6
7127 TERM_LIB=-lterminfo
7128else
7129 echo "$ac_t""no" 1>&6
7130fi
7131
7132fi
7133
7134fi
7135
7136fi
7137
7138fi
7139
7140fi
7141
7142
7143 if test "x$TERM_LIB" = x
7144 then
7145 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
7146 fi
7147fi
b83266a0 7148fi
c906108c
SS
7149
7150
cd0fc7c3
SS
7151# libreadline needs libuser32.a in a cygwin environment
7152WIN32LIBS=
7153if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
7154 WIN32LIBS="-luser32"
7155 case "${target}" in
7156 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
7157 ;;
7158 esac
cd0fc7c3 7159fi
c906108c 7160
7a292a7a 7161
3fc11d3e
JM
7162LIBGUI="../libgui/src/libgui.a"
7163GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
7164
7165
7a292a7a 7166
8b93c638
JM
7167# Check whether --with-cpu or --without-cpu was given.
7168if test "${with_cpu+set}" = set; then
7169 withval="$with_cpu"
7170 case "${target}" in
7171 powerpc-* | powerpcle-* )
7172 ## It would be nice to keep this table in sync with the one in
7173 ## gcc/configure.
7174 case "${with_cpu}" in
7175 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
7176 | 604 | 750 )
7177 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
7178 ;;
7179 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
7180 ## These are all RS6000 variants, as far as GDB is concerned.
7181 with_cpu=rs6000
7182 ;;
7183 603e | ec603e )
7184 with_cpu=603
7185 ;;
7186 604e )
7187 with_cpu=604
7188 ;;
7189 * )
7190 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
7191 with_cpu=ppc-uisa
7192 ;;
7193 esac
7194 ;;
7195 * )
7196 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
7197 ;;
7198esac
7199cat >> confdefs.h <<EOF
7200#define TARGET_CPU_DEFAULT "${with_cpu}"
7201EOF
7202
7203
7204fi
7205
7206
7207
3fc11d3e
JM
7208# Check whether --enable-gdbtk or --disable-gdbtk was given.
7209if test "${enable_gdbtk+set}" = set; then
7210 enableval="$enable_gdbtk"
7211 case "${enableval}" in
7212 yes)
7213 case "$host" in
7214 *go32*)
7215 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7216 enable_gdbtk=no ;;
7217 *windows*)
7218 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7219 enable_gdbtk=no ;;
7220 *)
7221 enable_gdbtk=yes ;;
7222 esac ;;
7223 no)
7224 enable_gdbtk=no ;;
7225 *)
7226 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7227esac
7228else
7229
7230# Default is on for everything but go32 and Cygwin
7231case "$host" in
7232 *go32* | *windows*)
7233 ;;
7234 *)
379d6434
AC
7235 if test -d "${srcdir}/gdbtk" ; then
7236 enable_gdbtk=yes
7237 fi
7238 ;;
7239esac
3fc11d3e
JM
7240
7241fi
7242
7243
7244WIN32LDAPP=
7245
7246
7247
7248configdir="unix"
7249
7250GDBTKLIBS=
7251if test "${enable_gdbtk}" = "yes"; then
7252
d1c3b63a
KS
7253 # Gdbtk must have an absolute path to srcdir in order to run
7254 # properly when not installed.
7255 here=`pwd`
7256 cd ${srcdir}
7257 GDBTK_SRC_DIR=`pwd`
7258 cd $here
7259
3fc11d3e
JM
7260
7261#
7262# Ok, lets find the tcl configuration
7263# First, look for one uninstalled.
7264# the alternative search directory is invoked by --with-tclconfig
7265#
7266
7267if test x"${no_tcl}" = x ; then
7268 # we reset no_tcl in case something fails here
7269 no_tcl=true
7270 # Check whether --with-tclconfig or --without-tclconfig was given.
7271if test "${with_tclconfig+set}" = set; then
7272 withval="$with_tclconfig"
7273 with_tclconfig=${withval}
7274fi
7275
7276 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
a534e424 7277echo "configure:7278: checking for Tcl configuration" >&5
3fc11d3e
JM
7278 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7279 echo $ac_n "(cached) $ac_c" 1>&6
7280else
7281
7282
7283 # First check to see if --with-tclconfig was specified.
7284 if test x"${with_tclconfig}" != x ; then
7285 if test -f "${with_tclconfig}/tclConfig.sh" ; then
7286 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7287 else
7288 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7289 fi
7290 fi
7291
7292 # then check for a private Tcl installation
7293 if test x"${ac_cv_c_tclconfig}" = x ; then
7294 for i in \
7295 ../tcl \
7296 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7297 ../../tcl \
7298 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7299 ../../../tcl \
7300 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7301 if test -f "$i/${configdir}/tclConfig.sh" ; then
7302 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7303 break
7304 fi
7305 done
7306 fi
7307 # check in a few common install locations
7308 if test x"${ac_cv_c_tclconfig}" = x ; then
7309 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7310 if test -f "$i/tclConfig.sh" ; then
7311 ac_cv_c_tclconfig=`(cd $i; pwd)`
7312 break
7313 fi
7314 done
7315 fi
7316 # check in a few other private locations
7317 if test x"${ac_cv_c_tclconfig}" = x ; then
7318 for i in \
7319 ${srcdir}/../tcl \
7320 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7321 if test -f "$i/${configdir}/tclConfig.sh" ; then
7322 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7323 break
7324 fi
7325 done
7326 fi
7327
7328fi
7329
7330 if test x"${ac_cv_c_tclconfig}" = x ; then
7331 TCLCONFIG="# no Tcl configs found"
7332 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7333 else
7334 no_tcl=
7335 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7336 echo "$ac_t""found $TCLCONFIG" 1>&6
7337 fi
7338fi
7339
7340 if test -z "${no_tcl}"; then
7341
7342 . $TCLCONFIG
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369#
7370# Ok, lets find the tk configuration
7371# First, look for one uninstalled.
7372# the alternative search directory is invoked by --with-tkconfig
7373#
7374
7375if test x"${no_tk}" = x ; then
7376 # we reset no_tk in case something fails here
7377 no_tk=true
7378 # Check whether --with-tkconfig or --without-tkconfig was given.
7379if test "${with_tkconfig+set}" = set; then
7380 withval="$with_tkconfig"
7381 with_tkconfig=${withval}
7382fi
7383
7384 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
a534e424 7385echo "configure:7386: checking for Tk configuration" >&5
3fc11d3e
JM
7386 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7387 echo $ac_n "(cached) $ac_c" 1>&6
7388else
7389
7390
7391 # First check to see if --with-tkconfig was specified.
7392 if test x"${with_tkconfig}" != x ; then
7393 if test -f "${with_tkconfig}/tkConfig.sh" ; then
7394 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7395 else
7396 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7397 fi
7398 fi
7399
7400 # then check for a private Tk library
7401 if test x"${ac_cv_c_tkconfig}" = x ; then
7402 for i in \
7403 ../tk \
7404 `ls -dr ../tk[4-9]* 2>/dev/null` \
7405 ../../tk \
7406 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7407 ../../../tk \
7408 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7409 if test -f "$i/${configdir}/tkConfig.sh" ; then
7410 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7411 break
7412 fi
7413 done
7414 fi
7415 # check in a few common install locations
7416 if test x"${ac_cv_c_tkconfig}" = x ; then
7417 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7418 if test -f "$i/tkConfig.sh" ; then
7419 ac_cv_c_tkconfig=`(cd $i; pwd)`
7420 break
7421 fi
7422 done
7423 fi
7424 # check in a few other private locations
7425 if test x"${ac_cv_c_tkconfig}" = x ; then
7426 for i in \
7427 ${srcdir}/../tk \
7428 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7429 if test -f "$i/${configdir}/tkConfig.sh" ; then
7430 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7431 break
7432 fi
7433 done
7434 fi
7435
7436fi
7437
7438 if test x"${ac_cv_c_tkconfig}" = x ; then
7439 TKCONFIG="# no Tk configs found"
7440 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7441 else
7442 no_tk=
7443 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7444 echo "$ac_t""found $TKCONFIG" 1>&6
7445 fi
7446fi
7447
7448
7449
dd2504ab
JM
7450 # now look for Tcl library stuff
7451
7452 case "${host}" in
7453 *-*-cygwin*)
7454 tcldir=../tcl/win/
7455 ;;
7456 *)
7457 tcldir=../tcl/unix/
7458 ;;
7459 esac
7460
7461 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7462
3fc11d3e
JM
7463 # If $no_tk is nonempty, then we can't do Tk, and there is no
7464 # point to doing Tcl.
7465 if test -z "${no_tk}"; then
7466
7467 if test -f "$TKCONFIG" ; then
7468 . $TKCONFIG
7469 fi
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484#
7485# Ok, lets find the tcl source trees so we can use the headers
7486# Warning: transition of version 9 to 10 will break this algorithm
7487# because 10 sorts before 9. We also look for just tcl. We have to
7488# be careful that we don't match stuff like tclX by accident.
7489# the alternative search directory is involked by --with-tclinclude
7490#
7491
7492no_tcl=true
7493echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
a534e424 7494echo "configure:7495: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
7495# Check whether --with-tclinclude or --without-tclinclude was given.
7496if test "${with_tclinclude+set}" = set; then
7497 withval="$with_tclinclude"
7498 with_tclinclude=${withval}
7499fi
7500
7501if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7502 echo $ac_n "(cached) $ac_c" 1>&6
7503else
7504
7505# first check to see if --with-tclinclude was specified
7506if test x"${with_tclinclude}" != x ; then
7507 if test -f ${with_tclinclude}/tclInt.h ; then
7508 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7509 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7510 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7511 else
7512 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7513 fi
7514fi
7515
7516# next check if it came with Tcl configuration file
7517if test x"${ac_cv_c_tclconfig}" = x ; then
7518 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7519 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7520 fi
7521fi
7522
7523# next check in private source directory
7524#
7525# since ls returns lowest version numbers first, reverse its output
7526if test x"${ac_cv_c_tclh}" = x ; then
7527 for i in \
7528 ${srcdir}/../tcl \
7529 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7530 ${srcdir}/../../tcl \
7531 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7532 ${srcdir}/../../../tcl \
7533 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7534 if test -f $i/generic/tclInt.h ; then
7535 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7536 break
7537 fi
7538 done
7539fi
7540# finally check in a few common install locations
7541#
7542# since ls returns lowest version numbers first, reverse its output
7543if test x"${ac_cv_c_tclh}" = x ; then
7544 for i in \
7545 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7546 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7547 /usr/local/src/tcl \
7548 /usr/local/lib/tcl \
7549 ${prefix}/include ; do
7550 if test -f $i/generic/tclInt.h ; then
7551 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7552 break
7553 fi
7554 done
7555fi
7556# see if one is installed
7557if test x"${ac_cv_c_tclh}" = x ; then
7558 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7559echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
a534e424 7560echo "configure:7561: checking for tclInt.h" >&5
3fc11d3e
JM
7561if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7562 echo $ac_n "(cached) $ac_c" 1>&6
7563else
7564 cat > conftest.$ac_ext <<EOF
a534e424 7565#line 7566 "configure"
3fc11d3e
JM
7566#include "confdefs.h"
7567#include <tclInt.h>
7568EOF
7569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 7570{ (eval echo configure:7571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7571ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7572if test -z "$ac_err"; then
7573 rm -rf conftest*
7574 eval "ac_cv_header_$ac_safe=yes"
7575else
7576 echo "$ac_err" >&5
7577 echo "configure: failed program was:" >&5
7578 cat conftest.$ac_ext >&5
7579 rm -rf conftest*
7580 eval "ac_cv_header_$ac_safe=no"
7581fi
7582rm -f conftest*
7583fi
7584if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7585 echo "$ac_t""yes" 1>&6
7586 ac_cv_c_tclh=installed
7587else
7588 echo "$ac_t""no" 1>&6
7589ac_cv_c_tclh=""
7590fi
7591
7592fi
7593
7594fi
7595
7596if test x"${ac_cv_c_tclh}" = x ; then
7597 TCLHDIR="# no Tcl private headers found"
7598 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7599fi
7600if test x"${ac_cv_c_tclh}" != x ; then
7601 no_tcl=""
7602 if test x"${ac_cv_c_tclh}" = x"installed" ; then
7603 echo "$ac_t""is installed" 1>&6
7604 TCLHDIR=""
7605 else
7606 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7607 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7608 TCLHDIR="-I${ac_cv_c_tclh}"
7609 fi
7610fi
7611
7612
7613
7614
7615#
7616# Ok, lets find the tk source trees so we can use the headers
7617# If the directory (presumably symlink) named "tk" exists, use that one
7618# in preference to any others. Same logic is used when choosing library
7619# and again with Tcl. The search order is the best place to look first, then in
7620# decreasing significance. The loop breaks if the trigger file is found.
7621# Note the gross little conversion here of srcdir by cd'ing to the found
7622# directory. This converts the path from a relative to an absolute, so
7623# recursive cache variables for the path will work right. We check all
7624# the possible paths in one loop rather than many seperate loops to speed
7625# things up.
7626# the alternative search directory is involked by --with-tkinclude
7627#
7628no_tk=true
7629echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
a534e424 7630echo "configure:7631: checking for Tk private headers" >&5
3fc11d3e
JM
7631# Check whether --with-tkinclude or --without-tkinclude was given.
7632if test "${with_tkinclude+set}" = set; then
7633 withval="$with_tkinclude"
7634 with_tkinclude=${withval}
7635fi
7636
7637if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7638 echo $ac_n "(cached) $ac_c" 1>&6
7639else
7640
7641# first check to see if --with-tkinclude was specified
7642if test x"${with_tkinclude}" != x ; then
7643 if test -f ${with_tkinclude}/tk.h ; then
7644 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7645 elif test -f ${with_tkinclude}/generic/tk.h ; then
7646 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7647 else
7648 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7649 fi
7650fi
7651
7652# next check if it came with Tk configuration file
7653if test x"${ac_cv_c_tkconfig}" = x ; then
7654 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7655 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7656 fi
7657fi
7658
7659# next check in private source directory
7660#
7661# since ls returns lowest version numbers first, reverse its output
7662if test x"${ac_cv_c_tkh}" = x ; then
7663 for i in \
7664 ${srcdir}/../tk \
7665 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7666 ${srcdir}/../../tk \
7667 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7668 ${srcdir}/../../../tk \
7669 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
7670 if test -f $i/generic/tk.h ; then
7671 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7672 break
7673 fi
7674 done
7675fi
7676# finally check in a few common install locations
7677#
7678# since ls returns lowest version numbers first, reverse its output
7679if test x"${ac_cv_c_tkh}" = x ; then
7680 for i in \
7681 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
7682 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
7683 /usr/local/src/tk \
7684 /usr/local/lib/tk \
7685 ${prefix}/include ; do
7686 if test -f $i/generic/tk.h ; then
7687 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7688 break
7689 fi
7690 done
7691fi
7692# see if one is installed
7693if test x"${ac_cv_c_tkh}" = x ; then
7694 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
7695echo $ac_n "checking for tk.h""... $ac_c" 1>&6
a534e424 7696echo "configure:7697: checking for tk.h" >&5
3fc11d3e
JM
7697if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7698 echo $ac_n "(cached) $ac_c" 1>&6
7699else
7700 cat > conftest.$ac_ext <<EOF
a534e424 7701#line 7702 "configure"
3fc11d3e
JM
7702#include "confdefs.h"
7703#include <tk.h>
7704EOF
7705ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 7706{ (eval echo configure:7707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7707ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7708if test -z "$ac_err"; then
7709 rm -rf conftest*
7710 eval "ac_cv_header_$ac_safe=yes"
7711else
7712 echo "$ac_err" >&5
7713 echo "configure: failed program was:" >&5
7714 cat conftest.$ac_ext >&5
7715 rm -rf conftest*
7716 eval "ac_cv_header_$ac_safe=no"
7717fi
7718rm -f conftest*
7719fi
7720if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7721 echo "$ac_t""yes" 1>&6
7722 ac_cv_c_tkh=installed
7723else
7724 echo "$ac_t""no" 1>&6
7725ac_cv_c_tkh=""
7726fi
7727
7728fi
7729
7730fi
7731
7732if test x"${ac_cv_c_tkh}" != x ; then
7733 no_tk=""
7734 if test x"${ac_cv_c_tkh}" = x"installed" ; then
7735 echo "$ac_t""is installed" 1>&6
7736 TKHDIR=""
7737 else
7738 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
7739 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
7740 TKHDIR="-I${ac_cv_c_tkh}"
7741 fi
7742else
7743 TKHDIR="# no Tk directory found"
7744 echo "configure: warning: Can't find Tk private headers" 1>&2
7745 no_tk=true
7746fi
7747
7748
7749
7750
7751echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
a534e424 7752echo "configure:7753: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7753if test x"${ac_cv_c_itclh}" = x ; then
7754 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
7755 if test -f $i/generic/itcl.h ; then
7756 ac_cv_c_itclh=`(cd $i/generic; pwd)`
7757 break
7758 fi
7759 done
7760fi
7761if test x"${ac_cv_c_itclh}" = x ; then
7762 ITCLHDIR="# no Itcl private headers found"
7763 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
7764fi
7765if test x"${ac_cv_c_itclh}" != x ; then
7766 ITCLHDIR="-I${ac_cv_c_itclh}"
7767fi
7768# should always be here
7769# ITCLLIB="../itcl/itcl/unix/libitcl.a"
7770
7771#AC_SUBST(ITCLLIB)
7772
7773
7774echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
a534e424 7775echo "configure:7776: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7776if test x"${ac_cv_c_itkh}" = x ; then
7777 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
7778 if test -f $i/generic/itk.h ; then
7779 ac_cv_c_itkh=`(cd $i/generic; pwd)`
7780 break
7781 fi
7782 done
7783fi
7784if test x"${ac_cv_c_itkh}" = x ; then
7785 ITKHDIR="# no Itk private headers found"
7786 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
7787fi
7788if test x"${ac_cv_c_itkh}" != x ; then
7789 ITKHDIR="-I${ac_cv_c_itkh}"
7790fi
7791# should always be here
7792# ITKLIB="../itcl/itk/unix/libitk.a"
7793
7794#AC_SUBST(ITKLIB)
7795
7796
7797echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
a534e424 7798echo "configure:7799: checking for Tix private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7799if test x"${ac_cv_c_tixh}" = x ; then
7800 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
7801 if test -f $i/generic/tix.h ; then
7802 ac_cv_c_tixh=`(cd $i/generic; pwd)`
7803 break
7804 fi
7805 done
7806fi
7807if test x"${ac_cv_c_tixh}" = x ; then
7808 TIXHDIR="# no Tix private headers found"
7809 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
7810fi
7811if test x"${ac_cv_c_tixh}" != x ; then
7812 TIXHDIR="-I${ac_cv_c_tixh}"
7813fi
7814
7815
7816
dd2504ab
JM
7817
7818 # now look for Tk library stuff
7819
7820 case "${host}" in
7821 *-*-cygwin*)
7822 tkdir=../tk/win/
7823 ;;
7824 *)
7825 tkdir=../tk/unix/
7826 ;;
7827 esac
7828
7829 TK_DEPS="${tkdir}${TK_LIB_FILE}"
7830
3fc11d3e
JM
7831 # now look for Itcl library stuff
7832
7833
7834#
7835# Ok, lets find the itcl configuration
7836# First, look for one uninstalled.
7837# the alternative search directory is invoked by --with-itclconfig
7838#
7839
7840if test x"${no_itcl}" = x ; then
7841 # we reset no_itcl in case something fails here
7842 no_itcl=true
7843 # Check whether --with-itclconfig or --without-itclconfig was given.
7844if test "${with_itclconfig+set}" = set; then
7845 withval="$with_itclconfig"
7846 with_itclconfig=${withval}
7847fi
7848
7849 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
a534e424 7850echo "configure:7851: checking for Itcl configuration" >&5
3fc11d3e
JM
7851 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
7852 echo $ac_n "(cached) $ac_c" 1>&6
7853else
7854
7855
7856 # First check to see if --with-itclconfig was specified.
7857 if test x"${with_itclconfig}" != x ; then
7858 if test -f "${with_itclconfig}/itclConfig.sh" ; then
7859 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
7860 else
7861 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
7862 fi
7863 fi
7864
7865 # then check for a private Itcl library
7866 if test x"${ac_cv_c_itclconfig}" = x ; then
7867 for i in \
7868 ../itcl/itcl \
7869 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
7870 ../../itcl \
7871 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
7872 ../../../itcl \
7873 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
7874 if test -f "$i/itclConfig.sh" ; then
7875 ac_cv_c_itclconfig=`(cd $i; pwd)`
7876 break
7877 fi
7878 done
7879 fi
7880 # check in a few common install locations
7881 if test x"${ac_cv_c_itclconfig}" = x ; then
7882 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7883 if test -f "$i/itclConfig.sh" ; then
7884 ac_cv_c_itclconfig=`(cd $i; pwd)`
7885 break
7886 fi
7887 done
7888 fi
7889 # check in a few other private locations
7890 if test x"${ac_cv_c_itclconfig}" = x ; then
7891 for i in \
7892 ${srcdir}/../itcl/itcl \
7893 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
7894 if test -f "$i/itclConfig.sh" ; then
7895 ac_cv_c_itclconfig=`(cd $i; pwd)`
7896 break
7897 fi
7898 done
7899 fi
7900
7901fi
7902
7903 if test x"${ac_cv_c_itclconfig}" = x ; then
7904 ITCLCONFIG="# no Itcl configs found"
7905 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
7906 else
7907 no_itcl=
7908 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
7909 echo "$ac_t""found $ITCLCONFIG" 1>&6
7910 fi
7911fi
7912
7913 if test -z "${no_itcl}"; then
7914
7915 if test -f "$ITCLCONFIG" ; then
7916 . $ITCLCONFIG
7917 fi
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
3fc11d3e
JM
7928
7929
7930 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 7931 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
7932 fi
7933
7934
7935 # now look for Itk library stuff
7936
7937#
7938# Ok, lets find the itk configuration
7939# First, look for one uninstalled.
7940# the alternative search directory is invoked by --with-itkconfig
7941#
7942
7943if test x"${no_itk}" = x ; then
7944 # we reset no_itk in case something fails here
7945 no_itk=true
7946 # Check whether --with-itkconfig or --without-itkconfig was given.
7947if test "${with_itkconfig+set}" = set; then
7948 withval="$with_itkconfig"
7949 with_itkconfig=${withval}
7950fi
7951
7952 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
a534e424 7953echo "configure:7954: checking for Itk configuration" >&5
3fc11d3e
JM
7954 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
7955 echo $ac_n "(cached) $ac_c" 1>&6
7956else
7957
7958
7959 # First check to see if --with-itkconfig was specified.
7960 if test x"${with_itkconfig}" != x ; then
7961 if test -f "${with_itkconfig}/itkConfig.sh" ; then
7962 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
7963 else
7964 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
7965 fi
7966 fi
7967
7968 # then check for a private Itk library
7969 if test x"${ac_cv_c_itkconfig}" = x ; then
7970 for i in \
7971 ../itcl/itk \
7972 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
7973 ../../itk \
7974 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
7975 ../../../itk \
7976 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
7977 if test -f "$i/itkConfig.sh" ; then
7978 ac_cv_c_itkconfig=`(cd $i; pwd)`
7979 break
7980 fi
7981 done
7982 fi
7983 # check in a few common install locations
7984 if test x"${ac_cv_c_itkconfig}" = x ; then
7985 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7986 if test -f "$i/itkConfig.sh" ; then
7987 ac_cv_c_itkconfig=`(cd $i; pwd)`
7988 break
7989 fi
7990 done
7991 fi
7992 # check in a few other private locations
7993 if test x"${ac_cv_c_itkconfig}" = x ; then
7994 for i in \
7995 ${srcdir}/../itcl/itk \
7996 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
7997 if test -f "$i/itkConfig.sh" ; then
7998 ac_cv_c_itkconfig=`(cd $i; pwd)`
7999 break
8000 fi
8001 done
8002 fi
8003
8004fi
8005
8006 if test x"${ac_cv_c_itkconfig}" = x ; then
8007 ITKCONFIG="# no Itk configs found"
8008 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
8009 else
8010 no_itk=
8011 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
8012 echo "$ac_t""found $ITKCONFIG" 1>&6
8013 fi
8014fi
8015
8016
8017 if test -z "${no_itcl}"; then
8018
8019 if test -f "$ITKCONFIG" ; then
8020 . $ITKCONFIG
8021 fi
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
3fc11d3e 8034 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 8035 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
8036 fi
8037
8038 # now look for Tix library stuff
8039
8040#
8041# Ok, lets find the tix configuration
8042# First, look for one uninstalled.
8043# the alternative search directory is invoked by --with-itkconfig
8044#
8045
8046if test x"${no_tix}" = x ; then
8047 # we reset no_tix in case something fails here
8048 no_tix=true
8049 # Check whether --with-tixconfig or --without-tixconfig was given.
8050if test "${with_tixconfig+set}" = set; then
8051 withval="$with_tixconfig"
8052 with_tixconfig=${withval}
8053fi
8054
8055 echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
a534e424 8056echo "configure:8057: checking for Tix configuration" >&5
3fc11d3e
JM
8057 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
8058 echo $ac_n "(cached) $ac_c" 1>&6
8059else
8060
8061
8062 # First check to see if --with-tixconfig was specified.
8063 if test x"${with_tixconfig}" != x ; then
8064 if test -f "${with_tixconfig}/tixConfig.sh" ; then
8065 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
8066 else
8067 { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
8068 fi
8069 fi
8070
8071 # then check for a private Tix library
8072 if test x"${ac_cv_c_tixconfig}" = x ; then
8073 for i in \
8074 ../tix \
8075 `ls -dr ../tix 2>/dev/null` \
8076 ../../tix \
8077 `ls -dr ../../tix 2>/dev/null` \
8078 ../../../tix \
8079 `ls -dr ../../../tix 2>/dev/null` ; do
8080 echo "**** Looking at $i - with ${configdir}"
8081 if test -f "$i/tixConfig.sh" ; then
8082 ac_cv_c_tixconfig=`(cd $i; pwd)`
8083 break
8084 fi
8085 done
8086 fi
8087 # check in a few common install locations
8088 if test x"${ac_cv_c_tixconfig}" = x ; then
8089 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8090 echo "**** Looking at $i"
8091 if test -f "$i/tixConfig.sh" ; then
8092 ac_cv_c_tixconfig=`(cd $i; pwd)`
8093 break
8094 fi
8095 done
8096 fi
8097 # check in a few other private locations
8098 echo "**** Other private locations"
8099 if test x"${ac_cv_c_tixconfig}" = x ; then
8100 for i in \
8101 ${srcdir}/../tix \
8102 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
8103 echo "**** Looking at $i - with ${configdir}"
8104 if test -f "$i/${configdir}/tixConfig.sh" ; then
8105 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
8106 break
8107 fi
8108 done
8109 fi
8110
8111fi
8112
8113 if test x"${ac_cv_c_tixconfig}" = x ; then
8114 TIXCONFIG="# no Tix configs found"
8115 echo "configure: warning: Can't find Tix configuration definitions" 1>&2
8116 else
8117 no_tix=
8118 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
8119 echo "$ac_t""found $TIXCONFIG" 1>&6
8120 fi
8121fi
8122
8123
8124 if test -z "${no_tix}"; then
8125
8126 if test -f "$TIXCONFIG" ; then
8127 . $TIXCONFIG
8128 fi
8129
8130
8131
8132
8133
8134
8135
8136
8137 TIXLIB="${TIX_BUILD_LIB_SPEC}"
8138 TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
8139 fi
8140
4226a5a5 8141 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
8142 # Tcl/Tk 8.1 require -fwritable strings. I don't
8143 # know whether 8.2 will or not, but I bet it will.
8144 # I don't have to worry about 7.x since we don't support it.
8145 GDBTK_CFLAGS=""
8146 if test "$GCC" = "yes"; then
8147 if test "$TCL_VERSION" != "8.0" ; then
8148 GDBTK_CFLAGS="-fwritable-strings"
8149 fi
8150 fi
8151
8152 # Include some libraries that Tcl and Tk want.
8153 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
8154 # Yes, the ordering seems wrong here. But it isn't.
8155 # TK_LIBS is the list of libraries that need to be linked
8156 # after Tcl/Tk. Note that this isn't put into LIBS. If it
8157 # were in LIBS then any link tests after this point would
8158 # try to include things like `$(LIBGUI)', which wouldn't work.
8159 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
8160
8161 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
8162 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
8163 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
8164 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 8165 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 8166 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
8167 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
8168 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
8169
8170 if test x$gdb_cv_os_cygwin = xyes; then
8171 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
8172 WIN32LDAPP="-Wl,--subsystem,console"
8173 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
8174 fi
8175 fi
8176 fi
8177fi
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
dd2504ab
JM
8191
8192
d1c3b63a 8193
c906108c
SS
8194# If we find X, set shell vars x_includes and x_libraries to the
8195# paths, otherwise set no_x=yes.
8196# Uses ac_ vars as temps to allow command line to override cache and checks.
8197# --without-x overrides everything else, but does not touch the cache.
8198echo $ac_n "checking for X""... $ac_c" 1>&6
a534e424 8199echo "configure:8200: checking for X" >&5
c906108c
SS
8200
8201# Check whether --with-x or --without-x was given.
8202if test "${with_x+set}" = set; then
8203 withval="$with_x"
8204 :
8205fi
8206
8207# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8208if test "x$with_x" = xno; then
8209 # The user explicitly disabled X.
8210 have_x=disabled
8211else
8212 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8213 # Both variables are already set.
8214 have_x=yes
8215 else
8216if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8217 echo $ac_n "(cached) $ac_c" 1>&6
8218else
8219 # One or both of the vars are not set, and there is no cached value.
8220ac_x_includes=NO ac_x_libraries=NO
8221rm -fr conftestdir
8222if mkdir conftestdir; then
8223 cd conftestdir
8224 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8225 cat > Imakefile <<'EOF'
8226acfindx:
8227 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8228EOF
8229 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8230 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8231 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8232 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8233 for ac_extension in a so sl; do
8234 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8235 test -f $ac_im_libdir/libX11.$ac_extension; then
8236 ac_im_usrlibdir=$ac_im_libdir; break
8237 fi
8238 done
8239 # Screen out bogus values from the imake configuration. They are
8240 # bogus both because they are the default anyway, and because
8241 # using them would break gcc on systems where it needs fixed includes.
8242 case "$ac_im_incroot" in
8243 /usr/include) ;;
8244 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8245 esac
8246 case "$ac_im_usrlibdir" in
8247 /usr/lib | /lib) ;;
8248 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8249 esac
8250 fi
8251 cd ..
8252 rm -fr conftestdir
8253fi
8254
8255if test "$ac_x_includes" = NO; then
8256 # Guess where to find include files, by looking for this one X11 .h file.
8257 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8258
8259 # First, try using that file with no special directory specified.
8260cat > conftest.$ac_ext <<EOF
a534e424 8261#line 8262 "configure"
c906108c
SS
8262#include "confdefs.h"
8263#include <$x_direct_test_include>
8264EOF
8265ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 8266{ (eval echo configure:8267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
8267ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8268if test -z "$ac_err"; then
8269 rm -rf conftest*
8270 # We can compile using X headers with no special include directory.
8271ac_x_includes=
8272else
8273 echo "$ac_err" >&5
8274 echo "configure: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 rm -rf conftest*
8277 # Look for the header file in a standard set of common directories.
8278# Check X11 before X11Rn because it is often a symlink to the current release.
8279 for ac_dir in \
8280 /usr/X11/include \
8281 /usr/X11R6/include \
8282 /usr/X11R5/include \
8283 /usr/X11R4/include \
8284 \
8285 /usr/include/X11 \
8286 /usr/include/X11R6 \
8287 /usr/include/X11R5 \
8288 /usr/include/X11R4 \
8289 \
8290 /usr/local/X11/include \
8291 /usr/local/X11R6/include \
8292 /usr/local/X11R5/include \
8293 /usr/local/X11R4/include \
8294 \
8295 /usr/local/include/X11 \
8296 /usr/local/include/X11R6 \
8297 /usr/local/include/X11R5 \
8298 /usr/local/include/X11R4 \
8299 \
8300 /usr/X386/include \
8301 /usr/x386/include \
8302 /usr/XFree86/include/X11 \
8303 \
8304 /usr/include \
8305 /usr/local/include \
8306 /usr/unsupported/include \
8307 /usr/athena/include \
8308 /usr/local/x11r5/include \
8309 /usr/lpp/Xamples/include \
8310 \
8311 /usr/openwin/include \
8312 /usr/openwin/share/include \
8313 ; \
8314 do
8315 if test -r "$ac_dir/$x_direct_test_include"; then
8316 ac_x_includes=$ac_dir
8317 break
8318 fi
8319 done
8320fi
8321rm -f conftest*
8322fi # $ac_x_includes = NO
8323
8324if test "$ac_x_libraries" = NO; then
8325 # Check for the libraries.
8326
8327 test -z "$x_direct_test_library" && x_direct_test_library=Xt
8328 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8329
8330 # See if we find them without any special options.
8331 # Don't add to $LIBS permanently.
8332 ac_save_LIBS="$LIBS"
8333 LIBS="-l$x_direct_test_library $LIBS"
8334cat > conftest.$ac_ext <<EOF
a534e424 8335#line 8336 "configure"
c906108c
SS
8336#include "confdefs.h"
8337
8338int main() {
8339${x_direct_test_function}()
8340; return 0; }
8341EOF
a534e424 8342if { (eval echo configure:8343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8343 rm -rf conftest*
8344 LIBS="$ac_save_LIBS"
8345# We can link X programs with no special library path.
8346ac_x_libraries=
8347else
8348 echo "configure: failed program was:" >&5
8349 cat conftest.$ac_ext >&5
8350 rm -rf conftest*
8351 LIBS="$ac_save_LIBS"
8352# First see if replacing the include by lib works.
8353# Check X11 before X11Rn because it is often a symlink to the current release.
8354for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8355 /usr/X11/lib \
8356 /usr/X11R6/lib \
8357 /usr/X11R5/lib \
8358 /usr/X11R4/lib \
8359 \
8360 /usr/lib/X11 \
8361 /usr/lib/X11R6 \
8362 /usr/lib/X11R5 \
8363 /usr/lib/X11R4 \
8364 \
8365 /usr/local/X11/lib \
8366 /usr/local/X11R6/lib \
8367 /usr/local/X11R5/lib \
8368 /usr/local/X11R4/lib \
8369 \
8370 /usr/local/lib/X11 \
8371 /usr/local/lib/X11R6 \
8372 /usr/local/lib/X11R5 \
8373 /usr/local/lib/X11R4 \
8374 \
8375 /usr/X386/lib \
8376 /usr/x386/lib \
8377 /usr/XFree86/lib/X11 \
8378 \
8379 /usr/lib \
8380 /usr/local/lib \
8381 /usr/unsupported/lib \
8382 /usr/athena/lib \
8383 /usr/local/x11r5/lib \
8384 /usr/lpp/Xamples/lib \
8385 /lib/usr/lib/X11 \
8386 \
8387 /usr/openwin/lib \
8388 /usr/openwin/share/lib \
8389 ; \
8390do
8391 for ac_extension in a so sl; do
8392 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8393 ac_x_libraries=$ac_dir
8394 break 2
8395 fi
8396 done
8397done
8398fi
8399rm -f conftest*
8400fi # $ac_x_libraries = NO
8401
8402if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8403 # Didn't find X anywhere. Cache the known absence of X.
8404 ac_cv_have_x="have_x=no"
8405else
8406 # Record where we found X for the cache.
8407 ac_cv_have_x="have_x=yes \
8408 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8409fi
8410fi
8411 fi
8412 eval "$ac_cv_have_x"
8413fi # $with_x != no
8414
8415if test "$have_x" != yes; then
8416 echo "$ac_t""$have_x" 1>&6
8417 no_x=yes
8418else
8419 # If each of the values was on the command line, it overrides each guess.
8420 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8421 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8422 # Update the cache value to reflect the command line values.
8423 ac_cv_have_x="have_x=yes \
8424 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8425 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8426fi
8427
8428
7a292a7a
SS
8429
8430# Unlike the sim directory, whether a simulator is linked is controlled by
8431# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
8432# This code just checks for a few cases where we'd like to ignore those
8433# definitions, even when they're present in the '.mt' file. These cases
8434# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 8435# not part of the source tree.
7a292a7a
SS
8436#
8437# Check whether --enable-sim or --disable-sim was given.
8438if test "${enable_sim+set}" = set; then
8439 enableval="$enable_sim"
8440 echo "enable_sim = $enable_sim";
8441 echo "enableval = ${enableval}";
8442 case "${enableval}" in
8443 yes) ignore_sim=false ;;
8444 no) ignore_sim=true ;;
8445 *) ignore_sim=false ;;
8446 esac
8447else
8448 ignore_sim=false
8449fi
8450
8451
8452if test ! -d "${srcdir}/../sim"; then
8453 ignore_sim=true
8454fi
8455
8456if test "${ignore_sim}" = "true"; then
8457 IGNORE_SIM="SIM="
8458 IGNORE_SIM_OBS="SIM_OBS="
8459else
8460 IGNORE_SIM=""
8461 IGNORE_SIM_OBS=""
8462 cat >> confdefs.h <<\EOF
8463#define WITH_SIM 1
8464EOF
8465
8466fi
8467
8468
8469
c906108c
SS
8470
8471
8472
8473
8474
8475
dfcd3bfb 8476
e56ac5c3
AC
8477
8478
b3a90332
AC
8479
8480
b46cd165 8481
c906108c
SS
8482# Begin stuff to support --enable-shared
8483# Check whether --enable-shared or --disable-shared was given.
8484if test "${enable_shared+set}" = set; then
8485 enableval="$enable_shared"
8486 case "${enableval}" in
8487 yes) shared=true ;;
8488 no) shared=false ;;
8489 *) shared=true ;;
8490esac
8491fi
8492
8493HLDFLAGS=
8494HLDENV=
8495# If we have shared libraries, try to set rpath reasonably.
8496if test "${shared}" = "true"; then
8497 case "${host}" in
8498 *-*-hpux*)
8499 HLDFLAGS='-Wl,+s,+b,$(libdir)'
8500 ;;
8501 *-*-irix5* | *-*-irix6*)
8502 HLDFLAGS='-Wl,-rpath,$(libdir)'
8503 ;;
8504 *-*-linux*aout*)
8505 ;;
88987551 8506 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
8507 HLDFLAGS='-Wl,-rpath,$(libdir)'
8508 ;;
8509 *-*-solaris*)
8510 HLDFLAGS='-R $(libdir)'
8511 ;;
8512 *-*-sysv4*)
8513 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;'
8514 ;;
8515 esac
8516fi
8517
8518# On SunOS, if the linker supports the -rpath option, use it to
8519# prevent ../bfd and ../opcodes from being included in the run time
8520# search path.
8521case "${host}" in
8522 *-*-sunos*)
8523 echo 'main () { }' > conftest.c
8524 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8525 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8526 :
8527 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8528 :
8529 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8530 :
8531 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8532 :
8533 elif test "${shared}" = "true"; then
8534 HLDFLAGS='-Wl,-rpath=$(libdir)'
8535 else
8536 HLDFLAGS='-Wl,-rpath='
8537 fi
8538 rm -f conftest.t conftest.c conftest
8539 ;;
8540esac
8541
8542
8543# End stuff to support --enable-shared
8544
8545# target_subdir is used by the testsuite to find the target libraries.
8546target_subdir=
8547if test "${host}" != "${target}"; then
8548 target_subdir="${target_alias}/"
8549fi
8550
8551
8552frags=
8553host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8554if test ! -f ${host_makefile_frag}; then
7fd60527
AC
8555 # When building a native debuger the .mh file containing things
8556 # like NATDEPFILES is needed. Cross debuggers don't need .mh
8557 # since it no longer contains anything useful.
8558 if test "${target}" = "${host}"; then
8559 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
8560 else
8561 host_makefile_frag=/dev/null
8562 fi
c906108c
SS
8563fi
8564frags="$frags $host_makefile_frag"
8565
8566target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8567if test ! -f ${target_makefile_frag}; then
8568{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8569fi
8570frags="$frags $target_makefile_frag"
8571
8572
8573
8574
8575
8576hostfile=`sed -n '
8577s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8578' ${host_makefile_frag}`
8579
8580targetfile=`sed -n '
8581s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8582' ${target_makefile_frag}`
8583
6166d547
AC
8584GDB_MULTI_ARCH=`sed -n '
8585s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
8586' ${target_makefile_frag}`
8587
c906108c 8588if test "${target}" = "${host}"; then
a85f51e7
DJ
8589# We pick this up from the host configuration file (.mh) because we
8590# do not have a native configuration Makefile fragment.
c906108c
SS
8591nativefile=`sed -n '
8592s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8593' ${host_makefile_frag}`
c906108c
SS
8594fi
8595
8596
6166d547
AC
8597# New targets should just set gdb_multi_arch=yes in configure.tgt.
8598# Old targets being converted can either do that or set GDB_MULTI_ARCH
8599# in the target specific makefile frag. Eventually gdb_multi_arch=yes
8600# will be the default.
8601if test x"${GDB_MULTI_ARCH}" = x ; then
8602 case "${gdb_multi_arch}" in
8603 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8604 no ) GDB_MULTI_ARCH=0 ;;
8605 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8606 esac
8607fi
8608if test x"${GDB_MULTI_ARCH}" != x ; then
8609 cat >> confdefs.h <<EOF
8610#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8611EOF
8612
8613fi
6c5cfe5b 8614# Warn the user when they use an old practice
6166d547
AC
8615case "${GDB_MULTI_ARCH}" in
8616 "" ) ;;
8617 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8618 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8619 GDB_MULTI_ARCH_PURE )
8620 if test x"${targetfile}" != x ; then
6c5cfe5b 8621 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 8622 targetfile=""
6166d547
AC
8623 fi ;;
8624 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8625esac
8626
96baa820
JM
8627SUBDIRS="doc testsuite nlm"
8628if test "${enable_multi_ice}" = "yes"; then
8629 SUBDIRS="${SUBDIRS} multi-ice"
8630fi
8631
a85f51e7
DJ
8632# ``gdbserver'' can only be built in a native configuration.
8633if test x"${target}" = x"${host}"; then
8634 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
a534e424 8635echo "configure:8636: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
8636 if test x"${build_gdbserver}" = xyes ; then
8637 configdirs="${configdirs} gdbserver"
8638 SUBDIRS="${SUBDIRS} gdbserver"
8639 echo "$ac_t""yes" 1>&6
8640 else
8641 echo "$ac_t""no" 1>&6
8642 fi
8643fi
8644
96baa820
JM
8645
8646
c906108c 8647# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
8648# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8649# version.
c906108c
SS
8650
8651files=
8652links=
5a2402b8 8653
c906108c 8654rm -f xm.h
5a2402b8 8655xm_h=""
c906108c 8656if test "${hostfile}" != ""; then
5a2402b8
AC
8657 xm_h=xm.h
8658 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8659 files="${files} ${GDB_XM_FILE}"
8660 links="${links} xm.h"
8661 cat >> confdefs.h <<EOF
8662#define GDB_XM_FILE ${GDB_XM_FILE}
8663EOF
8664
c906108c 8665fi
5a2402b8
AC
8666
8667
c906108c 8668rm -f tm.h
5a2402b8 8669tm_h=""
c906108c 8670if test "${targetfile}" != ""; then
5a2402b8
AC
8671 tm_h=tm.h
8672 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8673 files="${files} ${GDB_TM_FILE}"
8674 links="${links} tm.h"
8675 cat >> confdefs.h <<EOF
8676#define GDB_TM_FILE ${GDB_TM_FILE}
8677EOF
8678
c906108c 8679fi
5a2402b8
AC
8680
8681
c906108c 8682rm -f nm.h
5a2402b8 8683nm_h=""
c906108c 8684if test "${nativefile}" != ""; then
5a2402b8
AC
8685 nm_h=nm.h
8686 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8687 files="${files} ${GDB_NM_FILE}"
8688 links="${links} nm.h"
8689 cat >> confdefs.h <<EOF
8690#define GDB_NM_FILE ${GDB_NM_FILE}
8691EOF
8692
c906108c 8693fi
5a2402b8
AC
8694
8695
3fc11d3e 8696echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
a534e424 8697echo "configure:8698: checking whether ln -s works" >&5
3fc11d3e
JM
8698if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
8699 echo $ac_n "(cached) $ac_c" 1>&6
8700else
8701 rm -f conftestdata
8702if ln -s X conftestdata 2>/dev/null
8703then
8704 rm -f conftestdata
8705 ac_cv_prog_LN_S="ln -s"
8706else
8707 ac_cv_prog_LN_S=ln
8708fi
8709fi
8710LN_S="$ac_cv_prog_LN_S"
8711if test "$ac_cv_prog_LN_S" = "ln -s"; then
8712 echo "$ac_t""yes" 1>&6
8713else
8714 echo "$ac_t""no" 1>&6
8715fi
8716
c906108c
SS
8717
8718
8719
8720echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
a534e424 8721echo "configure:8722: checking for Cygwin environment" >&5
c906108c
SS
8722if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8723 echo $ac_n "(cached) $ac_c" 1>&6
8724else
8725 cat > conftest.$ac_ext <<EOF
a534e424 8726#line 8727 "configure"
c906108c
SS
8727#include "confdefs.h"
8728
8729int main() {
8730
8731#ifndef __CYGWIN__
8732#define __CYGWIN__ __CYGWIN32__
8733#endif
8734return __CYGWIN__;
8735; return 0; }
8736EOF
a534e424 8737if { (eval echo configure:8738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8738 rm -rf conftest*
8739 ac_cv_cygwin=yes
8740else
8741 echo "configure: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743 rm -rf conftest*
8744 ac_cv_cygwin=no
8745fi
8746rm -f conftest*
8747rm -f conftest*
8748fi
8749
8750echo "$ac_t""$ac_cv_cygwin" 1>&6
8751CYGWIN=
8752test "$ac_cv_cygwin" = yes && CYGWIN=yes
8753echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
a534e424 8754echo "configure:8755: checking for mingw32 environment" >&5
c906108c
SS
8755if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8756 echo $ac_n "(cached) $ac_c" 1>&6
8757else
8758 cat > conftest.$ac_ext <<EOF
a534e424 8759#line 8760 "configure"
c906108c
SS
8760#include "confdefs.h"
8761
8762int main() {
8763return __MINGW32__;
8764; return 0; }
8765EOF
a534e424 8766if { (eval echo configure:8767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8767 rm -rf conftest*
8768 ac_cv_mingw32=yes
8769else
8770 echo "configure: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8772 rm -rf conftest*
8773 ac_cv_mingw32=no
8774fi
8775rm -f conftest*
8776rm -f conftest*
8777fi
8778
8779echo "$ac_t""$ac_cv_mingw32" 1>&6
8780MINGW32=
8781test "$ac_cv_mingw32" = yes && MINGW32=yes
8782
8783
8784echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
a534e424 8785echo "configure:8786: checking for executable suffix" >&5
c906108c
SS
8786if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8787 echo $ac_n "(cached) $ac_c" 1>&6
8788else
8789 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8790 ac_cv_exeext=.exe
8791else
8792 rm -f conftest*
8793 echo 'int main () { return 0; }' > conftest.$ac_ext
8794 ac_cv_exeext=
a534e424 8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
8796 for file in conftest.*; do
8797 case $file in
a534e424 8798 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
8799 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8800 esac
8801 done
8802 else
8803 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8804 fi
8805 rm -f conftest*
8806 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8807fi
8808fi
8809
8810EXEEXT=""
8811test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8812echo "$ac_t""${ac_cv_exeext}" 1>&6
8813ac_exeext=$EXEEXT
8814
8815
8816subdirs="$configdirs"
8817
8818trap '' 1 2 15
8819cat > confcache <<\EOF
8820# This file is a shell script that caches the results of configure
8821# tests run on this system so they can be shared between configure
8822# scripts and configure runs. It is not useful on other systems.
8823# If it contains results you don't want to keep, you may remove or edit it.
8824#
8825# By default, configure uses ./config.cache as the cache file,
8826# creating it if it does not exist already. You can give configure
8827# the --cache-file=FILE option to use a different cache file; that is
8828# what configure does when it calls configure scripts in
8829# subdirectories, so they share the cache.
8830# Giving --cache-file=/dev/null disables caching, for debugging configure.
8831# config.status only pays attention to the cache file if you give it the
8832# --recheck option to rerun configure.
8833#
8834EOF
8835# The following way of writing the cache mishandles newlines in values,
8836# but we know of no workaround that is simple, portable, and efficient.
8837# So, don't put newlines in cache variables' values.
8838# Ultrix sh set writes to stderr and can't be redirected directly,
8839# and sets the high bit in the cache file unless we assign to the vars.
8840(set) 2>&1 |
8841 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8842 *ac_space=\ *)
8843 # `set' does not quote correctly, so add quotes (double-quote substitution
8844 # turns \\\\ into \\, and sed turns \\ into \).
8845 sed -n \
8846 -e "s/'/'\\\\''/g" \
8847 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8848 ;;
8849 *)
8850 # `set' quotes correctly as required by POSIX, so do not add quotes.
8851 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8852 ;;
8853 esac >> confcache
8854if cmp -s $cache_file confcache; then
8855 :
8856else
8857 if test -w $cache_file; then
8858 echo "updating cache $cache_file"
8859 cat confcache > $cache_file
8860 else
8861 echo "not updating unwritable cache $cache_file"
8862 fi
8863fi
8864rm -f confcache
8865
8866trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8867
8868test "x$prefix" = xNONE && prefix=$ac_default_prefix
8869# Let make expand exec_prefix.
8870test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8871
8872# Any assignment to VPATH causes Sun make to only execute
8873# the first set of double-colon rules, so remove it if not needed.
8874# If there is a colon in the path, we need to keep it.
8875if test "x$srcdir" = x.; then
8876 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8877fi
8878
8879trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8880
8881DEFS=-DHAVE_CONFIG_H
8882
8883# Without the "./", some shells look in PATH for config.status.
8884: ${CONFIG_STATUS=./config.status}
8885
8886echo creating $CONFIG_STATUS
8887rm -f $CONFIG_STATUS
8888cat > $CONFIG_STATUS <<EOF
8889#! /bin/sh
8890# Generated automatically by configure.
8891# Run this file to recreate the current configuration.
8892# This directory was configured as follows,
8893# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8894#
8895# $0 $ac_configure_args
8896#
8897# Compiler output produced by configure, useful for debugging
8898# configure, is in ./config.log if it exists.
8899
8900ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8901for ac_option
8902do
8903 case "\$ac_option" in
8904 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8905 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8906 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8907 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8908 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8909 exit 0 ;;
8910 -help | --help | --hel | --he | --h)
8911 echo "\$ac_cs_usage"; exit 0 ;;
8912 *) echo "\$ac_cs_usage"; exit 1 ;;
8913 esac
8914done
8915
8916ac_given_srcdir=$srcdir
8917ac_given_INSTALL="$INSTALL"
8918
ed952ac5 8919trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
8920EOF
8921cat >> $CONFIG_STATUS <<EOF
8922
8923# Protect against being on the right side of a sed subst in config.status.
8924sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8925 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8926$ac_vpsub
8927$extrasub
8928s%@SHELL@%$SHELL%g
8929s%@CFLAGS@%$CFLAGS%g
8930s%@CPPFLAGS@%$CPPFLAGS%g
8931s%@CXXFLAGS@%$CXXFLAGS%g
8932s%@FFLAGS@%$FFLAGS%g
8933s%@DEFS@%$DEFS%g
8934s%@LDFLAGS@%$LDFLAGS%g
8935s%@LIBS@%$LIBS%g
8936s%@exec_prefix@%$exec_prefix%g
8937s%@prefix@%$prefix%g
8938s%@program_transform_name@%$program_transform_name%g
8939s%@bindir@%$bindir%g
8940s%@sbindir@%$sbindir%g
8941s%@libexecdir@%$libexecdir%g
8942s%@datadir@%$datadir%g
8943s%@sysconfdir@%$sysconfdir%g
8944s%@sharedstatedir@%$sharedstatedir%g
8945s%@localstatedir@%$localstatedir%g
8946s%@libdir@%$libdir%g
8947s%@includedir@%$includedir%g
8948s%@oldincludedir@%$oldincludedir%g
8949s%@infodir@%$infodir%g
8950s%@mandir@%$mandir%g
413ccac7
AC
8951s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
8952s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
8953s%@MAINT@%$MAINT%g
c906108c
SS
8954s%@CC@%$CC%g
8955s%@CPP@%$CPP%g
8956s%@host@%$host%g
8957s%@host_alias@%$host_alias%g
8958s%@host_cpu@%$host_cpu%g
8959s%@host_vendor@%$host_vendor%g
8960s%@host_os@%$host_os%g
8961s%@target@%$target%g
8962s%@target_alias@%$target_alias%g
8963s%@target_cpu@%$target_cpu%g
8964s%@target_vendor@%$target_vendor%g
8965s%@target_os@%$target_os%g
8966s%@build@%$build%g
8967s%@build_alias@%$build_alias%g
8968s%@build_cpu@%$build_cpu%g
8969s%@build_vendor@%$build_vendor%g
8970s%@build_os@%$build_os%g
8971s%@SET_MAKE@%$SET_MAKE%g
8972s%@RANLIB@%$RANLIB%g
8973s%@ALLOCA@%$ALLOCA%g
8974s%@USE_NLS@%$USE_NLS%g
8975s%@MSGFMT@%$MSGFMT%g
8976s%@GMSGFMT@%$GMSGFMT%g
8977s%@XGETTEXT@%$XGETTEXT%g
8978s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8979s%@CATALOGS@%$CATALOGS%g
8980s%@CATOBJEXT@%$CATOBJEXT%g
8981s%@DATADIRNAME@%$DATADIRNAME%g
8982s%@GMOFILES@%$GMOFILES%g
8983s%@INSTOBJEXT@%$INSTOBJEXT%g
8984s%@INTLDEPS@%$INTLDEPS%g
8985s%@INTLLIBS@%$INTLLIBS%g
8986s%@INTLOBJS@%$INTLOBJS%g
8987s%@POFILES@%$POFILES%g
8988s%@POSUB@%$POSUB%g
8989s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8990s%@GT_NO@%$GT_NO%g
8991s%@GT_YES@%$GT_YES%g
8992s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8993s%@l@%$l%g
7a292a7a 8994s%@AWK@%$AWK%g
c906108c
SS
8995s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8996s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8997s%@INSTALL_DATA@%$INSTALL_DATA%g
8998s%@AR@%$AR%g
95ca63c4
CF
8999s%@DLLTOOL@%$DLLTOOL%g
9000s%@WINDRES@%$WINDRES%g
c906108c 9001s%@YACC@%$YACC%g
75c6e08a 9002s%@MIG@%$MIG%g
c906108c 9003s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
b4df4f68 9004s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
c906108c 9005s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 9006s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
9007s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
9008s%@MMALLOC@%$MMALLOC%g
88987551 9009s%@REGEX@%$REGEX%g
aff38e61 9010s%@SER_HARDWIRE@%$SER_HARDWIRE%g
c906108c 9011s%@TERM_LIB@%$TERM_LIB%g
cd0fc7c3 9012s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
9013s%@LIBGUI@%$LIBGUI%g
9014s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
9015s%@WIN32LDAPP@%$WIN32LDAPP%g
9016s%@TCL_VERSION@%$TCL_VERSION%g
9017s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
9018s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
9019s%@TCL_CC@%$TCL_CC%g
9020s%@TCL_DEFS@%$TCL_DEFS%g
9021s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
9022s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
9023s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
9024s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
9025s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
9026s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
9027s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
9028s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
9029s%@TCL_RANLIB@%$TCL_RANLIB%g
9030s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
9031s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
9032s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
9033s%@TK_VERSION@%$TK_VERSION%g
9034s%@TK_DEFS@%$TK_DEFS%g
9035s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
9036s%@TK_XINCLUDES@%$TK_XINCLUDES%g
9037s%@TK_XLIBSW@%$TK_XLIBSW%g
9038s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
9039s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
9040s%@TCLHDIR@%$TCLHDIR%g
9041s%@TKHDIR@%$TKHDIR%g
9042s%@ITCLHDIR@%$ITCLHDIR%g
9043s%@ITKHDIR@%$ITKHDIR%g
9044s%@TIXHDIR@%$TIXHDIR%g
9045s%@ITCL_VERSION@%$ITCL_VERSION%g
9046s%@ITCL_DEFS@%$ITCL_DEFS%g
9047s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
9048s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
9049s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
9050s%@ITK_VERSION@%$ITK_VERSION%g
9051s%@ITK_DEFS@%$ITK_DEFS%g
9052s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
9053s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
9054s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
9055s%@TIX_VERSION@%$TIX_VERSION%g
9056s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
7a292a7a
SS
9057s%@X_CFLAGS@%$X_CFLAGS%g
9058s%@X_LDFLAGS@%$X_LDFLAGS%g
9059s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
9060s%@TCL_DEPS@%$TCL_DEPS%g
9061s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
9062s%@ITCLLIB@%$ITCLLIB%g
9063s%@ITCL_DEPS@%$ITCL_DEPS%g
9064s%@ITKLIB@%$ITKLIB%g
9065s%@ITK_DEPS@%$ITK_DEPS%g
9066s%@TIXLIB@%$TIXLIB%g
9067s%@TIX_DEPS@%$TIX_DEPS%g
9068s%@GDBTKLIBS@%$GDBTKLIBS%g
9069s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 9070s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
9071s%@IGNORE_SIM@%$IGNORE_SIM%g
9072s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
9073s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
9074s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 9075s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
9076s%@CONFIG_DEPS@%$CONFIG_DEPS%g
9077s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 9078s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
9079s%@CONFIG_ALL@%$CONFIG_ALL%g
9080s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
9081s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
9082s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
9083s%@HLDFLAGS@%$HLDFLAGS%g
9084s%@HLDENV@%$HLDENV%g
9085s%@target_subdir@%$target_subdir%g
9086/@host_makefile_frag@/r $host_makefile_frag
9087s%@host_makefile_frag@%%g
9088/@target_makefile_frag@/r $target_makefile_frag
9089s%@target_makefile_frag@%%g
9090s%@frags@%$frags%g
96baa820 9091s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
9092s%@xm_h@%$xm_h%g
9093s%@tm_h@%$tm_h%g
9094s%@nm_h@%$nm_h%g
7a292a7a 9095s%@LN_S@%$LN_S%g
c906108c
SS
9096s%@EXEEXT@%$EXEEXT%g
9097s%@subdirs@%$subdirs%g
9098
9099CEOF
9100EOF
9101
9102cat >> $CONFIG_STATUS <<\EOF
9103
9104# Split the substitutions into bite-sized pieces for seds with
9105# small command number limits, like on Digital OSF/1 and HP-UX.
4536bbc6 9106ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
9107ac_file=1 # Number of current file.
9108ac_beg=1 # First line for current file.
9109ac_end=$ac_max_sed_cmds # Line after last line for current file.
9110ac_more_lines=:
9111ac_sed_cmds=""
9112while $ac_more_lines; do
9113 if test $ac_beg -gt 1; then
9114 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9115 else
9116 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9117 fi
9118 if test ! -s conftest.s$ac_file; then
9119 ac_more_lines=false
9120 rm -f conftest.s$ac_file
9121 else
9122 if test -z "$ac_sed_cmds"; then
9123 ac_sed_cmds="sed -f conftest.s$ac_file"
9124 else
9125 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9126 fi
9127 ac_file=`expr $ac_file + 1`
9128 ac_beg=$ac_end
9129 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9130 fi
9131done
9132if test -z "$ac_sed_cmds"; then
9133 ac_sed_cmds=cat
9134fi
9135EOF
9136
9137cat >> $CONFIG_STATUS <<EOF
9138
ed952ac5 9139CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
9140EOF
9141cat >> $CONFIG_STATUS <<\EOF
9142for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9143 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9144 case "$ac_file" in
9145 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9146 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9147 *) ac_file_in="${ac_file}.in" ;;
9148 esac
9149
9150 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9151
9152 # Remove last slash and all that follows it. Not all systems have dirname.
9153 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9154 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9155 # The file is in a subdirectory.
9156 test ! -d "$ac_dir" && mkdir "$ac_dir"
9157 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9158 # A "../" for each directory in $ac_dir_suffix.
9159 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9160 else
9161 ac_dir_suffix= ac_dots=
9162 fi
9163
9164 case "$ac_given_srcdir" in
9165 .) srcdir=.
9166 if test -z "$ac_dots"; then top_srcdir=.
9167 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9168 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9169 *) # Relative path.
9170 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9171 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9172 esac
9173
9174 case "$ac_given_INSTALL" in
9175 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9176 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9177 esac
9178
9179 echo creating "$ac_file"
9180 rm -f "$ac_file"
9181 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9182 case "$ac_file" in
9183 *Makefile*) ac_comsub="1i\\
9184# $configure_input" ;;
9185 *) ac_comsub= ;;
9186 esac
9187
9188 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9189 sed -e "$ac_comsub
9190s%@configure_input@%$configure_input%g
9191s%@srcdir@%$srcdir%g
9192s%@top_srcdir@%$top_srcdir%g
9193s%@INSTALL@%$INSTALL%g
9194" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9195fi; done
9196rm -f conftest.s*
9197
9198# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9199# NAME is the cpp macro being defined and VALUE is the value it is being given.
9200#
9201# ac_d sets the value in "#define NAME VALUE" lines.
9202ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9203ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9204ac_dC='\3'
9205ac_dD='%g'
9206# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9207ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9208ac_uB='\([ ]\)%\1#\2define\3'
9209ac_uC=' '
9210ac_uD='\4%g'
9211# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9212ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9213ac_eB='$%\1#\2define\3'
9214ac_eC=' '
9215ac_eD='%g'
9216
9217if test "${CONFIG_HEADERS+set}" != set; then
9218EOF
9219cat >> $CONFIG_STATUS <<EOF
9220 CONFIG_HEADERS="config.h:config.in"
9221EOF
9222cat >> $CONFIG_STATUS <<\EOF
9223fi
9224for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9225 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9226 case "$ac_file" in
9227 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9228 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9229 *) ac_file_in="${ac_file}.in" ;;
9230 esac
9231
9232 echo creating $ac_file
9233
9234 rm -f conftest.frag conftest.in conftest.out
9235 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9236 cat $ac_file_inputs > conftest.in
9237
9238EOF
9239
9240# Transform confdefs.h into a sed script conftest.vals that substitutes
9241# the proper values into config.h.in to produce config.h. And first:
9242# Protect against being on the right side of a sed subst in config.status.
9243# Protect against being in an unquoted here document in config.status.
9244rm -f conftest.vals
9245cat > conftest.hdr <<\EOF
9246s/[\\&%]/\\&/g
9247s%[\\$`]%\\&%g
9248s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9249s%ac_d%ac_u%gp
9250s%ac_u%ac_e%gp
9251EOF
9252sed -n -f conftest.hdr confdefs.h > conftest.vals
9253rm -f conftest.hdr
9254
9255# This sed command replaces #undef with comments. This is necessary, for
9256# example, in the case of _POSIX_SOURCE, which is predefined and required
9257# on some systems where configure will not decide to define it.
9258cat >> conftest.vals <<\EOF
9259s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9260EOF
9261
9262# Break up conftest.vals because some shells have a limit on
9263# the size of here documents, and old seds have small limits too.
9264
9265rm -f conftest.tail
9266while :
9267do
9268 ac_lines=`grep -c . conftest.vals`
9269 # grep -c gives empty output for an empty file on some AIX systems.
9270 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9271 # Write a limited-size here document to conftest.frag.
9272 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9273 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9274 echo 'CEOF
9275 sed -f conftest.frag conftest.in > conftest.out
9276 rm -f conftest.in
9277 mv conftest.out conftest.in
9278' >> $CONFIG_STATUS
9279 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9280 rm -f conftest.vals
9281 mv conftest.tail conftest.vals
9282done
9283rm -f conftest.vals
9284
9285cat >> $CONFIG_STATUS <<\EOF
9286 rm -f conftest.frag conftest.h
9287 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9288 cat conftest.in >> conftest.h
9289 rm -f conftest.in
9290 if cmp -s $ac_file conftest.h 2>/dev/null; then
9291 echo "$ac_file is unchanged"
9292 rm -f conftest.h
9293 else
9294 # Remove last slash and all that follows it. Not all systems have dirname.
9295 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9296 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9297 # The file is in a subdirectory.
9298 test ! -d "$ac_dir" && mkdir "$ac_dir"
9299 fi
9300 rm -f $ac_file
9301 mv conftest.h $ac_file
9302 fi
9303fi; done
9304
9305EOF
9306
9307cat >> $CONFIG_STATUS <<EOF
9308ac_sources="$files"
9309ac_dests="$links"
9310EOF
9311
9312cat >> $CONFIG_STATUS <<\EOF
9313srcdir=$ac_given_srcdir
9314while test -n "$ac_sources"; do
9315 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9316 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9317
9318 echo "linking $srcdir/$ac_source to $ac_dest"
9319
9320 if test ! -r $srcdir/$ac_source; then
9321 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9322 fi
9323 rm -f $ac_dest
9324
9325 # Make relative symlinks.
9326 # Remove last slash and all that follows it. Not all systems have dirname.
9327 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9328 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9329 # The dest file is in a subdirectory.
9330 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9331 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9332 # A "../" for each directory in $ac_dest_dir_suffix.
9333 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9334 else
9335 ac_dest_dir_suffix= ac_dots=
9336 fi
9337
9338 case "$srcdir" in
9339 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9340 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9341 esac
9342
9343 # Make a symlink if possible; otherwise try a hard link.
9344 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9345 ln $srcdir/$ac_source $ac_dest; then :
9346 else
9347 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9348 fi
9349done
9350EOF
9351cat >> $CONFIG_STATUS <<EOF
9352
9353gdb_host_cpu=$gdb_host_cpu
9354gdb_target_cpu=$gdb_target_cpu
9355nativefile=$nativefile
9356
9357EOF
9358cat >> $CONFIG_STATUS <<\EOF
9359
9360if test "${nativefile}" = ""; then
c4620205 9361 < Makefile \
e27da16d
JT
9362 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
9363 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
9364 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
9365 > Makefile.tem
c906108c
SS
9366mv -f Makefile.tem Makefile
9367fi
9368
9369sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
9370/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
9371/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9372mv -f Makefile.tmp Makefile
9373
2acceee2 9374
c906108c
SS
9375case x$CONFIG_HEADERS in
9376xconfig.h:config.in)
9377echo > stamp-h ;;
9378esac
9379
9380exit 0
9381EOF
9382chmod +x $CONFIG_STATUS
9383rm -fr confdefs* $ac_clean_files
9384test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9385
9386if test "$no_recursion" != yes; then
9387
9388 # Remove --cache-file and --srcdir arguments so they do not pile up.
9389 ac_sub_configure_args=
9390 ac_prev=
9391 for ac_arg in $ac_configure_args; do
9392 if test -n "$ac_prev"; then
9393 ac_prev=
9394 continue
9395 fi
9396 case "$ac_arg" in
9397 -cache-file | --cache-file | --cache-fil | --cache-fi \
9398 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9399 ac_prev=cache_file ;;
9400 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9401 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9402 ;;
9403 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9404 ac_prev=srcdir ;;
9405 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9406 ;;
9407 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9408 esac
9409 done
9410
9411 for ac_config_dir in $configdirs; do
9412
9413 # Do not complain, so a configure script can configure whichever
9414 # parts of a large source tree are present.
9415 if test ! -d $srcdir/$ac_config_dir; then
9416 continue
9417 fi
9418
9419 echo configuring in $ac_config_dir
9420
9421 case "$srcdir" in
9422 .) ;;
9423 *)
9424 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9425 else
9426 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9427 fi
9428 ;;
9429 esac
9430
9431 ac_popdir=`pwd`
9432 cd $ac_config_dir
9433
9434 # A "../" for each directory in /$ac_config_dir.
9435 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9436
9437 case "$srcdir" in
9438 .) # No --srcdir option. We are building in place.
9439 ac_sub_srcdir=$srcdir ;;
9440 /*) # Absolute path.
9441 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9442 *) # Relative path.
9443 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9444 esac
9445
9446 # Check for guested configure; otherwise get Cygnus style configure.
9447 if test -f $ac_sub_srcdir/configure; then
9448 ac_sub_configure=$ac_sub_srcdir/configure
9449 elif test -f $ac_sub_srcdir/configure.in; then
9450 ac_sub_configure=$ac_configure
9451 else
9452 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9453 ac_sub_configure=
9454 fi
9455
9456 # The recursion is here.
9457 if test -n "$ac_sub_configure"; then
9458
9459 # Make the cache file name correct relative to the subdirectory.
9460 case "$cache_file" in
9461 /*) ac_sub_cache_file=$cache_file ;;
9462 *) # Relative path.
9463 ac_sub_cache_file="$ac_dots$cache_file" ;;
9464 esac
9465 case "$ac_given_INSTALL" in
9466 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9467 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9468 esac
9469
9470 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9471 # The eval makes quoting arguments work.
9472 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9473 then :
9474 else
9475 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9476 fi
9477 fi
9478
9479 cd $ac_popdir
9480 done
9481fi
9482
9483
9484exit 0