* inf-ptrace.c (inf_ptrace_xfer_memory): Fix gdb_indent.sh wart.
[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
3097if test x"$enable_tui" = xyes; then
3098 if test -d $srcdir/tui; then
4f0be353 3099 if test "$ac_cv_search_mvwaddstr" != no; then
c324d747
AC
3100 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3101 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3102 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3103 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3104 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3105 CONFIG_ALL="${CONFIG_ALL} all-tui"
3106 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3107 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3108 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3109 fi
06825bd1
MK
3110 fi
3111fi
3112
8ee53726
MK
3113# Enable gdbtk.
3114# Check whether --enable-gdbtk or --disable-gdbtk was given.
3115if test "${enable_gdbtk+set}" = set; then
3116 enableval="$enable_gdbtk"
3117 case $enableval in
3118 yes | no)
3119 ;;
3120 *)
3121 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3122 esac
3123else
3124 if test -d $srcdir/gdbtk; then
3125 enable_gdbtk=yes
3126 else
3127 enable_gdbtk=no
3128 fi
3129fi
3130
3131# We unconditionally disable gdbtk tests on selected platforms.
3132case $host_os in
3133 go32* | windows*)
3134 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3135 enable_gdbtk=no ;;
3136esac
3137
0e5d83e3
JJ
3138# Libunwind support.
3139# Check whether --with-libunwind or --without-libunwind was given.
3140if test "${with_libunwind+set}" = set; then
3141 withval="$with_libunwind"
3142 case "${withval}" in
3143 yes) enable_libunwind=yes ;;
3144 no) enable_libunwind=no ;;
3145 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3146esac
3147else
3148
3149 for ac_hdr in libunwind.h
3150do
3151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3153echo "configure:3154: checking for $ac_hdr" >&5
0e5d83e3
JJ
3154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156else
3157 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3158#line 3159 "configure"
0e5d83e3
JJ
3159#include "confdefs.h"
3160#include <$ac_hdr>
3161EOF
3162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3163{ (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165if test -z "$ac_err"; then
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=yes"
3168else
3169 echo "$ac_err" >&5
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -rf conftest*
3173 eval "ac_cv_header_$ac_safe=no"
3174fi
3175rm -f conftest*
3176fi
3177if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3180 cat >> confdefs.h <<EOF
3181#define $ac_tr_hdr 1
3182EOF
3183
3184else
3185 echo "$ac_t""no" 1>&6
3186fi
3187done
3188
3189 for ac_hdr in libunwind-ia64.h
3190do
3191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3193echo "configure:3194: checking for $ac_hdr" >&5
0e5d83e3
JJ
3194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3196else
3197 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3198#line 3199 "configure"
0e5d83e3
JJ
3199#include "confdefs.h"
3200#include <$ac_hdr>
3201EOF
3202ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3203{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205if test -z "$ac_err"; then
3206 rm -rf conftest*
3207 eval "ac_cv_header_$ac_safe=yes"
3208else
3209 echo "$ac_err" >&5
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 rm -rf conftest*
3213 eval "ac_cv_header_$ac_safe=no"
3214fi
3215rm -f conftest*
3216fi
3217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218 echo "$ac_t""yes" 1>&6
3219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3220 cat >> confdefs.h <<EOF
3221#define $ac_tr_hdr 1
3222EOF
3223
3224else
3225 echo "$ac_t""no" 1>&6
3226fi
3227done
3228
3229 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3230 enable_libunwind=yes;
3231 fi
3232
3233fi
3234
3235
3236if test x"$enable_libunwind" = xyes; then
3237 for ac_hdr in libunwind.h
3238do
3239ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3240echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3241echo "configure:3242: checking for $ac_hdr" >&5
0e5d83e3
JJ
3242if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244else
3245 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3246#line 3247 "configure"
0e5d83e3
JJ
3247#include "confdefs.h"
3248#include <$ac_hdr>
3249EOF
3250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3251{ (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3252ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253if test -z "$ac_err"; then
3254 rm -rf conftest*
3255 eval "ac_cv_header_$ac_safe=yes"
3256else
3257 echo "$ac_err" >&5
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 rm -rf conftest*
3261 eval "ac_cv_header_$ac_safe=no"
3262fi
3263rm -f conftest*
3264fi
3265if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3268 cat >> confdefs.h <<EOF
3269#define $ac_tr_hdr 1
3270EOF
3271
3272else
3273 echo "$ac_t""no" 1>&6
3274fi
3275done
3276
3277 for ac_hdr in libunwind-ia64.h
3278do
3279ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3280echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3281echo "configure:3282: checking for $ac_hdr" >&5
0e5d83e3
JJ
3282if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284else
3285 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3286#line 3287 "configure"
0e5d83e3
JJ
3287#include "confdefs.h"
3288#include <$ac_hdr>
3289EOF
3290ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3291{ (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3292ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3293if test -z "$ac_err"; then
3294 rm -rf conftest*
3295 eval "ac_cv_header_$ac_safe=yes"
3296else
3297 echo "$ac_err" >&5
3298 echo "configure: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 rm -rf conftest*
3301 eval "ac_cv_header_$ac_safe=no"
3302fi
3303rm -f conftest*
3304fi
3305if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3306 echo "$ac_t""yes" 1>&6
3307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3308 cat >> confdefs.h <<EOF
3309#define $ac_tr_hdr 1
3310EOF
3311
3312else
3313 echo "$ac_t""no" 1>&6
3314fi
3315done
3316
3317 cat >> confdefs.h <<\EOF
3318#define HAVE_LIBUNWIND 1
3319EOF
3320
3321 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3322 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3323 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3324fi
3325
d28f9cdf
DJ
3326# Profiling support.
3327# Check whether --enable-profiling or --disable-profiling was given.
3328if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 case $enableval in
3331 yes | no)
3332 ;;
3333 *)
3334 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3335 esac
3336else
3337 enable_profiling=no
3338fi
3339
3340
d9feb4e7
DJ
3341for ac_func in monstartup _mcleanup
3342do
3343echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 3344echo "configure:3345: checking for $ac_func" >&5
d9feb4e7 3345if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3346 echo $ac_n "(cached) $ac_c" 1>&6
3347else
3348 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3349#line 3350 "configure"
d28f9cdf
DJ
3350#include "confdefs.h"
3351/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3352 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3353#include <assert.h>
3354/* Override any gcc2 internal prototype to avoid an error. */
3355/* We use char because int might match the return type of a gcc2
3356 builtin and then its argument prototype would still apply. */
d9feb4e7 3357char $ac_func();
d28f9cdf
DJ
3358
3359int main() {
3360
3361/* The GNU C library defines this for functions which it implements
3362 to always fail with ENOSYS. Some functions are actually named
3363 something starting with __ and the normal name is an alias. */
d9feb4e7 3364#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3365choke me
3366#else
d9feb4e7 3367$ac_func();
d28f9cdf
DJ
3368#endif
3369
3370; return 0; }
3371EOF
ddc9cd0f 3372if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3373 rm -rf conftest*
d9feb4e7 3374 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3375else
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -rf conftest*
d9feb4e7 3379 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3380fi
3381rm -f conftest*
3382fi
3383
d9feb4e7 3384if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3385 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3386 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3387 cat >> confdefs.h <<EOF
3388#define $ac_tr_func 1
3389EOF
3390
d28f9cdf
DJ
3391else
3392 echo "$ac_t""no" 1>&6
d28f9cdf 3393fi
d9feb4e7 3394done
d28f9cdf 3395
b0b1c2c0 3396echo $ac_n "checking for _etext""... $ac_c" 1>&6
ddc9cd0f 3397echo "configure:3398: checking for _etext" >&5
b0b1c2c0
MK
3398if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3399 echo $ac_n "(cached) $ac_c" 1>&6
3400else
3401 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3402#line 3403 "configure"
b0b1c2c0
MK
3403#include "confdefs.h"
3404#include <stdlib.h>
3405extern char _etext;
3406
3407int main() {
3408free (&_etext);
3409; return 0; }
3410EOF
ddc9cd0f 3411if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3412 rm -rf conftest*
3413 ac_cv_var__etext=yes
3414else
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -rf conftest*
3418 ac_cv_var__etext=no
3419fi
3420rm -f conftest*
3421fi
3422
3423echo "$ac_t""$ac_cv_var__etext" 1>&6
3424if test $ac_cv_var__etext = yes; then
3425 cat >> confdefs.h <<\EOF
3426#define HAVE__ETEXT 1
3427EOF
3428
3429fi
d9feb4e7
DJ
3430if test "$enable_profiling" = yes ; then
3431 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3432 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3433 fi
3434 PROFILE_CFLAGS=-pg
3435 OLD_CFLAGS="$CFLAGS"
3436 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3437
d9feb4e7 3438 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
ddc9cd0f 3439echo "configure:3440: checking whether $CC supports -pg" >&5
d9feb4e7 3440if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3444#line 3445 "configure"
d28f9cdf 3445#include "confdefs.h"
d28f9cdf
DJ
3446
3447int main() {
d9feb4e7 3448int x;
d28f9cdf
DJ
3449; return 0; }
3450EOF
ddc9cd0f 3451if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3452 rm -rf conftest*
d9feb4e7 3453 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3454else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
d9feb4e7 3458 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3459fi
3460rm -f conftest*
3461fi
3462
d9feb4e7 3463echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3464
d9feb4e7
DJ
3465 if test $ac_cv_cc_supports_pg = no; then
3466 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3467 fi
d28f9cdf
DJ
3468
3469 CFLAGS="$OLD_CFLAGS"
3470fi
3471
8bb2c122
MK
3472# --------------------- #
3473# Checks for programs. #
3474# --------------------- #
3475
d836ee13 3476for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3477do
3478# Extract the first word of "$ac_prog", so it can be a program name with args.
3479set dummy $ac_prog; ac_word=$2
3480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3481echo "configure:3482: checking for $ac_word" >&5
7a292a7a
SS
3482if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3483 echo $ac_n "(cached) $ac_c" 1>&6
3484else
3485 if test -n "$AWK"; then
3486 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3487else
3488 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3489 ac_dummy="$PATH"
3490 for ac_dir in $ac_dummy; do
3491 test -z "$ac_dir" && ac_dir=.
3492 if test -f $ac_dir/$ac_word; then
3493 ac_cv_prog_AWK="$ac_prog"
3494 break
3495 fi
3496 done
3497 IFS="$ac_save_ifs"
3498fi
3499fi
3500AWK="$ac_cv_prog_AWK"
3501if test -n "$AWK"; then
3502 echo "$ac_t""$AWK" 1>&6
3503else
3504 echo "$ac_t""no" 1>&6
3505fi
3506
3507test -n "$AWK" && break
3508done
3509
c906108c
SS
3510# Find a good install program. We prefer a C program (faster),
3511# so one script is as good as another. But avoid the broken or
3512# incompatible versions:
3513# SysV /etc/install, /usr/sbin/install
3514# SunOS /usr/etc/install
3515# IRIX /sbin/install
3516# AIX /bin/install
3517# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3518# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3519# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3520# ./install, which can be erroneously created by make from ./install.sh.
3521echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
ddc9cd0f 3522echo "configure:3523: checking for a BSD compatible install" >&5
c906108c
SS
3523if test -z "$INSTALL"; then
3524if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526else
3527 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3528 for ac_dir in $PATH; do
3529 # Account for people who put trailing slashes in PATH elements.
3530 case "$ac_dir/" in
3531 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3532 *)
3533 # OSF1 and SCO ODT 3.0 have their own names for install.
3534 # Don't use installbsd from OSF since it installs stuff as root
3535 # by default.
3536 for ac_prog in ginstall scoinst install; do
3537 if test -f $ac_dir/$ac_prog; then
3538 if test $ac_prog = install &&
3539 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3540 # AIX install. It has an incompatible calling convention.
3541 :
3542 else
3543 ac_cv_path_install="$ac_dir/$ac_prog -c"
3544 break 2
3545 fi
3546 fi
3547 done
3548 ;;
3549 esac
3550 done
3551 IFS="$ac_save_IFS"
3552
3553fi
3554 if test "${ac_cv_path_install+set}" = set; then
3555 INSTALL="$ac_cv_path_install"
3556 else
3557 # As a last resort, use the slow shell script. We don't cache a
3558 # path for INSTALL within a source directory, because that will
3559 # break other packages using the cache if that directory is
3560 # removed, or if the path is relative.
3561 INSTALL="$ac_install_sh"
3562 fi
3563fi
3564echo "$ac_t""$INSTALL" 1>&6
3565
3566# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3567# It thinks the first close brace ends the variable substitution.
3568test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3569
3570test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3571
3572test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3573
8bb2c122 3574echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
ddc9cd0f 3575echo "configure:3576: checking whether ln -s works" >&5
8bb2c122
MK
3576if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3577 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3578else
8bb2c122
MK
3579 rm -f conftestdata
3580if ln -s X conftestdata 2>/dev/null
3581then
3582 rm -f conftestdata
3583 ac_cv_prog_LN_S="ln -s"
3584else
3585 ac_cv_prog_LN_S=ln
3586fi
3587fi
3588LN_S="$ac_cv_prog_LN_S"
3589if test "$ac_cv_prog_LN_S" = "ln -s"; then
3590 echo "$ac_t""yes" 1>&6
3591else
3592 echo "$ac_t""no" 1>&6
c906108c
SS
3593fi
3594
8bb2c122
MK
3595# Extract the first word of "ranlib", so it can be a program name with args.
3596set dummy ranlib; ac_word=$2
c906108c 3597echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3598echo "configure:3599: checking for $ac_word" >&5
8bb2c122 3599if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3600 echo $ac_n "(cached) $ac_c" 1>&6
3601else
8bb2c122
MK
3602 if test -n "$RANLIB"; then
3603 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3604else
3605 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608 test -z "$ac_dir" && ac_dir=.
3609 if test -f $ac_dir/$ac_word; then
8bb2c122 3610 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3611 break
3612 fi
3613 done
3614 IFS="$ac_save_ifs"
8bb2c122 3615 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3616fi
3617fi
8bb2c122
MK
3618RANLIB="$ac_cv_prog_RANLIB"
3619if test -n "$RANLIB"; then
3620 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3621else
3622 echo "$ac_t""no" 1>&6
3623fi
3624
8bb2c122
MK
3625for ac_prog in 'bison -y' byacc
3626do
3627# Extract the first word of "$ac_prog", so it can be a program name with args.
3628set dummy $ac_prog; ac_word=$2
c906108c 3629echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3630echo "configure:3631: checking for $ac_word" >&5
8bb2c122 3631if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3632 echo $ac_n "(cached) $ac_c" 1>&6
3633else
8bb2c122
MK
3634 if test -n "$YACC"; then
3635 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3636else
3637 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3638 ac_dummy="$PATH"
3639 for ac_dir in $ac_dummy; do
3640 test -z "$ac_dir" && ac_dir=.
3641 if test -f $ac_dir/$ac_word; then
8bb2c122 3642 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3643 break
3644 fi
3645 done
3646 IFS="$ac_save_ifs"
3647fi
3648fi
8bb2c122
MK
3649YACC="$ac_cv_prog_YACC"
3650if test -n "$YACC"; then
3651 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3652else
3653 echo "$ac_t""no" 1>&6
3654fi
3655
8bb2c122
MK
3656test -n "$YACC" && break
3657done
3658test -n "$YACC" || YACC="yacc"
c906108c 3659
8bb2c122
MK
3660
3661# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3662set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3663echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3664echo "configure:3665: checking for $ac_word" >&5
8bb2c122 3665if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667else
8bb2c122
MK
3668 if test -n "$AR"; then
3669 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3670else
3671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3672 ac_dummy="$PATH"
3673 for ac_dir in $ac_dummy; do
3674 test -z "$ac_dir" && ac_dir=.
3675 if test -f $ac_dir/$ac_word; then
8bb2c122 3676 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3677 break
3678 fi
3679 done
3680 IFS="$ac_save_ifs"
8bb2c122 3681 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3682fi
3683fi
8bb2c122
MK
3684AR="$ac_cv_prog_AR"
3685if test -n "$AR"; then
3686 echo "$ac_t""$AR" 1>&6
c906108c
SS
3687else
3688 echo "$ac_t""no" 1>&6
3689fi
3690
8bb2c122 3691
c906108c 3692
95ca63c4
CF
3693# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3694set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3695echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3696echo "configure:3697: checking for $ac_word" >&5
95ca63c4
CF
3697if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3698 echo $ac_n "(cached) $ac_c" 1>&6
3699else
3700 if test -n "$DLLTOOL"; then
3701 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3702else
3703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3704 ac_dummy="$PATH"
3705 for ac_dir in $ac_dummy; do
3706 test -z "$ac_dir" && ac_dir=.
3707 if test -f $ac_dir/$ac_word; then
3708 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3709 break
3710 fi
3711 done
3712 IFS="$ac_save_ifs"
3713 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3714fi
3715fi
3716DLLTOOL="$ac_cv_prog_DLLTOOL"
3717if test -n "$DLLTOOL"; then
3718 echo "$ac_t""$DLLTOOL" 1>&6
3719else
3720 echo "$ac_t""no" 1>&6
3721fi
3722
3723
3724
3725# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3726set dummy ${ac_tool_prefix}windres; ac_word=$2
3727echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3728echo "configure:3729: checking for $ac_word" >&5
95ca63c4
CF
3729if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3731else
3732 if test -n "$WINDRES"; then
3733 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3734else
3735 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3736 ac_dummy="$PATH"
3737 for ac_dir in $ac_dummy; do
3738 test -z "$ac_dir" && ac_dir=.
3739 if test -f $ac_dir/$ac_word; then
3740 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3741 break
3742 fi
3743 done
3744 IFS="$ac_save_ifs"
3745 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3746fi
3747fi
3748WINDRES="$ac_cv_prog_WINDRES"
3749if test -n "$WINDRES"; then
3750 echo "$ac_t""$WINDRES" 1>&6
3751else
3752 echo "$ac_t""no" 1>&6
3753fi
3754
3755
3756
c906108c 3757
8bb2c122 3758# Needed for GNU/Hurd.
75c6e08a
MK
3759# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3760set dummy ${ac_tool_prefix}mig; ac_word=$2
3761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3762echo "configure:3763: checking for $ac_word" >&5
75c6e08a
MK
3763if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766 if test -n "$MIG"; then
3767 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3768else
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3770 ac_dummy="$PATH"
3771 for ac_dir in $ac_dummy; do
3772 test -z "$ac_dir" && ac_dir=.
3773 if test -f $ac_dir/$ac_word; then
3774 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3775 break
3776 fi
3777 done
3778 IFS="$ac_save_ifs"
3779 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3780fi
3781fi
3782MIG="$ac_cv_prog_MIG"
3783if test -n "$MIG"; then
3784 echo "$ac_t""$MIG" 1>&6
3785else
3786 echo "$ac_t""no" 1>&6
3787fi
3788
3789
3790
3791
9a156167
MK
3792# ---------------------- #
3793# Checks for libraries. #
3794# ---------------------- #
3795
3796# We might need to link with -lm; most simulators need it.
3797echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
ddc9cd0f 3798echo "configure:3799: checking for main in -lm" >&5
9a156167
MK
3799ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3800if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802else
3803 ac_save_LIBS="$LIBS"
3804LIBS="-lm $LIBS"
3805cat > conftest.$ac_ext <<EOF
ddc9cd0f 3806#line 3807 "configure"
9a156167
MK
3807#include "confdefs.h"
3808
3809int main() {
3810main()
3811; return 0; }
3812EOF
ddc9cd0f 3813if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3814 rm -rf conftest*
3815 eval "ac_cv_lib_$ac_lib_var=yes"
3816else
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 rm -rf conftest*
3820 eval "ac_cv_lib_$ac_lib_var=no"
3821fi
3822rm -f conftest*
3823LIBS="$ac_save_LIBS"
3824
3825fi
3826if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3829 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3830 cat >> confdefs.h <<EOF
3831#define $ac_tr_lib 1
3832EOF
3833
3834 LIBS="-lm $LIBS"
3835
3836else
3837 echo "$ac_t""no" 1>&6
3838fi
3839
3840
3841# We need to link with -lw to get `wctype' on Solaris before Solaris
3842# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3843# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3844# is known to have this problem). Therefore we avoid libw if we can.
3845echo $ac_n "checking for wctype""... $ac_c" 1>&6
ddc9cd0f 3846echo "configure:3847: checking for wctype" >&5
9a156167
MK
3847if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849else
3850 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3851#line 3852 "configure"
9a156167
MK
3852#include "confdefs.h"
3853/* System header to define __stub macros and hopefully few prototypes,
3854 which can conflict with char wctype(); below. */
3855#include <assert.h>
3856/* Override any gcc2 internal prototype to avoid an error. */
3857/* We use char because int might match the return type of a gcc2
3858 builtin and then its argument prototype would still apply. */
3859char wctype();
3860
3861int main() {
3862
3863/* The GNU C library defines this for functions which it implements
3864 to always fail with ENOSYS. Some functions are actually named
3865 something starting with __ and the normal name is an alias. */
3866#if defined (__stub_wctype) || defined (__stub___wctype)
3867choke me
3868#else
3869wctype();
3870#endif
3871
3872; return 0; }
3873EOF
ddc9cd0f 3874if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3875 rm -rf conftest*
3876 eval "ac_cv_func_wctype=yes"
3877else
3878 echo "configure: failed program was:" >&5
3879 cat conftest.$ac_ext >&5
3880 rm -rf conftest*
3881 eval "ac_cv_func_wctype=no"
3882fi
3883rm -f conftest*
3884fi
3885
3886if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3887 echo "$ac_t""yes" 1>&6
3888 :
3889else
3890 echo "$ac_t""no" 1>&6
3891echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
ddc9cd0f 3892echo "configure:3893: checking for wctype in -lw" >&5
9a156167
MK
3893ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3894if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896else
3897 ac_save_LIBS="$LIBS"
3898LIBS="-lw $LIBS"
3899cat > conftest.$ac_ext <<EOF
ddc9cd0f 3900#line 3901 "configure"
9a156167
MK
3901#include "confdefs.h"
3902/* Override any gcc2 internal prototype to avoid an error. */
3903/* We use char because int might match the return type of a gcc2
3904 builtin and then its argument prototype would still apply. */
3905char wctype();
3906
3907int main() {
3908wctype()
3909; return 0; }
3910EOF
ddc9cd0f 3911if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3912 rm -rf conftest*
3913 eval "ac_cv_lib_$ac_lib_var=yes"
3914else
3915 echo "configure: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 rm -rf conftest*
3918 eval "ac_cv_lib_$ac_lib_var=no"
3919fi
3920rm -f conftest*
3921LIBS="$ac_save_LIBS"
3922
3923fi
3924if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3925 echo "$ac_t""yes" 1>&6
3926 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3927 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3928 cat >> confdefs.h <<EOF
3929#define $ac_tr_lib 1
3930EOF
3931
3932 LIBS="-lw $LIBS"
3933
3934else
3935 echo "$ac_t""no" 1>&6
3936fi
3937
3938fi
3939
3940
c890192f
MK
3941# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3942
3943echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
ddc9cd0f 3944echo "configure:3945: checking for library containing gethostbyname" >&5
c890192f
MK
3945if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3946 echo $ac_n "(cached) $ac_c" 1>&6
3947else
3948 ac_func_search_save_LIBS="$LIBS"
3949ac_cv_search_gethostbyname="no"
3950cat > conftest.$ac_ext <<EOF
ddc9cd0f 3951#line 3952 "configure"
c890192f
MK
3952#include "confdefs.h"
3953/* Override any gcc2 internal prototype to avoid an error. */
3954/* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956char gethostbyname();
3957
3958int main() {
3959gethostbyname()
3960; return 0; }
3961EOF
ddc9cd0f 3962if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3963 rm -rf conftest*
3964 ac_cv_search_gethostbyname="none required"
3965else
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3968fi
3969rm -f conftest*
3970test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3971LIBS="-l$i $ac_func_search_save_LIBS"
3972cat > conftest.$ac_ext <<EOF
ddc9cd0f 3973#line 3974 "configure"
c890192f
MK
3974#include "confdefs.h"
3975/* Override any gcc2 internal prototype to avoid an error. */
3976/* We use char because int might match the return type of a gcc2
3977 builtin and then its argument prototype would still apply. */
3978char gethostbyname();
3979
3980int main() {
3981gethostbyname()
3982; return 0; }
3983EOF
ddc9cd0f 3984if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3985 rm -rf conftest*
3986 ac_cv_search_gethostbyname="-l$i"
3987break
3988else
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3991fi
3992rm -f conftest*
3993done
3994LIBS="$ac_func_search_save_LIBS"
3995fi
3996
3997echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3998if test "$ac_cv_search_gethostbyname" != "no"; then
3999 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4000
4001else :
4002
4003fi
4004
9a156167
MK
4005# Some systems (e.g. Solaris) have `socketpair' in libsocket.
4006
4007echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
ddc9cd0f 4008echo "configure:4009: checking for library containing socketpair" >&5
9a156167
MK
4009if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011else
4012 ac_func_search_save_LIBS="$LIBS"
4013ac_cv_search_socketpair="no"
4014cat > conftest.$ac_ext <<EOF
ddc9cd0f 4015#line 4016 "configure"
9a156167
MK
4016#include "confdefs.h"
4017/* Override any gcc2 internal prototype to avoid an error. */
4018/* We use char because int might match the return type of a gcc2
4019 builtin and then its argument prototype would still apply. */
4020char socketpair();
4021
4022int main() {
4023socketpair()
4024; return 0; }
4025EOF
ddc9cd0f 4026if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4027 rm -rf conftest*
4028 ac_cv_search_socketpair="none required"
4029else
4030 echo "configure: failed program was:" >&5
4031 cat conftest.$ac_ext >&5
4032fi
4033rm -f conftest*
4034test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4035LIBS="-l$i $ac_func_search_save_LIBS"
4036cat > conftest.$ac_ext <<EOF
ddc9cd0f 4037#line 4038 "configure"
9a156167
MK
4038#include "confdefs.h"
4039/* Override any gcc2 internal prototype to avoid an error. */
4040/* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042char socketpair();
4043
4044int main() {
4045socketpair()
4046; return 0; }
4047EOF
ddc9cd0f 4048if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4049 rm -rf conftest*
4050 ac_cv_search_socketpair="-l$i"
4051break
4052else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055fi
4056rm -f conftest*
4057done
4058LIBS="$ac_func_search_save_LIBS"
4059fi
4060
4061echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4062if test "$ac_cv_search_socketpair" != "no"; then
4063 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4064
4065else :
4066
4067fi
4068
4f0be353
MK
4069# For the TUI, we need enhanced curses functionality.
4070#
4071# FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
4072# curses library because the latter might not provide all the
4073# functionality we need. However, this leads to problems on systems
4074# where the linker searches /usr/local/lib, but the compiler doesn't
4075# search /usr/local/include if ncurses is installed in /usr/local. A
4076# default installation of ncurses on alpha*-dec-osf* will lead to such
4077# a situation.
06825bd1 4078
4f0be353
MK
4079echo $ac_n "checking for library containing mvwaddstr""... $ac_c" 1>&6
4080echo "configure:4081: checking for library containing mvwaddstr" >&5
4081if eval "test \"`echo '$''{'ac_cv_search_mvwaddstr'+set}'`\" = set"; then
06825bd1
MK
4082 echo $ac_n "(cached) $ac_c" 1>&6
4083else
4084 ac_func_search_save_LIBS="$LIBS"
4f0be353 4085ac_cv_search_mvwaddstr="no"
06825bd1 4086cat > conftest.$ac_ext <<EOF
4f0be353 4087#line 4088 "configure"
06825bd1
MK
4088#include "confdefs.h"
4089/* Override any gcc2 internal prototype to avoid an error. */
4090/* We use char because int might match the return type of a gcc2
4091 builtin and then its argument prototype would still apply. */
4f0be353 4092char mvwaddstr();
06825bd1
MK
4093
4094int main() {
4f0be353 4095mvwaddstr()
06825bd1
MK
4096; return 0; }
4097EOF
4f0be353 4098if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1 4099 rm -rf conftest*
4f0be353 4100 ac_cv_search_mvwaddstr="none required"
06825bd1
MK
4101else
4102 echo "configure: failed program was:" >&5
4103 cat conftest.$ac_ext >&5
4104fi
4105rm -f conftest*
4f0be353 4106test "$ac_cv_search_mvwaddstr" = "no" && for i in ncurses cursesX curses; do
06825bd1
MK
4107LIBS="-l$i $ac_func_search_save_LIBS"
4108cat > conftest.$ac_ext <<EOF
4f0be353 4109#line 4110 "configure"
06825bd1
MK
4110#include "confdefs.h"
4111/* Override any gcc2 internal prototype to avoid an error. */
4112/* We use char because int might match the return type of a gcc2
4113 builtin and then its argument prototype would still apply. */
4f0be353 4114char mvwaddstr();
06825bd1
MK
4115
4116int main() {
4f0be353 4117mvwaddstr()
06825bd1
MK
4118; return 0; }
4119EOF
4f0be353 4120if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1 4121 rm -rf conftest*
4f0be353 4122 ac_cv_search_mvwaddstr="-l$i"
06825bd1
MK
4123break
4124else
4125 echo "configure: failed program was:" >&5
4126 cat conftest.$ac_ext >&5
4127fi
4128rm -f conftest*
4129done
4130LIBS="$ac_func_search_save_LIBS"
4131fi
4132
4f0be353
MK
4133echo "$ac_t""$ac_cv_search_mvwaddstr" 1>&6
4134if test "$ac_cv_search_mvwaddstr" != "no"; then
4135 test "$ac_cv_search_mvwaddstr" = "none required" || LIBS="$ac_cv_search_mvwaddstr $LIBS"
06825bd1
MK
4136
4137else :
4138
4139fi
4f0be353
MK
4140
4141if test "$ac_cv_search_mvwaddstr" = no; then
4142 echo "configure: warning: no curses library found" 1>&2
4143fi
4144
4145# Since GDB uses Readline, we need termcap functionality. In many
4146# cases this will be provided by the curses library, but some systems
4147# have a seperate termcap library, or no curses library at all.
4148
4149case $host_os in
4150 cygwin*)
4151 if test -d $srcdir/libtermcap; then
4152 LIBS="../libtermcap/libtermcap.a $LIBS"
4153 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4154 fi ;;
4155 go32* | *djgpp*)
4156 ac_cv_search_tgetent="none required"
06825bd1
MK
4157 ;;
4158esac
4159
4f0be353 4160# These are the libraries checked by Readline.
06825bd1
MK
4161
4162echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4f0be353 4163echo "configure:4164: checking for library containing tgetent" >&5
06825bd1
MK
4164if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4165 echo $ac_n "(cached) $ac_c" 1>&6
4166else
4167 ac_func_search_save_LIBS="$LIBS"
4168ac_cv_search_tgetent="no"
4169cat > conftest.$ac_ext <<EOF
4f0be353 4170#line 4171 "configure"
06825bd1
MK
4171#include "confdefs.h"
4172/* Override any gcc2 internal prototype to avoid an error. */
4173/* We use char because int might match the return type of a gcc2
4174 builtin and then its argument prototype would still apply. */
4175char tgetent();
4176
4177int main() {
4178tgetent()
4179; return 0; }
4180EOF
4f0be353 4181if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4182 rm -rf conftest*
4183 ac_cv_search_tgetent="none required"
4184else
4185 echo "configure: failed program was:" >&5
4186 cat conftest.$ac_ext >&5
4187fi
4188rm -f conftest*
4f0be353 4189test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo curses ncurses; do
06825bd1
MK
4190LIBS="-l$i $ac_func_search_save_LIBS"
4191cat > conftest.$ac_ext <<EOF
4f0be353 4192#line 4193 "configure"
06825bd1
MK
4193#include "confdefs.h"
4194/* Override any gcc2 internal prototype to avoid an error. */
4195/* We use char because int might match the return type of a gcc2
4196 builtin and then its argument prototype would still apply. */
4197char tgetent();
4198
4199int main() {
4200tgetent()
4201; return 0; }
4202EOF
4f0be353 4203if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4204 rm -rf conftest*
4205 ac_cv_search_tgetent="-l$i"
4206break
4207else
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210fi
4211rm -f conftest*
4212done
4213LIBS="$ac_func_search_save_LIBS"
4214fi
4215
4216echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4217if test "$ac_cv_search_tgetent" != "no"; then
4218 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4219
4220else :
4221
4222fi
4223
4224if test "$ac_cv_search_tgetent" = no; then
4225 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4226fi
4227
5ee754fc
MK
4228# ------------------------- #
4229# Checks for header files. #
4230# ------------------------- #
4231
4232ac_header_dirent=no
4233for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4234do
4235ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4236echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4f0be353 4237echo "configure:4238: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4238if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4239 echo $ac_n "(cached) $ac_c" 1>&6
4240else
4241 cat > conftest.$ac_ext <<EOF
4f0be353 4242#line 4243 "configure"
c906108c
SS
4243#include "confdefs.h"
4244#include <sys/types.h>
5ee754fc
MK
4245#include <$ac_hdr>
4246int main() {
4247DIR *dirp = 0;
4248; return 0; }
4249EOF
4f0be353 4250if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4251 rm -rf conftest*
4252 eval "ac_cv_header_dirent_$ac_safe=yes"
4253else
4254 echo "configure: failed program was:" >&5
4255 cat conftest.$ac_ext >&5
4256 rm -rf conftest*
4257 eval "ac_cv_header_dirent_$ac_safe=no"
4258fi
4259rm -f conftest*
4260fi
4261if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4262 echo "$ac_t""yes" 1>&6
4263 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4264 cat >> confdefs.h <<EOF
4265#define $ac_tr_hdr 1
4266EOF
4267 ac_header_dirent=$ac_hdr; break
4268else
4269 echo "$ac_t""no" 1>&6
4270fi
4271done
4272# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4273if test $ac_header_dirent = dirent.h; then
4274echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4f0be353 4275echo "configure:4276: checking for opendir in -ldir" >&5
5ee754fc
MK
4276ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4277if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4278 echo $ac_n "(cached) $ac_c" 1>&6
4279else
4280 ac_save_LIBS="$LIBS"
4281LIBS="-ldir $LIBS"
4282cat > conftest.$ac_ext <<EOF
4f0be353 4283#line 4284 "configure"
5ee754fc
MK
4284#include "confdefs.h"
4285/* Override any gcc2 internal prototype to avoid an error. */
4286/* We use char because int might match the return type of a gcc2
4287 builtin and then its argument prototype would still apply. */
4288char opendir();
c906108c
SS
4289
4290int main() {
5ee754fc 4291opendir()
c906108c
SS
4292; return 0; }
4293EOF
4f0be353 4294if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4295 rm -rf conftest*
5ee754fc 4296 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4297else
4298 echo "configure: failed program was:" >&5
4299 cat conftest.$ac_ext >&5
4300 rm -rf conftest*
5ee754fc 4301 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4302fi
4303rm -f conftest*
5ee754fc
MK
4304LIBS="$ac_save_LIBS"
4305
4306fi
4307if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4308 echo "$ac_t""yes" 1>&6
4309 LIBS="$LIBS -ldir"
4310else
4311 echo "$ac_t""no" 1>&6
c906108c
SS
4312fi
4313
5ee754fc
MK
4314else
4315echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4f0be353 4316echo "configure:4317: checking for opendir in -lx" >&5
5ee754fc
MK
4317ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4318if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4319 echo $ac_n "(cached) $ac_c" 1>&6
4320else
4321 ac_save_LIBS="$LIBS"
4322LIBS="-lx $LIBS"
4323cat > conftest.$ac_ext <<EOF
4f0be353 4324#line 4325 "configure"
5ee754fc
MK
4325#include "confdefs.h"
4326/* Override any gcc2 internal prototype to avoid an error. */
4327/* We use char because int might match the return type of a gcc2
4328 builtin and then its argument prototype would still apply. */
4329char opendir();
4330
4331int main() {
4332opendir()
4333; return 0; }
c906108c 4334EOF
4f0be353 4335if { (eval echo configure:4336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4336 rm -rf conftest*
4337 eval "ac_cv_lib_$ac_lib_var=yes"
4338else
4339 echo "configure: failed program was:" >&5
4340 cat conftest.$ac_ext >&5
4341 rm -rf conftest*
4342 eval "ac_cv_lib_$ac_lib_var=no"
4343fi
4344rm -f conftest*
4345LIBS="$ac_save_LIBS"
c906108c 4346
5ee754fc
MK
4347fi
4348if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4349 echo "$ac_t""yes" 1>&6
4350 LIBS="$LIBS -lx"
4351else
4352 echo "$ac_t""no" 1>&6
4353fi
c906108c 4354
5ee754fc 4355fi
c906108c 4356
5ee754fc 4357echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4f0be353 4358echo "configure:4359: checking whether stat file-mode macros are broken" >&5
5ee754fc 4359if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4360 echo $ac_n "(cached) $ac_c" 1>&6
4361else
4362 cat > conftest.$ac_ext <<EOF
4f0be353 4363#line 4364 "configure"
9608ab8b
MK
4364#include "confdefs.h"
4365#include <sys/types.h>
5ee754fc
MK
4366#include <sys/stat.h>
4367
4368#if defined(S_ISBLK) && defined(S_IFDIR)
4369# if S_ISBLK (S_IFDIR)
4370You lose.
4371# endif
4372#endif
4373
4374#if defined(S_ISBLK) && defined(S_IFCHR)
4375# if S_ISBLK (S_IFCHR)
4376You lose.
4377# endif
4378#endif
4379
4380#if defined(S_ISLNK) && defined(S_IFREG)
4381# if S_ISLNK (S_IFREG)
4382You lose.
4383# endif
4384#endif
4385
4386#if defined(S_ISSOCK) && defined(S_IFREG)
4387# if S_ISSOCK (S_IFREG)
4388You lose.
4389# endif
4390#endif
4391
9608ab8b 4392EOF
5ee754fc
MK
4393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4395 rm -rf conftest*
5ee754fc
MK
4396 ac_cv_header_stat_broken=yes
4397else
4398 rm -rf conftest*
4399 ac_cv_header_stat_broken=no
4400fi
4401rm -f conftest*
4402
4403fi
4404
4405echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4406if test $ac_cv_header_stat_broken = yes; then
4407 cat >> confdefs.h <<\EOF
4408#define STAT_MACROS_BROKEN 1
4409EOF
4410
4411fi
4412
4413echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4f0be353 4414echo "configure:4415: checking for ANSI C header files" >&5
5ee754fc
MK
4415if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4416 echo $ac_n "(cached) $ac_c" 1>&6
4417else
4418 cat > conftest.$ac_ext <<EOF
4f0be353 4419#line 4420 "configure"
5ee754fc
MK
4420#include "confdefs.h"
4421#include <stdlib.h>
4422#include <stdarg.h>
4423#include <string.h>
4424#include <float.h>
4425EOF
4426ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4427{ (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4428ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4429if test -z "$ac_err"; then
4430 rm -rf conftest*
4431 ac_cv_header_stdc=yes
4432else
4433 echo "$ac_err" >&5
4434 echo "configure: failed program was:" >&5
4435 cat conftest.$ac_ext >&5
4436 rm -rf conftest*
4437 ac_cv_header_stdc=no
4438fi
4439rm -f conftest*
4440
4441if test $ac_cv_header_stdc = yes; then
4442 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4443cat > conftest.$ac_ext <<EOF
4f0be353 4444#line 4445 "configure"
5ee754fc
MK
4445#include "confdefs.h"
4446#include <string.h>
4447EOF
4448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4449 egrep "memchr" >/dev/null 2>&1; then
4450 :
4451else
4452 rm -rf conftest*
4453 ac_cv_header_stdc=no
4454fi
4455rm -f conftest*
4456
4457fi
4458
4459if test $ac_cv_header_stdc = yes; then
4460 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4461cat > conftest.$ac_ext <<EOF
4f0be353 4462#line 4463 "configure"
5ee754fc
MK
4463#include "confdefs.h"
4464#include <stdlib.h>
4465EOF
4466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4467 egrep "free" >/dev/null 2>&1; then
4468 :
4469else
4470 rm -rf conftest*
4471 ac_cv_header_stdc=no
4472fi
4473rm -f conftest*
4474
4475fi
4476
4477if test $ac_cv_header_stdc = yes; then
4478 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4479if test "$cross_compiling" = yes; then
4480 :
4481else
4482 cat > conftest.$ac_ext <<EOF
4f0be353 4483#line 4484 "configure"
5ee754fc
MK
4484#include "confdefs.h"
4485#include <ctype.h>
4486#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4487#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4489int main () { int i; for (i = 0; i < 256; i++)
4490if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4491exit (0); }
4492
4493EOF
4f0be353 4494if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4495then
4496 :
9608ab8b 4497else
5ee754fc
MK
4498 echo "configure: failed program was:" >&5
4499 cat conftest.$ac_ext >&5
4500 rm -fr conftest*
4501 ac_cv_header_stdc=no
4502fi
4503rm -fr conftest*
4504fi
4505
4506fi
4507fi
4508
4509echo "$ac_t""$ac_cv_header_stdc" 1>&6
4510if test $ac_cv_header_stdc = yes; then
4511 cat >> confdefs.h <<\EOF
4512#define STDC_HEADERS 1
4513EOF
4514
4515fi
4516
4517for ac_hdr in link.h
4518do
4519ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4520echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4521echo "configure:4522: checking for $ac_hdr" >&5
5ee754fc
MK
4522if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4523 echo $ac_n "(cached) $ac_c" 1>&6
4524else
4525 cat > conftest.$ac_ext <<EOF
4f0be353 4526#line 4527 "configure"
5ee754fc
MK
4527#include "confdefs.h"
4528#include <$ac_hdr>
4529EOF
4530ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4531{ (eval echo configure:4532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4532ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4533if test -z "$ac_err"; then
4534 rm -rf conftest*
4535 eval "ac_cv_header_$ac_safe=yes"
4536else
4537 echo "$ac_err" >&5
4538 echo "configure: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 rm -rf conftest*
4541 eval "ac_cv_header_$ac_safe=no"
4542fi
4543rm -f conftest*
4544fi
4545if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4546 echo "$ac_t""yes" 1>&6
4547 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4548 cat >> confdefs.h <<EOF
4549#define $ac_tr_hdr 1
4550EOF
4551
4552else
4553 echo "$ac_t""no" 1>&6
4554fi
4555done
4556
78434e59 4557for ac_hdr in machine/reg.h
5ee754fc
MK
4558do
4559ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4560echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4561echo "configure:4562: checking for $ac_hdr" >&5
5ee754fc
MK
4562if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4563 echo $ac_n "(cached) $ac_c" 1>&6
4564else
4565 cat > conftest.$ac_ext <<EOF
4f0be353 4566#line 4567 "configure"
5ee754fc
MK
4567#include "confdefs.h"
4568#include <$ac_hdr>
4569EOF
4570ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4571{ (eval echo configure:4572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4572ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4573if test -z "$ac_err"; then
4574 rm -rf conftest*
4575 eval "ac_cv_header_$ac_safe=yes"
4576else
4577 echo "$ac_err" >&5
4578 echo "configure: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580 rm -rf conftest*
4581 eval "ac_cv_header_$ac_safe=no"
4582fi
4583rm -f conftest*
4584fi
4585if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4586 echo "$ac_t""yes" 1>&6
4587 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4588 cat >> confdefs.h <<EOF
4589#define $ac_tr_hdr 1
4590EOF
4591
4592else
4593 echo "$ac_t""no" 1>&6
4594fi
4595done
4596
78434e59 4597for ac_hdr in nlist.h
5ee754fc
MK
4598do
4599ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4600echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4601echo "configure:4602: checking for $ac_hdr" >&5
5ee754fc
MK
4602if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4603 echo $ac_n "(cached) $ac_c" 1>&6
4604else
4605 cat > conftest.$ac_ext <<EOF
4f0be353 4606#line 4607 "configure"
5ee754fc
MK
4607#include "confdefs.h"
4608#include <$ac_hdr>
4609EOF
4610ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4611{ (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4612ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613if test -z "$ac_err"; then
4614 rm -rf conftest*
4615 eval "ac_cv_header_$ac_safe=yes"
4616else
4617 echo "$ac_err" >&5
4618 echo "configure: failed program was:" >&5
4619 cat conftest.$ac_ext >&5
4620 rm -rf conftest*
4621 eval "ac_cv_header_$ac_safe=no"
4622fi
4623rm -f conftest*
4624fi
4625if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4626 echo "$ac_t""yes" 1>&6
4627 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4628 cat >> confdefs.h <<EOF
4629#define $ac_tr_hdr 1
4630EOF
4631
4632else
4633 echo "$ac_t""no" 1>&6
4634fi
4635done
4636
78434e59 4637for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4638do
4639ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4640echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4641echo "configure:4642: checking for $ac_hdr" >&5
5ee754fc
MK
4642if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4643 echo $ac_n "(cached) $ac_c" 1>&6
4644else
4645 cat > conftest.$ac_ext <<EOF
4f0be353 4646#line 4647 "configure"
5ee754fc
MK
4647#include "confdefs.h"
4648#include <$ac_hdr>
4649EOF
4650ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4651{ (eval echo configure:4652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4652ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4653if test -z "$ac_err"; then
4654 rm -rf conftest*
4655 eval "ac_cv_header_$ac_safe=yes"
4656else
4657 echo "$ac_err" >&5
4658 echo "configure: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4660 rm -rf conftest*
4661 eval "ac_cv_header_$ac_safe=no"
4662fi
4663rm -f conftest*
4664fi
4665if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4666 echo "$ac_t""yes" 1>&6
4667 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4668 cat >> confdefs.h <<EOF
4669#define $ac_tr_hdr 1
4670EOF
4671
4672else
4673 echo "$ac_t""no" 1>&6
4674fi
4675done
4676
a2f23071 4677for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4678do
4679ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4680echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4681echo "configure:4682: checking for $ac_hdr" >&5
5ee754fc
MK
4682if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4683 echo $ac_n "(cached) $ac_c" 1>&6
4684else
4685 cat > conftest.$ac_ext <<EOF
4f0be353 4686#line 4687 "configure"
5ee754fc
MK
4687#include "confdefs.h"
4688#include <$ac_hdr>
4689EOF
4690ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4691{ (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4692ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4693if test -z "$ac_err"; then
4694 rm -rf conftest*
4695 eval "ac_cv_header_$ac_safe=yes"
4696else
4697 echo "$ac_err" >&5
4698 echo "configure: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 rm -rf conftest*
4701 eval "ac_cv_header_$ac_safe=no"
4702fi
4703rm -f conftest*
4704fi
4705if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4706 echo "$ac_t""yes" 1>&6
4707 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4708 cat >> confdefs.h <<EOF
4709#define $ac_tr_hdr 1
4710EOF
4711
4712else
4713 echo "$ac_t""no" 1>&6
4714fi
4715done
4716
78434e59 4717for ac_hdr in stddef.h
5ee754fc
MK
4718do
4719ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4720echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4721echo "configure:4722: checking for $ac_hdr" >&5
5ee754fc
MK
4722if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4723 echo $ac_n "(cached) $ac_c" 1>&6
4724else
4725 cat > conftest.$ac_ext <<EOF
4f0be353 4726#line 4727 "configure"
5ee754fc
MK
4727#include "confdefs.h"
4728#include <$ac_hdr>
4729EOF
4730ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4731{ (eval echo configure:4732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4732ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4733if test -z "$ac_err"; then
4734 rm -rf conftest*
4735 eval "ac_cv_header_$ac_safe=yes"
4736else
4737 echo "$ac_err" >&5
4738 echo "configure: failed program was:" >&5
4739 cat conftest.$ac_ext >&5
4740 rm -rf conftest*
4741 eval "ac_cv_header_$ac_safe=no"
4742fi
4743rm -f conftest*
4744fi
4745if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4746 echo "$ac_t""yes" 1>&6
4747 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4748 cat >> confdefs.h <<EOF
4749#define $ac_tr_hdr 1
4750EOF
4751
4752else
4753 echo "$ac_t""no" 1>&6
4754fi
4755done
4756
78434e59 4757for ac_hdr in stdlib.h
5ee754fc
MK
4758do
4759ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4760echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4761echo "configure:4762: checking for $ac_hdr" >&5
5ee754fc
MK
4762if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4763 echo $ac_n "(cached) $ac_c" 1>&6
4764else
4765 cat > conftest.$ac_ext <<EOF
4f0be353 4766#line 4767 "configure"
5ee754fc
MK
4767#include "confdefs.h"
4768#include <$ac_hdr>
4769EOF
4770ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4771{ (eval echo configure:4772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4772ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4773if test -z "$ac_err"; then
4774 rm -rf conftest*
4775 eval "ac_cv_header_$ac_safe=yes"
4776else
4777 echo "$ac_err" >&5
4778 echo "configure: failed program was:" >&5
4779 cat conftest.$ac_ext >&5
4780 rm -rf conftest*
4781 eval "ac_cv_header_$ac_safe=no"
4782fi
4783rm -f conftest*
4784fi
4785if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4786 echo "$ac_t""yes" 1>&6
4787 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4788 cat >> confdefs.h <<EOF
4789#define $ac_tr_hdr 1
4790EOF
4791
4792else
4793 echo "$ac_t""no" 1>&6
4794fi
4795done
4796
78434e59 4797for ac_hdr in stdint.h
5ee754fc
MK
4798do
4799ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4800echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4801echo "configure:4802: checking for $ac_hdr" >&5
5ee754fc
MK
4802if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
4804else
4805 cat > conftest.$ac_ext <<EOF
4f0be353 4806#line 4807 "configure"
5ee754fc
MK
4807#include "confdefs.h"
4808#include <$ac_hdr>
4809EOF
4810ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4811{ (eval echo configure:4812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4812ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4813if test -z "$ac_err"; then
4814 rm -rf conftest*
4815 eval "ac_cv_header_$ac_safe=yes"
4816else
4817 echo "$ac_err" >&5
4818 echo "configure: failed program was:" >&5
4819 cat conftest.$ac_ext >&5
4820 rm -rf conftest*
4821 eval "ac_cv_header_$ac_safe=no"
4822fi
4823rm -f conftest*
4824fi
4825if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4826 echo "$ac_t""yes" 1>&6
4827 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4828 cat >> confdefs.h <<EOF
4829#define $ac_tr_hdr 1
4830EOF
4831
4832else
4833 echo "$ac_t""no" 1>&6
4834fi
4835done
4836
78434e59 4837for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4838do
4839ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4840echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4841echo "configure:4842: checking for $ac_hdr" >&5
5ee754fc
MK
4842if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4843 echo $ac_n "(cached) $ac_c" 1>&6
4844else
4845 cat > conftest.$ac_ext <<EOF
4f0be353 4846#line 4847 "configure"
5ee754fc
MK
4847#include "confdefs.h"
4848#include <$ac_hdr>
4849EOF
4850ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4851{ (eval echo configure:4852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4852ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4853if test -z "$ac_err"; then
4854 rm -rf conftest*
4855 eval "ac_cv_header_$ac_safe=yes"
4856else
4857 echo "$ac_err" >&5
4858 echo "configure: failed program was:" >&5
4859 cat conftest.$ac_ext >&5
4860 rm -rf conftest*
4861 eval "ac_cv_header_$ac_safe=no"
4862fi
4863rm -f conftest*
4864fi
4865if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4866 echo "$ac_t""yes" 1>&6
4867 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4868 cat >> confdefs.h <<EOF
4869#define $ac_tr_hdr 1
4870EOF
4871
4872else
4873 echo "$ac_t""no" 1>&6
4874fi
4875done
4876
78434e59 4877for ac_hdr in sys/fault.h
5ee754fc
MK
4878do
4879ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4880echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4881echo "configure:4882: checking for $ac_hdr" >&5
5ee754fc
MK
4882if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4883 echo $ac_n "(cached) $ac_c" 1>&6
4884else
4885 cat > conftest.$ac_ext <<EOF
4f0be353 4886#line 4887 "configure"
5ee754fc
MK
4887#include "confdefs.h"
4888#include <$ac_hdr>
4889EOF
4890ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4891{ (eval echo configure:4892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4892ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4893if test -z "$ac_err"; then
4894 rm -rf conftest*
4895 eval "ac_cv_header_$ac_safe=yes"
4896else
4897 echo "$ac_err" >&5
4898 echo "configure: failed program was:" >&5
4899 cat conftest.$ac_ext >&5
4900 rm -rf conftest*
4901 eval "ac_cv_header_$ac_safe=no"
4902fi
4903rm -f conftest*
4904fi
4905if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4906 echo "$ac_t""yes" 1>&6
4907 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4908 cat >> confdefs.h <<EOF
4909#define $ac_tr_hdr 1
4910EOF
4911
4912else
4913 echo "$ac_t""no" 1>&6
4914fi
4915done
4916
78434e59 4917for ac_hdr in sys/file.h
5ee754fc
MK
4918do
4919ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4920echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4921echo "configure:4922: checking for $ac_hdr" >&5
5ee754fc
MK
4922if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4923 echo $ac_n "(cached) $ac_c" 1>&6
4924else
4925 cat > conftest.$ac_ext <<EOF
4f0be353 4926#line 4927 "configure"
5ee754fc
MK
4927#include "confdefs.h"
4928#include <$ac_hdr>
4929EOF
4930ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4931{ (eval echo configure:4932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4932ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4933if test -z "$ac_err"; then
4934 rm -rf conftest*
4935 eval "ac_cv_header_$ac_safe=yes"
4936else
4937 echo "$ac_err" >&5
4938 echo "configure: failed program was:" >&5
4939 cat conftest.$ac_ext >&5
4940 rm -rf conftest*
4941 eval "ac_cv_header_$ac_safe=no"
4942fi
4943rm -f conftest*
4944fi
4945if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4946 echo "$ac_t""yes" 1>&6
4947 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4948 cat >> confdefs.h <<EOF
4949#define $ac_tr_hdr 1
4950EOF
4951
4952else
4953 echo "$ac_t""no" 1>&6
4954fi
4955done
4956
78434e59 4957for ac_hdr in sys/filio.h
5ee754fc
MK
4958do
4959ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4960echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 4961echo "configure:4962: checking for $ac_hdr" >&5
5ee754fc
MK
4962if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4963 echo $ac_n "(cached) $ac_c" 1>&6
4964else
4965 cat > conftest.$ac_ext <<EOF
4f0be353 4966#line 4967 "configure"
5ee754fc
MK
4967#include "confdefs.h"
4968#include <$ac_hdr>
4969EOF
4970ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 4971{ (eval echo configure:4972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4972ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4973if test -z "$ac_err"; then
4974 rm -rf conftest*
4975 eval "ac_cv_header_$ac_safe=yes"
4976else
4977 echo "$ac_err" >&5
4978 echo "configure: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4980 rm -rf conftest*
4981 eval "ac_cv_header_$ac_safe=no"
4982fi
4983rm -f conftest*
4984fi
4985if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4986 echo "$ac_t""yes" 1>&6
4987 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4988 cat >> confdefs.h <<EOF
4989#define $ac_tr_hdr 1
4990EOF
4991
4992else
4993 echo "$ac_t""no" 1>&6
4994fi
4995done
4996
78434e59 4997for ac_hdr in sys/ioctl.h
5ee754fc
MK
4998do
4999ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5000echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5001echo "configure:5002: checking for $ac_hdr" >&5
5ee754fc
MK
5002if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5003 echo $ac_n "(cached) $ac_c" 1>&6
5004else
5005 cat > conftest.$ac_ext <<EOF
4f0be353 5006#line 5007 "configure"
5ee754fc
MK
5007#include "confdefs.h"
5008#include <$ac_hdr>
5009EOF
5010ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5011{ (eval echo configure:5012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5012ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5013if test -z "$ac_err"; then
5014 rm -rf conftest*
5015 eval "ac_cv_header_$ac_safe=yes"
5016else
5017 echo "$ac_err" >&5
5018 echo "configure: failed program was:" >&5
5019 cat conftest.$ac_ext >&5
5020 rm -rf conftest*
5021 eval "ac_cv_header_$ac_safe=no"
5022fi
5023rm -f conftest*
5024fi
5025if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5026 echo "$ac_t""yes" 1>&6
5027 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5028 cat >> confdefs.h <<EOF
5029#define $ac_tr_hdr 1
5030EOF
5031
5032else
5033 echo "$ac_t""no" 1>&6
5034fi
5035done
5036
78434e59 5037for ac_hdr in sys/param.h
5ee754fc
MK
5038do
5039ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5040echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5041echo "configure:5042: checking for $ac_hdr" >&5
5ee754fc
MK
5042if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5043 echo $ac_n "(cached) $ac_c" 1>&6
5044else
5045 cat > conftest.$ac_ext <<EOF
4f0be353 5046#line 5047 "configure"
5ee754fc
MK
5047#include "confdefs.h"
5048#include <$ac_hdr>
5049EOF
5050ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5051{ (eval echo configure:5052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5052ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5053if test -z "$ac_err"; then
5054 rm -rf conftest*
5055 eval "ac_cv_header_$ac_safe=yes"
5056else
5057 echo "$ac_err" >&5
5058 echo "configure: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 rm -rf conftest*
5061 eval "ac_cv_header_$ac_safe=no"
5062fi
5063rm -f conftest*
5064fi
5065if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5066 echo "$ac_t""yes" 1>&6
5067 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5068 cat >> confdefs.h <<EOF
5069#define $ac_tr_hdr 1
5070EOF
5071
5072else
5073 echo "$ac_t""no" 1>&6
5074fi
5075done
5076
78434e59 5077for ac_hdr in sys/proc.h
5ee754fc
MK
5078do
5079ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5080echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5081echo "configure:5082: checking for $ac_hdr" >&5
5ee754fc
MK
5082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5083 echo $ac_n "(cached) $ac_c" 1>&6
5084else
5085 cat > conftest.$ac_ext <<EOF
4f0be353 5086#line 5087 "configure"
5ee754fc
MK
5087#include "confdefs.h"
5088#include <$ac_hdr>
5089EOF
5090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5091{ (eval echo configure:5092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5092ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5093if test -z "$ac_err"; then
5094 rm -rf conftest*
5095 eval "ac_cv_header_$ac_safe=yes"
5096else
5097 echo "$ac_err" >&5
5098 echo "configure: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 rm -rf conftest*
5101 eval "ac_cv_header_$ac_safe=no"
5102fi
5103rm -f conftest*
5104fi
5105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5106 echo "$ac_t""yes" 1>&6
5107 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5108 cat >> confdefs.h <<EOF
5109#define $ac_tr_hdr 1
5110EOF
5111
5112else
5113 echo "$ac_t""no" 1>&6
5114fi
5115done
5116
78434e59 5117for ac_hdr in sys/procfs.h
5ee754fc
MK
5118do
5119ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5120echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5121echo "configure:5122: checking for $ac_hdr" >&5
5ee754fc
MK
5122if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5123 echo $ac_n "(cached) $ac_c" 1>&6
5124else
5125 cat > conftest.$ac_ext <<EOF
4f0be353 5126#line 5127 "configure"
5ee754fc
MK
5127#include "confdefs.h"
5128#include <$ac_hdr>
5129EOF
5130ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5131{ (eval echo configure:5132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5132ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5133if test -z "$ac_err"; then
5134 rm -rf conftest*
5135 eval "ac_cv_header_$ac_safe=yes"
5136else
5137 echo "$ac_err" >&5
5138 echo "configure: failed program was:" >&5
5139 cat conftest.$ac_ext >&5
5140 rm -rf conftest*
5141 eval "ac_cv_header_$ac_safe=no"
5142fi
5143rm -f conftest*
5144fi
5145if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5146 echo "$ac_t""yes" 1>&6
5147 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5148 cat >> confdefs.h <<EOF
5149#define $ac_tr_hdr 1
5150EOF
5151
5152else
5153 echo "$ac_t""no" 1>&6
5154fi
5155done
5156
78434e59 5157for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5158do
5159ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5160echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5161echo "configure:5162: checking for $ac_hdr" >&5
5ee754fc
MK
5162if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5163 echo $ac_n "(cached) $ac_c" 1>&6
5164else
5165 cat > conftest.$ac_ext <<EOF
4f0be353 5166#line 5167 "configure"
5ee754fc
MK
5167#include "confdefs.h"
5168#include <$ac_hdr>
5169EOF
5170ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5171{ (eval echo configure:5172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5172ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5173if test -z "$ac_err"; then
5174 rm -rf conftest*
5175 eval "ac_cv_header_$ac_safe=yes"
5176else
5177 echo "$ac_err" >&5
5178 echo "configure: failed program was:" >&5
5179 cat conftest.$ac_ext >&5
5180 rm -rf conftest*
5181 eval "ac_cv_header_$ac_safe=no"
5182fi
5183rm -f conftest*
5184fi
5185if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5186 echo "$ac_t""yes" 1>&6
5187 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5188 cat >> confdefs.h <<EOF
5189#define $ac_tr_hdr 1
5190EOF
5191
5192else
5193 echo "$ac_t""no" 1>&6
5194fi
5195done
5196
78434e59 5197for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5198do
5199ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5200echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5201echo "configure:5202: checking for $ac_hdr" >&5
5ee754fc
MK
5202if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5203 echo $ac_n "(cached) $ac_c" 1>&6
5204else
5205 cat > conftest.$ac_ext <<EOF
4f0be353 5206#line 5207 "configure"
5ee754fc
MK
5207#include "confdefs.h"
5208#include <$ac_hdr>
5209EOF
5210ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5211{ (eval echo configure:5212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5212ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5213if test -z "$ac_err"; then
5214 rm -rf conftest*
5215 eval "ac_cv_header_$ac_safe=yes"
5216else
5217 echo "$ac_err" >&5
5218 echo "configure: failed program was:" >&5
5219 cat conftest.$ac_ext >&5
5220 rm -rf conftest*
5221 eval "ac_cv_header_$ac_safe=no"
5222fi
5223rm -f conftest*
5224fi
5225if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5226 echo "$ac_t""yes" 1>&6
5227 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5228 cat >> confdefs.h <<EOF
5229#define $ac_tr_hdr 1
5230EOF
5231
5232else
5233 echo "$ac_t""no" 1>&6
5234fi
5235done
5236
78434e59 5237for ac_hdr in sys/select.h
5ee754fc
MK
5238do
5239ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5240echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5241echo "configure:5242: checking for $ac_hdr" >&5
5ee754fc
MK
5242if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5243 echo $ac_n "(cached) $ac_c" 1>&6
5244else
5245 cat > conftest.$ac_ext <<EOF
4f0be353 5246#line 5247 "configure"
5ee754fc
MK
5247#include "confdefs.h"
5248#include <$ac_hdr>
5249EOF
5250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5251{ (eval echo configure:5252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5252ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5253if test -z "$ac_err"; then
5254 rm -rf conftest*
5255 eval "ac_cv_header_$ac_safe=yes"
5256else
5257 echo "$ac_err" >&5
5258 echo "configure: failed program was:" >&5
5259 cat conftest.$ac_ext >&5
5260 rm -rf conftest*
5261 eval "ac_cv_header_$ac_safe=no"
5262fi
5263rm -f conftest*
5264fi
5265if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5266 echo "$ac_t""yes" 1>&6
5267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5268 cat >> confdefs.h <<EOF
5269#define $ac_tr_hdr 1
5270EOF
5271
5272else
5273 echo "$ac_t""no" 1>&6
5274fi
5275done
5276
78434e59 5277for ac_hdr in sys/syscall.h
5ee754fc
MK
5278do
5279ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5280echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5281echo "configure:5282: checking for $ac_hdr" >&5
5ee754fc
MK
5282if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5283 echo $ac_n "(cached) $ac_c" 1>&6
5284else
5285 cat > conftest.$ac_ext <<EOF
4f0be353 5286#line 5287 "configure"
5ee754fc
MK
5287#include "confdefs.h"
5288#include <$ac_hdr>
5289EOF
5290ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5291{ (eval echo configure:5292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5292ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5293if test -z "$ac_err"; then
5294 rm -rf conftest*
5295 eval "ac_cv_header_$ac_safe=yes"
5296else
5297 echo "$ac_err" >&5
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 rm -rf conftest*
5301 eval "ac_cv_header_$ac_safe=no"
5302fi
5303rm -f conftest*
5304fi
5305if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5306 echo "$ac_t""yes" 1>&6
5307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5308 cat >> confdefs.h <<EOF
5309#define $ac_tr_hdr 1
5310EOF
5311
5312else
5313 echo "$ac_t""no" 1>&6
5314fi
5315done
5316
086ec9eb 5317for ac_hdr in sys/types.h
5ee754fc
MK
5318do
5319ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5320echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5321echo "configure:5322: checking for $ac_hdr" >&5
5ee754fc
MK
5322if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5323 echo $ac_n "(cached) $ac_c" 1>&6
5324else
5325 cat > conftest.$ac_ext <<EOF
4f0be353 5326#line 5327 "configure"
5ee754fc
MK
5327#include "confdefs.h"
5328#include <$ac_hdr>
5329EOF
5330ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5331{ (eval echo configure:5332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5332ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5333if test -z "$ac_err"; then
5334 rm -rf conftest*
5335 eval "ac_cv_header_$ac_safe=yes"
5336else
5337 echo "$ac_err" >&5
9608ab8b
MK
5338 echo "configure: failed program was:" >&5
5339 cat conftest.$ac_ext >&5
5340 rm -rf conftest*
5ee754fc 5341 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5342fi
5343rm -f conftest*
5344fi
5ee754fc 5345if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5346 echo "$ac_t""yes" 1>&6
5347 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5348 cat >> confdefs.h <<EOF
5349#define $ac_tr_hdr 1
5350EOF
5ee754fc 5351
9608ab8b
MK
5352else
5353 echo "$ac_t""no" 1>&6
5354fi
5355done
5ee754fc 5356
086ec9eb 5357for ac_hdr in sys/user.h
5ee754fc
MK
5358do
5359ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5360echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5361echo "configure:5362: checking for $ac_hdr" >&5
5ee754fc 5362if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5363 echo $ac_n "(cached) $ac_c" 1>&6
5364else
5ee754fc 5365 cat > conftest.$ac_ext <<EOF
4f0be353 5366#line 5367 "configure"
9608ab8b 5367#include "confdefs.h"
5ee754fc 5368#include <$ac_hdr>
9608ab8b 5369EOF
5ee754fc 5370ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5371{ (eval echo configure:5372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5372ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5373if test -z "$ac_err"; then
9608ab8b 5374 rm -rf conftest*
5ee754fc 5375 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5376else
5ee754fc 5377 echo "$ac_err" >&5
9608ab8b
MK
5378 echo "configure: failed program was:" >&5
5379 cat conftest.$ac_ext >&5
5380 rm -rf conftest*
5ee754fc 5381 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5382fi
5383rm -f conftest*
9608ab8b 5384fi
5ee754fc 5385if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5386 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5387 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5388 cat >> confdefs.h <<EOF
5389#define $ac_tr_hdr 1
5390EOF
5391
9608ab8b
MK
5392else
5393 echo "$ac_t""no" 1>&6
5394fi
5ee754fc 5395done
9608ab8b 5396
086ec9eb 5397for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5398do
5399ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5400echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5401echo "configure:5402: checking for $ac_hdr" >&5
5ee754fc 5402if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5403 echo $ac_n "(cached) $ac_c" 1>&6
5404else
5ee754fc 5405 cat > conftest.$ac_ext <<EOF
4f0be353 5406#line 5407 "configure"
9608ab8b 5407#include "confdefs.h"
5ee754fc 5408#include <$ac_hdr>
9608ab8b 5409EOF
5ee754fc 5410ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5411{ (eval echo configure:5412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5412ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5413if test -z "$ac_err"; then
9608ab8b 5414 rm -rf conftest*
5ee754fc 5415 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5416else
5ee754fc 5417 echo "$ac_err" >&5
9608ab8b
MK
5418 echo "configure: failed program was:" >&5
5419 cat conftest.$ac_ext >&5
5420 rm -rf conftest*
5ee754fc 5421 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5422fi
5423rm -f conftest*
9608ab8b 5424fi
5ee754fc 5425if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5426 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5427 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5428 cat >> confdefs.h <<EOF
5429#define $ac_tr_hdr 1
5430EOF
5431
9608ab8b
MK
5432else
5433 echo "$ac_t""no" 1>&6
5434fi
5ee754fc 5435done
9608ab8b 5436
086ec9eb 5437for ac_hdr in termios.h termio.h sgtty.h
78434e59
MK
5438do
5439ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5440echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5441echo "configure:5442: checking for $ac_hdr" >&5
78434e59
MK
5442if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5443 echo $ac_n "(cached) $ac_c" 1>&6
5444else
5445 cat > conftest.$ac_ext <<EOF
4f0be353 5446#line 5447 "configure"
78434e59
MK
5447#include "confdefs.h"
5448#include <$ac_hdr>
5449EOF
5450ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5451{ (eval echo configure:5452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5452ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5453if test -z "$ac_err"; then
5454 rm -rf conftest*
5455 eval "ac_cv_header_$ac_safe=yes"
5456else
5457 echo "$ac_err" >&5
5458 echo "configure: failed program was:" >&5
5459 cat conftest.$ac_ext >&5
5460 rm -rf conftest*
5461 eval "ac_cv_header_$ac_safe=no"
5462fi
5463rm -f conftest*
5464fi
5465if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5466 echo "$ac_t""yes" 1>&6
5467 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5468 cat >> confdefs.h <<EOF
5469#define $ac_tr_hdr 1
5470EOF
5471
5472else
5473 echo "$ac_t""no" 1>&6
5474fi
5475done
5476
086ec9eb
MK
5477for ac_hdr in unistd.h
5478do
5479ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5480echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5481echo "configure:5482: checking for $ac_hdr" >&5
086ec9eb
MK
5482if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5483 echo $ac_n "(cached) $ac_c" 1>&6
5484else
5485 cat > conftest.$ac_ext <<EOF
4f0be353 5486#line 5487 "configure"
086ec9eb
MK
5487#include "confdefs.h"
5488#include <$ac_hdr>
5489EOF
5490ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5491{ (eval echo configure:5492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
086ec9eb
MK
5492ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5493if test -z "$ac_err"; then
5494 rm -rf conftest*
5495 eval "ac_cv_header_$ac_safe=yes"
5496else
5497 echo "$ac_err" >&5
5498 echo "configure: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5500 rm -rf conftest*
5501 eval "ac_cv_header_$ac_safe=no"
5502fi
5503rm -f conftest*
5504fi
5505if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5506 echo "$ac_t""yes" 1>&6
5507 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5508 cat >> confdefs.h <<EOF
5509#define $ac_tr_hdr 1
5510EOF
5511
5512else
5513 echo "$ac_t""no" 1>&6
5514fi
5515done
5516
9608ab8b 5517
b1d19a62 5518# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5ee754fc
MK
5519# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5520# think that we don't have <curses.h> if we're using GCC.
5521case $host_os in
b1d19a62 5522 solaris2.[789])
5ee754fc
MK
5523 if test "$GCC" = yes; then
5524 cat >> confdefs.h <<\EOF
5525#define _MSE_INT_H 1
5526EOF
5527
5528 fi ;;
5529esac
a6ed5501 5530for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h
5ee754fc
MK
5531do
5532ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5533echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5534echo "configure:5535: checking for $ac_hdr" >&5
5ee754fc 5535if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5536 echo $ac_n "(cached) $ac_c" 1>&6
5537else
5538 cat > conftest.$ac_ext <<EOF
4f0be353 5539#line 5540 "configure"
c906108c 5540#include "confdefs.h"
5ee754fc 5541#include <$ac_hdr>
c906108c
SS
5542EOF
5543ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5544{ (eval echo configure:5545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5545ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5546if test -z "$ac_err"; then
5547 rm -rf conftest*
5ee754fc 5548 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5549else
5550 echo "$ac_err" >&5
5551 echo "configure: failed program was:" >&5
5552 cat conftest.$ac_ext >&5
5553 rm -rf conftest*
5ee754fc 5554 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5555fi
5556rm -f conftest*
c906108c 5557fi
5ee754fc
MK
5558if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5559 echo "$ac_t""yes" 1>&6
5560 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5561 cat >> confdefs.h <<EOF
5562#define $ac_tr_hdr 1
c906108c 5563EOF
5ee754fc 5564
c906108c 5565else
5ee754fc 5566 echo "$ac_t""no" 1>&6
c906108c 5567fi
5ee754fc 5568done
c906108c
SS
5569
5570
5ee754fc
MK
5571# FIXME: kettenis/20030102: In most cases we include these
5572# unconditionally, so what's the point in checking these?
5573for ac_hdr in ctype.h time.h
c906108c
SS
5574do
5575ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5576echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 5577echo "configure:5578: checking for $ac_hdr" >&5
c906108c
SS
5578if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5579 echo $ac_n "(cached) $ac_c" 1>&6
5580else
5581 cat > conftest.$ac_ext <<EOF
4f0be353 5582#line 5583 "configure"
c906108c
SS
5583#include "confdefs.h"
5584#include <$ac_hdr>
5585EOF
5586ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 5587{ (eval echo configure:5588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5588ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5589if test -z "$ac_err"; then
5590 rm -rf conftest*
5591 eval "ac_cv_header_$ac_safe=yes"
5592else
5593 echo "$ac_err" >&5
5594 echo "configure: failed program was:" >&5
5595 cat conftest.$ac_ext >&5
5596 rm -rf conftest*
5597 eval "ac_cv_header_$ac_safe=no"
5598fi
5599rm -f conftest*
5600fi
5601if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5602 echo "$ac_t""yes" 1>&6
5603 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5604 cat >> confdefs.h <<EOF
5605#define $ac_tr_hdr 1
5606EOF
5607
5608else
5609 echo "$ac_t""no" 1>&6
5610fi
5611done
5612
5ee754fc 5613
40a7debc 5614echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
4f0be353 5615echo "configure:5616: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5616if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5617 echo $ac_n "(cached) $ac_c" 1>&6
5618else
5619 cat > conftest.$ac_ext <<EOF
4f0be353 5620#line 5621 "configure"
40a7debc
EZ
5621#include "confdefs.h"
5622#include <sys/types.h>
5623#include <sys/stat.h>
5624int main() {
5625struct stat st; (void) st.st_blocks;
5626; return 0; }
5627EOF
4f0be353 5628if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5629 rm -rf conftest*
5630 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5631else
5632 echo "configure: failed program was:" >&5
5633 cat conftest.$ac_ext >&5
5634 rm -rf conftest*
5635 gdb_cv_have_struct_stat_with_st_blocks_member=no
5636fi
5637rm -f conftest*
5638fi
5639
5640echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5641if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5642 cat >> confdefs.h <<\EOF
5643#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5644EOF
5645
5646fi
086ec9eb 5647
b9362cc7
AC
5648# ------------------------- #
5649# Checks for declarations. #
5650# ------------------------- #
5651
5652for ac_func in getopt
5653do
5654 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5655echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4f0be353 5656echo "configure:5657: checking whether $ac_func is declared" >&5
b9362cc7
AC
5657if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5658 echo $ac_n "(cached) $ac_c" 1>&6
5659else
5660 cat > conftest.$ac_ext <<EOF
4f0be353 5661#line 5662 "configure"
b9362cc7
AC
5662#include "confdefs.h"
5663#undef $ac_tr_decl
5664#define $ac_tr_decl 1
5665
5666
5667int main() {
5668#ifndef $ac_func
5669char *(*pfn) = (char *(*)) $ac_func ;
5670#endif
5671; return 0; }
5672EOF
4f0be353 5673if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5674 rm -rf conftest*
5675 eval "gcc_cv_have_decl_$ac_func=yes"
5676else
5677 echo "configure: failed program was:" >&5
5678 cat conftest.$ac_ext >&5
5679 rm -rf conftest*
5680 eval "gcc_cv_have_decl_$ac_func=no"
5681fi
5682rm -f conftest*
5683fi
5684
5685if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5686 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5687#define $ac_tr_decl 1
5688EOF
5689
5690else
5691 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5692#define $ac_tr_decl 0
5693EOF
5694
5695fi
5696
5697done
5698if test x = y ; then
5699 cat >> confdefs.h <<\EOF
5700#define HAVE_DECL_GETOPT 1
5701EOF
5702fi
5703
5704
5ee754fc
MK
5705# ------------------ #
5706# Checks for types. #
5707# ------------------ #
5708
5709echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4f0be353 5710echo "configure:5711: checking return type of signal handlers" >&5
5ee754fc 5711if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5712 echo $ac_n "(cached) $ac_c" 1>&6
5713else
5714 cat > conftest.$ac_ext <<EOF
4f0be353 5715#line 5716 "configure"
c906108c
SS
5716#include "confdefs.h"
5717#include <sys/types.h>
5ee754fc
MK
5718#include <signal.h>
5719#ifdef signal
5720#undef signal
c906108c 5721#endif
5ee754fc
MK
5722#ifdef __cplusplus
5723extern "C" void (*signal (int, void (*)(int)))(int);
5724#else
5725void (*signal ()) ();
c906108c
SS
5726#endif
5727
5ee754fc
MK
5728int main() {
5729int i;
5730; return 0; }
c906108c 5731EOF
4f0be353 5732if { (eval echo configure:5733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5733 rm -rf conftest*
5ee754fc 5734 ac_cv_type_signal=void
c906108c 5735else
5ee754fc
MK
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
c906108c 5738 rm -rf conftest*
5ee754fc 5739 ac_cv_type_signal=int
c906108c
SS
5740fi
5741rm -f conftest*
c906108c
SS
5742fi
5743
5ee754fc
MK
5744echo "$ac_t""$ac_cv_type_signal" 1>&6
5745cat >> confdefs.h <<EOF
5746#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5747EOF
5748
c906108c
SS
5749
5750
5ee754fc
MK
5751# ------------------------------------- #
5752# Checks for compiler characteristics. #
5753# ------------------------------------- #
5754
c906108c 5755echo $ac_n "checking for working const""... $ac_c" 1>&6
4f0be353 5756echo "configure:5757: checking for working const" >&5
c906108c
SS
5757if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5758 echo $ac_n "(cached) $ac_c" 1>&6
5759else
5760 cat > conftest.$ac_ext <<EOF
4f0be353 5761#line 5762 "configure"
c906108c
SS
5762#include "confdefs.h"
5763
5764int main() {
5765
5766/* Ultrix mips cc rejects this. */
5767typedef int charset[2]; const charset x;
5768/* SunOS 4.1.1 cc rejects this. */
5769char const *const *ccp;
5770char **p;
5771/* NEC SVR4.0.2 mips cc rejects this. */
5772struct point {int x, y;};
5773static struct point const zero = {0,0};
5774/* AIX XL C 1.02.0.0 rejects this.
5775 It does not let you subtract one const X* pointer from another in an arm
5776 of an if-expression whose if-part is not a constant expression */
5777const char *g = "string";
5778ccp = &g + (g ? g-g : 0);
5779/* HPUX 7.0 cc rejects these. */
5780++ccp;
5781p = (char**) ccp;
5782ccp = (char const *const *) p;
5783{ /* SCO 3.2v4 cc rejects this. */
5784 char *t;
5785 char const *s = 0 ? (char *) 0 : (char const *) 0;
5786
5787 *t++ = 0;
5788}
5789{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5790 int x[] = {25, 17};
5791 const int *foo = &x[0];
5792 ++foo;
5793}
5794{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5795 typedef const int *iptr;
5796 iptr p = 0;
5797 ++p;
5798}
5799{ /* AIX XL C 1.02.0.0 rejects this saying
5800 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5801 struct s { int j; const int *ap[3]; };
5802 struct s *b; b->j = 5;
5803}
5804{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5805 const int foo = 10;
5806}
5807
5808; return 0; }
5809EOF
4f0be353 5810if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5811 rm -rf conftest*
5812 ac_cv_c_const=yes
5813else
5814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
5816 rm -rf conftest*
5817 ac_cv_c_const=no
5818fi
5819rm -f conftest*
5820fi
5821
5822echo "$ac_t""$ac_cv_c_const" 1>&6
5823if test $ac_cv_c_const = no; then
5824 cat >> confdefs.h <<\EOF
5825#define const
5826EOF
5827
5828fi
5829
bce58c09 5830echo $ac_n "checking for inline""... $ac_c" 1>&6
4f0be353 5831echo "configure:5832: checking for inline" >&5
bce58c09
JB
5832if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5834else
5835 ac_cv_c_inline=no
5836for ac_kw in inline __inline__ __inline; do
5837 cat > conftest.$ac_ext <<EOF
4f0be353 5838#line 5839 "configure"
bce58c09
JB
5839#include "confdefs.h"
5840
5841int main() {
5842} $ac_kw foo() {
5843; return 0; }
5844EOF
4f0be353 5845if { (eval echo configure:5846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5846 rm -rf conftest*
5847 ac_cv_c_inline=$ac_kw; break
5848else
5849 echo "configure: failed program was:" >&5
5850 cat conftest.$ac_ext >&5
5851fi
5852rm -f conftest*
5853done
5854
5855fi
5856
5857echo "$ac_t""$ac_cv_c_inline" 1>&6
5858case "$ac_cv_c_inline" in
5859 inline | yes) ;;
5860 no) cat >> confdefs.h <<\EOF
5861#define inline
5862EOF
5863 ;;
5864 *) cat >> confdefs.h <<EOF
5865#define inline $ac_cv_c_inline
5866EOF
5867 ;;
5868esac
5869
c906108c 5870
5ee754fc
MK
5871# ------------------------------ #
5872# Checks for library functions. #
5873# ------------------------------ #
5874
46711df8
MK
5875# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5876# for constant arguments. Useless!
5877echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4f0be353 5878echo "configure:5879: checking for working alloca.h" >&5
46711df8
MK
5879if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5880 echo $ac_n "(cached) $ac_c" 1>&6
5881else
5882 cat > conftest.$ac_ext <<EOF
4f0be353 5883#line 5884 "configure"
46711df8
MK
5884#include "confdefs.h"
5885#include <alloca.h>
5886int main() {
5887char *p = alloca(2 * sizeof(int));
5888; return 0; }
5889EOF
4f0be353 5890if { (eval echo configure:5891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5891 rm -rf conftest*
5892 ac_cv_header_alloca_h=yes
5893else
5894 echo "configure: failed program was:" >&5
5895 cat conftest.$ac_ext >&5
5896 rm -rf conftest*
5897 ac_cv_header_alloca_h=no
5898fi
5899rm -f conftest*
5900fi
5901
5902echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5903if test $ac_cv_header_alloca_h = yes; then
5904 cat >> confdefs.h <<\EOF
5905#define HAVE_ALLOCA_H 1
5906EOF
5907
5908fi
5909
5910echo $ac_n "checking for alloca""... $ac_c" 1>&6
4f0be353 5911echo "configure:5912: checking for alloca" >&5
46711df8
MK
5912if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5913 echo $ac_n "(cached) $ac_c" 1>&6
5914else
5915 cat > conftest.$ac_ext <<EOF
4f0be353 5916#line 5917 "configure"
46711df8
MK
5917#include "confdefs.h"
5918
5919#ifdef __GNUC__
5920# define alloca __builtin_alloca
5921#else
5922# ifdef _MSC_VER
5923# include <malloc.h>
5924# define alloca _alloca
5925# else
5926# if HAVE_ALLOCA_H
5927# include <alloca.h>
5928# else
5929# ifdef _AIX
5930 #pragma alloca
5931# else
5932# ifndef alloca /* predefined by HP cc +Olibcalls */
5933char *alloca ();
5934# endif
5935# endif
5936# endif
5937# endif
5938#endif
5939
5940int main() {
5941char *p = (char *) alloca(1);
5942; return 0; }
5943EOF
4f0be353 5944if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5945 rm -rf conftest*
5946 ac_cv_func_alloca_works=yes
5947else
5948 echo "configure: failed program was:" >&5
5949 cat conftest.$ac_ext >&5
5950 rm -rf conftest*
5951 ac_cv_func_alloca_works=no
5952fi
5953rm -f conftest*
5954fi
5955
5956echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5957if test $ac_cv_func_alloca_works = yes; then
5958 cat >> confdefs.h <<\EOF
5959#define HAVE_ALLOCA 1
5960EOF
5961
5962fi
5963
5964if test $ac_cv_func_alloca_works = no; then
5965 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5966 # that cause trouble. Some versions do not even contain alloca or
5967 # contain a buggy version. If you still want to use their alloca,
5968 # use ar to extract alloca.o from them instead of compiling alloca.c.
5969 ALLOCA=alloca.${ac_objext}
5970 cat >> confdefs.h <<\EOF
5971#define C_ALLOCA 1
5972EOF
5973
5974
5975echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4f0be353 5976echo "configure:5977: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5977if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5978 echo $ac_n "(cached) $ac_c" 1>&6
5979else
5980 cat > conftest.$ac_ext <<EOF
4f0be353 5981#line 5982 "configure"
46711df8
MK
5982#include "confdefs.h"
5983#if defined(CRAY) && ! defined(CRAY2)
5984webecray
5985#else
5986wenotbecray
5987#endif
5988
5989EOF
5990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5991 egrep "webecray" >/dev/null 2>&1; then
5992 rm -rf conftest*
5993 ac_cv_os_cray=yes
5994else
5995 rm -rf conftest*
5996 ac_cv_os_cray=no
5997fi
5998rm -f conftest*
5999
6000fi
6001
6002echo "$ac_t""$ac_cv_os_cray" 1>&6
6003if test $ac_cv_os_cray = yes; then
6004for ac_func in _getb67 GETB67 getb67; do
6005 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6006echo "configure:6007: checking for $ac_func" >&5
46711df8
MK
6007if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6008 echo $ac_n "(cached) $ac_c" 1>&6
6009else
6010 cat > conftest.$ac_ext <<EOF
4f0be353 6011#line 6012 "configure"
46711df8
MK
6012#include "confdefs.h"
6013/* System header to define __stub macros and hopefully few prototypes,
6014 which can conflict with char $ac_func(); below. */
6015#include <assert.h>
6016/* Override any gcc2 internal prototype to avoid an error. */
6017/* We use char because int might match the return type of a gcc2
6018 builtin and then its argument prototype would still apply. */
6019char $ac_func();
6020
6021int main() {
6022
6023/* The GNU C library defines this for functions which it implements
6024 to always fail with ENOSYS. Some functions are actually named
6025 something starting with __ and the normal name is an alias. */
6026#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6027choke me
6028#else
6029$ac_func();
6030#endif
6031
6032; return 0; }
6033EOF
4f0be353 6034if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6035 rm -rf conftest*
6036 eval "ac_cv_func_$ac_func=yes"
6037else
6038 echo "configure: failed program was:" >&5
6039 cat conftest.$ac_ext >&5
6040 rm -rf conftest*
6041 eval "ac_cv_func_$ac_func=no"
6042fi
6043rm -f conftest*
6044fi
6045
6046if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6047 echo "$ac_t""yes" 1>&6
6048 cat >> confdefs.h <<EOF
6049#define CRAY_STACKSEG_END $ac_func
6050EOF
6051
6052 break
6053else
6054 echo "$ac_t""no" 1>&6
6055fi
6056
6057done
6058fi
6059
6060echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4f0be353 6061echo "configure:6062: checking stack direction for C alloca" >&5
46711df8
MK
6062if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6063 echo $ac_n "(cached) $ac_c" 1>&6
6064else
6065 if test "$cross_compiling" = yes; then
6066 ac_cv_c_stack_direction=0
6067else
6068 cat > conftest.$ac_ext <<EOF
4f0be353 6069#line 6070 "configure"
46711df8
MK
6070#include "confdefs.h"
6071find_stack_direction ()
6072{
6073 static char *addr = 0;
6074 auto char dummy;
6075 if (addr == 0)
6076 {
6077 addr = &dummy;
6078 return find_stack_direction ();
6079 }
6080 else
6081 return (&dummy > addr) ? 1 : -1;
6082}
6083main ()
6084{
6085 exit (find_stack_direction() < 0);
6086}
6087EOF
4f0be353 6088if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6089then
6090 ac_cv_c_stack_direction=1
6091else
6092 echo "configure: failed program was:" >&5
6093 cat conftest.$ac_ext >&5
6094 rm -fr conftest*
6095 ac_cv_c_stack_direction=-1
6096fi
6097rm -fr conftest*
6098fi
6099
6100fi
6101
6102echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6103cat >> confdefs.h <<EOF
6104#define STACK_DIRECTION $ac_cv_c_stack_direction
6105EOF
6106
6107fi
6108
d836ee13 6109for ac_hdr in unistd.h
97bf5e38
MK
6110do
6111ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6112echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4f0be353 6113echo "configure:6114: checking for $ac_hdr" >&5
74c1b268
AC
6114if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6115 echo $ac_n "(cached) $ac_c" 1>&6
6116else
6117 cat > conftest.$ac_ext <<EOF
4f0be353 6118#line 6119 "configure"
74c1b268 6119#include "confdefs.h"
97bf5e38 6120#include <$ac_hdr>
74c1b268
AC
6121EOF
6122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 6123{ (eval echo configure:6124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6125if test -z "$ac_err"; then
6126 rm -rf conftest*
6127 eval "ac_cv_header_$ac_safe=yes"
6128else
6129 echo "$ac_err" >&5
6130 echo "configure: failed program was:" >&5
6131 cat conftest.$ac_ext >&5
6132 rm -rf conftest*
6133 eval "ac_cv_header_$ac_safe=no"
6134fi
6135rm -f conftest*
6136fi
6137if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6138 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6139 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6140 cat >> confdefs.h <<EOF
6141#define $ac_tr_hdr 1
74c1b268 6142EOF
97bf5e38 6143
74c1b268
AC
6144else
6145 echo "$ac_t""no" 1>&6
6146fi
97bf5e38 6147done
74c1b268 6148
97bf5e38
MK
6149for ac_func in getpagesize
6150do
6151echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6152echo "configure:6153: checking for $ac_func" >&5
97bf5e38 6153if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6154 echo $ac_n "(cached) $ac_c" 1>&6
6155else
6156 cat > conftest.$ac_ext <<EOF
4f0be353 6157#line 6158 "configure"
74c1b268
AC
6158#include "confdefs.h"
6159/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6160 which can conflict with char $ac_func(); below. */
74c1b268
AC
6161#include <assert.h>
6162/* Override any gcc2 internal prototype to avoid an error. */
6163/* We use char because int might match the return type of a gcc2
6164 builtin and then its argument prototype would still apply. */
97bf5e38 6165char $ac_func();
74c1b268
AC
6166
6167int main() {
6168
6169/* The GNU C library defines this for functions which it implements
6170 to always fail with ENOSYS. Some functions are actually named
6171 something starting with __ and the normal name is an alias. */
97bf5e38 6172#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6173choke me
6174#else
97bf5e38 6175$ac_func();
74c1b268
AC
6176#endif
6177
6178; return 0; }
6179EOF
4f0be353 6180if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6181 rm -rf conftest*
97bf5e38 6182 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6183else
6184 echo "configure: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6186 rm -rf conftest*
97bf5e38 6187 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6188fi
6189rm -f conftest*
6190fi
6191
97bf5e38 6192if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6193 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6194 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6195 cat >> confdefs.h <<EOF
6196#define $ac_tr_func 1
6197EOF
6198
74c1b268
AC
6199else
6200 echo "$ac_t""no" 1>&6
6201fi
97bf5e38 6202done
74c1b268 6203
97bf5e38 6204echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4f0be353 6205echo "configure:6206: checking for working mmap" >&5
97bf5e38
MK
6206if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6207 echo $ac_n "(cached) $ac_c" 1>&6
6208else
6209 if test "$cross_compiling" = yes; then
6210 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6211else
6212 cat > conftest.$ac_ext <<EOF
4f0be353 6213#line 6214 "configure"
74c1b268 6214#include "confdefs.h"
97bf5e38
MK
6215
6216/* Thanks to Mike Haertel and Jim Avera for this test.
6217 Here is a matrix of mmap possibilities:
6218 mmap private not fixed
6219 mmap private fixed at somewhere currently unmapped
6220 mmap private fixed at somewhere already mapped
6221 mmap shared not fixed
6222 mmap shared fixed at somewhere currently unmapped
6223 mmap shared fixed at somewhere already mapped
6224 For private mappings, we should verify that changes cannot be read()
6225 back from the file, nor mmap's back from the file at a different
6226 address. (There have been systems where private was not correctly
6227 implemented like the infamous i386 svr4.0, and systems where the
6228 VM page cache was not coherent with the filesystem buffer cache
6229 like early versions of FreeBSD and possibly contemporary NetBSD.)
6230 For shared mappings, we should conversely verify that changes get
6231 propogated back to all the places they're supposed to be.
6232
6233 Grep wants private fixed already mapped.
6234 The main things grep needs to know about mmap are:
6235 * does it exist and is it safe to write into the mmap'd area
6236 * how to use it (BSD variants) */
74c1b268 6237#include <sys/types.h>
97bf5e38
MK
6238#include <fcntl.h>
6239#include <sys/mman.h>
6240
6241/* This mess was copied from the GNU getpagesize.h. */
6242#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6243# ifdef HAVE_UNISTD_H
6244# include <unistd.h>
6245# endif
97bf5e38
MK
6246
6247/* Assume that all systems that can run configure have sys/param.h. */
6248# ifndef HAVE_SYS_PARAM_H
6249# define HAVE_SYS_PARAM_H 1
6250# endif
6251
6252# ifdef _SC_PAGESIZE
6253# define getpagesize() sysconf(_SC_PAGESIZE)
6254# else /* no _SC_PAGESIZE */
6255# ifdef HAVE_SYS_PARAM_H
6256# include <sys/param.h>
6257# ifdef EXEC_PAGESIZE
6258# define getpagesize() EXEC_PAGESIZE
6259# else /* no EXEC_PAGESIZE */
6260# ifdef NBPG
6261# define getpagesize() NBPG * CLSIZE
6262# ifndef CLSIZE
6263# define CLSIZE 1
6264# endif /* no CLSIZE */
6265# else /* no NBPG */
6266# ifdef NBPC
6267# define getpagesize() NBPC
6268# else /* no NBPC */
6269# ifdef PAGESIZE
6270# define getpagesize() PAGESIZE
6271# endif /* PAGESIZE */
6272# endif /* no NBPC */
6273# endif /* no NBPG */
6274# endif /* no EXEC_PAGESIZE */
6275# else /* no HAVE_SYS_PARAM_H */
6276# define getpagesize() 8192 /* punt totally */
6277# endif /* no HAVE_SYS_PARAM_H */
6278# endif /* no _SC_PAGESIZE */
6279
6280#endif /* no HAVE_GETPAGESIZE */
6281
74c1b268 6282#ifdef __cplusplus
97bf5e38 6283extern "C" { void *malloc(unsigned); }
74c1b268 6284#else
97bf5e38 6285char *malloc();
74c1b268 6286#endif
74c1b268 6287
97bf5e38
MK
6288int
6289main()
6290{
6291 char *data, *data2, *data3;
6292 int i, pagesize;
6293 int fd;
74c1b268 6294
97bf5e38 6295 pagesize = getpagesize();
74c1b268 6296
97bf5e38
MK
6297 /*
6298 * First, make a file with some known garbage in it.
6299 */
6300 data = malloc(pagesize);
6301 if (!data)
6302 exit(1);
6303 for (i = 0; i < pagesize; ++i)
6304 *(data + i) = rand();
6305 umask(0);
6306 fd = creat("conftestmmap", 0600);
6307 if (fd < 0)
6308 exit(1);
6309 if (write(fd, data, pagesize) != pagesize)
6310 exit(1);
6311 close(fd);
74c1b268 6312
97bf5e38
MK
6313 /*
6314 * Next, try to mmap the file at a fixed address which
6315 * already has something else allocated at it. If we can,
6316 * also make sure that we see the same garbage.
6317 */
6318 fd = open("conftestmmap", O_RDWR);
6319 if (fd < 0)
6320 exit(1);
6321 data2 = malloc(2 * pagesize);
6322 if (!data2)
6323 exit(1);
6324 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6325 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6326 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6327 exit(1);
6328 for (i = 0; i < pagesize; ++i)
6329 if (*(data + i) != *(data2 + i))
6330 exit(1);
74c1b268 6331
97bf5e38
MK
6332 /*
6333 * Finally, make sure that changes to the mapped area
6334 * do not percolate back to the file as seen by read().
6335 * (This is a bug on some variants of i386 svr4.0.)
6336 */
6337 for (i = 0; i < pagesize; ++i)
6338 *(data2 + i) = *(data2 + i) + 1;
6339 data3 = malloc(pagesize);
6340 if (!data3)
6341 exit(1);
6342 if (read(fd, data3, pagesize) != pagesize)
6343 exit(1);
6344 for (i = 0; i < pagesize; ++i)
6345 if (*(data + i) != *(data3 + i))
6346 exit(1);
6347 close(fd);
6348 unlink("conftestmmap");
6349 exit(0);
74c1b268 6350}
97bf5e38 6351
74c1b268 6352EOF
4f0be353 6353if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6354then
97bf5e38 6355 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6356else
6357 echo "configure: failed program was:" >&5
6358 cat conftest.$ac_ext >&5
6359 rm -fr conftest*
97bf5e38 6360 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6361fi
6362rm -fr conftest*
6363fi
6364
6365fi
6366
97bf5e38
MK
6367echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6368if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6369 cat >> confdefs.h <<\EOF
97bf5e38 6370#define HAVE_MMAP 1
74c1b268
AC
6371EOF
6372
6373fi
6374
97bf5e38 6375echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4f0be353 6376echo "configure:6377: checking for pid_t" >&5
97bf5e38 6377if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6378 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6379else
6380 cat > conftest.$ac_ext <<EOF
4f0be353 6381#line 6382 "configure"
0200359f 6382#include "confdefs.h"
97bf5e38
MK
6383#include <sys/types.h>
6384#if STDC_HEADERS
6385#include <stdlib.h>
6386#include <stddef.h>
0200359f 6387#endif
0200359f 6388EOF
97bf5e38
MK
6389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6390 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6391 rm -rf conftest*
6392 ac_cv_type_pid_t=yes
0200359f 6393else
97bf5e38
MK
6394 rm -rf conftest*
6395 ac_cv_type_pid_t=no
0200359f 6396fi
97bf5e38 6397rm -f conftest*
0200359f
MK
6398
6399fi
97bf5e38
MK
6400echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6401if test $ac_cv_type_pid_t = no; then
0200359f 6402 cat >> confdefs.h <<\EOF
97bf5e38 6403#define pid_t int
0200359f
MK
6404EOF
6405
6406fi
6407
97bf5e38
MK
6408ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6409echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4f0be353 6410echo "configure:6411: checking for vfork.h" >&5
97bf5e38 6411if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6412 echo $ac_n "(cached) $ac_c" 1>&6
6413else
6414 cat > conftest.$ac_ext <<EOF
4f0be353 6415#line 6416 "configure"
72473524 6416#include "confdefs.h"
97bf5e38 6417#include <vfork.h>
72473524 6418EOF
97bf5e38 6419ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 6420{ (eval echo configure:6421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6421ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6422if test -z "$ac_err"; then
72473524 6423 rm -rf conftest*
97bf5e38 6424 eval "ac_cv_header_$ac_safe=yes"
72473524 6425else
97bf5e38 6426 echo "$ac_err" >&5
72473524
DJ
6427 echo "configure: failed program was:" >&5
6428 cat conftest.$ac_ext >&5
6429 rm -rf conftest*
97bf5e38 6430 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6431fi
6432rm -f conftest*
6433fi
97bf5e38
MK
6434if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6435 echo "$ac_t""yes" 1>&6
72473524 6436 cat >> confdefs.h <<\EOF
97bf5e38 6437#define HAVE_VFORK_H 1
72473524
DJ
6438EOF
6439
97bf5e38
MK
6440else
6441 echo "$ac_t""no" 1>&6
72473524 6442fi
c906108c 6443
97bf5e38 6444echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4f0be353 6445echo "configure:6446: checking for working vfork" >&5
97bf5e38
MK
6446if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6447 echo $ac_n "(cached) $ac_c" 1>&6
6448else
6449 if test "$cross_compiling" = yes; then
6450 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4f0be353 6451echo "configure:6452: checking for vfork" >&5
97bf5e38 6452if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6453 echo $ac_n "(cached) $ac_c" 1>&6
6454else
6455 cat > conftest.$ac_ext <<EOF
4f0be353 6456#line 6457 "configure"
2b2d558c 6457#include "confdefs.h"
97bf5e38
MK
6458/* System header to define __stub macros and hopefully few prototypes,
6459 which can conflict with char vfork(); below. */
6460#include <assert.h>
6461/* Override any gcc2 internal prototype to avoid an error. */
6462/* We use char because int might match the return type of a gcc2
6463 builtin and then its argument prototype would still apply. */
6464char vfork();
2b2d558c
MK
6465
6466int main() {
97bf5e38
MK
6467
6468/* The GNU C library defines this for functions which it implements
6469 to always fail with ENOSYS. Some functions are actually named
6470 something starting with __ and the normal name is an alias. */
6471#if defined (__stub_vfork) || defined (__stub___vfork)
6472choke me
6473#else
6474vfork();
6475#endif
6476
2b2d558c
MK
6477; return 0; }
6478EOF
4f0be353 6479if { (eval echo configure:6480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6480 rm -rf conftest*
97bf5e38 6481 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6482else
6483 echo "configure: failed program was:" >&5
6484 cat conftest.$ac_ext >&5
6485 rm -rf conftest*
97bf5e38 6486 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6487fi
6488rm -f conftest*
6489fi
6490
97bf5e38
MK
6491if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6492 echo "$ac_t""yes" 1>&6
6493 :
6494else
6495 echo "$ac_t""no" 1>&6
2b2d558c
MK
6496fi
6497
97bf5e38 6498ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6499else
6500 cat > conftest.$ac_ext <<EOF
4f0be353 6501#line 6502 "configure"
7dfa765c 6502#include "confdefs.h"
97bf5e38
MK
6503/* Thanks to Paul Eggert for this test. */
6504#include <stdio.h>
6505#include <sys/types.h>
6506#include <sys/stat.h>
6507#ifdef HAVE_UNISTD_H
6508#include <unistd.h>
6509#endif
6510#ifdef HAVE_VFORK_H
6511#include <vfork.h>
6512#endif
6513/* On some sparc systems, changes by the child to local and incoming
6514 argument registers are propagated back to the parent.
6515 The compiler is told about this with #include <vfork.h>,
6516 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6517 Test for this by using a static variable whose address
6518 is put into a register that is clobbered by the vfork. */
6519static
6520#ifdef __cplusplus
6521sparc_address_test (int arg)
6522#else
6523sparc_address_test (arg) int arg;
6524#endif
6525{
6526 static pid_t child;
6527 if (!child) {
6528 child = vfork ();
6529 if (child < 0) {
6530 perror ("vfork");
6531 _exit(2);
6532 }
6533 if (!child) {
6534 arg = getpid();
6535 write(-1, "", 0);
6536 _exit (arg);
6537 }
6538 }
6539}
6540main() {
6541 pid_t parent = getpid ();
6542 pid_t child;
7dfa765c 6543
97bf5e38 6544 sparc_address_test ();
7dfa765c 6545
97bf5e38 6546 child = vfork ();
7dfa765c 6547
97bf5e38
MK
6548 if (child == 0) {
6549 /* Here is another test for sparc vfork register problems.
6550 This test uses lots of local variables, at least
6551 as many local variables as main has allocated so far
6552 including compiler temporaries. 4 locals are enough for
6553 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6554 A buggy compiler should reuse the register of parent
6555 for one of the local variables, since it will think that
6556 parent can't possibly be used any more in this routine.
6557 Assigning to the local variable will thus munge parent
6558 in the parent process. */
6559 pid_t
6560 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6561 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6562 /* Convince the compiler that p..p7 are live; otherwise, it might
6563 use the same hardware register for all 8 local variables. */
6564 if (p != p1 || p != p2 || p != p3 || p != p4
6565 || p != p5 || p != p6 || p != p7)
6566 _exit(1);
7dfa765c 6567
97bf5e38
MK
6568 /* On some systems (e.g. IRIX 3.3),
6569 vfork doesn't separate parent from child file descriptors.
6570 If the child closes a descriptor before it execs or exits,
6571 this munges the parent's descriptor as well.
6572 Test for this by closing stdout in the child. */
6573 _exit(close(fileno(stdout)) != 0);
6574 } else {
6575 int status;
6576 struct stat st;
64bb1671 6577
97bf5e38
MK
6578 while (wait(&status) != child)
6579 ;
6580 exit(
6581 /* Was there some problem with vforking? */
6582 child < 0
64bb1671 6583
97bf5e38
MK
6584 /* Did the child fail? (This shouldn't happen.) */
6585 || status
64bb1671 6586
97bf5e38
MK
6587 /* Did the vfork/compiler bug occur? */
6588 || parent != getpid()
6589
6590 /* Did the file descriptor bug occur? */
6591 || fstat(fileno(stdout), &st) != 0
6592 );
6593 }
6594}
5c44784c 6595EOF
4f0be353 6596if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6597then
6598 ac_cv_func_vfork_works=yes
5c44784c
JM
6599else
6600 echo "configure: failed program was:" >&5
6601 cat conftest.$ac_ext >&5
97bf5e38
MK
6602 rm -fr conftest*
6603 ac_cv_func_vfork_works=no
5c44784c 6604fi
97bf5e38 6605rm -fr conftest*
5c44784c
JM
6606fi
6607
0afdd437
MK
6608fi
6609
97bf5e38
MK
6610echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6611if test $ac_cv_func_vfork_works = no; then
0afdd437 6612 cat >> confdefs.h <<\EOF
97bf5e38 6613#define vfork fork
0afdd437
MK
6614EOF
6615
6616fi
6617
97bf5e38
MK
6618for ac_func in canonicalize_file_name realpath
6619do
6620echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6621echo "configure:6622: checking for $ac_func" >&5
97bf5e38 6622if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6623 echo $ac_n "(cached) $ac_c" 1>&6
6624else
6625 cat > conftest.$ac_ext <<EOF
4f0be353 6626#line 6627 "configure"
7e89e357 6627#include "confdefs.h"
97bf5e38
MK
6628/* System header to define __stub macros and hopefully few prototypes,
6629 which can conflict with char $ac_func(); below. */
6630#include <assert.h>
6631/* Override any gcc2 internal prototype to avoid an error. */
6632/* We use char because int might match the return type of a gcc2
6633 builtin and then its argument prototype would still apply. */
6634char $ac_func();
6635
7e89e357 6636int main() {
97bf5e38
MK
6637
6638/* The GNU C library defines this for functions which it implements
6639 to always fail with ENOSYS. Some functions are actually named
6640 something starting with __ and the normal name is an alias. */
6641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6642choke me
6643#else
6644$ac_func();
6645#endif
6646
7e89e357
JT
6647; return 0; }
6648EOF
4f0be353 6649if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6650 rm -rf conftest*
97bf5e38 6651 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6652else
6653 echo "configure: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 rm -rf conftest*
97bf5e38 6656 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6657fi
6658rm -f conftest*
6659fi
6660
97bf5e38
MK
6661if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6662 echo "$ac_t""yes" 1>&6
6663 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6664 cat >> confdefs.h <<EOF
6665#define $ac_tr_func 1
7e89e357 6666EOF
97bf5e38
MK
6667
6668else
6669 echo "$ac_t""no" 1>&6
7e89e357 6670fi
97bf5e38 6671done
7e89e357 6672
97bf5e38 6673for ac_func in poll
7be570e7
JM
6674do
6675echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6676echo "configure:6677: checking for $ac_func" >&5
7be570e7
JM
6677if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6678 echo $ac_n "(cached) $ac_c" 1>&6
6679else
6680 cat > conftest.$ac_ext <<EOF
4f0be353 6681#line 6682 "configure"
7be570e7
JM
6682#include "confdefs.h"
6683/* System header to define __stub macros and hopefully few prototypes,
6684 which can conflict with char $ac_func(); below. */
6685#include <assert.h>
6686/* Override any gcc2 internal prototype to avoid an error. */
6687/* We use char because int might match the return type of a gcc2
6688 builtin and then its argument prototype would still apply. */
6689char $ac_func();
6690
6691int main() {
6692
6693/* The GNU C library defines this for functions which it implements
6694 to always fail with ENOSYS. Some functions are actually named
6695 something starting with __ and the normal name is an alias. */
6696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6697choke me
6698#else
6699$ac_func();
6700#endif
6701
6702; return 0; }
6703EOF
4f0be353 6704if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6705 rm -rf conftest*
6706 eval "ac_cv_func_$ac_func=yes"
6707else
6708 echo "configure: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6710 rm -rf conftest*
6711 eval "ac_cv_func_$ac_func=no"
6712fi
6713rm -f conftest*
6714fi
6715
6716if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6717 echo "$ac_t""yes" 1>&6
6718 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6719 cat >> confdefs.h <<EOF
6720#define $ac_tr_func 1
6721EOF
6722
6723else
6724 echo "$ac_t""no" 1>&6
6725fi
6726done
6727
6728for ac_func in pread64
6729do
6730echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6731echo "configure:6732: checking for $ac_func" >&5
14abd0fb
MK
6732if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6733 echo $ac_n "(cached) $ac_c" 1>&6
6734else
6735 cat > conftest.$ac_ext <<EOF
4f0be353 6736#line 6737 "configure"
14abd0fb
MK
6737#include "confdefs.h"
6738/* System header to define __stub macros and hopefully few prototypes,
6739 which can conflict with char $ac_func(); below. */
6740#include <assert.h>
6741/* Override any gcc2 internal prototype to avoid an error. */
6742/* We use char because int might match the return type of a gcc2
6743 builtin and then its argument prototype would still apply. */
6744char $ac_func();
6745
6746int main() {
6747
6748/* The GNU C library defines this for functions which it implements
6749 to always fail with ENOSYS. Some functions are actually named
6750 something starting with __ and the normal name is an alias. */
6751#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6752choke me
6753#else
6754$ac_func();
6755#endif
6756
6757; return 0; }
6758EOF
4f0be353 6759if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6760 rm -rf conftest*
6761 eval "ac_cv_func_$ac_func=yes"
6762else
6763 echo "configure: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 rm -rf conftest*
6766 eval "ac_cv_func_$ac_func=no"
6767fi
6768rm -f conftest*
6769fi
6770
6771if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6772 echo "$ac_t""yes" 1>&6
6773 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6774 cat >> confdefs.h <<EOF
6775#define $ac_tr_func 1
6776EOF
6777
6778else
6779 echo "$ac_t""no" 1>&6
6780fi
6781done
6782
97bf5e38
MK
6783for ac_func in sbrk
6784do
6785echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6786echo "configure:6787: checking for $ac_func" >&5
97bf5e38 6787if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6788 echo $ac_n "(cached) $ac_c" 1>&6
6789else
6790 cat > conftest.$ac_ext <<EOF
4f0be353 6791#line 6792 "configure"
c906108c 6792#include "confdefs.h"
97bf5e38
MK
6793/* System header to define __stub macros and hopefully few prototypes,
6794 which can conflict with char $ac_func(); below. */
6795#include <assert.h>
6796/* Override any gcc2 internal prototype to avoid an error. */
6797/* We use char because int might match the return type of a gcc2
6798 builtin and then its argument prototype would still apply. */
6799char $ac_func();
c906108c 6800
97bf5e38
MK
6801int main() {
6802
6803/* The GNU C library defines this for functions which it implements
6804 to always fail with ENOSYS. Some functions are actually named
6805 something starting with __ and the normal name is an alias. */
6806#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6807choke me
c906108c 6808#else
97bf5e38 6809$ac_func();
c906108c 6810#endif
97bf5e38 6811
c906108c
SS
6812; return 0; }
6813EOF
4f0be353 6814if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6815 rm -rf conftest*
97bf5e38 6816 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6817else
6818 echo "configure: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6820 rm -rf conftest*
97bf5e38 6821 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6822fi
6823rm -f conftest*
6824fi
6825
97bf5e38
MK
6826if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6827 echo "$ac_t""yes" 1>&6
6828 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6829 cat >> confdefs.h <<EOF
6830#define $ac_tr_func 1
c906108c 6831EOF
97bf5e38
MK
6832
6833else
6834 echo "$ac_t""no" 1>&6
c906108c 6835fi
97bf5e38 6836done
c906108c 6837
97bf5e38
MK
6838for ac_func in setpgid setpgrp
6839do
6840echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6841echo "configure:6842: checking for $ac_func" >&5
97bf5e38 6842if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6843 echo $ac_n "(cached) $ac_c" 1>&6
6844else
6845 cat > conftest.$ac_ext <<EOF
4f0be353 6846#line 6847 "configure"
c906108c 6847#include "confdefs.h"
97bf5e38
MK
6848/* System header to define __stub macros and hopefully few prototypes,
6849 which can conflict with char $ac_func(); below. */
6850#include <assert.h>
6851/* Override any gcc2 internal prototype to avoid an error. */
6852/* We use char because int might match the return type of a gcc2
6853 builtin and then its argument prototype would still apply. */
6854char $ac_func();
c906108c 6855
97bf5e38
MK
6856int main() {
6857
6858/* The GNU C library defines this for functions which it implements
6859 to always fail with ENOSYS. Some functions are actually named
6860 something starting with __ and the normal name is an alias. */
6861#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862choke me
c906108c 6863#else
97bf5e38 6864$ac_func();
c906108c 6865#endif
97bf5e38 6866
c906108c
SS
6867; return 0; }
6868EOF
4f0be353 6869if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6870 rm -rf conftest*
97bf5e38 6871 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6872else
6873 echo "configure: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 rm -rf conftest*
97bf5e38 6876 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6877fi
6878rm -f conftest*
6879fi
6880
97bf5e38
MK
6881if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6882 echo "$ac_t""yes" 1>&6
6883 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6884 cat >> confdefs.h <<EOF
6885#define $ac_tr_func 1
c906108c 6886EOF
97bf5e38
MK
6887
6888else
6889 echo "$ac_t""no" 1>&6
c906108c 6890fi
97bf5e38 6891done
c906108c 6892
e1ea1d75 6893for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6894do
6895echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6896echo "configure:6897: checking for $ac_func" >&5
97bf5e38 6897if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6898 echo $ac_n "(cached) $ac_c" 1>&6
6899else
6900 cat > conftest.$ac_ext <<EOF
4f0be353 6901#line 6902 "configure"
c906108c 6902#include "confdefs.h"
97bf5e38
MK
6903/* System header to define __stub macros and hopefully few prototypes,
6904 which can conflict with char $ac_func(); below. */
6905#include <assert.h>
6906/* Override any gcc2 internal prototype to avoid an error. */
6907/* We use char because int might match the return type of a gcc2
6908 builtin and then its argument prototype would still apply. */
6909char $ac_func();
c906108c 6910
97bf5e38
MK
6911int main() {
6912
6913/* The GNU C library defines this for functions which it implements
6914 to always fail with ENOSYS. Some functions are actually named
6915 something starting with __ and the normal name is an alias. */
6916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6917choke me
c906108c 6918#else
97bf5e38 6919$ac_func();
c906108c 6920#endif
97bf5e38 6921
c906108c
SS
6922; return 0; }
6923EOF
4f0be353 6924if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6925 rm -rf conftest*
97bf5e38 6926 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6927else
6928 echo "configure: failed program was:" >&5
6929 cat conftest.$ac_ext >&5
6930 rm -rf conftest*
97bf5e38 6931 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6932fi
6933rm -f conftest*
6934fi
6935
97bf5e38
MK
6936if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6937 echo "$ac_t""yes" 1>&6
6938 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6939 cat >> confdefs.h <<EOF
6940#define $ac_tr_func 1
c906108c 6941EOF
e1ea1d75 6942
97bf5e38
MK
6943else
6944 echo "$ac_t""no" 1>&6
c906108c 6945fi
97bf5e38 6946done
c906108c 6947
97bf5e38
MK
6948for ac_func in socketpair
6949do
6950echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 6951echo "configure:6952: checking for $ac_func" >&5
97bf5e38 6952if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6953 echo $ac_n "(cached) $ac_c" 1>&6
6954else
6955 cat > conftest.$ac_ext <<EOF
4f0be353 6956#line 6957 "configure"
c906108c 6957#include "confdefs.h"
97bf5e38
MK
6958/* System header to define __stub macros and hopefully few prototypes,
6959 which can conflict with char $ac_func(); below. */
6960#include <assert.h>
6961/* Override any gcc2 internal prototype to avoid an error. */
6962/* We use char because int might match the return type of a gcc2
6963 builtin and then its argument prototype would still apply. */
6964char $ac_func();
c906108c 6965
97bf5e38
MK
6966int main() {
6967
6968/* The GNU C library defines this for functions which it implements
6969 to always fail with ENOSYS. Some functions are actually named
6970 something starting with __ and the normal name is an alias. */
6971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6972choke me
c906108c 6973#else
97bf5e38 6974$ac_func();
c906108c 6975#endif
97bf5e38 6976
c906108c
SS
6977; return 0; }
6978EOF
4f0be353 6979if { (eval echo configure:6980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6980 rm -rf conftest*
97bf5e38 6981 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6982else
6983 echo "configure: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 rm -rf conftest*
97bf5e38 6986 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6987fi
6988rm -f conftest*
6989fi
6990
97bf5e38
MK
6991if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6992 echo "$ac_t""yes" 1>&6
6993 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6994 cat >> confdefs.h <<EOF
6995#define $ac_tr_func 1
c906108c 6996EOF
97bf5e38
MK
6997
6998else
6999 echo "$ac_t""no" 1>&6
c906108c 7000fi
97bf5e38 7001done
c906108c 7002
b757528f
JJ
7003for ac_func in syscall
7004do
7005echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 7006echo "configure:7007: checking for $ac_func" >&5
b757528f
JJ
7007if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7008 echo $ac_n "(cached) $ac_c" 1>&6
7009else
7010 cat > conftest.$ac_ext <<EOF
4f0be353 7011#line 7012 "configure"
b757528f
JJ
7012#include "confdefs.h"
7013/* System header to define __stub macros and hopefully few prototypes,
7014 which can conflict with char $ac_func(); below. */
7015#include <assert.h>
7016/* Override any gcc2 internal prototype to avoid an error. */
7017/* We use char because int might match the return type of a gcc2
7018 builtin and then its argument prototype would still apply. */
7019char $ac_func();
7020
7021int main() {
7022
7023/* The GNU C library defines this for functions which it implements
7024 to always fail with ENOSYS. Some functions are actually named
7025 something starting with __ and the normal name is an alias. */
7026#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7027choke me
7028#else
7029$ac_func();
7030#endif
7031
7032; return 0; }
7033EOF
4f0be353 7034if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7035 rm -rf conftest*
7036 eval "ac_cv_func_$ac_func=yes"
7037else
7038 echo "configure: failed program was:" >&5
7039 cat conftest.$ac_ext >&5
7040 rm -rf conftest*
7041 eval "ac_cv_func_$ac_func=no"
7042fi
7043rm -f conftest*
7044fi
7045
7046if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7047 echo "$ac_t""yes" 1>&6
7048 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7049 cat >> confdefs.h <<EOF
7050#define $ac_tr_func 1
7051EOF
7052
7053else
7054 echo "$ac_t""no" 1>&6
7055fi
7056done
7057
bcb3dc3d
MK
7058for ac_func in ttrace
7059do
7060echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4f0be353 7061echo "configure:7062: checking for $ac_func" >&5
bcb3dc3d
MK
7062if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7063 echo $ac_n "(cached) $ac_c" 1>&6
7064else
7065 cat > conftest.$ac_ext <<EOF
4f0be353 7066#line 7067 "configure"
bcb3dc3d
MK
7067#include "confdefs.h"
7068/* System header to define __stub macros and hopefully few prototypes,
7069 which can conflict with char $ac_func(); below. */
7070#include <assert.h>
7071/* Override any gcc2 internal prototype to avoid an error. */
7072/* We use char because int might match the return type of a gcc2
7073 builtin and then its argument prototype would still apply. */
7074char $ac_func();
7075
7076int main() {
7077
7078/* The GNU C library defines this for functions which it implements
7079 to always fail with ENOSYS. Some functions are actually named
7080 something starting with __ and the normal name is an alias. */
7081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7082choke me
7083#else
7084$ac_func();
7085#endif
7086
7087; return 0; }
7088EOF
4f0be353 7089if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bcb3dc3d
MK
7090 rm -rf conftest*
7091 eval "ac_cv_func_$ac_func=yes"
7092else
7093 echo "configure: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7095 rm -rf conftest*
7096 eval "ac_cv_func_$ac_func=no"
7097fi
7098rm -f conftest*
7099fi
7100
7101if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7102 echo "$ac_t""yes" 1>&6
7103 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7104 cat >> confdefs.h <<EOF
7105#define $ac_tr_func 1
7106EOF
7107
7108else
7109 echo "$ac_t""no" 1>&6
7110fi
7111done
7112
97bf5e38 7113
086ec9eb
MK
7114# Check the return and argument types of ptrace. No canned test for
7115# this, so roll our own.
7116gdb_ptrace_headers='
7117#if HAVE_SYS_TYPES_H
7118# include <sys/types.h>
7119#endif
7120#if HAVE_SYS_PTRACE_H
7121# include <sys/ptrace.h>
7122#endif
7123#if HAVE_UNISTD_H
7124# include <unistd.h>
7125#endif
7126'
7127# There is no point in checking if we don't have a prototype.
7128for ac_func in ptrace
7129do
7130 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7131echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4f0be353 7132echo "configure:7133: checking whether $ac_func is declared" >&5
086ec9eb
MK
7133if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
7134 echo $ac_n "(cached) $ac_c" 1>&6
7135else
7136 cat > conftest.$ac_ext <<EOF
4f0be353 7137#line 7138 "configure"
086ec9eb
MK
7138#include "confdefs.h"
7139#undef $ac_tr_decl
7140#define $ac_tr_decl 1
7141 $gdb_ptrace_headers
7142
7143int main() {
7144#ifndef $ac_func
7145char *(*pfn) = (char *(*)) $ac_func ;
7146#endif
7147; return 0; }
7148EOF
4f0be353 7149if { (eval echo configure:7150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7150 rm -rf conftest*
7151 eval "gcc_cv_have_decl_$ac_func=yes"
7152else
7153 echo "configure: failed program was:" >&5
7154 cat conftest.$ac_ext >&5
7155 rm -rf conftest*
7156 eval "gcc_cv_have_decl_$ac_func=no"
7157fi
7158rm -f conftest*
7159fi
7160
7161if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
7162 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
7163#define $ac_tr_decl 1
7164EOF
7165
7166else
7167 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
7168#define $ac_tr_decl 0
7169EOF
7170
7171 : ${gdb_cv_func_ptrace_ret='int'}
7172 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7173
7174fi
7175
7176done
7177if test x = y ; then
7178 cat >> confdefs.h <<\EOF
7179#define HAVE_DECL_PTRACE 1
7180EOF
7181fi
7182
7183# Check return type.
7184echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
4f0be353 7185echo "configure:7186: checking return type of ptrace" >&5
086ec9eb
MK
7186if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
7187 echo $ac_n "(cached) $ac_c" 1>&6
7188else
7189 cat > conftest.$ac_ext <<EOF
4f0be353 7190#line 7191 "configure"
086ec9eb
MK
7191#include "confdefs.h"
7192$gdb_ptrace_headers
7193int main() {
5885ab49 7194extern int ptrace ();
086ec9eb
MK
7195; return 0; }
7196EOF
4f0be353 7197if { (eval echo configure:7198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb 7198 rm -rf conftest*
5885ab49 7199 gdb_cv_func_ptrace_ret='int'
086ec9eb
MK
7200else
7201 echo "configure: failed program was:" >&5
7202 cat conftest.$ac_ext >&5
7203 rm -rf conftest*
5885ab49 7204 gdb_cv_func_ptrace_ret='long'
086ec9eb
MK
7205fi
7206rm -f conftest*
7207fi
7208
7209echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
7210cat >> confdefs.h <<EOF
7211#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7212EOF
7213
7214# Check argument types.
7215echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
4f0be353 7216echo "configure:7217: checking types of arguments for ptrace" >&5
086ec9eb
MK
7217if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
7218 echo $ac_n "(cached) $ac_c" 1>&6
7219else
7220
7221for gdb_arg1 in 'int' 'long'; do
7222 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7223 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
7224 for gdb_arg4 in 'int' 'long'; do
7225 cat > conftest.$ac_ext <<EOF
4f0be353 7226#line 7227 "configure"
086ec9eb
MK
7227#include "confdefs.h"
7228$gdb_ptrace_headers
7229int main() {
7230
7231extern $gdb_cv_func_ptrace_ret
7232 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7233
7234; return 0; }
7235EOF
4f0be353 7236if { (eval echo configure:7237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7237 rm -rf conftest*
7238 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7239 break 4;
7240else
7241 echo "configure: failed program was:" >&5
7242 cat conftest.$ac_ext >&5
7243fi
7244rm -f conftest*
7245 for gdb_arg5 in 'int *' 'int' 'long'; do
7246 cat > conftest.$ac_ext <<EOF
4f0be353 7247#line 7248 "configure"
086ec9eb
MK
7248#include "confdefs.h"
7249$gdb_ptrace_headers
7250int main() {
7251
7252extern $gdb_cv_func_ptrace_ret
7253 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7254
7255; return 0; }
7256EOF
4f0be353 7257if { (eval echo configure:7258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
086ec9eb
MK
7258 rm -rf conftest*
7259
7260gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7261 break 5;
7262else
7263 echo "configure: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265fi
7266rm -f conftest*
7267 done
7268 done
7269 done
7270 done
7271done
7272# Provide a safe default value.
7273: ${gdb_cv_func_ptrace_args='int,int,long,long'}
7274
7275fi
7276
7277echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6
7278ac_save_IFS=$IFS; IFS=','
7279set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7280IFS=$ac_save_IFS
7281shift
7282cat >> confdefs.h <<EOF
64218d3e 7283#define PTRACE_TYPE_ARG3 $3
086ec9eb
MK
7284EOF
7285
7286if test -n "$5"; then
7287 cat >> confdefs.h <<EOF
64218d3e 7288#define PTRACE_TYPE_ARG5 $5
086ec9eb
MK
7289EOF
7290
7291fi
7292
97bf5e38
MK
7293if test "$cross_compiling" = no; then
7294 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4f0be353 7295echo "configure:7296: checking whether setpgrp takes no argument" >&5
97bf5e38 7296if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7297 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7298else
7299 if test "$cross_compiling" = yes; then
7300 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7301else
7302 cat > conftest.$ac_ext <<EOF
4f0be353 7303#line 7304 "configure"
c906108c
SS
7304#include "confdefs.h"
7305
c906108c
SS
7306#ifdef HAVE_UNISTD_H
7307#include <unistd.h>
7308#endif
97bf5e38
MK
7309
7310/*
7311 * If this system has a BSD-style setpgrp, which takes arguments, exit
7312 * successfully.
7313 */
7314main()
7315{
7316 if (setpgrp(1,1) == -1)
7317 exit(0);
7318 else
7319 exit(1);
7320}
7321
c906108c 7322EOF
4f0be353 7323if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7324then
7325 ac_cv_func_setpgrp_void=no
c906108c
SS
7326else
7327 echo "configure: failed program was:" >&5
7328 cat conftest.$ac_ext >&5
97bf5e38
MK
7329 rm -fr conftest*
7330 ac_cv_func_setpgrp_void=yes
c906108c 7331fi
97bf5e38 7332rm -fr conftest*
c906108c
SS
7333fi
7334
97bf5e38
MK
7335
7336fi
7337
7338echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7339if test $ac_cv_func_setpgrp_void = yes; then
7340 cat >> confdefs.h <<\EOF
7341#define SETPGRP_VOID 1
c906108c
SS
7342EOF
7343
7344fi
7345
97bf5e38
MK
7346else
7347 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4f0be353 7348echo "configure:7349: checking whether setpgrp takes no argument" >&5
97bf5e38 7349if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7350 echo $ac_n "(cached) $ac_c" 1>&6
7351else
7352 cat > conftest.$ac_ext <<EOF
4f0be353 7353#line 7354 "configure"
b83266a0
SS
7354#include "confdefs.h"
7355
b83266a0 7356#include <unistd.h>
97bf5e38 7357
b83266a0 7358int main() {
97bf5e38
MK
7359
7360 if (setpgrp(1,1) == -1)
7361 exit (0);
7362 else
7363 exit (1);
7364
b83266a0
SS
7365; return 0; }
7366EOF
4f0be353 7367if { (eval echo configure:7368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7368 rm -rf conftest*
97bf5e38 7369 ac_cv_func_setpgrp_void=no
b83266a0
SS
7370else
7371 echo "configure: failed program was:" >&5
7372 cat conftest.$ac_ext >&5
7373 rm -rf conftest*
97bf5e38 7374 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7375fi
7376rm -f conftest*
7377fi
7378
97bf5e38
MK
7379echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7380if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7381 cat >> confdefs.h <<\EOF
97bf5e38 7382#define SETPGRP_VOID 1
b83266a0
SS
7383EOF
7384
97bf5e38 7385fi
b83266a0
SS
7386fi
7387
97bf5e38
MK
7388# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7389# since sigsetjmp might only be defined as a macro.
7390echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
4f0be353 7391echo "configure:7392: checking for sigsetjmp" >&5
97bf5e38 7392if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7393 echo $ac_n "(cached) $ac_c" 1>&6
7394else
7395 cat > conftest.$ac_ext <<EOF
4f0be353 7396#line 7397 "configure"
a4db0f07
RH
7397#include "confdefs.h"
7398
97bf5e38
MK
7399#include <setjmp.h>
7400
a4db0f07 7401int main() {
97bf5e38 7402sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7403; return 0; }
7404EOF
4f0be353 7405if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7406 rm -rf conftest*
97bf5e38 7407 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7408else
7409 echo "configure: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
7411 rm -rf conftest*
97bf5e38 7412 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7413fi
7414rm -f conftest*
7415fi
7416
97bf5e38
MK
7417echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7418if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7419 cat >> confdefs.h <<\EOF
97bf5e38 7420#define HAVE_SIGSETJMP 1
a4db0f07
RH
7421EOF
7422
7423fi
c906108c 7424
06825bd1
MK
7425# Assume we'll default to using the included libiberty regex.
7426gdb_use_included_regex=yes
7427
7428# However, if the system regex is GNU regex, then default to *not*
7429# using the included regex.
7430echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
4f0be353 7431echo "configure:7432: checking for GNU regex" >&5
06825bd1
MK
7432if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7433 echo $ac_n "(cached) $ac_c" 1>&6
7434else
7435 cat > conftest.$ac_ext <<EOF
4f0be353 7436#line 7437 "configure"
06825bd1
MK
7437#include "confdefs.h"
7438#include <gnu-versions.h>
7439int main() {
7440#define REGEX_INTERFACE_VERSION 1
7441#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7442# error "Version mismatch"
7443#endif
7444; return 0; }
7445EOF
4f0be353 7446if { (eval echo configure:7447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7447 rm -rf conftest*
7448 gdb_cv_have_gnu_regex=yes
7449else
7450 echo "configure: failed program was:" >&5
7451 cat conftest.$ac_ext >&5
7452 rm -rf conftest*
7453 gdb_cv_have_gnu_regex=no
7454fi
7455rm -f conftest*
7456fi
7457
7458echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7459if test $gdb_cv_have_gnu_regex = yes; then
7460 gdb_use_included_regex=no
7461fi
7462
7463# Check whether --with-included-regex or --without-included-regex was given.
7464if test "${with_included_regex+set}" = set; then
7465 withval="$with_included_regex"
7466 gdb_with_regex=$withval
7467else
7468 gdb_with_regex=$gdb_use_included_regex
7469fi
7470
7471if test "$gdb_with_regex" = yes; then
7472 cat >> confdefs.h <<\EOF
7473#define USE_INCLUDED_REGEX 1
7474EOF
7475
7476fi
7477
70f9f479
MK
7478# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7479echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
4f0be353 7480echo "configure:7481: checking for td_pcb in struct thread" >&5
70f9f479
MK
7481if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7482 echo $ac_n "(cached) $ac_c" 1>&6
7483else
7484 cat > conftest.$ac_ext <<EOF
4f0be353 7485#line 7486 "configure"
70f9f479 7486#include "confdefs.h"
d15be926 7487#include <sys/param.h>
70f9f479
MK
7488#include <sys/proc.h>
7489int main() {
7490struct thread td; td.td_pcb;
7491; return 0; }
7492EOF
4f0be353 7493if { (eval echo configure:7494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
70f9f479
MK
7494 rm -rf conftest*
7495 gdb_cv_struct_thread_td_pcb=yes
7496else
7497 echo "configure: failed program was:" >&5
7498 cat conftest.$ac_ext >&5
7499 rm -rf conftest*
7500 gdb_cv_struct_thread_td_pcb=no
7501fi
7502rm -f conftest*
7503fi
7504
7505echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7506if test $gdb_cv_struct_thread_td_pcb = yes; then
7507 cat >> confdefs.h <<\EOF
7508#define HAVE_STRUCT_THREAD_TD_PCB 1
7509EOF
7510
7511fi
7512
5c7f2947
MK
7513# See if <sys/lwp.h> defines `struct lwp`.
7514echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
4f0be353 7515echo "configure:7516: checking for struct lwp" >&5
5c7f2947
MK
7516if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
7517 echo $ac_n "(cached) $ac_c" 1>&6
7518else
7519 cat > conftest.$ac_ext <<EOF
4f0be353 7520#line 7521 "configure"
5c7f2947
MK
7521#include "confdefs.h"
7522#include <sys/param.h>
7523#include <sys/lwp.h>
7524int main() {
7525struct lwp l;
7526; return 0; }
7527EOF
4f0be353 7528if { (eval echo configure:7529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c7f2947
MK
7529 rm -rf conftest*
7530 gdb_cv_struct_lwp=yes
7531else
7532 echo "configure: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534 rm -rf conftest*
7535 gdb_cv_struct_lwp=no
7536fi
7537rm -f conftest*
7538fi
7539
7540echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
7541if test $gdb_cv_struct_lwp = yes; then
7542 cat >> confdefs.h <<\EOF
7543#define HAVE_STRUCT_LWP 1
7544EOF
7545
7546fi
7547
78434e59
MK
7548# See if <machine/reg.h> degines `struct reg'.
7549echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
4f0be353 7550echo "configure:7551: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7551if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7552 echo $ac_n "(cached) $ac_c" 1>&6
7553else
7554 cat > conftest.$ac_ext <<EOF
4f0be353 7555#line 7556 "configure"
78434e59
MK
7556#include "confdefs.h"
7557#include <sys/types.h>
7558#include <machine/reg.h>
7559int main() {
7560struct reg r;
7561; return 0; }
7562EOF
4f0be353 7563if { (eval echo configure:7564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7564 rm -rf conftest*
7565 gdb_cv_struct_reg=yes
7566else
7567 echo "configure: failed program was:" >&5
7568 cat conftest.$ac_ext >&5
7569 rm -rf conftest*
7570 gdb_cv_struct_reg=no
7571fi
7572rm -f conftest*
7573fi
7574
7575echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7576if test $gdb_cv_struct_reg = yes; then
7577 cat >> confdefs.h <<\EOF
7578#define HAVE_STRUCT_REG 1
7579EOF
7580
7581fi
7582
97bf5e38
MK
7583# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7584# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7585echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
4f0be353 7586echo "configure:7587: checking for r_fs in struct reg" >&5
97bf5e38
MK
7587if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7588 echo $ac_n "(cached) $ac_c" 1>&6
7589else
7590 cat > conftest.$ac_ext <<EOF
4f0be353 7591#line 7592 "configure"
c906108c 7592#include "confdefs.h"
97bf5e38
MK
7593#include <machine/reg.h>
7594int main() {
7595struct reg r; r.r_fs;
7596; return 0; }
c906108c 7597EOF
4f0be353 7598if { (eval echo configure:7599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7599 rm -rf conftest*
97bf5e38 7600 gdb_cv_struct_reg_r_fs=yes
c906108c 7601else
97bf5e38
MK
7602 echo "configure: failed program was:" >&5
7603 cat conftest.$ac_ext >&5
c906108c 7604 rm -rf conftest*
97bf5e38 7605 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7606fi
7607rm -f conftest*
97bf5e38 7608fi
c906108c 7609
97bf5e38
MK
7610echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7611if test $gdb_cv_struct_reg_r_fs = yes; then
7612 cat >> confdefs.h <<\EOF
7613#define HAVE_STRUCT_REG_R_FS 1
7614EOF
7615
7616fi
7617echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
4f0be353 7618echo "configure:7619: checking for r_gs in struct reg" >&5
97bf5e38
MK
7619if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7620 echo $ac_n "(cached) $ac_c" 1>&6
7621else
7622 cat > conftest.$ac_ext <<EOF
4f0be353 7623#line 7624 "configure"
c906108c 7624#include "confdefs.h"
97bf5e38
MK
7625#include <machine/reg.h>
7626int main() {
7627struct reg r; r.r_gs;
7628; return 0; }
c906108c 7629EOF
4f0be353 7630if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7631 rm -rf conftest*
97bf5e38 7632 gdb_cv_struct_reg_r_gs=yes
c906108c 7633else
97bf5e38
MK
7634 echo "configure: failed program was:" >&5
7635 cat conftest.$ac_ext >&5
c906108c 7636 rm -rf conftest*
97bf5e38 7637 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7638fi
7639rm -f conftest*
c906108c 7640fi
c906108c 7641
97bf5e38
MK
7642echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7643if test $gdb_cv_struct_reg_r_gs = yes; then
7644 cat >> confdefs.h <<\EOF
7645#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7646EOF
7647
c906108c
SS
7648fi
7649
97bf5e38
MK
7650# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7651echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
4f0be353 7652echo "configure:7653: checking for PTRACE_GETREGS" >&5
97bf5e38 7653if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7654 echo $ac_n "(cached) $ac_c" 1>&6
7655else
7656 cat > conftest.$ac_ext <<EOF
4f0be353 7657#line 7658 "configure"
c906108c 7658#include "confdefs.h"
97bf5e38 7659#include <sys/ptrace.h>
c906108c 7660int main() {
97bf5e38 7661PTRACE_GETREGS;
c906108c
SS
7662; return 0; }
7663EOF
4f0be353 7664if { (eval echo configure:7665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7665 rm -rf conftest*
97bf5e38 7666 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7667else
7668 echo "configure: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670 rm -rf conftest*
97bf5e38 7671 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7672fi
7673rm -f conftest*
7674fi
7675
97bf5e38
MK
7676echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7677if test $gdb_cv_have_ptrace_getregs = yes; then
7678 cat >> confdefs.h <<\EOF
7679#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7680EOF
7681
97bf5e38 7682fi
c906108c 7683
97bf5e38
MK
7684# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7685echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
4f0be353 7686echo "configure:7687: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7687if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7688 echo $ac_n "(cached) $ac_c" 1>&6
7689else
7690 cat > conftest.$ac_ext <<EOF
4f0be353 7691#line 7692 "configure"
c906108c 7692#include "confdefs.h"
97bf5e38 7693#include <sys/ptrace.h>
c906108c 7694int main() {
97bf5e38 7695PTRACE_GETFPXREGS;
c906108c
SS
7696; return 0; }
7697EOF
4f0be353 7698if { (eval echo configure:7699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7699 rm -rf conftest*
97bf5e38 7700 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7701else
7702 echo "configure: failed program was:" >&5
7703 cat conftest.$ac_ext >&5
7704 rm -rf conftest*
97bf5e38 7705 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7706fi
7707rm -f conftest*
7708fi
7709
97bf5e38
MK
7710echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7711if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7712 cat >> confdefs.h <<\EOF
7713#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7714EOF
7715
97bf5e38 7716fi
c906108c 7717
97bf5e38
MK
7718# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7719echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
4f0be353 7720echo "configure:7721: checking for PT_GETDBREGS" >&5
97bf5e38 7721if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7722 echo $ac_n "(cached) $ac_c" 1>&6
7723else
7724 cat > conftest.$ac_ext <<EOF
4f0be353 7725#line 7726 "configure"
c906108c 7726#include "confdefs.h"
97bf5e38
MK
7727#include <sys/types.h>
7728#include <sys/ptrace.h>
c906108c 7729int main() {
97bf5e38 7730PT_GETDBREGS;
c906108c
SS
7731; return 0; }
7732EOF
4f0be353 7733if { (eval echo configure:7734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7734 rm -rf conftest*
97bf5e38 7735 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7736else
7737 echo "configure: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 rm -rf conftest*
97bf5e38 7740 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7741fi
7742rm -f conftest*
7743fi
7744
97bf5e38
MK
7745echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7746if test $gdb_cv_have_pt_getdbregs = yes; then
7747 cat >> confdefs.h <<\EOF
7748#define HAVE_PT_GETDBREGS 1
c906108c
SS
7749EOF
7750
97bf5e38 7751fi
c906108c 7752
97bf5e38
MK
7753# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7754echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
4f0be353 7755echo "configure:7756: checking for PT_GETXMMREGS" >&5
97bf5e38 7756if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7757 echo $ac_n "(cached) $ac_c" 1>&6
7758else
7759 cat > conftest.$ac_ext <<EOF
4f0be353 7760#line 7761 "configure"
c906108c 7761#include "confdefs.h"
97bf5e38
MK
7762#include <sys/types.h>
7763#include <sys/ptrace.h>
c906108c 7764int main() {
97bf5e38 7765PT_GETXMMREGS;
c906108c
SS
7766; return 0; }
7767EOF
4f0be353 7768if { (eval echo configure:7769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7769 rm -rf conftest*
97bf5e38 7770 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7771else
7772 echo "configure: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7774 rm -rf conftest*
97bf5e38 7775 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7776fi
7777rm -f conftest*
7778fi
7779
97bf5e38
MK
7780echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7781if test $gdb_cv_have_pt_getxmmregs = yes; then
7782 cat >> confdefs.h <<\EOF
7783#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7784EOF
7785
97bf5e38 7786fi
c906108c 7787
27ca5dad 7788# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7789# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7790echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
4f0be353 7791echo "configure:7792: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7792if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7793 echo $ac_n "(cached) $ac_c" 1>&6
7794else
7795 cat > conftest.$ac_ext <<EOF
4f0be353 7796#line 7797 "configure"
27ca5dad
MC
7797#include "confdefs.h"
7798#include <stdint.h>
7799int main() {
7800uintptr_t foo = 0;
7801; return 0; }
7802EOF
4f0be353 7803if { (eval echo configure:7804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7804 rm -rf conftest*
7805 gdb_cv_have_uintptr_t=yes
7806else
7807 echo "configure: failed program was:" >&5
7808 cat conftest.$ac_ext >&5
7809 rm -rf conftest*
7810 gdb_cv_have_uintptr_t=no
7811fi
7812rm -f conftest*
7813fi
7814
7815echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7816if test $gdb_cv_have_uintptr_t = yes; then
7817 cat >> confdefs.h <<\EOF
7818#define HAVE_UINTPTR_T 1
7819EOF
7820
7821fi
97bf5e38
MK
7822
7823echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4f0be353 7824echo "configure:7825: checking whether malloc must be declared" >&5
97bf5e38 7825if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7826 echo $ac_n "(cached) $ac_c" 1>&6
7827else
7828 cat > conftest.$ac_ext <<EOF
4f0be353 7829#line 7830 "configure"
3862412b 7830#include "confdefs.h"
e17bf198 7831
97bf5e38
MK
7832#include <stdio.h>
7833#ifdef HAVE_STRING_H
7834#include <string.h>
7835#else
7836#ifdef HAVE_STRINGS_H
7837#include <strings.h>
7838#endif
7839#endif
7840#ifdef HAVE_STDLIB_H
7841#include <stdlib.h>
7842#endif
7843#ifdef HAVE_UNISTD_H
7844#include <unistd.h>
7845#endif
3862412b 7846int main() {
97bf5e38 7847char *(*pfn) = (char *(*)) malloc
3862412b
MK
7848; return 0; }
7849EOF
4f0be353 7850if { (eval echo configure:7851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7851 rm -rf conftest*
97bf5e38 7852 bfd_cv_decl_needed_malloc=no
3862412b
MK
7853else
7854 echo "configure: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 rm -rf conftest*
97bf5e38 7857 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7858fi
7859rm -f conftest*
7860fi
7861
97bf5e38
MK
7862echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7863if test $bfd_cv_decl_needed_malloc = yes; then
7864 cat >> confdefs.h <<\EOF
7865#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7866EOF
7867
97bf5e38 7868fi
3862412b 7869
97bf5e38 7870echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4f0be353 7871echo "configure:7872: checking whether realloc must be declared" >&5
97bf5e38 7872if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7873 echo $ac_n "(cached) $ac_c" 1>&6
7874else
7875 cat > conftest.$ac_ext <<EOF
4f0be353 7876#line 7877 "configure"
3862412b 7877#include "confdefs.h"
e17bf198 7878
97bf5e38
MK
7879#include <stdio.h>
7880#ifdef HAVE_STRING_H
7881#include <string.h>
7882#else
7883#ifdef HAVE_STRINGS_H
7884#include <strings.h>
7885#endif
7886#endif
7887#ifdef HAVE_STDLIB_H
7888#include <stdlib.h>
7889#endif
7890#ifdef HAVE_UNISTD_H
7891#include <unistd.h>
7892#endif
3862412b 7893int main() {
97bf5e38 7894char *(*pfn) = (char *(*)) realloc
3862412b
MK
7895; return 0; }
7896EOF
4f0be353 7897if { (eval echo configure:7898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7898 rm -rf conftest*
97bf5e38 7899 bfd_cv_decl_needed_realloc=no
3862412b
MK
7900else
7901 echo "configure: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903 rm -rf conftest*
97bf5e38 7904 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7905fi
7906rm -f conftest*
7907fi
7908
97bf5e38
MK
7909echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7910if test $bfd_cv_decl_needed_realloc = yes; then
7911 cat >> confdefs.h <<\EOF
7912#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7913EOF
7914
97bf5e38 7915fi
3862412b 7916
97bf5e38 7917echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4f0be353 7918echo "configure:7919: checking whether free must be declared" >&5
97bf5e38 7919if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7920 echo $ac_n "(cached) $ac_c" 1>&6
7921else
7922 cat > conftest.$ac_ext <<EOF
4f0be353 7923#line 7924 "configure"
451928c5 7924#include "confdefs.h"
e17bf198 7925
97bf5e38
MK
7926#include <stdio.h>
7927#ifdef HAVE_STRING_H
7928#include <string.h>
7929#else
7930#ifdef HAVE_STRINGS_H
7931#include <strings.h>
7932#endif
7933#endif
7934#ifdef HAVE_STDLIB_H
7935#include <stdlib.h>
7936#endif
7937#ifdef HAVE_UNISTD_H
7938#include <unistd.h>
7939#endif
451928c5 7940int main() {
97bf5e38 7941char *(*pfn) = (char *(*)) free
451928c5
AC
7942; return 0; }
7943EOF
4f0be353 7944if { (eval echo configure:7945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7945 rm -rf conftest*
97bf5e38 7946 bfd_cv_decl_needed_free=no
451928c5
AC
7947else
7948 echo "configure: failed program was:" >&5
7949 cat conftest.$ac_ext >&5
7950 rm -rf conftest*
97bf5e38 7951 bfd_cv_decl_needed_free=yes
451928c5
AC
7952fi
7953rm -f conftest*
7954fi
7955
97bf5e38
MK
7956echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7957if test $bfd_cv_decl_needed_free = yes; then
7958 cat >> confdefs.h <<\EOF
7959#define NEED_DECLARATION_FREE 1
451928c5
AC
7960EOF
7961
97bf5e38 7962fi
451928c5 7963
97bf5e38 7964echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
4f0be353 7965echo "configure:7966: checking whether strerror must be declared" >&5
97bf5e38 7966if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7967 echo $ac_n "(cached) $ac_c" 1>&6
7968else
7969 cat > conftest.$ac_ext <<EOF
4f0be353 7970#line 7971 "configure"
451928c5 7971#include "confdefs.h"
e17bf198 7972
97bf5e38
MK
7973#include <stdio.h>
7974#ifdef HAVE_STRING_H
7975#include <string.h>
7976#else
7977#ifdef HAVE_STRINGS_H
7978#include <strings.h>
7979#endif
7980#endif
7981#ifdef HAVE_STDLIB_H
7982#include <stdlib.h>
7983#endif
7984#ifdef HAVE_UNISTD_H
7985#include <unistd.h>
7986#endif
451928c5 7987int main() {
97bf5e38 7988char *(*pfn) = (char *(*)) strerror
451928c5
AC
7989; return 0; }
7990EOF
4f0be353 7991if { (eval echo configure:7992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7992 rm -rf conftest*
97bf5e38 7993 bfd_cv_decl_needed_strerror=no
451928c5
AC
7994else
7995 echo "configure: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7997 rm -rf conftest*
97bf5e38 7998 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7999fi
8000rm -f conftest*
8001fi
8002
97bf5e38
MK
8003echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
8004if test $bfd_cv_decl_needed_strerror = yes; then
8005 cat >> confdefs.h <<\EOF
8006#define NEED_DECLARATION_STRERROR 1
451928c5
AC
8007EOF
8008
97bf5e38 8009fi
451928c5 8010
97bf5e38 8011echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
4f0be353 8012echo "configure:8013: checking whether strdup must be declared" >&5
97bf5e38 8013if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
8014 echo $ac_n "(cached) $ac_c" 1>&6
8015else
8016 cat > conftest.$ac_ext <<EOF
4f0be353 8017#line 8018 "configure"
3862412b 8018#include "confdefs.h"
e17bf198 8019
97bf5e38
MK
8020#include <stdio.h>
8021#ifdef HAVE_STRING_H
8022#include <string.h>
8023#else
8024#ifdef HAVE_STRINGS_H
8025#include <strings.h>
8026#endif
8027#endif
8028#ifdef HAVE_STDLIB_H
8029#include <stdlib.h>
8030#endif
8031#ifdef HAVE_UNISTD_H
8032#include <unistd.h>
8033#endif
3862412b 8034int main() {
97bf5e38 8035char *(*pfn) = (char *(*)) strdup
3862412b
MK
8036; return 0; }
8037EOF
4f0be353 8038if { (eval echo configure:8039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8039 rm -rf conftest*
97bf5e38 8040 bfd_cv_decl_needed_strdup=no
3862412b
MK
8041else
8042 echo "configure: failed program was:" >&5
8043 cat conftest.$ac_ext >&5
8044 rm -rf conftest*
97bf5e38 8045 bfd_cv_decl_needed_strdup=yes
3862412b
MK
8046fi
8047rm -f conftest*
8048fi
8049
97bf5e38
MK
8050echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
8051if test $bfd_cv_decl_needed_strdup = yes; then
8052 cat >> confdefs.h <<\EOF
8053#define NEED_DECLARATION_STRDUP 1
3862412b
MK
8054EOF
8055
97bf5e38 8056fi
3862412b 8057
97bf5e38 8058echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4f0be353 8059echo "configure:8060: checking whether strstr must be declared" >&5
97bf5e38 8060if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
8061 echo $ac_n "(cached) $ac_c" 1>&6
8062else
8063 cat > conftest.$ac_ext <<EOF
4f0be353 8064#line 8065 "configure"
3862412b 8065#include "confdefs.h"
e17bf198 8066
97bf5e38
MK
8067#include <stdio.h>
8068#ifdef HAVE_STRING_H
8069#include <string.h>
8070#else
8071#ifdef HAVE_STRINGS_H
8072#include <strings.h>
8073#endif
8074#endif
8075#ifdef HAVE_STDLIB_H
8076#include <stdlib.h>
8077#endif
8078#ifdef HAVE_UNISTD_H
8079#include <unistd.h>
8080#endif
3862412b 8081int main() {
97bf5e38 8082char *(*pfn) = (char *(*)) strstr
3862412b
MK
8083; return 0; }
8084EOF
4f0be353 8085if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8086 rm -rf conftest*
97bf5e38 8087 bfd_cv_decl_needed_strstr=no
3862412b
MK
8088else
8089 echo "configure: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 rm -rf conftest*
97bf5e38 8092 bfd_cv_decl_needed_strstr=yes
3862412b
MK
8093fi
8094rm -f conftest*
8095fi
8096
97bf5e38
MK
8097echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
8098if test $bfd_cv_decl_needed_strstr = yes; then
8099 cat >> confdefs.h <<\EOF
8100#define NEED_DECLARATION_STRSTR 1
3862412b
MK
8101EOF
8102
97bf5e38 8103fi
3862412b 8104
97bf5e38 8105echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
4f0be353 8106echo "configure:8107: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 8107if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
8108 echo $ac_n "(cached) $ac_c" 1>&6
8109else
8110 cat > conftest.$ac_ext <<EOF
4f0be353 8111#line 8112 "configure"
596c9d4b
KB
8112#include "confdefs.h"
8113
97bf5e38
MK
8114#include <stdio.h>
8115#ifdef HAVE_STRING_H
8116#include <string.h>
8117#else
8118#ifdef HAVE_STRINGS_H
8119#include <strings.h>
8120#endif
8121#endif
8122#ifdef HAVE_STDLIB_H
8123#include <stdlib.h>
8124#endif
8125#ifdef HAVE_UNISTD_H
8126#include <unistd.h>
8127#endif
596c9d4b 8128int main() {
97bf5e38 8129char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
8130; return 0; }
8131EOF
4f0be353 8132if { (eval echo configure:8133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8133 rm -rf conftest*
97bf5e38 8134 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
8135else
8136 echo "configure: failed program was:" >&5
8137 cat conftest.$ac_ext >&5
8138 rm -rf conftest*
97bf5e38 8139 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
8140fi
8141rm -f conftest*
8142fi
8143
97bf5e38
MK
8144echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
8145if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
8146 cat >> confdefs.h <<\EOF
8147#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
8148EOF
8149
97bf5e38 8150fi
596c9d4b 8151
97bf5e38
MK
8152
8153# The following save_state_t checkery is only necessary for HPUX
8154# versions earlier than 10.20. When those fade from memory, this
8155# could be expunged. --jsm 1999-03-22
8156
8157echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
4f0be353 8158echo "configure:8159: checking for HPUX save_state structure" >&5
97bf5e38 8159cat > conftest.$ac_ext <<EOF
4f0be353 8160#line 8161 "configure"
97bf5e38
MK
8161#include "confdefs.h"
8162#include <machine/save_state.h>
8163EOF
8164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8165 egrep "save_state_t" >/dev/null 2>&1; then
8166 rm -rf conftest*
8167 gdb_cv_hpux_savestate=yes
8168else
8169 rm -rf conftest*
8170 gdb_cv_hpux_savestate=no
8171fi
8172rm -f conftest*
8173
8174cat > conftest.$ac_ext <<EOF
4f0be353 8175#line 8176 "configure"
97bf5e38
MK
8176#include "confdefs.h"
8177#include <machine/save_state.h>
8178EOF
8179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8180 egrep "ss_wide" >/dev/null 2>&1; then
8181 rm -rf conftest*
8182 gdb_cv_hpux_sswide=yes
8183else
8184 rm -rf conftest*
8185 gdb_cv_hpux_sswide=no
8186fi
8187rm -f conftest*
8188
8189if test $gdb_cv_hpux_savestate = yes
8190then
8191 cat >> confdefs.h <<\EOF
8192#define HAVE_STRUCT_SAVE_STATE_T 1
8193EOF
8194
8195fi
8196if test $gdb_cv_hpux_sswide = yes
8197then
8198 cat >> confdefs.h <<\EOF
8199#define HAVE_STRUCT_MEMBER_SS_WIDE 1
8200EOF
8201
8202fi
8203echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8204
8205
8206# If we are configured native on GNU/Linux, work around problems with
8207# sys/procfs.h
8208# Also detect which type of /proc is in use, such as for Unixware or Solaris.
8209
8210if test "${target}" = "${host}"; then
8211 case "${host}" in
8212 i[3456]86-*-linux*)
8213 cat >> confdefs.h <<\EOF
8214#define START_INFERIOR_TRAPS_EXPECTED 2
8215EOF
8216
8217 cat >> confdefs.h <<\EOF
8218#define sys_quotactl 1
8219EOF
8220
8221 ;;
8222 ia64-*-aix*)
8223 cat >> confdefs.h <<\EOF
8224#define NEW_PROC_API 1
8225EOF
8226
8227 ;;
8228 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8229 cat >> confdefs.h <<\EOF
8230#define NEW_PROC_API 1
8231EOF
8232
8233 ;;
e7c61be3 8234 *-*-solaris2.[6789])
97bf5e38
MK
8235 cat >> confdefs.h <<\EOF
8236#define NEW_PROC_API 1
c960c18f
AC
8237EOF
8238
8239 ;;
8240 mips-sgi-irix5*)
8241 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8242 cat >> confdefs.h <<\EOF
8243#define _KMEMUSER 1
97bf5e38
MK
8244EOF
8245
8246 ;;
8247 esac
8248fi
8249
8250if test "$ac_cv_header_sys_procfs_h" = yes; then
8251 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8252echo "configure:8253: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8253 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8254 echo $ac_n "(cached) $ac_c" 1>&6
8255else
8256 cat > conftest.$ac_ext <<EOF
4f0be353 8257#line 8258 "configure"
596c9d4b
KB
8258#include "confdefs.h"
8259
8260#define _SYSCALL32
8261#include <sys/procfs.h>
8262int main() {
97bf5e38 8263pstatus_t avar
596c9d4b
KB
8264; return 0; }
8265EOF
4f0be353 8266if { (eval echo configure:8267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8267 rm -rf conftest*
97bf5e38 8268 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8269else
8270 echo "configure: failed program was:" >&5
8271 cat conftest.$ac_ext >&5
8272 rm -rf conftest*
97bf5e38 8273 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8274
8275fi
8276rm -f conftest*
8277fi
8278
97bf5e38 8279 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8280 cat >> confdefs.h <<\EOF
97bf5e38 8281#define HAVE_PSTATUS_T 1
596c9d4b
KB
8282EOF
8283
8284 fi
97bf5e38 8285 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8286
97bf5e38 8287 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8288echo "configure:8289: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8289 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8290 echo $ac_n "(cached) $ac_c" 1>&6
8291else
8292 cat > conftest.$ac_ext <<EOF
4f0be353 8293#line 8294 "configure"
596c9d4b
KB
8294#include "confdefs.h"
8295
8296#define _SYSCALL32
8297#include <sys/procfs.h>
8298int main() {
97bf5e38 8299prrun_t avar
596c9d4b
KB
8300; return 0; }
8301EOF
4f0be353 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_prrun_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_prrun_t=no
596c9d4b
KB
8310
8311fi
8312rm -f conftest*
8313fi
8314
97bf5e38 8315 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8316 cat >> confdefs.h <<\EOF
97bf5e38 8317#define HAVE_PRRUN_T 1
596c9d4b
KB
8318EOF
8319
8320 fi
97bf5e38 8321 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8322
97bf5e38 8323 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8324echo "configure:8325: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8325 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8326 echo $ac_n "(cached) $ac_c" 1>&6
8327else
8328 cat > conftest.$ac_ext <<EOF
4f0be353 8329#line 8330 "configure"
596c9d4b
KB
8330#include "confdefs.h"
8331
8332#define _SYSCALL32
8333#include <sys/procfs.h>
8334int main() {
97bf5e38 8335gregset_t avar
596c9d4b
KB
8336; return 0; }
8337EOF
4f0be353 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_gregset_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_gregset_t=no
596c9d4b
KB
8346
8347fi
8348rm -f conftest*
8349fi
8350
97bf5e38 8351 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8352 cat >> confdefs.h <<\EOF
97bf5e38 8353#define HAVE_GREGSET_T 1
596c9d4b
KB
8354EOF
8355
8356 fi
97bf5e38 8357 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8358
97bf5e38 8359 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8360echo "configure:8361: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8361 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8362 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8363else
8364 cat > conftest.$ac_ext <<EOF
4f0be353 8365#line 8366 "configure"
d84dd0c5 8366#include "confdefs.h"
97bf5e38
MK
8367
8368#define _SYSCALL32
d84dd0c5 8369#include <sys/procfs.h>
97bf5e38
MK
8370int main() {
8371fpregset_t avar
8372; return 0; }
d84dd0c5 8373EOF
4f0be353 8374if { (eval echo configure:8375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8375 rm -rf conftest*
8376 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8377else
8378 echo "configure: failed program was:" >&5
8379 cat conftest.$ac_ext >&5
97bf5e38
MK
8380 rm -rf conftest*
8381 bfd_cv_have_sys_procfs_type_fpregset_t=no
8382
d84dd0c5 8383fi
97bf5e38 8384rm -f conftest*
d84dd0c5
MK
8385fi
8386
97bf5e38
MK
8387 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8388 cat >> confdefs.h <<\EOF
8389#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8390EOF
8391
97bf5e38
MK
8392 fi
8393 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8394
97bf5e38 8395 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8396echo "configure:8397: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8397 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8398 echo $ac_n "(cached) $ac_c" 1>&6
8399else
8400 cat > conftest.$ac_ext <<EOF
4f0be353 8401#line 8402 "configure"
c906108c 8402#include "confdefs.h"
c906108c 8403
97bf5e38
MK
8404#define _SYSCALL32
8405#include <sys/procfs.h>
c906108c 8406int main() {
97bf5e38 8407prgregset_t avar
c906108c
SS
8408; return 0; }
8409EOF
4f0be353 8410if { (eval echo configure:8411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8411 rm -rf conftest*
97bf5e38 8412 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8413else
8414 echo "configure: failed program was:" >&5
8415 cat conftest.$ac_ext >&5
8416 rm -rf conftest*
97bf5e38
MK
8417 bfd_cv_have_sys_procfs_type_prgregset_t=no
8418
c906108c
SS
8419fi
8420rm -f conftest*
8421fi
8422
97bf5e38
MK
8423 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8424 cat >> confdefs.h <<\EOF
8425#define HAVE_PRGREGSET_T 1
c906108c
SS
8426EOF
8427
97bf5e38
MK
8428 fi
8429 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8430
97bf5e38 8431 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8432echo "configure:8433: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8433 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8434 echo $ac_n "(cached) $ac_c" 1>&6
8435else
8436 cat > conftest.$ac_ext <<EOF
4f0be353 8437#line 8438 "configure"
d45fe813 8438#include "confdefs.h"
97bf5e38
MK
8439
8440#define _SYSCALL32
8441#include <sys/procfs.h>
d45fe813 8442int main() {
97bf5e38 8443prfpregset_t avar
d45fe813
KB
8444; return 0; }
8445EOF
4f0be353 8446if { (eval echo configure:8447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8447 rm -rf conftest*
97bf5e38 8448 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
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_prfpregset_t=no
8454
d45fe813
KB
8455fi
8456rm -f conftest*
8457fi
8458
97bf5e38
MK
8459 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8460 cat >> confdefs.h <<\EOF
8461#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8462EOF
8463
97bf5e38
MK
8464 fi
8465 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8466
97bf5e38 8467 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8468echo "configure:8469: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8469 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8470 echo $ac_n "(cached) $ac_c" 1>&6
8471else
8472 cat > conftest.$ac_ext <<EOF
4f0be353 8473#line 8474 "configure"
d45fe813 8474#include "confdefs.h"
97bf5e38
MK
8475
8476#define _SYSCALL32
8477#include <sys/procfs.h>
d45fe813 8478int main() {
97bf5e38 8479prgregset32_t avar
d45fe813
KB
8480; return 0; }
8481EOF
4f0be353 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_prgregset32_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_prgregset32_t=no
8490
d45fe813
KB
8491fi
8492rm -f conftest*
8493fi
8494
97bf5e38
MK
8495 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8496 cat >> confdefs.h <<\EOF
8497#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8498EOF
8499
97bf5e38
MK
8500 fi
8501 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8502
97bf5e38 8503 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8504echo "configure:8505: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8505 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8506 echo $ac_n "(cached) $ac_c" 1>&6
8507else
8508 cat > conftest.$ac_ext <<EOF
4f0be353 8509#line 8510 "configure"
d45fe813 8510#include "confdefs.h"
97bf5e38
MK
8511
8512#define _SYSCALL32
8513#include <sys/procfs.h>
d45fe813 8514int main() {
97bf5e38 8515prfpregset32_t avar
d45fe813
KB
8516; return 0; }
8517EOF
4f0be353 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_prfpregset32_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_prfpregset32_t=no
8526
d45fe813
KB
8527fi
8528rm -f conftest*
8529fi
8530
97bf5e38
MK
8531 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8532 cat >> confdefs.h <<\EOF
8533#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8534EOF
8535
97bf5e38
MK
8536 fi
8537 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8538
97bf5e38 8539 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8540echo "configure:8541: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8541 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8542 echo $ac_n "(cached) $ac_c" 1>&6
8543else
8544 cat > conftest.$ac_ext <<EOF
4f0be353 8545#line 8546 "configure"
d45fe813 8546#include "confdefs.h"
97bf5e38 8547
d45fe813 8548#define _SYSCALL32
97bf5e38 8549#include <sys/procfs.h>
d45fe813 8550int main() {
97bf5e38 8551lwpid_t avar
d45fe813
KB
8552; return 0; }
8553EOF
4f0be353 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_lwpid_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_lwpid_t=no
8562
d45fe813
KB
8563fi
8564rm -f conftest*
8565fi
8566
97bf5e38
MK
8567 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8568 cat >> confdefs.h <<\EOF
8569#define HAVE_LWPID_T 1
d45fe813
KB
8570EOF
8571
97bf5e38
MK
8572 fi
8573 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8574
97bf5e38 8575 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8576echo "configure:8577: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8577 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8578 echo $ac_n "(cached) $ac_c" 1>&6
8579else
8580 cat > conftest.$ac_ext <<EOF
4f0be353 8581#line 8582 "configure"
c906108c
SS
8582#include "confdefs.h"
8583
97bf5e38
MK
8584#define _SYSCALL32
8585#include <sys/procfs.h>
c906108c 8586int main() {
97bf5e38 8587psaddr_t avar
c906108c
SS
8588; return 0; }
8589EOF
4f0be353 8590if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8591 rm -rf conftest*
97bf5e38 8592 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
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_psaddr_t=no
8598
c906108c
SS
8599fi
8600rm -f conftest*
8601fi
8602
97bf5e38
MK
8603 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8604 cat >> confdefs.h <<\EOF
8605#define HAVE_PSADDR_T 1
c906108c
SS
8606EOF
8607
97bf5e38
MK
8608 fi
8609 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8610
97bf5e38 8611 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8612echo "configure:8613: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8613 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8614 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8615else
8616 cat > conftest.$ac_ext <<EOF
4f0be353 8617#line 8618 "configure"
c906108c
SS
8618#include "confdefs.h"
8619
97bf5e38
MK
8620#define _SYSCALL32
8621#include <sys/procfs.h>
8622int main() {
8623prsysent_t avar
8624; return 0; }
c906108c 8625EOF
4f0be353 8626if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8627 rm -rf conftest*
8628 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8629else
8630 echo "configure: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
97bf5e38
MK
8632 rm -rf conftest*
8633 bfd_cv_have_sys_procfs_type_prsysent_t=no
8634
c906108c 8635fi
97bf5e38 8636rm -f conftest*
c906108c
SS
8637fi
8638
97bf5e38
MK
8639 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8640 cat >> confdefs.h <<\EOF
8641#define HAVE_PRSYSENT_T 1
c906108c
SS
8642EOF
8643
97bf5e38
MK
8644 fi
8645 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8646
97bf5e38 8647 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8648echo "configure:8649: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8649 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8650 echo $ac_n "(cached) $ac_c" 1>&6
8651else
8652 cat > conftest.$ac_ext <<EOF
4f0be353 8653#line 8654 "configure"
c906108c
SS
8654#include "confdefs.h"
8655
97bf5e38
MK
8656#define _SYSCALL32
8657#include <sys/procfs.h>
c906108c 8658int main() {
97bf5e38 8659pr_sigset_t avar
c906108c
SS
8660; return 0; }
8661EOF
4f0be353 8662if { (eval echo configure:8663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8663 rm -rf conftest*
97bf5e38 8664 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8665else
8666 echo "configure: failed program was:" >&5
8667 cat conftest.$ac_ext >&5
8668 rm -rf conftest*
97bf5e38
MK
8669 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8670
c906108c
SS
8671fi
8672rm -f conftest*
8673fi
8674
97bf5e38
MK
8675 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8676 cat >> confdefs.h <<\EOF
8677#define HAVE_PR_SIGSET_T 1
c906108c
SS
8678EOF
8679
97bf5e38
MK
8680 fi
8681 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8682
97bf5e38 8683 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8684echo "configure:8685: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8685 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8686 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8687else
8688 cat > conftest.$ac_ext <<EOF
4f0be353 8689#line 8690 "configure"
c906108c
SS
8690#include "confdefs.h"
8691
97bf5e38
MK
8692#define _SYSCALL32
8693#include <sys/procfs.h>
8694int main() {
8695pr_sigaction64_t avar
8696; return 0; }
c906108c 8697EOF
4f0be353 8698if { (eval echo configure:8699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8699 rm -rf conftest*
8700 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8701else
8702 echo "configure: failed program was:" >&5
8703 cat conftest.$ac_ext >&5
97bf5e38
MK
8704 rm -rf conftest*
8705 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8706
c906108c 8707fi
97bf5e38 8708rm -f conftest*
c906108c
SS
8709fi
8710
97bf5e38
MK
8711 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8712 cat >> confdefs.h <<\EOF
8713#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8714EOF
8715
97bf5e38
MK
8716 fi
8717 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8718
8719 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8720echo "configure:8721: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8721 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8722 echo $ac_n "(cached) $ac_c" 1>&6
8723else
8724 cat > conftest.$ac_ext <<EOF
4f0be353 8725#line 8726 "configure"
97bf5e38
MK
8726#include "confdefs.h"
8727
8728#define _SYSCALL32
8729#include <sys/procfs.h>
8730int main() {
8731pr_siginfo64_t avar
8732; return 0; }
8733EOF
4f0be353 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_siginfo64_t=yes
8737else
8738 echo "configure: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
8740 rm -rf conftest*
8741 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8742
8743fi
8744rm -f conftest*
c906108c 8745fi
c906108c 8746
97bf5e38
MK
8747 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8748 cat >> confdefs.h <<\EOF
8749#define HAVE_PR_SIGINFO64_T 1
8750EOF
c906108c 8751
97bf5e38
MK
8752 fi
8753 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8754
8755
8756
8757
8758
8759 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8760 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
4f0be353 8761echo "configure:8762: checking whether prfpregset_t type is broken" >&5
97bf5e38 8762 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8763 echo $ac_n "(cached) $ac_c" 1>&6
8764else
8765 if test "$cross_compiling" = yes; then
97bf5e38 8766 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8767else
8768 cat > conftest.$ac_ext <<EOF
4f0be353 8769#line 8770 "configure"
c906108c 8770#include "confdefs.h"
97bf5e38
MK
8771#include <sys/procfs.h>
8772 int main ()
8773 {
8774 if (sizeof (prfpregset_t) == sizeof (void *))
8775 return 1;
8776 return 0;
8777 }
c906108c 8778EOF
4f0be353 8779if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8780then
97bf5e38 8781 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8782else
8783 echo "configure: failed program was:" >&5
8784 cat conftest.$ac_ext >&5
8785 rm -fr conftest*
97bf5e38 8786 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8787fi
8788rm -fr conftest*
8789fi
8790
8791fi
8792
97bf5e38
MK
8793 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8794 if test $gdb_cv_prfpregset_t_broken = yes; then
8795 cat >> confdefs.h <<\EOF
8796#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8797EOF
8798
97bf5e38
MK
8799 fi
8800 fi
c906108c 8801
97bf5e38
MK
8802
8803 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
4f0be353 8804echo "configure:8805: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8805 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8806 echo $ac_n "(cached) $ac_c" 1>&6
8807else
8808 cat > conftest.$ac_ext <<EOF
4f0be353 8809#line 8810 "configure"
c906108c 8810#include "confdefs.h"
97bf5e38
MK
8811#include <unistd.h>
8812#include <sys/types.h>
8813#include <sys/procfs.h>
8814
8815int main() {
8816
8817 int dummy;;
8818 dummy = ioctl(0, PIOCSET, &dummy);
8819
8820; return 0; }
c906108c 8821EOF
4f0be353 8822if { (eval echo configure:8823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8823 rm -rf conftest*
97bf5e38 8824 gdb_cv_have_procfs_piocset=yes
c906108c 8825else
c906108c
SS
8826 echo "configure: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 rm -rf conftest*
97bf5e38 8829 gdb_cv_have_procfs_piocset=no
c906108c
SS
8830fi
8831rm -f conftest*
8832fi
97bf5e38
MK
8833
8834 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8835 if test $gdb_cv_have_procfs_piocset = yes; then
8836 cat >> confdefs.h <<\EOF
8837#define HAVE_PROCFS_PIOCSET 1
c906108c 8838EOF
97bf5e38
MK
8839
8840 fi
c906108c 8841fi
c906108c 8842
97bf5e38
MK
8843if test ${host} = ${target} ; then
8844
8845 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
4f0be353 8846echo "configure:8847: checking for member l_addr in struct link_map" >&5
97bf5e38 8847 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8848 echo $ac_n "(cached) $ac_c" 1>&6
8849else
8850 cat > conftest.$ac_ext <<EOF
4f0be353 8851#line 8852 "configure"
c906108c 8852#include "confdefs.h"
97bf5e38 8853#include <link.h>
c906108c 8854int main() {
97bf5e38 8855struct link_map lm; (void) lm.l_addr;
c906108c
SS
8856; return 0; }
8857EOF
4f0be353 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_struct_link_map_with_l_members=yes
c906108c
SS
8861else
8862 echo "configure: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864 rm -rf conftest*
97bf5e38 8865 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8866fi
8867rm -f conftest*
8868fi
8869
97bf5e38
MK
8870 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8871 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8872 cat >> confdefs.h <<\EOF
8873#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8874EOF
97bf5e38
MK
8875
8876 fi
8877
8878
8879 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
4f0be353 8880echo "configure:8881: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8881 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8882 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8883else
97bf5e38 8884 cat > conftest.$ac_ext <<EOF
4f0be353 8885#line 8886 "configure"
97bf5e38
MK
8886#include "confdefs.h"
8887#include <sys/types.h>
8888#include <link.h>
8889int main() {
8890struct link_map lm; (void) lm.lm_addr;
8891; return 0; }
8892EOF
4f0be353 8893if { (eval echo configure:8894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8894 rm -rf conftest*
8895 gdb_cv_have_struct_link_map_with_lm_members=yes
8896else
8897 echo "configure: failed program was:" >&5
8898 cat conftest.$ac_ext >&5
8899 rm -rf conftest*
8900 gdb_cv_have_struct_link_map_with_lm_members=no
8901fi
8902rm -f conftest*
c906108c 8903fi
c906108c 8904
97bf5e38
MK
8905 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8906 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8907 cat >> confdefs.h <<\EOF
8908#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8909EOF
8910
8911 fi
8912
8913
8914 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
4f0be353 8915echo "configure:8916: checking for member som_addr in struct so_map" >&5
97bf5e38 8916 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8917 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8918else
8919 cat > conftest.$ac_ext <<EOF
4f0be353 8920#line 8921 "configure"
c906108c 8921#include "confdefs.h"
97bf5e38
MK
8922#include <sys/types.h>
8923#ifdef HAVE_NLIST_H
8924#include <nlist.h>
8925#endif
8926#include <link.h>
8927int main() {
8928struct so_map lm; (void) lm.som_addr;
8929; return 0; }
8930EOF
4f0be353 8931if { (eval echo configure:8932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8932 rm -rf conftest*
8933 gdb_cv_have_struct_so_map_with_som_members=yes
8934else
8935 echo "configure: failed program was:" >&5
8936 cat conftest.$ac_ext >&5
8937 rm -rf conftest*
8938 gdb_cv_have_struct_so_map_with_som_members=no
8939fi
8940rm -f conftest*
8941fi
c906108c 8942
97bf5e38
MK
8943 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8944 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8945 cat >> confdefs.h <<\EOF
8946#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8947EOF
c906108c 8948
97bf5e38 8949 fi
c906108c 8950
97bf5e38
MK
8951
8952 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
4f0be353 8953echo "configure:8954: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8954 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8955 echo $ac_n "(cached) $ac_c" 1>&6
8956else
8957 cat > conftest.$ac_ext <<EOF
4f0be353 8958#line 8959 "configure"
97bf5e38
MK
8959#include "confdefs.h"
8960#define _SYSCALL32
8961#include <sys/link.h>
8962int main() {
8963struct link_map32 l;
8964; return 0; }
8965EOF
4f0be353 8966if { (eval echo configure:8967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8967 rm -rf conftest*
8968 gdb_cv_have_struct_link_map32=yes
8969else
8970 echo "configure: failed program was:" >&5
8971 cat conftest.$ac_ext >&5
8972 rm -rf conftest*
8973 gdb_cv_have_struct_link_map32=no
8974fi
8975rm -f conftest*
8976fi
c906108c 8977
97bf5e38
MK
8978 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8979 if test $gdb_cv_have_struct_link_map32 = yes; then
8980 cat >> confdefs.h <<\EOF
8981#define HAVE_STRUCT_LINK_MAP32 1
8982EOF
c906108c 8983
97bf5e38
MK
8984 cat >> confdefs.h <<\EOF
8985#define _SYSCALL32 1
8986EOF
c906108c 8987
97bf5e38
MK
8988 fi
8989fi
c906108c 8990
c906108c 8991
97bf5e38 8992echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
4f0be353 8993echo "configure:8994: checking for long long support in compiler" >&5
97bf5e38
MK
8994if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8995 echo $ac_n "(cached) $ac_c" 1>&6
8996else
8997 cat > conftest.$ac_ext <<EOF
4f0be353 8998#line 8999 "configure"
97bf5e38 8999#include "confdefs.h"
c906108c 9000
97bf5e38 9001int main() {
c906108c 9002
97bf5e38
MK
9003 extern long long foo;
9004 switch (foo & 2) { case 0: return 1; }
c906108c 9005
97bf5e38
MK
9006; return 0; }
9007EOF
4f0be353 9008if { (eval echo configure:9009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9009 rm -rf conftest*
9010 gdb_cv_c_long_long=yes
9011else
9012 echo "configure: failed program was:" >&5
9013 cat conftest.$ac_ext >&5
9014 rm -rf conftest*
9015 gdb_cv_c_long_long=no
9016fi
9017rm -f conftest*
9018fi
c906108c 9019
97bf5e38
MK
9020echo "$ac_t""$gdb_cv_c_long_long" 1>&6
9021if test $gdb_cv_c_long_long = yes; then
9022 cat >> confdefs.h <<\EOF
9023#define CC_HAS_LONG_LONG 1
9024EOF
9025
9026fi
9027
9028
9029echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
4f0be353 9030echo "configure:9031: checking for long long support in printf" >&5
97bf5e38
MK
9031if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
9032 echo $ac_n "(cached) $ac_c" 1>&6
9033else
9034 if test "$cross_compiling" = yes; then
9035 gdb_cv_printf_has_long_long=no
9036else
9037 cat > conftest.$ac_ext <<EOF
4f0be353 9038#line 9039 "configure"
97bf5e38
MK
9039#include "confdefs.h"
9040
9041int main () {
9042 char buf[32];
9043 long long l = 0;
9044 l = (l << 16) + 0x0123;
9045 l = (l << 16) + 0x4567;
9046 l = (l << 16) + 0x89ab;
9047 l = (l << 16) + 0xcdef;
9048 sprintf (buf, "0x%016llx", l);
9049 return (strcmp ("0x0123456789abcdef", buf));
c906108c 9050}
97bf5e38 9051EOF
4f0be353 9052if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9053then
9054 gdb_cv_printf_has_long_long=yes
9055else
9056 echo "configure: failed program was:" >&5
9057 cat conftest.$ac_ext >&5
9058 rm -fr conftest*
9059 gdb_cv_printf_has_long_long=no
9060fi
9061rm -fr conftest*
9062fi
9063
9064fi
9065
9066if test $gdb_cv_printf_has_long_long = yes; then
9067 cat >> confdefs.h <<\EOF
9068#define PRINTF_HAS_LONG_LONG 1
9069EOF
9070
9071fi
9072echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
9073
9074
9075echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
4f0be353 9076echo "configure:9077: checking for long double support in compiler" >&5
97bf5e38
MK
9077if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
9078 echo $ac_n "(cached) $ac_c" 1>&6
9079else
9080 cat > conftest.$ac_ext <<EOF
4f0be353 9081#line 9082 "configure"
97bf5e38
MK
9082#include "confdefs.h"
9083
9084int main() {
9085long double foo;
9086; return 0; }
9087EOF
4f0be353 9088if { (eval echo configure:9089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9089 rm -rf conftest*
9090 ac_cv_c_long_double=yes
9091else
9092 echo "configure: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094 rm -rf conftest*
9095 ac_cv_c_long_double=no
9096fi
9097rm -f conftest*
9098fi
c906108c 9099
97bf5e38
MK
9100echo "$ac_t""$ac_cv_c_long_double" 1>&6
9101if test $ac_cv_c_long_double = yes; then
9102 cat >> confdefs.h <<\EOF
9103#define HAVE_LONG_DOUBLE 1
c906108c 9104EOF
97bf5e38
MK
9105
9106fi
9107
9108
9109echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
4f0be353 9110echo "configure:9111: checking for long double support in printf" >&5
97bf5e38
MK
9111if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
9112 echo $ac_n "(cached) $ac_c" 1>&6
9113else
9114 if test "$cross_compiling" = yes; then
9115 gdb_cv_printf_has_long_double=no
9116else
9117 cat > conftest.$ac_ext <<EOF
4f0be353 9118#line 9119 "configure"
97bf5e38
MK
9119#include "confdefs.h"
9120
9121int main () {
9122 char buf[16];
9123 long double f = 3.141592653;
9124 sprintf (buf, "%Lg", f);
9125 return (strncmp ("3.14159", buf, 7));
9126}
9127EOF
4f0be353 9128if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 9129then
97bf5e38 9130 gdb_cv_printf_has_long_double=yes
c906108c
SS
9131else
9132 echo "configure: failed program was:" >&5
9133 cat conftest.$ac_ext >&5
9134 rm -fr conftest*
97bf5e38 9135 gdb_cv_printf_has_long_double=no
c906108c
SS
9136fi
9137rm -fr conftest*
9138fi
9139
9140fi
9141
97bf5e38 9142if test $gdb_cv_printf_has_long_double = yes; then
c906108c 9143 cat >> confdefs.h <<\EOF
97bf5e38
MK
9144#define PRINTF_HAS_LONG_DOUBLE 1
9145EOF
9146
9147fi
9148echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
9149
9150
9151echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
4f0be353 9152echo "configure:9153: checking for long double support in scanf" >&5
97bf5e38
MK
9153if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
9154 echo $ac_n "(cached) $ac_c" 1>&6
9155else
9156 if test "$cross_compiling" = yes; then
9157 gdb_cv_scanf_has_long_double=no
9158else
9159 cat > conftest.$ac_ext <<EOF
4f0be353 9160#line 9161 "configure"
97bf5e38
MK
9161#include "confdefs.h"
9162
9163int main () {
9164 char *buf = "3.141592653";
9165 long double f = 0;
9166 sscanf (buf, "%Lg", &f);
9167 return !(f > 3.14159 && f < 3.14160);
9168}
c906108c 9169EOF
4f0be353 9170if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9171then
9172 gdb_cv_scanf_has_long_double=yes
9173else
9174 echo "configure: failed program was:" >&5
9175 cat conftest.$ac_ext >&5
9176 rm -fr conftest*
9177 gdb_cv_scanf_has_long_double=no
9178fi
9179rm -fr conftest*
9180fi
c906108c
SS
9181
9182fi
9183
97bf5e38
MK
9184if test $gdb_cv_scanf_has_long_double = yes; then
9185 cat >> confdefs.h <<\EOF
9186#define SCANF_HAS_LONG_DOUBLE 1
9187EOF
9188
9189fi
9190echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 9191
438013df
AO
9192case ${host_os} in
9193aix*)
9194 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
4f0be353 9195echo "configure:9196: checking for -bbigtoc option" >&5
438013df
AO
9196if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9197 echo $ac_n "(cached) $ac_c" 1>&6
9198else
9199
9200 SAVE_LDFLAGS=$LDFLAGS
9201
9202 case $GCC in
9203 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9204 *) gdb_cv_bigtoc=-bbigtoc ;;
9205 esac
9206
9207 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9208 cat > conftest.$ac_ext <<EOF
4f0be353 9209#line 9210 "configure"
438013df
AO
9210#include "confdefs.h"
9211
9212int main() {
9213int i;
9214; return 0; }
9215EOF
4f0be353 9216if { (eval echo configure:9217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
9217 :
9218else
9219 echo "configure: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 rm -rf conftest*
9222 gdb_cv_bigtoc=
9223fi
9224rm -f conftest*
ec76baa5 9225 LDFLAGS="${SAVE_LDFLAGS}"
438013df
AO
9226
9227fi
9228
9229echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9230 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9231 ;;
9232esac
9233
c906108c
SS
9234
9235
9236if test ${build} = ${host} -a ${host} = ${target} ; then
9237 case ${host_os} in
9238 hpux*)
9239 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4f0be353 9240echo "configure:9241: checking for HPUX/OSF thread support" >&5
c906108c
SS
9241 if test -f /usr/include/dce/cma_config.h ; then
9242 if test "$GCC" = "yes" ; then
9243 echo "$ac_t""yes" 1>&6
9244 cat >> confdefs.h <<\EOF
9245#define HAVE_HPUX_THREAD_SUPPORT 1
9246EOF
9247
3483b318 9248 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9249 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9250 else
9251 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9252 fi
9253 else
9254 echo "$ac_t""no" 1>&6
9255 fi
9256 ;;
9257 solaris*)
d92419e5
JB
9258 # See if thread_db library is around for Solaris thread debugging.
9259 # Note that we must explicitly test for version 1 of the library
9260 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9261 # the same API.
c906108c 9262 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4f0be353 9263echo "configure:9264: checking for Solaris thread debugging library" >&5
c906108c
SS
9264 if test -f /usr/lib/libthread_db.so.1 ; then
9265 echo "$ac_t""yes" 1>&6
9266 cat >> confdefs.h <<\EOF
9267#define HAVE_THREAD_DB_LIB 1
9268EOF
9269
3483b318 9270 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9271 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9272 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4f0be353 9273echo "configure:9274: checking for dlopen in -ldl" >&5
c906108c
SS
9274ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9275if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9276 echo $ac_n "(cached) $ac_c" 1>&6
9277else
9278 ac_save_LIBS="$LIBS"
9279LIBS="-ldl $LIBS"
9280cat > conftest.$ac_ext <<EOF
4f0be353 9281#line 9282 "configure"
c906108c
SS
9282#include "confdefs.h"
9283/* Override any gcc2 internal prototype to avoid an error. */
9284/* We use char because int might match the return type of a gcc2
9285 builtin and then its argument prototype would still apply. */
9286char dlopen();
9287
9288int main() {
9289dlopen()
9290; return 0; }
9291EOF
4f0be353 9292if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9293 rm -rf conftest*
9294 eval "ac_cv_lib_$ac_lib_var=yes"
9295else
9296 echo "configure: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9298 rm -rf conftest*
9299 eval "ac_cv_lib_$ac_lib_var=no"
9300fi
9301rm -f conftest*
9302LIBS="$ac_save_LIBS"
9303
9304fi
9305if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9306 echo "$ac_t""yes" 1>&6
9307 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9308 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9309 cat >> confdefs.h <<EOF
9310#define $ac_tr_lib 1
9311EOF
9312
9313 LIBS="-ldl $LIBS"
9314
9315else
9316 echo "$ac_t""no" 1>&6
9317fi
9318
9319 if test "$GCC" = "yes" ; then
9320 # The GNU linker requires the -export-dynamic option to make
9321 # all symbols visible in the dynamic symbol table.
9322 hold_ldflags=$LDFLAGS
9323 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4f0be353 9324echo "configure:9325: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9325 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9326 cat > conftest.$ac_ext <<EOF
4f0be353 9327#line 9328 "configure"
c906108c
SS
9328#include "confdefs.h"
9329
9330int main() {
9331int i;
9332; return 0; }
9333EOF
4f0be353 9334if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9335 rm -rf conftest*
9336 found=yes
9337else
9338 echo "configure: failed program was:" >&5
9339 cat conftest.$ac_ext >&5
9340 rm -rf conftest*
9341 found=no
9342fi
9343rm -f conftest*
9344 LDFLAGS=$hold_ldflags
9345 echo "$ac_t""$found" 1>&6
9346 if test $found = yes; then
9347 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9348 fi
9349 fi
9350 # Sun randomly tweaked the prototypes in <proc_service.h>
9351 # at one point.
9352 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
4f0be353 9353echo "configure:9354: checking if <proc_service.h> is old" >&5
c906108c
SS
9354 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9355 echo $ac_n "(cached) $ac_c" 1>&6
9356else
9357
9358 cat > conftest.$ac_ext <<EOF
4f0be353 9359#line 9360 "configure"
c906108c
SS
9360#include "confdefs.h"
9361
9362 #include <proc_service.h>
9363 ps_err_e ps_pdwrite
9364 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9365
9366int main() {
9367
9368; return 0; }
9369EOF
4f0be353 9370if { (eval echo configure:9371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9371 rm -rf conftest*
9372 gdb_cv_proc_service_is_old=no
9373else
9374 echo "configure: failed program was:" >&5
9375 cat conftest.$ac_ext >&5
9376 rm -rf conftest*
9377 gdb_cv_proc_service_is_old=yes
9378fi
9379rm -f conftest*
9380
9381fi
9382
9383 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9384 if test $gdb_cv_proc_service_is_old = yes; then
9385 cat >> confdefs.h <<\EOF
9386#define PROC_SERVICE_IS_OLD 1
9387EOF
9388
9389 fi
9390 else
9391 echo "$ac_t""no" 1>&6
9392 fi
9393 ;;
d92419e5
JB
9394 aix*)
9395 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
4f0be353 9396echo "configure:9397: checking for AiX thread debugging library" >&5
d92419e5
JB
9397 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9398 echo $ac_n "(cached) $ac_c" 1>&6
9399else
9400 cat > conftest.$ac_ext <<EOF
4f0be353 9401#line 9402 "configure"
d92419e5
JB
9402#include "confdefs.h"
9403#include <sys/pthdebug.h>
9404int main() {
9405#ifndef PTHDB_VERSION_3
9406 #error
9407 #endif
9408; return 0; }
9409EOF
4f0be353 9410if { (eval echo configure:9411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9411 rm -rf conftest*
9412 gdb_cv_have_aix_thread_debug=yes
9413else
9414 echo "configure: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 rm -rf conftest*
9417 gdb_cv_have_aix_thread_debug=no
9418fi
9419rm -f conftest*
9420fi
9421
9422 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9423 if test $gdb_cv_have_aix_thread_debug = yes; then
9424 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9425 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9426 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9427 fi
9428 ;;
c906108c
SS
9429 esac
9430
9431fi
9432
3f47be5c
EZ
9433if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9434 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
4f0be353 9435echo "configure:9436: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9436if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9437 echo $ac_n "(cached) $ac_c" 1>&6
9438else
9439 cat > conftest.$ac_ext <<EOF
4f0be353 9440#line 9441 "configure"
3f47be5c
EZ
9441#include "confdefs.h"
9442#include <thread_db.h>
9443int main() {
9444int i = TD_NOTALLOC;
9445; return 0; }
9446EOF
4f0be353 9447if { (eval echo configure:9448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9448 rm -rf conftest*
9449 gdb_cv_thread_db_h_has_td_notalloc=yes
9450else
9451 echo "configure: failed program was:" >&5
9452 cat conftest.$ac_ext >&5
9453 rm -rf conftest*
9454 gdb_cv_thread_db_h_has_td_notalloc=no
9455
9456fi
9457rm -f conftest*
9458
9459fi
9460
9461echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9462fi
9463if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9464 cat >> confdefs.h <<\EOF
9465#define THREAD_DB_HAS_TD_NOTALLOC 1
9466EOF
9467
9468fi
9469
b757528f
JJ
9470if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9471 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
4f0be353 9472echo "configure:9473: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9473if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9474 echo $ac_n "(cached) $ac_c" 1>&6
9475else
9476 cat > conftest.$ac_ext <<EOF
4f0be353 9477#line 9478 "configure"
b757528f
JJ
9478#include "confdefs.h"
9479#include <sys/syscall.h>
9480int main() {
9481int i = __NR_tkill;
9482; return 0; }
9483EOF
4f0be353 9484if { (eval echo configure:9485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9485 rm -rf conftest*
9486 gdb_cv_sys_syscall_h_has_tkill=yes
9487else
9488 echo "configure: failed program was:" >&5
9489 cat conftest.$ac_ext >&5
9490 rm -rf conftest*
9491 gdb_cv_sys_syscall_h_has_tkill=no
9492
9493fi
9494rm -f conftest*
9495
9496fi
9497
9498echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9499fi
9500if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9501 cat >> confdefs.h <<\EOF
9502#define HAVE_TKILL_SYSCALL 1
9503EOF
9504
9505fi
9506
fb40c209 9507
030292b7
DJ
9508# Check whether --with-sysroot or --without-sysroot was given.
9509if test "${with_sysroot+set}" = set; then
9510 withval="$with_sysroot"
9511
9512 case ${with_sysroot} in
715d1656 9513 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9514 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9515 esac
9516
9517 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9518
9519 if test "x$exec_prefix" = xNONE; then
9520 if test "x$prefix" = xNONE; then
9521 test_prefix=/usr/local
9522 else
9523 test_prefix=$prefix
9524 fi
9525 else
9526 test_prefix=$exec_prefix
9527 fi
9528 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9529 "${test_prefix}"|"${test_prefix}/"*|\
9530 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9531 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9532 TARGET_SYSTEM_ROOT_DEFINE="$t"
9533 ;;
9534 esac
9535
9536else
9537
9538 TARGET_SYSTEM_ROOT=
9539 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9540
9541fi
9542
9543
9544
9545
3b851bce
AC
9546# NOTE: Don't add -Wall or -Wunused, they both include
9547# -Wunused-parameter which reports bogus warnings.
9548# NOTE: If you add to this list, remember to update
9549# gdb/doc/gdbint.texinfo.
1decb323 9550build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9551-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9552-Wunused-label -Wunused-function"
d8038014 9553# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9554# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9555# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9556# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9557# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9558# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9559# Check whether --enable-build-warnings or --disable-build-warnings was given.
9560if test "${enable_build_warnings+set}" = set; then
9561 enableval="$enable_build_warnings"
1decb323 9562 case "${enableval}" in
c906108c
SS
9563 yes) ;;
9564 no) build_warnings="-w";;
9565 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9566 build_warnings="${build_warnings} ${t}";;
9567 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9568 build_warnings="${t} ${build_warnings}";;
9569 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9570esac
d4f3574e 9571if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9572 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9573fi
1decb323 9574fi
3b851bce
AC
9575# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9576if test "${enable_gdb_build_warnings+set}" = set; then
9577 enableval="$enable_gdb_build_warnings"
9578 case "${enableval}" in
9579 yes) ;;
9580 no) build_warnings="-w";;
9581 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9582 build_warnings="${build_warnings} ${t}";;
9583 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9584 build_warnings="${t} ${build_warnings}";;
9585 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9586esac
9587if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9588 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9589fi
9590fi
104c1213
JM
9591WARN_CFLAGS=""
9592WERROR_CFLAGS=""
c906108c
SS
9593if test "x${build_warnings}" != x -a "x$GCC" = xyes
9594then
746a987d 9595 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
4f0be353 9596echo "configure:9597: checking compiler warning flags" >&5
746a987d
AC
9597 # Separate out the -Werror flag as some files just cannot be
9598 # compiled with it enabled.
9599 for w in ${build_warnings}; do
9600 case $w in
9601 -Werr*) WERROR_CFLAGS=-Werror ;;
9602 *) # Check that GCC accepts it
4536bbc6
AC
9603 saved_CFLAGS="$CFLAGS"
9604 CFLAGS="$CFLAGS $w"
9605 cat > conftest.$ac_ext <<EOF
4f0be353 9606#line 9607 "configure"
4536bbc6
AC
9607#include "confdefs.h"
9608
9609int main() {
9610
9611; return 0; }
9612EOF
4f0be353 9613if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9614 rm -rf conftest*
9615 WARN_CFLAGS="${WARN_CFLAGS} $w"
9616else
9617 echo "configure: failed program was:" >&5
9618 cat conftest.$ac_ext >&5
9619fi
9620rm -f conftest*
9621 CFLAGS="$saved_CFLAGS"
746a987d
AC
9622 esac
9623 done
9624 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9625fi
9626
9627
104c1213 9628
7a292a7a
SS
9629# In the Cygwin environment, we need some additional flags.
9630echo $ac_n "checking for cygwin""... $ac_c" 1>&6
4f0be353 9631echo "configure:9632: checking for cygwin" >&5
7a292a7a
SS
9632if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9633 echo $ac_n "(cached) $ac_c" 1>&6
9634else
9635 cat > conftest.$ac_ext <<EOF
4f0be353 9636#line 9637 "configure"
7a292a7a
SS
9637#include "confdefs.h"
9638
9639#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9640lose
9641#endif
9642EOF
9643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9644 egrep "lose" >/dev/null 2>&1; then
9645 rm -rf conftest*
9646 gdb_cv_os_cygwin=yes
9647else
9648 rm -rf conftest*
9649 gdb_cv_os_cygwin=no
9650fi
9651rm -f conftest*
9652
9653fi
9654
9655echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9656
aff38e61
AC
9657
9658SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9659case ${host} in
95cbc983
AC
9660 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9661 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9662esac
9663
9664
cd0fc7c3
SS
9665# libreadline needs libuser32.a in a cygwin environment
9666WIN32LIBS=
9667if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9668 WIN32LIBS="-luser32"
9669 case "${target}" in
9670 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9671 ;;
9672 esac
cd0fc7c3 9673fi
c906108c 9674
7a292a7a 9675
3fc11d3e
JM
9676LIBGUI="../libgui/src/libgui.a"
9677GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9678
9679
7a292a7a 9680
3fc11d3e
JM
9681WIN32LDAPP=
9682
9683
9684
d91670b9
CV
9685case "${host}" in
9686*-*-cygwin*)
9687 configdir="win"
9688 ;;
9689*)
9690 configdir="unix"
9691 ;;
9692esac
3fc11d3e
JM
9693
9694GDBTKLIBS=
9695if test "${enable_gdbtk}" = "yes"; then
9696
d1c3b63a
KS
9697 # Gdbtk must have an absolute path to srcdir in order to run
9698 # properly when not installed.
9699 here=`pwd`
9700 cd ${srcdir}
9701 GDBTK_SRC_DIR=`pwd`
9702 cd $here
9703
3fc11d3e
JM
9704
9705#
9706# Ok, lets find the tcl configuration
9707# First, look for one uninstalled.
9708# the alternative search directory is invoked by --with-tclconfig
9709#
9710
9711if test x"${no_tcl}" = x ; then
9712 # we reset no_tcl in case something fails here
9713 no_tcl=true
9714 # Check whether --with-tclconfig or --without-tclconfig was given.
9715if test "${with_tclconfig+set}" = set; then
9716 withval="$with_tclconfig"
9717 with_tclconfig=${withval}
9718fi
9719
9720 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
4f0be353 9721echo "configure:9722: checking for Tcl configuration" >&5
3fc11d3e
JM
9722 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9723 echo $ac_n "(cached) $ac_c" 1>&6
9724else
9725
9726
9727 # First check to see if --with-tclconfig was specified.
9728 if test x"${with_tclconfig}" != x ; then
9729 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9730 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9731 else
9732 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9733 fi
9734 fi
9735
9736 # then check for a private Tcl installation
9737 if test x"${ac_cv_c_tclconfig}" = x ; then
9738 for i in \
9739 ../tcl \
9740 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9741 ../../tcl \
9742 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9743 ../../../tcl \
9744 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9745 if test -f "$i/${configdir}/tclConfig.sh" ; then
9746 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9747 break
9748 fi
9749 done
9750 fi
9751 # check in a few common install locations
9752 if test x"${ac_cv_c_tclconfig}" = x ; then
9753 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9754 if test -f "$i/tclConfig.sh" ; then
9755 ac_cv_c_tclconfig=`(cd $i; pwd)`
9756 break
9757 fi
9758 done
9759 fi
9760 # check in a few other private locations
9761 if test x"${ac_cv_c_tclconfig}" = x ; then
9762 for i in \
9763 ${srcdir}/../tcl \
9764 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9765 if test -f "$i/${configdir}/tclConfig.sh" ; then
9766 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9767 break
9768 fi
9769 done
9770 fi
9771
9772fi
9773
9774 if test x"${ac_cv_c_tclconfig}" = x ; then
9775 TCLCONFIG="# no Tcl configs found"
9776 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9777 else
9778 no_tcl=
9779 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9780 echo "$ac_t""found $TCLCONFIG" 1>&6
9781 fi
9782fi
9783
9784 if test -z "${no_tcl}"; then
9785
9786 . $TCLCONFIG
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
033afc63 9807
3fc11d3e
JM
9808
9809
9810
9811
9812
9813
9814#
9815# Ok, lets find the tk configuration
9816# First, look for one uninstalled.
9817# the alternative search directory is invoked by --with-tkconfig
9818#
9819
9820if test x"${no_tk}" = x ; then
9821 # we reset no_tk in case something fails here
9822 no_tk=true
9823 # Check whether --with-tkconfig or --without-tkconfig was given.
9824if test "${with_tkconfig+set}" = set; then
9825 withval="$with_tkconfig"
9826 with_tkconfig=${withval}
9827fi
9828
9829 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
4f0be353 9830echo "configure:9831: checking for Tk configuration" >&5
3fc11d3e
JM
9831 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9832 echo $ac_n "(cached) $ac_c" 1>&6
9833else
9834
9835
9836 # First check to see if --with-tkconfig was specified.
9837 if test x"${with_tkconfig}" != x ; then
9838 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9839 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9840 else
9841 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9842 fi
9843 fi
9844
9845 # then check for a private Tk library
9846 if test x"${ac_cv_c_tkconfig}" = x ; then
9847 for i in \
9848 ../tk \
9849 `ls -dr ../tk[4-9]* 2>/dev/null` \
9850 ../../tk \
9851 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9852 ../../../tk \
9853 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9854 if test -f "$i/${configdir}/tkConfig.sh" ; then
9855 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9856 break
9857 fi
9858 done
9859 fi
9860 # check in a few common install locations
9861 if test x"${ac_cv_c_tkconfig}" = x ; then
9862 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9863 if test -f "$i/tkConfig.sh" ; then
9864 ac_cv_c_tkconfig=`(cd $i; pwd)`
9865 break
9866 fi
9867 done
9868 fi
9869 # check in a few other private locations
9870 if test x"${ac_cv_c_tkconfig}" = x ; then
9871 for i in \
9872 ${srcdir}/../tk \
9873 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9874 if test -f "$i/${configdir}/tkConfig.sh" ; then
9875 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9876 break
9877 fi
9878 done
9879 fi
9880
9881fi
9882
9883 if test x"${ac_cv_c_tkconfig}" = x ; then
9884 TKCONFIG="# no Tk configs found"
9885 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9886 else
9887 no_tk=
9888 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9889 echo "$ac_t""found $TKCONFIG" 1>&6
9890 fi
9891fi
9892
9893
9894
dd2504ab
JM
9895 # now look for Tcl library stuff
9896
d91670b9 9897 tcldir="../tcl/${configdir}/"
dd2504ab
JM
9898
9899 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9900
3fc11d3e
JM
9901 # If $no_tk is nonempty, then we can't do Tk, and there is no
9902 # point to doing Tcl.
9903 if test -z "${no_tk}"; then
9904
9905 if test -f "$TKCONFIG" ; then
9906 . $TKCONFIG
9907 fi
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922#
9923# Ok, lets find the tcl source trees so we can use the headers
9924# Warning: transition of version 9 to 10 will break this algorithm
9925# because 10 sorts before 9. We also look for just tcl. We have to
9926# be careful that we don't match stuff like tclX by accident.
9927# the alternative search directory is involked by --with-tclinclude
9928#
9929
9930no_tcl=true
9931echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
4f0be353 9932echo "configure:9933: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9933# Check whether --with-tclinclude or --without-tclinclude was given.
9934if test "${with_tclinclude+set}" = set; then
9935 withval="$with_tclinclude"
9936 with_tclinclude=${withval}
9937fi
9938
9939if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9940 echo $ac_n "(cached) $ac_c" 1>&6
9941else
9942
9943# first check to see if --with-tclinclude was specified
9944if test x"${with_tclinclude}" != x ; then
9945 if test -f ${with_tclinclude}/tclInt.h ; then
9946 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9947 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9948 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9949 else
9950 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9951 fi
9952fi
9953
9954# next check if it came with Tcl configuration file
9955if test x"${ac_cv_c_tclconfig}" = x ; then
9956 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9957 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9958 fi
9959fi
9960
9961# next check in private source directory
9962#
9963# since ls returns lowest version numbers first, reverse its output
9964if test x"${ac_cv_c_tclh}" = x ; then
9965 for i in \
9966 ${srcdir}/../tcl \
9967 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9968 ${srcdir}/../../tcl \
9969 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9970 ${srcdir}/../../../tcl \
9971 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9972 if test -f $i/generic/tclInt.h ; then
9973 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9974 break
9975 fi
9976 done
9977fi
9978# finally check in a few common install locations
9979#
9980# since ls returns lowest version numbers first, reverse its output
9981if test x"${ac_cv_c_tclh}" = x ; then
9982 for i in \
9983 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9984 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9985 /usr/local/src/tcl \
9986 /usr/local/lib/tcl \
9987 ${prefix}/include ; do
9988 if test -f $i/generic/tclInt.h ; then
9989 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9990 break
9991 fi
9992 done
9993fi
9994# see if one is installed
9995if test x"${ac_cv_c_tclh}" = x ; then
9996 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9997echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
4f0be353 9998echo "configure:9999: checking for tclInt.h" >&5
3fc11d3e
JM
9999if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10000 echo $ac_n "(cached) $ac_c" 1>&6
10001else
10002 cat > conftest.$ac_ext <<EOF
4f0be353 10003#line 10004 "configure"
3fc11d3e
JM
10004#include "confdefs.h"
10005#include <tclInt.h>
10006EOF
10007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 10008{ (eval echo configure:10009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10010if test -z "$ac_err"; then
10011 rm -rf conftest*
10012 eval "ac_cv_header_$ac_safe=yes"
10013else
10014 echo "$ac_err" >&5
10015 echo "configure: failed program was:" >&5
10016 cat conftest.$ac_ext >&5
10017 rm -rf conftest*
10018 eval "ac_cv_header_$ac_safe=no"
10019fi
10020rm -f conftest*
10021fi
10022if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10023 echo "$ac_t""yes" 1>&6
10024 ac_cv_c_tclh=installed
10025else
10026 echo "$ac_t""no" 1>&6
10027ac_cv_c_tclh=""
10028fi
10029
10030fi
10031
10032fi
10033
10034if test x"${ac_cv_c_tclh}" = x ; then
10035 TCLHDIR="# no Tcl private headers found"
10036 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
10037fi
10038if test x"${ac_cv_c_tclh}" != x ; then
10039 no_tcl=""
10040 if test x"${ac_cv_c_tclh}" = x"installed" ; then
10041 echo "$ac_t""is installed" 1>&6
10042 TCLHDIR=""
10043 else
10044 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
10045 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
10046 TCLHDIR="-I${ac_cv_c_tclh}"
10047 fi
10048fi
10049
10050
10051
10052
10053#
10054# Ok, lets find the tk source trees so we can use the headers
10055# If the directory (presumably symlink) named "tk" exists, use that one
10056# in preference to any others. Same logic is used when choosing library
10057# and again with Tcl. The search order is the best place to look first, then in
10058# decreasing significance. The loop breaks if the trigger file is found.
10059# Note the gross little conversion here of srcdir by cd'ing to the found
10060# directory. This converts the path from a relative to an absolute, so
10061# recursive cache variables for the path will work right. We check all
10062# the possible paths in one loop rather than many seperate loops to speed
10063# things up.
10064# the alternative search directory is involked by --with-tkinclude
10065#
10066no_tk=true
10067echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
4f0be353 10068echo "configure:10069: checking for Tk private headers" >&5
3fc11d3e
JM
10069# Check whether --with-tkinclude or --without-tkinclude was given.
10070if test "${with_tkinclude+set}" = set; then
10071 withval="$with_tkinclude"
10072 with_tkinclude=${withval}
10073fi
10074
10075if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
10076 echo $ac_n "(cached) $ac_c" 1>&6
10077else
10078
10079# first check to see if --with-tkinclude was specified
10080if test x"${with_tkinclude}" != x ; then
10081 if test -f ${with_tkinclude}/tk.h ; then
10082 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
10083 elif test -f ${with_tkinclude}/generic/tk.h ; then
10084 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
10085 else
10086 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
10087 fi
10088fi
10089
10090# next check if it came with Tk configuration file
10091if test x"${ac_cv_c_tkconfig}" = x ; then
10092 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
10093 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
10094 fi
10095fi
10096
10097# next check in private source directory
10098#
10099# since ls returns lowest version numbers first, reverse its output
10100if test x"${ac_cv_c_tkh}" = x ; then
10101 for i in \
10102 ${srcdir}/../tk \
10103 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
10104 ${srcdir}/../../tk \
10105 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
10106 ${srcdir}/../../../tk \
10107 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
10108 if test -f $i/generic/tk.h ; then
10109 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10110 break
10111 fi
10112 done
10113fi
10114# finally check in a few common install locations
10115#
10116# since ls returns lowest version numbers first, reverse its output
10117if test x"${ac_cv_c_tkh}" = x ; then
10118 for i in \
10119 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
10120 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
10121 /usr/local/src/tk \
10122 /usr/local/lib/tk \
10123 ${prefix}/include ; do
10124 if test -f $i/generic/tk.h ; then
10125 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10126 break
10127 fi
10128 done
10129fi
10130# see if one is installed
10131if test x"${ac_cv_c_tkh}" = x ; then
10132 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
10133echo $ac_n "checking for tk.h""... $ac_c" 1>&6
4f0be353 10134echo "configure:10135: checking for tk.h" >&5
3fc11d3e
JM
10135if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10136 echo $ac_n "(cached) $ac_c" 1>&6
10137else
10138 cat > conftest.$ac_ext <<EOF
4f0be353 10139#line 10140 "configure"
3fc11d3e
JM
10140#include "confdefs.h"
10141#include <tk.h>
10142EOF
10143ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 10144{ (eval echo configure:10145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10145ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10146if test -z "$ac_err"; then
10147 rm -rf conftest*
10148 eval "ac_cv_header_$ac_safe=yes"
10149else
10150 echo "$ac_err" >&5
10151 echo "configure: failed program was:" >&5
10152 cat conftest.$ac_ext >&5
10153 rm -rf conftest*
10154 eval "ac_cv_header_$ac_safe=no"
10155fi
10156rm -f conftest*
10157fi
10158if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10159 echo "$ac_t""yes" 1>&6
10160 ac_cv_c_tkh=installed
10161else
10162 echo "$ac_t""no" 1>&6
10163ac_cv_c_tkh=""
10164fi
10165
10166fi
10167
10168fi
10169
10170if test x"${ac_cv_c_tkh}" != x ; then
10171 no_tk=""
10172 if test x"${ac_cv_c_tkh}" = x"installed" ; then
10173 echo "$ac_t""is installed" 1>&6
10174 TKHDIR=""
10175 else
10176 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
10177 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
10178 TKHDIR="-I${ac_cv_c_tkh}"
10179 fi
10180else
10181 TKHDIR="# no Tk directory found"
10182 echo "configure: warning: Can't find Tk private headers" 1>&2
10183 no_tk=true
10184fi
10185
10186
10187
10188
10189echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4f0be353 10190echo "configure:10191: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10191if test x"${ac_cv_c_itclh}" = x ; then
10192 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
10193 if test -f $i/generic/itcl.h ; then
10194 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10195 break
10196 fi
10197 done
10198fi
10199if test x"${ac_cv_c_itclh}" = x ; then
10200 ITCLHDIR="# no Itcl private headers found"
10201 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10202fi
10203if test x"${ac_cv_c_itclh}" != x ; then
10204 ITCLHDIR="-I${ac_cv_c_itclh}"
10205fi
10206# should always be here
10207# ITCLLIB="../itcl/itcl/unix/libitcl.a"
10208
10209#AC_SUBST(ITCLLIB)
10210
10211
10212echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4f0be353 10213echo "configure:10214: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10214if test x"${ac_cv_c_itkh}" = x ; then
10215 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10216 if test -f $i/generic/itk.h ; then
10217 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10218 break
10219 fi
10220 done
10221fi
10222if test x"${ac_cv_c_itkh}" = x ; then
10223 ITKHDIR="# no Itk private headers found"
10224 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10225fi
10226if test x"${ac_cv_c_itkh}" != x ; then
10227 ITKHDIR="-I${ac_cv_c_itkh}"
10228fi
10229# should always be here
10230# ITKLIB="../itcl/itk/unix/libitk.a"
10231
10232#AC_SUBST(ITKLIB)
10233
3fc11d3e 10234
dd2504ab
JM
10235
10236 # now look for Tk library stuff
10237
d91670b9 10238 tkdir="../tk/${configdir}/"
dd2504ab
JM
10239
10240 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10241
3fc11d3e
JM
10242 # now look for Itcl library stuff
10243
10244
10245#
10246# Ok, lets find the itcl configuration
10247# First, look for one uninstalled.
10248# the alternative search directory is invoked by --with-itclconfig
10249#
10250
10251if test x"${no_itcl}" = x ; then
10252 # we reset no_itcl in case something fails here
10253 no_itcl=true
10254 # Check whether --with-itclconfig or --without-itclconfig was given.
10255if test "${with_itclconfig+set}" = set; then
10256 withval="$with_itclconfig"
10257 with_itclconfig=${withval}
10258fi
10259
10260 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
4f0be353 10261echo "configure:10262: checking for Itcl configuration" >&5
3fc11d3e
JM
10262 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10263 echo $ac_n "(cached) $ac_c" 1>&6
10264else
10265
10266
10267 # First check to see if --with-itclconfig was specified.
10268 if test x"${with_itclconfig}" != x ; then
10269 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10270 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10271 else
10272 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10273 fi
10274 fi
10275
10276 # then check for a private Itcl library
10277 if test x"${ac_cv_c_itclconfig}" = x ; then
10278 for i in \
10279 ../itcl/itcl \
10280 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10281 ../../itcl \
10282 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10283 ../../../itcl \
10284 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10285 if test -f "$i/itclConfig.sh" ; then
10286 ac_cv_c_itclconfig=`(cd $i; pwd)`
10287 break
10288 fi
10289 done
10290 fi
10291 # check in a few common install locations
10292 if test x"${ac_cv_c_itclconfig}" = x ; then
10293 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10294 if test -f "$i/itclConfig.sh" ; then
10295 ac_cv_c_itclconfig=`(cd $i; pwd)`
10296 break
10297 fi
10298 done
10299 fi
10300 # check in a few other private locations
10301 if test x"${ac_cv_c_itclconfig}" = x ; then
10302 for i in \
10303 ${srcdir}/../itcl/itcl \
10304 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10305 if test -f "$i/itclConfig.sh" ; then
10306 ac_cv_c_itclconfig=`(cd $i; pwd)`
10307 break
10308 fi
10309 done
10310 fi
10311
10312fi
10313
10314 if test x"${ac_cv_c_itclconfig}" = x ; then
10315 ITCLCONFIG="# no Itcl configs found"
10316 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10317 else
10318 no_itcl=
10319 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10320 echo "$ac_t""found $ITCLCONFIG" 1>&6
10321 fi
10322fi
10323
10324 if test -z "${no_itcl}"; then
10325
10326 if test -f "$ITCLCONFIG" ; then
10327 . $ITCLCONFIG
10328 fi
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
3fc11d3e
JM
10339
10340
10341 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10342 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10343 fi
10344
10345
10346 # now look for Itk library stuff
10347
10348#
10349# Ok, lets find the itk configuration
10350# First, look for one uninstalled.
10351# the alternative search directory is invoked by --with-itkconfig
10352#
10353
10354if test x"${no_itk}" = x ; then
10355 # we reset no_itk in case something fails here
10356 no_itk=true
10357 # Check whether --with-itkconfig or --without-itkconfig was given.
10358if test "${with_itkconfig+set}" = set; then
10359 withval="$with_itkconfig"
10360 with_itkconfig=${withval}
10361fi
10362
10363 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
4f0be353 10364echo "configure:10365: checking for Itk configuration" >&5
3fc11d3e
JM
10365 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10366 echo $ac_n "(cached) $ac_c" 1>&6
10367else
10368
10369
10370 # First check to see if --with-itkconfig was specified.
10371 if test x"${with_itkconfig}" != x ; then
10372 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10373 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10374 else
10375 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10376 fi
10377 fi
10378
10379 # then check for a private Itk library
10380 if test x"${ac_cv_c_itkconfig}" = x ; then
10381 for i in \
10382 ../itcl/itk \
10383 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10384 ../../itk \
10385 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10386 ../../../itk \
10387 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10388 if test -f "$i/itkConfig.sh" ; then
10389 ac_cv_c_itkconfig=`(cd $i; pwd)`
10390 break
10391 fi
10392 done
10393 fi
10394 # check in a few common install locations
10395 if test x"${ac_cv_c_itkconfig}" = x ; then
10396 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10397 if test -f "$i/itkConfig.sh" ; then
10398 ac_cv_c_itkconfig=`(cd $i; pwd)`
10399 break
10400 fi
10401 done
10402 fi
10403 # check in a few other private locations
10404 if test x"${ac_cv_c_itkconfig}" = x ; then
10405 for i in \
10406 ${srcdir}/../itcl/itk \
10407 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10408 if test -f "$i/itkConfig.sh" ; then
10409 ac_cv_c_itkconfig=`(cd $i; pwd)`
10410 break
10411 fi
10412 done
10413 fi
10414
10415fi
10416
10417 if test x"${ac_cv_c_itkconfig}" = x ; then
10418 ITKCONFIG="# no Itk configs found"
10419 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10420 else
10421 no_itk=
10422 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10423 echo "$ac_t""found $ITKCONFIG" 1>&6
10424 fi
10425fi
10426
10427
10428 if test -z "${no_itcl}"; then
10429
10430 if test -f "$ITKCONFIG" ; then
10431 . $ITKCONFIG
10432 fi
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
3fc11d3e 10445 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10446 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10447 fi
10448
4226a5a5 10449 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10450 # Tcl/Tk 8.1 require -fwritable strings. I don't
10451 # know whether 8.2 will or not, but I bet it will.
10452 # I don't have to worry about 7.x since we don't support it.
10453 GDBTK_CFLAGS=""
10454 if test "$GCC" = "yes"; then
10455 if test "$TCL_VERSION" != "8.0" ; then
10456 GDBTK_CFLAGS="-fwritable-strings"
10457 fi
10458 fi
10459
10460 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10461 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10462 # Yes, the ordering seems wrong here. But it isn't.
10463 # TK_LIBS is the list of libraries that need to be linked
10464 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10465 # were in LIBS then any link tests after this point would
10466 # try to include things like `$(LIBGUI)', which wouldn't work.
10467 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10468
10469 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10470 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10471 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10472 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10473 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10474 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10475 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10476
10477 if test x$gdb_cv_os_cygwin = xyes; then
10478 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10479 WIN32LDAPP="-Wl,--subsystem,console"
10480 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10481 fi
10482 fi
10483 fi
ffc6a242 10484
ffc6a242 10485 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10486fi
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
dd2504ab 10500
c906108c
SS
10501# If we find X, set shell vars x_includes and x_libraries to the
10502# paths, otherwise set no_x=yes.
10503# Uses ac_ vars as temps to allow command line to override cache and checks.
10504# --without-x overrides everything else, but does not touch the cache.
10505echo $ac_n "checking for X""... $ac_c" 1>&6
4f0be353 10506echo "configure:10507: checking for X" >&5
c906108c
SS
10507
10508# Check whether --with-x or --without-x was given.
10509if test "${with_x+set}" = set; then
10510 withval="$with_x"
10511 :
10512fi
10513
10514# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10515if test "x$with_x" = xno; then
10516 # The user explicitly disabled X.
10517 have_x=disabled
10518else
10519 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10520 # Both variables are already set.
10521 have_x=yes
10522 else
10523if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10524 echo $ac_n "(cached) $ac_c" 1>&6
10525else
10526 # One or both of the vars are not set, and there is no cached value.
10527ac_x_includes=NO ac_x_libraries=NO
10528rm -fr conftestdir
10529if mkdir conftestdir; then
10530 cd conftestdir
10531 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10532 cat > Imakefile <<'EOF'
10533acfindx:
10534 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10535EOF
10536 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10537 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10538 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10539 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10540 for ac_extension in a so sl; do
10541 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10542 test -f $ac_im_libdir/libX11.$ac_extension; then
10543 ac_im_usrlibdir=$ac_im_libdir; break
10544 fi
10545 done
10546 # Screen out bogus values from the imake configuration. They are
10547 # bogus both because they are the default anyway, and because
10548 # using them would break gcc on systems where it needs fixed includes.
10549 case "$ac_im_incroot" in
10550 /usr/include) ;;
10551 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10552 esac
10553 case "$ac_im_usrlibdir" in
10554 /usr/lib | /lib) ;;
10555 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10556 esac
10557 fi
10558 cd ..
10559 rm -fr conftestdir
10560fi
10561
10562if test "$ac_x_includes" = NO; then
10563 # Guess where to find include files, by looking for this one X11 .h file.
10564 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10565
10566 # First, try using that file with no special directory specified.
10567cat > conftest.$ac_ext <<EOF
4f0be353 10568#line 10569 "configure"
c906108c
SS
10569#include "confdefs.h"
10570#include <$x_direct_test_include>
10571EOF
10572ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4f0be353 10573{ (eval echo configure:10574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10574ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10575if test -z "$ac_err"; then
10576 rm -rf conftest*
10577 # We can compile using X headers with no special include directory.
10578ac_x_includes=
10579else
10580 echo "$ac_err" >&5
10581 echo "configure: failed program was:" >&5
10582 cat conftest.$ac_ext >&5
10583 rm -rf conftest*
10584 # Look for the header file in a standard set of common directories.
10585# Check X11 before X11Rn because it is often a symlink to the current release.
10586 for ac_dir in \
10587 /usr/X11/include \
10588 /usr/X11R6/include \
10589 /usr/X11R5/include \
10590 /usr/X11R4/include \
10591 \
10592 /usr/include/X11 \
10593 /usr/include/X11R6 \
10594 /usr/include/X11R5 \
10595 /usr/include/X11R4 \
10596 \
10597 /usr/local/X11/include \
10598 /usr/local/X11R6/include \
10599 /usr/local/X11R5/include \
10600 /usr/local/X11R4/include \
10601 \
10602 /usr/local/include/X11 \
10603 /usr/local/include/X11R6 \
10604 /usr/local/include/X11R5 \
10605 /usr/local/include/X11R4 \
10606 \
10607 /usr/X386/include \
10608 /usr/x386/include \
10609 /usr/XFree86/include/X11 \
10610 \
10611 /usr/include \
10612 /usr/local/include \
10613 /usr/unsupported/include \
10614 /usr/athena/include \
10615 /usr/local/x11r5/include \
10616 /usr/lpp/Xamples/include \
10617 \
10618 /usr/openwin/include \
10619 /usr/openwin/share/include \
10620 ; \
10621 do
10622 if test -r "$ac_dir/$x_direct_test_include"; then
10623 ac_x_includes=$ac_dir
10624 break
10625 fi
10626 done
10627fi
10628rm -f conftest*
10629fi # $ac_x_includes = NO
10630
10631if test "$ac_x_libraries" = NO; then
10632 # Check for the libraries.
10633
10634 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10635 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10636
10637 # See if we find them without any special options.
10638 # Don't add to $LIBS permanently.
10639 ac_save_LIBS="$LIBS"
10640 LIBS="-l$x_direct_test_library $LIBS"
10641cat > conftest.$ac_ext <<EOF
4f0be353 10642#line 10643 "configure"
c906108c
SS
10643#include "confdefs.h"
10644
10645int main() {
10646${x_direct_test_function}()
10647; return 0; }
10648EOF
4f0be353 10649if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10650 rm -rf conftest*
10651 LIBS="$ac_save_LIBS"
10652# We can link X programs with no special library path.
10653ac_x_libraries=
10654else
10655 echo "configure: failed program was:" >&5
10656 cat conftest.$ac_ext >&5
10657 rm -rf conftest*
10658 LIBS="$ac_save_LIBS"
10659# First see if replacing the include by lib works.
10660# Check X11 before X11Rn because it is often a symlink to the current release.
10661for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10662 /usr/X11/lib \
10663 /usr/X11R6/lib \
10664 /usr/X11R5/lib \
10665 /usr/X11R4/lib \
10666 \
10667 /usr/lib/X11 \
10668 /usr/lib/X11R6 \
10669 /usr/lib/X11R5 \
10670 /usr/lib/X11R4 \
10671 \
10672 /usr/local/X11/lib \
10673 /usr/local/X11R6/lib \
10674 /usr/local/X11R5/lib \
10675 /usr/local/X11R4/lib \
10676 \
10677 /usr/local/lib/X11 \
10678 /usr/local/lib/X11R6 \
10679 /usr/local/lib/X11R5 \
10680 /usr/local/lib/X11R4 \
10681 \
10682 /usr/X386/lib \
10683 /usr/x386/lib \
10684 /usr/XFree86/lib/X11 \
10685 \
10686 /usr/lib \
10687 /usr/local/lib \
10688 /usr/unsupported/lib \
10689 /usr/athena/lib \
10690 /usr/local/x11r5/lib \
10691 /usr/lpp/Xamples/lib \
10692 /lib/usr/lib/X11 \
10693 \
10694 /usr/openwin/lib \
10695 /usr/openwin/share/lib \
10696 ; \
10697do
10698 for ac_extension in a so sl; do
10699 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10700 ac_x_libraries=$ac_dir
10701 break 2
10702 fi
10703 done
10704done
10705fi
10706rm -f conftest*
10707fi # $ac_x_libraries = NO
10708
10709if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10710 # Didn't find X anywhere. Cache the known absence of X.
10711 ac_cv_have_x="have_x=no"
10712else
10713 # Record where we found X for the cache.
10714 ac_cv_have_x="have_x=yes \
10715 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10716fi
10717fi
10718 fi
10719 eval "$ac_cv_have_x"
10720fi # $with_x != no
10721
10722if test "$have_x" != yes; then
10723 echo "$ac_t""$have_x" 1>&6
10724 no_x=yes
10725else
10726 # If each of the values was on the command line, it overrides each guess.
10727 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10728 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10729 # Update the cache value to reflect the command line values.
10730 ac_cv_have_x="have_x=yes \
10731 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10732 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10733fi
10734
10735
7a292a7a
SS
10736
10737# Unlike the sim directory, whether a simulator is linked is controlled by
10738# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10739# This code just checks for a few cases where we'd like to ignore those
10740# definitions, even when they're present in the '.mt' file. These cases
10741# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10742# not part of the source tree.
7a292a7a
SS
10743#
10744# Check whether --enable-sim or --disable-sim was given.
10745if test "${enable_sim+set}" = set; then
10746 enableval="$enable_sim"
10747 echo "enable_sim = $enable_sim";
10748 echo "enableval = ${enableval}";
10749 case "${enableval}" in
10750 yes) ignore_sim=false ;;
10751 no) ignore_sim=true ;;
10752 *) ignore_sim=false ;;
10753 esac
10754else
10755 ignore_sim=false
10756fi
10757
10758
10759if test ! -d "${srcdir}/../sim"; then
10760 ignore_sim=true
10761fi
10762
10763if test "${ignore_sim}" = "true"; then
10764 IGNORE_SIM="SIM="
10765 IGNORE_SIM_OBS="SIM_OBS="
10766else
10767 IGNORE_SIM=""
10768 IGNORE_SIM_OBS=""
10769 cat >> confdefs.h <<\EOF
10770#define WITH_SIM 1
10771EOF
10772
10773fi
10774
10775
10776
c906108c
SS
10777
10778
10779
10780
10781
10782
dfcd3bfb 10783
e56ac5c3
AC
10784
10785
b3a90332
AC
10786
10787
c35f4ffc
AC
10788# List of host floatformats.
10789cat >> confdefs.h <<EOF
10790#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10791EOF
10792
10793cat >> confdefs.h <<EOF
10794#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10795EOF
10796
10797cat >> confdefs.h <<EOF
10798#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10799EOF
10800
10801
c906108c
SS
10802# target_subdir is used by the testsuite to find the target libraries.
10803target_subdir=
10804if test "${host}" != "${target}"; then
10805 target_subdir="${target_alias}/"
10806fi
10807
10808
10809frags=
10810host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10811if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10812 # When building a native debuger the .mh file containing things
10813 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10814 # since it no longer contains anything useful.
10815 if test "${target}" = "${host}"; then
10816 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10817 else
10818 host_makefile_frag=/dev/null
10819 fi
c906108c
SS
10820fi
10821frags="$frags $host_makefile_frag"
10822
10823target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10824if test ! -f ${target_makefile_frag}; then
10825{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10826fi
10827frags="$frags $target_makefile_frag"
10828
10829
10830
10831
10832
10833hostfile=`sed -n '
10834s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10835' ${host_makefile_frag}`
10836
10837targetfile=`sed -n '
2c0fc042 10838s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
c906108c
SS
10839' ${target_makefile_frag}`
10840
c906108c 10841if test "${target}" = "${host}"; then
a85f51e7
DJ
10842# We pick this up from the host configuration file (.mh) because we
10843# do not have a native configuration Makefile fragment.
c906108c
SS
10844nativefile=`sed -n '
10845s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10846' ${host_makefile_frag}`
c906108c
SS
10847fi
10848
10849
b00a8037
DJ
10850if test x"${gdb_osabi}" != x ; then
10851 cat >> confdefs.h <<EOF
10852#define GDB_OSABI_DEFAULT $gdb_osabi
10853EOF
10854
10855fi
10856
8dcde887
MK
10857# Enable multi-ice-gdb-server.
10858# Check whether --enable-multi-ice or --disable-multi-ice was given.
10859if test "${enable_multi_ice+set}" = set; then
10860 enableval="$enable_multi_ice"
10861 case $enableval in
10862 yes | no)
10863 ;;
10864 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10865 esac
96baa820
JM
10866fi
10867
8dcde887
MK
10868if test "x$enable_multi_ice" = xyes; then
10869 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10870fi
10871
8dcde887
MK
10872# We only build gdbserver automatically if host and target are the same.
10873if test "x$target" = "x$host"; then
10874 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
4f0be353 10875echo "configure:10876: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10876 if test "x$build_gdbserver" = xyes; then
10877 configdirs="$configdirs gdbserver"
10878 echo "$ac_t""yes" 1>&6
10879 else
10880 echo "$ac_t""no" 1>&6
10881 fi
10882fi
10883
10884subdirs="doc testsuite $configdirs"
10885
96baa820 10886
2c0fc042
AC
10887# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
10888# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
10889# to an empty version.
c906108c
SS
10890
10891files=
10892links=
5a2402b8 10893
c906108c 10894rm -f xm.h
5a2402b8 10895xm_h=""
c906108c 10896if test "${hostfile}" != ""; then
5a2402b8 10897 xm_h=xm.h
0f475e27
AC
10898 case "${hostfile}" in
10899 xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
10900 * ) GDB_XM_FILE="${hostfile}"
10901 esac
5a2402b8
AC
10902 files="${files} ${GDB_XM_FILE}"
10903 links="${links} xm.h"
10904 cat >> confdefs.h <<EOF
b78960be 10905#define GDB_XM_FILE "${GDB_XM_FILE}"
5a2402b8
AC
10906EOF
10907
c906108c 10908fi
5a2402b8
AC
10909
10910
c906108c 10911rm -f tm.h
5a2402b8 10912tm_h=""
c906108c 10913if test "${targetfile}" != ""; then
5a2402b8 10914 tm_h=tm.h
0f475e27 10915 case "${targetfile}" in
b8c4aece 10916 tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
0f475e27
AC
10917 * ) GDB_TM_FILE="${targetfile}"
10918 esac
5a2402b8
AC
10919 files="${files} ${GDB_TM_FILE}"
10920 links="${links} tm.h"
10921 cat >> confdefs.h <<EOF
b78960be 10922#define GDB_TM_FILE "${GDB_TM_FILE}"
5a2402b8
AC
10923EOF
10924
c906108c 10925fi
5a2402b8
AC
10926
10927
c906108c 10928rm -f nm.h
5a2402b8 10929nm_h=""
c906108c 10930if test "${nativefile}" != ""; then
5a2402b8 10931 nm_h=nm.h
0f475e27
AC
10932 case "${nativefile}" in
10933 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
10934 * ) GDB_NM_FILE="${nativefile}"
10935 esac
5a2402b8
AC
10936 files="${files} ${GDB_NM_FILE}"
10937 links="${links} nm.h"
10938 cat >> confdefs.h <<EOF
b78960be 10939#define GDB_NM_FILE "${GDB_NM_FILE}"
5a2402b8
AC
10940EOF
10941
c906108c 10942fi
5a2402b8
AC
10943
10944
c906108c
SS
10945
10946
10947echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4f0be353 10948echo "configure:10949: checking for Cygwin environment" >&5
c906108c
SS
10949if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10950 echo $ac_n "(cached) $ac_c" 1>&6
10951else
10952 cat > conftest.$ac_ext <<EOF
4f0be353 10953#line 10954 "configure"
c906108c
SS
10954#include "confdefs.h"
10955
10956int main() {
10957
10958#ifndef __CYGWIN__
10959#define __CYGWIN__ __CYGWIN32__
10960#endif
10961return __CYGWIN__;
10962; return 0; }
10963EOF
4f0be353 10964if { (eval echo configure:10965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10965 rm -rf conftest*
10966 ac_cv_cygwin=yes
10967else
10968 echo "configure: failed program was:" >&5
10969 cat conftest.$ac_ext >&5
10970 rm -rf conftest*
10971 ac_cv_cygwin=no
10972fi
10973rm -f conftest*
10974rm -f conftest*
10975fi
10976
10977echo "$ac_t""$ac_cv_cygwin" 1>&6
10978CYGWIN=
10979test "$ac_cv_cygwin" = yes && CYGWIN=yes
10980echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4f0be353 10981echo "configure:10982: checking for mingw32 environment" >&5
c906108c
SS
10982if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10983 echo $ac_n "(cached) $ac_c" 1>&6
10984else
10985 cat > conftest.$ac_ext <<EOF
4f0be353 10986#line 10987 "configure"
c906108c
SS
10987#include "confdefs.h"
10988
10989int main() {
10990return __MINGW32__;
10991; return 0; }
10992EOF
4f0be353 10993if { (eval echo configure:10994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10994 rm -rf conftest*
10995 ac_cv_mingw32=yes
10996else
10997 echo "configure: failed program was:" >&5
10998 cat conftest.$ac_ext >&5
10999 rm -rf conftest*
11000 ac_cv_mingw32=no
11001fi
11002rm -f conftest*
11003rm -f conftest*
11004fi
11005
11006echo "$ac_t""$ac_cv_mingw32" 1>&6
11007MINGW32=
11008test "$ac_cv_mingw32" = yes && MINGW32=yes
11009
11010
11011echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4f0be353 11012echo "configure:11013: checking for executable suffix" >&5
c906108c
SS
11013if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
11014 echo $ac_n "(cached) $ac_c" 1>&6
11015else
11016 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
11017 ac_cv_exeext=.exe
11018else
11019 rm -f conftest*
11020 echo 'int main () { return 0; }' > conftest.$ac_ext
11021 ac_cv_exeext=
4f0be353 11022 if { (eval echo configure:11023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
11023 for file in conftest.*; do
11024 case $file in
4f0be353 11025 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
11026 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
11027 esac
11028 done
11029 else
11030 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
11031 fi
11032 rm -f conftest*
11033 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
11034fi
11035fi
11036
11037EXEEXT=""
11038test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
11039echo "$ac_t""${ac_cv_exeext}" 1>&6
11040ac_exeext=$EXEEXT
11041
11042
234b45d4
KB
11043
11044cat >> confdefs.h <<\EOF
11045#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
11046EOF
11047
11048
11049
11050
11051 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
11052if test "${with_libiconv_prefix+set}" = set; then
11053 withval="$with_libiconv_prefix"
11054
11055 for dir in `echo "$withval" | tr : ' '`; do
11056 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
11057 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
11058 done
11059
11060fi
11061
11062
11063 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4f0be353 11064echo "configure:11065: checking for iconv" >&5
234b45d4
KB
11065if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
11066 echo $ac_n "(cached) $ac_c" 1>&6
11067else
11068
11069 am_cv_func_iconv="no, consider installing GNU libiconv"
11070 am_cv_lib_iconv=no
11071 cat > conftest.$ac_ext <<EOF
4f0be353 11072#line 11073 "configure"
234b45d4
KB
11073#include "confdefs.h"
11074#include <stdlib.h>
11075#include <iconv.h>
11076int main() {
11077iconv_t cd = iconv_open("","");
11078 iconv(cd,NULL,NULL,NULL,NULL);
11079 iconv_close(cd);
11080; return 0; }
11081EOF
4f0be353 11082if { (eval echo configure:11083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11083 rm -rf conftest*
11084 am_cv_func_iconv=yes
11085else
11086 echo "configure: failed program was:" >&5
11087 cat conftest.$ac_ext >&5
11088fi
11089rm -f conftest*
11090 if test "$am_cv_func_iconv" != yes; then
11091 am_save_LIBS="$LIBS"
11092 LIBS="$LIBS -liconv"
11093 cat > conftest.$ac_ext <<EOF
4f0be353 11094#line 11095 "configure"
234b45d4
KB
11095#include "confdefs.h"
11096#include <stdlib.h>
11097#include <iconv.h>
11098int main() {
11099iconv_t cd = iconv_open("","");
11100 iconv(cd,NULL,NULL,NULL,NULL);
11101 iconv_close(cd);
11102; return 0; }
11103EOF
4f0be353 11104if { (eval echo configure:11105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11105 rm -rf conftest*
11106 am_cv_lib_iconv=yes
11107 am_cv_func_iconv=yes
11108else
11109 echo "configure: failed program was:" >&5
11110 cat conftest.$ac_ext >&5
11111fi
11112rm -f conftest*
11113 LIBS="$am_save_LIBS"
11114 fi
11115
11116fi
11117
11118echo "$ac_t""$am_cv_func_iconv" 1>&6
11119 if test "$am_cv_func_iconv" = yes; then
11120 cat >> confdefs.h <<\EOF
11121#define HAVE_ICONV 1
11122EOF
11123
11124 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4f0be353 11125echo "configure:11126: checking for iconv declaration" >&5
234b45d4
KB
11126 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
11127 echo $ac_n "(cached) $ac_c" 1>&6
11128else
11129
11130 cat > conftest.$ac_ext <<EOF
4f0be353 11131#line 11132 "configure"
234b45d4
KB
11132#include "confdefs.h"
11133
11134#include <stdlib.h>
11135#include <iconv.h>
11136extern
11137#ifdef __cplusplus
11138"C"
11139#endif
11140#if defined(__STDC__) || defined(__cplusplus)
11141size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11142#else
11143size_t iconv();
11144#endif
11145
11146int main() {
11147
11148; return 0; }
11149EOF
4f0be353 11150if { (eval echo configure:11151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
11151 rm -rf conftest*
11152 am_cv_proto_iconv_arg1=""
11153else
11154 echo "configure: failed program was:" >&5
11155 cat conftest.$ac_ext >&5
11156 rm -rf conftest*
11157 am_cv_proto_iconv_arg1="const"
11158fi
11159rm -f conftest*
11160 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);"
11161fi
11162
11163 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11164 echo "$ac_t""${ac_t:-
11165 }$am_cv_proto_iconv" 1>&6
11166 cat >> confdefs.h <<EOF
11167#define ICONV_CONST $am_cv_proto_iconv_arg1
11168EOF
11169
11170 fi
11171 LIBICONV=
11172 if test "$am_cv_lib_iconv" = yes; then
11173 LIBICONV="-liconv"
11174 fi
11175
11176
11177
c906108c
SS
11178trap '' 1 2 15
11179cat > confcache <<\EOF
11180# This file is a shell script that caches the results of configure
11181# tests run on this system so they can be shared between configure
11182# scripts and configure runs. It is not useful on other systems.
11183# If it contains results you don't want to keep, you may remove or edit it.
11184#
11185# By default, configure uses ./config.cache as the cache file,
11186# creating it if it does not exist already. You can give configure
11187# the --cache-file=FILE option to use a different cache file; that is
11188# what configure does when it calls configure scripts in
11189# subdirectories, so they share the cache.
11190# Giving --cache-file=/dev/null disables caching, for debugging configure.
11191# config.status only pays attention to the cache file if you give it the
11192# --recheck option to rerun configure.
11193#
11194EOF
11195# The following way of writing the cache mishandles newlines in values,
11196# but we know of no workaround that is simple, portable, and efficient.
11197# So, don't put newlines in cache variables' values.
11198# Ultrix sh set writes to stderr and can't be redirected directly,
11199# and sets the high bit in the cache file unless we assign to the vars.
11200(set) 2>&1 |
11201 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11202 *ac_space=\ *)
11203 # `set' does not quote correctly, so add quotes (double-quote substitution
11204 # turns \\\\ into \\, and sed turns \\ into \).
11205 sed -n \
11206 -e "s/'/'\\\\''/g" \
11207 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11208 ;;
11209 *)
11210 # `set' quotes correctly as required by POSIX, so do not add quotes.
11211 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11212 ;;
11213 esac >> confcache
11214if cmp -s $cache_file confcache; then
11215 :
11216else
11217 if test -w $cache_file; then
11218 echo "updating cache $cache_file"
11219 cat confcache > $cache_file
11220 else
11221 echo "not updating unwritable cache $cache_file"
11222 fi
11223fi
11224rm -f confcache
11225
11226trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11227
11228test "x$prefix" = xNONE && prefix=$ac_default_prefix
11229# Let make expand exec_prefix.
11230test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11231
11232# Any assignment to VPATH causes Sun make to only execute
11233# the first set of double-colon rules, so remove it if not needed.
11234# If there is a colon in the path, we need to keep it.
11235if test "x$srcdir" = x.; then
11236 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11237fi
11238
11239trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11240
11241DEFS=-DHAVE_CONFIG_H
11242
11243# Without the "./", some shells look in PATH for config.status.
11244: ${CONFIG_STATUS=./config.status}
11245
11246echo creating $CONFIG_STATUS
11247rm -f $CONFIG_STATUS
11248cat > $CONFIG_STATUS <<EOF
11249#! /bin/sh
11250# Generated automatically by configure.
11251# Run this file to recreate the current configuration.
11252# This directory was configured as follows,
11253# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11254#
11255# $0 $ac_configure_args
11256#
11257# Compiler output produced by configure, useful for debugging
11258# configure, is in ./config.log if it exists.
11259
11260ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11261for ac_option
11262do
11263 case "\$ac_option" in
11264 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11265 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11266 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11267 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11268 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11269 exit 0 ;;
11270 -help | --help | --hel | --he | --h)
11271 echo "\$ac_cs_usage"; exit 0 ;;
11272 *) echo "\$ac_cs_usage"; exit 1 ;;
11273 esac
11274done
11275
11276ac_given_srcdir=$srcdir
11277ac_given_INSTALL="$INSTALL"
11278
ed952ac5 11279trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11280EOF
11281cat >> $CONFIG_STATUS <<EOF
11282
11283# Protect against being on the right side of a sed subst in config.status.
11284sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11285 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11286$ac_vpsub
11287$extrasub
11288s%@SHELL@%$SHELL%g
11289s%@CFLAGS@%$CFLAGS%g
11290s%@CPPFLAGS@%$CPPFLAGS%g
11291s%@CXXFLAGS@%$CXXFLAGS%g
11292s%@FFLAGS@%$FFLAGS%g
11293s%@DEFS@%$DEFS%g
11294s%@LDFLAGS@%$LDFLAGS%g
11295s%@LIBS@%$LIBS%g
11296s%@exec_prefix@%$exec_prefix%g
11297s%@prefix@%$prefix%g
11298s%@program_transform_name@%$program_transform_name%g
11299s%@bindir@%$bindir%g
11300s%@sbindir@%$sbindir%g
11301s%@libexecdir@%$libexecdir%g
11302s%@datadir@%$datadir%g
11303s%@sysconfdir@%$sysconfdir%g
11304s%@sharedstatedir@%$sharedstatedir%g
11305s%@localstatedir@%$localstatedir%g
11306s%@libdir@%$libdir%g
11307s%@includedir@%$includedir%g
11308s%@oldincludedir@%$oldincludedir%g
11309s%@infodir@%$infodir%g
11310s%@mandir@%$mandir%g
413ccac7
AC
11311s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11312s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11313s%@MAINT@%$MAINT%g
c906108c
SS
11314s%@CC@%$CC%g
11315s%@CPP@%$CPP%g
11316s%@host@%$host%g
11317s%@host_alias@%$host_alias%g
11318s%@host_cpu@%$host_cpu%g
11319s%@host_vendor@%$host_vendor%g
11320s%@host_os@%$host_os%g
11321s%@target@%$target%g
11322s%@target_alias@%$target_alias%g
11323s%@target_cpu@%$target_cpu%g
11324s%@target_vendor@%$target_vendor%g
11325s%@target_os@%$target_os%g
11326s%@build@%$build%g
11327s%@build_alias@%$build_alias%g
11328s%@build_cpu@%$build_cpu%g
11329s%@build_vendor@%$build_vendor%g
11330s%@build_os@%$build_os%g
c906108c 11331s%@RANLIB@%$RANLIB%g
8bb2c122 11332s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11333s%@ALLOCA@%$ALLOCA%g
11334s%@USE_NLS@%$USE_NLS%g
11335s%@MSGFMT@%$MSGFMT%g
11336s%@GMSGFMT@%$GMSGFMT%g
11337s%@XGETTEXT@%$XGETTEXT%g
11338s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11339s%@CATALOGS@%$CATALOGS%g
11340s%@CATOBJEXT@%$CATOBJEXT%g
11341s%@DATADIRNAME@%$DATADIRNAME%g
11342s%@GMOFILES@%$GMOFILES%g
11343s%@INSTOBJEXT@%$INSTOBJEXT%g
11344s%@INTLDEPS@%$INTLDEPS%g
11345s%@INTLLIBS@%$INTLLIBS%g
11346s%@INTLOBJS@%$INTLOBJS%g
11347s%@POFILES@%$POFILES%g
11348s%@POSUB@%$POSUB%g
11349s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11350s%@GT_NO@%$GT_NO%g
11351s%@GT_YES@%$GT_YES%g
11352s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11353s%@l@%$l%g
ddc9cd0f
AC
11354s%@localedir@%$localedir%g
11355s%@PACKAGE@%$PACKAGE%g
8dcde887 11356s%@subdirs@%$subdirs%g
7a292a7a 11357s%@AWK@%$AWK%g
c906108c
SS
11358s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11359s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11360s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11361s%@LN_S@%$LN_S%g
11362s%@YACC@%$YACC%g
c906108c 11363s%@AR@%$AR%g
95ca63c4
CF
11364s%@DLLTOOL@%$DLLTOOL%g
11365s%@WINDRES@%$WINDRES%g
75c6e08a 11366s%@MIG@%$MIG%g
c906108c 11367s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11368s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11369s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11370s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11371s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11372s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11373s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11374s%@LIBGUI@%$LIBGUI%g
11375s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11376s%@WIN32LDAPP@%$WIN32LDAPP%g
11377s%@TCL_VERSION@%$TCL_VERSION%g
11378s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11379s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11380s%@TCL_CC@%$TCL_CC%g
11381s%@TCL_DEFS@%$TCL_DEFS%g
11382s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11383s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11384s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11385s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11386s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11387s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11388s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11389s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11390s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11391s%@TCL_RANLIB@%$TCL_RANLIB%g
11392s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11393s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11394s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11395s%@TK_VERSION@%$TK_VERSION%g
11396s%@TK_DEFS@%$TK_DEFS%g
11397s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11398s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11399s%@TK_XLIBSW@%$TK_XLIBSW%g
11400s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11401s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11402s%@TCLHDIR@%$TCLHDIR%g
11403s%@TKHDIR@%$TKHDIR%g
11404s%@ITCLHDIR@%$ITCLHDIR%g
11405s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11406s%@ITCL_VERSION@%$ITCL_VERSION%g
11407s%@ITCL_DEFS@%$ITCL_DEFS%g
11408s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11409s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11410s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11411s%@ITK_VERSION@%$ITK_VERSION%g
11412s%@ITK_DEFS@%$ITK_DEFS%g
11413s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11414s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11415s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11416s%@X_CFLAGS@%$X_CFLAGS%g
11417s%@X_LDFLAGS@%$X_LDFLAGS%g
11418s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11419s%@TCL_DEPS@%$TCL_DEPS%g
11420s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11421s%@ITCLLIB@%$ITCLLIB%g
11422s%@ITCL_DEPS@%$ITCL_DEPS%g
11423s%@ITKLIB@%$ITKLIB%g
11424s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11425s%@GDBTKLIBS@%$GDBTKLIBS%g
11426s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11427s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11428s%@IGNORE_SIM@%$IGNORE_SIM%g
11429s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11430s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11431s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11432s%@CONFIG_OBS@%$CONFIG_OBS%g
11433s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11434s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11435s%@CONFIG_ALL@%$CONFIG_ALL%g
11436s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11437s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11438s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11439s%@target_subdir@%$target_subdir%g
11440/@host_makefile_frag@/r $host_makefile_frag
11441s%@host_makefile_frag@%%g
11442/@target_makefile_frag@/r $target_makefile_frag
11443s%@target_makefile_frag@%%g
11444s%@frags@%$frags%g
5a2402b8
AC
11445s%@xm_h@%$xm_h%g
11446s%@tm_h@%$tm_h%g
11447s%@nm_h@%$nm_h%g
c906108c 11448s%@EXEEXT@%$EXEEXT%g
234b45d4 11449s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11450
11451CEOF
11452EOF
11453
11454cat >> $CONFIG_STATUS <<\EOF
11455
11456# Split the substitutions into bite-sized pieces for seds with
11457# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11458ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11459ac_file=1 # Number of current file.
11460ac_beg=1 # First line for current file.
11461ac_end=$ac_max_sed_cmds # Line after last line for current file.
11462ac_more_lines=:
11463ac_sed_cmds=""
11464while $ac_more_lines; do
11465 if test $ac_beg -gt 1; then
11466 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11467 else
11468 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11469 fi
11470 if test ! -s conftest.s$ac_file; then
11471 ac_more_lines=false
11472 rm -f conftest.s$ac_file
11473 else
11474 if test -z "$ac_sed_cmds"; then
11475 ac_sed_cmds="sed -f conftest.s$ac_file"
11476 else
11477 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11478 fi
11479 ac_file=`expr $ac_file + 1`
11480 ac_beg=$ac_end
11481 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11482 fi
11483done
11484if test -z "$ac_sed_cmds"; then
11485 ac_sed_cmds=cat
11486fi
11487EOF
11488
11489cat >> $CONFIG_STATUS <<EOF
11490
ed952ac5 11491CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11492EOF
11493cat >> $CONFIG_STATUS <<\EOF
11494for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11495 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11496 case "$ac_file" in
11497 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11498 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11499 *) ac_file_in="${ac_file}.in" ;;
11500 esac
11501
11502 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11503
11504 # Remove last slash and all that follows it. Not all systems have dirname.
11505 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11506 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11507 # The file is in a subdirectory.
11508 test ! -d "$ac_dir" && mkdir "$ac_dir"
11509 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11510 # A "../" for each directory in $ac_dir_suffix.
11511 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11512 else
11513 ac_dir_suffix= ac_dots=
11514 fi
11515
11516 case "$ac_given_srcdir" in
11517 .) srcdir=.
11518 if test -z "$ac_dots"; then top_srcdir=.
11519 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11520 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11521 *) # Relative path.
11522 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11523 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11524 esac
11525
11526 case "$ac_given_INSTALL" in
11527 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11528 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11529 esac
11530
11531 echo creating "$ac_file"
11532 rm -f "$ac_file"
11533 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11534 case "$ac_file" in
11535 *Makefile*) ac_comsub="1i\\
11536# $configure_input" ;;
11537 *) ac_comsub= ;;
11538 esac
11539
11540 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11541 sed -e "$ac_comsub
11542s%@configure_input@%$configure_input%g
11543s%@srcdir@%$srcdir%g
11544s%@top_srcdir@%$top_srcdir%g
11545s%@INSTALL@%$INSTALL%g
11546" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11547fi; done
11548rm -f conftest.s*
11549
11550# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11551# NAME is the cpp macro being defined and VALUE is the value it is being given.
11552#
11553# ac_d sets the value in "#define NAME VALUE" lines.
11554ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11555ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11556ac_dC='\3'
11557ac_dD='%g'
11558# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11559ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11560ac_uB='\([ ]\)%\1#\2define\3'
11561ac_uC=' '
11562ac_uD='\4%g'
11563# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11564ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11565ac_eB='$%\1#\2define\3'
11566ac_eC=' '
11567ac_eD='%g'
11568
11569if test "${CONFIG_HEADERS+set}" != set; then
11570EOF
11571cat >> $CONFIG_STATUS <<EOF
11572 CONFIG_HEADERS="config.h:config.in"
11573EOF
11574cat >> $CONFIG_STATUS <<\EOF
11575fi
11576for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11577 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11578 case "$ac_file" in
11579 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11580 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11581 *) ac_file_in="${ac_file}.in" ;;
11582 esac
11583
11584 echo creating $ac_file
11585
11586 rm -f conftest.frag conftest.in conftest.out
11587 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11588 cat $ac_file_inputs > conftest.in
11589
11590EOF
11591
11592# Transform confdefs.h into a sed script conftest.vals that substitutes
11593# the proper values into config.h.in to produce config.h. And first:
11594# Protect against being on the right side of a sed subst in config.status.
11595# Protect against being in an unquoted here document in config.status.
11596rm -f conftest.vals
11597cat > conftest.hdr <<\EOF
11598s/[\\&%]/\\&/g
11599s%[\\$`]%\\&%g
11600s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11601s%ac_d%ac_u%gp
11602s%ac_u%ac_e%gp
11603EOF
11604sed -n -f conftest.hdr confdefs.h > conftest.vals
11605rm -f conftest.hdr
11606
11607# This sed command replaces #undef with comments. This is necessary, for
11608# example, in the case of _POSIX_SOURCE, which is predefined and required
11609# on some systems where configure will not decide to define it.
11610cat >> conftest.vals <<\EOF
11611s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11612EOF
11613
11614# Break up conftest.vals because some shells have a limit on
11615# the size of here documents, and old seds have small limits too.
11616
11617rm -f conftest.tail
11618while :
11619do
11620 ac_lines=`grep -c . conftest.vals`
11621 # grep -c gives empty output for an empty file on some AIX systems.
11622 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11623 # Write a limited-size here document to conftest.frag.
11624 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11625 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11626 echo 'CEOF
11627 sed -f conftest.frag conftest.in > conftest.out
11628 rm -f conftest.in
11629 mv conftest.out conftest.in
11630' >> $CONFIG_STATUS
11631 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11632 rm -f conftest.vals
11633 mv conftest.tail conftest.vals
11634done
11635rm -f conftest.vals
11636
11637cat >> $CONFIG_STATUS <<\EOF
11638 rm -f conftest.frag conftest.h
11639 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11640 cat conftest.in >> conftest.h
11641 rm -f conftest.in
11642 if cmp -s $ac_file conftest.h 2>/dev/null; then
11643 echo "$ac_file is unchanged"
11644 rm -f conftest.h
11645 else
11646 # Remove last slash and all that follows it. Not all systems have dirname.
11647 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11648 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11649 # The file is in a subdirectory.
11650 test ! -d "$ac_dir" && mkdir "$ac_dir"
11651 fi
11652 rm -f $ac_file
11653 mv conftest.h $ac_file
11654 fi
11655fi; done
11656
11657EOF
11658
11659cat >> $CONFIG_STATUS <<EOF
11660ac_sources="$files"
11661ac_dests="$links"
11662EOF
11663
11664cat >> $CONFIG_STATUS <<\EOF
11665srcdir=$ac_given_srcdir
11666while test -n "$ac_sources"; do
11667 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11668 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11669
11670 echo "linking $srcdir/$ac_source to $ac_dest"
11671
11672 if test ! -r $srcdir/$ac_source; then
11673 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11674 fi
11675 rm -f $ac_dest
11676
11677 # Make relative symlinks.
11678 # Remove last slash and all that follows it. Not all systems have dirname.
11679 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11680 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11681 # The dest file is in a subdirectory.
11682 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11683 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11684 # A "../" for each directory in $ac_dest_dir_suffix.
11685 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11686 else
11687 ac_dest_dir_suffix= ac_dots=
11688 fi
11689
11690 case "$srcdir" in
11691 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11692 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11693 esac
11694
11695 # Make a symlink if possible; otherwise try a hard link.
11696 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11697 ln $srcdir/$ac_source $ac_dest; then :
11698 else
11699 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11700 fi
11701done
11702EOF
11703cat >> $CONFIG_STATUS <<EOF
11704
11705gdb_host_cpu=$gdb_host_cpu
11706gdb_target_cpu=$gdb_target_cpu
11707nativefile=$nativefile
11708
11709EOF
11710cat >> $CONFIG_STATUS <<\EOF
11711
7ee6d7eb 11712if test "${nativefile}" = ""; then
c4620205 11713 < Makefile \
e27da16d
JT
11714 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11715 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11716 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11717 > Makefile.tem
c906108c
SS
11718mv -f Makefile.tem Makefile
11719fi
11720
2c0fc042 11721sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
c906108c
SS
11722/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11723/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11724mv -f Makefile.tmp Makefile
11725
2acceee2 11726
c906108c
SS
11727case x$CONFIG_HEADERS in
11728xconfig.h:config.in)
11729echo > stamp-h ;;
11730esac
11731
11732exit 0
11733EOF
11734chmod +x $CONFIG_STATUS
11735rm -fr confdefs* $ac_clean_files
11736test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11737
11738if test "$no_recursion" != yes; then
11739
11740 # Remove --cache-file and --srcdir arguments so they do not pile up.
11741 ac_sub_configure_args=
11742 ac_prev=
11743 for ac_arg in $ac_configure_args; do
11744 if test -n "$ac_prev"; then
11745 ac_prev=
11746 continue
11747 fi
11748 case "$ac_arg" in
11749 -cache-file | --cache-file | --cache-fil | --cache-fi \
11750 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11751 ac_prev=cache_file ;;
11752 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11753 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11754 ;;
11755 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11756 ac_prev=srcdir ;;
11757 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11758 ;;
11759 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11760 esac
11761 done
11762
8dcde887 11763 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11764
11765 # Do not complain, so a configure script can configure whichever
11766 # parts of a large source tree are present.
11767 if test ! -d $srcdir/$ac_config_dir; then
11768 continue
11769 fi
11770
11771 echo configuring in $ac_config_dir
11772
11773 case "$srcdir" in
11774 .) ;;
11775 *)
11776 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11777 else
11778 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11779 fi
11780 ;;
11781 esac
11782
11783 ac_popdir=`pwd`
11784 cd $ac_config_dir
11785
11786 # A "../" for each directory in /$ac_config_dir.
11787 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11788
11789 case "$srcdir" in
11790 .) # No --srcdir option. We are building in place.
11791 ac_sub_srcdir=$srcdir ;;
11792 /*) # Absolute path.
11793 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11794 *) # Relative path.
11795 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11796 esac
11797
11798 # Check for guested configure; otherwise get Cygnus style configure.
11799 if test -f $ac_sub_srcdir/configure; then
11800 ac_sub_configure=$ac_sub_srcdir/configure
11801 elif test -f $ac_sub_srcdir/configure.in; then
11802 ac_sub_configure=$ac_configure
11803 else
11804 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11805 ac_sub_configure=
11806 fi
11807
11808 # The recursion is here.
11809 if test -n "$ac_sub_configure"; then
11810
11811 # Make the cache file name correct relative to the subdirectory.
11812 case "$cache_file" in
11813 /*) ac_sub_cache_file=$cache_file ;;
11814 *) # Relative path.
11815 ac_sub_cache_file="$ac_dots$cache_file" ;;
11816 esac
11817 case "$ac_given_INSTALL" in
11818 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11819 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11820 esac
11821
11822 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11823 # The eval makes quoting arguments work.
11824 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11825 then :
11826 else
11827 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11828 fi
11829 fi
11830
11831 cd $ac_popdir
11832 done
11833fi
11834
11835
11836exit 0
This page took 1.500886 seconds and 4 git commands to generate.