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