2004-07-29 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
d15be926 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
d15be926 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
d15be926
MK
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
d15be926
MK
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
d15be926
MK
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d15be926 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d15be926 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
d15be926 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d15be926 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d15be926 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d15be926 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
d15be926 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d15be926 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d15be926 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d15be926 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d15be926 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d15be926 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d15be926 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d15be926 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d15be926 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d15be926 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d15be926 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d15be926 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d15be926 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d15be926 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d15be926 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d15be926 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d15be926 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
d15be926 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
d15be926 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
d15be926 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
d15be926 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
d15be926 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
d15be926 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
d15be926 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
d15be926 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
d15be926 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
d15be926 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
d15be926 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
d15be926 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d15be926 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
d15be926 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
d15be926 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d15be926 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
d15be926 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
d15be926 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
d15be926 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
d15be926 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
d15be926 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d15be926 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
d15be926 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
d15be926 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
d15be926 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d15be926 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
d15be926 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
d15be926 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
d836ee13 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
d15be926 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
d15be926 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
d15be926 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d15be926 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
d15be926 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
d15be926 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
d15be926 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
d15be926 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
d15be926 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
d15be926 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
d15be926 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d15be926 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
d15be926 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
d15be926 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d15be926 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d15be926 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d15be926 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
d15be926 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d15be926 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
d15be926 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
d15be926 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d15be926 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
d15be926 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
d15be926 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d15be926 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
d15be926 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
d15be926 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
d15be926 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
d15be926 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
d15be926 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
d15be926 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d15be926 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d15be926 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
d15be926 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
2928CONFIG_DEPS=
2929CONFIG_SRCS=
fb40c209 2930ENABLE_CFLAGS=
b3a90332
AC
2931CONFIG_ALL=
2932CONFIG_CLEAN=
e56ac5c3
AC
2933CONFIG_INSTALL=
2934CONFIG_UNINSTALL=
c906108c 2935
8dcde887 2936subdirs="doc testsuite"
96baa820 2937
8dcde887 2938configdirs=
96baa820 2939
27e9bf90 2940. $srcdir/configure.host
c906108c 2941
27e9bf90 2942. $srcdir/configure.tgt
c906108c 2943
27e9bf90
MK
2944# Fetch the default architecture and default target vector from BFD.
2945targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2946
27e9bf90
MK
2947# We only want the first architecture, so strip off the others if
2948# there is more than one.
2949targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2950
27e9bf90
MK
2951if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2954EOF
2955
2956fi
27e9bf90
MK
2957if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2960EOF
2961
2962fi
c906108c 2963
8bb2c122
MK
2964if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969s,\\,\\\\,g; s,\$,$$,g
2970EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973fi
2974test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976# Use a double $ so make ignores it.
2977test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980# sed with no file args requires a program.
2981test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
627af7ea
MK
2984# The CLI cannot be disabled yet, but may be in the future.
2985
2986# Enable CLI.
2987# Check whether --enable-gdbcli or --disable-gdbcli was given.
2988if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998else
2999 enable_gdbcli=yes
3000fi
3001
3002if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3008 fi
3009fi
3010
3011# Enable MI.
3012# Check whether --enable-gdbmi or --disable-gdbmi was given.
3013if test "${enable_gdbmi+set}" = set; then
3014 enableval="$enable_gdbmi"
3015 case $enableval in
3016 yes | no)
3017 ;;
3018 *)
3019 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3020 esac
3021else
3022 enable_gdbmi=yes
3023fi
3024
3025if test x"$enable_gdbmi" = xyes; then
3026 if test -d $srcdir/mi; then
3027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3031 fi
3032fi
3033
06825bd1
MK
3034# Enable TUI.
3035# Check whether --enable-tui or --disable-tui was given.
3036if test "${enable_tui+set}" = set; then
3037 enableval="$enable_tui"
3038 case $enableval in
3039 yes | no)
3040 ;;
3041 *)
3042 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3043 esac
c324d747
AC
3044else
3045 enable_tui=yes
06825bd1
MK
3046fi
3047
3048if test x"$enable_tui" = xyes; then
3049 if test -d $srcdir/tui; then
7613d933 3050 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
c324d747
AC
3051 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3052 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3053 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3054 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3055 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3056 CONFIG_ALL="${CONFIG_ALL} all-tui"
3057 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3058 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3059 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3060 fi
06825bd1
MK
3061 fi
3062fi
3063
8ee53726
MK
3064# Enable gdbtk.
3065# Check whether --enable-gdbtk or --disable-gdbtk was given.
3066if test "${enable_gdbtk+set}" = set; then
3067 enableval="$enable_gdbtk"
3068 case $enableval in
3069 yes | no)
3070 ;;
3071 *)
3072 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3073 esac
3074else
3075 if test -d $srcdir/gdbtk; then
3076 enable_gdbtk=yes
3077 else
3078 enable_gdbtk=no
3079 fi
3080fi
3081
3082# We unconditionally disable gdbtk tests on selected platforms.
3083case $host_os in
3084 go32* | windows*)
3085 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3086 enable_gdbtk=no ;;
3087esac
3088
0e5d83e3
JJ
3089# Libunwind support.
3090# Check whether --with-libunwind or --without-libunwind was given.
3091if test "${with_libunwind+set}" = set; then
3092 withval="$with_libunwind"
3093 case "${withval}" in
3094 yes) enable_libunwind=yes ;;
3095 no) enable_libunwind=no ;;
3096 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3097esac
3098else
3099
3100 for ac_hdr in libunwind.h
3101do
3102ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3103echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 3104echo "configure:3105: checking for $ac_hdr" >&5
0e5d83e3
JJ
3105if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3106 echo $ac_n "(cached) $ac_c" 1>&6
3107else
3108 cat > conftest.$ac_ext <<EOF
d15be926 3109#line 3110 "configure"
0e5d83e3
JJ
3110#include "confdefs.h"
3111#include <$ac_hdr>
3112EOF
3113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 3114{ (eval echo configure:3115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3116if test -z "$ac_err"; then
3117 rm -rf conftest*
3118 eval "ac_cv_header_$ac_safe=yes"
3119else
3120 echo "$ac_err" >&5
3121 echo "configure: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3123 rm -rf conftest*
3124 eval "ac_cv_header_$ac_safe=no"
3125fi
3126rm -f conftest*
3127fi
3128if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3129 echo "$ac_t""yes" 1>&6
3130 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3131 cat >> confdefs.h <<EOF
3132#define $ac_tr_hdr 1
3133EOF
3134
3135else
3136 echo "$ac_t""no" 1>&6
3137fi
3138done
3139
3140 for ac_hdr in libunwind-ia64.h
3141do
3142ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3143echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 3144echo "configure:3145: checking for $ac_hdr" >&5
0e5d83e3
JJ
3145if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 cat > conftest.$ac_ext <<EOF
d15be926 3149#line 3150 "configure"
0e5d83e3
JJ
3150#include "confdefs.h"
3151#include <$ac_hdr>
3152EOF
3153ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 3154{ (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3155ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3156if test -z "$ac_err"; then
3157 rm -rf conftest*
3158 eval "ac_cv_header_$ac_safe=yes"
3159else
3160 echo "$ac_err" >&5
3161 echo "configure: failed program was:" >&5
3162 cat conftest.$ac_ext >&5
3163 rm -rf conftest*
3164 eval "ac_cv_header_$ac_safe=no"
3165fi
3166rm -f conftest*
3167fi
3168if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3171 cat >> confdefs.h <<EOF
3172#define $ac_tr_hdr 1
3173EOF
3174
3175else
3176 echo "$ac_t""no" 1>&6
3177fi
3178done
3179
3180 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3181 enable_libunwind=yes;
3182 fi
3183
3184fi
3185
3186
3187if test x"$enable_libunwind" = xyes; then
3188 for ac_hdr in libunwind.h
3189do
3190ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3191echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 3192echo "configure:3193: checking for $ac_hdr" >&5
0e5d83e3
JJ
3193if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3194 echo $ac_n "(cached) $ac_c" 1>&6
3195else
3196 cat > conftest.$ac_ext <<EOF
d15be926 3197#line 3198 "configure"
0e5d83e3
JJ
3198#include "confdefs.h"
3199#include <$ac_hdr>
3200EOF
3201ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 3202{ (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3203ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204if test -z "$ac_err"; then
3205 rm -rf conftest*
3206 eval "ac_cv_header_$ac_safe=yes"
3207else
3208 echo "$ac_err" >&5
3209 echo "configure: failed program was:" >&5
3210 cat conftest.$ac_ext >&5
3211 rm -rf conftest*
3212 eval "ac_cv_header_$ac_safe=no"
3213fi
3214rm -f conftest*
3215fi
3216if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3217 echo "$ac_t""yes" 1>&6
3218 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3219 cat >> confdefs.h <<EOF
3220#define $ac_tr_hdr 1
3221EOF
3222
3223else
3224 echo "$ac_t""no" 1>&6
3225fi
3226done
3227
3228 for ac_hdr in libunwind-ia64.h
3229do
3230ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3231echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 3232echo "configure:3233: checking for $ac_hdr" >&5
0e5d83e3
JJ
3233if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
3235else
3236 cat > conftest.$ac_ext <<EOF
d15be926 3237#line 3238 "configure"
0e5d83e3
JJ
3238#include "confdefs.h"
3239#include <$ac_hdr>
3240EOF
3241ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 3242{ (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3243ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3244if test -z "$ac_err"; then
3245 rm -rf conftest*
3246 eval "ac_cv_header_$ac_safe=yes"
3247else
3248 echo "$ac_err" >&5
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3251 rm -rf conftest*
3252 eval "ac_cv_header_$ac_safe=no"
3253fi
3254rm -f conftest*
3255fi
3256if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3257 echo "$ac_t""yes" 1>&6
3258 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3259 cat >> confdefs.h <<EOF
3260#define $ac_tr_hdr 1
3261EOF
3262
3263else
3264 echo "$ac_t""no" 1>&6
3265fi
3266done
3267
3268 cat >> confdefs.h <<\EOF
3269#define HAVE_LIBUNWIND 1
3270EOF
3271
3272 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3273 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3274 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3275fi
3276
d28f9cdf
DJ
3277# Profiling support.
3278# Check whether --enable-profiling or --disable-profiling was given.
3279if test "${enable_profiling+set}" = set; then
3280 enableval="$enable_profiling"
3281 case $enableval in
3282 yes | no)
3283 ;;
3284 *)
3285 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3286 esac
3287else
3288 enable_profiling=no
3289fi
3290
3291
d9feb4e7
DJ
3292for ac_func in monstartup _mcleanup
3293do
3294echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 3295echo "configure:3296: checking for $ac_func" >&5
d9feb4e7 3296if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3297 echo $ac_n "(cached) $ac_c" 1>&6
3298else
3299 cat > conftest.$ac_ext <<EOF
d15be926 3300#line 3301 "configure"
d28f9cdf
DJ
3301#include "confdefs.h"
3302/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3303 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3304#include <assert.h>
3305/* Override any gcc2 internal prototype to avoid an error. */
3306/* We use char because int might match the return type of a gcc2
3307 builtin and then its argument prototype would still apply. */
d9feb4e7 3308char $ac_func();
d28f9cdf
DJ
3309
3310int main() {
3311
3312/* The GNU C library defines this for functions which it implements
3313 to always fail with ENOSYS. Some functions are actually named
3314 something starting with __ and the normal name is an alias. */
d9feb4e7 3315#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3316choke me
3317#else
d9feb4e7 3318$ac_func();
d28f9cdf
DJ
3319#endif
3320
3321; return 0; }
3322EOF
d15be926 3323if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3324 rm -rf conftest*
d9feb4e7 3325 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3326else
3327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3329 rm -rf conftest*
d9feb4e7 3330 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3331fi
3332rm -f conftest*
3333fi
3334
d9feb4e7 3335if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3336 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3337 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3338 cat >> confdefs.h <<EOF
3339#define $ac_tr_func 1
3340EOF
3341
d28f9cdf
DJ
3342else
3343 echo "$ac_t""no" 1>&6
d28f9cdf 3344fi
d9feb4e7 3345done
d28f9cdf 3346
b0b1c2c0 3347echo $ac_n "checking for _etext""... $ac_c" 1>&6
d15be926 3348echo "configure:3349: checking for _etext" >&5
b0b1c2c0
MK
3349if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3350 echo $ac_n "(cached) $ac_c" 1>&6
3351else
3352 cat > conftest.$ac_ext <<EOF
d15be926 3353#line 3354 "configure"
b0b1c2c0
MK
3354#include "confdefs.h"
3355#include <stdlib.h>
3356extern char _etext;
3357
3358int main() {
3359free (&_etext);
3360; return 0; }
3361EOF
d15be926 3362if { (eval echo configure:3363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3363 rm -rf conftest*
3364 ac_cv_var__etext=yes
3365else
3366 echo "configure: failed program was:" >&5
3367 cat conftest.$ac_ext >&5
3368 rm -rf conftest*
3369 ac_cv_var__etext=no
3370fi
3371rm -f conftest*
3372fi
3373
3374echo "$ac_t""$ac_cv_var__etext" 1>&6
3375if test $ac_cv_var__etext = yes; then
3376 cat >> confdefs.h <<\EOF
3377#define HAVE__ETEXT 1
3378EOF
3379
3380fi
d9feb4e7
DJ
3381if test "$enable_profiling" = yes ; then
3382 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3383 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3384 fi
3385 PROFILE_CFLAGS=-pg
3386 OLD_CFLAGS="$CFLAGS"
3387 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3388
d9feb4e7 3389 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
d15be926 3390echo "configure:3391: checking whether $CC supports -pg" >&5
d9feb4e7 3391if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3392 echo $ac_n "(cached) $ac_c" 1>&6
3393else
3394 cat > conftest.$ac_ext <<EOF
d15be926 3395#line 3396 "configure"
d28f9cdf 3396#include "confdefs.h"
d28f9cdf
DJ
3397
3398int main() {
d9feb4e7 3399int x;
d28f9cdf
DJ
3400; return 0; }
3401EOF
d15be926 3402if { (eval echo configure:3403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3403 rm -rf conftest*
d9feb4e7 3404 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3405else
3406 echo "configure: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 rm -rf conftest*
d9feb4e7 3409 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3410fi
3411rm -f conftest*
3412fi
3413
d9feb4e7 3414echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3415
d9feb4e7
DJ
3416 if test $ac_cv_cc_supports_pg = no; then
3417 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3418 fi
d28f9cdf
DJ
3419
3420 CFLAGS="$OLD_CFLAGS"
3421fi
3422
8bb2c122
MK
3423# --------------------- #
3424# Checks for programs. #
3425# --------------------- #
3426
d836ee13 3427for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3428do
3429# Extract the first word of "$ac_prog", so it can be a program name with args.
3430set dummy $ac_prog; ac_word=$2
3431echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3432echo "configure:3433: checking for $ac_word" >&5
7a292a7a
SS
3433if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3434 echo $ac_n "(cached) $ac_c" 1>&6
3435else
3436 if test -n "$AWK"; then
3437 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3438else
3439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3440 ac_dummy="$PATH"
3441 for ac_dir in $ac_dummy; do
3442 test -z "$ac_dir" && ac_dir=.
3443 if test -f $ac_dir/$ac_word; then
3444 ac_cv_prog_AWK="$ac_prog"
3445 break
3446 fi
3447 done
3448 IFS="$ac_save_ifs"
3449fi
3450fi
3451AWK="$ac_cv_prog_AWK"
3452if test -n "$AWK"; then
3453 echo "$ac_t""$AWK" 1>&6
3454else
3455 echo "$ac_t""no" 1>&6
3456fi
3457
3458test -n "$AWK" && break
3459done
3460
c906108c
SS
3461# Find a good install program. We prefer a C program (faster),
3462# so one script is as good as another. But avoid the broken or
3463# incompatible versions:
3464# SysV /etc/install, /usr/sbin/install
3465# SunOS /usr/etc/install
3466# IRIX /sbin/install
3467# AIX /bin/install
3468# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3469# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3470# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3471# ./install, which can be erroneously created by make from ./install.sh.
3472echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
d15be926 3473echo "configure:3474: checking for a BSD compatible install" >&5
c906108c
SS
3474if test -z "$INSTALL"; then
3475if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3476 echo $ac_n "(cached) $ac_c" 1>&6
3477else
3478 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3479 for ac_dir in $PATH; do
3480 # Account for people who put trailing slashes in PATH elements.
3481 case "$ac_dir/" in
3482 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3483 *)
3484 # OSF1 and SCO ODT 3.0 have their own names for install.
3485 # Don't use installbsd from OSF since it installs stuff as root
3486 # by default.
3487 for ac_prog in ginstall scoinst install; do
3488 if test -f $ac_dir/$ac_prog; then
3489 if test $ac_prog = install &&
3490 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3491 # AIX install. It has an incompatible calling convention.
3492 :
3493 else
3494 ac_cv_path_install="$ac_dir/$ac_prog -c"
3495 break 2
3496 fi
3497 fi
3498 done
3499 ;;
3500 esac
3501 done
3502 IFS="$ac_save_IFS"
3503
3504fi
3505 if test "${ac_cv_path_install+set}" = set; then
3506 INSTALL="$ac_cv_path_install"
3507 else
3508 # As a last resort, use the slow shell script. We don't cache a
3509 # path for INSTALL within a source directory, because that will
3510 # break other packages using the cache if that directory is
3511 # removed, or if the path is relative.
3512 INSTALL="$ac_install_sh"
3513 fi
3514fi
3515echo "$ac_t""$INSTALL" 1>&6
3516
3517# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3518# It thinks the first close brace ends the variable substitution.
3519test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3520
3521test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3522
3523test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3524
8bb2c122 3525echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
d15be926 3526echo "configure:3527: checking whether ln -s works" >&5
8bb2c122
MK
3527if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3528 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3529else
8bb2c122
MK
3530 rm -f conftestdata
3531if ln -s X conftestdata 2>/dev/null
3532then
3533 rm -f conftestdata
3534 ac_cv_prog_LN_S="ln -s"
3535else
3536 ac_cv_prog_LN_S=ln
3537fi
3538fi
3539LN_S="$ac_cv_prog_LN_S"
3540if test "$ac_cv_prog_LN_S" = "ln -s"; then
3541 echo "$ac_t""yes" 1>&6
3542else
3543 echo "$ac_t""no" 1>&6
c906108c
SS
3544fi
3545
8bb2c122
MK
3546# Extract the first word of "ranlib", so it can be a program name with args.
3547set dummy ranlib; ac_word=$2
c906108c 3548echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3549echo "configure:3550: checking for $ac_word" >&5
8bb2c122 3550if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3551 echo $ac_n "(cached) $ac_c" 1>&6
3552else
8bb2c122
MK
3553 if test -n "$RANLIB"; then
3554 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3555else
3556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3557 ac_dummy="$PATH"
3558 for ac_dir in $ac_dummy; do
3559 test -z "$ac_dir" && ac_dir=.
3560 if test -f $ac_dir/$ac_word; then
8bb2c122 3561 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3562 break
3563 fi
3564 done
3565 IFS="$ac_save_ifs"
8bb2c122 3566 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3567fi
3568fi
8bb2c122
MK
3569RANLIB="$ac_cv_prog_RANLIB"
3570if test -n "$RANLIB"; then
3571 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3572else
3573 echo "$ac_t""no" 1>&6
3574fi
3575
8bb2c122
MK
3576for ac_prog in 'bison -y' byacc
3577do
3578# Extract the first word of "$ac_prog", so it can be a program name with args.
3579set dummy $ac_prog; ac_word=$2
c906108c 3580echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3581echo "configure:3582: checking for $ac_word" >&5
8bb2c122 3582if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3583 echo $ac_n "(cached) $ac_c" 1>&6
3584else
8bb2c122
MK
3585 if test -n "$YACC"; then
3586 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3587else
3588 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3589 ac_dummy="$PATH"
3590 for ac_dir in $ac_dummy; do
3591 test -z "$ac_dir" && ac_dir=.
3592 if test -f $ac_dir/$ac_word; then
8bb2c122 3593 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3594 break
3595 fi
3596 done
3597 IFS="$ac_save_ifs"
3598fi
3599fi
8bb2c122
MK
3600YACC="$ac_cv_prog_YACC"
3601if test -n "$YACC"; then
3602 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3603else
3604 echo "$ac_t""no" 1>&6
3605fi
3606
8bb2c122
MK
3607test -n "$YACC" && break
3608done
3609test -n "$YACC" || YACC="yacc"
c906108c 3610
8bb2c122
MK
3611
3612# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3613set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3614echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3615echo "configure:3616: checking for $ac_word" >&5
8bb2c122 3616if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
8bb2c122
MK
3619 if test -n "$AR"; then
3620 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3621else
3622 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625 test -z "$ac_dir" && ac_dir=.
3626 if test -f $ac_dir/$ac_word; then
8bb2c122 3627 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3628 break
3629 fi
3630 done
3631 IFS="$ac_save_ifs"
8bb2c122 3632 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3633fi
3634fi
8bb2c122
MK
3635AR="$ac_cv_prog_AR"
3636if test -n "$AR"; then
3637 echo "$ac_t""$AR" 1>&6
c906108c
SS
3638else
3639 echo "$ac_t""no" 1>&6
3640fi
3641
8bb2c122 3642
c906108c 3643
95ca63c4
CF
3644# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3645set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3647echo "configure:3648: checking for $ac_word" >&5
95ca63c4
CF
3648if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3649 echo $ac_n "(cached) $ac_c" 1>&6
3650else
3651 if test -n "$DLLTOOL"; then
3652 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3653else
3654 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 if test -f $ac_dir/$ac_word; then
3659 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3660 break
3661 fi
3662 done
3663 IFS="$ac_save_ifs"
3664 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3665fi
3666fi
3667DLLTOOL="$ac_cv_prog_DLLTOOL"
3668if test -n "$DLLTOOL"; then
3669 echo "$ac_t""$DLLTOOL" 1>&6
3670else
3671 echo "$ac_t""no" 1>&6
3672fi
3673
3674
3675
3676# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3677set dummy ${ac_tool_prefix}windres; ac_word=$2
3678echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3679echo "configure:3680: checking for $ac_word" >&5
95ca63c4
CF
3680if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3681 echo $ac_n "(cached) $ac_c" 1>&6
3682else
3683 if test -n "$WINDRES"; then
3684 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3685else
3686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3687 ac_dummy="$PATH"
3688 for ac_dir in $ac_dummy; do
3689 test -z "$ac_dir" && ac_dir=.
3690 if test -f $ac_dir/$ac_word; then
3691 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3692 break
3693 fi
3694 done
3695 IFS="$ac_save_ifs"
3696 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3697fi
3698fi
3699WINDRES="$ac_cv_prog_WINDRES"
3700if test -n "$WINDRES"; then
3701 echo "$ac_t""$WINDRES" 1>&6
3702else
3703 echo "$ac_t""no" 1>&6
3704fi
3705
3706
3707
c906108c 3708
8bb2c122 3709# Needed for GNU/Hurd.
75c6e08a
MK
3710# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3711set dummy ${ac_tool_prefix}mig; ac_word=$2
3712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 3713echo "configure:3714: checking for $ac_word" >&5
75c6e08a
MK
3714if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716else
3717 if test -n "$MIG"; then
3718 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3719else
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 ac_dummy="$PATH"
3722 for ac_dir in $ac_dummy; do
3723 test -z "$ac_dir" && ac_dir=.
3724 if test -f $ac_dir/$ac_word; then
3725 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3726 break
3727 fi
3728 done
3729 IFS="$ac_save_ifs"
3730 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3731fi
3732fi
3733MIG="$ac_cv_prog_MIG"
3734if test -n "$MIG"; then
3735 echo "$ac_t""$MIG" 1>&6
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739
3740
3741
3742
9a156167
MK
3743# ---------------------- #
3744# Checks for libraries. #
3745# ---------------------- #
3746
3747# We might need to link with -lm; most simulators need it.
3748echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
d15be926 3749echo "configure:3750: checking for main in -lm" >&5
9a156167
MK
3750ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3751if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753else
3754 ac_save_LIBS="$LIBS"
3755LIBS="-lm $LIBS"
3756cat > conftest.$ac_ext <<EOF
d15be926 3757#line 3758 "configure"
9a156167
MK
3758#include "confdefs.h"
3759
3760int main() {
3761main()
3762; return 0; }
3763EOF
d15be926 3764if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3765 rm -rf conftest*
3766 eval "ac_cv_lib_$ac_lib_var=yes"
3767else
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3770 rm -rf conftest*
3771 eval "ac_cv_lib_$ac_lib_var=no"
3772fi
3773rm -f conftest*
3774LIBS="$ac_save_LIBS"
3775
3776fi
3777if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3778 echo "$ac_t""yes" 1>&6
3779 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3780 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3781 cat >> confdefs.h <<EOF
3782#define $ac_tr_lib 1
3783EOF
3784
3785 LIBS="-lm $LIBS"
3786
3787else
3788 echo "$ac_t""no" 1>&6
3789fi
3790
3791
3792# We need to link with -lw to get `wctype' on Solaris before Solaris
3793# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3794# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3795# is known to have this problem). Therefore we avoid libw if we can.
3796echo $ac_n "checking for wctype""... $ac_c" 1>&6
d15be926 3797echo "configure:3798: checking for wctype" >&5
9a156167
MK
3798if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 cat > conftest.$ac_ext <<EOF
d15be926 3802#line 3803 "configure"
9a156167
MK
3803#include "confdefs.h"
3804/* System header to define __stub macros and hopefully few prototypes,
3805 which can conflict with char wctype(); below. */
3806#include <assert.h>
3807/* Override any gcc2 internal prototype to avoid an error. */
3808/* We use char because int might match the return type of a gcc2
3809 builtin and then its argument prototype would still apply. */
3810char wctype();
3811
3812int main() {
3813
3814/* The GNU C library defines this for functions which it implements
3815 to always fail with ENOSYS. Some functions are actually named
3816 something starting with __ and the normal name is an alias. */
3817#if defined (__stub_wctype) || defined (__stub___wctype)
3818choke me
3819#else
3820wctype();
3821#endif
3822
3823; return 0; }
3824EOF
d15be926 3825if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3826 rm -rf conftest*
3827 eval "ac_cv_func_wctype=yes"
3828else
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 rm -rf conftest*
3832 eval "ac_cv_func_wctype=no"
3833fi
3834rm -f conftest*
3835fi
3836
3837if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3838 echo "$ac_t""yes" 1>&6
3839 :
3840else
3841 echo "$ac_t""no" 1>&6
3842echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
d15be926 3843echo "configure:3844: checking for wctype in -lw" >&5
9a156167
MK
3844ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3845if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3847else
3848 ac_save_LIBS="$LIBS"
3849LIBS="-lw $LIBS"
3850cat > conftest.$ac_ext <<EOF
d15be926 3851#line 3852 "configure"
9a156167
MK
3852#include "confdefs.h"
3853/* Override any gcc2 internal prototype to avoid an error. */
3854/* We use char because int might match the return type of a gcc2
3855 builtin and then its argument prototype would still apply. */
3856char wctype();
3857
3858int main() {
3859wctype()
3860; return 0; }
3861EOF
d15be926 3862if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3863 rm -rf conftest*
3864 eval "ac_cv_lib_$ac_lib_var=yes"
3865else
3866 echo "configure: failed program was:" >&5
3867 cat conftest.$ac_ext >&5
3868 rm -rf conftest*
3869 eval "ac_cv_lib_$ac_lib_var=no"
3870fi
3871rm -f conftest*
3872LIBS="$ac_save_LIBS"
3873
3874fi
3875if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3876 echo "$ac_t""yes" 1>&6
3877 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3878 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3879 cat >> confdefs.h <<EOF
3880#define $ac_tr_lib 1
3881EOF
3882
3883 LIBS="-lw $LIBS"
3884
3885else
3886 echo "$ac_t""no" 1>&6
3887fi
3888
3889fi
3890
3891
c890192f
MK
3892# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3893
3894echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
d15be926 3895echo "configure:3896: checking for library containing gethostbyname" >&5
c890192f
MK
3896if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898else
3899 ac_func_search_save_LIBS="$LIBS"
3900ac_cv_search_gethostbyname="no"
3901cat > conftest.$ac_ext <<EOF
d15be926 3902#line 3903 "configure"
c890192f
MK
3903#include "confdefs.h"
3904/* Override any gcc2 internal prototype to avoid an error. */
3905/* We use char because int might match the return type of a gcc2
3906 builtin and then its argument prototype would still apply. */
3907char gethostbyname();
3908
3909int main() {
3910gethostbyname()
3911; return 0; }
3912EOF
d15be926 3913if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3914 rm -rf conftest*
3915 ac_cv_search_gethostbyname="none required"
3916else
3917 echo "configure: failed program was:" >&5
3918 cat conftest.$ac_ext >&5
3919fi
3920rm -f conftest*
3921test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3922LIBS="-l$i $ac_func_search_save_LIBS"
3923cat > conftest.$ac_ext <<EOF
d15be926 3924#line 3925 "configure"
c890192f
MK
3925#include "confdefs.h"
3926/* Override any gcc2 internal prototype to avoid an error. */
3927/* We use char because int might match the return type of a gcc2
3928 builtin and then its argument prototype would still apply. */
3929char gethostbyname();
3930
3931int main() {
3932gethostbyname()
3933; return 0; }
3934EOF
d15be926 3935if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3936 rm -rf conftest*
3937 ac_cv_search_gethostbyname="-l$i"
3938break
3939else
3940 echo "configure: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
3942fi
3943rm -f conftest*
3944done
3945LIBS="$ac_func_search_save_LIBS"
3946fi
3947
3948echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3949if test "$ac_cv_search_gethostbyname" != "no"; then
3950 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3951
3952else :
3953
3954fi
3955
9a156167
MK
3956# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3957
3958echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
d15be926 3959echo "configure:3960: checking for library containing socketpair" >&5
9a156167
MK
3960if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3961 echo $ac_n "(cached) $ac_c" 1>&6
3962else
3963 ac_func_search_save_LIBS="$LIBS"
3964ac_cv_search_socketpair="no"
3965cat > conftest.$ac_ext <<EOF
d15be926 3966#line 3967 "configure"
9a156167
MK
3967#include "confdefs.h"
3968/* Override any gcc2 internal prototype to avoid an error. */
3969/* We use char because int might match the return type of a gcc2
3970 builtin and then its argument prototype would still apply. */
3971char socketpair();
3972
3973int main() {
3974socketpair()
3975; return 0; }
3976EOF
d15be926 3977if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3978 rm -rf conftest*
3979 ac_cv_search_socketpair="none required"
3980else
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3983fi
3984rm -f conftest*
3985test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3986LIBS="-l$i $ac_func_search_save_LIBS"
3987cat > conftest.$ac_ext <<EOF
d15be926 3988#line 3989 "configure"
9a156167
MK
3989#include "confdefs.h"
3990/* Override any gcc2 internal prototype to avoid an error. */
3991/* We use char because int might match the return type of a gcc2
3992 builtin and then its argument prototype would still apply. */
3993char socketpair();
3994
3995int main() {
3996socketpair()
3997; return 0; }
3998EOF
d15be926 3999if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4000 rm -rf conftest*
4001 ac_cv_search_socketpair="-l$i"
4002break
4003else
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006fi
4007rm -f conftest*
4008done
4009LIBS="$ac_func_search_save_LIBS"
4010fi
4011
4012echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4013if test "$ac_cv_search_socketpair" != "no"; then
4014 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4015
4016else :
4017
4018fi
4019
06825bd1
MK
4020# Since GDB uses Readline, we need termcap functionality, so we need
4021# to find a library that provides that. When GDB is configured with
c324d747 4022# the TUI, we need full curses functionality.
06825bd1
MK
4023
4024case $host_os in
4025 cygwin*)
4026 if test -d $srcdir/libtermcap; then
4027 LIBS="../libtermcap/libtermcap.a $LIBS"
4028 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4029 fi ;;
40a7debc 4030 go32* | *djgpp*)
06825bd1
MK
4031 ac_cv_search_tgetent="none required"
4032 ;;
4033 aix*)
4034 # Readline prefers curses over termcap on AIX.
4035 # ??? Why?
4036
4037echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d15be926 4038echo "configure:4039: checking for library containing tgetent" >&5
06825bd1
MK
4039if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 ac_func_search_save_LIBS="$LIBS"
4043ac_cv_search_tgetent="no"
4044cat > conftest.$ac_ext <<EOF
d15be926 4045#line 4046 "configure"
06825bd1
MK
4046#include "confdefs.h"
4047/* Override any gcc2 internal prototype to avoid an error. */
4048/* We use char because int might match the return type of a gcc2
4049 builtin and then its argument prototype would still apply. */
4050char tgetent();
4051
4052int main() {
4053tgetent()
4054; return 0; }
4055EOF
d15be926 4056if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4057 rm -rf conftest*
4058 ac_cv_search_tgetent="none required"
4059else
4060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062fi
4063rm -f conftest*
4064test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4065LIBS="-l$i $ac_func_search_save_LIBS"
4066cat > conftest.$ac_ext <<EOF
d15be926 4067#line 4068 "configure"
06825bd1
MK
4068#include "confdefs.h"
4069/* Override any gcc2 internal prototype to avoid an error. */
4070/* We use char because int might match the return type of a gcc2
4071 builtin and then its argument prototype would still apply. */
4072char tgetent();
4073
4074int main() {
4075tgetent()
4076; return 0; }
4077EOF
d15be926 4078if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4079 rm -rf conftest*
4080 ac_cv_search_tgetent="-l$i"
4081break
4082else
4083 echo "configure: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
4085fi
4086rm -f conftest*
4087done
4088LIBS="$ac_func_search_save_LIBS"
4089fi
4090
4091echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4092if test "$ac_cv_search_tgetent" != "no"; then
4093 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4094
4095else :
4096
4097fi
4098 ;;
4099esac
4100
4101# Note: We used to check for libtermlib and libterminfo too, but
4102# Readline doesn't, so I think we're safe with leaving them out.
4103
4104echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d15be926 4105echo "configure:4106: checking for library containing tgetent" >&5
06825bd1
MK
4106if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108else
4109 ac_func_search_save_LIBS="$LIBS"
4110ac_cv_search_tgetent="no"
4111cat > conftest.$ac_ext <<EOF
d15be926 4112#line 4113 "configure"
06825bd1
MK
4113#include "confdefs.h"
4114/* Override any gcc2 internal prototype to avoid an error. */
4115/* We use char because int might match the return type of a gcc2
4116 builtin and then its argument prototype would still apply. */
4117char tgetent();
4118
4119int main() {
4120tgetent()
4121; return 0; }
4122EOF
d15be926 4123if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4124 rm -rf conftest*
4125 ac_cv_search_tgetent="none required"
4126else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129fi
4130rm -f conftest*
4131test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4132LIBS="-l$i $ac_func_search_save_LIBS"
4133cat > conftest.$ac_ext <<EOF
d15be926 4134#line 4135 "configure"
06825bd1
MK
4135#include "confdefs.h"
4136/* Override any gcc2 internal prototype to avoid an error. */
4137/* We use char because int might match the return type of a gcc2
4138 builtin and then its argument prototype would still apply. */
4139char tgetent();
4140
4141int main() {
4142tgetent()
4143; return 0; }
4144EOF
d15be926 4145if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4146 rm -rf conftest*
4147 ac_cv_search_tgetent="-l$i"
4148break
4149else
4150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4152fi
4153rm -f conftest*
4154done
4155LIBS="$ac_func_search_save_LIBS"
4156fi
4157
4158echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4159if test "$ac_cv_search_tgetent" != "no"; then
4160 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4161
4162else :
4163
4164fi
4165
4166if test "$ac_cv_search_tgetent" = no; then
4167 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4168fi
4169
02d62932
MC
4170# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4171# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4172# Makefile fragments. That's why we need to have `Hcurses' before
4173# `curses'. I don't see why we should use HP curses if a more
4174# standard curses is available, except that according to HP's
4175# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4176# HP-UX 10.10 and 10.20.
4177
c848556f
MC
4178# FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
4179# and probably other platforms. AC_SEARCH_LIBS finds the library
4180# in a place such as /usr/local/lib/libncurses.a, but does not
4181# do anything to look for the matching include files.
4182# -- chastain 2004-05-01
02d62932 4183
02d62932 4184
02d62932 4185echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
d15be926 4186echo "configure:4187: checking for library containing initscr" >&5
02d62932
MC
4187if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4188 echo $ac_n "(cached) $ac_c" 1>&6
4189else
4190 ac_func_search_save_LIBS="$LIBS"
4191ac_cv_search_initscr="no"
4192cat > conftest.$ac_ext <<EOF
d15be926 4193#line 4194 "configure"
02d62932
MC
4194#include "confdefs.h"
4195/* Override any gcc2 internal prototype to avoid an error. */
4196/* We use char because int might match the return type of a gcc2
4197 builtin and then its argument prototype would still apply. */
4198char initscr();
4199
4200int main() {
4201initscr()
4202; return 0; }
4203EOF
d15be926 4204if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4205 rm -rf conftest*
4206 ac_cv_search_initscr="none required"
4207else
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210fi
4211rm -f conftest*
4212test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
4213LIBS="-l$i $ac_func_search_save_LIBS"
4214cat > conftest.$ac_ext <<EOF
d15be926 4215#line 4216 "configure"
02d62932
MC
4216#include "confdefs.h"
4217/* Override any gcc2 internal prototype to avoid an error. */
4218/* We use char because int might match the return type of a gcc2
4219 builtin and then its argument prototype would still apply. */
4220char initscr();
4221
4222int main() {
4223initscr()
4224; return 0; }
4225EOF
d15be926 4226if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4227 rm -rf conftest*
4228 ac_cv_search_initscr="-l$i"
4229break
4230else
4231 echo "configure: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
4233fi
4234rm -f conftest*
4235done
4236LIBS="$ac_func_search_save_LIBS"
4237fi
4238
4239echo "$ac_t""$ac_cv_search_initscr" 1>&6
4240if test "$ac_cv_search_initscr" != "no"; then
4241 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4242
4243else :
4244 echo "configure: warning: no curses library found" 1>&2
4245fi
02d62932
MC
4246
4247# Check whether the wborder function is provided by the curses
4248# library detected above. In certain implementations such as
4249# the HP/UX Hcurses for instance, this function is provided by an
4250# additional library. So if we did not find this function inside
4251# the curses library, try some alternate libraries we know might
4252# provide it.
4253
4254echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
d15be926 4255echo "configure:4256: checking for library containing wborder" >&5
02d62932
MC
4256if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4257 echo $ac_n "(cached) $ac_c" 1>&6
4258else
4259 ac_func_search_save_LIBS="$LIBS"
4260ac_cv_search_wborder="no"
4261cat > conftest.$ac_ext <<EOF
d15be926 4262#line 4263 "configure"
02d62932
MC
4263#include "confdefs.h"
4264/* Override any gcc2 internal prototype to avoid an error. */
4265/* We use char because int might match the return type of a gcc2
4266 builtin and then its argument prototype would still apply. */
4267char wborder();
4268
4269int main() {
4270wborder()
4271; return 0; }
4272EOF
d15be926 4273if { (eval echo configure:4274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4274 rm -rf conftest*
4275 ac_cv_search_wborder="none required"
4276else
4277 echo "configure: failed program was:" >&5
4278 cat conftest.$ac_ext >&5
4279fi
4280rm -f conftest*
4281test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4282LIBS="-l$i $ac_func_search_save_LIBS"
4283cat > conftest.$ac_ext <<EOF
d15be926 4284#line 4285 "configure"
02d62932
MC
4285#include "confdefs.h"
4286/* Override any gcc2 internal prototype to avoid an error. */
4287/* We use char because int might match the return type of a gcc2
4288 builtin and then its argument prototype would still apply. */
4289char wborder();
4290
4291int main() {
4292wborder()
4293; return 0; }
4294EOF
d15be926 4295if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4296 rm -rf conftest*
4297 ac_cv_search_wborder="-l$i"
4298break
4299else
4300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
4302fi
4303rm -f conftest*
4304done
4305LIBS="$ac_func_search_save_LIBS"
4306fi
4307
4308echo "$ac_t""$ac_cv_search_wborder" 1>&6
4309if test "$ac_cv_search_wborder" != "no"; then
4310 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4311
4312else :
4313 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4314fi
4315
5ee754fc
MK
4316# ------------------------- #
4317# Checks for header files. #
4318# ------------------------- #
4319
4320ac_header_dirent=no
4321for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4322do
4323ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4324echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
d15be926 4325echo "configure:4326: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4326if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4327 echo $ac_n "(cached) $ac_c" 1>&6
4328else
4329 cat > conftest.$ac_ext <<EOF
d15be926 4330#line 4331 "configure"
c906108c
SS
4331#include "confdefs.h"
4332#include <sys/types.h>
5ee754fc
MK
4333#include <$ac_hdr>
4334int main() {
4335DIR *dirp = 0;
4336; return 0; }
4337EOF
d15be926 4338if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4339 rm -rf conftest*
4340 eval "ac_cv_header_dirent_$ac_safe=yes"
4341else
4342 echo "configure: failed program was:" >&5
4343 cat conftest.$ac_ext >&5
4344 rm -rf conftest*
4345 eval "ac_cv_header_dirent_$ac_safe=no"
4346fi
4347rm -f conftest*
4348fi
4349if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4350 echo "$ac_t""yes" 1>&6
4351 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4352 cat >> confdefs.h <<EOF
4353#define $ac_tr_hdr 1
4354EOF
4355 ac_header_dirent=$ac_hdr; break
4356else
4357 echo "$ac_t""no" 1>&6
4358fi
4359done
4360# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4361if test $ac_header_dirent = dirent.h; then
4362echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
d15be926 4363echo "configure:4364: checking for opendir in -ldir" >&5
5ee754fc
MK
4364ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4365if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4366 echo $ac_n "(cached) $ac_c" 1>&6
4367else
4368 ac_save_LIBS="$LIBS"
4369LIBS="-ldir $LIBS"
4370cat > conftest.$ac_ext <<EOF
d15be926 4371#line 4372 "configure"
5ee754fc
MK
4372#include "confdefs.h"
4373/* Override any gcc2 internal prototype to avoid an error. */
4374/* We use char because int might match the return type of a gcc2
4375 builtin and then its argument prototype would still apply. */
4376char opendir();
c906108c
SS
4377
4378int main() {
5ee754fc 4379opendir()
c906108c
SS
4380; return 0; }
4381EOF
d15be926 4382if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4383 rm -rf conftest*
5ee754fc 4384 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4385else
4386 echo "configure: failed program was:" >&5
4387 cat conftest.$ac_ext >&5
4388 rm -rf conftest*
5ee754fc 4389 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4390fi
4391rm -f conftest*
5ee754fc
MK
4392LIBS="$ac_save_LIBS"
4393
4394fi
4395if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4396 echo "$ac_t""yes" 1>&6
4397 LIBS="$LIBS -ldir"
4398else
4399 echo "$ac_t""no" 1>&6
c906108c
SS
4400fi
4401
5ee754fc
MK
4402else
4403echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
d15be926 4404echo "configure:4405: checking for opendir in -lx" >&5
5ee754fc
MK
4405ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4406if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4407 echo $ac_n "(cached) $ac_c" 1>&6
4408else
4409 ac_save_LIBS="$LIBS"
4410LIBS="-lx $LIBS"
4411cat > conftest.$ac_ext <<EOF
d15be926 4412#line 4413 "configure"
5ee754fc
MK
4413#include "confdefs.h"
4414/* Override any gcc2 internal prototype to avoid an error. */
4415/* We use char because int might match the return type of a gcc2
4416 builtin and then its argument prototype would still apply. */
4417char opendir();
4418
4419int main() {
4420opendir()
4421; return 0; }
c906108c 4422EOF
d15be926 4423if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4424 rm -rf conftest*
4425 eval "ac_cv_lib_$ac_lib_var=yes"
4426else
4427 echo "configure: failed program was:" >&5
4428 cat conftest.$ac_ext >&5
4429 rm -rf conftest*
4430 eval "ac_cv_lib_$ac_lib_var=no"
4431fi
4432rm -f conftest*
4433LIBS="$ac_save_LIBS"
c906108c 4434
5ee754fc
MK
4435fi
4436if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4437 echo "$ac_t""yes" 1>&6
4438 LIBS="$LIBS -lx"
4439else
4440 echo "$ac_t""no" 1>&6
4441fi
c906108c 4442
5ee754fc 4443fi
c906108c 4444
5ee754fc 4445echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
d15be926 4446echo "configure:4447: checking whether stat file-mode macros are broken" >&5
5ee754fc 4447if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4448 echo $ac_n "(cached) $ac_c" 1>&6
4449else
4450 cat > conftest.$ac_ext <<EOF
d15be926 4451#line 4452 "configure"
9608ab8b
MK
4452#include "confdefs.h"
4453#include <sys/types.h>
5ee754fc
MK
4454#include <sys/stat.h>
4455
4456#if defined(S_ISBLK) && defined(S_IFDIR)
4457# if S_ISBLK (S_IFDIR)
4458You lose.
4459# endif
4460#endif
4461
4462#if defined(S_ISBLK) && defined(S_IFCHR)
4463# if S_ISBLK (S_IFCHR)
4464You lose.
4465# endif
4466#endif
4467
4468#if defined(S_ISLNK) && defined(S_IFREG)
4469# if S_ISLNK (S_IFREG)
4470You lose.
4471# endif
4472#endif
4473
4474#if defined(S_ISSOCK) && defined(S_IFREG)
4475# if S_ISSOCK (S_IFREG)
4476You lose.
4477# endif
4478#endif
4479
9608ab8b 4480EOF
5ee754fc
MK
4481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4482 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4483 rm -rf conftest*
5ee754fc
MK
4484 ac_cv_header_stat_broken=yes
4485else
4486 rm -rf conftest*
4487 ac_cv_header_stat_broken=no
4488fi
4489rm -f conftest*
4490
4491fi
4492
4493echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4494if test $ac_cv_header_stat_broken = yes; then
4495 cat >> confdefs.h <<\EOF
4496#define STAT_MACROS_BROKEN 1
4497EOF
4498
4499fi
4500
4501echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d15be926 4502echo "configure:4503: checking for ANSI C header files" >&5
5ee754fc
MK
4503if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505else
4506 cat > conftest.$ac_ext <<EOF
d15be926 4507#line 4508 "configure"
5ee754fc
MK
4508#include "confdefs.h"
4509#include <stdlib.h>
4510#include <stdarg.h>
4511#include <string.h>
4512#include <float.h>
4513EOF
4514ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4515{ (eval echo configure:4516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4516ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4517if test -z "$ac_err"; then
4518 rm -rf conftest*
4519 ac_cv_header_stdc=yes
4520else
4521 echo "$ac_err" >&5
4522 echo "configure: failed program was:" >&5
4523 cat conftest.$ac_ext >&5
4524 rm -rf conftest*
4525 ac_cv_header_stdc=no
4526fi
4527rm -f conftest*
4528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4531cat > conftest.$ac_ext <<EOF
d15be926 4532#line 4533 "configure"
5ee754fc
MK
4533#include "confdefs.h"
4534#include <string.h>
4535EOF
4536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4537 egrep "memchr" >/dev/null 2>&1; then
4538 :
4539else
4540 rm -rf conftest*
4541 ac_cv_header_stdc=no
4542fi
4543rm -f conftest*
4544
4545fi
4546
4547if test $ac_cv_header_stdc = yes; then
4548 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4549cat > conftest.$ac_ext <<EOF
d15be926 4550#line 4551 "configure"
5ee754fc
MK
4551#include "confdefs.h"
4552#include <stdlib.h>
4553EOF
4554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4555 egrep "free" >/dev/null 2>&1; then
4556 :
4557else
4558 rm -rf conftest*
4559 ac_cv_header_stdc=no
4560fi
4561rm -f conftest*
4562
4563fi
4564
4565if test $ac_cv_header_stdc = yes; then
4566 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4567if test "$cross_compiling" = yes; then
4568 :
4569else
4570 cat > conftest.$ac_ext <<EOF
d15be926 4571#line 4572 "configure"
5ee754fc
MK
4572#include "confdefs.h"
4573#include <ctype.h>
4574#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4575#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4576#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4577int main () { int i; for (i = 0; i < 256; i++)
4578if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4579exit (0); }
4580
4581EOF
d15be926 4582if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4583then
4584 :
9608ab8b 4585else
5ee754fc
MK
4586 echo "configure: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 rm -fr conftest*
4589 ac_cv_header_stdc=no
4590fi
4591rm -fr conftest*
4592fi
4593
4594fi
4595fi
4596
4597echo "$ac_t""$ac_cv_header_stdc" 1>&6
4598if test $ac_cv_header_stdc = yes; then
4599 cat >> confdefs.h <<\EOF
4600#define STDC_HEADERS 1
4601EOF
4602
4603fi
4604
4605for ac_hdr in link.h
4606do
4607ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4608echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4609echo "configure:4610: checking for $ac_hdr" >&5
5ee754fc
MK
4610if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4611 echo $ac_n "(cached) $ac_c" 1>&6
4612else
4613 cat > conftest.$ac_ext <<EOF
d15be926 4614#line 4615 "configure"
5ee754fc
MK
4615#include "confdefs.h"
4616#include <$ac_hdr>
4617EOF
4618ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4619{ (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4620ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4621if test -z "$ac_err"; then
4622 rm -rf conftest*
4623 eval "ac_cv_header_$ac_safe=yes"
4624else
4625 echo "$ac_err" >&5
4626 echo "configure: failed program was:" >&5
4627 cat conftest.$ac_ext >&5
4628 rm -rf conftest*
4629 eval "ac_cv_header_$ac_safe=no"
4630fi
4631rm -f conftest*
4632fi
4633if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4634 echo "$ac_t""yes" 1>&6
4635 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4636 cat >> confdefs.h <<EOF
4637#define $ac_tr_hdr 1
4638EOF
4639
4640else
4641 echo "$ac_t""no" 1>&6
4642fi
4643done
4644
78434e59 4645for ac_hdr in machine/reg.h
5ee754fc
MK
4646do
4647ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4648echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4649echo "configure:4650: checking for $ac_hdr" >&5
5ee754fc
MK
4650if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4651 echo $ac_n "(cached) $ac_c" 1>&6
4652else
4653 cat > conftest.$ac_ext <<EOF
d15be926 4654#line 4655 "configure"
5ee754fc
MK
4655#include "confdefs.h"
4656#include <$ac_hdr>
4657EOF
4658ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4659{ (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4660ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4661if test -z "$ac_err"; then
4662 rm -rf conftest*
4663 eval "ac_cv_header_$ac_safe=yes"
4664else
4665 echo "$ac_err" >&5
4666 echo "configure: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
4668 rm -rf conftest*
4669 eval "ac_cv_header_$ac_safe=no"
4670fi
4671rm -f conftest*
4672fi
4673if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4674 echo "$ac_t""yes" 1>&6
4675 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4676 cat >> confdefs.h <<EOF
4677#define $ac_tr_hdr 1
4678EOF
4679
4680else
4681 echo "$ac_t""no" 1>&6
4682fi
4683done
4684
78434e59 4685for ac_hdr in nlist.h
5ee754fc
MK
4686do
4687ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4688echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4689echo "configure:4690: checking for $ac_hdr" >&5
5ee754fc
MK
4690if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4691 echo $ac_n "(cached) $ac_c" 1>&6
4692else
4693 cat > conftest.$ac_ext <<EOF
d15be926 4694#line 4695 "configure"
5ee754fc
MK
4695#include "confdefs.h"
4696#include <$ac_hdr>
4697EOF
4698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4699{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4700ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4701if test -z "$ac_err"; then
4702 rm -rf conftest*
4703 eval "ac_cv_header_$ac_safe=yes"
4704else
4705 echo "$ac_err" >&5
4706 echo "configure: failed program was:" >&5
4707 cat conftest.$ac_ext >&5
4708 rm -rf conftest*
4709 eval "ac_cv_header_$ac_safe=no"
4710fi
4711rm -f conftest*
4712fi
4713if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4714 echo "$ac_t""yes" 1>&6
4715 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4716 cat >> confdefs.h <<EOF
4717#define $ac_tr_hdr 1
4718EOF
4719
4720else
4721 echo "$ac_t""no" 1>&6
4722fi
4723done
4724
78434e59 4725for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4726do
4727ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4728echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4729echo "configure:4730: checking for $ac_hdr" >&5
5ee754fc
MK
4730if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4731 echo $ac_n "(cached) $ac_c" 1>&6
4732else
4733 cat > conftest.$ac_ext <<EOF
d15be926 4734#line 4735 "configure"
5ee754fc
MK
4735#include "confdefs.h"
4736#include <$ac_hdr>
4737EOF
4738ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4739{ (eval echo configure:4740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4740ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4741if test -z "$ac_err"; then
4742 rm -rf conftest*
4743 eval "ac_cv_header_$ac_safe=yes"
4744else
4745 echo "$ac_err" >&5
4746 echo "configure: failed program was:" >&5
4747 cat conftest.$ac_ext >&5
4748 rm -rf conftest*
4749 eval "ac_cv_header_$ac_safe=no"
4750fi
4751rm -f conftest*
4752fi
4753if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4754 echo "$ac_t""yes" 1>&6
4755 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4756 cat >> confdefs.h <<EOF
4757#define $ac_tr_hdr 1
4758EOF
4759
4760else
4761 echo "$ac_t""no" 1>&6
4762fi
4763done
4764
a2f23071 4765for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4766do
4767ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4768echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4769echo "configure:4770: checking for $ac_hdr" >&5
5ee754fc
MK
4770if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4772else
4773 cat > conftest.$ac_ext <<EOF
d15be926 4774#line 4775 "configure"
5ee754fc
MK
4775#include "confdefs.h"
4776#include <$ac_hdr>
4777EOF
4778ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4779{ (eval echo configure:4780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4780ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4781if test -z "$ac_err"; then
4782 rm -rf conftest*
4783 eval "ac_cv_header_$ac_safe=yes"
4784else
4785 echo "$ac_err" >&5
4786 echo "configure: failed program was:" >&5
4787 cat conftest.$ac_ext >&5
4788 rm -rf conftest*
4789 eval "ac_cv_header_$ac_safe=no"
4790fi
4791rm -f conftest*
4792fi
4793if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4794 echo "$ac_t""yes" 1>&6
4795 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4796 cat >> confdefs.h <<EOF
4797#define $ac_tr_hdr 1
4798EOF
4799
4800else
4801 echo "$ac_t""no" 1>&6
4802fi
4803done
4804
78434e59 4805for ac_hdr in stddef.h
5ee754fc
MK
4806do
4807ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4808echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4809echo "configure:4810: checking for $ac_hdr" >&5
5ee754fc
MK
4810if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4811 echo $ac_n "(cached) $ac_c" 1>&6
4812else
4813 cat > conftest.$ac_ext <<EOF
d15be926 4814#line 4815 "configure"
5ee754fc
MK
4815#include "confdefs.h"
4816#include <$ac_hdr>
4817EOF
4818ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4819{ (eval echo configure:4820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4820ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4821if test -z "$ac_err"; then
4822 rm -rf conftest*
4823 eval "ac_cv_header_$ac_safe=yes"
4824else
4825 echo "$ac_err" >&5
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -rf conftest*
4829 eval "ac_cv_header_$ac_safe=no"
4830fi
4831rm -f conftest*
4832fi
4833if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4834 echo "$ac_t""yes" 1>&6
4835 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4836 cat >> confdefs.h <<EOF
4837#define $ac_tr_hdr 1
4838EOF
4839
4840else
4841 echo "$ac_t""no" 1>&6
4842fi
4843done
4844
78434e59 4845for ac_hdr in stdlib.h
5ee754fc
MK
4846do
4847ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4848echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4849echo "configure:4850: checking for $ac_hdr" >&5
5ee754fc
MK
4850if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4851 echo $ac_n "(cached) $ac_c" 1>&6
4852else
4853 cat > conftest.$ac_ext <<EOF
d15be926 4854#line 4855 "configure"
5ee754fc
MK
4855#include "confdefs.h"
4856#include <$ac_hdr>
4857EOF
4858ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4859{ (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4860ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4861if test -z "$ac_err"; then
4862 rm -rf conftest*
4863 eval "ac_cv_header_$ac_safe=yes"
4864else
4865 echo "$ac_err" >&5
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4868 rm -rf conftest*
4869 eval "ac_cv_header_$ac_safe=no"
4870fi
4871rm -f conftest*
4872fi
4873if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4874 echo "$ac_t""yes" 1>&6
4875 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4876 cat >> confdefs.h <<EOF
4877#define $ac_tr_hdr 1
4878EOF
4879
4880else
4881 echo "$ac_t""no" 1>&6
4882fi
4883done
4884
78434e59 4885for ac_hdr in stdint.h
5ee754fc
MK
4886do
4887ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4888echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4889echo "configure:4890: checking for $ac_hdr" >&5
5ee754fc
MK
4890if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4891 echo $ac_n "(cached) $ac_c" 1>&6
4892else
4893 cat > conftest.$ac_ext <<EOF
d15be926 4894#line 4895 "configure"
5ee754fc
MK
4895#include "confdefs.h"
4896#include <$ac_hdr>
4897EOF
4898ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4899{ (eval echo configure:4900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4900ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4901if test -z "$ac_err"; then
4902 rm -rf conftest*
4903 eval "ac_cv_header_$ac_safe=yes"
4904else
4905 echo "$ac_err" >&5
4906 echo "configure: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 rm -rf conftest*
4909 eval "ac_cv_header_$ac_safe=no"
4910fi
4911rm -f conftest*
4912fi
4913if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4914 echo "$ac_t""yes" 1>&6
4915 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4916 cat >> confdefs.h <<EOF
4917#define $ac_tr_hdr 1
4918EOF
4919
4920else
4921 echo "$ac_t""no" 1>&6
4922fi
4923done
4924
78434e59 4925for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4926do
4927ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4928echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4929echo "configure:4930: checking for $ac_hdr" >&5
5ee754fc
MK
4930if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4931 echo $ac_n "(cached) $ac_c" 1>&6
4932else
4933 cat > conftest.$ac_ext <<EOF
d15be926 4934#line 4935 "configure"
5ee754fc
MK
4935#include "confdefs.h"
4936#include <$ac_hdr>
4937EOF
4938ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4939{ (eval echo configure:4940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4940ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4941if test -z "$ac_err"; then
4942 rm -rf conftest*
4943 eval "ac_cv_header_$ac_safe=yes"
4944else
4945 echo "$ac_err" >&5
4946 echo "configure: failed program was:" >&5
4947 cat conftest.$ac_ext >&5
4948 rm -rf conftest*
4949 eval "ac_cv_header_$ac_safe=no"
4950fi
4951rm -f conftest*
4952fi
4953if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4954 echo "$ac_t""yes" 1>&6
4955 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4956 cat >> confdefs.h <<EOF
4957#define $ac_tr_hdr 1
4958EOF
4959
4960else
4961 echo "$ac_t""no" 1>&6
4962fi
4963done
4964
78434e59 4965for ac_hdr in sys/fault.h
5ee754fc
MK
4966do
4967ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4968echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 4969echo "configure:4970: checking for $ac_hdr" >&5
5ee754fc
MK
4970if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4971 echo $ac_n "(cached) $ac_c" 1>&6
4972else
4973 cat > conftest.$ac_ext <<EOF
d15be926 4974#line 4975 "configure"
5ee754fc
MK
4975#include "confdefs.h"
4976#include <$ac_hdr>
4977EOF
4978ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 4979{ (eval echo configure:4980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4980ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4981if test -z "$ac_err"; then
4982 rm -rf conftest*
4983 eval "ac_cv_header_$ac_safe=yes"
4984else
4985 echo "$ac_err" >&5
4986 echo "configure: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 rm -rf conftest*
4989 eval "ac_cv_header_$ac_safe=no"
4990fi
4991rm -f conftest*
4992fi
4993if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4994 echo "$ac_t""yes" 1>&6
4995 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4996 cat >> confdefs.h <<EOF
4997#define $ac_tr_hdr 1
4998EOF
4999
5000else
5001 echo "$ac_t""no" 1>&6
5002fi
5003done
5004
78434e59 5005for ac_hdr in sys/file.h
5ee754fc
MK
5006do
5007ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5008echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5009echo "configure:5010: checking for $ac_hdr" >&5
5ee754fc
MK
5010if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5011 echo $ac_n "(cached) $ac_c" 1>&6
5012else
5013 cat > conftest.$ac_ext <<EOF
d15be926 5014#line 5015 "configure"
5ee754fc
MK
5015#include "confdefs.h"
5016#include <$ac_hdr>
5017EOF
5018ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5019{ (eval echo configure:5020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5020ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5021if test -z "$ac_err"; then
5022 rm -rf conftest*
5023 eval "ac_cv_header_$ac_safe=yes"
5024else
5025 echo "$ac_err" >&5
5026 echo "configure: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 rm -rf conftest*
5029 eval "ac_cv_header_$ac_safe=no"
5030fi
5031rm -f conftest*
5032fi
5033if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5034 echo "$ac_t""yes" 1>&6
5035 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5036 cat >> confdefs.h <<EOF
5037#define $ac_tr_hdr 1
5038EOF
5039
5040else
5041 echo "$ac_t""no" 1>&6
5042fi
5043done
5044
78434e59 5045for ac_hdr in sys/filio.h
5ee754fc
MK
5046do
5047ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5048echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5049echo "configure:5050: checking for $ac_hdr" >&5
5ee754fc
MK
5050if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5051 echo $ac_n "(cached) $ac_c" 1>&6
5052else
5053 cat > conftest.$ac_ext <<EOF
d15be926 5054#line 5055 "configure"
5ee754fc
MK
5055#include "confdefs.h"
5056#include <$ac_hdr>
5057EOF
5058ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5059{ (eval echo configure:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5060ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5061if test -z "$ac_err"; then
5062 rm -rf conftest*
5063 eval "ac_cv_header_$ac_safe=yes"
5064else
5065 echo "$ac_err" >&5
5066 echo "configure: failed program was:" >&5
5067 cat conftest.$ac_ext >&5
5068 rm -rf conftest*
5069 eval "ac_cv_header_$ac_safe=no"
5070fi
5071rm -f conftest*
5072fi
5073if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5074 echo "$ac_t""yes" 1>&6
5075 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5076 cat >> confdefs.h <<EOF
5077#define $ac_tr_hdr 1
5078EOF
5079
5080else
5081 echo "$ac_t""no" 1>&6
5082fi
5083done
5084
78434e59 5085for ac_hdr in sys/ioctl.h
5ee754fc
MK
5086do
5087ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5088echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5089echo "configure:5090: checking for $ac_hdr" >&5
5ee754fc
MK
5090if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5091 echo $ac_n "(cached) $ac_c" 1>&6
5092else
5093 cat > conftest.$ac_ext <<EOF
d15be926 5094#line 5095 "configure"
5ee754fc
MK
5095#include "confdefs.h"
5096#include <$ac_hdr>
5097EOF
5098ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5099{ (eval echo configure:5100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5100ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5101if test -z "$ac_err"; then
5102 rm -rf conftest*
5103 eval "ac_cv_header_$ac_safe=yes"
5104else
5105 echo "$ac_err" >&5
5106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5108 rm -rf conftest*
5109 eval "ac_cv_header_$ac_safe=no"
5110fi
5111rm -f conftest*
5112fi
5113if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5114 echo "$ac_t""yes" 1>&6
5115 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5116 cat >> confdefs.h <<EOF
5117#define $ac_tr_hdr 1
5118EOF
5119
5120else
5121 echo "$ac_t""no" 1>&6
5122fi
5123done
5124
78434e59 5125for ac_hdr in sys/param.h
5ee754fc
MK
5126do
5127ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5128echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5129echo "configure:5130: checking for $ac_hdr" >&5
5ee754fc
MK
5130if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132else
5133 cat > conftest.$ac_ext <<EOF
d15be926 5134#line 5135 "configure"
5ee754fc
MK
5135#include "confdefs.h"
5136#include <$ac_hdr>
5137EOF
5138ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5139{ (eval echo configure:5140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5140ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5141if test -z "$ac_err"; then
5142 rm -rf conftest*
5143 eval "ac_cv_header_$ac_safe=yes"
5144else
5145 echo "$ac_err" >&5
5146 echo "configure: failed program was:" >&5
5147 cat conftest.$ac_ext >&5
5148 rm -rf conftest*
5149 eval "ac_cv_header_$ac_safe=no"
5150fi
5151rm -f conftest*
5152fi
5153if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5154 echo "$ac_t""yes" 1>&6
5155 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5156 cat >> confdefs.h <<EOF
5157#define $ac_tr_hdr 1
5158EOF
5159
5160else
5161 echo "$ac_t""no" 1>&6
5162fi
5163done
5164
78434e59 5165for ac_hdr in sys/proc.h
5ee754fc
MK
5166do
5167ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5168echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5169echo "configure:5170: checking for $ac_hdr" >&5
5ee754fc
MK
5170if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5171 echo $ac_n "(cached) $ac_c" 1>&6
5172else
5173 cat > conftest.$ac_ext <<EOF
d15be926 5174#line 5175 "configure"
5ee754fc
MK
5175#include "confdefs.h"
5176#include <$ac_hdr>
5177EOF
5178ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5179{ (eval echo configure:5180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5180ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5181if test -z "$ac_err"; then
5182 rm -rf conftest*
5183 eval "ac_cv_header_$ac_safe=yes"
5184else
5185 echo "$ac_err" >&5
5186 echo "configure: failed program was:" >&5
5187 cat conftest.$ac_ext >&5
5188 rm -rf conftest*
5189 eval "ac_cv_header_$ac_safe=no"
5190fi
5191rm -f conftest*
5192fi
5193if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5194 echo "$ac_t""yes" 1>&6
5195 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5196 cat >> confdefs.h <<EOF
5197#define $ac_tr_hdr 1
5198EOF
5199
5200else
5201 echo "$ac_t""no" 1>&6
5202fi
5203done
5204
78434e59 5205for ac_hdr in sys/procfs.h
5ee754fc
MK
5206do
5207ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5208echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5209echo "configure:5210: checking for $ac_hdr" >&5
5ee754fc
MK
5210if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5211 echo $ac_n "(cached) $ac_c" 1>&6
5212else
5213 cat > conftest.$ac_ext <<EOF
d15be926 5214#line 5215 "configure"
5ee754fc
MK
5215#include "confdefs.h"
5216#include <$ac_hdr>
5217EOF
5218ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5219{ (eval echo configure:5220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5220ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5221if test -z "$ac_err"; then
5222 rm -rf conftest*
5223 eval "ac_cv_header_$ac_safe=yes"
5224else
5225 echo "$ac_err" >&5
5226 echo "configure: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228 rm -rf conftest*
5229 eval "ac_cv_header_$ac_safe=no"
5230fi
5231rm -f conftest*
5232fi
5233if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5234 echo "$ac_t""yes" 1>&6
5235 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5236 cat >> confdefs.h <<EOF
5237#define $ac_tr_hdr 1
5238EOF
5239
5240else
5241 echo "$ac_t""no" 1>&6
5242fi
5243done
5244
78434e59 5245for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5246do
5247ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5248echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5249echo "configure:5250: checking for $ac_hdr" >&5
5ee754fc
MK
5250if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5251 echo $ac_n "(cached) $ac_c" 1>&6
5252else
5253 cat > conftest.$ac_ext <<EOF
d15be926 5254#line 5255 "configure"
5ee754fc
MK
5255#include "confdefs.h"
5256#include <$ac_hdr>
5257EOF
5258ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5259{ (eval echo configure:5260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5260ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5261if test -z "$ac_err"; then
5262 rm -rf conftest*
5263 eval "ac_cv_header_$ac_safe=yes"
5264else
5265 echo "$ac_err" >&5
5266 echo "configure: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5268 rm -rf conftest*
5269 eval "ac_cv_header_$ac_safe=no"
5270fi
5271rm -f conftest*
5272fi
5273if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5274 echo "$ac_t""yes" 1>&6
5275 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5276 cat >> confdefs.h <<EOF
5277#define $ac_tr_hdr 1
5278EOF
5279
5280else
5281 echo "$ac_t""no" 1>&6
5282fi
5283done
5284
78434e59 5285for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5286do
5287ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5288echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5289echo "configure:5290: checking for $ac_hdr" >&5
5ee754fc
MK
5290if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5291 echo $ac_n "(cached) $ac_c" 1>&6
5292else
5293 cat > conftest.$ac_ext <<EOF
d15be926 5294#line 5295 "configure"
5ee754fc
MK
5295#include "confdefs.h"
5296#include <$ac_hdr>
5297EOF
5298ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5299{ (eval echo configure:5300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5300ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5301if test -z "$ac_err"; then
5302 rm -rf conftest*
5303 eval "ac_cv_header_$ac_safe=yes"
5304else
5305 echo "$ac_err" >&5
5306 echo "configure: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
5308 rm -rf conftest*
5309 eval "ac_cv_header_$ac_safe=no"
5310fi
5311rm -f conftest*
5312fi
5313if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5314 echo "$ac_t""yes" 1>&6
5315 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5316 cat >> confdefs.h <<EOF
5317#define $ac_tr_hdr 1
5318EOF
5319
5320else
5321 echo "$ac_t""no" 1>&6
5322fi
5323done
5324
78434e59 5325for ac_hdr in sys/select.h
5ee754fc
MK
5326do
5327ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5328echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5329echo "configure:5330: checking for $ac_hdr" >&5
5ee754fc
MK
5330if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5331 echo $ac_n "(cached) $ac_c" 1>&6
5332else
5333 cat > conftest.$ac_ext <<EOF
d15be926 5334#line 5335 "configure"
5ee754fc
MK
5335#include "confdefs.h"
5336#include <$ac_hdr>
5337EOF
5338ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5339{ (eval echo configure:5340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5340ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5341if test -z "$ac_err"; then
5342 rm -rf conftest*
5343 eval "ac_cv_header_$ac_safe=yes"
5344else
5345 echo "$ac_err" >&5
5346 echo "configure: failed program was:" >&5
5347 cat conftest.$ac_ext >&5
5348 rm -rf conftest*
5349 eval "ac_cv_header_$ac_safe=no"
5350fi
5351rm -f conftest*
5352fi
5353if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5354 echo "$ac_t""yes" 1>&6
5355 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5356 cat >> confdefs.h <<EOF
5357#define $ac_tr_hdr 1
5358EOF
5359
5360else
5361 echo "$ac_t""no" 1>&6
5362fi
5363done
5364
78434e59 5365for ac_hdr in sys/syscall.h
5ee754fc
MK
5366do
5367ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5368echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5369echo "configure:5370: checking for $ac_hdr" >&5
5ee754fc
MK
5370if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5371 echo $ac_n "(cached) $ac_c" 1>&6
5372else
5373 cat > conftest.$ac_ext <<EOF
d15be926 5374#line 5375 "configure"
5ee754fc
MK
5375#include "confdefs.h"
5376#include <$ac_hdr>
5377EOF
5378ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5379{ (eval echo configure:5380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5380ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5381if test -z "$ac_err"; then
5382 rm -rf conftest*
5383 eval "ac_cv_header_$ac_safe=yes"
5384else
5385 echo "$ac_err" >&5
5386 echo "configure: failed program was:" >&5
5387 cat conftest.$ac_ext >&5
5388 rm -rf conftest*
5389 eval "ac_cv_header_$ac_safe=no"
5390fi
5391rm -f conftest*
5392fi
5393if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5394 echo "$ac_t""yes" 1>&6
5395 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5396 cat >> confdefs.h <<EOF
5397#define $ac_tr_hdr 1
5398EOF
5399
5400else
5401 echo "$ac_t""no" 1>&6
5402fi
5403done
5404
78434e59 5405for ac_hdr in sys/user.h
5ee754fc
MK
5406do
5407ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5408echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5409echo "configure:5410: checking for $ac_hdr" >&5
5ee754fc
MK
5410if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5411 echo $ac_n "(cached) $ac_c" 1>&6
5412else
5413 cat > conftest.$ac_ext <<EOF
d15be926 5414#line 5415 "configure"
5ee754fc
MK
5415#include "confdefs.h"
5416#include <$ac_hdr>
5417EOF
5418ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5419{ (eval echo configure:5420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5420ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5421if test -z "$ac_err"; then
5422 rm -rf conftest*
5423 eval "ac_cv_header_$ac_safe=yes"
5424else
5425 echo "$ac_err" >&5
9608ab8b
MK
5426 echo "configure: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
5428 rm -rf conftest*
5ee754fc 5429 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5430fi
5431rm -f conftest*
5432fi
5ee754fc 5433if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5434 echo "$ac_t""yes" 1>&6
5435 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5436 cat >> confdefs.h <<EOF
5437#define $ac_tr_hdr 1
5438EOF
5ee754fc 5439
9608ab8b
MK
5440else
5441 echo "$ac_t""no" 1>&6
5442fi
5443done
5ee754fc 5444
78434e59 5445for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5446do
5447ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5448echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5449echo "configure:5450: checking for $ac_hdr" >&5
5ee754fc 5450if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5451 echo $ac_n "(cached) $ac_c" 1>&6
5452else
5ee754fc 5453 cat > conftest.$ac_ext <<EOF
d15be926 5454#line 5455 "configure"
9608ab8b 5455#include "confdefs.h"
5ee754fc 5456#include <$ac_hdr>
9608ab8b 5457EOF
5ee754fc 5458ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5459{ (eval echo configure:5460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5460ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5461if test -z "$ac_err"; then
9608ab8b 5462 rm -rf conftest*
5ee754fc 5463 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5464else
5ee754fc 5465 echo "$ac_err" >&5
9608ab8b
MK
5466 echo "configure: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 rm -rf conftest*
5ee754fc 5469 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5470fi
5471rm -f conftest*
9608ab8b 5472fi
5ee754fc 5473if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5474 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5475 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5476 cat >> confdefs.h <<EOF
5477#define $ac_tr_hdr 1
5478EOF
5479
9608ab8b
MK
5480else
5481 echo "$ac_t""no" 1>&6
5482fi
5ee754fc 5483done
9608ab8b 5484
78434e59 5485for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5486do
5487ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5488echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5489echo "configure:5490: checking for $ac_hdr" >&5
5ee754fc 5490if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5491 echo $ac_n "(cached) $ac_c" 1>&6
5492else
5ee754fc 5493 cat > conftest.$ac_ext <<EOF
d15be926 5494#line 5495 "configure"
9608ab8b 5495#include "confdefs.h"
5ee754fc 5496#include <$ac_hdr>
9608ab8b 5497EOF
5ee754fc 5498ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5499{ (eval echo configure:5500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5500ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5501if test -z "$ac_err"; then
9608ab8b 5502 rm -rf conftest*
5ee754fc 5503 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5504else
5ee754fc 5505 echo "$ac_err" >&5
9608ab8b
MK
5506 echo "configure: failed program was:" >&5
5507 cat conftest.$ac_ext >&5
5508 rm -rf conftest*
5ee754fc 5509 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5510fi
5511rm -f conftest*
9608ab8b 5512fi
5ee754fc 5513if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5514 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5515 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5516 cat >> confdefs.h <<EOF
5517#define $ac_tr_hdr 1
5518EOF
5519
9608ab8b
MK
5520else
5521 echo "$ac_t""no" 1>&6
5522fi
5ee754fc 5523done
9608ab8b 5524
78434e59
MK
5525for ac_hdr in unistd.h
5526do
5527ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5528echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5529echo "configure:5530: checking for $ac_hdr" >&5
78434e59
MK
5530if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5531 echo $ac_n "(cached) $ac_c" 1>&6
5532else
5533 cat > conftest.$ac_ext <<EOF
d15be926 5534#line 5535 "configure"
78434e59
MK
5535#include "confdefs.h"
5536#include <$ac_hdr>
5537EOF
5538ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5539{ (eval echo configure:5540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5540ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5541if test -z "$ac_err"; then
5542 rm -rf conftest*
5543 eval "ac_cv_header_$ac_safe=yes"
5544else
5545 echo "$ac_err" >&5
5546 echo "configure: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548 rm -rf conftest*
5549 eval "ac_cv_header_$ac_safe=no"
5550fi
5551rm -f conftest*
5552fi
5553if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5554 echo "$ac_t""yes" 1>&6
5555 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5556 cat >> confdefs.h <<EOF
5557#define $ac_tr_hdr 1
5558EOF
5559
5560else
5561 echo "$ac_t""no" 1>&6
5562fi
5563done
5564
9608ab8b 5565
b1d19a62 5566# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5ee754fc
MK
5567# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5568# think that we don't have <curses.h> if we're using GCC.
5569case $host_os in
b1d19a62 5570 solaris2.[789])
5ee754fc
MK
5571 if test "$GCC" = yes; then
5572 cat >> confdefs.h <<\EOF
5573#define _MSE_INT_H 1
5574EOF
5575
5576 fi ;;
5577esac
5578for ac_hdr in curses.h ncurses.h term.h
5579do
5580ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5581echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5582echo "configure:5583: checking for $ac_hdr" >&5
5ee754fc 5583if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5584 echo $ac_n "(cached) $ac_c" 1>&6
5585else
5586 cat > conftest.$ac_ext <<EOF
d15be926 5587#line 5588 "configure"
c906108c 5588#include "confdefs.h"
5ee754fc 5589#include <$ac_hdr>
c906108c
SS
5590EOF
5591ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5592{ (eval echo configure:5593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5593ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5594if test -z "$ac_err"; then
5595 rm -rf conftest*
5ee754fc 5596 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5597else
5598 echo "$ac_err" >&5
5599 echo "configure: failed program was:" >&5
5600 cat conftest.$ac_ext >&5
5601 rm -rf conftest*
5ee754fc 5602 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5603fi
5604rm -f conftest*
c906108c 5605fi
5ee754fc
MK
5606if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5607 echo "$ac_t""yes" 1>&6
5608 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5609 cat >> confdefs.h <<EOF
5610#define $ac_tr_hdr 1
c906108c 5611EOF
5ee754fc 5612
c906108c 5613else
5ee754fc 5614 echo "$ac_t""no" 1>&6
c906108c 5615fi
5ee754fc 5616done
c906108c
SS
5617
5618
5ee754fc
MK
5619# FIXME: kettenis/20030102: In most cases we include these
5620# unconditionally, so what's the point in checking these?
5621for ac_hdr in ctype.h time.h
c906108c
SS
5622do
5623ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5624echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 5625echo "configure:5626: checking for $ac_hdr" >&5
c906108c
SS
5626if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5627 echo $ac_n "(cached) $ac_c" 1>&6
5628else
5629 cat > conftest.$ac_ext <<EOF
d15be926 5630#line 5631 "configure"
c906108c
SS
5631#include "confdefs.h"
5632#include <$ac_hdr>
5633EOF
5634ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 5635{ (eval echo configure:5636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5636ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5637if test -z "$ac_err"; then
5638 rm -rf conftest*
5639 eval "ac_cv_header_$ac_safe=yes"
5640else
5641 echo "$ac_err" >&5
5642 echo "configure: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 rm -rf conftest*
5645 eval "ac_cv_header_$ac_safe=no"
5646fi
5647rm -f conftest*
5648fi
5649if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5650 echo "$ac_t""yes" 1>&6
5651 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5652 cat >> confdefs.h <<EOF
5653#define $ac_tr_hdr 1
5654EOF
5655
5656else
5657 echo "$ac_t""no" 1>&6
5658fi
5659done
5660
5ee754fc 5661
40a7debc 5662echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
d15be926 5663echo "configure:5664: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5664if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5665 echo $ac_n "(cached) $ac_c" 1>&6
5666else
5667 cat > conftest.$ac_ext <<EOF
d15be926 5668#line 5669 "configure"
40a7debc
EZ
5669#include "confdefs.h"
5670#include <sys/types.h>
5671#include <sys/stat.h>
5672int main() {
5673struct stat st; (void) st.st_blocks;
5674; return 0; }
5675EOF
d15be926 5676if { (eval echo configure:5677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5677 rm -rf conftest*
5678 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5679else
5680 echo "configure: failed program was:" >&5
5681 cat conftest.$ac_ext >&5
5682 rm -rf conftest*
5683 gdb_cv_have_struct_stat_with_st_blocks_member=no
5684fi
5685rm -f conftest*
5686fi
5687
5688echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5689if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5690 cat >> confdefs.h <<\EOF
5691#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5692EOF
5693
5694fi
b9362cc7
AC
5695# ------------------------- #
5696# Checks for declarations. #
5697# ------------------------- #
5698
5699for ac_func in getopt
5700do
5701 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5702echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
d15be926 5703echo "configure:5704: checking whether $ac_func is declared" >&5
b9362cc7
AC
5704if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
5706else
5707 cat > conftest.$ac_ext <<EOF
d15be926 5708#line 5709 "configure"
b9362cc7
AC
5709#include "confdefs.h"
5710#undef $ac_tr_decl
5711#define $ac_tr_decl 1
5712
5713
5714int main() {
5715#ifndef $ac_func
5716char *(*pfn) = (char *(*)) $ac_func ;
5717#endif
5718; return 0; }
5719EOF
d15be926 5720if { (eval echo configure:5721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5721 rm -rf conftest*
5722 eval "gcc_cv_have_decl_$ac_func=yes"
5723else
5724 echo "configure: failed program was:" >&5
5725 cat conftest.$ac_ext >&5
5726 rm -rf conftest*
5727 eval "gcc_cv_have_decl_$ac_func=no"
5728fi
5729rm -f conftest*
5730fi
5731
5732if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5733 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5734#define $ac_tr_decl 1
5735EOF
5736
5737else
5738 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5739#define $ac_tr_decl 0
5740EOF
5741
5742fi
5743
5744done
5745if test x = y ; then
5746 cat >> confdefs.h <<\EOF
5747#define HAVE_DECL_GETOPT 1
5748EOF
5749fi
5750
5751
5ee754fc
MK
5752# ------------------ #
5753# Checks for types. #
5754# ------------------ #
5755
5756echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
d15be926 5757echo "configure:5758: checking return type of signal handlers" >&5
5ee754fc 5758if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5759 echo $ac_n "(cached) $ac_c" 1>&6
5760else
5761 cat > conftest.$ac_ext <<EOF
d15be926 5762#line 5763 "configure"
c906108c
SS
5763#include "confdefs.h"
5764#include <sys/types.h>
5ee754fc
MK
5765#include <signal.h>
5766#ifdef signal
5767#undef signal
c906108c 5768#endif
5ee754fc
MK
5769#ifdef __cplusplus
5770extern "C" void (*signal (int, void (*)(int)))(int);
5771#else
5772void (*signal ()) ();
c906108c
SS
5773#endif
5774
5ee754fc
MK
5775int main() {
5776int i;
5777; return 0; }
c906108c 5778EOF
d15be926 5779if { (eval echo configure:5780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5780 rm -rf conftest*
5ee754fc 5781 ac_cv_type_signal=void
c906108c 5782else
5ee754fc
MK
5783 echo "configure: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
c906108c 5785 rm -rf conftest*
5ee754fc 5786 ac_cv_type_signal=int
c906108c
SS
5787fi
5788rm -f conftest*
c906108c
SS
5789fi
5790
5ee754fc
MK
5791echo "$ac_t""$ac_cv_type_signal" 1>&6
5792cat >> confdefs.h <<EOF
5793#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5794EOF
5795
c906108c
SS
5796
5797
5ee754fc
MK
5798# ------------------------------------- #
5799# Checks for compiler characteristics. #
5800# ------------------------------------- #
5801
c906108c 5802echo $ac_n "checking for working const""... $ac_c" 1>&6
d15be926 5803echo "configure:5804: checking for working const" >&5
c906108c
SS
5804if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5805 echo $ac_n "(cached) $ac_c" 1>&6
5806else
5807 cat > conftest.$ac_ext <<EOF
d15be926 5808#line 5809 "configure"
c906108c
SS
5809#include "confdefs.h"
5810
5811int main() {
5812
5813/* Ultrix mips cc rejects this. */
5814typedef int charset[2]; const charset x;
5815/* SunOS 4.1.1 cc rejects this. */
5816char const *const *ccp;
5817char **p;
5818/* NEC SVR4.0.2 mips cc rejects this. */
5819struct point {int x, y;};
5820static struct point const zero = {0,0};
5821/* AIX XL C 1.02.0.0 rejects this.
5822 It does not let you subtract one const X* pointer from another in an arm
5823 of an if-expression whose if-part is not a constant expression */
5824const char *g = "string";
5825ccp = &g + (g ? g-g : 0);
5826/* HPUX 7.0 cc rejects these. */
5827++ccp;
5828p = (char**) ccp;
5829ccp = (char const *const *) p;
5830{ /* SCO 3.2v4 cc rejects this. */
5831 char *t;
5832 char const *s = 0 ? (char *) 0 : (char const *) 0;
5833
5834 *t++ = 0;
5835}
5836{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5837 int x[] = {25, 17};
5838 const int *foo = &x[0];
5839 ++foo;
5840}
5841{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5842 typedef const int *iptr;
5843 iptr p = 0;
5844 ++p;
5845}
5846{ /* AIX XL C 1.02.0.0 rejects this saying
5847 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5848 struct s { int j; const int *ap[3]; };
5849 struct s *b; b->j = 5;
5850}
5851{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5852 const int foo = 10;
5853}
5854
5855; return 0; }
5856EOF
d15be926 5857if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5858 rm -rf conftest*
5859 ac_cv_c_const=yes
5860else
5861 echo "configure: failed program was:" >&5
5862 cat conftest.$ac_ext >&5
5863 rm -rf conftest*
5864 ac_cv_c_const=no
5865fi
5866rm -f conftest*
5867fi
5868
5869echo "$ac_t""$ac_cv_c_const" 1>&6
5870if test $ac_cv_c_const = no; then
5871 cat >> confdefs.h <<\EOF
5872#define const
5873EOF
5874
5875fi
5876
bce58c09 5877echo $ac_n "checking for inline""... $ac_c" 1>&6
d15be926 5878echo "configure:5879: checking for inline" >&5
bce58c09
JB
5879if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5880 echo $ac_n "(cached) $ac_c" 1>&6
5881else
5882 ac_cv_c_inline=no
5883for ac_kw in inline __inline__ __inline; do
5884 cat > conftest.$ac_ext <<EOF
d15be926 5885#line 5886 "configure"
bce58c09
JB
5886#include "confdefs.h"
5887
5888int main() {
5889} $ac_kw foo() {
5890; return 0; }
5891EOF
d15be926 5892if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5893 rm -rf conftest*
5894 ac_cv_c_inline=$ac_kw; break
5895else
5896 echo "configure: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5898fi
5899rm -f conftest*
5900done
5901
5902fi
5903
5904echo "$ac_t""$ac_cv_c_inline" 1>&6
5905case "$ac_cv_c_inline" in
5906 inline | yes) ;;
5907 no) cat >> confdefs.h <<\EOF
5908#define inline
5909EOF
5910 ;;
5911 *) cat >> confdefs.h <<EOF
5912#define inline $ac_cv_c_inline
5913EOF
5914 ;;
5915esac
5916
c906108c 5917
5ee754fc
MK
5918# ------------------------------ #
5919# Checks for library functions. #
5920# ------------------------------ #
5921
46711df8
MK
5922# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5923# for constant arguments. Useless!
5924echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d15be926 5925echo "configure:5926: checking for working alloca.h" >&5
46711df8
MK
5926if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5927 echo $ac_n "(cached) $ac_c" 1>&6
5928else
5929 cat > conftest.$ac_ext <<EOF
d15be926 5930#line 5931 "configure"
46711df8
MK
5931#include "confdefs.h"
5932#include <alloca.h>
5933int main() {
5934char *p = alloca(2 * sizeof(int));
5935; return 0; }
5936EOF
d15be926 5937if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5938 rm -rf conftest*
5939 ac_cv_header_alloca_h=yes
5940else
5941 echo "configure: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5943 rm -rf conftest*
5944 ac_cv_header_alloca_h=no
5945fi
5946rm -f conftest*
5947fi
5948
5949echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5950if test $ac_cv_header_alloca_h = yes; then
5951 cat >> confdefs.h <<\EOF
5952#define HAVE_ALLOCA_H 1
5953EOF
5954
5955fi
5956
5957echo $ac_n "checking for alloca""... $ac_c" 1>&6
d15be926 5958echo "configure:5959: checking for alloca" >&5
46711df8
MK
5959if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5960 echo $ac_n "(cached) $ac_c" 1>&6
5961else
5962 cat > conftest.$ac_ext <<EOF
d15be926 5963#line 5964 "configure"
46711df8
MK
5964#include "confdefs.h"
5965
5966#ifdef __GNUC__
5967# define alloca __builtin_alloca
5968#else
5969# ifdef _MSC_VER
5970# include <malloc.h>
5971# define alloca _alloca
5972# else
5973# if HAVE_ALLOCA_H
5974# include <alloca.h>
5975# else
5976# ifdef _AIX
5977 #pragma alloca
5978# else
5979# ifndef alloca /* predefined by HP cc +Olibcalls */
5980char *alloca ();
5981# endif
5982# endif
5983# endif
5984# endif
5985#endif
5986
5987int main() {
5988char *p = (char *) alloca(1);
5989; return 0; }
5990EOF
d15be926 5991if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5992 rm -rf conftest*
5993 ac_cv_func_alloca_works=yes
5994else
5995 echo "configure: failed program was:" >&5
5996 cat conftest.$ac_ext >&5
5997 rm -rf conftest*
5998 ac_cv_func_alloca_works=no
5999fi
6000rm -f conftest*
6001fi
6002
6003echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6004if test $ac_cv_func_alloca_works = yes; then
6005 cat >> confdefs.h <<\EOF
6006#define HAVE_ALLOCA 1
6007EOF
6008
6009fi
6010
6011if test $ac_cv_func_alloca_works = no; then
6012 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6013 # that cause trouble. Some versions do not even contain alloca or
6014 # contain a buggy version. If you still want to use their alloca,
6015 # use ar to extract alloca.o from them instead of compiling alloca.c.
6016 ALLOCA=alloca.${ac_objext}
6017 cat >> confdefs.h <<\EOF
6018#define C_ALLOCA 1
6019EOF
6020
6021
6022echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d15be926 6023echo "configure:6024: checking whether alloca needs Cray hooks" >&5
46711df8
MK
6024if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6025 echo $ac_n "(cached) $ac_c" 1>&6
6026else
6027 cat > conftest.$ac_ext <<EOF
d15be926 6028#line 6029 "configure"
46711df8
MK
6029#include "confdefs.h"
6030#if defined(CRAY) && ! defined(CRAY2)
6031webecray
6032#else
6033wenotbecray
6034#endif
6035
6036EOF
6037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6038 egrep "webecray" >/dev/null 2>&1; then
6039 rm -rf conftest*
6040 ac_cv_os_cray=yes
6041else
6042 rm -rf conftest*
6043 ac_cv_os_cray=no
6044fi
6045rm -f conftest*
6046
6047fi
6048
6049echo "$ac_t""$ac_cv_os_cray" 1>&6
6050if test $ac_cv_os_cray = yes; then
6051for ac_func in _getb67 GETB67 getb67; do
6052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6053echo "configure:6054: checking for $ac_func" >&5
46711df8
MK
6054if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6055 echo $ac_n "(cached) $ac_c" 1>&6
6056else
6057 cat > conftest.$ac_ext <<EOF
d15be926 6058#line 6059 "configure"
46711df8
MK
6059#include "confdefs.h"
6060/* System header to define __stub macros and hopefully few prototypes,
6061 which can conflict with char $ac_func(); below. */
6062#include <assert.h>
6063/* Override any gcc2 internal prototype to avoid an error. */
6064/* We use char because int might match the return type of a gcc2
6065 builtin and then its argument prototype would still apply. */
6066char $ac_func();
6067
6068int main() {
6069
6070/* The GNU C library defines this for functions which it implements
6071 to always fail with ENOSYS. Some functions are actually named
6072 something starting with __ and the normal name is an alias. */
6073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6074choke me
6075#else
6076$ac_func();
6077#endif
6078
6079; return 0; }
6080EOF
d15be926 6081if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6082 rm -rf conftest*
6083 eval "ac_cv_func_$ac_func=yes"
6084else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6087 rm -rf conftest*
6088 eval "ac_cv_func_$ac_func=no"
6089fi
6090rm -f conftest*
6091fi
6092
6093if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6094 echo "$ac_t""yes" 1>&6
6095 cat >> confdefs.h <<EOF
6096#define CRAY_STACKSEG_END $ac_func
6097EOF
6098
6099 break
6100else
6101 echo "$ac_t""no" 1>&6
6102fi
6103
6104done
6105fi
6106
6107echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d15be926 6108echo "configure:6109: checking stack direction for C alloca" >&5
46711df8
MK
6109if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6110 echo $ac_n "(cached) $ac_c" 1>&6
6111else
6112 if test "$cross_compiling" = yes; then
6113 ac_cv_c_stack_direction=0
6114else
6115 cat > conftest.$ac_ext <<EOF
d15be926 6116#line 6117 "configure"
46711df8
MK
6117#include "confdefs.h"
6118find_stack_direction ()
6119{
6120 static char *addr = 0;
6121 auto char dummy;
6122 if (addr == 0)
6123 {
6124 addr = &dummy;
6125 return find_stack_direction ();
6126 }
6127 else
6128 return (&dummy > addr) ? 1 : -1;
6129}
6130main ()
6131{
6132 exit (find_stack_direction() < 0);
6133}
6134EOF
d15be926 6135if { (eval echo configure:6136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6136then
6137 ac_cv_c_stack_direction=1
6138else
6139 echo "configure: failed program was:" >&5
6140 cat conftest.$ac_ext >&5
6141 rm -fr conftest*
6142 ac_cv_c_stack_direction=-1
6143fi
6144rm -fr conftest*
6145fi
6146
6147fi
6148
6149echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6150cat >> confdefs.h <<EOF
6151#define STACK_DIRECTION $ac_cv_c_stack_direction
6152EOF
6153
6154fi
6155
d836ee13 6156for ac_hdr in unistd.h
97bf5e38
MK
6157do
6158ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6159echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d15be926 6160echo "configure:6161: checking for $ac_hdr" >&5
74c1b268
AC
6161if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6162 echo $ac_n "(cached) $ac_c" 1>&6
6163else
6164 cat > conftest.$ac_ext <<EOF
d15be926 6165#line 6166 "configure"
74c1b268 6166#include "confdefs.h"
97bf5e38 6167#include <$ac_hdr>
74c1b268
AC
6168EOF
6169ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 6170{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6171ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6172if test -z "$ac_err"; then
6173 rm -rf conftest*
6174 eval "ac_cv_header_$ac_safe=yes"
6175else
6176 echo "$ac_err" >&5
6177 echo "configure: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6179 rm -rf conftest*
6180 eval "ac_cv_header_$ac_safe=no"
6181fi
6182rm -f conftest*
6183fi
6184if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6185 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6186 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6187 cat >> confdefs.h <<EOF
6188#define $ac_tr_hdr 1
74c1b268 6189EOF
97bf5e38 6190
74c1b268
AC
6191else
6192 echo "$ac_t""no" 1>&6
6193fi
97bf5e38 6194done
74c1b268 6195
97bf5e38
MK
6196for ac_func in getpagesize
6197do
6198echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6199echo "configure:6200: checking for $ac_func" >&5
97bf5e38 6200if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6201 echo $ac_n "(cached) $ac_c" 1>&6
6202else
6203 cat > conftest.$ac_ext <<EOF
d15be926 6204#line 6205 "configure"
74c1b268
AC
6205#include "confdefs.h"
6206/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6207 which can conflict with char $ac_func(); below. */
74c1b268
AC
6208#include <assert.h>
6209/* Override any gcc2 internal prototype to avoid an error. */
6210/* We use char because int might match the return type of a gcc2
6211 builtin and then its argument prototype would still apply. */
97bf5e38 6212char $ac_func();
74c1b268
AC
6213
6214int main() {
6215
6216/* The GNU C library defines this for functions which it implements
6217 to always fail with ENOSYS. Some functions are actually named
6218 something starting with __ and the normal name is an alias. */
97bf5e38 6219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6220choke me
6221#else
97bf5e38 6222$ac_func();
74c1b268
AC
6223#endif
6224
6225; return 0; }
6226EOF
d15be926 6227if { (eval echo configure:6228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6228 rm -rf conftest*
97bf5e38 6229 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6230else
6231 echo "configure: failed program was:" >&5
6232 cat conftest.$ac_ext >&5
6233 rm -rf conftest*
97bf5e38 6234 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6235fi
6236rm -f conftest*
6237fi
6238
97bf5e38 6239if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6240 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6241 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6242 cat >> confdefs.h <<EOF
6243#define $ac_tr_func 1
6244EOF
6245
74c1b268
AC
6246else
6247 echo "$ac_t""no" 1>&6
6248fi
97bf5e38 6249done
74c1b268 6250
97bf5e38 6251echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d15be926 6252echo "configure:6253: checking for working mmap" >&5
97bf5e38
MK
6253if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6254 echo $ac_n "(cached) $ac_c" 1>&6
6255else
6256 if test "$cross_compiling" = yes; then
6257 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6258else
6259 cat > conftest.$ac_ext <<EOF
d15be926 6260#line 6261 "configure"
74c1b268 6261#include "confdefs.h"
97bf5e38
MK
6262
6263/* Thanks to Mike Haertel and Jim Avera for this test.
6264 Here is a matrix of mmap possibilities:
6265 mmap private not fixed
6266 mmap private fixed at somewhere currently unmapped
6267 mmap private fixed at somewhere already mapped
6268 mmap shared not fixed
6269 mmap shared fixed at somewhere currently unmapped
6270 mmap shared fixed at somewhere already mapped
6271 For private mappings, we should verify that changes cannot be read()
6272 back from the file, nor mmap's back from the file at a different
6273 address. (There have been systems where private was not correctly
6274 implemented like the infamous i386 svr4.0, and systems where the
6275 VM page cache was not coherent with the filesystem buffer cache
6276 like early versions of FreeBSD and possibly contemporary NetBSD.)
6277 For shared mappings, we should conversely verify that changes get
6278 propogated back to all the places they're supposed to be.
6279
6280 Grep wants private fixed already mapped.
6281 The main things grep needs to know about mmap are:
6282 * does it exist and is it safe to write into the mmap'd area
6283 * how to use it (BSD variants) */
74c1b268 6284#include <sys/types.h>
97bf5e38
MK
6285#include <fcntl.h>
6286#include <sys/mman.h>
6287
6288/* This mess was copied from the GNU getpagesize.h. */
6289#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6290# ifdef HAVE_UNISTD_H
6291# include <unistd.h>
6292# endif
97bf5e38
MK
6293
6294/* Assume that all systems that can run configure have sys/param.h. */
6295# ifndef HAVE_SYS_PARAM_H
6296# define HAVE_SYS_PARAM_H 1
6297# endif
6298
6299# ifdef _SC_PAGESIZE
6300# define getpagesize() sysconf(_SC_PAGESIZE)
6301# else /* no _SC_PAGESIZE */
6302# ifdef HAVE_SYS_PARAM_H
6303# include <sys/param.h>
6304# ifdef EXEC_PAGESIZE
6305# define getpagesize() EXEC_PAGESIZE
6306# else /* no EXEC_PAGESIZE */
6307# ifdef NBPG
6308# define getpagesize() NBPG * CLSIZE
6309# ifndef CLSIZE
6310# define CLSIZE 1
6311# endif /* no CLSIZE */
6312# else /* no NBPG */
6313# ifdef NBPC
6314# define getpagesize() NBPC
6315# else /* no NBPC */
6316# ifdef PAGESIZE
6317# define getpagesize() PAGESIZE
6318# endif /* PAGESIZE */
6319# endif /* no NBPC */
6320# endif /* no NBPG */
6321# endif /* no EXEC_PAGESIZE */
6322# else /* no HAVE_SYS_PARAM_H */
6323# define getpagesize() 8192 /* punt totally */
6324# endif /* no HAVE_SYS_PARAM_H */
6325# endif /* no _SC_PAGESIZE */
6326
6327#endif /* no HAVE_GETPAGESIZE */
6328
74c1b268 6329#ifdef __cplusplus
97bf5e38 6330extern "C" { void *malloc(unsigned); }
74c1b268 6331#else
97bf5e38 6332char *malloc();
74c1b268 6333#endif
74c1b268 6334
97bf5e38
MK
6335int
6336main()
6337{
6338 char *data, *data2, *data3;
6339 int i, pagesize;
6340 int fd;
74c1b268 6341
97bf5e38 6342 pagesize = getpagesize();
74c1b268 6343
97bf5e38
MK
6344 /*
6345 * First, make a file with some known garbage in it.
6346 */
6347 data = malloc(pagesize);
6348 if (!data)
6349 exit(1);
6350 for (i = 0; i < pagesize; ++i)
6351 *(data + i) = rand();
6352 umask(0);
6353 fd = creat("conftestmmap", 0600);
6354 if (fd < 0)
6355 exit(1);
6356 if (write(fd, data, pagesize) != pagesize)
6357 exit(1);
6358 close(fd);
74c1b268 6359
97bf5e38
MK
6360 /*
6361 * Next, try to mmap the file at a fixed address which
6362 * already has something else allocated at it. If we can,
6363 * also make sure that we see the same garbage.
6364 */
6365 fd = open("conftestmmap", O_RDWR);
6366 if (fd < 0)
6367 exit(1);
6368 data2 = malloc(2 * pagesize);
6369 if (!data2)
6370 exit(1);
6371 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6372 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6373 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6374 exit(1);
6375 for (i = 0; i < pagesize; ++i)
6376 if (*(data + i) != *(data2 + i))
6377 exit(1);
74c1b268 6378
97bf5e38
MK
6379 /*
6380 * Finally, make sure that changes to the mapped area
6381 * do not percolate back to the file as seen by read().
6382 * (This is a bug on some variants of i386 svr4.0.)
6383 */
6384 for (i = 0; i < pagesize; ++i)
6385 *(data2 + i) = *(data2 + i) + 1;
6386 data3 = malloc(pagesize);
6387 if (!data3)
6388 exit(1);
6389 if (read(fd, data3, pagesize) != pagesize)
6390 exit(1);
6391 for (i = 0; i < pagesize; ++i)
6392 if (*(data + i) != *(data3 + i))
6393 exit(1);
6394 close(fd);
6395 unlink("conftestmmap");
6396 exit(0);
74c1b268 6397}
97bf5e38 6398
74c1b268 6399EOF
d15be926 6400if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6401then
97bf5e38 6402 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6403else
6404 echo "configure: failed program was:" >&5
6405 cat conftest.$ac_ext >&5
6406 rm -fr conftest*
97bf5e38 6407 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6408fi
6409rm -fr conftest*
6410fi
6411
6412fi
6413
97bf5e38
MK
6414echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6415if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6416 cat >> confdefs.h <<\EOF
97bf5e38 6417#define HAVE_MMAP 1
74c1b268
AC
6418EOF
6419
6420fi
6421
97bf5e38 6422echo $ac_n "checking for pid_t""... $ac_c" 1>&6
d15be926 6423echo "configure:6424: checking for pid_t" >&5
97bf5e38 6424if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6425 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6426else
6427 cat > conftest.$ac_ext <<EOF
d15be926 6428#line 6429 "configure"
0200359f 6429#include "confdefs.h"
97bf5e38
MK
6430#include <sys/types.h>
6431#if STDC_HEADERS
6432#include <stdlib.h>
6433#include <stddef.h>
0200359f 6434#endif
0200359f 6435EOF
97bf5e38
MK
6436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6437 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6438 rm -rf conftest*
6439 ac_cv_type_pid_t=yes
0200359f 6440else
97bf5e38
MK
6441 rm -rf conftest*
6442 ac_cv_type_pid_t=no
0200359f 6443fi
97bf5e38 6444rm -f conftest*
0200359f
MK
6445
6446fi
97bf5e38
MK
6447echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6448if test $ac_cv_type_pid_t = no; then
0200359f 6449 cat >> confdefs.h <<\EOF
97bf5e38 6450#define pid_t int
0200359f
MK
6451EOF
6452
6453fi
6454
97bf5e38
MK
6455ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6456echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
d15be926 6457echo "configure:6458: checking for vfork.h" >&5
97bf5e38 6458if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6459 echo $ac_n "(cached) $ac_c" 1>&6
6460else
6461 cat > conftest.$ac_ext <<EOF
d15be926 6462#line 6463 "configure"
72473524 6463#include "confdefs.h"
97bf5e38 6464#include <vfork.h>
72473524 6465EOF
97bf5e38 6466ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 6467{ (eval echo configure:6468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6468ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6469if test -z "$ac_err"; then
72473524 6470 rm -rf conftest*
97bf5e38 6471 eval "ac_cv_header_$ac_safe=yes"
72473524 6472else
97bf5e38 6473 echo "$ac_err" >&5
72473524
DJ
6474 echo "configure: failed program was:" >&5
6475 cat conftest.$ac_ext >&5
6476 rm -rf conftest*
97bf5e38 6477 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6478fi
6479rm -f conftest*
6480fi
97bf5e38
MK
6481if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6482 echo "$ac_t""yes" 1>&6
72473524 6483 cat >> confdefs.h <<\EOF
97bf5e38 6484#define HAVE_VFORK_H 1
72473524
DJ
6485EOF
6486
97bf5e38
MK
6487else
6488 echo "$ac_t""no" 1>&6
72473524 6489fi
c906108c 6490
97bf5e38 6491echo $ac_n "checking for working vfork""... $ac_c" 1>&6
d15be926 6492echo "configure:6493: checking for working vfork" >&5
97bf5e38
MK
6493if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6494 echo $ac_n "(cached) $ac_c" 1>&6
6495else
6496 if test "$cross_compiling" = yes; then
6497 echo $ac_n "checking for vfork""... $ac_c" 1>&6
d15be926 6498echo "configure:6499: checking for vfork" >&5
97bf5e38 6499if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6500 echo $ac_n "(cached) $ac_c" 1>&6
6501else
6502 cat > conftest.$ac_ext <<EOF
d15be926 6503#line 6504 "configure"
2b2d558c 6504#include "confdefs.h"
97bf5e38
MK
6505/* System header to define __stub macros and hopefully few prototypes,
6506 which can conflict with char vfork(); below. */
6507#include <assert.h>
6508/* Override any gcc2 internal prototype to avoid an error. */
6509/* We use char because int might match the return type of a gcc2
6510 builtin and then its argument prototype would still apply. */
6511char vfork();
2b2d558c
MK
6512
6513int main() {
97bf5e38
MK
6514
6515/* The GNU C library defines this for functions which it implements
6516 to always fail with ENOSYS. Some functions are actually named
6517 something starting with __ and the normal name is an alias. */
6518#if defined (__stub_vfork) || defined (__stub___vfork)
6519choke me
6520#else
6521vfork();
6522#endif
6523
2b2d558c
MK
6524; return 0; }
6525EOF
d15be926 6526if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6527 rm -rf conftest*
97bf5e38 6528 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6529else
6530 echo "configure: failed program was:" >&5
6531 cat conftest.$ac_ext >&5
6532 rm -rf conftest*
97bf5e38 6533 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6534fi
6535rm -f conftest*
6536fi
6537
97bf5e38
MK
6538if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6539 echo "$ac_t""yes" 1>&6
6540 :
6541else
6542 echo "$ac_t""no" 1>&6
2b2d558c
MK
6543fi
6544
97bf5e38 6545ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6546else
6547 cat > conftest.$ac_ext <<EOF
d15be926 6548#line 6549 "configure"
7dfa765c 6549#include "confdefs.h"
97bf5e38
MK
6550/* Thanks to Paul Eggert for this test. */
6551#include <stdio.h>
6552#include <sys/types.h>
6553#include <sys/stat.h>
6554#ifdef HAVE_UNISTD_H
6555#include <unistd.h>
6556#endif
6557#ifdef HAVE_VFORK_H
6558#include <vfork.h>
6559#endif
6560/* On some sparc systems, changes by the child to local and incoming
6561 argument registers are propagated back to the parent.
6562 The compiler is told about this with #include <vfork.h>,
6563 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6564 Test for this by using a static variable whose address
6565 is put into a register that is clobbered by the vfork. */
6566static
6567#ifdef __cplusplus
6568sparc_address_test (int arg)
6569#else
6570sparc_address_test (arg) int arg;
6571#endif
6572{
6573 static pid_t child;
6574 if (!child) {
6575 child = vfork ();
6576 if (child < 0) {
6577 perror ("vfork");
6578 _exit(2);
6579 }
6580 if (!child) {
6581 arg = getpid();
6582 write(-1, "", 0);
6583 _exit (arg);
6584 }
6585 }
6586}
6587main() {
6588 pid_t parent = getpid ();
6589 pid_t child;
7dfa765c 6590
97bf5e38 6591 sparc_address_test ();
7dfa765c 6592
97bf5e38 6593 child = vfork ();
7dfa765c 6594
97bf5e38
MK
6595 if (child == 0) {
6596 /* Here is another test for sparc vfork register problems.
6597 This test uses lots of local variables, at least
6598 as many local variables as main has allocated so far
6599 including compiler temporaries. 4 locals are enough for
6600 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6601 A buggy compiler should reuse the register of parent
6602 for one of the local variables, since it will think that
6603 parent can't possibly be used any more in this routine.
6604 Assigning to the local variable will thus munge parent
6605 in the parent process. */
6606 pid_t
6607 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6608 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6609 /* Convince the compiler that p..p7 are live; otherwise, it might
6610 use the same hardware register for all 8 local variables. */
6611 if (p != p1 || p != p2 || p != p3 || p != p4
6612 || p != p5 || p != p6 || p != p7)
6613 _exit(1);
7dfa765c 6614
97bf5e38
MK
6615 /* On some systems (e.g. IRIX 3.3),
6616 vfork doesn't separate parent from child file descriptors.
6617 If the child closes a descriptor before it execs or exits,
6618 this munges the parent's descriptor as well.
6619 Test for this by closing stdout in the child. */
6620 _exit(close(fileno(stdout)) != 0);
6621 } else {
6622 int status;
6623 struct stat st;
64bb1671 6624
97bf5e38
MK
6625 while (wait(&status) != child)
6626 ;
6627 exit(
6628 /* Was there some problem with vforking? */
6629 child < 0
64bb1671 6630
97bf5e38
MK
6631 /* Did the child fail? (This shouldn't happen.) */
6632 || status
64bb1671 6633
97bf5e38
MK
6634 /* Did the vfork/compiler bug occur? */
6635 || parent != getpid()
6636
6637 /* Did the file descriptor bug occur? */
6638 || fstat(fileno(stdout), &st) != 0
6639 );
6640 }
6641}
5c44784c 6642EOF
d15be926 6643if { (eval echo configure:6644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6644then
6645 ac_cv_func_vfork_works=yes
5c44784c
JM
6646else
6647 echo "configure: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
97bf5e38
MK
6649 rm -fr conftest*
6650 ac_cv_func_vfork_works=no
5c44784c 6651fi
97bf5e38 6652rm -fr conftest*
5c44784c
JM
6653fi
6654
0afdd437
MK
6655fi
6656
97bf5e38
MK
6657echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6658if test $ac_cv_func_vfork_works = no; then
0afdd437 6659 cat >> confdefs.h <<\EOF
97bf5e38 6660#define vfork fork
0afdd437
MK
6661EOF
6662
6663fi
6664
97bf5e38
MK
6665for ac_func in canonicalize_file_name realpath
6666do
6667echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6668echo "configure:6669: checking for $ac_func" >&5
97bf5e38 6669if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6670 echo $ac_n "(cached) $ac_c" 1>&6
6671else
6672 cat > conftest.$ac_ext <<EOF
d15be926 6673#line 6674 "configure"
7e89e357 6674#include "confdefs.h"
97bf5e38
MK
6675/* System header to define __stub macros and hopefully few prototypes,
6676 which can conflict with char $ac_func(); below. */
6677#include <assert.h>
6678/* Override any gcc2 internal prototype to avoid an error. */
6679/* We use char because int might match the return type of a gcc2
6680 builtin and then its argument prototype would still apply. */
6681char $ac_func();
6682
7e89e357 6683int main() {
97bf5e38
MK
6684
6685/* The GNU C library defines this for functions which it implements
6686 to always fail with ENOSYS. Some functions are actually named
6687 something starting with __ and the normal name is an alias. */
6688#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6689choke me
6690#else
6691$ac_func();
6692#endif
6693
7e89e357
JT
6694; return 0; }
6695EOF
d15be926 6696if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6697 rm -rf conftest*
97bf5e38 6698 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6699else
6700 echo "configure: failed program was:" >&5
6701 cat conftest.$ac_ext >&5
6702 rm -rf conftest*
97bf5e38 6703 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6704fi
6705rm -f conftest*
6706fi
6707
97bf5e38
MK
6708if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6709 echo "$ac_t""yes" 1>&6
6710 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6711 cat >> confdefs.h <<EOF
6712#define $ac_tr_func 1
7e89e357 6713EOF
97bf5e38
MK
6714
6715else
6716 echo "$ac_t""no" 1>&6
7e89e357 6717fi
97bf5e38 6718done
7e89e357 6719
97bf5e38 6720for ac_func in poll
7be570e7
JM
6721do
6722echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6723echo "configure:6724: checking for $ac_func" >&5
7be570e7
JM
6724if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6725 echo $ac_n "(cached) $ac_c" 1>&6
6726else
6727 cat > conftest.$ac_ext <<EOF
d15be926 6728#line 6729 "configure"
7be570e7
JM
6729#include "confdefs.h"
6730/* System header to define __stub macros and hopefully few prototypes,
6731 which can conflict with char $ac_func(); below. */
6732#include <assert.h>
6733/* Override any gcc2 internal prototype to avoid an error. */
6734/* We use char because int might match the return type of a gcc2
6735 builtin and then its argument prototype would still apply. */
6736char $ac_func();
6737
6738int main() {
6739
6740/* The GNU C library defines this for functions which it implements
6741 to always fail with ENOSYS. Some functions are actually named
6742 something starting with __ and the normal name is an alias. */
6743#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6744choke me
6745#else
6746$ac_func();
6747#endif
6748
6749; return 0; }
6750EOF
d15be926 6751if { (eval echo configure:6752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6752 rm -rf conftest*
6753 eval "ac_cv_func_$ac_func=yes"
6754else
6755 echo "configure: failed program was:" >&5
6756 cat conftest.$ac_ext >&5
6757 rm -rf conftest*
6758 eval "ac_cv_func_$ac_func=no"
6759fi
6760rm -f conftest*
6761fi
6762
6763if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6764 echo "$ac_t""yes" 1>&6
6765 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6766 cat >> confdefs.h <<EOF
6767#define $ac_tr_func 1
6768EOF
6769
6770else
6771 echo "$ac_t""no" 1>&6
6772fi
6773done
6774
6775for ac_func in pread64
6776do
6777echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6778echo "configure:6779: checking for $ac_func" >&5
14abd0fb
MK
6779if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6780 echo $ac_n "(cached) $ac_c" 1>&6
6781else
6782 cat > conftest.$ac_ext <<EOF
d15be926 6783#line 6784 "configure"
14abd0fb
MK
6784#include "confdefs.h"
6785/* System header to define __stub macros and hopefully few prototypes,
6786 which can conflict with char $ac_func(); below. */
6787#include <assert.h>
6788/* Override any gcc2 internal prototype to avoid an error. */
6789/* We use char because int might match the return type of a gcc2
6790 builtin and then its argument prototype would still apply. */
6791char $ac_func();
6792
6793int main() {
6794
6795/* The GNU C library defines this for functions which it implements
6796 to always fail with ENOSYS. Some functions are actually named
6797 something starting with __ and the normal name is an alias. */
6798#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6799choke me
6800#else
6801$ac_func();
6802#endif
6803
6804; return 0; }
6805EOF
d15be926 6806if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6807 rm -rf conftest*
6808 eval "ac_cv_func_$ac_func=yes"
6809else
6810 echo "configure: failed program was:" >&5
6811 cat conftest.$ac_ext >&5
6812 rm -rf conftest*
6813 eval "ac_cv_func_$ac_func=no"
6814fi
6815rm -f conftest*
6816fi
6817
6818if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6819 echo "$ac_t""yes" 1>&6
6820 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6821 cat >> confdefs.h <<EOF
6822#define $ac_tr_func 1
6823EOF
6824
6825else
6826 echo "$ac_t""no" 1>&6
6827fi
6828done
6829
97bf5e38
MK
6830for ac_func in sbrk
6831do
6832echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6833echo "configure:6834: checking for $ac_func" >&5
97bf5e38 6834if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6835 echo $ac_n "(cached) $ac_c" 1>&6
6836else
6837 cat > conftest.$ac_ext <<EOF
d15be926 6838#line 6839 "configure"
c906108c 6839#include "confdefs.h"
97bf5e38
MK
6840/* System header to define __stub macros and hopefully few prototypes,
6841 which can conflict with char $ac_func(); below. */
6842#include <assert.h>
6843/* Override any gcc2 internal prototype to avoid an error. */
6844/* We use char because int might match the return type of a gcc2
6845 builtin and then its argument prototype would still apply. */
6846char $ac_func();
c906108c 6847
97bf5e38
MK
6848int main() {
6849
6850/* The GNU C library defines this for functions which it implements
6851 to always fail with ENOSYS. Some functions are actually named
6852 something starting with __ and the normal name is an alias. */
6853#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6854choke me
c906108c 6855#else
97bf5e38 6856$ac_func();
c906108c 6857#endif
97bf5e38 6858
c906108c
SS
6859; return 0; }
6860EOF
d15be926 6861if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6862 rm -rf conftest*
97bf5e38 6863 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6864else
6865 echo "configure: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 rm -rf conftest*
97bf5e38 6868 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6869fi
6870rm -f conftest*
6871fi
6872
97bf5e38
MK
6873if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6874 echo "$ac_t""yes" 1>&6
6875 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6876 cat >> confdefs.h <<EOF
6877#define $ac_tr_func 1
c906108c 6878EOF
97bf5e38
MK
6879
6880else
6881 echo "$ac_t""no" 1>&6
c906108c 6882fi
97bf5e38 6883done
c906108c 6884
97bf5e38
MK
6885for ac_func in setpgid setpgrp
6886do
6887echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6888echo "configure:6889: checking for $ac_func" >&5
97bf5e38 6889if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6890 echo $ac_n "(cached) $ac_c" 1>&6
6891else
6892 cat > conftest.$ac_ext <<EOF
d15be926 6893#line 6894 "configure"
c906108c 6894#include "confdefs.h"
97bf5e38
MK
6895/* System header to define __stub macros and hopefully few prototypes,
6896 which can conflict with char $ac_func(); below. */
6897#include <assert.h>
6898/* Override any gcc2 internal prototype to avoid an error. */
6899/* We use char because int might match the return type of a gcc2
6900 builtin and then its argument prototype would still apply. */
6901char $ac_func();
c906108c 6902
97bf5e38
MK
6903int main() {
6904
6905/* The GNU C library defines this for functions which it implements
6906 to always fail with ENOSYS. Some functions are actually named
6907 something starting with __ and the normal name is an alias. */
6908#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6909choke me
c906108c 6910#else
97bf5e38 6911$ac_func();
c906108c 6912#endif
97bf5e38 6913
c906108c
SS
6914; return 0; }
6915EOF
d15be926 6916if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6917 rm -rf conftest*
97bf5e38 6918 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6919else
6920 echo "configure: failed program was:" >&5
6921 cat conftest.$ac_ext >&5
6922 rm -rf conftest*
97bf5e38 6923 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6924fi
6925rm -f conftest*
6926fi
6927
97bf5e38
MK
6928if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6929 echo "$ac_t""yes" 1>&6
6930 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6931 cat >> confdefs.h <<EOF
6932#define $ac_tr_func 1
c906108c 6933EOF
97bf5e38
MK
6934
6935else
6936 echo "$ac_t""no" 1>&6
c906108c 6937fi
97bf5e38 6938done
c906108c 6939
e1ea1d75 6940for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6941do
6942echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6943echo "configure:6944: checking for $ac_func" >&5
97bf5e38 6944if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6945 echo $ac_n "(cached) $ac_c" 1>&6
6946else
6947 cat > conftest.$ac_ext <<EOF
d15be926 6948#line 6949 "configure"
c906108c 6949#include "confdefs.h"
97bf5e38
MK
6950/* System header to define __stub macros and hopefully few prototypes,
6951 which can conflict with char $ac_func(); below. */
6952#include <assert.h>
6953/* Override any gcc2 internal prototype to avoid an error. */
6954/* We use char because int might match the return type of a gcc2
6955 builtin and then its argument prototype would still apply. */
6956char $ac_func();
c906108c 6957
97bf5e38
MK
6958int main() {
6959
6960/* The GNU C library defines this for functions which it implements
6961 to always fail with ENOSYS. Some functions are actually named
6962 something starting with __ and the normal name is an alias. */
6963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6964choke me
c906108c 6965#else
97bf5e38 6966$ac_func();
c906108c 6967#endif
97bf5e38 6968
c906108c
SS
6969; return 0; }
6970EOF
d15be926 6971if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6972 rm -rf conftest*
97bf5e38 6973 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6974else
6975 echo "configure: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 rm -rf conftest*
97bf5e38 6978 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6979fi
6980rm -f conftest*
6981fi
6982
97bf5e38
MK
6983if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6984 echo "$ac_t""yes" 1>&6
6985 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6986 cat >> confdefs.h <<EOF
6987#define $ac_tr_func 1
c906108c 6988EOF
e1ea1d75 6989
97bf5e38
MK
6990else
6991 echo "$ac_t""no" 1>&6
c906108c 6992fi
97bf5e38 6993done
c906108c 6994
97bf5e38
MK
6995for ac_func in socketpair
6996do
6997echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 6998echo "configure:6999: checking for $ac_func" >&5
97bf5e38 6999if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7000 echo $ac_n "(cached) $ac_c" 1>&6
7001else
7002 cat > conftest.$ac_ext <<EOF
d15be926 7003#line 7004 "configure"
c906108c 7004#include "confdefs.h"
97bf5e38
MK
7005/* System header to define __stub macros and hopefully few prototypes,
7006 which can conflict with char $ac_func(); below. */
7007#include <assert.h>
7008/* Override any gcc2 internal prototype to avoid an error. */
7009/* We use char because int might match the return type of a gcc2
7010 builtin and then its argument prototype would still apply. */
7011char $ac_func();
c906108c 7012
97bf5e38
MK
7013int main() {
7014
7015/* The GNU C library defines this for functions which it implements
7016 to always fail with ENOSYS. Some functions are actually named
7017 something starting with __ and the normal name is an alias. */
7018#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7019choke me
c906108c 7020#else
97bf5e38 7021$ac_func();
c906108c 7022#endif
97bf5e38 7023
c906108c
SS
7024; return 0; }
7025EOF
d15be926 7026if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7027 rm -rf conftest*
97bf5e38 7028 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7029else
7030 echo "configure: failed program was:" >&5
7031 cat conftest.$ac_ext >&5
7032 rm -rf conftest*
97bf5e38 7033 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7034fi
7035rm -f conftest*
7036fi
7037
97bf5e38
MK
7038if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7039 echo "$ac_t""yes" 1>&6
7040 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7041 cat >> confdefs.h <<EOF
7042#define $ac_tr_func 1
c906108c 7043EOF
97bf5e38
MK
7044
7045else
7046 echo "$ac_t""no" 1>&6
c906108c 7047fi
97bf5e38 7048done
c906108c 7049
b757528f
JJ
7050for ac_func in syscall
7051do
7052echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d15be926 7053echo "configure:7054: checking for $ac_func" >&5
b757528f
JJ
7054if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7055 echo $ac_n "(cached) $ac_c" 1>&6
7056else
7057 cat > conftest.$ac_ext <<EOF
d15be926 7058#line 7059 "configure"
b757528f
JJ
7059#include "confdefs.h"
7060/* System header to define __stub macros and hopefully few prototypes,
7061 which can conflict with char $ac_func(); below. */
7062#include <assert.h>
7063/* Override any gcc2 internal prototype to avoid an error. */
7064/* We use char because int might match the return type of a gcc2
7065 builtin and then its argument prototype would still apply. */
7066char $ac_func();
7067
7068int main() {
7069
7070/* The GNU C library defines this for functions which it implements
7071 to always fail with ENOSYS. Some functions are actually named
7072 something starting with __ and the normal name is an alias. */
7073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7074choke me
7075#else
7076$ac_func();
7077#endif
7078
7079; return 0; }
7080EOF
d15be926 7081if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7082 rm -rf conftest*
7083 eval "ac_cv_func_$ac_func=yes"
7084else
7085 echo "configure: failed program was:" >&5
7086 cat conftest.$ac_ext >&5
7087 rm -rf conftest*
7088 eval "ac_cv_func_$ac_func=no"
7089fi
7090rm -f conftest*
7091fi
7092
7093if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7094 echo "$ac_t""yes" 1>&6
7095 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7096 cat >> confdefs.h <<EOF
7097#define $ac_tr_func 1
7098EOF
7099
7100else
7101 echo "$ac_t""no" 1>&6
7102fi
7103done
7104
97bf5e38
MK
7105
7106if test "$cross_compiling" = no; then
7107 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d15be926 7108echo "configure:7109: checking whether setpgrp takes no argument" >&5
97bf5e38 7109if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7110 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7111else
7112 if test "$cross_compiling" = yes; then
7113 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7114else
7115 cat > conftest.$ac_ext <<EOF
d15be926 7116#line 7117 "configure"
c906108c
SS
7117#include "confdefs.h"
7118
c906108c
SS
7119#ifdef HAVE_UNISTD_H
7120#include <unistd.h>
7121#endif
97bf5e38
MK
7122
7123/*
7124 * If this system has a BSD-style setpgrp, which takes arguments, exit
7125 * successfully.
7126 */
7127main()
7128{
7129 if (setpgrp(1,1) == -1)
7130 exit(0);
7131 else
7132 exit(1);
7133}
7134
c906108c 7135EOF
d15be926 7136if { (eval echo configure:7137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7137then
7138 ac_cv_func_setpgrp_void=no
c906108c
SS
7139else
7140 echo "configure: failed program was:" >&5
7141 cat conftest.$ac_ext >&5
97bf5e38
MK
7142 rm -fr conftest*
7143 ac_cv_func_setpgrp_void=yes
c906108c 7144fi
97bf5e38 7145rm -fr conftest*
c906108c
SS
7146fi
7147
97bf5e38
MK
7148
7149fi
7150
7151echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7152if test $ac_cv_func_setpgrp_void = yes; then
7153 cat >> confdefs.h <<\EOF
7154#define SETPGRP_VOID 1
c906108c
SS
7155EOF
7156
7157fi
7158
97bf5e38
MK
7159else
7160 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d15be926 7161echo "configure:7162: checking whether setpgrp takes no argument" >&5
97bf5e38 7162if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7163 echo $ac_n "(cached) $ac_c" 1>&6
7164else
7165 cat > conftest.$ac_ext <<EOF
d15be926 7166#line 7167 "configure"
b83266a0
SS
7167#include "confdefs.h"
7168
b83266a0 7169#include <unistd.h>
97bf5e38 7170
b83266a0 7171int main() {
97bf5e38
MK
7172
7173 if (setpgrp(1,1) == -1)
7174 exit (0);
7175 else
7176 exit (1);
7177
b83266a0
SS
7178; return 0; }
7179EOF
d15be926 7180if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7181 rm -rf conftest*
97bf5e38 7182 ac_cv_func_setpgrp_void=no
b83266a0
SS
7183else
7184 echo "configure: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 rm -rf conftest*
97bf5e38 7187 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7188fi
7189rm -f conftest*
7190fi
7191
97bf5e38
MK
7192echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7193if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7194 cat >> confdefs.h <<\EOF
97bf5e38 7195#define SETPGRP_VOID 1
b83266a0
SS
7196EOF
7197
97bf5e38 7198fi
b83266a0
SS
7199fi
7200
97bf5e38
MK
7201# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7202# since sigsetjmp might only be defined as a macro.
7203echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
d15be926 7204echo "configure:7205: checking for sigsetjmp" >&5
97bf5e38 7205if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7206 echo $ac_n "(cached) $ac_c" 1>&6
7207else
7208 cat > conftest.$ac_ext <<EOF
d15be926 7209#line 7210 "configure"
a4db0f07
RH
7210#include "confdefs.h"
7211
97bf5e38
MK
7212#include <setjmp.h>
7213
a4db0f07 7214int main() {
97bf5e38 7215sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7216; return 0; }
7217EOF
d15be926 7218if { (eval echo configure:7219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7219 rm -rf conftest*
97bf5e38 7220 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7221else
7222 echo "configure: failed program was:" >&5
7223 cat conftest.$ac_ext >&5
7224 rm -rf conftest*
97bf5e38 7225 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7226fi
7227rm -f conftest*
7228fi
7229
97bf5e38
MK
7230echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7231if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7232 cat >> confdefs.h <<\EOF
97bf5e38 7233#define HAVE_SIGSETJMP 1
a4db0f07
RH
7234EOF
7235
7236fi
c906108c 7237
06825bd1
MK
7238# Assume we'll default to using the included libiberty regex.
7239gdb_use_included_regex=yes
7240
7241# However, if the system regex is GNU regex, then default to *not*
7242# using the included regex.
7243echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
d15be926 7244echo "configure:7245: checking for GNU regex" >&5
06825bd1
MK
7245if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7246 echo $ac_n "(cached) $ac_c" 1>&6
7247else
7248 cat > conftest.$ac_ext <<EOF
d15be926 7249#line 7250 "configure"
06825bd1
MK
7250#include "confdefs.h"
7251#include <gnu-versions.h>
7252int main() {
7253#define REGEX_INTERFACE_VERSION 1
7254#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7255# error "Version mismatch"
7256#endif
7257; return 0; }
7258EOF
d15be926 7259if { (eval echo configure:7260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7260 rm -rf conftest*
7261 gdb_cv_have_gnu_regex=yes
7262else
7263 echo "configure: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 rm -rf conftest*
7266 gdb_cv_have_gnu_regex=no
7267fi
7268rm -f conftest*
7269fi
7270
7271echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7272if test $gdb_cv_have_gnu_regex = yes; then
7273 gdb_use_included_regex=no
7274fi
7275
7276# Check whether --with-included-regex or --without-included-regex was given.
7277if test "${with_included_regex+set}" = set; then
7278 withval="$with_included_regex"
7279 gdb_with_regex=$withval
7280else
7281 gdb_with_regex=$gdb_use_included_regex
7282fi
7283
7284if test "$gdb_with_regex" = yes; then
7285 cat >> confdefs.h <<\EOF
7286#define USE_INCLUDED_REGEX 1
7287EOF
7288
7289fi
7290
70f9f479
MK
7291# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7292echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
d15be926 7293echo "configure:7294: checking for td_pcb in struct thread" >&5
70f9f479
MK
7294if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7295 echo $ac_n "(cached) $ac_c" 1>&6
7296else
7297 cat > conftest.$ac_ext <<EOF
d15be926 7298#line 7299 "configure"
70f9f479 7299#include "confdefs.h"
d15be926 7300#include <sys/param.h>
70f9f479
MK
7301#include <sys/proc.h>
7302int main() {
7303struct thread td; td.td_pcb;
7304; return 0; }
7305EOF
d15be926 7306if { (eval echo configure:7307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
70f9f479
MK
7307 rm -rf conftest*
7308 gdb_cv_struct_thread_td_pcb=yes
7309else
7310 echo "configure: failed program was:" >&5
7311 cat conftest.$ac_ext >&5
7312 rm -rf conftest*
7313 gdb_cv_struct_thread_td_pcb=no
7314fi
7315rm -f conftest*
7316fi
7317
7318echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7319if test $gdb_cv_struct_thread_td_pcb = yes; then
7320 cat >> confdefs.h <<\EOF
7321#define HAVE_STRUCT_THREAD_TD_PCB 1
7322EOF
7323
7324fi
7325
78434e59
MK
7326# See if <machine/reg.h> degines `struct reg'.
7327echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
d15be926 7328echo "configure:7329: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7329if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7330 echo $ac_n "(cached) $ac_c" 1>&6
7331else
7332 cat > conftest.$ac_ext <<EOF
d15be926 7333#line 7334 "configure"
78434e59
MK
7334#include "confdefs.h"
7335#include <sys/types.h>
7336#include <machine/reg.h>
7337int main() {
7338struct reg r;
7339; return 0; }
7340EOF
d15be926 7341if { (eval echo configure:7342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7342 rm -rf conftest*
7343 gdb_cv_struct_reg=yes
7344else
7345 echo "configure: failed program was:" >&5
7346 cat conftest.$ac_ext >&5
7347 rm -rf conftest*
7348 gdb_cv_struct_reg=no
7349fi
7350rm -f conftest*
7351fi
7352
7353echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7354if test $gdb_cv_struct_reg = yes; then
7355 cat >> confdefs.h <<\EOF
7356#define HAVE_STRUCT_REG 1
7357EOF
7358
7359fi
7360
97bf5e38
MK
7361# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7362# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7363echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
d15be926 7364echo "configure:7365: checking for r_fs in struct reg" >&5
97bf5e38
MK
7365if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7366 echo $ac_n "(cached) $ac_c" 1>&6
7367else
7368 cat > conftest.$ac_ext <<EOF
d15be926 7369#line 7370 "configure"
c906108c 7370#include "confdefs.h"
97bf5e38
MK
7371#include <machine/reg.h>
7372int main() {
7373struct reg r; r.r_fs;
7374; return 0; }
c906108c 7375EOF
d15be926 7376if { (eval echo configure:7377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7377 rm -rf conftest*
97bf5e38 7378 gdb_cv_struct_reg_r_fs=yes
c906108c 7379else
97bf5e38
MK
7380 echo "configure: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
c906108c 7382 rm -rf conftest*
97bf5e38 7383 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7384fi
7385rm -f conftest*
97bf5e38 7386fi
c906108c 7387
97bf5e38
MK
7388echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7389if test $gdb_cv_struct_reg_r_fs = yes; then
7390 cat >> confdefs.h <<\EOF
7391#define HAVE_STRUCT_REG_R_FS 1
7392EOF
7393
7394fi
7395echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
d15be926 7396echo "configure:7397: checking for r_gs in struct reg" >&5
97bf5e38
MK
7397if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7398 echo $ac_n "(cached) $ac_c" 1>&6
7399else
7400 cat > conftest.$ac_ext <<EOF
d15be926 7401#line 7402 "configure"
c906108c 7402#include "confdefs.h"
97bf5e38
MK
7403#include <machine/reg.h>
7404int main() {
7405struct reg r; r.r_gs;
7406; return 0; }
c906108c 7407EOF
d15be926 7408if { (eval echo configure:7409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7409 rm -rf conftest*
97bf5e38 7410 gdb_cv_struct_reg_r_gs=yes
c906108c 7411else
97bf5e38
MK
7412 echo "configure: failed program was:" >&5
7413 cat conftest.$ac_ext >&5
c906108c 7414 rm -rf conftest*
97bf5e38 7415 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7416fi
7417rm -f conftest*
c906108c 7418fi
c906108c 7419
97bf5e38
MK
7420echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7421if test $gdb_cv_struct_reg_r_gs = yes; then
7422 cat >> confdefs.h <<\EOF
7423#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7424EOF
7425
c906108c
SS
7426fi
7427
97bf5e38
MK
7428# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7429echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
d15be926 7430echo "configure:7431: checking for PTRACE_GETREGS" >&5
97bf5e38 7431if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7432 echo $ac_n "(cached) $ac_c" 1>&6
7433else
7434 cat > conftest.$ac_ext <<EOF
d15be926 7435#line 7436 "configure"
c906108c 7436#include "confdefs.h"
97bf5e38 7437#include <sys/ptrace.h>
c906108c 7438int main() {
97bf5e38 7439PTRACE_GETREGS;
c906108c
SS
7440; return 0; }
7441EOF
d15be926 7442if { (eval echo configure:7443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7443 rm -rf conftest*
97bf5e38 7444 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7445else
7446 echo "configure: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 rm -rf conftest*
97bf5e38 7449 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7450fi
7451rm -f conftest*
7452fi
7453
97bf5e38
MK
7454echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7455if test $gdb_cv_have_ptrace_getregs = yes; then
7456 cat >> confdefs.h <<\EOF
7457#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7458EOF
7459
97bf5e38 7460fi
c906108c 7461
97bf5e38
MK
7462# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7463echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
d15be926 7464echo "configure:7465: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7465if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7466 echo $ac_n "(cached) $ac_c" 1>&6
7467else
7468 cat > conftest.$ac_ext <<EOF
d15be926 7469#line 7470 "configure"
c906108c 7470#include "confdefs.h"
97bf5e38 7471#include <sys/ptrace.h>
c906108c 7472int main() {
97bf5e38 7473PTRACE_GETFPXREGS;
c906108c
SS
7474; return 0; }
7475EOF
d15be926 7476if { (eval echo configure:7477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7477 rm -rf conftest*
97bf5e38 7478 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7479else
7480 echo "configure: failed program was:" >&5
7481 cat conftest.$ac_ext >&5
7482 rm -rf conftest*
97bf5e38 7483 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7484fi
7485rm -f conftest*
7486fi
7487
97bf5e38
MK
7488echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7489if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7490 cat >> confdefs.h <<\EOF
7491#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7492EOF
7493
97bf5e38 7494fi
c906108c 7495
97bf5e38
MK
7496# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7497echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
d15be926 7498echo "configure:7499: checking for PT_GETDBREGS" >&5
97bf5e38 7499if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7500 echo $ac_n "(cached) $ac_c" 1>&6
7501else
7502 cat > conftest.$ac_ext <<EOF
d15be926 7503#line 7504 "configure"
c906108c 7504#include "confdefs.h"
97bf5e38
MK
7505#include <sys/types.h>
7506#include <sys/ptrace.h>
c906108c 7507int main() {
97bf5e38 7508PT_GETDBREGS;
c906108c
SS
7509; return 0; }
7510EOF
d15be926 7511if { (eval echo configure:7512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7512 rm -rf conftest*
97bf5e38 7513 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7514else
7515 echo "configure: failed program was:" >&5
7516 cat conftest.$ac_ext >&5
7517 rm -rf conftest*
97bf5e38 7518 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7519fi
7520rm -f conftest*
7521fi
7522
97bf5e38
MK
7523echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7524if test $gdb_cv_have_pt_getdbregs = yes; then
7525 cat >> confdefs.h <<\EOF
7526#define HAVE_PT_GETDBREGS 1
c906108c
SS
7527EOF
7528
97bf5e38 7529fi
c906108c 7530
97bf5e38
MK
7531# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7532echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
d15be926 7533echo "configure:7534: checking for PT_GETXMMREGS" >&5
97bf5e38 7534if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7535 echo $ac_n "(cached) $ac_c" 1>&6
7536else
7537 cat > conftest.$ac_ext <<EOF
d15be926 7538#line 7539 "configure"
c906108c 7539#include "confdefs.h"
97bf5e38
MK
7540#include <sys/types.h>
7541#include <sys/ptrace.h>
c906108c 7542int main() {
97bf5e38 7543PT_GETXMMREGS;
c906108c
SS
7544; return 0; }
7545EOF
d15be926 7546if { (eval echo configure:7547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7547 rm -rf conftest*
97bf5e38 7548 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7549else
7550 echo "configure: failed program was:" >&5
7551 cat conftest.$ac_ext >&5
7552 rm -rf conftest*
97bf5e38 7553 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7554fi
7555rm -f conftest*
7556fi
7557
97bf5e38
MK
7558echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7559if test $gdb_cv_have_pt_getxmmregs = yes; then
7560 cat >> confdefs.h <<\EOF
7561#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7562EOF
7563
97bf5e38 7564fi
c906108c 7565
27ca5dad 7566# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7567# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7568echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
d15be926 7569echo "configure:7570: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7570if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7571 echo $ac_n "(cached) $ac_c" 1>&6
7572else
7573 cat > conftest.$ac_ext <<EOF
d15be926 7574#line 7575 "configure"
27ca5dad
MC
7575#include "confdefs.h"
7576#include <stdint.h>
7577int main() {
7578uintptr_t foo = 0;
7579; return 0; }
7580EOF
d15be926 7581if { (eval echo configure:7582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7582 rm -rf conftest*
7583 gdb_cv_have_uintptr_t=yes
7584else
7585 echo "configure: failed program was:" >&5
7586 cat conftest.$ac_ext >&5
7587 rm -rf conftest*
7588 gdb_cv_have_uintptr_t=no
7589fi
7590rm -f conftest*
7591fi
7592
7593echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7594if test $gdb_cv_have_uintptr_t = yes; then
7595 cat >> confdefs.h <<\EOF
7596#define HAVE_UINTPTR_T 1
7597EOF
7598
7599fi
97bf5e38
MK
7600
7601echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
d15be926 7602echo "configure:7603: checking whether malloc must be declared" >&5
97bf5e38 7603if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7604 echo $ac_n "(cached) $ac_c" 1>&6
7605else
7606 cat > conftest.$ac_ext <<EOF
d15be926 7607#line 7608 "configure"
3862412b 7608#include "confdefs.h"
e17bf198 7609
97bf5e38
MK
7610#include <stdio.h>
7611#ifdef HAVE_STRING_H
7612#include <string.h>
7613#else
7614#ifdef HAVE_STRINGS_H
7615#include <strings.h>
7616#endif
7617#endif
7618#ifdef HAVE_STDLIB_H
7619#include <stdlib.h>
7620#endif
7621#ifdef HAVE_UNISTD_H
7622#include <unistd.h>
7623#endif
3862412b 7624int main() {
97bf5e38 7625char *(*pfn) = (char *(*)) malloc
3862412b
MK
7626; return 0; }
7627EOF
d15be926 7628if { (eval echo configure:7629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7629 rm -rf conftest*
97bf5e38 7630 bfd_cv_decl_needed_malloc=no
3862412b
MK
7631else
7632 echo "configure: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 rm -rf conftest*
97bf5e38 7635 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7636fi
7637rm -f conftest*
7638fi
7639
97bf5e38
MK
7640echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7641if test $bfd_cv_decl_needed_malloc = yes; then
7642 cat >> confdefs.h <<\EOF
7643#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7644EOF
7645
97bf5e38 7646fi
3862412b 7647
97bf5e38 7648echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
d15be926 7649echo "configure:7650: checking whether realloc must be declared" >&5
97bf5e38 7650if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7651 echo $ac_n "(cached) $ac_c" 1>&6
7652else
7653 cat > conftest.$ac_ext <<EOF
d15be926 7654#line 7655 "configure"
3862412b 7655#include "confdefs.h"
e17bf198 7656
97bf5e38
MK
7657#include <stdio.h>
7658#ifdef HAVE_STRING_H
7659#include <string.h>
7660#else
7661#ifdef HAVE_STRINGS_H
7662#include <strings.h>
7663#endif
7664#endif
7665#ifdef HAVE_STDLIB_H
7666#include <stdlib.h>
7667#endif
7668#ifdef HAVE_UNISTD_H
7669#include <unistd.h>
7670#endif
3862412b 7671int main() {
97bf5e38 7672char *(*pfn) = (char *(*)) realloc
3862412b
MK
7673; return 0; }
7674EOF
d15be926 7675if { (eval echo configure:7676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7676 rm -rf conftest*
97bf5e38 7677 bfd_cv_decl_needed_realloc=no
3862412b
MK
7678else
7679 echo "configure: failed program was:" >&5
7680 cat conftest.$ac_ext >&5
7681 rm -rf conftest*
97bf5e38 7682 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7683fi
7684rm -f conftest*
7685fi
7686
97bf5e38
MK
7687echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7688if test $bfd_cv_decl_needed_realloc = yes; then
7689 cat >> confdefs.h <<\EOF
7690#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7691EOF
7692
97bf5e38 7693fi
3862412b 7694
97bf5e38 7695echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
d15be926 7696echo "configure:7697: checking whether free must be declared" >&5
97bf5e38 7697if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7698 echo $ac_n "(cached) $ac_c" 1>&6
7699else
7700 cat > conftest.$ac_ext <<EOF
d15be926 7701#line 7702 "configure"
451928c5 7702#include "confdefs.h"
e17bf198 7703
97bf5e38
MK
7704#include <stdio.h>
7705#ifdef HAVE_STRING_H
7706#include <string.h>
7707#else
7708#ifdef HAVE_STRINGS_H
7709#include <strings.h>
7710#endif
7711#endif
7712#ifdef HAVE_STDLIB_H
7713#include <stdlib.h>
7714#endif
7715#ifdef HAVE_UNISTD_H
7716#include <unistd.h>
7717#endif
451928c5 7718int main() {
97bf5e38 7719char *(*pfn) = (char *(*)) free
451928c5
AC
7720; return 0; }
7721EOF
d15be926 7722if { (eval echo configure:7723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7723 rm -rf conftest*
97bf5e38 7724 bfd_cv_decl_needed_free=no
451928c5
AC
7725else
7726 echo "configure: failed program was:" >&5
7727 cat conftest.$ac_ext >&5
7728 rm -rf conftest*
97bf5e38 7729 bfd_cv_decl_needed_free=yes
451928c5
AC
7730fi
7731rm -f conftest*
7732fi
7733
97bf5e38
MK
7734echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7735if test $bfd_cv_decl_needed_free = yes; then
7736 cat >> confdefs.h <<\EOF
7737#define NEED_DECLARATION_FREE 1
451928c5
AC
7738EOF
7739
97bf5e38 7740fi
451928c5 7741
97bf5e38 7742echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
d15be926 7743echo "configure:7744: checking whether strerror must be declared" >&5
97bf5e38 7744if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7745 echo $ac_n "(cached) $ac_c" 1>&6
7746else
7747 cat > conftest.$ac_ext <<EOF
d15be926 7748#line 7749 "configure"
451928c5 7749#include "confdefs.h"
e17bf198 7750
97bf5e38
MK
7751#include <stdio.h>
7752#ifdef HAVE_STRING_H
7753#include <string.h>
7754#else
7755#ifdef HAVE_STRINGS_H
7756#include <strings.h>
7757#endif
7758#endif
7759#ifdef HAVE_STDLIB_H
7760#include <stdlib.h>
7761#endif
7762#ifdef HAVE_UNISTD_H
7763#include <unistd.h>
7764#endif
451928c5 7765int main() {
97bf5e38 7766char *(*pfn) = (char *(*)) strerror
451928c5
AC
7767; return 0; }
7768EOF
d15be926 7769if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7770 rm -rf conftest*
97bf5e38 7771 bfd_cv_decl_needed_strerror=no
451928c5
AC
7772else
7773 echo "configure: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 rm -rf conftest*
97bf5e38 7776 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7777fi
7778rm -f conftest*
7779fi
7780
97bf5e38
MK
7781echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7782if test $bfd_cv_decl_needed_strerror = yes; then
7783 cat >> confdefs.h <<\EOF
7784#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7785EOF
7786
97bf5e38 7787fi
451928c5 7788
97bf5e38 7789echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
d15be926 7790echo "configure:7791: checking whether strdup must be declared" >&5
97bf5e38 7791if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7792 echo $ac_n "(cached) $ac_c" 1>&6
7793else
7794 cat > conftest.$ac_ext <<EOF
d15be926 7795#line 7796 "configure"
3862412b 7796#include "confdefs.h"
e17bf198 7797
97bf5e38
MK
7798#include <stdio.h>
7799#ifdef HAVE_STRING_H
7800#include <string.h>
7801#else
7802#ifdef HAVE_STRINGS_H
7803#include <strings.h>
7804#endif
7805#endif
7806#ifdef HAVE_STDLIB_H
7807#include <stdlib.h>
7808#endif
7809#ifdef HAVE_UNISTD_H
7810#include <unistd.h>
7811#endif
3862412b 7812int main() {
97bf5e38 7813char *(*pfn) = (char *(*)) strdup
3862412b
MK
7814; return 0; }
7815EOF
d15be926 7816if { (eval echo configure:7817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7817 rm -rf conftest*
97bf5e38 7818 bfd_cv_decl_needed_strdup=no
3862412b
MK
7819else
7820 echo "configure: failed program was:" >&5
7821 cat conftest.$ac_ext >&5
7822 rm -rf conftest*
97bf5e38 7823 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7824fi
7825rm -f conftest*
7826fi
7827
97bf5e38
MK
7828echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7829if test $bfd_cv_decl_needed_strdup = yes; then
7830 cat >> confdefs.h <<\EOF
7831#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7832EOF
7833
97bf5e38 7834fi
3862412b 7835
97bf5e38 7836echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
d15be926 7837echo "configure:7838: checking whether strstr must be declared" >&5
97bf5e38 7838if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7839 echo $ac_n "(cached) $ac_c" 1>&6
7840else
7841 cat > conftest.$ac_ext <<EOF
d15be926 7842#line 7843 "configure"
3862412b 7843#include "confdefs.h"
e17bf198 7844
97bf5e38
MK
7845#include <stdio.h>
7846#ifdef HAVE_STRING_H
7847#include <string.h>
7848#else
7849#ifdef HAVE_STRINGS_H
7850#include <strings.h>
7851#endif
7852#endif
7853#ifdef HAVE_STDLIB_H
7854#include <stdlib.h>
7855#endif
7856#ifdef HAVE_UNISTD_H
7857#include <unistd.h>
7858#endif
3862412b 7859int main() {
97bf5e38 7860char *(*pfn) = (char *(*)) strstr
3862412b
MK
7861; return 0; }
7862EOF
d15be926 7863if { (eval echo configure:7864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7864 rm -rf conftest*
97bf5e38 7865 bfd_cv_decl_needed_strstr=no
3862412b
MK
7866else
7867 echo "configure: failed program was:" >&5
7868 cat conftest.$ac_ext >&5
7869 rm -rf conftest*
97bf5e38 7870 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7871fi
7872rm -f conftest*
7873fi
7874
97bf5e38
MK
7875echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7876if test $bfd_cv_decl_needed_strstr = yes; then
7877 cat >> confdefs.h <<\EOF
7878#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7879EOF
7880
97bf5e38 7881fi
3862412b 7882
97bf5e38 7883echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
d15be926 7884echo "configure:7885: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7885if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7886 echo $ac_n "(cached) $ac_c" 1>&6
7887else
7888 cat > conftest.$ac_ext <<EOF
d15be926 7889#line 7890 "configure"
596c9d4b
KB
7890#include "confdefs.h"
7891
97bf5e38
MK
7892#include <stdio.h>
7893#ifdef HAVE_STRING_H
7894#include <string.h>
7895#else
7896#ifdef HAVE_STRINGS_H
7897#include <strings.h>
7898#endif
7899#endif
7900#ifdef HAVE_STDLIB_H
7901#include <stdlib.h>
7902#endif
7903#ifdef HAVE_UNISTD_H
7904#include <unistd.h>
7905#endif
596c9d4b 7906int main() {
97bf5e38 7907char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7908; return 0; }
7909EOF
d15be926 7910if { (eval echo configure:7911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7911 rm -rf conftest*
97bf5e38 7912 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7913else
7914 echo "configure: failed program was:" >&5
7915 cat conftest.$ac_ext >&5
7916 rm -rf conftest*
97bf5e38 7917 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7918fi
7919rm -f conftest*
7920fi
7921
97bf5e38
MK
7922echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7923if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7924 cat >> confdefs.h <<\EOF
7925#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7926EOF
7927
97bf5e38 7928fi
596c9d4b 7929
97bf5e38
MK
7930
7931# The following save_state_t checkery is only necessary for HPUX
7932# versions earlier than 10.20. When those fade from memory, this
7933# could be expunged. --jsm 1999-03-22
7934
7935echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
d15be926 7936echo "configure:7937: checking for HPUX save_state structure" >&5
97bf5e38 7937cat > conftest.$ac_ext <<EOF
d15be926 7938#line 7939 "configure"
97bf5e38
MK
7939#include "confdefs.h"
7940#include <machine/save_state.h>
7941EOF
7942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7943 egrep "save_state_t" >/dev/null 2>&1; then
7944 rm -rf conftest*
7945 gdb_cv_hpux_savestate=yes
7946else
7947 rm -rf conftest*
7948 gdb_cv_hpux_savestate=no
7949fi
7950rm -f conftest*
7951
7952cat > conftest.$ac_ext <<EOF
d15be926 7953#line 7954 "configure"
97bf5e38
MK
7954#include "confdefs.h"
7955#include <machine/save_state.h>
7956EOF
7957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7958 egrep "ss_wide" >/dev/null 2>&1; then
7959 rm -rf conftest*
7960 gdb_cv_hpux_sswide=yes
7961else
7962 rm -rf conftest*
7963 gdb_cv_hpux_sswide=no
7964fi
7965rm -f conftest*
7966
7967if test $gdb_cv_hpux_savestate = yes
7968then
7969 cat >> confdefs.h <<\EOF
7970#define HAVE_STRUCT_SAVE_STATE_T 1
7971EOF
7972
7973fi
7974if test $gdb_cv_hpux_sswide = yes
7975then
7976 cat >> confdefs.h <<\EOF
7977#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7978EOF
7979
7980fi
7981echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7982
7983
7984# If we are configured native on GNU/Linux, work around problems with
7985# sys/procfs.h
7986# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7987
7988if test "${target}" = "${host}"; then
7989 case "${host}" in
7990 i[3456]86-*-linux*)
7991 cat >> confdefs.h <<\EOF
7992#define START_INFERIOR_TRAPS_EXPECTED 2
7993EOF
7994
7995 cat >> confdefs.h <<\EOF
7996#define sys_quotactl 1
7997EOF
7998
7999 ;;
8000 ia64-*-aix*)
8001 cat >> confdefs.h <<\EOF
8002#define NEW_PROC_API 1
8003EOF
8004
8005 ;;
8006 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8007 cat >> confdefs.h <<\EOF
8008#define NEW_PROC_API 1
8009EOF
8010
8011 ;;
e7c61be3 8012 *-*-solaris2.[6789])
97bf5e38
MK
8013 cat >> confdefs.h <<\EOF
8014#define NEW_PROC_API 1
c960c18f
AC
8015EOF
8016
8017 ;;
8018 mips-sgi-irix5*)
8019 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8020 cat >> confdefs.h <<\EOF
8021#define _KMEMUSER 1
97bf5e38
MK
8022EOF
8023
8024 ;;
8025 esac
8026fi
8027
8028if test "$ac_cv_header_sys_procfs_h" = yes; then
8029 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8030echo "configure:8031: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8031 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8032 echo $ac_n "(cached) $ac_c" 1>&6
8033else
8034 cat > conftest.$ac_ext <<EOF
d15be926 8035#line 8036 "configure"
596c9d4b
KB
8036#include "confdefs.h"
8037
8038#define _SYSCALL32
8039#include <sys/procfs.h>
8040int main() {
97bf5e38 8041pstatus_t avar
596c9d4b
KB
8042; return 0; }
8043EOF
d15be926 8044if { (eval echo configure:8045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8045 rm -rf conftest*
97bf5e38 8046 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8047else
8048 echo "configure: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8050 rm -rf conftest*
97bf5e38 8051 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8052
8053fi
8054rm -f conftest*
8055fi
8056
97bf5e38 8057 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8058 cat >> confdefs.h <<\EOF
97bf5e38 8059#define HAVE_PSTATUS_T 1
596c9d4b
KB
8060EOF
8061
8062 fi
97bf5e38 8063 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8064
97bf5e38 8065 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8066echo "configure:8067: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8067 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8068 echo $ac_n "(cached) $ac_c" 1>&6
8069else
8070 cat > conftest.$ac_ext <<EOF
d15be926 8071#line 8072 "configure"
596c9d4b
KB
8072#include "confdefs.h"
8073
8074#define _SYSCALL32
8075#include <sys/procfs.h>
8076int main() {
97bf5e38 8077prrun_t avar
596c9d4b
KB
8078; return 0; }
8079EOF
d15be926 8080if { (eval echo configure:8081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8081 rm -rf conftest*
97bf5e38 8082 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8083else
8084 echo "configure: failed program was:" >&5
8085 cat conftest.$ac_ext >&5
8086 rm -rf conftest*
97bf5e38 8087 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8088
8089fi
8090rm -f conftest*
8091fi
8092
97bf5e38 8093 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8094 cat >> confdefs.h <<\EOF
97bf5e38 8095#define HAVE_PRRUN_T 1
596c9d4b
KB
8096EOF
8097
8098 fi
97bf5e38 8099 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8100
97bf5e38 8101 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8102echo "configure:8103: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8103 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8104 echo $ac_n "(cached) $ac_c" 1>&6
8105else
8106 cat > conftest.$ac_ext <<EOF
d15be926 8107#line 8108 "configure"
596c9d4b
KB
8108#include "confdefs.h"
8109
8110#define _SYSCALL32
8111#include <sys/procfs.h>
8112int main() {
97bf5e38 8113gregset_t avar
596c9d4b
KB
8114; return 0; }
8115EOF
d15be926 8116if { (eval echo configure:8117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8117 rm -rf conftest*
97bf5e38 8118 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8119else
8120 echo "configure: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8122 rm -rf conftest*
97bf5e38 8123 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8124
8125fi
8126rm -f conftest*
8127fi
8128
97bf5e38 8129 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8130 cat >> confdefs.h <<\EOF
97bf5e38 8131#define HAVE_GREGSET_T 1
596c9d4b
KB
8132EOF
8133
8134 fi
97bf5e38 8135 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8136
97bf5e38 8137 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8138echo "configure:8139: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8139 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8140 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8141else
8142 cat > conftest.$ac_ext <<EOF
d15be926 8143#line 8144 "configure"
d84dd0c5 8144#include "confdefs.h"
97bf5e38
MK
8145
8146#define _SYSCALL32
d84dd0c5 8147#include <sys/procfs.h>
97bf5e38
MK
8148int main() {
8149fpregset_t avar
8150; return 0; }
d84dd0c5 8151EOF
d15be926 8152if { (eval echo configure:8153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8153 rm -rf conftest*
8154 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8155else
8156 echo "configure: failed program was:" >&5
8157 cat conftest.$ac_ext >&5
97bf5e38
MK
8158 rm -rf conftest*
8159 bfd_cv_have_sys_procfs_type_fpregset_t=no
8160
d84dd0c5 8161fi
97bf5e38 8162rm -f conftest*
d84dd0c5
MK
8163fi
8164
97bf5e38
MK
8165 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8166 cat >> confdefs.h <<\EOF
8167#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8168EOF
8169
97bf5e38
MK
8170 fi
8171 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8172
97bf5e38 8173 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8174echo "configure:8175: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8175 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8176 echo $ac_n "(cached) $ac_c" 1>&6
8177else
8178 cat > conftest.$ac_ext <<EOF
d15be926 8179#line 8180 "configure"
c906108c 8180#include "confdefs.h"
c906108c 8181
97bf5e38
MK
8182#define _SYSCALL32
8183#include <sys/procfs.h>
c906108c 8184int main() {
97bf5e38 8185prgregset_t avar
c906108c
SS
8186; return 0; }
8187EOF
d15be926 8188if { (eval echo configure:8189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8189 rm -rf conftest*
97bf5e38 8190 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8191else
8192 echo "configure: failed program was:" >&5
8193 cat conftest.$ac_ext >&5
8194 rm -rf conftest*
97bf5e38
MK
8195 bfd_cv_have_sys_procfs_type_prgregset_t=no
8196
c906108c
SS
8197fi
8198rm -f conftest*
8199fi
8200
97bf5e38
MK
8201 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8202 cat >> confdefs.h <<\EOF
8203#define HAVE_PRGREGSET_T 1
c906108c
SS
8204EOF
8205
97bf5e38
MK
8206 fi
8207 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8208
97bf5e38 8209 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8210echo "configure:8211: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8211 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8212 echo $ac_n "(cached) $ac_c" 1>&6
8213else
8214 cat > conftest.$ac_ext <<EOF
d15be926 8215#line 8216 "configure"
d45fe813 8216#include "confdefs.h"
97bf5e38
MK
8217
8218#define _SYSCALL32
8219#include <sys/procfs.h>
d45fe813 8220int main() {
97bf5e38 8221prfpregset_t avar
d45fe813
KB
8222; return 0; }
8223EOF
d15be926 8224if { (eval echo configure:8225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8225 rm -rf conftest*
97bf5e38 8226 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8227else
8228 echo "configure: failed program was:" >&5
8229 cat conftest.$ac_ext >&5
8230 rm -rf conftest*
97bf5e38
MK
8231 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8232
d45fe813
KB
8233fi
8234rm -f conftest*
8235fi
8236
97bf5e38
MK
8237 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8238 cat >> confdefs.h <<\EOF
8239#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8240EOF
8241
97bf5e38
MK
8242 fi
8243 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8244
97bf5e38 8245 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8246echo "configure:8247: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8247 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8248 echo $ac_n "(cached) $ac_c" 1>&6
8249else
8250 cat > conftest.$ac_ext <<EOF
d15be926 8251#line 8252 "configure"
d45fe813 8252#include "confdefs.h"
97bf5e38
MK
8253
8254#define _SYSCALL32
8255#include <sys/procfs.h>
d45fe813 8256int main() {
97bf5e38 8257prgregset32_t avar
d45fe813
KB
8258; return 0; }
8259EOF
d15be926 8260if { (eval echo configure:8261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8261 rm -rf conftest*
97bf5e38 8262 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8263else
8264 echo "configure: failed program was:" >&5
8265 cat conftest.$ac_ext >&5
8266 rm -rf conftest*
97bf5e38
MK
8267 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8268
d45fe813
KB
8269fi
8270rm -f conftest*
8271fi
8272
97bf5e38
MK
8273 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8274 cat >> confdefs.h <<\EOF
8275#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8276EOF
8277
97bf5e38
MK
8278 fi
8279 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8280
97bf5e38 8281 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8282echo "configure:8283: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8283 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8284 echo $ac_n "(cached) $ac_c" 1>&6
8285else
8286 cat > conftest.$ac_ext <<EOF
d15be926 8287#line 8288 "configure"
d45fe813 8288#include "confdefs.h"
97bf5e38
MK
8289
8290#define _SYSCALL32
8291#include <sys/procfs.h>
d45fe813 8292int main() {
97bf5e38 8293prfpregset32_t avar
d45fe813
KB
8294; return 0; }
8295EOF
d15be926 8296if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8297 rm -rf conftest*
97bf5e38 8298 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8299else
8300 echo "configure: failed program was:" >&5
8301 cat conftest.$ac_ext >&5
8302 rm -rf conftest*
97bf5e38
MK
8303 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8304
d45fe813
KB
8305fi
8306rm -f conftest*
8307fi
8308
97bf5e38
MK
8309 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8310 cat >> confdefs.h <<\EOF
8311#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8312EOF
8313
97bf5e38
MK
8314 fi
8315 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8316
97bf5e38 8317 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8318echo "configure:8319: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8319 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8320 echo $ac_n "(cached) $ac_c" 1>&6
8321else
8322 cat > conftest.$ac_ext <<EOF
d15be926 8323#line 8324 "configure"
d45fe813 8324#include "confdefs.h"
97bf5e38 8325
d45fe813 8326#define _SYSCALL32
97bf5e38 8327#include <sys/procfs.h>
d45fe813 8328int main() {
97bf5e38 8329lwpid_t avar
d45fe813
KB
8330; return 0; }
8331EOF
d15be926 8332if { (eval echo configure:8333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8333 rm -rf conftest*
97bf5e38 8334 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8335else
8336 echo "configure: failed program was:" >&5
8337 cat conftest.$ac_ext >&5
8338 rm -rf conftest*
97bf5e38
MK
8339 bfd_cv_have_sys_procfs_type_lwpid_t=no
8340
d45fe813
KB
8341fi
8342rm -f conftest*
8343fi
8344
97bf5e38
MK
8345 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8346 cat >> confdefs.h <<\EOF
8347#define HAVE_LWPID_T 1
d45fe813
KB
8348EOF
8349
97bf5e38
MK
8350 fi
8351 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8352
97bf5e38 8353 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8354echo "configure:8355: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8355 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8356 echo $ac_n "(cached) $ac_c" 1>&6
8357else
8358 cat > conftest.$ac_ext <<EOF
d15be926 8359#line 8360 "configure"
c906108c
SS
8360#include "confdefs.h"
8361
97bf5e38
MK
8362#define _SYSCALL32
8363#include <sys/procfs.h>
c906108c 8364int main() {
97bf5e38 8365psaddr_t avar
c906108c
SS
8366; return 0; }
8367EOF
d15be926 8368if { (eval echo configure:8369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8369 rm -rf conftest*
97bf5e38 8370 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8371else
8372 echo "configure: failed program was:" >&5
8373 cat conftest.$ac_ext >&5
8374 rm -rf conftest*
97bf5e38
MK
8375 bfd_cv_have_sys_procfs_type_psaddr_t=no
8376
c906108c
SS
8377fi
8378rm -f conftest*
8379fi
8380
97bf5e38
MK
8381 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8382 cat >> confdefs.h <<\EOF
8383#define HAVE_PSADDR_T 1
c906108c
SS
8384EOF
8385
97bf5e38
MK
8386 fi
8387 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8388
97bf5e38 8389 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8390echo "configure:8391: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8391 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8392 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8393else
8394 cat > conftest.$ac_ext <<EOF
d15be926 8395#line 8396 "configure"
c906108c
SS
8396#include "confdefs.h"
8397
97bf5e38
MK
8398#define _SYSCALL32
8399#include <sys/procfs.h>
8400int main() {
8401prsysent_t avar
8402; return 0; }
c906108c 8403EOF
d15be926 8404if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8405 rm -rf conftest*
8406 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8407else
8408 echo "configure: failed program was:" >&5
8409 cat conftest.$ac_ext >&5
97bf5e38
MK
8410 rm -rf conftest*
8411 bfd_cv_have_sys_procfs_type_prsysent_t=no
8412
c906108c 8413fi
97bf5e38 8414rm -f conftest*
c906108c
SS
8415fi
8416
97bf5e38
MK
8417 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8418 cat >> confdefs.h <<\EOF
8419#define HAVE_PRSYSENT_T 1
c906108c
SS
8420EOF
8421
97bf5e38
MK
8422 fi
8423 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8424
97bf5e38 8425 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8426echo "configure:8427: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8427 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8428 echo $ac_n "(cached) $ac_c" 1>&6
8429else
8430 cat > conftest.$ac_ext <<EOF
d15be926 8431#line 8432 "configure"
c906108c
SS
8432#include "confdefs.h"
8433
97bf5e38
MK
8434#define _SYSCALL32
8435#include <sys/procfs.h>
c906108c 8436int main() {
97bf5e38 8437pr_sigset_t avar
c906108c
SS
8438; return 0; }
8439EOF
d15be926 8440if { (eval echo configure:8441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8441 rm -rf conftest*
97bf5e38 8442 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8443else
8444 echo "configure: failed program was:" >&5
8445 cat conftest.$ac_ext >&5
8446 rm -rf conftest*
97bf5e38
MK
8447 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8448
c906108c
SS
8449fi
8450rm -f conftest*
8451fi
8452
97bf5e38
MK
8453 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8454 cat >> confdefs.h <<\EOF
8455#define HAVE_PR_SIGSET_T 1
c906108c
SS
8456EOF
8457
97bf5e38
MK
8458 fi
8459 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8460
97bf5e38 8461 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8462echo "configure:8463: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8463 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8464 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8465else
8466 cat > conftest.$ac_ext <<EOF
d15be926 8467#line 8468 "configure"
c906108c
SS
8468#include "confdefs.h"
8469
97bf5e38
MK
8470#define _SYSCALL32
8471#include <sys/procfs.h>
8472int main() {
8473pr_sigaction64_t avar
8474; return 0; }
c906108c 8475EOF
d15be926 8476if { (eval echo configure:8477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8477 rm -rf conftest*
8478 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8479else
8480 echo "configure: failed program was:" >&5
8481 cat conftest.$ac_ext >&5
97bf5e38
MK
8482 rm -rf conftest*
8483 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8484
c906108c 8485fi
97bf5e38 8486rm -f conftest*
c906108c
SS
8487fi
8488
97bf5e38
MK
8489 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8490 cat >> confdefs.h <<\EOF
8491#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8492EOF
8493
97bf5e38
MK
8494 fi
8495 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8496
8497 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
d15be926 8498echo "configure:8499: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8499 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8500 echo $ac_n "(cached) $ac_c" 1>&6
8501else
8502 cat > conftest.$ac_ext <<EOF
d15be926 8503#line 8504 "configure"
97bf5e38
MK
8504#include "confdefs.h"
8505
8506#define _SYSCALL32
8507#include <sys/procfs.h>
8508int main() {
8509pr_siginfo64_t avar
8510; return 0; }
8511EOF
d15be926 8512if { (eval echo configure:8513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8513 rm -rf conftest*
8514 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8515else
8516 echo "configure: failed program was:" >&5
8517 cat conftest.$ac_ext >&5
8518 rm -rf conftest*
8519 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8520
8521fi
8522rm -f conftest*
c906108c 8523fi
c906108c 8524
97bf5e38
MK
8525 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8526 cat >> confdefs.h <<\EOF
8527#define HAVE_PR_SIGINFO64_T 1
8528EOF
c906108c 8529
97bf5e38
MK
8530 fi
8531 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8532
8533
8534
8535
8536
8537 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8538 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
d15be926 8539echo "configure:8540: checking whether prfpregset_t type is broken" >&5
97bf5e38 8540 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8541 echo $ac_n "(cached) $ac_c" 1>&6
8542else
8543 if test "$cross_compiling" = yes; then
97bf5e38 8544 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8545else
8546 cat > conftest.$ac_ext <<EOF
d15be926 8547#line 8548 "configure"
c906108c 8548#include "confdefs.h"
97bf5e38
MK
8549#include <sys/procfs.h>
8550 int main ()
8551 {
8552 if (sizeof (prfpregset_t) == sizeof (void *))
8553 return 1;
8554 return 0;
8555 }
c906108c 8556EOF
d15be926 8557if { (eval echo configure:8558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8558then
97bf5e38 8559 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8560else
8561 echo "configure: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 rm -fr conftest*
97bf5e38 8564 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8565fi
8566rm -fr conftest*
8567fi
8568
8569fi
8570
97bf5e38
MK
8571 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8572 if test $gdb_cv_prfpregset_t_broken = yes; then
8573 cat >> confdefs.h <<\EOF
8574#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8575EOF
8576
97bf5e38
MK
8577 fi
8578 fi
c906108c 8579
97bf5e38
MK
8580
8581 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
d15be926 8582echo "configure:8583: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8583 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8584 echo $ac_n "(cached) $ac_c" 1>&6
8585else
8586 cat > conftest.$ac_ext <<EOF
d15be926 8587#line 8588 "configure"
c906108c 8588#include "confdefs.h"
97bf5e38
MK
8589#include <unistd.h>
8590#include <sys/types.h>
8591#include <sys/procfs.h>
8592
8593int main() {
8594
8595 int dummy;;
8596 dummy = ioctl(0, PIOCSET, &dummy);
8597
8598; return 0; }
c906108c 8599EOF
d15be926 8600if { (eval echo configure:8601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8601 rm -rf conftest*
97bf5e38 8602 gdb_cv_have_procfs_piocset=yes
c906108c 8603else
c906108c
SS
8604 echo "configure: failed program was:" >&5
8605 cat conftest.$ac_ext >&5
8606 rm -rf conftest*
97bf5e38 8607 gdb_cv_have_procfs_piocset=no
c906108c
SS
8608fi
8609rm -f conftest*
8610fi
97bf5e38
MK
8611
8612 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8613 if test $gdb_cv_have_procfs_piocset = yes; then
8614 cat >> confdefs.h <<\EOF
8615#define HAVE_PROCFS_PIOCSET 1
c906108c 8616EOF
97bf5e38
MK
8617
8618 fi
c906108c 8619fi
c906108c 8620
97bf5e38
MK
8621if test ${host} = ${target} ; then
8622
8623 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
d15be926 8624echo "configure:8625: checking for member l_addr in struct link_map" >&5
97bf5e38 8625 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8626 echo $ac_n "(cached) $ac_c" 1>&6
8627else
8628 cat > conftest.$ac_ext <<EOF
d15be926 8629#line 8630 "configure"
c906108c 8630#include "confdefs.h"
97bf5e38 8631#include <link.h>
c906108c 8632int main() {
97bf5e38 8633struct link_map lm; (void) lm.l_addr;
c906108c
SS
8634; return 0; }
8635EOF
d15be926 8636if { (eval echo configure:8637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8637 rm -rf conftest*
97bf5e38 8638 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8639else
8640 echo "configure: failed program was:" >&5
8641 cat conftest.$ac_ext >&5
8642 rm -rf conftest*
97bf5e38 8643 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8644fi
8645rm -f conftest*
8646fi
8647
97bf5e38
MK
8648 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8649 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8650 cat >> confdefs.h <<\EOF
8651#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8652EOF
97bf5e38
MK
8653
8654 fi
8655
8656
8657 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
d15be926 8658echo "configure:8659: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8659 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8660 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8661else
97bf5e38 8662 cat > conftest.$ac_ext <<EOF
d15be926 8663#line 8664 "configure"
97bf5e38
MK
8664#include "confdefs.h"
8665#include <sys/types.h>
8666#include <link.h>
8667int main() {
8668struct link_map lm; (void) lm.lm_addr;
8669; return 0; }
8670EOF
d15be926 8671if { (eval echo configure:8672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8672 rm -rf conftest*
8673 gdb_cv_have_struct_link_map_with_lm_members=yes
8674else
8675 echo "configure: failed program was:" >&5
8676 cat conftest.$ac_ext >&5
8677 rm -rf conftest*
8678 gdb_cv_have_struct_link_map_with_lm_members=no
8679fi
8680rm -f conftest*
c906108c 8681fi
c906108c 8682
97bf5e38
MK
8683 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8684 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8685 cat >> confdefs.h <<\EOF
8686#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8687EOF
8688
8689 fi
8690
8691
8692 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
d15be926 8693echo "configure:8694: checking for member som_addr in struct so_map" >&5
97bf5e38 8694 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8695 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8696else
8697 cat > conftest.$ac_ext <<EOF
d15be926 8698#line 8699 "configure"
c906108c 8699#include "confdefs.h"
97bf5e38
MK
8700#include <sys/types.h>
8701#ifdef HAVE_NLIST_H
8702#include <nlist.h>
8703#endif
8704#include <link.h>
8705int main() {
8706struct so_map lm; (void) lm.som_addr;
8707; return 0; }
8708EOF
d15be926 8709if { (eval echo configure:8710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8710 rm -rf conftest*
8711 gdb_cv_have_struct_so_map_with_som_members=yes
8712else
8713 echo "configure: failed program was:" >&5
8714 cat conftest.$ac_ext >&5
8715 rm -rf conftest*
8716 gdb_cv_have_struct_so_map_with_som_members=no
8717fi
8718rm -f conftest*
8719fi
c906108c 8720
97bf5e38
MK
8721 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8722 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8723 cat >> confdefs.h <<\EOF
8724#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8725EOF
c906108c 8726
97bf5e38 8727 fi
c906108c 8728
97bf5e38
MK
8729
8730 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
d15be926 8731echo "configure:8732: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8732 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8733 echo $ac_n "(cached) $ac_c" 1>&6
8734else
8735 cat > conftest.$ac_ext <<EOF
d15be926 8736#line 8737 "configure"
97bf5e38
MK
8737#include "confdefs.h"
8738#define _SYSCALL32
8739#include <sys/link.h>
8740int main() {
8741struct link_map32 l;
8742; return 0; }
8743EOF
d15be926 8744if { (eval echo configure:8745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8745 rm -rf conftest*
8746 gdb_cv_have_struct_link_map32=yes
8747else
8748 echo "configure: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 rm -rf conftest*
8751 gdb_cv_have_struct_link_map32=no
8752fi
8753rm -f conftest*
8754fi
c906108c 8755
97bf5e38
MK
8756 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8757 if test $gdb_cv_have_struct_link_map32 = yes; then
8758 cat >> confdefs.h <<\EOF
8759#define HAVE_STRUCT_LINK_MAP32 1
8760EOF
c906108c 8761
97bf5e38
MK
8762 cat >> confdefs.h <<\EOF
8763#define _SYSCALL32 1
8764EOF
c906108c 8765
97bf5e38
MK
8766 fi
8767fi
c906108c 8768
c906108c 8769
97bf5e38 8770echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
d15be926 8771echo "configure:8772: checking for long long support in compiler" >&5
97bf5e38
MK
8772if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8773 echo $ac_n "(cached) $ac_c" 1>&6
8774else
8775 cat > conftest.$ac_ext <<EOF
d15be926 8776#line 8777 "configure"
97bf5e38 8777#include "confdefs.h"
c906108c 8778
97bf5e38 8779int main() {
c906108c 8780
97bf5e38
MK
8781 extern long long foo;
8782 switch (foo & 2) { case 0: return 1; }
c906108c 8783
97bf5e38
MK
8784; return 0; }
8785EOF
d15be926 8786if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8787 rm -rf conftest*
8788 gdb_cv_c_long_long=yes
8789else
8790 echo "configure: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8792 rm -rf conftest*
8793 gdb_cv_c_long_long=no
8794fi
8795rm -f conftest*
8796fi
c906108c 8797
97bf5e38
MK
8798echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8799if test $gdb_cv_c_long_long = yes; then
8800 cat >> confdefs.h <<\EOF
8801#define CC_HAS_LONG_LONG 1
8802EOF
8803
8804fi
8805
8806
8807echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
d15be926 8808echo "configure:8809: checking for long long support in printf" >&5
97bf5e38
MK
8809if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8810 echo $ac_n "(cached) $ac_c" 1>&6
8811else
8812 if test "$cross_compiling" = yes; then
8813 gdb_cv_printf_has_long_long=no
8814else
8815 cat > conftest.$ac_ext <<EOF
d15be926 8816#line 8817 "configure"
97bf5e38
MK
8817#include "confdefs.h"
8818
8819int main () {
8820 char buf[32];
8821 long long l = 0;
8822 l = (l << 16) + 0x0123;
8823 l = (l << 16) + 0x4567;
8824 l = (l << 16) + 0x89ab;
8825 l = (l << 16) + 0xcdef;
8826 sprintf (buf, "0x%016llx", l);
8827 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8828}
97bf5e38 8829EOF
d15be926 8830if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8831then
8832 gdb_cv_printf_has_long_long=yes
8833else
8834 echo "configure: failed program was:" >&5
8835 cat conftest.$ac_ext >&5
8836 rm -fr conftest*
8837 gdb_cv_printf_has_long_long=no
8838fi
8839rm -fr conftest*
8840fi
8841
8842fi
8843
8844if test $gdb_cv_printf_has_long_long = yes; then
8845 cat >> confdefs.h <<\EOF
8846#define PRINTF_HAS_LONG_LONG 1
8847EOF
8848
8849fi
8850echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8851
8852
8853echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
d15be926 8854echo "configure:8855: checking for long double support in compiler" >&5
97bf5e38
MK
8855if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8856 echo $ac_n "(cached) $ac_c" 1>&6
8857else
8858 cat > conftest.$ac_ext <<EOF
d15be926 8859#line 8860 "configure"
97bf5e38
MK
8860#include "confdefs.h"
8861
8862int main() {
8863long double foo;
8864; return 0; }
8865EOF
d15be926 8866if { (eval echo configure:8867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8867 rm -rf conftest*
8868 ac_cv_c_long_double=yes
8869else
8870 echo "configure: failed program was:" >&5
8871 cat conftest.$ac_ext >&5
8872 rm -rf conftest*
8873 ac_cv_c_long_double=no
8874fi
8875rm -f conftest*
8876fi
c906108c 8877
97bf5e38
MK
8878echo "$ac_t""$ac_cv_c_long_double" 1>&6
8879if test $ac_cv_c_long_double = yes; then
8880 cat >> confdefs.h <<\EOF
8881#define HAVE_LONG_DOUBLE 1
c906108c 8882EOF
97bf5e38
MK
8883
8884fi
8885
8886
8887echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
d15be926 8888echo "configure:8889: checking for long double support in printf" >&5
97bf5e38
MK
8889if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8890 echo $ac_n "(cached) $ac_c" 1>&6
8891else
8892 if test "$cross_compiling" = yes; then
8893 gdb_cv_printf_has_long_double=no
8894else
8895 cat > conftest.$ac_ext <<EOF
d15be926 8896#line 8897 "configure"
97bf5e38
MK
8897#include "confdefs.h"
8898
8899int main () {
8900 char buf[16];
8901 long double f = 3.141592653;
8902 sprintf (buf, "%Lg", f);
8903 return (strncmp ("3.14159", buf, 7));
8904}
8905EOF
d15be926 8906if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8907then
97bf5e38 8908 gdb_cv_printf_has_long_double=yes
c906108c
SS
8909else
8910 echo "configure: failed program was:" >&5
8911 cat conftest.$ac_ext >&5
8912 rm -fr conftest*
97bf5e38 8913 gdb_cv_printf_has_long_double=no
c906108c
SS
8914fi
8915rm -fr conftest*
8916fi
8917
8918fi
8919
97bf5e38 8920if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8921 cat >> confdefs.h <<\EOF
97bf5e38
MK
8922#define PRINTF_HAS_LONG_DOUBLE 1
8923EOF
8924
8925fi
8926echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8927
8928
8929echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
d15be926 8930echo "configure:8931: checking for long double support in scanf" >&5
97bf5e38
MK
8931if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8932 echo $ac_n "(cached) $ac_c" 1>&6
8933else
8934 if test "$cross_compiling" = yes; then
8935 gdb_cv_scanf_has_long_double=no
8936else
8937 cat > conftest.$ac_ext <<EOF
d15be926 8938#line 8939 "configure"
97bf5e38
MK
8939#include "confdefs.h"
8940
8941int main () {
8942 char *buf = "3.141592653";
8943 long double f = 0;
8944 sscanf (buf, "%Lg", &f);
8945 return !(f > 3.14159 && f < 3.14160);
8946}
c906108c 8947EOF
d15be926 8948if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8949then
8950 gdb_cv_scanf_has_long_double=yes
8951else
8952 echo "configure: failed program was:" >&5
8953 cat conftest.$ac_ext >&5
8954 rm -fr conftest*
8955 gdb_cv_scanf_has_long_double=no
8956fi
8957rm -fr conftest*
8958fi
c906108c
SS
8959
8960fi
8961
97bf5e38
MK
8962if test $gdb_cv_scanf_has_long_double = yes; then
8963 cat >> confdefs.h <<\EOF
8964#define SCANF_HAS_LONG_DOUBLE 1
8965EOF
8966
8967fi
8968echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8969
438013df
AO
8970case ${host_os} in
8971aix*)
8972 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
d15be926 8973echo "configure:8974: checking for -bbigtoc option" >&5
438013df
AO
8974if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8975 echo $ac_n "(cached) $ac_c" 1>&6
8976else
8977
8978 SAVE_LDFLAGS=$LDFLAGS
8979
8980 case $GCC in
8981 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8982 *) gdb_cv_bigtoc=-bbigtoc ;;
8983 esac
8984
8985 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8986 cat > conftest.$ac_ext <<EOF
d15be926 8987#line 8988 "configure"
438013df
AO
8988#include "confdefs.h"
8989
8990int main() {
8991int i;
8992; return 0; }
8993EOF
d15be926 8994if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8995 :
8996else
8997 echo "configure: failed program was:" >&5
8998 cat conftest.$ac_ext >&5
8999 rm -rf conftest*
9000 gdb_cv_bigtoc=
9001fi
9002rm -f conftest*
ec76baa5 9003 LDFLAGS="${SAVE_LDFLAGS}"
438013df
AO
9004
9005fi
9006
9007echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9008 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9009 ;;
9010esac
9011
c906108c
SS
9012
9013
9014if test ${build} = ${host} -a ${host} = ${target} ; then
9015 case ${host_os} in
9016 hpux*)
9017 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
d15be926 9018echo "configure:9019: checking for HPUX/OSF thread support" >&5
c906108c
SS
9019 if test -f /usr/include/dce/cma_config.h ; then
9020 if test "$GCC" = "yes" ; then
9021 echo "$ac_t""yes" 1>&6
9022 cat >> confdefs.h <<\EOF
9023#define HAVE_HPUX_THREAD_SUPPORT 1
9024EOF
9025
3483b318 9026 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9027 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9028 else
9029 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9030 fi
9031 else
9032 echo "$ac_t""no" 1>&6
9033 fi
9034 ;;
9035 solaris*)
d92419e5
JB
9036 # See if thread_db library is around for Solaris thread debugging.
9037 # Note that we must explicitly test for version 1 of the library
9038 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9039 # the same API.
c906108c 9040 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
d15be926 9041echo "configure:9042: checking for Solaris thread debugging library" >&5
c906108c
SS
9042 if test -f /usr/lib/libthread_db.so.1 ; then
9043 echo "$ac_t""yes" 1>&6
9044 cat >> confdefs.h <<\EOF
9045#define HAVE_THREAD_DB_LIB 1
9046EOF
9047
3483b318 9048 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9049 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9050 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
d15be926 9051echo "configure:9052: checking for dlopen in -ldl" >&5
c906108c
SS
9052ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9053if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9054 echo $ac_n "(cached) $ac_c" 1>&6
9055else
9056 ac_save_LIBS="$LIBS"
9057LIBS="-ldl $LIBS"
9058cat > conftest.$ac_ext <<EOF
d15be926 9059#line 9060 "configure"
c906108c
SS
9060#include "confdefs.h"
9061/* Override any gcc2 internal prototype to avoid an error. */
9062/* We use char because int might match the return type of a gcc2
9063 builtin and then its argument prototype would still apply. */
9064char dlopen();
9065
9066int main() {
9067dlopen()
9068; return 0; }
9069EOF
d15be926 9070if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9071 rm -rf conftest*
9072 eval "ac_cv_lib_$ac_lib_var=yes"
9073else
9074 echo "configure: failed program was:" >&5
9075 cat conftest.$ac_ext >&5
9076 rm -rf conftest*
9077 eval "ac_cv_lib_$ac_lib_var=no"
9078fi
9079rm -f conftest*
9080LIBS="$ac_save_LIBS"
9081
9082fi
9083if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9084 echo "$ac_t""yes" 1>&6
9085 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9086 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9087 cat >> confdefs.h <<EOF
9088#define $ac_tr_lib 1
9089EOF
9090
9091 LIBS="-ldl $LIBS"
9092
9093else
9094 echo "$ac_t""no" 1>&6
9095fi
9096
9097 if test "$GCC" = "yes" ; then
9098 # The GNU linker requires the -export-dynamic option to make
9099 # all symbols visible in the dynamic symbol table.
9100 hold_ldflags=$LDFLAGS
9101 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
d15be926 9102echo "configure:9103: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9103 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9104 cat > conftest.$ac_ext <<EOF
d15be926 9105#line 9106 "configure"
c906108c
SS
9106#include "confdefs.h"
9107
9108int main() {
9109int i;
9110; return 0; }
9111EOF
d15be926 9112if { (eval echo configure:9113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9113 rm -rf conftest*
9114 found=yes
9115else
9116 echo "configure: failed program was:" >&5
9117 cat conftest.$ac_ext >&5
9118 rm -rf conftest*
9119 found=no
9120fi
9121rm -f conftest*
9122 LDFLAGS=$hold_ldflags
9123 echo "$ac_t""$found" 1>&6
9124 if test $found = yes; then
9125 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9126 fi
9127 fi
9128 # Sun randomly tweaked the prototypes in <proc_service.h>
9129 # at one point.
9130 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
d15be926 9131echo "configure:9132: checking if <proc_service.h> is old" >&5
c906108c
SS
9132 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9133 echo $ac_n "(cached) $ac_c" 1>&6
9134else
9135
9136 cat > conftest.$ac_ext <<EOF
d15be926 9137#line 9138 "configure"
c906108c
SS
9138#include "confdefs.h"
9139
9140 #include <proc_service.h>
9141 ps_err_e ps_pdwrite
9142 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9143
9144int main() {
9145
9146; return 0; }
9147EOF
d15be926 9148if { (eval echo configure:9149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9149 rm -rf conftest*
9150 gdb_cv_proc_service_is_old=no
9151else
9152 echo "configure: failed program was:" >&5
9153 cat conftest.$ac_ext >&5
9154 rm -rf conftest*
9155 gdb_cv_proc_service_is_old=yes
9156fi
9157rm -f conftest*
9158
9159fi
9160
9161 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9162 if test $gdb_cv_proc_service_is_old = yes; then
9163 cat >> confdefs.h <<\EOF
9164#define PROC_SERVICE_IS_OLD 1
9165EOF
9166
9167 fi
9168 else
9169 echo "$ac_t""no" 1>&6
9170 fi
9171 ;;
d92419e5
JB
9172 aix*)
9173 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
d15be926 9174echo "configure:9175: checking for AiX thread debugging library" >&5
d92419e5
JB
9175 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9176 echo $ac_n "(cached) $ac_c" 1>&6
9177else
9178 cat > conftest.$ac_ext <<EOF
d15be926 9179#line 9180 "configure"
d92419e5
JB
9180#include "confdefs.h"
9181#include <sys/pthdebug.h>
9182int main() {
9183#ifndef PTHDB_VERSION_3
9184 #error
9185 #endif
9186; return 0; }
9187EOF
d15be926 9188if { (eval echo configure:9189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9189 rm -rf conftest*
9190 gdb_cv_have_aix_thread_debug=yes
9191else
9192 echo "configure: failed program was:" >&5
9193 cat conftest.$ac_ext >&5
9194 rm -rf conftest*
9195 gdb_cv_have_aix_thread_debug=no
9196fi
9197rm -f conftest*
9198fi
9199
9200 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9201 if test $gdb_cv_have_aix_thread_debug = yes; then
9202 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9203 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9204 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9205 fi
9206 ;;
c906108c
SS
9207 esac
9208
9209fi
9210
3f47be5c
EZ
9211if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9212 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
d15be926 9213echo "configure:9214: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9214if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9215 echo $ac_n "(cached) $ac_c" 1>&6
9216else
9217 cat > conftest.$ac_ext <<EOF
d15be926 9218#line 9219 "configure"
3f47be5c
EZ
9219#include "confdefs.h"
9220#include <thread_db.h>
9221int main() {
9222int i = TD_NOTALLOC;
9223; return 0; }
9224EOF
d15be926 9225if { (eval echo configure:9226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9226 rm -rf conftest*
9227 gdb_cv_thread_db_h_has_td_notalloc=yes
9228else
9229 echo "configure: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 rm -rf conftest*
9232 gdb_cv_thread_db_h_has_td_notalloc=no
9233
9234fi
9235rm -f conftest*
9236
9237fi
9238
9239echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9240fi
9241if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9242 cat >> confdefs.h <<\EOF
9243#define THREAD_DB_HAS_TD_NOTALLOC 1
9244EOF
9245
9246fi
9247
b757528f
JJ
9248if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9249 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
d15be926 9250echo "configure:9251: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9251if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9252 echo $ac_n "(cached) $ac_c" 1>&6
9253else
9254 cat > conftest.$ac_ext <<EOF
d15be926 9255#line 9256 "configure"
b757528f
JJ
9256#include "confdefs.h"
9257#include <sys/syscall.h>
9258int main() {
9259int i = __NR_tkill;
9260; return 0; }
9261EOF
d15be926 9262if { (eval echo configure:9263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9263 rm -rf conftest*
9264 gdb_cv_sys_syscall_h_has_tkill=yes
9265else
9266 echo "configure: failed program was:" >&5
9267 cat conftest.$ac_ext >&5
9268 rm -rf conftest*
9269 gdb_cv_sys_syscall_h_has_tkill=no
9270
9271fi
9272rm -f conftest*
9273
9274fi
9275
9276echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9277fi
9278if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9279 cat >> confdefs.h <<\EOF
9280#define HAVE_TKILL_SYSCALL 1
9281EOF
9282
9283fi
9284
fb40c209 9285
030292b7
DJ
9286# Check whether --with-sysroot or --without-sysroot was given.
9287if test "${with_sysroot+set}" = set; then
9288 withval="$with_sysroot"
9289
9290 case ${with_sysroot} in
715d1656 9291 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9292 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9293 esac
9294
9295 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9296
9297 if test "x$exec_prefix" = xNONE; then
9298 if test "x$prefix" = xNONE; then
9299 test_prefix=/usr/local
9300 else
9301 test_prefix=$prefix
9302 fi
9303 else
9304 test_prefix=$exec_prefix
9305 fi
9306 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9307 "${test_prefix}"|"${test_prefix}/"*|\
9308 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9309 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9310 TARGET_SYSTEM_ROOT_DEFINE="$t"
9311 ;;
9312 esac
9313
9314else
9315
9316 TARGET_SYSTEM_ROOT=
9317 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9318
9319fi
9320
9321
9322
9323
3b851bce
AC
9324# NOTE: Don't add -Wall or -Wunused, they both include
9325# -Wunused-parameter which reports bogus warnings.
9326# NOTE: If you add to this list, remember to update
9327# gdb/doc/gdbint.texinfo.
1decb323 9328build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9329-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9330-Wunused-label -Wunused-function"
d8038014 9331# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9332# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9333# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9334# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9335# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9336# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9337# Check whether --enable-build-warnings or --disable-build-warnings was given.
9338if test "${enable_build_warnings+set}" = set; then
9339 enableval="$enable_build_warnings"
1decb323 9340 case "${enableval}" in
c906108c
SS
9341 yes) ;;
9342 no) build_warnings="-w";;
9343 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9344 build_warnings="${build_warnings} ${t}";;
9345 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9346 build_warnings="${t} ${build_warnings}";;
9347 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9348esac
d4f3574e 9349if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9350 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9351fi
1decb323 9352fi
3b851bce
AC
9353# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9354if test "${enable_gdb_build_warnings+set}" = set; then
9355 enableval="$enable_gdb_build_warnings"
9356 case "${enableval}" in
9357 yes) ;;
9358 no) build_warnings="-w";;
9359 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9360 build_warnings="${build_warnings} ${t}";;
9361 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9362 build_warnings="${t} ${build_warnings}";;
9363 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9364esac
9365if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9366 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9367fi
9368fi
104c1213
JM
9369WARN_CFLAGS=""
9370WERROR_CFLAGS=""
c906108c
SS
9371if test "x${build_warnings}" != x -a "x$GCC" = xyes
9372then
746a987d 9373 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
d15be926 9374echo "configure:9375: checking compiler warning flags" >&5
746a987d
AC
9375 # Separate out the -Werror flag as some files just cannot be
9376 # compiled with it enabled.
9377 for w in ${build_warnings}; do
9378 case $w in
9379 -Werr*) WERROR_CFLAGS=-Werror ;;
9380 *) # Check that GCC accepts it
4536bbc6
AC
9381 saved_CFLAGS="$CFLAGS"
9382 CFLAGS="$CFLAGS $w"
9383 cat > conftest.$ac_ext <<EOF
d15be926 9384#line 9385 "configure"
4536bbc6
AC
9385#include "confdefs.h"
9386
9387int main() {
9388
9389; return 0; }
9390EOF
d15be926 9391if { (eval echo configure:9392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9392 rm -rf conftest*
9393 WARN_CFLAGS="${WARN_CFLAGS} $w"
9394else
9395 echo "configure: failed program was:" >&5
9396 cat conftest.$ac_ext >&5
9397fi
9398rm -f conftest*
9399 CFLAGS="$saved_CFLAGS"
746a987d
AC
9400 esac
9401 done
9402 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9403fi
9404
9405
104c1213 9406
7a292a7a
SS
9407# In the Cygwin environment, we need some additional flags.
9408echo $ac_n "checking for cygwin""... $ac_c" 1>&6
d15be926 9409echo "configure:9410: checking for cygwin" >&5
7a292a7a
SS
9410if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9411 echo $ac_n "(cached) $ac_c" 1>&6
9412else
9413 cat > conftest.$ac_ext <<EOF
d15be926 9414#line 9415 "configure"
7a292a7a
SS
9415#include "confdefs.h"
9416
9417#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9418lose
9419#endif
9420EOF
9421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9422 egrep "lose" >/dev/null 2>&1; then
9423 rm -rf conftest*
9424 gdb_cv_os_cygwin=yes
9425else
9426 rm -rf conftest*
9427 gdb_cv_os_cygwin=no
9428fi
9429rm -f conftest*
9430
9431fi
9432
9433echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9434
aff38e61
AC
9435
9436SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9437case ${host} in
95cbc983
AC
9438 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9439 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9440esac
9441
9442
cd0fc7c3
SS
9443# libreadline needs libuser32.a in a cygwin environment
9444WIN32LIBS=
9445if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9446 WIN32LIBS="-luser32"
9447 case "${target}" in
9448 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9449 ;;
9450 esac
cd0fc7c3 9451fi
c906108c 9452
7a292a7a 9453
3fc11d3e
JM
9454LIBGUI="../libgui/src/libgui.a"
9455GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9456
9457
7a292a7a 9458
3fc11d3e
JM
9459WIN32LDAPP=
9460
9461
9462
d91670b9
CV
9463case "${host}" in
9464*-*-cygwin*)
9465 configdir="win"
9466 ;;
9467*)
9468 configdir="unix"
9469 ;;
9470esac
3fc11d3e
JM
9471
9472GDBTKLIBS=
9473if test "${enable_gdbtk}" = "yes"; then
9474
d1c3b63a
KS
9475 # Gdbtk must have an absolute path to srcdir in order to run
9476 # properly when not installed.
9477 here=`pwd`
9478 cd ${srcdir}
9479 GDBTK_SRC_DIR=`pwd`
9480 cd $here
9481
3fc11d3e
JM
9482
9483#
9484# Ok, lets find the tcl configuration
9485# First, look for one uninstalled.
9486# the alternative search directory is invoked by --with-tclconfig
9487#
9488
9489if test x"${no_tcl}" = x ; then
9490 # we reset no_tcl in case something fails here
9491 no_tcl=true
9492 # Check whether --with-tclconfig or --without-tclconfig was given.
9493if test "${with_tclconfig+set}" = set; then
9494 withval="$with_tclconfig"
9495 with_tclconfig=${withval}
9496fi
9497
9498 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
d15be926 9499echo "configure:9500: checking for Tcl configuration" >&5
3fc11d3e
JM
9500 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9501 echo $ac_n "(cached) $ac_c" 1>&6
9502else
9503
9504
9505 # First check to see if --with-tclconfig was specified.
9506 if test x"${with_tclconfig}" != x ; then
9507 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9508 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9509 else
9510 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9511 fi
9512 fi
9513
9514 # then check for a private Tcl installation
9515 if test x"${ac_cv_c_tclconfig}" = x ; then
9516 for i in \
9517 ../tcl \
9518 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9519 ../../tcl \
9520 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9521 ../../../tcl \
9522 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9523 if test -f "$i/${configdir}/tclConfig.sh" ; then
9524 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9525 break
9526 fi
9527 done
9528 fi
9529 # check in a few common install locations
9530 if test x"${ac_cv_c_tclconfig}" = x ; then
9531 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9532 if test -f "$i/tclConfig.sh" ; then
9533 ac_cv_c_tclconfig=`(cd $i; pwd)`
9534 break
9535 fi
9536 done
9537 fi
9538 # check in a few other private locations
9539 if test x"${ac_cv_c_tclconfig}" = x ; then
9540 for i in \
9541 ${srcdir}/../tcl \
9542 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9543 if test -f "$i/${configdir}/tclConfig.sh" ; then
9544 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9545 break
9546 fi
9547 done
9548 fi
9549
9550fi
9551
9552 if test x"${ac_cv_c_tclconfig}" = x ; then
9553 TCLCONFIG="# no Tcl configs found"
9554 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9555 else
9556 no_tcl=
9557 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9558 echo "$ac_t""found $TCLCONFIG" 1>&6
9559 fi
9560fi
9561
9562 if test -z "${no_tcl}"; then
9563
9564 . $TCLCONFIG
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
033afc63 9585
3fc11d3e
JM
9586
9587
9588
9589
9590
9591
9592#
9593# Ok, lets find the tk configuration
9594# First, look for one uninstalled.
9595# the alternative search directory is invoked by --with-tkconfig
9596#
9597
9598if test x"${no_tk}" = x ; then
9599 # we reset no_tk in case something fails here
9600 no_tk=true
9601 # Check whether --with-tkconfig or --without-tkconfig was given.
9602if test "${with_tkconfig+set}" = set; then
9603 withval="$with_tkconfig"
9604 with_tkconfig=${withval}
9605fi
9606
9607 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
d15be926 9608echo "configure:9609: checking for Tk configuration" >&5
3fc11d3e
JM
9609 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9610 echo $ac_n "(cached) $ac_c" 1>&6
9611else
9612
9613
9614 # First check to see if --with-tkconfig was specified.
9615 if test x"${with_tkconfig}" != x ; then
9616 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9617 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9618 else
9619 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9620 fi
9621 fi
9622
9623 # then check for a private Tk library
9624 if test x"${ac_cv_c_tkconfig}" = x ; then
9625 for i in \
9626 ../tk \
9627 `ls -dr ../tk[4-9]* 2>/dev/null` \
9628 ../../tk \
9629 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9630 ../../../tk \
9631 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9632 if test -f "$i/${configdir}/tkConfig.sh" ; then
9633 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9634 break
9635 fi
9636 done
9637 fi
9638 # check in a few common install locations
9639 if test x"${ac_cv_c_tkconfig}" = x ; then
9640 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9641 if test -f "$i/tkConfig.sh" ; then
9642 ac_cv_c_tkconfig=`(cd $i; pwd)`
9643 break
9644 fi
9645 done
9646 fi
9647 # check in a few other private locations
9648 if test x"${ac_cv_c_tkconfig}" = x ; then
9649 for i in \
9650 ${srcdir}/../tk \
9651 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9652 if test -f "$i/${configdir}/tkConfig.sh" ; then
9653 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9654 break
9655 fi
9656 done
9657 fi
9658
9659fi
9660
9661 if test x"${ac_cv_c_tkconfig}" = x ; then
9662 TKCONFIG="# no Tk configs found"
9663 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9664 else
9665 no_tk=
9666 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9667 echo "$ac_t""found $TKCONFIG" 1>&6
9668 fi
9669fi
9670
9671
9672
dd2504ab
JM
9673 # now look for Tcl library stuff
9674
d91670b9 9675 tcldir="../tcl/${configdir}/"
dd2504ab
JM
9676
9677 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9678
3fc11d3e
JM
9679 # If $no_tk is nonempty, then we can't do Tk, and there is no
9680 # point to doing Tcl.
9681 if test -z "${no_tk}"; then
9682
9683 if test -f "$TKCONFIG" ; then
9684 . $TKCONFIG
9685 fi
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700#
9701# Ok, lets find the tcl source trees so we can use the headers
9702# Warning: transition of version 9 to 10 will break this algorithm
9703# because 10 sorts before 9. We also look for just tcl. We have to
9704# be careful that we don't match stuff like tclX by accident.
9705# the alternative search directory is involked by --with-tclinclude
9706#
9707
9708no_tcl=true
9709echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
d15be926 9710echo "configure:9711: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9711# Check whether --with-tclinclude or --without-tclinclude was given.
9712if test "${with_tclinclude+set}" = set; then
9713 withval="$with_tclinclude"
9714 with_tclinclude=${withval}
9715fi
9716
9717if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9718 echo $ac_n "(cached) $ac_c" 1>&6
9719else
9720
9721# first check to see if --with-tclinclude was specified
9722if test x"${with_tclinclude}" != x ; then
9723 if test -f ${with_tclinclude}/tclInt.h ; then
9724 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9725 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9726 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9727 else
9728 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9729 fi
9730fi
9731
9732# next check if it came with Tcl configuration file
9733if test x"${ac_cv_c_tclconfig}" = x ; then
9734 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9735 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9736 fi
9737fi
9738
9739# next check in private source directory
9740#
9741# since ls returns lowest version numbers first, reverse its output
9742if test x"${ac_cv_c_tclh}" = x ; then
9743 for i in \
9744 ${srcdir}/../tcl \
9745 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9746 ${srcdir}/../../tcl \
9747 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9748 ${srcdir}/../../../tcl \
9749 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9750 if test -f $i/generic/tclInt.h ; then
9751 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9752 break
9753 fi
9754 done
9755fi
9756# finally check in a few common install locations
9757#
9758# since ls returns lowest version numbers first, reverse its output
9759if test x"${ac_cv_c_tclh}" = x ; then
9760 for i in \
9761 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9762 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9763 /usr/local/src/tcl \
9764 /usr/local/lib/tcl \
9765 ${prefix}/include ; do
9766 if test -f $i/generic/tclInt.h ; then
9767 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9768 break
9769 fi
9770 done
9771fi
9772# see if one is installed
9773if test x"${ac_cv_c_tclh}" = x ; then
9774 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9775echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
d15be926 9776echo "configure:9777: checking for tclInt.h" >&5
3fc11d3e
JM
9777if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9778 echo $ac_n "(cached) $ac_c" 1>&6
9779else
9780 cat > conftest.$ac_ext <<EOF
d15be926 9781#line 9782 "configure"
3fc11d3e
JM
9782#include "confdefs.h"
9783#include <tclInt.h>
9784EOF
9785ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 9786{ (eval echo configure:9787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9787ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9788if test -z "$ac_err"; then
9789 rm -rf conftest*
9790 eval "ac_cv_header_$ac_safe=yes"
9791else
9792 echo "$ac_err" >&5
9793 echo "configure: failed program was:" >&5
9794 cat conftest.$ac_ext >&5
9795 rm -rf conftest*
9796 eval "ac_cv_header_$ac_safe=no"
9797fi
9798rm -f conftest*
9799fi
9800if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9801 echo "$ac_t""yes" 1>&6
9802 ac_cv_c_tclh=installed
9803else
9804 echo "$ac_t""no" 1>&6
9805ac_cv_c_tclh=""
9806fi
9807
9808fi
9809
9810fi
9811
9812if test x"${ac_cv_c_tclh}" = x ; then
9813 TCLHDIR="# no Tcl private headers found"
9814 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9815fi
9816if test x"${ac_cv_c_tclh}" != x ; then
9817 no_tcl=""
9818 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9819 echo "$ac_t""is installed" 1>&6
9820 TCLHDIR=""
9821 else
9822 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9823 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9824 TCLHDIR="-I${ac_cv_c_tclh}"
9825 fi
9826fi
9827
9828
9829
9830
9831#
9832# Ok, lets find the tk source trees so we can use the headers
9833# If the directory (presumably symlink) named "tk" exists, use that one
9834# in preference to any others. Same logic is used when choosing library
9835# and again with Tcl. The search order is the best place to look first, then in
9836# decreasing significance. The loop breaks if the trigger file is found.
9837# Note the gross little conversion here of srcdir by cd'ing to the found
9838# directory. This converts the path from a relative to an absolute, so
9839# recursive cache variables for the path will work right. We check all
9840# the possible paths in one loop rather than many seperate loops to speed
9841# things up.
9842# the alternative search directory is involked by --with-tkinclude
9843#
9844no_tk=true
9845echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
d15be926 9846echo "configure:9847: checking for Tk private headers" >&5
3fc11d3e
JM
9847# Check whether --with-tkinclude or --without-tkinclude was given.
9848if test "${with_tkinclude+set}" = set; then
9849 withval="$with_tkinclude"
9850 with_tkinclude=${withval}
9851fi
9852
9853if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9854 echo $ac_n "(cached) $ac_c" 1>&6
9855else
9856
9857# first check to see if --with-tkinclude was specified
9858if test x"${with_tkinclude}" != x ; then
9859 if test -f ${with_tkinclude}/tk.h ; then
9860 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9861 elif test -f ${with_tkinclude}/generic/tk.h ; then
9862 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9863 else
9864 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9865 fi
9866fi
9867
9868# next check if it came with Tk configuration file
9869if test x"${ac_cv_c_tkconfig}" = x ; then
9870 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9871 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9872 fi
9873fi
9874
9875# next check in private source directory
9876#
9877# since ls returns lowest version numbers first, reverse its output
9878if test x"${ac_cv_c_tkh}" = x ; then
9879 for i in \
9880 ${srcdir}/../tk \
9881 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9882 ${srcdir}/../../tk \
9883 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9884 ${srcdir}/../../../tk \
9885 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9886 if test -f $i/generic/tk.h ; then
9887 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9888 break
9889 fi
9890 done
9891fi
9892# finally check in a few common install locations
9893#
9894# since ls returns lowest version numbers first, reverse its output
9895if test x"${ac_cv_c_tkh}" = x ; then
9896 for i in \
9897 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9898 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9899 /usr/local/src/tk \
9900 /usr/local/lib/tk \
9901 ${prefix}/include ; do
9902 if test -f $i/generic/tk.h ; then
9903 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9904 break
9905 fi
9906 done
9907fi
9908# see if one is installed
9909if test x"${ac_cv_c_tkh}" = x ; then
9910 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9911echo $ac_n "checking for tk.h""... $ac_c" 1>&6
d15be926 9912echo "configure:9913: checking for tk.h" >&5
3fc11d3e
JM
9913if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9914 echo $ac_n "(cached) $ac_c" 1>&6
9915else
9916 cat > conftest.$ac_ext <<EOF
d15be926 9917#line 9918 "configure"
3fc11d3e
JM
9918#include "confdefs.h"
9919#include <tk.h>
9920EOF
9921ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 9922{ (eval echo configure:9923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9923ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9924if test -z "$ac_err"; then
9925 rm -rf conftest*
9926 eval "ac_cv_header_$ac_safe=yes"
9927else
9928 echo "$ac_err" >&5
9929 echo "configure: failed program was:" >&5
9930 cat conftest.$ac_ext >&5
9931 rm -rf conftest*
9932 eval "ac_cv_header_$ac_safe=no"
9933fi
9934rm -f conftest*
9935fi
9936if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9937 echo "$ac_t""yes" 1>&6
9938 ac_cv_c_tkh=installed
9939else
9940 echo "$ac_t""no" 1>&6
9941ac_cv_c_tkh=""
9942fi
9943
9944fi
9945
9946fi
9947
9948if test x"${ac_cv_c_tkh}" != x ; then
9949 no_tk=""
9950 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9951 echo "$ac_t""is installed" 1>&6
9952 TKHDIR=""
9953 else
9954 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9955 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9956 TKHDIR="-I${ac_cv_c_tkh}"
9957 fi
9958else
9959 TKHDIR="# no Tk directory found"
9960 echo "configure: warning: Can't find Tk private headers" 1>&2
9961 no_tk=true
9962fi
9963
9964
9965
9966
9967echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d15be926 9968echo "configure:9969: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9969if test x"${ac_cv_c_itclh}" = x ; then
9970 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9971 if test -f $i/generic/itcl.h ; then
9972 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9973 break
9974 fi
9975 done
9976fi
9977if test x"${ac_cv_c_itclh}" = x ; then
9978 ITCLHDIR="# no Itcl private headers found"
9979 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9980fi
9981if test x"${ac_cv_c_itclh}" != x ; then
9982 ITCLHDIR="-I${ac_cv_c_itclh}"
9983fi
9984# should always be here
9985# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9986
9987#AC_SUBST(ITCLLIB)
9988
9989
9990echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d15be926 9991echo "configure:9992: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9992if test x"${ac_cv_c_itkh}" = x ; then
9993 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9994 if test -f $i/generic/itk.h ; then
9995 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9996 break
9997 fi
9998 done
9999fi
10000if test x"${ac_cv_c_itkh}" = x ; then
10001 ITKHDIR="# no Itk private headers found"
10002 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10003fi
10004if test x"${ac_cv_c_itkh}" != x ; then
10005 ITKHDIR="-I${ac_cv_c_itkh}"
10006fi
10007# should always be here
10008# ITKLIB="../itcl/itk/unix/libitk.a"
10009
10010#AC_SUBST(ITKLIB)
10011
3fc11d3e 10012
dd2504ab
JM
10013
10014 # now look for Tk library stuff
10015
d91670b9 10016 tkdir="../tk/${configdir}/"
dd2504ab
JM
10017
10018 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10019
3fc11d3e
JM
10020 # now look for Itcl library stuff
10021
10022
10023#
10024# Ok, lets find the itcl configuration
10025# First, look for one uninstalled.
10026# the alternative search directory is invoked by --with-itclconfig
10027#
10028
10029if test x"${no_itcl}" = x ; then
10030 # we reset no_itcl in case something fails here
10031 no_itcl=true
10032 # Check whether --with-itclconfig or --without-itclconfig was given.
10033if test "${with_itclconfig+set}" = set; then
10034 withval="$with_itclconfig"
10035 with_itclconfig=${withval}
10036fi
10037
10038 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
d15be926 10039echo "configure:10040: checking for Itcl configuration" >&5
3fc11d3e
JM
10040 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10041 echo $ac_n "(cached) $ac_c" 1>&6
10042else
10043
10044
10045 # First check to see if --with-itclconfig was specified.
10046 if test x"${with_itclconfig}" != x ; then
10047 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10048 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10049 else
10050 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10051 fi
10052 fi
10053
10054 # then check for a private Itcl library
10055 if test x"${ac_cv_c_itclconfig}" = x ; then
10056 for i in \
10057 ../itcl/itcl \
10058 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10059 ../../itcl \
10060 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10061 ../../../itcl \
10062 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10063 if test -f "$i/itclConfig.sh" ; then
10064 ac_cv_c_itclconfig=`(cd $i; pwd)`
10065 break
10066 fi
10067 done
10068 fi
10069 # check in a few common install locations
10070 if test x"${ac_cv_c_itclconfig}" = x ; then
10071 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10072 if test -f "$i/itclConfig.sh" ; then
10073 ac_cv_c_itclconfig=`(cd $i; pwd)`
10074 break
10075 fi
10076 done
10077 fi
10078 # check in a few other private locations
10079 if test x"${ac_cv_c_itclconfig}" = x ; then
10080 for i in \
10081 ${srcdir}/../itcl/itcl \
10082 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10083 if test -f "$i/itclConfig.sh" ; then
10084 ac_cv_c_itclconfig=`(cd $i; pwd)`
10085 break
10086 fi
10087 done
10088 fi
10089
10090fi
10091
10092 if test x"${ac_cv_c_itclconfig}" = x ; then
10093 ITCLCONFIG="# no Itcl configs found"
10094 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10095 else
10096 no_itcl=
10097 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10098 echo "$ac_t""found $ITCLCONFIG" 1>&6
10099 fi
10100fi
10101
10102 if test -z "${no_itcl}"; then
10103
10104 if test -f "$ITCLCONFIG" ; then
10105 . $ITCLCONFIG
10106 fi
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
3fc11d3e
JM
10117
10118
10119 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10120 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10121 fi
10122
10123
10124 # now look for Itk library stuff
10125
10126#
10127# Ok, lets find the itk configuration
10128# First, look for one uninstalled.
10129# the alternative search directory is invoked by --with-itkconfig
10130#
10131
10132if test x"${no_itk}" = x ; then
10133 # we reset no_itk in case something fails here
10134 no_itk=true
10135 # Check whether --with-itkconfig or --without-itkconfig was given.
10136if test "${with_itkconfig+set}" = set; then
10137 withval="$with_itkconfig"
10138 with_itkconfig=${withval}
10139fi
10140
10141 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
d15be926 10142echo "configure:10143: checking for Itk configuration" >&5
3fc11d3e
JM
10143 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10144 echo $ac_n "(cached) $ac_c" 1>&6
10145else
10146
10147
10148 # First check to see if --with-itkconfig was specified.
10149 if test x"${with_itkconfig}" != x ; then
10150 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10151 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10152 else
10153 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10154 fi
10155 fi
10156
10157 # then check for a private Itk library
10158 if test x"${ac_cv_c_itkconfig}" = x ; then
10159 for i in \
10160 ../itcl/itk \
10161 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10162 ../../itk \
10163 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10164 ../../../itk \
10165 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10166 if test -f "$i/itkConfig.sh" ; then
10167 ac_cv_c_itkconfig=`(cd $i; pwd)`
10168 break
10169 fi
10170 done
10171 fi
10172 # check in a few common install locations
10173 if test x"${ac_cv_c_itkconfig}" = x ; then
10174 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10175 if test -f "$i/itkConfig.sh" ; then
10176 ac_cv_c_itkconfig=`(cd $i; pwd)`
10177 break
10178 fi
10179 done
10180 fi
10181 # check in a few other private locations
10182 if test x"${ac_cv_c_itkconfig}" = x ; then
10183 for i in \
10184 ${srcdir}/../itcl/itk \
10185 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10186 if test -f "$i/itkConfig.sh" ; then
10187 ac_cv_c_itkconfig=`(cd $i; pwd)`
10188 break
10189 fi
10190 done
10191 fi
10192
10193fi
10194
10195 if test x"${ac_cv_c_itkconfig}" = x ; then
10196 ITKCONFIG="# no Itk configs found"
10197 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10198 else
10199 no_itk=
10200 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10201 echo "$ac_t""found $ITKCONFIG" 1>&6
10202 fi
10203fi
10204
10205
10206 if test -z "${no_itcl}"; then
10207
10208 if test -f "$ITKCONFIG" ; then
10209 . $ITKCONFIG
10210 fi
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
3fc11d3e 10223 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10224 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10225 fi
10226
4226a5a5 10227 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10228 # Tcl/Tk 8.1 require -fwritable strings. I don't
10229 # know whether 8.2 will or not, but I bet it will.
10230 # I don't have to worry about 7.x since we don't support it.
10231 GDBTK_CFLAGS=""
10232 if test "$GCC" = "yes"; then
10233 if test "$TCL_VERSION" != "8.0" ; then
10234 GDBTK_CFLAGS="-fwritable-strings"
10235 fi
10236 fi
10237
10238 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10239 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10240 # Yes, the ordering seems wrong here. But it isn't.
10241 # TK_LIBS is the list of libraries that need to be linked
10242 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10243 # were in LIBS then any link tests after this point would
10244 # try to include things like `$(LIBGUI)', which wouldn't work.
10245 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10246
10247 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10248 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10249 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10250 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10251 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10252 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10253 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10254
10255 if test x$gdb_cv_os_cygwin = xyes; then
10256 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10257 WIN32LDAPP="-Wl,--subsystem,console"
10258 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10259 fi
10260 fi
10261 fi
ffc6a242 10262
ffc6a242 10263 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10264fi
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
dd2504ab 10278
c906108c
SS
10279# If we find X, set shell vars x_includes and x_libraries to the
10280# paths, otherwise set no_x=yes.
10281# Uses ac_ vars as temps to allow command line to override cache and checks.
10282# --without-x overrides everything else, but does not touch the cache.
10283echo $ac_n "checking for X""... $ac_c" 1>&6
d15be926 10284echo "configure:10285: checking for X" >&5
c906108c
SS
10285
10286# Check whether --with-x or --without-x was given.
10287if test "${with_x+set}" = set; then
10288 withval="$with_x"
10289 :
10290fi
10291
10292# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10293if test "x$with_x" = xno; then
10294 # The user explicitly disabled X.
10295 have_x=disabled
10296else
10297 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10298 # Both variables are already set.
10299 have_x=yes
10300 else
10301if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10302 echo $ac_n "(cached) $ac_c" 1>&6
10303else
10304 # One or both of the vars are not set, and there is no cached value.
10305ac_x_includes=NO ac_x_libraries=NO
10306rm -fr conftestdir
10307if mkdir conftestdir; then
10308 cd conftestdir
10309 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10310 cat > Imakefile <<'EOF'
10311acfindx:
10312 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10313EOF
10314 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10315 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10316 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10317 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10318 for ac_extension in a so sl; do
10319 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10320 test -f $ac_im_libdir/libX11.$ac_extension; then
10321 ac_im_usrlibdir=$ac_im_libdir; break
10322 fi
10323 done
10324 # Screen out bogus values from the imake configuration. They are
10325 # bogus both because they are the default anyway, and because
10326 # using them would break gcc on systems where it needs fixed includes.
10327 case "$ac_im_incroot" in
10328 /usr/include) ;;
10329 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10330 esac
10331 case "$ac_im_usrlibdir" in
10332 /usr/lib | /lib) ;;
10333 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10334 esac
10335 fi
10336 cd ..
10337 rm -fr conftestdir
10338fi
10339
10340if test "$ac_x_includes" = NO; then
10341 # Guess where to find include files, by looking for this one X11 .h file.
10342 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10343
10344 # First, try using that file with no special directory specified.
10345cat > conftest.$ac_ext <<EOF
d15be926 10346#line 10347 "configure"
c906108c
SS
10347#include "confdefs.h"
10348#include <$x_direct_test_include>
10349EOF
10350ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 10351{ (eval echo configure:10352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10352ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10353if test -z "$ac_err"; then
10354 rm -rf conftest*
10355 # We can compile using X headers with no special include directory.
10356ac_x_includes=
10357else
10358 echo "$ac_err" >&5
10359 echo "configure: failed program was:" >&5
10360 cat conftest.$ac_ext >&5
10361 rm -rf conftest*
10362 # Look for the header file in a standard set of common directories.
10363# Check X11 before X11Rn because it is often a symlink to the current release.
10364 for ac_dir in \
10365 /usr/X11/include \
10366 /usr/X11R6/include \
10367 /usr/X11R5/include \
10368 /usr/X11R4/include \
10369 \
10370 /usr/include/X11 \
10371 /usr/include/X11R6 \
10372 /usr/include/X11R5 \
10373 /usr/include/X11R4 \
10374 \
10375 /usr/local/X11/include \
10376 /usr/local/X11R6/include \
10377 /usr/local/X11R5/include \
10378 /usr/local/X11R4/include \
10379 \
10380 /usr/local/include/X11 \
10381 /usr/local/include/X11R6 \
10382 /usr/local/include/X11R5 \
10383 /usr/local/include/X11R4 \
10384 \
10385 /usr/X386/include \
10386 /usr/x386/include \
10387 /usr/XFree86/include/X11 \
10388 \
10389 /usr/include \
10390 /usr/local/include \
10391 /usr/unsupported/include \
10392 /usr/athena/include \
10393 /usr/local/x11r5/include \
10394 /usr/lpp/Xamples/include \
10395 \
10396 /usr/openwin/include \
10397 /usr/openwin/share/include \
10398 ; \
10399 do
10400 if test -r "$ac_dir/$x_direct_test_include"; then
10401 ac_x_includes=$ac_dir
10402 break
10403 fi
10404 done
10405fi
10406rm -f conftest*
10407fi # $ac_x_includes = NO
10408
10409if test "$ac_x_libraries" = NO; then
10410 # Check for the libraries.
10411
10412 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10413 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10414
10415 # See if we find them without any special options.
10416 # Don't add to $LIBS permanently.
10417 ac_save_LIBS="$LIBS"
10418 LIBS="-l$x_direct_test_library $LIBS"
10419cat > conftest.$ac_ext <<EOF
d15be926 10420#line 10421 "configure"
c906108c
SS
10421#include "confdefs.h"
10422
10423int main() {
10424${x_direct_test_function}()
10425; return 0; }
10426EOF
d15be926 10427if { (eval echo configure:10428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10428 rm -rf conftest*
10429 LIBS="$ac_save_LIBS"
10430# We can link X programs with no special library path.
10431ac_x_libraries=
10432else
10433 echo "configure: failed program was:" >&5
10434 cat conftest.$ac_ext >&5
10435 rm -rf conftest*
10436 LIBS="$ac_save_LIBS"
10437# First see if replacing the include by lib works.
10438# Check X11 before X11Rn because it is often a symlink to the current release.
10439for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10440 /usr/X11/lib \
10441 /usr/X11R6/lib \
10442 /usr/X11R5/lib \
10443 /usr/X11R4/lib \
10444 \
10445 /usr/lib/X11 \
10446 /usr/lib/X11R6 \
10447 /usr/lib/X11R5 \
10448 /usr/lib/X11R4 \
10449 \
10450 /usr/local/X11/lib \
10451 /usr/local/X11R6/lib \
10452 /usr/local/X11R5/lib \
10453 /usr/local/X11R4/lib \
10454 \
10455 /usr/local/lib/X11 \
10456 /usr/local/lib/X11R6 \
10457 /usr/local/lib/X11R5 \
10458 /usr/local/lib/X11R4 \
10459 \
10460 /usr/X386/lib \
10461 /usr/x386/lib \
10462 /usr/XFree86/lib/X11 \
10463 \
10464 /usr/lib \
10465 /usr/local/lib \
10466 /usr/unsupported/lib \
10467 /usr/athena/lib \
10468 /usr/local/x11r5/lib \
10469 /usr/lpp/Xamples/lib \
10470 /lib/usr/lib/X11 \
10471 \
10472 /usr/openwin/lib \
10473 /usr/openwin/share/lib \
10474 ; \
10475do
10476 for ac_extension in a so sl; do
10477 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10478 ac_x_libraries=$ac_dir
10479 break 2
10480 fi
10481 done
10482done
10483fi
10484rm -f conftest*
10485fi # $ac_x_libraries = NO
10486
10487if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10488 # Didn't find X anywhere. Cache the known absence of X.
10489 ac_cv_have_x="have_x=no"
10490else
10491 # Record where we found X for the cache.
10492 ac_cv_have_x="have_x=yes \
10493 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10494fi
10495fi
10496 fi
10497 eval "$ac_cv_have_x"
10498fi # $with_x != no
10499
10500if test "$have_x" != yes; then
10501 echo "$ac_t""$have_x" 1>&6
10502 no_x=yes
10503else
10504 # If each of the values was on the command line, it overrides each guess.
10505 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10506 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10507 # Update the cache value to reflect the command line values.
10508 ac_cv_have_x="have_x=yes \
10509 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10510 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10511fi
10512
10513
7a292a7a
SS
10514
10515# Unlike the sim directory, whether a simulator is linked is controlled by
10516# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10517# This code just checks for a few cases where we'd like to ignore those
10518# definitions, even when they're present in the '.mt' file. These cases
10519# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10520# not part of the source tree.
7a292a7a
SS
10521#
10522# Check whether --enable-sim or --disable-sim was given.
10523if test "${enable_sim+set}" = set; then
10524 enableval="$enable_sim"
10525 echo "enable_sim = $enable_sim";
10526 echo "enableval = ${enableval}";
10527 case "${enableval}" in
10528 yes) ignore_sim=false ;;
10529 no) ignore_sim=true ;;
10530 *) ignore_sim=false ;;
10531 esac
10532else
10533 ignore_sim=false
10534fi
10535
10536
10537if test ! -d "${srcdir}/../sim"; then
10538 ignore_sim=true
10539fi
10540
10541if test "${ignore_sim}" = "true"; then
10542 IGNORE_SIM="SIM="
10543 IGNORE_SIM_OBS="SIM_OBS="
10544else
10545 IGNORE_SIM=""
10546 IGNORE_SIM_OBS=""
10547 cat >> confdefs.h <<\EOF
10548#define WITH_SIM 1
10549EOF
10550
10551fi
10552
10553
10554
c906108c
SS
10555
10556
10557
10558
10559
10560
dfcd3bfb 10561
e56ac5c3
AC
10562
10563
b3a90332
AC
10564
10565
c35f4ffc
AC
10566# List of host floatformats.
10567cat >> confdefs.h <<EOF
10568#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10569EOF
10570
10571cat >> confdefs.h <<EOF
10572#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10573EOF
10574
10575cat >> confdefs.h <<EOF
10576#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10577EOF
10578
10579
c906108c
SS
10580# target_subdir is used by the testsuite to find the target libraries.
10581target_subdir=
10582if test "${host}" != "${target}"; then
10583 target_subdir="${target_alias}/"
10584fi
10585
10586
10587frags=
10588host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10589if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10590 # When building a native debuger the .mh file containing things
10591 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10592 # since it no longer contains anything useful.
10593 if test "${target}" = "${host}"; then
10594 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10595 else
10596 host_makefile_frag=/dev/null
10597 fi
c906108c
SS
10598fi
10599frags="$frags $host_makefile_frag"
10600
10601target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10602if test ! -f ${target_makefile_frag}; then
10603{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10604fi
10605frags="$frags $target_makefile_frag"
10606
10607
10608
10609
10610
10611hostfile=`sed -n '
10612s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10613' ${host_makefile_frag}`
10614
10615targetfile=`sed -n '
10616s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10617' ${target_makefile_frag}`
10618
c906108c 10619if test "${target}" = "${host}"; then
a85f51e7
DJ
10620# We pick this up from the host configuration file (.mh) because we
10621# do not have a native configuration Makefile fragment.
c906108c
SS
10622nativefile=`sed -n '
10623s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10624' ${host_makefile_frag}`
c906108c
SS
10625fi
10626
10627
b00a8037
DJ
10628if test x"${gdb_osabi}" != x ; then
10629 cat >> confdefs.h <<EOF
10630#define GDB_OSABI_DEFAULT $gdb_osabi
10631EOF
10632
10633fi
10634
8dcde887
MK
10635# Enable multi-ice-gdb-server.
10636# Check whether --enable-multi-ice or --disable-multi-ice was given.
10637if test "${enable_multi_ice+set}" = set; then
10638 enableval="$enable_multi_ice"
10639 case $enableval in
10640 yes | no)
10641 ;;
10642 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10643 esac
96baa820
JM
10644fi
10645
8dcde887
MK
10646if test "x$enable_multi_ice" = xyes; then
10647 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10648fi
10649
8dcde887
MK
10650# We only build gdbserver automatically if host and target are the same.
10651if test "x$target" = "x$host"; then
10652 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
c35f4ffc 10653echo "configure:10654: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10654 if test "x$build_gdbserver" = xyes; then
10655 configdirs="$configdirs gdbserver"
10656 echo "$ac_t""yes" 1>&6
10657 else
10658 echo "$ac_t""no" 1>&6
10659 fi
10660fi
10661
10662subdirs="doc testsuite $configdirs"
10663
96baa820 10664
c906108c 10665# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10666# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10667# version.
c906108c
SS
10668
10669files=
10670links=
5a2402b8 10671
c906108c 10672rm -f xm.h
5a2402b8 10673xm_h=""
c906108c 10674if test "${hostfile}" != ""; then
5a2402b8
AC
10675 xm_h=xm.h
10676 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10677 files="${files} ${GDB_XM_FILE}"
10678 links="${links} xm.h"
10679 cat >> confdefs.h <<EOF
10680#define GDB_XM_FILE ${GDB_XM_FILE}
10681EOF
10682
c906108c 10683fi
5a2402b8
AC
10684
10685
c906108c 10686rm -f tm.h
5a2402b8 10687tm_h=""
c906108c 10688if test "${targetfile}" != ""; then
5a2402b8
AC
10689 tm_h=tm.h
10690 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10691 files="${files} ${GDB_TM_FILE}"
10692 links="${links} tm.h"
10693 cat >> confdefs.h <<EOF
10694#define GDB_TM_FILE ${GDB_TM_FILE}
10695EOF
10696
c906108c 10697fi
5a2402b8
AC
10698
10699
c906108c 10700rm -f nm.h
5a2402b8 10701nm_h=""
c906108c 10702if test "${nativefile}" != ""; then
5a2402b8
AC
10703 nm_h=nm.h
10704 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10705 files="${files} ${GDB_NM_FILE}"
10706 links="${links} nm.h"
10707 cat >> confdefs.h <<EOF
10708#define GDB_NM_FILE ${GDB_NM_FILE}
10709EOF
10710
c906108c 10711fi
5a2402b8
AC
10712
10713
c906108c
SS
10714
10715
10716echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
c35f4ffc 10717echo "configure:10718: checking for Cygwin environment" >&5
c906108c
SS
10718if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10719 echo $ac_n "(cached) $ac_c" 1>&6
10720else
10721 cat > conftest.$ac_ext <<EOF
c35f4ffc 10722#line 10723 "configure"
c906108c
SS
10723#include "confdefs.h"
10724
10725int main() {
10726
10727#ifndef __CYGWIN__
10728#define __CYGWIN__ __CYGWIN32__
10729#endif
10730return __CYGWIN__;
10731; return 0; }
10732EOF
c35f4ffc 10733if { (eval echo configure:10734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10734 rm -rf conftest*
10735 ac_cv_cygwin=yes
10736else
10737 echo "configure: failed program was:" >&5
10738 cat conftest.$ac_ext >&5
10739 rm -rf conftest*
10740 ac_cv_cygwin=no
10741fi
10742rm -f conftest*
10743rm -f conftest*
10744fi
10745
10746echo "$ac_t""$ac_cv_cygwin" 1>&6
10747CYGWIN=
10748test "$ac_cv_cygwin" = yes && CYGWIN=yes
10749echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
c35f4ffc 10750echo "configure:10751: checking for mingw32 environment" >&5
c906108c
SS
10751if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10752 echo $ac_n "(cached) $ac_c" 1>&6
10753else
10754 cat > conftest.$ac_ext <<EOF
c35f4ffc 10755#line 10756 "configure"
c906108c
SS
10756#include "confdefs.h"
10757
10758int main() {
10759return __MINGW32__;
10760; return 0; }
10761EOF
c35f4ffc 10762if { (eval echo configure:10763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10763 rm -rf conftest*
10764 ac_cv_mingw32=yes
10765else
10766 echo "configure: failed program was:" >&5
10767 cat conftest.$ac_ext >&5
10768 rm -rf conftest*
10769 ac_cv_mingw32=no
10770fi
10771rm -f conftest*
10772rm -f conftest*
10773fi
10774
10775echo "$ac_t""$ac_cv_mingw32" 1>&6
10776MINGW32=
10777test "$ac_cv_mingw32" = yes && MINGW32=yes
10778
10779
10780echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
c35f4ffc 10781echo "configure:10782: checking for executable suffix" >&5
c906108c
SS
10782if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10783 echo $ac_n "(cached) $ac_c" 1>&6
10784else
10785 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10786 ac_cv_exeext=.exe
10787else
10788 rm -f conftest*
10789 echo 'int main () { return 0; }' > conftest.$ac_ext
10790 ac_cv_exeext=
c35f4ffc 10791 if { (eval echo configure:10792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10792 for file in conftest.*; do
10793 case $file in
c35f4ffc 10794 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10795 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10796 esac
10797 done
10798 else
10799 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10800 fi
10801 rm -f conftest*
10802 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10803fi
10804fi
10805
10806EXEEXT=""
10807test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10808echo "$ac_t""${ac_cv_exeext}" 1>&6
10809ac_exeext=$EXEEXT
10810
10811
234b45d4
KB
10812
10813cat >> confdefs.h <<\EOF
10814#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10815EOF
10816
10817
10818
10819
10820 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10821if test "${with_libiconv_prefix+set}" = set; then
10822 withval="$with_libiconv_prefix"
10823
10824 for dir in `echo "$withval" | tr : ' '`; do
10825 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10826 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10827 done
10828
10829fi
10830
10831
10832 echo $ac_n "checking for iconv""... $ac_c" 1>&6
c35f4ffc 10833echo "configure:10834: checking for iconv" >&5
234b45d4
KB
10834if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10835 echo $ac_n "(cached) $ac_c" 1>&6
10836else
10837
10838 am_cv_func_iconv="no, consider installing GNU libiconv"
10839 am_cv_lib_iconv=no
10840 cat > conftest.$ac_ext <<EOF
c35f4ffc 10841#line 10842 "configure"
234b45d4
KB
10842#include "confdefs.h"
10843#include <stdlib.h>
10844#include <iconv.h>
10845int main() {
10846iconv_t cd = iconv_open("","");
10847 iconv(cd,NULL,NULL,NULL,NULL);
10848 iconv_close(cd);
10849; return 0; }
10850EOF
c35f4ffc 10851if { (eval echo configure:10852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10852 rm -rf conftest*
10853 am_cv_func_iconv=yes
10854else
10855 echo "configure: failed program was:" >&5
10856 cat conftest.$ac_ext >&5
10857fi
10858rm -f conftest*
10859 if test "$am_cv_func_iconv" != yes; then
10860 am_save_LIBS="$LIBS"
10861 LIBS="$LIBS -liconv"
10862 cat > conftest.$ac_ext <<EOF
c35f4ffc 10863#line 10864 "configure"
234b45d4
KB
10864#include "confdefs.h"
10865#include <stdlib.h>
10866#include <iconv.h>
10867int main() {
10868iconv_t cd = iconv_open("","");
10869 iconv(cd,NULL,NULL,NULL,NULL);
10870 iconv_close(cd);
10871; return 0; }
10872EOF
c35f4ffc 10873if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10874 rm -rf conftest*
10875 am_cv_lib_iconv=yes
10876 am_cv_func_iconv=yes
10877else
10878 echo "configure: failed program was:" >&5
10879 cat conftest.$ac_ext >&5
10880fi
10881rm -f conftest*
10882 LIBS="$am_save_LIBS"
10883 fi
10884
10885fi
10886
10887echo "$ac_t""$am_cv_func_iconv" 1>&6
10888 if test "$am_cv_func_iconv" = yes; then
10889 cat >> confdefs.h <<\EOF
10890#define HAVE_ICONV 1
10891EOF
10892
10893 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
c35f4ffc 10894echo "configure:10895: checking for iconv declaration" >&5
234b45d4
KB
10895 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10896 echo $ac_n "(cached) $ac_c" 1>&6
10897else
10898
10899 cat > conftest.$ac_ext <<EOF
c35f4ffc 10900#line 10901 "configure"
234b45d4
KB
10901#include "confdefs.h"
10902
10903#include <stdlib.h>
10904#include <iconv.h>
10905extern
10906#ifdef __cplusplus
10907"C"
10908#endif
10909#if defined(__STDC__) || defined(__cplusplus)
10910size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10911#else
10912size_t iconv();
10913#endif
10914
10915int main() {
10916
10917; return 0; }
10918EOF
c35f4ffc 10919if { (eval echo configure:10920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10920 rm -rf conftest*
10921 am_cv_proto_iconv_arg1=""
10922else
10923 echo "configure: failed program was:" >&5
10924 cat conftest.$ac_ext >&5
10925 rm -rf conftest*
10926 am_cv_proto_iconv_arg1="const"
10927fi
10928rm -f conftest*
10929 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);"
10930fi
10931
10932 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10933 echo "$ac_t""${ac_t:-
10934 }$am_cv_proto_iconv" 1>&6
10935 cat >> confdefs.h <<EOF
10936#define ICONV_CONST $am_cv_proto_iconv_arg1
10937EOF
10938
10939 fi
10940 LIBICONV=
10941 if test "$am_cv_lib_iconv" = yes; then
10942 LIBICONV="-liconv"
10943 fi
10944
10945
10946
c906108c
SS
10947trap '' 1 2 15
10948cat > confcache <<\EOF
10949# This file is a shell script that caches the results of configure
10950# tests run on this system so they can be shared between configure
10951# scripts and configure runs. It is not useful on other systems.
10952# If it contains results you don't want to keep, you may remove or edit it.
10953#
10954# By default, configure uses ./config.cache as the cache file,
10955# creating it if it does not exist already. You can give configure
10956# the --cache-file=FILE option to use a different cache file; that is
10957# what configure does when it calls configure scripts in
10958# subdirectories, so they share the cache.
10959# Giving --cache-file=/dev/null disables caching, for debugging configure.
10960# config.status only pays attention to the cache file if you give it the
10961# --recheck option to rerun configure.
10962#
10963EOF
10964# The following way of writing the cache mishandles newlines in values,
10965# but we know of no workaround that is simple, portable, and efficient.
10966# So, don't put newlines in cache variables' values.
10967# Ultrix sh set writes to stderr and can't be redirected directly,
10968# and sets the high bit in the cache file unless we assign to the vars.
10969(set) 2>&1 |
10970 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10971 *ac_space=\ *)
10972 # `set' does not quote correctly, so add quotes (double-quote substitution
10973 # turns \\\\ into \\, and sed turns \\ into \).
10974 sed -n \
10975 -e "s/'/'\\\\''/g" \
10976 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10977 ;;
10978 *)
10979 # `set' quotes correctly as required by POSIX, so do not add quotes.
10980 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10981 ;;
10982 esac >> confcache
10983if cmp -s $cache_file confcache; then
10984 :
10985else
10986 if test -w $cache_file; then
10987 echo "updating cache $cache_file"
10988 cat confcache > $cache_file
10989 else
10990 echo "not updating unwritable cache $cache_file"
10991 fi
10992fi
10993rm -f confcache
10994
10995trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10996
10997test "x$prefix" = xNONE && prefix=$ac_default_prefix
10998# Let make expand exec_prefix.
10999test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11000
11001# Any assignment to VPATH causes Sun make to only execute
11002# the first set of double-colon rules, so remove it if not needed.
11003# If there is a colon in the path, we need to keep it.
11004if test "x$srcdir" = x.; then
11005 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11006fi
11007
11008trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11009
11010DEFS=-DHAVE_CONFIG_H
11011
11012# Without the "./", some shells look in PATH for config.status.
11013: ${CONFIG_STATUS=./config.status}
11014
11015echo creating $CONFIG_STATUS
11016rm -f $CONFIG_STATUS
11017cat > $CONFIG_STATUS <<EOF
11018#! /bin/sh
11019# Generated automatically by configure.
11020# Run this file to recreate the current configuration.
11021# This directory was configured as follows,
11022# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11023#
11024# $0 $ac_configure_args
11025#
11026# Compiler output produced by configure, useful for debugging
11027# configure, is in ./config.log if it exists.
11028
11029ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11030for ac_option
11031do
11032 case "\$ac_option" in
11033 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11034 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11035 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11036 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11037 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11038 exit 0 ;;
11039 -help | --help | --hel | --he | --h)
11040 echo "\$ac_cs_usage"; exit 0 ;;
11041 *) echo "\$ac_cs_usage"; exit 1 ;;
11042 esac
11043done
11044
11045ac_given_srcdir=$srcdir
11046ac_given_INSTALL="$INSTALL"
11047
ed952ac5 11048trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11049EOF
11050cat >> $CONFIG_STATUS <<EOF
11051
11052# Protect against being on the right side of a sed subst in config.status.
11053sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11054 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11055$ac_vpsub
11056$extrasub
11057s%@SHELL@%$SHELL%g
11058s%@CFLAGS@%$CFLAGS%g
11059s%@CPPFLAGS@%$CPPFLAGS%g
11060s%@CXXFLAGS@%$CXXFLAGS%g
11061s%@FFLAGS@%$FFLAGS%g
11062s%@DEFS@%$DEFS%g
11063s%@LDFLAGS@%$LDFLAGS%g
11064s%@LIBS@%$LIBS%g
11065s%@exec_prefix@%$exec_prefix%g
11066s%@prefix@%$prefix%g
11067s%@program_transform_name@%$program_transform_name%g
11068s%@bindir@%$bindir%g
11069s%@sbindir@%$sbindir%g
11070s%@libexecdir@%$libexecdir%g
11071s%@datadir@%$datadir%g
11072s%@sysconfdir@%$sysconfdir%g
11073s%@sharedstatedir@%$sharedstatedir%g
11074s%@localstatedir@%$localstatedir%g
11075s%@libdir@%$libdir%g
11076s%@includedir@%$includedir%g
11077s%@oldincludedir@%$oldincludedir%g
11078s%@infodir@%$infodir%g
11079s%@mandir@%$mandir%g
413ccac7
AC
11080s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11081s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11082s%@MAINT@%$MAINT%g
c906108c
SS
11083s%@CC@%$CC%g
11084s%@CPP@%$CPP%g
11085s%@host@%$host%g
11086s%@host_alias@%$host_alias%g
11087s%@host_cpu@%$host_cpu%g
11088s%@host_vendor@%$host_vendor%g
11089s%@host_os@%$host_os%g
11090s%@target@%$target%g
11091s%@target_alias@%$target_alias%g
11092s%@target_cpu@%$target_cpu%g
11093s%@target_vendor@%$target_vendor%g
11094s%@target_os@%$target_os%g
11095s%@build@%$build%g
11096s%@build_alias@%$build_alias%g
11097s%@build_cpu@%$build_cpu%g
11098s%@build_vendor@%$build_vendor%g
11099s%@build_os@%$build_os%g
c906108c 11100s%@RANLIB@%$RANLIB%g
8bb2c122 11101s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11102s%@ALLOCA@%$ALLOCA%g
11103s%@USE_NLS@%$USE_NLS%g
11104s%@MSGFMT@%$MSGFMT%g
11105s%@GMSGFMT@%$GMSGFMT%g
11106s%@XGETTEXT@%$XGETTEXT%g
11107s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11108s%@CATALOGS@%$CATALOGS%g
11109s%@CATOBJEXT@%$CATOBJEXT%g
11110s%@DATADIRNAME@%$DATADIRNAME%g
11111s%@GMOFILES@%$GMOFILES%g
11112s%@INSTOBJEXT@%$INSTOBJEXT%g
11113s%@INTLDEPS@%$INTLDEPS%g
11114s%@INTLLIBS@%$INTLLIBS%g
11115s%@INTLOBJS@%$INTLOBJS%g
11116s%@POFILES@%$POFILES%g
11117s%@POSUB@%$POSUB%g
11118s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11119s%@GT_NO@%$GT_NO%g
11120s%@GT_YES@%$GT_YES%g
11121s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11122s%@l@%$l%g
8dcde887 11123s%@subdirs@%$subdirs%g
7a292a7a 11124s%@AWK@%$AWK%g
c906108c
SS
11125s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11126s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11127s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11128s%@LN_S@%$LN_S%g
11129s%@YACC@%$YACC%g
c906108c 11130s%@AR@%$AR%g
95ca63c4
CF
11131s%@DLLTOOL@%$DLLTOOL%g
11132s%@WINDRES@%$WINDRES%g
75c6e08a 11133s%@MIG@%$MIG%g
c906108c 11134s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11135s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11136s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11137s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11138s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11139s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11140s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11141s%@LIBGUI@%$LIBGUI%g
11142s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11143s%@WIN32LDAPP@%$WIN32LDAPP%g
11144s%@TCL_VERSION@%$TCL_VERSION%g
11145s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11146s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11147s%@TCL_CC@%$TCL_CC%g
11148s%@TCL_DEFS@%$TCL_DEFS%g
11149s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11150s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11151s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11152s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11153s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11154s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11155s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11156s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11157s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11158s%@TCL_RANLIB@%$TCL_RANLIB%g
11159s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11160s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11161s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11162s%@TK_VERSION@%$TK_VERSION%g
11163s%@TK_DEFS@%$TK_DEFS%g
11164s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11165s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11166s%@TK_XLIBSW@%$TK_XLIBSW%g
11167s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11168s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11169s%@TCLHDIR@%$TCLHDIR%g
11170s%@TKHDIR@%$TKHDIR%g
11171s%@ITCLHDIR@%$ITCLHDIR%g
11172s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11173s%@ITCL_VERSION@%$ITCL_VERSION%g
11174s%@ITCL_DEFS@%$ITCL_DEFS%g
11175s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11176s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11177s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11178s%@ITK_VERSION@%$ITK_VERSION%g
11179s%@ITK_DEFS@%$ITK_DEFS%g
11180s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11181s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11182s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11183s%@X_CFLAGS@%$X_CFLAGS%g
11184s%@X_LDFLAGS@%$X_LDFLAGS%g
11185s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11186s%@TCL_DEPS@%$TCL_DEPS%g
11187s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11188s%@ITCLLIB@%$ITCLLIB%g
11189s%@ITCL_DEPS@%$ITCL_DEPS%g
11190s%@ITKLIB@%$ITKLIB%g
11191s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11192s%@GDBTKLIBS@%$GDBTKLIBS%g
11193s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11194s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11195s%@IGNORE_SIM@%$IGNORE_SIM%g
11196s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11197s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11198s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11199s%@CONFIG_OBS@%$CONFIG_OBS%g
11200s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11201s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11202s%@CONFIG_ALL@%$CONFIG_ALL%g
11203s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11204s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11205s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11206s%@target_subdir@%$target_subdir%g
11207/@host_makefile_frag@/r $host_makefile_frag
11208s%@host_makefile_frag@%%g
11209/@target_makefile_frag@/r $target_makefile_frag
11210s%@target_makefile_frag@%%g
11211s%@frags@%$frags%g
5a2402b8
AC
11212s%@xm_h@%$xm_h%g
11213s%@tm_h@%$tm_h%g
11214s%@nm_h@%$nm_h%g
c906108c 11215s%@EXEEXT@%$EXEEXT%g
234b45d4 11216s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11217
11218CEOF
11219EOF
11220
11221cat >> $CONFIG_STATUS <<\EOF
11222
11223# Split the substitutions into bite-sized pieces for seds with
11224# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11225ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11226ac_file=1 # Number of current file.
11227ac_beg=1 # First line for current file.
11228ac_end=$ac_max_sed_cmds # Line after last line for current file.
11229ac_more_lines=:
11230ac_sed_cmds=""
11231while $ac_more_lines; do
11232 if test $ac_beg -gt 1; then
11233 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11234 else
11235 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11236 fi
11237 if test ! -s conftest.s$ac_file; then
11238 ac_more_lines=false
11239 rm -f conftest.s$ac_file
11240 else
11241 if test -z "$ac_sed_cmds"; then
11242 ac_sed_cmds="sed -f conftest.s$ac_file"
11243 else
11244 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11245 fi
11246 ac_file=`expr $ac_file + 1`
11247 ac_beg=$ac_end
11248 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11249 fi
11250done
11251if test -z "$ac_sed_cmds"; then
11252 ac_sed_cmds=cat
11253fi
11254EOF
11255
11256cat >> $CONFIG_STATUS <<EOF
11257
ed952ac5 11258CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11259EOF
11260cat >> $CONFIG_STATUS <<\EOF
11261for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11262 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11263 case "$ac_file" in
11264 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11265 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11266 *) ac_file_in="${ac_file}.in" ;;
11267 esac
11268
11269 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11270
11271 # Remove last slash and all that follows it. Not all systems have dirname.
11272 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11273 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11274 # The file is in a subdirectory.
11275 test ! -d "$ac_dir" && mkdir "$ac_dir"
11276 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11277 # A "../" for each directory in $ac_dir_suffix.
11278 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11279 else
11280 ac_dir_suffix= ac_dots=
11281 fi
11282
11283 case "$ac_given_srcdir" in
11284 .) srcdir=.
11285 if test -z "$ac_dots"; then top_srcdir=.
11286 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11287 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11288 *) # Relative path.
11289 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11290 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11291 esac
11292
11293 case "$ac_given_INSTALL" in
11294 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11295 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11296 esac
11297
11298 echo creating "$ac_file"
11299 rm -f "$ac_file"
11300 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11301 case "$ac_file" in
11302 *Makefile*) ac_comsub="1i\\
11303# $configure_input" ;;
11304 *) ac_comsub= ;;
11305 esac
11306
11307 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11308 sed -e "$ac_comsub
11309s%@configure_input@%$configure_input%g
11310s%@srcdir@%$srcdir%g
11311s%@top_srcdir@%$top_srcdir%g
11312s%@INSTALL@%$INSTALL%g
11313" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11314fi; done
11315rm -f conftest.s*
11316
11317# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11318# NAME is the cpp macro being defined and VALUE is the value it is being given.
11319#
11320# ac_d sets the value in "#define NAME VALUE" lines.
11321ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11322ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11323ac_dC='\3'
11324ac_dD='%g'
11325# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11326ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11327ac_uB='\([ ]\)%\1#\2define\3'
11328ac_uC=' '
11329ac_uD='\4%g'
11330# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11331ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11332ac_eB='$%\1#\2define\3'
11333ac_eC=' '
11334ac_eD='%g'
11335
11336if test "${CONFIG_HEADERS+set}" != set; then
11337EOF
11338cat >> $CONFIG_STATUS <<EOF
11339 CONFIG_HEADERS="config.h:config.in"
11340EOF
11341cat >> $CONFIG_STATUS <<\EOF
11342fi
11343for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11344 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11345 case "$ac_file" in
11346 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11347 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11348 *) ac_file_in="${ac_file}.in" ;;
11349 esac
11350
11351 echo creating $ac_file
11352
11353 rm -f conftest.frag conftest.in conftest.out
11354 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11355 cat $ac_file_inputs > conftest.in
11356
11357EOF
11358
11359# Transform confdefs.h into a sed script conftest.vals that substitutes
11360# the proper values into config.h.in to produce config.h. And first:
11361# Protect against being on the right side of a sed subst in config.status.
11362# Protect against being in an unquoted here document in config.status.
11363rm -f conftest.vals
11364cat > conftest.hdr <<\EOF
11365s/[\\&%]/\\&/g
11366s%[\\$`]%\\&%g
11367s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11368s%ac_d%ac_u%gp
11369s%ac_u%ac_e%gp
11370EOF
11371sed -n -f conftest.hdr confdefs.h > conftest.vals
11372rm -f conftest.hdr
11373
11374# This sed command replaces #undef with comments. This is necessary, for
11375# example, in the case of _POSIX_SOURCE, which is predefined and required
11376# on some systems where configure will not decide to define it.
11377cat >> conftest.vals <<\EOF
11378s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11379EOF
11380
11381# Break up conftest.vals because some shells have a limit on
11382# the size of here documents, and old seds have small limits too.
11383
11384rm -f conftest.tail
11385while :
11386do
11387 ac_lines=`grep -c . conftest.vals`
11388 # grep -c gives empty output for an empty file on some AIX systems.
11389 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11390 # Write a limited-size here document to conftest.frag.
11391 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11392 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11393 echo 'CEOF
11394 sed -f conftest.frag conftest.in > conftest.out
11395 rm -f conftest.in
11396 mv conftest.out conftest.in
11397' >> $CONFIG_STATUS
11398 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11399 rm -f conftest.vals
11400 mv conftest.tail conftest.vals
11401done
11402rm -f conftest.vals
11403
11404cat >> $CONFIG_STATUS <<\EOF
11405 rm -f conftest.frag conftest.h
11406 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11407 cat conftest.in >> conftest.h
11408 rm -f conftest.in
11409 if cmp -s $ac_file conftest.h 2>/dev/null; then
11410 echo "$ac_file is unchanged"
11411 rm -f conftest.h
11412 else
11413 # Remove last slash and all that follows it. Not all systems have dirname.
11414 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11415 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11416 # The file is in a subdirectory.
11417 test ! -d "$ac_dir" && mkdir "$ac_dir"
11418 fi
11419 rm -f $ac_file
11420 mv conftest.h $ac_file
11421 fi
11422fi; done
11423
11424EOF
11425
11426cat >> $CONFIG_STATUS <<EOF
11427ac_sources="$files"
11428ac_dests="$links"
11429EOF
11430
11431cat >> $CONFIG_STATUS <<\EOF
11432srcdir=$ac_given_srcdir
11433while test -n "$ac_sources"; do
11434 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11435 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11436
11437 echo "linking $srcdir/$ac_source to $ac_dest"
11438
11439 if test ! -r $srcdir/$ac_source; then
11440 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11441 fi
11442 rm -f $ac_dest
11443
11444 # Make relative symlinks.
11445 # Remove last slash and all that follows it. Not all systems have dirname.
11446 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11447 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11448 # The dest file is in a subdirectory.
11449 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11450 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11451 # A "../" for each directory in $ac_dest_dir_suffix.
11452 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11453 else
11454 ac_dest_dir_suffix= ac_dots=
11455 fi
11456
11457 case "$srcdir" in
11458 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11459 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11460 esac
11461
11462 # Make a symlink if possible; otherwise try a hard link.
11463 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11464 ln $srcdir/$ac_source $ac_dest; then :
11465 else
11466 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11467 fi
11468done
11469EOF
11470cat >> $CONFIG_STATUS <<EOF
11471
11472gdb_host_cpu=$gdb_host_cpu
11473gdb_target_cpu=$gdb_target_cpu
11474nativefile=$nativefile
11475
11476EOF
11477cat >> $CONFIG_STATUS <<\EOF
11478
7ee6d7eb 11479if test "${nativefile}" = ""; then
c4620205 11480 < Makefile \
e27da16d
JT
11481 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11482 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11483 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11484 > Makefile.tem
c906108c
SS
11485mv -f Makefile.tem Makefile
11486fi
11487
11488sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11489/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11490/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11491mv -f Makefile.tmp Makefile
11492
2acceee2 11493
c906108c
SS
11494case x$CONFIG_HEADERS in
11495xconfig.h:config.in)
11496echo > stamp-h ;;
11497esac
11498
11499exit 0
11500EOF
11501chmod +x $CONFIG_STATUS
11502rm -fr confdefs* $ac_clean_files
11503test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11504
11505if test "$no_recursion" != yes; then
11506
11507 # Remove --cache-file and --srcdir arguments so they do not pile up.
11508 ac_sub_configure_args=
11509 ac_prev=
11510 for ac_arg in $ac_configure_args; do
11511 if test -n "$ac_prev"; then
11512 ac_prev=
11513 continue
11514 fi
11515 case "$ac_arg" in
11516 -cache-file | --cache-file | --cache-fil | --cache-fi \
11517 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11518 ac_prev=cache_file ;;
11519 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11520 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11521 ;;
11522 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11523 ac_prev=srcdir ;;
11524 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11525 ;;
11526 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11527 esac
11528 done
11529
8dcde887 11530 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11531
11532 # Do not complain, so a configure script can configure whichever
11533 # parts of a large source tree are present.
11534 if test ! -d $srcdir/$ac_config_dir; then
11535 continue
11536 fi
11537
11538 echo configuring in $ac_config_dir
11539
11540 case "$srcdir" in
11541 .) ;;
11542 *)
11543 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11544 else
11545 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11546 fi
11547 ;;
11548 esac
11549
11550 ac_popdir=`pwd`
11551 cd $ac_config_dir
11552
11553 # A "../" for each directory in /$ac_config_dir.
11554 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11555
11556 case "$srcdir" in
11557 .) # No --srcdir option. We are building in place.
11558 ac_sub_srcdir=$srcdir ;;
11559 /*) # Absolute path.
11560 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11561 *) # Relative path.
11562 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11563 esac
11564
11565 # Check for guested configure; otherwise get Cygnus style configure.
11566 if test -f $ac_sub_srcdir/configure; then
11567 ac_sub_configure=$ac_sub_srcdir/configure
11568 elif test -f $ac_sub_srcdir/configure.in; then
11569 ac_sub_configure=$ac_configure
11570 else
11571 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11572 ac_sub_configure=
11573 fi
11574
11575 # The recursion is here.
11576 if test -n "$ac_sub_configure"; then
11577
11578 # Make the cache file name correct relative to the subdirectory.
11579 case "$cache_file" in
11580 /*) ac_sub_cache_file=$cache_file ;;
11581 *) # Relative path.
11582 ac_sub_cache_file="$ac_dots$cache_file" ;;
11583 esac
11584 case "$ac_given_INSTALL" in
11585 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11586 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11587 esac
11588
11589 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11590 # The eval makes quoting arguments work.
11591 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11592 then :
11593 else
11594 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11595 fi
11596 fi
11597
11598 cd $ac_popdir
11599 done
11600fi
11601
11602
11603exit 0
This page took 1.276738 seconds and 4 git commands to generate.