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