* pe-dll.c: Revert changes accidentally committed 2004-03-08.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
d836ee13 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
d836ee13 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
d836ee13
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
d836ee13
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
d836ee13
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d836ee13 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d836ee13 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
d836ee13 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d836ee13 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d836ee13 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d836ee13 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
d836ee13 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d836ee13 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d836ee13 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d836ee13 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d836ee13 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d836ee13 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d836ee13 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d836ee13 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d836ee13 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d836ee13 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d836ee13 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d836ee13 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d836ee13 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d836ee13 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d836ee13 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d836ee13 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d836ee13 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
d836ee13 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
d836ee13 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
d836ee13 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
d836ee13 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
d836ee13 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
d836ee13 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
d836ee13 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
d836ee13 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
d836ee13 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
d836ee13 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
d836ee13 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
d836ee13 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d836ee13 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
d836ee13 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
d836ee13 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d836ee13 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
d836ee13 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
d836ee13 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
d836ee13 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
d836ee13 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
d836ee13 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d836ee13 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
d836ee13 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
d836ee13 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
d836ee13 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d836ee13 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
d836ee13 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
d836ee13 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
d836ee13 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
d836ee13 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
d836ee13 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
d836ee13 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d836ee13 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
d836ee13 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
d836ee13 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
d836ee13 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
d836ee13 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
d836ee13 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
d836ee13 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
d836ee13 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d836ee13 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
d836ee13 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
d836ee13 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d836ee13 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d836ee13 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d836ee13 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
d836ee13 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d836ee13 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
d836ee13 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
d836ee13 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d836ee13 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
d836ee13 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
d836ee13 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d836ee13 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
d836ee13 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
d836ee13 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
d836ee13 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
d836ee13 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
d836ee13 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
d836ee13 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d836ee13 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d836ee13 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
d836ee13 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
2928CONFIG_DEPS=
2929CONFIG_SRCS=
fb40c209 2930ENABLE_CFLAGS=
b3a90332
AC
2931CONFIG_ALL=
2932CONFIG_CLEAN=
e56ac5c3
AC
2933CONFIG_INSTALL=
2934CONFIG_UNINSTALL=
c906108c 2935
8dcde887 2936subdirs="doc testsuite"
96baa820 2937
8dcde887 2938configdirs=
96baa820 2939
27e9bf90 2940. $srcdir/configure.host
c906108c 2941
27e9bf90 2942. $srcdir/configure.tgt
c906108c 2943
27e9bf90
MK
2944# Fetch the default architecture and default target vector from BFD.
2945targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2946
27e9bf90
MK
2947# We only want the first architecture, so strip off the others if
2948# there is more than one.
2949targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2950
27e9bf90
MK
2951if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2954EOF
2955
2956fi
27e9bf90
MK
2957if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2960EOF
2961
2962fi
c906108c 2963
8bb2c122
MK
2964if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969s,\\,\\\\,g; s,\$,$$,g
2970EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973fi
2974test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976# Use a double $ so make ignores it.
2977test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980# sed with no file args requires a program.
2981test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
627af7ea
MK
2984# The CLI cannot be disabled yet, but may be in the future.
2985
2986# Enable CLI.
2987# Check whether --enable-gdbcli or --disable-gdbcli was given.
2988if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998else
2999 enable_gdbcli=yes
3000fi
3001
3002if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3008 fi
3009fi
3010
3011# Enable MI.
3012# Check whether --enable-gdbmi or --disable-gdbmi was given.
3013if test "${enable_gdbmi+set}" = set; then
3014 enableval="$enable_gdbmi"
3015 case $enableval in
3016 yes | no)
3017 ;;
3018 *)
3019 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3020 esac
3021else
3022 enable_gdbmi=yes
3023fi
3024
3025if test x"$enable_gdbmi" = xyes; then
3026 if test -d $srcdir/mi; then
3027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3031 fi
3032fi
3033
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
02d62932 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
02d62932 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"
02d62932 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
02d62932 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
02d62932 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"
02d62932 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
02d62932 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
02d62932 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"
02d62932 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
02d62932 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
02d62932 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"
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 3395#line 3396 "configure"
d28f9cdf 3396#include "confdefs.h"
d28f9cdf
DJ
3397
3398int main() {
d9feb4e7 3399int x;
d28f9cdf
DJ
3400; return 0; }
3401EOF
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 3757#line 3758 "configure"
9a156167
MK
3758#include "confdefs.h"
3759
3760int main() {
3761main()
3762; return 0; }
3763EOF
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
02d62932 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
4178case $host_os in
4179 osf5.*)
4180 # ncurses does not work on native alphaev68-dec-osf5.1
4181 # -- chastain 2004-04-24
4182
4183echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4184echo "configure:4185: checking for library containing initscr" >&5
4185if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4186 echo $ac_n "(cached) $ac_c" 1>&6
4187else
4188 ac_func_search_save_LIBS="$LIBS"
4189ac_cv_search_initscr="no"
4190cat > conftest.$ac_ext <<EOF
4191#line 4192 "configure"
4192#include "confdefs.h"
4193/* Override any gcc2 internal prototype to avoid an error. */
4194/* We use char because int might match the return type of a gcc2
4195 builtin and then its argument prototype would still apply. */
4196char initscr();
4197
4198int main() {
4199initscr()
4200; return 0; }
4201EOF
4202if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4203 rm -rf conftest*
4204 ac_cv_search_initscr="none required"
4205else
4206 echo "configure: failed program was:" >&5
4207 cat conftest.$ac_ext >&5
4208fi
4209rm -f conftest*
4210test "$ac_cv_search_initscr" = "no" && for i in curses; do
4211LIBS="-l$i $ac_func_search_save_LIBS"
4212cat > conftest.$ac_ext <<EOF
4213#line 4214 "configure"
4214#include "confdefs.h"
4215/* Override any gcc2 internal prototype to avoid an error. */
4216/* We use char because int might match the return type of a gcc2
4217 builtin and then its argument prototype would still apply. */
4218char initscr();
4219
4220int main() {
4221initscr()
4222; return 0; }
4223EOF
4224if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4225 rm -rf conftest*
4226 ac_cv_search_initscr="-l$i"
4227break
4228else
4229 echo "configure: failed program was:" >&5
4230 cat conftest.$ac_ext >&5
4231fi
4232rm -f conftest*
4233done
4234LIBS="$ac_func_search_save_LIBS"
4235fi
4236
4237echo "$ac_t""$ac_cv_search_initscr" 1>&6
4238if test "$ac_cv_search_initscr" != "no"; then
4239 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4240
4241else :
4242 echo "configure: warning: no curses library found" 1>&2
4243fi
4244 ;;
4245 *)
4246
4247echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4248echo "configure:4249: checking for library containing initscr" >&5
4249if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
4251else
4252 ac_func_search_save_LIBS="$LIBS"
4253ac_cv_search_initscr="no"
4254cat > conftest.$ac_ext <<EOF
4255#line 4256 "configure"
4256#include "confdefs.h"
4257/* Override any gcc2 internal prototype to avoid an error. */
4258/* We use char because int might match the return type of a gcc2
4259 builtin and then its argument prototype would still apply. */
4260char initscr();
4261
4262int main() {
4263initscr()
4264; return 0; }
4265EOF
4266if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4267 rm -rf conftest*
4268 ac_cv_search_initscr="none required"
4269else
4270 echo "configure: failed program was:" >&5
4271 cat conftest.$ac_ext >&5
4272fi
4273rm -f conftest*
4274test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
4275LIBS="-l$i $ac_func_search_save_LIBS"
4276cat > conftest.$ac_ext <<EOF
4277#line 4278 "configure"
4278#include "confdefs.h"
4279/* Override any gcc2 internal prototype to avoid an error. */
4280/* We use char because int might match the return type of a gcc2
4281 builtin and then its argument prototype would still apply. */
4282char initscr();
4283
4284int main() {
4285initscr()
4286; return 0; }
4287EOF
4288if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4289 rm -rf conftest*
4290 ac_cv_search_initscr="-l$i"
4291break
4292else
4293 echo "configure: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
4295fi
4296rm -f conftest*
4297done
4298LIBS="$ac_func_search_save_LIBS"
4299fi
4300
4301echo "$ac_t""$ac_cv_search_initscr" 1>&6
4302if test "$ac_cv_search_initscr" != "no"; then
4303 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4304
4305else :
4306 echo "configure: warning: no curses library found" 1>&2
4307fi
4308 ;;
4309esac
4310
4311# Check whether the wborder function is provided by the curses
4312# library detected above. In certain implementations such as
4313# the HP/UX Hcurses for instance, this function is provided by an
4314# additional library. So if we did not find this function inside
4315# the curses library, try some alternate libraries we know might
4316# provide it.
4317
4318echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
4319echo "configure:4320: checking for library containing wborder" >&5
4320if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 ac_func_search_save_LIBS="$LIBS"
4324ac_cv_search_wborder="no"
4325cat > conftest.$ac_ext <<EOF
4326#line 4327 "configure"
4327#include "confdefs.h"
4328/* Override any gcc2 internal prototype to avoid an error. */
4329/* We use char because int might match the return type of a gcc2
4330 builtin and then its argument prototype would still apply. */
4331char wborder();
4332
4333int main() {
4334wborder()
4335; return 0; }
4336EOF
4337if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4338 rm -rf conftest*
4339 ac_cv_search_wborder="none required"
4340else
4341 echo "configure: failed program was:" >&5
4342 cat conftest.$ac_ext >&5
4343fi
4344rm -f conftest*
4345test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4346LIBS="-l$i $ac_func_search_save_LIBS"
4347cat > conftest.$ac_ext <<EOF
4348#line 4349 "configure"
4349#include "confdefs.h"
4350/* Override any gcc2 internal prototype to avoid an error. */
4351/* We use char because int might match the return type of a gcc2
4352 builtin and then its argument prototype would still apply. */
4353char wborder();
4354
4355int main() {
4356wborder()
4357; return 0; }
4358EOF
4359if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4360 rm -rf conftest*
4361 ac_cv_search_wborder="-l$i"
4362break
4363else
4364 echo "configure: failed program was:" >&5
4365 cat conftest.$ac_ext >&5
4366fi
4367rm -f conftest*
4368done
4369LIBS="$ac_func_search_save_LIBS"
4370fi
4371
4372echo "$ac_t""$ac_cv_search_wborder" 1>&6
4373if test "$ac_cv_search_wborder" != "no"; then
4374 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4375
4376else :
4377 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4378fi
4379
5ee754fc
MK
4380# ------------------------- #
4381# Checks for header files. #
4382# ------------------------- #
4383
4384ac_header_dirent=no
4385for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4386do
4387ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4388echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
02d62932 4389echo "configure:4390: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4390if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4391 echo $ac_n "(cached) $ac_c" 1>&6
4392else
4393 cat > conftest.$ac_ext <<EOF
02d62932 4394#line 4395 "configure"
c906108c
SS
4395#include "confdefs.h"
4396#include <sys/types.h>
5ee754fc
MK
4397#include <$ac_hdr>
4398int main() {
4399DIR *dirp = 0;
4400; return 0; }
4401EOF
02d62932 4402if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4403 rm -rf conftest*
4404 eval "ac_cv_header_dirent_$ac_safe=yes"
4405else
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 rm -rf conftest*
4409 eval "ac_cv_header_dirent_$ac_safe=no"
4410fi
4411rm -f conftest*
4412fi
4413if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4414 echo "$ac_t""yes" 1>&6
4415 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4416 cat >> confdefs.h <<EOF
4417#define $ac_tr_hdr 1
4418EOF
4419 ac_header_dirent=$ac_hdr; break
4420else
4421 echo "$ac_t""no" 1>&6
4422fi
4423done
4424# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4425if test $ac_header_dirent = dirent.h; then
4426echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
02d62932 4427echo "configure:4428: checking for opendir in -ldir" >&5
5ee754fc
MK
4428ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4429if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4430 echo $ac_n "(cached) $ac_c" 1>&6
4431else
4432 ac_save_LIBS="$LIBS"
4433LIBS="-ldir $LIBS"
4434cat > conftest.$ac_ext <<EOF
02d62932 4435#line 4436 "configure"
5ee754fc
MK
4436#include "confdefs.h"
4437/* Override any gcc2 internal prototype to avoid an error. */
4438/* We use char because int might match the return type of a gcc2
4439 builtin and then its argument prototype would still apply. */
4440char opendir();
c906108c
SS
4441
4442int main() {
5ee754fc 4443opendir()
c906108c
SS
4444; return 0; }
4445EOF
02d62932 4446if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4447 rm -rf conftest*
5ee754fc 4448 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4449else
4450 echo "configure: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4452 rm -rf conftest*
5ee754fc 4453 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4454fi
4455rm -f conftest*
5ee754fc
MK
4456LIBS="$ac_save_LIBS"
4457
4458fi
4459if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 LIBS="$LIBS -ldir"
4462else
4463 echo "$ac_t""no" 1>&6
c906108c
SS
4464fi
4465
5ee754fc
MK
4466else
4467echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
02d62932 4468echo "configure:4469: checking for opendir in -lx" >&5
5ee754fc
MK
4469ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4470if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4471 echo $ac_n "(cached) $ac_c" 1>&6
4472else
4473 ac_save_LIBS="$LIBS"
4474LIBS="-lx $LIBS"
4475cat > conftest.$ac_ext <<EOF
02d62932 4476#line 4477 "configure"
5ee754fc
MK
4477#include "confdefs.h"
4478/* Override any gcc2 internal prototype to avoid an error. */
4479/* We use char because int might match the return type of a gcc2
4480 builtin and then its argument prototype would still apply. */
4481char opendir();
4482
4483int main() {
4484opendir()
4485; return 0; }
c906108c 4486EOF
02d62932 4487if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4488 rm -rf conftest*
4489 eval "ac_cv_lib_$ac_lib_var=yes"
4490else
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493 rm -rf conftest*
4494 eval "ac_cv_lib_$ac_lib_var=no"
4495fi
4496rm -f conftest*
4497LIBS="$ac_save_LIBS"
c906108c 4498
5ee754fc
MK
4499fi
4500if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4501 echo "$ac_t""yes" 1>&6
4502 LIBS="$LIBS -lx"
4503else
4504 echo "$ac_t""no" 1>&6
4505fi
c906108c 4506
5ee754fc 4507fi
c906108c 4508
5ee754fc 4509echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
02d62932 4510echo "configure:4511: checking whether stat file-mode macros are broken" >&5
5ee754fc 4511if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4512 echo $ac_n "(cached) $ac_c" 1>&6
4513else
4514 cat > conftest.$ac_ext <<EOF
02d62932 4515#line 4516 "configure"
9608ab8b
MK
4516#include "confdefs.h"
4517#include <sys/types.h>
5ee754fc
MK
4518#include <sys/stat.h>
4519
4520#if defined(S_ISBLK) && defined(S_IFDIR)
4521# if S_ISBLK (S_IFDIR)
4522You lose.
4523# endif
4524#endif
4525
4526#if defined(S_ISBLK) && defined(S_IFCHR)
4527# if S_ISBLK (S_IFCHR)
4528You lose.
4529# endif
4530#endif
4531
4532#if defined(S_ISLNK) && defined(S_IFREG)
4533# if S_ISLNK (S_IFREG)
4534You lose.
4535# endif
4536#endif
4537
4538#if defined(S_ISSOCK) && defined(S_IFREG)
4539# if S_ISSOCK (S_IFREG)
4540You lose.
4541# endif
4542#endif
4543
9608ab8b 4544EOF
5ee754fc
MK
4545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4546 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4547 rm -rf conftest*
5ee754fc
MK
4548 ac_cv_header_stat_broken=yes
4549else
4550 rm -rf conftest*
4551 ac_cv_header_stat_broken=no
4552fi
4553rm -f conftest*
4554
4555fi
4556
4557echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4558if test $ac_cv_header_stat_broken = yes; then
4559 cat >> confdefs.h <<\EOF
4560#define STAT_MACROS_BROKEN 1
4561EOF
4562
4563fi
4564
4565echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
02d62932 4566echo "configure:4567: checking for ANSI C header files" >&5
5ee754fc
MK
4567if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4568 echo $ac_n "(cached) $ac_c" 1>&6
4569else
4570 cat > conftest.$ac_ext <<EOF
02d62932 4571#line 4572 "configure"
5ee754fc
MK
4572#include "confdefs.h"
4573#include <stdlib.h>
4574#include <stdarg.h>
4575#include <string.h>
4576#include <float.h>
4577EOF
4578ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4579{ (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4580ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4581if test -z "$ac_err"; then
4582 rm -rf conftest*
4583 ac_cv_header_stdc=yes
4584else
4585 echo "$ac_err" >&5
4586 echo "configure: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 rm -rf conftest*
4589 ac_cv_header_stdc=no
4590fi
4591rm -f conftest*
4592
4593if test $ac_cv_header_stdc = yes; then
4594 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4595cat > conftest.$ac_ext <<EOF
02d62932 4596#line 4597 "configure"
5ee754fc
MK
4597#include "confdefs.h"
4598#include <string.h>
4599EOF
4600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4601 egrep "memchr" >/dev/null 2>&1; then
4602 :
4603else
4604 rm -rf conftest*
4605 ac_cv_header_stdc=no
4606fi
4607rm -f conftest*
4608
4609fi
4610
4611if test $ac_cv_header_stdc = yes; then
4612 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4613cat > conftest.$ac_ext <<EOF
02d62932 4614#line 4615 "configure"
5ee754fc
MK
4615#include "confdefs.h"
4616#include <stdlib.h>
4617EOF
4618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4619 egrep "free" >/dev/null 2>&1; then
4620 :
4621else
4622 rm -rf conftest*
4623 ac_cv_header_stdc=no
4624fi
4625rm -f conftest*
4626
4627fi
4628
4629if test $ac_cv_header_stdc = yes; then
4630 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4631if test "$cross_compiling" = yes; then
4632 :
4633else
4634 cat > conftest.$ac_ext <<EOF
02d62932 4635#line 4636 "configure"
5ee754fc
MK
4636#include "confdefs.h"
4637#include <ctype.h>
4638#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4639#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4640#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4641int main () { int i; for (i = 0; i < 256; i++)
4642if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4643exit (0); }
4644
4645EOF
02d62932 4646if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4647then
4648 :
9608ab8b 4649else
5ee754fc
MK
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4652 rm -fr conftest*
4653 ac_cv_header_stdc=no
4654fi
4655rm -fr conftest*
4656fi
4657
4658fi
4659fi
4660
4661echo "$ac_t""$ac_cv_header_stdc" 1>&6
4662if test $ac_cv_header_stdc = yes; then
4663 cat >> confdefs.h <<\EOF
4664#define STDC_HEADERS 1
4665EOF
4666
4667fi
4668
4669for ac_hdr in link.h
4670do
4671ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4672echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4673echo "configure:4674: checking for $ac_hdr" >&5
5ee754fc
MK
4674if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4675 echo $ac_n "(cached) $ac_c" 1>&6
4676else
4677 cat > conftest.$ac_ext <<EOF
02d62932 4678#line 4679 "configure"
5ee754fc
MK
4679#include "confdefs.h"
4680#include <$ac_hdr>
4681EOF
4682ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4683{ (eval echo configure:4684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4684ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4685if test -z "$ac_err"; then
4686 rm -rf conftest*
4687 eval "ac_cv_header_$ac_safe=yes"
4688else
4689 echo "$ac_err" >&5
4690 echo "configure: failed program was:" >&5
4691 cat conftest.$ac_ext >&5
4692 rm -rf conftest*
4693 eval "ac_cv_header_$ac_safe=no"
4694fi
4695rm -f conftest*
4696fi
4697if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4698 echo "$ac_t""yes" 1>&6
4699 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4700 cat >> confdefs.h <<EOF
4701#define $ac_tr_hdr 1
4702EOF
4703
4704else
4705 echo "$ac_t""no" 1>&6
4706fi
4707done
4708
78434e59 4709for ac_hdr in machine/reg.h
5ee754fc
MK
4710do
4711ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4712echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4713echo "configure:4714: checking for $ac_hdr" >&5
5ee754fc
MK
4714if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716else
4717 cat > conftest.$ac_ext <<EOF
02d62932 4718#line 4719 "configure"
5ee754fc
MK
4719#include "confdefs.h"
4720#include <$ac_hdr>
4721EOF
4722ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4723{ (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4724ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4725if test -z "$ac_err"; then
4726 rm -rf conftest*
4727 eval "ac_cv_header_$ac_safe=yes"
4728else
4729 echo "$ac_err" >&5
4730 echo "configure: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 rm -rf conftest*
4733 eval "ac_cv_header_$ac_safe=no"
4734fi
4735rm -f conftest*
4736fi
4737if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4738 echo "$ac_t""yes" 1>&6
4739 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4740 cat >> confdefs.h <<EOF
4741#define $ac_tr_hdr 1
4742EOF
4743
4744else
4745 echo "$ac_t""no" 1>&6
4746fi
4747done
4748
78434e59 4749for ac_hdr in nlist.h
5ee754fc
MK
4750do
4751ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4752echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4753echo "configure:4754: checking for $ac_hdr" >&5
5ee754fc
MK
4754if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4755 echo $ac_n "(cached) $ac_c" 1>&6
4756else
4757 cat > conftest.$ac_ext <<EOF
02d62932 4758#line 4759 "configure"
5ee754fc
MK
4759#include "confdefs.h"
4760#include <$ac_hdr>
4761EOF
4762ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4763{ (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4764ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4765if test -z "$ac_err"; then
4766 rm -rf conftest*
4767 eval "ac_cv_header_$ac_safe=yes"
4768else
4769 echo "$ac_err" >&5
4770 echo "configure: failed program was:" >&5
4771 cat conftest.$ac_ext >&5
4772 rm -rf conftest*
4773 eval "ac_cv_header_$ac_safe=no"
4774fi
4775rm -f conftest*
4776fi
4777if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4778 echo "$ac_t""yes" 1>&6
4779 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4780 cat >> confdefs.h <<EOF
4781#define $ac_tr_hdr 1
4782EOF
4783
4784else
4785 echo "$ac_t""no" 1>&6
4786fi
4787done
4788
78434e59 4789for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4790do
4791ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4793echo "configure:4794: checking for $ac_hdr" >&5
5ee754fc
MK
4794if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795 echo $ac_n "(cached) $ac_c" 1>&6
4796else
4797 cat > conftest.$ac_ext <<EOF
02d62932 4798#line 4799 "configure"
5ee754fc
MK
4799#include "confdefs.h"
4800#include <$ac_hdr>
4801EOF
4802ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4803{ (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4804ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805if test -z "$ac_err"; then
4806 rm -rf conftest*
4807 eval "ac_cv_header_$ac_safe=yes"
4808else
4809 echo "$ac_err" >&5
4810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
4812 rm -rf conftest*
4813 eval "ac_cv_header_$ac_safe=no"
4814fi
4815rm -f conftest*
4816fi
4817if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818 echo "$ac_t""yes" 1>&6
4819 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820 cat >> confdefs.h <<EOF
4821#define $ac_tr_hdr 1
4822EOF
4823
4824else
4825 echo "$ac_t""no" 1>&6
4826fi
4827done
4828
a2f23071 4829for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4830do
4831ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4832echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4833echo "configure:4834: checking for $ac_hdr" >&5
5ee754fc
MK
4834if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4835 echo $ac_n "(cached) $ac_c" 1>&6
4836else
4837 cat > conftest.$ac_ext <<EOF
02d62932 4838#line 4839 "configure"
5ee754fc
MK
4839#include "confdefs.h"
4840#include <$ac_hdr>
4841EOF
4842ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4843{ (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4844ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4845if test -z "$ac_err"; then
4846 rm -rf conftest*
4847 eval "ac_cv_header_$ac_safe=yes"
4848else
4849 echo "$ac_err" >&5
4850 echo "configure: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 rm -rf conftest*
4853 eval "ac_cv_header_$ac_safe=no"
4854fi
4855rm -f conftest*
4856fi
4857if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4858 echo "$ac_t""yes" 1>&6
4859 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4860 cat >> confdefs.h <<EOF
4861#define $ac_tr_hdr 1
4862EOF
4863
4864else
4865 echo "$ac_t""no" 1>&6
4866fi
4867done
4868
78434e59 4869for ac_hdr in stddef.h
5ee754fc
MK
4870do
4871ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4872echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4873echo "configure:4874: checking for $ac_hdr" >&5
5ee754fc
MK
4874if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876else
4877 cat > conftest.$ac_ext <<EOF
02d62932 4878#line 4879 "configure"
5ee754fc
MK
4879#include "confdefs.h"
4880#include <$ac_hdr>
4881EOF
4882ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4883{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4884ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4885if test -z "$ac_err"; then
4886 rm -rf conftest*
4887 eval "ac_cv_header_$ac_safe=yes"
4888else
4889 echo "$ac_err" >&5
4890 echo "configure: failed program was:" >&5
4891 cat conftest.$ac_ext >&5
4892 rm -rf conftest*
4893 eval "ac_cv_header_$ac_safe=no"
4894fi
4895rm -f conftest*
4896fi
4897if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4898 echo "$ac_t""yes" 1>&6
4899 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4900 cat >> confdefs.h <<EOF
4901#define $ac_tr_hdr 1
4902EOF
4903
4904else
4905 echo "$ac_t""no" 1>&6
4906fi
4907done
4908
78434e59 4909for ac_hdr in stdlib.h
5ee754fc
MK
4910do
4911ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4912echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4913echo "configure:4914: checking for $ac_hdr" >&5
5ee754fc
MK
4914if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4915 echo $ac_n "(cached) $ac_c" 1>&6
4916else
4917 cat > conftest.$ac_ext <<EOF
02d62932 4918#line 4919 "configure"
5ee754fc
MK
4919#include "confdefs.h"
4920#include <$ac_hdr>
4921EOF
4922ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4923{ (eval echo configure:4924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4924ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4925if test -z "$ac_err"; then
4926 rm -rf conftest*
4927 eval "ac_cv_header_$ac_safe=yes"
4928else
4929 echo "$ac_err" >&5
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 rm -rf conftest*
4933 eval "ac_cv_header_$ac_safe=no"
4934fi
4935rm -f conftest*
4936fi
4937if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6
4939 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4940 cat >> confdefs.h <<EOF
4941#define $ac_tr_hdr 1
4942EOF
4943
4944else
4945 echo "$ac_t""no" 1>&6
4946fi
4947done
4948
78434e59 4949for ac_hdr in stdint.h
5ee754fc
MK
4950do
4951ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4952echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4953echo "configure:4954: checking for $ac_hdr" >&5
5ee754fc
MK
4954if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4955 echo $ac_n "(cached) $ac_c" 1>&6
4956else
4957 cat > conftest.$ac_ext <<EOF
02d62932 4958#line 4959 "configure"
5ee754fc
MK
4959#include "confdefs.h"
4960#include <$ac_hdr>
4961EOF
4962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4963{ (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4964ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4965if test -z "$ac_err"; then
4966 rm -rf conftest*
4967 eval "ac_cv_header_$ac_safe=yes"
4968else
4969 echo "$ac_err" >&5
4970 echo "configure: failed program was:" >&5
4971 cat conftest.$ac_ext >&5
4972 rm -rf conftest*
4973 eval "ac_cv_header_$ac_safe=no"
4974fi
4975rm -f conftest*
4976fi
4977if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4978 echo "$ac_t""yes" 1>&6
4979 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4980 cat >> confdefs.h <<EOF
4981#define $ac_tr_hdr 1
4982EOF
4983
4984else
4985 echo "$ac_t""no" 1>&6
4986fi
4987done
4988
78434e59 4989for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4990do
4991ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4993echo "configure:4994: checking for $ac_hdr" >&5
5ee754fc
MK
4994if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4995 echo $ac_n "(cached) $ac_c" 1>&6
4996else
4997 cat > conftest.$ac_ext <<EOF
02d62932 4998#line 4999 "configure"
5ee754fc
MK
4999#include "confdefs.h"
5000#include <$ac_hdr>
5001EOF
5002ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5003{ (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5004ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005if test -z "$ac_err"; then
5006 rm -rf conftest*
5007 eval "ac_cv_header_$ac_safe=yes"
5008else
5009 echo "$ac_err" >&5
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 rm -rf conftest*
5013 eval "ac_cv_header_$ac_safe=no"
5014fi
5015rm -f conftest*
5016fi
5017if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018 echo "$ac_t""yes" 1>&6
5019 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020 cat >> confdefs.h <<EOF
5021#define $ac_tr_hdr 1
5022EOF
5023
5024else
5025 echo "$ac_t""no" 1>&6
5026fi
5027done
5028
78434e59 5029for ac_hdr in sys/fault.h
5ee754fc
MK
5030do
5031ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5032echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5033echo "configure:5034: checking for $ac_hdr" >&5
5ee754fc
MK
5034if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5035 echo $ac_n "(cached) $ac_c" 1>&6
5036else
5037 cat > conftest.$ac_ext <<EOF
02d62932 5038#line 5039 "configure"
5ee754fc
MK
5039#include "confdefs.h"
5040#include <$ac_hdr>
5041EOF
5042ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5043{ (eval echo configure:5044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5044ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5045if test -z "$ac_err"; then
5046 rm -rf conftest*
5047 eval "ac_cv_header_$ac_safe=yes"
5048else
5049 echo "$ac_err" >&5
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 eval "ac_cv_header_$ac_safe=no"
5054fi
5055rm -f conftest*
5056fi
5057if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5060 cat >> confdefs.h <<EOF
5061#define $ac_tr_hdr 1
5062EOF
5063
5064else
5065 echo "$ac_t""no" 1>&6
5066fi
5067done
5068
78434e59 5069for ac_hdr in sys/file.h
5ee754fc
MK
5070do
5071ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5072echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5073echo "configure:5074: checking for $ac_hdr" >&5
5ee754fc
MK
5074if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5075 echo $ac_n "(cached) $ac_c" 1>&6
5076else
5077 cat > conftest.$ac_ext <<EOF
02d62932 5078#line 5079 "configure"
5ee754fc
MK
5079#include "confdefs.h"
5080#include <$ac_hdr>
5081EOF
5082ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5083{ (eval echo configure:5084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5084ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5085if test -z "$ac_err"; then
5086 rm -rf conftest*
5087 eval "ac_cv_header_$ac_safe=yes"
5088else
5089 echo "$ac_err" >&5
5090 echo "configure: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092 rm -rf conftest*
5093 eval "ac_cv_header_$ac_safe=no"
5094fi
5095rm -f conftest*
5096fi
5097if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5098 echo "$ac_t""yes" 1>&6
5099 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5100 cat >> confdefs.h <<EOF
5101#define $ac_tr_hdr 1
5102EOF
5103
5104else
5105 echo "$ac_t""no" 1>&6
5106fi
5107done
5108
78434e59 5109for ac_hdr in sys/filio.h
5ee754fc
MK
5110do
5111ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5112echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5113echo "configure:5114: checking for $ac_hdr" >&5
5ee754fc
MK
5114if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5115 echo $ac_n "(cached) $ac_c" 1>&6
5116else
5117 cat > conftest.$ac_ext <<EOF
02d62932 5118#line 5119 "configure"
5ee754fc
MK
5119#include "confdefs.h"
5120#include <$ac_hdr>
5121EOF
5122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5123{ (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5125if test -z "$ac_err"; then
5126 rm -rf conftest*
5127 eval "ac_cv_header_$ac_safe=yes"
5128else
5129 echo "$ac_err" >&5
5130 echo "configure: failed program was:" >&5
5131 cat conftest.$ac_ext >&5
5132 rm -rf conftest*
5133 eval "ac_cv_header_$ac_safe=no"
5134fi
5135rm -f conftest*
5136fi
5137if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5138 echo "$ac_t""yes" 1>&6
5139 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5140 cat >> confdefs.h <<EOF
5141#define $ac_tr_hdr 1
5142EOF
5143
5144else
5145 echo "$ac_t""no" 1>&6
5146fi
5147done
5148
78434e59 5149for ac_hdr in sys/ioctl.h
5ee754fc
MK
5150do
5151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5153echo "configure:5154: checking for $ac_hdr" >&5
5ee754fc
MK
5154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5156else
5157 cat > conftest.$ac_ext <<EOF
02d62932 5158#line 5159 "configure"
5ee754fc
MK
5159#include "confdefs.h"
5160#include <$ac_hdr>
5161EOF
5162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5163{ (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5165if test -z "$ac_err"; then
5166 rm -rf conftest*
5167 eval "ac_cv_header_$ac_safe=yes"
5168else
5169 echo "$ac_err" >&5
5170 echo "configure: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 rm -rf conftest*
5173 eval "ac_cv_header_$ac_safe=no"
5174fi
5175rm -f conftest*
5176fi
5177if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5178 echo "$ac_t""yes" 1>&6
5179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5180 cat >> confdefs.h <<EOF
5181#define $ac_tr_hdr 1
5182EOF
5183
5184else
5185 echo "$ac_t""no" 1>&6
5186fi
5187done
5188
78434e59 5189for ac_hdr in sys/param.h
5ee754fc
MK
5190do
5191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5193echo "configure:5194: checking for $ac_hdr" >&5
5ee754fc
MK
5194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 cat > conftest.$ac_ext <<EOF
02d62932 5198#line 5199 "configure"
5ee754fc
MK
5199#include "confdefs.h"
5200#include <$ac_hdr>
5201EOF
5202ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5203{ (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5205if test -z "$ac_err"; then
5206 rm -rf conftest*
5207 eval "ac_cv_header_$ac_safe=yes"
5208else
5209 echo "$ac_err" >&5
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5213 eval "ac_cv_header_$ac_safe=no"
5214fi
5215rm -f conftest*
5216fi
5217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5218 echo "$ac_t""yes" 1>&6
5219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5220 cat >> confdefs.h <<EOF
5221#define $ac_tr_hdr 1
5222EOF
5223
5224else
5225 echo "$ac_t""no" 1>&6
5226fi
5227done
5228
78434e59 5229for ac_hdr in sys/proc.h
5ee754fc
MK
5230do
5231ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5232echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5233echo "configure:5234: checking for $ac_hdr" >&5
5ee754fc
MK
5234if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5235 echo $ac_n "(cached) $ac_c" 1>&6
5236else
5237 cat > conftest.$ac_ext <<EOF
02d62932 5238#line 5239 "configure"
5ee754fc
MK
5239#include "confdefs.h"
5240#include <$ac_hdr>
5241EOF
5242ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5243{ (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5244ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5245if test -z "$ac_err"; then
5246 rm -rf conftest*
5247 eval "ac_cv_header_$ac_safe=yes"
5248else
5249 echo "$ac_err" >&5
5250 echo "configure: failed program was:" >&5
5251 cat conftest.$ac_ext >&5
5252 rm -rf conftest*
5253 eval "ac_cv_header_$ac_safe=no"
5254fi
5255rm -f conftest*
5256fi
5257if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5258 echo "$ac_t""yes" 1>&6
5259 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5260 cat >> confdefs.h <<EOF
5261#define $ac_tr_hdr 1
5262EOF
5263
5264else
5265 echo "$ac_t""no" 1>&6
5266fi
5267done
5268
78434e59 5269for ac_hdr in sys/procfs.h
5ee754fc
MK
5270do
5271ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5272echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5273echo "configure:5274: checking for $ac_hdr" >&5
5ee754fc
MK
5274if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5275 echo $ac_n "(cached) $ac_c" 1>&6
5276else
5277 cat > conftest.$ac_ext <<EOF
02d62932 5278#line 5279 "configure"
5ee754fc
MK
5279#include "confdefs.h"
5280#include <$ac_hdr>
5281EOF
5282ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5283{ (eval echo configure:5284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5284ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5285if test -z "$ac_err"; then
5286 rm -rf conftest*
5287 eval "ac_cv_header_$ac_safe=yes"
5288else
5289 echo "$ac_err" >&5
5290 echo "configure: failed program was:" >&5
5291 cat conftest.$ac_ext >&5
5292 rm -rf conftest*
5293 eval "ac_cv_header_$ac_safe=no"
5294fi
5295rm -f conftest*
5296fi
5297if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5298 echo "$ac_t""yes" 1>&6
5299 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5300 cat >> confdefs.h <<EOF
5301#define $ac_tr_hdr 1
5302EOF
5303
5304else
5305 echo "$ac_t""no" 1>&6
5306fi
5307done
5308
78434e59 5309for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5310do
5311ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5312echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5313echo "configure:5314: checking for $ac_hdr" >&5
5ee754fc
MK
5314if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5316else
5317 cat > conftest.$ac_ext <<EOF
02d62932 5318#line 5319 "configure"
5ee754fc
MK
5319#include "confdefs.h"
5320#include <$ac_hdr>
5321EOF
5322ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5323{ (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5324ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5325if test -z "$ac_err"; then
5326 rm -rf conftest*
5327 eval "ac_cv_header_$ac_safe=yes"
5328else
5329 echo "$ac_err" >&5
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5332 rm -rf conftest*
5333 eval "ac_cv_header_$ac_safe=no"
5334fi
5335rm -f conftest*
5336fi
5337if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5338 echo "$ac_t""yes" 1>&6
5339 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5340 cat >> confdefs.h <<EOF
5341#define $ac_tr_hdr 1
5342EOF
5343
5344else
5345 echo "$ac_t""no" 1>&6
5346fi
5347done
5348
78434e59 5349for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5350do
5351ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5352echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5353echo "configure:5354: checking for $ac_hdr" >&5
5ee754fc
MK
5354if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5355 echo $ac_n "(cached) $ac_c" 1>&6
5356else
5357 cat > conftest.$ac_ext <<EOF
02d62932 5358#line 5359 "configure"
5ee754fc
MK
5359#include "confdefs.h"
5360#include <$ac_hdr>
5361EOF
5362ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5363{ (eval echo configure:5364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5364ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5365if test -z "$ac_err"; then
5366 rm -rf conftest*
5367 eval "ac_cv_header_$ac_safe=yes"
5368else
5369 echo "$ac_err" >&5
5370 echo "configure: failed program was:" >&5
5371 cat conftest.$ac_ext >&5
5372 rm -rf conftest*
5373 eval "ac_cv_header_$ac_safe=no"
5374fi
5375rm -f conftest*
5376fi
5377if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5378 echo "$ac_t""yes" 1>&6
5379 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5380 cat >> confdefs.h <<EOF
5381#define $ac_tr_hdr 1
5382EOF
5383
5384else
5385 echo "$ac_t""no" 1>&6
5386fi
5387done
5388
78434e59 5389for ac_hdr in sys/select.h
5ee754fc
MK
5390do
5391ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5392echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5393echo "configure:5394: checking for $ac_hdr" >&5
5ee754fc
MK
5394if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396else
5397 cat > conftest.$ac_ext <<EOF
02d62932 5398#line 5399 "configure"
5ee754fc
MK
5399#include "confdefs.h"
5400#include <$ac_hdr>
5401EOF
5402ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5403{ (eval echo configure:5404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5404ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5405if test -z "$ac_err"; then
5406 rm -rf conftest*
5407 eval "ac_cv_header_$ac_safe=yes"
5408else
5409 echo "$ac_err" >&5
5410 echo "configure: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 rm -rf conftest*
5413 eval "ac_cv_header_$ac_safe=no"
5414fi
5415rm -f conftest*
5416fi
5417if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5418 echo "$ac_t""yes" 1>&6
5419 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5420 cat >> confdefs.h <<EOF
5421#define $ac_tr_hdr 1
5422EOF
5423
5424else
5425 echo "$ac_t""no" 1>&6
5426fi
5427done
5428
78434e59 5429for ac_hdr in sys/syscall.h
5ee754fc
MK
5430do
5431ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5432echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5433echo "configure:5434: checking for $ac_hdr" >&5
5ee754fc
MK
5434if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5435 echo $ac_n "(cached) $ac_c" 1>&6
5436else
5437 cat > conftest.$ac_ext <<EOF
02d62932 5438#line 5439 "configure"
5ee754fc
MK
5439#include "confdefs.h"
5440#include <$ac_hdr>
5441EOF
5442ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5443{ (eval echo configure:5444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5444ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5445if test -z "$ac_err"; then
5446 rm -rf conftest*
5447 eval "ac_cv_header_$ac_safe=yes"
5448else
5449 echo "$ac_err" >&5
5450 echo "configure: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452 rm -rf conftest*
5453 eval "ac_cv_header_$ac_safe=no"
5454fi
5455rm -f conftest*
5456fi
5457if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5458 echo "$ac_t""yes" 1>&6
5459 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5460 cat >> confdefs.h <<EOF
5461#define $ac_tr_hdr 1
5462EOF
5463
5464else
5465 echo "$ac_t""no" 1>&6
5466fi
5467done
5468
78434e59 5469for ac_hdr in sys/user.h
5ee754fc
MK
5470do
5471ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5472echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5473echo "configure:5474: checking for $ac_hdr" >&5
5ee754fc
MK
5474if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5475 echo $ac_n "(cached) $ac_c" 1>&6
5476else
5477 cat > conftest.$ac_ext <<EOF
02d62932 5478#line 5479 "configure"
5ee754fc
MK
5479#include "confdefs.h"
5480#include <$ac_hdr>
5481EOF
5482ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5483{ (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5484ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5485if test -z "$ac_err"; then
5486 rm -rf conftest*
5487 eval "ac_cv_header_$ac_safe=yes"
5488else
5489 echo "$ac_err" >&5
9608ab8b
MK
5490 echo "configure: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
5492 rm -rf conftest*
5ee754fc 5493 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5494fi
5495rm -f conftest*
5496fi
5ee754fc 5497if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5498 echo "$ac_t""yes" 1>&6
5499 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5500 cat >> confdefs.h <<EOF
5501#define $ac_tr_hdr 1
5502EOF
5ee754fc 5503
9608ab8b
MK
5504else
5505 echo "$ac_t""no" 1>&6
5506fi
5507done
5ee754fc 5508
78434e59 5509for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5510do
5511ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5512echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5513echo "configure:5514: checking for $ac_hdr" >&5
5ee754fc 5514if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516else
5ee754fc 5517 cat > conftest.$ac_ext <<EOF
02d62932 5518#line 5519 "configure"
9608ab8b 5519#include "confdefs.h"
5ee754fc 5520#include <$ac_hdr>
9608ab8b 5521EOF
5ee754fc 5522ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5523{ (eval echo configure:5524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5524ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5525if test -z "$ac_err"; then
9608ab8b 5526 rm -rf conftest*
5ee754fc 5527 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5528else
5ee754fc 5529 echo "$ac_err" >&5
9608ab8b
MK
5530 echo "configure: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 rm -rf conftest*
5ee754fc 5533 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5534fi
5535rm -f conftest*
9608ab8b 5536fi
5ee754fc 5537if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5538 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5539 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5540 cat >> confdefs.h <<EOF
5541#define $ac_tr_hdr 1
5542EOF
5543
9608ab8b
MK
5544else
5545 echo "$ac_t""no" 1>&6
5546fi
5ee754fc 5547done
9608ab8b 5548
78434e59 5549for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5550do
5551ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5552echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5553echo "configure:5554: checking for $ac_hdr" >&5
5ee754fc 5554if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5555 echo $ac_n "(cached) $ac_c" 1>&6
5556else
5ee754fc 5557 cat > conftest.$ac_ext <<EOF
02d62932 5558#line 5559 "configure"
9608ab8b 5559#include "confdefs.h"
5ee754fc 5560#include <$ac_hdr>
9608ab8b 5561EOF
5ee754fc 5562ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5563{ (eval echo configure:5564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5564ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5565if test -z "$ac_err"; then
9608ab8b 5566 rm -rf conftest*
5ee754fc 5567 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5568else
5ee754fc 5569 echo "$ac_err" >&5
9608ab8b
MK
5570 echo "configure: failed program was:" >&5
5571 cat conftest.$ac_ext >&5
5572 rm -rf conftest*
5ee754fc 5573 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5574fi
5575rm -f conftest*
9608ab8b 5576fi
5ee754fc 5577if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5578 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5579 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5580 cat >> confdefs.h <<EOF
5581#define $ac_tr_hdr 1
5582EOF
5583
9608ab8b
MK
5584else
5585 echo "$ac_t""no" 1>&6
5586fi
5ee754fc 5587done
9608ab8b 5588
78434e59
MK
5589for ac_hdr in unistd.h
5590do
5591ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5592echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5593echo "configure:5594: checking for $ac_hdr" >&5
78434e59
MK
5594if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5595 echo $ac_n "(cached) $ac_c" 1>&6
5596else
5597 cat > conftest.$ac_ext <<EOF
02d62932 5598#line 5599 "configure"
78434e59
MK
5599#include "confdefs.h"
5600#include <$ac_hdr>
5601EOF
5602ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5603{ (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5604ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5605if test -z "$ac_err"; then
5606 rm -rf conftest*
5607 eval "ac_cv_header_$ac_safe=yes"
5608else
5609 echo "$ac_err" >&5
5610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 rm -rf conftest*
5613 eval "ac_cv_header_$ac_safe=no"
5614fi
5615rm -f conftest*
5616fi
5617if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5618 echo "$ac_t""yes" 1>&6
5619 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5620 cat >> confdefs.h <<EOF
5621#define $ac_tr_hdr 1
5622EOF
5623
5624else
5625 echo "$ac_t""no" 1>&6
5626fi
5627done
5628
9608ab8b 5629
5ee754fc
MK
5630# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5631# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5632# think that we don't have <curses.h> if we're using GCC.
5633case $host_os in
5634 solaris2.[78])
5635 if test "$GCC" = yes; then
5636 cat >> confdefs.h <<\EOF
5637#define _MSE_INT_H 1
5638EOF
5639
5640 fi ;;
5641esac
5642for ac_hdr in curses.h ncurses.h term.h
5643do
5644ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5645echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5646echo "configure:5647: checking for $ac_hdr" >&5
5ee754fc 5647if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5648 echo $ac_n "(cached) $ac_c" 1>&6
5649else
5650 cat > conftest.$ac_ext <<EOF
02d62932 5651#line 5652 "configure"
c906108c 5652#include "confdefs.h"
5ee754fc 5653#include <$ac_hdr>
c906108c
SS
5654EOF
5655ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5656{ (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5657ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5658if test -z "$ac_err"; then
5659 rm -rf conftest*
5ee754fc 5660 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5661else
5662 echo "$ac_err" >&5
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -rf conftest*
5ee754fc 5666 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5667fi
5668rm -f conftest*
c906108c 5669fi
5ee754fc
MK
5670if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5671 echo "$ac_t""yes" 1>&6
5672 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5673 cat >> confdefs.h <<EOF
5674#define $ac_tr_hdr 1
c906108c 5675EOF
5ee754fc 5676
c906108c 5677else
5ee754fc 5678 echo "$ac_t""no" 1>&6
c906108c 5679fi
5ee754fc 5680done
c906108c
SS
5681
5682
5ee754fc
MK
5683# FIXME: kettenis/20030102: In most cases we include these
5684# unconditionally, so what's the point in checking these?
5685for ac_hdr in ctype.h time.h
c906108c
SS
5686do
5687ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5688echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5689echo "configure:5690: checking for $ac_hdr" >&5
c906108c
SS
5690if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5691 echo $ac_n "(cached) $ac_c" 1>&6
5692else
5693 cat > conftest.$ac_ext <<EOF
02d62932 5694#line 5695 "configure"
c906108c
SS
5695#include "confdefs.h"
5696#include <$ac_hdr>
5697EOF
5698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5699{ (eval echo configure:5700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5700ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5701if test -z "$ac_err"; then
5702 rm -rf conftest*
5703 eval "ac_cv_header_$ac_safe=yes"
5704else
5705 echo "$ac_err" >&5
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 rm -rf conftest*
5709 eval "ac_cv_header_$ac_safe=no"
5710fi
5711rm -f conftest*
5712fi
5713if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5714 echo "$ac_t""yes" 1>&6
5715 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5716 cat >> confdefs.h <<EOF
5717#define $ac_tr_hdr 1
5718EOF
5719
5720else
5721 echo "$ac_t""no" 1>&6
5722fi
5723done
5724
5ee754fc 5725
40a7debc 5726echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
02d62932 5727echo "configure:5728: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5728if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5729 echo $ac_n "(cached) $ac_c" 1>&6
5730else
5731 cat > conftest.$ac_ext <<EOF
02d62932 5732#line 5733 "configure"
40a7debc
EZ
5733#include "confdefs.h"
5734#include <sys/types.h>
5735#include <sys/stat.h>
5736int main() {
5737struct stat st; (void) st.st_blocks;
5738; return 0; }
5739EOF
02d62932 5740if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5741 rm -rf conftest*
5742 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5743else
5744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5746 rm -rf conftest*
5747 gdb_cv_have_struct_stat_with_st_blocks_member=no
5748fi
5749rm -f conftest*
5750fi
5751
5752echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5753if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5754 cat >> confdefs.h <<\EOF
5755#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5756EOF
5757
5758fi
b9362cc7
AC
5759# ------------------------- #
5760# Checks for declarations. #
5761# ------------------------- #
5762
5763for ac_func in getopt
5764do
5765 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5766echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
02d62932 5767echo "configure:5768: checking whether $ac_func is declared" >&5
b9362cc7
AC
5768if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5769 echo $ac_n "(cached) $ac_c" 1>&6
5770else
5771 cat > conftest.$ac_ext <<EOF
02d62932 5772#line 5773 "configure"
b9362cc7
AC
5773#include "confdefs.h"
5774#undef $ac_tr_decl
5775#define $ac_tr_decl 1
5776
5777
5778int main() {
5779#ifndef $ac_func
5780char *(*pfn) = (char *(*)) $ac_func ;
5781#endif
5782; return 0; }
5783EOF
02d62932 5784if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5785 rm -rf conftest*
5786 eval "gcc_cv_have_decl_$ac_func=yes"
5787else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
5791 eval "gcc_cv_have_decl_$ac_func=no"
5792fi
5793rm -f conftest*
5794fi
5795
5796if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5797 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5798#define $ac_tr_decl 1
5799EOF
5800
5801else
5802 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5803#define $ac_tr_decl 0
5804EOF
5805
5806fi
5807
5808done
5809if test x = y ; then
5810 cat >> confdefs.h <<\EOF
5811#define HAVE_DECL_GETOPT 1
5812EOF
5813fi
5814
5815
5ee754fc
MK
5816# ------------------ #
5817# Checks for types. #
5818# ------------------ #
5819
5820echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
02d62932 5821echo "configure:5822: checking return type of signal handlers" >&5
5ee754fc 5822if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5823 echo $ac_n "(cached) $ac_c" 1>&6
5824else
5825 cat > conftest.$ac_ext <<EOF
02d62932 5826#line 5827 "configure"
c906108c
SS
5827#include "confdefs.h"
5828#include <sys/types.h>
5ee754fc
MK
5829#include <signal.h>
5830#ifdef signal
5831#undef signal
c906108c 5832#endif
5ee754fc
MK
5833#ifdef __cplusplus
5834extern "C" void (*signal (int, void (*)(int)))(int);
5835#else
5836void (*signal ()) ();
c906108c
SS
5837#endif
5838
5ee754fc
MK
5839int main() {
5840int i;
5841; return 0; }
c906108c 5842EOF
02d62932 5843if { (eval echo configure:5844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5844 rm -rf conftest*
5ee754fc 5845 ac_cv_type_signal=void
c906108c 5846else
5ee754fc
MK
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
c906108c 5849 rm -rf conftest*
5ee754fc 5850 ac_cv_type_signal=int
c906108c
SS
5851fi
5852rm -f conftest*
c906108c
SS
5853fi
5854
5ee754fc
MK
5855echo "$ac_t""$ac_cv_type_signal" 1>&6
5856cat >> confdefs.h <<EOF
5857#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5858EOF
5859
c906108c
SS
5860
5861
5ee754fc
MK
5862# ------------------------------------- #
5863# Checks for compiler characteristics. #
5864# ------------------------------------- #
5865
c906108c 5866echo $ac_n "checking for working const""... $ac_c" 1>&6
02d62932 5867echo "configure:5868: checking for working const" >&5
c906108c
SS
5868if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5869 echo $ac_n "(cached) $ac_c" 1>&6
5870else
5871 cat > conftest.$ac_ext <<EOF
02d62932 5872#line 5873 "configure"
c906108c
SS
5873#include "confdefs.h"
5874
5875int main() {
5876
5877/* Ultrix mips cc rejects this. */
5878typedef int charset[2]; const charset x;
5879/* SunOS 4.1.1 cc rejects this. */
5880char const *const *ccp;
5881char **p;
5882/* NEC SVR4.0.2 mips cc rejects this. */
5883struct point {int x, y;};
5884static struct point const zero = {0,0};
5885/* AIX XL C 1.02.0.0 rejects this.
5886 It does not let you subtract one const X* pointer from another in an arm
5887 of an if-expression whose if-part is not a constant expression */
5888const char *g = "string";
5889ccp = &g + (g ? g-g : 0);
5890/* HPUX 7.0 cc rejects these. */
5891++ccp;
5892p = (char**) ccp;
5893ccp = (char const *const *) p;
5894{ /* SCO 3.2v4 cc rejects this. */
5895 char *t;
5896 char const *s = 0 ? (char *) 0 : (char const *) 0;
5897
5898 *t++ = 0;
5899}
5900{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5901 int x[] = {25, 17};
5902 const int *foo = &x[0];
5903 ++foo;
5904}
5905{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5906 typedef const int *iptr;
5907 iptr p = 0;
5908 ++p;
5909}
5910{ /* AIX XL C 1.02.0.0 rejects this saying
5911 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5912 struct s { int j; const int *ap[3]; };
5913 struct s *b; b->j = 5;
5914}
5915{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5916 const int foo = 10;
5917}
5918
5919; return 0; }
5920EOF
02d62932 5921if { (eval echo configure:5922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5922 rm -rf conftest*
5923 ac_cv_c_const=yes
5924else
5925 echo "configure: failed program was:" >&5
5926 cat conftest.$ac_ext >&5
5927 rm -rf conftest*
5928 ac_cv_c_const=no
5929fi
5930rm -f conftest*
5931fi
5932
5933echo "$ac_t""$ac_cv_c_const" 1>&6
5934if test $ac_cv_c_const = no; then
5935 cat >> confdefs.h <<\EOF
5936#define const
5937EOF
5938
5939fi
5940
bce58c09 5941echo $ac_n "checking for inline""... $ac_c" 1>&6
02d62932 5942echo "configure:5943: checking for inline" >&5
bce58c09
JB
5943if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5944 echo $ac_n "(cached) $ac_c" 1>&6
5945else
5946 ac_cv_c_inline=no
5947for ac_kw in inline __inline__ __inline; do
5948 cat > conftest.$ac_ext <<EOF
02d62932 5949#line 5950 "configure"
bce58c09
JB
5950#include "confdefs.h"
5951
5952int main() {
5953} $ac_kw foo() {
5954; return 0; }
5955EOF
02d62932 5956if { (eval echo configure:5957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5957 rm -rf conftest*
5958 ac_cv_c_inline=$ac_kw; break
5959else
5960 echo "configure: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5962fi
5963rm -f conftest*
5964done
5965
5966fi
5967
5968echo "$ac_t""$ac_cv_c_inline" 1>&6
5969case "$ac_cv_c_inline" in
5970 inline | yes) ;;
5971 no) cat >> confdefs.h <<\EOF
5972#define inline
5973EOF
5974 ;;
5975 *) cat >> confdefs.h <<EOF
5976#define inline $ac_cv_c_inline
5977EOF
5978 ;;
5979esac
5980
c906108c 5981
5ee754fc
MK
5982# ------------------------------ #
5983# Checks for library functions. #
5984# ------------------------------ #
5985
46711df8
MK
5986# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5987# for constant arguments. Useless!
5988echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
02d62932 5989echo "configure:5990: checking for working alloca.h" >&5
46711df8
MK
5990if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992else
5993 cat > conftest.$ac_ext <<EOF
02d62932 5994#line 5995 "configure"
46711df8
MK
5995#include "confdefs.h"
5996#include <alloca.h>
5997int main() {
5998char *p = alloca(2 * sizeof(int));
5999; return 0; }
6000EOF
02d62932 6001if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6002 rm -rf conftest*
6003 ac_cv_header_alloca_h=yes
6004else
6005 echo "configure: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
6007 rm -rf conftest*
6008 ac_cv_header_alloca_h=no
6009fi
6010rm -f conftest*
6011fi
6012
6013echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6014if test $ac_cv_header_alloca_h = yes; then
6015 cat >> confdefs.h <<\EOF
6016#define HAVE_ALLOCA_H 1
6017EOF
6018
6019fi
6020
6021echo $ac_n "checking for alloca""... $ac_c" 1>&6
02d62932 6022echo "configure:6023: checking for alloca" >&5
46711df8
MK
6023if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6024 echo $ac_n "(cached) $ac_c" 1>&6
6025else
6026 cat > conftest.$ac_ext <<EOF
02d62932 6027#line 6028 "configure"
46711df8
MK
6028#include "confdefs.h"
6029
6030#ifdef __GNUC__
6031# define alloca __builtin_alloca
6032#else
6033# ifdef _MSC_VER
6034# include <malloc.h>
6035# define alloca _alloca
6036# else
6037# if HAVE_ALLOCA_H
6038# include <alloca.h>
6039# else
6040# ifdef _AIX
6041 #pragma alloca
6042# else
6043# ifndef alloca /* predefined by HP cc +Olibcalls */
6044char *alloca ();
6045# endif
6046# endif
6047# endif
6048# endif
6049#endif
6050
6051int main() {
6052char *p = (char *) alloca(1);
6053; return 0; }
6054EOF
02d62932 6055if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6056 rm -rf conftest*
6057 ac_cv_func_alloca_works=yes
6058else
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 rm -rf conftest*
6062 ac_cv_func_alloca_works=no
6063fi
6064rm -f conftest*
6065fi
6066
6067echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6068if test $ac_cv_func_alloca_works = yes; then
6069 cat >> confdefs.h <<\EOF
6070#define HAVE_ALLOCA 1
6071EOF
6072
6073fi
6074
6075if test $ac_cv_func_alloca_works = no; then
6076 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6077 # that cause trouble. Some versions do not even contain alloca or
6078 # contain a buggy version. If you still want to use their alloca,
6079 # use ar to extract alloca.o from them instead of compiling alloca.c.
6080 ALLOCA=alloca.${ac_objext}
6081 cat >> confdefs.h <<\EOF
6082#define C_ALLOCA 1
6083EOF
6084
6085
6086echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
02d62932 6087echo "configure:6088: checking whether alloca needs Cray hooks" >&5
46711df8
MK
6088if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6089 echo $ac_n "(cached) $ac_c" 1>&6
6090else
6091 cat > conftest.$ac_ext <<EOF
02d62932 6092#line 6093 "configure"
46711df8
MK
6093#include "confdefs.h"
6094#if defined(CRAY) && ! defined(CRAY2)
6095webecray
6096#else
6097wenotbecray
6098#endif
6099
6100EOF
6101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6102 egrep "webecray" >/dev/null 2>&1; then
6103 rm -rf conftest*
6104 ac_cv_os_cray=yes
6105else
6106 rm -rf conftest*
6107 ac_cv_os_cray=no
6108fi
6109rm -f conftest*
6110
6111fi
6112
6113echo "$ac_t""$ac_cv_os_cray" 1>&6
6114if test $ac_cv_os_cray = yes; then
6115for ac_func in _getb67 GETB67 getb67; do
6116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6117echo "configure:6118: checking for $ac_func" >&5
46711df8
MK
6118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6119 echo $ac_n "(cached) $ac_c" 1>&6
6120else
6121 cat > conftest.$ac_ext <<EOF
02d62932 6122#line 6123 "configure"
46711df8
MK
6123#include "confdefs.h"
6124/* System header to define __stub macros and hopefully few prototypes,
6125 which can conflict with char $ac_func(); below. */
6126#include <assert.h>
6127/* Override any gcc2 internal prototype to avoid an error. */
6128/* We use char because int might match the return type of a gcc2
6129 builtin and then its argument prototype would still apply. */
6130char $ac_func();
6131
6132int main() {
6133
6134/* The GNU C library defines this for functions which it implements
6135 to always fail with ENOSYS. Some functions are actually named
6136 something starting with __ and the normal name is an alias. */
6137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6138choke me
6139#else
6140$ac_func();
6141#endif
6142
6143; return 0; }
6144EOF
02d62932 6145if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6146 rm -rf conftest*
6147 eval "ac_cv_func_$ac_func=yes"
6148else
6149 echo "configure: failed program was:" >&5
6150 cat conftest.$ac_ext >&5
6151 rm -rf conftest*
6152 eval "ac_cv_func_$ac_func=no"
6153fi
6154rm -f conftest*
6155fi
6156
6157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6158 echo "$ac_t""yes" 1>&6
6159 cat >> confdefs.h <<EOF
6160#define CRAY_STACKSEG_END $ac_func
6161EOF
6162
6163 break
6164else
6165 echo "$ac_t""no" 1>&6
6166fi
6167
6168done
6169fi
6170
6171echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
02d62932 6172echo "configure:6173: checking stack direction for C alloca" >&5
46711df8
MK
6173if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6174 echo $ac_n "(cached) $ac_c" 1>&6
6175else
6176 if test "$cross_compiling" = yes; then
6177 ac_cv_c_stack_direction=0
6178else
6179 cat > conftest.$ac_ext <<EOF
02d62932 6180#line 6181 "configure"
46711df8
MK
6181#include "confdefs.h"
6182find_stack_direction ()
6183{
6184 static char *addr = 0;
6185 auto char dummy;
6186 if (addr == 0)
6187 {
6188 addr = &dummy;
6189 return find_stack_direction ();
6190 }
6191 else
6192 return (&dummy > addr) ? 1 : -1;
6193}
6194main ()
6195{
6196 exit (find_stack_direction() < 0);
6197}
6198EOF
02d62932 6199if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6200then
6201 ac_cv_c_stack_direction=1
6202else
6203 echo "configure: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 rm -fr conftest*
6206 ac_cv_c_stack_direction=-1
6207fi
6208rm -fr conftest*
6209fi
6210
6211fi
6212
6213echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6214cat >> confdefs.h <<EOF
6215#define STACK_DIRECTION $ac_cv_c_stack_direction
6216EOF
6217
6218fi
6219
d836ee13 6220for ac_hdr in unistd.h
97bf5e38
MK
6221do
6222ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6223echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 6224echo "configure:6225: checking for $ac_hdr" >&5
74c1b268
AC
6225if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6226 echo $ac_n "(cached) $ac_c" 1>&6
6227else
6228 cat > conftest.$ac_ext <<EOF
02d62932 6229#line 6230 "configure"
74c1b268 6230#include "confdefs.h"
97bf5e38 6231#include <$ac_hdr>
74c1b268
AC
6232EOF
6233ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 6234{ (eval echo configure:6235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6235ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6236if test -z "$ac_err"; then
6237 rm -rf conftest*
6238 eval "ac_cv_header_$ac_safe=yes"
6239else
6240 echo "$ac_err" >&5
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -rf conftest*
6244 eval "ac_cv_header_$ac_safe=no"
6245fi
6246rm -f conftest*
6247fi
6248if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6249 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6250 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6251 cat >> confdefs.h <<EOF
6252#define $ac_tr_hdr 1
74c1b268 6253EOF
97bf5e38 6254
74c1b268
AC
6255else
6256 echo "$ac_t""no" 1>&6
6257fi
97bf5e38 6258done
74c1b268 6259
97bf5e38
MK
6260for ac_func in getpagesize
6261do
6262echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6263echo "configure:6264: checking for $ac_func" >&5
97bf5e38 6264if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6265 echo $ac_n "(cached) $ac_c" 1>&6
6266else
6267 cat > conftest.$ac_ext <<EOF
02d62932 6268#line 6269 "configure"
74c1b268
AC
6269#include "confdefs.h"
6270/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6271 which can conflict with char $ac_func(); below. */
74c1b268
AC
6272#include <assert.h>
6273/* Override any gcc2 internal prototype to avoid an error. */
6274/* We use char because int might match the return type of a gcc2
6275 builtin and then its argument prototype would still apply. */
97bf5e38 6276char $ac_func();
74c1b268
AC
6277
6278int main() {
6279
6280/* The GNU C library defines this for functions which it implements
6281 to always fail with ENOSYS. Some functions are actually named
6282 something starting with __ and the normal name is an alias. */
97bf5e38 6283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6284choke me
6285#else
97bf5e38 6286$ac_func();
74c1b268
AC
6287#endif
6288
6289; return 0; }
6290EOF
02d62932 6291if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6292 rm -rf conftest*
97bf5e38 6293 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6294else
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6297 rm -rf conftest*
97bf5e38 6298 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6299fi
6300rm -f conftest*
6301fi
6302
97bf5e38 6303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6304 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6306 cat >> confdefs.h <<EOF
6307#define $ac_tr_func 1
6308EOF
6309
74c1b268
AC
6310else
6311 echo "$ac_t""no" 1>&6
6312fi
97bf5e38 6313done
74c1b268 6314
97bf5e38 6315echo $ac_n "checking for working mmap""... $ac_c" 1>&6
02d62932 6316echo "configure:6317: checking for working mmap" >&5
97bf5e38
MK
6317if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6318 echo $ac_n "(cached) $ac_c" 1>&6
6319else
6320 if test "$cross_compiling" = yes; then
6321 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6322else
6323 cat > conftest.$ac_ext <<EOF
02d62932 6324#line 6325 "configure"
74c1b268 6325#include "confdefs.h"
97bf5e38
MK
6326
6327/* Thanks to Mike Haertel and Jim Avera for this test.
6328 Here is a matrix of mmap possibilities:
6329 mmap private not fixed
6330 mmap private fixed at somewhere currently unmapped
6331 mmap private fixed at somewhere already mapped
6332 mmap shared not fixed
6333 mmap shared fixed at somewhere currently unmapped
6334 mmap shared fixed at somewhere already mapped
6335 For private mappings, we should verify that changes cannot be read()
6336 back from the file, nor mmap's back from the file at a different
6337 address. (There have been systems where private was not correctly
6338 implemented like the infamous i386 svr4.0, and systems where the
6339 VM page cache was not coherent with the filesystem buffer cache
6340 like early versions of FreeBSD and possibly contemporary NetBSD.)
6341 For shared mappings, we should conversely verify that changes get
6342 propogated back to all the places they're supposed to be.
6343
6344 Grep wants private fixed already mapped.
6345 The main things grep needs to know about mmap are:
6346 * does it exist and is it safe to write into the mmap'd area
6347 * how to use it (BSD variants) */
74c1b268 6348#include <sys/types.h>
97bf5e38
MK
6349#include <fcntl.h>
6350#include <sys/mman.h>
6351
6352/* This mess was copied from the GNU getpagesize.h. */
6353#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6354# ifdef HAVE_UNISTD_H
6355# include <unistd.h>
6356# endif
97bf5e38
MK
6357
6358/* Assume that all systems that can run configure have sys/param.h. */
6359# ifndef HAVE_SYS_PARAM_H
6360# define HAVE_SYS_PARAM_H 1
6361# endif
6362
6363# ifdef _SC_PAGESIZE
6364# define getpagesize() sysconf(_SC_PAGESIZE)
6365# else /* no _SC_PAGESIZE */
6366# ifdef HAVE_SYS_PARAM_H
6367# include <sys/param.h>
6368# ifdef EXEC_PAGESIZE
6369# define getpagesize() EXEC_PAGESIZE
6370# else /* no EXEC_PAGESIZE */
6371# ifdef NBPG
6372# define getpagesize() NBPG * CLSIZE
6373# ifndef CLSIZE
6374# define CLSIZE 1
6375# endif /* no CLSIZE */
6376# else /* no NBPG */
6377# ifdef NBPC
6378# define getpagesize() NBPC
6379# else /* no NBPC */
6380# ifdef PAGESIZE
6381# define getpagesize() PAGESIZE
6382# endif /* PAGESIZE */
6383# endif /* no NBPC */
6384# endif /* no NBPG */
6385# endif /* no EXEC_PAGESIZE */
6386# else /* no HAVE_SYS_PARAM_H */
6387# define getpagesize() 8192 /* punt totally */
6388# endif /* no HAVE_SYS_PARAM_H */
6389# endif /* no _SC_PAGESIZE */
6390
6391#endif /* no HAVE_GETPAGESIZE */
6392
74c1b268 6393#ifdef __cplusplus
97bf5e38 6394extern "C" { void *malloc(unsigned); }
74c1b268 6395#else
97bf5e38 6396char *malloc();
74c1b268 6397#endif
74c1b268 6398
97bf5e38
MK
6399int
6400main()
6401{
6402 char *data, *data2, *data3;
6403 int i, pagesize;
6404 int fd;
74c1b268 6405
97bf5e38 6406 pagesize = getpagesize();
74c1b268 6407
97bf5e38
MK
6408 /*
6409 * First, make a file with some known garbage in it.
6410 */
6411 data = malloc(pagesize);
6412 if (!data)
6413 exit(1);
6414 for (i = 0; i < pagesize; ++i)
6415 *(data + i) = rand();
6416 umask(0);
6417 fd = creat("conftestmmap", 0600);
6418 if (fd < 0)
6419 exit(1);
6420 if (write(fd, data, pagesize) != pagesize)
6421 exit(1);
6422 close(fd);
74c1b268 6423
97bf5e38
MK
6424 /*
6425 * Next, try to mmap the file at a fixed address which
6426 * already has something else allocated at it. If we can,
6427 * also make sure that we see the same garbage.
6428 */
6429 fd = open("conftestmmap", O_RDWR);
6430 if (fd < 0)
6431 exit(1);
6432 data2 = malloc(2 * pagesize);
6433 if (!data2)
6434 exit(1);
6435 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6436 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6437 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6438 exit(1);
6439 for (i = 0; i < pagesize; ++i)
6440 if (*(data + i) != *(data2 + i))
6441 exit(1);
74c1b268 6442
97bf5e38
MK
6443 /*
6444 * Finally, make sure that changes to the mapped area
6445 * do not percolate back to the file as seen by read().
6446 * (This is a bug on some variants of i386 svr4.0.)
6447 */
6448 for (i = 0; i < pagesize; ++i)
6449 *(data2 + i) = *(data2 + i) + 1;
6450 data3 = malloc(pagesize);
6451 if (!data3)
6452 exit(1);
6453 if (read(fd, data3, pagesize) != pagesize)
6454 exit(1);
6455 for (i = 0; i < pagesize; ++i)
6456 if (*(data + i) != *(data3 + i))
6457 exit(1);
6458 close(fd);
6459 unlink("conftestmmap");
6460 exit(0);
74c1b268 6461}
97bf5e38 6462
74c1b268 6463EOF
02d62932 6464if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6465then
97bf5e38 6466 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6467else
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
6470 rm -fr conftest*
97bf5e38 6471 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6472fi
6473rm -fr conftest*
6474fi
6475
6476fi
6477
97bf5e38
MK
6478echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6479if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6480 cat >> confdefs.h <<\EOF
97bf5e38 6481#define HAVE_MMAP 1
74c1b268
AC
6482EOF
6483
6484fi
6485
97bf5e38 6486echo $ac_n "checking for pid_t""... $ac_c" 1>&6
02d62932 6487echo "configure:6488: checking for pid_t" >&5
97bf5e38 6488if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6489 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6490else
6491 cat > conftest.$ac_ext <<EOF
02d62932 6492#line 6493 "configure"
0200359f 6493#include "confdefs.h"
97bf5e38
MK
6494#include <sys/types.h>
6495#if STDC_HEADERS
6496#include <stdlib.h>
6497#include <stddef.h>
0200359f 6498#endif
0200359f 6499EOF
97bf5e38
MK
6500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6501 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6502 rm -rf conftest*
6503 ac_cv_type_pid_t=yes
0200359f 6504else
97bf5e38
MK
6505 rm -rf conftest*
6506 ac_cv_type_pid_t=no
0200359f 6507fi
97bf5e38 6508rm -f conftest*
0200359f
MK
6509
6510fi
97bf5e38
MK
6511echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6512if test $ac_cv_type_pid_t = no; then
0200359f 6513 cat >> confdefs.h <<\EOF
97bf5e38 6514#define pid_t int
0200359f
MK
6515EOF
6516
6517fi
6518
97bf5e38
MK
6519ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6520echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
02d62932 6521echo "configure:6522: checking for vfork.h" >&5
97bf5e38 6522if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6523 echo $ac_n "(cached) $ac_c" 1>&6
6524else
6525 cat > conftest.$ac_ext <<EOF
02d62932 6526#line 6527 "configure"
72473524 6527#include "confdefs.h"
97bf5e38 6528#include <vfork.h>
72473524 6529EOF
97bf5e38 6530ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 6531{ (eval echo configure:6532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6532ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6533if test -z "$ac_err"; then
72473524 6534 rm -rf conftest*
97bf5e38 6535 eval "ac_cv_header_$ac_safe=yes"
72473524 6536else
97bf5e38 6537 echo "$ac_err" >&5
72473524
DJ
6538 echo "configure: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6540 rm -rf conftest*
97bf5e38 6541 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6542fi
6543rm -f conftest*
6544fi
97bf5e38
MK
6545if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6546 echo "$ac_t""yes" 1>&6
72473524 6547 cat >> confdefs.h <<\EOF
97bf5e38 6548#define HAVE_VFORK_H 1
72473524
DJ
6549EOF
6550
97bf5e38
MK
6551else
6552 echo "$ac_t""no" 1>&6
72473524 6553fi
c906108c 6554
97bf5e38 6555echo $ac_n "checking for working vfork""... $ac_c" 1>&6
02d62932 6556echo "configure:6557: checking for working vfork" >&5
97bf5e38
MK
6557if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6558 echo $ac_n "(cached) $ac_c" 1>&6
6559else
6560 if test "$cross_compiling" = yes; then
6561 echo $ac_n "checking for vfork""... $ac_c" 1>&6
02d62932 6562echo "configure:6563: checking for vfork" >&5
97bf5e38 6563if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6564 echo $ac_n "(cached) $ac_c" 1>&6
6565else
6566 cat > conftest.$ac_ext <<EOF
02d62932 6567#line 6568 "configure"
2b2d558c 6568#include "confdefs.h"
97bf5e38
MK
6569/* System header to define __stub macros and hopefully few prototypes,
6570 which can conflict with char vfork(); below. */
6571#include <assert.h>
6572/* Override any gcc2 internal prototype to avoid an error. */
6573/* We use char because int might match the return type of a gcc2
6574 builtin and then its argument prototype would still apply. */
6575char vfork();
2b2d558c
MK
6576
6577int main() {
97bf5e38
MK
6578
6579/* The GNU C library defines this for functions which it implements
6580 to always fail with ENOSYS. Some functions are actually named
6581 something starting with __ and the normal name is an alias. */
6582#if defined (__stub_vfork) || defined (__stub___vfork)
6583choke me
6584#else
6585vfork();
6586#endif
6587
2b2d558c
MK
6588; return 0; }
6589EOF
02d62932 6590if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6591 rm -rf conftest*
97bf5e38 6592 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6593else
6594 echo "configure: failed program was:" >&5
6595 cat conftest.$ac_ext >&5
6596 rm -rf conftest*
97bf5e38 6597 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6598fi
6599rm -f conftest*
6600fi
6601
97bf5e38
MK
6602if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6603 echo "$ac_t""yes" 1>&6
6604 :
6605else
6606 echo "$ac_t""no" 1>&6
2b2d558c
MK
6607fi
6608
97bf5e38 6609ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6610else
6611 cat > conftest.$ac_ext <<EOF
02d62932 6612#line 6613 "configure"
7dfa765c 6613#include "confdefs.h"
97bf5e38
MK
6614/* Thanks to Paul Eggert for this test. */
6615#include <stdio.h>
6616#include <sys/types.h>
6617#include <sys/stat.h>
6618#ifdef HAVE_UNISTD_H
6619#include <unistd.h>
6620#endif
6621#ifdef HAVE_VFORK_H
6622#include <vfork.h>
6623#endif
6624/* On some sparc systems, changes by the child to local and incoming
6625 argument registers are propagated back to the parent.
6626 The compiler is told about this with #include <vfork.h>,
6627 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6628 Test for this by using a static variable whose address
6629 is put into a register that is clobbered by the vfork. */
6630static
6631#ifdef __cplusplus
6632sparc_address_test (int arg)
6633#else
6634sparc_address_test (arg) int arg;
6635#endif
6636{
6637 static pid_t child;
6638 if (!child) {
6639 child = vfork ();
6640 if (child < 0) {
6641 perror ("vfork");
6642 _exit(2);
6643 }
6644 if (!child) {
6645 arg = getpid();
6646 write(-1, "", 0);
6647 _exit (arg);
6648 }
6649 }
6650}
6651main() {
6652 pid_t parent = getpid ();
6653 pid_t child;
7dfa765c 6654
97bf5e38 6655 sparc_address_test ();
7dfa765c 6656
97bf5e38 6657 child = vfork ();
7dfa765c 6658
97bf5e38
MK
6659 if (child == 0) {
6660 /* Here is another test for sparc vfork register problems.
6661 This test uses lots of local variables, at least
6662 as many local variables as main has allocated so far
6663 including compiler temporaries. 4 locals are enough for
6664 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6665 A buggy compiler should reuse the register of parent
6666 for one of the local variables, since it will think that
6667 parent can't possibly be used any more in this routine.
6668 Assigning to the local variable will thus munge parent
6669 in the parent process. */
6670 pid_t
6671 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6672 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6673 /* Convince the compiler that p..p7 are live; otherwise, it might
6674 use the same hardware register for all 8 local variables. */
6675 if (p != p1 || p != p2 || p != p3 || p != p4
6676 || p != p5 || p != p6 || p != p7)
6677 _exit(1);
7dfa765c 6678
97bf5e38
MK
6679 /* On some systems (e.g. IRIX 3.3),
6680 vfork doesn't separate parent from child file descriptors.
6681 If the child closes a descriptor before it execs or exits,
6682 this munges the parent's descriptor as well.
6683 Test for this by closing stdout in the child. */
6684 _exit(close(fileno(stdout)) != 0);
6685 } else {
6686 int status;
6687 struct stat st;
64bb1671 6688
97bf5e38
MK
6689 while (wait(&status) != child)
6690 ;
6691 exit(
6692 /* Was there some problem with vforking? */
6693 child < 0
64bb1671 6694
97bf5e38
MK
6695 /* Did the child fail? (This shouldn't happen.) */
6696 || status
64bb1671 6697
97bf5e38
MK
6698 /* Did the vfork/compiler bug occur? */
6699 || parent != getpid()
6700
6701 /* Did the file descriptor bug occur? */
6702 || fstat(fileno(stdout), &st) != 0
6703 );
6704 }
6705}
5c44784c 6706EOF
02d62932 6707if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6708then
6709 ac_cv_func_vfork_works=yes
5c44784c
JM
6710else
6711 echo "configure: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
97bf5e38
MK
6713 rm -fr conftest*
6714 ac_cv_func_vfork_works=no
5c44784c 6715fi
97bf5e38 6716rm -fr conftest*
5c44784c
JM
6717fi
6718
0afdd437
MK
6719fi
6720
97bf5e38
MK
6721echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6722if test $ac_cv_func_vfork_works = no; then
0afdd437 6723 cat >> confdefs.h <<\EOF
97bf5e38 6724#define vfork fork
0afdd437
MK
6725EOF
6726
6727fi
6728
97bf5e38
MK
6729for ac_func in canonicalize_file_name realpath
6730do
6731echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6732echo "configure:6733: checking for $ac_func" >&5
97bf5e38 6733if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6734 echo $ac_n "(cached) $ac_c" 1>&6
6735else
6736 cat > conftest.$ac_ext <<EOF
02d62932 6737#line 6738 "configure"
7e89e357 6738#include "confdefs.h"
97bf5e38
MK
6739/* System header to define __stub macros and hopefully few prototypes,
6740 which can conflict with char $ac_func(); below. */
6741#include <assert.h>
6742/* Override any gcc2 internal prototype to avoid an error. */
6743/* We use char because int might match the return type of a gcc2
6744 builtin and then its argument prototype would still apply. */
6745char $ac_func();
6746
7e89e357 6747int main() {
97bf5e38
MK
6748
6749/* The GNU C library defines this for functions which it implements
6750 to always fail with ENOSYS. Some functions are actually named
6751 something starting with __ and the normal name is an alias. */
6752#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6753choke me
6754#else
6755$ac_func();
6756#endif
6757
7e89e357
JT
6758; return 0; }
6759EOF
02d62932 6760if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6761 rm -rf conftest*
97bf5e38 6762 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6763else
6764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6766 rm -rf conftest*
97bf5e38 6767 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6768fi
6769rm -f conftest*
6770fi
6771
97bf5e38
MK
6772if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6773 echo "$ac_t""yes" 1>&6
6774 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6775 cat >> confdefs.h <<EOF
6776#define $ac_tr_func 1
7e89e357 6777EOF
97bf5e38
MK
6778
6779else
6780 echo "$ac_t""no" 1>&6
7e89e357 6781fi
97bf5e38 6782done
7e89e357 6783
97bf5e38 6784for ac_func in poll
7be570e7
JM
6785do
6786echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6787echo "configure:6788: checking for $ac_func" >&5
7be570e7
JM
6788if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6789 echo $ac_n "(cached) $ac_c" 1>&6
6790else
6791 cat > conftest.$ac_ext <<EOF
02d62932 6792#line 6793 "configure"
7be570e7
JM
6793#include "confdefs.h"
6794/* System header to define __stub macros and hopefully few prototypes,
6795 which can conflict with char $ac_func(); below. */
6796#include <assert.h>
6797/* Override any gcc2 internal prototype to avoid an error. */
6798/* We use char because int might match the return type of a gcc2
6799 builtin and then its argument prototype would still apply. */
6800char $ac_func();
6801
6802int main() {
6803
6804/* The GNU C library defines this for functions which it implements
6805 to always fail with ENOSYS. Some functions are actually named
6806 something starting with __ and the normal name is an alias. */
6807#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6808choke me
6809#else
6810$ac_func();
6811#endif
6812
6813; return 0; }
6814EOF
02d62932 6815if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6816 rm -rf conftest*
6817 eval "ac_cv_func_$ac_func=yes"
6818else
6819 echo "configure: failed program was:" >&5
6820 cat conftest.$ac_ext >&5
6821 rm -rf conftest*
6822 eval "ac_cv_func_$ac_func=no"
6823fi
6824rm -f conftest*
6825fi
6826
6827if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6828 echo "$ac_t""yes" 1>&6
6829 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6830 cat >> confdefs.h <<EOF
6831#define $ac_tr_func 1
6832EOF
6833
6834else
6835 echo "$ac_t""no" 1>&6
6836fi
6837done
6838
6839for ac_func in pread64
6840do
6841echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6842echo "configure:6843: checking for $ac_func" >&5
14abd0fb
MK
6843if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6844 echo $ac_n "(cached) $ac_c" 1>&6
6845else
6846 cat > conftest.$ac_ext <<EOF
02d62932 6847#line 6848 "configure"
14abd0fb
MK
6848#include "confdefs.h"
6849/* System header to define __stub macros and hopefully few prototypes,
6850 which can conflict with char $ac_func(); below. */
6851#include <assert.h>
6852/* Override any gcc2 internal prototype to avoid an error. */
6853/* We use char because int might match the return type of a gcc2
6854 builtin and then its argument prototype would still apply. */
6855char $ac_func();
6856
6857int main() {
6858
6859/* The GNU C library defines this for functions which it implements
6860 to always fail with ENOSYS. Some functions are actually named
6861 something starting with __ and the normal name is an alias. */
6862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6863choke me
6864#else
6865$ac_func();
6866#endif
6867
6868; return 0; }
6869EOF
02d62932 6870if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6871 rm -rf conftest*
6872 eval "ac_cv_func_$ac_func=yes"
6873else
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 rm -rf conftest*
6877 eval "ac_cv_func_$ac_func=no"
6878fi
6879rm -f conftest*
6880fi
6881
6882if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6883 echo "$ac_t""yes" 1>&6
6884 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6885 cat >> confdefs.h <<EOF
6886#define $ac_tr_func 1
6887EOF
6888
6889else
6890 echo "$ac_t""no" 1>&6
6891fi
6892done
6893
97bf5e38
MK
6894for ac_func in sbrk
6895do
6896echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6897echo "configure:6898: checking for $ac_func" >&5
97bf5e38 6898if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6899 echo $ac_n "(cached) $ac_c" 1>&6
6900else
6901 cat > conftest.$ac_ext <<EOF
02d62932 6902#line 6903 "configure"
c906108c 6903#include "confdefs.h"
97bf5e38
MK
6904/* System header to define __stub macros and hopefully few prototypes,
6905 which can conflict with char $ac_func(); below. */
6906#include <assert.h>
6907/* Override any gcc2 internal prototype to avoid an error. */
6908/* We use char because int might match the return type of a gcc2
6909 builtin and then its argument prototype would still apply. */
6910char $ac_func();
c906108c 6911
97bf5e38
MK
6912int main() {
6913
6914/* The GNU C library defines this for functions which it implements
6915 to always fail with ENOSYS. Some functions are actually named
6916 something starting with __ and the normal name is an alias. */
6917#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6918choke me
c906108c 6919#else
97bf5e38 6920$ac_func();
c906108c 6921#endif
97bf5e38 6922
c906108c
SS
6923; return 0; }
6924EOF
02d62932 6925if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6926 rm -rf conftest*
97bf5e38 6927 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6928else
6929 echo "configure: failed program was:" >&5
6930 cat conftest.$ac_ext >&5
6931 rm -rf conftest*
97bf5e38 6932 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6933fi
6934rm -f conftest*
6935fi
6936
97bf5e38
MK
6937if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6938 echo "$ac_t""yes" 1>&6
6939 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6940 cat >> confdefs.h <<EOF
6941#define $ac_tr_func 1
c906108c 6942EOF
97bf5e38
MK
6943
6944else
6945 echo "$ac_t""no" 1>&6
c906108c 6946fi
97bf5e38 6947done
c906108c 6948
97bf5e38
MK
6949for ac_func in setpgid setpgrp
6950do
6951echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6952echo "configure:6953: checking for $ac_func" >&5
97bf5e38 6953if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6954 echo $ac_n "(cached) $ac_c" 1>&6
6955else
6956 cat > conftest.$ac_ext <<EOF
02d62932 6957#line 6958 "configure"
c906108c 6958#include "confdefs.h"
97bf5e38
MK
6959/* System header to define __stub macros and hopefully few prototypes,
6960 which can conflict with char $ac_func(); below. */
6961#include <assert.h>
6962/* Override any gcc2 internal prototype to avoid an error. */
6963/* We use char because int might match the return type of a gcc2
6964 builtin and then its argument prototype would still apply. */
6965char $ac_func();
c906108c 6966
97bf5e38
MK
6967int main() {
6968
6969/* The GNU C library defines this for functions which it implements
6970 to always fail with ENOSYS. Some functions are actually named
6971 something starting with __ and the normal name is an alias. */
6972#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6973choke me
c906108c 6974#else
97bf5e38 6975$ac_func();
c906108c 6976#endif
97bf5e38 6977
c906108c
SS
6978; return 0; }
6979EOF
02d62932 6980if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6981 rm -rf conftest*
97bf5e38 6982 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6983else
6984 echo "configure: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6986 rm -rf conftest*
97bf5e38 6987 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6988fi
6989rm -f conftest*
6990fi
6991
97bf5e38
MK
6992if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993 echo "$ac_t""yes" 1>&6
6994 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995 cat >> confdefs.h <<EOF
6996#define $ac_tr_func 1
c906108c 6997EOF
97bf5e38
MK
6998
6999else
7000 echo "$ac_t""no" 1>&6
c906108c 7001fi
97bf5e38 7002done
c906108c 7003
e1ea1d75 7004for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
7005do
7006echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7007echo "configure:7008: checking for $ac_func" >&5
97bf5e38 7008if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7009 echo $ac_n "(cached) $ac_c" 1>&6
7010else
7011 cat > conftest.$ac_ext <<EOF
02d62932 7012#line 7013 "configure"
c906108c 7013#include "confdefs.h"
97bf5e38
MK
7014/* System header to define __stub macros and hopefully few prototypes,
7015 which can conflict with char $ac_func(); below. */
7016#include <assert.h>
7017/* Override any gcc2 internal prototype to avoid an error. */
7018/* We use char because int might match the return type of a gcc2
7019 builtin and then its argument prototype would still apply. */
7020char $ac_func();
c906108c 7021
97bf5e38
MK
7022int main() {
7023
7024/* The GNU C library defines this for functions which it implements
7025 to always fail with ENOSYS. Some functions are actually named
7026 something starting with __ and the normal name is an alias. */
7027#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028choke me
c906108c 7029#else
97bf5e38 7030$ac_func();
c906108c 7031#endif
97bf5e38 7032
c906108c
SS
7033; return 0; }
7034EOF
02d62932 7035if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7036 rm -rf conftest*
97bf5e38 7037 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7038else
7039 echo "configure: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7041 rm -rf conftest*
97bf5e38 7042 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7043fi
7044rm -f conftest*
7045fi
7046
97bf5e38
MK
7047if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048 echo "$ac_t""yes" 1>&6
7049 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7050 cat >> confdefs.h <<EOF
7051#define $ac_tr_func 1
c906108c 7052EOF
e1ea1d75 7053
97bf5e38
MK
7054else
7055 echo "$ac_t""no" 1>&6
c906108c 7056fi
97bf5e38 7057done
c906108c 7058
97bf5e38
MK
7059for ac_func in socketpair
7060do
7061echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7062echo "configure:7063: checking for $ac_func" >&5
97bf5e38 7063if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7064 echo $ac_n "(cached) $ac_c" 1>&6
7065else
7066 cat > conftest.$ac_ext <<EOF
02d62932 7067#line 7068 "configure"
c906108c 7068#include "confdefs.h"
97bf5e38
MK
7069/* System header to define __stub macros and hopefully few prototypes,
7070 which can conflict with char $ac_func(); below. */
7071#include <assert.h>
7072/* Override any gcc2 internal prototype to avoid an error. */
7073/* We use char because int might match the return type of a gcc2
7074 builtin and then its argument prototype would still apply. */
7075char $ac_func();
c906108c 7076
97bf5e38
MK
7077int main() {
7078
7079/* The GNU C library defines this for functions which it implements
7080 to always fail with ENOSYS. Some functions are actually named
7081 something starting with __ and the normal name is an alias. */
7082#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7083choke me
c906108c 7084#else
97bf5e38 7085$ac_func();
c906108c 7086#endif
97bf5e38 7087
c906108c
SS
7088; return 0; }
7089EOF
02d62932 7090if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7091 rm -rf conftest*
97bf5e38 7092 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7093else
7094 echo "configure: failed program was:" >&5
7095 cat conftest.$ac_ext >&5
7096 rm -rf conftest*
97bf5e38 7097 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7098fi
7099rm -f conftest*
7100fi
7101
97bf5e38
MK
7102if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7103 echo "$ac_t""yes" 1>&6
7104 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7105 cat >> confdefs.h <<EOF
7106#define $ac_tr_func 1
c906108c 7107EOF
97bf5e38
MK
7108
7109else
7110 echo "$ac_t""no" 1>&6
c906108c 7111fi
97bf5e38 7112done
c906108c 7113
b757528f
JJ
7114for ac_func in syscall
7115do
7116echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7117echo "configure:7118: checking for $ac_func" >&5
b757528f
JJ
7118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7119 echo $ac_n "(cached) $ac_c" 1>&6
7120else
7121 cat > conftest.$ac_ext <<EOF
02d62932 7122#line 7123 "configure"
b757528f
JJ
7123#include "confdefs.h"
7124/* System header to define __stub macros and hopefully few prototypes,
7125 which can conflict with char $ac_func(); below. */
7126#include <assert.h>
7127/* Override any gcc2 internal prototype to avoid an error. */
7128/* We use char because int might match the return type of a gcc2
7129 builtin and then its argument prototype would still apply. */
7130char $ac_func();
7131
7132int main() {
7133
7134/* The GNU C library defines this for functions which it implements
7135 to always fail with ENOSYS. Some functions are actually named
7136 something starting with __ and the normal name is an alias. */
7137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7138choke me
7139#else
7140$ac_func();
7141#endif
7142
7143; return 0; }
7144EOF
02d62932 7145if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7146 rm -rf conftest*
7147 eval "ac_cv_func_$ac_func=yes"
7148else
7149 echo "configure: failed program was:" >&5
7150 cat conftest.$ac_ext >&5
7151 rm -rf conftest*
7152 eval "ac_cv_func_$ac_func=no"
7153fi
7154rm -f conftest*
7155fi
7156
7157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7158 echo "$ac_t""yes" 1>&6
7159 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7160 cat >> confdefs.h <<EOF
7161#define $ac_tr_func 1
7162EOF
7163
7164else
7165 echo "$ac_t""no" 1>&6
7166fi
7167done
7168
97bf5e38
MK
7169
7170if test "$cross_compiling" = no; then
7171 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
02d62932 7172echo "configure:7173: checking whether setpgrp takes no argument" >&5
97bf5e38 7173if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7174 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7175else
7176 if test "$cross_compiling" = yes; then
7177 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7178else
7179 cat > conftest.$ac_ext <<EOF
02d62932 7180#line 7181 "configure"
c906108c
SS
7181#include "confdefs.h"
7182
c906108c
SS
7183#ifdef HAVE_UNISTD_H
7184#include <unistd.h>
7185#endif
97bf5e38
MK
7186
7187/*
7188 * If this system has a BSD-style setpgrp, which takes arguments, exit
7189 * successfully.
7190 */
7191main()
7192{
7193 if (setpgrp(1,1) == -1)
7194 exit(0);
7195 else
7196 exit(1);
7197}
7198
c906108c 7199EOF
02d62932 7200if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7201then
7202 ac_cv_func_setpgrp_void=no
c906108c
SS
7203else
7204 echo "configure: failed program was:" >&5
7205 cat conftest.$ac_ext >&5
97bf5e38
MK
7206 rm -fr conftest*
7207 ac_cv_func_setpgrp_void=yes
c906108c 7208fi
97bf5e38 7209rm -fr conftest*
c906108c
SS
7210fi
7211
97bf5e38
MK
7212
7213fi
7214
7215echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7216if test $ac_cv_func_setpgrp_void = yes; then
7217 cat >> confdefs.h <<\EOF
7218#define SETPGRP_VOID 1
c906108c
SS
7219EOF
7220
7221fi
7222
97bf5e38
MK
7223else
7224 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
02d62932 7225echo "configure:7226: checking whether setpgrp takes no argument" >&5
97bf5e38 7226if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7227 echo $ac_n "(cached) $ac_c" 1>&6
7228else
7229 cat > conftest.$ac_ext <<EOF
02d62932 7230#line 7231 "configure"
b83266a0
SS
7231#include "confdefs.h"
7232
b83266a0 7233#include <unistd.h>
97bf5e38 7234
b83266a0 7235int main() {
97bf5e38
MK
7236
7237 if (setpgrp(1,1) == -1)
7238 exit (0);
7239 else
7240 exit (1);
7241
b83266a0
SS
7242; return 0; }
7243EOF
02d62932 7244if { (eval echo configure:7245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7245 rm -rf conftest*
97bf5e38 7246 ac_cv_func_setpgrp_void=no
b83266a0
SS
7247else
7248 echo "configure: failed program was:" >&5
7249 cat conftest.$ac_ext >&5
7250 rm -rf conftest*
97bf5e38 7251 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7252fi
7253rm -f conftest*
7254fi
7255
97bf5e38
MK
7256echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7257if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7258 cat >> confdefs.h <<\EOF
97bf5e38 7259#define SETPGRP_VOID 1
b83266a0
SS
7260EOF
7261
97bf5e38 7262fi
b83266a0
SS
7263fi
7264
97bf5e38
MK
7265# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7266# since sigsetjmp might only be defined as a macro.
7267echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
02d62932 7268echo "configure:7269: checking for sigsetjmp" >&5
97bf5e38 7269if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7270 echo $ac_n "(cached) $ac_c" 1>&6
7271else
7272 cat > conftest.$ac_ext <<EOF
02d62932 7273#line 7274 "configure"
a4db0f07
RH
7274#include "confdefs.h"
7275
97bf5e38
MK
7276#include <setjmp.h>
7277
a4db0f07 7278int main() {
97bf5e38 7279sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7280; return 0; }
7281EOF
02d62932 7282if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7283 rm -rf conftest*
97bf5e38 7284 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7285else
7286 echo "configure: failed program was:" >&5
7287 cat conftest.$ac_ext >&5
7288 rm -rf conftest*
97bf5e38 7289 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7290fi
7291rm -f conftest*
7292fi
7293
97bf5e38
MK
7294echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7295if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7296 cat >> confdefs.h <<\EOF
97bf5e38 7297#define HAVE_SIGSETJMP 1
a4db0f07
RH
7298EOF
7299
7300fi
c906108c 7301
06825bd1
MK
7302# Assume we'll default to using the included libiberty regex.
7303gdb_use_included_regex=yes
7304
7305# However, if the system regex is GNU regex, then default to *not*
7306# using the included regex.
7307echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
02d62932 7308echo "configure:7309: checking for GNU regex" >&5
06825bd1
MK
7309if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7310 echo $ac_n "(cached) $ac_c" 1>&6
7311else
7312 cat > conftest.$ac_ext <<EOF
02d62932 7313#line 7314 "configure"
06825bd1
MK
7314#include "confdefs.h"
7315#include <gnu-versions.h>
7316int main() {
7317#define REGEX_INTERFACE_VERSION 1
7318#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7319# error "Version mismatch"
7320#endif
7321; return 0; }
7322EOF
02d62932 7323if { (eval echo configure:7324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7324 rm -rf conftest*
7325 gdb_cv_have_gnu_regex=yes
7326else
7327 echo "configure: failed program was:" >&5
7328 cat conftest.$ac_ext >&5
7329 rm -rf conftest*
7330 gdb_cv_have_gnu_regex=no
7331fi
7332rm -f conftest*
7333fi
7334
7335echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7336if test $gdb_cv_have_gnu_regex = yes; then
7337 gdb_use_included_regex=no
7338fi
7339
7340# Check whether --with-included-regex or --without-included-regex was given.
7341if test "${with_included_regex+set}" = set; then
7342 withval="$with_included_regex"
7343 gdb_with_regex=$withval
7344else
7345 gdb_with_regex=$gdb_use_included_regex
7346fi
7347
7348if test "$gdb_with_regex" = yes; then
7349 cat >> confdefs.h <<\EOF
7350#define USE_INCLUDED_REGEX 1
7351EOF
7352
7353fi
7354
78434e59
MK
7355# See if <machine/reg.h> degines `struct reg'.
7356echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
02d62932 7357echo "configure:7358: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7358if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7359 echo $ac_n "(cached) $ac_c" 1>&6
7360else
7361 cat > conftest.$ac_ext <<EOF
02d62932 7362#line 7363 "configure"
78434e59
MK
7363#include "confdefs.h"
7364#include <sys/types.h>
7365#include <machine/reg.h>
7366int main() {
7367struct reg r;
7368; return 0; }
7369EOF
02d62932 7370if { (eval echo configure:7371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7371 rm -rf conftest*
7372 gdb_cv_struct_reg=yes
7373else
7374 echo "configure: failed program was:" >&5
7375 cat conftest.$ac_ext >&5
7376 rm -rf conftest*
7377 gdb_cv_struct_reg=no
7378fi
7379rm -f conftest*
7380fi
7381
7382echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7383if test $gdb_cv_struct_reg = yes; then
7384 cat >> confdefs.h <<\EOF
7385#define HAVE_STRUCT_REG 1
7386EOF
7387
7388fi
7389
97bf5e38
MK
7390# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7391# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7392echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
02d62932 7393echo "configure:7394: checking for r_fs in struct reg" >&5
97bf5e38
MK
7394if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7395 echo $ac_n "(cached) $ac_c" 1>&6
7396else
7397 cat > conftest.$ac_ext <<EOF
02d62932 7398#line 7399 "configure"
c906108c 7399#include "confdefs.h"
97bf5e38
MK
7400#include <machine/reg.h>
7401int main() {
7402struct reg r; r.r_fs;
7403; return 0; }
c906108c 7404EOF
02d62932 7405if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7406 rm -rf conftest*
97bf5e38 7407 gdb_cv_struct_reg_r_fs=yes
c906108c 7408else
97bf5e38
MK
7409 echo "configure: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
c906108c 7411 rm -rf conftest*
97bf5e38 7412 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7413fi
7414rm -f conftest*
97bf5e38 7415fi
c906108c 7416
97bf5e38
MK
7417echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7418if test $gdb_cv_struct_reg_r_fs = yes; then
7419 cat >> confdefs.h <<\EOF
7420#define HAVE_STRUCT_REG_R_FS 1
7421EOF
7422
7423fi
7424echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
02d62932 7425echo "configure:7426: checking for r_gs in struct reg" >&5
97bf5e38
MK
7426if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7427 echo $ac_n "(cached) $ac_c" 1>&6
7428else
7429 cat > conftest.$ac_ext <<EOF
02d62932 7430#line 7431 "configure"
c906108c 7431#include "confdefs.h"
97bf5e38
MK
7432#include <machine/reg.h>
7433int main() {
7434struct reg r; r.r_gs;
7435; return 0; }
c906108c 7436EOF
02d62932 7437if { (eval echo configure:7438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7438 rm -rf conftest*
97bf5e38 7439 gdb_cv_struct_reg_r_gs=yes
c906108c 7440else
97bf5e38
MK
7441 echo "configure: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
c906108c 7443 rm -rf conftest*
97bf5e38 7444 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7445fi
7446rm -f conftest*
c906108c 7447fi
c906108c 7448
97bf5e38
MK
7449echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7450if test $gdb_cv_struct_reg_r_gs = yes; then
7451 cat >> confdefs.h <<\EOF
7452#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7453EOF
7454
c906108c
SS
7455fi
7456
97bf5e38
MK
7457# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7458echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
02d62932 7459echo "configure:7460: checking for PTRACE_GETREGS" >&5
97bf5e38 7460if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7461 echo $ac_n "(cached) $ac_c" 1>&6
7462else
7463 cat > conftest.$ac_ext <<EOF
02d62932 7464#line 7465 "configure"
c906108c 7465#include "confdefs.h"
97bf5e38 7466#include <sys/ptrace.h>
c906108c 7467int main() {
97bf5e38 7468PTRACE_GETREGS;
c906108c
SS
7469; return 0; }
7470EOF
02d62932 7471if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7472 rm -rf conftest*
97bf5e38 7473 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7474else
7475 echo "configure: failed program was:" >&5
7476 cat conftest.$ac_ext >&5
7477 rm -rf conftest*
97bf5e38 7478 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7479fi
7480rm -f conftest*
7481fi
7482
97bf5e38
MK
7483echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7484if test $gdb_cv_have_ptrace_getregs = yes; then
7485 cat >> confdefs.h <<\EOF
7486#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7487EOF
7488
97bf5e38 7489fi
c906108c 7490
97bf5e38
MK
7491# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7492echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
02d62932 7493echo "configure:7494: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7494if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7495 echo $ac_n "(cached) $ac_c" 1>&6
7496else
7497 cat > conftest.$ac_ext <<EOF
02d62932 7498#line 7499 "configure"
c906108c 7499#include "confdefs.h"
97bf5e38 7500#include <sys/ptrace.h>
c906108c 7501int main() {
97bf5e38 7502PTRACE_GETFPXREGS;
c906108c
SS
7503; return 0; }
7504EOF
02d62932 7505if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7506 rm -rf conftest*
97bf5e38 7507 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7508else
7509 echo "configure: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 rm -rf conftest*
97bf5e38 7512 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7513fi
7514rm -f conftest*
7515fi
7516
97bf5e38
MK
7517echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7518if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7519 cat >> confdefs.h <<\EOF
7520#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7521EOF
7522
97bf5e38 7523fi
c906108c 7524
97bf5e38
MK
7525# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7526echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
02d62932 7527echo "configure:7528: checking for PT_GETDBREGS" >&5
97bf5e38 7528if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7529 echo $ac_n "(cached) $ac_c" 1>&6
7530else
7531 cat > conftest.$ac_ext <<EOF
02d62932 7532#line 7533 "configure"
c906108c 7533#include "confdefs.h"
97bf5e38
MK
7534#include <sys/types.h>
7535#include <sys/ptrace.h>
c906108c 7536int main() {
97bf5e38 7537PT_GETDBREGS;
c906108c
SS
7538; return 0; }
7539EOF
02d62932 7540if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7541 rm -rf conftest*
97bf5e38 7542 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7543else
7544 echo "configure: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 rm -rf conftest*
97bf5e38 7547 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7548fi
7549rm -f conftest*
7550fi
7551
97bf5e38
MK
7552echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7553if test $gdb_cv_have_pt_getdbregs = yes; then
7554 cat >> confdefs.h <<\EOF
7555#define HAVE_PT_GETDBREGS 1
c906108c
SS
7556EOF
7557
97bf5e38 7558fi
c906108c 7559
97bf5e38
MK
7560# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7561echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
02d62932 7562echo "configure:7563: checking for PT_GETXMMREGS" >&5
97bf5e38 7563if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7564 echo $ac_n "(cached) $ac_c" 1>&6
7565else
7566 cat > conftest.$ac_ext <<EOF
02d62932 7567#line 7568 "configure"
c906108c 7568#include "confdefs.h"
97bf5e38
MK
7569#include <sys/types.h>
7570#include <sys/ptrace.h>
c906108c 7571int main() {
97bf5e38 7572PT_GETXMMREGS;
c906108c
SS
7573; return 0; }
7574EOF
02d62932 7575if { (eval echo configure:7576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7576 rm -rf conftest*
97bf5e38 7577 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7578else
7579 echo "configure: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 rm -rf conftest*
97bf5e38 7582 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7583fi
7584rm -f conftest*
7585fi
7586
97bf5e38
MK
7587echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7588if test $gdb_cv_have_pt_getxmmregs = yes; then
7589 cat >> confdefs.h <<\EOF
7590#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7591EOF
7592
97bf5e38 7593fi
c906108c 7594
27ca5dad 7595# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7596# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7597echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
02d62932 7598echo "configure:7599: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7599if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7600 echo $ac_n "(cached) $ac_c" 1>&6
7601else
7602 cat > conftest.$ac_ext <<EOF
02d62932 7603#line 7604 "configure"
27ca5dad
MC
7604#include "confdefs.h"
7605#include <stdint.h>
7606int main() {
7607uintptr_t foo = 0;
7608; return 0; }
7609EOF
02d62932 7610if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7611 rm -rf conftest*
7612 gdb_cv_have_uintptr_t=yes
7613else
7614 echo "configure: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 rm -rf conftest*
7617 gdb_cv_have_uintptr_t=no
7618fi
7619rm -f conftest*
7620fi
7621
7622echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7623if test $gdb_cv_have_uintptr_t = yes; then
7624 cat >> confdefs.h <<\EOF
7625#define HAVE_UINTPTR_T 1
7626EOF
7627
7628fi
97bf5e38
MK
7629
7630echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
02d62932 7631echo "configure:7632: checking whether malloc must be declared" >&5
97bf5e38 7632if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7633 echo $ac_n "(cached) $ac_c" 1>&6
7634else
7635 cat > conftest.$ac_ext <<EOF
02d62932 7636#line 7637 "configure"
3862412b 7637#include "confdefs.h"
e17bf198 7638
97bf5e38
MK
7639#include <stdio.h>
7640#ifdef HAVE_STRING_H
7641#include <string.h>
7642#else
7643#ifdef HAVE_STRINGS_H
7644#include <strings.h>
7645#endif
7646#endif
7647#ifdef HAVE_STDLIB_H
7648#include <stdlib.h>
7649#endif
7650#ifdef HAVE_UNISTD_H
7651#include <unistd.h>
7652#endif
3862412b 7653int main() {
97bf5e38 7654char *(*pfn) = (char *(*)) malloc
3862412b
MK
7655; return 0; }
7656EOF
02d62932 7657if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7658 rm -rf conftest*
97bf5e38 7659 bfd_cv_decl_needed_malloc=no
3862412b
MK
7660else
7661 echo "configure: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663 rm -rf conftest*
97bf5e38 7664 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7665fi
7666rm -f conftest*
7667fi
7668
97bf5e38
MK
7669echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7670if test $bfd_cv_decl_needed_malloc = yes; then
7671 cat >> confdefs.h <<\EOF
7672#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7673EOF
7674
97bf5e38 7675fi
3862412b 7676
97bf5e38 7677echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
02d62932 7678echo "configure:7679: checking whether realloc must be declared" >&5
97bf5e38 7679if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7680 echo $ac_n "(cached) $ac_c" 1>&6
7681else
7682 cat > conftest.$ac_ext <<EOF
02d62932 7683#line 7684 "configure"
3862412b 7684#include "confdefs.h"
e17bf198 7685
97bf5e38
MK
7686#include <stdio.h>
7687#ifdef HAVE_STRING_H
7688#include <string.h>
7689#else
7690#ifdef HAVE_STRINGS_H
7691#include <strings.h>
7692#endif
7693#endif
7694#ifdef HAVE_STDLIB_H
7695#include <stdlib.h>
7696#endif
7697#ifdef HAVE_UNISTD_H
7698#include <unistd.h>
7699#endif
3862412b 7700int main() {
97bf5e38 7701char *(*pfn) = (char *(*)) realloc
3862412b
MK
7702; return 0; }
7703EOF
02d62932 7704if { (eval echo configure:7705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7705 rm -rf conftest*
97bf5e38 7706 bfd_cv_decl_needed_realloc=no
3862412b
MK
7707else
7708 echo "configure: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 rm -rf conftest*
97bf5e38 7711 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7712fi
7713rm -f conftest*
7714fi
7715
97bf5e38
MK
7716echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7717if test $bfd_cv_decl_needed_realloc = yes; then
7718 cat >> confdefs.h <<\EOF
7719#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7720EOF
7721
97bf5e38 7722fi
3862412b 7723
97bf5e38 7724echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
02d62932 7725echo "configure:7726: checking whether free must be declared" >&5
97bf5e38 7726if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7727 echo $ac_n "(cached) $ac_c" 1>&6
7728else
7729 cat > conftest.$ac_ext <<EOF
02d62932 7730#line 7731 "configure"
451928c5 7731#include "confdefs.h"
e17bf198 7732
97bf5e38
MK
7733#include <stdio.h>
7734#ifdef HAVE_STRING_H
7735#include <string.h>
7736#else
7737#ifdef HAVE_STRINGS_H
7738#include <strings.h>
7739#endif
7740#endif
7741#ifdef HAVE_STDLIB_H
7742#include <stdlib.h>
7743#endif
7744#ifdef HAVE_UNISTD_H
7745#include <unistd.h>
7746#endif
451928c5 7747int main() {
97bf5e38 7748char *(*pfn) = (char *(*)) free
451928c5
AC
7749; return 0; }
7750EOF
02d62932 7751if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7752 rm -rf conftest*
97bf5e38 7753 bfd_cv_decl_needed_free=no
451928c5
AC
7754else
7755 echo "configure: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 rm -rf conftest*
97bf5e38 7758 bfd_cv_decl_needed_free=yes
451928c5
AC
7759fi
7760rm -f conftest*
7761fi
7762
97bf5e38
MK
7763echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7764if test $bfd_cv_decl_needed_free = yes; then
7765 cat >> confdefs.h <<\EOF
7766#define NEED_DECLARATION_FREE 1
451928c5
AC
7767EOF
7768
97bf5e38 7769fi
451928c5 7770
97bf5e38 7771echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
02d62932 7772echo "configure:7773: checking whether strerror must be declared" >&5
97bf5e38 7773if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7774 echo $ac_n "(cached) $ac_c" 1>&6
7775else
7776 cat > conftest.$ac_ext <<EOF
02d62932 7777#line 7778 "configure"
451928c5 7778#include "confdefs.h"
e17bf198 7779
97bf5e38
MK
7780#include <stdio.h>
7781#ifdef HAVE_STRING_H
7782#include <string.h>
7783#else
7784#ifdef HAVE_STRINGS_H
7785#include <strings.h>
7786#endif
7787#endif
7788#ifdef HAVE_STDLIB_H
7789#include <stdlib.h>
7790#endif
7791#ifdef HAVE_UNISTD_H
7792#include <unistd.h>
7793#endif
451928c5 7794int main() {
97bf5e38 7795char *(*pfn) = (char *(*)) strerror
451928c5
AC
7796; return 0; }
7797EOF
02d62932 7798if { (eval echo configure:7799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7799 rm -rf conftest*
97bf5e38 7800 bfd_cv_decl_needed_strerror=no
451928c5
AC
7801else
7802 echo "configure: failed program was:" >&5
7803 cat conftest.$ac_ext >&5
7804 rm -rf conftest*
97bf5e38 7805 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7806fi
7807rm -f conftest*
7808fi
7809
97bf5e38
MK
7810echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7811if test $bfd_cv_decl_needed_strerror = yes; then
7812 cat >> confdefs.h <<\EOF
7813#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7814EOF
7815
97bf5e38 7816fi
451928c5 7817
97bf5e38 7818echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
02d62932 7819echo "configure:7820: checking whether strdup must be declared" >&5
97bf5e38 7820if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7821 echo $ac_n "(cached) $ac_c" 1>&6
7822else
7823 cat > conftest.$ac_ext <<EOF
02d62932 7824#line 7825 "configure"
3862412b 7825#include "confdefs.h"
e17bf198 7826
97bf5e38
MK
7827#include <stdio.h>
7828#ifdef HAVE_STRING_H
7829#include <string.h>
7830#else
7831#ifdef HAVE_STRINGS_H
7832#include <strings.h>
7833#endif
7834#endif
7835#ifdef HAVE_STDLIB_H
7836#include <stdlib.h>
7837#endif
7838#ifdef HAVE_UNISTD_H
7839#include <unistd.h>
7840#endif
3862412b 7841int main() {
97bf5e38 7842char *(*pfn) = (char *(*)) strdup
3862412b
MK
7843; return 0; }
7844EOF
02d62932 7845if { (eval echo configure:7846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7846 rm -rf conftest*
97bf5e38 7847 bfd_cv_decl_needed_strdup=no
3862412b
MK
7848else
7849 echo "configure: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7851 rm -rf conftest*
97bf5e38 7852 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7853fi
7854rm -f conftest*
7855fi
7856
97bf5e38
MK
7857echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7858if test $bfd_cv_decl_needed_strdup = yes; then
7859 cat >> confdefs.h <<\EOF
7860#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7861EOF
7862
97bf5e38 7863fi
3862412b 7864
97bf5e38 7865echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
02d62932 7866echo "configure:7867: checking whether strstr must be declared" >&5
97bf5e38 7867if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7868 echo $ac_n "(cached) $ac_c" 1>&6
7869else
7870 cat > conftest.$ac_ext <<EOF
02d62932 7871#line 7872 "configure"
3862412b 7872#include "confdefs.h"
e17bf198 7873
97bf5e38
MK
7874#include <stdio.h>
7875#ifdef HAVE_STRING_H
7876#include <string.h>
7877#else
7878#ifdef HAVE_STRINGS_H
7879#include <strings.h>
7880#endif
7881#endif
7882#ifdef HAVE_STDLIB_H
7883#include <stdlib.h>
7884#endif
7885#ifdef HAVE_UNISTD_H
7886#include <unistd.h>
7887#endif
3862412b 7888int main() {
97bf5e38 7889char *(*pfn) = (char *(*)) strstr
3862412b
MK
7890; return 0; }
7891EOF
02d62932 7892if { (eval echo configure:7893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7893 rm -rf conftest*
97bf5e38 7894 bfd_cv_decl_needed_strstr=no
3862412b
MK
7895else
7896 echo "configure: failed program was:" >&5
7897 cat conftest.$ac_ext >&5
7898 rm -rf conftest*
97bf5e38 7899 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7900fi
7901rm -f conftest*
7902fi
7903
97bf5e38
MK
7904echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7905if test $bfd_cv_decl_needed_strstr = yes; then
7906 cat >> confdefs.h <<\EOF
7907#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7908EOF
7909
97bf5e38 7910fi
3862412b 7911
97bf5e38 7912echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
02d62932 7913echo "configure:7914: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7914if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7915 echo $ac_n "(cached) $ac_c" 1>&6
7916else
7917 cat > conftest.$ac_ext <<EOF
02d62932 7918#line 7919 "configure"
596c9d4b
KB
7919#include "confdefs.h"
7920
97bf5e38
MK
7921#include <stdio.h>
7922#ifdef HAVE_STRING_H
7923#include <string.h>
7924#else
7925#ifdef HAVE_STRINGS_H
7926#include <strings.h>
7927#endif
7928#endif
7929#ifdef HAVE_STDLIB_H
7930#include <stdlib.h>
7931#endif
7932#ifdef HAVE_UNISTD_H
7933#include <unistd.h>
7934#endif
596c9d4b 7935int main() {
97bf5e38 7936char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7937; return 0; }
7938EOF
02d62932 7939if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7940 rm -rf conftest*
97bf5e38 7941 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7942else
7943 echo "configure: failed program was:" >&5
7944 cat conftest.$ac_ext >&5
7945 rm -rf conftest*
97bf5e38 7946 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7947fi
7948rm -f conftest*
7949fi
7950
97bf5e38
MK
7951echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7952if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7953 cat >> confdefs.h <<\EOF
7954#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7955EOF
7956
97bf5e38 7957fi
596c9d4b 7958
97bf5e38
MK
7959
7960# The following save_state_t checkery is only necessary for HPUX
7961# versions earlier than 10.20. When those fade from memory, this
7962# could be expunged. --jsm 1999-03-22
7963
7964echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
02d62932 7965echo "configure:7966: checking for HPUX save_state structure" >&5
97bf5e38 7966cat > conftest.$ac_ext <<EOF
02d62932 7967#line 7968 "configure"
97bf5e38
MK
7968#include "confdefs.h"
7969#include <machine/save_state.h>
7970EOF
7971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7972 egrep "save_state_t" >/dev/null 2>&1; then
7973 rm -rf conftest*
7974 gdb_cv_hpux_savestate=yes
7975else
7976 rm -rf conftest*
7977 gdb_cv_hpux_savestate=no
7978fi
7979rm -f conftest*
7980
7981cat > conftest.$ac_ext <<EOF
02d62932 7982#line 7983 "configure"
97bf5e38
MK
7983#include "confdefs.h"
7984#include <machine/save_state.h>
7985EOF
7986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7987 egrep "ss_wide" >/dev/null 2>&1; then
7988 rm -rf conftest*
7989 gdb_cv_hpux_sswide=yes
7990else
7991 rm -rf conftest*
7992 gdb_cv_hpux_sswide=no
7993fi
7994rm -f conftest*
7995
7996if test $gdb_cv_hpux_savestate = yes
7997then
7998 cat >> confdefs.h <<\EOF
7999#define HAVE_STRUCT_SAVE_STATE_T 1
8000EOF
8001
8002fi
8003if test $gdb_cv_hpux_sswide = yes
8004then
8005 cat >> confdefs.h <<\EOF
8006#define HAVE_STRUCT_MEMBER_SS_WIDE 1
8007EOF
8008
8009fi
8010echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8011
8012
8013# If we are configured native on GNU/Linux, work around problems with
8014# sys/procfs.h
8015# Also detect which type of /proc is in use, such as for Unixware or Solaris.
8016
8017if test "${target}" = "${host}"; then
8018 case "${host}" in
8019 i[3456]86-*-linux*)
8020 cat >> confdefs.h <<\EOF
8021#define START_INFERIOR_TRAPS_EXPECTED 2
8022EOF
8023
8024 cat >> confdefs.h <<\EOF
8025#define sys_quotactl 1
8026EOF
8027
8028 ;;
8029 ia64-*-aix*)
8030 cat >> confdefs.h <<\EOF
8031#define NEW_PROC_API 1
8032EOF
8033
8034 ;;
8035 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8036 cat >> confdefs.h <<\EOF
8037#define NEW_PROC_API 1
8038EOF
8039
8040 ;;
e7c61be3 8041 *-*-solaris2.[6789])
97bf5e38
MK
8042 cat >> confdefs.h <<\EOF
8043#define NEW_PROC_API 1
8044EOF
8045
8046 ;;
8047 esac
8048fi
8049
8050if test "$ac_cv_header_sys_procfs_h" = yes; then
8051 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8052echo "configure:8053: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8053 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8054 echo $ac_n "(cached) $ac_c" 1>&6
8055else
8056 cat > conftest.$ac_ext <<EOF
02d62932 8057#line 8058 "configure"
596c9d4b
KB
8058#include "confdefs.h"
8059
8060#define _SYSCALL32
8061#include <sys/procfs.h>
8062int main() {
97bf5e38 8063pstatus_t avar
596c9d4b
KB
8064; return 0; }
8065EOF
02d62932 8066if { (eval echo configure:8067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8067 rm -rf conftest*
97bf5e38 8068 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8069else
8070 echo "configure: failed program was:" >&5
8071 cat conftest.$ac_ext >&5
8072 rm -rf conftest*
97bf5e38 8073 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8074
8075fi
8076rm -f conftest*
8077fi
8078
97bf5e38 8079 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8080 cat >> confdefs.h <<\EOF
97bf5e38 8081#define HAVE_PSTATUS_T 1
596c9d4b
KB
8082EOF
8083
8084 fi
97bf5e38 8085 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8086
97bf5e38 8087 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8088echo "configure:8089: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8089 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8090 echo $ac_n "(cached) $ac_c" 1>&6
8091else
8092 cat > conftest.$ac_ext <<EOF
02d62932 8093#line 8094 "configure"
596c9d4b
KB
8094#include "confdefs.h"
8095
8096#define _SYSCALL32
8097#include <sys/procfs.h>
8098int main() {
97bf5e38 8099prrun_t avar
596c9d4b
KB
8100; return 0; }
8101EOF
02d62932 8102if { (eval echo configure:8103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8103 rm -rf conftest*
97bf5e38 8104 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8105else
8106 echo "configure: failed program was:" >&5
8107 cat conftest.$ac_ext >&5
8108 rm -rf conftest*
97bf5e38 8109 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8110
8111fi
8112rm -f conftest*
8113fi
8114
97bf5e38 8115 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8116 cat >> confdefs.h <<\EOF
97bf5e38 8117#define HAVE_PRRUN_T 1
596c9d4b
KB
8118EOF
8119
8120 fi
97bf5e38 8121 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8122
97bf5e38 8123 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8124echo "configure:8125: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8125 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8126 echo $ac_n "(cached) $ac_c" 1>&6
8127else
8128 cat > conftest.$ac_ext <<EOF
02d62932 8129#line 8130 "configure"
596c9d4b
KB
8130#include "confdefs.h"
8131
8132#define _SYSCALL32
8133#include <sys/procfs.h>
8134int main() {
97bf5e38 8135gregset_t avar
596c9d4b
KB
8136; return 0; }
8137EOF
02d62932 8138if { (eval echo configure:8139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8139 rm -rf conftest*
97bf5e38 8140 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8141else
8142 echo "configure: failed program was:" >&5
8143 cat conftest.$ac_ext >&5
8144 rm -rf conftest*
97bf5e38 8145 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8146
8147fi
8148rm -f conftest*
8149fi
8150
97bf5e38 8151 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8152 cat >> confdefs.h <<\EOF
97bf5e38 8153#define HAVE_GREGSET_T 1
596c9d4b
KB
8154EOF
8155
8156 fi
97bf5e38 8157 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8158
97bf5e38 8159 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8160echo "configure:8161: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8161 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8162 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8163else
8164 cat > conftest.$ac_ext <<EOF
02d62932 8165#line 8166 "configure"
d84dd0c5 8166#include "confdefs.h"
97bf5e38
MK
8167
8168#define _SYSCALL32
d84dd0c5 8169#include <sys/procfs.h>
97bf5e38
MK
8170int main() {
8171fpregset_t avar
8172; return 0; }
d84dd0c5 8173EOF
02d62932 8174if { (eval echo configure:8175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8175 rm -rf conftest*
8176 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8177else
8178 echo "configure: failed program was:" >&5
8179 cat conftest.$ac_ext >&5
97bf5e38
MK
8180 rm -rf conftest*
8181 bfd_cv_have_sys_procfs_type_fpregset_t=no
8182
d84dd0c5 8183fi
97bf5e38 8184rm -f conftest*
d84dd0c5
MK
8185fi
8186
97bf5e38
MK
8187 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8188 cat >> confdefs.h <<\EOF
8189#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8190EOF
8191
97bf5e38
MK
8192 fi
8193 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8194
97bf5e38 8195 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8196echo "configure:8197: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8197 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8198 echo $ac_n "(cached) $ac_c" 1>&6
8199else
8200 cat > conftest.$ac_ext <<EOF
02d62932 8201#line 8202 "configure"
c906108c 8202#include "confdefs.h"
c906108c 8203
97bf5e38
MK
8204#define _SYSCALL32
8205#include <sys/procfs.h>
c906108c 8206int main() {
97bf5e38 8207prgregset_t avar
c906108c
SS
8208; return 0; }
8209EOF
02d62932 8210if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8211 rm -rf conftest*
97bf5e38 8212 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8213else
8214 echo "configure: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 rm -rf conftest*
97bf5e38
MK
8217 bfd_cv_have_sys_procfs_type_prgregset_t=no
8218
c906108c
SS
8219fi
8220rm -f conftest*
8221fi
8222
97bf5e38
MK
8223 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8224 cat >> confdefs.h <<\EOF
8225#define HAVE_PRGREGSET_T 1
c906108c
SS
8226EOF
8227
97bf5e38
MK
8228 fi
8229 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8230
97bf5e38 8231 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8232echo "configure:8233: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8233 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8234 echo $ac_n "(cached) $ac_c" 1>&6
8235else
8236 cat > conftest.$ac_ext <<EOF
02d62932 8237#line 8238 "configure"
d45fe813 8238#include "confdefs.h"
97bf5e38
MK
8239
8240#define _SYSCALL32
8241#include <sys/procfs.h>
d45fe813 8242int main() {
97bf5e38 8243prfpregset_t avar
d45fe813
KB
8244; return 0; }
8245EOF
02d62932 8246if { (eval echo configure:8247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8247 rm -rf conftest*
97bf5e38 8248 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8249else
8250 echo "configure: failed program was:" >&5
8251 cat conftest.$ac_ext >&5
8252 rm -rf conftest*
97bf5e38
MK
8253 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8254
d45fe813
KB
8255fi
8256rm -f conftest*
8257fi
8258
97bf5e38
MK
8259 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8260 cat >> confdefs.h <<\EOF
8261#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8262EOF
8263
97bf5e38
MK
8264 fi
8265 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8266
97bf5e38 8267 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8268echo "configure:8269: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8269 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8270 echo $ac_n "(cached) $ac_c" 1>&6
8271else
8272 cat > conftest.$ac_ext <<EOF
02d62932 8273#line 8274 "configure"
d45fe813 8274#include "confdefs.h"
97bf5e38
MK
8275
8276#define _SYSCALL32
8277#include <sys/procfs.h>
d45fe813 8278int main() {
97bf5e38 8279prgregset32_t avar
d45fe813
KB
8280; return 0; }
8281EOF
02d62932 8282if { (eval echo configure:8283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8283 rm -rf conftest*
97bf5e38 8284 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8285else
8286 echo "configure: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8288 rm -rf conftest*
97bf5e38
MK
8289 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8290
d45fe813
KB
8291fi
8292rm -f conftest*
8293fi
8294
97bf5e38
MK
8295 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8296 cat >> confdefs.h <<\EOF
8297#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8298EOF
8299
97bf5e38
MK
8300 fi
8301 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8302
97bf5e38 8303 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8304echo "configure:8305: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8305 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8306 echo $ac_n "(cached) $ac_c" 1>&6
8307else
8308 cat > conftest.$ac_ext <<EOF
02d62932 8309#line 8310 "configure"
d45fe813 8310#include "confdefs.h"
97bf5e38
MK
8311
8312#define _SYSCALL32
8313#include <sys/procfs.h>
d45fe813 8314int main() {
97bf5e38 8315prfpregset32_t avar
d45fe813
KB
8316; return 0; }
8317EOF
02d62932 8318if { (eval echo configure:8319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8319 rm -rf conftest*
97bf5e38 8320 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8321else
8322 echo "configure: failed program was:" >&5
8323 cat conftest.$ac_ext >&5
8324 rm -rf conftest*
97bf5e38
MK
8325 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8326
d45fe813
KB
8327fi
8328rm -f conftest*
8329fi
8330
97bf5e38
MK
8331 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8332 cat >> confdefs.h <<\EOF
8333#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8334EOF
8335
97bf5e38
MK
8336 fi
8337 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8338
97bf5e38 8339 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8340echo "configure:8341: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8341 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8342 echo $ac_n "(cached) $ac_c" 1>&6
8343else
8344 cat > conftest.$ac_ext <<EOF
02d62932 8345#line 8346 "configure"
d45fe813 8346#include "confdefs.h"
97bf5e38 8347
d45fe813 8348#define _SYSCALL32
97bf5e38 8349#include <sys/procfs.h>
d45fe813 8350int main() {
97bf5e38 8351lwpid_t avar
d45fe813
KB
8352; return 0; }
8353EOF
02d62932 8354if { (eval echo configure:8355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8355 rm -rf conftest*
97bf5e38 8356 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8357else
8358 echo "configure: failed program was:" >&5
8359 cat conftest.$ac_ext >&5
8360 rm -rf conftest*
97bf5e38
MK
8361 bfd_cv_have_sys_procfs_type_lwpid_t=no
8362
d45fe813
KB
8363fi
8364rm -f conftest*
8365fi
8366
97bf5e38
MK
8367 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8368 cat >> confdefs.h <<\EOF
8369#define HAVE_LWPID_T 1
d45fe813
KB
8370EOF
8371
97bf5e38
MK
8372 fi
8373 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8374
97bf5e38 8375 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8376echo "configure:8377: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8377 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8378 echo $ac_n "(cached) $ac_c" 1>&6
8379else
8380 cat > conftest.$ac_ext <<EOF
02d62932 8381#line 8382 "configure"
c906108c
SS
8382#include "confdefs.h"
8383
97bf5e38
MK
8384#define _SYSCALL32
8385#include <sys/procfs.h>
c906108c 8386int main() {
97bf5e38 8387psaddr_t avar
c906108c
SS
8388; return 0; }
8389EOF
02d62932 8390if { (eval echo configure:8391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8391 rm -rf conftest*
97bf5e38 8392 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8393else
8394 echo "configure: failed program was:" >&5
8395 cat conftest.$ac_ext >&5
8396 rm -rf conftest*
97bf5e38
MK
8397 bfd_cv_have_sys_procfs_type_psaddr_t=no
8398
c906108c
SS
8399fi
8400rm -f conftest*
8401fi
8402
97bf5e38
MK
8403 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8404 cat >> confdefs.h <<\EOF
8405#define HAVE_PSADDR_T 1
c906108c
SS
8406EOF
8407
97bf5e38
MK
8408 fi
8409 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8410
97bf5e38 8411 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8412echo "configure:8413: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8413 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8414 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8415else
8416 cat > conftest.$ac_ext <<EOF
02d62932 8417#line 8418 "configure"
c906108c
SS
8418#include "confdefs.h"
8419
97bf5e38
MK
8420#define _SYSCALL32
8421#include <sys/procfs.h>
8422int main() {
8423prsysent_t avar
8424; return 0; }
c906108c 8425EOF
02d62932 8426if { (eval echo configure:8427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8427 rm -rf conftest*
8428 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8429else
8430 echo "configure: failed program was:" >&5
8431 cat conftest.$ac_ext >&5
97bf5e38
MK
8432 rm -rf conftest*
8433 bfd_cv_have_sys_procfs_type_prsysent_t=no
8434
c906108c 8435fi
97bf5e38 8436rm -f conftest*
c906108c
SS
8437fi
8438
97bf5e38
MK
8439 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8440 cat >> confdefs.h <<\EOF
8441#define HAVE_PRSYSENT_T 1
c906108c
SS
8442EOF
8443
97bf5e38
MK
8444 fi
8445 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8446
97bf5e38 8447 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8448echo "configure:8449: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8449 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8450 echo $ac_n "(cached) $ac_c" 1>&6
8451else
8452 cat > conftest.$ac_ext <<EOF
02d62932 8453#line 8454 "configure"
c906108c
SS
8454#include "confdefs.h"
8455
97bf5e38
MK
8456#define _SYSCALL32
8457#include <sys/procfs.h>
c906108c 8458int main() {
97bf5e38 8459pr_sigset_t avar
c906108c
SS
8460; return 0; }
8461EOF
02d62932 8462if { (eval echo configure:8463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8463 rm -rf conftest*
97bf5e38 8464 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8465else
8466 echo "configure: failed program was:" >&5
8467 cat conftest.$ac_ext >&5
8468 rm -rf conftest*
97bf5e38
MK
8469 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8470
c906108c
SS
8471fi
8472rm -f conftest*
8473fi
8474
97bf5e38
MK
8475 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8476 cat >> confdefs.h <<\EOF
8477#define HAVE_PR_SIGSET_T 1
c906108c
SS
8478EOF
8479
97bf5e38
MK
8480 fi
8481 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8482
97bf5e38 8483 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8484echo "configure:8485: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8485 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8486 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8487else
8488 cat > conftest.$ac_ext <<EOF
02d62932 8489#line 8490 "configure"
c906108c
SS
8490#include "confdefs.h"
8491
97bf5e38
MK
8492#define _SYSCALL32
8493#include <sys/procfs.h>
8494int main() {
8495pr_sigaction64_t avar
8496; return 0; }
c906108c 8497EOF
02d62932 8498if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8499 rm -rf conftest*
8500 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8501else
8502 echo "configure: failed program was:" >&5
8503 cat conftest.$ac_ext >&5
97bf5e38
MK
8504 rm -rf conftest*
8505 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8506
c906108c 8507fi
97bf5e38 8508rm -f conftest*
c906108c
SS
8509fi
8510
97bf5e38
MK
8511 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8512 cat >> confdefs.h <<\EOF
8513#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8514EOF
8515
97bf5e38
MK
8516 fi
8517 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8518
8519 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
02d62932 8520echo "configure:8521: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8521 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8522 echo $ac_n "(cached) $ac_c" 1>&6
8523else
8524 cat > conftest.$ac_ext <<EOF
02d62932 8525#line 8526 "configure"
97bf5e38
MK
8526#include "confdefs.h"
8527
8528#define _SYSCALL32
8529#include <sys/procfs.h>
8530int main() {
8531pr_siginfo64_t avar
8532; return 0; }
8533EOF
02d62932 8534if { (eval echo configure:8535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8535 rm -rf conftest*
8536 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8537else
8538 echo "configure: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8540 rm -rf conftest*
8541 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8542
8543fi
8544rm -f conftest*
c906108c 8545fi
c906108c 8546
97bf5e38
MK
8547 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8548 cat >> confdefs.h <<\EOF
8549#define HAVE_PR_SIGINFO64_T 1
8550EOF
c906108c 8551
97bf5e38
MK
8552 fi
8553 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8554
8555
8556
8557
8558
8559 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8560 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
02d62932 8561echo "configure:8562: checking whether prfpregset_t type is broken" >&5
97bf5e38 8562 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8563 echo $ac_n "(cached) $ac_c" 1>&6
8564else
8565 if test "$cross_compiling" = yes; then
97bf5e38 8566 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8567else
8568 cat > conftest.$ac_ext <<EOF
02d62932 8569#line 8570 "configure"
c906108c 8570#include "confdefs.h"
97bf5e38
MK
8571#include <sys/procfs.h>
8572 int main ()
8573 {
8574 if (sizeof (prfpregset_t) == sizeof (void *))
8575 return 1;
8576 return 0;
8577 }
c906108c 8578EOF
02d62932 8579if { (eval echo configure:8580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8580then
97bf5e38 8581 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8582else
8583 echo "configure: failed program was:" >&5
8584 cat conftest.$ac_ext >&5
8585 rm -fr conftest*
97bf5e38 8586 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8587fi
8588rm -fr conftest*
8589fi
8590
8591fi
8592
97bf5e38
MK
8593 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8594 if test $gdb_cv_prfpregset_t_broken = yes; then
8595 cat >> confdefs.h <<\EOF
8596#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8597EOF
8598
97bf5e38
MK
8599 fi
8600 fi
c906108c 8601
97bf5e38
MK
8602
8603 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
02d62932 8604echo "configure:8605: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8605 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8606 echo $ac_n "(cached) $ac_c" 1>&6
8607else
8608 cat > conftest.$ac_ext <<EOF
02d62932 8609#line 8610 "configure"
c906108c 8610#include "confdefs.h"
97bf5e38
MK
8611#include <unistd.h>
8612#include <sys/types.h>
8613#include <sys/procfs.h>
8614
8615int main() {
8616
8617 int dummy;;
8618 dummy = ioctl(0, PIOCSET, &dummy);
8619
8620; return 0; }
c906108c 8621EOF
02d62932 8622if { (eval echo configure:8623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8623 rm -rf conftest*
97bf5e38 8624 gdb_cv_have_procfs_piocset=yes
c906108c 8625else
c906108c
SS
8626 echo "configure: failed program was:" >&5
8627 cat conftest.$ac_ext >&5
8628 rm -rf conftest*
97bf5e38 8629 gdb_cv_have_procfs_piocset=no
c906108c
SS
8630fi
8631rm -f conftest*
8632fi
97bf5e38
MK
8633
8634 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8635 if test $gdb_cv_have_procfs_piocset = yes; then
8636 cat >> confdefs.h <<\EOF
8637#define HAVE_PROCFS_PIOCSET 1
c906108c 8638EOF
97bf5e38
MK
8639
8640 fi
c906108c 8641fi
c906108c 8642
97bf5e38
MK
8643if test ${host} = ${target} ; then
8644
8645 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
02d62932 8646echo "configure:8647: checking for member l_addr in struct link_map" >&5
97bf5e38 8647 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8648 echo $ac_n "(cached) $ac_c" 1>&6
8649else
8650 cat > conftest.$ac_ext <<EOF
02d62932 8651#line 8652 "configure"
c906108c 8652#include "confdefs.h"
97bf5e38 8653#include <link.h>
c906108c 8654int main() {
97bf5e38 8655struct link_map lm; (void) lm.l_addr;
c906108c
SS
8656; return 0; }
8657EOF
02d62932 8658if { (eval echo configure:8659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8659 rm -rf conftest*
97bf5e38 8660 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8661else
8662 echo "configure: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8664 rm -rf conftest*
97bf5e38 8665 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8666fi
8667rm -f conftest*
8668fi
8669
97bf5e38
MK
8670 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8671 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8672 cat >> confdefs.h <<\EOF
8673#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8674EOF
97bf5e38
MK
8675
8676 fi
8677
8678
8679 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
02d62932 8680echo "configure:8681: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8681 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8682 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8683else
97bf5e38 8684 cat > conftest.$ac_ext <<EOF
02d62932 8685#line 8686 "configure"
97bf5e38
MK
8686#include "confdefs.h"
8687#include <sys/types.h>
8688#include <link.h>
8689int main() {
8690struct link_map lm; (void) lm.lm_addr;
8691; return 0; }
8692EOF
02d62932 8693if { (eval echo configure:8694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8694 rm -rf conftest*
8695 gdb_cv_have_struct_link_map_with_lm_members=yes
8696else
8697 echo "configure: failed program was:" >&5
8698 cat conftest.$ac_ext >&5
8699 rm -rf conftest*
8700 gdb_cv_have_struct_link_map_with_lm_members=no
8701fi
8702rm -f conftest*
c906108c 8703fi
c906108c 8704
97bf5e38
MK
8705 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8706 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8707 cat >> confdefs.h <<\EOF
8708#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8709EOF
8710
8711 fi
8712
8713
8714 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
02d62932 8715echo "configure:8716: checking for member som_addr in struct so_map" >&5
97bf5e38 8716 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8717 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8718else
8719 cat > conftest.$ac_ext <<EOF
02d62932 8720#line 8721 "configure"
c906108c 8721#include "confdefs.h"
97bf5e38
MK
8722#include <sys/types.h>
8723#ifdef HAVE_NLIST_H
8724#include <nlist.h>
8725#endif
8726#include <link.h>
8727int main() {
8728struct so_map lm; (void) lm.som_addr;
8729; return 0; }
8730EOF
02d62932 8731if { (eval echo configure:8732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8732 rm -rf conftest*
8733 gdb_cv_have_struct_so_map_with_som_members=yes
8734else
8735 echo "configure: failed program was:" >&5
8736 cat conftest.$ac_ext >&5
8737 rm -rf conftest*
8738 gdb_cv_have_struct_so_map_with_som_members=no
8739fi
8740rm -f conftest*
8741fi
c906108c 8742
97bf5e38
MK
8743 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8744 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8745 cat >> confdefs.h <<\EOF
8746#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8747EOF
c906108c 8748
97bf5e38 8749 fi
c906108c 8750
97bf5e38
MK
8751
8752 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
02d62932 8753echo "configure:8754: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8754 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8755 echo $ac_n "(cached) $ac_c" 1>&6
8756else
8757 cat > conftest.$ac_ext <<EOF
02d62932 8758#line 8759 "configure"
97bf5e38
MK
8759#include "confdefs.h"
8760#define _SYSCALL32
8761#include <sys/link.h>
8762int main() {
8763struct link_map32 l;
8764; return 0; }
8765EOF
02d62932 8766if { (eval echo configure:8767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8767 rm -rf conftest*
8768 gdb_cv_have_struct_link_map32=yes
8769else
8770 echo "configure: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8772 rm -rf conftest*
8773 gdb_cv_have_struct_link_map32=no
8774fi
8775rm -f conftest*
8776fi
c906108c 8777
97bf5e38
MK
8778 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8779 if test $gdb_cv_have_struct_link_map32 = yes; then
8780 cat >> confdefs.h <<\EOF
8781#define HAVE_STRUCT_LINK_MAP32 1
8782EOF
c906108c 8783
97bf5e38
MK
8784 cat >> confdefs.h <<\EOF
8785#define _SYSCALL32 1
8786EOF
c906108c 8787
97bf5e38
MK
8788 fi
8789fi
c906108c 8790
c906108c 8791
97bf5e38 8792echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
02d62932 8793echo "configure:8794: checking for long long support in compiler" >&5
97bf5e38
MK
8794if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8795 echo $ac_n "(cached) $ac_c" 1>&6
8796else
8797 cat > conftest.$ac_ext <<EOF
02d62932 8798#line 8799 "configure"
97bf5e38 8799#include "confdefs.h"
c906108c 8800
97bf5e38 8801int main() {
c906108c 8802
97bf5e38
MK
8803 extern long long foo;
8804 switch (foo & 2) { case 0: return 1; }
c906108c 8805
97bf5e38
MK
8806; return 0; }
8807EOF
02d62932 8808if { (eval echo configure:8809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8809 rm -rf conftest*
8810 gdb_cv_c_long_long=yes
8811else
8812 echo "configure: failed program was:" >&5
8813 cat conftest.$ac_ext >&5
8814 rm -rf conftest*
8815 gdb_cv_c_long_long=no
8816fi
8817rm -f conftest*
8818fi
c906108c 8819
97bf5e38
MK
8820echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8821if test $gdb_cv_c_long_long = yes; then
8822 cat >> confdefs.h <<\EOF
8823#define CC_HAS_LONG_LONG 1
8824EOF
8825
8826fi
8827
8828
8829echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
02d62932 8830echo "configure:8831: checking for long long support in printf" >&5
97bf5e38
MK
8831if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8832 echo $ac_n "(cached) $ac_c" 1>&6
8833else
8834 if test "$cross_compiling" = yes; then
8835 gdb_cv_printf_has_long_long=no
8836else
8837 cat > conftest.$ac_ext <<EOF
02d62932 8838#line 8839 "configure"
97bf5e38
MK
8839#include "confdefs.h"
8840
8841int main () {
8842 char buf[32];
8843 long long l = 0;
8844 l = (l << 16) + 0x0123;
8845 l = (l << 16) + 0x4567;
8846 l = (l << 16) + 0x89ab;
8847 l = (l << 16) + 0xcdef;
8848 sprintf (buf, "0x%016llx", l);
8849 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8850}
97bf5e38 8851EOF
02d62932 8852if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8853then
8854 gdb_cv_printf_has_long_long=yes
8855else
8856 echo "configure: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8858 rm -fr conftest*
8859 gdb_cv_printf_has_long_long=no
8860fi
8861rm -fr conftest*
8862fi
8863
8864fi
8865
8866if test $gdb_cv_printf_has_long_long = yes; then
8867 cat >> confdefs.h <<\EOF
8868#define PRINTF_HAS_LONG_LONG 1
8869EOF
8870
8871fi
8872echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8873
8874
8875echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
02d62932 8876echo "configure:8877: checking for long double support in compiler" >&5
97bf5e38
MK
8877if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8878 echo $ac_n "(cached) $ac_c" 1>&6
8879else
8880 cat > conftest.$ac_ext <<EOF
02d62932 8881#line 8882 "configure"
97bf5e38
MK
8882#include "confdefs.h"
8883
8884int main() {
8885long double foo;
8886; return 0; }
8887EOF
02d62932 8888if { (eval echo configure:8889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8889 rm -rf conftest*
8890 ac_cv_c_long_double=yes
8891else
8892 echo "configure: failed program was:" >&5
8893 cat conftest.$ac_ext >&5
8894 rm -rf conftest*
8895 ac_cv_c_long_double=no
8896fi
8897rm -f conftest*
8898fi
c906108c 8899
97bf5e38
MK
8900echo "$ac_t""$ac_cv_c_long_double" 1>&6
8901if test $ac_cv_c_long_double = yes; then
8902 cat >> confdefs.h <<\EOF
8903#define HAVE_LONG_DOUBLE 1
c906108c 8904EOF
97bf5e38
MK
8905
8906fi
8907
8908
8909echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
02d62932 8910echo "configure:8911: checking for long double support in printf" >&5
97bf5e38
MK
8911if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8912 echo $ac_n "(cached) $ac_c" 1>&6
8913else
8914 if test "$cross_compiling" = yes; then
8915 gdb_cv_printf_has_long_double=no
8916else
8917 cat > conftest.$ac_ext <<EOF
02d62932 8918#line 8919 "configure"
97bf5e38
MK
8919#include "confdefs.h"
8920
8921int main () {
8922 char buf[16];
8923 long double f = 3.141592653;
8924 sprintf (buf, "%Lg", f);
8925 return (strncmp ("3.14159", buf, 7));
8926}
8927EOF
02d62932 8928if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8929then
97bf5e38 8930 gdb_cv_printf_has_long_double=yes
c906108c
SS
8931else
8932 echo "configure: failed program was:" >&5
8933 cat conftest.$ac_ext >&5
8934 rm -fr conftest*
97bf5e38 8935 gdb_cv_printf_has_long_double=no
c906108c
SS
8936fi
8937rm -fr conftest*
8938fi
8939
8940fi
8941
97bf5e38 8942if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8943 cat >> confdefs.h <<\EOF
97bf5e38
MK
8944#define PRINTF_HAS_LONG_DOUBLE 1
8945EOF
8946
8947fi
8948echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8949
8950
8951echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
02d62932 8952echo "configure:8953: checking for long double support in scanf" >&5
97bf5e38
MK
8953if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8954 echo $ac_n "(cached) $ac_c" 1>&6
8955else
8956 if test "$cross_compiling" = yes; then
8957 gdb_cv_scanf_has_long_double=no
8958else
8959 cat > conftest.$ac_ext <<EOF
02d62932 8960#line 8961 "configure"
97bf5e38
MK
8961#include "confdefs.h"
8962
8963int main () {
8964 char *buf = "3.141592653";
8965 long double f = 0;
8966 sscanf (buf, "%Lg", &f);
8967 return !(f > 3.14159 && f < 3.14160);
8968}
c906108c 8969EOF
02d62932 8970if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8971then
8972 gdb_cv_scanf_has_long_double=yes
8973else
8974 echo "configure: failed program was:" >&5
8975 cat conftest.$ac_ext >&5
8976 rm -fr conftest*
8977 gdb_cv_scanf_has_long_double=no
8978fi
8979rm -fr conftest*
8980fi
c906108c
SS
8981
8982fi
8983
97bf5e38
MK
8984if test $gdb_cv_scanf_has_long_double = yes; then
8985 cat >> confdefs.h <<\EOF
8986#define SCANF_HAS_LONG_DOUBLE 1
8987EOF
8988
8989fi
8990echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8991
438013df
AO
8992case ${host_os} in
8993aix*)
8994 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
02d62932 8995echo "configure:8996: checking for -bbigtoc option" >&5
438013df
AO
8996if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8997 echo $ac_n "(cached) $ac_c" 1>&6
8998else
8999
9000 SAVE_LDFLAGS=$LDFLAGS
9001
9002 case $GCC in
9003 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9004 *) gdb_cv_bigtoc=-bbigtoc ;;
9005 esac
9006
9007 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9008 cat > conftest.$ac_ext <<EOF
02d62932 9009#line 9010 "configure"
438013df
AO
9010#include "confdefs.h"
9011
9012int main() {
9013int i;
9014; return 0; }
9015EOF
02d62932 9016if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
9017 :
9018else
9019 echo "configure: failed program was:" >&5
9020 cat conftest.$ac_ext >&5
9021 rm -rf conftest*
9022 gdb_cv_bigtoc=
9023fi
9024rm -f conftest*
9025
9026fi
9027
9028echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9029 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9030 ;;
9031esac
9032
c906108c
SS
9033
9034
9035if test ${build} = ${host} -a ${host} = ${target} ; then
9036 case ${host_os} in
9037 hpux*)
9038 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
02d62932 9039echo "configure:9040: checking for HPUX/OSF thread support" >&5
c906108c
SS
9040 if test -f /usr/include/dce/cma_config.h ; then
9041 if test "$GCC" = "yes" ; then
9042 echo "$ac_t""yes" 1>&6
9043 cat >> confdefs.h <<\EOF
9044#define HAVE_HPUX_THREAD_SUPPORT 1
9045EOF
9046
3483b318 9047 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9048 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9049 else
9050 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9051 fi
9052 else
9053 echo "$ac_t""no" 1>&6
9054 fi
9055 ;;
9056 solaris*)
d92419e5
JB
9057 # See if thread_db library is around for Solaris thread debugging.
9058 # Note that we must explicitly test for version 1 of the library
9059 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9060 # the same API.
c906108c 9061 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
02d62932 9062echo "configure:9063: checking for Solaris thread debugging library" >&5
c906108c
SS
9063 if test -f /usr/lib/libthread_db.so.1 ; then
9064 echo "$ac_t""yes" 1>&6
9065 cat >> confdefs.h <<\EOF
9066#define HAVE_THREAD_DB_LIB 1
9067EOF
9068
3483b318 9069 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9070 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9071 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
02d62932 9072echo "configure:9073: checking for dlopen in -ldl" >&5
c906108c
SS
9073ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9074if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9075 echo $ac_n "(cached) $ac_c" 1>&6
9076else
9077 ac_save_LIBS="$LIBS"
9078LIBS="-ldl $LIBS"
9079cat > conftest.$ac_ext <<EOF
02d62932 9080#line 9081 "configure"
c906108c
SS
9081#include "confdefs.h"
9082/* Override any gcc2 internal prototype to avoid an error. */
9083/* We use char because int might match the return type of a gcc2
9084 builtin and then its argument prototype would still apply. */
9085char dlopen();
9086
9087int main() {
9088dlopen()
9089; return 0; }
9090EOF
02d62932 9091if { (eval echo configure:9092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9092 rm -rf conftest*
9093 eval "ac_cv_lib_$ac_lib_var=yes"
9094else
9095 echo "configure: failed program was:" >&5
9096 cat conftest.$ac_ext >&5
9097 rm -rf conftest*
9098 eval "ac_cv_lib_$ac_lib_var=no"
9099fi
9100rm -f conftest*
9101LIBS="$ac_save_LIBS"
9102
9103fi
9104if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9105 echo "$ac_t""yes" 1>&6
9106 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9107 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9108 cat >> confdefs.h <<EOF
9109#define $ac_tr_lib 1
9110EOF
9111
9112 LIBS="-ldl $LIBS"
9113
9114else
9115 echo "$ac_t""no" 1>&6
9116fi
9117
9118 if test "$GCC" = "yes" ; then
9119 # The GNU linker requires the -export-dynamic option to make
9120 # all symbols visible in the dynamic symbol table.
9121 hold_ldflags=$LDFLAGS
9122 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
02d62932 9123echo "configure:9124: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9124 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9125 cat > conftest.$ac_ext <<EOF
02d62932 9126#line 9127 "configure"
c906108c
SS
9127#include "confdefs.h"
9128
9129int main() {
9130int i;
9131; return 0; }
9132EOF
02d62932 9133if { (eval echo configure:9134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9134 rm -rf conftest*
9135 found=yes
9136else
9137 echo "configure: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 rm -rf conftest*
9140 found=no
9141fi
9142rm -f conftest*
9143 LDFLAGS=$hold_ldflags
9144 echo "$ac_t""$found" 1>&6
9145 if test $found = yes; then
9146 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9147 fi
9148 fi
9149 # Sun randomly tweaked the prototypes in <proc_service.h>
9150 # at one point.
9151 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
02d62932 9152echo "configure:9153: checking if <proc_service.h> is old" >&5
c906108c
SS
9153 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9154 echo $ac_n "(cached) $ac_c" 1>&6
9155else
9156
9157 cat > conftest.$ac_ext <<EOF
02d62932 9158#line 9159 "configure"
c906108c
SS
9159#include "confdefs.h"
9160
9161 #include <proc_service.h>
9162 ps_err_e ps_pdwrite
9163 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9164
9165int main() {
9166
9167; return 0; }
9168EOF
02d62932 9169if { (eval echo configure:9170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9170 rm -rf conftest*
9171 gdb_cv_proc_service_is_old=no
9172else
9173 echo "configure: failed program was:" >&5
9174 cat conftest.$ac_ext >&5
9175 rm -rf conftest*
9176 gdb_cv_proc_service_is_old=yes
9177fi
9178rm -f conftest*
9179
9180fi
9181
9182 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9183 if test $gdb_cv_proc_service_is_old = yes; then
9184 cat >> confdefs.h <<\EOF
9185#define PROC_SERVICE_IS_OLD 1
9186EOF
9187
9188 fi
9189 else
9190 echo "$ac_t""no" 1>&6
9191 fi
9192 ;;
d92419e5
JB
9193 aix*)
9194 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
02d62932 9195echo "configure:9196: checking for AiX thread debugging library" >&5
d92419e5
JB
9196 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9197 echo $ac_n "(cached) $ac_c" 1>&6
9198else
9199 cat > conftest.$ac_ext <<EOF
02d62932 9200#line 9201 "configure"
d92419e5
JB
9201#include "confdefs.h"
9202#include <sys/pthdebug.h>
9203int main() {
9204#ifndef PTHDB_VERSION_3
9205 #error
9206 #endif
9207; return 0; }
9208EOF
02d62932 9209if { (eval echo configure:9210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9210 rm -rf conftest*
9211 gdb_cv_have_aix_thread_debug=yes
9212else
9213 echo "configure: failed program was:" >&5
9214 cat conftest.$ac_ext >&5
9215 rm -rf conftest*
9216 gdb_cv_have_aix_thread_debug=no
9217fi
9218rm -f conftest*
9219fi
9220
9221 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9222 if test $gdb_cv_have_aix_thread_debug = yes; then
9223 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9224 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9225 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9226 fi
9227 ;;
c906108c
SS
9228 esac
9229
9230fi
9231
3f47be5c
EZ
9232if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9233 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
02d62932 9234echo "configure:9235: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9235if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9236 echo $ac_n "(cached) $ac_c" 1>&6
9237else
9238 cat > conftest.$ac_ext <<EOF
02d62932 9239#line 9240 "configure"
3f47be5c
EZ
9240#include "confdefs.h"
9241#include <thread_db.h>
9242int main() {
9243int i = TD_NOTALLOC;
9244; return 0; }
9245EOF
02d62932 9246if { (eval echo configure:9247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9247 rm -rf conftest*
9248 gdb_cv_thread_db_h_has_td_notalloc=yes
9249else
9250 echo "configure: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252 rm -rf conftest*
9253 gdb_cv_thread_db_h_has_td_notalloc=no
9254
9255fi
9256rm -f conftest*
9257
9258fi
9259
9260echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9261fi
9262if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9263 cat >> confdefs.h <<\EOF
9264#define THREAD_DB_HAS_TD_NOTALLOC 1
9265EOF
9266
9267fi
9268
b757528f
JJ
9269if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9270 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
02d62932 9271echo "configure:9272: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9272if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9273 echo $ac_n "(cached) $ac_c" 1>&6
9274else
9275 cat > conftest.$ac_ext <<EOF
02d62932 9276#line 9277 "configure"
b757528f
JJ
9277#include "confdefs.h"
9278#include <sys/syscall.h>
9279int main() {
9280int i = __NR_tkill;
9281; return 0; }
9282EOF
02d62932 9283if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9284 rm -rf conftest*
9285 gdb_cv_sys_syscall_h_has_tkill=yes
9286else
9287 echo "configure: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 rm -rf conftest*
9290 gdb_cv_sys_syscall_h_has_tkill=no
9291
9292fi
9293rm -f conftest*
9294
9295fi
9296
9297echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9298fi
9299if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9300 cat >> confdefs.h <<\EOF
9301#define HAVE_TKILL_SYSCALL 1
9302EOF
9303
9304fi
9305
fb40c209 9306
030292b7
DJ
9307# Check whether --with-sysroot or --without-sysroot was given.
9308if test "${with_sysroot+set}" = set; then
9309 withval="$with_sysroot"
9310
9311 case ${with_sysroot} in
715d1656 9312 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9313 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9314 esac
9315
9316 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9317
9318 if test "x$exec_prefix" = xNONE; then
9319 if test "x$prefix" = xNONE; then
9320 test_prefix=/usr/local
9321 else
9322 test_prefix=$prefix
9323 fi
9324 else
9325 test_prefix=$exec_prefix
9326 fi
9327 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9328 "${test_prefix}"|"${test_prefix}/"*|\
9329 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9330 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9331 TARGET_SYSTEM_ROOT_DEFINE="$t"
9332 ;;
9333 esac
9334
9335else
9336
9337 TARGET_SYSTEM_ROOT=
9338 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9339
9340fi
9341
9342
9343
9344
3b851bce
AC
9345# NOTE: Don't add -Wall or -Wunused, they both include
9346# -Wunused-parameter which reports bogus warnings.
9347# NOTE: If you add to this list, remember to update
9348# gdb/doc/gdbint.texinfo.
1decb323 9349build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9350-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9351-Wunused-label -Wunused-function"
d8038014 9352# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9353# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9354# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9355# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9356# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9357# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9358# Check whether --enable-build-warnings or --disable-build-warnings was given.
9359if test "${enable_build_warnings+set}" = set; then
9360 enableval="$enable_build_warnings"
1decb323 9361 case "${enableval}" in
c906108c
SS
9362 yes) ;;
9363 no) build_warnings="-w";;
9364 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9365 build_warnings="${build_warnings} ${t}";;
9366 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9367 build_warnings="${t} ${build_warnings}";;
9368 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9369esac
d4f3574e 9370if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9371 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9372fi
1decb323 9373fi
3b851bce
AC
9374# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9375if test "${enable_gdb_build_warnings+set}" = set; then
9376 enableval="$enable_gdb_build_warnings"
9377 case "${enableval}" in
9378 yes) ;;
9379 no) build_warnings="-w";;
9380 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9381 build_warnings="${build_warnings} ${t}";;
9382 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9383 build_warnings="${t} ${build_warnings}";;
9384 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9385esac
9386if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9387 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9388fi
9389fi
104c1213
JM
9390WARN_CFLAGS=""
9391WERROR_CFLAGS=""
c906108c
SS
9392if test "x${build_warnings}" != x -a "x$GCC" = xyes
9393then
746a987d 9394 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
02d62932 9395echo "configure:9396: checking compiler warning flags" >&5
746a987d
AC
9396 # Separate out the -Werror flag as some files just cannot be
9397 # compiled with it enabled.
9398 for w in ${build_warnings}; do
9399 case $w in
9400 -Werr*) WERROR_CFLAGS=-Werror ;;
9401 *) # Check that GCC accepts it
4536bbc6
AC
9402 saved_CFLAGS="$CFLAGS"
9403 CFLAGS="$CFLAGS $w"
9404 cat > conftest.$ac_ext <<EOF
02d62932 9405#line 9406 "configure"
4536bbc6
AC
9406#include "confdefs.h"
9407
9408int main() {
9409
9410; return 0; }
9411EOF
02d62932 9412if { (eval echo configure:9413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9413 rm -rf conftest*
9414 WARN_CFLAGS="${WARN_CFLAGS} $w"
9415else
9416 echo "configure: failed program was:" >&5
9417 cat conftest.$ac_ext >&5
9418fi
9419rm -f conftest*
9420 CFLAGS="$saved_CFLAGS"
746a987d
AC
9421 esac
9422 done
9423 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9424fi
9425
9426
104c1213 9427
7a292a7a
SS
9428# In the Cygwin environment, we need some additional flags.
9429echo $ac_n "checking for cygwin""... $ac_c" 1>&6
02d62932 9430echo "configure:9431: checking for cygwin" >&5
7a292a7a
SS
9431if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9432 echo $ac_n "(cached) $ac_c" 1>&6
9433else
9434 cat > conftest.$ac_ext <<EOF
02d62932 9435#line 9436 "configure"
7a292a7a
SS
9436#include "confdefs.h"
9437
9438#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9439lose
9440#endif
9441EOF
9442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9443 egrep "lose" >/dev/null 2>&1; then
9444 rm -rf conftest*
9445 gdb_cv_os_cygwin=yes
9446else
9447 rm -rf conftest*
9448 gdb_cv_os_cygwin=no
9449fi
9450rm -f conftest*
9451
9452fi
9453
9454echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9455
aff38e61
AC
9456
9457SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9458case ${host} in
95cbc983
AC
9459 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9460 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9461esac
9462
9463
cd0fc7c3
SS
9464# libreadline needs libuser32.a in a cygwin environment
9465WIN32LIBS=
9466if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9467 WIN32LIBS="-luser32"
9468 case "${target}" in
9469 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9470 ;;
9471 esac
cd0fc7c3 9472fi
c906108c 9473
7a292a7a 9474
3fc11d3e
JM
9475LIBGUI="../libgui/src/libgui.a"
9476GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9477
9478
7a292a7a 9479
3fc11d3e
JM
9480WIN32LDAPP=
9481
9482
9483
9484configdir="unix"
9485
9486GDBTKLIBS=
9487if test "${enable_gdbtk}" = "yes"; then
9488
d1c3b63a
KS
9489 # Gdbtk must have an absolute path to srcdir in order to run
9490 # properly when not installed.
9491 here=`pwd`
9492 cd ${srcdir}
9493 GDBTK_SRC_DIR=`pwd`
9494 cd $here
9495
3fc11d3e
JM
9496
9497#
9498# Ok, lets find the tcl configuration
9499# First, look for one uninstalled.
9500# the alternative search directory is invoked by --with-tclconfig
9501#
9502
9503if test x"${no_tcl}" = x ; then
9504 # we reset no_tcl in case something fails here
9505 no_tcl=true
9506 # Check whether --with-tclconfig or --without-tclconfig was given.
9507if test "${with_tclconfig+set}" = set; then
9508 withval="$with_tclconfig"
9509 with_tclconfig=${withval}
9510fi
9511
9512 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
02d62932 9513echo "configure:9514: checking for Tcl configuration" >&5
3fc11d3e
JM
9514 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9515 echo $ac_n "(cached) $ac_c" 1>&6
9516else
9517
9518
9519 # First check to see if --with-tclconfig was specified.
9520 if test x"${with_tclconfig}" != x ; then
9521 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9522 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9523 else
9524 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9525 fi
9526 fi
9527
9528 # then check for a private Tcl installation
9529 if test x"${ac_cv_c_tclconfig}" = x ; then
9530 for i in \
9531 ../tcl \
9532 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9533 ../../tcl \
9534 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9535 ../../../tcl \
9536 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9537 if test -f "$i/${configdir}/tclConfig.sh" ; then
9538 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9539 break
9540 fi
9541 done
9542 fi
9543 # check in a few common install locations
9544 if test x"${ac_cv_c_tclconfig}" = x ; then
9545 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9546 if test -f "$i/tclConfig.sh" ; then
9547 ac_cv_c_tclconfig=`(cd $i; pwd)`
9548 break
9549 fi
9550 done
9551 fi
9552 # check in a few other private locations
9553 if test x"${ac_cv_c_tclconfig}" = x ; then
9554 for i in \
9555 ${srcdir}/../tcl \
9556 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9557 if test -f "$i/${configdir}/tclConfig.sh" ; then
9558 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9559 break
9560 fi
9561 done
9562 fi
9563
9564fi
9565
9566 if test x"${ac_cv_c_tclconfig}" = x ; then
9567 TCLCONFIG="# no Tcl configs found"
9568 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9569 else
9570 no_tcl=
9571 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9572 echo "$ac_t""found $TCLCONFIG" 1>&6
9573 fi
9574fi
9575
9576 if test -z "${no_tcl}"; then
9577
9578 . $TCLCONFIG
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
033afc63 9599
3fc11d3e
JM
9600
9601
9602
9603
9604
9605
9606#
9607# Ok, lets find the tk configuration
9608# First, look for one uninstalled.
9609# the alternative search directory is invoked by --with-tkconfig
9610#
9611
9612if test x"${no_tk}" = x ; then
9613 # we reset no_tk in case something fails here
9614 no_tk=true
9615 # Check whether --with-tkconfig or --without-tkconfig was given.
9616if test "${with_tkconfig+set}" = set; then
9617 withval="$with_tkconfig"
9618 with_tkconfig=${withval}
9619fi
9620
9621 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
02d62932 9622echo "configure:9623: checking for Tk configuration" >&5
3fc11d3e
JM
9623 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9624 echo $ac_n "(cached) $ac_c" 1>&6
9625else
9626
9627
9628 # First check to see if --with-tkconfig was specified.
9629 if test x"${with_tkconfig}" != x ; then
9630 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9631 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9632 else
9633 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9634 fi
9635 fi
9636
9637 # then check for a private Tk library
9638 if test x"${ac_cv_c_tkconfig}" = x ; then
9639 for i in \
9640 ../tk \
9641 `ls -dr ../tk[4-9]* 2>/dev/null` \
9642 ../../tk \
9643 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9644 ../../../tk \
9645 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9646 if test -f "$i/${configdir}/tkConfig.sh" ; then
9647 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9648 break
9649 fi
9650 done
9651 fi
9652 # check in a few common install locations
9653 if test x"${ac_cv_c_tkconfig}" = x ; then
9654 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9655 if test -f "$i/tkConfig.sh" ; then
9656 ac_cv_c_tkconfig=`(cd $i; pwd)`
9657 break
9658 fi
9659 done
9660 fi
9661 # check in a few other private locations
9662 if test x"${ac_cv_c_tkconfig}" = x ; then
9663 for i in \
9664 ${srcdir}/../tk \
9665 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9666 if test -f "$i/${configdir}/tkConfig.sh" ; then
9667 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9668 break
9669 fi
9670 done
9671 fi
9672
9673fi
9674
9675 if test x"${ac_cv_c_tkconfig}" = x ; then
9676 TKCONFIG="# no Tk configs found"
9677 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9678 else
9679 no_tk=
9680 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9681 echo "$ac_t""found $TKCONFIG" 1>&6
9682 fi
9683fi
9684
9685
9686
dd2504ab
JM
9687 # now look for Tcl library stuff
9688
9689 case "${host}" in
9690 *-*-cygwin*)
9691 tcldir=../tcl/win/
9692 ;;
9693 *)
9694 tcldir=../tcl/unix/
9695 ;;
9696 esac
9697
9698 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9699
3fc11d3e
JM
9700 # If $no_tk is nonempty, then we can't do Tk, and there is no
9701 # point to doing Tcl.
9702 if test -z "${no_tk}"; then
9703
9704 if test -f "$TKCONFIG" ; then
9705 . $TKCONFIG
9706 fi
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721#
9722# Ok, lets find the tcl source trees so we can use the headers
9723# Warning: transition of version 9 to 10 will break this algorithm
9724# because 10 sorts before 9. We also look for just tcl. We have to
9725# be careful that we don't match stuff like tclX by accident.
9726# the alternative search directory is involked by --with-tclinclude
9727#
9728
9729no_tcl=true
9730echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
02d62932 9731echo "configure:9732: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9732# Check whether --with-tclinclude or --without-tclinclude was given.
9733if test "${with_tclinclude+set}" = set; then
9734 withval="$with_tclinclude"
9735 with_tclinclude=${withval}
9736fi
9737
9738if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9739 echo $ac_n "(cached) $ac_c" 1>&6
9740else
9741
9742# first check to see if --with-tclinclude was specified
9743if test x"${with_tclinclude}" != x ; then
9744 if test -f ${with_tclinclude}/tclInt.h ; then
9745 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9746 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9747 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9748 else
9749 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9750 fi
9751fi
9752
9753# next check if it came with Tcl configuration file
9754if test x"${ac_cv_c_tclconfig}" = x ; then
9755 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9756 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9757 fi
9758fi
9759
9760# next check in private source directory
9761#
9762# since ls returns lowest version numbers first, reverse its output
9763if test x"${ac_cv_c_tclh}" = x ; then
9764 for i in \
9765 ${srcdir}/../tcl \
9766 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9767 ${srcdir}/../../tcl \
9768 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9769 ${srcdir}/../../../tcl \
9770 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9771 if test -f $i/generic/tclInt.h ; then
9772 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9773 break
9774 fi
9775 done
9776fi
9777# finally check in a few common install locations
9778#
9779# since ls returns lowest version numbers first, reverse its output
9780if test x"${ac_cv_c_tclh}" = x ; then
9781 for i in \
9782 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9783 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9784 /usr/local/src/tcl \
9785 /usr/local/lib/tcl \
9786 ${prefix}/include ; do
9787 if test -f $i/generic/tclInt.h ; then
9788 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9789 break
9790 fi
9791 done
9792fi
9793# see if one is installed
9794if test x"${ac_cv_c_tclh}" = x ; then
9795 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9796echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
02d62932 9797echo "configure:9798: checking for tclInt.h" >&5
3fc11d3e
JM
9798if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9799 echo $ac_n "(cached) $ac_c" 1>&6
9800else
9801 cat > conftest.$ac_ext <<EOF
02d62932 9802#line 9803 "configure"
3fc11d3e
JM
9803#include "confdefs.h"
9804#include <tclInt.h>
9805EOF
9806ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 9807{ (eval echo configure:9808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9808ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9809if test -z "$ac_err"; then
9810 rm -rf conftest*
9811 eval "ac_cv_header_$ac_safe=yes"
9812else
9813 echo "$ac_err" >&5
9814 echo "configure: failed program was:" >&5
9815 cat conftest.$ac_ext >&5
9816 rm -rf conftest*
9817 eval "ac_cv_header_$ac_safe=no"
9818fi
9819rm -f conftest*
9820fi
9821if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9822 echo "$ac_t""yes" 1>&6
9823 ac_cv_c_tclh=installed
9824else
9825 echo "$ac_t""no" 1>&6
9826ac_cv_c_tclh=""
9827fi
9828
9829fi
9830
9831fi
9832
9833if test x"${ac_cv_c_tclh}" = x ; then
9834 TCLHDIR="# no Tcl private headers found"
9835 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9836fi
9837if test x"${ac_cv_c_tclh}" != x ; then
9838 no_tcl=""
9839 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9840 echo "$ac_t""is installed" 1>&6
9841 TCLHDIR=""
9842 else
9843 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9844 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9845 TCLHDIR="-I${ac_cv_c_tclh}"
9846 fi
9847fi
9848
9849
9850
9851
9852#
9853# Ok, lets find the tk source trees so we can use the headers
9854# If the directory (presumably symlink) named "tk" exists, use that one
9855# in preference to any others. Same logic is used when choosing library
9856# and again with Tcl. The search order is the best place to look first, then in
9857# decreasing significance. The loop breaks if the trigger file is found.
9858# Note the gross little conversion here of srcdir by cd'ing to the found
9859# directory. This converts the path from a relative to an absolute, so
9860# recursive cache variables for the path will work right. We check all
9861# the possible paths in one loop rather than many seperate loops to speed
9862# things up.
9863# the alternative search directory is involked by --with-tkinclude
9864#
9865no_tk=true
9866echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
02d62932 9867echo "configure:9868: checking for Tk private headers" >&5
3fc11d3e
JM
9868# Check whether --with-tkinclude or --without-tkinclude was given.
9869if test "${with_tkinclude+set}" = set; then
9870 withval="$with_tkinclude"
9871 with_tkinclude=${withval}
9872fi
9873
9874if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9875 echo $ac_n "(cached) $ac_c" 1>&6
9876else
9877
9878# first check to see if --with-tkinclude was specified
9879if test x"${with_tkinclude}" != x ; then
9880 if test -f ${with_tkinclude}/tk.h ; then
9881 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9882 elif test -f ${with_tkinclude}/generic/tk.h ; then
9883 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9884 else
9885 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9886 fi
9887fi
9888
9889# next check if it came with Tk configuration file
9890if test x"${ac_cv_c_tkconfig}" = x ; then
9891 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9892 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9893 fi
9894fi
9895
9896# next check in private source directory
9897#
9898# since ls returns lowest version numbers first, reverse its output
9899if test x"${ac_cv_c_tkh}" = x ; then
9900 for i in \
9901 ${srcdir}/../tk \
9902 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9903 ${srcdir}/../../tk \
9904 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9905 ${srcdir}/../../../tk \
9906 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9907 if test -f $i/generic/tk.h ; then
9908 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9909 break
9910 fi
9911 done
9912fi
9913# finally check in a few common install locations
9914#
9915# since ls returns lowest version numbers first, reverse its output
9916if test x"${ac_cv_c_tkh}" = x ; then
9917 for i in \
9918 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9919 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9920 /usr/local/src/tk \
9921 /usr/local/lib/tk \
9922 ${prefix}/include ; do
9923 if test -f $i/generic/tk.h ; then
9924 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9925 break
9926 fi
9927 done
9928fi
9929# see if one is installed
9930if test x"${ac_cv_c_tkh}" = x ; then
9931 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9932echo $ac_n "checking for tk.h""... $ac_c" 1>&6
02d62932 9933echo "configure:9934: checking for tk.h" >&5
3fc11d3e
JM
9934if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9935 echo $ac_n "(cached) $ac_c" 1>&6
9936else
9937 cat > conftest.$ac_ext <<EOF
02d62932 9938#line 9939 "configure"
3fc11d3e
JM
9939#include "confdefs.h"
9940#include <tk.h>
9941EOF
9942ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 9943{ (eval echo configure:9944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9944ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9945if test -z "$ac_err"; then
9946 rm -rf conftest*
9947 eval "ac_cv_header_$ac_safe=yes"
9948else
9949 echo "$ac_err" >&5
9950 echo "configure: failed program was:" >&5
9951 cat conftest.$ac_ext >&5
9952 rm -rf conftest*
9953 eval "ac_cv_header_$ac_safe=no"
9954fi
9955rm -f conftest*
9956fi
9957if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9958 echo "$ac_t""yes" 1>&6
9959 ac_cv_c_tkh=installed
9960else
9961 echo "$ac_t""no" 1>&6
9962ac_cv_c_tkh=""
9963fi
9964
9965fi
9966
9967fi
9968
9969if test x"${ac_cv_c_tkh}" != x ; then
9970 no_tk=""
9971 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9972 echo "$ac_t""is installed" 1>&6
9973 TKHDIR=""
9974 else
9975 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9976 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9977 TKHDIR="-I${ac_cv_c_tkh}"
9978 fi
9979else
9980 TKHDIR="# no Tk directory found"
9981 echo "configure: warning: Can't find Tk private headers" 1>&2
9982 no_tk=true
9983fi
9984
9985
9986
9987
9988echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
02d62932 9989echo "configure:9990: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9990if test x"${ac_cv_c_itclh}" = x ; then
9991 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9992 if test -f $i/generic/itcl.h ; then
9993 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9994 break
9995 fi
9996 done
9997fi
9998if test x"${ac_cv_c_itclh}" = x ; then
9999 ITCLHDIR="# no Itcl private headers found"
10000 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10001fi
10002if test x"${ac_cv_c_itclh}" != x ; then
10003 ITCLHDIR="-I${ac_cv_c_itclh}"
10004fi
10005# should always be here
10006# ITCLLIB="../itcl/itcl/unix/libitcl.a"
10007
10008#AC_SUBST(ITCLLIB)
10009
10010
10011echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
02d62932 10012echo "configure:10013: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10013if test x"${ac_cv_c_itkh}" = x ; then
10014 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10015 if test -f $i/generic/itk.h ; then
10016 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10017 break
10018 fi
10019 done
10020fi
10021if test x"${ac_cv_c_itkh}" = x ; then
10022 ITKHDIR="# no Itk private headers found"
10023 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10024fi
10025if test x"${ac_cv_c_itkh}" != x ; then
10026 ITKHDIR="-I${ac_cv_c_itkh}"
10027fi
10028# should always be here
10029# ITKLIB="../itcl/itk/unix/libitk.a"
10030
10031#AC_SUBST(ITKLIB)
10032
3fc11d3e 10033
dd2504ab
JM
10034
10035 # now look for Tk library stuff
10036
10037 case "${host}" in
10038 *-*-cygwin*)
10039 tkdir=../tk/win/
10040 ;;
10041 *)
10042 tkdir=../tk/unix/
10043 ;;
10044 esac
10045
10046 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10047
3fc11d3e
JM
10048 # now look for Itcl library stuff
10049
10050
10051#
10052# Ok, lets find the itcl configuration
10053# First, look for one uninstalled.
10054# the alternative search directory is invoked by --with-itclconfig
10055#
10056
10057if test x"${no_itcl}" = x ; then
10058 # we reset no_itcl in case something fails here
10059 no_itcl=true
10060 # Check whether --with-itclconfig or --without-itclconfig was given.
10061if test "${with_itclconfig+set}" = set; then
10062 withval="$with_itclconfig"
10063 with_itclconfig=${withval}
10064fi
10065
10066 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
02d62932 10067echo "configure:10068: checking for Itcl configuration" >&5
3fc11d3e
JM
10068 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10069 echo $ac_n "(cached) $ac_c" 1>&6
10070else
10071
10072
10073 # First check to see if --with-itclconfig was specified.
10074 if test x"${with_itclconfig}" != x ; then
10075 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10076 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10077 else
10078 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10079 fi
10080 fi
10081
10082 # then check for a private Itcl library
10083 if test x"${ac_cv_c_itclconfig}" = x ; then
10084 for i in \
10085 ../itcl/itcl \
10086 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10087 ../../itcl \
10088 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10089 ../../../itcl \
10090 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10091 if test -f "$i/itclConfig.sh" ; then
10092 ac_cv_c_itclconfig=`(cd $i; pwd)`
10093 break
10094 fi
10095 done
10096 fi
10097 # check in a few common install locations
10098 if test x"${ac_cv_c_itclconfig}" = x ; then
10099 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10100 if test -f "$i/itclConfig.sh" ; then
10101 ac_cv_c_itclconfig=`(cd $i; pwd)`
10102 break
10103 fi
10104 done
10105 fi
10106 # check in a few other private locations
10107 if test x"${ac_cv_c_itclconfig}" = x ; then
10108 for i in \
10109 ${srcdir}/../itcl/itcl \
10110 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10111 if test -f "$i/itclConfig.sh" ; then
10112 ac_cv_c_itclconfig=`(cd $i; pwd)`
10113 break
10114 fi
10115 done
10116 fi
10117
10118fi
10119
10120 if test x"${ac_cv_c_itclconfig}" = x ; then
10121 ITCLCONFIG="# no Itcl configs found"
10122 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10123 else
10124 no_itcl=
10125 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10126 echo "$ac_t""found $ITCLCONFIG" 1>&6
10127 fi
10128fi
10129
10130 if test -z "${no_itcl}"; then
10131
10132 if test -f "$ITCLCONFIG" ; then
10133 . $ITCLCONFIG
10134 fi
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
3fc11d3e
JM
10145
10146
10147 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10148 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10149 fi
10150
10151
10152 # now look for Itk library stuff
10153
10154#
10155# Ok, lets find the itk configuration
10156# First, look for one uninstalled.
10157# the alternative search directory is invoked by --with-itkconfig
10158#
10159
10160if test x"${no_itk}" = x ; then
10161 # we reset no_itk in case something fails here
10162 no_itk=true
10163 # Check whether --with-itkconfig or --without-itkconfig was given.
10164if test "${with_itkconfig+set}" = set; then
10165 withval="$with_itkconfig"
10166 with_itkconfig=${withval}
10167fi
10168
10169 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
02d62932 10170echo "configure:10171: checking for Itk configuration" >&5
3fc11d3e
JM
10171 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10172 echo $ac_n "(cached) $ac_c" 1>&6
10173else
10174
10175
10176 # First check to see if --with-itkconfig was specified.
10177 if test x"${with_itkconfig}" != x ; then
10178 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10179 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10180 else
10181 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10182 fi
10183 fi
10184
10185 # then check for a private Itk library
10186 if test x"${ac_cv_c_itkconfig}" = x ; then
10187 for i in \
10188 ../itcl/itk \
10189 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10190 ../../itk \
10191 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10192 ../../../itk \
10193 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10194 if test -f "$i/itkConfig.sh" ; then
10195 ac_cv_c_itkconfig=`(cd $i; pwd)`
10196 break
10197 fi
10198 done
10199 fi
10200 # check in a few common install locations
10201 if test x"${ac_cv_c_itkconfig}" = x ; then
10202 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10203 if test -f "$i/itkConfig.sh" ; then
10204 ac_cv_c_itkconfig=`(cd $i; pwd)`
10205 break
10206 fi
10207 done
10208 fi
10209 # check in a few other private locations
10210 if test x"${ac_cv_c_itkconfig}" = x ; then
10211 for i in \
10212 ${srcdir}/../itcl/itk \
10213 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10214 if test -f "$i/itkConfig.sh" ; then
10215 ac_cv_c_itkconfig=`(cd $i; pwd)`
10216 break
10217 fi
10218 done
10219 fi
10220
10221fi
10222
10223 if test x"${ac_cv_c_itkconfig}" = x ; then
10224 ITKCONFIG="# no Itk configs found"
10225 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10226 else
10227 no_itk=
10228 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10229 echo "$ac_t""found $ITKCONFIG" 1>&6
10230 fi
10231fi
10232
10233
10234 if test -z "${no_itcl}"; then
10235
10236 if test -f "$ITKCONFIG" ; then
10237 . $ITKCONFIG
10238 fi
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
3fc11d3e 10251 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10252 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10253 fi
10254
4226a5a5 10255 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10256 # Tcl/Tk 8.1 require -fwritable strings. I don't
10257 # know whether 8.2 will or not, but I bet it will.
10258 # I don't have to worry about 7.x since we don't support it.
10259 GDBTK_CFLAGS=""
10260 if test "$GCC" = "yes"; then
10261 if test "$TCL_VERSION" != "8.0" ; then
10262 GDBTK_CFLAGS="-fwritable-strings"
10263 fi
10264 fi
10265
10266 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10267 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10268 # Yes, the ordering seems wrong here. But it isn't.
10269 # TK_LIBS is the list of libraries that need to be linked
10270 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10271 # were in LIBS then any link tests after this point would
10272 # try to include things like `$(LIBGUI)', which wouldn't work.
10273 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10274
10275 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10276 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10277 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10278 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10279 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10280 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10281 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10282
10283 if test x$gdb_cv_os_cygwin = xyes; then
10284 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10285 WIN32LDAPP="-Wl,--subsystem,console"
10286 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10287 fi
10288 fi
10289 fi
ffc6a242 10290
ffc6a242 10291 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10292fi
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
dd2504ab 10306
c906108c
SS
10307# If we find X, set shell vars x_includes and x_libraries to the
10308# paths, otherwise set no_x=yes.
10309# Uses ac_ vars as temps to allow command line to override cache and checks.
10310# --without-x overrides everything else, but does not touch the cache.
10311echo $ac_n "checking for X""... $ac_c" 1>&6
02d62932 10312echo "configure:10313: checking for X" >&5
c906108c
SS
10313
10314# Check whether --with-x or --without-x was given.
10315if test "${with_x+set}" = set; then
10316 withval="$with_x"
10317 :
10318fi
10319
10320# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10321if test "x$with_x" = xno; then
10322 # The user explicitly disabled X.
10323 have_x=disabled
10324else
10325 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10326 # Both variables are already set.
10327 have_x=yes
10328 else
10329if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10330 echo $ac_n "(cached) $ac_c" 1>&6
10331else
10332 # One or both of the vars are not set, and there is no cached value.
10333ac_x_includes=NO ac_x_libraries=NO
10334rm -fr conftestdir
10335if mkdir conftestdir; then
10336 cd conftestdir
10337 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10338 cat > Imakefile <<'EOF'
10339acfindx:
10340 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10341EOF
10342 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10343 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10344 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10345 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10346 for ac_extension in a so sl; do
10347 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10348 test -f $ac_im_libdir/libX11.$ac_extension; then
10349 ac_im_usrlibdir=$ac_im_libdir; break
10350 fi
10351 done
10352 # Screen out bogus values from the imake configuration. They are
10353 # bogus both because they are the default anyway, and because
10354 # using them would break gcc on systems where it needs fixed includes.
10355 case "$ac_im_incroot" in
10356 /usr/include) ;;
10357 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10358 esac
10359 case "$ac_im_usrlibdir" in
10360 /usr/lib | /lib) ;;
10361 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10362 esac
10363 fi
10364 cd ..
10365 rm -fr conftestdir
10366fi
10367
10368if test "$ac_x_includes" = NO; then
10369 # Guess where to find include files, by looking for this one X11 .h file.
10370 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10371
10372 # First, try using that file with no special directory specified.
10373cat > conftest.$ac_ext <<EOF
02d62932 10374#line 10375 "configure"
c906108c
SS
10375#include "confdefs.h"
10376#include <$x_direct_test_include>
10377EOF
10378ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 10379{ (eval echo configure:10380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10380ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10381if test -z "$ac_err"; then
10382 rm -rf conftest*
10383 # We can compile using X headers with no special include directory.
10384ac_x_includes=
10385else
10386 echo "$ac_err" >&5
10387 echo "configure: failed program was:" >&5
10388 cat conftest.$ac_ext >&5
10389 rm -rf conftest*
10390 # Look for the header file in a standard set of common directories.
10391# Check X11 before X11Rn because it is often a symlink to the current release.
10392 for ac_dir in \
10393 /usr/X11/include \
10394 /usr/X11R6/include \
10395 /usr/X11R5/include \
10396 /usr/X11R4/include \
10397 \
10398 /usr/include/X11 \
10399 /usr/include/X11R6 \
10400 /usr/include/X11R5 \
10401 /usr/include/X11R4 \
10402 \
10403 /usr/local/X11/include \
10404 /usr/local/X11R6/include \
10405 /usr/local/X11R5/include \
10406 /usr/local/X11R4/include \
10407 \
10408 /usr/local/include/X11 \
10409 /usr/local/include/X11R6 \
10410 /usr/local/include/X11R5 \
10411 /usr/local/include/X11R4 \
10412 \
10413 /usr/X386/include \
10414 /usr/x386/include \
10415 /usr/XFree86/include/X11 \
10416 \
10417 /usr/include \
10418 /usr/local/include \
10419 /usr/unsupported/include \
10420 /usr/athena/include \
10421 /usr/local/x11r5/include \
10422 /usr/lpp/Xamples/include \
10423 \
10424 /usr/openwin/include \
10425 /usr/openwin/share/include \
10426 ; \
10427 do
10428 if test -r "$ac_dir/$x_direct_test_include"; then
10429 ac_x_includes=$ac_dir
10430 break
10431 fi
10432 done
10433fi
10434rm -f conftest*
10435fi # $ac_x_includes = NO
10436
10437if test "$ac_x_libraries" = NO; then
10438 # Check for the libraries.
10439
10440 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10441 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10442
10443 # See if we find them without any special options.
10444 # Don't add to $LIBS permanently.
10445 ac_save_LIBS="$LIBS"
10446 LIBS="-l$x_direct_test_library $LIBS"
10447cat > conftest.$ac_ext <<EOF
02d62932 10448#line 10449 "configure"
c906108c
SS
10449#include "confdefs.h"
10450
10451int main() {
10452${x_direct_test_function}()
10453; return 0; }
10454EOF
02d62932 10455if { (eval echo configure:10456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10456 rm -rf conftest*
10457 LIBS="$ac_save_LIBS"
10458# We can link X programs with no special library path.
10459ac_x_libraries=
10460else
10461 echo "configure: failed program was:" >&5
10462 cat conftest.$ac_ext >&5
10463 rm -rf conftest*
10464 LIBS="$ac_save_LIBS"
10465# First see if replacing the include by lib works.
10466# Check X11 before X11Rn because it is often a symlink to the current release.
10467for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10468 /usr/X11/lib \
10469 /usr/X11R6/lib \
10470 /usr/X11R5/lib \
10471 /usr/X11R4/lib \
10472 \
10473 /usr/lib/X11 \
10474 /usr/lib/X11R6 \
10475 /usr/lib/X11R5 \
10476 /usr/lib/X11R4 \
10477 \
10478 /usr/local/X11/lib \
10479 /usr/local/X11R6/lib \
10480 /usr/local/X11R5/lib \
10481 /usr/local/X11R4/lib \
10482 \
10483 /usr/local/lib/X11 \
10484 /usr/local/lib/X11R6 \
10485 /usr/local/lib/X11R5 \
10486 /usr/local/lib/X11R4 \
10487 \
10488 /usr/X386/lib \
10489 /usr/x386/lib \
10490 /usr/XFree86/lib/X11 \
10491 \
10492 /usr/lib \
10493 /usr/local/lib \
10494 /usr/unsupported/lib \
10495 /usr/athena/lib \
10496 /usr/local/x11r5/lib \
10497 /usr/lpp/Xamples/lib \
10498 /lib/usr/lib/X11 \
10499 \
10500 /usr/openwin/lib \
10501 /usr/openwin/share/lib \
10502 ; \
10503do
10504 for ac_extension in a so sl; do
10505 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10506 ac_x_libraries=$ac_dir
10507 break 2
10508 fi
10509 done
10510done
10511fi
10512rm -f conftest*
10513fi # $ac_x_libraries = NO
10514
10515if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10516 # Didn't find X anywhere. Cache the known absence of X.
10517 ac_cv_have_x="have_x=no"
10518else
10519 # Record where we found X for the cache.
10520 ac_cv_have_x="have_x=yes \
10521 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10522fi
10523fi
10524 fi
10525 eval "$ac_cv_have_x"
10526fi # $with_x != no
10527
10528if test "$have_x" != yes; then
10529 echo "$ac_t""$have_x" 1>&6
10530 no_x=yes
10531else
10532 # If each of the values was on the command line, it overrides each guess.
10533 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10534 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10535 # Update the cache value to reflect the command line values.
10536 ac_cv_have_x="have_x=yes \
10537 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10538 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10539fi
10540
10541
7a292a7a
SS
10542
10543# Unlike the sim directory, whether a simulator is linked is controlled by
10544# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10545# This code just checks for a few cases where we'd like to ignore those
10546# definitions, even when they're present in the '.mt' file. These cases
10547# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10548# not part of the source tree.
7a292a7a
SS
10549#
10550# Check whether --enable-sim or --disable-sim was given.
10551if test "${enable_sim+set}" = set; then
10552 enableval="$enable_sim"
10553 echo "enable_sim = $enable_sim";
10554 echo "enableval = ${enableval}";
10555 case "${enableval}" in
10556 yes) ignore_sim=false ;;
10557 no) ignore_sim=true ;;
10558 *) ignore_sim=false ;;
10559 esac
10560else
10561 ignore_sim=false
10562fi
10563
10564
10565if test ! -d "${srcdir}/../sim"; then
10566 ignore_sim=true
10567fi
10568
10569if test "${ignore_sim}" = "true"; then
10570 IGNORE_SIM="SIM="
10571 IGNORE_SIM_OBS="SIM_OBS="
10572else
10573 IGNORE_SIM=""
10574 IGNORE_SIM_OBS=""
10575 cat >> confdefs.h <<\EOF
10576#define WITH_SIM 1
10577EOF
10578
10579fi
10580
10581
10582
c906108c
SS
10583
10584
10585
10586
10587
10588
dfcd3bfb 10589
e56ac5c3
AC
10590
10591
b3a90332
AC
10592
10593
c906108c
SS
10594# target_subdir is used by the testsuite to find the target libraries.
10595target_subdir=
10596if test "${host}" != "${target}"; then
10597 target_subdir="${target_alias}/"
10598fi
10599
10600
10601frags=
10602host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10603if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10604 # When building a native debuger the .mh file containing things
10605 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10606 # since it no longer contains anything useful.
10607 if test "${target}" = "${host}"; then
10608 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10609 else
10610 host_makefile_frag=/dev/null
10611 fi
c906108c
SS
10612fi
10613frags="$frags $host_makefile_frag"
10614
10615target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10616if test ! -f ${target_makefile_frag}; then
10617{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10618fi
10619frags="$frags $target_makefile_frag"
10620
10621
10622
10623
10624
10625hostfile=`sed -n '
10626s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10627' ${host_makefile_frag}`
10628
10629targetfile=`sed -n '
10630s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10631' ${target_makefile_frag}`
10632
c906108c 10633if test "${target}" = "${host}"; then
a85f51e7
DJ
10634# We pick this up from the host configuration file (.mh) because we
10635# do not have a native configuration Makefile fragment.
c906108c
SS
10636nativefile=`sed -n '
10637s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10638' ${host_makefile_frag}`
c906108c
SS
10639fi
10640
10641
b00a8037
DJ
10642if test x"${gdb_osabi}" != x ; then
10643 cat >> confdefs.h <<EOF
10644#define GDB_OSABI_DEFAULT $gdb_osabi
10645EOF
10646
10647fi
10648
8dcde887
MK
10649# Enable multi-ice-gdb-server.
10650# Check whether --enable-multi-ice or --disable-multi-ice was given.
10651if test "${enable_multi_ice+set}" = set; then
10652 enableval="$enable_multi_ice"
10653 case $enableval in
10654 yes | no)
10655 ;;
10656 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10657 esac
96baa820
JM
10658fi
10659
8dcde887
MK
10660if test "x$enable_multi_ice" = xyes; then
10661 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10662fi
10663
8dcde887
MK
10664# We only build gdbserver automatically if host and target are the same.
10665if test "x$target" = "x$host"; then
10666 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
02d62932 10667echo "configure:10668: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10668 if test "x$build_gdbserver" = xyes; then
10669 configdirs="$configdirs gdbserver"
10670 echo "$ac_t""yes" 1>&6
10671 else
10672 echo "$ac_t""no" 1>&6
10673 fi
10674fi
10675
10676subdirs="doc testsuite $configdirs"
10677
96baa820 10678
c906108c 10679# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10680# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10681# version.
c906108c
SS
10682
10683files=
10684links=
5a2402b8 10685
c906108c 10686rm -f xm.h
5a2402b8 10687xm_h=""
c906108c 10688if test "${hostfile}" != ""; then
5a2402b8
AC
10689 xm_h=xm.h
10690 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10691 files="${files} ${GDB_XM_FILE}"
10692 links="${links} xm.h"
10693 cat >> confdefs.h <<EOF
10694#define GDB_XM_FILE ${GDB_XM_FILE}
10695EOF
10696
c906108c 10697fi
5a2402b8
AC
10698
10699
c906108c 10700rm -f tm.h
5a2402b8 10701tm_h=""
c906108c 10702if test "${targetfile}" != ""; then
5a2402b8
AC
10703 tm_h=tm.h
10704 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10705 files="${files} ${GDB_TM_FILE}"
10706 links="${links} tm.h"
10707 cat >> confdefs.h <<EOF
10708#define GDB_TM_FILE ${GDB_TM_FILE}
10709EOF
10710
c906108c 10711fi
5a2402b8
AC
10712
10713
c906108c 10714rm -f nm.h
5a2402b8 10715nm_h=""
c906108c 10716if test "${nativefile}" != ""; then
5a2402b8
AC
10717 nm_h=nm.h
10718 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10719 files="${files} ${GDB_NM_FILE}"
10720 links="${links} nm.h"
10721 cat >> confdefs.h <<EOF
10722#define GDB_NM_FILE ${GDB_NM_FILE}
10723EOF
10724
c906108c 10725fi
5a2402b8
AC
10726
10727
c906108c
SS
10728
10729
10730echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
02d62932 10731echo "configure:10732: checking for Cygwin environment" >&5
c906108c
SS
10732if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10733 echo $ac_n "(cached) $ac_c" 1>&6
10734else
10735 cat > conftest.$ac_ext <<EOF
02d62932 10736#line 10737 "configure"
c906108c
SS
10737#include "confdefs.h"
10738
10739int main() {
10740
10741#ifndef __CYGWIN__
10742#define __CYGWIN__ __CYGWIN32__
10743#endif
10744return __CYGWIN__;
10745; return 0; }
10746EOF
02d62932 10747if { (eval echo configure:10748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10748 rm -rf conftest*
10749 ac_cv_cygwin=yes
10750else
10751 echo "configure: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 rm -rf conftest*
10754 ac_cv_cygwin=no
10755fi
10756rm -f conftest*
10757rm -f conftest*
10758fi
10759
10760echo "$ac_t""$ac_cv_cygwin" 1>&6
10761CYGWIN=
10762test "$ac_cv_cygwin" = yes && CYGWIN=yes
10763echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
02d62932 10764echo "configure:10765: checking for mingw32 environment" >&5
c906108c
SS
10765if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10766 echo $ac_n "(cached) $ac_c" 1>&6
10767else
10768 cat > conftest.$ac_ext <<EOF
02d62932 10769#line 10770 "configure"
c906108c
SS
10770#include "confdefs.h"
10771
10772int main() {
10773return __MINGW32__;
10774; return 0; }
10775EOF
02d62932 10776if { (eval echo configure:10777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10777 rm -rf conftest*
10778 ac_cv_mingw32=yes
10779else
10780 echo "configure: failed program was:" >&5
10781 cat conftest.$ac_ext >&5
10782 rm -rf conftest*
10783 ac_cv_mingw32=no
10784fi
10785rm -f conftest*
10786rm -f conftest*
10787fi
10788
10789echo "$ac_t""$ac_cv_mingw32" 1>&6
10790MINGW32=
10791test "$ac_cv_mingw32" = yes && MINGW32=yes
10792
10793
10794echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
02d62932 10795echo "configure:10796: checking for executable suffix" >&5
c906108c
SS
10796if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10797 echo $ac_n "(cached) $ac_c" 1>&6
10798else
10799 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10800 ac_cv_exeext=.exe
10801else
10802 rm -f conftest*
10803 echo 'int main () { return 0; }' > conftest.$ac_ext
10804 ac_cv_exeext=
02d62932 10805 if { (eval echo configure:10806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10806 for file in conftest.*; do
10807 case $file in
d836ee13 10808 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10809 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10810 esac
10811 done
10812 else
10813 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10814 fi
10815 rm -f conftest*
10816 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10817fi
10818fi
10819
10820EXEEXT=""
10821test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10822echo "$ac_t""${ac_cv_exeext}" 1>&6
10823ac_exeext=$EXEEXT
10824
10825
234b45d4
KB
10826
10827cat >> confdefs.h <<\EOF
10828#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10829EOF
10830
10831
10832
10833
10834 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10835if test "${with_libiconv_prefix+set}" = set; then
10836 withval="$with_libiconv_prefix"
10837
10838 for dir in `echo "$withval" | tr : ' '`; do
10839 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10840 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10841 done
10842
10843fi
10844
10845
10846 echo $ac_n "checking for iconv""... $ac_c" 1>&6
02d62932 10847echo "configure:10848: checking for iconv" >&5
234b45d4
KB
10848if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10849 echo $ac_n "(cached) $ac_c" 1>&6
10850else
10851
10852 am_cv_func_iconv="no, consider installing GNU libiconv"
10853 am_cv_lib_iconv=no
10854 cat > conftest.$ac_ext <<EOF
02d62932 10855#line 10856 "configure"
234b45d4
KB
10856#include "confdefs.h"
10857#include <stdlib.h>
10858#include <iconv.h>
10859int main() {
10860iconv_t cd = iconv_open("","");
10861 iconv(cd,NULL,NULL,NULL,NULL);
10862 iconv_close(cd);
10863; return 0; }
10864EOF
02d62932 10865if { (eval echo configure:10866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10866 rm -rf conftest*
10867 am_cv_func_iconv=yes
10868else
10869 echo "configure: failed program was:" >&5
10870 cat conftest.$ac_ext >&5
10871fi
10872rm -f conftest*
10873 if test "$am_cv_func_iconv" != yes; then
10874 am_save_LIBS="$LIBS"
10875 LIBS="$LIBS -liconv"
10876 cat > conftest.$ac_ext <<EOF
02d62932 10877#line 10878 "configure"
234b45d4
KB
10878#include "confdefs.h"
10879#include <stdlib.h>
10880#include <iconv.h>
10881int main() {
10882iconv_t cd = iconv_open("","");
10883 iconv(cd,NULL,NULL,NULL,NULL);
10884 iconv_close(cd);
10885; return 0; }
10886EOF
02d62932 10887if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10888 rm -rf conftest*
10889 am_cv_lib_iconv=yes
10890 am_cv_func_iconv=yes
10891else
10892 echo "configure: failed program was:" >&5
10893 cat conftest.$ac_ext >&5
10894fi
10895rm -f conftest*
10896 LIBS="$am_save_LIBS"
10897 fi
10898
10899fi
10900
10901echo "$ac_t""$am_cv_func_iconv" 1>&6
10902 if test "$am_cv_func_iconv" = yes; then
10903 cat >> confdefs.h <<\EOF
10904#define HAVE_ICONV 1
10905EOF
10906
10907 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
02d62932 10908echo "configure:10909: checking for iconv declaration" >&5
234b45d4
KB
10909 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10910 echo $ac_n "(cached) $ac_c" 1>&6
10911else
10912
10913 cat > conftest.$ac_ext <<EOF
02d62932 10914#line 10915 "configure"
234b45d4
KB
10915#include "confdefs.h"
10916
10917#include <stdlib.h>
10918#include <iconv.h>
10919extern
10920#ifdef __cplusplus
10921"C"
10922#endif
10923#if defined(__STDC__) || defined(__cplusplus)
10924size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10925#else
10926size_t iconv();
10927#endif
10928
10929int main() {
10930
10931; return 0; }
10932EOF
02d62932 10933if { (eval echo configure:10934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10934 rm -rf conftest*
10935 am_cv_proto_iconv_arg1=""
10936else
10937 echo "configure: failed program was:" >&5
10938 cat conftest.$ac_ext >&5
10939 rm -rf conftest*
10940 am_cv_proto_iconv_arg1="const"
10941fi
10942rm -f conftest*
10943 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);"
10944fi
10945
10946 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10947 echo "$ac_t""${ac_t:-
10948 }$am_cv_proto_iconv" 1>&6
10949 cat >> confdefs.h <<EOF
10950#define ICONV_CONST $am_cv_proto_iconv_arg1
10951EOF
10952
10953 fi
10954 LIBICONV=
10955 if test "$am_cv_lib_iconv" = yes; then
10956 LIBICONV="-liconv"
10957 fi
10958
10959
10960
c906108c
SS
10961trap '' 1 2 15
10962cat > confcache <<\EOF
10963# This file is a shell script that caches the results of configure
10964# tests run on this system so they can be shared between configure
10965# scripts and configure runs. It is not useful on other systems.
10966# If it contains results you don't want to keep, you may remove or edit it.
10967#
10968# By default, configure uses ./config.cache as the cache file,
10969# creating it if it does not exist already. You can give configure
10970# the --cache-file=FILE option to use a different cache file; that is
10971# what configure does when it calls configure scripts in
10972# subdirectories, so they share the cache.
10973# Giving --cache-file=/dev/null disables caching, for debugging configure.
10974# config.status only pays attention to the cache file if you give it the
10975# --recheck option to rerun configure.
10976#
10977EOF
10978# The following way of writing the cache mishandles newlines in values,
10979# but we know of no workaround that is simple, portable, and efficient.
10980# So, don't put newlines in cache variables' values.
10981# Ultrix sh set writes to stderr and can't be redirected directly,
10982# and sets the high bit in the cache file unless we assign to the vars.
10983(set) 2>&1 |
10984 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10985 *ac_space=\ *)
10986 # `set' does not quote correctly, so add quotes (double-quote substitution
10987 # turns \\\\ into \\, and sed turns \\ into \).
10988 sed -n \
10989 -e "s/'/'\\\\''/g" \
10990 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10991 ;;
10992 *)
10993 # `set' quotes correctly as required by POSIX, so do not add quotes.
10994 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10995 ;;
10996 esac >> confcache
10997if cmp -s $cache_file confcache; then
10998 :
10999else
11000 if test -w $cache_file; then
11001 echo "updating cache $cache_file"
11002 cat confcache > $cache_file
11003 else
11004 echo "not updating unwritable cache $cache_file"
11005 fi
11006fi
11007rm -f confcache
11008
11009trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11010
11011test "x$prefix" = xNONE && prefix=$ac_default_prefix
11012# Let make expand exec_prefix.
11013test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11014
11015# Any assignment to VPATH causes Sun make to only execute
11016# the first set of double-colon rules, so remove it if not needed.
11017# If there is a colon in the path, we need to keep it.
11018if test "x$srcdir" = x.; then
11019 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11020fi
11021
11022trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11023
11024DEFS=-DHAVE_CONFIG_H
11025
11026# Without the "./", some shells look in PATH for config.status.
11027: ${CONFIG_STATUS=./config.status}
11028
11029echo creating $CONFIG_STATUS
11030rm -f $CONFIG_STATUS
11031cat > $CONFIG_STATUS <<EOF
11032#! /bin/sh
11033# Generated automatically by configure.
11034# Run this file to recreate the current configuration.
11035# This directory was configured as follows,
11036# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11037#
11038# $0 $ac_configure_args
11039#
11040# Compiler output produced by configure, useful for debugging
11041# configure, is in ./config.log if it exists.
11042
11043ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11044for ac_option
11045do
11046 case "\$ac_option" in
11047 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11048 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11049 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11050 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11051 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11052 exit 0 ;;
11053 -help | --help | --hel | --he | --h)
11054 echo "\$ac_cs_usage"; exit 0 ;;
11055 *) echo "\$ac_cs_usage"; exit 1 ;;
11056 esac
11057done
11058
11059ac_given_srcdir=$srcdir
11060ac_given_INSTALL="$INSTALL"
11061
ed952ac5 11062trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11063EOF
11064cat >> $CONFIG_STATUS <<EOF
11065
11066# Protect against being on the right side of a sed subst in config.status.
11067sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11068 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11069$ac_vpsub
11070$extrasub
11071s%@SHELL@%$SHELL%g
11072s%@CFLAGS@%$CFLAGS%g
11073s%@CPPFLAGS@%$CPPFLAGS%g
11074s%@CXXFLAGS@%$CXXFLAGS%g
11075s%@FFLAGS@%$FFLAGS%g
11076s%@DEFS@%$DEFS%g
11077s%@LDFLAGS@%$LDFLAGS%g
11078s%@LIBS@%$LIBS%g
11079s%@exec_prefix@%$exec_prefix%g
11080s%@prefix@%$prefix%g
11081s%@program_transform_name@%$program_transform_name%g
11082s%@bindir@%$bindir%g
11083s%@sbindir@%$sbindir%g
11084s%@libexecdir@%$libexecdir%g
11085s%@datadir@%$datadir%g
11086s%@sysconfdir@%$sysconfdir%g
11087s%@sharedstatedir@%$sharedstatedir%g
11088s%@localstatedir@%$localstatedir%g
11089s%@libdir@%$libdir%g
11090s%@includedir@%$includedir%g
11091s%@oldincludedir@%$oldincludedir%g
11092s%@infodir@%$infodir%g
11093s%@mandir@%$mandir%g
413ccac7
AC
11094s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11095s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11096s%@MAINT@%$MAINT%g
c906108c
SS
11097s%@CC@%$CC%g
11098s%@CPP@%$CPP%g
11099s%@host@%$host%g
11100s%@host_alias@%$host_alias%g
11101s%@host_cpu@%$host_cpu%g
11102s%@host_vendor@%$host_vendor%g
11103s%@host_os@%$host_os%g
11104s%@target@%$target%g
11105s%@target_alias@%$target_alias%g
11106s%@target_cpu@%$target_cpu%g
11107s%@target_vendor@%$target_vendor%g
11108s%@target_os@%$target_os%g
11109s%@build@%$build%g
11110s%@build_alias@%$build_alias%g
11111s%@build_cpu@%$build_cpu%g
11112s%@build_vendor@%$build_vendor%g
11113s%@build_os@%$build_os%g
c906108c 11114s%@RANLIB@%$RANLIB%g
8bb2c122 11115s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11116s%@ALLOCA@%$ALLOCA%g
11117s%@USE_NLS@%$USE_NLS%g
11118s%@MSGFMT@%$MSGFMT%g
11119s%@GMSGFMT@%$GMSGFMT%g
11120s%@XGETTEXT@%$XGETTEXT%g
11121s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11122s%@CATALOGS@%$CATALOGS%g
11123s%@CATOBJEXT@%$CATOBJEXT%g
11124s%@DATADIRNAME@%$DATADIRNAME%g
11125s%@GMOFILES@%$GMOFILES%g
11126s%@INSTOBJEXT@%$INSTOBJEXT%g
11127s%@INTLDEPS@%$INTLDEPS%g
11128s%@INTLLIBS@%$INTLLIBS%g
11129s%@INTLOBJS@%$INTLOBJS%g
11130s%@POFILES@%$POFILES%g
11131s%@POSUB@%$POSUB%g
11132s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11133s%@GT_NO@%$GT_NO%g
11134s%@GT_YES@%$GT_YES%g
11135s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11136s%@l@%$l%g
8dcde887 11137s%@subdirs@%$subdirs%g
7a292a7a 11138s%@AWK@%$AWK%g
c906108c
SS
11139s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11140s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11141s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11142s%@LN_S@%$LN_S%g
11143s%@YACC@%$YACC%g
c906108c 11144s%@AR@%$AR%g
95ca63c4
CF
11145s%@DLLTOOL@%$DLLTOOL%g
11146s%@WINDRES@%$WINDRES%g
75c6e08a 11147s%@MIG@%$MIG%g
c906108c 11148s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11149s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11150s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11151s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11152s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11153s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11154s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11155s%@LIBGUI@%$LIBGUI%g
11156s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11157s%@WIN32LDAPP@%$WIN32LDAPP%g
11158s%@TCL_VERSION@%$TCL_VERSION%g
11159s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11160s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11161s%@TCL_CC@%$TCL_CC%g
11162s%@TCL_DEFS@%$TCL_DEFS%g
11163s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11164s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11165s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11166s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11167s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11168s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11169s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11170s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11171s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11172s%@TCL_RANLIB@%$TCL_RANLIB%g
11173s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11174s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11175s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11176s%@TK_VERSION@%$TK_VERSION%g
11177s%@TK_DEFS@%$TK_DEFS%g
11178s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11179s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11180s%@TK_XLIBSW@%$TK_XLIBSW%g
11181s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11182s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11183s%@TCLHDIR@%$TCLHDIR%g
11184s%@TKHDIR@%$TKHDIR%g
11185s%@ITCLHDIR@%$ITCLHDIR%g
11186s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11187s%@ITCL_VERSION@%$ITCL_VERSION%g
11188s%@ITCL_DEFS@%$ITCL_DEFS%g
11189s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11190s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11191s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11192s%@ITK_VERSION@%$ITK_VERSION%g
11193s%@ITK_DEFS@%$ITK_DEFS%g
11194s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11195s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11196s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11197s%@X_CFLAGS@%$X_CFLAGS%g
11198s%@X_LDFLAGS@%$X_LDFLAGS%g
11199s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11200s%@TCL_DEPS@%$TCL_DEPS%g
11201s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11202s%@ITCLLIB@%$ITCLLIB%g
11203s%@ITCL_DEPS@%$ITCL_DEPS%g
11204s%@ITKLIB@%$ITKLIB%g
11205s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11206s%@GDBTKLIBS@%$GDBTKLIBS%g
11207s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11208s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11209s%@IGNORE_SIM@%$IGNORE_SIM%g
11210s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11211s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11212s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11213s%@CONFIG_OBS@%$CONFIG_OBS%g
11214s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11215s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11216s%@CONFIG_ALL@%$CONFIG_ALL%g
11217s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11218s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11219s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11220s%@target_subdir@%$target_subdir%g
11221/@host_makefile_frag@/r $host_makefile_frag
11222s%@host_makefile_frag@%%g
11223/@target_makefile_frag@/r $target_makefile_frag
11224s%@target_makefile_frag@%%g
11225s%@frags@%$frags%g
5a2402b8
AC
11226s%@xm_h@%$xm_h%g
11227s%@tm_h@%$tm_h%g
11228s%@nm_h@%$nm_h%g
c906108c 11229s%@EXEEXT@%$EXEEXT%g
234b45d4 11230s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11231
11232CEOF
11233EOF
11234
11235cat >> $CONFIG_STATUS <<\EOF
11236
11237# Split the substitutions into bite-sized pieces for seds with
11238# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11239ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11240ac_file=1 # Number of current file.
11241ac_beg=1 # First line for current file.
11242ac_end=$ac_max_sed_cmds # Line after last line for current file.
11243ac_more_lines=:
11244ac_sed_cmds=""
11245while $ac_more_lines; do
11246 if test $ac_beg -gt 1; then
11247 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11248 else
11249 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11250 fi
11251 if test ! -s conftest.s$ac_file; then
11252 ac_more_lines=false
11253 rm -f conftest.s$ac_file
11254 else
11255 if test -z "$ac_sed_cmds"; then
11256 ac_sed_cmds="sed -f conftest.s$ac_file"
11257 else
11258 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11259 fi
11260 ac_file=`expr $ac_file + 1`
11261 ac_beg=$ac_end
11262 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11263 fi
11264done
11265if test -z "$ac_sed_cmds"; then
11266 ac_sed_cmds=cat
11267fi
11268EOF
11269
11270cat >> $CONFIG_STATUS <<EOF
11271
ed952ac5 11272CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11273EOF
11274cat >> $CONFIG_STATUS <<\EOF
11275for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11276 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11277 case "$ac_file" in
11278 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11279 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11280 *) ac_file_in="${ac_file}.in" ;;
11281 esac
11282
11283 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11284
11285 # Remove last slash and all that follows it. Not all systems have dirname.
11286 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11287 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11288 # The file is in a subdirectory.
11289 test ! -d "$ac_dir" && mkdir "$ac_dir"
11290 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11291 # A "../" for each directory in $ac_dir_suffix.
11292 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11293 else
11294 ac_dir_suffix= ac_dots=
11295 fi
11296
11297 case "$ac_given_srcdir" in
11298 .) srcdir=.
11299 if test -z "$ac_dots"; then top_srcdir=.
11300 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11301 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11302 *) # Relative path.
11303 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11304 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11305 esac
11306
11307 case "$ac_given_INSTALL" in
11308 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11309 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11310 esac
11311
11312 echo creating "$ac_file"
11313 rm -f "$ac_file"
11314 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11315 case "$ac_file" in
11316 *Makefile*) ac_comsub="1i\\
11317# $configure_input" ;;
11318 *) ac_comsub= ;;
11319 esac
11320
11321 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11322 sed -e "$ac_comsub
11323s%@configure_input@%$configure_input%g
11324s%@srcdir@%$srcdir%g
11325s%@top_srcdir@%$top_srcdir%g
11326s%@INSTALL@%$INSTALL%g
11327" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11328fi; done
11329rm -f conftest.s*
11330
11331# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11332# NAME is the cpp macro being defined and VALUE is the value it is being given.
11333#
11334# ac_d sets the value in "#define NAME VALUE" lines.
11335ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11336ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11337ac_dC='\3'
11338ac_dD='%g'
11339# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11340ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11341ac_uB='\([ ]\)%\1#\2define\3'
11342ac_uC=' '
11343ac_uD='\4%g'
11344# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11345ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11346ac_eB='$%\1#\2define\3'
11347ac_eC=' '
11348ac_eD='%g'
11349
11350if test "${CONFIG_HEADERS+set}" != set; then
11351EOF
11352cat >> $CONFIG_STATUS <<EOF
11353 CONFIG_HEADERS="config.h:config.in"
11354EOF
11355cat >> $CONFIG_STATUS <<\EOF
11356fi
11357for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11358 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11359 case "$ac_file" in
11360 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11361 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11362 *) ac_file_in="${ac_file}.in" ;;
11363 esac
11364
11365 echo creating $ac_file
11366
11367 rm -f conftest.frag conftest.in conftest.out
11368 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11369 cat $ac_file_inputs > conftest.in
11370
11371EOF
11372
11373# Transform confdefs.h into a sed script conftest.vals that substitutes
11374# the proper values into config.h.in to produce config.h. And first:
11375# Protect against being on the right side of a sed subst in config.status.
11376# Protect against being in an unquoted here document in config.status.
11377rm -f conftest.vals
11378cat > conftest.hdr <<\EOF
11379s/[\\&%]/\\&/g
11380s%[\\$`]%\\&%g
11381s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11382s%ac_d%ac_u%gp
11383s%ac_u%ac_e%gp
11384EOF
11385sed -n -f conftest.hdr confdefs.h > conftest.vals
11386rm -f conftest.hdr
11387
11388# This sed command replaces #undef with comments. This is necessary, for
11389# example, in the case of _POSIX_SOURCE, which is predefined and required
11390# on some systems where configure will not decide to define it.
11391cat >> conftest.vals <<\EOF
11392s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11393EOF
11394
11395# Break up conftest.vals because some shells have a limit on
11396# the size of here documents, and old seds have small limits too.
11397
11398rm -f conftest.tail
11399while :
11400do
11401 ac_lines=`grep -c . conftest.vals`
11402 # grep -c gives empty output for an empty file on some AIX systems.
11403 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11404 # Write a limited-size here document to conftest.frag.
11405 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11406 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11407 echo 'CEOF
11408 sed -f conftest.frag conftest.in > conftest.out
11409 rm -f conftest.in
11410 mv conftest.out conftest.in
11411' >> $CONFIG_STATUS
11412 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11413 rm -f conftest.vals
11414 mv conftest.tail conftest.vals
11415done
11416rm -f conftest.vals
11417
11418cat >> $CONFIG_STATUS <<\EOF
11419 rm -f conftest.frag conftest.h
11420 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11421 cat conftest.in >> conftest.h
11422 rm -f conftest.in
11423 if cmp -s $ac_file conftest.h 2>/dev/null; then
11424 echo "$ac_file is unchanged"
11425 rm -f conftest.h
11426 else
11427 # Remove last slash and all that follows it. Not all systems have dirname.
11428 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11429 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11430 # The file is in a subdirectory.
11431 test ! -d "$ac_dir" && mkdir "$ac_dir"
11432 fi
11433 rm -f $ac_file
11434 mv conftest.h $ac_file
11435 fi
11436fi; done
11437
11438EOF
11439
11440cat >> $CONFIG_STATUS <<EOF
11441ac_sources="$files"
11442ac_dests="$links"
11443EOF
11444
11445cat >> $CONFIG_STATUS <<\EOF
11446srcdir=$ac_given_srcdir
11447while test -n "$ac_sources"; do
11448 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11449 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11450
11451 echo "linking $srcdir/$ac_source to $ac_dest"
11452
11453 if test ! -r $srcdir/$ac_source; then
11454 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11455 fi
11456 rm -f $ac_dest
11457
11458 # Make relative symlinks.
11459 # Remove last slash and all that follows it. Not all systems have dirname.
11460 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11461 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11462 # The dest file is in a subdirectory.
11463 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11464 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11465 # A "../" for each directory in $ac_dest_dir_suffix.
11466 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11467 else
11468 ac_dest_dir_suffix= ac_dots=
11469 fi
11470
11471 case "$srcdir" in
11472 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11473 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11474 esac
11475
11476 # Make a symlink if possible; otherwise try a hard link.
11477 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11478 ln $srcdir/$ac_source $ac_dest; then :
11479 else
11480 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11481 fi
11482done
11483EOF
11484cat >> $CONFIG_STATUS <<EOF
11485
11486gdb_host_cpu=$gdb_host_cpu
11487gdb_target_cpu=$gdb_target_cpu
11488nativefile=$nativefile
11489
11490EOF
11491cat >> $CONFIG_STATUS <<\EOF
11492
7ee6d7eb 11493if test "${nativefile}" = ""; then
c4620205 11494 < Makefile \
e27da16d
JT
11495 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11496 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11497 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11498 > Makefile.tem
c906108c
SS
11499mv -f Makefile.tem Makefile
11500fi
11501
11502sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11503/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11504/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11505mv -f Makefile.tmp Makefile
11506
2acceee2 11507
c906108c
SS
11508case x$CONFIG_HEADERS in
11509xconfig.h:config.in)
11510echo > stamp-h ;;
11511esac
11512
11513exit 0
11514EOF
11515chmod +x $CONFIG_STATUS
11516rm -fr confdefs* $ac_clean_files
11517test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11518
11519if test "$no_recursion" != yes; then
11520
11521 # Remove --cache-file and --srcdir arguments so they do not pile up.
11522 ac_sub_configure_args=
11523 ac_prev=
11524 for ac_arg in $ac_configure_args; do
11525 if test -n "$ac_prev"; then
11526 ac_prev=
11527 continue
11528 fi
11529 case "$ac_arg" in
11530 -cache-file | --cache-file | --cache-fil | --cache-fi \
11531 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11532 ac_prev=cache_file ;;
11533 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11534 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11535 ;;
11536 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11537 ac_prev=srcdir ;;
11538 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11539 ;;
11540 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11541 esac
11542 done
11543
8dcde887 11544 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11545
11546 # Do not complain, so a configure script can configure whichever
11547 # parts of a large source tree are present.
11548 if test ! -d $srcdir/$ac_config_dir; then
11549 continue
11550 fi
11551
11552 echo configuring in $ac_config_dir
11553
11554 case "$srcdir" in
11555 .) ;;
11556 *)
11557 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11558 else
11559 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11560 fi
11561 ;;
11562 esac
11563
11564 ac_popdir=`pwd`
11565 cd $ac_config_dir
11566
11567 # A "../" for each directory in /$ac_config_dir.
11568 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11569
11570 case "$srcdir" in
11571 .) # No --srcdir option. We are building in place.
11572 ac_sub_srcdir=$srcdir ;;
11573 /*) # Absolute path.
11574 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11575 *) # Relative path.
11576 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11577 esac
11578
11579 # Check for guested configure; otherwise get Cygnus style configure.
11580 if test -f $ac_sub_srcdir/configure; then
11581 ac_sub_configure=$ac_sub_srcdir/configure
11582 elif test -f $ac_sub_srcdir/configure.in; then
11583 ac_sub_configure=$ac_configure
11584 else
11585 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11586 ac_sub_configure=
11587 fi
11588
11589 # The recursion is here.
11590 if test -n "$ac_sub_configure"; then
11591
11592 # Make the cache file name correct relative to the subdirectory.
11593 case "$cache_file" in
11594 /*) ac_sub_cache_file=$cache_file ;;
11595 *) # Relative path.
11596 ac_sub_cache_file="$ac_dots$cache_file" ;;
11597 esac
11598 case "$ac_given_INSTALL" in
11599 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11600 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11601 esac
11602
11603 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11604 # The eval makes quoting arguments work.
11605 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11606 then :
11607 else
11608 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11609 fi
11610 fi
11611
11612 cd $ac_popdir
11613 done
11614fi
11615
11616
11617exit 0
This page took 1.070525 seconds and 4 git commands to generate.