2004-10-30 Andrew Cagney <cagney@gnu.org>
[deliverable/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"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
7a292a7a
SS
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)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
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=
d15be926 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
d15be926 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
d15be926
MK
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.
d15be926
MK
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
d15be926
MK
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
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 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
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d15be926 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d15be926 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d15be926 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d15be926 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d15be926 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d15be926 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d15be926 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d15be926 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d15be926 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d15be926 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d15be926 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d15be926 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d15be926 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
ddc9cd0f
AC
1234
1235CONFIG_OBS=
1236CONFIG_DEPS=
1237CONFIG_SRCS=
1238ENABLE_CFLAGS=
1239
1240CONFIG_ALL=
1241CONFIG_CLEAN=
1242CONFIG_INSTALL=
1243CONFIG_UNINSTALL=
1244
1245
c906108c 1246echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
ddc9cd0f 1247echo "configure:1248: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1248set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1249if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 cat > conftestmake <<\EOF
1253all:
1254 @echo 'ac_maketemp="${MAKE}"'
1255EOF
1256# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1257eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1258if test -n "$ac_maketemp"; then
1259 eval ac_cv_prog_make_${ac_make}_set=yes
1260else
1261 eval ac_cv_prog_make_${ac_make}_set=no
1262fi
1263rm -f conftestmake
1264fi
1265if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1266 echo "$ac_t""yes" 1>&6
1267 SET_MAKE=
1268else
1269 echo "$ac_t""no" 1>&6
1270 SET_MAKE="MAKE=${MAKE-make}"
1271fi
1272
1273# Extract the first word of "ranlib", so it can be a program name with args.
1274set dummy ranlib; ac_word=$2
1275echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 1276echo "configure:1277: checking for $ac_word" >&5
c906108c
SS
1277if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279else
1280 if test -n "$RANLIB"; then
1281 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1282else
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286 test -z "$ac_dir" && ac_dir=.
1287 if test -f $ac_dir/$ac_word; then
1288 ac_cv_prog_RANLIB="ranlib"
1289 break
1290 fi
1291 done
1292 IFS="$ac_save_ifs"
1293 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1294fi
1295fi
1296RANLIB="$ac_cv_prog_RANLIB"
1297if test -n "$RANLIB"; then
1298 echo "$ac_t""$RANLIB" 1>&6
1299else
1300 echo "$ac_t""no" 1>&6
1301fi
1302
1303echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
ddc9cd0f 1304echo "configure:1305: checking for ANSI C header files" >&5
c906108c
SS
1305if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1307else
1308 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1309#line 1310 "configure"
c906108c
SS
1310#include "confdefs.h"
1311#include <stdlib.h>
1312#include <stdarg.h>
1313#include <string.h>
1314#include <float.h>
1315EOF
1316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 1317{ (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319if test -z "$ac_err"; then
1320 rm -rf conftest*
1321 ac_cv_header_stdc=yes
1322else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 ac_cv_header_stdc=no
1328fi
1329rm -f conftest*
1330
1331if test $ac_cv_header_stdc = yes; then
1332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1333cat > conftest.$ac_ext <<EOF
ddc9cd0f 1334#line 1335 "configure"
c906108c
SS
1335#include "confdefs.h"
1336#include <string.h>
1337EOF
1338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "memchr" >/dev/null 2>&1; then
1340 :
1341else
1342 rm -rf conftest*
1343 ac_cv_header_stdc=no
1344fi
1345rm -f conftest*
1346
1347fi
1348
1349if test $ac_cv_header_stdc = yes; then
1350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1351cat > conftest.$ac_ext <<EOF
ddc9cd0f 1352#line 1353 "configure"
c906108c
SS
1353#include "confdefs.h"
1354#include <stdlib.h>
1355EOF
1356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357 egrep "free" >/dev/null 2>&1; then
1358 :
1359else
1360 rm -rf conftest*
1361 ac_cv_header_stdc=no
1362fi
1363rm -f conftest*
1364
1365fi
1366
1367if test $ac_cv_header_stdc = yes; then
1368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1369if test "$cross_compiling" = yes; then
1370 :
1371else
1372 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1373#line 1374 "configure"
c906108c
SS
1374#include "confdefs.h"
1375#include <ctype.h>
1376#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1377#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1378#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1379int main () { int i; for (i = 0; i < 256; i++)
1380if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1381exit (0); }
1382
1383EOF
ddc9cd0f 1384if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1385then
1386 :
1387else
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1390 rm -fr conftest*
1391 ac_cv_header_stdc=no
1392fi
1393rm -fr conftest*
1394fi
1395
1396fi
1397fi
1398
1399echo "$ac_t""$ac_cv_header_stdc" 1>&6
1400if test $ac_cv_header_stdc = yes; then
1401 cat >> confdefs.h <<\EOF
1402#define STDC_HEADERS 1
1403EOF
1404
1405fi
1406
1407echo $ac_n "checking for working const""... $ac_c" 1>&6
ddc9cd0f 1408echo "configure:1409: checking for working const" >&5
c906108c
SS
1409if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1413#line 1414 "configure"
c906108c
SS
1414#include "confdefs.h"
1415
1416int main() {
1417
1418/* Ultrix mips cc rejects this. */
1419typedef int charset[2]; const charset x;
1420/* SunOS 4.1.1 cc rejects this. */
1421char const *const *ccp;
1422char **p;
1423/* NEC SVR4.0.2 mips cc rejects this. */
1424struct point {int x, y;};
1425static struct point const zero = {0,0};
1426/* AIX XL C 1.02.0.0 rejects this.
1427 It does not let you subtract one const X* pointer from another in an arm
1428 of an if-expression whose if-part is not a constant expression */
1429const char *g = "string";
1430ccp = &g + (g ? g-g : 0);
1431/* HPUX 7.0 cc rejects these. */
1432++ccp;
1433p = (char**) ccp;
1434ccp = (char const *const *) p;
1435{ /* SCO 3.2v4 cc rejects this. */
1436 char *t;
1437 char const *s = 0 ? (char *) 0 : (char const *) 0;
1438
1439 *t++ = 0;
1440}
1441{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1442 int x[] = {25, 17};
1443 const int *foo = &x[0];
1444 ++foo;
1445}
1446{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1447 typedef const int *iptr;
1448 iptr p = 0;
1449 ++p;
1450}
1451{ /* AIX XL C 1.02.0.0 rejects this saying
1452 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1453 struct s { int j; const int *ap[3]; };
1454 struct s *b; b->j = 5;
1455}
1456{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1457 const int foo = 10;
1458}
1459
1460; return 0; }
1461EOF
ddc9cd0f 1462if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1463 rm -rf conftest*
1464 ac_cv_c_const=yes
1465else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 ac_cv_c_const=no
1470fi
1471rm -f conftest*
1472fi
1473
1474echo "$ac_t""$ac_cv_c_const" 1>&6
1475if test $ac_cv_c_const = no; then
1476 cat >> confdefs.h <<\EOF
1477#define const
1478EOF
1479
1480fi
1481
1482echo $ac_n "checking for inline""... $ac_c" 1>&6
ddc9cd0f 1483echo "configure:1484: checking for inline" >&5
c906108c
SS
1484if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486else
1487 ac_cv_c_inline=no
1488for ac_kw in inline __inline__ __inline; do
1489 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1490#line 1491 "configure"
c906108c
SS
1491#include "confdefs.h"
1492
1493int main() {
1494} $ac_kw foo() {
1495; return 0; }
1496EOF
ddc9cd0f 1497if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1498 rm -rf conftest*
1499 ac_cv_c_inline=$ac_kw; break
1500else
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1503fi
1504rm -f conftest*
1505done
1506
1507fi
1508
1509echo "$ac_t""$ac_cv_c_inline" 1>&6
1510case "$ac_cv_c_inline" in
1511 inline | yes) ;;
1512 no) cat >> confdefs.h <<\EOF
1513#define inline
1514EOF
1515 ;;
1516 *) cat >> confdefs.h <<EOF
1517#define inline $ac_cv_c_inline
1518EOF
1519 ;;
1520esac
1521
1522echo $ac_n "checking for off_t""... $ac_c" 1>&6
ddc9cd0f 1523echo "configure:1524: checking for off_t" >&5
c906108c
SS
1524if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526else
1527 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1528#line 1529 "configure"
c906108c
SS
1529#include "confdefs.h"
1530#include <sys/types.h>
1531#if STDC_HEADERS
1532#include <stdlib.h>
1533#include <stddef.h>
1534#endif
1535EOF
1536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1537 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1538 rm -rf conftest*
1539 ac_cv_type_off_t=yes
1540else
1541 rm -rf conftest*
1542 ac_cv_type_off_t=no
1543fi
1544rm -f conftest*
1545
1546fi
1547echo "$ac_t""$ac_cv_type_off_t" 1>&6
1548if test $ac_cv_type_off_t = no; then
1549 cat >> confdefs.h <<\EOF
1550#define off_t long
1551EOF
1552
1553fi
1554
1555echo $ac_n "checking for size_t""... $ac_c" 1>&6
ddc9cd0f 1556echo "configure:1557: checking for size_t" >&5
c906108c
SS
1557if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559else
1560 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1561#line 1562 "configure"
c906108c
SS
1562#include "confdefs.h"
1563#include <sys/types.h>
1564#if STDC_HEADERS
1565#include <stdlib.h>
1566#include <stddef.h>
1567#endif
1568EOF
1569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1571 rm -rf conftest*
1572 ac_cv_type_size_t=yes
1573else
1574 rm -rf conftest*
1575 ac_cv_type_size_t=no
1576fi
1577rm -f conftest*
1578
1579fi
1580echo "$ac_t""$ac_cv_type_size_t" 1>&6
1581if test $ac_cv_type_size_t = no; then
1582 cat >> confdefs.h <<\EOF
1583#define size_t unsigned
1584EOF
1585
1586fi
1587
1588# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1589# for constant arguments. Useless!
1590echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
ddc9cd0f 1591echo "configure:1592: checking for working alloca.h" >&5
c906108c
SS
1592if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1596#line 1597 "configure"
c906108c
SS
1597#include "confdefs.h"
1598#include <alloca.h>
1599int main() {
1600char *p = alloca(2 * sizeof(int));
1601; return 0; }
1602EOF
ddc9cd0f 1603if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1604 rm -rf conftest*
1605 ac_cv_header_alloca_h=yes
1606else
1607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1609 rm -rf conftest*
1610 ac_cv_header_alloca_h=no
1611fi
1612rm -f conftest*
1613fi
1614
1615echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1616if test $ac_cv_header_alloca_h = yes; then
1617 cat >> confdefs.h <<\EOF
1618#define HAVE_ALLOCA_H 1
1619EOF
1620
1621fi
1622
1623echo $ac_n "checking for alloca""... $ac_c" 1>&6
ddc9cd0f 1624echo "configure:1625: checking for alloca" >&5
c906108c
SS
1625if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627else
1628 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1629#line 1630 "configure"
c906108c
SS
1630#include "confdefs.h"
1631
1632#ifdef __GNUC__
1633# define alloca __builtin_alloca
1634#else
1635# ifdef _MSC_VER
1636# include <malloc.h>
1637# define alloca _alloca
1638# else
1639# if HAVE_ALLOCA_H
1640# include <alloca.h>
1641# else
1642# ifdef _AIX
1643 #pragma alloca
1644# else
1645# ifndef alloca /* predefined by HP cc +Olibcalls */
1646char *alloca ();
1647# endif
1648# endif
1649# endif
1650# endif
1651#endif
1652
1653int main() {
1654char *p = (char *) alloca(1);
1655; return 0; }
1656EOF
ddc9cd0f 1657if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1658 rm -rf conftest*
1659 ac_cv_func_alloca_works=yes
1660else
1661 echo "configure: failed program was:" >&5
1662 cat conftest.$ac_ext >&5
1663 rm -rf conftest*
1664 ac_cv_func_alloca_works=no
1665fi
1666rm -f conftest*
1667fi
1668
1669echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1670if test $ac_cv_func_alloca_works = yes; then
1671 cat >> confdefs.h <<\EOF
1672#define HAVE_ALLOCA 1
1673EOF
1674
1675fi
1676
1677if test $ac_cv_func_alloca_works = no; then
1678 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1679 # that cause trouble. Some versions do not even contain alloca or
1680 # contain a buggy version. If you still want to use their alloca,
1681 # use ar to extract alloca.o from them instead of compiling alloca.c.
1682 ALLOCA=alloca.${ac_objext}
1683 cat >> confdefs.h <<\EOF
1684#define C_ALLOCA 1
1685EOF
1686
1687
1688echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
ddc9cd0f 1689echo "configure:1690: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1690if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1691 echo $ac_n "(cached) $ac_c" 1>&6
1692else
1693 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1694#line 1695 "configure"
c906108c
SS
1695#include "confdefs.h"
1696#if defined(CRAY) && ! defined(CRAY2)
1697webecray
1698#else
1699wenotbecray
1700#endif
1701
1702EOF
1703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1704 egrep "webecray" >/dev/null 2>&1; then
1705 rm -rf conftest*
1706 ac_cv_os_cray=yes
1707else
1708 rm -rf conftest*
1709 ac_cv_os_cray=no
1710fi
1711rm -f conftest*
1712
1713fi
1714
1715echo "$ac_t""$ac_cv_os_cray" 1>&6
1716if test $ac_cv_os_cray = yes; then
1717for ac_func in _getb67 GETB67 getb67; do
1718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 1719echo "configure:1720: checking for $ac_func" >&5
c906108c
SS
1720if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722else
1723 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1724#line 1725 "configure"
c906108c
SS
1725#include "confdefs.h"
1726/* System header to define __stub macros and hopefully few prototypes,
1727 which can conflict with char $ac_func(); below. */
1728#include <assert.h>
1729/* Override any gcc2 internal prototype to avoid an error. */
1730/* We use char because int might match the return type of a gcc2
1731 builtin and then its argument prototype would still apply. */
1732char $ac_func();
1733
1734int main() {
1735
1736/* The GNU C library defines this for functions which it implements
1737 to always fail with ENOSYS. Some functions are actually named
1738 something starting with __ and the normal name is an alias. */
1739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1740choke me
1741#else
1742$ac_func();
1743#endif
1744
1745; return 0; }
1746EOF
ddc9cd0f 1747if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1748 rm -rf conftest*
1749 eval "ac_cv_func_$ac_func=yes"
1750else
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 rm -rf conftest*
1754 eval "ac_cv_func_$ac_func=no"
1755fi
1756rm -f conftest*
1757fi
1758
1759if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1760 echo "$ac_t""yes" 1>&6
1761 cat >> confdefs.h <<EOF
1762#define CRAY_STACKSEG_END $ac_func
1763EOF
1764
1765 break
1766else
1767 echo "$ac_t""no" 1>&6
1768fi
1769
1770done
1771fi
1772
1773echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
ddc9cd0f 1774echo "configure:1775: checking stack direction for C alloca" >&5
c906108c
SS
1775if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777else
1778 if test "$cross_compiling" = yes; then
1779 ac_cv_c_stack_direction=0
1780else
1781 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1782#line 1783 "configure"
c906108c
SS
1783#include "confdefs.h"
1784find_stack_direction ()
1785{
1786 static char *addr = 0;
1787 auto char dummy;
1788 if (addr == 0)
1789 {
1790 addr = &dummy;
1791 return find_stack_direction ();
1792 }
1793 else
1794 return (&dummy > addr) ? 1 : -1;
1795}
1796main ()
1797{
1798 exit (find_stack_direction() < 0);
1799}
1800EOF
ddc9cd0f 1801if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1802then
1803 ac_cv_c_stack_direction=1
1804else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -fr conftest*
1808 ac_cv_c_stack_direction=-1
1809fi
1810rm -fr conftest*
1811fi
1812
1813fi
1814
1815echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1816cat >> confdefs.h <<EOF
1817#define STACK_DIRECTION $ac_cv_c_stack_direction
1818EOF
1819
1820fi
1821
d836ee13 1822for ac_hdr in unistd.h
c906108c
SS
1823do
1824ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1825echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 1826echo "configure:1827: checking for $ac_hdr" >&5
c906108c
SS
1827if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1828 echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1831#line 1832 "configure"
c906108c
SS
1832#include "confdefs.h"
1833#include <$ac_hdr>
1834EOF
1835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 1836{ (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1837ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1838if test -z "$ac_err"; then
1839 rm -rf conftest*
1840 eval "ac_cv_header_$ac_safe=yes"
1841else
1842 echo "$ac_err" >&5
1843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 rm -rf conftest*
1846 eval "ac_cv_header_$ac_safe=no"
1847fi
1848rm -f conftest*
1849fi
1850if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1851 echo "$ac_t""yes" 1>&6
1852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1853 cat >> confdefs.h <<EOF
1854#define $ac_tr_hdr 1
1855EOF
1856
1857else
1858 echo "$ac_t""no" 1>&6
1859fi
1860done
1861
1862for ac_func in getpagesize
1863do
1864echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 1865echo "configure:1866: checking for $ac_func" >&5
c906108c
SS
1866if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868else
1869 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1870#line 1871 "configure"
c906108c
SS
1871#include "confdefs.h"
1872/* System header to define __stub macros and hopefully few prototypes,
1873 which can conflict with char $ac_func(); below. */
1874#include <assert.h>
1875/* Override any gcc2 internal prototype to avoid an error. */
1876/* We use char because int might match the return type of a gcc2
1877 builtin and then its argument prototype would still apply. */
1878char $ac_func();
1879
1880int main() {
1881
1882/* The GNU C library defines this for functions which it implements
1883 to always fail with ENOSYS. Some functions are actually named
1884 something starting with __ and the normal name is an alias. */
1885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886choke me
1887#else
1888$ac_func();
1889#endif
1890
1891; return 0; }
1892EOF
ddc9cd0f 1893if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=yes"
1896else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_func_$ac_func=no"
1901fi
1902rm -f conftest*
1903fi
1904
1905if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906 echo "$ac_t""yes" 1>&6
1907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908 cat >> confdefs.h <<EOF
1909#define $ac_tr_func 1
1910EOF
1911
1912else
1913 echo "$ac_t""no" 1>&6
1914fi
1915done
1916
1917echo $ac_n "checking for working mmap""... $ac_c" 1>&6
ddc9cd0f 1918echo "configure:1919: checking for working mmap" >&5
c906108c
SS
1919if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921else
1922 if test "$cross_compiling" = yes; then
1923 ac_cv_func_mmap_fixed_mapped=no
1924else
1925 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1926#line 1927 "configure"
c906108c
SS
1927#include "confdefs.h"
1928
1929/* Thanks to Mike Haertel and Jim Avera for this test.
1930 Here is a matrix of mmap possibilities:
1931 mmap private not fixed
1932 mmap private fixed at somewhere currently unmapped
1933 mmap private fixed at somewhere already mapped
1934 mmap shared not fixed
1935 mmap shared fixed at somewhere currently unmapped
1936 mmap shared fixed at somewhere already mapped
1937 For private mappings, we should verify that changes cannot be read()
1938 back from the file, nor mmap's back from the file at a different
1939 address. (There have been systems where private was not correctly
1940 implemented like the infamous i386 svr4.0, and systems where the
1941 VM page cache was not coherent with the filesystem buffer cache
1942 like early versions of FreeBSD and possibly contemporary NetBSD.)
1943 For shared mappings, we should conversely verify that changes get
1944 propogated back to all the places they're supposed to be.
1945
1946 Grep wants private fixed already mapped.
1947 The main things grep needs to know about mmap are:
1948 * does it exist and is it safe to write into the mmap'd area
1949 * how to use it (BSD variants) */
1950#include <sys/types.h>
1951#include <fcntl.h>
1952#include <sys/mman.h>
1953
1954/* This mess was copied from the GNU getpagesize.h. */
1955#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1956# ifdef HAVE_UNISTD_H
1957# include <unistd.h>
1958# endif
c906108c
SS
1959
1960/* Assume that all systems that can run configure have sys/param.h. */
1961# ifndef HAVE_SYS_PARAM_H
1962# define HAVE_SYS_PARAM_H 1
1963# endif
1964
1965# ifdef _SC_PAGESIZE
1966# define getpagesize() sysconf(_SC_PAGESIZE)
1967# else /* no _SC_PAGESIZE */
1968# ifdef HAVE_SYS_PARAM_H
1969# include <sys/param.h>
1970# ifdef EXEC_PAGESIZE
1971# define getpagesize() EXEC_PAGESIZE
1972# else /* no EXEC_PAGESIZE */
1973# ifdef NBPG
1974# define getpagesize() NBPG * CLSIZE
1975# ifndef CLSIZE
1976# define CLSIZE 1
1977# endif /* no CLSIZE */
1978# else /* no NBPG */
1979# ifdef NBPC
1980# define getpagesize() NBPC
1981# else /* no NBPC */
1982# ifdef PAGESIZE
1983# define getpagesize() PAGESIZE
1984# endif /* PAGESIZE */
1985# endif /* no NBPC */
1986# endif /* no NBPG */
1987# endif /* no EXEC_PAGESIZE */
1988# else /* no HAVE_SYS_PARAM_H */
1989# define getpagesize() 8192 /* punt totally */
1990# endif /* no HAVE_SYS_PARAM_H */
1991# endif /* no _SC_PAGESIZE */
1992
1993#endif /* no HAVE_GETPAGESIZE */
1994
1995#ifdef __cplusplus
1996extern "C" { void *malloc(unsigned); }
1997#else
1998char *malloc();
1999#endif
2000
2001int
2002main()
2003{
2004 char *data, *data2, *data3;
2005 int i, pagesize;
2006 int fd;
2007
2008 pagesize = getpagesize();
2009
2010 /*
2011 * First, make a file with some known garbage in it.
2012 */
2013 data = malloc(pagesize);
2014 if (!data)
2015 exit(1);
2016 for (i = 0; i < pagesize; ++i)
2017 *(data + i) = rand();
2018 umask(0);
2019 fd = creat("conftestmmap", 0600);
2020 if (fd < 0)
2021 exit(1);
2022 if (write(fd, data, pagesize) != pagesize)
2023 exit(1);
2024 close(fd);
2025
2026 /*
2027 * Next, try to mmap the file at a fixed address which
2028 * already has something else allocated at it. If we can,
2029 * also make sure that we see the same garbage.
2030 */
2031 fd = open("conftestmmap", O_RDWR);
2032 if (fd < 0)
2033 exit(1);
2034 data2 = malloc(2 * pagesize);
2035 if (!data2)
2036 exit(1);
2037 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2038 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2039 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2040 exit(1);
2041 for (i = 0; i < pagesize; ++i)
2042 if (*(data + i) != *(data2 + i))
2043 exit(1);
2044
2045 /*
2046 * Finally, make sure that changes to the mapped area
2047 * do not percolate back to the file as seen by read().
2048 * (This is a bug on some variants of i386 svr4.0.)
2049 */
2050 for (i = 0; i < pagesize; ++i)
2051 *(data2 + i) = *(data2 + i) + 1;
2052 data3 = malloc(pagesize);
2053 if (!data3)
2054 exit(1);
2055 if (read(fd, data3, pagesize) != pagesize)
2056 exit(1);
2057 for (i = 0; i < pagesize; ++i)
2058 if (*(data + i) != *(data3 + i))
2059 exit(1);
2060 close(fd);
2061 unlink("conftestmmap");
2062 exit(0);
2063}
2064
2065EOF
ddc9cd0f 2066if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2067then
2068 ac_cv_func_mmap_fixed_mapped=yes
2069else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -fr conftest*
2073 ac_cv_func_mmap_fixed_mapped=no
2074fi
2075rm -fr conftest*
2076fi
2077
2078fi
2079
2080echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2081if test $ac_cv_func_mmap_fixed_mapped = yes; then
2082 cat >> confdefs.h <<\EOF
2083#define HAVE_MMAP 1
2084EOF
2085
2086fi
2087
2088
2089 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2090unistd.h values.h sys/param.h
2091do
2092ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2093echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 2094echo "configure:2095: checking for $ac_hdr" >&5
c906108c
SS
2095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2096 echo $ac_n "(cached) $ac_c" 1>&6
2097else
2098 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2099#line 2100 "configure"
c906108c
SS
2100#include "confdefs.h"
2101#include <$ac_hdr>
2102EOF
2103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2104{ (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2106if test -z "$ac_err"; then
2107 rm -rf conftest*
2108 eval "ac_cv_header_$ac_safe=yes"
2109else
2110 echo "$ac_err" >&5
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -rf conftest*
2114 eval "ac_cv_header_$ac_safe=no"
2115fi
2116rm -f conftest*
2117fi
2118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2119 echo "$ac_t""yes" 1>&6
2120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2121 cat >> confdefs.h <<EOF
2122#define $ac_tr_hdr 1
2123EOF
2124
2125else
2126 echo "$ac_t""no" 1>&6
2127fi
2128done
2129
2130 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2131__argz_count __argz_stringify __argz_next
2132do
2133echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2134echo "configure:2135: checking for $ac_func" >&5
c906108c
SS
2135if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137else
2138 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2139#line 2140 "configure"
c906108c
SS
2140#include "confdefs.h"
2141/* System header to define __stub macros and hopefully few prototypes,
2142 which can conflict with char $ac_func(); below. */
2143#include <assert.h>
2144/* Override any gcc2 internal prototype to avoid an error. */
2145/* We use char because int might match the return type of a gcc2
2146 builtin and then its argument prototype would still apply. */
2147char $ac_func();
2148
2149int main() {
2150
2151/* The GNU C library defines this for functions which it implements
2152 to always fail with ENOSYS. Some functions are actually named
2153 something starting with __ and the normal name is an alias. */
2154#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2155choke me
2156#else
2157$ac_func();
2158#endif
2159
2160; return 0; }
2161EOF
ddc9cd0f 2162if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2163 rm -rf conftest*
2164 eval "ac_cv_func_$ac_func=yes"
2165else
2166 echo "configure: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 rm -rf conftest*
2169 eval "ac_cv_func_$ac_func=no"
2170fi
2171rm -f conftest*
2172fi
2173
2174if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2175 echo "$ac_t""yes" 1>&6
2176 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2177 cat >> confdefs.h <<EOF
2178#define $ac_tr_func 1
2179EOF
2180
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184done
2185
2186
2187 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2188 for ac_func in stpcpy
2189do
2190echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2191echo "configure:2192: checking for $ac_func" >&5
c906108c
SS
2192if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2196#line 2197 "configure"
c906108c
SS
2197#include "confdefs.h"
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $ac_func(); below. */
2200#include <assert.h>
2201/* Override any gcc2 internal prototype to avoid an error. */
2202/* We use char because int might match the return type of a gcc2
2203 builtin and then its argument prototype would still apply. */
2204char $ac_func();
2205
2206int main() {
2207
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2212choke me
2213#else
2214$ac_func();
2215#endif
2216
2217; return 0; }
2218EOF
ddc9cd0f 2219if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2220 rm -rf conftest*
2221 eval "ac_cv_func_$ac_func=yes"
2222else
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2225 rm -rf conftest*
2226 eval "ac_cv_func_$ac_func=no"
2227fi
2228rm -f conftest*
2229fi
2230
2231if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2232 echo "$ac_t""yes" 1>&6
2233 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2234 cat >> confdefs.h <<EOF
2235#define $ac_tr_func 1
2236EOF
2237
2238else
2239 echo "$ac_t""no" 1>&6
2240fi
2241done
2242
2243 fi
2244 if test "${ac_cv_func_stpcpy}" = "yes"; then
2245 cat >> confdefs.h <<\EOF
2246#define HAVE_STPCPY 1
2247EOF
2248
2249 fi
2250
2251 if test $ac_cv_header_locale_h = yes; then
2252 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
ddc9cd0f 2253echo "configure:2254: checking for LC_MESSAGES" >&5
c906108c
SS
2254if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256else
2257 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2258#line 2259 "configure"
c906108c
SS
2259#include "confdefs.h"
2260#include <locale.h>
2261int main() {
2262return LC_MESSAGES
2263; return 0; }
2264EOF
ddc9cd0f 2265if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2266 rm -rf conftest*
2267 am_cv_val_LC_MESSAGES=yes
2268else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 am_cv_val_LC_MESSAGES=no
2273fi
2274rm -f conftest*
2275fi
2276
2277echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2278 if test $am_cv_val_LC_MESSAGES = yes; then
2279 cat >> confdefs.h <<\EOF
2280#define HAVE_LC_MESSAGES 1
2281EOF
2282
2283 fi
2284 fi
2285 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
ddc9cd0f 2286echo "configure:2287: checking whether NLS is requested" >&5
c906108c
SS
2287 # Check whether --enable-nls or --disable-nls was given.
2288if test "${enable_nls+set}" = set; then
2289 enableval="$enable_nls"
2290 USE_NLS=$enableval
2291else
2292 USE_NLS=yes
2293fi
2294
2295 echo "$ac_t""$USE_NLS" 1>&6
2296
2297
2298 USE_INCLUDED_LIBINTL=no
2299
2300 if test "$USE_NLS" = "yes"; then
2301 cat >> confdefs.h <<\EOF
2302#define ENABLE_NLS 1
2303EOF
2304
2305 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
ddc9cd0f 2306echo "configure:2307: checking whether included gettext is requested" >&5
c906108c
SS
2307 # Check whether --with-included-gettext or --without-included-gettext was given.
2308if test "${with_included_gettext+set}" = set; then
2309 withval="$with_included_gettext"
2310 nls_cv_force_use_gnu_gettext=$withval
2311else
2312 nls_cv_force_use_gnu_gettext=no
2313fi
2314
2315 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2316
2317 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2318 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2319 nls_cv_header_intl=
2320 nls_cv_header_libgt=
2321 CATOBJEXT=NONE
2322
2323 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2324echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
ddc9cd0f 2325echo "configure:2326: checking for libintl.h" >&5
c906108c
SS
2326if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328else
2329 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2330#line 2331 "configure"
c906108c
SS
2331#include "confdefs.h"
2332#include <libintl.h>
2333EOF
2334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2335{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2337if test -z "$ac_err"; then
2338 rm -rf conftest*
2339 eval "ac_cv_header_$ac_safe=yes"
2340else
2341 echo "$ac_err" >&5
2342 echo "configure: failed program was:" >&5
2343 cat conftest.$ac_ext >&5
2344 rm -rf conftest*
2345 eval "ac_cv_header_$ac_safe=no"
2346fi
2347rm -f conftest*
2348fi
2349if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350 echo "$ac_t""yes" 1>&6
2351 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
ddc9cd0f 2352echo "configure:2353: checking for gettext in libc" >&5
c906108c
SS
2353if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355else
2356 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2357#line 2358 "configure"
c906108c
SS
2358#include "confdefs.h"
2359#include <libintl.h>
2360int main() {
2361return (int) gettext ("")
2362; return 0; }
2363EOF
ddc9cd0f 2364if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2365 rm -rf conftest*
2366 gt_cv_func_gettext_libc=yes
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -rf conftest*
2371 gt_cv_func_gettext_libc=no
2372fi
2373rm -f conftest*
2374fi
2375
2376echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2377
2378 if test "$gt_cv_func_gettext_libc" != "yes"; then
2379 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
ddc9cd0f 2380echo "configure:2381: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2381ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2382if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384else
2385 ac_save_LIBS="$LIBS"
2386LIBS="-lintl $LIBS"
2387cat > conftest.$ac_ext <<EOF
ddc9cd0f 2388#line 2389 "configure"
c906108c
SS
2389#include "confdefs.h"
2390/* Override any gcc2 internal prototype to avoid an error. */
2391/* We use char because int might match the return type of a gcc2
2392 builtin and then its argument prototype would still apply. */
2393char bindtextdomain();
2394
2395int main() {
2396bindtextdomain()
2397; return 0; }
2398EOF
ddc9cd0f 2399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2400 rm -rf conftest*
2401 eval "ac_cv_lib_$ac_lib_var=yes"
2402else
2403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -rf conftest*
2406 eval "ac_cv_lib_$ac_lib_var=no"
2407fi
2408rm -f conftest*
2409LIBS="$ac_save_LIBS"
2410
2411fi
2412if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2413 echo "$ac_t""yes" 1>&6
2414 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
ddc9cd0f 2415echo "configure:2416: checking for gettext in libintl" >&5
c906108c
SS
2416if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418else
2419 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2420#line 2421 "configure"
c906108c
SS
2421#include "confdefs.h"
2422
2423int main() {
2424return (int) gettext ("")
2425; return 0; }
2426EOF
ddc9cd0f 2427if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2428 rm -rf conftest*
2429 gt_cv_func_gettext_libintl=yes
2430else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 gt_cv_func_gettext_libintl=no
2435fi
2436rm -f conftest*
2437fi
2438
2439echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2440else
2441 echo "$ac_t""no" 1>&6
2442fi
2443
2444 fi
2445
2446 if test "$gt_cv_func_gettext_libc" = "yes" \
2447 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2448 cat >> confdefs.h <<\EOF
2449#define HAVE_GETTEXT 1
2450EOF
2451
2452 # Extract the first word of "msgfmt", so it can be a program name with args.
2453set dummy msgfmt; ac_word=$2
2454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2455echo "configure:2456: checking for $ac_word" >&5
c906108c
SS
2456if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2458else
2459 case "$MSGFMT" in
2460 /*)
2461 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2462 ;;
2463 *)
2464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2465 for ac_dir in $PATH; do
2466 test -z "$ac_dir" && ac_dir=.
2467 if test -f $ac_dir/$ac_word; then
2468 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2469 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2470 break
2471 fi
2472 fi
2473 done
2474 IFS="$ac_save_ifs"
2475 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2476 ;;
2477esac
2478fi
2479MSGFMT="$ac_cv_path_MSGFMT"
2480if test -n "$MSGFMT"; then
2481 echo "$ac_t""$MSGFMT" 1>&6
2482else
2483 echo "$ac_t""no" 1>&6
2484fi
2485 if test "$MSGFMT" != "no"; then
2486 for ac_func in dcgettext
2487do
2488echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2489echo "configure:2490: checking for $ac_func" >&5
c906108c
SS
2490if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492else
2493 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2494#line 2495 "configure"
c906108c
SS
2495#include "confdefs.h"
2496/* System header to define __stub macros and hopefully few prototypes,
2497 which can conflict with char $ac_func(); below. */
2498#include <assert.h>
2499/* Override any gcc2 internal prototype to avoid an error. */
2500/* We use char because int might match the return type of a gcc2
2501 builtin and then its argument prototype would still apply. */
2502char $ac_func();
2503
2504int main() {
2505
2506/* The GNU C library defines this for functions which it implements
2507 to always fail with ENOSYS. Some functions are actually named
2508 something starting with __ and the normal name is an alias. */
2509#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2510choke me
2511#else
2512$ac_func();
2513#endif
2514
2515; return 0; }
2516EOF
ddc9cd0f 2517if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2518 rm -rf conftest*
2519 eval "ac_cv_func_$ac_func=yes"
2520else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -rf conftest*
2524 eval "ac_cv_func_$ac_func=no"
2525fi
2526rm -f conftest*
2527fi
2528
2529if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2530 echo "$ac_t""yes" 1>&6
2531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2532 cat >> confdefs.h <<EOF
2533#define $ac_tr_func 1
2534EOF
2535
2536else
2537 echo "$ac_t""no" 1>&6
2538fi
2539done
2540
2541 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2542set dummy gmsgfmt; ac_word=$2
2543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2544echo "configure:2545: checking for $ac_word" >&5
c906108c
SS
2545if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547else
2548 case "$GMSGFMT" in
2549 /*)
2550 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2551 ;;
2552 ?:/*)
2553 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2554 ;;
2555 *)
2556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2557 ac_dummy="$PATH"
2558 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 if test -f $ac_dir/$ac_word; then
2561 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2562 break
2563 fi
2564 done
2565 IFS="$ac_save_ifs"
2566 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2567 ;;
2568esac
2569fi
2570GMSGFMT="$ac_cv_path_GMSGFMT"
2571if test -n "$GMSGFMT"; then
2572 echo "$ac_t""$GMSGFMT" 1>&6
2573else
2574 echo "$ac_t""no" 1>&6
2575fi
2576
2577 # Extract the first word of "xgettext", so it can be a program name with args.
2578set dummy xgettext; ac_word=$2
2579echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2580echo "configure:2581: checking for $ac_word" >&5
c906108c
SS
2581if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2583else
2584 case "$XGETTEXT" in
2585 /*)
2586 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2587 ;;
2588 *)
2589 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2590 for ac_dir in $PATH; do
2591 test -z "$ac_dir" && ac_dir=.
2592 if test -f $ac_dir/$ac_word; then
2593 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2594 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2595 break
2596 fi
2597 fi
2598 done
2599 IFS="$ac_save_ifs"
2600 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2601 ;;
2602esac
2603fi
2604XGETTEXT="$ac_cv_path_XGETTEXT"
2605if test -n "$XGETTEXT"; then
2606 echo "$ac_t""$XGETTEXT" 1>&6
2607else
2608 echo "$ac_t""no" 1>&6
2609fi
2610
2611 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2612#line 2613 "configure"
c906108c
SS
2613#include "confdefs.h"
2614
2615int main() {
2616extern int _nl_msg_cat_cntr;
2617 return _nl_msg_cat_cntr
2618; return 0; }
2619EOF
ddc9cd0f 2620if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2621 rm -rf conftest*
2622 CATOBJEXT=.gmo
2623 DATADIRNAME=share
2624else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 CATOBJEXT=.mo
2629 DATADIRNAME=lib
2630fi
2631rm -f conftest*
2632 INSTOBJEXT=.mo
2633 fi
2634 fi
2635
2636else
2637 echo "$ac_t""no" 1>&6
2638fi
2639
2640
2641
2642 if test "$CATOBJEXT" = "NONE"; then
2643 nls_cv_use_gnu_gettext=yes
2644 fi
2645 fi
2646
2647 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2648 INTLOBJS="\$(GETTOBJS)"
2649 # Extract the first word of "msgfmt", so it can be a program name with args.
2650set dummy msgfmt; ac_word=$2
2651echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2652echo "configure:2653: checking for $ac_word" >&5
c906108c
SS
2653if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655else
2656 case "$MSGFMT" in
2657 /*)
2658 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2659 ;;
2660 *)
2661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2662 for ac_dir in $PATH; do
2663 test -z "$ac_dir" && ac_dir=.
2664 if test -f $ac_dir/$ac_word; then
2665 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2666 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2667 break
2668 fi
2669 fi
2670 done
2671 IFS="$ac_save_ifs"
2672 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2673 ;;
2674esac
2675fi
2676MSGFMT="$ac_cv_path_MSGFMT"
2677if test -n "$MSGFMT"; then
2678 echo "$ac_t""$MSGFMT" 1>&6
2679else
2680 echo "$ac_t""no" 1>&6
2681fi
2682
2683 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2684set dummy gmsgfmt; ac_word=$2
2685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2686echo "configure:2687: checking for $ac_word" >&5
c906108c
SS
2687if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2688 echo $ac_n "(cached) $ac_c" 1>&6
2689else
2690 case "$GMSGFMT" in
2691 /*)
2692 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2693 ;;
2694 ?:/*)
2695 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2696 ;;
2697 *)
2698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2699 ac_dummy="$PATH"
2700 for ac_dir in $ac_dummy; do
2701 test -z "$ac_dir" && ac_dir=.
2702 if test -f $ac_dir/$ac_word; then
2703 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2704 break
2705 fi
2706 done
2707 IFS="$ac_save_ifs"
2708 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2709 ;;
2710esac
2711fi
2712GMSGFMT="$ac_cv_path_GMSGFMT"
2713if test -n "$GMSGFMT"; then
2714 echo "$ac_t""$GMSGFMT" 1>&6
2715else
2716 echo "$ac_t""no" 1>&6
2717fi
2718
2719 # Extract the first word of "xgettext", so it can be a program name with args.
2720set dummy xgettext; ac_word=$2
2721echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2722echo "configure:2723: checking for $ac_word" >&5
c906108c
SS
2723if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
2725else
2726 case "$XGETTEXT" in
2727 /*)
2728 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2729 ;;
2730 *)
2731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2732 for ac_dir in $PATH; do
2733 test -z "$ac_dir" && ac_dir=.
2734 if test -f $ac_dir/$ac_word; then
2735 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2736 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2737 break
2738 fi
2739 fi
2740 done
2741 IFS="$ac_save_ifs"
2742 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2743 ;;
2744esac
2745fi
2746XGETTEXT="$ac_cv_path_XGETTEXT"
2747if test -n "$XGETTEXT"; then
2748 echo "$ac_t""$XGETTEXT" 1>&6
2749else
2750 echo "$ac_t""no" 1>&6
2751fi
2752
2753
2754 USE_INCLUDED_LIBINTL=yes
2755 CATOBJEXT=.gmo
2756 INSTOBJEXT=.mo
2757 DATADIRNAME=share
2758 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2759 INTLLIBS=$INTLDEPS
2760 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2761 nls_cv_header_intl=libintl.h
2762 nls_cv_header_libgt=libgettext.h
2763 fi
2764
2765 if test "$XGETTEXT" != ":"; then
2766 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2767 : ;
2768 else
2769 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2770 XGETTEXT=":"
2771 fi
2772 fi
2773
2774 # We need to process the po/ directory.
2775 POSUB=po
2776 else
2777 DATADIRNAME=share
2778 nls_cv_header_intl=libintl.h
2779 nls_cv_header_libgt=libgettext.h
2780 fi
2781
2782 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2783 # because some of the sources are only built for this goal.
2784 if test "$PACKAGE" = gettext; then
2785 USE_NLS=yes
2786 USE_INCLUDED_LIBINTL=yes
2787 fi
2788
2789 for lang in $ALL_LINGUAS; do
2790 GMOFILES="$GMOFILES $lang.gmo"
2791 POFILES="$POFILES $lang.po"
2792 done
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807 if test "x$CATOBJEXT" != "x"; then
2808 if test "x$ALL_LINGUAS" = "x"; then
2809 LINGUAS=
2810 else
2811 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
ddc9cd0f 2812echo "configure:2813: checking for catalogs to be installed" >&5
c906108c
SS
2813 NEW_LINGUAS=
2814 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2815 case "$ALL_LINGUAS" in
2816 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2817 esac
2818 done
2819 LINGUAS=$NEW_LINGUAS
2820 echo "$ac_t""$LINGUAS" 1>&6
2821 fi
2822
2823 if test -n "$LINGUAS"; then
2824 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2825 fi
2826 fi
2827
2828 if test $ac_cv_header_locale_h = yes; then
2829 INCLUDE_LOCALE_H="#include <locale.h>"
2830 else
2831 INCLUDE_LOCALE_H="\
2832/* The system does not provide the header <locale.h>. Take care yourself. */"
2833 fi
2834
2835
2836 if test -f $srcdir/po2tbl.sed.in; then
2837 if test "$CATOBJEXT" = ".cat"; then
2838 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2839echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
ddc9cd0f 2840echo "configure:2841: checking for linux/version.h" >&5
c906108c
SS
2841if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843else
2844 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2845#line 2846 "configure"
c906108c
SS
2846#include "confdefs.h"
2847#include <linux/version.h>
2848EOF
2849ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2850{ (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2851ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2852if test -z "$ac_err"; then
2853 rm -rf conftest*
2854 eval "ac_cv_header_$ac_safe=yes"
2855else
2856 echo "$ac_err" >&5
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 eval "ac_cv_header_$ac_safe=no"
2861fi
2862rm -f conftest*
2863fi
2864if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2865 echo "$ac_t""yes" 1>&6
2866 msgformat=linux
2867else
2868 echo "$ac_t""no" 1>&6
2869msgformat=xopen
2870fi
2871
2872
2873 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2874 fi
2875 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2876 $srcdir/po2tbl.sed.in > po2tbl.sed
2877 fi
2878
2879 if test "$PACKAGE" = "gettext"; then
2880 GT_NO="#NO#"
2881 GT_YES=
2882 else
2883 GT_NO=
2884 GT_YES="#YES#"
2885 fi
2886
2887
2888
2889 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2890
2891
2892 l=
2893
2894
4536bbc6 2895 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2896 test -d po || mkdir po
2897 if test "x$srcdir" != "x."; then
2898 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2899 posrcprefix="$srcdir/"
2900 else
2901 posrcprefix="../$srcdir/"
2902 fi
2903 else
2904 posrcprefix="../"
2905 fi
2906 rm -f po/POTFILES
2907 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2908 < $srcdir/po/POTFILES.in > po/POTFILES
2909 fi
2910
ddc9cd0f
AC
2911
2912localedir='${datadir}/locale'
2913
2914
2915if test "x$POSUB" != x; then
2916
2917 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2918echo "configure:2919: checking for catalogs to be installed" >&5
2919 # Look for .po and .gmo files in the source directory.
2920 CATALOGS=
2921 XLINGUAS=
2922 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
2923 # If there aren't any .gmo files the shell will give us the
2924 # literal string "../path/to/srcdir/po/*.gmo" which has to be
2925 # weeded out.
2926 case "$cat" in *\**)
2927 continue;;
2928 esac
2929 # The quadruple backslash is collapsed to a double backslash
2930 # by the backticks, then collapsed again by the double quotes,
2931 # leaving us with one backslash in the sed expression (right
2932 # before the dot that mustn't act as a wildcard).
2933 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
2934 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
2935 # The user is allowed to set LINGUAS to a list of languages to
2936 # install catalogs for. If it's empty that means "all of them."
2937 if test "x$LINGUAS" = x; then
2938 CATALOGS="$CATALOGS $cat"
2939 XLINGUAS="$XLINGUAS $lang"
2940 else
2941 case "$LINGUAS" in *$lang*)
2942 CATALOGS="$CATALOGS $cat"
2943 XLINGUAS="$XLINGUAS $lang"
2944 ;;
2945 esac
2946 fi
2947 done
2948 LINGUAS="$XLINGUAS"
2949 echo "$ac_t""$LINGUAS" 1>&6
2950
2951 CONFIG_ALL="$CONFIG_ALL all-po"
2952 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
2953 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
2954 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
2955fi
2956
2957PACKAGE=gdb
2958cat >> confdefs.h <<EOF
2959#define PACKAGE "$PACKAGE"
0fbb3da7
TT
2960EOF
2961
2962
ddc9cd0f 2963
5b5d99cf
JB
2964debugdir=${libdir}/debug
2965
2966# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2967if test "${with_separate_debug_dir+set}" = set; then
2968 withval="$with_separate_debug_dir"
2969 debugdir="${withval}"
2970fi
2971
2972
2973
2974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2976 ac_define_dir=`eval echo $debugdir`
2977 ac_define_dir=`eval echo $ac_define_dir`
2978 cat >> confdefs.h <<EOF
2979#define DEBUGDIR "$ac_define_dir"
2980EOF
2981
2982
2983#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c 2984
8dcde887 2985subdirs="doc testsuite"
96baa820 2986
8dcde887 2987configdirs=
96baa820 2988
27e9bf90 2989. $srcdir/configure.host
c906108c 2990
27e9bf90 2991. $srcdir/configure.tgt
c906108c 2992
27e9bf90
MK
2993# Fetch the default architecture and default target vector from BFD.
2994targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2995
27e9bf90
MK
2996# We only want the first architecture, so strip off the others if
2997# there is more than one.
2998targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2999
27e9bf90
MK
3000if test "x$targ_archs" != x; then
3001 cat >> confdefs.h <<EOF
3002#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
3003EOF
3004
3005fi
27e9bf90
MK
3006if test "x$targ_defvec" != x; then
3007 cat >> confdefs.h <<EOF
3008#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
3009EOF
3010
3011fi
c906108c 3012
8bb2c122
MK
3013if test "$program_transform_name" = s,x,x,; then
3014 program_transform_name=
3015else
3016 # Double any \ or $. echo might interpret backslashes.
3017 cat <<\EOF_SED > conftestsed
3018s,\\,\\\\,g; s,\$,$$,g
3019EOF_SED
3020 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3021 rm -f conftestsed
3022fi
3023test "$program_prefix" != NONE &&
3024 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3025# Use a double $ so make ignores it.
3026test "$program_suffix" != NONE &&
3027 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3028
3029# sed with no file args requires a program.
3030test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3031
3032
627af7ea
MK
3033# The CLI cannot be disabled yet, but may be in the future.
3034
3035# Enable CLI.
3036# Check whether --enable-gdbcli or --disable-gdbcli was given.
3037if test "${enable_gdbcli+set}" = set; then
3038 enableval="$enable_gdbcli"
3039 case $enableval in
3040 yes)
3041 ;;
3042 no)
3043 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
3044 *)
3045 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3046 esac
3047else
3048 enable_gdbcli=yes
3049fi
3050
3051if test x"$enable_gdbcli" = xyes; then
3052 if test -d $srcdir/cli; then
3053 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3054 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3055 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3056 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3057 fi
3058fi
3059
3060# Enable MI.
3061# Check whether --enable-gdbmi or --disable-gdbmi was given.
3062if test "${enable_gdbmi+set}" = set; then
3063 enableval="$enable_gdbmi"
3064 case $enableval in
3065 yes | no)
3066 ;;
3067 *)
3068 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3069 esac
3070else
3071 enable_gdbmi=yes
3072fi
3073
3074if test x"$enable_gdbmi" = xyes; then
3075 if test -d $srcdir/mi; then
3076 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3077 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3078 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3079 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3080 fi
3081fi
3082
06825bd1
MK
3083# Enable TUI.
3084# Check whether --enable-tui or --disable-tui was given.
3085if test "${enable_tui+set}" = set; then
3086 enableval="$enable_tui"
3087 case $enableval in
3088 yes | no)
3089 ;;
3090 *)
3091 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3092 esac
c324d747
AC
3093else
3094 enable_tui=yes
06825bd1
MK
3095fi
3096
06825bd1 3097
8ee53726
MK
3098# Enable gdbtk.
3099# Check whether --enable-gdbtk or --disable-gdbtk was given.
3100if test "${enable_gdbtk+set}" = set; then
3101 enableval="$enable_gdbtk"
3102 case $enableval in
3103 yes | no)
3104 ;;
3105 *)
3106 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3107 esac
3108else
3109 if test -d $srcdir/gdbtk; then
3110 enable_gdbtk=yes
3111 else
3112 enable_gdbtk=no
3113 fi
3114fi
3115
3116# We unconditionally disable gdbtk tests on selected platforms.
3117case $host_os in
3118 go32* | windows*)
3119 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3120 enable_gdbtk=no ;;
3121esac
3122
0e5d83e3
JJ
3123# Libunwind support.
3124# Check whether --with-libunwind or --without-libunwind was given.
3125if test "${with_libunwind+set}" = set; then
3126 withval="$with_libunwind"
3127 case "${withval}" in
3128 yes) enable_libunwind=yes ;;
3129 no) enable_libunwind=no ;;
3130 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3131esac
3132else
3133
3134 for ac_hdr in libunwind.h
3135do
3136ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3137echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 3138echo "configure:3139: checking for $ac_hdr" >&5
0e5d83e3
JJ
3139if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3140 echo $ac_n "(cached) $ac_c" 1>&6
3141else
3142 cat > conftest.$ac_ext <<EOF
9cc52bde 3143#line 3144 "configure"
0e5d83e3
JJ
3144#include "confdefs.h"
3145#include <$ac_hdr>
3146EOF
3147ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 3148{ (eval echo configure:3149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3149ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3150if test -z "$ac_err"; then
3151 rm -rf conftest*
3152 eval "ac_cv_header_$ac_safe=yes"
3153else
3154 echo "$ac_err" >&5
3155 echo "configure: failed program was:" >&5
3156 cat conftest.$ac_ext >&5
3157 rm -rf conftest*
3158 eval "ac_cv_header_$ac_safe=no"
3159fi
3160rm -f conftest*
3161fi
3162if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3163 echo "$ac_t""yes" 1>&6
3164 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3165 cat >> confdefs.h <<EOF
3166#define $ac_tr_hdr 1
3167EOF
3168
3169else
3170 echo "$ac_t""no" 1>&6
3171fi
3172done
3173
3174 for ac_hdr in libunwind-ia64.h
3175do
3176ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3177echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 3178echo "configure:3179: checking for $ac_hdr" >&5
0e5d83e3
JJ
3179if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3180 echo $ac_n "(cached) $ac_c" 1>&6
3181else
3182 cat > conftest.$ac_ext <<EOF
9cc52bde 3183#line 3184 "configure"
0e5d83e3
JJ
3184#include "confdefs.h"
3185#include <$ac_hdr>
3186EOF
3187ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 3188{ (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3189ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3190if test -z "$ac_err"; then
3191 rm -rf conftest*
3192 eval "ac_cv_header_$ac_safe=yes"
3193else
3194 echo "$ac_err" >&5
3195 echo "configure: failed program was:" >&5
3196 cat conftest.$ac_ext >&5
3197 rm -rf conftest*
3198 eval "ac_cv_header_$ac_safe=no"
3199fi
3200rm -f conftest*
3201fi
3202if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3203 echo "$ac_t""yes" 1>&6
3204 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3205 cat >> confdefs.h <<EOF
3206#define $ac_tr_hdr 1
3207EOF
3208
3209else
3210 echo "$ac_t""no" 1>&6
3211fi
3212done
3213
3214 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3215 enable_libunwind=yes;
3216 fi
3217
3218fi
3219
3220
3221if test x"$enable_libunwind" = xyes; then
3222 for ac_hdr in libunwind.h
3223do
3224ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3225echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 3226echo "configure:3227: checking for $ac_hdr" >&5
0e5d83e3
JJ
3227if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3228 echo $ac_n "(cached) $ac_c" 1>&6
3229else
3230 cat > conftest.$ac_ext <<EOF
9cc52bde 3231#line 3232 "configure"
0e5d83e3
JJ
3232#include "confdefs.h"
3233#include <$ac_hdr>
3234EOF
3235ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 3236{ (eval echo configure:3237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3237ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3238if test -z "$ac_err"; then
3239 rm -rf conftest*
3240 eval "ac_cv_header_$ac_safe=yes"
3241else
3242 echo "$ac_err" >&5
3243 echo "configure: failed program was:" >&5
3244 cat conftest.$ac_ext >&5
3245 rm -rf conftest*
3246 eval "ac_cv_header_$ac_safe=no"
3247fi
3248rm -f conftest*
3249fi
3250if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3251 echo "$ac_t""yes" 1>&6
3252 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3253 cat >> confdefs.h <<EOF
3254#define $ac_tr_hdr 1
3255EOF
3256
3257else
3258 echo "$ac_t""no" 1>&6
3259fi
3260done
3261
3262 for ac_hdr in libunwind-ia64.h
3263do
3264ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3265echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 3266echo "configure:3267: checking for $ac_hdr" >&5
0e5d83e3
JJ
3267if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3268 echo $ac_n "(cached) $ac_c" 1>&6
3269else
3270 cat > conftest.$ac_ext <<EOF
9cc52bde 3271#line 3272 "configure"
0e5d83e3
JJ
3272#include "confdefs.h"
3273#include <$ac_hdr>
3274EOF
3275ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 3276{ (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3277ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3278if test -z "$ac_err"; then
3279 rm -rf conftest*
3280 eval "ac_cv_header_$ac_safe=yes"
3281else
3282 echo "$ac_err" >&5
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 rm -rf conftest*
3286 eval "ac_cv_header_$ac_safe=no"
3287fi
3288rm -f conftest*
3289fi
3290if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3291 echo "$ac_t""yes" 1>&6
3292 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3293 cat >> confdefs.h <<EOF
3294#define $ac_tr_hdr 1
3295EOF
3296
3297else
3298 echo "$ac_t""no" 1>&6
3299fi
3300done
3301
3302 cat >> confdefs.h <<\EOF
3303#define HAVE_LIBUNWIND 1
3304EOF
3305
3306 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3307 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3308 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3309fi
3310
d28f9cdf
DJ
3311# Profiling support.
3312# Check whether --enable-profiling or --disable-profiling was given.
3313if test "${enable_profiling+set}" = set; then
3314 enableval="$enable_profiling"
3315 case $enableval in
3316 yes | no)
3317 ;;
3318 *)
3319 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3320 esac
3321else
3322 enable_profiling=no
3323fi
3324
3325
d9feb4e7
DJ
3326for ac_func in monstartup _mcleanup
3327do
3328echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 3329echo "configure:3330: checking for $ac_func" >&5
d9feb4e7 3330if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3331 echo $ac_n "(cached) $ac_c" 1>&6
3332else
3333 cat > conftest.$ac_ext <<EOF
9cc52bde 3334#line 3335 "configure"
d28f9cdf
DJ
3335#include "confdefs.h"
3336/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3337 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3338#include <assert.h>
3339/* Override any gcc2 internal prototype to avoid an error. */
3340/* We use char because int might match the return type of a gcc2
3341 builtin and then its argument prototype would still apply. */
d9feb4e7 3342char $ac_func();
d28f9cdf
DJ
3343
3344int main() {
3345
3346/* The GNU C library defines this for functions which it implements
3347 to always fail with ENOSYS. Some functions are actually named
3348 something starting with __ and the normal name is an alias. */
d9feb4e7 3349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3350choke me
3351#else
d9feb4e7 3352$ac_func();
d28f9cdf
DJ
3353#endif
3354
3355; return 0; }
3356EOF
9cc52bde 3357if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3358 rm -rf conftest*
d9feb4e7 3359 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3360else
3361 echo "configure: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
3363 rm -rf conftest*
d9feb4e7 3364 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3365fi
3366rm -f conftest*
3367fi
3368
d9feb4e7 3369if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3370 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3371 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3372 cat >> confdefs.h <<EOF
3373#define $ac_tr_func 1
3374EOF
3375
d28f9cdf
DJ
3376else
3377 echo "$ac_t""no" 1>&6
d28f9cdf 3378fi
d9feb4e7 3379done
d28f9cdf 3380
b0b1c2c0 3381echo $ac_n "checking for _etext""... $ac_c" 1>&6
9cc52bde 3382echo "configure:3383: checking for _etext" >&5
b0b1c2c0
MK
3383if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3384 echo $ac_n "(cached) $ac_c" 1>&6
3385else
3386 cat > conftest.$ac_ext <<EOF
9cc52bde 3387#line 3388 "configure"
b0b1c2c0
MK
3388#include "confdefs.h"
3389#include <stdlib.h>
3390extern char _etext;
3391
3392int main() {
3393free (&_etext);
3394; return 0; }
3395EOF
9cc52bde 3396if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3397 rm -rf conftest*
3398 ac_cv_var__etext=yes
3399else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 ac_cv_var__etext=no
3404fi
3405rm -f conftest*
3406fi
3407
3408echo "$ac_t""$ac_cv_var__etext" 1>&6
3409if test $ac_cv_var__etext = yes; then
3410 cat >> confdefs.h <<\EOF
3411#define HAVE__ETEXT 1
3412EOF
3413
3414fi
d9feb4e7
DJ
3415if test "$enable_profiling" = yes ; then
3416 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3417 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3418 fi
3419 PROFILE_CFLAGS=-pg
3420 OLD_CFLAGS="$CFLAGS"
3421 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3422
d9feb4e7 3423 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
9cc52bde 3424echo "configure:3425: checking whether $CC supports -pg" >&5
d9feb4e7 3425if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3426 echo $ac_n "(cached) $ac_c" 1>&6
3427else
3428 cat > conftest.$ac_ext <<EOF
9cc52bde 3429#line 3430 "configure"
d28f9cdf 3430#include "confdefs.h"
d28f9cdf
DJ
3431
3432int main() {
d9feb4e7 3433int x;
d28f9cdf
DJ
3434; return 0; }
3435EOF
9cc52bde 3436if { (eval echo configure:3437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3437 rm -rf conftest*
d9feb4e7 3438 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3439else
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3442 rm -rf conftest*
d9feb4e7 3443 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3444fi
3445rm -f conftest*
3446fi
3447
d9feb4e7 3448echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3449
d9feb4e7
DJ
3450 if test $ac_cv_cc_supports_pg = no; then
3451 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3452 fi
d28f9cdf
DJ
3453
3454 CFLAGS="$OLD_CFLAGS"
3455fi
3456
8bb2c122
MK
3457# --------------------- #
3458# Checks for programs. #
3459# --------------------- #
3460
d836ee13 3461for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3462do
3463# Extract the first word of "$ac_prog", so it can be a program name with args.
3464set dummy $ac_prog; ac_word=$2
3465echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3466echo "configure:3467: checking for $ac_word" >&5
7a292a7a
SS
3467if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3469else
3470 if test -n "$AWK"; then
3471 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3472else
3473 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3474 ac_dummy="$PATH"
3475 for ac_dir in $ac_dummy; do
3476 test -z "$ac_dir" && ac_dir=.
3477 if test -f $ac_dir/$ac_word; then
3478 ac_cv_prog_AWK="$ac_prog"
3479 break
3480 fi
3481 done
3482 IFS="$ac_save_ifs"
3483fi
3484fi
3485AWK="$ac_cv_prog_AWK"
3486if test -n "$AWK"; then
3487 echo "$ac_t""$AWK" 1>&6
3488else
3489 echo "$ac_t""no" 1>&6
3490fi
3491
3492test -n "$AWK" && break
3493done
3494
c906108c
SS
3495# Find a good install program. We prefer a C program (faster),
3496# so one script is as good as another. But avoid the broken or
3497# incompatible versions:
3498# SysV /etc/install, /usr/sbin/install
3499# SunOS /usr/etc/install
3500# IRIX /sbin/install
3501# AIX /bin/install
3502# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3503# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3504# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3505# ./install, which can be erroneously created by make from ./install.sh.
3506echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
9cc52bde 3507echo "configure:3508: checking for a BSD compatible install" >&5
c906108c
SS
3508if test -z "$INSTALL"; then
3509if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3510 echo $ac_n "(cached) $ac_c" 1>&6
3511else
3512 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3513 for ac_dir in $PATH; do
3514 # Account for people who put trailing slashes in PATH elements.
3515 case "$ac_dir/" in
3516 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3517 *)
3518 # OSF1 and SCO ODT 3.0 have their own names for install.
3519 # Don't use installbsd from OSF since it installs stuff as root
3520 # by default.
3521 for ac_prog in ginstall scoinst install; do
3522 if test -f $ac_dir/$ac_prog; then
3523 if test $ac_prog = install &&
3524 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3525 # AIX install. It has an incompatible calling convention.
3526 :
3527 else
3528 ac_cv_path_install="$ac_dir/$ac_prog -c"
3529 break 2
3530 fi
3531 fi
3532 done
3533 ;;
3534 esac
3535 done
3536 IFS="$ac_save_IFS"
3537
3538fi
3539 if test "${ac_cv_path_install+set}" = set; then
3540 INSTALL="$ac_cv_path_install"
3541 else
3542 # As a last resort, use the slow shell script. We don't cache a
3543 # path for INSTALL within a source directory, because that will
3544 # break other packages using the cache if that directory is
3545 # removed, or if the path is relative.
3546 INSTALL="$ac_install_sh"
3547 fi
3548fi
3549echo "$ac_t""$INSTALL" 1>&6
3550
3551# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3552# It thinks the first close brace ends the variable substitution.
3553test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3554
3555test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3556
3557test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3558
8bb2c122 3559echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
9cc52bde 3560echo "configure:3561: checking whether ln -s works" >&5
8bb2c122
MK
3561if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3562 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3563else
8bb2c122
MK
3564 rm -f conftestdata
3565if ln -s X conftestdata 2>/dev/null
3566then
3567 rm -f conftestdata
3568 ac_cv_prog_LN_S="ln -s"
3569else
3570 ac_cv_prog_LN_S=ln
3571fi
3572fi
3573LN_S="$ac_cv_prog_LN_S"
3574if test "$ac_cv_prog_LN_S" = "ln -s"; then
3575 echo "$ac_t""yes" 1>&6
3576else
3577 echo "$ac_t""no" 1>&6
c906108c
SS
3578fi
3579
8bb2c122
MK
3580# Extract the first word of "ranlib", so it can be a program name with args.
3581set dummy ranlib; ac_word=$2
c906108c 3582echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3583echo "configure:3584: checking for $ac_word" >&5
8bb2c122 3584if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3585 echo $ac_n "(cached) $ac_c" 1>&6
3586else
8bb2c122
MK
3587 if test -n "$RANLIB"; then
3588 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3589else
3590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3591 ac_dummy="$PATH"
3592 for ac_dir in $ac_dummy; do
3593 test -z "$ac_dir" && ac_dir=.
3594 if test -f $ac_dir/$ac_word; then
8bb2c122 3595 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3596 break
3597 fi
3598 done
3599 IFS="$ac_save_ifs"
8bb2c122 3600 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3601fi
3602fi
8bb2c122
MK
3603RANLIB="$ac_cv_prog_RANLIB"
3604if test -n "$RANLIB"; then
3605 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3606else
3607 echo "$ac_t""no" 1>&6
3608fi
3609
8bb2c122
MK
3610for ac_prog in 'bison -y' byacc
3611do
3612# Extract the first word of "$ac_prog", so it can be a program name with args.
3613set dummy $ac_prog; ac_word=$2
c906108c 3614echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3615echo "configure:3616: checking for $ac_word" >&5
8bb2c122 3616if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
8bb2c122
MK
3619 if test -n "$YACC"; then
3620 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3621else
3622 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625 test -z "$ac_dir" && ac_dir=.
3626 if test -f $ac_dir/$ac_word; then
8bb2c122 3627 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3628 break
3629 fi
3630 done
3631 IFS="$ac_save_ifs"
3632fi
3633fi
8bb2c122
MK
3634YACC="$ac_cv_prog_YACC"
3635if test -n "$YACC"; then
3636 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3637else
3638 echo "$ac_t""no" 1>&6
3639fi
3640
8bb2c122
MK
3641test -n "$YACC" && break
3642done
3643test -n "$YACC" || YACC="yacc"
c906108c 3644
8bb2c122
MK
3645
3646# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3647set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3648echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3649echo "configure:3650: checking for $ac_word" >&5
8bb2c122 3650if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3651 echo $ac_n "(cached) $ac_c" 1>&6
3652else
8bb2c122
MK
3653 if test -n "$AR"; then
3654 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3655else
3656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3657 ac_dummy="$PATH"
3658 for ac_dir in $ac_dummy; do
3659 test -z "$ac_dir" && ac_dir=.
3660 if test -f $ac_dir/$ac_word; then
8bb2c122 3661 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3662 break
3663 fi
3664 done
3665 IFS="$ac_save_ifs"
8bb2c122 3666 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3667fi
3668fi
8bb2c122
MK
3669AR="$ac_cv_prog_AR"
3670if test -n "$AR"; then
3671 echo "$ac_t""$AR" 1>&6
c906108c
SS
3672else
3673 echo "$ac_t""no" 1>&6
3674fi
3675
8bb2c122 3676
c906108c 3677
95ca63c4
CF
3678# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3679set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3680echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3681echo "configure:3682: checking for $ac_word" >&5
95ca63c4
CF
3682if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3683 echo $ac_n "(cached) $ac_c" 1>&6
3684else
3685 if test -n "$DLLTOOL"; then
3686 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3687else
3688 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691 test -z "$ac_dir" && ac_dir=.
3692 if test -f $ac_dir/$ac_word; then
3693 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3694 break
3695 fi
3696 done
3697 IFS="$ac_save_ifs"
3698 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3699fi
3700fi
3701DLLTOOL="$ac_cv_prog_DLLTOOL"
3702if test -n "$DLLTOOL"; then
3703 echo "$ac_t""$DLLTOOL" 1>&6
3704else
3705 echo "$ac_t""no" 1>&6
3706fi
3707
3708
3709
3710# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3711set dummy ${ac_tool_prefix}windres; ac_word=$2
3712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3713echo "configure:3714: checking for $ac_word" >&5
95ca63c4
CF
3714if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716else
3717 if test -n "$WINDRES"; then
3718 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3719else
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 ac_dummy="$PATH"
3722 for ac_dir in $ac_dummy; do
3723 test -z "$ac_dir" && ac_dir=.
3724 if test -f $ac_dir/$ac_word; then
3725 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3726 break
3727 fi
3728 done
3729 IFS="$ac_save_ifs"
3730 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3731fi
3732fi
3733WINDRES="$ac_cv_prog_WINDRES"
3734if test -n "$WINDRES"; then
3735 echo "$ac_t""$WINDRES" 1>&6
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739
3740
3741
c906108c 3742
8bb2c122 3743# Needed for GNU/Hurd.
75c6e08a
MK
3744# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3745set dummy ${ac_tool_prefix}mig; ac_word=$2
3746echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc52bde 3747echo "configure:3748: checking for $ac_word" >&5
75c6e08a
MK
3748if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3749 echo $ac_n "(cached) $ac_c" 1>&6
3750else
3751 if test -n "$MIG"; then
3752 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3753else
3754 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3755 ac_dummy="$PATH"
3756 for ac_dir in $ac_dummy; do
3757 test -z "$ac_dir" && ac_dir=.
3758 if test -f $ac_dir/$ac_word; then
3759 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3760 break
3761 fi
3762 done
3763 IFS="$ac_save_ifs"
3764 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3765fi
3766fi
3767MIG="$ac_cv_prog_MIG"
3768if test -n "$MIG"; then
3769 echo "$ac_t""$MIG" 1>&6
3770else
3771 echo "$ac_t""no" 1>&6
3772fi
3773
3774
3775
3776
9a156167
MK
3777# ---------------------- #
3778# Checks for libraries. #
3779# ---------------------- #
3780
3781# We might need to link with -lm; most simulators need it.
3782echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
9cc52bde 3783echo "configure:3784: checking for main in -lm" >&5
9a156167
MK
3784ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3786 echo $ac_n "(cached) $ac_c" 1>&6
3787else
3788 ac_save_LIBS="$LIBS"
3789LIBS="-lm $LIBS"
3790cat > conftest.$ac_ext <<EOF
9cc52bde 3791#line 3792 "configure"
9a156167
MK
3792#include "confdefs.h"
3793
3794int main() {
3795main()
3796; return 0; }
3797EOF
9cc52bde 3798if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3799 rm -rf conftest*
3800 eval "ac_cv_lib_$ac_lib_var=yes"
3801else
3802 echo "configure: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 rm -rf conftest*
3805 eval "ac_cv_lib_$ac_lib_var=no"
3806fi
3807rm -f conftest*
3808LIBS="$ac_save_LIBS"
3809
3810fi
3811if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3812 echo "$ac_t""yes" 1>&6
3813 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3814 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3815 cat >> confdefs.h <<EOF
3816#define $ac_tr_lib 1
3817EOF
3818
3819 LIBS="-lm $LIBS"
3820
3821else
3822 echo "$ac_t""no" 1>&6
3823fi
3824
3825
3826# We need to link with -lw to get `wctype' on Solaris before Solaris
3827# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3828# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3829# is known to have this problem). Therefore we avoid libw if we can.
3830echo $ac_n "checking for wctype""... $ac_c" 1>&6
9cc52bde 3831echo "configure:3832: checking for wctype" >&5
9a156167
MK
3832if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3833 echo $ac_n "(cached) $ac_c" 1>&6
3834else
3835 cat > conftest.$ac_ext <<EOF
9cc52bde 3836#line 3837 "configure"
9a156167
MK
3837#include "confdefs.h"
3838/* System header to define __stub macros and hopefully few prototypes,
3839 which can conflict with char wctype(); below. */
3840#include <assert.h>
3841/* Override any gcc2 internal prototype to avoid an error. */
3842/* We use char because int might match the return type of a gcc2
3843 builtin and then its argument prototype would still apply. */
3844char wctype();
3845
3846int main() {
3847
3848/* The GNU C library defines this for functions which it implements
3849 to always fail with ENOSYS. Some functions are actually named
3850 something starting with __ and the normal name is an alias. */
3851#if defined (__stub_wctype) || defined (__stub___wctype)
3852choke me
3853#else
3854wctype();
3855#endif
3856
3857; return 0; }
3858EOF
9cc52bde 3859if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3860 rm -rf conftest*
3861 eval "ac_cv_func_wctype=yes"
3862else
3863 echo "configure: failed program was:" >&5
3864 cat conftest.$ac_ext >&5
3865 rm -rf conftest*
3866 eval "ac_cv_func_wctype=no"
3867fi
3868rm -f conftest*
3869fi
3870
3871if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3872 echo "$ac_t""yes" 1>&6
3873 :
3874else
3875 echo "$ac_t""no" 1>&6
3876echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
9cc52bde 3877echo "configure:3878: checking for wctype in -lw" >&5
9a156167
MK
3878ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3879if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3881else
3882 ac_save_LIBS="$LIBS"
3883LIBS="-lw $LIBS"
3884cat > conftest.$ac_ext <<EOF
9cc52bde 3885#line 3886 "configure"
9a156167
MK
3886#include "confdefs.h"
3887/* Override any gcc2 internal prototype to avoid an error. */
3888/* We use char because int might match the return type of a gcc2
3889 builtin and then its argument prototype would still apply. */
3890char wctype();
3891
3892int main() {
3893wctype()
3894; return 0; }
3895EOF
9cc52bde 3896if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3897 rm -rf conftest*
3898 eval "ac_cv_lib_$ac_lib_var=yes"
3899else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 eval "ac_cv_lib_$ac_lib_var=no"
3904fi
3905rm -f conftest*
3906LIBS="$ac_save_LIBS"
3907
3908fi
3909if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3910 echo "$ac_t""yes" 1>&6
3911 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3912 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3913 cat >> confdefs.h <<EOF
3914#define $ac_tr_lib 1
3915EOF
3916
3917 LIBS="-lw $LIBS"
3918
3919else
3920 echo "$ac_t""no" 1>&6
3921fi
3922
3923fi
3924
3925
c890192f
MK
3926# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3927
3928echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
9cc52bde 3929echo "configure:3930: checking for library containing gethostbyname" >&5
c890192f
MK
3930if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3931 echo $ac_n "(cached) $ac_c" 1>&6
3932else
3933 ac_func_search_save_LIBS="$LIBS"
3934ac_cv_search_gethostbyname="no"
3935cat > conftest.$ac_ext <<EOF
9cc52bde 3936#line 3937 "configure"
c890192f
MK
3937#include "confdefs.h"
3938/* Override any gcc2 internal prototype to avoid an error. */
3939/* We use char because int might match the return type of a gcc2
3940 builtin and then its argument prototype would still apply. */
3941char gethostbyname();
3942
3943int main() {
3944gethostbyname()
3945; return 0; }
3946EOF
9cc52bde 3947if { (eval echo configure:3948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3948 rm -rf conftest*
3949 ac_cv_search_gethostbyname="none required"
3950else
3951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953fi
3954rm -f conftest*
3955test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3956LIBS="-l$i $ac_func_search_save_LIBS"
3957cat > conftest.$ac_ext <<EOF
9cc52bde 3958#line 3959 "configure"
c890192f
MK
3959#include "confdefs.h"
3960/* Override any gcc2 internal prototype to avoid an error. */
3961/* We use char because int might match the return type of a gcc2
3962 builtin and then its argument prototype would still apply. */
3963char gethostbyname();
3964
3965int main() {
3966gethostbyname()
3967; return 0; }
3968EOF
9cc52bde 3969if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3970 rm -rf conftest*
3971 ac_cv_search_gethostbyname="-l$i"
3972break
3973else
3974 echo "configure: failed program was:" >&5
3975 cat conftest.$ac_ext >&5
3976fi
3977rm -f conftest*
3978done
3979LIBS="$ac_func_search_save_LIBS"
3980fi
3981
3982echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3983if test "$ac_cv_search_gethostbyname" != "no"; then
3984 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3985
3986else :
3987
3988fi
3989
9a156167
MK
3990# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3991
3992echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
9cc52bde 3993echo "configure:3994: checking for library containing socketpair" >&5
9a156167
MK
3994if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3995 echo $ac_n "(cached) $ac_c" 1>&6
3996else
3997 ac_func_search_save_LIBS="$LIBS"
3998ac_cv_search_socketpair="no"
3999cat > conftest.$ac_ext <<EOF
9cc52bde 4000#line 4001 "configure"
9a156167
MK
4001#include "confdefs.h"
4002/* Override any gcc2 internal prototype to avoid an error. */
4003/* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005char socketpair();
4006
4007int main() {
4008socketpair()
4009; return 0; }
4010EOF
9cc52bde 4011if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4012 rm -rf conftest*
4013 ac_cv_search_socketpair="none required"
4014else
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017fi
4018rm -f conftest*
4019test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4020LIBS="-l$i $ac_func_search_save_LIBS"
4021cat > conftest.$ac_ext <<EOF
9cc52bde 4022#line 4023 "configure"
9a156167
MK
4023#include "confdefs.h"
4024/* Override any gcc2 internal prototype to avoid an error. */
4025/* We use char because int might match the return type of a gcc2
4026 builtin and then its argument prototype would still apply. */
4027char socketpair();
4028
4029int main() {
4030socketpair()
4031; return 0; }
4032EOF
9cc52bde 4033if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4034 rm -rf conftest*
4035 ac_cv_search_socketpair="-l$i"
4036break
4037else
4038 echo "configure: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040fi
4041rm -f conftest*
4042done
4043LIBS="$ac_func_search_save_LIBS"
4044fi
4045
4046echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4047if test "$ac_cv_search_socketpair" != "no"; then
4048 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4049
4050else :
4051
4052fi
4053
4f0be353
MK
4054# For the TUI, we need enhanced curses functionality.
4055#
4056# FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
4057# curses library because the latter might not provide all the
4058# functionality we need. However, this leads to problems on systems
4059# where the linker searches /usr/local/lib, but the compiler doesn't
8b9cf735 4060# search /usr/local/include, if ncurses is installed in /usr/local. A
4f0be353
MK
4061# default installation of ncurses on alpha*-dec-osf* will lead to such
4062# a situation.
06825bd1 4063
8b9cf735 4064echo $ac_n "checking for library containing waddstr""... $ac_c" 1>&6
9cc52bde 4065echo "configure:4066: checking for library containing waddstr" >&5
8b9cf735 4066if eval "test \"`echo '$''{'ac_cv_search_waddstr'+set}'`\" = set"; then
06825bd1
MK
4067 echo $ac_n "(cached) $ac_c" 1>&6
4068else
4069 ac_func_search_save_LIBS="$LIBS"
8b9cf735 4070ac_cv_search_waddstr="no"
06825bd1 4071cat > conftest.$ac_ext <<EOF
9cc52bde 4072#line 4073 "configure"
06825bd1
MK
4073#include "confdefs.h"
4074/* Override any gcc2 internal prototype to avoid an error. */
4075/* We use char because int might match the return type of a gcc2
4076 builtin and then its argument prototype would still apply. */
8b9cf735 4077char waddstr();
06825bd1
MK
4078
4079int main() {
8b9cf735 4080waddstr()
06825bd1
MK
4081; return 0; }
4082EOF
9cc52bde 4083if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1 4084 rm -rf conftest*
8b9cf735 4085 ac_cv_search_waddstr="none required"
06825bd1
MK
4086else
4087 echo "configure: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089fi
4090rm -f conftest*
8b9cf735 4091test "$ac_cv_search_waddstr" = "no" && for i in ncurses cursesX curses; do
06825bd1
MK
4092LIBS="-l$i $ac_func_search_save_LIBS"
4093cat > conftest.$ac_ext <<EOF
9cc52bde 4094#line 4095 "configure"
06825bd1
MK
4095#include "confdefs.h"
4096/* Override any gcc2 internal prototype to avoid an error. */
4097/* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
8b9cf735 4099char waddstr();
06825bd1
MK
4100
4101int main() {
8b9cf735 4102waddstr()
06825bd1
MK
4103; return 0; }
4104EOF
9cc52bde 4105if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1 4106 rm -rf conftest*
8b9cf735 4107 ac_cv_search_waddstr="-l$i"
06825bd1
MK
4108break
4109else
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112fi
4113rm -f conftest*
4114done
4115LIBS="$ac_func_search_save_LIBS"
4116fi
4117
8b9cf735
MK
4118echo "$ac_t""$ac_cv_search_waddstr" 1>&6
4119if test "$ac_cv_search_waddstr" != "no"; then
4120 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
06825bd1
MK
4121
4122else :
4123
4124fi
4f0be353 4125
4f0be353
MK
4126# Since GDB uses Readline, we need termcap functionality. In many
4127# cases this will be provided by the curses library, but some systems
4128# have a seperate termcap library, or no curses library at all.
4129
4130case $host_os in
4131 cygwin*)
4132 if test -d $srcdir/libtermcap; then
4133 LIBS="../libtermcap/libtermcap.a $LIBS"
4134 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4135 fi ;;
4136 go32* | *djgpp*)
4137 ac_cv_search_tgetent="none required"
06825bd1
MK
4138 ;;
4139esac
4140
4f0be353 4141# These are the libraries checked by Readline.
06825bd1
MK
4142
4143echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
9cc52bde 4144echo "configure:4145: checking for library containing tgetent" >&5
06825bd1
MK
4145if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147else
4148 ac_func_search_save_LIBS="$LIBS"
4149ac_cv_search_tgetent="no"
4150cat > conftest.$ac_ext <<EOF
9cc52bde 4151#line 4152 "configure"
06825bd1
MK
4152#include "confdefs.h"
4153/* Override any gcc2 internal prototype to avoid an error. */
4154/* We use char because int might match the return type of a gcc2
4155 builtin and then its argument prototype would still apply. */
4156char tgetent();
4157
4158int main() {
4159tgetent()
4160; return 0; }
4161EOF
9cc52bde 4162if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4163 rm -rf conftest*
4164 ac_cv_search_tgetent="none required"
4165else
4166 echo "configure: failed program was:" >&5
4167 cat conftest.$ac_ext >&5
4168fi
4169rm -f conftest*
4f0be353 4170test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo curses ncurses; do
06825bd1
MK
4171LIBS="-l$i $ac_func_search_save_LIBS"
4172cat > conftest.$ac_ext <<EOF
9cc52bde 4173#line 4174 "configure"
06825bd1
MK
4174#include "confdefs.h"
4175/* Override any gcc2 internal prototype to avoid an error. */
4176/* We use char because int might match the return type of a gcc2
4177 builtin and then its argument prototype would still apply. */
4178char tgetent();
4179
4180int main() {
4181tgetent()
4182; return 0; }
4183EOF
9cc52bde 4184if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4185 rm -rf conftest*
4186 ac_cv_search_tgetent="-l$i"
4187break
4188else
4189 echo "configure: failed program was:" >&5
4190 cat conftest.$ac_ext >&5
4191fi
4192rm -f conftest*
4193done
4194LIBS="$ac_func_search_save_LIBS"
4195fi
4196
4197echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4198if test "$ac_cv_search_tgetent" != "no"; then
4199 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4200
4201else :
4202
4203fi
4204
4205if test "$ac_cv_search_tgetent" = no; then
4206 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4207fi
4208
5ee754fc
MK
4209# ------------------------- #
4210# Checks for header files. #
4211# ------------------------- #
4212
4213ac_header_dirent=no
4214for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4215do
4216ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4217echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9cc52bde 4218echo "configure:4219: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4219if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4220 echo $ac_n "(cached) $ac_c" 1>&6
4221else
4222 cat > conftest.$ac_ext <<EOF
9cc52bde 4223#line 4224 "configure"
c906108c
SS
4224#include "confdefs.h"
4225#include <sys/types.h>
5ee754fc
MK
4226#include <$ac_hdr>
4227int main() {
4228DIR *dirp = 0;
4229; return 0; }
4230EOF
9cc52bde 4231if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4232 rm -rf conftest*
4233 eval "ac_cv_header_dirent_$ac_safe=yes"
4234else
4235 echo "configure: failed program was:" >&5
4236 cat conftest.$ac_ext >&5
4237 rm -rf conftest*
4238 eval "ac_cv_header_dirent_$ac_safe=no"
4239fi
4240rm -f conftest*
4241fi
4242if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4243 echo "$ac_t""yes" 1>&6
4244 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4245 cat >> confdefs.h <<EOF
4246#define $ac_tr_hdr 1
4247EOF
4248 ac_header_dirent=$ac_hdr; break
4249else
4250 echo "$ac_t""no" 1>&6
4251fi
4252done
4253# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4254if test $ac_header_dirent = dirent.h; then
4255echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9cc52bde 4256echo "configure:4257: checking for opendir in -ldir" >&5
5ee754fc
MK
4257ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4258if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4260else
4261 ac_save_LIBS="$LIBS"
4262LIBS="-ldir $LIBS"
4263cat > conftest.$ac_ext <<EOF
9cc52bde 4264#line 4265 "configure"
5ee754fc
MK
4265#include "confdefs.h"
4266/* Override any gcc2 internal prototype to avoid an error. */
4267/* We use char because int might match the return type of a gcc2
4268 builtin and then its argument prototype would still apply. */
4269char opendir();
c906108c
SS
4270
4271int main() {
5ee754fc 4272opendir()
c906108c
SS
4273; return 0; }
4274EOF
9cc52bde 4275if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4276 rm -rf conftest*
5ee754fc 4277 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4278else
4279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
4281 rm -rf conftest*
5ee754fc 4282 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4283fi
4284rm -f conftest*
5ee754fc
MK
4285LIBS="$ac_save_LIBS"
4286
4287fi
4288if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289 echo "$ac_t""yes" 1>&6
4290 LIBS="$LIBS -ldir"
4291else
4292 echo "$ac_t""no" 1>&6
c906108c
SS
4293fi
4294
5ee754fc
MK
4295else
4296echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9cc52bde 4297echo "configure:4298: checking for opendir in -lx" >&5
5ee754fc
MK
4298ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4299if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4300 echo $ac_n "(cached) $ac_c" 1>&6
4301else
4302 ac_save_LIBS="$LIBS"
4303LIBS="-lx $LIBS"
4304cat > conftest.$ac_ext <<EOF
9cc52bde 4305#line 4306 "configure"
5ee754fc
MK
4306#include "confdefs.h"
4307/* Override any gcc2 internal prototype to avoid an error. */
4308/* We use char because int might match the return type of a gcc2
4309 builtin and then its argument prototype would still apply. */
4310char opendir();
4311
4312int main() {
4313opendir()
4314; return 0; }
c906108c 4315EOF
9cc52bde 4316if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4317 rm -rf conftest*
4318 eval "ac_cv_lib_$ac_lib_var=yes"
4319else
4320 echo "configure: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
4322 rm -rf conftest*
4323 eval "ac_cv_lib_$ac_lib_var=no"
4324fi
4325rm -f conftest*
4326LIBS="$ac_save_LIBS"
c906108c 4327
5ee754fc
MK
4328fi
4329if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4330 echo "$ac_t""yes" 1>&6
4331 LIBS="$LIBS -lx"
4332else
4333 echo "$ac_t""no" 1>&6
4334fi
c906108c 4335
5ee754fc 4336fi
c906108c 4337
5ee754fc 4338echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
9cc52bde 4339echo "configure:4340: checking whether stat file-mode macros are broken" >&5
5ee754fc 4340if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4341 echo $ac_n "(cached) $ac_c" 1>&6
4342else
4343 cat > conftest.$ac_ext <<EOF
9cc52bde 4344#line 4345 "configure"
9608ab8b
MK
4345#include "confdefs.h"
4346#include <sys/types.h>
5ee754fc
MK
4347#include <sys/stat.h>
4348
4349#if defined(S_ISBLK) && defined(S_IFDIR)
4350# if S_ISBLK (S_IFDIR)
4351You lose.
4352# endif
4353#endif
4354
4355#if defined(S_ISBLK) && defined(S_IFCHR)
4356# if S_ISBLK (S_IFCHR)
4357You lose.
4358# endif
4359#endif
4360
4361#if defined(S_ISLNK) && defined(S_IFREG)
4362# if S_ISLNK (S_IFREG)
4363You lose.
4364# endif
4365#endif
4366
4367#if defined(S_ISSOCK) && defined(S_IFREG)
4368# if S_ISSOCK (S_IFREG)
4369You lose.
4370# endif
4371#endif
4372
9608ab8b 4373EOF
5ee754fc
MK
4374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4375 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4376 rm -rf conftest*
5ee754fc
MK
4377 ac_cv_header_stat_broken=yes
4378else
4379 rm -rf conftest*
4380 ac_cv_header_stat_broken=no
4381fi
4382rm -f conftest*
4383
4384fi
4385
4386echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4387if test $ac_cv_header_stat_broken = yes; then
4388 cat >> confdefs.h <<\EOF
4389#define STAT_MACROS_BROKEN 1
4390EOF
4391
4392fi
4393
4394echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9cc52bde 4395echo "configure:4396: checking for ANSI C header files" >&5
5ee754fc
MK
4396if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4397 echo $ac_n "(cached) $ac_c" 1>&6
4398else
4399 cat > conftest.$ac_ext <<EOF
9cc52bde 4400#line 4401 "configure"
5ee754fc
MK
4401#include "confdefs.h"
4402#include <stdlib.h>
4403#include <stdarg.h>
4404#include <string.h>
4405#include <float.h>
4406EOF
4407ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4408{ (eval echo configure:4409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4409ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4410if test -z "$ac_err"; then
4411 rm -rf conftest*
4412 ac_cv_header_stdc=yes
4413else
4414 echo "$ac_err" >&5
4415 echo "configure: failed program was:" >&5
4416 cat conftest.$ac_ext >&5
4417 rm -rf conftest*
4418 ac_cv_header_stdc=no
4419fi
4420rm -f conftest*
4421
4422if test $ac_cv_header_stdc = yes; then
4423 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4424cat > conftest.$ac_ext <<EOF
9cc52bde 4425#line 4426 "configure"
5ee754fc
MK
4426#include "confdefs.h"
4427#include <string.h>
4428EOF
4429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4430 egrep "memchr" >/dev/null 2>&1; then
4431 :
4432else
4433 rm -rf conftest*
4434 ac_cv_header_stdc=no
4435fi
4436rm -f conftest*
4437
4438fi
4439
4440if test $ac_cv_header_stdc = yes; then
4441 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4442cat > conftest.$ac_ext <<EOF
9cc52bde 4443#line 4444 "configure"
5ee754fc
MK
4444#include "confdefs.h"
4445#include <stdlib.h>
4446EOF
4447if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4448 egrep "free" >/dev/null 2>&1; then
4449 :
4450else
4451 rm -rf conftest*
4452 ac_cv_header_stdc=no
4453fi
4454rm -f conftest*
4455
4456fi
4457
4458if test $ac_cv_header_stdc = yes; then
4459 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4460if test "$cross_compiling" = yes; then
4461 :
4462else
4463 cat > conftest.$ac_ext <<EOF
9cc52bde 4464#line 4465 "configure"
5ee754fc
MK
4465#include "confdefs.h"
4466#include <ctype.h>
4467#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4468#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4469#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4470int main () { int i; for (i = 0; i < 256; i++)
4471if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4472exit (0); }
4473
4474EOF
9cc52bde 4475if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4476then
4477 :
9608ab8b 4478else
5ee754fc
MK
4479 echo "configure: failed program was:" >&5
4480 cat conftest.$ac_ext >&5
4481 rm -fr conftest*
4482 ac_cv_header_stdc=no
4483fi
4484rm -fr conftest*
4485fi
4486
4487fi
4488fi
4489
4490echo "$ac_t""$ac_cv_header_stdc" 1>&6
4491if test $ac_cv_header_stdc = yes; then
4492 cat >> confdefs.h <<\EOF
4493#define STDC_HEADERS 1
4494EOF
4495
4496fi
4497
4498for ac_hdr in link.h
4499do
4500ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4501echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4502echo "configure:4503: checking for $ac_hdr" >&5
5ee754fc
MK
4503if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505else
4506 cat > conftest.$ac_ext <<EOF
9cc52bde 4507#line 4508 "configure"
5ee754fc
MK
4508#include "confdefs.h"
4509#include <$ac_hdr>
4510EOF
4511ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4512{ (eval echo configure:4513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4513ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4514if test -z "$ac_err"; then
4515 rm -rf conftest*
4516 eval "ac_cv_header_$ac_safe=yes"
4517else
4518 echo "$ac_err" >&5
4519 echo "configure: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 rm -rf conftest*
4522 eval "ac_cv_header_$ac_safe=no"
4523fi
4524rm -f conftest*
4525fi
4526if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4527 echo "$ac_t""yes" 1>&6
4528 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4529 cat >> confdefs.h <<EOF
4530#define $ac_tr_hdr 1
4531EOF
4532
4533else
4534 echo "$ac_t""no" 1>&6
4535fi
4536done
4537
78434e59 4538for ac_hdr in machine/reg.h
5ee754fc
MK
4539do
4540ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4541echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4542echo "configure:4543: checking for $ac_hdr" >&5
5ee754fc
MK
4543if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4544 echo $ac_n "(cached) $ac_c" 1>&6
4545else
4546 cat > conftest.$ac_ext <<EOF
9cc52bde 4547#line 4548 "configure"
5ee754fc
MK
4548#include "confdefs.h"
4549#include <$ac_hdr>
4550EOF
4551ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4552{ (eval echo configure:4553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4553ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4554if test -z "$ac_err"; then
4555 rm -rf conftest*
4556 eval "ac_cv_header_$ac_safe=yes"
4557else
4558 echo "$ac_err" >&5
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 eval "ac_cv_header_$ac_safe=no"
4563fi
4564rm -f conftest*
4565fi
4566if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4567 echo "$ac_t""yes" 1>&6
4568 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4569 cat >> confdefs.h <<EOF
4570#define $ac_tr_hdr 1
4571EOF
4572
4573else
4574 echo "$ac_t""no" 1>&6
4575fi
4576done
4577
78434e59 4578for ac_hdr in nlist.h
5ee754fc
MK
4579do
4580ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4581echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4582echo "configure:4583: checking for $ac_hdr" >&5
5ee754fc
MK
4583if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4584 echo $ac_n "(cached) $ac_c" 1>&6
4585else
4586 cat > conftest.$ac_ext <<EOF
9cc52bde 4587#line 4588 "configure"
5ee754fc
MK
4588#include "confdefs.h"
4589#include <$ac_hdr>
4590EOF
4591ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4592{ (eval echo configure:4593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4593ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4594if test -z "$ac_err"; then
4595 rm -rf conftest*
4596 eval "ac_cv_header_$ac_safe=yes"
4597else
4598 echo "$ac_err" >&5
4599 echo "configure: failed program was:" >&5
4600 cat conftest.$ac_ext >&5
4601 rm -rf conftest*
4602 eval "ac_cv_header_$ac_safe=no"
4603fi
4604rm -f conftest*
4605fi
4606if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4607 echo "$ac_t""yes" 1>&6
4608 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4609 cat >> confdefs.h <<EOF
4610#define $ac_tr_hdr 1
4611EOF
4612
4613else
4614 echo "$ac_t""no" 1>&6
4615fi
4616done
4617
78434e59 4618for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4619do
4620ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4621echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4622echo "configure:4623: checking for $ac_hdr" >&5
5ee754fc
MK
4623if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4624 echo $ac_n "(cached) $ac_c" 1>&6
4625else
4626 cat > conftest.$ac_ext <<EOF
9cc52bde 4627#line 4628 "configure"
5ee754fc
MK
4628#include "confdefs.h"
4629#include <$ac_hdr>
4630EOF
4631ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4632{ (eval echo configure:4633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4633ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4634if test -z "$ac_err"; then
4635 rm -rf conftest*
4636 eval "ac_cv_header_$ac_safe=yes"
4637else
4638 echo "$ac_err" >&5
4639 echo "configure: failed program was:" >&5
4640 cat conftest.$ac_ext >&5
4641 rm -rf conftest*
4642 eval "ac_cv_header_$ac_safe=no"
4643fi
4644rm -f conftest*
4645fi
4646if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4647 echo "$ac_t""yes" 1>&6
4648 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4649 cat >> confdefs.h <<EOF
4650#define $ac_tr_hdr 1
4651EOF
4652
4653else
4654 echo "$ac_t""no" 1>&6
4655fi
4656done
4657
a2f23071 4658for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4659do
4660ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4661echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4662echo "configure:4663: checking for $ac_hdr" >&5
5ee754fc
MK
4663if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4665else
4666 cat > conftest.$ac_ext <<EOF
9cc52bde 4667#line 4668 "configure"
5ee754fc
MK
4668#include "confdefs.h"
4669#include <$ac_hdr>
4670EOF
4671ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4672{ (eval echo configure:4673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4673ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4674if test -z "$ac_err"; then
4675 rm -rf conftest*
4676 eval "ac_cv_header_$ac_safe=yes"
4677else
4678 echo "$ac_err" >&5
4679 echo "configure: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4681 rm -rf conftest*
4682 eval "ac_cv_header_$ac_safe=no"
4683fi
4684rm -f conftest*
4685fi
4686if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4687 echo "$ac_t""yes" 1>&6
4688 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4689 cat >> confdefs.h <<EOF
4690#define $ac_tr_hdr 1
4691EOF
4692
4693else
4694 echo "$ac_t""no" 1>&6
4695fi
4696done
4697
78434e59 4698for ac_hdr in stddef.h
5ee754fc
MK
4699do
4700ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4701echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4702echo "configure:4703: checking for $ac_hdr" >&5
5ee754fc
MK
4703if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4704 echo $ac_n "(cached) $ac_c" 1>&6
4705else
4706 cat > conftest.$ac_ext <<EOF
9cc52bde 4707#line 4708 "configure"
5ee754fc
MK
4708#include "confdefs.h"
4709#include <$ac_hdr>
4710EOF
4711ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4712{ (eval echo configure:4713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4713ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4714if test -z "$ac_err"; then
4715 rm -rf conftest*
4716 eval "ac_cv_header_$ac_safe=yes"
4717else
4718 echo "$ac_err" >&5
4719 echo "configure: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
4721 rm -rf conftest*
4722 eval "ac_cv_header_$ac_safe=no"
4723fi
4724rm -f conftest*
4725fi
4726if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4727 echo "$ac_t""yes" 1>&6
4728 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4729 cat >> confdefs.h <<EOF
4730#define $ac_tr_hdr 1
4731EOF
4732
4733else
4734 echo "$ac_t""no" 1>&6
4735fi
4736done
4737
78434e59 4738for ac_hdr in stdlib.h
5ee754fc
MK
4739do
4740ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4741echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4742echo "configure:4743: checking for $ac_hdr" >&5
5ee754fc
MK
4743if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745else
4746 cat > conftest.$ac_ext <<EOF
9cc52bde 4747#line 4748 "configure"
5ee754fc
MK
4748#include "confdefs.h"
4749#include <$ac_hdr>
4750EOF
4751ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4752{ (eval echo configure:4753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4753ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4754if test -z "$ac_err"; then
4755 rm -rf conftest*
4756 eval "ac_cv_header_$ac_safe=yes"
4757else
4758 echo "$ac_err" >&5
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 eval "ac_cv_header_$ac_safe=no"
4763fi
4764rm -f conftest*
4765fi
4766if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4769 cat >> confdefs.h <<EOF
4770#define $ac_tr_hdr 1
4771EOF
4772
4773else
4774 echo "$ac_t""no" 1>&6
4775fi
4776done
4777
78434e59 4778for ac_hdr in stdint.h
5ee754fc
MK
4779do
4780ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4781echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4782echo "configure:4783: checking for $ac_hdr" >&5
5ee754fc
MK
4783if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4784 echo $ac_n "(cached) $ac_c" 1>&6
4785else
4786 cat > conftest.$ac_ext <<EOF
9cc52bde 4787#line 4788 "configure"
5ee754fc
MK
4788#include "confdefs.h"
4789#include <$ac_hdr>
4790EOF
4791ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4792{ (eval echo configure:4793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4793ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4794if test -z "$ac_err"; then
4795 rm -rf conftest*
4796 eval "ac_cv_header_$ac_safe=yes"
4797else
4798 echo "$ac_err" >&5
4799 echo "configure: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
4801 rm -rf conftest*
4802 eval "ac_cv_header_$ac_safe=no"
4803fi
4804rm -f conftest*
4805fi
4806if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4807 echo "$ac_t""yes" 1>&6
4808 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4809 cat >> confdefs.h <<EOF
4810#define $ac_tr_hdr 1
4811EOF
4812
4813else
4814 echo "$ac_t""no" 1>&6
4815fi
4816done
4817
78434e59 4818for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4819do
4820ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4821echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4822echo "configure:4823: checking for $ac_hdr" >&5
5ee754fc
MK
4823if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4824 echo $ac_n "(cached) $ac_c" 1>&6
4825else
4826 cat > conftest.$ac_ext <<EOF
9cc52bde 4827#line 4828 "configure"
5ee754fc
MK
4828#include "confdefs.h"
4829#include <$ac_hdr>
4830EOF
4831ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4832{ (eval echo configure:4833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4833ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4834if test -z "$ac_err"; then
4835 rm -rf conftest*
4836 eval "ac_cv_header_$ac_safe=yes"
4837else
4838 echo "$ac_err" >&5
4839 echo "configure: failed program was:" >&5
4840 cat conftest.$ac_ext >&5
4841 rm -rf conftest*
4842 eval "ac_cv_header_$ac_safe=no"
4843fi
4844rm -f conftest*
4845fi
4846if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4847 echo "$ac_t""yes" 1>&6
4848 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4849 cat >> confdefs.h <<EOF
4850#define $ac_tr_hdr 1
4851EOF
4852
4853else
4854 echo "$ac_t""no" 1>&6
4855fi
4856done
4857
78434e59 4858for ac_hdr in sys/fault.h
5ee754fc
MK
4859do
4860ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4861echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4862echo "configure:4863: checking for $ac_hdr" >&5
5ee754fc
MK
4863if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4864 echo $ac_n "(cached) $ac_c" 1>&6
4865else
4866 cat > conftest.$ac_ext <<EOF
9cc52bde 4867#line 4868 "configure"
5ee754fc
MK
4868#include "confdefs.h"
4869#include <$ac_hdr>
4870EOF
4871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4872{ (eval echo configure:4873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4874if test -z "$ac_err"; then
4875 rm -rf conftest*
4876 eval "ac_cv_header_$ac_safe=yes"
4877else
4878 echo "$ac_err" >&5
4879 echo "configure: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4881 rm -rf conftest*
4882 eval "ac_cv_header_$ac_safe=no"
4883fi
4884rm -f conftest*
4885fi
4886if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4887 echo "$ac_t""yes" 1>&6
4888 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4889 cat >> confdefs.h <<EOF
4890#define $ac_tr_hdr 1
4891EOF
4892
4893else
4894 echo "$ac_t""no" 1>&6
4895fi
4896done
4897
78434e59 4898for ac_hdr in sys/file.h
5ee754fc
MK
4899do
4900ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4901echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4902echo "configure:4903: checking for $ac_hdr" >&5
5ee754fc
MK
4903if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4904 echo $ac_n "(cached) $ac_c" 1>&6
4905else
4906 cat > conftest.$ac_ext <<EOF
9cc52bde 4907#line 4908 "configure"
5ee754fc
MK
4908#include "confdefs.h"
4909#include <$ac_hdr>
4910EOF
4911ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4912{ (eval echo configure:4913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4913ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4914if test -z "$ac_err"; then
4915 rm -rf conftest*
4916 eval "ac_cv_header_$ac_safe=yes"
4917else
4918 echo "$ac_err" >&5
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -rf conftest*
4922 eval "ac_cv_header_$ac_safe=no"
4923fi
4924rm -f conftest*
4925fi
4926if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4927 echo "$ac_t""yes" 1>&6
4928 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4929 cat >> confdefs.h <<EOF
4930#define $ac_tr_hdr 1
4931EOF
4932
4933else
4934 echo "$ac_t""no" 1>&6
4935fi
4936done
4937
78434e59 4938for ac_hdr in sys/filio.h
5ee754fc
MK
4939do
4940ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4941echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4942echo "configure:4943: checking for $ac_hdr" >&5
5ee754fc
MK
4943if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4944 echo $ac_n "(cached) $ac_c" 1>&6
4945else
4946 cat > conftest.$ac_ext <<EOF
9cc52bde 4947#line 4948 "configure"
5ee754fc
MK
4948#include "confdefs.h"
4949#include <$ac_hdr>
4950EOF
4951ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4952{ (eval echo configure:4953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4953ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4954if test -z "$ac_err"; then
4955 rm -rf conftest*
4956 eval "ac_cv_header_$ac_safe=yes"
4957else
4958 echo "$ac_err" >&5
4959 echo "configure: failed program was:" >&5
4960 cat conftest.$ac_ext >&5
4961 rm -rf conftest*
4962 eval "ac_cv_header_$ac_safe=no"
4963fi
4964rm -f conftest*
4965fi
4966if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4967 echo "$ac_t""yes" 1>&6
4968 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4969 cat >> confdefs.h <<EOF
4970#define $ac_tr_hdr 1
4971EOF
4972
4973else
4974 echo "$ac_t""no" 1>&6
4975fi
4976done
4977
78434e59 4978for ac_hdr in sys/ioctl.h
5ee754fc
MK
4979do
4980ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4981echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 4982echo "configure:4983: checking for $ac_hdr" >&5
5ee754fc
MK
4983if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4984 echo $ac_n "(cached) $ac_c" 1>&6
4985else
4986 cat > conftest.$ac_ext <<EOF
9cc52bde 4987#line 4988 "configure"
5ee754fc
MK
4988#include "confdefs.h"
4989#include <$ac_hdr>
4990EOF
4991ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 4992{ (eval echo configure:4993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4993ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4994if test -z "$ac_err"; then
4995 rm -rf conftest*
4996 eval "ac_cv_header_$ac_safe=yes"
4997else
4998 echo "$ac_err" >&5
4999 echo "configure: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001 rm -rf conftest*
5002 eval "ac_cv_header_$ac_safe=no"
5003fi
5004rm -f conftest*
5005fi
5006if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5007 echo "$ac_t""yes" 1>&6
5008 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5009 cat >> confdefs.h <<EOF
5010#define $ac_tr_hdr 1
5011EOF
5012
5013else
5014 echo "$ac_t""no" 1>&6
5015fi
5016done
5017
78434e59 5018for ac_hdr in sys/param.h
5ee754fc
MK
5019do
5020ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5021echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5022echo "configure:5023: checking for $ac_hdr" >&5
5ee754fc
MK
5023if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5024 echo $ac_n "(cached) $ac_c" 1>&6
5025else
5026 cat > conftest.$ac_ext <<EOF
9cc52bde 5027#line 5028 "configure"
5ee754fc
MK
5028#include "confdefs.h"
5029#include <$ac_hdr>
5030EOF
5031ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5032{ (eval echo configure:5033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5033ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5034if test -z "$ac_err"; then
5035 rm -rf conftest*
5036 eval "ac_cv_header_$ac_safe=yes"
5037else
5038 echo "$ac_err" >&5
5039 echo "configure: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 rm -rf conftest*
5042 eval "ac_cv_header_$ac_safe=no"
5043fi
5044rm -f conftest*
5045fi
5046if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5047 echo "$ac_t""yes" 1>&6
5048 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5049 cat >> confdefs.h <<EOF
5050#define $ac_tr_hdr 1
5051EOF
5052
5053else
5054 echo "$ac_t""no" 1>&6
5055fi
5056done
5057
78434e59 5058for ac_hdr in sys/proc.h
5ee754fc
MK
5059do
5060ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5061echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5062echo "configure:5063: checking for $ac_hdr" >&5
5ee754fc
MK
5063if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5064 echo $ac_n "(cached) $ac_c" 1>&6
5065else
5066 cat > conftest.$ac_ext <<EOF
9cc52bde 5067#line 5068 "configure"
5ee754fc
MK
5068#include "confdefs.h"
5069#include <$ac_hdr>
5070EOF
5071ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5072{ (eval echo configure:5073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5073ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5074if test -z "$ac_err"; then
5075 rm -rf conftest*
5076 eval "ac_cv_header_$ac_safe=yes"
5077else
5078 echo "$ac_err" >&5
5079 echo "configure: failed program was:" >&5
5080 cat conftest.$ac_ext >&5
5081 rm -rf conftest*
5082 eval "ac_cv_header_$ac_safe=no"
5083fi
5084rm -f conftest*
5085fi
5086if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5087 echo "$ac_t""yes" 1>&6
5088 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5089 cat >> confdefs.h <<EOF
5090#define $ac_tr_hdr 1
5091EOF
5092
5093else
5094 echo "$ac_t""no" 1>&6
5095fi
5096done
5097
78434e59 5098for ac_hdr in sys/procfs.h
5ee754fc
MK
5099do
5100ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5101echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5102echo "configure:5103: checking for $ac_hdr" >&5
5ee754fc
MK
5103if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5104 echo $ac_n "(cached) $ac_c" 1>&6
5105else
5106 cat > conftest.$ac_ext <<EOF
9cc52bde 5107#line 5108 "configure"
5ee754fc
MK
5108#include "confdefs.h"
5109#include <$ac_hdr>
5110EOF
5111ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5112{ (eval echo configure:5113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5113ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5114if test -z "$ac_err"; then
5115 rm -rf conftest*
5116 eval "ac_cv_header_$ac_safe=yes"
5117else
5118 echo "$ac_err" >&5
5119 echo "configure: failed program was:" >&5
5120 cat conftest.$ac_ext >&5
5121 rm -rf conftest*
5122 eval "ac_cv_header_$ac_safe=no"
5123fi
5124rm -f conftest*
5125fi
5126if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5127 echo "$ac_t""yes" 1>&6
5128 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5129 cat >> confdefs.h <<EOF
5130#define $ac_tr_hdr 1
5131EOF
5132
5133else
5134 echo "$ac_t""no" 1>&6
5135fi
5136done
5137
78434e59 5138for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5139do
5140ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5141echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5142echo "configure:5143: checking for $ac_hdr" >&5
5ee754fc
MK
5143if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5144 echo $ac_n "(cached) $ac_c" 1>&6
5145else
5146 cat > conftest.$ac_ext <<EOF
9cc52bde 5147#line 5148 "configure"
5ee754fc
MK
5148#include "confdefs.h"
5149#include <$ac_hdr>
5150EOF
5151ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5152{ (eval echo configure:5153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5153ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5154if test -z "$ac_err"; then
5155 rm -rf conftest*
5156 eval "ac_cv_header_$ac_safe=yes"
5157else
5158 echo "$ac_err" >&5
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 eval "ac_cv_header_$ac_safe=no"
5163fi
5164rm -f conftest*
5165fi
5166if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5167 echo "$ac_t""yes" 1>&6
5168 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5169 cat >> confdefs.h <<EOF
5170#define $ac_tr_hdr 1
5171EOF
5172
5173else
5174 echo "$ac_t""no" 1>&6
5175fi
5176done
5177
78434e59 5178for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5179do
5180ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5181echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5182echo "configure:5183: checking for $ac_hdr" >&5
5ee754fc
MK
5183if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5184 echo $ac_n "(cached) $ac_c" 1>&6
5185else
5186 cat > conftest.$ac_ext <<EOF
9cc52bde 5187#line 5188 "configure"
5ee754fc
MK
5188#include "confdefs.h"
5189#include <$ac_hdr>
5190EOF
5191ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5192{ (eval echo configure:5193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5193ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5194if test -z "$ac_err"; then
5195 rm -rf conftest*
5196 eval "ac_cv_header_$ac_safe=yes"
5197else
5198 echo "$ac_err" >&5
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5201 rm -rf conftest*
5202 eval "ac_cv_header_$ac_safe=no"
5203fi
5204rm -f conftest*
5205fi
5206if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5207 echo "$ac_t""yes" 1>&6
5208 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5209 cat >> confdefs.h <<EOF
5210#define $ac_tr_hdr 1
5211EOF
5212
5213else
5214 echo "$ac_t""no" 1>&6
5215fi
5216done
5217
78434e59 5218for ac_hdr in sys/select.h
5ee754fc
MK
5219do
5220ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5221echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5222echo "configure:5223: checking for $ac_hdr" >&5
5ee754fc
MK
5223if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
5225else
5226 cat > conftest.$ac_ext <<EOF
9cc52bde 5227#line 5228 "configure"
5ee754fc
MK
5228#include "confdefs.h"
5229#include <$ac_hdr>
5230EOF
5231ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5232{ (eval echo configure:5233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5233ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5234if test -z "$ac_err"; then
5235 rm -rf conftest*
5236 eval "ac_cv_header_$ac_safe=yes"
5237else
5238 echo "$ac_err" >&5
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5241 rm -rf conftest*
5242 eval "ac_cv_header_$ac_safe=no"
5243fi
5244rm -f conftest*
5245fi
5246if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5247 echo "$ac_t""yes" 1>&6
5248 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5249 cat >> confdefs.h <<EOF
5250#define $ac_tr_hdr 1
5251EOF
5252
5253else
5254 echo "$ac_t""no" 1>&6
5255fi
5256done
5257
78434e59 5258for ac_hdr in sys/syscall.h
5ee754fc
MK
5259do
5260ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5261echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5262echo "configure:5263: checking for $ac_hdr" >&5
5ee754fc
MK
5263if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5264 echo $ac_n "(cached) $ac_c" 1>&6
5265else
5266 cat > conftest.$ac_ext <<EOF
9cc52bde 5267#line 5268 "configure"
5ee754fc
MK
5268#include "confdefs.h"
5269#include <$ac_hdr>
5270EOF
5271ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5272{ (eval echo configure:5273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5273ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5274if test -z "$ac_err"; then
5275 rm -rf conftest*
5276 eval "ac_cv_header_$ac_safe=yes"
5277else
5278 echo "$ac_err" >&5
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 eval "ac_cv_header_$ac_safe=no"
5283fi
5284rm -f conftest*
5285fi
5286if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5287 echo "$ac_t""yes" 1>&6
5288 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5289 cat >> confdefs.h <<EOF
5290#define $ac_tr_hdr 1
5291EOF
5292
5293else
5294 echo "$ac_t""no" 1>&6
5295fi
5296done
5297
086ec9eb 5298for ac_hdr in sys/types.h
5ee754fc
MK
5299do
5300ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5301echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5302echo "configure:5303: checking for $ac_hdr" >&5
5ee754fc
MK
5303if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5304 echo $ac_n "(cached) $ac_c" 1>&6
5305else
5306 cat > conftest.$ac_ext <<EOF
9cc52bde 5307#line 5308 "configure"
5ee754fc
MK
5308#include "confdefs.h"
5309#include <$ac_hdr>
5310EOF
5311ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5312{ (eval echo configure:5313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5313ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5314if test -z "$ac_err"; then
5315 rm -rf conftest*
5316 eval "ac_cv_header_$ac_safe=yes"
5317else
5318 echo "$ac_err" >&5
9608ab8b
MK
5319 echo "configure: failed program was:" >&5
5320 cat conftest.$ac_ext >&5
5321 rm -rf conftest*
5ee754fc 5322 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5323fi
5324rm -f conftest*
5325fi
5ee754fc 5326if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5327 echo "$ac_t""yes" 1>&6
5328 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5329 cat >> confdefs.h <<EOF
5330#define $ac_tr_hdr 1
5331EOF
5ee754fc 5332
9608ab8b
MK
5333else
5334 echo "$ac_t""no" 1>&6
5335fi
5336done
5ee754fc 5337
086ec9eb 5338for ac_hdr in sys/user.h
5ee754fc
MK
5339do
5340ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5341echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5342echo "configure:5343: checking for $ac_hdr" >&5
5ee754fc 5343if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5344 echo $ac_n "(cached) $ac_c" 1>&6
5345else
5ee754fc 5346 cat > conftest.$ac_ext <<EOF
9cc52bde 5347#line 5348 "configure"
9608ab8b 5348#include "confdefs.h"
5ee754fc 5349#include <$ac_hdr>
9608ab8b 5350EOF
5ee754fc 5351ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5352{ (eval echo configure:5353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5353ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5354if test -z "$ac_err"; then
9608ab8b 5355 rm -rf conftest*
5ee754fc 5356 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5357else
5ee754fc 5358 echo "$ac_err" >&5
9608ab8b
MK
5359 echo "configure: failed program was:" >&5
5360 cat conftest.$ac_ext >&5
5361 rm -rf conftest*
5ee754fc 5362 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5363fi
5364rm -f conftest*
9608ab8b 5365fi
5ee754fc 5366if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5367 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5368 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5369 cat >> confdefs.h <<EOF
5370#define $ac_tr_hdr 1
5371EOF
5372
9608ab8b
MK
5373else
5374 echo "$ac_t""no" 1>&6
5375fi
5ee754fc 5376done
9608ab8b 5377
086ec9eb 5378for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5379do
5380ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5381echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5382echo "configure:5383: checking for $ac_hdr" >&5
5ee754fc 5383if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5384 echo $ac_n "(cached) $ac_c" 1>&6
5385else
5ee754fc 5386 cat > conftest.$ac_ext <<EOF
9cc52bde 5387#line 5388 "configure"
9608ab8b 5388#include "confdefs.h"
5ee754fc 5389#include <$ac_hdr>
9608ab8b 5390EOF
5ee754fc 5391ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5392{ (eval echo configure:5393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5393ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5394if test -z "$ac_err"; then
9608ab8b 5395 rm -rf conftest*
5ee754fc 5396 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5397else
5ee754fc 5398 echo "$ac_err" >&5
9608ab8b
MK
5399 echo "configure: failed program was:" >&5
5400 cat conftest.$ac_ext >&5
5401 rm -rf conftest*
5ee754fc 5402 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5403fi
5404rm -f conftest*
9608ab8b 5405fi
5ee754fc 5406if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5407 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5408 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5409 cat >> confdefs.h <<EOF
5410#define $ac_tr_hdr 1
5411EOF
5412
9608ab8b
MK
5413else
5414 echo "$ac_t""no" 1>&6
5415fi
5ee754fc 5416done
9608ab8b 5417
086ec9eb 5418for ac_hdr in termios.h termio.h sgtty.h
78434e59
MK
5419do
5420ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5421echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5422echo "configure:5423: checking for $ac_hdr" >&5
78434e59
MK
5423if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5424 echo $ac_n "(cached) $ac_c" 1>&6
5425else
5426 cat > conftest.$ac_ext <<EOF
9cc52bde 5427#line 5428 "configure"
78434e59
MK
5428#include "confdefs.h"
5429#include <$ac_hdr>
5430EOF
5431ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5432{ (eval echo configure:5433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5433ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5434if test -z "$ac_err"; then
5435 rm -rf conftest*
5436 eval "ac_cv_header_$ac_safe=yes"
5437else
5438 echo "$ac_err" >&5
5439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
5441 rm -rf conftest*
5442 eval "ac_cv_header_$ac_safe=no"
5443fi
5444rm -f conftest*
5445fi
5446if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5447 echo "$ac_t""yes" 1>&6
5448 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5449 cat >> confdefs.h <<EOF
5450#define $ac_tr_hdr 1
5451EOF
5452
5453else
5454 echo "$ac_t""no" 1>&6
5455fi
5456done
5457
086ec9eb
MK
5458for ac_hdr in unistd.h
5459do
5460ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5461echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5462echo "configure:5463: checking for $ac_hdr" >&5
086ec9eb
MK
5463if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5464 echo $ac_n "(cached) $ac_c" 1>&6
5465else
5466 cat > conftest.$ac_ext <<EOF
9cc52bde 5467#line 5468 "configure"
086ec9eb
MK
5468#include "confdefs.h"
5469#include <$ac_hdr>
5470EOF
5471ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5472{ (eval echo configure:5473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
086ec9eb
MK
5473ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5474if test -z "$ac_err"; then
5475 rm -rf conftest*
5476 eval "ac_cv_header_$ac_safe=yes"
5477else
5478 echo "$ac_err" >&5
5479 echo "configure: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5481 rm -rf conftest*
5482 eval "ac_cv_header_$ac_safe=no"
5483fi
5484rm -f conftest*
5485fi
5486if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5487 echo "$ac_t""yes" 1>&6
5488 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5489 cat >> confdefs.h <<EOF
5490#define $ac_tr_hdr 1
5491EOF
5492
5493else
5494 echo "$ac_t""no" 1>&6
5495fi
5496done
5497
9608ab8b 5498
b1d19a62 5499# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5ee754fc
MK
5500# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5501# think that we don't have <curses.h> if we're using GCC.
5502case $host_os in
b1d19a62 5503 solaris2.[789])
5ee754fc
MK
5504 if test "$GCC" = yes; then
5505 cat >> confdefs.h <<\EOF
5506#define _MSE_INT_H 1
5507EOF
5508
5509 fi ;;
5510esac
a6ed5501 5511for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h
5ee754fc
MK
5512do
5513ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5514echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5515echo "configure:5516: checking for $ac_hdr" >&5
5ee754fc 5516if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5517 echo $ac_n "(cached) $ac_c" 1>&6
5518else
5519 cat > conftest.$ac_ext <<EOF
9cc52bde 5520#line 5521 "configure"
c906108c 5521#include "confdefs.h"
5ee754fc 5522#include <$ac_hdr>
c906108c
SS
5523EOF
5524ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5525{ (eval echo configure:5526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5526ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5527if test -z "$ac_err"; then
5528 rm -rf conftest*
5ee754fc 5529 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5530else
5531 echo "$ac_err" >&5
5532 echo "configure: failed program was:" >&5
5533 cat conftest.$ac_ext >&5
5534 rm -rf conftest*
5ee754fc 5535 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5536fi
5537rm -f conftest*
c906108c 5538fi
5ee754fc
MK
5539if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5540 echo "$ac_t""yes" 1>&6
5541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5542 cat >> confdefs.h <<EOF
5543#define $ac_tr_hdr 1
c906108c 5544EOF
5ee754fc 5545
c906108c 5546else
5ee754fc 5547 echo "$ac_t""no" 1>&6
c906108c 5548fi
5ee754fc 5549done
c906108c
SS
5550
5551
5ee754fc
MK
5552# FIXME: kettenis/20030102: In most cases we include these
5553# unconditionally, so what's the point in checking these?
5554for ac_hdr in ctype.h time.h
c906108c
SS
5555do
5556ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5557echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 5558echo "configure:5559: checking for $ac_hdr" >&5
c906108c
SS
5559if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5560 echo $ac_n "(cached) $ac_c" 1>&6
5561else
5562 cat > conftest.$ac_ext <<EOF
9cc52bde 5563#line 5564 "configure"
c906108c
SS
5564#include "confdefs.h"
5565#include <$ac_hdr>
5566EOF
5567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 5568{ (eval echo configure:5569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5569ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5570if test -z "$ac_err"; then
5571 rm -rf conftest*
5572 eval "ac_cv_header_$ac_safe=yes"
5573else
5574 echo "$ac_err" >&5
5575 echo "configure: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 rm -rf conftest*
5578 eval "ac_cv_header_$ac_safe=no"
5579fi
5580rm -f conftest*
5581fi
5582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5583 echo "$ac_t""yes" 1>&6
5584 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5585 cat >> confdefs.h <<EOF
5586#define $ac_tr_hdr 1
5587EOF
5588
5589else
5590 echo "$ac_t""no" 1>&6
5591fi
5592done
5593
5ee754fc 5594
40a7debc 5595echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
9cc52bde 5596echo "configure:5597: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5597if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5598 echo $ac_n "(cached) $ac_c" 1>&6
5599else
5600 cat > conftest.$ac_ext <<EOF
9cc52bde 5601#line 5602 "configure"
40a7debc
EZ
5602#include "confdefs.h"
5603#include <sys/types.h>
5604#include <sys/stat.h>
5605int main() {
5606struct stat st; (void) st.st_blocks;
5607; return 0; }
5608EOF
9cc52bde 5609if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5610 rm -rf conftest*
5611 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5612else
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 gdb_cv_have_struct_stat_with_st_blocks_member=no
5617fi
5618rm -f conftest*
5619fi
5620
5621echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5622if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5623 cat >> confdefs.h <<\EOF
5624#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5625EOF
5626
5627fi
086ec9eb 5628
b9362cc7
AC
5629# ------------------------- #
5630# Checks for declarations. #
5631# ------------------------- #
5632
5633for ac_func in getopt
5634do
5635 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5636echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
9cc52bde 5637echo "configure:5638: checking whether $ac_func is declared" >&5
b9362cc7
AC
5638if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5639 echo $ac_n "(cached) $ac_c" 1>&6
5640else
5641 cat > conftest.$ac_ext <<EOF
9cc52bde 5642#line 5643 "configure"
b9362cc7
AC
5643#include "confdefs.h"
5644#undef $ac_tr_decl
5645#define $ac_tr_decl 1
5646
5647
5648int main() {
5649#ifndef $ac_func
5650char *(*pfn) = (char *(*)) $ac_func ;
5651#endif
5652; return 0; }
5653EOF
9cc52bde 5654if { (eval echo configure:5655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5655 rm -rf conftest*
5656 eval "gcc_cv_have_decl_$ac_func=yes"
5657else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -rf conftest*
5661 eval "gcc_cv_have_decl_$ac_func=no"
5662fi
5663rm -f conftest*
5664fi
5665
5666if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5667 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5668#define $ac_tr_decl 1
5669EOF
5670
5671else
5672 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5673#define $ac_tr_decl 0
5674EOF
5675
5676fi
5677
5678done
5679if test x = y ; then
5680 cat >> confdefs.h <<\EOF
5681#define HAVE_DECL_GETOPT 1
5682EOF
5683fi
5684
5685
5ee754fc
MK
5686# ------------------ #
5687# Checks for types. #
5688# ------------------ #
5689
5690echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9cc52bde 5691echo "configure:5692: checking return type of signal handlers" >&5
5ee754fc 5692if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5693 echo $ac_n "(cached) $ac_c" 1>&6
5694else
5695 cat > conftest.$ac_ext <<EOF
9cc52bde 5696#line 5697 "configure"
c906108c
SS
5697#include "confdefs.h"
5698#include <sys/types.h>
5ee754fc
MK
5699#include <signal.h>
5700#ifdef signal
5701#undef signal
c906108c 5702#endif
5ee754fc
MK
5703#ifdef __cplusplus
5704extern "C" void (*signal (int, void (*)(int)))(int);
5705#else
5706void (*signal ()) ();
c906108c
SS
5707#endif
5708
5ee754fc
MK
5709int main() {
5710int i;
5711; return 0; }
c906108c 5712EOF
9cc52bde 5713if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5714 rm -rf conftest*
5ee754fc 5715 ac_cv_type_signal=void
c906108c 5716else
5ee754fc
MK
5717 echo "configure: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
c906108c 5719 rm -rf conftest*
5ee754fc 5720 ac_cv_type_signal=int
c906108c
SS
5721fi
5722rm -f conftest*
c906108c
SS
5723fi
5724
5ee754fc
MK
5725echo "$ac_t""$ac_cv_type_signal" 1>&6
5726cat >> confdefs.h <<EOF
5727#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5728EOF
5729
c906108c
SS
5730
5731
5ee754fc
MK
5732# ------------------------------------- #
5733# Checks for compiler characteristics. #
5734# ------------------------------------- #
5735
c906108c 5736echo $ac_n "checking for working const""... $ac_c" 1>&6
9cc52bde 5737echo "configure:5738: checking for working const" >&5
c906108c
SS
5738if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5739 echo $ac_n "(cached) $ac_c" 1>&6
5740else
5741 cat > conftest.$ac_ext <<EOF
9cc52bde 5742#line 5743 "configure"
c906108c
SS
5743#include "confdefs.h"
5744
5745int main() {
5746
5747/* Ultrix mips cc rejects this. */
5748typedef int charset[2]; const charset x;
5749/* SunOS 4.1.1 cc rejects this. */
5750char const *const *ccp;
5751char **p;
5752/* NEC SVR4.0.2 mips cc rejects this. */
5753struct point {int x, y;};
5754static struct point const zero = {0,0};
5755/* AIX XL C 1.02.0.0 rejects this.
5756 It does not let you subtract one const X* pointer from another in an arm
5757 of an if-expression whose if-part is not a constant expression */
5758const char *g = "string";
5759ccp = &g + (g ? g-g : 0);
5760/* HPUX 7.0 cc rejects these. */
5761++ccp;
5762p = (char**) ccp;
5763ccp = (char const *const *) p;
5764{ /* SCO 3.2v4 cc rejects this. */
5765 char *t;
5766 char const *s = 0 ? (char *) 0 : (char const *) 0;
5767
5768 *t++ = 0;
5769}
5770{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5771 int x[] = {25, 17};
5772 const int *foo = &x[0];
5773 ++foo;
5774}
5775{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5776 typedef const int *iptr;
5777 iptr p = 0;
5778 ++p;
5779}
5780{ /* AIX XL C 1.02.0.0 rejects this saying
5781 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5782 struct s { int j; const int *ap[3]; };
5783 struct s *b; b->j = 5;
5784}
5785{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5786 const int foo = 10;
5787}
5788
5789; return 0; }
5790EOF
9cc52bde 5791if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5792 rm -rf conftest*
5793 ac_cv_c_const=yes
5794else
5795 echo "configure: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
5797 rm -rf conftest*
5798 ac_cv_c_const=no
5799fi
5800rm -f conftest*
5801fi
5802
5803echo "$ac_t""$ac_cv_c_const" 1>&6
5804if test $ac_cv_c_const = no; then
5805 cat >> confdefs.h <<\EOF
5806#define const
5807EOF
5808
5809fi
5810
bce58c09 5811echo $ac_n "checking for inline""... $ac_c" 1>&6
9cc52bde 5812echo "configure:5813: checking for inline" >&5
bce58c09
JB
5813if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5815else
5816 ac_cv_c_inline=no
5817for ac_kw in inline __inline__ __inline; do
5818 cat > conftest.$ac_ext <<EOF
9cc52bde 5819#line 5820 "configure"
bce58c09
JB
5820#include "confdefs.h"
5821
5822int main() {
5823} $ac_kw foo() {
5824; return 0; }
5825EOF
9cc52bde 5826if { (eval echo configure:5827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5827 rm -rf conftest*
5828 ac_cv_c_inline=$ac_kw; break
5829else
5830 echo "configure: failed program was:" >&5
5831 cat conftest.$ac_ext >&5
5832fi
5833rm -f conftest*
5834done
5835
5836fi
5837
5838echo "$ac_t""$ac_cv_c_inline" 1>&6
5839case "$ac_cv_c_inline" in
5840 inline | yes) ;;
5841 no) cat >> confdefs.h <<\EOF
5842#define inline
5843EOF
5844 ;;
5845 *) cat >> confdefs.h <<EOF
5846#define inline $ac_cv_c_inline
5847EOF
5848 ;;
5849esac
5850
c906108c 5851
5ee754fc
MK
5852# ------------------------------ #
5853# Checks for library functions. #
5854# ------------------------------ #
5855
46711df8
MK
5856# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5857# for constant arguments. Useless!
5858echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9cc52bde 5859echo "configure:5860: checking for working alloca.h" >&5
46711df8
MK
5860if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5861 echo $ac_n "(cached) $ac_c" 1>&6
5862else
5863 cat > conftest.$ac_ext <<EOF
9cc52bde 5864#line 5865 "configure"
46711df8
MK
5865#include "confdefs.h"
5866#include <alloca.h>
5867int main() {
5868char *p = alloca(2 * sizeof(int));
5869; return 0; }
5870EOF
9cc52bde 5871if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5872 rm -rf conftest*
5873 ac_cv_header_alloca_h=yes
5874else
5875 echo "configure: failed program was:" >&5
5876 cat conftest.$ac_ext >&5
5877 rm -rf conftest*
5878 ac_cv_header_alloca_h=no
5879fi
5880rm -f conftest*
5881fi
5882
5883echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5884if test $ac_cv_header_alloca_h = yes; then
5885 cat >> confdefs.h <<\EOF
5886#define HAVE_ALLOCA_H 1
5887EOF
5888
5889fi
5890
5891echo $ac_n "checking for alloca""... $ac_c" 1>&6
9cc52bde 5892echo "configure:5893: checking for alloca" >&5
46711df8
MK
5893if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5894 echo $ac_n "(cached) $ac_c" 1>&6
5895else
5896 cat > conftest.$ac_ext <<EOF
9cc52bde 5897#line 5898 "configure"
46711df8
MK
5898#include "confdefs.h"
5899
5900#ifdef __GNUC__
5901# define alloca __builtin_alloca
5902#else
5903# ifdef _MSC_VER
5904# include <malloc.h>
5905# define alloca _alloca
5906# else
5907# if HAVE_ALLOCA_H
5908# include <alloca.h>
5909# else
5910# ifdef _AIX
5911 #pragma alloca
5912# else
5913# ifndef alloca /* predefined by HP cc +Olibcalls */
5914char *alloca ();
5915# endif
5916# endif
5917# endif
5918# endif
5919#endif
5920
5921int main() {
5922char *p = (char *) alloca(1);
5923; return 0; }
5924EOF
9cc52bde 5925if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5926 rm -rf conftest*
5927 ac_cv_func_alloca_works=yes
5928else
5929 echo "configure: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 rm -rf conftest*
5932 ac_cv_func_alloca_works=no
5933fi
5934rm -f conftest*
5935fi
5936
5937echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5938if test $ac_cv_func_alloca_works = yes; then
5939 cat >> confdefs.h <<\EOF
5940#define HAVE_ALLOCA 1
5941EOF
5942
5943fi
5944
5945if test $ac_cv_func_alloca_works = no; then
5946 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5947 # that cause trouble. Some versions do not even contain alloca or
5948 # contain a buggy version. If you still want to use their alloca,
5949 # use ar to extract alloca.o from them instead of compiling alloca.c.
5950 ALLOCA=alloca.${ac_objext}
5951 cat >> confdefs.h <<\EOF
5952#define C_ALLOCA 1
5953EOF
5954
5955
5956echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9cc52bde 5957echo "configure:5958: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5958if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5959 echo $ac_n "(cached) $ac_c" 1>&6
5960else
5961 cat > conftest.$ac_ext <<EOF
9cc52bde 5962#line 5963 "configure"
46711df8
MK
5963#include "confdefs.h"
5964#if defined(CRAY) && ! defined(CRAY2)
5965webecray
5966#else
5967wenotbecray
5968#endif
5969
5970EOF
5971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5972 egrep "webecray" >/dev/null 2>&1; then
5973 rm -rf conftest*
5974 ac_cv_os_cray=yes
5975else
5976 rm -rf conftest*
5977 ac_cv_os_cray=no
5978fi
5979rm -f conftest*
5980
5981fi
5982
5983echo "$ac_t""$ac_cv_os_cray" 1>&6
5984if test $ac_cv_os_cray = yes; then
5985for ac_func in _getb67 GETB67 getb67; do
5986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 5987echo "configure:5988: checking for $ac_func" >&5
46711df8
MK
5988if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5989 echo $ac_n "(cached) $ac_c" 1>&6
5990else
5991 cat > conftest.$ac_ext <<EOF
9cc52bde 5992#line 5993 "configure"
46711df8
MK
5993#include "confdefs.h"
5994/* System header to define __stub macros and hopefully few prototypes,
5995 which can conflict with char $ac_func(); below. */
5996#include <assert.h>
5997/* Override any gcc2 internal prototype to avoid an error. */
5998/* We use char because int might match the return type of a gcc2
5999 builtin and then its argument prototype would still apply. */
6000char $ac_func();
6001
6002int main() {
6003
6004/* The GNU C library defines this for functions which it implements
6005 to always fail with ENOSYS. Some functions are actually named
6006 something starting with __ and the normal name is an alias. */
6007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6008choke me
6009#else
6010$ac_func();
6011#endif
6012
6013; return 0; }
6014EOF
9cc52bde 6015if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6016 rm -rf conftest*
6017 eval "ac_cv_func_$ac_func=yes"
6018else
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6021 rm -rf conftest*
6022 eval "ac_cv_func_$ac_func=no"
6023fi
6024rm -f conftest*
6025fi
6026
6027if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6028 echo "$ac_t""yes" 1>&6
6029 cat >> confdefs.h <<EOF
6030#define CRAY_STACKSEG_END $ac_func
6031EOF
6032
6033 break
6034else
6035 echo "$ac_t""no" 1>&6
6036fi
6037
6038done
6039fi
6040
6041echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9cc52bde 6042echo "configure:6043: checking stack direction for C alloca" >&5
46711df8
MK
6043if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045else
6046 if test "$cross_compiling" = yes; then
6047 ac_cv_c_stack_direction=0
6048else
6049 cat > conftest.$ac_ext <<EOF
9cc52bde 6050#line 6051 "configure"
46711df8
MK
6051#include "confdefs.h"
6052find_stack_direction ()
6053{
6054 static char *addr = 0;
6055 auto char dummy;
6056 if (addr == 0)
6057 {
6058 addr = &dummy;
6059 return find_stack_direction ();
6060 }
6061 else
6062 return (&dummy > addr) ? 1 : -1;
6063}
6064main ()
6065{
6066 exit (find_stack_direction() < 0);
6067}
6068EOF
9cc52bde 6069if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6070then
6071 ac_cv_c_stack_direction=1
6072else
6073 echo "configure: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 rm -fr conftest*
6076 ac_cv_c_stack_direction=-1
6077fi
6078rm -fr conftest*
6079fi
6080
6081fi
6082
6083echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6084cat >> confdefs.h <<EOF
6085#define STACK_DIRECTION $ac_cv_c_stack_direction
6086EOF
6087
6088fi
6089
d836ee13 6090for ac_hdr in unistd.h
97bf5e38
MK
6091do
6092ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6093echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc52bde 6094echo "configure:6095: checking for $ac_hdr" >&5
74c1b268
AC
6095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6096 echo $ac_n "(cached) $ac_c" 1>&6
6097else
6098 cat > conftest.$ac_ext <<EOF
9cc52bde 6099#line 6100 "configure"
74c1b268 6100#include "confdefs.h"
97bf5e38 6101#include <$ac_hdr>
74c1b268
AC
6102EOF
6103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 6104{ (eval echo configure:6105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6106if test -z "$ac_err"; then
6107 rm -rf conftest*
6108 eval "ac_cv_header_$ac_safe=yes"
6109else
6110 echo "$ac_err" >&5
6111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 rm -rf conftest*
6114 eval "ac_cv_header_$ac_safe=no"
6115fi
6116rm -f conftest*
6117fi
6118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6119 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6121 cat >> confdefs.h <<EOF
6122#define $ac_tr_hdr 1
74c1b268 6123EOF
97bf5e38 6124
74c1b268
AC
6125else
6126 echo "$ac_t""no" 1>&6
6127fi
97bf5e38 6128done
74c1b268 6129
97bf5e38
MK
6130for ac_func in getpagesize
6131do
6132echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6133echo "configure:6134: checking for $ac_func" >&5
97bf5e38 6134if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6135 echo $ac_n "(cached) $ac_c" 1>&6
6136else
6137 cat > conftest.$ac_ext <<EOF
9cc52bde 6138#line 6139 "configure"
74c1b268
AC
6139#include "confdefs.h"
6140/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6141 which can conflict with char $ac_func(); below. */
74c1b268
AC
6142#include <assert.h>
6143/* Override any gcc2 internal prototype to avoid an error. */
6144/* We use char because int might match the return type of a gcc2
6145 builtin and then its argument prototype would still apply. */
97bf5e38 6146char $ac_func();
74c1b268
AC
6147
6148int main() {
6149
6150/* The GNU C library defines this for functions which it implements
6151 to always fail with ENOSYS. Some functions are actually named
6152 something starting with __ and the normal name is an alias. */
97bf5e38 6153#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6154choke me
6155#else
97bf5e38 6156$ac_func();
74c1b268
AC
6157#endif
6158
6159; return 0; }
6160EOF
9cc52bde 6161if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6162 rm -rf conftest*
97bf5e38 6163 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6164else
6165 echo "configure: failed program was:" >&5
6166 cat conftest.$ac_ext >&5
6167 rm -rf conftest*
97bf5e38 6168 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6169fi
6170rm -f conftest*
6171fi
6172
97bf5e38 6173if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6174 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6175 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6176 cat >> confdefs.h <<EOF
6177#define $ac_tr_func 1
6178EOF
6179
74c1b268
AC
6180else
6181 echo "$ac_t""no" 1>&6
6182fi
97bf5e38 6183done
74c1b268 6184
97bf5e38 6185echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9cc52bde 6186echo "configure:6187: checking for working mmap" >&5
97bf5e38
MK
6187if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
6189else
6190 if test "$cross_compiling" = yes; then
6191 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6192else
6193 cat > conftest.$ac_ext <<EOF
9cc52bde 6194#line 6195 "configure"
74c1b268 6195#include "confdefs.h"
97bf5e38
MK
6196
6197/* Thanks to Mike Haertel and Jim Avera for this test.
6198 Here is a matrix of mmap possibilities:
6199 mmap private not fixed
6200 mmap private fixed at somewhere currently unmapped
6201 mmap private fixed at somewhere already mapped
6202 mmap shared not fixed
6203 mmap shared fixed at somewhere currently unmapped
6204 mmap shared fixed at somewhere already mapped
6205 For private mappings, we should verify that changes cannot be read()
6206 back from the file, nor mmap's back from the file at a different
6207 address. (There have been systems where private was not correctly
6208 implemented like the infamous i386 svr4.0, and systems where the
6209 VM page cache was not coherent with the filesystem buffer cache
6210 like early versions of FreeBSD and possibly contemporary NetBSD.)
6211 For shared mappings, we should conversely verify that changes get
6212 propogated back to all the places they're supposed to be.
6213
6214 Grep wants private fixed already mapped.
6215 The main things grep needs to know about mmap are:
6216 * does it exist and is it safe to write into the mmap'd area
6217 * how to use it (BSD variants) */
74c1b268 6218#include <sys/types.h>
97bf5e38
MK
6219#include <fcntl.h>
6220#include <sys/mman.h>
6221
6222/* This mess was copied from the GNU getpagesize.h. */
6223#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6224# ifdef HAVE_UNISTD_H
6225# include <unistd.h>
6226# endif
97bf5e38
MK
6227
6228/* Assume that all systems that can run configure have sys/param.h. */
6229# ifndef HAVE_SYS_PARAM_H
6230# define HAVE_SYS_PARAM_H 1
6231# endif
6232
6233# ifdef _SC_PAGESIZE
6234# define getpagesize() sysconf(_SC_PAGESIZE)
6235# else /* no _SC_PAGESIZE */
6236# ifdef HAVE_SYS_PARAM_H
6237# include <sys/param.h>
6238# ifdef EXEC_PAGESIZE
6239# define getpagesize() EXEC_PAGESIZE
6240# else /* no EXEC_PAGESIZE */
6241# ifdef NBPG
6242# define getpagesize() NBPG * CLSIZE
6243# ifndef CLSIZE
6244# define CLSIZE 1
6245# endif /* no CLSIZE */
6246# else /* no NBPG */
6247# ifdef NBPC
6248# define getpagesize() NBPC
6249# else /* no NBPC */
6250# ifdef PAGESIZE
6251# define getpagesize() PAGESIZE
6252# endif /* PAGESIZE */
6253# endif /* no NBPC */
6254# endif /* no NBPG */
6255# endif /* no EXEC_PAGESIZE */
6256# else /* no HAVE_SYS_PARAM_H */
6257# define getpagesize() 8192 /* punt totally */
6258# endif /* no HAVE_SYS_PARAM_H */
6259# endif /* no _SC_PAGESIZE */
6260
6261#endif /* no HAVE_GETPAGESIZE */
6262
74c1b268 6263#ifdef __cplusplus
97bf5e38 6264extern "C" { void *malloc(unsigned); }
74c1b268 6265#else
97bf5e38 6266char *malloc();
74c1b268 6267#endif
74c1b268 6268
97bf5e38
MK
6269int
6270main()
6271{
6272 char *data, *data2, *data3;
6273 int i, pagesize;
6274 int fd;
74c1b268 6275
97bf5e38 6276 pagesize = getpagesize();
74c1b268 6277
97bf5e38
MK
6278 /*
6279 * First, make a file with some known garbage in it.
6280 */
6281 data = malloc(pagesize);
6282 if (!data)
6283 exit(1);
6284 for (i = 0; i < pagesize; ++i)
6285 *(data + i) = rand();
6286 umask(0);
6287 fd = creat("conftestmmap", 0600);
6288 if (fd < 0)
6289 exit(1);
6290 if (write(fd, data, pagesize) != pagesize)
6291 exit(1);
6292 close(fd);
74c1b268 6293
97bf5e38
MK
6294 /*
6295 * Next, try to mmap the file at a fixed address which
6296 * already has something else allocated at it. If we can,
6297 * also make sure that we see the same garbage.
6298 */
6299 fd = open("conftestmmap", O_RDWR);
6300 if (fd < 0)
6301 exit(1);
6302 data2 = malloc(2 * pagesize);
6303 if (!data2)
6304 exit(1);
6305 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6306 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6307 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6308 exit(1);
6309 for (i = 0; i < pagesize; ++i)
6310 if (*(data + i) != *(data2 + i))
6311 exit(1);
74c1b268 6312
97bf5e38
MK
6313 /*
6314 * Finally, make sure that changes to the mapped area
6315 * do not percolate back to the file as seen by read().
6316 * (This is a bug on some variants of i386 svr4.0.)
6317 */
6318 for (i = 0; i < pagesize; ++i)
6319 *(data2 + i) = *(data2 + i) + 1;
6320 data3 = malloc(pagesize);
6321 if (!data3)
6322 exit(1);
6323 if (read(fd, data3, pagesize) != pagesize)
6324 exit(1);
6325 for (i = 0; i < pagesize; ++i)
6326 if (*(data + i) != *(data3 + i))
6327 exit(1);
6328 close(fd);
6329 unlink("conftestmmap");
6330 exit(0);
74c1b268 6331}
97bf5e38 6332
74c1b268 6333EOF
9cc52bde 6334if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6335then
97bf5e38 6336 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6337else
6338 echo "configure: failed program was:" >&5
6339 cat conftest.$ac_ext >&5
6340 rm -fr conftest*
97bf5e38 6341 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6342fi
6343rm -fr conftest*
6344fi
6345
6346fi
6347
97bf5e38
MK
6348echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6349if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6350 cat >> confdefs.h <<\EOF
97bf5e38 6351#define HAVE_MMAP 1
74c1b268
AC
6352EOF
6353
6354fi
6355
97bf5e38 6356echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9cc52bde 6357echo "configure:6358: checking for pid_t" >&5
97bf5e38 6358if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6359 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6360else
6361 cat > conftest.$ac_ext <<EOF
9cc52bde 6362#line 6363 "configure"
0200359f 6363#include "confdefs.h"
97bf5e38
MK
6364#include <sys/types.h>
6365#if STDC_HEADERS
6366#include <stdlib.h>
6367#include <stddef.h>
0200359f 6368#endif
0200359f 6369EOF
97bf5e38
MK
6370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6371 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6372 rm -rf conftest*
6373 ac_cv_type_pid_t=yes
0200359f 6374else
97bf5e38
MK
6375 rm -rf conftest*
6376 ac_cv_type_pid_t=no
0200359f 6377fi
97bf5e38 6378rm -f conftest*
0200359f
MK
6379
6380fi
97bf5e38
MK
6381echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6382if test $ac_cv_type_pid_t = no; then
0200359f 6383 cat >> confdefs.h <<\EOF
97bf5e38 6384#define pid_t int
0200359f
MK
6385EOF
6386
6387fi
6388
97bf5e38
MK
6389ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6390echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9cc52bde 6391echo "configure:6392: checking for vfork.h" >&5
97bf5e38 6392if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6393 echo $ac_n "(cached) $ac_c" 1>&6
6394else
6395 cat > conftest.$ac_ext <<EOF
9cc52bde 6396#line 6397 "configure"
72473524 6397#include "confdefs.h"
97bf5e38 6398#include <vfork.h>
72473524 6399EOF
97bf5e38 6400ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 6401{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6402ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6403if test -z "$ac_err"; then
72473524 6404 rm -rf conftest*
97bf5e38 6405 eval "ac_cv_header_$ac_safe=yes"
72473524 6406else
97bf5e38 6407 echo "$ac_err" >&5
72473524
DJ
6408 echo "configure: failed program was:" >&5
6409 cat conftest.$ac_ext >&5
6410 rm -rf conftest*
97bf5e38 6411 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6412fi
6413rm -f conftest*
6414fi
97bf5e38
MK
6415if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6416 echo "$ac_t""yes" 1>&6
72473524 6417 cat >> confdefs.h <<\EOF
97bf5e38 6418#define HAVE_VFORK_H 1
72473524
DJ
6419EOF
6420
97bf5e38
MK
6421else
6422 echo "$ac_t""no" 1>&6
72473524 6423fi
c906108c 6424
97bf5e38 6425echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9cc52bde 6426echo "configure:6427: checking for working vfork" >&5
97bf5e38
MK
6427if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6428 echo $ac_n "(cached) $ac_c" 1>&6
6429else
6430 if test "$cross_compiling" = yes; then
6431 echo $ac_n "checking for vfork""... $ac_c" 1>&6
9cc52bde 6432echo "configure:6433: checking for vfork" >&5
97bf5e38 6433if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6434 echo $ac_n "(cached) $ac_c" 1>&6
6435else
6436 cat > conftest.$ac_ext <<EOF
9cc52bde 6437#line 6438 "configure"
2b2d558c 6438#include "confdefs.h"
97bf5e38
MK
6439/* System header to define __stub macros and hopefully few prototypes,
6440 which can conflict with char vfork(); below. */
6441#include <assert.h>
6442/* Override any gcc2 internal prototype to avoid an error. */
6443/* We use char because int might match the return type of a gcc2
6444 builtin and then its argument prototype would still apply. */
6445char vfork();
2b2d558c
MK
6446
6447int main() {
97bf5e38
MK
6448
6449/* The GNU C library defines this for functions which it implements
6450 to always fail with ENOSYS. Some functions are actually named
6451 something starting with __ and the normal name is an alias. */
6452#if defined (__stub_vfork) || defined (__stub___vfork)
6453choke me
6454#else
6455vfork();
6456#endif
6457
2b2d558c
MK
6458; return 0; }
6459EOF
9cc52bde 6460if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6461 rm -rf conftest*
97bf5e38 6462 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6463else
6464 echo "configure: failed program was:" >&5
6465 cat conftest.$ac_ext >&5
6466 rm -rf conftest*
97bf5e38 6467 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6468fi
6469rm -f conftest*
6470fi
6471
97bf5e38
MK
6472if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6473 echo "$ac_t""yes" 1>&6
6474 :
6475else
6476 echo "$ac_t""no" 1>&6
2b2d558c
MK
6477fi
6478
97bf5e38 6479ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6480else
6481 cat > conftest.$ac_ext <<EOF
9cc52bde 6482#line 6483 "configure"
7dfa765c 6483#include "confdefs.h"
97bf5e38
MK
6484/* Thanks to Paul Eggert for this test. */
6485#include <stdio.h>
6486#include <sys/types.h>
6487#include <sys/stat.h>
6488#ifdef HAVE_UNISTD_H
6489#include <unistd.h>
6490#endif
6491#ifdef HAVE_VFORK_H
6492#include <vfork.h>
6493#endif
6494/* On some sparc systems, changes by the child to local and incoming
6495 argument registers are propagated back to the parent.
6496 The compiler is told about this with #include <vfork.h>,
6497 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6498 Test for this by using a static variable whose address
6499 is put into a register that is clobbered by the vfork. */
6500static
6501#ifdef __cplusplus
6502sparc_address_test (int arg)
6503#else
6504sparc_address_test (arg) int arg;
6505#endif
6506{
6507 static pid_t child;
6508 if (!child) {
6509 child = vfork ();
6510 if (child < 0) {
6511 perror ("vfork");
6512 _exit(2);
6513 }
6514 if (!child) {
6515 arg = getpid();
6516 write(-1, "", 0);
6517 _exit (arg);
6518 }
6519 }
6520}
6521main() {
6522 pid_t parent = getpid ();
6523 pid_t child;
7dfa765c 6524
97bf5e38 6525 sparc_address_test ();
7dfa765c 6526
97bf5e38 6527 child = vfork ();
7dfa765c 6528
97bf5e38
MK
6529 if (child == 0) {
6530 /* Here is another test for sparc vfork register problems.
6531 This test uses lots of local variables, at least
6532 as many local variables as main has allocated so far
6533 including compiler temporaries. 4 locals are enough for
6534 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6535 A buggy compiler should reuse the register of parent
6536 for one of the local variables, since it will think that
6537 parent can't possibly be used any more in this routine.
6538 Assigning to the local variable will thus munge parent
6539 in the parent process. */
6540 pid_t
6541 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6542 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6543 /* Convince the compiler that p..p7 are live; otherwise, it might
6544 use the same hardware register for all 8 local variables. */
6545 if (p != p1 || p != p2 || p != p3 || p != p4
6546 || p != p5 || p != p6 || p != p7)
6547 _exit(1);
7dfa765c 6548
97bf5e38
MK
6549 /* On some systems (e.g. IRIX 3.3),
6550 vfork doesn't separate parent from child file descriptors.
6551 If the child closes a descriptor before it execs or exits,
6552 this munges the parent's descriptor as well.
6553 Test for this by closing stdout in the child. */
6554 _exit(close(fileno(stdout)) != 0);
6555 } else {
6556 int status;
6557 struct stat st;
64bb1671 6558
97bf5e38
MK
6559 while (wait(&status) != child)
6560 ;
6561 exit(
6562 /* Was there some problem with vforking? */
6563 child < 0
64bb1671 6564
97bf5e38
MK
6565 /* Did the child fail? (This shouldn't happen.) */
6566 || status
64bb1671 6567
97bf5e38
MK
6568 /* Did the vfork/compiler bug occur? */
6569 || parent != getpid()
6570
6571 /* Did the file descriptor bug occur? */
6572 || fstat(fileno(stdout), &st) != 0
6573 );
6574 }
6575}
5c44784c 6576EOF
9cc52bde 6577if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6578then
6579 ac_cv_func_vfork_works=yes
5c44784c
JM
6580else
6581 echo "configure: failed program was:" >&5
6582 cat conftest.$ac_ext >&5
97bf5e38
MK
6583 rm -fr conftest*
6584 ac_cv_func_vfork_works=no
5c44784c 6585fi
97bf5e38 6586rm -fr conftest*
5c44784c
JM
6587fi
6588
0afdd437
MK
6589fi
6590
97bf5e38
MK
6591echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6592if test $ac_cv_func_vfork_works = no; then
0afdd437 6593 cat >> confdefs.h <<\EOF
97bf5e38 6594#define vfork fork
0afdd437
MK
6595EOF
6596
6597fi
6598
97bf5e38
MK
6599for ac_func in canonicalize_file_name realpath
6600do
6601echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6602echo "configure:6603: checking for $ac_func" >&5
97bf5e38 6603if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6604 echo $ac_n "(cached) $ac_c" 1>&6
6605else
6606 cat > conftest.$ac_ext <<EOF
9cc52bde 6607#line 6608 "configure"
7e89e357 6608#include "confdefs.h"
97bf5e38
MK
6609/* System header to define __stub macros and hopefully few prototypes,
6610 which can conflict with char $ac_func(); below. */
6611#include <assert.h>
6612/* Override any gcc2 internal prototype to avoid an error. */
6613/* We use char because int might match the return type of a gcc2
6614 builtin and then its argument prototype would still apply. */
6615char $ac_func();
6616
7e89e357 6617int main() {
97bf5e38
MK
6618
6619/* The GNU C library defines this for functions which it implements
6620 to always fail with ENOSYS. Some functions are actually named
6621 something starting with __ and the normal name is an alias. */
6622#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6623choke me
6624#else
6625$ac_func();
6626#endif
6627
7e89e357
JT
6628; return 0; }
6629EOF
9cc52bde 6630if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6631 rm -rf conftest*
97bf5e38 6632 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6633else
6634 echo "configure: failed program was:" >&5
6635 cat conftest.$ac_ext >&5
6636 rm -rf conftest*
97bf5e38 6637 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6638fi
6639rm -f conftest*
6640fi
6641
97bf5e38
MK
6642if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6643 echo "$ac_t""yes" 1>&6
6644 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6645 cat >> confdefs.h <<EOF
6646#define $ac_tr_func 1
7e89e357 6647EOF
97bf5e38
MK
6648
6649else
6650 echo "$ac_t""no" 1>&6
7e89e357 6651fi
97bf5e38 6652done
7e89e357 6653
97bf5e38 6654for ac_func in poll
7be570e7
JM
6655do
6656echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6657echo "configure:6658: checking for $ac_func" >&5
7be570e7
JM
6658if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6660else
6661 cat > conftest.$ac_ext <<EOF
9cc52bde 6662#line 6663 "configure"
7be570e7
JM
6663#include "confdefs.h"
6664/* System header to define __stub macros and hopefully few prototypes,
6665 which can conflict with char $ac_func(); below. */
6666#include <assert.h>
6667/* Override any gcc2 internal prototype to avoid an error. */
6668/* We use char because int might match the return type of a gcc2
6669 builtin and then its argument prototype would still apply. */
6670char $ac_func();
6671
6672int main() {
6673
6674/* The GNU C library defines this for functions which it implements
6675 to always fail with ENOSYS. Some functions are actually named
6676 something starting with __ and the normal name is an alias. */
6677#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678choke me
6679#else
6680$ac_func();
6681#endif
6682
6683; return 0; }
6684EOF
9cc52bde 6685if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6686 rm -rf conftest*
6687 eval "ac_cv_func_$ac_func=yes"
6688else
6689 echo "configure: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 rm -rf conftest*
6692 eval "ac_cv_func_$ac_func=no"
6693fi
6694rm -f conftest*
6695fi
6696
6697if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6698 echo "$ac_t""yes" 1>&6
6699 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6700 cat >> confdefs.h <<EOF
6701#define $ac_tr_func 1
6702EOF
6703
6704else
6705 echo "$ac_t""no" 1>&6
6706fi
6707done
6708
6709for ac_func in pread64
6710do
6711echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6712echo "configure:6713: checking for $ac_func" >&5
14abd0fb
MK
6713if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6714 echo $ac_n "(cached) $ac_c" 1>&6
6715else
6716 cat > conftest.$ac_ext <<EOF
9cc52bde 6717#line 6718 "configure"
14abd0fb
MK
6718#include "confdefs.h"
6719/* System header to define __stub macros and hopefully few prototypes,
6720 which can conflict with char $ac_func(); below. */
6721#include <assert.h>
6722/* Override any gcc2 internal prototype to avoid an error. */
6723/* We use char because int might match the return type of a gcc2
6724 builtin and then its argument prototype would still apply. */
6725char $ac_func();
6726
6727int main() {
6728
6729/* The GNU C library defines this for functions which it implements
6730 to always fail with ENOSYS. Some functions are actually named
6731 something starting with __ and the normal name is an alias. */
6732#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6733choke me
6734#else
6735$ac_func();
6736#endif
6737
6738; return 0; }
6739EOF
9cc52bde 6740if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6741 rm -rf conftest*
6742 eval "ac_cv_func_$ac_func=yes"
6743else
6744 echo "configure: failed program was:" >&5
6745 cat conftest.$ac_ext >&5
6746 rm -rf conftest*
6747 eval "ac_cv_func_$ac_func=no"
6748fi
6749rm -f conftest*
6750fi
6751
6752if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6753 echo "$ac_t""yes" 1>&6
6754 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6755 cat >> confdefs.h <<EOF
6756#define $ac_tr_func 1
6757EOF
6758
6759else
6760 echo "$ac_t""no" 1>&6
6761fi
6762done
6763
97bf5e38
MK
6764for ac_func in sbrk
6765do
6766echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6767echo "configure:6768: checking for $ac_func" >&5
97bf5e38 6768if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6769 echo $ac_n "(cached) $ac_c" 1>&6
6770else
6771 cat > conftest.$ac_ext <<EOF
9cc52bde 6772#line 6773 "configure"
c906108c 6773#include "confdefs.h"
97bf5e38
MK
6774/* System header to define __stub macros and hopefully few prototypes,
6775 which can conflict with char $ac_func(); below. */
6776#include <assert.h>
6777/* Override any gcc2 internal prototype to avoid an error. */
6778/* We use char because int might match the return type of a gcc2
6779 builtin and then its argument prototype would still apply. */
6780char $ac_func();
c906108c 6781
97bf5e38
MK
6782int main() {
6783
6784/* The GNU C library defines this for functions which it implements
6785 to always fail with ENOSYS. Some functions are actually named
6786 something starting with __ and the normal name is an alias. */
6787#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6788choke me
c906108c 6789#else
97bf5e38 6790$ac_func();
c906108c 6791#endif
97bf5e38 6792
c906108c
SS
6793; return 0; }
6794EOF
9cc52bde 6795if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6796 rm -rf conftest*
97bf5e38 6797 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6798else
6799 echo "configure: failed program was:" >&5
6800 cat conftest.$ac_ext >&5
6801 rm -rf conftest*
97bf5e38 6802 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6803fi
6804rm -f conftest*
6805fi
6806
97bf5e38
MK
6807if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6808 echo "$ac_t""yes" 1>&6
6809 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6810 cat >> confdefs.h <<EOF
6811#define $ac_tr_func 1
c906108c 6812EOF
97bf5e38
MK
6813
6814else
6815 echo "$ac_t""no" 1>&6
c906108c 6816fi
97bf5e38 6817done
c906108c 6818
97bf5e38
MK
6819for ac_func in setpgid setpgrp
6820do
6821echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6822echo "configure:6823: checking for $ac_func" >&5
97bf5e38 6823if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6824 echo $ac_n "(cached) $ac_c" 1>&6
6825else
6826 cat > conftest.$ac_ext <<EOF
9cc52bde 6827#line 6828 "configure"
c906108c 6828#include "confdefs.h"
97bf5e38
MK
6829/* System header to define __stub macros and hopefully few prototypes,
6830 which can conflict with char $ac_func(); below. */
6831#include <assert.h>
6832/* Override any gcc2 internal prototype to avoid an error. */
6833/* We use char because int might match the return type of a gcc2
6834 builtin and then its argument prototype would still apply. */
6835char $ac_func();
c906108c 6836
97bf5e38
MK
6837int main() {
6838
6839/* The GNU C library defines this for functions which it implements
6840 to always fail with ENOSYS. Some functions are actually named
6841 something starting with __ and the normal name is an alias. */
6842#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6843choke me
c906108c 6844#else
97bf5e38 6845$ac_func();
c906108c 6846#endif
97bf5e38 6847
c906108c
SS
6848; return 0; }
6849EOF
9cc52bde 6850if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6851 rm -rf conftest*
97bf5e38 6852 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6853else
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6856 rm -rf conftest*
97bf5e38 6857 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6858fi
6859rm -f conftest*
6860fi
6861
97bf5e38
MK
6862if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6863 echo "$ac_t""yes" 1>&6
6864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6865 cat >> confdefs.h <<EOF
6866#define $ac_tr_func 1
c906108c 6867EOF
97bf5e38
MK
6868
6869else
6870 echo "$ac_t""no" 1>&6
c906108c 6871fi
97bf5e38 6872done
c906108c 6873
e1ea1d75 6874for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6875do
6876echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6877echo "configure:6878: checking for $ac_func" >&5
97bf5e38 6878if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6879 echo $ac_n "(cached) $ac_c" 1>&6
6880else
6881 cat > conftest.$ac_ext <<EOF
9cc52bde 6882#line 6883 "configure"
c906108c 6883#include "confdefs.h"
97bf5e38
MK
6884/* System header to define __stub macros and hopefully few prototypes,
6885 which can conflict with char $ac_func(); below. */
6886#include <assert.h>
6887/* Override any gcc2 internal prototype to avoid an error. */
6888/* We use char because int might match the return type of a gcc2
6889 builtin and then its argument prototype would still apply. */
6890char $ac_func();
c906108c 6891
97bf5e38
MK
6892int main() {
6893
6894/* The GNU C library defines this for functions which it implements
6895 to always fail with ENOSYS. Some functions are actually named
6896 something starting with __ and the normal name is an alias. */
6897#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6898choke me
c906108c 6899#else
97bf5e38 6900$ac_func();
c906108c 6901#endif
97bf5e38 6902
c906108c
SS
6903; return 0; }
6904EOF
9cc52bde 6905if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6906 rm -rf conftest*
97bf5e38 6907 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6908else
6909 echo "configure: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6911 rm -rf conftest*
97bf5e38 6912 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6913fi
6914rm -f conftest*
6915fi
6916
97bf5e38
MK
6917if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6918 echo "$ac_t""yes" 1>&6
6919 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6920 cat >> confdefs.h <<EOF
6921#define $ac_tr_func 1
c906108c 6922EOF
e1ea1d75 6923
97bf5e38
MK
6924else
6925 echo "$ac_t""no" 1>&6
c906108c 6926fi
97bf5e38 6927done
c906108c 6928
97bf5e38
MK
6929for ac_func in socketpair
6930do
6931echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6932echo "configure:6933: checking for $ac_func" >&5
97bf5e38 6933if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6934 echo $ac_n "(cached) $ac_c" 1>&6
6935else
6936 cat > conftest.$ac_ext <<EOF
9cc52bde 6937#line 6938 "configure"
c906108c 6938#include "confdefs.h"
97bf5e38
MK
6939/* System header to define __stub macros and hopefully few prototypes,
6940 which can conflict with char $ac_func(); below. */
6941#include <assert.h>
6942/* Override any gcc2 internal prototype to avoid an error. */
6943/* We use char because int might match the return type of a gcc2
6944 builtin and then its argument prototype would still apply. */
6945char $ac_func();
c906108c 6946
97bf5e38
MK
6947int main() {
6948
6949/* The GNU C library defines this for functions which it implements
6950 to always fail with ENOSYS. Some functions are actually named
6951 something starting with __ and the normal name is an alias. */
6952#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6953choke me
c906108c 6954#else
97bf5e38 6955$ac_func();
c906108c 6956#endif
97bf5e38 6957
c906108c
SS
6958; return 0; }
6959EOF
9cc52bde 6960if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6961 rm -rf conftest*
97bf5e38 6962 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6963else
6964 echo "configure: failed program was:" >&5
6965 cat conftest.$ac_ext >&5
6966 rm -rf conftest*
97bf5e38 6967 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6968fi
6969rm -f conftest*
6970fi
6971
97bf5e38
MK
6972if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6973 echo "$ac_t""yes" 1>&6
6974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6975 cat >> confdefs.h <<EOF
6976#define $ac_tr_func 1
c906108c 6977EOF
97bf5e38
MK
6978
6979else
6980 echo "$ac_t""no" 1>&6
c906108c 6981fi
97bf5e38 6982done
c906108c 6983
b757528f
JJ
6984for ac_func in syscall
6985do
6986echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 6987echo "configure:6988: checking for $ac_func" >&5
b757528f
JJ
6988if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6989 echo $ac_n "(cached) $ac_c" 1>&6
6990else
6991 cat > conftest.$ac_ext <<EOF
9cc52bde 6992#line 6993 "configure"
b757528f
JJ
6993#include "confdefs.h"
6994/* System header to define __stub macros and hopefully few prototypes,
6995 which can conflict with char $ac_func(); below. */
6996#include <assert.h>
6997/* Override any gcc2 internal prototype to avoid an error. */
6998/* We use char because int might match the return type of a gcc2
6999 builtin and then its argument prototype would still apply. */
7000char $ac_func();
7001
7002int main() {
7003
7004/* The GNU C library defines this for functions which it implements
7005 to always fail with ENOSYS. Some functions are actually named
7006 something starting with __ and the normal name is an alias. */
7007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7008choke me
7009#else
7010$ac_func();
7011#endif
7012
7013; return 0; }
7014EOF
9cc52bde 7015if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7016 rm -rf conftest*
7017 eval "ac_cv_func_$ac_func=yes"
7018else
7019 echo "configure: failed program was:" >&5
7020 cat conftest.$ac_ext >&5
7021 rm -rf conftest*
7022 eval "ac_cv_func_$ac_func=no"
7023fi
7024rm -f conftest*
7025fi
7026
7027if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7028 echo "$ac_t""yes" 1>&6
7029 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7030 cat >> confdefs.h <<EOF
7031#define $ac_tr_func 1
7032EOF
7033
7034else
7035 echo "$ac_t""no" 1>&6
7036fi
7037done
7038
bcb3dc3d
MK
7039for ac_func in ttrace
7040do
7041echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 7042echo "configure:7043: checking for $ac_func" >&5
bcb3dc3d
MK
7043if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7044 echo $ac_n "(cached) $ac_c" 1>&6
7045else
7046 cat > conftest.$ac_ext <<EOF
9cc52bde 7047#line 7048 "configure"
bcb3dc3d
MK
7048#include "confdefs.h"
7049/* System header to define __stub macros and hopefully few prototypes,
7050 which can conflict with char $ac_func(); below. */
7051#include <assert.h>
7052/* Override any gcc2 internal prototype to avoid an error. */
7053/* We use char because int might match the return type of a gcc2
7054 builtin and then its argument prototype would still apply. */
7055char $ac_func();
7056
7057int main() {
7058
7059/* The GNU C library defines this for functions which it implements
7060 to always fail with ENOSYS. Some functions are actually named
7061 something starting with __ and the normal name is an alias. */
7062#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7063choke me
7064#else
7065$ac_func();
7066#endif
7067
7068; return 0; }
7069EOF
9cc52bde 7070if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bcb3dc3d
MK
7071 rm -rf conftest*
7072 eval "ac_cv_func_$ac_func=yes"
7073else
7074 echo "configure: failed program was:" >&5
7075 cat conftest.$ac_ext >&5
7076 rm -rf conftest*
7077 eval "ac_cv_func_$ac_func=no"
7078fi
7079rm -f conftest*
7080fi
7081
7082if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7083 echo "$ac_t""yes" 1>&6
7084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7085 cat >> confdefs.h <<EOF
7086#define $ac_tr_func 1
7087EOF
7088
7089else
7090 echo "$ac_t""no" 1>&6
7091fi
7092done
7093
8b9cf735
MK
7094for ac_func in wborder
7095do
7096echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc52bde 7097echo "configure:7098: checking for $ac_func" >&5
8b9cf735
MK
7098if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100else
7101 cat > conftest.$ac_ext <<EOF
9cc52bde 7102#line 7103 "configure"
8b9cf735
MK
7103#include "confdefs.h"
7104/* System header to define __stub macros and hopefully few prototypes,
7105 which can conflict with char $ac_func(); below. */
7106#include <assert.h>
7107/* Override any gcc2 internal prototype to avoid an error. */
7108/* We use char because int might match the return type of a gcc2
7109 builtin and then its argument prototype would still apply. */
7110char $ac_func();
7111
7112int main() {
7113
7114/* The GNU C library defines this for functions which it implements
7115 to always fail with ENOSYS. Some functions are actually named
7116 something starting with __ and the normal name is an alias. */
7117#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7118choke me
7119#else
7120$ac_func();
7121#endif
7122
7123; return 0; }
7124EOF
9cc52bde 7125if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8b9cf735
MK
7126 rm -rf conftest*
7127 eval "ac_cv_func_$ac_func=yes"
7128else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -rf conftest*
7132 eval "ac_cv_func_$ac_func=no"
7133fi
7134rm -f conftest*
7135fi
7136
7137if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7138 echo "$ac_t""yes" 1>&6
7139 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7140 cat >> confdefs.h <<EOF
7141#define $ac_tr_func 1
7142EOF
7143
7144else
7145 echo "$ac_t""no" 1>&6
7146fi
7147done
7148
97bf5e38 7149
086ec9eb
MK
7150# Check the return and argument types of ptrace. No canned test for
7151# this, so roll our own.
7152gdb_ptrace_headers='
7153#if HAVE_SYS_TYPES_H
7154# include <sys/types.h>
7155#endif
7156#if HAVE_SYS_PTRACE_H
7157# include <sys/ptrace.h>
7158#endif
7159#if HAVE_UNISTD_H
7160# include <unistd.h>
7161#endif
7162'
7163# There is no point in checking if we don't have a prototype.
7164for ac_func in ptrace
7165do
7166 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7167echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
9cc52bde 7168echo "configure:7169: checking whether $ac_func is declared" >&5
086ec9eb
MK
7169if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
7170 echo $ac_n "(cached) $ac_c" 1>&6
7171else
7172 cat > conftest.$ac_ext <<EOF
9cc52bde 7173#line 7174 "configure"
086ec9eb
MK
7174#include "confdefs.h"
7175#undef $ac_tr_decl
7176#define $ac_tr_decl 1
7177 $gdb_ptrace_headers
7178
7179int main() {
7180#ifndef $ac_func
7181char *(*pfn) = (char *(*)) $ac_func ;
7182#endif
7183; return 0; }
7184EOF
9cc52bde 7185if { (eval echo configure:7186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7186 rm -rf conftest*
7187 eval "gcc_cv_have_decl_$ac_func=yes"
7188else
7189 echo "configure: failed program was:" >&5
7190 cat conftest.$ac_ext >&5
7191 rm -rf conftest*
7192 eval "gcc_cv_have_decl_$ac_func=no"
7193fi
7194rm -f conftest*
7195fi
7196
7197if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
7198 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
7199#define $ac_tr_decl 1
7200EOF
7201
7202else
7203 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
7204#define $ac_tr_decl 0
7205EOF
7206
7207 : ${gdb_cv_func_ptrace_ret='int'}
7208 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7209
7210fi
7211
7212done
7213if test x = y ; then
7214 cat >> confdefs.h <<\EOF
7215#define HAVE_DECL_PTRACE 1
7216EOF
7217fi
7218
7219# Check return type.
7220echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
9cc52bde 7221echo "configure:7222: checking return type of ptrace" >&5
086ec9eb
MK
7222if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
7223 echo $ac_n "(cached) $ac_c" 1>&6
7224else
7225 cat > conftest.$ac_ext <<EOF
9cc52bde 7226#line 7227 "configure"
086ec9eb
MK
7227#include "confdefs.h"
7228$gdb_ptrace_headers
7229int main() {
5885ab49 7230extern int ptrace ();
086ec9eb
MK
7231; return 0; }
7232EOF
9cc52bde 7233if { (eval echo configure:7234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb 7234 rm -rf conftest*
5885ab49 7235 gdb_cv_func_ptrace_ret='int'
086ec9eb
MK
7236else
7237 echo "configure: failed program was:" >&5
7238 cat conftest.$ac_ext >&5
7239 rm -rf conftest*
5885ab49 7240 gdb_cv_func_ptrace_ret='long'
086ec9eb
MK
7241fi
7242rm -f conftest*
7243fi
7244
7245echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
7246cat >> confdefs.h <<EOF
7247#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7248EOF
7249
7250# Check argument types.
7251echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
9cc52bde 7252echo "configure:7253: checking types of arguments for ptrace" >&5
086ec9eb
MK
7253if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
7254 echo $ac_n "(cached) $ac_c" 1>&6
7255else
7256
7257for gdb_arg1 in 'int' 'long'; do
7258 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7259 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
7260 for gdb_arg4 in 'int' 'long'; do
7261 cat > conftest.$ac_ext <<EOF
9cc52bde 7262#line 7263 "configure"
086ec9eb
MK
7263#include "confdefs.h"
7264$gdb_ptrace_headers
7265int main() {
7266
7267extern $gdb_cv_func_ptrace_ret
7268 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7269
7270; return 0; }
7271EOF
9cc52bde 7272if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7273 rm -rf conftest*
7274 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7275 break 4;
7276else
7277 echo "configure: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279fi
7280rm -f conftest*
7281 for gdb_arg5 in 'int *' 'int' 'long'; do
7282 cat > conftest.$ac_ext <<EOF
9cc52bde 7283#line 7284 "configure"
086ec9eb
MK
7284#include "confdefs.h"
7285$gdb_ptrace_headers
7286int main() {
7287
7288extern $gdb_cv_func_ptrace_ret
7289 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7290
7291; return 0; }
7292EOF
9cc52bde 7293if { (eval echo configure:7294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7294 rm -rf conftest*
7295
7296gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7297 break 5;
7298else
7299 echo "configure: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7301fi
7302rm -f conftest*
7303 done
7304 done
7305 done
7306 done
7307done
7308# Provide a safe default value.
7309: ${gdb_cv_func_ptrace_args='int,int,long,long'}
7310
7311fi
7312
7313echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6
7314ac_save_IFS=$IFS; IFS=','
7315set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7316IFS=$ac_save_IFS
7317shift
7318cat >> confdefs.h <<EOF
64218d3e 7319#define PTRACE_TYPE_ARG3 $3
086ec9eb
MK
7320EOF
7321
7322if test -n "$5"; then
7323 cat >> confdefs.h <<EOF
64218d3e 7324#define PTRACE_TYPE_ARG5 $5
086ec9eb
MK
7325EOF
7326
7327fi
7328
97bf5e38
MK
7329if test "$cross_compiling" = no; then
7330 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9cc52bde 7331echo "configure:7332: checking whether setpgrp takes no argument" >&5
97bf5e38 7332if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7333 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7334else
7335 if test "$cross_compiling" = yes; then
7336 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7337else
7338 cat > conftest.$ac_ext <<EOF
9cc52bde 7339#line 7340 "configure"
c906108c
SS
7340#include "confdefs.h"
7341
c906108c
SS
7342#ifdef HAVE_UNISTD_H
7343#include <unistd.h>
7344#endif
97bf5e38
MK
7345
7346/*
7347 * If this system has a BSD-style setpgrp, which takes arguments, exit
7348 * successfully.
7349 */
7350main()
7351{
7352 if (setpgrp(1,1) == -1)
7353 exit(0);
7354 else
7355 exit(1);
7356}
7357
c906108c 7358EOF
9cc52bde 7359if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7360then
7361 ac_cv_func_setpgrp_void=no
c906108c
SS
7362else
7363 echo "configure: failed program was:" >&5
7364 cat conftest.$ac_ext >&5
97bf5e38
MK
7365 rm -fr conftest*
7366 ac_cv_func_setpgrp_void=yes
c906108c 7367fi
97bf5e38 7368rm -fr conftest*
c906108c
SS
7369fi
7370
97bf5e38
MK
7371
7372fi
7373
7374echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7375if test $ac_cv_func_setpgrp_void = yes; then
7376 cat >> confdefs.h <<\EOF
7377#define SETPGRP_VOID 1
c906108c
SS
7378EOF
7379
7380fi
7381
97bf5e38
MK
7382else
7383 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9cc52bde 7384echo "configure:7385: checking whether setpgrp takes no argument" >&5
97bf5e38 7385if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387else
7388 cat > conftest.$ac_ext <<EOF
9cc52bde 7389#line 7390 "configure"
b83266a0
SS
7390#include "confdefs.h"
7391
b83266a0 7392#include <unistd.h>
97bf5e38 7393
b83266a0 7394int main() {
97bf5e38
MK
7395
7396 if (setpgrp(1,1) == -1)
7397 exit (0);
7398 else
7399 exit (1);
7400
b83266a0
SS
7401; return 0; }
7402EOF
9cc52bde 7403if { (eval echo configure:7404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7404 rm -rf conftest*
97bf5e38 7405 ac_cv_func_setpgrp_void=no
b83266a0
SS
7406else
7407 echo "configure: failed program was:" >&5
7408 cat conftest.$ac_ext >&5
7409 rm -rf conftest*
97bf5e38 7410 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7411fi
7412rm -f conftest*
7413fi
7414
97bf5e38
MK
7415echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7416if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7417 cat >> confdefs.h <<\EOF
97bf5e38 7418#define SETPGRP_VOID 1
b83266a0
SS
7419EOF
7420
97bf5e38 7421fi
b83266a0
SS
7422fi
7423
97bf5e38
MK
7424# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7425# since sigsetjmp might only be defined as a macro.
7426echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9cc52bde 7427echo "configure:7428: checking for sigsetjmp" >&5
97bf5e38 7428if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7429 echo $ac_n "(cached) $ac_c" 1>&6
7430else
7431 cat > conftest.$ac_ext <<EOF
9cc52bde 7432#line 7433 "configure"
a4db0f07
RH
7433#include "confdefs.h"
7434
97bf5e38
MK
7435#include <setjmp.h>
7436
a4db0f07 7437int main() {
97bf5e38 7438sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7439; return 0; }
7440EOF
9cc52bde 7441if { (eval echo configure:7442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7442 rm -rf conftest*
97bf5e38 7443 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7444else
7445 echo "configure: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 rm -rf conftest*
97bf5e38 7448 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7449fi
7450rm -f conftest*
7451fi
7452
97bf5e38
MK
7453echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7454if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7455 cat >> confdefs.h <<\EOF
97bf5e38 7456#define HAVE_SIGSETJMP 1
a4db0f07
RH
7457EOF
7458
7459fi
c906108c 7460
06825bd1
MK
7461# Assume we'll default to using the included libiberty regex.
7462gdb_use_included_regex=yes
7463
7464# However, if the system regex is GNU regex, then default to *not*
7465# using the included regex.
7466echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
9cc52bde 7467echo "configure:7468: checking for GNU regex" >&5
06825bd1
MK
7468if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7469 echo $ac_n "(cached) $ac_c" 1>&6
7470else
7471 cat > conftest.$ac_ext <<EOF
9cc52bde 7472#line 7473 "configure"
06825bd1
MK
7473#include "confdefs.h"
7474#include <gnu-versions.h>
7475int main() {
7476#define REGEX_INTERFACE_VERSION 1
7477#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7478# error "Version mismatch"
7479#endif
7480; return 0; }
7481EOF
9cc52bde 7482if { (eval echo configure:7483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7483 rm -rf conftest*
7484 gdb_cv_have_gnu_regex=yes
7485else
7486 echo "configure: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 rm -rf conftest*
7489 gdb_cv_have_gnu_regex=no
7490fi
7491rm -f conftest*
7492fi
7493
7494echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7495if test $gdb_cv_have_gnu_regex = yes; then
7496 gdb_use_included_regex=no
7497fi
7498
7499# Check whether --with-included-regex or --without-included-regex was given.
7500if test "${with_included_regex+set}" = set; then
7501 withval="$with_included_regex"
7502 gdb_with_regex=$withval
7503else
7504 gdb_with_regex=$gdb_use_included_regex
7505fi
7506
7507if test "$gdb_with_regex" = yes; then
7508 cat >> confdefs.h <<\EOF
7509#define USE_INCLUDED_REGEX 1
7510EOF
7511
7512fi
7513
70f9f479
MK
7514# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7515echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
9cc52bde 7516echo "configure:7517: checking for td_pcb in struct thread" >&5
70f9f479
MK
7517if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7518 echo $ac_n "(cached) $ac_c" 1>&6
7519else
7520 cat > conftest.$ac_ext <<EOF
9cc52bde 7521#line 7522 "configure"
70f9f479 7522#include "confdefs.h"
d15be926 7523#include <sys/param.h>
70f9f479
MK
7524#include <sys/proc.h>
7525int main() {
7526struct thread td; td.td_pcb;
7527; return 0; }
7528EOF
9cc52bde 7529if { (eval echo configure:7530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
70f9f479
MK
7530 rm -rf conftest*
7531 gdb_cv_struct_thread_td_pcb=yes
7532else
7533 echo "configure: failed program was:" >&5
7534 cat conftest.$ac_ext >&5
7535 rm -rf conftest*
7536 gdb_cv_struct_thread_td_pcb=no
7537fi
7538rm -f conftest*
7539fi
7540
7541echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7542if test $gdb_cv_struct_thread_td_pcb = yes; then
7543 cat >> confdefs.h <<\EOF
7544#define HAVE_STRUCT_THREAD_TD_PCB 1
7545EOF
7546
7547fi
7548
5c7f2947
MK
7549# See if <sys/lwp.h> defines `struct lwp`.
7550echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
9cc52bde 7551echo "configure:7552: checking for struct lwp" >&5
5c7f2947
MK
7552if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
7553 echo $ac_n "(cached) $ac_c" 1>&6
7554else
7555 cat > conftest.$ac_ext <<EOF
9cc52bde 7556#line 7557 "configure"
5c7f2947
MK
7557#include "confdefs.h"
7558#include <sys/param.h>
7559#include <sys/lwp.h>
7560int main() {
7561struct lwp l;
7562; return 0; }
7563EOF
9cc52bde 7564if { (eval echo configure:7565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c7f2947
MK
7565 rm -rf conftest*
7566 gdb_cv_struct_lwp=yes
7567else
7568 echo "configure: failed program was:" >&5
7569 cat conftest.$ac_ext >&5
7570 rm -rf conftest*
7571 gdb_cv_struct_lwp=no
7572fi
7573rm -f conftest*
7574fi
7575
7576echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
7577if test $gdb_cv_struct_lwp = yes; then
7578 cat >> confdefs.h <<\EOF
7579#define HAVE_STRUCT_LWP 1
7580EOF
7581
7582fi
7583
78434e59
MK
7584# See if <machine/reg.h> degines `struct reg'.
7585echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
9cc52bde 7586echo "configure:7587: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7587if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7588 echo $ac_n "(cached) $ac_c" 1>&6
7589else
7590 cat > conftest.$ac_ext <<EOF
9cc52bde 7591#line 7592 "configure"
78434e59
MK
7592#include "confdefs.h"
7593#include <sys/types.h>
7594#include <machine/reg.h>
7595int main() {
7596struct reg r;
7597; return 0; }
7598EOF
9cc52bde 7599if { (eval echo configure:7600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7600 rm -rf conftest*
7601 gdb_cv_struct_reg=yes
7602else
7603 echo "configure: failed program was:" >&5
7604 cat conftest.$ac_ext >&5
7605 rm -rf conftest*
7606 gdb_cv_struct_reg=no
7607fi
7608rm -f conftest*
7609fi
7610
7611echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7612if test $gdb_cv_struct_reg = yes; then
7613 cat >> confdefs.h <<\EOF
7614#define HAVE_STRUCT_REG 1
7615EOF
7616
7617fi
7618
97bf5e38
MK
7619# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7620# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7621echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
9cc52bde 7622echo "configure:7623: checking for r_fs in struct reg" >&5
97bf5e38
MK
7623if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7624 echo $ac_n "(cached) $ac_c" 1>&6
7625else
7626 cat > conftest.$ac_ext <<EOF
9cc52bde 7627#line 7628 "configure"
c906108c 7628#include "confdefs.h"
97bf5e38
MK
7629#include <machine/reg.h>
7630int main() {
7631struct reg r; r.r_fs;
7632; return 0; }
c906108c 7633EOF
9cc52bde 7634if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7635 rm -rf conftest*
97bf5e38 7636 gdb_cv_struct_reg_r_fs=yes
c906108c 7637else
97bf5e38
MK
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
c906108c 7640 rm -rf conftest*
97bf5e38 7641 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7642fi
7643rm -f conftest*
97bf5e38 7644fi
c906108c 7645
97bf5e38
MK
7646echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7647if test $gdb_cv_struct_reg_r_fs = yes; then
7648 cat >> confdefs.h <<\EOF
7649#define HAVE_STRUCT_REG_R_FS 1
7650EOF
7651
7652fi
7653echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
9cc52bde 7654echo "configure:7655: checking for r_gs in struct reg" >&5
97bf5e38
MK
7655if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7656 echo $ac_n "(cached) $ac_c" 1>&6
7657else
7658 cat > conftest.$ac_ext <<EOF
9cc52bde 7659#line 7660 "configure"
c906108c 7660#include "confdefs.h"
97bf5e38
MK
7661#include <machine/reg.h>
7662int main() {
7663struct reg r; r.r_gs;
7664; return 0; }
c906108c 7665EOF
9cc52bde 7666if { (eval echo configure:7667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7667 rm -rf conftest*
97bf5e38 7668 gdb_cv_struct_reg_r_gs=yes
c906108c 7669else
97bf5e38
MK
7670 echo "configure: failed program was:" >&5
7671 cat conftest.$ac_ext >&5
c906108c 7672 rm -rf conftest*
97bf5e38 7673 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7674fi
7675rm -f conftest*
c906108c 7676fi
c906108c 7677
97bf5e38
MK
7678echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7679if test $gdb_cv_struct_reg_r_gs = yes; then
7680 cat >> confdefs.h <<\EOF
7681#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7682EOF
7683
c906108c
SS
7684fi
7685
97bf5e38
MK
7686# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7687echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
9cc52bde 7688echo "configure:7689: checking for PTRACE_GETREGS" >&5
97bf5e38 7689if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7690 echo $ac_n "(cached) $ac_c" 1>&6
7691else
7692 cat > conftest.$ac_ext <<EOF
9cc52bde 7693#line 7694 "configure"
c906108c 7694#include "confdefs.h"
97bf5e38 7695#include <sys/ptrace.h>
c906108c 7696int main() {
97bf5e38 7697PTRACE_GETREGS;
c906108c
SS
7698; return 0; }
7699EOF
9cc52bde 7700if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7701 rm -rf conftest*
97bf5e38 7702 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7703else
7704 echo "configure: failed program was:" >&5
7705 cat conftest.$ac_ext >&5
7706 rm -rf conftest*
97bf5e38 7707 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7708fi
7709rm -f conftest*
7710fi
7711
97bf5e38
MK
7712echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7713if test $gdb_cv_have_ptrace_getregs = yes; then
7714 cat >> confdefs.h <<\EOF
7715#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7716EOF
7717
97bf5e38 7718fi
c906108c 7719
97bf5e38
MK
7720# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7721echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
9cc52bde 7722echo "configure:7723: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7723if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7724 echo $ac_n "(cached) $ac_c" 1>&6
7725else
7726 cat > conftest.$ac_ext <<EOF
9cc52bde 7727#line 7728 "configure"
c906108c 7728#include "confdefs.h"
97bf5e38 7729#include <sys/ptrace.h>
c906108c 7730int main() {
97bf5e38 7731PTRACE_GETFPXREGS;
c906108c
SS
7732; return 0; }
7733EOF
9cc52bde 7734if { (eval echo configure:7735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7735 rm -rf conftest*
97bf5e38 7736 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7737else
7738 echo "configure: failed program was:" >&5
7739 cat conftest.$ac_ext >&5
7740 rm -rf conftest*
97bf5e38 7741 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7742fi
7743rm -f conftest*
7744fi
7745
97bf5e38
MK
7746echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7747if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7748 cat >> confdefs.h <<\EOF
7749#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7750EOF
7751
97bf5e38 7752fi
c906108c 7753
97bf5e38
MK
7754# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7755echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
9cc52bde 7756echo "configure:7757: checking for PT_GETDBREGS" >&5
97bf5e38 7757if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7758 echo $ac_n "(cached) $ac_c" 1>&6
7759else
7760 cat > conftest.$ac_ext <<EOF
9cc52bde 7761#line 7762 "configure"
c906108c 7762#include "confdefs.h"
97bf5e38
MK
7763#include <sys/types.h>
7764#include <sys/ptrace.h>
c906108c 7765int main() {
97bf5e38 7766PT_GETDBREGS;
c906108c
SS
7767; return 0; }
7768EOF
9cc52bde 7769if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7770 rm -rf conftest*
97bf5e38 7771 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7772else
7773 echo "configure: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 rm -rf conftest*
97bf5e38 7776 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7777fi
7778rm -f conftest*
7779fi
7780
97bf5e38
MK
7781echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7782if test $gdb_cv_have_pt_getdbregs = yes; then
7783 cat >> confdefs.h <<\EOF
7784#define HAVE_PT_GETDBREGS 1
c906108c
SS
7785EOF
7786
97bf5e38 7787fi
c906108c 7788
97bf5e38
MK
7789# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7790echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
9cc52bde 7791echo "configure:7792: checking for PT_GETXMMREGS" >&5
97bf5e38 7792if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7793 echo $ac_n "(cached) $ac_c" 1>&6
7794else
7795 cat > conftest.$ac_ext <<EOF
9cc52bde 7796#line 7797 "configure"
c906108c 7797#include "confdefs.h"
97bf5e38
MK
7798#include <sys/types.h>
7799#include <sys/ptrace.h>
c906108c 7800int main() {
97bf5e38 7801PT_GETXMMREGS;
c906108c
SS
7802; return 0; }
7803EOF
9cc52bde 7804if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7805 rm -rf conftest*
97bf5e38 7806 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7807else
7808 echo "configure: failed program was:" >&5
7809 cat conftest.$ac_ext >&5
7810 rm -rf conftest*
97bf5e38 7811 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7812fi
7813rm -f conftest*
7814fi
7815
97bf5e38
MK
7816echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7817if test $gdb_cv_have_pt_getxmmregs = yes; then
7818 cat >> confdefs.h <<\EOF
7819#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7820EOF
7821
97bf5e38 7822fi
c906108c 7823
27ca5dad 7824# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7825# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7826echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
9cc52bde 7827echo "configure:7828: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7828if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7829 echo $ac_n "(cached) $ac_c" 1>&6
7830else
7831 cat > conftest.$ac_ext <<EOF
9cc52bde 7832#line 7833 "configure"
27ca5dad
MC
7833#include "confdefs.h"
7834#include <stdint.h>
7835int main() {
7836uintptr_t foo = 0;
7837; return 0; }
7838EOF
9cc52bde 7839if { (eval echo configure:7840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7840 rm -rf conftest*
7841 gdb_cv_have_uintptr_t=yes
7842else
7843 echo "configure: failed program was:" >&5
7844 cat conftest.$ac_ext >&5
7845 rm -rf conftest*
7846 gdb_cv_have_uintptr_t=no
7847fi
7848rm -f conftest*
7849fi
7850
7851echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7852if test $gdb_cv_have_uintptr_t = yes; then
7853 cat >> confdefs.h <<\EOF
7854#define HAVE_UINTPTR_T 1
7855EOF
7856
7857fi
97bf5e38
MK
7858
7859echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
9cc52bde 7860echo "configure:7861: checking whether malloc must be declared" >&5
97bf5e38 7861if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7862 echo $ac_n "(cached) $ac_c" 1>&6
7863else
7864 cat > conftest.$ac_ext <<EOF
9cc52bde 7865#line 7866 "configure"
3862412b 7866#include "confdefs.h"
e17bf198 7867
97bf5e38
MK
7868#include <stdio.h>
7869#ifdef HAVE_STRING_H
7870#include <string.h>
7871#else
7872#ifdef HAVE_STRINGS_H
7873#include <strings.h>
7874#endif
7875#endif
7876#ifdef HAVE_STDLIB_H
7877#include <stdlib.h>
7878#endif
7879#ifdef HAVE_UNISTD_H
7880#include <unistd.h>
7881#endif
3862412b 7882int main() {
97bf5e38 7883char *(*pfn) = (char *(*)) malloc
3862412b
MK
7884; return 0; }
7885EOF
9cc52bde 7886if { (eval echo configure:7887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7887 rm -rf conftest*
97bf5e38 7888 bfd_cv_decl_needed_malloc=no
3862412b
MK
7889else
7890 echo "configure: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 rm -rf conftest*
97bf5e38 7893 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7894fi
7895rm -f conftest*
7896fi
7897
97bf5e38
MK
7898echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7899if test $bfd_cv_decl_needed_malloc = yes; then
7900 cat >> confdefs.h <<\EOF
7901#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7902EOF
7903
97bf5e38 7904fi
3862412b 7905
97bf5e38 7906echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
9cc52bde 7907echo "configure:7908: checking whether realloc must be declared" >&5
97bf5e38 7908if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7909 echo $ac_n "(cached) $ac_c" 1>&6
7910else
7911 cat > conftest.$ac_ext <<EOF
9cc52bde 7912#line 7913 "configure"
3862412b 7913#include "confdefs.h"
e17bf198 7914
97bf5e38
MK
7915#include <stdio.h>
7916#ifdef HAVE_STRING_H
7917#include <string.h>
7918#else
7919#ifdef HAVE_STRINGS_H
7920#include <strings.h>
7921#endif
7922#endif
7923#ifdef HAVE_STDLIB_H
7924#include <stdlib.h>
7925#endif
7926#ifdef HAVE_UNISTD_H
7927#include <unistd.h>
7928#endif
3862412b 7929int main() {
97bf5e38 7930char *(*pfn) = (char *(*)) realloc
3862412b
MK
7931; return 0; }
7932EOF
9cc52bde 7933if { (eval echo configure:7934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7934 rm -rf conftest*
97bf5e38 7935 bfd_cv_decl_needed_realloc=no
3862412b
MK
7936else
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 rm -rf conftest*
97bf5e38 7940 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7941fi
7942rm -f conftest*
7943fi
7944
97bf5e38
MK
7945echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7946if test $bfd_cv_decl_needed_realloc = yes; then
7947 cat >> confdefs.h <<\EOF
7948#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7949EOF
7950
97bf5e38 7951fi
3862412b 7952
97bf5e38 7953echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
9cc52bde 7954echo "configure:7955: checking whether free must be declared" >&5
97bf5e38 7955if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7956 echo $ac_n "(cached) $ac_c" 1>&6
7957else
7958 cat > conftest.$ac_ext <<EOF
9cc52bde 7959#line 7960 "configure"
451928c5 7960#include "confdefs.h"
e17bf198 7961
97bf5e38
MK
7962#include <stdio.h>
7963#ifdef HAVE_STRING_H
7964#include <string.h>
7965#else
7966#ifdef HAVE_STRINGS_H
7967#include <strings.h>
7968#endif
7969#endif
7970#ifdef HAVE_STDLIB_H
7971#include <stdlib.h>
7972#endif
7973#ifdef HAVE_UNISTD_H
7974#include <unistd.h>
7975#endif
451928c5 7976int main() {
97bf5e38 7977char *(*pfn) = (char *(*)) free
451928c5
AC
7978; return 0; }
7979EOF
9cc52bde 7980if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7981 rm -rf conftest*
97bf5e38 7982 bfd_cv_decl_needed_free=no
451928c5
AC
7983else
7984 echo "configure: failed program was:" >&5
7985 cat conftest.$ac_ext >&5
7986 rm -rf conftest*
97bf5e38 7987 bfd_cv_decl_needed_free=yes
451928c5
AC
7988fi
7989rm -f conftest*
7990fi
7991
97bf5e38
MK
7992echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7993if test $bfd_cv_decl_needed_free = yes; then
7994 cat >> confdefs.h <<\EOF
7995#define NEED_DECLARATION_FREE 1
451928c5
AC
7996EOF
7997
97bf5e38 7998fi
451928c5 7999
97bf5e38 8000echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
9cc52bde 8001echo "configure:8002: checking whether strerror must be declared" >&5
97bf5e38 8002if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
8003 echo $ac_n "(cached) $ac_c" 1>&6
8004else
8005 cat > conftest.$ac_ext <<EOF
9cc52bde 8006#line 8007 "configure"
451928c5 8007#include "confdefs.h"
e17bf198 8008
97bf5e38
MK
8009#include <stdio.h>
8010#ifdef HAVE_STRING_H
8011#include <string.h>
8012#else
8013#ifdef HAVE_STRINGS_H
8014#include <strings.h>
8015#endif
8016#endif
8017#ifdef HAVE_STDLIB_H
8018#include <stdlib.h>
8019#endif
8020#ifdef HAVE_UNISTD_H
8021#include <unistd.h>
8022#endif
451928c5 8023int main() {
97bf5e38 8024char *(*pfn) = (char *(*)) strerror
451928c5
AC
8025; return 0; }
8026EOF
9cc52bde 8027if { (eval echo configure:8028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 8028 rm -rf conftest*
97bf5e38 8029 bfd_cv_decl_needed_strerror=no
451928c5
AC
8030else
8031 echo "configure: failed program was:" >&5
8032 cat conftest.$ac_ext >&5
8033 rm -rf conftest*
97bf5e38 8034 bfd_cv_decl_needed_strerror=yes
451928c5
AC
8035fi
8036rm -f conftest*
8037fi
8038
97bf5e38
MK
8039echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
8040if test $bfd_cv_decl_needed_strerror = yes; then
8041 cat >> confdefs.h <<\EOF
8042#define NEED_DECLARATION_STRERROR 1
451928c5
AC
8043EOF
8044
97bf5e38 8045fi
451928c5 8046
97bf5e38 8047echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
9cc52bde 8048echo "configure:8049: checking whether strdup must be declared" >&5
97bf5e38 8049if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
8050 echo $ac_n "(cached) $ac_c" 1>&6
8051else
8052 cat > conftest.$ac_ext <<EOF
9cc52bde 8053#line 8054 "configure"
3862412b 8054#include "confdefs.h"
e17bf198 8055
97bf5e38
MK
8056#include <stdio.h>
8057#ifdef HAVE_STRING_H
8058#include <string.h>
8059#else
8060#ifdef HAVE_STRINGS_H
8061#include <strings.h>
8062#endif
8063#endif
8064#ifdef HAVE_STDLIB_H
8065#include <stdlib.h>
8066#endif
8067#ifdef HAVE_UNISTD_H
8068#include <unistd.h>
8069#endif
3862412b 8070int main() {
97bf5e38 8071char *(*pfn) = (char *(*)) strdup
3862412b
MK
8072; return 0; }
8073EOF
9cc52bde 8074if { (eval echo configure:8075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8075 rm -rf conftest*
97bf5e38 8076 bfd_cv_decl_needed_strdup=no
3862412b
MK
8077else
8078 echo "configure: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 rm -rf conftest*
97bf5e38 8081 bfd_cv_decl_needed_strdup=yes
3862412b
MK
8082fi
8083rm -f conftest*
8084fi
8085
97bf5e38
MK
8086echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
8087if test $bfd_cv_decl_needed_strdup = yes; then
8088 cat >> confdefs.h <<\EOF
8089#define NEED_DECLARATION_STRDUP 1
3862412b
MK
8090EOF
8091
97bf5e38 8092fi
3862412b 8093
97bf5e38 8094echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
9cc52bde 8095echo "configure:8096: checking whether strstr must be declared" >&5
97bf5e38 8096if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
8097 echo $ac_n "(cached) $ac_c" 1>&6
8098else
8099 cat > conftest.$ac_ext <<EOF
9cc52bde 8100#line 8101 "configure"
3862412b 8101#include "confdefs.h"
e17bf198 8102
97bf5e38
MK
8103#include <stdio.h>
8104#ifdef HAVE_STRING_H
8105#include <string.h>
8106#else
8107#ifdef HAVE_STRINGS_H
8108#include <strings.h>
8109#endif
8110#endif
8111#ifdef HAVE_STDLIB_H
8112#include <stdlib.h>
8113#endif
8114#ifdef HAVE_UNISTD_H
8115#include <unistd.h>
8116#endif
3862412b 8117int main() {
97bf5e38 8118char *(*pfn) = (char *(*)) strstr
3862412b
MK
8119; return 0; }
8120EOF
9cc52bde 8121if { (eval echo configure:8122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8122 rm -rf conftest*
97bf5e38 8123 bfd_cv_decl_needed_strstr=no
3862412b
MK
8124else
8125 echo "configure: failed program was:" >&5
8126 cat conftest.$ac_ext >&5
8127 rm -rf conftest*
97bf5e38 8128 bfd_cv_decl_needed_strstr=yes
3862412b
MK
8129fi
8130rm -f conftest*
8131fi
8132
97bf5e38
MK
8133echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
8134if test $bfd_cv_decl_needed_strstr = yes; then
8135 cat >> confdefs.h <<\EOF
8136#define NEED_DECLARATION_STRSTR 1
3862412b
MK
8137EOF
8138
97bf5e38 8139fi
3862412b 8140
97bf5e38 8141echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
9cc52bde 8142echo "configure:8143: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 8143if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
8144 echo $ac_n "(cached) $ac_c" 1>&6
8145else
8146 cat > conftest.$ac_ext <<EOF
9cc52bde 8147#line 8148 "configure"
596c9d4b
KB
8148#include "confdefs.h"
8149
97bf5e38
MK
8150#include <stdio.h>
8151#ifdef HAVE_STRING_H
8152#include <string.h>
8153#else
8154#ifdef HAVE_STRINGS_H
8155#include <strings.h>
8156#endif
8157#endif
8158#ifdef HAVE_STDLIB_H
8159#include <stdlib.h>
8160#endif
8161#ifdef HAVE_UNISTD_H
8162#include <unistd.h>
8163#endif
596c9d4b 8164int main() {
97bf5e38 8165char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
8166; return 0; }
8167EOF
9cc52bde 8168if { (eval echo configure:8169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8169 rm -rf conftest*
97bf5e38 8170 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
8171else
8172 echo "configure: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174 rm -rf conftest*
97bf5e38 8175 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
8176fi
8177rm -f conftest*
8178fi
8179
97bf5e38
MK
8180echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
8181if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
8182 cat >> confdefs.h <<\EOF
8183#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
8184EOF
8185
97bf5e38 8186fi
596c9d4b 8187
97bf5e38
MK
8188
8189# The following save_state_t checkery is only necessary for HPUX
8190# versions earlier than 10.20. When those fade from memory, this
8191# could be expunged. --jsm 1999-03-22
8192
8193echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
9cc52bde 8194echo "configure:8195: checking for HPUX save_state structure" >&5
97bf5e38 8195cat > conftest.$ac_ext <<EOF
9cc52bde 8196#line 8197 "configure"
97bf5e38
MK
8197#include "confdefs.h"
8198#include <machine/save_state.h>
8199EOF
8200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8201 egrep "save_state_t" >/dev/null 2>&1; then
8202 rm -rf conftest*
8203 gdb_cv_hpux_savestate=yes
8204else
8205 rm -rf conftest*
8206 gdb_cv_hpux_savestate=no
8207fi
8208rm -f conftest*
8209
8210cat > conftest.$ac_ext <<EOF
9cc52bde 8211#line 8212 "configure"
97bf5e38
MK
8212#include "confdefs.h"
8213#include <machine/save_state.h>
8214EOF
8215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8216 egrep "ss_wide" >/dev/null 2>&1; then
8217 rm -rf conftest*
8218 gdb_cv_hpux_sswide=yes
8219else
8220 rm -rf conftest*
8221 gdb_cv_hpux_sswide=no
8222fi
8223rm -f conftest*
8224
8225if test $gdb_cv_hpux_savestate = yes
8226then
8227 cat >> confdefs.h <<\EOF
8228#define HAVE_STRUCT_SAVE_STATE_T 1
8229EOF
8230
8231fi
8232if test $gdb_cv_hpux_sswide = yes
8233then
8234 cat >> confdefs.h <<\EOF
8235#define HAVE_STRUCT_MEMBER_SS_WIDE 1
8236EOF
8237
8238fi
8239echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8240
8241
8242# If we are configured native on GNU/Linux, work around problems with
8243# sys/procfs.h
8244# Also detect which type of /proc is in use, such as for Unixware or Solaris.
8245
8246if test "${target}" = "${host}"; then
8247 case "${host}" in
8248 i[3456]86-*-linux*)
8249 cat >> confdefs.h <<\EOF
8250#define START_INFERIOR_TRAPS_EXPECTED 2
8251EOF
8252
8253 cat >> confdefs.h <<\EOF
8254#define sys_quotactl 1
8255EOF
8256
8257 ;;
8258 ia64-*-aix*)
8259 cat >> confdefs.h <<\EOF
8260#define NEW_PROC_API 1
8261EOF
8262
8263 ;;
8264 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8265 cat >> confdefs.h <<\EOF
8266#define NEW_PROC_API 1
8267EOF
8268
8269 ;;
e7c61be3 8270 *-*-solaris2.[6789])
97bf5e38
MK
8271 cat >> confdefs.h <<\EOF
8272#define NEW_PROC_API 1
c960c18f
AC
8273EOF
8274
8275 ;;
8276 mips-sgi-irix5*)
8277 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8278 cat >> confdefs.h <<\EOF
8279#define _KMEMUSER 1
97bf5e38
MK
8280EOF
8281
8282 ;;
8283 esac
8284fi
8285
8286if test "$ac_cv_header_sys_procfs_h" = yes; then
8287 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8288echo "configure:8289: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8289 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8290 echo $ac_n "(cached) $ac_c" 1>&6
8291else
8292 cat > conftest.$ac_ext <<EOF
9cc52bde 8293#line 8294 "configure"
596c9d4b
KB
8294#include "confdefs.h"
8295
8296#define _SYSCALL32
8297#include <sys/procfs.h>
8298int main() {
97bf5e38 8299pstatus_t avar
596c9d4b
KB
8300; return 0; }
8301EOF
9cc52bde 8302if { (eval echo configure:8303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8303 rm -rf conftest*
97bf5e38 8304 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8305else
8306 echo "configure: failed program was:" >&5
8307 cat conftest.$ac_ext >&5
8308 rm -rf conftest*
97bf5e38 8309 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8310
8311fi
8312rm -f conftest*
8313fi
8314
97bf5e38 8315 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8316 cat >> confdefs.h <<\EOF
97bf5e38 8317#define HAVE_PSTATUS_T 1
596c9d4b
KB
8318EOF
8319
8320 fi
97bf5e38 8321 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8322
97bf5e38 8323 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8324echo "configure:8325: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8325 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8326 echo $ac_n "(cached) $ac_c" 1>&6
8327else
8328 cat > conftest.$ac_ext <<EOF
9cc52bde 8329#line 8330 "configure"
596c9d4b
KB
8330#include "confdefs.h"
8331
8332#define _SYSCALL32
8333#include <sys/procfs.h>
8334int main() {
97bf5e38 8335prrun_t avar
596c9d4b
KB
8336; return 0; }
8337EOF
9cc52bde 8338if { (eval echo configure:8339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8339 rm -rf conftest*
97bf5e38 8340 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8341else
8342 echo "configure: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 rm -rf conftest*
97bf5e38 8345 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8346
8347fi
8348rm -f conftest*
8349fi
8350
97bf5e38 8351 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8352 cat >> confdefs.h <<\EOF
97bf5e38 8353#define HAVE_PRRUN_T 1
596c9d4b
KB
8354EOF
8355
8356 fi
97bf5e38 8357 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8358
97bf5e38 8359 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8360echo "configure:8361: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8361 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8362 echo $ac_n "(cached) $ac_c" 1>&6
8363else
8364 cat > conftest.$ac_ext <<EOF
9cc52bde 8365#line 8366 "configure"
596c9d4b
KB
8366#include "confdefs.h"
8367
8368#define _SYSCALL32
8369#include <sys/procfs.h>
8370int main() {
97bf5e38 8371gregset_t avar
596c9d4b
KB
8372; return 0; }
8373EOF
9cc52bde 8374if { (eval echo configure:8375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8375 rm -rf conftest*
97bf5e38 8376 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8377else
8378 echo "configure: failed program was:" >&5
8379 cat conftest.$ac_ext >&5
8380 rm -rf conftest*
97bf5e38 8381 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8382
8383fi
8384rm -f conftest*
8385fi
8386
97bf5e38 8387 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8388 cat >> confdefs.h <<\EOF
97bf5e38 8389#define HAVE_GREGSET_T 1
596c9d4b
KB
8390EOF
8391
8392 fi
97bf5e38 8393 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8394
97bf5e38 8395 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8396echo "configure:8397: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8397 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8398 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8399else
8400 cat > conftest.$ac_ext <<EOF
9cc52bde 8401#line 8402 "configure"
d84dd0c5 8402#include "confdefs.h"
97bf5e38
MK
8403
8404#define _SYSCALL32
d84dd0c5 8405#include <sys/procfs.h>
97bf5e38
MK
8406int main() {
8407fpregset_t avar
8408; return 0; }
d84dd0c5 8409EOF
9cc52bde 8410if { (eval echo configure:8411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8411 rm -rf conftest*
8412 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8413else
8414 echo "configure: failed program was:" >&5
8415 cat conftest.$ac_ext >&5
97bf5e38
MK
8416 rm -rf conftest*
8417 bfd_cv_have_sys_procfs_type_fpregset_t=no
8418
d84dd0c5 8419fi
97bf5e38 8420rm -f conftest*
d84dd0c5
MK
8421fi
8422
97bf5e38
MK
8423 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8424 cat >> confdefs.h <<\EOF
8425#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8426EOF
8427
97bf5e38
MK
8428 fi
8429 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8430
97bf5e38 8431 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8432echo "configure:8433: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8433 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8434 echo $ac_n "(cached) $ac_c" 1>&6
8435else
8436 cat > conftest.$ac_ext <<EOF
9cc52bde 8437#line 8438 "configure"
c906108c 8438#include "confdefs.h"
c906108c 8439
97bf5e38
MK
8440#define _SYSCALL32
8441#include <sys/procfs.h>
c906108c 8442int main() {
97bf5e38 8443prgregset_t avar
c906108c
SS
8444; return 0; }
8445EOF
9cc52bde 8446if { (eval echo configure:8447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8447 rm -rf conftest*
97bf5e38 8448 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8449else
8450 echo "configure: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 rm -rf conftest*
97bf5e38
MK
8453 bfd_cv_have_sys_procfs_type_prgregset_t=no
8454
c906108c
SS
8455fi
8456rm -f conftest*
8457fi
8458
97bf5e38
MK
8459 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8460 cat >> confdefs.h <<\EOF
8461#define HAVE_PRGREGSET_T 1
c906108c
SS
8462EOF
8463
97bf5e38
MK
8464 fi
8465 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8466
97bf5e38 8467 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8468echo "configure:8469: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8469 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8470 echo $ac_n "(cached) $ac_c" 1>&6
8471else
8472 cat > conftest.$ac_ext <<EOF
9cc52bde 8473#line 8474 "configure"
d45fe813 8474#include "confdefs.h"
97bf5e38
MK
8475
8476#define _SYSCALL32
8477#include <sys/procfs.h>
d45fe813 8478int main() {
97bf5e38 8479prfpregset_t avar
d45fe813
KB
8480; return 0; }
8481EOF
9cc52bde 8482if { (eval echo configure:8483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8483 rm -rf conftest*
97bf5e38 8484 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8485else
8486 echo "configure: failed program was:" >&5
8487 cat conftest.$ac_ext >&5
8488 rm -rf conftest*
97bf5e38
MK
8489 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8490
d45fe813
KB
8491fi
8492rm -f conftest*
8493fi
8494
97bf5e38
MK
8495 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8496 cat >> confdefs.h <<\EOF
8497#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8498EOF
8499
97bf5e38
MK
8500 fi
8501 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8502
97bf5e38 8503 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8504echo "configure:8505: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8505 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8506 echo $ac_n "(cached) $ac_c" 1>&6
8507else
8508 cat > conftest.$ac_ext <<EOF
9cc52bde 8509#line 8510 "configure"
d45fe813 8510#include "confdefs.h"
97bf5e38
MK
8511
8512#define _SYSCALL32
8513#include <sys/procfs.h>
d45fe813 8514int main() {
97bf5e38 8515prgregset32_t avar
d45fe813
KB
8516; return 0; }
8517EOF
9cc52bde 8518if { (eval echo configure:8519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8519 rm -rf conftest*
97bf5e38 8520 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8521else
8522 echo "configure: failed program was:" >&5
8523 cat conftest.$ac_ext >&5
8524 rm -rf conftest*
97bf5e38
MK
8525 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8526
d45fe813
KB
8527fi
8528rm -f conftest*
8529fi
8530
97bf5e38
MK
8531 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8532 cat >> confdefs.h <<\EOF
8533#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8534EOF
8535
97bf5e38
MK
8536 fi
8537 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8538
97bf5e38 8539 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8540echo "configure:8541: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8541 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8542 echo $ac_n "(cached) $ac_c" 1>&6
8543else
8544 cat > conftest.$ac_ext <<EOF
9cc52bde 8545#line 8546 "configure"
d45fe813 8546#include "confdefs.h"
97bf5e38
MK
8547
8548#define _SYSCALL32
8549#include <sys/procfs.h>
d45fe813 8550int main() {
97bf5e38 8551prfpregset32_t avar
d45fe813
KB
8552; return 0; }
8553EOF
9cc52bde 8554if { (eval echo configure:8555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8555 rm -rf conftest*
97bf5e38 8556 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8557else
8558 echo "configure: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8560 rm -rf conftest*
97bf5e38
MK
8561 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8562
d45fe813
KB
8563fi
8564rm -f conftest*
8565fi
8566
97bf5e38
MK
8567 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8568 cat >> confdefs.h <<\EOF
8569#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8570EOF
8571
97bf5e38
MK
8572 fi
8573 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8574
97bf5e38 8575 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8576echo "configure:8577: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8577 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8578 echo $ac_n "(cached) $ac_c" 1>&6
8579else
8580 cat > conftest.$ac_ext <<EOF
9cc52bde 8581#line 8582 "configure"
d45fe813 8582#include "confdefs.h"
97bf5e38 8583
d45fe813 8584#define _SYSCALL32
97bf5e38 8585#include <sys/procfs.h>
d45fe813 8586int main() {
97bf5e38 8587lwpid_t avar
d45fe813
KB
8588; return 0; }
8589EOF
9cc52bde 8590if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8591 rm -rf conftest*
97bf5e38 8592 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8593else
8594 echo "configure: failed program was:" >&5
8595 cat conftest.$ac_ext >&5
8596 rm -rf conftest*
97bf5e38
MK
8597 bfd_cv_have_sys_procfs_type_lwpid_t=no
8598
d45fe813
KB
8599fi
8600rm -f conftest*
8601fi
8602
97bf5e38
MK
8603 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8604 cat >> confdefs.h <<\EOF
8605#define HAVE_LWPID_T 1
d45fe813
KB
8606EOF
8607
97bf5e38
MK
8608 fi
8609 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8610
97bf5e38 8611 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8612echo "configure:8613: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8613 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8614 echo $ac_n "(cached) $ac_c" 1>&6
8615else
8616 cat > conftest.$ac_ext <<EOF
9cc52bde 8617#line 8618 "configure"
c906108c
SS
8618#include "confdefs.h"
8619
97bf5e38
MK
8620#define _SYSCALL32
8621#include <sys/procfs.h>
c906108c 8622int main() {
97bf5e38 8623psaddr_t avar
c906108c
SS
8624; return 0; }
8625EOF
9cc52bde 8626if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8627 rm -rf conftest*
97bf5e38 8628 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8629else
8630 echo "configure: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 rm -rf conftest*
97bf5e38
MK
8633 bfd_cv_have_sys_procfs_type_psaddr_t=no
8634
c906108c
SS
8635fi
8636rm -f conftest*
8637fi
8638
97bf5e38
MK
8639 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8640 cat >> confdefs.h <<\EOF
8641#define HAVE_PSADDR_T 1
c906108c
SS
8642EOF
8643
97bf5e38
MK
8644 fi
8645 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8646
97bf5e38 8647 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8648echo "configure:8649: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8649 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8650 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8651else
8652 cat > conftest.$ac_ext <<EOF
9cc52bde 8653#line 8654 "configure"
c906108c
SS
8654#include "confdefs.h"
8655
97bf5e38
MK
8656#define _SYSCALL32
8657#include <sys/procfs.h>
8658int main() {
8659prsysent_t avar
8660; return 0; }
c906108c 8661EOF
9cc52bde 8662if { (eval echo configure:8663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8663 rm -rf conftest*
8664 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8665else
8666 echo "configure: failed program was:" >&5
8667 cat conftest.$ac_ext >&5
97bf5e38
MK
8668 rm -rf conftest*
8669 bfd_cv_have_sys_procfs_type_prsysent_t=no
8670
c906108c 8671fi
97bf5e38 8672rm -f conftest*
c906108c
SS
8673fi
8674
97bf5e38
MK
8675 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8676 cat >> confdefs.h <<\EOF
8677#define HAVE_PRSYSENT_T 1
c906108c
SS
8678EOF
8679
97bf5e38
MK
8680 fi
8681 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8682
97bf5e38 8683 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8684echo "configure:8685: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8685 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8686 echo $ac_n "(cached) $ac_c" 1>&6
8687else
8688 cat > conftest.$ac_ext <<EOF
9cc52bde 8689#line 8690 "configure"
c906108c
SS
8690#include "confdefs.h"
8691
97bf5e38
MK
8692#define _SYSCALL32
8693#include <sys/procfs.h>
c906108c 8694int main() {
97bf5e38 8695pr_sigset_t avar
c906108c
SS
8696; return 0; }
8697EOF
9cc52bde 8698if { (eval echo configure:8699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8699 rm -rf conftest*
97bf5e38 8700 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8701else
8702 echo "configure: failed program was:" >&5
8703 cat conftest.$ac_ext >&5
8704 rm -rf conftest*
97bf5e38
MK
8705 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8706
c906108c
SS
8707fi
8708rm -f conftest*
8709fi
8710
97bf5e38
MK
8711 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8712 cat >> confdefs.h <<\EOF
8713#define HAVE_PR_SIGSET_T 1
c906108c
SS
8714EOF
8715
97bf5e38
MK
8716 fi
8717 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8718
97bf5e38 8719 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8720echo "configure:8721: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8721 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8722 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8723else
8724 cat > conftest.$ac_ext <<EOF
9cc52bde 8725#line 8726 "configure"
c906108c
SS
8726#include "confdefs.h"
8727
97bf5e38
MK
8728#define _SYSCALL32
8729#include <sys/procfs.h>
8730int main() {
8731pr_sigaction64_t avar
8732; return 0; }
c906108c 8733EOF
9cc52bde 8734if { (eval echo configure:8735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8735 rm -rf conftest*
8736 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8737else
8738 echo "configure: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
97bf5e38
MK
8740 rm -rf conftest*
8741 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8742
c906108c 8743fi
97bf5e38 8744rm -f conftest*
c906108c
SS
8745fi
8746
97bf5e38
MK
8747 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8748 cat >> confdefs.h <<\EOF
8749#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8750EOF
8751
97bf5e38
MK
8752 fi
8753 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8754
8755 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8756echo "configure:8757: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8757 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8758 echo $ac_n "(cached) $ac_c" 1>&6
8759else
8760 cat > conftest.$ac_ext <<EOF
9cc52bde 8761#line 8762 "configure"
97bf5e38
MK
8762#include "confdefs.h"
8763
8764#define _SYSCALL32
8765#include <sys/procfs.h>
8766int main() {
8767pr_siginfo64_t avar
8768; return 0; }
8769EOF
9cc52bde 8770if { (eval echo configure:8771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8771 rm -rf conftest*
8772 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8773else
8774 echo "configure: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8776 rm -rf conftest*
8777 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8778
8779fi
8780rm -f conftest*
c906108c 8781fi
c906108c 8782
97bf5e38
MK
8783 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8784 cat >> confdefs.h <<\EOF
8785#define HAVE_PR_SIGINFO64_T 1
8786EOF
c906108c 8787
97bf5e38
MK
8788 fi
8789 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8790
8791
8792
8793
8794
8795 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8796 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
9cc52bde 8797echo "configure:8798: checking whether prfpregset_t type is broken" >&5
97bf5e38 8798 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8799 echo $ac_n "(cached) $ac_c" 1>&6
8800else
8801 if test "$cross_compiling" = yes; then
97bf5e38 8802 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8803else
8804 cat > conftest.$ac_ext <<EOF
9cc52bde 8805#line 8806 "configure"
c906108c 8806#include "confdefs.h"
97bf5e38
MK
8807#include <sys/procfs.h>
8808 int main ()
8809 {
8810 if (sizeof (prfpregset_t) == sizeof (void *))
8811 return 1;
8812 return 0;
8813 }
c906108c 8814EOF
9cc52bde 8815if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8816then
97bf5e38 8817 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8818else
8819 echo "configure: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 rm -fr conftest*
97bf5e38 8822 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8823fi
8824rm -fr conftest*
8825fi
8826
8827fi
8828
97bf5e38
MK
8829 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8830 if test $gdb_cv_prfpregset_t_broken = yes; then
8831 cat >> confdefs.h <<\EOF
8832#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8833EOF
8834
97bf5e38
MK
8835 fi
8836 fi
c906108c 8837
97bf5e38
MK
8838
8839 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
9cc52bde 8840echo "configure:8841: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8841 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8842 echo $ac_n "(cached) $ac_c" 1>&6
8843else
8844 cat > conftest.$ac_ext <<EOF
9cc52bde 8845#line 8846 "configure"
c906108c 8846#include "confdefs.h"
97bf5e38
MK
8847#include <unistd.h>
8848#include <sys/types.h>
8849#include <sys/procfs.h>
8850
8851int main() {
8852
8853 int dummy;;
8854 dummy = ioctl(0, PIOCSET, &dummy);
8855
8856; return 0; }
c906108c 8857EOF
9cc52bde 8858if { (eval echo configure:8859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8859 rm -rf conftest*
97bf5e38 8860 gdb_cv_have_procfs_piocset=yes
c906108c 8861else
c906108c
SS
8862 echo "configure: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864 rm -rf conftest*
97bf5e38 8865 gdb_cv_have_procfs_piocset=no
c906108c
SS
8866fi
8867rm -f conftest*
8868fi
97bf5e38
MK
8869
8870 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8871 if test $gdb_cv_have_procfs_piocset = yes; then
8872 cat >> confdefs.h <<\EOF
8873#define HAVE_PROCFS_PIOCSET 1
c906108c 8874EOF
97bf5e38
MK
8875
8876 fi
c906108c 8877fi
c906108c 8878
97bf5e38
MK
8879if test ${host} = ${target} ; then
8880
8881 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
9cc52bde 8882echo "configure:8883: checking for member l_addr in struct link_map" >&5
97bf5e38 8883 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8884 echo $ac_n "(cached) $ac_c" 1>&6
8885else
8886 cat > conftest.$ac_ext <<EOF
9cc52bde 8887#line 8888 "configure"
c906108c 8888#include "confdefs.h"
97bf5e38 8889#include <link.h>
c906108c 8890int main() {
97bf5e38 8891struct link_map lm; (void) lm.l_addr;
c906108c
SS
8892; return 0; }
8893EOF
9cc52bde 8894if { (eval echo configure:8895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8895 rm -rf conftest*
97bf5e38 8896 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8897else
8898 echo "configure: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 rm -rf conftest*
97bf5e38 8901 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8902fi
8903rm -f conftest*
8904fi
8905
97bf5e38
MK
8906 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8907 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8908 cat >> confdefs.h <<\EOF
8909#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8910EOF
97bf5e38
MK
8911
8912 fi
8913
8914
8915 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
9cc52bde 8916echo "configure:8917: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8917 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8918 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8919else
97bf5e38 8920 cat > conftest.$ac_ext <<EOF
9cc52bde 8921#line 8922 "configure"
97bf5e38
MK
8922#include "confdefs.h"
8923#include <sys/types.h>
8924#include <link.h>
8925int main() {
8926struct link_map lm; (void) lm.lm_addr;
8927; return 0; }
8928EOF
9cc52bde 8929if { (eval echo configure:8930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8930 rm -rf conftest*
8931 gdb_cv_have_struct_link_map_with_lm_members=yes
8932else
8933 echo "configure: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8935 rm -rf conftest*
8936 gdb_cv_have_struct_link_map_with_lm_members=no
8937fi
8938rm -f conftest*
c906108c 8939fi
c906108c 8940
97bf5e38
MK
8941 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8942 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8943 cat >> confdefs.h <<\EOF
8944#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8945EOF
8946
8947 fi
8948
8949
8950 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
9cc52bde 8951echo "configure:8952: checking for member som_addr in struct so_map" >&5
97bf5e38 8952 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8953 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8954else
8955 cat > conftest.$ac_ext <<EOF
9cc52bde 8956#line 8957 "configure"
c906108c 8957#include "confdefs.h"
97bf5e38
MK
8958#include <sys/types.h>
8959#ifdef HAVE_NLIST_H
8960#include <nlist.h>
8961#endif
8962#include <link.h>
8963int main() {
8964struct so_map lm; (void) lm.som_addr;
8965; return 0; }
8966EOF
9cc52bde 8967if { (eval echo configure:8968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8968 rm -rf conftest*
8969 gdb_cv_have_struct_so_map_with_som_members=yes
8970else
8971 echo "configure: failed program was:" >&5
8972 cat conftest.$ac_ext >&5
8973 rm -rf conftest*
8974 gdb_cv_have_struct_so_map_with_som_members=no
8975fi
8976rm -f conftest*
8977fi
c906108c 8978
97bf5e38
MK
8979 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8980 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8981 cat >> confdefs.h <<\EOF
8982#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8983EOF
c906108c 8984
97bf5e38 8985 fi
c906108c 8986
97bf5e38
MK
8987
8988 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
9cc52bde 8989echo "configure:8990: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8990 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8991 echo $ac_n "(cached) $ac_c" 1>&6
8992else
8993 cat > conftest.$ac_ext <<EOF
9cc52bde 8994#line 8995 "configure"
97bf5e38
MK
8995#include "confdefs.h"
8996#define _SYSCALL32
8997#include <sys/link.h>
8998int main() {
8999struct link_map32 l;
9000; return 0; }
9001EOF
9cc52bde 9002if { (eval echo configure:9003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9003 rm -rf conftest*
9004 gdb_cv_have_struct_link_map32=yes
9005else
9006 echo "configure: failed program was:" >&5
9007 cat conftest.$ac_ext >&5
9008 rm -rf conftest*
9009 gdb_cv_have_struct_link_map32=no
9010fi
9011rm -f conftest*
9012fi
c906108c 9013
97bf5e38
MK
9014 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
9015 if test $gdb_cv_have_struct_link_map32 = yes; then
9016 cat >> confdefs.h <<\EOF
9017#define HAVE_STRUCT_LINK_MAP32 1
9018EOF
c906108c 9019
97bf5e38
MK
9020 cat >> confdefs.h <<\EOF
9021#define _SYSCALL32 1
9022EOF
c906108c 9023
97bf5e38
MK
9024 fi
9025fi
c906108c 9026
c906108c 9027
97bf5e38 9028echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
9cc52bde 9029echo "configure:9030: checking for long long support in compiler" >&5
97bf5e38
MK
9030if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
9031 echo $ac_n "(cached) $ac_c" 1>&6
9032else
9033 cat > conftest.$ac_ext <<EOF
9cc52bde 9034#line 9035 "configure"
97bf5e38 9035#include "confdefs.h"
c906108c 9036
97bf5e38 9037int main() {
c906108c 9038
97bf5e38
MK
9039 extern long long foo;
9040 switch (foo & 2) { case 0: return 1; }
c906108c 9041
97bf5e38
MK
9042; return 0; }
9043EOF
9cc52bde 9044if { (eval echo configure:9045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9045 rm -rf conftest*
9046 gdb_cv_c_long_long=yes
9047else
9048 echo "configure: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9050 rm -rf conftest*
9051 gdb_cv_c_long_long=no
9052fi
9053rm -f conftest*
9054fi
c906108c 9055
97bf5e38
MK
9056echo "$ac_t""$gdb_cv_c_long_long" 1>&6
9057if test $gdb_cv_c_long_long = yes; then
9058 cat >> confdefs.h <<\EOF
9059#define CC_HAS_LONG_LONG 1
9060EOF
9061
9062fi
9063
9064
9065echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
9cc52bde 9066echo "configure:9067: checking for long long support in printf" >&5
97bf5e38
MK
9067if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
9068 echo $ac_n "(cached) $ac_c" 1>&6
9069else
9070 if test "$cross_compiling" = yes; then
9071 gdb_cv_printf_has_long_long=no
9072else
9073 cat > conftest.$ac_ext <<EOF
9cc52bde 9074#line 9075 "configure"
97bf5e38
MK
9075#include "confdefs.h"
9076
9077int main () {
9078 char buf[32];
9079 long long l = 0;
9080 l = (l << 16) + 0x0123;
9081 l = (l << 16) + 0x4567;
9082 l = (l << 16) + 0x89ab;
9083 l = (l << 16) + 0xcdef;
9084 sprintf (buf, "0x%016llx", l);
9085 return (strcmp ("0x0123456789abcdef", buf));
c906108c 9086}
97bf5e38 9087EOF
9cc52bde 9088if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9089then
9090 gdb_cv_printf_has_long_long=yes
9091else
9092 echo "configure: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094 rm -fr conftest*
9095 gdb_cv_printf_has_long_long=no
9096fi
9097rm -fr conftest*
9098fi
9099
9100fi
9101
9102if test $gdb_cv_printf_has_long_long = yes; then
9103 cat >> confdefs.h <<\EOF
9104#define PRINTF_HAS_LONG_LONG 1
9105EOF
9106
9107fi
9108echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
9109
9110
9111echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
9cc52bde 9112echo "configure:9113: checking for long double support in compiler" >&5
97bf5e38
MK
9113if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
9114 echo $ac_n "(cached) $ac_c" 1>&6
9115else
9116 cat > conftest.$ac_ext <<EOF
9cc52bde 9117#line 9118 "configure"
97bf5e38
MK
9118#include "confdefs.h"
9119
9120int main() {
9121long double foo;
9122; return 0; }
9123EOF
9cc52bde 9124if { (eval echo configure:9125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9125 rm -rf conftest*
9126 ac_cv_c_long_double=yes
9127else
9128 echo "configure: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 rm -rf conftest*
9131 ac_cv_c_long_double=no
9132fi
9133rm -f conftest*
9134fi
c906108c 9135
97bf5e38
MK
9136echo "$ac_t""$ac_cv_c_long_double" 1>&6
9137if test $ac_cv_c_long_double = yes; then
9138 cat >> confdefs.h <<\EOF
9139#define HAVE_LONG_DOUBLE 1
c906108c 9140EOF
97bf5e38
MK
9141
9142fi
9143
9144
9145echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
9cc52bde 9146echo "configure:9147: checking for long double support in printf" >&5
97bf5e38
MK
9147if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
9148 echo $ac_n "(cached) $ac_c" 1>&6
9149else
9150 if test "$cross_compiling" = yes; then
9151 gdb_cv_printf_has_long_double=no
9152else
9153 cat > conftest.$ac_ext <<EOF
9cc52bde 9154#line 9155 "configure"
97bf5e38
MK
9155#include "confdefs.h"
9156
9157int main () {
9158 char buf[16];
9159 long double f = 3.141592653;
9160 sprintf (buf, "%Lg", f);
9161 return (strncmp ("3.14159", buf, 7));
9162}
9163EOF
9cc52bde 9164if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 9165then
97bf5e38 9166 gdb_cv_printf_has_long_double=yes
c906108c
SS
9167else
9168 echo "configure: failed program was:" >&5
9169 cat conftest.$ac_ext >&5
9170 rm -fr conftest*
97bf5e38 9171 gdb_cv_printf_has_long_double=no
c906108c
SS
9172fi
9173rm -fr conftest*
9174fi
9175
9176fi
9177
97bf5e38 9178if test $gdb_cv_printf_has_long_double = yes; then
c906108c 9179 cat >> confdefs.h <<\EOF
97bf5e38
MK
9180#define PRINTF_HAS_LONG_DOUBLE 1
9181EOF
9182
9183fi
9184echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
9185
9186
9187echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
9cc52bde 9188echo "configure:9189: checking for long double support in scanf" >&5
97bf5e38
MK
9189if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
9190 echo $ac_n "(cached) $ac_c" 1>&6
9191else
9192 if test "$cross_compiling" = yes; then
9193 gdb_cv_scanf_has_long_double=no
9194else
9195 cat > conftest.$ac_ext <<EOF
9cc52bde 9196#line 9197 "configure"
97bf5e38
MK
9197#include "confdefs.h"
9198
9199int main () {
9200 char *buf = "3.141592653";
9201 long double f = 0;
9202 sscanf (buf, "%Lg", &f);
9203 return !(f > 3.14159 && f < 3.14160);
9204}
c906108c 9205EOF
9cc52bde 9206if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9207then
9208 gdb_cv_scanf_has_long_double=yes
9209else
9210 echo "configure: failed program was:" >&5
9211 cat conftest.$ac_ext >&5
9212 rm -fr conftest*
9213 gdb_cv_scanf_has_long_double=no
9214fi
9215rm -fr conftest*
9216fi
c906108c
SS
9217
9218fi
9219
97bf5e38
MK
9220if test $gdb_cv_scanf_has_long_double = yes; then
9221 cat >> confdefs.h <<\EOF
9222#define SCANF_HAS_LONG_DOUBLE 1
9223EOF
9224
9225fi
9226echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 9227
438013df
AO
9228case ${host_os} in
9229aix*)
9230 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
9cc52bde 9231echo "configure:9232: checking for -bbigtoc option" >&5
438013df
AO
9232if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9233 echo $ac_n "(cached) $ac_c" 1>&6
9234else
9235
9236 SAVE_LDFLAGS=$LDFLAGS
9237
9238 case $GCC in
9239 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9240 *) gdb_cv_bigtoc=-bbigtoc ;;
9241 esac
9242
9243 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9244 cat > conftest.$ac_ext <<EOF
9cc52bde 9245#line 9246 "configure"
438013df
AO
9246#include "confdefs.h"
9247
9248int main() {
9249int i;
9250; return 0; }
9251EOF
9cc52bde 9252if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
9253 :
9254else
9255 echo "configure: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 rm -rf conftest*
9258 gdb_cv_bigtoc=
9259fi
9260rm -f conftest*
ec76baa5 9261 LDFLAGS="${SAVE_LDFLAGS}"
438013df
AO
9262
9263fi
9264
9265echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9266 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9267 ;;
9268esac
9269
c906108c
SS
9270
9271
9272if test ${build} = ${host} -a ${host} = ${target} ; then
9273 case ${host_os} in
9274 hpux*)
9275 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
9cc52bde 9276echo "configure:9277: checking for HPUX/OSF thread support" >&5
c906108c
SS
9277 if test -f /usr/include/dce/cma_config.h ; then
9278 if test "$GCC" = "yes" ; then
9279 echo "$ac_t""yes" 1>&6
9280 cat >> confdefs.h <<\EOF
9281#define HAVE_HPUX_THREAD_SUPPORT 1
9282EOF
9283
3483b318 9284 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9285 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9286 else
9287 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9288 fi
9289 else
9290 echo "$ac_t""no" 1>&6
9291 fi
9292 ;;
9293 solaris*)
d92419e5
JB
9294 # See if thread_db library is around for Solaris thread debugging.
9295 # Note that we must explicitly test for version 1 of the library
9296 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9297 # the same API.
c906108c 9298 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
9cc52bde 9299echo "configure:9300: checking for Solaris thread debugging library" >&5
c906108c
SS
9300 if test -f /usr/lib/libthread_db.so.1 ; then
9301 echo "$ac_t""yes" 1>&6
9302 cat >> confdefs.h <<\EOF
9303#define HAVE_THREAD_DB_LIB 1
9304EOF
9305
3483b318 9306 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9307 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9308 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9cc52bde 9309echo "configure:9310: checking for dlopen in -ldl" >&5
c906108c
SS
9310ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9311if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9312 echo $ac_n "(cached) $ac_c" 1>&6
9313else
9314 ac_save_LIBS="$LIBS"
9315LIBS="-ldl $LIBS"
9316cat > conftest.$ac_ext <<EOF
9cc52bde 9317#line 9318 "configure"
c906108c
SS
9318#include "confdefs.h"
9319/* Override any gcc2 internal prototype to avoid an error. */
9320/* We use char because int might match the return type of a gcc2
9321 builtin and then its argument prototype would still apply. */
9322char dlopen();
9323
9324int main() {
9325dlopen()
9326; return 0; }
9327EOF
9cc52bde 9328if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9329 rm -rf conftest*
9330 eval "ac_cv_lib_$ac_lib_var=yes"
9331else
9332 echo "configure: failed program was:" >&5
9333 cat conftest.$ac_ext >&5
9334 rm -rf conftest*
9335 eval "ac_cv_lib_$ac_lib_var=no"
9336fi
9337rm -f conftest*
9338LIBS="$ac_save_LIBS"
9339
9340fi
9341if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9342 echo "$ac_t""yes" 1>&6
9343 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345 cat >> confdefs.h <<EOF
9346#define $ac_tr_lib 1
9347EOF
9348
9349 LIBS="-ldl $LIBS"
9350
9351else
9352 echo "$ac_t""no" 1>&6
9353fi
9354
9355 if test "$GCC" = "yes" ; then
9356 # The GNU linker requires the -export-dynamic option to make
9357 # all symbols visible in the dynamic symbol table.
9358 hold_ldflags=$LDFLAGS
9359 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
9cc52bde 9360echo "configure:9361: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9361 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9362 cat > conftest.$ac_ext <<EOF
9cc52bde 9363#line 9364 "configure"
c906108c
SS
9364#include "confdefs.h"
9365
9366int main() {
9367int i;
9368; return 0; }
9369EOF
9cc52bde 9370if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9371 rm -rf conftest*
9372 found=yes
9373else
9374 echo "configure: failed program was:" >&5
9375 cat conftest.$ac_ext >&5
9376 rm -rf conftest*
9377 found=no
9378fi
9379rm -f conftest*
9380 LDFLAGS=$hold_ldflags
9381 echo "$ac_t""$found" 1>&6
9382 if test $found = yes; then
9383 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9384 fi
9385 fi
9386 # Sun randomly tweaked the prototypes in <proc_service.h>
9387 # at one point.
9388 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9cc52bde 9389echo "configure:9390: checking if <proc_service.h> is old" >&5
c906108c
SS
9390 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9391 echo $ac_n "(cached) $ac_c" 1>&6
9392else
9393
9394 cat > conftest.$ac_ext <<EOF
9cc52bde 9395#line 9396 "configure"
c906108c
SS
9396#include "confdefs.h"
9397
9398 #include <proc_service.h>
9399 ps_err_e ps_pdwrite
9400 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9401
9402int main() {
9403
9404; return 0; }
9405EOF
9cc52bde 9406if { (eval echo configure:9407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9407 rm -rf conftest*
9408 gdb_cv_proc_service_is_old=no
9409else
9410 echo "configure: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9412 rm -rf conftest*
9413 gdb_cv_proc_service_is_old=yes
9414fi
9415rm -f conftest*
9416
9417fi
9418
9419 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9420 if test $gdb_cv_proc_service_is_old = yes; then
9421 cat >> confdefs.h <<\EOF
9422#define PROC_SERVICE_IS_OLD 1
9423EOF
9424
9425 fi
9426 else
9427 echo "$ac_t""no" 1>&6
9428 fi
9429 ;;
d92419e5
JB
9430 aix*)
9431 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9cc52bde 9432echo "configure:9433: checking for AiX thread debugging library" >&5
d92419e5
JB
9433 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9434 echo $ac_n "(cached) $ac_c" 1>&6
9435else
9436 cat > conftest.$ac_ext <<EOF
9cc52bde 9437#line 9438 "configure"
d92419e5
JB
9438#include "confdefs.h"
9439#include <sys/pthdebug.h>
9440int main() {
9441#ifndef PTHDB_VERSION_3
9442 #error
9443 #endif
9444; return 0; }
9445EOF
9cc52bde 9446if { (eval echo configure:9447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9447 rm -rf conftest*
9448 gdb_cv_have_aix_thread_debug=yes
9449else
9450 echo "configure: failed program was:" >&5
9451 cat conftest.$ac_ext >&5
9452 rm -rf conftest*
9453 gdb_cv_have_aix_thread_debug=no
9454fi
9455rm -f conftest*
9456fi
9457
9458 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9459 if test $gdb_cv_have_aix_thread_debug = yes; then
9460 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9461 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9462 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9463 fi
9464 ;;
c906108c
SS
9465 esac
9466
9467fi
9468
3f47be5c
EZ
9469if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9470 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9cc52bde 9471echo "configure:9472: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9472if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9473 echo $ac_n "(cached) $ac_c" 1>&6
9474else
9475 cat > conftest.$ac_ext <<EOF
9cc52bde 9476#line 9477 "configure"
3f47be5c
EZ
9477#include "confdefs.h"
9478#include <thread_db.h>
9479int main() {
9480int i = TD_NOTALLOC;
9481; return 0; }
9482EOF
9cc52bde 9483if { (eval echo configure:9484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9484 rm -rf conftest*
9485 gdb_cv_thread_db_h_has_td_notalloc=yes
9486else
9487 echo "configure: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489 rm -rf conftest*
9490 gdb_cv_thread_db_h_has_td_notalloc=no
9491
9492fi
9493rm -f conftest*
9494
9495fi
9496
9497echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9498fi
9499if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9500 cat >> confdefs.h <<\EOF
9501#define THREAD_DB_HAS_TD_NOTALLOC 1
9502EOF
9503
9504fi
9505
b757528f
JJ
9506if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9507 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9cc52bde 9508echo "configure:9509: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9509if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9510 echo $ac_n "(cached) $ac_c" 1>&6
9511else
9512 cat > conftest.$ac_ext <<EOF
9cc52bde 9513#line 9514 "configure"
b757528f
JJ
9514#include "confdefs.h"
9515#include <sys/syscall.h>
9516int main() {
9517int i = __NR_tkill;
9518; return 0; }
9519EOF
9cc52bde 9520if { (eval echo configure:9521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9521 rm -rf conftest*
9522 gdb_cv_sys_syscall_h_has_tkill=yes
9523else
9524 echo "configure: failed program was:" >&5
9525 cat conftest.$ac_ext >&5
9526 rm -rf conftest*
9527 gdb_cv_sys_syscall_h_has_tkill=no
9528
9529fi
9530rm -f conftest*
9531
9532fi
9533
9534echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9535fi
9536if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9537 cat >> confdefs.h <<\EOF
9538#define HAVE_TKILL_SYSCALL 1
9539EOF
9540
9541fi
9542
fb40c209 9543
030292b7
DJ
9544# Check whether --with-sysroot or --without-sysroot was given.
9545if test "${with_sysroot+set}" = set; then
9546 withval="$with_sysroot"
9547
9548 case ${with_sysroot} in
715d1656 9549 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9550 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9551 esac
9552
9553 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9554
9555 if test "x$exec_prefix" = xNONE; then
9556 if test "x$prefix" = xNONE; then
9557 test_prefix=/usr/local
9558 else
9559 test_prefix=$prefix
9560 fi
9561 else
9562 test_prefix=$exec_prefix
9563 fi
9564 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9565 "${test_prefix}"|"${test_prefix}/"*|\
9566 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9567 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9568 TARGET_SYSTEM_ROOT_DEFINE="$t"
9569 ;;
9570 esac
9571
9572else
9573
9574 TARGET_SYSTEM_ROOT=
9575 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9576
9577fi
9578
9579
9580
9581
3b851bce
AC
9582# NOTE: Don't add -Wall or -Wunused, they both include
9583# -Wunused-parameter which reports bogus warnings.
9584# NOTE: If you add to this list, remember to update
9585# gdb/doc/gdbint.texinfo.
1decb323 9586build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9587-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9588-Wunused-label -Wunused-function"
d8038014 9589# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9590# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9591# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9592# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9593# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9594# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9595# Check whether --enable-build-warnings or --disable-build-warnings was given.
9596if test "${enable_build_warnings+set}" = set; then
9597 enableval="$enable_build_warnings"
1decb323 9598 case "${enableval}" in
c906108c
SS
9599 yes) ;;
9600 no) build_warnings="-w";;
9601 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9602 build_warnings="${build_warnings} ${t}";;
9603 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9604 build_warnings="${t} ${build_warnings}";;
9605 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9606esac
d4f3574e 9607if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9608 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9609fi
1decb323 9610fi
3b851bce
AC
9611# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9612if test "${enable_gdb_build_warnings+set}" = set; then
9613 enableval="$enable_gdb_build_warnings"
9614 case "${enableval}" in
9615 yes) ;;
9616 no) build_warnings="-w";;
9617 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9618 build_warnings="${build_warnings} ${t}";;
9619 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9620 build_warnings="${t} ${build_warnings}";;
9621 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9622esac
9623if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9624 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9625fi
9626fi
104c1213
JM
9627WARN_CFLAGS=""
9628WERROR_CFLAGS=""
c906108c
SS
9629if test "x${build_warnings}" != x -a "x$GCC" = xyes
9630then
746a987d 9631 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9cc52bde 9632echo "configure:9633: checking compiler warning flags" >&5
746a987d
AC
9633 # Separate out the -Werror flag as some files just cannot be
9634 # compiled with it enabled.
9635 for w in ${build_warnings}; do
9636 case $w in
9637 -Werr*) WERROR_CFLAGS=-Werror ;;
9638 *) # Check that GCC accepts it
4536bbc6
AC
9639 saved_CFLAGS="$CFLAGS"
9640 CFLAGS="$CFLAGS $w"
9641 cat > conftest.$ac_ext <<EOF
9cc52bde 9642#line 9643 "configure"
4536bbc6
AC
9643#include "confdefs.h"
9644
9645int main() {
9646
9647; return 0; }
9648EOF
9cc52bde 9649if { (eval echo configure:9650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9650 rm -rf conftest*
9651 WARN_CFLAGS="${WARN_CFLAGS} $w"
9652else
9653 echo "configure: failed program was:" >&5
9654 cat conftest.$ac_ext >&5
9655fi
9656rm -f conftest*
9657 CFLAGS="$saved_CFLAGS"
746a987d
AC
9658 esac
9659 done
9660 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9661fi
9662
9663
104c1213 9664
7a292a7a
SS
9665# In the Cygwin environment, we need some additional flags.
9666echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9cc52bde 9667echo "configure:9668: checking for cygwin" >&5
7a292a7a
SS
9668if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9669 echo $ac_n "(cached) $ac_c" 1>&6
9670else
9671 cat > conftest.$ac_ext <<EOF
9cc52bde 9672#line 9673 "configure"
7a292a7a
SS
9673#include "confdefs.h"
9674
9675#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9676lose
9677#endif
9678EOF
9679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9680 egrep "lose" >/dev/null 2>&1; then
9681 rm -rf conftest*
9682 gdb_cv_os_cygwin=yes
9683else
9684 rm -rf conftest*
9685 gdb_cv_os_cygwin=no
9686fi
9687rm -f conftest*
9688
9689fi
9690
9691echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9692
aff38e61
AC
9693
9694SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9695case ${host} in
95cbc983
AC
9696 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9697 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9698esac
9699
9700
cd0fc7c3
SS
9701# libreadline needs libuser32.a in a cygwin environment
9702WIN32LIBS=
9703if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9704 WIN32LIBS="-luser32"
9705 case "${target}" in
9706 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9707 ;;
9708 esac
cd0fc7c3 9709fi
c906108c 9710
7a292a7a 9711
3fc11d3e
JM
9712LIBGUI="../libgui/src/libgui.a"
9713GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9714
9715
7a292a7a 9716
3fc11d3e
JM
9717WIN32LDAPP=
9718
9719
9720
d91670b9
CV
9721case "${host}" in
9722*-*-cygwin*)
9723 configdir="win"
9724 ;;
9725*)
9726 configdir="unix"
9727 ;;
9728esac
3fc11d3e
JM
9729
9730GDBTKLIBS=
9731if test "${enable_gdbtk}" = "yes"; then
9732
d1c3b63a
KS
9733 # Gdbtk must have an absolute path to srcdir in order to run
9734 # properly when not installed.
9735 here=`pwd`
9736 cd ${srcdir}
9737 GDBTK_SRC_DIR=`pwd`
9738 cd $here
9739
3fc11d3e
JM
9740
9741#
9742# Ok, lets find the tcl configuration
9743# First, look for one uninstalled.
9744# the alternative search directory is invoked by --with-tclconfig
9745#
9746
9747if test x"${no_tcl}" = x ; then
9748 # we reset no_tcl in case something fails here
9749 no_tcl=true
9750 # Check whether --with-tclconfig or --without-tclconfig was given.
9751if test "${with_tclconfig+set}" = set; then
9752 withval="$with_tclconfig"
9753 with_tclconfig=${withval}
9754fi
9755
9756 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9cc52bde 9757echo "configure:9758: checking for Tcl configuration" >&5
3fc11d3e
JM
9758 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9759 echo $ac_n "(cached) $ac_c" 1>&6
9760else
9761
9762
9763 # First check to see if --with-tclconfig was specified.
9764 if test x"${with_tclconfig}" != x ; then
9765 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9766 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9767 else
9768 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9769 fi
9770 fi
9771
9772 # then check for a private Tcl installation
9773 if test x"${ac_cv_c_tclconfig}" = x ; then
9774 for i in \
9775 ../tcl \
9776 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9777 ../../tcl \
9778 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9779 ../../../tcl \
9780 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9781 if test -f "$i/${configdir}/tclConfig.sh" ; then
9782 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9783 break
9784 fi
9785 done
9786 fi
9787 # check in a few common install locations
9788 if test x"${ac_cv_c_tclconfig}" = x ; then
9789 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9790 if test -f "$i/tclConfig.sh" ; then
9791 ac_cv_c_tclconfig=`(cd $i; pwd)`
9792 break
9793 fi
9794 done
9795 fi
9796 # check in a few other private locations
9797 if test x"${ac_cv_c_tclconfig}" = x ; then
9798 for i in \
9799 ${srcdir}/../tcl \
9800 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9801 if test -f "$i/${configdir}/tclConfig.sh" ; then
9802 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9803 break
9804 fi
9805 done
9806 fi
9807
9808fi
9809
9810 if test x"${ac_cv_c_tclconfig}" = x ; then
9811 TCLCONFIG="# no Tcl configs found"
9812 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9813 else
9814 no_tcl=
9815 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9816 echo "$ac_t""found $TCLCONFIG" 1>&6
9817 fi
9818fi
9819
9820 if test -z "${no_tcl}"; then
9821
9822 . $TCLCONFIG
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
033afc63 9843
3fc11d3e
JM
9844
9845
9846
9847
9848
9849
9850#
9851# Ok, lets find the tk configuration
9852# First, look for one uninstalled.
9853# the alternative search directory is invoked by --with-tkconfig
9854#
9855
9856if test x"${no_tk}" = x ; then
9857 # we reset no_tk in case something fails here
9858 no_tk=true
9859 # Check whether --with-tkconfig or --without-tkconfig was given.
9860if test "${with_tkconfig+set}" = set; then
9861 withval="$with_tkconfig"
9862 with_tkconfig=${withval}
9863fi
9864
9865 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9cc52bde 9866echo "configure:9867: checking for Tk configuration" >&5
3fc11d3e
JM
9867 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9868 echo $ac_n "(cached) $ac_c" 1>&6
9869else
9870
9871
9872 # First check to see if --with-tkconfig was specified.
9873 if test x"${with_tkconfig}" != x ; then
9874 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9875 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9876 else
9877 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9878 fi
9879 fi
9880
9881 # then check for a private Tk library
9882 if test x"${ac_cv_c_tkconfig}" = x ; then
9883 for i in \
9884 ../tk \
9885 `ls -dr ../tk[4-9]* 2>/dev/null` \
9886 ../../tk \
9887 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9888 ../../../tk \
9889 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9890 if test -f "$i/${configdir}/tkConfig.sh" ; then
9891 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9892 break
9893 fi
9894 done
9895 fi
9896 # check in a few common install locations
9897 if test x"${ac_cv_c_tkconfig}" = x ; then
9898 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9899 if test -f "$i/tkConfig.sh" ; then
9900 ac_cv_c_tkconfig=`(cd $i; pwd)`
9901 break
9902 fi
9903 done
9904 fi
9905 # check in a few other private locations
9906 if test x"${ac_cv_c_tkconfig}" = x ; then
9907 for i in \
9908 ${srcdir}/../tk \
9909 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9910 if test -f "$i/${configdir}/tkConfig.sh" ; then
9911 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9912 break
9913 fi
9914 done
9915 fi
9916
9917fi
9918
9919 if test x"${ac_cv_c_tkconfig}" = x ; then
9920 TKCONFIG="# no Tk configs found"
9921 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9922 else
9923 no_tk=
9924 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9925 echo "$ac_t""found $TKCONFIG" 1>&6
9926 fi
9927fi
9928
9929
9930
dd2504ab
JM
9931 # now look for Tcl library stuff
9932
d91670b9 9933 tcldir="../tcl/${configdir}/"
dd2504ab
JM
9934
9935 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9936
3fc11d3e
JM
9937 # If $no_tk is nonempty, then we can't do Tk, and there is no
9938 # point to doing Tcl.
9939 if test -z "${no_tk}"; then
9940
9941 if test -f "$TKCONFIG" ; then
9942 . $TKCONFIG
9943 fi
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958#
9959# Ok, lets find the tcl source trees so we can use the headers
9960# Warning: transition of version 9 to 10 will break this algorithm
9961# because 10 sorts before 9. We also look for just tcl. We have to
9962# be careful that we don't match stuff like tclX by accident.
9963# the alternative search directory is involked by --with-tclinclude
9964#
9965
9966no_tcl=true
9967echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9cc52bde 9968echo "configure:9969: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9969# Check whether --with-tclinclude or --without-tclinclude was given.
9970if test "${with_tclinclude+set}" = set; then
9971 withval="$with_tclinclude"
9972 with_tclinclude=${withval}
9973fi
9974
9975if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9976 echo $ac_n "(cached) $ac_c" 1>&6
9977else
9978
9979# first check to see if --with-tclinclude was specified
9980if test x"${with_tclinclude}" != x ; then
9981 if test -f ${with_tclinclude}/tclInt.h ; then
9982 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9983 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9984 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9985 else
9986 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9987 fi
9988fi
9989
9990# next check if it came with Tcl configuration file
9991if test x"${ac_cv_c_tclconfig}" = x ; then
9992 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9993 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9994 fi
9995fi
9996
9997# next check in private source directory
9998#
9999# since ls returns lowest version numbers first, reverse its output
10000if test x"${ac_cv_c_tclh}" = x ; then
10001 for i in \
10002 ${srcdir}/../tcl \
10003 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
10004 ${srcdir}/../../tcl \
10005 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
10006 ${srcdir}/../../../tcl \
10007 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
10008 if test -f $i/generic/tclInt.h ; then
10009 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10010 break
10011 fi
10012 done
10013fi
10014# finally check in a few common install locations
10015#
10016# since ls returns lowest version numbers first, reverse its output
10017if test x"${ac_cv_c_tclh}" = x ; then
10018 for i in \
10019 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
10020 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
10021 /usr/local/src/tcl \
10022 /usr/local/lib/tcl \
10023 ${prefix}/include ; do
10024 if test -f $i/generic/tclInt.h ; then
10025 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10026 break
10027 fi
10028 done
10029fi
10030# see if one is installed
10031if test x"${ac_cv_c_tclh}" = x ; then
10032 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
10033echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9cc52bde 10034echo "configure:10035: checking for tclInt.h" >&5
3fc11d3e
JM
10035if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10036 echo $ac_n "(cached) $ac_c" 1>&6
10037else
10038 cat > conftest.$ac_ext <<EOF
9cc52bde 10039#line 10040 "configure"
3fc11d3e
JM
10040#include "confdefs.h"
10041#include <tclInt.h>
10042EOF
10043ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 10044{ (eval echo configure:10045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10045ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10046if test -z "$ac_err"; then
10047 rm -rf conftest*
10048 eval "ac_cv_header_$ac_safe=yes"
10049else
10050 echo "$ac_err" >&5
10051 echo "configure: failed program was:" >&5
10052 cat conftest.$ac_ext >&5
10053 rm -rf conftest*
10054 eval "ac_cv_header_$ac_safe=no"
10055fi
10056rm -f conftest*
10057fi
10058if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10059 echo "$ac_t""yes" 1>&6
10060 ac_cv_c_tclh=installed
10061else
10062 echo "$ac_t""no" 1>&6
10063ac_cv_c_tclh=""
10064fi
10065
10066fi
10067
10068fi
10069
10070if test x"${ac_cv_c_tclh}" = x ; then
10071 TCLHDIR="# no Tcl private headers found"
10072 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
10073fi
10074if test x"${ac_cv_c_tclh}" != x ; then
10075 no_tcl=""
10076 if test x"${ac_cv_c_tclh}" = x"installed" ; then
10077 echo "$ac_t""is installed" 1>&6
10078 TCLHDIR=""
10079 else
10080 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
10081 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
10082 TCLHDIR="-I${ac_cv_c_tclh}"
10083 fi
10084fi
10085
10086
10087
10088
10089#
10090# Ok, lets find the tk source trees so we can use the headers
10091# If the directory (presumably symlink) named "tk" exists, use that one
10092# in preference to any others. Same logic is used when choosing library
10093# and again with Tcl. The search order is the best place to look first, then in
10094# decreasing significance. The loop breaks if the trigger file is found.
10095# Note the gross little conversion here of srcdir by cd'ing to the found
10096# directory. This converts the path from a relative to an absolute, so
10097# recursive cache variables for the path will work right. We check all
10098# the possible paths in one loop rather than many seperate loops to speed
10099# things up.
10100# the alternative search directory is involked by --with-tkinclude
10101#
10102no_tk=true
10103echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9cc52bde 10104echo "configure:10105: checking for Tk private headers" >&5
3fc11d3e
JM
10105# Check whether --with-tkinclude or --without-tkinclude was given.
10106if test "${with_tkinclude+set}" = set; then
10107 withval="$with_tkinclude"
10108 with_tkinclude=${withval}
10109fi
10110
10111if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
10112 echo $ac_n "(cached) $ac_c" 1>&6
10113else
10114
10115# first check to see if --with-tkinclude was specified
10116if test x"${with_tkinclude}" != x ; then
10117 if test -f ${with_tkinclude}/tk.h ; then
10118 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
10119 elif test -f ${with_tkinclude}/generic/tk.h ; then
10120 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
10121 else
10122 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
10123 fi
10124fi
10125
10126# next check if it came with Tk configuration file
10127if test x"${ac_cv_c_tkconfig}" = x ; then
10128 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
10129 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
10130 fi
10131fi
10132
10133# next check in private source directory
10134#
10135# since ls returns lowest version numbers first, reverse its output
10136if test x"${ac_cv_c_tkh}" = x ; then
10137 for i in \
10138 ${srcdir}/../tk \
10139 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
10140 ${srcdir}/../../tk \
10141 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
10142 ${srcdir}/../../../tk \
10143 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
10144 if test -f $i/generic/tk.h ; then
10145 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10146 break
10147 fi
10148 done
10149fi
10150# finally check in a few common install locations
10151#
10152# since ls returns lowest version numbers first, reverse its output
10153if test x"${ac_cv_c_tkh}" = x ; then
10154 for i in \
10155 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
10156 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
10157 /usr/local/src/tk \
10158 /usr/local/lib/tk \
10159 ${prefix}/include ; do
10160 if test -f $i/generic/tk.h ; then
10161 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10162 break
10163 fi
10164 done
10165fi
10166# see if one is installed
10167if test x"${ac_cv_c_tkh}" = x ; then
10168 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
10169echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9cc52bde 10170echo "configure:10171: checking for tk.h" >&5
3fc11d3e
JM
10171if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10172 echo $ac_n "(cached) $ac_c" 1>&6
10173else
10174 cat > conftest.$ac_ext <<EOF
9cc52bde 10175#line 10176 "configure"
3fc11d3e
JM
10176#include "confdefs.h"
10177#include <tk.h>
10178EOF
10179ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 10180{ (eval echo configure:10181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10181ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10182if test -z "$ac_err"; then
10183 rm -rf conftest*
10184 eval "ac_cv_header_$ac_safe=yes"
10185else
10186 echo "$ac_err" >&5
10187 echo "configure: failed program was:" >&5
10188 cat conftest.$ac_ext >&5
10189 rm -rf conftest*
10190 eval "ac_cv_header_$ac_safe=no"
10191fi
10192rm -f conftest*
10193fi
10194if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10195 echo "$ac_t""yes" 1>&6
10196 ac_cv_c_tkh=installed
10197else
10198 echo "$ac_t""no" 1>&6
10199ac_cv_c_tkh=""
10200fi
10201
10202fi
10203
10204fi
10205
10206if test x"${ac_cv_c_tkh}" != x ; then
10207 no_tk=""
10208 if test x"${ac_cv_c_tkh}" = x"installed" ; then
10209 echo "$ac_t""is installed" 1>&6
10210 TKHDIR=""
10211 else
10212 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
10213 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
10214 TKHDIR="-I${ac_cv_c_tkh}"
10215 fi
10216else
10217 TKHDIR="# no Tk directory found"
10218 echo "configure: warning: Can't find Tk private headers" 1>&2
10219 no_tk=true
10220fi
10221
10222
10223
10224
10225echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9cc52bde 10226echo "configure:10227: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10227if test x"${ac_cv_c_itclh}" = x ; then
10228 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
10229 if test -f $i/generic/itcl.h ; then
10230 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10231 break
10232 fi
10233 done
10234fi
10235if test x"${ac_cv_c_itclh}" = x ; then
10236 ITCLHDIR="# no Itcl private headers found"
10237 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10238fi
10239if test x"${ac_cv_c_itclh}" != x ; then
10240 ITCLHDIR="-I${ac_cv_c_itclh}"
10241fi
10242# should always be here
10243# ITCLLIB="../itcl/itcl/unix/libitcl.a"
10244
10245#AC_SUBST(ITCLLIB)
10246
10247
10248echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9cc52bde 10249echo "configure:10250: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10250if test x"${ac_cv_c_itkh}" = x ; then
10251 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10252 if test -f $i/generic/itk.h ; then
10253 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10254 break
10255 fi
10256 done
10257fi
10258if test x"${ac_cv_c_itkh}" = x ; then
10259 ITKHDIR="# no Itk private headers found"
10260 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10261fi
10262if test x"${ac_cv_c_itkh}" != x ; then
10263 ITKHDIR="-I${ac_cv_c_itkh}"
10264fi
10265# should always be here
10266# ITKLIB="../itcl/itk/unix/libitk.a"
10267
10268#AC_SUBST(ITKLIB)
10269
3fc11d3e 10270
dd2504ab
JM
10271
10272 # now look for Tk library stuff
10273
d91670b9 10274 tkdir="../tk/${configdir}/"
dd2504ab
JM
10275
10276 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10277
3fc11d3e
JM
10278 # now look for Itcl library stuff
10279
10280
10281#
10282# Ok, lets find the itcl configuration
10283# First, look for one uninstalled.
10284# the alternative search directory is invoked by --with-itclconfig
10285#
10286
10287if test x"${no_itcl}" = x ; then
10288 # we reset no_itcl in case something fails here
10289 no_itcl=true
10290 # Check whether --with-itclconfig or --without-itclconfig was given.
10291if test "${with_itclconfig+set}" = set; then
10292 withval="$with_itclconfig"
10293 with_itclconfig=${withval}
10294fi
10295
10296 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
9cc52bde 10297echo "configure:10298: checking for Itcl configuration" >&5
3fc11d3e
JM
10298 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10299 echo $ac_n "(cached) $ac_c" 1>&6
10300else
10301
10302
10303 # First check to see if --with-itclconfig was specified.
10304 if test x"${with_itclconfig}" != x ; then
10305 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10306 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10307 else
10308 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10309 fi
10310 fi
10311
10312 # then check for a private Itcl library
10313 if test x"${ac_cv_c_itclconfig}" = x ; then
10314 for i in \
10315 ../itcl/itcl \
10316 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10317 ../../itcl \
10318 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10319 ../../../itcl \
10320 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10321 if test -f "$i/itclConfig.sh" ; then
10322 ac_cv_c_itclconfig=`(cd $i; pwd)`
10323 break
10324 fi
10325 done
10326 fi
10327 # check in a few common install locations
10328 if test x"${ac_cv_c_itclconfig}" = x ; then
10329 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10330 if test -f "$i/itclConfig.sh" ; then
10331 ac_cv_c_itclconfig=`(cd $i; pwd)`
10332 break
10333 fi
10334 done
10335 fi
10336 # check in a few other private locations
10337 if test x"${ac_cv_c_itclconfig}" = x ; then
10338 for i in \
10339 ${srcdir}/../itcl/itcl \
10340 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10341 if test -f "$i/itclConfig.sh" ; then
10342 ac_cv_c_itclconfig=`(cd $i; pwd)`
10343 break
10344 fi
10345 done
10346 fi
10347
10348fi
10349
10350 if test x"${ac_cv_c_itclconfig}" = x ; then
10351 ITCLCONFIG="# no Itcl configs found"
10352 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10353 else
10354 no_itcl=
10355 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10356 echo "$ac_t""found $ITCLCONFIG" 1>&6
10357 fi
10358fi
10359
10360 if test -z "${no_itcl}"; then
10361
10362 if test -f "$ITCLCONFIG" ; then
10363 . $ITCLCONFIG
10364 fi
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
3fc11d3e
JM
10375
10376
10377 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10378 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10379 fi
10380
10381
10382 # now look for Itk library stuff
10383
10384#
10385# Ok, lets find the itk configuration
10386# First, look for one uninstalled.
10387# the alternative search directory is invoked by --with-itkconfig
10388#
10389
10390if test x"${no_itk}" = x ; then
10391 # we reset no_itk in case something fails here
10392 no_itk=true
10393 # Check whether --with-itkconfig or --without-itkconfig was given.
10394if test "${with_itkconfig+set}" = set; then
10395 withval="$with_itkconfig"
10396 with_itkconfig=${withval}
10397fi
10398
10399 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
9cc52bde 10400echo "configure:10401: checking for Itk configuration" >&5
3fc11d3e
JM
10401 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10402 echo $ac_n "(cached) $ac_c" 1>&6
10403else
10404
10405
10406 # First check to see if --with-itkconfig was specified.
10407 if test x"${with_itkconfig}" != x ; then
10408 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10409 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10410 else
10411 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10412 fi
10413 fi
10414
10415 # then check for a private Itk library
10416 if test x"${ac_cv_c_itkconfig}" = x ; then
10417 for i in \
10418 ../itcl/itk \
10419 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10420 ../../itk \
10421 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10422 ../../../itk \
10423 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10424 if test -f "$i/itkConfig.sh" ; then
10425 ac_cv_c_itkconfig=`(cd $i; pwd)`
10426 break
10427 fi
10428 done
10429 fi
10430 # check in a few common install locations
10431 if test x"${ac_cv_c_itkconfig}" = x ; then
10432 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10433 if test -f "$i/itkConfig.sh" ; then
10434 ac_cv_c_itkconfig=`(cd $i; pwd)`
10435 break
10436 fi
10437 done
10438 fi
10439 # check in a few other private locations
10440 if test x"${ac_cv_c_itkconfig}" = x ; then
10441 for i in \
10442 ${srcdir}/../itcl/itk \
10443 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10444 if test -f "$i/itkConfig.sh" ; then
10445 ac_cv_c_itkconfig=`(cd $i; pwd)`
10446 break
10447 fi
10448 done
10449 fi
10450
10451fi
10452
10453 if test x"${ac_cv_c_itkconfig}" = x ; then
10454 ITKCONFIG="# no Itk configs found"
10455 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10456 else
10457 no_itk=
10458 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10459 echo "$ac_t""found $ITKCONFIG" 1>&6
10460 fi
10461fi
10462
10463
10464 if test -z "${no_itcl}"; then
10465
10466 if test -f "$ITKCONFIG" ; then
10467 . $ITKCONFIG
10468 fi
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
3fc11d3e 10481 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10482 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10483 fi
10484
4226a5a5 10485 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10486 # Tcl/Tk 8.1 require -fwritable strings. I don't
10487 # know whether 8.2 will or not, but I bet it will.
10488 # I don't have to worry about 7.x since we don't support it.
10489 GDBTK_CFLAGS=""
10490 if test "$GCC" = "yes"; then
10491 if test "$TCL_VERSION" != "8.0" ; then
10492 GDBTK_CFLAGS="-fwritable-strings"
10493 fi
10494 fi
10495
10496 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10497 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10498 # Yes, the ordering seems wrong here. But it isn't.
10499 # TK_LIBS is the list of libraries that need to be linked
10500 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10501 # were in LIBS then any link tests after this point would
10502 # try to include things like `$(LIBGUI)', which wouldn't work.
10503 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10504
10505 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10506 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10507 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10508 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10509 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10510 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10511 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10512
10513 if test x$gdb_cv_os_cygwin = xyes; then
10514 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10515 WIN32LDAPP="-Wl,--subsystem,console"
10516 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10517 fi
10518 fi
10519 fi
ffc6a242 10520
ffc6a242 10521 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10522fi
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
dd2504ab 10536
c906108c
SS
10537# If we find X, set shell vars x_includes and x_libraries to the
10538# paths, otherwise set no_x=yes.
10539# Uses ac_ vars as temps to allow command line to override cache and checks.
10540# --without-x overrides everything else, but does not touch the cache.
10541echo $ac_n "checking for X""... $ac_c" 1>&6
9cc52bde 10542echo "configure:10543: checking for X" >&5
c906108c
SS
10543
10544# Check whether --with-x or --without-x was given.
10545if test "${with_x+set}" = set; then
10546 withval="$with_x"
10547 :
10548fi
10549
10550# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10551if test "x$with_x" = xno; then
10552 # The user explicitly disabled X.
10553 have_x=disabled
10554else
10555 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10556 # Both variables are already set.
10557 have_x=yes
10558 else
10559if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10560 echo $ac_n "(cached) $ac_c" 1>&6
10561else
10562 # One or both of the vars are not set, and there is no cached value.
10563ac_x_includes=NO ac_x_libraries=NO
10564rm -fr conftestdir
10565if mkdir conftestdir; then
10566 cd conftestdir
10567 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10568 cat > Imakefile <<'EOF'
10569acfindx:
10570 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10571EOF
10572 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10573 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10574 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10575 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10576 for ac_extension in a so sl; do
10577 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10578 test -f $ac_im_libdir/libX11.$ac_extension; then
10579 ac_im_usrlibdir=$ac_im_libdir; break
10580 fi
10581 done
10582 # Screen out bogus values from the imake configuration. They are
10583 # bogus both because they are the default anyway, and because
10584 # using them would break gcc on systems where it needs fixed includes.
10585 case "$ac_im_incroot" in
10586 /usr/include) ;;
10587 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10588 esac
10589 case "$ac_im_usrlibdir" in
10590 /usr/lib | /lib) ;;
10591 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10592 esac
10593 fi
10594 cd ..
10595 rm -fr conftestdir
10596fi
10597
10598if test "$ac_x_includes" = NO; then
10599 # Guess where to find include files, by looking for this one X11 .h file.
10600 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10601
10602 # First, try using that file with no special directory specified.
10603cat > conftest.$ac_ext <<EOF
9cc52bde 10604#line 10605 "configure"
c906108c
SS
10605#include "confdefs.h"
10606#include <$x_direct_test_include>
10607EOF
10608ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc52bde 10609{ (eval echo configure:10610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10610ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10611if test -z "$ac_err"; then
10612 rm -rf conftest*
10613 # We can compile using X headers with no special include directory.
10614ac_x_includes=
10615else
10616 echo "$ac_err" >&5
10617 echo "configure: failed program was:" >&5
10618 cat conftest.$ac_ext >&5
10619 rm -rf conftest*
10620 # Look for the header file in a standard set of common directories.
10621# Check X11 before X11Rn because it is often a symlink to the current release.
10622 for ac_dir in \
10623 /usr/X11/include \
10624 /usr/X11R6/include \
10625 /usr/X11R5/include \
10626 /usr/X11R4/include \
10627 \
10628 /usr/include/X11 \
10629 /usr/include/X11R6 \
10630 /usr/include/X11R5 \
10631 /usr/include/X11R4 \
10632 \
10633 /usr/local/X11/include \
10634 /usr/local/X11R6/include \
10635 /usr/local/X11R5/include \
10636 /usr/local/X11R4/include \
10637 \
10638 /usr/local/include/X11 \
10639 /usr/local/include/X11R6 \
10640 /usr/local/include/X11R5 \
10641 /usr/local/include/X11R4 \
10642 \
10643 /usr/X386/include \
10644 /usr/x386/include \
10645 /usr/XFree86/include/X11 \
10646 \
10647 /usr/include \
10648 /usr/local/include \
10649 /usr/unsupported/include \
10650 /usr/athena/include \
10651 /usr/local/x11r5/include \
10652 /usr/lpp/Xamples/include \
10653 \
10654 /usr/openwin/include \
10655 /usr/openwin/share/include \
10656 ; \
10657 do
10658 if test -r "$ac_dir/$x_direct_test_include"; then
10659 ac_x_includes=$ac_dir
10660 break
10661 fi
10662 done
10663fi
10664rm -f conftest*
10665fi # $ac_x_includes = NO
10666
10667if test "$ac_x_libraries" = NO; then
10668 # Check for the libraries.
10669
10670 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10671 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10672
10673 # See if we find them without any special options.
10674 # Don't add to $LIBS permanently.
10675 ac_save_LIBS="$LIBS"
10676 LIBS="-l$x_direct_test_library $LIBS"
10677cat > conftest.$ac_ext <<EOF
9cc52bde 10678#line 10679 "configure"
c906108c
SS
10679#include "confdefs.h"
10680
10681int main() {
10682${x_direct_test_function}()
10683; return 0; }
10684EOF
9cc52bde 10685if { (eval echo configure:10686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10686 rm -rf conftest*
10687 LIBS="$ac_save_LIBS"
10688# We can link X programs with no special library path.
10689ac_x_libraries=
10690else
10691 echo "configure: failed program was:" >&5
10692 cat conftest.$ac_ext >&5
10693 rm -rf conftest*
10694 LIBS="$ac_save_LIBS"
10695# First see if replacing the include by lib works.
10696# Check X11 before X11Rn because it is often a symlink to the current release.
10697for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10698 /usr/X11/lib \
10699 /usr/X11R6/lib \
10700 /usr/X11R5/lib \
10701 /usr/X11R4/lib \
10702 \
10703 /usr/lib/X11 \
10704 /usr/lib/X11R6 \
10705 /usr/lib/X11R5 \
10706 /usr/lib/X11R4 \
10707 \
10708 /usr/local/X11/lib \
10709 /usr/local/X11R6/lib \
10710 /usr/local/X11R5/lib \
10711 /usr/local/X11R4/lib \
10712 \
10713 /usr/local/lib/X11 \
10714 /usr/local/lib/X11R6 \
10715 /usr/local/lib/X11R5 \
10716 /usr/local/lib/X11R4 \
10717 \
10718 /usr/X386/lib \
10719 /usr/x386/lib \
10720 /usr/XFree86/lib/X11 \
10721 \
10722 /usr/lib \
10723 /usr/local/lib \
10724 /usr/unsupported/lib \
10725 /usr/athena/lib \
10726 /usr/local/x11r5/lib \
10727 /usr/lpp/Xamples/lib \
10728 /lib/usr/lib/X11 \
10729 \
10730 /usr/openwin/lib \
10731 /usr/openwin/share/lib \
10732 ; \
10733do
10734 for ac_extension in a so sl; do
10735 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10736 ac_x_libraries=$ac_dir
10737 break 2
10738 fi
10739 done
10740done
10741fi
10742rm -f conftest*
10743fi # $ac_x_libraries = NO
10744
10745if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10746 # Didn't find X anywhere. Cache the known absence of X.
10747 ac_cv_have_x="have_x=no"
10748else
10749 # Record where we found X for the cache.
10750 ac_cv_have_x="have_x=yes \
10751 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10752fi
10753fi
10754 fi
10755 eval "$ac_cv_have_x"
10756fi # $with_x != no
10757
10758if test "$have_x" != yes; then
10759 echo "$ac_t""$have_x" 1>&6
10760 no_x=yes
10761else
10762 # If each of the values was on the command line, it overrides each guess.
10763 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10764 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10765 # Update the cache value to reflect the command line values.
10766 ac_cv_have_x="have_x=yes \
10767 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10768 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10769fi
10770
10771
9cc52bde
MK
10772# Check whether we should enable the TUI, but only do so if we really
10773# can.
10774if test x"$enable_tui" = xyes; then
10775 if test -d $srcdir/tui; then
10776 if test "$ac_cv_search_waddstr" != no; then
10777 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10778 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10779 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10780 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
10781 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10782 CONFIG_ALL="${CONFIG_ALL} all-tui"
10783 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10784 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10785 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10786 else
10787 echo "configure: warning: no enhanced curses library found; disabling TUI" 1>&2
10788 fi
10789 fi
10790fi
10791
7a292a7a
SS
10792# Unlike the sim directory, whether a simulator is linked is controlled by
10793# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10794# This code just checks for a few cases where we'd like to ignore those
10795# definitions, even when they're present in the '.mt' file. These cases
10796# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10797# not part of the source tree.
7a292a7a
SS
10798#
10799# Check whether --enable-sim or --disable-sim was given.
10800if test "${enable_sim+set}" = set; then
10801 enableval="$enable_sim"
10802 echo "enable_sim = $enable_sim";
10803 echo "enableval = ${enableval}";
10804 case "${enableval}" in
10805 yes) ignore_sim=false ;;
10806 no) ignore_sim=true ;;
10807 *) ignore_sim=false ;;
10808 esac
10809else
10810 ignore_sim=false
10811fi
10812
10813
10814if test ! -d "${srcdir}/../sim"; then
10815 ignore_sim=true
10816fi
10817
10818if test "${ignore_sim}" = "true"; then
10819 IGNORE_SIM="SIM="
10820 IGNORE_SIM_OBS="SIM_OBS="
10821else
10822 IGNORE_SIM=""
10823 IGNORE_SIM_OBS=""
10824 cat >> confdefs.h <<\EOF
10825#define WITH_SIM 1
10826EOF
10827
10828fi
10829
10830
10831
c906108c
SS
10832
10833
10834
10835
10836
10837
dfcd3bfb 10838
e56ac5c3
AC
10839
10840
b3a90332
AC
10841
10842
c35f4ffc
AC
10843# List of host floatformats.
10844cat >> confdefs.h <<EOF
10845#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10846EOF
10847
10848cat >> confdefs.h <<EOF
10849#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10850EOF
10851
10852cat >> confdefs.h <<EOF
10853#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10854EOF
10855
10856
c906108c
SS
10857# target_subdir is used by the testsuite to find the target libraries.
10858target_subdir=
10859if test "${host}" != "${target}"; then
10860 target_subdir="${target_alias}/"
10861fi
10862
10863
10864frags=
0dad8a66
MK
10865if test "${target}" = "${host}"; then
10866 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10867 if test ! -f ${host_makefile_frag}; then
10868 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10869 fi
10870 frags="$frags $host_makefile_frag"
10871else
10872 host_makefile_frag=/dev/null
c906108c 10873fi
c906108c
SS
10874
10875target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10876if test ! -f ${target_makefile_frag}; then
0dad8a66 10877 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
c906108c
SS
10878fi
10879frags="$frags $target_makefile_frag"
10880
10881
10882
10883
10884
10885hostfile=`sed -n '
10886s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10887' ${host_makefile_frag}`
10888
10889targetfile=`sed -n '
2c0fc042 10890s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
c906108c
SS
10891' ${target_makefile_frag}`
10892
c906108c 10893if test "${target}" = "${host}"; then
a85f51e7
DJ
10894# We pick this up from the host configuration file (.mh) because we
10895# do not have a native configuration Makefile fragment.
c906108c
SS
10896nativefile=`sed -n '
10897s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10898' ${host_makefile_frag}`
c906108c
SS
10899fi
10900
10901
b00a8037
DJ
10902if test x"${gdb_osabi}" != x ; then
10903 cat >> confdefs.h <<EOF
10904#define GDB_OSABI_DEFAULT $gdb_osabi
10905EOF
10906
10907fi
10908
8dcde887
MK
10909# Enable multi-ice-gdb-server.
10910# Check whether --enable-multi-ice or --disable-multi-ice was given.
10911if test "${enable_multi_ice+set}" = set; then
10912 enableval="$enable_multi_ice"
10913 case $enableval in
10914 yes | no)
10915 ;;
10916 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10917 esac
96baa820
JM
10918fi
10919
8dcde887
MK
10920if test "x$enable_multi_ice" = xyes; then
10921 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10922fi
10923
8dcde887
MK
10924# We only build gdbserver automatically if host and target are the same.
10925if test "x$target" = "x$host"; then
10926 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
0dad8a66 10927echo "configure:10928: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10928 if test "x$build_gdbserver" = xyes; then
10929 configdirs="$configdirs gdbserver"
10930 echo "$ac_t""yes" 1>&6
10931 else
10932 echo "$ac_t""no" 1>&6
10933 fi
10934fi
10935
10936subdirs="doc testsuite $configdirs"
10937
96baa820 10938
2c0fc042
AC
10939# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
10940# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
10941# to an empty version.
c906108c
SS
10942
10943files=
10944links=
5a2402b8 10945
c906108c 10946rm -f xm.h
5a2402b8 10947xm_h=""
c906108c 10948if test "${hostfile}" != ""; then
5a2402b8 10949 xm_h=xm.h
0f475e27
AC
10950 case "${hostfile}" in
10951 xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
10952 * ) GDB_XM_FILE="${hostfile}"
10953 esac
5a2402b8
AC
10954 files="${files} ${GDB_XM_FILE}"
10955 links="${links} xm.h"
10956 cat >> confdefs.h <<EOF
b78960be 10957#define GDB_XM_FILE "${GDB_XM_FILE}"
5a2402b8
AC
10958EOF
10959
c906108c 10960fi
5a2402b8
AC
10961
10962
c906108c 10963rm -f tm.h
5a2402b8 10964tm_h=""
c906108c 10965if test "${targetfile}" != ""; then
5a2402b8 10966 tm_h=tm.h
0f475e27 10967 case "${targetfile}" in
b8c4aece 10968 tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
0f475e27
AC
10969 * ) GDB_TM_FILE="${targetfile}"
10970 esac
5a2402b8
AC
10971 files="${files} ${GDB_TM_FILE}"
10972 links="${links} tm.h"
10973 cat >> confdefs.h <<EOF
b78960be 10974#define GDB_TM_FILE "${GDB_TM_FILE}"
5a2402b8
AC
10975EOF
10976
c906108c 10977fi
5a2402b8
AC
10978
10979
c906108c 10980rm -f nm.h
5a2402b8 10981nm_h=""
c906108c 10982if test "${nativefile}" != ""; then
5a2402b8 10983 nm_h=nm.h
0f475e27
AC
10984 case "${nativefile}" in
10985 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
10986 * ) GDB_NM_FILE="${nativefile}"
10987 esac
5a2402b8
AC
10988 files="${files} ${GDB_NM_FILE}"
10989 links="${links} nm.h"
10990 cat >> confdefs.h <<EOF
b78960be 10991#define GDB_NM_FILE "${GDB_NM_FILE}"
5a2402b8
AC
10992EOF
10993
c906108c 10994fi
5a2402b8
AC
10995
10996
c906108c
SS
10997
10998
10999echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
0dad8a66 11000echo "configure:11001: checking for Cygwin environment" >&5
c906108c
SS
11001if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
11002 echo $ac_n "(cached) $ac_c" 1>&6
11003else
11004 cat > conftest.$ac_ext <<EOF
0dad8a66 11005#line 11006 "configure"
c906108c
SS
11006#include "confdefs.h"
11007
11008int main() {
11009
11010#ifndef __CYGWIN__
11011#define __CYGWIN__ __CYGWIN32__
11012#endif
11013return __CYGWIN__;
11014; return 0; }
11015EOF
0dad8a66 11016if { (eval echo configure:11017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
11017 rm -rf conftest*
11018 ac_cv_cygwin=yes
11019else
11020 echo "configure: failed program was:" >&5
11021 cat conftest.$ac_ext >&5
11022 rm -rf conftest*
11023 ac_cv_cygwin=no
11024fi
11025rm -f conftest*
11026rm -f conftest*
11027fi
11028
11029echo "$ac_t""$ac_cv_cygwin" 1>&6
11030CYGWIN=
11031test "$ac_cv_cygwin" = yes && CYGWIN=yes
11032echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
0dad8a66 11033echo "configure:11034: checking for mingw32 environment" >&5
c906108c
SS
11034if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
11035 echo $ac_n "(cached) $ac_c" 1>&6
11036else
11037 cat > conftest.$ac_ext <<EOF
0dad8a66 11038#line 11039 "configure"
c906108c
SS
11039#include "confdefs.h"
11040
11041int main() {
11042return __MINGW32__;
11043; return 0; }
11044EOF
0dad8a66 11045if { (eval echo configure:11046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
11046 rm -rf conftest*
11047 ac_cv_mingw32=yes
11048else
11049 echo "configure: failed program was:" >&5
11050 cat conftest.$ac_ext >&5
11051 rm -rf conftest*
11052 ac_cv_mingw32=no
11053fi
11054rm -f conftest*
11055rm -f conftest*
11056fi
11057
11058echo "$ac_t""$ac_cv_mingw32" 1>&6
11059MINGW32=
11060test "$ac_cv_mingw32" = yes && MINGW32=yes
11061
11062
11063echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
0dad8a66 11064echo "configure:11065: checking for executable suffix" >&5
c906108c
SS
11065if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
11066 echo $ac_n "(cached) $ac_c" 1>&6
11067else
11068 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
11069 ac_cv_exeext=.exe
11070else
11071 rm -f conftest*
11072 echo 'int main () { return 0; }' > conftest.$ac_ext
11073 ac_cv_exeext=
0dad8a66 11074 if { (eval echo configure:11075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
11075 for file in conftest.*; do
11076 case $file in
4f0be353 11077 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
11078 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
11079 esac
11080 done
11081 else
11082 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
11083 fi
11084 rm -f conftest*
11085 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
11086fi
11087fi
11088
11089EXEEXT=""
11090test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
11091echo "$ac_t""${ac_cv_exeext}" 1>&6
11092ac_exeext=$EXEEXT
11093
11094
234b45d4
KB
11095
11096cat >> confdefs.h <<\EOF
11097#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
11098EOF
11099
11100
11101
11102
11103 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
11104if test "${with_libiconv_prefix+set}" = set; then
11105 withval="$with_libiconv_prefix"
11106
11107 for dir in `echo "$withval" | tr : ' '`; do
11108 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
11109 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
11110 done
11111
11112fi
11113
11114
11115 echo $ac_n "checking for iconv""... $ac_c" 1>&6
0dad8a66 11116echo "configure:11117: checking for iconv" >&5
234b45d4
KB
11117if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
11118 echo $ac_n "(cached) $ac_c" 1>&6
11119else
11120
11121 am_cv_func_iconv="no, consider installing GNU libiconv"
11122 am_cv_lib_iconv=no
11123 cat > conftest.$ac_ext <<EOF
0dad8a66 11124#line 11125 "configure"
234b45d4
KB
11125#include "confdefs.h"
11126#include <stdlib.h>
11127#include <iconv.h>
11128int main() {
11129iconv_t cd = iconv_open("","");
11130 iconv(cd,NULL,NULL,NULL,NULL);
11131 iconv_close(cd);
11132; return 0; }
11133EOF
0dad8a66 11134if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11135 rm -rf conftest*
11136 am_cv_func_iconv=yes
11137else
11138 echo "configure: failed program was:" >&5
11139 cat conftest.$ac_ext >&5
11140fi
11141rm -f conftest*
11142 if test "$am_cv_func_iconv" != yes; then
11143 am_save_LIBS="$LIBS"
11144 LIBS="$LIBS -liconv"
11145 cat > conftest.$ac_ext <<EOF
0dad8a66 11146#line 11147 "configure"
234b45d4
KB
11147#include "confdefs.h"
11148#include <stdlib.h>
11149#include <iconv.h>
11150int main() {
11151iconv_t cd = iconv_open("","");
11152 iconv(cd,NULL,NULL,NULL,NULL);
11153 iconv_close(cd);
11154; return 0; }
11155EOF
0dad8a66 11156if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11157 rm -rf conftest*
11158 am_cv_lib_iconv=yes
11159 am_cv_func_iconv=yes
11160else
11161 echo "configure: failed program was:" >&5
11162 cat conftest.$ac_ext >&5
11163fi
11164rm -f conftest*
11165 LIBS="$am_save_LIBS"
11166 fi
11167
11168fi
11169
11170echo "$ac_t""$am_cv_func_iconv" 1>&6
11171 if test "$am_cv_func_iconv" = yes; then
11172 cat >> confdefs.h <<\EOF
11173#define HAVE_ICONV 1
11174EOF
11175
11176 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
0dad8a66 11177echo "configure:11178: checking for iconv declaration" >&5
234b45d4
KB
11178 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
11179 echo $ac_n "(cached) $ac_c" 1>&6
11180else
11181
11182 cat > conftest.$ac_ext <<EOF
0dad8a66 11183#line 11184 "configure"
234b45d4
KB
11184#include "confdefs.h"
11185
11186#include <stdlib.h>
11187#include <iconv.h>
11188extern
11189#ifdef __cplusplus
11190"C"
11191#endif
11192#if defined(__STDC__) || defined(__cplusplus)
11193size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11194#else
11195size_t iconv();
11196#endif
11197
11198int main() {
11199
11200; return 0; }
11201EOF
0dad8a66 11202if { (eval echo configure:11203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
11203 rm -rf conftest*
11204 am_cv_proto_iconv_arg1=""
11205else
11206 echo "configure: failed program was:" >&5
11207 cat conftest.$ac_ext >&5
11208 rm -rf conftest*
11209 am_cv_proto_iconv_arg1="const"
11210fi
11211rm -f conftest*
11212 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
11213fi
11214
11215 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11216 echo "$ac_t""${ac_t:-
11217 }$am_cv_proto_iconv" 1>&6
11218 cat >> confdefs.h <<EOF
11219#define ICONV_CONST $am_cv_proto_iconv_arg1
11220EOF
11221
11222 fi
11223 LIBICONV=
11224 if test "$am_cv_lib_iconv" = yes; then
11225 LIBICONV="-liconv"
11226 fi
11227
11228
11229
c906108c
SS
11230trap '' 1 2 15
11231cat > confcache <<\EOF
11232# This file is a shell script that caches the results of configure
11233# tests run on this system so they can be shared between configure
11234# scripts and configure runs. It is not useful on other systems.
11235# If it contains results you don't want to keep, you may remove or edit it.
11236#
11237# By default, configure uses ./config.cache as the cache file,
11238# creating it if it does not exist already. You can give configure
11239# the --cache-file=FILE option to use a different cache file; that is
11240# what configure does when it calls configure scripts in
11241# subdirectories, so they share the cache.
11242# Giving --cache-file=/dev/null disables caching, for debugging configure.
11243# config.status only pays attention to the cache file if you give it the
11244# --recheck option to rerun configure.
11245#
11246EOF
11247# The following way of writing the cache mishandles newlines in values,
11248# but we know of no workaround that is simple, portable, and efficient.
11249# So, don't put newlines in cache variables' values.
11250# Ultrix sh set writes to stderr and can't be redirected directly,
11251# and sets the high bit in the cache file unless we assign to the vars.
11252(set) 2>&1 |
11253 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11254 *ac_space=\ *)
11255 # `set' does not quote correctly, so add quotes (double-quote substitution
11256 # turns \\\\ into \\, and sed turns \\ into \).
11257 sed -n \
11258 -e "s/'/'\\\\''/g" \
11259 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11260 ;;
11261 *)
11262 # `set' quotes correctly as required by POSIX, so do not add quotes.
11263 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11264 ;;
11265 esac >> confcache
11266if cmp -s $cache_file confcache; then
11267 :
11268else
11269 if test -w $cache_file; then
11270 echo "updating cache $cache_file"
11271 cat confcache > $cache_file
11272 else
11273 echo "not updating unwritable cache $cache_file"
11274 fi
11275fi
11276rm -f confcache
11277
11278trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11279
11280test "x$prefix" = xNONE && prefix=$ac_default_prefix
11281# Let make expand exec_prefix.
11282test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11283
11284# Any assignment to VPATH causes Sun make to only execute
11285# the first set of double-colon rules, so remove it if not needed.
11286# If there is a colon in the path, we need to keep it.
11287if test "x$srcdir" = x.; then
11288 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11289fi
11290
11291trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11292
11293DEFS=-DHAVE_CONFIG_H
11294
11295# Without the "./", some shells look in PATH for config.status.
11296: ${CONFIG_STATUS=./config.status}
11297
11298echo creating $CONFIG_STATUS
11299rm -f $CONFIG_STATUS
11300cat > $CONFIG_STATUS <<EOF
11301#! /bin/sh
11302# Generated automatically by configure.
11303# Run this file to recreate the current configuration.
11304# This directory was configured as follows,
11305# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11306#
11307# $0 $ac_configure_args
11308#
11309# Compiler output produced by configure, useful for debugging
11310# configure, is in ./config.log if it exists.
11311
11312ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11313for ac_option
11314do
11315 case "\$ac_option" in
11316 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11317 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11318 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11319 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11320 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11321 exit 0 ;;
11322 -help | --help | --hel | --he | --h)
11323 echo "\$ac_cs_usage"; exit 0 ;;
11324 *) echo "\$ac_cs_usage"; exit 1 ;;
11325 esac
11326done
11327
11328ac_given_srcdir=$srcdir
11329ac_given_INSTALL="$INSTALL"
11330
ed952ac5 11331trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11332EOF
11333cat >> $CONFIG_STATUS <<EOF
11334
11335# Protect against being on the right side of a sed subst in config.status.
11336sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11337 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11338$ac_vpsub
11339$extrasub
11340s%@SHELL@%$SHELL%g
11341s%@CFLAGS@%$CFLAGS%g
11342s%@CPPFLAGS@%$CPPFLAGS%g
11343s%@CXXFLAGS@%$CXXFLAGS%g
11344s%@FFLAGS@%$FFLAGS%g
11345s%@DEFS@%$DEFS%g
11346s%@LDFLAGS@%$LDFLAGS%g
11347s%@LIBS@%$LIBS%g
11348s%@exec_prefix@%$exec_prefix%g
11349s%@prefix@%$prefix%g
11350s%@program_transform_name@%$program_transform_name%g
11351s%@bindir@%$bindir%g
11352s%@sbindir@%$sbindir%g
11353s%@libexecdir@%$libexecdir%g
11354s%@datadir@%$datadir%g
11355s%@sysconfdir@%$sysconfdir%g
11356s%@sharedstatedir@%$sharedstatedir%g
11357s%@localstatedir@%$localstatedir%g
11358s%@libdir@%$libdir%g
11359s%@includedir@%$includedir%g
11360s%@oldincludedir@%$oldincludedir%g
11361s%@infodir@%$infodir%g
11362s%@mandir@%$mandir%g
413ccac7
AC
11363s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11364s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11365s%@MAINT@%$MAINT%g
c906108c
SS
11366s%@CC@%$CC%g
11367s%@CPP@%$CPP%g
11368s%@host@%$host%g
11369s%@host_alias@%$host_alias%g
11370s%@host_cpu@%$host_cpu%g
11371s%@host_vendor@%$host_vendor%g
11372s%@host_os@%$host_os%g
11373s%@target@%$target%g
11374s%@target_alias@%$target_alias%g
11375s%@target_cpu@%$target_cpu%g
11376s%@target_vendor@%$target_vendor%g
11377s%@target_os@%$target_os%g
11378s%@build@%$build%g
11379s%@build_alias@%$build_alias%g
11380s%@build_cpu@%$build_cpu%g
11381s%@build_vendor@%$build_vendor%g
11382s%@build_os@%$build_os%g
c906108c 11383s%@RANLIB@%$RANLIB%g
8bb2c122 11384s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11385s%@ALLOCA@%$ALLOCA%g
11386s%@USE_NLS@%$USE_NLS%g
11387s%@MSGFMT@%$MSGFMT%g
11388s%@GMSGFMT@%$GMSGFMT%g
11389s%@XGETTEXT@%$XGETTEXT%g
11390s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11391s%@CATALOGS@%$CATALOGS%g
11392s%@CATOBJEXT@%$CATOBJEXT%g
11393s%@DATADIRNAME@%$DATADIRNAME%g
11394s%@GMOFILES@%$GMOFILES%g
11395s%@INSTOBJEXT@%$INSTOBJEXT%g
11396s%@INTLDEPS@%$INTLDEPS%g
11397s%@INTLLIBS@%$INTLLIBS%g
11398s%@INTLOBJS@%$INTLOBJS%g
11399s%@POFILES@%$POFILES%g
11400s%@POSUB@%$POSUB%g
11401s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11402s%@GT_NO@%$GT_NO%g
11403s%@GT_YES@%$GT_YES%g
11404s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11405s%@l@%$l%g
ddc9cd0f
AC
11406s%@localedir@%$localedir%g
11407s%@PACKAGE@%$PACKAGE%g
8dcde887 11408s%@subdirs@%$subdirs%g
7a292a7a 11409s%@AWK@%$AWK%g
c906108c
SS
11410s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11411s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11412s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11413s%@LN_S@%$LN_S%g
11414s%@YACC@%$YACC%g
c906108c 11415s%@AR@%$AR%g
95ca63c4
CF
11416s%@DLLTOOL@%$DLLTOOL%g
11417s%@WINDRES@%$WINDRES%g
75c6e08a 11418s%@MIG@%$MIG%g
c906108c 11419s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11420s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11421s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11422s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11423s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11424s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11425s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11426s%@LIBGUI@%$LIBGUI%g
11427s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11428s%@WIN32LDAPP@%$WIN32LDAPP%g
11429s%@TCL_VERSION@%$TCL_VERSION%g
11430s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11431s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11432s%@TCL_CC@%$TCL_CC%g
11433s%@TCL_DEFS@%$TCL_DEFS%g
11434s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11435s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11436s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11437s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11438s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11439s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11440s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11441s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11442s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11443s%@TCL_RANLIB@%$TCL_RANLIB%g
11444s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11445s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11446s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11447s%@TK_VERSION@%$TK_VERSION%g
11448s%@TK_DEFS@%$TK_DEFS%g
11449s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11450s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11451s%@TK_XLIBSW@%$TK_XLIBSW%g
11452s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11453s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11454s%@TCLHDIR@%$TCLHDIR%g
11455s%@TKHDIR@%$TKHDIR%g
11456s%@ITCLHDIR@%$ITCLHDIR%g
11457s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11458s%@ITCL_VERSION@%$ITCL_VERSION%g
11459s%@ITCL_DEFS@%$ITCL_DEFS%g
11460s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11461s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11462s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11463s%@ITK_VERSION@%$ITK_VERSION%g
11464s%@ITK_DEFS@%$ITK_DEFS%g
11465s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11466s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11467s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11468s%@X_CFLAGS@%$X_CFLAGS%g
11469s%@X_LDFLAGS@%$X_LDFLAGS%g
11470s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11471s%@TCL_DEPS@%$TCL_DEPS%g
11472s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11473s%@ITCLLIB@%$ITCLLIB%g
11474s%@ITCL_DEPS@%$ITCL_DEPS%g
11475s%@ITKLIB@%$ITKLIB%g
11476s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11477s%@GDBTKLIBS@%$GDBTKLIBS%g
11478s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11479s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11480s%@IGNORE_SIM@%$IGNORE_SIM%g
11481s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11482s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11483s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11484s%@CONFIG_OBS@%$CONFIG_OBS%g
11485s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11486s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11487s%@CONFIG_ALL@%$CONFIG_ALL%g
11488s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11489s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11490s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11491s%@target_subdir@%$target_subdir%g
11492/@host_makefile_frag@/r $host_makefile_frag
11493s%@host_makefile_frag@%%g
11494/@target_makefile_frag@/r $target_makefile_frag
11495s%@target_makefile_frag@%%g
11496s%@frags@%$frags%g
5a2402b8
AC
11497s%@xm_h@%$xm_h%g
11498s%@tm_h@%$tm_h%g
11499s%@nm_h@%$nm_h%g
c906108c 11500s%@EXEEXT@%$EXEEXT%g
234b45d4 11501s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11502
11503CEOF
11504EOF
11505
11506cat >> $CONFIG_STATUS <<\EOF
11507
11508# Split the substitutions into bite-sized pieces for seds with
11509# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11510ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11511ac_file=1 # Number of current file.
11512ac_beg=1 # First line for current file.
11513ac_end=$ac_max_sed_cmds # Line after last line for current file.
11514ac_more_lines=:
11515ac_sed_cmds=""
11516while $ac_more_lines; do
11517 if test $ac_beg -gt 1; then
11518 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11519 else
11520 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11521 fi
11522 if test ! -s conftest.s$ac_file; then
11523 ac_more_lines=false
11524 rm -f conftest.s$ac_file
11525 else
11526 if test -z "$ac_sed_cmds"; then
11527 ac_sed_cmds="sed -f conftest.s$ac_file"
11528 else
11529 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11530 fi
11531 ac_file=`expr $ac_file + 1`
11532 ac_beg=$ac_end
11533 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11534 fi
11535done
11536if test -z "$ac_sed_cmds"; then
11537 ac_sed_cmds=cat
11538fi
11539EOF
11540
11541cat >> $CONFIG_STATUS <<EOF
11542
ed952ac5 11543CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11544EOF
11545cat >> $CONFIG_STATUS <<\EOF
11546for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11547 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11548 case "$ac_file" in
11549 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11550 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11551 *) ac_file_in="${ac_file}.in" ;;
11552 esac
11553
11554 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11555
11556 # Remove last slash and all that follows it. Not all systems have dirname.
11557 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11558 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11559 # The file is in a subdirectory.
11560 test ! -d "$ac_dir" && mkdir "$ac_dir"
11561 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11562 # A "../" for each directory in $ac_dir_suffix.
11563 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11564 else
11565 ac_dir_suffix= ac_dots=
11566 fi
11567
11568 case "$ac_given_srcdir" in
11569 .) srcdir=.
11570 if test -z "$ac_dots"; then top_srcdir=.
11571 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11572 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11573 *) # Relative path.
11574 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11575 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11576 esac
11577
11578 case "$ac_given_INSTALL" in
11579 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11580 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11581 esac
11582
11583 echo creating "$ac_file"
11584 rm -f "$ac_file"
11585 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11586 case "$ac_file" in
11587 *Makefile*) ac_comsub="1i\\
11588# $configure_input" ;;
11589 *) ac_comsub= ;;
11590 esac
11591
11592 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11593 sed -e "$ac_comsub
11594s%@configure_input@%$configure_input%g
11595s%@srcdir@%$srcdir%g
11596s%@top_srcdir@%$top_srcdir%g
11597s%@INSTALL@%$INSTALL%g
11598" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11599fi; done
11600rm -f conftest.s*
11601
11602# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11603# NAME is the cpp macro being defined and VALUE is the value it is being given.
11604#
11605# ac_d sets the value in "#define NAME VALUE" lines.
11606ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11607ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11608ac_dC='\3'
11609ac_dD='%g'
11610# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11611ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11612ac_uB='\([ ]\)%\1#\2define\3'
11613ac_uC=' '
11614ac_uD='\4%g'
11615# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11616ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11617ac_eB='$%\1#\2define\3'
11618ac_eC=' '
11619ac_eD='%g'
11620
11621if test "${CONFIG_HEADERS+set}" != set; then
11622EOF
11623cat >> $CONFIG_STATUS <<EOF
11624 CONFIG_HEADERS="config.h:config.in"
11625EOF
11626cat >> $CONFIG_STATUS <<\EOF
11627fi
11628for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11629 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11630 case "$ac_file" in
11631 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11632 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11633 *) ac_file_in="${ac_file}.in" ;;
11634 esac
11635
11636 echo creating $ac_file
11637
11638 rm -f conftest.frag conftest.in conftest.out
11639 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11640 cat $ac_file_inputs > conftest.in
11641
11642EOF
11643
11644# Transform confdefs.h into a sed script conftest.vals that substitutes
11645# the proper values into config.h.in to produce config.h. And first:
11646# Protect against being on the right side of a sed subst in config.status.
11647# Protect against being in an unquoted here document in config.status.
11648rm -f conftest.vals
11649cat > conftest.hdr <<\EOF
11650s/[\\&%]/\\&/g
11651s%[\\$`]%\\&%g
11652s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11653s%ac_d%ac_u%gp
11654s%ac_u%ac_e%gp
11655EOF
11656sed -n -f conftest.hdr confdefs.h > conftest.vals
11657rm -f conftest.hdr
11658
11659# This sed command replaces #undef with comments. This is necessary, for
11660# example, in the case of _POSIX_SOURCE, which is predefined and required
11661# on some systems where configure will not decide to define it.
11662cat >> conftest.vals <<\EOF
11663s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11664EOF
11665
11666# Break up conftest.vals because some shells have a limit on
11667# the size of here documents, and old seds have small limits too.
11668
11669rm -f conftest.tail
11670while :
11671do
11672 ac_lines=`grep -c . conftest.vals`
11673 # grep -c gives empty output for an empty file on some AIX systems.
11674 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11675 # Write a limited-size here document to conftest.frag.
11676 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11677 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11678 echo 'CEOF
11679 sed -f conftest.frag conftest.in > conftest.out
11680 rm -f conftest.in
11681 mv conftest.out conftest.in
11682' >> $CONFIG_STATUS
11683 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11684 rm -f conftest.vals
11685 mv conftest.tail conftest.vals
11686done
11687rm -f conftest.vals
11688
11689cat >> $CONFIG_STATUS <<\EOF
11690 rm -f conftest.frag conftest.h
11691 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11692 cat conftest.in >> conftest.h
11693 rm -f conftest.in
11694 if cmp -s $ac_file conftest.h 2>/dev/null; then
11695 echo "$ac_file is unchanged"
11696 rm -f conftest.h
11697 else
11698 # Remove last slash and all that follows it. Not all systems have dirname.
11699 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11700 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11701 # The file is in a subdirectory.
11702 test ! -d "$ac_dir" && mkdir "$ac_dir"
11703 fi
11704 rm -f $ac_file
11705 mv conftest.h $ac_file
11706 fi
11707fi; done
11708
11709EOF
11710
11711cat >> $CONFIG_STATUS <<EOF
11712ac_sources="$files"
11713ac_dests="$links"
11714EOF
11715
11716cat >> $CONFIG_STATUS <<\EOF
11717srcdir=$ac_given_srcdir
11718while test -n "$ac_sources"; do
11719 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11720 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11721
11722 echo "linking $srcdir/$ac_source to $ac_dest"
11723
11724 if test ! -r $srcdir/$ac_source; then
11725 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11726 fi
11727 rm -f $ac_dest
11728
11729 # Make relative symlinks.
11730 # Remove last slash and all that follows it. Not all systems have dirname.
11731 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11732 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11733 # The dest file is in a subdirectory.
11734 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11735 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11736 # A "../" for each directory in $ac_dest_dir_suffix.
11737 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11738 else
11739 ac_dest_dir_suffix= ac_dots=
11740 fi
11741
11742 case "$srcdir" in
11743 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11744 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11745 esac
11746
11747 # Make a symlink if possible; otherwise try a hard link.
11748 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11749 ln $srcdir/$ac_source $ac_dest; then :
11750 else
11751 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11752 fi
11753done
11754EOF
11755cat >> $CONFIG_STATUS <<EOF
11756
11757gdb_host_cpu=$gdb_host_cpu
11758gdb_target_cpu=$gdb_target_cpu
11759nativefile=$nativefile
11760
11761EOF
11762cat >> $CONFIG_STATUS <<\EOF
11763
c906108c 11764
2c0fc042 11765sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
c906108c
SS
11766/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11767/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11768mv -f Makefile.tmp Makefile
11769
2acceee2 11770
c906108c
SS
11771case x$CONFIG_HEADERS in
11772xconfig.h:config.in)
11773echo > stamp-h ;;
11774esac
11775
11776exit 0
11777EOF
11778chmod +x $CONFIG_STATUS
11779rm -fr confdefs* $ac_clean_files
11780test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11781
11782if test "$no_recursion" != yes; then
11783
11784 # Remove --cache-file and --srcdir arguments so they do not pile up.
11785 ac_sub_configure_args=
11786 ac_prev=
11787 for ac_arg in $ac_configure_args; do
11788 if test -n "$ac_prev"; then
11789 ac_prev=
11790 continue
11791 fi
11792 case "$ac_arg" in
11793 -cache-file | --cache-file | --cache-fil | --cache-fi \
11794 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11795 ac_prev=cache_file ;;
11796 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11797 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11798 ;;
11799 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11800 ac_prev=srcdir ;;
11801 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11802 ;;
11803 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11804 esac
11805 done
11806
8dcde887 11807 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11808
11809 # Do not complain, so a configure script can configure whichever
11810 # parts of a large source tree are present.
11811 if test ! -d $srcdir/$ac_config_dir; then
11812 continue
11813 fi
11814
11815 echo configuring in $ac_config_dir
11816
11817 case "$srcdir" in
11818 .) ;;
11819 *)
11820 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11821 else
11822 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11823 fi
11824 ;;
11825 esac
11826
11827 ac_popdir=`pwd`
11828 cd $ac_config_dir
11829
11830 # A "../" for each directory in /$ac_config_dir.
11831 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11832
11833 case "$srcdir" in
11834 .) # No --srcdir option. We are building in place.
11835 ac_sub_srcdir=$srcdir ;;
11836 /*) # Absolute path.
11837 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11838 *) # Relative path.
11839 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11840 esac
11841
11842 # Check for guested configure; otherwise get Cygnus style configure.
11843 if test -f $ac_sub_srcdir/configure; then
11844 ac_sub_configure=$ac_sub_srcdir/configure
11845 elif test -f $ac_sub_srcdir/configure.in; then
11846 ac_sub_configure=$ac_configure
11847 else
11848 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11849 ac_sub_configure=
11850 fi
11851
11852 # The recursion is here.
11853 if test -n "$ac_sub_configure"; then
11854
11855 # Make the cache file name correct relative to the subdirectory.
11856 case "$cache_file" in
11857 /*) ac_sub_cache_file=$cache_file ;;
11858 *) # Relative path.
11859 ac_sub_cache_file="$ac_dots$cache_file" ;;
11860 esac
11861 case "$ac_given_INSTALL" in
11862 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11863 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11864 esac
11865
11866 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11867 # The eval makes quoting arguments work.
11868 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11869 then :
11870 else
11871 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11872 fi
11873 fi
11874
11875 cd $ac_popdir
11876 done
11877fi
11878
11879
11880exit 0
This page took 1.165245 seconds and 4 git commands to generate.