2004-02-17 David Mosberger <davidm@hpl.hp.com>
[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=
d836ee13 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
d836ee13 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
d836ee13
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
d836ee13
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
d836ee13
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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"
d836ee13 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
d836ee13 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"
d836ee13 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
d836ee13 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"
d836ee13 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
d836ee13 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
d836ee13 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
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d836ee13 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d836ee13 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
d836ee13 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
d836ee13 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
d836ee13 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
d836ee13 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
d836ee13 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
d836ee13 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
d836ee13 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
d836ee13 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
d836ee13 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
d836ee13 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
d836ee13 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
d836ee13 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d836ee13 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
d836ee13 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
d836ee13 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d836ee13 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
d836ee13 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
d836ee13 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
d836ee13 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
d836ee13 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
d836ee13 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d836ee13 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
d836ee13 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
d836ee13 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
d836ee13 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d836ee13 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
d836ee13 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
d836ee13 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
d836ee13 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
d836ee13 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
d836ee13 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
d836ee13 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d836ee13 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
d836ee13 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
d836ee13 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
d836ee13 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
d836ee13 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
d836ee13 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
d836ee13 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
d836ee13 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d836ee13 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
d836ee13 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
d836ee13 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d836ee13 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d836ee13 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d836ee13 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
d836ee13 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d836ee13 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
d836ee13 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
d836ee13 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d836ee13 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
d836ee13 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
d836ee13 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d836ee13 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
d836ee13 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
d836ee13 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
d836ee13 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
d836ee13 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
d836ee13 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
d836ee13 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d836ee13 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d836ee13 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
d836ee13 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
2928CONFIG_DEPS=
2929CONFIG_SRCS=
fb40c209 2930ENABLE_CFLAGS=
b3a90332
AC
2931CONFIG_ALL=
2932CONFIG_CLEAN=
e56ac5c3
AC
2933CONFIG_INSTALL=
2934CONFIG_UNINSTALL=
c906108c 2935
8dcde887 2936subdirs="doc testsuite"
96baa820 2937
8dcde887 2938configdirs=
96baa820 2939
27e9bf90 2940. $srcdir/configure.host
c906108c 2941
27e9bf90 2942. $srcdir/configure.tgt
c906108c 2943
27e9bf90
MK
2944# Fetch the default architecture and default target vector from BFD.
2945targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2946
27e9bf90
MK
2947# We only want the first architecture, so strip off the others if
2948# there is more than one.
2949targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2950
27e9bf90
MK
2951if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2954EOF
2955
2956fi
27e9bf90
MK
2957if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2960EOF
2961
2962fi
c906108c 2963
8bb2c122
MK
2964if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969s,\\,\\\\,g; s,\$,$$,g
2970EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973fi
2974test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976# Use a double $ so make ignores it.
2977test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980# sed with no file args requires a program.
2981test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
627af7ea
MK
2984# The CLI cannot be disabled yet, but may be in the future.
2985
2986# Enable CLI.
2987# Check whether --enable-gdbcli or --disable-gdbcli was given.
2988if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998else
2999 enable_gdbcli=yes
3000fi
3001
3002if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3008 fi
3009fi
3010
3011# Enable MI.
3012# Check whether --enable-gdbmi or --disable-gdbmi was given.
3013if test "${enable_gdbmi+set}" = set; then
3014 enableval="$enable_gdbmi"
3015 case $enableval in
3016 yes | no)
3017 ;;
3018 *)
3019 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3020 esac
3021else
3022 enable_gdbmi=yes
3023fi
3024
3025if test x"$enable_gdbmi" = xyes; then
3026 if test -d $srcdir/mi; then
3027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3031 fi
3032fi
3033
c324d747
AC
3034# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3035# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3036# Makefile fragments. That's why we need to have `Hcurses' before
3037# `curses'. I don't see why we should use HP curses if a more
3038# standard curses is available, except that according to HP's
3039# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3040# HP-UX 10.10 and 10.20.
3041
3042
3043echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
3044echo "configure:3045: checking for library containing initscr" >&5
3045if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
3047else
3048 ac_func_search_save_LIBS="$LIBS"
3049ac_cv_search_initscr="no"
3050cat > conftest.$ac_ext <<EOF
3051#line 3052 "configure"
3052#include "confdefs.h"
3053/* Override any gcc2 internal prototype to avoid an error. */
3054/* We use char because int might match the return type of a gcc2
3055 builtin and then its argument prototype would still apply. */
3056char initscr();
3057
3058int main() {
3059initscr()
3060; return 0; }
3061EOF
3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3063 rm -rf conftest*
3064 ac_cv_search_initscr="none required"
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068fi
3069rm -f conftest*
3070test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
3071LIBS="-l$i $ac_func_search_save_LIBS"
3072cat > conftest.$ac_ext <<EOF
3073#line 3074 "configure"
3074#include "confdefs.h"
3075/* Override any gcc2 internal prototype to avoid an error. */
3076/* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078char initscr();
3079
3080int main() {
3081initscr()
3082; return 0; }
3083EOF
3084if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 rm -rf conftest*
3086 ac_cv_search_initscr="-l$i"
3087break
3088else
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091fi
3092rm -f conftest*
3093done
3094LIBS="$ac_func_search_save_LIBS"
3095fi
3096
3097echo "$ac_t""$ac_cv_search_initscr" 1>&6
3098if test "$ac_cv_search_initscr" != "no"; then
3099 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3100
3101else :
3102 echo "configure: warning: no curses library found" 1>&2
3103fi
3104
06825bd1
MK
3105# Enable TUI.
3106# Check whether --enable-tui or --disable-tui was given.
3107if test "${enable_tui+set}" = set; then
3108 enableval="$enable_tui"
3109 case $enableval in
3110 yes | no)
3111 ;;
3112 *)
3113 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3114 esac
c324d747
AC
3115else
3116 enable_tui=yes
06825bd1
MK
3117fi
3118
3119if test x"$enable_tui" = xyes; then
3120 if test -d $srcdir/tui; then
c324d747
AC
3121 if test "$ac_cv_search_initscr" != no; then
3122 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3123 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3124 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3125 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3126 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3127 fi
06825bd1
MK
3128 fi
3129fi
3130
8ee53726
MK
3131# Enable gdbtk.
3132# Check whether --enable-gdbtk or --disable-gdbtk was given.
3133if test "${enable_gdbtk+set}" = set; then
3134 enableval="$enable_gdbtk"
3135 case $enableval in
3136 yes | no)
3137 ;;
3138 *)
3139 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3140 esac
3141else
3142 if test -d $srcdir/gdbtk; then
3143 enable_gdbtk=yes
3144 else
3145 enable_gdbtk=no
3146 fi
3147fi
3148
3149# We unconditionally disable gdbtk tests on selected platforms.
3150case $host_os in
3151 go32* | windows*)
3152 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3153 enable_gdbtk=no ;;
3154esac
3155
0e5d83e3
JJ
3156# Libunwind support.
3157# Check whether --with-libunwind or --without-libunwind was given.
3158if test "${with_libunwind+set}" = set; then
3159 withval="$with_libunwind"
3160 case "${withval}" in
3161 yes) enable_libunwind=yes ;;
3162 no) enable_libunwind=no ;;
3163 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3164esac
3165else
3166
3167 for ac_hdr in libunwind.h
3168do
3169ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3170echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 3171echo "configure:3172: checking for $ac_hdr" >&5
0e5d83e3
JJ
3172if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174else
3175 cat > conftest.$ac_ext <<EOF
c324d747 3176#line 3177 "configure"
0e5d83e3
JJ
3177#include "confdefs.h"
3178#include <$ac_hdr>
3179EOF
3180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 3181{ (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3183if test -z "$ac_err"; then
3184 rm -rf conftest*
3185 eval "ac_cv_header_$ac_safe=yes"
3186else
3187 echo "$ac_err" >&5
3188 echo "configure: failed program was:" >&5
3189 cat conftest.$ac_ext >&5
3190 rm -rf conftest*
3191 eval "ac_cv_header_$ac_safe=no"
3192fi
3193rm -f conftest*
3194fi
3195if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3196 echo "$ac_t""yes" 1>&6
3197 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3198 cat >> confdefs.h <<EOF
3199#define $ac_tr_hdr 1
3200EOF
3201
3202else
3203 echo "$ac_t""no" 1>&6
3204fi
3205done
3206
3207 for ac_hdr in libunwind-ia64.h
3208do
3209ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3210echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 3211echo "configure:3212: checking for $ac_hdr" >&5
0e5d83e3
JJ
3212if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3213 echo $ac_n "(cached) $ac_c" 1>&6
3214else
3215 cat > conftest.$ac_ext <<EOF
c324d747 3216#line 3217 "configure"
0e5d83e3
JJ
3217#include "confdefs.h"
3218#include <$ac_hdr>
3219EOF
3220ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 3221{ (eval echo configure:3222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3222ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3223if test -z "$ac_err"; then
3224 rm -rf conftest*
3225 eval "ac_cv_header_$ac_safe=yes"
3226else
3227 echo "$ac_err" >&5
3228 echo "configure: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 rm -rf conftest*
3231 eval "ac_cv_header_$ac_safe=no"
3232fi
3233rm -f conftest*
3234fi
3235if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3236 echo "$ac_t""yes" 1>&6
3237 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3238 cat >> confdefs.h <<EOF
3239#define $ac_tr_hdr 1
3240EOF
3241
3242else
3243 echo "$ac_t""no" 1>&6
3244fi
3245done
3246
3247 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3248 enable_libunwind=yes;
3249 fi
3250
3251fi
3252
3253
3254if test x"$enable_libunwind" = xyes; then
3255 for ac_hdr in libunwind.h
3256do
3257ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3258echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 3259echo "configure:3260: checking for $ac_hdr" >&5
0e5d83e3
JJ
3260if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3261 echo $ac_n "(cached) $ac_c" 1>&6
3262else
3263 cat > conftest.$ac_ext <<EOF
c324d747 3264#line 3265 "configure"
0e5d83e3
JJ
3265#include "confdefs.h"
3266#include <$ac_hdr>
3267EOF
3268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 3269{ (eval echo configure:3270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3271if test -z "$ac_err"; then
3272 rm -rf conftest*
3273 eval "ac_cv_header_$ac_safe=yes"
3274else
3275 echo "$ac_err" >&5
3276 echo "configure: failed program was:" >&5
3277 cat conftest.$ac_ext >&5
3278 rm -rf conftest*
3279 eval "ac_cv_header_$ac_safe=no"
3280fi
3281rm -f conftest*
3282fi
3283if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3284 echo "$ac_t""yes" 1>&6
3285 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3286 cat >> confdefs.h <<EOF
3287#define $ac_tr_hdr 1
3288EOF
3289
3290else
3291 echo "$ac_t""no" 1>&6
3292fi
3293done
3294
3295 for ac_hdr in libunwind-ia64.h
3296do
3297ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3298echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 3299echo "configure:3300: checking for $ac_hdr" >&5
0e5d83e3
JJ
3300if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302else
3303 cat > conftest.$ac_ext <<EOF
c324d747 3304#line 3305 "configure"
0e5d83e3
JJ
3305#include "confdefs.h"
3306#include <$ac_hdr>
3307EOF
3308ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 3309{ (eval echo configure:3310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3310ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3311if test -z "$ac_err"; then
3312 rm -rf conftest*
3313 eval "ac_cv_header_$ac_safe=yes"
3314else
3315 echo "$ac_err" >&5
3316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
3318 rm -rf conftest*
3319 eval "ac_cv_header_$ac_safe=no"
3320fi
3321rm -f conftest*
3322fi
3323if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3324 echo "$ac_t""yes" 1>&6
3325 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3326 cat >> confdefs.h <<EOF
3327#define $ac_tr_hdr 1
3328EOF
3329
3330else
3331 echo "$ac_t""no" 1>&6
3332fi
3333done
3334
3335 cat >> confdefs.h <<\EOF
3336#define HAVE_LIBUNWIND 1
3337EOF
3338
3339 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3340 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3341 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3342fi
3343
d28f9cdf
DJ
3344# Profiling support.
3345# Check whether --enable-profiling or --disable-profiling was given.
3346if test "${enable_profiling+set}" = set; then
3347 enableval="$enable_profiling"
3348 case $enableval in
3349 yes | no)
3350 ;;
3351 *)
3352 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3353 esac
3354else
3355 enable_profiling=no
3356fi
3357
3358
d9feb4e7
DJ
3359for ac_func in monstartup _mcleanup
3360do
3361echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 3362echo "configure:3363: checking for $ac_func" >&5
d9feb4e7 3363if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3364 echo $ac_n "(cached) $ac_c" 1>&6
3365else
3366 cat > conftest.$ac_ext <<EOF
c324d747 3367#line 3368 "configure"
d28f9cdf
DJ
3368#include "confdefs.h"
3369/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3370 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3371#include <assert.h>
3372/* Override any gcc2 internal prototype to avoid an error. */
3373/* We use char because int might match the return type of a gcc2
3374 builtin and then its argument prototype would still apply. */
d9feb4e7 3375char $ac_func();
d28f9cdf
DJ
3376
3377int main() {
3378
3379/* The GNU C library defines this for functions which it implements
3380 to always fail with ENOSYS. Some functions are actually named
3381 something starting with __ and the normal name is an alias. */
d9feb4e7 3382#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3383choke me
3384#else
d9feb4e7 3385$ac_func();
d28f9cdf
DJ
3386#endif
3387
3388; return 0; }
3389EOF
c324d747 3390if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3391 rm -rf conftest*
d9feb4e7 3392 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3393else
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3396 rm -rf conftest*
d9feb4e7 3397 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3398fi
3399rm -f conftest*
3400fi
3401
d9feb4e7 3402if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3403 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3404 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3405 cat >> confdefs.h <<EOF
3406#define $ac_tr_func 1
3407EOF
3408
d28f9cdf
DJ
3409else
3410 echo "$ac_t""no" 1>&6
d28f9cdf 3411fi
d9feb4e7 3412done
d28f9cdf 3413
b0b1c2c0 3414echo $ac_n "checking for _etext""... $ac_c" 1>&6
c324d747 3415echo "configure:3416: checking for _etext" >&5
b0b1c2c0
MK
3416if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3417 echo $ac_n "(cached) $ac_c" 1>&6
3418else
3419 cat > conftest.$ac_ext <<EOF
c324d747 3420#line 3421 "configure"
b0b1c2c0
MK
3421#include "confdefs.h"
3422#include <stdlib.h>
3423extern char _etext;
3424
3425int main() {
3426free (&_etext);
3427; return 0; }
3428EOF
c324d747 3429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3430 rm -rf conftest*
3431 ac_cv_var__etext=yes
3432else
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 ac_cv_var__etext=no
3437fi
3438rm -f conftest*
3439fi
3440
3441echo "$ac_t""$ac_cv_var__etext" 1>&6
3442if test $ac_cv_var__etext = yes; then
3443 cat >> confdefs.h <<\EOF
3444#define HAVE__ETEXT 1
3445EOF
3446
3447fi
d9feb4e7
DJ
3448if test "$enable_profiling" = yes ; then
3449 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3450 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3451 fi
3452 PROFILE_CFLAGS=-pg
3453 OLD_CFLAGS="$CFLAGS"
3454 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3455
d9feb4e7 3456 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
c324d747 3457echo "configure:3458: checking whether $CC supports -pg" >&5
d9feb4e7 3458if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460else
3461 cat > conftest.$ac_ext <<EOF
c324d747 3462#line 3463 "configure"
d28f9cdf 3463#include "confdefs.h"
d28f9cdf
DJ
3464
3465int main() {
d9feb4e7 3466int x;
d28f9cdf
DJ
3467; return 0; }
3468EOF
c324d747 3469if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3470 rm -rf conftest*
d9feb4e7 3471 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3472else
3473 echo "configure: failed program was:" >&5
3474 cat conftest.$ac_ext >&5
3475 rm -rf conftest*
d9feb4e7 3476 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3477fi
3478rm -f conftest*
3479fi
3480
d9feb4e7 3481echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3482
d9feb4e7
DJ
3483 if test $ac_cv_cc_supports_pg = no; then
3484 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3485 fi
d28f9cdf
DJ
3486
3487 CFLAGS="$OLD_CFLAGS"
3488fi
3489
8bb2c122
MK
3490# --------------------- #
3491# Checks for programs. #
3492# --------------------- #
3493
d836ee13 3494for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3495do
3496# Extract the first word of "$ac_prog", so it can be a program name with args.
3497set dummy $ac_prog; ac_word=$2
3498echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3499echo "configure:3500: checking for $ac_word" >&5
7a292a7a
SS
3500if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3501 echo $ac_n "(cached) $ac_c" 1>&6
3502else
3503 if test -n "$AWK"; then
3504 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3505else
3506 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3507 ac_dummy="$PATH"
3508 for ac_dir in $ac_dummy; do
3509 test -z "$ac_dir" && ac_dir=.
3510 if test -f $ac_dir/$ac_word; then
3511 ac_cv_prog_AWK="$ac_prog"
3512 break
3513 fi
3514 done
3515 IFS="$ac_save_ifs"
3516fi
3517fi
3518AWK="$ac_cv_prog_AWK"
3519if test -n "$AWK"; then
3520 echo "$ac_t""$AWK" 1>&6
3521else
3522 echo "$ac_t""no" 1>&6
3523fi
3524
3525test -n "$AWK" && break
3526done
3527
c906108c
SS
3528# Find a good install program. We prefer a C program (faster),
3529# so one script is as good as another. But avoid the broken or
3530# incompatible versions:
3531# SysV /etc/install, /usr/sbin/install
3532# SunOS /usr/etc/install
3533# IRIX /sbin/install
3534# AIX /bin/install
3535# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3536# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3537# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3538# ./install, which can be erroneously created by make from ./install.sh.
3539echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
c324d747 3540echo "configure:3541: checking for a BSD compatible install" >&5
c906108c
SS
3541if test -z "$INSTALL"; then
3542if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3543 echo $ac_n "(cached) $ac_c" 1>&6
3544else
3545 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3546 for ac_dir in $PATH; do
3547 # Account for people who put trailing slashes in PATH elements.
3548 case "$ac_dir/" in
3549 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3550 *)
3551 # OSF1 and SCO ODT 3.0 have their own names for install.
3552 # Don't use installbsd from OSF since it installs stuff as root
3553 # by default.
3554 for ac_prog in ginstall scoinst install; do
3555 if test -f $ac_dir/$ac_prog; then
3556 if test $ac_prog = install &&
3557 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3558 # AIX install. It has an incompatible calling convention.
3559 :
3560 else
3561 ac_cv_path_install="$ac_dir/$ac_prog -c"
3562 break 2
3563 fi
3564 fi
3565 done
3566 ;;
3567 esac
3568 done
3569 IFS="$ac_save_IFS"
3570
3571fi
3572 if test "${ac_cv_path_install+set}" = set; then
3573 INSTALL="$ac_cv_path_install"
3574 else
3575 # As a last resort, use the slow shell script. We don't cache a
3576 # path for INSTALL within a source directory, because that will
3577 # break other packages using the cache if that directory is
3578 # removed, or if the path is relative.
3579 INSTALL="$ac_install_sh"
3580 fi
3581fi
3582echo "$ac_t""$INSTALL" 1>&6
3583
3584# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3585# It thinks the first close brace ends the variable substitution.
3586test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3587
3588test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3589
3590test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3591
8bb2c122 3592echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
c324d747 3593echo "configure:3594: checking whether ln -s works" >&5
8bb2c122
MK
3594if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3596else
8bb2c122
MK
3597 rm -f conftestdata
3598if ln -s X conftestdata 2>/dev/null
3599then
3600 rm -f conftestdata
3601 ac_cv_prog_LN_S="ln -s"
3602else
3603 ac_cv_prog_LN_S=ln
3604fi
3605fi
3606LN_S="$ac_cv_prog_LN_S"
3607if test "$ac_cv_prog_LN_S" = "ln -s"; then
3608 echo "$ac_t""yes" 1>&6
3609else
3610 echo "$ac_t""no" 1>&6
c906108c
SS
3611fi
3612
8bb2c122
MK
3613# Extract the first word of "ranlib", so it can be a program name with args.
3614set dummy ranlib; ac_word=$2
c906108c 3615echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3616echo "configure:3617: checking for $ac_word" >&5
8bb2c122 3617if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3618 echo $ac_n "(cached) $ac_c" 1>&6
3619else
8bb2c122
MK
3620 if test -n "$RANLIB"; then
3621 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3622else
3623 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3624 ac_dummy="$PATH"
3625 for ac_dir in $ac_dummy; do
3626 test -z "$ac_dir" && ac_dir=.
3627 if test -f $ac_dir/$ac_word; then
8bb2c122 3628 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3629 break
3630 fi
3631 done
3632 IFS="$ac_save_ifs"
8bb2c122 3633 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3634fi
3635fi
8bb2c122
MK
3636RANLIB="$ac_cv_prog_RANLIB"
3637if test -n "$RANLIB"; then
3638 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3639else
3640 echo "$ac_t""no" 1>&6
3641fi
3642
8bb2c122
MK
3643for ac_prog in 'bison -y' byacc
3644do
3645# Extract the first word of "$ac_prog", so it can be a program name with args.
3646set dummy $ac_prog; ac_word=$2
c906108c 3647echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3648echo "configure:3649: checking for $ac_word" >&5
8bb2c122 3649if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3650 echo $ac_n "(cached) $ac_c" 1>&6
3651else
8bb2c122
MK
3652 if test -n "$YACC"; then
3653 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3654else
3655 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3656 ac_dummy="$PATH"
3657 for ac_dir in $ac_dummy; do
3658 test -z "$ac_dir" && ac_dir=.
3659 if test -f $ac_dir/$ac_word; then
8bb2c122 3660 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3661 break
3662 fi
3663 done
3664 IFS="$ac_save_ifs"
3665fi
3666fi
8bb2c122
MK
3667YACC="$ac_cv_prog_YACC"
3668if test -n "$YACC"; then
3669 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3670else
3671 echo "$ac_t""no" 1>&6
3672fi
3673
8bb2c122
MK
3674test -n "$YACC" && break
3675done
3676test -n "$YACC" || YACC="yacc"
c906108c 3677
8bb2c122
MK
3678
3679# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3680set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3682echo "configure:3683: checking for $ac_word" >&5
8bb2c122 3683if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3684 echo $ac_n "(cached) $ac_c" 1>&6
3685else
8bb2c122
MK
3686 if test -n "$AR"; then
3687 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3688else
3689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3690 ac_dummy="$PATH"
3691 for ac_dir in $ac_dummy; do
3692 test -z "$ac_dir" && ac_dir=.
3693 if test -f $ac_dir/$ac_word; then
8bb2c122 3694 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3695 break
3696 fi
3697 done
3698 IFS="$ac_save_ifs"
8bb2c122 3699 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3700fi
3701fi
8bb2c122
MK
3702AR="$ac_cv_prog_AR"
3703if test -n "$AR"; then
3704 echo "$ac_t""$AR" 1>&6
c906108c
SS
3705else
3706 echo "$ac_t""no" 1>&6
3707fi
3708
8bb2c122 3709
c906108c 3710
95ca63c4
CF
3711# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3712set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3713echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3714echo "configure:3715: checking for $ac_word" >&5
95ca63c4
CF
3715if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3716 echo $ac_n "(cached) $ac_c" 1>&6
3717else
3718 if test -n "$DLLTOOL"; then
3719 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3720else
3721 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3722 ac_dummy="$PATH"
3723 for ac_dir in $ac_dummy; do
3724 test -z "$ac_dir" && ac_dir=.
3725 if test -f $ac_dir/$ac_word; then
3726 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3727 break
3728 fi
3729 done
3730 IFS="$ac_save_ifs"
3731 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3732fi
3733fi
3734DLLTOOL="$ac_cv_prog_DLLTOOL"
3735if test -n "$DLLTOOL"; then
3736 echo "$ac_t""$DLLTOOL" 1>&6
3737else
3738 echo "$ac_t""no" 1>&6
3739fi
3740
3741
3742
3743# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3744set dummy ${ac_tool_prefix}windres; ac_word=$2
3745echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3746echo "configure:3747: checking for $ac_word" >&5
95ca63c4
CF
3747if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3748 echo $ac_n "(cached) $ac_c" 1>&6
3749else
3750 if test -n "$WINDRES"; then
3751 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3752else
3753 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3754 ac_dummy="$PATH"
3755 for ac_dir in $ac_dummy; do
3756 test -z "$ac_dir" && ac_dir=.
3757 if test -f $ac_dir/$ac_word; then
3758 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3759 break
3760 fi
3761 done
3762 IFS="$ac_save_ifs"
3763 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3764fi
3765fi
3766WINDRES="$ac_cv_prog_WINDRES"
3767if test -n "$WINDRES"; then
3768 echo "$ac_t""$WINDRES" 1>&6
3769else
3770 echo "$ac_t""no" 1>&6
3771fi
3772
3773
3774
c906108c 3775
8bb2c122 3776# Needed for GNU/Hurd.
75c6e08a
MK
3777# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3778set dummy ${ac_tool_prefix}mig; ac_word=$2
3779echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
c324d747 3780echo "configure:3781: checking for $ac_word" >&5
75c6e08a
MK
3781if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3782 echo $ac_n "(cached) $ac_c" 1>&6
3783else
3784 if test -n "$MIG"; then
3785 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3786else
3787 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3788 ac_dummy="$PATH"
3789 for ac_dir in $ac_dummy; do
3790 test -z "$ac_dir" && ac_dir=.
3791 if test -f $ac_dir/$ac_word; then
3792 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3793 break
3794 fi
3795 done
3796 IFS="$ac_save_ifs"
3797 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3798fi
3799fi
3800MIG="$ac_cv_prog_MIG"
3801if test -n "$MIG"; then
3802 echo "$ac_t""$MIG" 1>&6
3803else
3804 echo "$ac_t""no" 1>&6
3805fi
3806
3807
3808
3809
9a156167
MK
3810# ---------------------- #
3811# Checks for libraries. #
3812# ---------------------- #
3813
3814# We might need to link with -lm; most simulators need it.
3815echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
c324d747 3816echo "configure:3817: checking for main in -lm" >&5
9a156167
MK
3817ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3818if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3820else
3821 ac_save_LIBS="$LIBS"
3822LIBS="-lm $LIBS"
3823cat > conftest.$ac_ext <<EOF
c324d747 3824#line 3825 "configure"
9a156167
MK
3825#include "confdefs.h"
3826
3827int main() {
3828main()
3829; return 0; }
3830EOF
c324d747 3831if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3832 rm -rf conftest*
3833 eval "ac_cv_lib_$ac_lib_var=yes"
3834else
3835 echo "configure: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 rm -rf conftest*
3838 eval "ac_cv_lib_$ac_lib_var=no"
3839fi
3840rm -f conftest*
3841LIBS="$ac_save_LIBS"
3842
3843fi
3844if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3845 echo "$ac_t""yes" 1>&6
3846 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3847 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3848 cat >> confdefs.h <<EOF
3849#define $ac_tr_lib 1
3850EOF
3851
3852 LIBS="-lm $LIBS"
3853
3854else
3855 echo "$ac_t""no" 1>&6
3856fi
3857
3858
3859# We need to link with -lw to get `wctype' on Solaris before Solaris
3860# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3861# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3862# is known to have this problem). Therefore we avoid libw if we can.
3863echo $ac_n "checking for wctype""... $ac_c" 1>&6
c324d747 3864echo "configure:3865: checking for wctype" >&5
9a156167
MK
3865if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3866 echo $ac_n "(cached) $ac_c" 1>&6
3867else
3868 cat > conftest.$ac_ext <<EOF
c324d747 3869#line 3870 "configure"
9a156167
MK
3870#include "confdefs.h"
3871/* System header to define __stub macros and hopefully few prototypes,
3872 which can conflict with char wctype(); below. */
3873#include <assert.h>
3874/* Override any gcc2 internal prototype to avoid an error. */
3875/* We use char because int might match the return type of a gcc2
3876 builtin and then its argument prototype would still apply. */
3877char wctype();
3878
3879int main() {
3880
3881/* The GNU C library defines this for functions which it implements
3882 to always fail with ENOSYS. Some functions are actually named
3883 something starting with __ and the normal name is an alias. */
3884#if defined (__stub_wctype) || defined (__stub___wctype)
3885choke me
3886#else
3887wctype();
3888#endif
3889
3890; return 0; }
3891EOF
c324d747 3892if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3893 rm -rf conftest*
3894 eval "ac_cv_func_wctype=yes"
3895else
3896 echo "configure: failed program was:" >&5
3897 cat conftest.$ac_ext >&5
3898 rm -rf conftest*
3899 eval "ac_cv_func_wctype=no"
3900fi
3901rm -f conftest*
3902fi
3903
3904if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3905 echo "$ac_t""yes" 1>&6
3906 :
3907else
3908 echo "$ac_t""no" 1>&6
3909echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
c324d747 3910echo "configure:3911: checking for wctype in -lw" >&5
9a156167
MK
3911ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3912if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3914else
3915 ac_save_LIBS="$LIBS"
3916LIBS="-lw $LIBS"
3917cat > conftest.$ac_ext <<EOF
c324d747 3918#line 3919 "configure"
9a156167
MK
3919#include "confdefs.h"
3920/* Override any gcc2 internal prototype to avoid an error. */
3921/* We use char because int might match the return type of a gcc2
3922 builtin and then its argument prototype would still apply. */
3923char wctype();
3924
3925int main() {
3926wctype()
3927; return 0; }
3928EOF
c324d747 3929if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3930 rm -rf conftest*
3931 eval "ac_cv_lib_$ac_lib_var=yes"
3932else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 eval "ac_cv_lib_$ac_lib_var=no"
3937fi
3938rm -f conftest*
3939LIBS="$ac_save_LIBS"
3940
3941fi
3942if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3943 echo "$ac_t""yes" 1>&6
3944 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3945 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3946 cat >> confdefs.h <<EOF
3947#define $ac_tr_lib 1
3948EOF
3949
3950 LIBS="-lw $LIBS"
3951
3952else
3953 echo "$ac_t""no" 1>&6
3954fi
3955
3956fi
3957
3958
c890192f
MK
3959# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3960
3961echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
c324d747 3962echo "configure:3963: checking for library containing gethostbyname" >&5
c890192f
MK
3963if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3965else
3966 ac_func_search_save_LIBS="$LIBS"
3967ac_cv_search_gethostbyname="no"
3968cat > conftest.$ac_ext <<EOF
c324d747 3969#line 3970 "configure"
c890192f
MK
3970#include "confdefs.h"
3971/* Override any gcc2 internal prototype to avoid an error. */
3972/* We use char because int might match the return type of a gcc2
3973 builtin and then its argument prototype would still apply. */
3974char gethostbyname();
3975
3976int main() {
3977gethostbyname()
3978; return 0; }
3979EOF
c324d747 3980if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3981 rm -rf conftest*
3982 ac_cv_search_gethostbyname="none required"
3983else
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3986fi
3987rm -f conftest*
3988test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3989LIBS="-l$i $ac_func_search_save_LIBS"
3990cat > conftest.$ac_ext <<EOF
c324d747 3991#line 3992 "configure"
c890192f
MK
3992#include "confdefs.h"
3993/* Override any gcc2 internal prototype to avoid an error. */
3994/* We use char because int might match the return type of a gcc2
3995 builtin and then its argument prototype would still apply. */
3996char gethostbyname();
3997
3998int main() {
3999gethostbyname()
4000; return 0; }
4001EOF
c324d747 4002if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
4003 rm -rf conftest*
4004 ac_cv_search_gethostbyname="-l$i"
4005break
4006else
4007 echo "configure: failed program was:" >&5
4008 cat conftest.$ac_ext >&5
4009fi
4010rm -f conftest*
4011done
4012LIBS="$ac_func_search_save_LIBS"
4013fi
4014
4015echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
4016if test "$ac_cv_search_gethostbyname" != "no"; then
4017 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4018
4019else :
4020
4021fi
4022
9a156167
MK
4023# Some systems (e.g. Solaris) have `socketpair' in libsocket.
4024
4025echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
c324d747 4026echo "configure:4027: checking for library containing socketpair" >&5
9a156167
MK
4027if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4028 echo $ac_n "(cached) $ac_c" 1>&6
4029else
4030 ac_func_search_save_LIBS="$LIBS"
4031ac_cv_search_socketpair="no"
4032cat > conftest.$ac_ext <<EOF
c324d747 4033#line 4034 "configure"
9a156167
MK
4034#include "confdefs.h"
4035/* Override any gcc2 internal prototype to avoid an error. */
4036/* We use char because int might match the return type of a gcc2
4037 builtin and then its argument prototype would still apply. */
4038char socketpair();
4039
4040int main() {
4041socketpair()
4042; return 0; }
4043EOF
c324d747 4044if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4045 rm -rf conftest*
4046 ac_cv_search_socketpair="none required"
4047else
4048 echo "configure: failed program was:" >&5
4049 cat conftest.$ac_ext >&5
4050fi
4051rm -f conftest*
4052test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4053LIBS="-l$i $ac_func_search_save_LIBS"
4054cat > conftest.$ac_ext <<EOF
c324d747 4055#line 4056 "configure"
9a156167
MK
4056#include "confdefs.h"
4057/* Override any gcc2 internal prototype to avoid an error. */
4058/* We use char because int might match the return type of a gcc2
4059 builtin and then its argument prototype would still apply. */
4060char socketpair();
4061
4062int main() {
4063socketpair()
4064; return 0; }
4065EOF
c324d747 4066if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4067 rm -rf conftest*
4068 ac_cv_search_socketpair="-l$i"
4069break
4070else
4071 echo "configure: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4073fi
4074rm -f conftest*
4075done
4076LIBS="$ac_func_search_save_LIBS"
4077fi
4078
4079echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4080if test "$ac_cv_search_socketpair" != "no"; then
4081 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4082
4083else :
4084
4085fi
4086
06825bd1
MK
4087# Since GDB uses Readline, we need termcap functionality, so we need
4088# to find a library that provides that. When GDB is configured with
c324d747 4089# the TUI, we need full curses functionality.
06825bd1
MK
4090
4091case $host_os in
4092 cygwin*)
4093 if test -d $srcdir/libtermcap; then
4094 LIBS="../libtermcap/libtermcap.a $LIBS"
4095 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4096 fi ;;
40a7debc 4097 go32* | *djgpp*)
06825bd1
MK
4098 ac_cv_search_tgetent="none required"
4099 ;;
4100 aix*)
4101 # Readline prefers curses over termcap on AIX.
4102 # ??? Why?
4103
4104echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
c324d747 4105echo "configure:4106: checking for library containing tgetent" >&5
06825bd1
MK
4106if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108else
4109 ac_func_search_save_LIBS="$LIBS"
4110ac_cv_search_tgetent="no"
4111cat > conftest.$ac_ext <<EOF
c324d747 4112#line 4113 "configure"
06825bd1
MK
4113#include "confdefs.h"
4114/* Override any gcc2 internal prototype to avoid an error. */
4115/* We use char because int might match the return type of a gcc2
4116 builtin and then its argument prototype would still apply. */
4117char tgetent();
4118
4119int main() {
4120tgetent()
4121; return 0; }
4122EOF
c324d747 4123if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4124 rm -rf conftest*
4125 ac_cv_search_tgetent="none required"
4126else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129fi
4130rm -f conftest*
4131test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4132LIBS="-l$i $ac_func_search_save_LIBS"
4133cat > conftest.$ac_ext <<EOF
c324d747 4134#line 4135 "configure"
06825bd1
MK
4135#include "confdefs.h"
4136/* Override any gcc2 internal prototype to avoid an error. */
4137/* We use char because int might match the return type of a gcc2
4138 builtin and then its argument prototype would still apply. */
4139char tgetent();
4140
4141int main() {
4142tgetent()
4143; return 0; }
4144EOF
c324d747 4145if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4146 rm -rf conftest*
4147 ac_cv_search_tgetent="-l$i"
4148break
4149else
4150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4152fi
4153rm -f conftest*
4154done
4155LIBS="$ac_func_search_save_LIBS"
4156fi
4157
4158echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4159if test "$ac_cv_search_tgetent" != "no"; then
4160 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4161
4162else :
4163
4164fi
4165 ;;
4166esac
4167
4168# Note: We used to check for libtermlib and libterminfo too, but
4169# Readline doesn't, so I think we're safe with leaving them out.
4170
4171echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
c324d747 4172echo "configure:4173: checking for library containing tgetent" >&5
06825bd1
MK
4173if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4174 echo $ac_n "(cached) $ac_c" 1>&6
4175else
4176 ac_func_search_save_LIBS="$LIBS"
4177ac_cv_search_tgetent="no"
4178cat > conftest.$ac_ext <<EOF
c324d747 4179#line 4180 "configure"
06825bd1
MK
4180#include "confdefs.h"
4181/* Override any gcc2 internal prototype to avoid an error. */
4182/* We use char because int might match the return type of a gcc2
4183 builtin and then its argument prototype would still apply. */
4184char tgetent();
4185
4186int main() {
4187tgetent()
4188; return 0; }
4189EOF
c324d747 4190if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4191 rm -rf conftest*
4192 ac_cv_search_tgetent="none required"
4193else
4194 echo "configure: failed program was:" >&5
4195 cat conftest.$ac_ext >&5
4196fi
4197rm -f conftest*
4198test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4199LIBS="-l$i $ac_func_search_save_LIBS"
4200cat > conftest.$ac_ext <<EOF
c324d747 4201#line 4202 "configure"
06825bd1
MK
4202#include "confdefs.h"
4203/* Override any gcc2 internal prototype to avoid an error. */
4204/* We use char because int might match the return type of a gcc2
4205 builtin and then its argument prototype would still apply. */
4206char tgetent();
4207
4208int main() {
4209tgetent()
4210; return 0; }
4211EOF
c324d747 4212if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4213 rm -rf conftest*
4214 ac_cv_search_tgetent="-l$i"
4215break
4216else
4217 echo "configure: failed program was:" >&5
4218 cat conftest.$ac_ext >&5
4219fi
4220rm -f conftest*
4221done
4222LIBS="$ac_func_search_save_LIBS"
4223fi
4224
4225echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4226if test "$ac_cv_search_tgetent" != "no"; then
4227 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4228
4229else :
4230
4231fi
4232
4233if test "$ac_cv_search_tgetent" = no; then
4234 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4235fi
4236
5ee754fc
MK
4237# ------------------------- #
4238# Checks for header files. #
4239# ------------------------- #
4240
4241ac_header_dirent=no
4242for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4243do
4244ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4245echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
c324d747 4246echo "configure:4247: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4247if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4248 echo $ac_n "(cached) $ac_c" 1>&6
4249else
4250 cat > conftest.$ac_ext <<EOF
c324d747 4251#line 4252 "configure"
c906108c
SS
4252#include "confdefs.h"
4253#include <sys/types.h>
5ee754fc
MK
4254#include <$ac_hdr>
4255int main() {
4256DIR *dirp = 0;
4257; return 0; }
4258EOF
c324d747 4259if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4260 rm -rf conftest*
4261 eval "ac_cv_header_dirent_$ac_safe=yes"
4262else
4263 echo "configure: failed program was:" >&5
4264 cat conftest.$ac_ext >&5
4265 rm -rf conftest*
4266 eval "ac_cv_header_dirent_$ac_safe=no"
4267fi
4268rm -f conftest*
4269fi
4270if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4271 echo "$ac_t""yes" 1>&6
4272 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4273 cat >> confdefs.h <<EOF
4274#define $ac_tr_hdr 1
4275EOF
4276 ac_header_dirent=$ac_hdr; break
4277else
4278 echo "$ac_t""no" 1>&6
4279fi
4280done
4281# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4282if test $ac_header_dirent = dirent.h; then
4283echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
c324d747 4284echo "configure:4285: checking for opendir in -ldir" >&5
5ee754fc
MK
4285ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288else
4289 ac_save_LIBS="$LIBS"
4290LIBS="-ldir $LIBS"
4291cat > conftest.$ac_ext <<EOF
c324d747 4292#line 4293 "configure"
5ee754fc
MK
4293#include "confdefs.h"
4294/* Override any gcc2 internal prototype to avoid an error. */
4295/* We use char because int might match the return type of a gcc2
4296 builtin and then its argument prototype would still apply. */
4297char opendir();
c906108c
SS
4298
4299int main() {
5ee754fc 4300opendir()
c906108c
SS
4301; return 0; }
4302EOF
c324d747 4303if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4304 rm -rf conftest*
5ee754fc 4305 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4306else
4307 echo "configure: failed program was:" >&5
4308 cat conftest.$ac_ext >&5
4309 rm -rf conftest*
5ee754fc 4310 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4311fi
4312rm -f conftest*
5ee754fc
MK
4313LIBS="$ac_save_LIBS"
4314
4315fi
4316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4317 echo "$ac_t""yes" 1>&6
4318 LIBS="$LIBS -ldir"
4319else
4320 echo "$ac_t""no" 1>&6
c906108c
SS
4321fi
4322
5ee754fc
MK
4323else
4324echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
c324d747 4325echo "configure:4326: checking for opendir in -lx" >&5
5ee754fc
MK
4326ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4327if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4328 echo $ac_n "(cached) $ac_c" 1>&6
4329else
4330 ac_save_LIBS="$LIBS"
4331LIBS="-lx $LIBS"
4332cat > conftest.$ac_ext <<EOF
c324d747 4333#line 4334 "configure"
5ee754fc
MK
4334#include "confdefs.h"
4335/* Override any gcc2 internal prototype to avoid an error. */
4336/* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
4338char opendir();
4339
4340int main() {
4341opendir()
4342; return 0; }
c906108c 4343EOF
c324d747 4344if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4345 rm -rf conftest*
4346 eval "ac_cv_lib_$ac_lib_var=yes"
4347else
4348 echo "configure: failed program was:" >&5
4349 cat conftest.$ac_ext >&5
4350 rm -rf conftest*
4351 eval "ac_cv_lib_$ac_lib_var=no"
4352fi
4353rm -f conftest*
4354LIBS="$ac_save_LIBS"
c906108c 4355
5ee754fc
MK
4356fi
4357if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4358 echo "$ac_t""yes" 1>&6
4359 LIBS="$LIBS -lx"
4360else
4361 echo "$ac_t""no" 1>&6
4362fi
c906108c 4363
5ee754fc 4364fi
c906108c 4365
5ee754fc 4366echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
c324d747 4367echo "configure:4368: checking whether stat file-mode macros are broken" >&5
5ee754fc 4368if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4369 echo $ac_n "(cached) $ac_c" 1>&6
4370else
4371 cat > conftest.$ac_ext <<EOF
c324d747 4372#line 4373 "configure"
9608ab8b
MK
4373#include "confdefs.h"
4374#include <sys/types.h>
5ee754fc
MK
4375#include <sys/stat.h>
4376
4377#if defined(S_ISBLK) && defined(S_IFDIR)
4378# if S_ISBLK (S_IFDIR)
4379You lose.
4380# endif
4381#endif
4382
4383#if defined(S_ISBLK) && defined(S_IFCHR)
4384# if S_ISBLK (S_IFCHR)
4385You lose.
4386# endif
4387#endif
4388
4389#if defined(S_ISLNK) && defined(S_IFREG)
4390# if S_ISLNK (S_IFREG)
4391You lose.
4392# endif
4393#endif
4394
4395#if defined(S_ISSOCK) && defined(S_IFREG)
4396# if S_ISSOCK (S_IFREG)
4397You lose.
4398# endif
4399#endif
4400
9608ab8b 4401EOF
5ee754fc
MK
4402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4403 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4404 rm -rf conftest*
5ee754fc
MK
4405 ac_cv_header_stat_broken=yes
4406else
4407 rm -rf conftest*
4408 ac_cv_header_stat_broken=no
4409fi
4410rm -f conftest*
4411
4412fi
4413
4414echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4415if test $ac_cv_header_stat_broken = yes; then
4416 cat >> confdefs.h <<\EOF
4417#define STAT_MACROS_BROKEN 1
4418EOF
4419
4420fi
4421
4422echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
c324d747 4423echo "configure:4424: checking for ANSI C header files" >&5
5ee754fc
MK
4424if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4425 echo $ac_n "(cached) $ac_c" 1>&6
4426else
4427 cat > conftest.$ac_ext <<EOF
c324d747 4428#line 4429 "configure"
5ee754fc
MK
4429#include "confdefs.h"
4430#include <stdlib.h>
4431#include <stdarg.h>
4432#include <string.h>
4433#include <float.h>
4434EOF
4435ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4436{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4437ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4438if test -z "$ac_err"; then
4439 rm -rf conftest*
4440 ac_cv_header_stdc=yes
4441else
4442 echo "$ac_err" >&5
4443 echo "configure: failed program was:" >&5
4444 cat conftest.$ac_ext >&5
4445 rm -rf conftest*
4446 ac_cv_header_stdc=no
4447fi
4448rm -f conftest*
4449
4450if test $ac_cv_header_stdc = yes; then
4451 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4452cat > conftest.$ac_ext <<EOF
c324d747 4453#line 4454 "configure"
5ee754fc
MK
4454#include "confdefs.h"
4455#include <string.h>
4456EOF
4457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4458 egrep "memchr" >/dev/null 2>&1; then
4459 :
4460else
4461 rm -rf conftest*
4462 ac_cv_header_stdc=no
4463fi
4464rm -f conftest*
4465
4466fi
4467
4468if test $ac_cv_header_stdc = yes; then
4469 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4470cat > conftest.$ac_ext <<EOF
c324d747 4471#line 4472 "configure"
5ee754fc
MK
4472#include "confdefs.h"
4473#include <stdlib.h>
4474EOF
4475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476 egrep "free" >/dev/null 2>&1; then
4477 :
4478else
4479 rm -rf conftest*
4480 ac_cv_header_stdc=no
4481fi
4482rm -f conftest*
4483
4484fi
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488if test "$cross_compiling" = yes; then
4489 :
4490else
4491 cat > conftest.$ac_ext <<EOF
c324d747 4492#line 4493 "configure"
5ee754fc
MK
4493#include "confdefs.h"
4494#include <ctype.h>
4495#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4496#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4497#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4498int main () { int i; for (i = 0; i < 256; i++)
4499if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4500exit (0); }
4501
4502EOF
c324d747 4503if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4504then
4505 :
9608ab8b 4506else
5ee754fc
MK
4507 echo "configure: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 rm -fr conftest*
4510 ac_cv_header_stdc=no
4511fi
4512rm -fr conftest*
4513fi
4514
4515fi
4516fi
4517
4518echo "$ac_t""$ac_cv_header_stdc" 1>&6
4519if test $ac_cv_header_stdc = yes; then
4520 cat >> confdefs.h <<\EOF
4521#define STDC_HEADERS 1
4522EOF
4523
4524fi
4525
4526for ac_hdr in link.h
4527do
4528ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4529echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4530echo "configure:4531: checking for $ac_hdr" >&5
5ee754fc
MK
4531if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4532 echo $ac_n "(cached) $ac_c" 1>&6
4533else
4534 cat > conftest.$ac_ext <<EOF
c324d747 4535#line 4536 "configure"
5ee754fc
MK
4536#include "confdefs.h"
4537#include <$ac_hdr>
4538EOF
4539ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4540{ (eval echo configure:4541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4541ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4542if test -z "$ac_err"; then
4543 rm -rf conftest*
4544 eval "ac_cv_header_$ac_safe=yes"
4545else
4546 echo "$ac_err" >&5
4547 echo "configure: failed program was:" >&5
4548 cat conftest.$ac_ext >&5
4549 rm -rf conftest*
4550 eval "ac_cv_header_$ac_safe=no"
4551fi
4552rm -f conftest*
4553fi
4554if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4555 echo "$ac_t""yes" 1>&6
4556 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4557 cat >> confdefs.h <<EOF
4558#define $ac_tr_hdr 1
4559EOF
4560
4561else
4562 echo "$ac_t""no" 1>&6
4563fi
4564done
4565
78434e59 4566for ac_hdr in machine/reg.h
5ee754fc
MK
4567do
4568ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4569echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4570echo "configure:4571: checking for $ac_hdr" >&5
5ee754fc
MK
4571if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4572 echo $ac_n "(cached) $ac_c" 1>&6
4573else
4574 cat > conftest.$ac_ext <<EOF
c324d747 4575#line 4576 "configure"
5ee754fc
MK
4576#include "confdefs.h"
4577#include <$ac_hdr>
4578EOF
4579ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4580{ (eval echo configure:4581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4581ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4582if test -z "$ac_err"; then
4583 rm -rf conftest*
4584 eval "ac_cv_header_$ac_safe=yes"
4585else
4586 echo "$ac_err" >&5
4587 echo "configure: failed program was:" >&5
4588 cat conftest.$ac_ext >&5
4589 rm -rf conftest*
4590 eval "ac_cv_header_$ac_safe=no"
4591fi
4592rm -f conftest*
4593fi
4594if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4595 echo "$ac_t""yes" 1>&6
4596 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4597 cat >> confdefs.h <<EOF
4598#define $ac_tr_hdr 1
4599EOF
4600
4601else
4602 echo "$ac_t""no" 1>&6
4603fi
4604done
4605
78434e59 4606for ac_hdr in nlist.h
5ee754fc
MK
4607do
4608ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4609echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4610echo "configure:4611: checking for $ac_hdr" >&5
5ee754fc
MK
4611if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4612 echo $ac_n "(cached) $ac_c" 1>&6
4613else
4614 cat > conftest.$ac_ext <<EOF
c324d747 4615#line 4616 "configure"
5ee754fc
MK
4616#include "confdefs.h"
4617#include <$ac_hdr>
4618EOF
4619ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4620{ (eval echo configure:4621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4621ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4622if test -z "$ac_err"; then
4623 rm -rf conftest*
4624 eval "ac_cv_header_$ac_safe=yes"
4625else
4626 echo "$ac_err" >&5
4627 echo "configure: failed program was:" >&5
4628 cat conftest.$ac_ext >&5
4629 rm -rf conftest*
4630 eval "ac_cv_header_$ac_safe=no"
4631fi
4632rm -f conftest*
4633fi
4634if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4635 echo "$ac_t""yes" 1>&6
4636 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4637 cat >> confdefs.h <<EOF
4638#define $ac_tr_hdr 1
4639EOF
4640
4641else
4642 echo "$ac_t""no" 1>&6
4643fi
4644done
4645
78434e59 4646for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4647do
4648ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4649echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4650echo "configure:4651: checking for $ac_hdr" >&5
5ee754fc
MK
4651if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4652 echo $ac_n "(cached) $ac_c" 1>&6
4653else
4654 cat > conftest.$ac_ext <<EOF
c324d747 4655#line 4656 "configure"
5ee754fc
MK
4656#include "confdefs.h"
4657#include <$ac_hdr>
4658EOF
4659ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4660{ (eval echo configure:4661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4661ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4662if test -z "$ac_err"; then
4663 rm -rf conftest*
4664 eval "ac_cv_header_$ac_safe=yes"
4665else
4666 echo "$ac_err" >&5
4667 echo "configure: failed program was:" >&5
4668 cat conftest.$ac_ext >&5
4669 rm -rf conftest*
4670 eval "ac_cv_header_$ac_safe=no"
4671fi
4672rm -f conftest*
4673fi
4674if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4675 echo "$ac_t""yes" 1>&6
4676 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4677 cat >> confdefs.h <<EOF
4678#define $ac_tr_hdr 1
4679EOF
4680
4681else
4682 echo "$ac_t""no" 1>&6
4683fi
4684done
4685
78434e59 4686for ac_hdr in proc_service.h thread_db.h
5ee754fc
MK
4687do
4688ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4689echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4690echo "configure:4691: checking for $ac_hdr" >&5
5ee754fc
MK
4691if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4692 echo $ac_n "(cached) $ac_c" 1>&6
4693else
4694 cat > conftest.$ac_ext <<EOF
c324d747 4695#line 4696 "configure"
5ee754fc
MK
4696#include "confdefs.h"
4697#include <$ac_hdr>
4698EOF
4699ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4700{ (eval echo configure:4701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4701ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4702if test -z "$ac_err"; then
4703 rm -rf conftest*
4704 eval "ac_cv_header_$ac_safe=yes"
4705else
4706 echo "$ac_err" >&5
4707 echo "configure: failed program was:" >&5
4708 cat conftest.$ac_ext >&5
4709 rm -rf conftest*
4710 eval "ac_cv_header_$ac_safe=no"
4711fi
4712rm -f conftest*
4713fi
4714if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4715 echo "$ac_t""yes" 1>&6
4716 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4717 cat >> confdefs.h <<EOF
4718#define $ac_tr_hdr 1
4719EOF
4720
4721else
4722 echo "$ac_t""no" 1>&6
4723fi
4724done
4725
78434e59 4726for ac_hdr in stddef.h
5ee754fc
MK
4727do
4728ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4729echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4730echo "configure:4731: checking for $ac_hdr" >&5
5ee754fc
MK
4731if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4732 echo $ac_n "(cached) $ac_c" 1>&6
4733else
4734 cat > conftest.$ac_ext <<EOF
c324d747 4735#line 4736 "configure"
5ee754fc
MK
4736#include "confdefs.h"
4737#include <$ac_hdr>
4738EOF
4739ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4740{ (eval echo configure:4741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4741ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4742if test -z "$ac_err"; then
4743 rm -rf conftest*
4744 eval "ac_cv_header_$ac_safe=yes"
4745else
4746 echo "$ac_err" >&5
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 rm -rf conftest*
4750 eval "ac_cv_header_$ac_safe=no"
4751fi
4752rm -f conftest*
4753fi
4754if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4755 echo "$ac_t""yes" 1>&6
4756 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4757 cat >> confdefs.h <<EOF
4758#define $ac_tr_hdr 1
4759EOF
4760
4761else
4762 echo "$ac_t""no" 1>&6
4763fi
4764done
4765
78434e59 4766for ac_hdr in stdlib.h
5ee754fc
MK
4767do
4768ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4769echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4770echo "configure:4771: checking for $ac_hdr" >&5
5ee754fc
MK
4771if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4772 echo $ac_n "(cached) $ac_c" 1>&6
4773else
4774 cat > conftest.$ac_ext <<EOF
c324d747 4775#line 4776 "configure"
5ee754fc
MK
4776#include "confdefs.h"
4777#include <$ac_hdr>
4778EOF
4779ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4780{ (eval echo configure:4781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4781ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4782if test -z "$ac_err"; then
4783 rm -rf conftest*
4784 eval "ac_cv_header_$ac_safe=yes"
4785else
4786 echo "$ac_err" >&5
4787 echo "configure: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4789 rm -rf conftest*
4790 eval "ac_cv_header_$ac_safe=no"
4791fi
4792rm -f conftest*
4793fi
4794if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4795 echo "$ac_t""yes" 1>&6
4796 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4797 cat >> confdefs.h <<EOF
4798#define $ac_tr_hdr 1
4799EOF
4800
4801else
4802 echo "$ac_t""no" 1>&6
4803fi
4804done
4805
78434e59 4806for ac_hdr in stdint.h
5ee754fc
MK
4807do
4808ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4809echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4810echo "configure:4811: checking for $ac_hdr" >&5
5ee754fc
MK
4811if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4812 echo $ac_n "(cached) $ac_c" 1>&6
4813else
4814 cat > conftest.$ac_ext <<EOF
c324d747 4815#line 4816 "configure"
5ee754fc
MK
4816#include "confdefs.h"
4817#include <$ac_hdr>
4818EOF
4819ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4820{ (eval echo configure:4821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4821ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4822if test -z "$ac_err"; then
4823 rm -rf conftest*
4824 eval "ac_cv_header_$ac_safe=yes"
4825else
4826 echo "$ac_err" >&5
4827 echo "configure: failed program was:" >&5
4828 cat conftest.$ac_ext >&5
4829 rm -rf conftest*
4830 eval "ac_cv_header_$ac_safe=no"
4831fi
4832rm -f conftest*
4833fi
4834if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4835 echo "$ac_t""yes" 1>&6
4836 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4837 cat >> confdefs.h <<EOF
4838#define $ac_tr_hdr 1
4839EOF
4840
4841else
4842 echo "$ac_t""no" 1>&6
4843fi
4844done
4845
78434e59 4846for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4847do
4848ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4849echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4850echo "configure:4851: checking for $ac_hdr" >&5
5ee754fc
MK
4851if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4852 echo $ac_n "(cached) $ac_c" 1>&6
4853else
4854 cat > conftest.$ac_ext <<EOF
c324d747 4855#line 4856 "configure"
5ee754fc
MK
4856#include "confdefs.h"
4857#include <$ac_hdr>
4858EOF
4859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4860{ (eval echo configure:4861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4862if test -z "$ac_err"; then
4863 rm -rf conftest*
4864 eval "ac_cv_header_$ac_safe=yes"
4865else
4866 echo "$ac_err" >&5
4867 echo "configure: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 rm -rf conftest*
4870 eval "ac_cv_header_$ac_safe=no"
4871fi
4872rm -f conftest*
4873fi
4874if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4875 echo "$ac_t""yes" 1>&6
4876 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4877 cat >> confdefs.h <<EOF
4878#define $ac_tr_hdr 1
4879EOF
4880
4881else
4882 echo "$ac_t""no" 1>&6
4883fi
4884done
4885
78434e59 4886for ac_hdr in sys/fault.h
5ee754fc
MK
4887do
4888ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4889echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4890echo "configure:4891: checking for $ac_hdr" >&5
5ee754fc
MK
4891if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4892 echo $ac_n "(cached) $ac_c" 1>&6
4893else
4894 cat > conftest.$ac_ext <<EOF
c324d747 4895#line 4896 "configure"
5ee754fc
MK
4896#include "confdefs.h"
4897#include <$ac_hdr>
4898EOF
4899ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4900{ (eval echo configure:4901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4901ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4902if test -z "$ac_err"; then
4903 rm -rf conftest*
4904 eval "ac_cv_header_$ac_safe=yes"
4905else
4906 echo "$ac_err" >&5
4907 echo "configure: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 rm -rf conftest*
4910 eval "ac_cv_header_$ac_safe=no"
4911fi
4912rm -f conftest*
4913fi
4914if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4915 echo "$ac_t""yes" 1>&6
4916 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4917 cat >> confdefs.h <<EOF
4918#define $ac_tr_hdr 1
4919EOF
4920
4921else
4922 echo "$ac_t""no" 1>&6
4923fi
4924done
4925
78434e59 4926for ac_hdr in sys/file.h
5ee754fc
MK
4927do
4928ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4929echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4930echo "configure:4931: checking for $ac_hdr" >&5
5ee754fc
MK
4931if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4932 echo $ac_n "(cached) $ac_c" 1>&6
4933else
4934 cat > conftest.$ac_ext <<EOF
c324d747 4935#line 4936 "configure"
5ee754fc
MK
4936#include "confdefs.h"
4937#include <$ac_hdr>
4938EOF
4939ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4940{ (eval echo configure:4941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4941ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4942if test -z "$ac_err"; then
4943 rm -rf conftest*
4944 eval "ac_cv_header_$ac_safe=yes"
4945else
4946 echo "$ac_err" >&5
4947 echo "configure: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
4949 rm -rf conftest*
4950 eval "ac_cv_header_$ac_safe=no"
4951fi
4952rm -f conftest*
4953fi
4954if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4955 echo "$ac_t""yes" 1>&6
4956 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4957 cat >> confdefs.h <<EOF
4958#define $ac_tr_hdr 1
4959EOF
4960
4961else
4962 echo "$ac_t""no" 1>&6
4963fi
4964done
4965
78434e59 4966for ac_hdr in sys/filio.h
5ee754fc
MK
4967do
4968ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4969echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 4970echo "configure:4971: checking for $ac_hdr" >&5
5ee754fc
MK
4971if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4972 echo $ac_n "(cached) $ac_c" 1>&6
4973else
4974 cat > conftest.$ac_ext <<EOF
c324d747 4975#line 4976 "configure"
5ee754fc
MK
4976#include "confdefs.h"
4977#include <$ac_hdr>
4978EOF
4979ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 4980{ (eval echo configure:4981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4981ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4982if test -z "$ac_err"; then
4983 rm -rf conftest*
4984 eval "ac_cv_header_$ac_safe=yes"
4985else
4986 echo "$ac_err" >&5
4987 echo "configure: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
4989 rm -rf conftest*
4990 eval "ac_cv_header_$ac_safe=no"
4991fi
4992rm -f conftest*
4993fi
4994if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4995 echo "$ac_t""yes" 1>&6
4996 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4997 cat >> confdefs.h <<EOF
4998#define $ac_tr_hdr 1
4999EOF
5000
5001else
5002 echo "$ac_t""no" 1>&6
5003fi
5004done
5005
78434e59 5006for ac_hdr in sys/ioctl.h
5ee754fc
MK
5007do
5008ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5009echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5010echo "configure:5011: checking for $ac_hdr" >&5
5ee754fc
MK
5011if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5012 echo $ac_n "(cached) $ac_c" 1>&6
5013else
5014 cat > conftest.$ac_ext <<EOF
c324d747 5015#line 5016 "configure"
5ee754fc
MK
5016#include "confdefs.h"
5017#include <$ac_hdr>
5018EOF
5019ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5020{ (eval echo configure:5021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5021ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5022if test -z "$ac_err"; then
5023 rm -rf conftest*
5024 eval "ac_cv_header_$ac_safe=yes"
5025else
5026 echo "$ac_err" >&5
5027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 rm -rf conftest*
5030 eval "ac_cv_header_$ac_safe=no"
5031fi
5032rm -f conftest*
5033fi
5034if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5035 echo "$ac_t""yes" 1>&6
5036 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5037 cat >> confdefs.h <<EOF
5038#define $ac_tr_hdr 1
5039EOF
5040
5041else
5042 echo "$ac_t""no" 1>&6
5043fi
5044done
5045
78434e59 5046for ac_hdr in sys/param.h
5ee754fc
MK
5047do
5048ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5049echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5050echo "configure:5051: checking for $ac_hdr" >&5
5ee754fc
MK
5051if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5052 echo $ac_n "(cached) $ac_c" 1>&6
5053else
5054 cat > conftest.$ac_ext <<EOF
c324d747 5055#line 5056 "configure"
5ee754fc
MK
5056#include "confdefs.h"
5057#include <$ac_hdr>
5058EOF
5059ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5060{ (eval echo configure:5061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5061ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5062if test -z "$ac_err"; then
5063 rm -rf conftest*
5064 eval "ac_cv_header_$ac_safe=yes"
5065else
5066 echo "$ac_err" >&5
5067 echo "configure: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5069 rm -rf conftest*
5070 eval "ac_cv_header_$ac_safe=no"
5071fi
5072rm -f conftest*
5073fi
5074if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5075 echo "$ac_t""yes" 1>&6
5076 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5077 cat >> confdefs.h <<EOF
5078#define $ac_tr_hdr 1
5079EOF
5080
5081else
5082 echo "$ac_t""no" 1>&6
5083fi
5084done
5085
78434e59 5086for ac_hdr in sys/proc.h
5ee754fc
MK
5087do
5088ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5089echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5090echo "configure:5091: checking for $ac_hdr" >&5
5ee754fc
MK
5091if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5092 echo $ac_n "(cached) $ac_c" 1>&6
5093else
5094 cat > conftest.$ac_ext <<EOF
c324d747 5095#line 5096 "configure"
5ee754fc
MK
5096#include "confdefs.h"
5097#include <$ac_hdr>
5098EOF
5099ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5100{ (eval echo configure:5101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5101ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5102if test -z "$ac_err"; then
5103 rm -rf conftest*
5104 eval "ac_cv_header_$ac_safe=yes"
5105else
5106 echo "$ac_err" >&5
5107 echo "configure: failed program was:" >&5
5108 cat conftest.$ac_ext >&5
5109 rm -rf conftest*
5110 eval "ac_cv_header_$ac_safe=no"
5111fi
5112rm -f conftest*
5113fi
5114if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5115 echo "$ac_t""yes" 1>&6
5116 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5117 cat >> confdefs.h <<EOF
5118#define $ac_tr_hdr 1
5119EOF
5120
5121else
5122 echo "$ac_t""no" 1>&6
5123fi
5124done
5125
78434e59 5126for ac_hdr in sys/procfs.h
5ee754fc
MK
5127do
5128ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5129echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5130echo "configure:5131: checking for $ac_hdr" >&5
5ee754fc
MK
5131if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5132 echo $ac_n "(cached) $ac_c" 1>&6
5133else
5134 cat > conftest.$ac_ext <<EOF
c324d747 5135#line 5136 "configure"
5ee754fc
MK
5136#include "confdefs.h"
5137#include <$ac_hdr>
5138EOF
5139ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5140{ (eval echo configure:5141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5141ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5142if test -z "$ac_err"; then
5143 rm -rf conftest*
5144 eval "ac_cv_header_$ac_safe=yes"
5145else
5146 echo "$ac_err" >&5
5147 echo "configure: failed program was:" >&5
5148 cat conftest.$ac_ext >&5
5149 rm -rf conftest*
5150 eval "ac_cv_header_$ac_safe=no"
5151fi
5152rm -f conftest*
5153fi
5154if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5155 echo "$ac_t""yes" 1>&6
5156 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5157 cat >> confdefs.h <<EOF
5158#define $ac_tr_hdr 1
5159EOF
5160
5161else
5162 echo "$ac_t""no" 1>&6
5163fi
5164done
5165
78434e59 5166for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5167do
5168ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5169echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5170echo "configure:5171: checking for $ac_hdr" >&5
5ee754fc
MK
5171if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5172 echo $ac_n "(cached) $ac_c" 1>&6
5173else
5174 cat > conftest.$ac_ext <<EOF
c324d747 5175#line 5176 "configure"
5ee754fc
MK
5176#include "confdefs.h"
5177#include <$ac_hdr>
5178EOF
5179ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5180{ (eval echo configure:5181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5181ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5182if test -z "$ac_err"; then
5183 rm -rf conftest*
5184 eval "ac_cv_header_$ac_safe=yes"
5185else
5186 echo "$ac_err" >&5
5187 echo "configure: failed program was:" >&5
5188 cat conftest.$ac_ext >&5
5189 rm -rf conftest*
5190 eval "ac_cv_header_$ac_safe=no"
5191fi
5192rm -f conftest*
5193fi
5194if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5195 echo "$ac_t""yes" 1>&6
5196 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5197 cat >> confdefs.h <<EOF
5198#define $ac_tr_hdr 1
5199EOF
5200
5201else
5202 echo "$ac_t""no" 1>&6
5203fi
5204done
5205
78434e59 5206for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5207do
5208ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5209echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5210echo "configure:5211: checking for $ac_hdr" >&5
5ee754fc
MK
5211if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5212 echo $ac_n "(cached) $ac_c" 1>&6
5213else
5214 cat > conftest.$ac_ext <<EOF
c324d747 5215#line 5216 "configure"
5ee754fc
MK
5216#include "confdefs.h"
5217#include <$ac_hdr>
5218EOF
5219ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5220{ (eval echo configure:5221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5221ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5222if test -z "$ac_err"; then
5223 rm -rf conftest*
5224 eval "ac_cv_header_$ac_safe=yes"
5225else
5226 echo "$ac_err" >&5
5227 echo "configure: failed program was:" >&5
5228 cat conftest.$ac_ext >&5
5229 rm -rf conftest*
5230 eval "ac_cv_header_$ac_safe=no"
5231fi
5232rm -f conftest*
5233fi
5234if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5235 echo "$ac_t""yes" 1>&6
5236 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5237 cat >> confdefs.h <<EOF
5238#define $ac_tr_hdr 1
5239EOF
5240
5241else
5242 echo "$ac_t""no" 1>&6
5243fi
5244done
5245
78434e59 5246for ac_hdr in sys/select.h
5ee754fc
MK
5247do
5248ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5249echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5250echo "configure:5251: checking for $ac_hdr" >&5
5ee754fc
MK
5251if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5252 echo $ac_n "(cached) $ac_c" 1>&6
5253else
5254 cat > conftest.$ac_ext <<EOF
c324d747 5255#line 5256 "configure"
5ee754fc
MK
5256#include "confdefs.h"
5257#include <$ac_hdr>
5258EOF
5259ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5260{ (eval echo configure:5261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5261ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5262if test -z "$ac_err"; then
5263 rm -rf conftest*
5264 eval "ac_cv_header_$ac_safe=yes"
5265else
5266 echo "$ac_err" >&5
5267 echo "configure: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 rm -rf conftest*
5270 eval "ac_cv_header_$ac_safe=no"
5271fi
5272rm -f conftest*
5273fi
5274if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5275 echo "$ac_t""yes" 1>&6
5276 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5277 cat >> confdefs.h <<EOF
5278#define $ac_tr_hdr 1
5279EOF
5280
5281else
5282 echo "$ac_t""no" 1>&6
5283fi
5284done
5285
78434e59 5286for ac_hdr in sys/syscall.h
5ee754fc
MK
5287do
5288ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5289echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5290echo "configure:5291: checking for $ac_hdr" >&5
5ee754fc
MK
5291if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5292 echo $ac_n "(cached) $ac_c" 1>&6
5293else
5294 cat > conftest.$ac_ext <<EOF
c324d747 5295#line 5296 "configure"
5ee754fc
MK
5296#include "confdefs.h"
5297#include <$ac_hdr>
5298EOF
5299ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5300{ (eval echo configure:5301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5301ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5302if test -z "$ac_err"; then
5303 rm -rf conftest*
5304 eval "ac_cv_header_$ac_safe=yes"
5305else
5306 echo "$ac_err" >&5
5307 echo "configure: failed program was:" >&5
5308 cat conftest.$ac_ext >&5
5309 rm -rf conftest*
5310 eval "ac_cv_header_$ac_safe=no"
5311fi
5312rm -f conftest*
5313fi
5314if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5315 echo "$ac_t""yes" 1>&6
5316 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5317 cat >> confdefs.h <<EOF
5318#define $ac_tr_hdr 1
5319EOF
5320
5321else
5322 echo "$ac_t""no" 1>&6
5323fi
5324done
5325
78434e59 5326for ac_hdr in sys/user.h
5ee754fc
MK
5327do
5328ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5329echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5330echo "configure:5331: checking for $ac_hdr" >&5
5ee754fc
MK
5331if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5332 echo $ac_n "(cached) $ac_c" 1>&6
5333else
5334 cat > conftest.$ac_ext <<EOF
c324d747 5335#line 5336 "configure"
5ee754fc
MK
5336#include "confdefs.h"
5337#include <$ac_hdr>
5338EOF
5339ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5340{ (eval echo configure:5341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5341ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5342if test -z "$ac_err"; then
5343 rm -rf conftest*
5344 eval "ac_cv_header_$ac_safe=yes"
5345else
5346 echo "$ac_err" >&5
9608ab8b
MK
5347 echo "configure: failed program was:" >&5
5348 cat conftest.$ac_ext >&5
5349 rm -rf conftest*
5ee754fc 5350 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5351fi
5352rm -f conftest*
5353fi
5ee754fc 5354if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5355 echo "$ac_t""yes" 1>&6
5356 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5357 cat >> confdefs.h <<EOF
5358#define $ac_tr_hdr 1
5359EOF
5ee754fc 5360
9608ab8b
MK
5361else
5362 echo "$ac_t""no" 1>&6
5363fi
5364done
5ee754fc 5365
78434e59 5366for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5367do
5368ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5369echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5370echo "configure:5371: checking for $ac_hdr" >&5
5ee754fc 5371if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5372 echo $ac_n "(cached) $ac_c" 1>&6
5373else
5ee754fc 5374 cat > conftest.$ac_ext <<EOF
c324d747 5375#line 5376 "configure"
9608ab8b 5376#include "confdefs.h"
5ee754fc 5377#include <$ac_hdr>
9608ab8b 5378EOF
5ee754fc 5379ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5380{ (eval echo configure:5381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5381ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5382if test -z "$ac_err"; then
9608ab8b 5383 rm -rf conftest*
5ee754fc 5384 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5385else
5ee754fc 5386 echo "$ac_err" >&5
9608ab8b
MK
5387 echo "configure: failed program was:" >&5
5388 cat conftest.$ac_ext >&5
5389 rm -rf conftest*
5ee754fc 5390 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5391fi
5392rm -f conftest*
9608ab8b 5393fi
5ee754fc 5394if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5395 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5396 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5397 cat >> confdefs.h <<EOF
5398#define $ac_tr_hdr 1
5399EOF
5400
9608ab8b
MK
5401else
5402 echo "$ac_t""no" 1>&6
5403fi
5ee754fc 5404done
9608ab8b 5405
78434e59 5406for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5407do
5408ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5409echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5410echo "configure:5411: checking for $ac_hdr" >&5
5ee754fc 5411if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5412 echo $ac_n "(cached) $ac_c" 1>&6
5413else
5ee754fc 5414 cat > conftest.$ac_ext <<EOF
c324d747 5415#line 5416 "configure"
9608ab8b 5416#include "confdefs.h"
5ee754fc 5417#include <$ac_hdr>
9608ab8b 5418EOF
5ee754fc 5419ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5420{ (eval echo configure:5421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5421ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5422if test -z "$ac_err"; then
9608ab8b 5423 rm -rf conftest*
5ee754fc 5424 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5425else
5ee754fc 5426 echo "$ac_err" >&5
9608ab8b
MK
5427 echo "configure: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
5429 rm -rf conftest*
5ee754fc 5430 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5431fi
5432rm -f conftest*
9608ab8b 5433fi
5ee754fc 5434if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5435 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5436 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5437 cat >> confdefs.h <<EOF
5438#define $ac_tr_hdr 1
5439EOF
5440
9608ab8b
MK
5441else
5442 echo "$ac_t""no" 1>&6
5443fi
5ee754fc 5444done
9608ab8b 5445
78434e59
MK
5446for ac_hdr in unistd.h
5447do
5448ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5449echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5450echo "configure:5451: checking for $ac_hdr" >&5
78434e59
MK
5451if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5452 echo $ac_n "(cached) $ac_c" 1>&6
5453else
5454 cat > conftest.$ac_ext <<EOF
c324d747 5455#line 5456 "configure"
78434e59
MK
5456#include "confdefs.h"
5457#include <$ac_hdr>
5458EOF
5459ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5460{ (eval echo configure:5461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5461ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5462if test -z "$ac_err"; then
5463 rm -rf conftest*
5464 eval "ac_cv_header_$ac_safe=yes"
5465else
5466 echo "$ac_err" >&5
5467 echo "configure: failed program was:" >&5
5468 cat conftest.$ac_ext >&5
5469 rm -rf conftest*
5470 eval "ac_cv_header_$ac_safe=no"
5471fi
5472rm -f conftest*
5473fi
5474if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5475 echo "$ac_t""yes" 1>&6
5476 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5477 cat >> confdefs.h <<EOF
5478#define $ac_tr_hdr 1
5479EOF
5480
5481else
5482 echo "$ac_t""no" 1>&6
5483fi
5484done
5485
9608ab8b 5486
5ee754fc
MK
5487# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5488# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5489# think that we don't have <curses.h> if we're using GCC.
5490case $host_os in
5491 solaris2.[78])
5492 if test "$GCC" = yes; then
5493 cat >> confdefs.h <<\EOF
5494#define _MSE_INT_H 1
5495EOF
5496
5497 fi ;;
5498esac
5499for ac_hdr in curses.h ncurses.h term.h
5500do
5501ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5502echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5503echo "configure:5504: checking for $ac_hdr" >&5
5ee754fc 5504if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5505 echo $ac_n "(cached) $ac_c" 1>&6
5506else
5507 cat > conftest.$ac_ext <<EOF
c324d747 5508#line 5509 "configure"
c906108c 5509#include "confdefs.h"
5ee754fc 5510#include <$ac_hdr>
c906108c
SS
5511EOF
5512ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5513{ (eval echo configure:5514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5514ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5515if test -z "$ac_err"; then
5516 rm -rf conftest*
5ee754fc 5517 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5518else
5519 echo "$ac_err" >&5
5520 echo "configure: failed program was:" >&5
5521 cat conftest.$ac_ext >&5
5522 rm -rf conftest*
5ee754fc 5523 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5524fi
5525rm -f conftest*
c906108c 5526fi
5ee754fc
MK
5527if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5528 echo "$ac_t""yes" 1>&6
5529 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5530 cat >> confdefs.h <<EOF
5531#define $ac_tr_hdr 1
c906108c 5532EOF
5ee754fc 5533
c906108c 5534else
5ee754fc 5535 echo "$ac_t""no" 1>&6
c906108c 5536fi
5ee754fc 5537done
c906108c
SS
5538
5539
5ee754fc
MK
5540# FIXME: kettenis/20030102: In most cases we include these
5541# unconditionally, so what's the point in checking these?
5542for ac_hdr in ctype.h time.h
c906108c
SS
5543do
5544ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5545echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 5546echo "configure:5547: checking for $ac_hdr" >&5
c906108c
SS
5547if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5548 echo $ac_n "(cached) $ac_c" 1>&6
5549else
5550 cat > conftest.$ac_ext <<EOF
c324d747 5551#line 5552 "configure"
c906108c
SS
5552#include "confdefs.h"
5553#include <$ac_hdr>
5554EOF
5555ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 5556{ (eval echo configure:5557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5557ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5558if test -z "$ac_err"; then
5559 rm -rf conftest*
5560 eval "ac_cv_header_$ac_safe=yes"
5561else
5562 echo "$ac_err" >&5
5563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5565 rm -rf conftest*
5566 eval "ac_cv_header_$ac_safe=no"
5567fi
5568rm -f conftest*
5569fi
5570if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5571 echo "$ac_t""yes" 1>&6
5572 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5573 cat >> confdefs.h <<EOF
5574#define $ac_tr_hdr 1
5575EOF
5576
5577else
5578 echo "$ac_t""no" 1>&6
5579fi
5580done
5581
5ee754fc 5582
40a7debc 5583echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
c324d747 5584echo "configure:5585: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5585if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5586 echo $ac_n "(cached) $ac_c" 1>&6
5587else
5588 cat > conftest.$ac_ext <<EOF
c324d747 5589#line 5590 "configure"
40a7debc
EZ
5590#include "confdefs.h"
5591#include <sys/types.h>
5592#include <sys/stat.h>
5593int main() {
5594struct stat st; (void) st.st_blocks;
5595; return 0; }
5596EOF
c324d747 5597if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5598 rm -rf conftest*
5599 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5600else
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
5604 gdb_cv_have_struct_stat_with_st_blocks_member=no
5605fi
5606rm -f conftest*
5607fi
5608
5609echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5610if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5611 cat >> confdefs.h <<\EOF
5612#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5613EOF
5614
5615fi
b9362cc7
AC
5616# ------------------------- #
5617# Checks for declarations. #
5618# ------------------------- #
5619
5620for ac_func in getopt
5621do
5622 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5623echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
c324d747 5624echo "configure:5625: checking whether $ac_func is declared" >&5
b9362cc7
AC
5625if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5626 echo $ac_n "(cached) $ac_c" 1>&6
5627else
5628 cat > conftest.$ac_ext <<EOF
c324d747 5629#line 5630 "configure"
b9362cc7
AC
5630#include "confdefs.h"
5631#undef $ac_tr_decl
5632#define $ac_tr_decl 1
5633
5634
5635int main() {
5636#ifndef $ac_func
5637char *(*pfn) = (char *(*)) $ac_func ;
5638#endif
5639; return 0; }
5640EOF
c324d747 5641if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5642 rm -rf conftest*
5643 eval "gcc_cv_have_decl_$ac_func=yes"
5644else
5645 echo "configure: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5647 rm -rf conftest*
5648 eval "gcc_cv_have_decl_$ac_func=no"
5649fi
5650rm -f conftest*
5651fi
5652
5653if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5654 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5655#define $ac_tr_decl 1
5656EOF
5657
5658else
5659 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5660#define $ac_tr_decl 0
5661EOF
5662
5663fi
5664
5665done
5666if test x = y ; then
5667 cat >> confdefs.h <<\EOF
5668#define HAVE_DECL_GETOPT 1
5669EOF
5670fi
5671
5672
5ee754fc
MK
5673# ------------------ #
5674# Checks for types. #
5675# ------------------ #
5676
5677echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
c324d747 5678echo "configure:5679: checking return type of signal handlers" >&5
5ee754fc 5679if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5680 echo $ac_n "(cached) $ac_c" 1>&6
5681else
5682 cat > conftest.$ac_ext <<EOF
c324d747 5683#line 5684 "configure"
c906108c
SS
5684#include "confdefs.h"
5685#include <sys/types.h>
5ee754fc
MK
5686#include <signal.h>
5687#ifdef signal
5688#undef signal
c906108c 5689#endif
5ee754fc
MK
5690#ifdef __cplusplus
5691extern "C" void (*signal (int, void (*)(int)))(int);
5692#else
5693void (*signal ()) ();
c906108c
SS
5694#endif
5695
5ee754fc
MK
5696int main() {
5697int i;
5698; return 0; }
c906108c 5699EOF
c324d747 5700if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5701 rm -rf conftest*
5ee754fc 5702 ac_cv_type_signal=void
c906108c 5703else
5ee754fc
MK
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
c906108c 5706 rm -rf conftest*
5ee754fc 5707 ac_cv_type_signal=int
c906108c
SS
5708fi
5709rm -f conftest*
c906108c
SS
5710fi
5711
5ee754fc
MK
5712echo "$ac_t""$ac_cv_type_signal" 1>&6
5713cat >> confdefs.h <<EOF
5714#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5715EOF
5716
c906108c
SS
5717
5718
5ee754fc
MK
5719# ------------------------------------- #
5720# Checks for compiler characteristics. #
5721# ------------------------------------- #
5722
c906108c 5723echo $ac_n "checking for working const""... $ac_c" 1>&6
c324d747 5724echo "configure:5725: checking for working const" >&5
c906108c
SS
5725if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5726 echo $ac_n "(cached) $ac_c" 1>&6
5727else
5728 cat > conftest.$ac_ext <<EOF
c324d747 5729#line 5730 "configure"
c906108c
SS
5730#include "confdefs.h"
5731
5732int main() {
5733
5734/* Ultrix mips cc rejects this. */
5735typedef int charset[2]; const charset x;
5736/* SunOS 4.1.1 cc rejects this. */
5737char const *const *ccp;
5738char **p;
5739/* NEC SVR4.0.2 mips cc rejects this. */
5740struct point {int x, y;};
5741static struct point const zero = {0,0};
5742/* AIX XL C 1.02.0.0 rejects this.
5743 It does not let you subtract one const X* pointer from another in an arm
5744 of an if-expression whose if-part is not a constant expression */
5745const char *g = "string";
5746ccp = &g + (g ? g-g : 0);
5747/* HPUX 7.0 cc rejects these. */
5748++ccp;
5749p = (char**) ccp;
5750ccp = (char const *const *) p;
5751{ /* SCO 3.2v4 cc rejects this. */
5752 char *t;
5753 char const *s = 0 ? (char *) 0 : (char const *) 0;
5754
5755 *t++ = 0;
5756}
5757{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5758 int x[] = {25, 17};
5759 const int *foo = &x[0];
5760 ++foo;
5761}
5762{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5763 typedef const int *iptr;
5764 iptr p = 0;
5765 ++p;
5766}
5767{ /* AIX XL C 1.02.0.0 rejects this saying
5768 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5769 struct s { int j; const int *ap[3]; };
5770 struct s *b; b->j = 5;
5771}
5772{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5773 const int foo = 10;
5774}
5775
5776; return 0; }
5777EOF
c324d747 5778if { (eval echo configure:5779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5779 rm -rf conftest*
5780 ac_cv_c_const=yes
5781else
5782 echo "configure: failed program was:" >&5
5783 cat conftest.$ac_ext >&5
5784 rm -rf conftest*
5785 ac_cv_c_const=no
5786fi
5787rm -f conftest*
5788fi
5789
5790echo "$ac_t""$ac_cv_c_const" 1>&6
5791if test $ac_cv_c_const = no; then
5792 cat >> confdefs.h <<\EOF
5793#define const
5794EOF
5795
5796fi
5797
bce58c09 5798echo $ac_n "checking for inline""... $ac_c" 1>&6
c324d747 5799echo "configure:5800: checking for inline" >&5
bce58c09
JB
5800if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5801 echo $ac_n "(cached) $ac_c" 1>&6
5802else
5803 ac_cv_c_inline=no
5804for ac_kw in inline __inline__ __inline; do
5805 cat > conftest.$ac_ext <<EOF
c324d747 5806#line 5807 "configure"
bce58c09
JB
5807#include "confdefs.h"
5808
5809int main() {
5810} $ac_kw foo() {
5811; return 0; }
5812EOF
c324d747 5813if { (eval echo configure:5814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5814 rm -rf conftest*
5815 ac_cv_c_inline=$ac_kw; break
5816else
5817 echo "configure: failed program was:" >&5
5818 cat conftest.$ac_ext >&5
5819fi
5820rm -f conftest*
5821done
5822
5823fi
5824
5825echo "$ac_t""$ac_cv_c_inline" 1>&6
5826case "$ac_cv_c_inline" in
5827 inline | yes) ;;
5828 no) cat >> confdefs.h <<\EOF
5829#define inline
5830EOF
5831 ;;
5832 *) cat >> confdefs.h <<EOF
5833#define inline $ac_cv_c_inline
5834EOF
5835 ;;
5836esac
5837
c906108c 5838
5ee754fc
MK
5839# ------------------------------ #
5840# Checks for library functions. #
5841# ------------------------------ #
5842
46711df8
MK
5843# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5844# for constant arguments. Useless!
5845echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
c324d747 5846echo "configure:5847: checking for working alloca.h" >&5
46711df8
MK
5847if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5848 echo $ac_n "(cached) $ac_c" 1>&6
5849else
5850 cat > conftest.$ac_ext <<EOF
c324d747 5851#line 5852 "configure"
46711df8
MK
5852#include "confdefs.h"
5853#include <alloca.h>
5854int main() {
5855char *p = alloca(2 * sizeof(int));
5856; return 0; }
5857EOF
c324d747 5858if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5859 rm -rf conftest*
5860 ac_cv_header_alloca_h=yes
5861else
5862 echo "configure: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
5864 rm -rf conftest*
5865 ac_cv_header_alloca_h=no
5866fi
5867rm -f conftest*
5868fi
5869
5870echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5871if test $ac_cv_header_alloca_h = yes; then
5872 cat >> confdefs.h <<\EOF
5873#define HAVE_ALLOCA_H 1
5874EOF
5875
5876fi
5877
5878echo $ac_n "checking for alloca""... $ac_c" 1>&6
c324d747 5879echo "configure:5880: checking for alloca" >&5
46711df8
MK
5880if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5881 echo $ac_n "(cached) $ac_c" 1>&6
5882else
5883 cat > conftest.$ac_ext <<EOF
c324d747 5884#line 5885 "configure"
46711df8
MK
5885#include "confdefs.h"
5886
5887#ifdef __GNUC__
5888# define alloca __builtin_alloca
5889#else
5890# ifdef _MSC_VER
5891# include <malloc.h>
5892# define alloca _alloca
5893# else
5894# if HAVE_ALLOCA_H
5895# include <alloca.h>
5896# else
5897# ifdef _AIX
5898 #pragma alloca
5899# else
5900# ifndef alloca /* predefined by HP cc +Olibcalls */
5901char *alloca ();
5902# endif
5903# endif
5904# endif
5905# endif
5906#endif
5907
5908int main() {
5909char *p = (char *) alloca(1);
5910; return 0; }
5911EOF
c324d747 5912if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5913 rm -rf conftest*
5914 ac_cv_func_alloca_works=yes
5915else
5916 echo "configure: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 rm -rf conftest*
5919 ac_cv_func_alloca_works=no
5920fi
5921rm -f conftest*
5922fi
5923
5924echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5925if test $ac_cv_func_alloca_works = yes; then
5926 cat >> confdefs.h <<\EOF
5927#define HAVE_ALLOCA 1
5928EOF
5929
5930fi
5931
5932if test $ac_cv_func_alloca_works = no; then
5933 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5934 # that cause trouble. Some versions do not even contain alloca or
5935 # contain a buggy version. If you still want to use their alloca,
5936 # use ar to extract alloca.o from them instead of compiling alloca.c.
5937 ALLOCA=alloca.${ac_objext}
5938 cat >> confdefs.h <<\EOF
5939#define C_ALLOCA 1
5940EOF
5941
5942
5943echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
c324d747 5944echo "configure:5945: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5945if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5946 echo $ac_n "(cached) $ac_c" 1>&6
5947else
5948 cat > conftest.$ac_ext <<EOF
c324d747 5949#line 5950 "configure"
46711df8
MK
5950#include "confdefs.h"
5951#if defined(CRAY) && ! defined(CRAY2)
5952webecray
5953#else
5954wenotbecray
5955#endif
5956
5957EOF
5958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5959 egrep "webecray" >/dev/null 2>&1; then
5960 rm -rf conftest*
5961 ac_cv_os_cray=yes
5962else
5963 rm -rf conftest*
5964 ac_cv_os_cray=no
5965fi
5966rm -f conftest*
5967
5968fi
5969
5970echo "$ac_t""$ac_cv_os_cray" 1>&6
5971if test $ac_cv_os_cray = yes; then
5972for ac_func in _getb67 GETB67 getb67; do
5973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 5974echo "configure:5975: checking for $ac_func" >&5
46711df8
MK
5975if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5976 echo $ac_n "(cached) $ac_c" 1>&6
5977else
5978 cat > conftest.$ac_ext <<EOF
c324d747 5979#line 5980 "configure"
46711df8
MK
5980#include "confdefs.h"
5981/* System header to define __stub macros and hopefully few prototypes,
5982 which can conflict with char $ac_func(); below. */
5983#include <assert.h>
5984/* Override any gcc2 internal prototype to avoid an error. */
5985/* We use char because int might match the return type of a gcc2
5986 builtin and then its argument prototype would still apply. */
5987char $ac_func();
5988
5989int main() {
5990
5991/* The GNU C library defines this for functions which it implements
5992 to always fail with ENOSYS. Some functions are actually named
5993 something starting with __ and the normal name is an alias. */
5994#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5995choke me
5996#else
5997$ac_func();
5998#endif
5999
6000; return 0; }
6001EOF
c324d747 6002if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6003 rm -rf conftest*
6004 eval "ac_cv_func_$ac_func=yes"
6005else
6006 echo "configure: failed program was:" >&5
6007 cat conftest.$ac_ext >&5
6008 rm -rf conftest*
6009 eval "ac_cv_func_$ac_func=no"
6010fi
6011rm -f conftest*
6012fi
6013
6014if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6015 echo "$ac_t""yes" 1>&6
6016 cat >> confdefs.h <<EOF
6017#define CRAY_STACKSEG_END $ac_func
6018EOF
6019
6020 break
6021else
6022 echo "$ac_t""no" 1>&6
6023fi
6024
6025done
6026fi
6027
6028echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
c324d747 6029echo "configure:6030: checking stack direction for C alloca" >&5
46711df8
MK
6030if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6031 echo $ac_n "(cached) $ac_c" 1>&6
6032else
6033 if test "$cross_compiling" = yes; then
6034 ac_cv_c_stack_direction=0
6035else
6036 cat > conftest.$ac_ext <<EOF
c324d747 6037#line 6038 "configure"
46711df8
MK
6038#include "confdefs.h"
6039find_stack_direction ()
6040{
6041 static char *addr = 0;
6042 auto char dummy;
6043 if (addr == 0)
6044 {
6045 addr = &dummy;
6046 return find_stack_direction ();
6047 }
6048 else
6049 return (&dummy > addr) ? 1 : -1;
6050}
6051main ()
6052{
6053 exit (find_stack_direction() < 0);
6054}
6055EOF
c324d747 6056if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6057then
6058 ac_cv_c_stack_direction=1
6059else
6060 echo "configure: failed program was:" >&5
6061 cat conftest.$ac_ext >&5
6062 rm -fr conftest*
6063 ac_cv_c_stack_direction=-1
6064fi
6065rm -fr conftest*
6066fi
6067
6068fi
6069
6070echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6071cat >> confdefs.h <<EOF
6072#define STACK_DIRECTION $ac_cv_c_stack_direction
6073EOF
6074
6075fi
6076
d836ee13 6077for ac_hdr in unistd.h
97bf5e38
MK
6078do
6079ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6080echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c324d747 6081echo "configure:6082: checking for $ac_hdr" >&5
74c1b268
AC
6082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6083 echo $ac_n "(cached) $ac_c" 1>&6
6084else
6085 cat > conftest.$ac_ext <<EOF
c324d747 6086#line 6087 "configure"
74c1b268 6087#include "confdefs.h"
97bf5e38 6088#include <$ac_hdr>
74c1b268
AC
6089EOF
6090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 6091{ (eval echo configure:6092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6092ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6093if test -z "$ac_err"; then
6094 rm -rf conftest*
6095 eval "ac_cv_header_$ac_safe=yes"
6096else
6097 echo "$ac_err" >&5
6098 echo "configure: failed program was:" >&5
6099 cat conftest.$ac_ext >&5
6100 rm -rf conftest*
6101 eval "ac_cv_header_$ac_safe=no"
6102fi
6103rm -f conftest*
6104fi
6105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6106 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6107 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6108 cat >> confdefs.h <<EOF
6109#define $ac_tr_hdr 1
74c1b268 6110EOF
97bf5e38 6111
74c1b268
AC
6112else
6113 echo "$ac_t""no" 1>&6
6114fi
97bf5e38 6115done
74c1b268 6116
97bf5e38
MK
6117for ac_func in getpagesize
6118do
6119echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6120echo "configure:6121: checking for $ac_func" >&5
97bf5e38 6121if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6122 echo $ac_n "(cached) $ac_c" 1>&6
6123else
6124 cat > conftest.$ac_ext <<EOF
c324d747 6125#line 6126 "configure"
74c1b268
AC
6126#include "confdefs.h"
6127/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6128 which can conflict with char $ac_func(); below. */
74c1b268
AC
6129#include <assert.h>
6130/* Override any gcc2 internal prototype to avoid an error. */
6131/* We use char because int might match the return type of a gcc2
6132 builtin and then its argument prototype would still apply. */
97bf5e38 6133char $ac_func();
74c1b268
AC
6134
6135int main() {
6136
6137/* The GNU C library defines this for functions which it implements
6138 to always fail with ENOSYS. Some functions are actually named
6139 something starting with __ and the normal name is an alias. */
97bf5e38 6140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6141choke me
6142#else
97bf5e38 6143$ac_func();
74c1b268
AC
6144#endif
6145
6146; return 0; }
6147EOF
c324d747 6148if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6149 rm -rf conftest*
97bf5e38 6150 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6151else
6152 echo "configure: failed program was:" >&5
6153 cat conftest.$ac_ext >&5
6154 rm -rf conftest*
97bf5e38 6155 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6156fi
6157rm -f conftest*
6158fi
6159
97bf5e38 6160if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6161 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6162 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6163 cat >> confdefs.h <<EOF
6164#define $ac_tr_func 1
6165EOF
6166
74c1b268
AC
6167else
6168 echo "$ac_t""no" 1>&6
6169fi
97bf5e38 6170done
74c1b268 6171
97bf5e38 6172echo $ac_n "checking for working mmap""... $ac_c" 1>&6
c324d747 6173echo "configure:6174: checking for working mmap" >&5
97bf5e38
MK
6174if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6175 echo $ac_n "(cached) $ac_c" 1>&6
6176else
6177 if test "$cross_compiling" = yes; then
6178 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6179else
6180 cat > conftest.$ac_ext <<EOF
c324d747 6181#line 6182 "configure"
74c1b268 6182#include "confdefs.h"
97bf5e38
MK
6183
6184/* Thanks to Mike Haertel and Jim Avera for this test.
6185 Here is a matrix of mmap possibilities:
6186 mmap private not fixed
6187 mmap private fixed at somewhere currently unmapped
6188 mmap private fixed at somewhere already mapped
6189 mmap shared not fixed
6190 mmap shared fixed at somewhere currently unmapped
6191 mmap shared fixed at somewhere already mapped
6192 For private mappings, we should verify that changes cannot be read()
6193 back from the file, nor mmap's back from the file at a different
6194 address. (There have been systems where private was not correctly
6195 implemented like the infamous i386 svr4.0, and systems where the
6196 VM page cache was not coherent with the filesystem buffer cache
6197 like early versions of FreeBSD and possibly contemporary NetBSD.)
6198 For shared mappings, we should conversely verify that changes get
6199 propogated back to all the places they're supposed to be.
6200
6201 Grep wants private fixed already mapped.
6202 The main things grep needs to know about mmap are:
6203 * does it exist and is it safe to write into the mmap'd area
6204 * how to use it (BSD variants) */
74c1b268 6205#include <sys/types.h>
97bf5e38
MK
6206#include <fcntl.h>
6207#include <sys/mman.h>
6208
6209/* This mess was copied from the GNU getpagesize.h. */
6210#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6211# ifdef HAVE_UNISTD_H
6212# include <unistd.h>
6213# endif
97bf5e38
MK
6214
6215/* Assume that all systems that can run configure have sys/param.h. */
6216# ifndef HAVE_SYS_PARAM_H
6217# define HAVE_SYS_PARAM_H 1
6218# endif
6219
6220# ifdef _SC_PAGESIZE
6221# define getpagesize() sysconf(_SC_PAGESIZE)
6222# else /* no _SC_PAGESIZE */
6223# ifdef HAVE_SYS_PARAM_H
6224# include <sys/param.h>
6225# ifdef EXEC_PAGESIZE
6226# define getpagesize() EXEC_PAGESIZE
6227# else /* no EXEC_PAGESIZE */
6228# ifdef NBPG
6229# define getpagesize() NBPG * CLSIZE
6230# ifndef CLSIZE
6231# define CLSIZE 1
6232# endif /* no CLSIZE */
6233# else /* no NBPG */
6234# ifdef NBPC
6235# define getpagesize() NBPC
6236# else /* no NBPC */
6237# ifdef PAGESIZE
6238# define getpagesize() PAGESIZE
6239# endif /* PAGESIZE */
6240# endif /* no NBPC */
6241# endif /* no NBPG */
6242# endif /* no EXEC_PAGESIZE */
6243# else /* no HAVE_SYS_PARAM_H */
6244# define getpagesize() 8192 /* punt totally */
6245# endif /* no HAVE_SYS_PARAM_H */
6246# endif /* no _SC_PAGESIZE */
6247
6248#endif /* no HAVE_GETPAGESIZE */
6249
74c1b268 6250#ifdef __cplusplus
97bf5e38 6251extern "C" { void *malloc(unsigned); }
74c1b268 6252#else
97bf5e38 6253char *malloc();
74c1b268 6254#endif
74c1b268 6255
97bf5e38
MK
6256int
6257main()
6258{
6259 char *data, *data2, *data3;
6260 int i, pagesize;
6261 int fd;
74c1b268 6262
97bf5e38 6263 pagesize = getpagesize();
74c1b268 6264
97bf5e38
MK
6265 /*
6266 * First, make a file with some known garbage in it.
6267 */
6268 data = malloc(pagesize);
6269 if (!data)
6270 exit(1);
6271 for (i = 0; i < pagesize; ++i)
6272 *(data + i) = rand();
6273 umask(0);
6274 fd = creat("conftestmmap", 0600);
6275 if (fd < 0)
6276 exit(1);
6277 if (write(fd, data, pagesize) != pagesize)
6278 exit(1);
6279 close(fd);
74c1b268 6280
97bf5e38
MK
6281 /*
6282 * Next, try to mmap the file at a fixed address which
6283 * already has something else allocated at it. If we can,
6284 * also make sure that we see the same garbage.
6285 */
6286 fd = open("conftestmmap", O_RDWR);
6287 if (fd < 0)
6288 exit(1);
6289 data2 = malloc(2 * pagesize);
6290 if (!data2)
6291 exit(1);
6292 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6293 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6294 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6295 exit(1);
6296 for (i = 0; i < pagesize; ++i)
6297 if (*(data + i) != *(data2 + i))
6298 exit(1);
74c1b268 6299
97bf5e38
MK
6300 /*
6301 * Finally, make sure that changes to the mapped area
6302 * do not percolate back to the file as seen by read().
6303 * (This is a bug on some variants of i386 svr4.0.)
6304 */
6305 for (i = 0; i < pagesize; ++i)
6306 *(data2 + i) = *(data2 + i) + 1;
6307 data3 = malloc(pagesize);
6308 if (!data3)
6309 exit(1);
6310 if (read(fd, data3, pagesize) != pagesize)
6311 exit(1);
6312 for (i = 0; i < pagesize; ++i)
6313 if (*(data + i) != *(data3 + i))
6314 exit(1);
6315 close(fd);
6316 unlink("conftestmmap");
6317 exit(0);
74c1b268 6318}
97bf5e38 6319
74c1b268 6320EOF
c324d747 6321if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6322then
97bf5e38 6323 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6324else
6325 echo "configure: failed program was:" >&5
6326 cat conftest.$ac_ext >&5
6327 rm -fr conftest*
97bf5e38 6328 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6329fi
6330rm -fr conftest*
6331fi
6332
6333fi
6334
97bf5e38
MK
6335echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6336if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6337 cat >> confdefs.h <<\EOF
97bf5e38 6338#define HAVE_MMAP 1
74c1b268
AC
6339EOF
6340
6341fi
6342
97bf5e38 6343echo $ac_n "checking for pid_t""... $ac_c" 1>&6
c324d747 6344echo "configure:6345: checking for pid_t" >&5
97bf5e38 6345if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6346 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6347else
6348 cat > conftest.$ac_ext <<EOF
c324d747 6349#line 6350 "configure"
0200359f 6350#include "confdefs.h"
97bf5e38
MK
6351#include <sys/types.h>
6352#if STDC_HEADERS
6353#include <stdlib.h>
6354#include <stddef.h>
0200359f 6355#endif
0200359f 6356EOF
97bf5e38
MK
6357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6358 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6359 rm -rf conftest*
6360 ac_cv_type_pid_t=yes
0200359f 6361else
97bf5e38
MK
6362 rm -rf conftest*
6363 ac_cv_type_pid_t=no
0200359f 6364fi
97bf5e38 6365rm -f conftest*
0200359f
MK
6366
6367fi
97bf5e38
MK
6368echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6369if test $ac_cv_type_pid_t = no; then
0200359f 6370 cat >> confdefs.h <<\EOF
97bf5e38 6371#define pid_t int
0200359f
MK
6372EOF
6373
6374fi
6375
97bf5e38
MK
6376ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6377echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
c324d747 6378echo "configure:6379: checking for vfork.h" >&5
97bf5e38 6379if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6380 echo $ac_n "(cached) $ac_c" 1>&6
6381else
6382 cat > conftest.$ac_ext <<EOF
c324d747 6383#line 6384 "configure"
72473524 6384#include "confdefs.h"
97bf5e38 6385#include <vfork.h>
72473524 6386EOF
97bf5e38 6387ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 6388{ (eval echo configure:6389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6389ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6390if test -z "$ac_err"; then
72473524 6391 rm -rf conftest*
97bf5e38 6392 eval "ac_cv_header_$ac_safe=yes"
72473524 6393else
97bf5e38 6394 echo "$ac_err" >&5
72473524
DJ
6395 echo "configure: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6397 rm -rf conftest*
97bf5e38 6398 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6399fi
6400rm -f conftest*
6401fi
97bf5e38
MK
6402if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6403 echo "$ac_t""yes" 1>&6
72473524 6404 cat >> confdefs.h <<\EOF
97bf5e38 6405#define HAVE_VFORK_H 1
72473524
DJ
6406EOF
6407
97bf5e38
MK
6408else
6409 echo "$ac_t""no" 1>&6
72473524 6410fi
c906108c 6411
97bf5e38 6412echo $ac_n "checking for working vfork""... $ac_c" 1>&6
c324d747 6413echo "configure:6414: checking for working vfork" >&5
97bf5e38
MK
6414if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6415 echo $ac_n "(cached) $ac_c" 1>&6
6416else
6417 if test "$cross_compiling" = yes; then
6418 echo $ac_n "checking for vfork""... $ac_c" 1>&6
c324d747 6419echo "configure:6420: checking for vfork" >&5
97bf5e38 6420if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6421 echo $ac_n "(cached) $ac_c" 1>&6
6422else
6423 cat > conftest.$ac_ext <<EOF
c324d747 6424#line 6425 "configure"
2b2d558c 6425#include "confdefs.h"
97bf5e38
MK
6426/* System header to define __stub macros and hopefully few prototypes,
6427 which can conflict with char vfork(); below. */
6428#include <assert.h>
6429/* Override any gcc2 internal prototype to avoid an error. */
6430/* We use char because int might match the return type of a gcc2
6431 builtin and then its argument prototype would still apply. */
6432char vfork();
2b2d558c
MK
6433
6434int main() {
97bf5e38
MK
6435
6436/* The GNU C library defines this for functions which it implements
6437 to always fail with ENOSYS. Some functions are actually named
6438 something starting with __ and the normal name is an alias. */
6439#if defined (__stub_vfork) || defined (__stub___vfork)
6440choke me
6441#else
6442vfork();
6443#endif
6444
2b2d558c
MK
6445; return 0; }
6446EOF
c324d747 6447if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6448 rm -rf conftest*
97bf5e38 6449 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6450else
6451 echo "configure: failed program was:" >&5
6452 cat conftest.$ac_ext >&5
6453 rm -rf conftest*
97bf5e38 6454 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6455fi
6456rm -f conftest*
6457fi
6458
97bf5e38
MK
6459if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6460 echo "$ac_t""yes" 1>&6
6461 :
6462else
6463 echo "$ac_t""no" 1>&6
2b2d558c
MK
6464fi
6465
97bf5e38 6466ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6467else
6468 cat > conftest.$ac_ext <<EOF
c324d747 6469#line 6470 "configure"
7dfa765c 6470#include "confdefs.h"
97bf5e38
MK
6471/* Thanks to Paul Eggert for this test. */
6472#include <stdio.h>
6473#include <sys/types.h>
6474#include <sys/stat.h>
6475#ifdef HAVE_UNISTD_H
6476#include <unistd.h>
6477#endif
6478#ifdef HAVE_VFORK_H
6479#include <vfork.h>
6480#endif
6481/* On some sparc systems, changes by the child to local and incoming
6482 argument registers are propagated back to the parent.
6483 The compiler is told about this with #include <vfork.h>,
6484 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6485 Test for this by using a static variable whose address
6486 is put into a register that is clobbered by the vfork. */
6487static
6488#ifdef __cplusplus
6489sparc_address_test (int arg)
6490#else
6491sparc_address_test (arg) int arg;
6492#endif
6493{
6494 static pid_t child;
6495 if (!child) {
6496 child = vfork ();
6497 if (child < 0) {
6498 perror ("vfork");
6499 _exit(2);
6500 }
6501 if (!child) {
6502 arg = getpid();
6503 write(-1, "", 0);
6504 _exit (arg);
6505 }
6506 }
6507}
6508main() {
6509 pid_t parent = getpid ();
6510 pid_t child;
7dfa765c 6511
97bf5e38 6512 sparc_address_test ();
7dfa765c 6513
97bf5e38 6514 child = vfork ();
7dfa765c 6515
97bf5e38
MK
6516 if (child == 0) {
6517 /* Here is another test for sparc vfork register problems.
6518 This test uses lots of local variables, at least
6519 as many local variables as main has allocated so far
6520 including compiler temporaries. 4 locals are enough for
6521 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6522 A buggy compiler should reuse the register of parent
6523 for one of the local variables, since it will think that
6524 parent can't possibly be used any more in this routine.
6525 Assigning to the local variable will thus munge parent
6526 in the parent process. */
6527 pid_t
6528 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6529 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6530 /* Convince the compiler that p..p7 are live; otherwise, it might
6531 use the same hardware register for all 8 local variables. */
6532 if (p != p1 || p != p2 || p != p3 || p != p4
6533 || p != p5 || p != p6 || p != p7)
6534 _exit(1);
7dfa765c 6535
97bf5e38
MK
6536 /* On some systems (e.g. IRIX 3.3),
6537 vfork doesn't separate parent from child file descriptors.
6538 If the child closes a descriptor before it execs or exits,
6539 this munges the parent's descriptor as well.
6540 Test for this by closing stdout in the child. */
6541 _exit(close(fileno(stdout)) != 0);
6542 } else {
6543 int status;
6544 struct stat st;
64bb1671 6545
97bf5e38
MK
6546 while (wait(&status) != child)
6547 ;
6548 exit(
6549 /* Was there some problem with vforking? */
6550 child < 0
64bb1671 6551
97bf5e38
MK
6552 /* Did the child fail? (This shouldn't happen.) */
6553 || status
64bb1671 6554
97bf5e38
MK
6555 /* Did the vfork/compiler bug occur? */
6556 || parent != getpid()
6557
6558 /* Did the file descriptor bug occur? */
6559 || fstat(fileno(stdout), &st) != 0
6560 );
6561 }
6562}
5c44784c 6563EOF
c324d747 6564if { (eval echo configure:6565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6565then
6566 ac_cv_func_vfork_works=yes
5c44784c
JM
6567else
6568 echo "configure: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
97bf5e38
MK
6570 rm -fr conftest*
6571 ac_cv_func_vfork_works=no
5c44784c 6572fi
97bf5e38 6573rm -fr conftest*
5c44784c
JM
6574fi
6575
0afdd437
MK
6576fi
6577
97bf5e38
MK
6578echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6579if test $ac_cv_func_vfork_works = no; then
0afdd437 6580 cat >> confdefs.h <<\EOF
97bf5e38 6581#define vfork fork
0afdd437
MK
6582EOF
6583
6584fi
6585
97bf5e38
MK
6586for ac_func in canonicalize_file_name realpath
6587do
6588echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6589echo "configure:6590: checking for $ac_func" >&5
97bf5e38 6590if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6591 echo $ac_n "(cached) $ac_c" 1>&6
6592else
6593 cat > conftest.$ac_ext <<EOF
c324d747 6594#line 6595 "configure"
7e89e357 6595#include "confdefs.h"
97bf5e38
MK
6596/* System header to define __stub macros and hopefully few prototypes,
6597 which can conflict with char $ac_func(); below. */
6598#include <assert.h>
6599/* Override any gcc2 internal prototype to avoid an error. */
6600/* We use char because int might match the return type of a gcc2
6601 builtin and then its argument prototype would still apply. */
6602char $ac_func();
6603
7e89e357 6604int main() {
97bf5e38
MK
6605
6606/* The GNU C library defines this for functions which it implements
6607 to always fail with ENOSYS. Some functions are actually named
6608 something starting with __ and the normal name is an alias. */
6609#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6610choke me
6611#else
6612$ac_func();
6613#endif
6614
7e89e357
JT
6615; return 0; }
6616EOF
c324d747 6617if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6618 rm -rf conftest*
97bf5e38 6619 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6620else
6621 echo "configure: failed program was:" >&5
6622 cat conftest.$ac_ext >&5
6623 rm -rf conftest*
97bf5e38 6624 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6625fi
6626rm -f conftest*
6627fi
6628
97bf5e38
MK
6629if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6630 echo "$ac_t""yes" 1>&6
6631 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6632 cat >> confdefs.h <<EOF
6633#define $ac_tr_func 1
7e89e357 6634EOF
97bf5e38
MK
6635
6636else
6637 echo "$ac_t""no" 1>&6
7e89e357 6638fi
97bf5e38 6639done
7e89e357 6640
97bf5e38 6641for ac_func in poll
7be570e7
JM
6642do
6643echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6644echo "configure:6645: checking for $ac_func" >&5
7be570e7
JM
6645if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6646 echo $ac_n "(cached) $ac_c" 1>&6
6647else
6648 cat > conftest.$ac_ext <<EOF
c324d747 6649#line 6650 "configure"
7be570e7
JM
6650#include "confdefs.h"
6651/* System header to define __stub macros and hopefully few prototypes,
6652 which can conflict with char $ac_func(); below. */
6653#include <assert.h>
6654/* Override any gcc2 internal prototype to avoid an error. */
6655/* We use char because int might match the return type of a gcc2
6656 builtin and then its argument prototype would still apply. */
6657char $ac_func();
6658
6659int main() {
6660
6661/* The GNU C library defines this for functions which it implements
6662 to always fail with ENOSYS. Some functions are actually named
6663 something starting with __ and the normal name is an alias. */
6664#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6665choke me
6666#else
6667$ac_func();
6668#endif
6669
6670; return 0; }
6671EOF
c324d747 6672if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6673 rm -rf conftest*
6674 eval "ac_cv_func_$ac_func=yes"
6675else
6676 echo "configure: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 rm -rf conftest*
6679 eval "ac_cv_func_$ac_func=no"
6680fi
6681rm -f conftest*
6682fi
6683
6684if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6685 echo "$ac_t""yes" 1>&6
6686 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6687 cat >> confdefs.h <<EOF
6688#define $ac_tr_func 1
6689EOF
6690
6691else
6692 echo "$ac_t""no" 1>&6
6693fi
6694done
6695
6696for ac_func in pread64
6697do
6698echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6699echo "configure:6700: checking for $ac_func" >&5
14abd0fb
MK
6700if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6701 echo $ac_n "(cached) $ac_c" 1>&6
6702else
6703 cat > conftest.$ac_ext <<EOF
c324d747 6704#line 6705 "configure"
14abd0fb
MK
6705#include "confdefs.h"
6706/* System header to define __stub macros and hopefully few prototypes,
6707 which can conflict with char $ac_func(); below. */
6708#include <assert.h>
6709/* Override any gcc2 internal prototype to avoid an error. */
6710/* We use char because int might match the return type of a gcc2
6711 builtin and then its argument prototype would still apply. */
6712char $ac_func();
6713
6714int main() {
6715
6716/* The GNU C library defines this for functions which it implements
6717 to always fail with ENOSYS. Some functions are actually named
6718 something starting with __ and the normal name is an alias. */
6719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6720choke me
6721#else
6722$ac_func();
6723#endif
6724
6725; return 0; }
6726EOF
c324d747 6727if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6728 rm -rf conftest*
6729 eval "ac_cv_func_$ac_func=yes"
6730else
6731 echo "configure: failed program was:" >&5
6732 cat conftest.$ac_ext >&5
6733 rm -rf conftest*
6734 eval "ac_cv_func_$ac_func=no"
6735fi
6736rm -f conftest*
6737fi
6738
6739if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6740 echo "$ac_t""yes" 1>&6
6741 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6742 cat >> confdefs.h <<EOF
6743#define $ac_tr_func 1
6744EOF
6745
6746else
6747 echo "$ac_t""no" 1>&6
6748fi
6749done
6750
97bf5e38
MK
6751for ac_func in sbrk
6752do
6753echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6754echo "configure:6755: checking for $ac_func" >&5
97bf5e38 6755if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6756 echo $ac_n "(cached) $ac_c" 1>&6
6757else
6758 cat > conftest.$ac_ext <<EOF
c324d747 6759#line 6760 "configure"
c906108c 6760#include "confdefs.h"
97bf5e38
MK
6761/* System header to define __stub macros and hopefully few prototypes,
6762 which can conflict with char $ac_func(); below. */
6763#include <assert.h>
6764/* Override any gcc2 internal prototype to avoid an error. */
6765/* We use char because int might match the return type of a gcc2
6766 builtin and then its argument prototype would still apply. */
6767char $ac_func();
c906108c 6768
97bf5e38
MK
6769int main() {
6770
6771/* The GNU C library defines this for functions which it implements
6772 to always fail with ENOSYS. Some functions are actually named
6773 something starting with __ and the normal name is an alias. */
6774#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6775choke me
c906108c 6776#else
97bf5e38 6777$ac_func();
c906108c 6778#endif
97bf5e38 6779
c906108c
SS
6780; return 0; }
6781EOF
c324d747 6782if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6783 rm -rf conftest*
97bf5e38 6784 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6785else
6786 echo "configure: failed program was:" >&5
6787 cat conftest.$ac_ext >&5
6788 rm -rf conftest*
97bf5e38 6789 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6790fi
6791rm -f conftest*
6792fi
6793
97bf5e38
MK
6794if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6795 echo "$ac_t""yes" 1>&6
6796 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6797 cat >> confdefs.h <<EOF
6798#define $ac_tr_func 1
c906108c 6799EOF
97bf5e38
MK
6800
6801else
6802 echo "$ac_t""no" 1>&6
c906108c 6803fi
97bf5e38 6804done
c906108c 6805
97bf5e38
MK
6806for ac_func in setpgid setpgrp
6807do
6808echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6809echo "configure:6810: checking for $ac_func" >&5
97bf5e38 6810if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6811 echo $ac_n "(cached) $ac_c" 1>&6
6812else
6813 cat > conftest.$ac_ext <<EOF
c324d747 6814#line 6815 "configure"
c906108c 6815#include "confdefs.h"
97bf5e38
MK
6816/* System header to define __stub macros and hopefully few prototypes,
6817 which can conflict with char $ac_func(); below. */
6818#include <assert.h>
6819/* Override any gcc2 internal prototype to avoid an error. */
6820/* We use char because int might match the return type of a gcc2
6821 builtin and then its argument prototype would still apply. */
6822char $ac_func();
c906108c 6823
97bf5e38
MK
6824int main() {
6825
6826/* The GNU C library defines this for functions which it implements
6827 to always fail with ENOSYS. Some functions are actually named
6828 something starting with __ and the normal name is an alias. */
6829#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6830choke me
c906108c 6831#else
97bf5e38 6832$ac_func();
c906108c 6833#endif
97bf5e38 6834
c906108c
SS
6835; return 0; }
6836EOF
c324d747 6837if { (eval echo configure:6838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6838 rm -rf conftest*
97bf5e38 6839 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6840else
6841 echo "configure: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843 rm -rf conftest*
97bf5e38 6844 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6845fi
6846rm -f conftest*
6847fi
6848
97bf5e38
MK
6849if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6850 echo "$ac_t""yes" 1>&6
6851 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6852 cat >> confdefs.h <<EOF
6853#define $ac_tr_func 1
c906108c 6854EOF
97bf5e38
MK
6855
6856else
6857 echo "$ac_t""no" 1>&6
c906108c 6858fi
97bf5e38 6859done
c906108c 6860
e1ea1d75 6861for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6862do
6863echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6864echo "configure:6865: checking for $ac_func" >&5
97bf5e38 6865if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6866 echo $ac_n "(cached) $ac_c" 1>&6
6867else
6868 cat > conftest.$ac_ext <<EOF
c324d747 6869#line 6870 "configure"
c906108c 6870#include "confdefs.h"
97bf5e38
MK
6871/* System header to define __stub macros and hopefully few prototypes,
6872 which can conflict with char $ac_func(); below. */
6873#include <assert.h>
6874/* Override any gcc2 internal prototype to avoid an error. */
6875/* We use char because int might match the return type of a gcc2
6876 builtin and then its argument prototype would still apply. */
6877char $ac_func();
c906108c 6878
97bf5e38
MK
6879int main() {
6880
6881/* The GNU C library defines this for functions which it implements
6882 to always fail with ENOSYS. Some functions are actually named
6883 something starting with __ and the normal name is an alias. */
6884#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6885choke me
c906108c 6886#else
97bf5e38 6887$ac_func();
c906108c 6888#endif
97bf5e38 6889
c906108c
SS
6890; return 0; }
6891EOF
c324d747 6892if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6893 rm -rf conftest*
97bf5e38 6894 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6895else
6896 echo "configure: failed program was:" >&5
6897 cat conftest.$ac_ext >&5
6898 rm -rf conftest*
97bf5e38 6899 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6900fi
6901rm -f conftest*
6902fi
6903
97bf5e38
MK
6904if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6905 echo "$ac_t""yes" 1>&6
6906 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6907 cat >> confdefs.h <<EOF
6908#define $ac_tr_func 1
c906108c 6909EOF
e1ea1d75 6910
97bf5e38
MK
6911else
6912 echo "$ac_t""no" 1>&6
c906108c 6913fi
97bf5e38 6914done
c906108c 6915
97bf5e38
MK
6916for ac_func in socketpair
6917do
6918echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6919echo "configure:6920: checking for $ac_func" >&5
97bf5e38 6920if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6921 echo $ac_n "(cached) $ac_c" 1>&6
6922else
6923 cat > conftest.$ac_ext <<EOF
c324d747 6924#line 6925 "configure"
c906108c 6925#include "confdefs.h"
97bf5e38
MK
6926/* System header to define __stub macros and hopefully few prototypes,
6927 which can conflict with char $ac_func(); below. */
6928#include <assert.h>
6929/* Override any gcc2 internal prototype to avoid an error. */
6930/* We use char because int might match the return type of a gcc2
6931 builtin and then its argument prototype would still apply. */
6932char $ac_func();
c906108c 6933
97bf5e38
MK
6934int main() {
6935
6936/* The GNU C library defines this for functions which it implements
6937 to always fail with ENOSYS. Some functions are actually named
6938 something starting with __ and the normal name is an alias. */
6939#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6940choke me
c906108c 6941#else
97bf5e38 6942$ac_func();
c906108c 6943#endif
97bf5e38 6944
c906108c
SS
6945; return 0; }
6946EOF
c324d747 6947if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6948 rm -rf conftest*
97bf5e38 6949 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6950else
6951 echo "configure: failed program was:" >&5
6952 cat conftest.$ac_ext >&5
6953 rm -rf conftest*
97bf5e38 6954 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6955fi
6956rm -f conftest*
6957fi
6958
97bf5e38
MK
6959if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6960 echo "$ac_t""yes" 1>&6
6961 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6962 cat >> confdefs.h <<EOF
6963#define $ac_tr_func 1
c906108c 6964EOF
97bf5e38
MK
6965
6966else
6967 echo "$ac_t""no" 1>&6
c906108c 6968fi
97bf5e38 6969done
c906108c 6970
b757528f
JJ
6971for ac_func in syscall
6972do
6973echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c324d747 6974echo "configure:6975: checking for $ac_func" >&5
b757528f
JJ
6975if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6976 echo $ac_n "(cached) $ac_c" 1>&6
6977else
6978 cat > conftest.$ac_ext <<EOF
c324d747 6979#line 6980 "configure"
b757528f
JJ
6980#include "confdefs.h"
6981/* System header to define __stub macros and hopefully few prototypes,
6982 which can conflict with char $ac_func(); below. */
6983#include <assert.h>
6984/* Override any gcc2 internal prototype to avoid an error. */
6985/* We use char because int might match the return type of a gcc2
6986 builtin and then its argument prototype would still apply. */
6987char $ac_func();
6988
6989int main() {
6990
6991/* The GNU C library defines this for functions which it implements
6992 to always fail with ENOSYS. Some functions are actually named
6993 something starting with __ and the normal name is an alias. */
6994#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6995choke me
6996#else
6997$ac_func();
6998#endif
6999
7000; return 0; }
7001EOF
c324d747 7002if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7003 rm -rf conftest*
7004 eval "ac_cv_func_$ac_func=yes"
7005else
7006 echo "configure: failed program was:" >&5
7007 cat conftest.$ac_ext >&5
7008 rm -rf conftest*
7009 eval "ac_cv_func_$ac_func=no"
7010fi
7011rm -f conftest*
7012fi
7013
7014if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7015 echo "$ac_t""yes" 1>&6
7016 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7017 cat >> confdefs.h <<EOF
7018#define $ac_tr_func 1
7019EOF
7020
7021else
7022 echo "$ac_t""no" 1>&6
7023fi
7024done
7025
97bf5e38
MK
7026
7027if test "$cross_compiling" = no; then
7028 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
c324d747 7029echo "configure:7030: checking whether setpgrp takes no argument" >&5
97bf5e38 7030if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7031 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7032else
7033 if test "$cross_compiling" = yes; then
7034 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7035else
7036 cat > conftest.$ac_ext <<EOF
c324d747 7037#line 7038 "configure"
c906108c
SS
7038#include "confdefs.h"
7039
c906108c
SS
7040#ifdef HAVE_UNISTD_H
7041#include <unistd.h>
7042#endif
97bf5e38
MK
7043
7044/*
7045 * If this system has a BSD-style setpgrp, which takes arguments, exit
7046 * successfully.
7047 */
7048main()
7049{
7050 if (setpgrp(1,1) == -1)
7051 exit(0);
7052 else
7053 exit(1);
7054}
7055
c906108c 7056EOF
c324d747 7057if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7058then
7059 ac_cv_func_setpgrp_void=no
c906108c
SS
7060else
7061 echo "configure: failed program was:" >&5
7062 cat conftest.$ac_ext >&5
97bf5e38
MK
7063 rm -fr conftest*
7064 ac_cv_func_setpgrp_void=yes
c906108c 7065fi
97bf5e38 7066rm -fr conftest*
c906108c
SS
7067fi
7068
97bf5e38
MK
7069
7070fi
7071
7072echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7073if test $ac_cv_func_setpgrp_void = yes; then
7074 cat >> confdefs.h <<\EOF
7075#define SETPGRP_VOID 1
c906108c
SS
7076EOF
7077
7078fi
7079
97bf5e38
MK
7080else
7081 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
c324d747 7082echo "configure:7083: checking whether setpgrp takes no argument" >&5
97bf5e38 7083if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7084 echo $ac_n "(cached) $ac_c" 1>&6
7085else
7086 cat > conftest.$ac_ext <<EOF
c324d747 7087#line 7088 "configure"
b83266a0
SS
7088#include "confdefs.h"
7089
b83266a0 7090#include <unistd.h>
97bf5e38 7091
b83266a0 7092int main() {
97bf5e38
MK
7093
7094 if (setpgrp(1,1) == -1)
7095 exit (0);
7096 else
7097 exit (1);
7098
b83266a0
SS
7099; return 0; }
7100EOF
c324d747 7101if { (eval echo configure:7102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7102 rm -rf conftest*
97bf5e38 7103 ac_cv_func_setpgrp_void=no
b83266a0
SS
7104else
7105 echo "configure: failed program was:" >&5
7106 cat conftest.$ac_ext >&5
7107 rm -rf conftest*
97bf5e38 7108 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7109fi
7110rm -f conftest*
7111fi
7112
97bf5e38
MK
7113echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7114if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7115 cat >> confdefs.h <<\EOF
97bf5e38 7116#define SETPGRP_VOID 1
b83266a0
SS
7117EOF
7118
97bf5e38 7119fi
b83266a0
SS
7120fi
7121
97bf5e38
MK
7122# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7123# since sigsetjmp might only be defined as a macro.
7124echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
c324d747 7125echo "configure:7126: checking for sigsetjmp" >&5
97bf5e38 7126if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7127 echo $ac_n "(cached) $ac_c" 1>&6
7128else
7129 cat > conftest.$ac_ext <<EOF
c324d747 7130#line 7131 "configure"
a4db0f07
RH
7131#include "confdefs.h"
7132
97bf5e38
MK
7133#include <setjmp.h>
7134
a4db0f07 7135int main() {
97bf5e38 7136sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7137; return 0; }
7138EOF
c324d747 7139if { (eval echo configure:7140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7140 rm -rf conftest*
97bf5e38 7141 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7142else
7143 echo "configure: failed program was:" >&5
7144 cat conftest.$ac_ext >&5
7145 rm -rf conftest*
97bf5e38 7146 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7147fi
7148rm -f conftest*
7149fi
7150
97bf5e38
MK
7151echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7152if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7153 cat >> confdefs.h <<\EOF
97bf5e38 7154#define HAVE_SIGSETJMP 1
a4db0f07
RH
7155EOF
7156
7157fi
c906108c 7158
06825bd1
MK
7159# Assume we'll default to using the included libiberty regex.
7160gdb_use_included_regex=yes
7161
7162# However, if the system regex is GNU regex, then default to *not*
7163# using the included regex.
7164echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
c324d747 7165echo "configure:7166: checking for GNU regex" >&5
06825bd1
MK
7166if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7167 echo $ac_n "(cached) $ac_c" 1>&6
7168else
7169 cat > conftest.$ac_ext <<EOF
c324d747 7170#line 7171 "configure"
06825bd1
MK
7171#include "confdefs.h"
7172#include <gnu-versions.h>
7173int main() {
7174#define REGEX_INTERFACE_VERSION 1
7175#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7176# error "Version mismatch"
7177#endif
7178; return 0; }
7179EOF
c324d747 7180if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7181 rm -rf conftest*
7182 gdb_cv_have_gnu_regex=yes
7183else
7184 echo "configure: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 rm -rf conftest*
7187 gdb_cv_have_gnu_regex=no
7188fi
7189rm -f conftest*
7190fi
7191
7192echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7193if test $gdb_cv_have_gnu_regex = yes; then
7194 gdb_use_included_regex=no
7195fi
7196
7197# Check whether --with-included-regex or --without-included-regex was given.
7198if test "${with_included_regex+set}" = set; then
7199 withval="$with_included_regex"
7200 gdb_with_regex=$withval
7201else
7202 gdb_with_regex=$gdb_use_included_regex
7203fi
7204
7205if test "$gdb_with_regex" = yes; then
7206 cat >> confdefs.h <<\EOF
7207#define USE_INCLUDED_REGEX 1
7208EOF
7209
7210fi
7211
78434e59
MK
7212# See if <machine/reg.h> degines `struct reg'.
7213echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
c324d747 7214echo "configure:7215: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7215if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7216 echo $ac_n "(cached) $ac_c" 1>&6
7217else
7218 cat > conftest.$ac_ext <<EOF
c324d747 7219#line 7220 "configure"
78434e59
MK
7220#include "confdefs.h"
7221#include <sys/types.h>
7222#include <machine/reg.h>
7223int main() {
7224struct reg r;
7225; return 0; }
7226EOF
c324d747 7227if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7228 rm -rf conftest*
7229 gdb_cv_struct_reg=yes
7230else
7231 echo "configure: failed program was:" >&5
7232 cat conftest.$ac_ext >&5
7233 rm -rf conftest*
7234 gdb_cv_struct_reg=no
7235fi
7236rm -f conftest*
7237fi
7238
7239echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7240if test $gdb_cv_struct_reg = yes; then
7241 cat >> confdefs.h <<\EOF
7242#define HAVE_STRUCT_REG 1
7243EOF
7244
7245fi
7246
97bf5e38
MK
7247# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7248# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7249echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
c324d747 7250echo "configure:7251: checking for r_fs in struct reg" >&5
97bf5e38
MK
7251if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7253else
7254 cat > conftest.$ac_ext <<EOF
c324d747 7255#line 7256 "configure"
c906108c 7256#include "confdefs.h"
97bf5e38
MK
7257#include <machine/reg.h>
7258int main() {
7259struct reg r; r.r_fs;
7260; return 0; }
c906108c 7261EOF
c324d747 7262if { (eval echo configure:7263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7263 rm -rf conftest*
97bf5e38 7264 gdb_cv_struct_reg_r_fs=yes
c906108c 7265else
97bf5e38
MK
7266 echo "configure: failed program was:" >&5
7267 cat conftest.$ac_ext >&5
c906108c 7268 rm -rf conftest*
97bf5e38 7269 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7270fi
7271rm -f conftest*
97bf5e38 7272fi
c906108c 7273
97bf5e38
MK
7274echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7275if test $gdb_cv_struct_reg_r_fs = yes; then
7276 cat >> confdefs.h <<\EOF
7277#define HAVE_STRUCT_REG_R_FS 1
7278EOF
7279
7280fi
7281echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
c324d747 7282echo "configure:7283: checking for r_gs in struct reg" >&5
97bf5e38
MK
7283if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7284 echo $ac_n "(cached) $ac_c" 1>&6
7285else
7286 cat > conftest.$ac_ext <<EOF
c324d747 7287#line 7288 "configure"
c906108c 7288#include "confdefs.h"
97bf5e38
MK
7289#include <machine/reg.h>
7290int main() {
7291struct reg r; r.r_gs;
7292; return 0; }
c906108c 7293EOF
c324d747 7294if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7295 rm -rf conftest*
97bf5e38 7296 gdb_cv_struct_reg_r_gs=yes
c906108c 7297else
97bf5e38
MK
7298 echo "configure: failed program was:" >&5
7299 cat conftest.$ac_ext >&5
c906108c 7300 rm -rf conftest*
97bf5e38 7301 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7302fi
7303rm -f conftest*
c906108c 7304fi
c906108c 7305
97bf5e38
MK
7306echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7307if test $gdb_cv_struct_reg_r_gs = yes; then
7308 cat >> confdefs.h <<\EOF
7309#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7310EOF
7311
c906108c
SS
7312fi
7313
97bf5e38
MK
7314# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7315echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
c324d747 7316echo "configure:7317: checking for PTRACE_GETREGS" >&5
97bf5e38 7317if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7318 echo $ac_n "(cached) $ac_c" 1>&6
7319else
7320 cat > conftest.$ac_ext <<EOF
c324d747 7321#line 7322 "configure"
c906108c 7322#include "confdefs.h"
97bf5e38 7323#include <sys/ptrace.h>
c906108c 7324int main() {
97bf5e38 7325PTRACE_GETREGS;
c906108c
SS
7326; return 0; }
7327EOF
c324d747 7328if { (eval echo configure:7329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7329 rm -rf conftest*
97bf5e38 7330 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7331else
7332 echo "configure: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 rm -rf conftest*
97bf5e38 7335 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7336fi
7337rm -f conftest*
7338fi
7339
97bf5e38
MK
7340echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7341if test $gdb_cv_have_ptrace_getregs = yes; then
7342 cat >> confdefs.h <<\EOF
7343#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7344EOF
7345
97bf5e38 7346fi
c906108c 7347
97bf5e38
MK
7348# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7349echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
c324d747 7350echo "configure:7351: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7351if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7352 echo $ac_n "(cached) $ac_c" 1>&6
7353else
7354 cat > conftest.$ac_ext <<EOF
c324d747 7355#line 7356 "configure"
c906108c 7356#include "confdefs.h"
97bf5e38 7357#include <sys/ptrace.h>
c906108c 7358int main() {
97bf5e38 7359PTRACE_GETFPXREGS;
c906108c
SS
7360; return 0; }
7361EOF
c324d747 7362if { (eval echo configure:7363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7363 rm -rf conftest*
97bf5e38 7364 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7365else
7366 echo "configure: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7368 rm -rf conftest*
97bf5e38 7369 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7370fi
7371rm -f conftest*
7372fi
7373
97bf5e38
MK
7374echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7375if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7376 cat >> confdefs.h <<\EOF
7377#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7378EOF
7379
97bf5e38 7380fi
c906108c 7381
97bf5e38
MK
7382# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7383echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
c324d747 7384echo "configure:7385: checking for PT_GETDBREGS" >&5
97bf5e38 7385if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387else
7388 cat > conftest.$ac_ext <<EOF
c324d747 7389#line 7390 "configure"
c906108c 7390#include "confdefs.h"
97bf5e38
MK
7391#include <sys/types.h>
7392#include <sys/ptrace.h>
c906108c 7393int main() {
97bf5e38 7394PT_GETDBREGS;
c906108c
SS
7395; return 0; }
7396EOF
c324d747 7397if { (eval echo configure:7398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7398 rm -rf conftest*
97bf5e38 7399 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7400else
7401 echo "configure: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 rm -rf conftest*
97bf5e38 7404 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7405fi
7406rm -f conftest*
7407fi
7408
97bf5e38
MK
7409echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7410if test $gdb_cv_have_pt_getdbregs = yes; then
7411 cat >> confdefs.h <<\EOF
7412#define HAVE_PT_GETDBREGS 1
c906108c
SS
7413EOF
7414
97bf5e38 7415fi
c906108c 7416
97bf5e38
MK
7417# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7418echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
c324d747 7419echo "configure:7420: checking for PT_GETXMMREGS" >&5
97bf5e38 7420if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7421 echo $ac_n "(cached) $ac_c" 1>&6
7422else
7423 cat > conftest.$ac_ext <<EOF
c324d747 7424#line 7425 "configure"
c906108c 7425#include "confdefs.h"
97bf5e38
MK
7426#include <sys/types.h>
7427#include <sys/ptrace.h>
c906108c 7428int main() {
97bf5e38 7429PT_GETXMMREGS;
c906108c
SS
7430; return 0; }
7431EOF
c324d747 7432if { (eval echo configure:7433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7433 rm -rf conftest*
97bf5e38 7434 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7435else
7436 echo "configure: failed program was:" >&5
7437 cat conftest.$ac_ext >&5
7438 rm -rf conftest*
97bf5e38 7439 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7440fi
7441rm -f conftest*
7442fi
7443
97bf5e38
MK
7444echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7445if test $gdb_cv_have_pt_getxmmregs = yes; then
7446 cat >> confdefs.h <<\EOF
7447#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7448EOF
7449
97bf5e38 7450fi
c906108c 7451
27ca5dad 7452# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7453# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7454echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
c324d747 7455echo "configure:7456: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7456if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7457 echo $ac_n "(cached) $ac_c" 1>&6
7458else
7459 cat > conftest.$ac_ext <<EOF
c324d747 7460#line 7461 "configure"
27ca5dad
MC
7461#include "confdefs.h"
7462#include <stdint.h>
7463int main() {
7464uintptr_t foo = 0;
7465; return 0; }
7466EOF
c324d747 7467if { (eval echo configure:7468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7468 rm -rf conftest*
7469 gdb_cv_have_uintptr_t=yes
7470else
7471 echo "configure: failed program was:" >&5
7472 cat conftest.$ac_ext >&5
7473 rm -rf conftest*
7474 gdb_cv_have_uintptr_t=no
7475fi
7476rm -f conftest*
7477fi
7478
7479echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7480if test $gdb_cv_have_uintptr_t = yes; then
7481 cat >> confdefs.h <<\EOF
7482#define HAVE_UINTPTR_T 1
7483EOF
7484
7485fi
97bf5e38
MK
7486
7487echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
c324d747 7488echo "configure:7489: checking whether malloc must be declared" >&5
97bf5e38 7489if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7490 echo $ac_n "(cached) $ac_c" 1>&6
7491else
7492 cat > conftest.$ac_ext <<EOF
c324d747 7493#line 7494 "configure"
3862412b 7494#include "confdefs.h"
e17bf198 7495
97bf5e38
MK
7496#include <stdio.h>
7497#ifdef HAVE_STRING_H
7498#include <string.h>
7499#else
7500#ifdef HAVE_STRINGS_H
7501#include <strings.h>
7502#endif
7503#endif
7504#ifdef HAVE_STDLIB_H
7505#include <stdlib.h>
7506#endif
7507#ifdef HAVE_UNISTD_H
7508#include <unistd.h>
7509#endif
3862412b 7510int main() {
97bf5e38 7511char *(*pfn) = (char *(*)) malloc
3862412b
MK
7512; return 0; }
7513EOF
c324d747 7514if { (eval echo configure:7515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7515 rm -rf conftest*
97bf5e38 7516 bfd_cv_decl_needed_malloc=no
3862412b
MK
7517else
7518 echo "configure: failed program was:" >&5
7519 cat conftest.$ac_ext >&5
7520 rm -rf conftest*
97bf5e38 7521 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7522fi
7523rm -f conftest*
7524fi
7525
97bf5e38
MK
7526echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7527if test $bfd_cv_decl_needed_malloc = yes; then
7528 cat >> confdefs.h <<\EOF
7529#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7530EOF
7531
97bf5e38 7532fi
3862412b 7533
97bf5e38 7534echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
c324d747 7535echo "configure:7536: checking whether realloc must be declared" >&5
97bf5e38 7536if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7537 echo $ac_n "(cached) $ac_c" 1>&6
7538else
7539 cat > conftest.$ac_ext <<EOF
c324d747 7540#line 7541 "configure"
3862412b 7541#include "confdefs.h"
e17bf198 7542
97bf5e38
MK
7543#include <stdio.h>
7544#ifdef HAVE_STRING_H
7545#include <string.h>
7546#else
7547#ifdef HAVE_STRINGS_H
7548#include <strings.h>
7549#endif
7550#endif
7551#ifdef HAVE_STDLIB_H
7552#include <stdlib.h>
7553#endif
7554#ifdef HAVE_UNISTD_H
7555#include <unistd.h>
7556#endif
3862412b 7557int main() {
97bf5e38 7558char *(*pfn) = (char *(*)) realloc
3862412b
MK
7559; return 0; }
7560EOF
c324d747 7561if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7562 rm -rf conftest*
97bf5e38 7563 bfd_cv_decl_needed_realloc=no
3862412b
MK
7564else
7565 echo "configure: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 rm -rf conftest*
97bf5e38 7568 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7569fi
7570rm -f conftest*
7571fi
7572
97bf5e38
MK
7573echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7574if test $bfd_cv_decl_needed_realloc = yes; then
7575 cat >> confdefs.h <<\EOF
7576#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7577EOF
7578
97bf5e38 7579fi
3862412b 7580
97bf5e38 7581echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
c324d747 7582echo "configure:7583: checking whether free must be declared" >&5
97bf5e38 7583if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7584 echo $ac_n "(cached) $ac_c" 1>&6
7585else
7586 cat > conftest.$ac_ext <<EOF
c324d747 7587#line 7588 "configure"
451928c5 7588#include "confdefs.h"
e17bf198 7589
97bf5e38
MK
7590#include <stdio.h>
7591#ifdef HAVE_STRING_H
7592#include <string.h>
7593#else
7594#ifdef HAVE_STRINGS_H
7595#include <strings.h>
7596#endif
7597#endif
7598#ifdef HAVE_STDLIB_H
7599#include <stdlib.h>
7600#endif
7601#ifdef HAVE_UNISTD_H
7602#include <unistd.h>
7603#endif
451928c5 7604int main() {
97bf5e38 7605char *(*pfn) = (char *(*)) free
451928c5
AC
7606; return 0; }
7607EOF
c324d747 7608if { (eval echo configure:7609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7609 rm -rf conftest*
97bf5e38 7610 bfd_cv_decl_needed_free=no
451928c5
AC
7611else
7612 echo "configure: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 rm -rf conftest*
97bf5e38 7615 bfd_cv_decl_needed_free=yes
451928c5
AC
7616fi
7617rm -f conftest*
7618fi
7619
97bf5e38
MK
7620echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7621if test $bfd_cv_decl_needed_free = yes; then
7622 cat >> confdefs.h <<\EOF
7623#define NEED_DECLARATION_FREE 1
451928c5
AC
7624EOF
7625
97bf5e38 7626fi
451928c5 7627
97bf5e38 7628echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
c324d747 7629echo "configure:7630: checking whether strerror must be declared" >&5
97bf5e38 7630if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7631 echo $ac_n "(cached) $ac_c" 1>&6
7632else
7633 cat > conftest.$ac_ext <<EOF
c324d747 7634#line 7635 "configure"
451928c5 7635#include "confdefs.h"
e17bf198 7636
97bf5e38
MK
7637#include <stdio.h>
7638#ifdef HAVE_STRING_H
7639#include <string.h>
7640#else
7641#ifdef HAVE_STRINGS_H
7642#include <strings.h>
7643#endif
7644#endif
7645#ifdef HAVE_STDLIB_H
7646#include <stdlib.h>
7647#endif
7648#ifdef HAVE_UNISTD_H
7649#include <unistd.h>
7650#endif
451928c5 7651int main() {
97bf5e38 7652char *(*pfn) = (char *(*)) strerror
451928c5
AC
7653; return 0; }
7654EOF
c324d747 7655if { (eval echo configure:7656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7656 rm -rf conftest*
97bf5e38 7657 bfd_cv_decl_needed_strerror=no
451928c5
AC
7658else
7659 echo "configure: failed program was:" >&5
7660 cat conftest.$ac_ext >&5
7661 rm -rf conftest*
97bf5e38 7662 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7663fi
7664rm -f conftest*
7665fi
7666
97bf5e38
MK
7667echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7668if test $bfd_cv_decl_needed_strerror = yes; then
7669 cat >> confdefs.h <<\EOF
7670#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7671EOF
7672
97bf5e38 7673fi
451928c5 7674
97bf5e38 7675echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
c324d747 7676echo "configure:7677: checking whether strdup must be declared" >&5
97bf5e38 7677if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7678 echo $ac_n "(cached) $ac_c" 1>&6
7679else
7680 cat > conftest.$ac_ext <<EOF
c324d747 7681#line 7682 "configure"
3862412b 7682#include "confdefs.h"
e17bf198 7683
97bf5e38
MK
7684#include <stdio.h>
7685#ifdef HAVE_STRING_H
7686#include <string.h>
7687#else
7688#ifdef HAVE_STRINGS_H
7689#include <strings.h>
7690#endif
7691#endif
7692#ifdef HAVE_STDLIB_H
7693#include <stdlib.h>
7694#endif
7695#ifdef HAVE_UNISTD_H
7696#include <unistd.h>
7697#endif
3862412b 7698int main() {
97bf5e38 7699char *(*pfn) = (char *(*)) strdup
3862412b
MK
7700; return 0; }
7701EOF
c324d747 7702if { (eval echo configure:7703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7703 rm -rf conftest*
97bf5e38 7704 bfd_cv_decl_needed_strdup=no
3862412b
MK
7705else
7706 echo "configure: failed program was:" >&5
7707 cat conftest.$ac_ext >&5
7708 rm -rf conftest*
97bf5e38 7709 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7710fi
7711rm -f conftest*
7712fi
7713
97bf5e38
MK
7714echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7715if test $bfd_cv_decl_needed_strdup = yes; then
7716 cat >> confdefs.h <<\EOF
7717#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7718EOF
7719
97bf5e38 7720fi
3862412b 7721
97bf5e38 7722echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
c324d747 7723echo "configure:7724: checking whether strstr must be declared" >&5
97bf5e38 7724if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7725 echo $ac_n "(cached) $ac_c" 1>&6
7726else
7727 cat > conftest.$ac_ext <<EOF
c324d747 7728#line 7729 "configure"
3862412b 7729#include "confdefs.h"
e17bf198 7730
97bf5e38
MK
7731#include <stdio.h>
7732#ifdef HAVE_STRING_H
7733#include <string.h>
7734#else
7735#ifdef HAVE_STRINGS_H
7736#include <strings.h>
7737#endif
7738#endif
7739#ifdef HAVE_STDLIB_H
7740#include <stdlib.h>
7741#endif
7742#ifdef HAVE_UNISTD_H
7743#include <unistd.h>
7744#endif
3862412b 7745int main() {
97bf5e38 7746char *(*pfn) = (char *(*)) strstr
3862412b
MK
7747; return 0; }
7748EOF
c324d747 7749if { (eval echo configure:7750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7750 rm -rf conftest*
97bf5e38 7751 bfd_cv_decl_needed_strstr=no
3862412b
MK
7752else
7753 echo "configure: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7755 rm -rf conftest*
97bf5e38 7756 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7757fi
7758rm -f conftest*
7759fi
7760
97bf5e38
MK
7761echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7762if test $bfd_cv_decl_needed_strstr = yes; then
7763 cat >> confdefs.h <<\EOF
7764#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7765EOF
7766
97bf5e38 7767fi
3862412b 7768
97bf5e38 7769echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
c324d747 7770echo "configure:7771: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7771if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7772 echo $ac_n "(cached) $ac_c" 1>&6
7773else
7774 cat > conftest.$ac_ext <<EOF
c324d747 7775#line 7776 "configure"
596c9d4b
KB
7776#include "confdefs.h"
7777
97bf5e38
MK
7778#include <stdio.h>
7779#ifdef HAVE_STRING_H
7780#include <string.h>
7781#else
7782#ifdef HAVE_STRINGS_H
7783#include <strings.h>
7784#endif
7785#endif
7786#ifdef HAVE_STDLIB_H
7787#include <stdlib.h>
7788#endif
7789#ifdef HAVE_UNISTD_H
7790#include <unistd.h>
7791#endif
596c9d4b 7792int main() {
97bf5e38 7793char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7794; return 0; }
7795EOF
c324d747 7796if { (eval echo configure:7797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7797 rm -rf conftest*
97bf5e38 7798 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7799else
7800 echo "configure: failed program was:" >&5
7801 cat conftest.$ac_ext >&5
7802 rm -rf conftest*
97bf5e38 7803 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7804fi
7805rm -f conftest*
7806fi
7807
97bf5e38
MK
7808echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7809if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7810 cat >> confdefs.h <<\EOF
7811#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7812EOF
7813
97bf5e38 7814fi
596c9d4b 7815
97bf5e38
MK
7816
7817# The following save_state_t checkery is only necessary for HPUX
7818# versions earlier than 10.20. When those fade from memory, this
7819# could be expunged. --jsm 1999-03-22
7820
7821echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
c324d747 7822echo "configure:7823: checking for HPUX save_state structure" >&5
97bf5e38 7823cat > conftest.$ac_ext <<EOF
c324d747 7824#line 7825 "configure"
97bf5e38
MK
7825#include "confdefs.h"
7826#include <machine/save_state.h>
7827EOF
7828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7829 egrep "save_state_t" >/dev/null 2>&1; then
7830 rm -rf conftest*
7831 gdb_cv_hpux_savestate=yes
7832else
7833 rm -rf conftest*
7834 gdb_cv_hpux_savestate=no
7835fi
7836rm -f conftest*
7837
7838cat > conftest.$ac_ext <<EOF
c324d747 7839#line 7840 "configure"
97bf5e38
MK
7840#include "confdefs.h"
7841#include <machine/save_state.h>
7842EOF
7843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7844 egrep "ss_wide" >/dev/null 2>&1; then
7845 rm -rf conftest*
7846 gdb_cv_hpux_sswide=yes
7847else
7848 rm -rf conftest*
7849 gdb_cv_hpux_sswide=no
7850fi
7851rm -f conftest*
7852
7853if test $gdb_cv_hpux_savestate = yes
7854then
7855 cat >> confdefs.h <<\EOF
7856#define HAVE_STRUCT_SAVE_STATE_T 1
7857EOF
7858
7859fi
7860if test $gdb_cv_hpux_sswide = yes
7861then
7862 cat >> confdefs.h <<\EOF
7863#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7864EOF
7865
7866fi
7867echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7868
7869
7870# If we are configured native on GNU/Linux, work around problems with
7871# sys/procfs.h
7872# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7873
7874if test "${target}" = "${host}"; then
7875 case "${host}" in
7876 i[3456]86-*-linux*)
7877 cat >> confdefs.h <<\EOF
7878#define START_INFERIOR_TRAPS_EXPECTED 2
7879EOF
7880
7881 cat >> confdefs.h <<\EOF
7882#define sys_quotactl 1
7883EOF
7884
7885 ;;
7886 ia64-*-aix*)
7887 cat >> confdefs.h <<\EOF
7888#define NEW_PROC_API 1
7889EOF
7890
7891 ;;
7892 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7893 cat >> confdefs.h <<\EOF
7894#define NEW_PROC_API 1
7895EOF
7896
7897 ;;
e7c61be3 7898 *-*-solaris2.[6789])
97bf5e38
MK
7899 cat >> confdefs.h <<\EOF
7900#define NEW_PROC_API 1
7901EOF
7902
7903 ;;
7904 esac
7905fi
7906
7907if test "$ac_cv_header_sys_procfs_h" = yes; then
7908 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 7909echo "configure:7910: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7910 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7911 echo $ac_n "(cached) $ac_c" 1>&6
7912else
7913 cat > conftest.$ac_ext <<EOF
c324d747 7914#line 7915 "configure"
596c9d4b
KB
7915#include "confdefs.h"
7916
7917#define _SYSCALL32
7918#include <sys/procfs.h>
7919int main() {
97bf5e38 7920pstatus_t avar
596c9d4b
KB
7921; return 0; }
7922EOF
c324d747 7923if { (eval echo configure:7924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7924 rm -rf conftest*
97bf5e38 7925 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7926else
7927 echo "configure: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929 rm -rf conftest*
97bf5e38 7930 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7931
7932fi
7933rm -f conftest*
7934fi
7935
97bf5e38 7936 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7937 cat >> confdefs.h <<\EOF
97bf5e38 7938#define HAVE_PSTATUS_T 1
596c9d4b
KB
7939EOF
7940
7941 fi
97bf5e38 7942 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7943
97bf5e38 7944 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 7945echo "configure:7946: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7946 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7947 echo $ac_n "(cached) $ac_c" 1>&6
7948else
7949 cat > conftest.$ac_ext <<EOF
c324d747 7950#line 7951 "configure"
596c9d4b
KB
7951#include "confdefs.h"
7952
7953#define _SYSCALL32
7954#include <sys/procfs.h>
7955int main() {
97bf5e38 7956prrun_t avar
596c9d4b
KB
7957; return 0; }
7958EOF
c324d747 7959if { (eval echo configure:7960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7960 rm -rf conftest*
97bf5e38 7961 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7962else
7963 echo "configure: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7965 rm -rf conftest*
97bf5e38 7966 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7967
7968fi
7969rm -f conftest*
7970fi
7971
97bf5e38 7972 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7973 cat >> confdefs.h <<\EOF
97bf5e38 7974#define HAVE_PRRUN_T 1
596c9d4b
KB
7975EOF
7976
7977 fi
97bf5e38 7978 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7979
97bf5e38 7980 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 7981echo "configure:7982: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7982 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7983 echo $ac_n "(cached) $ac_c" 1>&6
7984else
7985 cat > conftest.$ac_ext <<EOF
c324d747 7986#line 7987 "configure"
596c9d4b
KB
7987#include "confdefs.h"
7988
7989#define _SYSCALL32
7990#include <sys/procfs.h>
7991int main() {
97bf5e38 7992gregset_t avar
596c9d4b
KB
7993; return 0; }
7994EOF
c324d747 7995if { (eval echo configure:7996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7996 rm -rf conftest*
97bf5e38 7997 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7998else
7999 echo "configure: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8001 rm -rf conftest*
97bf5e38 8002 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8003
8004fi
8005rm -f conftest*
8006fi
8007
97bf5e38 8008 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8009 cat >> confdefs.h <<\EOF
97bf5e38 8010#define HAVE_GREGSET_T 1
596c9d4b
KB
8011EOF
8012
8013 fi
97bf5e38 8014 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8015
97bf5e38 8016 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8017echo "configure:8018: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8018 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8019 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8020else
8021 cat > conftest.$ac_ext <<EOF
c324d747 8022#line 8023 "configure"
d84dd0c5 8023#include "confdefs.h"
97bf5e38
MK
8024
8025#define _SYSCALL32
d84dd0c5 8026#include <sys/procfs.h>
97bf5e38
MK
8027int main() {
8028fpregset_t avar
8029; return 0; }
d84dd0c5 8030EOF
c324d747 8031if { (eval echo configure:8032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8032 rm -rf conftest*
8033 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8034else
8035 echo "configure: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
97bf5e38
MK
8037 rm -rf conftest*
8038 bfd_cv_have_sys_procfs_type_fpregset_t=no
8039
d84dd0c5 8040fi
97bf5e38 8041rm -f conftest*
d84dd0c5
MK
8042fi
8043
97bf5e38
MK
8044 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8045 cat >> confdefs.h <<\EOF
8046#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8047EOF
8048
97bf5e38
MK
8049 fi
8050 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8051
97bf5e38 8052 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8053echo "configure:8054: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8054 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8055 echo $ac_n "(cached) $ac_c" 1>&6
8056else
8057 cat > conftest.$ac_ext <<EOF
c324d747 8058#line 8059 "configure"
c906108c 8059#include "confdefs.h"
c906108c 8060
97bf5e38
MK
8061#define _SYSCALL32
8062#include <sys/procfs.h>
c906108c 8063int main() {
97bf5e38 8064prgregset_t avar
c906108c
SS
8065; return 0; }
8066EOF
c324d747 8067if { (eval echo configure:8068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8068 rm -rf conftest*
97bf5e38 8069 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8070else
8071 echo "configure: failed program was:" >&5
8072 cat conftest.$ac_ext >&5
8073 rm -rf conftest*
97bf5e38
MK
8074 bfd_cv_have_sys_procfs_type_prgregset_t=no
8075
c906108c
SS
8076fi
8077rm -f conftest*
8078fi
8079
97bf5e38
MK
8080 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8081 cat >> confdefs.h <<\EOF
8082#define HAVE_PRGREGSET_T 1
c906108c
SS
8083EOF
8084
97bf5e38
MK
8085 fi
8086 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8087
97bf5e38 8088 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8089echo "configure:8090: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8090 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8091 echo $ac_n "(cached) $ac_c" 1>&6
8092else
8093 cat > conftest.$ac_ext <<EOF
c324d747 8094#line 8095 "configure"
d45fe813 8095#include "confdefs.h"
97bf5e38
MK
8096
8097#define _SYSCALL32
8098#include <sys/procfs.h>
d45fe813 8099int main() {
97bf5e38 8100prfpregset_t avar
d45fe813
KB
8101; return 0; }
8102EOF
c324d747 8103if { (eval echo configure:8104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8104 rm -rf conftest*
97bf5e38 8105 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8106else
8107 echo "configure: failed program was:" >&5
8108 cat conftest.$ac_ext >&5
8109 rm -rf conftest*
97bf5e38
MK
8110 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8111
d45fe813
KB
8112fi
8113rm -f conftest*
8114fi
8115
97bf5e38
MK
8116 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8117 cat >> confdefs.h <<\EOF
8118#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8119EOF
8120
97bf5e38
MK
8121 fi
8122 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8123
97bf5e38 8124 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8125echo "configure:8126: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8126 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8127 echo $ac_n "(cached) $ac_c" 1>&6
8128else
8129 cat > conftest.$ac_ext <<EOF
c324d747 8130#line 8131 "configure"
d45fe813 8131#include "confdefs.h"
97bf5e38
MK
8132
8133#define _SYSCALL32
8134#include <sys/procfs.h>
d45fe813 8135int main() {
97bf5e38 8136prgregset32_t avar
d45fe813
KB
8137; return 0; }
8138EOF
c324d747 8139if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8140 rm -rf conftest*
97bf5e38 8141 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8142else
8143 echo "configure: failed program was:" >&5
8144 cat conftest.$ac_ext >&5
8145 rm -rf conftest*
97bf5e38
MK
8146 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8147
d45fe813
KB
8148fi
8149rm -f conftest*
8150fi
8151
97bf5e38
MK
8152 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8153 cat >> confdefs.h <<\EOF
8154#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8155EOF
8156
97bf5e38
MK
8157 fi
8158 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8159
97bf5e38 8160 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8161echo "configure:8162: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8162 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8163 echo $ac_n "(cached) $ac_c" 1>&6
8164else
8165 cat > conftest.$ac_ext <<EOF
c324d747 8166#line 8167 "configure"
d45fe813 8167#include "confdefs.h"
97bf5e38
MK
8168
8169#define _SYSCALL32
8170#include <sys/procfs.h>
d45fe813 8171int main() {
97bf5e38 8172prfpregset32_t avar
d45fe813
KB
8173; return 0; }
8174EOF
c324d747 8175if { (eval echo configure:8176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8176 rm -rf conftest*
97bf5e38 8177 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8178else
8179 echo "configure: failed program was:" >&5
8180 cat conftest.$ac_ext >&5
8181 rm -rf conftest*
97bf5e38
MK
8182 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8183
d45fe813
KB
8184fi
8185rm -f conftest*
8186fi
8187
97bf5e38
MK
8188 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8189 cat >> confdefs.h <<\EOF
8190#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8191EOF
8192
97bf5e38
MK
8193 fi
8194 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8195
97bf5e38 8196 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8197echo "configure:8198: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8198 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8199 echo $ac_n "(cached) $ac_c" 1>&6
8200else
8201 cat > conftest.$ac_ext <<EOF
c324d747 8202#line 8203 "configure"
d45fe813 8203#include "confdefs.h"
97bf5e38 8204
d45fe813 8205#define _SYSCALL32
97bf5e38 8206#include <sys/procfs.h>
d45fe813 8207int main() {
97bf5e38 8208lwpid_t avar
d45fe813
KB
8209; return 0; }
8210EOF
c324d747 8211if { (eval echo configure:8212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8212 rm -rf conftest*
97bf5e38 8213 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8214else
8215 echo "configure: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 rm -rf conftest*
97bf5e38
MK
8218 bfd_cv_have_sys_procfs_type_lwpid_t=no
8219
d45fe813
KB
8220fi
8221rm -f conftest*
8222fi
8223
97bf5e38
MK
8224 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8225 cat >> confdefs.h <<\EOF
8226#define HAVE_LWPID_T 1
d45fe813
KB
8227EOF
8228
97bf5e38
MK
8229 fi
8230 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8231
97bf5e38 8232 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8233echo "configure:8234: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8234 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8235 echo $ac_n "(cached) $ac_c" 1>&6
8236else
8237 cat > conftest.$ac_ext <<EOF
c324d747 8238#line 8239 "configure"
c906108c
SS
8239#include "confdefs.h"
8240
97bf5e38
MK
8241#define _SYSCALL32
8242#include <sys/procfs.h>
c906108c 8243int main() {
97bf5e38 8244psaddr_t avar
c906108c
SS
8245; return 0; }
8246EOF
c324d747 8247if { (eval echo configure:8248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8248 rm -rf conftest*
97bf5e38 8249 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8250else
8251 echo "configure: failed program was:" >&5
8252 cat conftest.$ac_ext >&5
8253 rm -rf conftest*
97bf5e38
MK
8254 bfd_cv_have_sys_procfs_type_psaddr_t=no
8255
c906108c
SS
8256fi
8257rm -f conftest*
8258fi
8259
97bf5e38
MK
8260 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8261 cat >> confdefs.h <<\EOF
8262#define HAVE_PSADDR_T 1
c906108c
SS
8263EOF
8264
97bf5e38
MK
8265 fi
8266 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8267
97bf5e38 8268 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8269echo "configure:8270: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8270 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8271 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8272else
8273 cat > conftest.$ac_ext <<EOF
c324d747 8274#line 8275 "configure"
c906108c
SS
8275#include "confdefs.h"
8276
97bf5e38
MK
8277#define _SYSCALL32
8278#include <sys/procfs.h>
8279int main() {
8280prsysent_t avar
8281; return 0; }
c906108c 8282EOF
c324d747 8283if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8284 rm -rf conftest*
8285 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8286else
8287 echo "configure: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
97bf5e38
MK
8289 rm -rf conftest*
8290 bfd_cv_have_sys_procfs_type_prsysent_t=no
8291
c906108c 8292fi
97bf5e38 8293rm -f conftest*
c906108c
SS
8294fi
8295
97bf5e38
MK
8296 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8297 cat >> confdefs.h <<\EOF
8298#define HAVE_PRSYSENT_T 1
c906108c
SS
8299EOF
8300
97bf5e38
MK
8301 fi
8302 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8303
97bf5e38 8304 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8305echo "configure:8306: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8306 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8307 echo $ac_n "(cached) $ac_c" 1>&6
8308else
8309 cat > conftest.$ac_ext <<EOF
c324d747 8310#line 8311 "configure"
c906108c
SS
8311#include "confdefs.h"
8312
97bf5e38
MK
8313#define _SYSCALL32
8314#include <sys/procfs.h>
c906108c 8315int main() {
97bf5e38 8316pr_sigset_t avar
c906108c
SS
8317; return 0; }
8318EOF
c324d747 8319if { (eval echo configure:8320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8320 rm -rf conftest*
97bf5e38 8321 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8322else
8323 echo "configure: failed program was:" >&5
8324 cat conftest.$ac_ext >&5
8325 rm -rf conftest*
97bf5e38
MK
8326 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8327
c906108c
SS
8328fi
8329rm -f conftest*
8330fi
8331
97bf5e38
MK
8332 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8333 cat >> confdefs.h <<\EOF
8334#define HAVE_PR_SIGSET_T 1
c906108c
SS
8335EOF
8336
97bf5e38
MK
8337 fi
8338 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8339
97bf5e38 8340 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8341echo "configure:8342: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8342 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8343 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8344else
8345 cat > conftest.$ac_ext <<EOF
c324d747 8346#line 8347 "configure"
c906108c
SS
8347#include "confdefs.h"
8348
97bf5e38
MK
8349#define _SYSCALL32
8350#include <sys/procfs.h>
8351int main() {
8352pr_sigaction64_t avar
8353; return 0; }
c906108c 8354EOF
c324d747 8355if { (eval echo configure:8356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8356 rm -rf conftest*
8357 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8358else
8359 echo "configure: failed program was:" >&5
8360 cat conftest.$ac_ext >&5
97bf5e38
MK
8361 rm -rf conftest*
8362 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8363
c906108c 8364fi
97bf5e38 8365rm -f conftest*
c906108c
SS
8366fi
8367
97bf5e38
MK
8368 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8369 cat >> confdefs.h <<\EOF
8370#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8371EOF
8372
97bf5e38
MK
8373 fi
8374 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8375
8376 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
c324d747 8377echo "configure:8378: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8378 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8379 echo $ac_n "(cached) $ac_c" 1>&6
8380else
8381 cat > conftest.$ac_ext <<EOF
c324d747 8382#line 8383 "configure"
97bf5e38
MK
8383#include "confdefs.h"
8384
8385#define _SYSCALL32
8386#include <sys/procfs.h>
8387int main() {
8388pr_siginfo64_t avar
8389; return 0; }
8390EOF
c324d747 8391if { (eval echo configure:8392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8392 rm -rf conftest*
8393 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8394else
8395 echo "configure: failed program was:" >&5
8396 cat conftest.$ac_ext >&5
8397 rm -rf conftest*
8398 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8399
8400fi
8401rm -f conftest*
c906108c 8402fi
c906108c 8403
97bf5e38
MK
8404 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8405 cat >> confdefs.h <<\EOF
8406#define HAVE_PR_SIGINFO64_T 1
8407EOF
c906108c 8408
97bf5e38
MK
8409 fi
8410 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8411
8412
8413
8414
8415
8416 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8417 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
c324d747 8418echo "configure:8419: checking whether prfpregset_t type is broken" >&5
97bf5e38 8419 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8420 echo $ac_n "(cached) $ac_c" 1>&6
8421else
8422 if test "$cross_compiling" = yes; then
97bf5e38 8423 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8424else
8425 cat > conftest.$ac_ext <<EOF
c324d747 8426#line 8427 "configure"
c906108c 8427#include "confdefs.h"
97bf5e38
MK
8428#include <sys/procfs.h>
8429 int main ()
8430 {
8431 if (sizeof (prfpregset_t) == sizeof (void *))
8432 return 1;
8433 return 0;
8434 }
c906108c 8435EOF
c324d747 8436if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8437then
97bf5e38 8438 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8439else
8440 echo "configure: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8442 rm -fr conftest*
97bf5e38 8443 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8444fi
8445rm -fr conftest*
8446fi
8447
8448fi
8449
97bf5e38
MK
8450 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8451 if test $gdb_cv_prfpregset_t_broken = yes; then
8452 cat >> confdefs.h <<\EOF
8453#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8454EOF
8455
97bf5e38
MK
8456 fi
8457 fi
c906108c 8458
97bf5e38
MK
8459
8460 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
c324d747 8461echo "configure:8462: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8462 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8463 echo $ac_n "(cached) $ac_c" 1>&6
8464else
8465 cat > conftest.$ac_ext <<EOF
c324d747 8466#line 8467 "configure"
c906108c 8467#include "confdefs.h"
97bf5e38
MK
8468#include <unistd.h>
8469#include <sys/types.h>
8470#include <sys/procfs.h>
8471
8472int main() {
8473
8474 int dummy;;
8475 dummy = ioctl(0, PIOCSET, &dummy);
8476
8477; return 0; }
c906108c 8478EOF
c324d747 8479if { (eval echo configure:8480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8480 rm -rf conftest*
97bf5e38 8481 gdb_cv_have_procfs_piocset=yes
c906108c 8482else
c906108c
SS
8483 echo "configure: failed program was:" >&5
8484 cat conftest.$ac_ext >&5
8485 rm -rf conftest*
97bf5e38 8486 gdb_cv_have_procfs_piocset=no
c906108c
SS
8487fi
8488rm -f conftest*
8489fi
97bf5e38
MK
8490
8491 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8492 if test $gdb_cv_have_procfs_piocset = yes; then
8493 cat >> confdefs.h <<\EOF
8494#define HAVE_PROCFS_PIOCSET 1
c906108c 8495EOF
97bf5e38
MK
8496
8497 fi
c906108c 8498fi
c906108c 8499
97bf5e38
MK
8500if test ${host} = ${target} ; then
8501
8502 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
c324d747 8503echo "configure:8504: checking for member l_addr in struct link_map" >&5
97bf5e38 8504 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8505 echo $ac_n "(cached) $ac_c" 1>&6
8506else
8507 cat > conftest.$ac_ext <<EOF
c324d747 8508#line 8509 "configure"
c906108c 8509#include "confdefs.h"
97bf5e38 8510#include <link.h>
c906108c 8511int main() {
97bf5e38 8512struct link_map lm; (void) lm.l_addr;
c906108c
SS
8513; return 0; }
8514EOF
c324d747 8515if { (eval echo configure:8516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8516 rm -rf conftest*
97bf5e38 8517 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8518else
8519 echo "configure: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 rm -rf conftest*
97bf5e38 8522 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8523fi
8524rm -f conftest*
8525fi
8526
97bf5e38
MK
8527 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8528 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8529 cat >> confdefs.h <<\EOF
8530#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8531EOF
97bf5e38
MK
8532
8533 fi
8534
8535
8536 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
c324d747 8537echo "configure:8538: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8538 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8539 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8540else
97bf5e38 8541 cat > conftest.$ac_ext <<EOF
c324d747 8542#line 8543 "configure"
97bf5e38
MK
8543#include "confdefs.h"
8544#include <sys/types.h>
8545#include <link.h>
8546int main() {
8547struct link_map lm; (void) lm.lm_addr;
8548; return 0; }
8549EOF
c324d747 8550if { (eval echo configure:8551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8551 rm -rf conftest*
8552 gdb_cv_have_struct_link_map_with_lm_members=yes
8553else
8554 echo "configure: failed program was:" >&5
8555 cat conftest.$ac_ext >&5
8556 rm -rf conftest*
8557 gdb_cv_have_struct_link_map_with_lm_members=no
8558fi
8559rm -f conftest*
c906108c 8560fi
c906108c 8561
97bf5e38
MK
8562 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8563 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8564 cat >> confdefs.h <<\EOF
8565#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8566EOF
8567
8568 fi
8569
8570
8571 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
c324d747 8572echo "configure:8573: checking for member som_addr in struct so_map" >&5
97bf5e38 8573 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8574 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8575else
8576 cat > conftest.$ac_ext <<EOF
c324d747 8577#line 8578 "configure"
c906108c 8578#include "confdefs.h"
97bf5e38
MK
8579#include <sys/types.h>
8580#ifdef HAVE_NLIST_H
8581#include <nlist.h>
8582#endif
8583#include <link.h>
8584int main() {
8585struct so_map lm; (void) lm.som_addr;
8586; return 0; }
8587EOF
c324d747 8588if { (eval echo configure:8589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8589 rm -rf conftest*
8590 gdb_cv_have_struct_so_map_with_som_members=yes
8591else
8592 echo "configure: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 rm -rf conftest*
8595 gdb_cv_have_struct_so_map_with_som_members=no
8596fi
8597rm -f conftest*
8598fi
c906108c 8599
97bf5e38
MK
8600 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8601 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8602 cat >> confdefs.h <<\EOF
8603#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8604EOF
c906108c 8605
97bf5e38 8606 fi
c906108c 8607
97bf5e38
MK
8608
8609 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
c324d747 8610echo "configure:8611: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8611 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8612 echo $ac_n "(cached) $ac_c" 1>&6
8613else
8614 cat > conftest.$ac_ext <<EOF
c324d747 8615#line 8616 "configure"
97bf5e38
MK
8616#include "confdefs.h"
8617#define _SYSCALL32
8618#include <sys/link.h>
8619int main() {
8620struct link_map32 l;
8621; return 0; }
8622EOF
c324d747 8623if { (eval echo configure:8624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8624 rm -rf conftest*
8625 gdb_cv_have_struct_link_map32=yes
8626else
8627 echo "configure: failed program was:" >&5
8628 cat conftest.$ac_ext >&5
8629 rm -rf conftest*
8630 gdb_cv_have_struct_link_map32=no
8631fi
8632rm -f conftest*
8633fi
c906108c 8634
97bf5e38
MK
8635 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8636 if test $gdb_cv_have_struct_link_map32 = yes; then
8637 cat >> confdefs.h <<\EOF
8638#define HAVE_STRUCT_LINK_MAP32 1
8639EOF
c906108c 8640
97bf5e38
MK
8641 cat >> confdefs.h <<\EOF
8642#define _SYSCALL32 1
8643EOF
c906108c 8644
97bf5e38
MK
8645 fi
8646fi
c906108c 8647
c906108c 8648
97bf5e38 8649echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
c324d747 8650echo "configure:8651: checking for long long support in compiler" >&5
97bf5e38
MK
8651if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8652 echo $ac_n "(cached) $ac_c" 1>&6
8653else
8654 cat > conftest.$ac_ext <<EOF
c324d747 8655#line 8656 "configure"
97bf5e38 8656#include "confdefs.h"
c906108c 8657
97bf5e38 8658int main() {
c906108c 8659
97bf5e38
MK
8660 extern long long foo;
8661 switch (foo & 2) { case 0: return 1; }
c906108c 8662
97bf5e38
MK
8663; return 0; }
8664EOF
c324d747 8665if { (eval echo configure:8666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8666 rm -rf conftest*
8667 gdb_cv_c_long_long=yes
8668else
8669 echo "configure: failed program was:" >&5
8670 cat conftest.$ac_ext >&5
8671 rm -rf conftest*
8672 gdb_cv_c_long_long=no
8673fi
8674rm -f conftest*
8675fi
c906108c 8676
97bf5e38
MK
8677echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8678if test $gdb_cv_c_long_long = yes; then
8679 cat >> confdefs.h <<\EOF
8680#define CC_HAS_LONG_LONG 1
8681EOF
8682
8683fi
8684
8685
8686echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
c324d747 8687echo "configure:8688: checking for long long support in printf" >&5
97bf5e38
MK
8688if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8689 echo $ac_n "(cached) $ac_c" 1>&6
8690else
8691 if test "$cross_compiling" = yes; then
8692 gdb_cv_printf_has_long_long=no
8693else
8694 cat > conftest.$ac_ext <<EOF
c324d747 8695#line 8696 "configure"
97bf5e38
MK
8696#include "confdefs.h"
8697
8698int main () {
8699 char buf[32];
8700 long long l = 0;
8701 l = (l << 16) + 0x0123;
8702 l = (l << 16) + 0x4567;
8703 l = (l << 16) + 0x89ab;
8704 l = (l << 16) + 0xcdef;
8705 sprintf (buf, "0x%016llx", l);
8706 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8707}
97bf5e38 8708EOF
c324d747 8709if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8710then
8711 gdb_cv_printf_has_long_long=yes
8712else
8713 echo "configure: failed program was:" >&5
8714 cat conftest.$ac_ext >&5
8715 rm -fr conftest*
8716 gdb_cv_printf_has_long_long=no
8717fi
8718rm -fr conftest*
8719fi
8720
8721fi
8722
8723if test $gdb_cv_printf_has_long_long = yes; then
8724 cat >> confdefs.h <<\EOF
8725#define PRINTF_HAS_LONG_LONG 1
8726EOF
8727
8728fi
8729echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8730
8731
8732echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
c324d747 8733echo "configure:8734: checking for long double support in compiler" >&5
97bf5e38
MK
8734if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8735 echo $ac_n "(cached) $ac_c" 1>&6
8736else
8737 cat > conftest.$ac_ext <<EOF
c324d747 8738#line 8739 "configure"
97bf5e38
MK
8739#include "confdefs.h"
8740
8741int main() {
8742long double foo;
8743; return 0; }
8744EOF
c324d747 8745if { (eval echo configure:8746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8746 rm -rf conftest*
8747 ac_cv_c_long_double=yes
8748else
8749 echo "configure: failed program was:" >&5
8750 cat conftest.$ac_ext >&5
8751 rm -rf conftest*
8752 ac_cv_c_long_double=no
8753fi
8754rm -f conftest*
8755fi
c906108c 8756
97bf5e38
MK
8757echo "$ac_t""$ac_cv_c_long_double" 1>&6
8758if test $ac_cv_c_long_double = yes; then
8759 cat >> confdefs.h <<\EOF
8760#define HAVE_LONG_DOUBLE 1
c906108c 8761EOF
97bf5e38
MK
8762
8763fi
8764
8765
8766echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
c324d747 8767echo "configure:8768: checking for long double support in printf" >&5
97bf5e38
MK
8768if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8769 echo $ac_n "(cached) $ac_c" 1>&6
8770else
8771 if test "$cross_compiling" = yes; then
8772 gdb_cv_printf_has_long_double=no
8773else
8774 cat > conftest.$ac_ext <<EOF
c324d747 8775#line 8776 "configure"
97bf5e38
MK
8776#include "confdefs.h"
8777
8778int main () {
8779 char buf[16];
8780 long double f = 3.141592653;
8781 sprintf (buf, "%Lg", f);
8782 return (strncmp ("3.14159", buf, 7));
8783}
8784EOF
c324d747 8785if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8786then
97bf5e38 8787 gdb_cv_printf_has_long_double=yes
c906108c
SS
8788else
8789 echo "configure: failed program was:" >&5
8790 cat conftest.$ac_ext >&5
8791 rm -fr conftest*
97bf5e38 8792 gdb_cv_printf_has_long_double=no
c906108c
SS
8793fi
8794rm -fr conftest*
8795fi
8796
8797fi
8798
97bf5e38 8799if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8800 cat >> confdefs.h <<\EOF
97bf5e38
MK
8801#define PRINTF_HAS_LONG_DOUBLE 1
8802EOF
8803
8804fi
8805echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8806
8807
8808echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
c324d747 8809echo "configure:8810: checking for long double support in scanf" >&5
97bf5e38
MK
8810if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8811 echo $ac_n "(cached) $ac_c" 1>&6
8812else
8813 if test "$cross_compiling" = yes; then
8814 gdb_cv_scanf_has_long_double=no
8815else
8816 cat > conftest.$ac_ext <<EOF
c324d747 8817#line 8818 "configure"
97bf5e38
MK
8818#include "confdefs.h"
8819
8820int main () {
8821 char *buf = "3.141592653";
8822 long double f = 0;
8823 sscanf (buf, "%Lg", &f);
8824 return !(f > 3.14159 && f < 3.14160);
8825}
c906108c 8826EOF
c324d747 8827if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8828then
8829 gdb_cv_scanf_has_long_double=yes
8830else
8831 echo "configure: failed program was:" >&5
8832 cat conftest.$ac_ext >&5
8833 rm -fr conftest*
8834 gdb_cv_scanf_has_long_double=no
8835fi
8836rm -fr conftest*
8837fi
c906108c
SS
8838
8839fi
8840
97bf5e38
MK
8841if test $gdb_cv_scanf_has_long_double = yes; then
8842 cat >> confdefs.h <<\EOF
8843#define SCANF_HAS_LONG_DOUBLE 1
8844EOF
8845
8846fi
8847echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8848
438013df
AO
8849case ${host_os} in
8850aix*)
8851 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
c324d747 8852echo "configure:8853: checking for -bbigtoc option" >&5
438013df
AO
8853if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8854 echo $ac_n "(cached) $ac_c" 1>&6
8855else
8856
8857 SAVE_LDFLAGS=$LDFLAGS
8858
8859 case $GCC in
8860 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8861 *) gdb_cv_bigtoc=-bbigtoc ;;
8862 esac
8863
8864 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8865 cat > conftest.$ac_ext <<EOF
c324d747 8866#line 8867 "configure"
438013df
AO
8867#include "confdefs.h"
8868
8869int main() {
8870int i;
8871; return 0; }
8872EOF
c324d747 8873if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8874 :
8875else
8876 echo "configure: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878 rm -rf conftest*
8879 gdb_cv_bigtoc=
8880fi
8881rm -f conftest*
8882
8883fi
8884
8885echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8886 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8887 ;;
8888esac
8889
c906108c
SS
8890
8891
8892if test ${build} = ${host} -a ${host} = ${target} ; then
8893 case ${host_os} in
8894 hpux*)
8895 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
c324d747 8896echo "configure:8897: checking for HPUX/OSF thread support" >&5
c906108c
SS
8897 if test -f /usr/include/dce/cma_config.h ; then
8898 if test "$GCC" = "yes" ; then
8899 echo "$ac_t""yes" 1>&6
8900 cat >> confdefs.h <<\EOF
8901#define HAVE_HPUX_THREAD_SUPPORT 1
8902EOF
8903
3483b318 8904 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
8905 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8906 else
8907 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8908 fi
8909 else
8910 echo "$ac_t""no" 1>&6
8911 fi
8912 ;;
8913 solaris*)
d92419e5
JB
8914 # See if thread_db library is around for Solaris thread debugging.
8915 # Note that we must explicitly test for version 1 of the library
8916 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8917 # the same API.
c906108c 8918 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
c324d747 8919echo "configure:8920: checking for Solaris thread debugging library" >&5
c906108c
SS
8920 if test -f /usr/lib/libthread_db.so.1 ; then
8921 echo "$ac_t""yes" 1>&6
8922 cat >> confdefs.h <<\EOF
8923#define HAVE_THREAD_DB_LIB 1
8924EOF
8925
3483b318 8926 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
8927 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8928 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
c324d747 8929echo "configure:8930: checking for dlopen in -ldl" >&5
c906108c
SS
8930ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8931if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8932 echo $ac_n "(cached) $ac_c" 1>&6
8933else
8934 ac_save_LIBS="$LIBS"
8935LIBS="-ldl $LIBS"
8936cat > conftest.$ac_ext <<EOF
c324d747 8937#line 8938 "configure"
c906108c
SS
8938#include "confdefs.h"
8939/* Override any gcc2 internal prototype to avoid an error. */
8940/* We use char because int might match the return type of a gcc2
8941 builtin and then its argument prototype would still apply. */
8942char dlopen();
8943
8944int main() {
8945dlopen()
8946; return 0; }
8947EOF
c324d747 8948if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8949 rm -rf conftest*
8950 eval "ac_cv_lib_$ac_lib_var=yes"
8951else
8952 echo "configure: failed program was:" >&5
8953 cat conftest.$ac_ext >&5
8954 rm -rf conftest*
8955 eval "ac_cv_lib_$ac_lib_var=no"
8956fi
8957rm -f conftest*
8958LIBS="$ac_save_LIBS"
8959
8960fi
8961if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8962 echo "$ac_t""yes" 1>&6
8963 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8964 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8965 cat >> confdefs.h <<EOF
8966#define $ac_tr_lib 1
8967EOF
8968
8969 LIBS="-ldl $LIBS"
8970
8971else
8972 echo "$ac_t""no" 1>&6
8973fi
8974
8975 if test "$GCC" = "yes" ; then
8976 # The GNU linker requires the -export-dynamic option to make
8977 # all symbols visible in the dynamic symbol table.
8978 hold_ldflags=$LDFLAGS
8979 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
c324d747 8980echo "configure:8981: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8981 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8982 cat > conftest.$ac_ext <<EOF
c324d747 8983#line 8984 "configure"
c906108c
SS
8984#include "confdefs.h"
8985
8986int main() {
8987int i;
8988; return 0; }
8989EOF
c324d747 8990if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8991 rm -rf conftest*
8992 found=yes
8993else
8994 echo "configure: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 rm -rf conftest*
8997 found=no
8998fi
8999rm -f conftest*
9000 LDFLAGS=$hold_ldflags
9001 echo "$ac_t""$found" 1>&6
9002 if test $found = yes; then
9003 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9004 fi
9005 fi
9006 # Sun randomly tweaked the prototypes in <proc_service.h>
9007 # at one point.
9008 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
c324d747 9009echo "configure:9010: checking if <proc_service.h> is old" >&5
c906108c
SS
9010 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9011 echo $ac_n "(cached) $ac_c" 1>&6
9012else
9013
9014 cat > conftest.$ac_ext <<EOF
c324d747 9015#line 9016 "configure"
c906108c
SS
9016#include "confdefs.h"
9017
9018 #include <proc_service.h>
9019 ps_err_e ps_pdwrite
9020 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9021
9022int main() {
9023
9024; return 0; }
9025EOF
c324d747 9026if { (eval echo configure:9027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9027 rm -rf conftest*
9028 gdb_cv_proc_service_is_old=no
9029else
9030 echo "configure: failed program was:" >&5
9031 cat conftest.$ac_ext >&5
9032 rm -rf conftest*
9033 gdb_cv_proc_service_is_old=yes
9034fi
9035rm -f conftest*
9036
9037fi
9038
9039 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9040 if test $gdb_cv_proc_service_is_old = yes; then
9041 cat >> confdefs.h <<\EOF
9042#define PROC_SERVICE_IS_OLD 1
9043EOF
9044
9045 fi
9046 else
9047 echo "$ac_t""no" 1>&6
9048 fi
9049 ;;
d92419e5
JB
9050 aix*)
9051 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
c324d747 9052echo "configure:9053: checking for AiX thread debugging library" >&5
d92419e5
JB
9053 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9054 echo $ac_n "(cached) $ac_c" 1>&6
9055else
9056 cat > conftest.$ac_ext <<EOF
c324d747 9057#line 9058 "configure"
d92419e5
JB
9058#include "confdefs.h"
9059#include <sys/pthdebug.h>
9060int main() {
9061#ifndef PTHDB_VERSION_3
9062 #error
9063 #endif
9064; return 0; }
9065EOF
c324d747 9066if { (eval echo configure:9067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9067 rm -rf conftest*
9068 gdb_cv_have_aix_thread_debug=yes
9069else
9070 echo "configure: failed program was:" >&5
9071 cat conftest.$ac_ext >&5
9072 rm -rf conftest*
9073 gdb_cv_have_aix_thread_debug=no
9074fi
9075rm -f conftest*
9076fi
9077
9078 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9079 if test $gdb_cv_have_aix_thread_debug = yes; then
9080 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9081 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9082 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9083 fi
9084 ;;
c906108c
SS
9085 esac
9086
9087fi
9088
3f47be5c
EZ
9089if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9090 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
c324d747 9091echo "configure:9092: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9092if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9093 echo $ac_n "(cached) $ac_c" 1>&6
9094else
9095 cat > conftest.$ac_ext <<EOF
c324d747 9096#line 9097 "configure"
3f47be5c
EZ
9097#include "confdefs.h"
9098#include <thread_db.h>
9099int main() {
9100int i = TD_NOTALLOC;
9101; return 0; }
9102EOF
c324d747 9103if { (eval echo configure:9104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9104 rm -rf conftest*
9105 gdb_cv_thread_db_h_has_td_notalloc=yes
9106else
9107 echo "configure: failed program was:" >&5
9108 cat conftest.$ac_ext >&5
9109 rm -rf conftest*
9110 gdb_cv_thread_db_h_has_td_notalloc=no
9111
9112fi
9113rm -f conftest*
9114
9115fi
9116
9117echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9118fi
9119if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9120 cat >> confdefs.h <<\EOF
9121#define THREAD_DB_HAS_TD_NOTALLOC 1
9122EOF
9123
9124fi
9125
b757528f
JJ
9126if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9127 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
c324d747 9128echo "configure:9129: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9129if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9130 echo $ac_n "(cached) $ac_c" 1>&6
9131else
9132 cat > conftest.$ac_ext <<EOF
c324d747 9133#line 9134 "configure"
b757528f
JJ
9134#include "confdefs.h"
9135#include <sys/syscall.h>
9136int main() {
9137int i = __NR_tkill;
9138; return 0; }
9139EOF
c324d747 9140if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9141 rm -rf conftest*
9142 gdb_cv_sys_syscall_h_has_tkill=yes
9143else
9144 echo "configure: failed program was:" >&5
9145 cat conftest.$ac_ext >&5
9146 rm -rf conftest*
9147 gdb_cv_sys_syscall_h_has_tkill=no
9148
9149fi
9150rm -f conftest*
9151
9152fi
9153
9154echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9155fi
9156if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9157 cat >> confdefs.h <<\EOF
9158#define HAVE_TKILL_SYSCALL 1
9159EOF
9160
9161fi
9162
fb40c209 9163
030292b7
DJ
9164# Check whether --with-sysroot or --without-sysroot was given.
9165if test "${with_sysroot+set}" = set; then
9166 withval="$with_sysroot"
9167
9168 case ${with_sysroot} in
715d1656 9169 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9170 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9171 esac
9172
9173 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9174
9175 if test "x$exec_prefix" = xNONE; then
9176 if test "x$prefix" = xNONE; then
9177 test_prefix=/usr/local
9178 else
9179 test_prefix=$prefix
9180 fi
9181 else
9182 test_prefix=$exec_prefix
9183 fi
9184 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9185 "${test_prefix}"|"${test_prefix}/"*|\
9186 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9187 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9188 TARGET_SYSTEM_ROOT_DEFINE="$t"
9189 ;;
9190 esac
9191
9192else
9193
9194 TARGET_SYSTEM_ROOT=
9195 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9196
9197fi
9198
9199
9200
9201
3b851bce
AC
9202# NOTE: Don't add -Wall or -Wunused, they both include
9203# -Wunused-parameter which reports bogus warnings.
9204# NOTE: If you add to this list, remember to update
9205# gdb/doc/gdbint.texinfo.
1decb323 9206build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9207-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9208-Wunused-label -Wunused-function"
d8038014 9209# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9210# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9211# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9212# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9213# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9214# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9215# Check whether --enable-build-warnings or --disable-build-warnings was given.
9216if test "${enable_build_warnings+set}" = set; then
9217 enableval="$enable_build_warnings"
1decb323 9218 case "${enableval}" in
c906108c
SS
9219 yes) ;;
9220 no) build_warnings="-w";;
9221 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9222 build_warnings="${build_warnings} ${t}";;
9223 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9224 build_warnings="${t} ${build_warnings}";;
9225 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9226esac
d4f3574e 9227if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9228 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9229fi
1decb323 9230fi
3b851bce
AC
9231# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9232if test "${enable_gdb_build_warnings+set}" = set; then
9233 enableval="$enable_gdb_build_warnings"
9234 case "${enableval}" in
9235 yes) ;;
9236 no) build_warnings="-w";;
9237 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9238 build_warnings="${build_warnings} ${t}";;
9239 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9240 build_warnings="${t} ${build_warnings}";;
9241 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9242esac
9243if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9244 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9245fi
9246fi
104c1213
JM
9247WARN_CFLAGS=""
9248WERROR_CFLAGS=""
c906108c
SS
9249if test "x${build_warnings}" != x -a "x$GCC" = xyes
9250then
746a987d 9251 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
c324d747 9252echo "configure:9253: checking compiler warning flags" >&5
746a987d
AC
9253 # Separate out the -Werror flag as some files just cannot be
9254 # compiled with it enabled.
9255 for w in ${build_warnings}; do
9256 case $w in
9257 -Werr*) WERROR_CFLAGS=-Werror ;;
9258 *) # Check that GCC accepts it
4536bbc6
AC
9259 saved_CFLAGS="$CFLAGS"
9260 CFLAGS="$CFLAGS $w"
9261 cat > conftest.$ac_ext <<EOF
c324d747 9262#line 9263 "configure"
4536bbc6
AC
9263#include "confdefs.h"
9264
9265int main() {
9266
9267; return 0; }
9268EOF
c324d747 9269if { (eval echo configure:9270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9270 rm -rf conftest*
9271 WARN_CFLAGS="${WARN_CFLAGS} $w"
9272else
9273 echo "configure: failed program was:" >&5
9274 cat conftest.$ac_ext >&5
9275fi
9276rm -f conftest*
9277 CFLAGS="$saved_CFLAGS"
746a987d
AC
9278 esac
9279 done
9280 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9281fi
9282
9283
104c1213 9284
7a292a7a
SS
9285# In the Cygwin environment, we need some additional flags.
9286echo $ac_n "checking for cygwin""... $ac_c" 1>&6
c324d747 9287echo "configure:9288: checking for cygwin" >&5
7a292a7a
SS
9288if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9289 echo $ac_n "(cached) $ac_c" 1>&6
9290else
9291 cat > conftest.$ac_ext <<EOF
c324d747 9292#line 9293 "configure"
7a292a7a
SS
9293#include "confdefs.h"
9294
9295#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9296lose
9297#endif
9298EOF
9299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9300 egrep "lose" >/dev/null 2>&1; then
9301 rm -rf conftest*
9302 gdb_cv_os_cygwin=yes
9303else
9304 rm -rf conftest*
9305 gdb_cv_os_cygwin=no
9306fi
9307rm -f conftest*
9308
9309fi
9310
9311echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9312
aff38e61
AC
9313
9314SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9315case ${host} in
95cbc983
AC
9316 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9317 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9318esac
9319
9320
cd0fc7c3
SS
9321# libreadline needs libuser32.a in a cygwin environment
9322WIN32LIBS=
9323if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9324 WIN32LIBS="-luser32"
9325 case "${target}" in
9326 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9327 ;;
9328 esac
cd0fc7c3 9329fi
c906108c 9330
7a292a7a 9331
3fc11d3e
JM
9332LIBGUI="../libgui/src/libgui.a"
9333GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9334
9335
7a292a7a 9336
3fc11d3e
JM
9337WIN32LDAPP=
9338
9339
9340
9341configdir="unix"
9342
9343GDBTKLIBS=
9344if test "${enable_gdbtk}" = "yes"; then
9345
d1c3b63a
KS
9346 # Gdbtk must have an absolute path to srcdir in order to run
9347 # properly when not installed.
9348 here=`pwd`
9349 cd ${srcdir}
9350 GDBTK_SRC_DIR=`pwd`
9351 cd $here
9352
3fc11d3e
JM
9353
9354#
9355# Ok, lets find the tcl configuration
9356# First, look for one uninstalled.
9357# the alternative search directory is invoked by --with-tclconfig
9358#
9359
9360if test x"${no_tcl}" = x ; then
9361 # we reset no_tcl in case something fails here
9362 no_tcl=true
9363 # Check whether --with-tclconfig or --without-tclconfig was given.
9364if test "${with_tclconfig+set}" = set; then
9365 withval="$with_tclconfig"
9366 with_tclconfig=${withval}
9367fi
9368
9369 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
c324d747 9370echo "configure:9371: checking for Tcl configuration" >&5
3fc11d3e
JM
9371 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9372 echo $ac_n "(cached) $ac_c" 1>&6
9373else
9374
9375
9376 # First check to see if --with-tclconfig was specified.
9377 if test x"${with_tclconfig}" != x ; then
9378 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9379 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9380 else
9381 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9382 fi
9383 fi
9384
9385 # then check for a private Tcl installation
9386 if test x"${ac_cv_c_tclconfig}" = x ; then
9387 for i in \
9388 ../tcl \
9389 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9390 ../../tcl \
9391 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9392 ../../../tcl \
9393 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9394 if test -f "$i/${configdir}/tclConfig.sh" ; then
9395 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9396 break
9397 fi
9398 done
9399 fi
9400 # check in a few common install locations
9401 if test x"${ac_cv_c_tclconfig}" = x ; then
9402 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9403 if test -f "$i/tclConfig.sh" ; then
9404 ac_cv_c_tclconfig=`(cd $i; pwd)`
9405 break
9406 fi
9407 done
9408 fi
9409 # check in a few other private locations
9410 if test x"${ac_cv_c_tclconfig}" = x ; then
9411 for i in \
9412 ${srcdir}/../tcl \
9413 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9414 if test -f "$i/${configdir}/tclConfig.sh" ; then
9415 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9416 break
9417 fi
9418 done
9419 fi
9420
9421fi
9422
9423 if test x"${ac_cv_c_tclconfig}" = x ; then
9424 TCLCONFIG="# no Tcl configs found"
9425 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9426 else
9427 no_tcl=
9428 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9429 echo "$ac_t""found $TCLCONFIG" 1>&6
9430 fi
9431fi
9432
9433 if test -z "${no_tcl}"; then
9434
9435 . $TCLCONFIG
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
033afc63 9456
3fc11d3e
JM
9457
9458
9459
9460
9461
9462
9463#
9464# Ok, lets find the tk configuration
9465# First, look for one uninstalled.
9466# the alternative search directory is invoked by --with-tkconfig
9467#
9468
9469if test x"${no_tk}" = x ; then
9470 # we reset no_tk in case something fails here
9471 no_tk=true
9472 # Check whether --with-tkconfig or --without-tkconfig was given.
9473if test "${with_tkconfig+set}" = set; then
9474 withval="$with_tkconfig"
9475 with_tkconfig=${withval}
9476fi
9477
9478 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
c324d747 9479echo "configure:9480: checking for Tk configuration" >&5
3fc11d3e
JM
9480 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9481 echo $ac_n "(cached) $ac_c" 1>&6
9482else
9483
9484
9485 # First check to see if --with-tkconfig was specified.
9486 if test x"${with_tkconfig}" != x ; then
9487 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9488 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9489 else
9490 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9491 fi
9492 fi
9493
9494 # then check for a private Tk library
9495 if test x"${ac_cv_c_tkconfig}" = x ; then
9496 for i in \
9497 ../tk \
9498 `ls -dr ../tk[4-9]* 2>/dev/null` \
9499 ../../tk \
9500 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9501 ../../../tk \
9502 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9503 if test -f "$i/${configdir}/tkConfig.sh" ; then
9504 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9505 break
9506 fi
9507 done
9508 fi
9509 # check in a few common install locations
9510 if test x"${ac_cv_c_tkconfig}" = x ; then
9511 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9512 if test -f "$i/tkConfig.sh" ; then
9513 ac_cv_c_tkconfig=`(cd $i; pwd)`
9514 break
9515 fi
9516 done
9517 fi
9518 # check in a few other private locations
9519 if test x"${ac_cv_c_tkconfig}" = x ; then
9520 for i in \
9521 ${srcdir}/../tk \
9522 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9523 if test -f "$i/${configdir}/tkConfig.sh" ; then
9524 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9525 break
9526 fi
9527 done
9528 fi
9529
9530fi
9531
9532 if test x"${ac_cv_c_tkconfig}" = x ; then
9533 TKCONFIG="# no Tk configs found"
9534 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9535 else
9536 no_tk=
9537 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9538 echo "$ac_t""found $TKCONFIG" 1>&6
9539 fi
9540fi
9541
9542
9543
dd2504ab
JM
9544 # now look for Tcl library stuff
9545
9546 case "${host}" in
9547 *-*-cygwin*)
9548 tcldir=../tcl/win/
9549 ;;
9550 *)
9551 tcldir=../tcl/unix/
9552 ;;
9553 esac
9554
9555 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9556
3fc11d3e
JM
9557 # If $no_tk is nonempty, then we can't do Tk, and there is no
9558 # point to doing Tcl.
9559 if test -z "${no_tk}"; then
9560
9561 if test -f "$TKCONFIG" ; then
9562 . $TKCONFIG
9563 fi
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578#
9579# Ok, lets find the tcl source trees so we can use the headers
9580# Warning: transition of version 9 to 10 will break this algorithm
9581# because 10 sorts before 9. We also look for just tcl. We have to
9582# be careful that we don't match stuff like tclX by accident.
9583# the alternative search directory is involked by --with-tclinclude
9584#
9585
9586no_tcl=true
9587echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
c324d747 9588echo "configure:9589: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9589# Check whether --with-tclinclude or --without-tclinclude was given.
9590if test "${with_tclinclude+set}" = set; then
9591 withval="$with_tclinclude"
9592 with_tclinclude=${withval}
9593fi
9594
9595if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9596 echo $ac_n "(cached) $ac_c" 1>&6
9597else
9598
9599# first check to see if --with-tclinclude was specified
9600if test x"${with_tclinclude}" != x ; then
9601 if test -f ${with_tclinclude}/tclInt.h ; then
9602 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9603 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9604 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9605 else
9606 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9607 fi
9608fi
9609
9610# next check if it came with Tcl configuration file
9611if test x"${ac_cv_c_tclconfig}" = x ; then
9612 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9613 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9614 fi
9615fi
9616
9617# next check in private source directory
9618#
9619# since ls returns lowest version numbers first, reverse its output
9620if test x"${ac_cv_c_tclh}" = x ; then
9621 for i in \
9622 ${srcdir}/../tcl \
9623 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9624 ${srcdir}/../../tcl \
9625 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9626 ${srcdir}/../../../tcl \
9627 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9628 if test -f $i/generic/tclInt.h ; then
9629 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9630 break
9631 fi
9632 done
9633fi
9634# finally check in a few common install locations
9635#
9636# since ls returns lowest version numbers first, reverse its output
9637if test x"${ac_cv_c_tclh}" = x ; then
9638 for i in \
9639 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9640 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9641 /usr/local/src/tcl \
9642 /usr/local/lib/tcl \
9643 ${prefix}/include ; do
9644 if test -f $i/generic/tclInt.h ; then
9645 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9646 break
9647 fi
9648 done
9649fi
9650# see if one is installed
9651if test x"${ac_cv_c_tclh}" = x ; then
9652 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9653echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
c324d747 9654echo "configure:9655: checking for tclInt.h" >&5
3fc11d3e
JM
9655if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9656 echo $ac_n "(cached) $ac_c" 1>&6
9657else
9658 cat > conftest.$ac_ext <<EOF
c324d747 9659#line 9660 "configure"
3fc11d3e
JM
9660#include "confdefs.h"
9661#include <tclInt.h>
9662EOF
9663ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 9664{ (eval echo configure:9665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9665ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9666if test -z "$ac_err"; then
9667 rm -rf conftest*
9668 eval "ac_cv_header_$ac_safe=yes"
9669else
9670 echo "$ac_err" >&5
9671 echo "configure: failed program was:" >&5
9672 cat conftest.$ac_ext >&5
9673 rm -rf conftest*
9674 eval "ac_cv_header_$ac_safe=no"
9675fi
9676rm -f conftest*
9677fi
9678if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9679 echo "$ac_t""yes" 1>&6
9680 ac_cv_c_tclh=installed
9681else
9682 echo "$ac_t""no" 1>&6
9683ac_cv_c_tclh=""
9684fi
9685
9686fi
9687
9688fi
9689
9690if test x"${ac_cv_c_tclh}" = x ; then
9691 TCLHDIR="# no Tcl private headers found"
9692 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9693fi
9694if test x"${ac_cv_c_tclh}" != x ; then
9695 no_tcl=""
9696 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9697 echo "$ac_t""is installed" 1>&6
9698 TCLHDIR=""
9699 else
9700 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9701 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9702 TCLHDIR="-I${ac_cv_c_tclh}"
9703 fi
9704fi
9705
9706
9707
9708
9709#
9710# Ok, lets find the tk source trees so we can use the headers
9711# If the directory (presumably symlink) named "tk" exists, use that one
9712# in preference to any others. Same logic is used when choosing library
9713# and again with Tcl. The search order is the best place to look first, then in
9714# decreasing significance. The loop breaks if the trigger file is found.
9715# Note the gross little conversion here of srcdir by cd'ing to the found
9716# directory. This converts the path from a relative to an absolute, so
9717# recursive cache variables for the path will work right. We check all
9718# the possible paths in one loop rather than many seperate loops to speed
9719# things up.
9720# the alternative search directory is involked by --with-tkinclude
9721#
9722no_tk=true
9723echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
c324d747 9724echo "configure:9725: checking for Tk private headers" >&5
3fc11d3e
JM
9725# Check whether --with-tkinclude or --without-tkinclude was given.
9726if test "${with_tkinclude+set}" = set; then
9727 withval="$with_tkinclude"
9728 with_tkinclude=${withval}
9729fi
9730
9731if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9732 echo $ac_n "(cached) $ac_c" 1>&6
9733else
9734
9735# first check to see if --with-tkinclude was specified
9736if test x"${with_tkinclude}" != x ; then
9737 if test -f ${with_tkinclude}/tk.h ; then
9738 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9739 elif test -f ${with_tkinclude}/generic/tk.h ; then
9740 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9741 else
9742 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9743 fi
9744fi
9745
9746# next check if it came with Tk configuration file
9747if test x"${ac_cv_c_tkconfig}" = x ; then
9748 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9749 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9750 fi
9751fi
9752
9753# next check in private source directory
9754#
9755# since ls returns lowest version numbers first, reverse its output
9756if test x"${ac_cv_c_tkh}" = x ; then
9757 for i in \
9758 ${srcdir}/../tk \
9759 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9760 ${srcdir}/../../tk \
9761 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9762 ${srcdir}/../../../tk \
9763 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9764 if test -f $i/generic/tk.h ; then
9765 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9766 break
9767 fi
9768 done
9769fi
9770# finally check in a few common install locations
9771#
9772# since ls returns lowest version numbers first, reverse its output
9773if test x"${ac_cv_c_tkh}" = x ; then
9774 for i in \
9775 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9776 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9777 /usr/local/src/tk \
9778 /usr/local/lib/tk \
9779 ${prefix}/include ; do
9780 if test -f $i/generic/tk.h ; then
9781 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9782 break
9783 fi
9784 done
9785fi
9786# see if one is installed
9787if test x"${ac_cv_c_tkh}" = x ; then
9788 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9789echo $ac_n "checking for tk.h""... $ac_c" 1>&6
c324d747 9790echo "configure:9791: checking for tk.h" >&5
3fc11d3e
JM
9791if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9792 echo $ac_n "(cached) $ac_c" 1>&6
9793else
9794 cat > conftest.$ac_ext <<EOF
c324d747 9795#line 9796 "configure"
3fc11d3e
JM
9796#include "confdefs.h"
9797#include <tk.h>
9798EOF
9799ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 9800{ (eval echo configure:9801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9801ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9802if test -z "$ac_err"; then
9803 rm -rf conftest*
9804 eval "ac_cv_header_$ac_safe=yes"
9805else
9806 echo "$ac_err" >&5
9807 echo "configure: failed program was:" >&5
9808 cat conftest.$ac_ext >&5
9809 rm -rf conftest*
9810 eval "ac_cv_header_$ac_safe=no"
9811fi
9812rm -f conftest*
9813fi
9814if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9815 echo "$ac_t""yes" 1>&6
9816 ac_cv_c_tkh=installed
9817else
9818 echo "$ac_t""no" 1>&6
9819ac_cv_c_tkh=""
9820fi
9821
9822fi
9823
9824fi
9825
9826if test x"${ac_cv_c_tkh}" != x ; then
9827 no_tk=""
9828 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9829 echo "$ac_t""is installed" 1>&6
9830 TKHDIR=""
9831 else
9832 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9833 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9834 TKHDIR="-I${ac_cv_c_tkh}"
9835 fi
9836else
9837 TKHDIR="# no Tk directory found"
9838 echo "configure: warning: Can't find Tk private headers" 1>&2
9839 no_tk=true
9840fi
9841
9842
9843
9844
9845echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
c324d747 9846echo "configure:9847: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9847if test x"${ac_cv_c_itclh}" = x ; then
9848 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9849 if test -f $i/generic/itcl.h ; then
9850 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9851 break
9852 fi
9853 done
9854fi
9855if test x"${ac_cv_c_itclh}" = x ; then
9856 ITCLHDIR="# no Itcl private headers found"
9857 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9858fi
9859if test x"${ac_cv_c_itclh}" != x ; then
9860 ITCLHDIR="-I${ac_cv_c_itclh}"
9861fi
9862# should always be here
9863# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9864
9865#AC_SUBST(ITCLLIB)
9866
9867
9868echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
c324d747 9869echo "configure:9870: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9870if test x"${ac_cv_c_itkh}" = x ; then
9871 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9872 if test -f $i/generic/itk.h ; then
9873 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9874 break
9875 fi
9876 done
9877fi
9878if test x"${ac_cv_c_itkh}" = x ; then
9879 ITKHDIR="# no Itk private headers found"
9880 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9881fi
9882if test x"${ac_cv_c_itkh}" != x ; then
9883 ITKHDIR="-I${ac_cv_c_itkh}"
9884fi
9885# should always be here
9886# ITKLIB="../itcl/itk/unix/libitk.a"
9887
9888#AC_SUBST(ITKLIB)
9889
3fc11d3e 9890
dd2504ab
JM
9891
9892 # now look for Tk library stuff
9893
9894 case "${host}" in
9895 *-*-cygwin*)
9896 tkdir=../tk/win/
9897 ;;
9898 *)
9899 tkdir=../tk/unix/
9900 ;;
9901 esac
9902
9903 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9904
3fc11d3e
JM
9905 # now look for Itcl library stuff
9906
9907
9908#
9909# Ok, lets find the itcl configuration
9910# First, look for one uninstalled.
9911# the alternative search directory is invoked by --with-itclconfig
9912#
9913
9914if test x"${no_itcl}" = x ; then
9915 # we reset no_itcl in case something fails here
9916 no_itcl=true
9917 # Check whether --with-itclconfig or --without-itclconfig was given.
9918if test "${with_itclconfig+set}" = set; then
9919 withval="$with_itclconfig"
9920 with_itclconfig=${withval}
9921fi
9922
9923 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
c324d747 9924echo "configure:9925: checking for Itcl configuration" >&5
3fc11d3e
JM
9925 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9926 echo $ac_n "(cached) $ac_c" 1>&6
9927else
9928
9929
9930 # First check to see if --with-itclconfig was specified.
9931 if test x"${with_itclconfig}" != x ; then
9932 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9933 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9934 else
9935 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9936 fi
9937 fi
9938
9939 # then check for a private Itcl library
9940 if test x"${ac_cv_c_itclconfig}" = x ; then
9941 for i in \
9942 ../itcl/itcl \
9943 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9944 ../../itcl \
9945 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9946 ../../../itcl \
9947 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9948 if test -f "$i/itclConfig.sh" ; then
9949 ac_cv_c_itclconfig=`(cd $i; pwd)`
9950 break
9951 fi
9952 done
9953 fi
9954 # check in a few common install locations
9955 if test x"${ac_cv_c_itclconfig}" = x ; then
9956 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9957 if test -f "$i/itclConfig.sh" ; then
9958 ac_cv_c_itclconfig=`(cd $i; pwd)`
9959 break
9960 fi
9961 done
9962 fi
9963 # check in a few other private locations
9964 if test x"${ac_cv_c_itclconfig}" = x ; then
9965 for i in \
9966 ${srcdir}/../itcl/itcl \
9967 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9968 if test -f "$i/itclConfig.sh" ; then
9969 ac_cv_c_itclconfig=`(cd $i; pwd)`
9970 break
9971 fi
9972 done
9973 fi
9974
9975fi
9976
9977 if test x"${ac_cv_c_itclconfig}" = x ; then
9978 ITCLCONFIG="# no Itcl configs found"
9979 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9980 else
9981 no_itcl=
9982 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9983 echo "$ac_t""found $ITCLCONFIG" 1>&6
9984 fi
9985fi
9986
9987 if test -z "${no_itcl}"; then
9988
9989 if test -f "$ITCLCONFIG" ; then
9990 . $ITCLCONFIG
9991 fi
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
3fc11d3e
JM
10002
10003
10004 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10005 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10006 fi
10007
10008
10009 # now look for Itk library stuff
10010
10011#
10012# Ok, lets find the itk configuration
10013# First, look for one uninstalled.
10014# the alternative search directory is invoked by --with-itkconfig
10015#
10016
10017if test x"${no_itk}" = x ; then
10018 # we reset no_itk in case something fails here
10019 no_itk=true
10020 # Check whether --with-itkconfig or --without-itkconfig was given.
10021if test "${with_itkconfig+set}" = set; then
10022 withval="$with_itkconfig"
10023 with_itkconfig=${withval}
10024fi
10025
10026 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
c324d747 10027echo "configure:10028: checking for Itk configuration" >&5
3fc11d3e
JM
10028 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10029 echo $ac_n "(cached) $ac_c" 1>&6
10030else
10031
10032
10033 # First check to see if --with-itkconfig was specified.
10034 if test x"${with_itkconfig}" != x ; then
10035 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10036 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10037 else
10038 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10039 fi
10040 fi
10041
10042 # then check for a private Itk library
10043 if test x"${ac_cv_c_itkconfig}" = x ; then
10044 for i in \
10045 ../itcl/itk \
10046 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10047 ../../itk \
10048 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10049 ../../../itk \
10050 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10051 if test -f "$i/itkConfig.sh" ; then
10052 ac_cv_c_itkconfig=`(cd $i; pwd)`
10053 break
10054 fi
10055 done
10056 fi
10057 # check in a few common install locations
10058 if test x"${ac_cv_c_itkconfig}" = x ; then
10059 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10060 if test -f "$i/itkConfig.sh" ; then
10061 ac_cv_c_itkconfig=`(cd $i; pwd)`
10062 break
10063 fi
10064 done
10065 fi
10066 # check in a few other private locations
10067 if test x"${ac_cv_c_itkconfig}" = x ; then
10068 for i in \
10069 ${srcdir}/../itcl/itk \
10070 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10071 if test -f "$i/itkConfig.sh" ; then
10072 ac_cv_c_itkconfig=`(cd $i; pwd)`
10073 break
10074 fi
10075 done
10076 fi
10077
10078fi
10079
10080 if test x"${ac_cv_c_itkconfig}" = x ; then
10081 ITKCONFIG="# no Itk configs found"
10082 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10083 else
10084 no_itk=
10085 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10086 echo "$ac_t""found $ITKCONFIG" 1>&6
10087 fi
10088fi
10089
10090
10091 if test -z "${no_itcl}"; then
10092
10093 if test -f "$ITKCONFIG" ; then
10094 . $ITKCONFIG
10095 fi
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
3fc11d3e 10108 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10109 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10110 fi
10111
4226a5a5 10112 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10113 # Tcl/Tk 8.1 require -fwritable strings. I don't
10114 # know whether 8.2 will or not, but I bet it will.
10115 # I don't have to worry about 7.x since we don't support it.
10116 GDBTK_CFLAGS=""
10117 if test "$GCC" = "yes"; then
10118 if test "$TCL_VERSION" != "8.0" ; then
10119 GDBTK_CFLAGS="-fwritable-strings"
10120 fi
10121 fi
10122
10123 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10124 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10125 # Yes, the ordering seems wrong here. But it isn't.
10126 # TK_LIBS is the list of libraries that need to be linked
10127 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10128 # were in LIBS then any link tests after this point would
10129 # try to include things like `$(LIBGUI)', which wouldn't work.
10130 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10131
10132 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10133 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10134 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10135 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10136 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10137 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10138 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10139
10140 if test x$gdb_cv_os_cygwin = xyes; then
10141 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10142 WIN32LDAPP="-Wl,--subsystem,console"
10143 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10144 fi
10145 fi
10146 fi
ffc6a242 10147
ffc6a242 10148 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10149fi
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
dd2504ab 10163
c906108c
SS
10164# If we find X, set shell vars x_includes and x_libraries to the
10165# paths, otherwise set no_x=yes.
10166# Uses ac_ vars as temps to allow command line to override cache and checks.
10167# --without-x overrides everything else, but does not touch the cache.
10168echo $ac_n "checking for X""... $ac_c" 1>&6
c324d747 10169echo "configure:10170: checking for X" >&5
c906108c
SS
10170
10171# Check whether --with-x or --without-x was given.
10172if test "${with_x+set}" = set; then
10173 withval="$with_x"
10174 :
10175fi
10176
10177# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10178if test "x$with_x" = xno; then
10179 # The user explicitly disabled X.
10180 have_x=disabled
10181else
10182 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10183 # Both variables are already set.
10184 have_x=yes
10185 else
10186if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10187 echo $ac_n "(cached) $ac_c" 1>&6
10188else
10189 # One or both of the vars are not set, and there is no cached value.
10190ac_x_includes=NO ac_x_libraries=NO
10191rm -fr conftestdir
10192if mkdir conftestdir; then
10193 cd conftestdir
10194 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10195 cat > Imakefile <<'EOF'
10196acfindx:
10197 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10198EOF
10199 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10200 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10201 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10202 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10203 for ac_extension in a so sl; do
10204 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10205 test -f $ac_im_libdir/libX11.$ac_extension; then
10206 ac_im_usrlibdir=$ac_im_libdir; break
10207 fi
10208 done
10209 # Screen out bogus values from the imake configuration. They are
10210 # bogus both because they are the default anyway, and because
10211 # using them would break gcc on systems where it needs fixed includes.
10212 case "$ac_im_incroot" in
10213 /usr/include) ;;
10214 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10215 esac
10216 case "$ac_im_usrlibdir" in
10217 /usr/lib | /lib) ;;
10218 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10219 esac
10220 fi
10221 cd ..
10222 rm -fr conftestdir
10223fi
10224
10225if test "$ac_x_includes" = NO; then
10226 # Guess where to find include files, by looking for this one X11 .h file.
10227 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10228
10229 # First, try using that file with no special directory specified.
10230cat > conftest.$ac_ext <<EOF
c324d747 10231#line 10232 "configure"
c906108c
SS
10232#include "confdefs.h"
10233#include <$x_direct_test_include>
10234EOF
10235ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c324d747 10236{ (eval echo configure:10237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10237ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10238if test -z "$ac_err"; then
10239 rm -rf conftest*
10240 # We can compile using X headers with no special include directory.
10241ac_x_includes=
10242else
10243 echo "$ac_err" >&5
10244 echo "configure: failed program was:" >&5
10245 cat conftest.$ac_ext >&5
10246 rm -rf conftest*
10247 # Look for the header file in a standard set of common directories.
10248# Check X11 before X11Rn because it is often a symlink to the current release.
10249 for ac_dir in \
10250 /usr/X11/include \
10251 /usr/X11R6/include \
10252 /usr/X11R5/include \
10253 /usr/X11R4/include \
10254 \
10255 /usr/include/X11 \
10256 /usr/include/X11R6 \
10257 /usr/include/X11R5 \
10258 /usr/include/X11R4 \
10259 \
10260 /usr/local/X11/include \
10261 /usr/local/X11R6/include \
10262 /usr/local/X11R5/include \
10263 /usr/local/X11R4/include \
10264 \
10265 /usr/local/include/X11 \
10266 /usr/local/include/X11R6 \
10267 /usr/local/include/X11R5 \
10268 /usr/local/include/X11R4 \
10269 \
10270 /usr/X386/include \
10271 /usr/x386/include \
10272 /usr/XFree86/include/X11 \
10273 \
10274 /usr/include \
10275 /usr/local/include \
10276 /usr/unsupported/include \
10277 /usr/athena/include \
10278 /usr/local/x11r5/include \
10279 /usr/lpp/Xamples/include \
10280 \
10281 /usr/openwin/include \
10282 /usr/openwin/share/include \
10283 ; \
10284 do
10285 if test -r "$ac_dir/$x_direct_test_include"; then
10286 ac_x_includes=$ac_dir
10287 break
10288 fi
10289 done
10290fi
10291rm -f conftest*
10292fi # $ac_x_includes = NO
10293
10294if test "$ac_x_libraries" = NO; then
10295 # Check for the libraries.
10296
10297 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10298 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10299
10300 # See if we find them without any special options.
10301 # Don't add to $LIBS permanently.
10302 ac_save_LIBS="$LIBS"
10303 LIBS="-l$x_direct_test_library $LIBS"
10304cat > conftest.$ac_ext <<EOF
c324d747 10305#line 10306 "configure"
c906108c
SS
10306#include "confdefs.h"
10307
10308int main() {
10309${x_direct_test_function}()
10310; return 0; }
10311EOF
c324d747 10312if { (eval echo configure:10313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10313 rm -rf conftest*
10314 LIBS="$ac_save_LIBS"
10315# We can link X programs with no special library path.
10316ac_x_libraries=
10317else
10318 echo "configure: failed program was:" >&5
10319 cat conftest.$ac_ext >&5
10320 rm -rf conftest*
10321 LIBS="$ac_save_LIBS"
10322# First see if replacing the include by lib works.
10323# Check X11 before X11Rn because it is often a symlink to the current release.
10324for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10325 /usr/X11/lib \
10326 /usr/X11R6/lib \
10327 /usr/X11R5/lib \
10328 /usr/X11R4/lib \
10329 \
10330 /usr/lib/X11 \
10331 /usr/lib/X11R6 \
10332 /usr/lib/X11R5 \
10333 /usr/lib/X11R4 \
10334 \
10335 /usr/local/X11/lib \
10336 /usr/local/X11R6/lib \
10337 /usr/local/X11R5/lib \
10338 /usr/local/X11R4/lib \
10339 \
10340 /usr/local/lib/X11 \
10341 /usr/local/lib/X11R6 \
10342 /usr/local/lib/X11R5 \
10343 /usr/local/lib/X11R4 \
10344 \
10345 /usr/X386/lib \
10346 /usr/x386/lib \
10347 /usr/XFree86/lib/X11 \
10348 \
10349 /usr/lib \
10350 /usr/local/lib \
10351 /usr/unsupported/lib \
10352 /usr/athena/lib \
10353 /usr/local/x11r5/lib \
10354 /usr/lpp/Xamples/lib \
10355 /lib/usr/lib/X11 \
10356 \
10357 /usr/openwin/lib \
10358 /usr/openwin/share/lib \
10359 ; \
10360do
10361 for ac_extension in a so sl; do
10362 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10363 ac_x_libraries=$ac_dir
10364 break 2
10365 fi
10366 done
10367done
10368fi
10369rm -f conftest*
10370fi # $ac_x_libraries = NO
10371
10372if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10373 # Didn't find X anywhere. Cache the known absence of X.
10374 ac_cv_have_x="have_x=no"
10375else
10376 # Record where we found X for the cache.
10377 ac_cv_have_x="have_x=yes \
10378 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10379fi
10380fi
10381 fi
10382 eval "$ac_cv_have_x"
10383fi # $with_x != no
10384
10385if test "$have_x" != yes; then
10386 echo "$ac_t""$have_x" 1>&6
10387 no_x=yes
10388else
10389 # If each of the values was on the command line, it overrides each guess.
10390 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10391 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10392 # Update the cache value to reflect the command line values.
10393 ac_cv_have_x="have_x=yes \
10394 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10395 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10396fi
10397
10398
7a292a7a
SS
10399
10400# Unlike the sim directory, whether a simulator is linked is controlled by
10401# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10402# This code just checks for a few cases where we'd like to ignore those
10403# definitions, even when they're present in the '.mt' file. These cases
10404# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10405# not part of the source tree.
7a292a7a
SS
10406#
10407# Check whether --enable-sim or --disable-sim was given.
10408if test "${enable_sim+set}" = set; then
10409 enableval="$enable_sim"
10410 echo "enable_sim = $enable_sim";
10411 echo "enableval = ${enableval}";
10412 case "${enableval}" in
10413 yes) ignore_sim=false ;;
10414 no) ignore_sim=true ;;
10415 *) ignore_sim=false ;;
10416 esac
10417else
10418 ignore_sim=false
10419fi
10420
10421
10422if test ! -d "${srcdir}/../sim"; then
10423 ignore_sim=true
10424fi
10425
10426if test "${ignore_sim}" = "true"; then
10427 IGNORE_SIM="SIM="
10428 IGNORE_SIM_OBS="SIM_OBS="
10429else
10430 IGNORE_SIM=""
10431 IGNORE_SIM_OBS=""
10432 cat >> confdefs.h <<\EOF
10433#define WITH_SIM 1
10434EOF
10435
10436fi
10437
10438
10439
c906108c
SS
10440
10441
10442
10443
10444
10445
dfcd3bfb 10446
e56ac5c3
AC
10447
10448
b3a90332
AC
10449
10450
c906108c
SS
10451# target_subdir is used by the testsuite to find the target libraries.
10452target_subdir=
10453if test "${host}" != "${target}"; then
10454 target_subdir="${target_alias}/"
10455fi
10456
10457
10458frags=
10459host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10460if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10461 # When building a native debuger the .mh file containing things
10462 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10463 # since it no longer contains anything useful.
10464 if test "${target}" = "${host}"; then
10465 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10466 else
10467 host_makefile_frag=/dev/null
10468 fi
c906108c
SS
10469fi
10470frags="$frags $host_makefile_frag"
10471
10472target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10473if test ! -f ${target_makefile_frag}; then
10474{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10475fi
10476frags="$frags $target_makefile_frag"
10477
10478
10479
10480
10481
10482hostfile=`sed -n '
10483s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10484' ${host_makefile_frag}`
10485
10486targetfile=`sed -n '
10487s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10488' ${target_makefile_frag}`
10489
c906108c 10490if test "${target}" = "${host}"; then
a85f51e7
DJ
10491# We pick this up from the host configuration file (.mh) because we
10492# do not have a native configuration Makefile fragment.
c906108c
SS
10493nativefile=`sed -n '
10494s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10495' ${host_makefile_frag}`
c906108c
SS
10496fi
10497
10498
b00a8037
DJ
10499if test x"${gdb_osabi}" != x ; then
10500 cat >> confdefs.h <<EOF
10501#define GDB_OSABI_DEFAULT $gdb_osabi
10502EOF
10503
10504fi
10505
8dcde887
MK
10506# Enable multi-ice-gdb-server.
10507# Check whether --enable-multi-ice or --disable-multi-ice was given.
10508if test "${enable_multi_ice+set}" = set; then
10509 enableval="$enable_multi_ice"
10510 case $enableval in
10511 yes | no)
10512 ;;
10513 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10514 esac
96baa820
JM
10515fi
10516
8dcde887
MK
10517if test "x$enable_multi_ice" = xyes; then
10518 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10519fi
10520
8dcde887
MK
10521# We only build gdbserver automatically if host and target are the same.
10522if test "x$target" = "x$host"; then
10523 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
c324d747 10524echo "configure:10525: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10525 if test "x$build_gdbserver" = xyes; then
10526 configdirs="$configdirs gdbserver"
10527 echo "$ac_t""yes" 1>&6
10528 else
10529 echo "$ac_t""no" 1>&6
10530 fi
10531fi
10532
10533subdirs="doc testsuite $configdirs"
10534
96baa820 10535
c906108c 10536# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10537# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10538# version.
c906108c
SS
10539
10540files=
10541links=
5a2402b8 10542
c906108c 10543rm -f xm.h
5a2402b8 10544xm_h=""
c906108c 10545if test "${hostfile}" != ""; then
5a2402b8
AC
10546 xm_h=xm.h
10547 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10548 files="${files} ${GDB_XM_FILE}"
10549 links="${links} xm.h"
10550 cat >> confdefs.h <<EOF
10551#define GDB_XM_FILE ${GDB_XM_FILE}
10552EOF
10553
c906108c 10554fi
5a2402b8
AC
10555
10556
c906108c 10557rm -f tm.h
5a2402b8 10558tm_h=""
c906108c 10559if test "${targetfile}" != ""; then
5a2402b8
AC
10560 tm_h=tm.h
10561 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10562 files="${files} ${GDB_TM_FILE}"
10563 links="${links} tm.h"
10564 cat >> confdefs.h <<EOF
10565#define GDB_TM_FILE ${GDB_TM_FILE}
10566EOF
10567
c906108c 10568fi
5a2402b8
AC
10569
10570
c906108c 10571rm -f nm.h
5a2402b8 10572nm_h=""
c906108c 10573if test "${nativefile}" != ""; then
5a2402b8
AC
10574 nm_h=nm.h
10575 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10576 files="${files} ${GDB_NM_FILE}"
10577 links="${links} nm.h"
10578 cat >> confdefs.h <<EOF
10579#define GDB_NM_FILE ${GDB_NM_FILE}
10580EOF
10581
c906108c 10582fi
5a2402b8
AC
10583
10584
c906108c
SS
10585
10586
10587echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
c324d747 10588echo "configure:10589: checking for Cygwin environment" >&5
c906108c
SS
10589if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10590 echo $ac_n "(cached) $ac_c" 1>&6
10591else
10592 cat > conftest.$ac_ext <<EOF
c324d747 10593#line 10594 "configure"
c906108c
SS
10594#include "confdefs.h"
10595
10596int main() {
10597
10598#ifndef __CYGWIN__
10599#define __CYGWIN__ __CYGWIN32__
10600#endif
10601return __CYGWIN__;
10602; return 0; }
10603EOF
c324d747 10604if { (eval echo configure:10605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10605 rm -rf conftest*
10606 ac_cv_cygwin=yes
10607else
10608 echo "configure: failed program was:" >&5
10609 cat conftest.$ac_ext >&5
10610 rm -rf conftest*
10611 ac_cv_cygwin=no
10612fi
10613rm -f conftest*
10614rm -f conftest*
10615fi
10616
10617echo "$ac_t""$ac_cv_cygwin" 1>&6
10618CYGWIN=
10619test "$ac_cv_cygwin" = yes && CYGWIN=yes
10620echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
c324d747 10621echo "configure:10622: checking for mingw32 environment" >&5
c906108c
SS
10622if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10623 echo $ac_n "(cached) $ac_c" 1>&6
10624else
10625 cat > conftest.$ac_ext <<EOF
c324d747 10626#line 10627 "configure"
c906108c
SS
10627#include "confdefs.h"
10628
10629int main() {
10630return __MINGW32__;
10631; return 0; }
10632EOF
c324d747 10633if { (eval echo configure:10634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10634 rm -rf conftest*
10635 ac_cv_mingw32=yes
10636else
10637 echo "configure: failed program was:" >&5
10638 cat conftest.$ac_ext >&5
10639 rm -rf conftest*
10640 ac_cv_mingw32=no
10641fi
10642rm -f conftest*
10643rm -f conftest*
10644fi
10645
10646echo "$ac_t""$ac_cv_mingw32" 1>&6
10647MINGW32=
10648test "$ac_cv_mingw32" = yes && MINGW32=yes
10649
10650
10651echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
c324d747 10652echo "configure:10653: checking for executable suffix" >&5
c906108c
SS
10653if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10654 echo $ac_n "(cached) $ac_c" 1>&6
10655else
10656 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10657 ac_cv_exeext=.exe
10658else
10659 rm -f conftest*
10660 echo 'int main () { return 0; }' > conftest.$ac_ext
10661 ac_cv_exeext=
c324d747 10662 if { (eval echo configure:10663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10663 for file in conftest.*; do
10664 case $file in
d836ee13 10665 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10666 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10667 esac
10668 done
10669 else
10670 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10671 fi
10672 rm -f conftest*
10673 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10674fi
10675fi
10676
10677EXEEXT=""
10678test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10679echo "$ac_t""${ac_cv_exeext}" 1>&6
10680ac_exeext=$EXEEXT
10681
10682
234b45d4
KB
10683
10684cat >> confdefs.h <<\EOF
10685#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10686EOF
10687
10688
10689
10690
10691 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10692if test "${with_libiconv_prefix+set}" = set; then
10693 withval="$with_libiconv_prefix"
10694
10695 for dir in `echo "$withval" | tr : ' '`; do
10696 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10697 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10698 done
10699
10700fi
10701
10702
10703 echo $ac_n "checking for iconv""... $ac_c" 1>&6
c324d747 10704echo "configure:10705: checking for iconv" >&5
234b45d4
KB
10705if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10706 echo $ac_n "(cached) $ac_c" 1>&6
10707else
10708
10709 am_cv_func_iconv="no, consider installing GNU libiconv"
10710 am_cv_lib_iconv=no
10711 cat > conftest.$ac_ext <<EOF
c324d747 10712#line 10713 "configure"
234b45d4
KB
10713#include "confdefs.h"
10714#include <stdlib.h>
10715#include <iconv.h>
10716int main() {
10717iconv_t cd = iconv_open("","");
10718 iconv(cd,NULL,NULL,NULL,NULL);
10719 iconv_close(cd);
10720; return 0; }
10721EOF
c324d747 10722if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10723 rm -rf conftest*
10724 am_cv_func_iconv=yes
10725else
10726 echo "configure: failed program was:" >&5
10727 cat conftest.$ac_ext >&5
10728fi
10729rm -f conftest*
10730 if test "$am_cv_func_iconv" != yes; then
10731 am_save_LIBS="$LIBS"
10732 LIBS="$LIBS -liconv"
10733 cat > conftest.$ac_ext <<EOF
c324d747 10734#line 10735 "configure"
234b45d4
KB
10735#include "confdefs.h"
10736#include <stdlib.h>
10737#include <iconv.h>
10738int main() {
10739iconv_t cd = iconv_open("","");
10740 iconv(cd,NULL,NULL,NULL,NULL);
10741 iconv_close(cd);
10742; return 0; }
10743EOF
c324d747 10744if { (eval echo configure:10745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10745 rm -rf conftest*
10746 am_cv_lib_iconv=yes
10747 am_cv_func_iconv=yes
10748else
10749 echo "configure: failed program was:" >&5
10750 cat conftest.$ac_ext >&5
10751fi
10752rm -f conftest*
10753 LIBS="$am_save_LIBS"
10754 fi
10755
10756fi
10757
10758echo "$ac_t""$am_cv_func_iconv" 1>&6
10759 if test "$am_cv_func_iconv" = yes; then
10760 cat >> confdefs.h <<\EOF
10761#define HAVE_ICONV 1
10762EOF
10763
10764 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
c324d747 10765echo "configure:10766: checking for iconv declaration" >&5
234b45d4
KB
10766 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10767 echo $ac_n "(cached) $ac_c" 1>&6
10768else
10769
10770 cat > conftest.$ac_ext <<EOF
c324d747 10771#line 10772 "configure"
234b45d4
KB
10772#include "confdefs.h"
10773
10774#include <stdlib.h>
10775#include <iconv.h>
10776extern
10777#ifdef __cplusplus
10778"C"
10779#endif
10780#if defined(__STDC__) || defined(__cplusplus)
10781size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10782#else
10783size_t iconv();
10784#endif
10785
10786int main() {
10787
10788; return 0; }
10789EOF
c324d747 10790if { (eval echo configure:10791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10791 rm -rf conftest*
10792 am_cv_proto_iconv_arg1=""
10793else
10794 echo "configure: failed program was:" >&5
10795 cat conftest.$ac_ext >&5
10796 rm -rf conftest*
10797 am_cv_proto_iconv_arg1="const"
10798fi
10799rm -f conftest*
10800 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);"
10801fi
10802
10803 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10804 echo "$ac_t""${ac_t:-
10805 }$am_cv_proto_iconv" 1>&6
10806 cat >> confdefs.h <<EOF
10807#define ICONV_CONST $am_cv_proto_iconv_arg1
10808EOF
10809
10810 fi
10811 LIBICONV=
10812 if test "$am_cv_lib_iconv" = yes; then
10813 LIBICONV="-liconv"
10814 fi
10815
10816
10817
c906108c
SS
10818trap '' 1 2 15
10819cat > confcache <<\EOF
10820# This file is a shell script that caches the results of configure
10821# tests run on this system so they can be shared between configure
10822# scripts and configure runs. It is not useful on other systems.
10823# If it contains results you don't want to keep, you may remove or edit it.
10824#
10825# By default, configure uses ./config.cache as the cache file,
10826# creating it if it does not exist already. You can give configure
10827# the --cache-file=FILE option to use a different cache file; that is
10828# what configure does when it calls configure scripts in
10829# subdirectories, so they share the cache.
10830# Giving --cache-file=/dev/null disables caching, for debugging configure.
10831# config.status only pays attention to the cache file if you give it the
10832# --recheck option to rerun configure.
10833#
10834EOF
10835# The following way of writing the cache mishandles newlines in values,
10836# but we know of no workaround that is simple, portable, and efficient.
10837# So, don't put newlines in cache variables' values.
10838# Ultrix sh set writes to stderr and can't be redirected directly,
10839# and sets the high bit in the cache file unless we assign to the vars.
10840(set) 2>&1 |
10841 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10842 *ac_space=\ *)
10843 # `set' does not quote correctly, so add quotes (double-quote substitution
10844 # turns \\\\ into \\, and sed turns \\ into \).
10845 sed -n \
10846 -e "s/'/'\\\\''/g" \
10847 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10848 ;;
10849 *)
10850 # `set' quotes correctly as required by POSIX, so do not add quotes.
10851 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10852 ;;
10853 esac >> confcache
10854if cmp -s $cache_file confcache; then
10855 :
10856else
10857 if test -w $cache_file; then
10858 echo "updating cache $cache_file"
10859 cat confcache > $cache_file
10860 else
10861 echo "not updating unwritable cache $cache_file"
10862 fi
10863fi
10864rm -f confcache
10865
10866trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10867
10868test "x$prefix" = xNONE && prefix=$ac_default_prefix
10869# Let make expand exec_prefix.
10870test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10871
10872# Any assignment to VPATH causes Sun make to only execute
10873# the first set of double-colon rules, so remove it if not needed.
10874# If there is a colon in the path, we need to keep it.
10875if test "x$srcdir" = x.; then
10876 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10877fi
10878
10879trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10880
10881DEFS=-DHAVE_CONFIG_H
10882
10883# Without the "./", some shells look in PATH for config.status.
10884: ${CONFIG_STATUS=./config.status}
10885
10886echo creating $CONFIG_STATUS
10887rm -f $CONFIG_STATUS
10888cat > $CONFIG_STATUS <<EOF
10889#! /bin/sh
10890# Generated automatically by configure.
10891# Run this file to recreate the current configuration.
10892# This directory was configured as follows,
10893# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10894#
10895# $0 $ac_configure_args
10896#
10897# Compiler output produced by configure, useful for debugging
10898# configure, is in ./config.log if it exists.
10899
10900ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10901for ac_option
10902do
10903 case "\$ac_option" in
10904 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10905 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10906 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10907 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10908 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10909 exit 0 ;;
10910 -help | --help | --hel | --he | --h)
10911 echo "\$ac_cs_usage"; exit 0 ;;
10912 *) echo "\$ac_cs_usage"; exit 1 ;;
10913 esac
10914done
10915
10916ac_given_srcdir=$srcdir
10917ac_given_INSTALL="$INSTALL"
10918
ed952ac5 10919trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10920EOF
10921cat >> $CONFIG_STATUS <<EOF
10922
10923# Protect against being on the right side of a sed subst in config.status.
10924sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10925 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10926$ac_vpsub
10927$extrasub
10928s%@SHELL@%$SHELL%g
10929s%@CFLAGS@%$CFLAGS%g
10930s%@CPPFLAGS@%$CPPFLAGS%g
10931s%@CXXFLAGS@%$CXXFLAGS%g
10932s%@FFLAGS@%$FFLAGS%g
10933s%@DEFS@%$DEFS%g
10934s%@LDFLAGS@%$LDFLAGS%g
10935s%@LIBS@%$LIBS%g
10936s%@exec_prefix@%$exec_prefix%g
10937s%@prefix@%$prefix%g
10938s%@program_transform_name@%$program_transform_name%g
10939s%@bindir@%$bindir%g
10940s%@sbindir@%$sbindir%g
10941s%@libexecdir@%$libexecdir%g
10942s%@datadir@%$datadir%g
10943s%@sysconfdir@%$sysconfdir%g
10944s%@sharedstatedir@%$sharedstatedir%g
10945s%@localstatedir@%$localstatedir%g
10946s%@libdir@%$libdir%g
10947s%@includedir@%$includedir%g
10948s%@oldincludedir@%$oldincludedir%g
10949s%@infodir@%$infodir%g
10950s%@mandir@%$mandir%g
413ccac7
AC
10951s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10952s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10953s%@MAINT@%$MAINT%g
c906108c
SS
10954s%@CC@%$CC%g
10955s%@CPP@%$CPP%g
10956s%@host@%$host%g
10957s%@host_alias@%$host_alias%g
10958s%@host_cpu@%$host_cpu%g
10959s%@host_vendor@%$host_vendor%g
10960s%@host_os@%$host_os%g
10961s%@target@%$target%g
10962s%@target_alias@%$target_alias%g
10963s%@target_cpu@%$target_cpu%g
10964s%@target_vendor@%$target_vendor%g
10965s%@target_os@%$target_os%g
10966s%@build@%$build%g
10967s%@build_alias@%$build_alias%g
10968s%@build_cpu@%$build_cpu%g
10969s%@build_vendor@%$build_vendor%g
10970s%@build_os@%$build_os%g
c906108c 10971s%@RANLIB@%$RANLIB%g
8bb2c122 10972s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10973s%@ALLOCA@%$ALLOCA%g
10974s%@USE_NLS@%$USE_NLS%g
10975s%@MSGFMT@%$MSGFMT%g
10976s%@GMSGFMT@%$GMSGFMT%g
10977s%@XGETTEXT@%$XGETTEXT%g
10978s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10979s%@CATALOGS@%$CATALOGS%g
10980s%@CATOBJEXT@%$CATOBJEXT%g
10981s%@DATADIRNAME@%$DATADIRNAME%g
10982s%@GMOFILES@%$GMOFILES%g
10983s%@INSTOBJEXT@%$INSTOBJEXT%g
10984s%@INTLDEPS@%$INTLDEPS%g
10985s%@INTLLIBS@%$INTLLIBS%g
10986s%@INTLOBJS@%$INTLOBJS%g
10987s%@POFILES@%$POFILES%g
10988s%@POSUB@%$POSUB%g
10989s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10990s%@GT_NO@%$GT_NO%g
10991s%@GT_YES@%$GT_YES%g
10992s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10993s%@l@%$l%g
8dcde887 10994s%@subdirs@%$subdirs%g
7a292a7a 10995s%@AWK@%$AWK%g
c906108c
SS
10996s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10997s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10998s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10999s%@LN_S@%$LN_S%g
11000s%@YACC@%$YACC%g
c906108c 11001s%@AR@%$AR%g
95ca63c4
CF
11002s%@DLLTOOL@%$DLLTOOL%g
11003s%@WINDRES@%$WINDRES%g
75c6e08a 11004s%@MIG@%$MIG%g
c906108c 11005s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11006s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11007s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11008s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11009s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11010s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11011s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11012s%@LIBGUI@%$LIBGUI%g
11013s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11014s%@WIN32LDAPP@%$WIN32LDAPP%g
11015s%@TCL_VERSION@%$TCL_VERSION%g
11016s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11017s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11018s%@TCL_CC@%$TCL_CC%g
11019s%@TCL_DEFS@%$TCL_DEFS%g
11020s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11021s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11022s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11023s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11024s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11025s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11026s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11027s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11028s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11029s%@TCL_RANLIB@%$TCL_RANLIB%g
11030s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11031s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11032s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11033s%@TK_VERSION@%$TK_VERSION%g
11034s%@TK_DEFS@%$TK_DEFS%g
11035s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11036s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11037s%@TK_XLIBSW@%$TK_XLIBSW%g
11038s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11039s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11040s%@TCLHDIR@%$TCLHDIR%g
11041s%@TKHDIR@%$TKHDIR%g
11042s%@ITCLHDIR@%$ITCLHDIR%g
11043s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11044s%@ITCL_VERSION@%$ITCL_VERSION%g
11045s%@ITCL_DEFS@%$ITCL_DEFS%g
11046s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11047s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11048s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11049s%@ITK_VERSION@%$ITK_VERSION%g
11050s%@ITK_DEFS@%$ITK_DEFS%g
11051s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11052s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11053s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11054s%@X_CFLAGS@%$X_CFLAGS%g
11055s%@X_LDFLAGS@%$X_LDFLAGS%g
11056s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11057s%@TCL_DEPS@%$TCL_DEPS%g
11058s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11059s%@ITCLLIB@%$ITCLLIB%g
11060s%@ITCL_DEPS@%$ITCL_DEPS%g
11061s%@ITKLIB@%$ITKLIB%g
11062s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11063s%@GDBTKLIBS@%$GDBTKLIBS%g
11064s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11065s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11066s%@IGNORE_SIM@%$IGNORE_SIM%g
11067s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11068s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11069s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11070s%@CONFIG_OBS@%$CONFIG_OBS%g
11071s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11072s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11073s%@CONFIG_ALL@%$CONFIG_ALL%g
11074s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11075s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11076s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11077s%@target_subdir@%$target_subdir%g
11078/@host_makefile_frag@/r $host_makefile_frag
11079s%@host_makefile_frag@%%g
11080/@target_makefile_frag@/r $target_makefile_frag
11081s%@target_makefile_frag@%%g
11082s%@frags@%$frags%g
5a2402b8
AC
11083s%@xm_h@%$xm_h%g
11084s%@tm_h@%$tm_h%g
11085s%@nm_h@%$nm_h%g
c906108c 11086s%@EXEEXT@%$EXEEXT%g
234b45d4 11087s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11088
11089CEOF
11090EOF
11091
11092cat >> $CONFIG_STATUS <<\EOF
11093
11094# Split the substitutions into bite-sized pieces for seds with
11095# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11096ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11097ac_file=1 # Number of current file.
11098ac_beg=1 # First line for current file.
11099ac_end=$ac_max_sed_cmds # Line after last line for current file.
11100ac_more_lines=:
11101ac_sed_cmds=""
11102while $ac_more_lines; do
11103 if test $ac_beg -gt 1; then
11104 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11105 else
11106 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11107 fi
11108 if test ! -s conftest.s$ac_file; then
11109 ac_more_lines=false
11110 rm -f conftest.s$ac_file
11111 else
11112 if test -z "$ac_sed_cmds"; then
11113 ac_sed_cmds="sed -f conftest.s$ac_file"
11114 else
11115 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11116 fi
11117 ac_file=`expr $ac_file + 1`
11118 ac_beg=$ac_end
11119 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11120 fi
11121done
11122if test -z "$ac_sed_cmds"; then
11123 ac_sed_cmds=cat
11124fi
11125EOF
11126
11127cat >> $CONFIG_STATUS <<EOF
11128
ed952ac5 11129CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11130EOF
11131cat >> $CONFIG_STATUS <<\EOF
11132for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11133 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11134 case "$ac_file" in
11135 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11136 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11137 *) ac_file_in="${ac_file}.in" ;;
11138 esac
11139
11140 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11141
11142 # Remove last slash and all that follows it. Not all systems have dirname.
11143 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11144 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11145 # The file is in a subdirectory.
11146 test ! -d "$ac_dir" && mkdir "$ac_dir"
11147 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11148 # A "../" for each directory in $ac_dir_suffix.
11149 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11150 else
11151 ac_dir_suffix= ac_dots=
11152 fi
11153
11154 case "$ac_given_srcdir" in
11155 .) srcdir=.
11156 if test -z "$ac_dots"; then top_srcdir=.
11157 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11158 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11159 *) # Relative path.
11160 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11161 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11162 esac
11163
11164 case "$ac_given_INSTALL" in
11165 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11166 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11167 esac
11168
11169 echo creating "$ac_file"
11170 rm -f "$ac_file"
11171 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11172 case "$ac_file" in
11173 *Makefile*) ac_comsub="1i\\
11174# $configure_input" ;;
11175 *) ac_comsub= ;;
11176 esac
11177
11178 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11179 sed -e "$ac_comsub
11180s%@configure_input@%$configure_input%g
11181s%@srcdir@%$srcdir%g
11182s%@top_srcdir@%$top_srcdir%g
11183s%@INSTALL@%$INSTALL%g
11184" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11185fi; done
11186rm -f conftest.s*
11187
11188# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11189# NAME is the cpp macro being defined and VALUE is the value it is being given.
11190#
11191# ac_d sets the value in "#define NAME VALUE" lines.
11192ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11193ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11194ac_dC='\3'
11195ac_dD='%g'
11196# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11197ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11198ac_uB='\([ ]\)%\1#\2define\3'
11199ac_uC=' '
11200ac_uD='\4%g'
11201# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11202ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11203ac_eB='$%\1#\2define\3'
11204ac_eC=' '
11205ac_eD='%g'
11206
11207if test "${CONFIG_HEADERS+set}" != set; then
11208EOF
11209cat >> $CONFIG_STATUS <<EOF
11210 CONFIG_HEADERS="config.h:config.in"
11211EOF
11212cat >> $CONFIG_STATUS <<\EOF
11213fi
11214for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11215 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11216 case "$ac_file" in
11217 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11218 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11219 *) ac_file_in="${ac_file}.in" ;;
11220 esac
11221
11222 echo creating $ac_file
11223
11224 rm -f conftest.frag conftest.in conftest.out
11225 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11226 cat $ac_file_inputs > conftest.in
11227
11228EOF
11229
11230# Transform confdefs.h into a sed script conftest.vals that substitutes
11231# the proper values into config.h.in to produce config.h. And first:
11232# Protect against being on the right side of a sed subst in config.status.
11233# Protect against being in an unquoted here document in config.status.
11234rm -f conftest.vals
11235cat > conftest.hdr <<\EOF
11236s/[\\&%]/\\&/g
11237s%[\\$`]%\\&%g
11238s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11239s%ac_d%ac_u%gp
11240s%ac_u%ac_e%gp
11241EOF
11242sed -n -f conftest.hdr confdefs.h > conftest.vals
11243rm -f conftest.hdr
11244
11245# This sed command replaces #undef with comments. This is necessary, for
11246# example, in the case of _POSIX_SOURCE, which is predefined and required
11247# on some systems where configure will not decide to define it.
11248cat >> conftest.vals <<\EOF
11249s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11250EOF
11251
11252# Break up conftest.vals because some shells have a limit on
11253# the size of here documents, and old seds have small limits too.
11254
11255rm -f conftest.tail
11256while :
11257do
11258 ac_lines=`grep -c . conftest.vals`
11259 # grep -c gives empty output for an empty file on some AIX systems.
11260 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11261 # Write a limited-size here document to conftest.frag.
11262 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11263 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11264 echo 'CEOF
11265 sed -f conftest.frag conftest.in > conftest.out
11266 rm -f conftest.in
11267 mv conftest.out conftest.in
11268' >> $CONFIG_STATUS
11269 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11270 rm -f conftest.vals
11271 mv conftest.tail conftest.vals
11272done
11273rm -f conftest.vals
11274
11275cat >> $CONFIG_STATUS <<\EOF
11276 rm -f conftest.frag conftest.h
11277 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11278 cat conftest.in >> conftest.h
11279 rm -f conftest.in
11280 if cmp -s $ac_file conftest.h 2>/dev/null; then
11281 echo "$ac_file is unchanged"
11282 rm -f conftest.h
11283 else
11284 # Remove last slash and all that follows it. Not all systems have dirname.
11285 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11286 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11287 # The file is in a subdirectory.
11288 test ! -d "$ac_dir" && mkdir "$ac_dir"
11289 fi
11290 rm -f $ac_file
11291 mv conftest.h $ac_file
11292 fi
11293fi; done
11294
11295EOF
11296
11297cat >> $CONFIG_STATUS <<EOF
11298ac_sources="$files"
11299ac_dests="$links"
11300EOF
11301
11302cat >> $CONFIG_STATUS <<\EOF
11303srcdir=$ac_given_srcdir
11304while test -n "$ac_sources"; do
11305 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11306 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11307
11308 echo "linking $srcdir/$ac_source to $ac_dest"
11309
11310 if test ! -r $srcdir/$ac_source; then
11311 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11312 fi
11313 rm -f $ac_dest
11314
11315 # Make relative symlinks.
11316 # Remove last slash and all that follows it. Not all systems have dirname.
11317 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11318 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11319 # The dest file is in a subdirectory.
11320 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11321 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11322 # A "../" for each directory in $ac_dest_dir_suffix.
11323 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11324 else
11325 ac_dest_dir_suffix= ac_dots=
11326 fi
11327
11328 case "$srcdir" in
11329 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11330 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11331 esac
11332
11333 # Make a symlink if possible; otherwise try a hard link.
11334 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11335 ln $srcdir/$ac_source $ac_dest; then :
11336 else
11337 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11338 fi
11339done
11340EOF
11341cat >> $CONFIG_STATUS <<EOF
11342
11343gdb_host_cpu=$gdb_host_cpu
11344gdb_target_cpu=$gdb_target_cpu
11345nativefile=$nativefile
11346
11347EOF
11348cat >> $CONFIG_STATUS <<\EOF
11349
7ee6d7eb 11350if test "${nativefile}" = ""; then
c4620205 11351 < Makefile \
e27da16d
JT
11352 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11353 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11354 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11355 > Makefile.tem
c906108c
SS
11356mv -f Makefile.tem Makefile
11357fi
11358
11359sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11360/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11361/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11362mv -f Makefile.tmp Makefile
11363
2acceee2 11364
c906108c
SS
11365case x$CONFIG_HEADERS in
11366xconfig.h:config.in)
11367echo > stamp-h ;;
11368esac
11369
11370exit 0
11371EOF
11372chmod +x $CONFIG_STATUS
11373rm -fr confdefs* $ac_clean_files
11374test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11375
11376if test "$no_recursion" != yes; then
11377
11378 # Remove --cache-file and --srcdir arguments so they do not pile up.
11379 ac_sub_configure_args=
11380 ac_prev=
11381 for ac_arg in $ac_configure_args; do
11382 if test -n "$ac_prev"; then
11383 ac_prev=
11384 continue
11385 fi
11386 case "$ac_arg" in
11387 -cache-file | --cache-file | --cache-fil | --cache-fi \
11388 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11389 ac_prev=cache_file ;;
11390 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11391 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11392 ;;
11393 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11394 ac_prev=srcdir ;;
11395 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11396 ;;
11397 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11398 esac
11399 done
11400
8dcde887 11401 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11402
11403 # Do not complain, so a configure script can configure whichever
11404 # parts of a large source tree are present.
11405 if test ! -d $srcdir/$ac_config_dir; then
11406 continue
11407 fi
11408
11409 echo configuring in $ac_config_dir
11410
11411 case "$srcdir" in
11412 .) ;;
11413 *)
11414 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11415 else
11416 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11417 fi
11418 ;;
11419 esac
11420
11421 ac_popdir=`pwd`
11422 cd $ac_config_dir
11423
11424 # A "../" for each directory in /$ac_config_dir.
11425 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11426
11427 case "$srcdir" in
11428 .) # No --srcdir option. We are building in place.
11429 ac_sub_srcdir=$srcdir ;;
11430 /*) # Absolute path.
11431 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11432 *) # Relative path.
11433 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11434 esac
11435
11436 # Check for guested configure; otherwise get Cygnus style configure.
11437 if test -f $ac_sub_srcdir/configure; then
11438 ac_sub_configure=$ac_sub_srcdir/configure
11439 elif test -f $ac_sub_srcdir/configure.in; then
11440 ac_sub_configure=$ac_configure
11441 else
11442 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11443 ac_sub_configure=
11444 fi
11445
11446 # The recursion is here.
11447 if test -n "$ac_sub_configure"; then
11448
11449 # Make the cache file name correct relative to the subdirectory.
11450 case "$cache_file" in
11451 /*) ac_sub_cache_file=$cache_file ;;
11452 *) # Relative path.
11453 ac_sub_cache_file="$ac_dots$cache_file" ;;
11454 esac
11455 case "$ac_given_INSTALL" in
11456 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11457 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11458 esac
11459
11460 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11461 # The eval makes quoting arguments work.
11462 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11463 then :
11464 else
11465 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11466 fi
11467 fi
11468
11469 cd $ac_popdir
11470 done
11471fi
11472
11473
11474exit 0
This page took 0.965959 seconds and 4 git commands to generate.