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