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