* configure.in: Rewrite check for GNU regex and the
[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"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
06825bd1
MK
23ac_help="$ac_help
24 --enable-tui enable full-screen terminal user interface (TUI)"
25ac_help="$ac_help
26 --without-included-regex don't use included regex; this is the default
27 on systems with version 2 of the GNU C library
28 (use with caution on other system)"
d318976c
FN
29ac_help="$ac_help
30 --enable-gdbcli Enable GDB-CLI interface"
fb40c209
AC
31ac_help="$ac_help
32 --enable-gdbmi Enable GDB-MI interface"
b4df4f68 33ac_help="$ac_help
6c5cfe5b 34 --with-uiout Use new uiout functions instead of *printf's"
c906108c
SS
35ac_help="$ac_help
36 --enable-netrom Enable NetROM support"
37ac_help="$ac_help
38 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
39ac_help="$ac_help
40 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
41ac_help="$ac_help
42 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
43ac_help="$ac_help
44 --with-cpu=CPU Set the default CPU variant to debug"
45ac_help="$ac_help
46 --enable-gdbtk Enable GDBTK GUI front end"
47ac_help="$ac_help
48 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
49ac_help="$ac_help
50 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
51ac_help="$ac_help
52 --with-tclinclude=DIR Directory where tcl private headers are"
53ac_help="$ac_help
54 --with-tkinclude=DIR Directory where tk private headers are"
55ac_help="$ac_help
56 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
57ac_help="$ac_help
58 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
59ac_help="$ac_help
60 --with-x use the X Window System"
7a292a7a
SS
61ac_help="$ac_help
62 --enable-sim Link gdb with simulator"
c906108c
SS
63ac_help="$ac_help
64 --enable-shared Use shared libraries"
234b45d4
KB
65ac_help="$ac_help
66 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
67
68# Initialize some variables set by options.
69# The variables have the same names as the options, with
70# dashes changed to underlines.
71build=NONE
72cache_file=./config.cache
73exec_prefix=NONE
74host=NONE
75no_create=
76nonopt=NONE
77no_recursion=
78prefix=NONE
79program_prefix=NONE
80program_suffix=NONE
81program_transform_name=s,x,x,
82silent=
83site=
c41b7eb1 84sitefile=
c906108c
SS
85srcdir=
86target=NONE
87verbose=
88x_includes=NONE
89x_libraries=NONE
90bindir='${exec_prefix}/bin'
91sbindir='${exec_prefix}/sbin'
92libexecdir='${exec_prefix}/libexec'
93datadir='${prefix}/share'
94sysconfdir='${prefix}/etc'
95sharedstatedir='${prefix}/com'
96localstatedir='${prefix}/var'
97libdir='${exec_prefix}/lib'
98includedir='${prefix}/include'
99oldincludedir='/usr/include'
100infodir='${prefix}/info'
101mandir='${prefix}/man'
102
103# Initialize some other variables.
104subdirs=
105MFLAGS= MAKEFLAGS=
106SHELL=${CONFIG_SHELL-/bin/sh}
107# Maximum number of lines to put in a shell here document.
108ac_max_here_lines=12
109
110ac_prev=
111for ac_option
112do
113
114 # If the previous option needs an argument, assign it.
115 if test -n "$ac_prev"; then
116 eval "$ac_prev=\$ac_option"
117 ac_prev=
118 continue
119 fi
120
121 case "$ac_option" in
122 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
123 *) ac_optarg= ;;
124 esac
125
126 # Accept the important Cygnus configure options, so we can diagnose typos.
127
128 case "$ac_option" in
129
130 -bindir | --bindir | --bindi | --bind | --bin | --bi)
131 ac_prev=bindir ;;
132 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
133 bindir="$ac_optarg" ;;
134
135 -build | --build | --buil | --bui | --bu)
136 ac_prev=build ;;
137 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
138 build="$ac_optarg" ;;
139
140 -cache-file | --cache-file | --cache-fil | --cache-fi \
141 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
142 ac_prev=cache_file ;;
143 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
144 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
145 cache_file="$ac_optarg" ;;
146
147 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
148 ac_prev=datadir ;;
149 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
150 | --da=*)
151 datadir="$ac_optarg" ;;
152
153 -disable-* | --disable-*)
154 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
155 # Reject names that are not valid shell variable names.
156 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
157 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158 fi
159 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160 eval "enable_${ac_feature}=no" ;;
161
162 -enable-* | --enable-*)
163 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
164 # Reject names that are not valid shell variable names.
165 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
166 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167 fi
168 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169 case "$ac_option" in
170 *=*) ;;
171 *) ac_optarg=yes ;;
172 esac
173 eval "enable_${ac_feature}='$ac_optarg'" ;;
174
175 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
176 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
177 | --exec | --exe | --ex)
178 ac_prev=exec_prefix ;;
179 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
180 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
181 | --exec=* | --exe=* | --ex=*)
182 exec_prefix="$ac_optarg" ;;
183
184 -gas | --gas | --ga | --g)
185 # Obsolete; use --with-gas.
186 with_gas=yes ;;
187
188 -help | --help | --hel | --he)
189 # Omit some internal or obsolete options to make the list less imposing.
190 # This message is too long to be a string in the A/UX 3.1 sh.
191 cat << EOF
192Usage: configure [options] [host]
193Options: [defaults in brackets after descriptions]
194Configuration:
195 --cache-file=FILE cache test results in FILE
196 --help print this message
197 --no-create do not create output files
198 --quiet, --silent do not print \`checking...' messages
c41b7eb1 199 --site-file=FILE use FILE as the site file
c906108c
SS
200 --version print the version of autoconf that created configure
201Directory and file names:
202 --prefix=PREFIX install architecture-independent files in PREFIX
203 [$ac_default_prefix]
204 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
205 [same as prefix]
206 --bindir=DIR user executables in DIR [EPREFIX/bin]
207 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
208 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
209 --datadir=DIR read-only architecture-independent data in DIR
210 [PREFIX/share]
211 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
212 --sharedstatedir=DIR modifiable architecture-independent data in DIR
213 [PREFIX/com]
214 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
215 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
216 --includedir=DIR C header files in DIR [PREFIX/include]
217 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
218 --infodir=DIR info documentation in DIR [PREFIX/info]
219 --mandir=DIR man documentation in DIR [PREFIX/man]
220 --srcdir=DIR find the sources in DIR [configure dir or ..]
221 --program-prefix=PREFIX prepend PREFIX to installed program names
222 --program-suffix=SUFFIX append SUFFIX to installed program names
223 --program-transform-name=PROGRAM
224 run sed PROGRAM on installed program names
225EOF
226 cat << EOF
227Host type:
228 --build=BUILD configure for building on BUILD [BUILD=HOST]
229 --host=HOST configure for HOST [guessed]
230 --target=TARGET configure for TARGET [TARGET=HOST]
231Features and packages:
232 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
233 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
234 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
235 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
236 --x-includes=DIR X include files are in DIR
237 --x-libraries=DIR X library files are in DIR
238EOF
239 if test -n "$ac_help"; then
240 echo "--enable and --with options recognized:$ac_help"
241 fi
242 exit 0 ;;
243
244 -host | --host | --hos | --ho)
245 ac_prev=host ;;
246 -host=* | --host=* | --hos=* | --ho=*)
247 host="$ac_optarg" ;;
248
249 -includedir | --includedir | --includedi | --included | --include \
250 | --includ | --inclu | --incl | --inc)
251 ac_prev=includedir ;;
252 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
253 | --includ=* | --inclu=* | --incl=* | --inc=*)
254 includedir="$ac_optarg" ;;
255
256 -infodir | --infodir | --infodi | --infod | --info | --inf)
257 ac_prev=infodir ;;
258 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
259 infodir="$ac_optarg" ;;
260
261 -libdir | --libdir | --libdi | --libd)
262 ac_prev=libdir ;;
263 -libdir=* | --libdir=* | --libdi=* | --libd=*)
264 libdir="$ac_optarg" ;;
265
266 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
267 | --libexe | --libex | --libe)
268 ac_prev=libexecdir ;;
269 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
270 | --libexe=* | --libex=* | --libe=*)
271 libexecdir="$ac_optarg" ;;
272
273 -localstatedir | --localstatedir | --localstatedi | --localstated \
274 | --localstate | --localstat | --localsta | --localst \
275 | --locals | --local | --loca | --loc | --lo)
276 ac_prev=localstatedir ;;
277 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
278 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
279 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
280 localstatedir="$ac_optarg" ;;
281
282 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
283 ac_prev=mandir ;;
284 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
285 mandir="$ac_optarg" ;;
286
287 -nfp | --nfp | --nf)
288 # Obsolete; use --without-fp.
289 with_fp=no ;;
290
291 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
292 | --no-cr | --no-c)
293 no_create=yes ;;
294
295 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
296 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
297 no_recursion=yes ;;
298
299 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
300 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
301 | --oldin | --oldi | --old | --ol | --o)
302 ac_prev=oldincludedir ;;
303 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
304 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
305 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
306 oldincludedir="$ac_optarg" ;;
307
308 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
309 ac_prev=prefix ;;
310 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
311 prefix="$ac_optarg" ;;
312
313 -program-prefix | --program-prefix | --program-prefi | --program-pref \
314 | --program-pre | --program-pr | --program-p)
315 ac_prev=program_prefix ;;
316 -program-prefix=* | --program-prefix=* | --program-prefi=* \
317 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
318 program_prefix="$ac_optarg" ;;
319
320 -program-suffix | --program-suffix | --program-suffi | --program-suff \
321 | --program-suf | --program-su | --program-s)
322 ac_prev=program_suffix ;;
323 -program-suffix=* | --program-suffix=* | --program-suffi=* \
324 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
325 program_suffix="$ac_optarg" ;;
326
327 -program-transform-name | --program-transform-name \
328 | --program-transform-nam | --program-transform-na \
329 | --program-transform-n | --program-transform- \
330 | --program-transform | --program-transfor \
331 | --program-transfo | --program-transf \
332 | --program-trans | --program-tran \
333 | --progr-tra | --program-tr | --program-t)
334 ac_prev=program_transform_name ;;
335 -program-transform-name=* | --program-transform-name=* \
336 | --program-transform-nam=* | --program-transform-na=* \
337 | --program-transform-n=* | --program-transform-=* \
338 | --program-transform=* | --program-transfor=* \
339 | --program-transfo=* | --program-transf=* \
340 | --program-trans=* | --program-tran=* \
341 | --progr-tra=* | --program-tr=* | --program-t=*)
342 program_transform_name="$ac_optarg" ;;
343
344 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
345 | -silent | --silent | --silen | --sile | --sil)
346 silent=yes ;;
347
348 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
349 ac_prev=sbindir ;;
350 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
351 | --sbi=* | --sb=*)
352 sbindir="$ac_optarg" ;;
353
354 -sharedstatedir | --sharedstatedir | --sharedstatedi \
355 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
356 | --sharedst | --shareds | --shared | --share | --shar \
357 | --sha | --sh)
358 ac_prev=sharedstatedir ;;
359 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
360 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
361 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
362 | --sha=* | --sh=*)
363 sharedstatedir="$ac_optarg" ;;
364
365 -site | --site | --sit)
366 ac_prev=site ;;
367 -site=* | --site=* | --sit=*)
368 site="$ac_optarg" ;;
369
c41b7eb1
JB
370 -site-file | --site-file | --site-fil | --site-fi | --site-f)
371 ac_prev=sitefile ;;
372 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
373 sitefile="$ac_optarg" ;;
374
c906108c
SS
375 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
376 ac_prev=srcdir ;;
377 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
378 srcdir="$ac_optarg" ;;
379
380 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
381 | --syscon | --sysco | --sysc | --sys | --sy)
382 ac_prev=sysconfdir ;;
383 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
384 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
385 sysconfdir="$ac_optarg" ;;
386
387 -target | --target | --targe | --targ | --tar | --ta | --t)
388 ac_prev=target ;;
389 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
390 target="$ac_optarg" ;;
391
392 -v | -verbose | --verbose | --verbos | --verbo | --verb)
393 verbose=yes ;;
394
395 -version | --version | --versio | --versi | --vers)
396 echo "configure generated by autoconf version 2.13"
397 exit 0 ;;
398
399 -with-* | --with-*)
400 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
401 # Reject names that are not valid shell variable names.
402 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 case "$ac_option" in
407 *=*) ;;
408 *) ac_optarg=yes ;;
409 esac
410 eval "with_${ac_package}='$ac_optarg'" ;;
411
412 -without-* | --without-*)
413 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
414 # Reject names that are not valid shell variable names.
415 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
416 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417 fi
418 ac_package=`echo $ac_package| sed 's/-/_/g'`
419 eval "with_${ac_package}=no" ;;
420
421 --x)
422 # Obsolete; use --with-x.
423 with_x=yes ;;
424
425 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
426 | --x-incl | --x-inc | --x-in | --x-i)
427 ac_prev=x_includes ;;
428 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
429 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
430 x_includes="$ac_optarg" ;;
431
432 -x-libraries | --x-libraries | --x-librarie | --x-librari \
433 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
434 ac_prev=x_libraries ;;
435 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
436 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
437 x_libraries="$ac_optarg" ;;
438
439 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
440 ;;
441
442 *)
443 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
444 echo "configure: warning: $ac_option: invalid host type" 1>&2
445 fi
446 if test "x$nonopt" != xNONE; then
447 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
448 fi
449 nonopt="$ac_option"
450 ;;
451
452 esac
453done
454
455if test -n "$ac_prev"; then
456 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
457fi
458
459trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
460
461# File descriptor usage:
462# 0 standard input
463# 1 file creation
464# 2 errors and warnings
465# 3 some systems may open it to /dev/tty
466# 4 used on the Kubota Titan
467# 6 checking for... messages and results
468# 5 compiler messages saved in config.log
469if test "$silent" = yes; then
470 exec 6>/dev/null
471else
472 exec 6>&1
473fi
474exec 5>./config.log
475
476echo "\
477This file contains any messages produced by compilers while
478running configure, to aid debugging if configure makes a mistake.
479" 1>&5
480
481# Strip out --no-create and --no-recursion so they do not pile up.
482# Also quote any args containing shell metacharacters.
483ac_configure_args=
484for ac_arg
485do
486 case "$ac_arg" in
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
488 | --no-cr | --no-c) ;;
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
491 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
492 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
493 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
494 esac
495done
496
497# NLS nuisances.
498# Only set these to C if already set. These must not be set unconditionally
499# because not all systems understand e.g. LANG=C (notably SCO).
500# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
501# Non-C LC_CTYPE values break the ctype check.
502if test "${LANG+set}" = set; then LANG=C; export LANG; fi
503if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
504if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
505if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
506
507# confdefs.h avoids OS command line length limits that DEFS can exceed.
508rm -rf conftest* confdefs.h
509# AIX cpp loses on an empty file, so make sure it contains at least a newline.
510echo > confdefs.h
511
512# A filename unique to this package, relative to the directory that
513# configure is in, which we can look for to find out if srcdir is correct.
514ac_unique_file=main.c
515
516# Find the source files, if location was not specified.
517if test -z "$srcdir"; then
518 ac_srcdir_defaulted=yes
519 # Try the directory containing this script, then its parent.
520 ac_prog=$0
521 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
522 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
523 srcdir=$ac_confdir
524 if test ! -r $srcdir/$ac_unique_file; then
525 srcdir=..
526 fi
527else
528 ac_srcdir_defaulted=no
529fi
530if test ! -r $srcdir/$ac_unique_file; then
531 if test "$ac_srcdir_defaulted" = yes; then
532 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
533 else
534 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
535 fi
536fi
537srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
538
539# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
540if test -z "$sitefile"; then
541 if test -z "$CONFIG_SITE"; then
542 if test "x$prefix" != xNONE; then
543 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544 else
545 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546 fi
c906108c 547 fi
c41b7eb1
JB
548else
549 CONFIG_SITE="$sitefile"
c906108c
SS
550fi
551for ac_site_file in $CONFIG_SITE; do
552 if test -r "$ac_site_file"; then
553 echo "loading site script $ac_site_file"
554 . "$ac_site_file"
555 fi
556done
557
558if test -r "$cache_file"; then
559 echo "loading cache $cache_file"
560 . $cache_file
561else
562 echo "creating cache $cache_file"
563 > $cache_file
564fi
565
566ac_ext=c
567# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
568ac_cpp='$CPP $CPPFLAGS'
569ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
570ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
571cross_compiling=$ac_cv_prog_cc_cross
572
573ac_exeext=
574ac_objext=o
575if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
576 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
577 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
578 ac_n= ac_c='
579' ac_t=' '
580 else
581 ac_n=-n ac_c= ac_t=
582 fi
583else
584 ac_n= ac_c='\c' ac_t=
585fi
586
587
588
413ccac7 589echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
06825bd1 590echo "configure:591: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
591 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
592if test "${enable_maintainer_mode+set}" = set; then
593 enableval="$enable_maintainer_mode"
594 USE_MAINTAINER_MODE=$enableval
595else
596 USE_MAINTAINER_MODE=no
597fi
598
599 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
600
601
602if test $USE_MAINTAINER_MODE = yes; then
603 MAINTAINER_MODE_TRUE=
604 MAINTAINER_MODE_FALSE='#'
605else
606 MAINTAINER_MODE_TRUE='#'
607 MAINTAINER_MODE_FALSE=
608fi
609 MAINT=$MAINTAINER_MODE_TRUE
610
611
c906108c
SS
612
613# Extract the first word of "gcc", so it can be a program name with args.
614set dummy gcc; ac_word=$2
615echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 616echo "configure:617: checking for $ac_word" >&5
c906108c
SS
617if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
618 echo $ac_n "(cached) $ac_c" 1>&6
619else
620 if test -n "$CC"; then
621 ac_cv_prog_CC="$CC" # Let the user override the test.
622else
623 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
624 ac_dummy="$PATH"
625 for ac_dir in $ac_dummy; do
626 test -z "$ac_dir" && ac_dir=.
627 if test -f $ac_dir/$ac_word; then
628 ac_cv_prog_CC="gcc"
629 break
630 fi
631 done
632 IFS="$ac_save_ifs"
633fi
634fi
635CC="$ac_cv_prog_CC"
636if test -n "$CC"; then
637 echo "$ac_t""$CC" 1>&6
638else
639 echo "$ac_t""no" 1>&6
640fi
641
642if test -z "$CC"; then
643 # Extract the first word of "cc", so it can be a program name with args.
644set dummy cc; ac_word=$2
645echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 646echo "configure:647: checking for $ac_word" >&5
c906108c
SS
647if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
648 echo $ac_n "(cached) $ac_c" 1>&6
649else
650 if test -n "$CC"; then
651 ac_cv_prog_CC="$CC" # Let the user override the test.
652else
653 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
654 ac_prog_rejected=no
655 ac_dummy="$PATH"
656 for ac_dir in $ac_dummy; do
657 test -z "$ac_dir" && ac_dir=.
658 if test -f $ac_dir/$ac_word; then
659 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
660 ac_prog_rejected=yes
661 continue
662 fi
663 ac_cv_prog_CC="cc"
664 break
665 fi
666 done
667 IFS="$ac_save_ifs"
668if test $ac_prog_rejected = yes; then
669 # We found a bogon in the path, so make sure we never use it.
670 set dummy $ac_cv_prog_CC
671 shift
672 if test $# -gt 0; then
673 # We chose a different compiler from the bogus one.
674 # However, it has the same basename, so the bogon will be chosen
675 # first if we set CC to just the basename; use the full file name.
676 shift
677 set dummy "$ac_dir/$ac_word" "$@"
678 shift
679 ac_cv_prog_CC="$@"
680 fi
681fi
682fi
683fi
684CC="$ac_cv_prog_CC"
685if test -n "$CC"; then
686 echo "$ac_t""$CC" 1>&6
687else
688 echo "$ac_t""no" 1>&6
689fi
690
691 if test -z "$CC"; then
692 case "`uname -s`" in
693 *win32* | *WIN32*)
694 # Extract the first word of "cl", so it can be a program name with args.
695set dummy cl; ac_word=$2
696echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 697echo "configure:698: checking for $ac_word" >&5
c906108c
SS
698if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
699 echo $ac_n "(cached) $ac_c" 1>&6
700else
701 if test -n "$CC"; then
702 ac_cv_prog_CC="$CC" # Let the user override the test.
703else
704 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
705 ac_dummy="$PATH"
706 for ac_dir in $ac_dummy; do
707 test -z "$ac_dir" && ac_dir=.
708 if test -f $ac_dir/$ac_word; then
709 ac_cv_prog_CC="cl"
710 break
711 fi
712 done
713 IFS="$ac_save_ifs"
714fi
715fi
716CC="$ac_cv_prog_CC"
717if test -n "$CC"; then
718 echo "$ac_t""$CC" 1>&6
719else
720 echo "$ac_t""no" 1>&6
721fi
722 ;;
723 esac
724 fi
725 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
726fi
727
728echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
06825bd1 729echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
730
731ac_ext=c
732# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
733ac_cpp='$CPP $CPPFLAGS'
734ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
735ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
736cross_compiling=$ac_cv_prog_cc_cross
737
738cat > conftest.$ac_ext << EOF
739
06825bd1 740#line 741 "configure"
c906108c
SS
741#include "confdefs.h"
742
743main(){return(0);}
744EOF
06825bd1 745if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
746 ac_cv_prog_cc_works=yes
747 # If we can't run a trivial program, we are probably using a cross compiler.
748 if (./conftest; exit) 2>/dev/null; then
749 ac_cv_prog_cc_cross=no
750 else
751 ac_cv_prog_cc_cross=yes
752 fi
753else
754 echo "configure: failed program was:" >&5
755 cat conftest.$ac_ext >&5
756 ac_cv_prog_cc_works=no
757fi
758rm -fr conftest*
759ac_ext=c
760# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
761ac_cpp='$CPP $CPPFLAGS'
762ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
763ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
764cross_compiling=$ac_cv_prog_cc_cross
765
766echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
767if test $ac_cv_prog_cc_works = no; then
768 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
769fi
770echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
06825bd1 771echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
772echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
773cross_compiling=$ac_cv_prog_cc_cross
774
775echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
06825bd1 776echo "configure:777: checking whether we are using GNU C" >&5
c906108c
SS
777if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
779else
780 cat > conftest.c <<EOF
781#ifdef __GNUC__
782 yes;
783#endif
784EOF
06825bd1 785if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
786 ac_cv_prog_gcc=yes
787else
788 ac_cv_prog_gcc=no
789fi
790fi
791
792echo "$ac_t""$ac_cv_prog_gcc" 1>&6
793
794if test $ac_cv_prog_gcc = yes; then
795 GCC=yes
796else
797 GCC=
798fi
799
800ac_test_CFLAGS="${CFLAGS+set}"
801ac_save_CFLAGS="$CFLAGS"
802CFLAGS=
803echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
06825bd1 804echo "configure:805: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
805if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
806 echo $ac_n "(cached) $ac_c" 1>&6
807else
808 echo 'void f(){}' > conftest.c
809if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
810 ac_cv_prog_cc_g=yes
811else
812 ac_cv_prog_cc_g=no
813fi
814rm -f conftest*
815
816fi
817
818echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
819if test "$ac_test_CFLAGS" = set; then
820 CFLAGS="$ac_save_CFLAGS"
821elif test $ac_cv_prog_cc_g = yes; then
822 if test "$GCC" = yes; then
823 CFLAGS="-g -O2"
824 else
825 CFLAGS="-g"
826 fi
827else
828 if test "$GCC" = yes; then
829 CFLAGS="-O2"
830 else
831 CFLAGS=
832 fi
833fi
834
835echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
06825bd1 836echo "configure:837: checking how to run the C preprocessor" >&5
c906108c
SS
837# On Suns, sometimes $CPP names a directory.
838if test -n "$CPP" && test -d "$CPP"; then
839 CPP=
840fi
841if test -z "$CPP"; then
842if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
843 echo $ac_n "(cached) $ac_c" 1>&6
844else
845 # This must be in double quotes, not single quotes, because CPP may get
846 # substituted into the Makefile and "${CC-cc}" will confuse make.
847 CPP="${CC-cc} -E"
848 # On the NeXT, cc -E runs the code through the compiler's parser,
849 # not just through cpp.
850 cat > conftest.$ac_ext <<EOF
06825bd1 851#line 852 "configure"
c906108c
SS
852#include "confdefs.h"
853#include <assert.h>
854Syntax Error
855EOF
856ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 857{ (eval echo configure:858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
858ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
859if test -z "$ac_err"; then
860 :
861else
862 echo "$ac_err" >&5
863 echo "configure: failed program was:" >&5
864 cat conftest.$ac_ext >&5
865 rm -rf conftest*
866 CPP="${CC-cc} -E -traditional-cpp"
867 cat > conftest.$ac_ext <<EOF
06825bd1 868#line 869 "configure"
c906108c
SS
869#include "confdefs.h"
870#include <assert.h>
871Syntax Error
872EOF
873ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 874{ (eval echo configure:875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
875ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
876if test -z "$ac_err"; then
877 :
878else
879 echo "$ac_err" >&5
880 echo "configure: failed program was:" >&5
881 cat conftest.$ac_ext >&5
882 rm -rf conftest*
883 CPP="${CC-cc} -nologo -E"
884 cat > conftest.$ac_ext <<EOF
06825bd1 885#line 886 "configure"
c906108c
SS
886#include "confdefs.h"
887#include <assert.h>
888Syntax Error
889EOF
890ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 891{ (eval echo configure:892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
892ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
893if test -z "$ac_err"; then
894 :
895else
896 echo "$ac_err" >&5
897 echo "configure: failed program was:" >&5
898 cat conftest.$ac_ext >&5
899 rm -rf conftest*
900 CPP=/lib/cpp
901fi
902rm -f conftest*
903fi
904rm -f conftest*
905fi
906rm -f conftest*
907 ac_cv_prog_CPP="$CPP"
908fi
909 CPP="$ac_cv_prog_CPP"
910else
911 ac_cv_prog_CPP="$CPP"
912fi
913echo "$ac_t""$CPP" 1>&6
914
915echo $ac_n "checking for AIX""... $ac_c" 1>&6
06825bd1 916echo "configure:917: checking for AIX" >&5
c906108c 917cat > conftest.$ac_ext <<EOF
06825bd1 918#line 919 "configure"
c906108c
SS
919#include "confdefs.h"
920#ifdef _AIX
921 yes
922#endif
923
924EOF
925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
926 egrep "yes" >/dev/null 2>&1; then
927 rm -rf conftest*
928 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
929#define _ALL_SOURCE 1
930EOF
931
932else
933 rm -rf conftest*
934 echo "$ac_t""no" 1>&6
935fi
936rm -f conftest*
937
938
56157b4a 939echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
06825bd1 940echo "configure:941: checking for POSIXized ISC" >&5
56157b4a
AC
941if test -d /etc/conf/kconfig.d &&
942 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
943then
944 echo "$ac_t""yes" 1>&6
945 ISC=yes # If later tests want to check for ISC.
946 cat >> confdefs.h <<\EOF
947#define _POSIX_SOURCE 1
c906108c
SS
948EOF
949
56157b4a
AC
950 if test "$GCC" = yes; then
951 CC="$CC -posix"
952 else
953 CC="$CC -Xp"
954 fi
c906108c
SS
955else
956 echo "$ac_t""no" 1>&6
56157b4a 957 ISC=
c906108c
SS
958fi
959
960
961
962
963echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
06825bd1 964echo "configure:965: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
965if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
967else
968 am_cv_prog_cc_stdc=no
969ac_save_CC="$CC"
970# Don't try gcc -ansi; that turns off useful extensions and
971# breaks some systems' header files.
972# AIX -qlanglvl=ansi
973# Ultrix and OSF/1 -std1
56157b4a
AC
974# HP-UX 10.20 and later -Ae
975# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 976# SVR4 -Xc -D__EXTENSIONS__
56157b4a 977for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
978do
979 CC="$ac_save_CC $ac_arg"
980 cat > conftest.$ac_ext <<EOF
06825bd1 981#line 982 "configure"
c906108c
SS
982#include "confdefs.h"
983#include <stdarg.h>
984#include <stdio.h>
985#include <sys/types.h>
986#include <sys/stat.h>
987/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
988struct buf { int x; };
989FILE * (*rcsopen) (struct buf *, struct stat *, int);
990static char *e (p, i)
991 char **p;
992 int i;
993{
994 return p[i];
995}
996static char *f (char * (*g) (char **, int), char **p, ...)
997{
998 char *s;
999 va_list v;
1000 va_start (v,p);
1001 s = g (p, va_arg (v,int));
1002 va_end (v);
1003 return s;
1004}
1005int test (int i, double x);
1006struct s1 {int (*f) (int a);};
1007struct s2 {int (*f) (double a);};
1008int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1009int argc;
1010char **argv;
1011
1012int main() {
1013
1014return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1015
1016; return 0; }
1017EOF
06825bd1 1018if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1019 rm -rf conftest*
1020 am_cv_prog_cc_stdc="$ac_arg"; break
1021else
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024fi
1025rm -f conftest*
1026done
1027CC="$ac_save_CC"
1028
1029fi
1030
1031if test -z "$am_cv_prog_cc_stdc"; then
1032 echo "$ac_t""none needed" 1>&6
1033else
1034 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1035fi
1036case "x$am_cv_prog_cc_stdc" in
1037 x|xno) ;;
1038 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1039esac
1040
1041
1042ac_aux_dir=
1043for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1044 if test -f $ac_dir/install-sh; then
1045 ac_aux_dir=$ac_dir
1046 ac_install_sh="$ac_aux_dir/install-sh -c"
1047 break
1048 elif test -f $ac_dir/install.sh; then
1049 ac_aux_dir=$ac_dir
1050 ac_install_sh="$ac_aux_dir/install.sh -c"
1051 break
1052 fi
1053done
1054if test -z "$ac_aux_dir"; then
1055 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1056fi
1057ac_config_guess=$ac_aux_dir/config.guess
1058ac_config_sub=$ac_aux_dir/config.sub
1059ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1060
1061
1062# Do some error checking and defaulting for the host and target type.
1063# The inputs are:
1064# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1065#
1066# The rules are:
1067# 1. You are not allowed to specify --host, --target, and nonopt at the
1068# same time.
1069# 2. Host defaults to nonopt.
1070# 3. If nonopt is not specified, then host defaults to the current host,
1071# as determined by config.guess.
1072# 4. Target and build default to nonopt.
1073# 5. If nonopt is not specified, then target and build default to host.
1074
1075# The aliases save the names the user supplied, while $host etc.
1076# will get canonicalized.
1077case $host---$target---$nonopt in
1078NONE---*---* | *---NONE---* | *---*---NONE) ;;
1079*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1080esac
1081
1082
1083# Make sure we can run config.sub.
1084if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1085else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1086fi
1087
1088echo $ac_n "checking host system type""... $ac_c" 1>&6
06825bd1 1089echo "configure:1090: checking host system type" >&5
c906108c
SS
1090
1091host_alias=$host
1092case "$host_alias" in
1093NONE)
1094 case $nonopt in
1095 NONE)
1096 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1097 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1098 fi ;;
1099 *) host_alias=$nonopt ;;
1100 esac ;;
1101esac
1102
1103host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1104host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1105host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1106host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1107echo "$ac_t""$host" 1>&6
1108
1109echo $ac_n "checking target system type""... $ac_c" 1>&6
06825bd1 1110echo "configure:1111: checking target system type" >&5
c906108c
SS
1111
1112target_alias=$target
1113case "$target_alias" in
1114NONE)
1115 case $nonopt in
1116 NONE) target_alias=$host_alias ;;
1117 *) target_alias=$nonopt ;;
1118 esac ;;
1119esac
1120
1121target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1122target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1123target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1124target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1125echo "$ac_t""$target" 1>&6
1126
1127echo $ac_n "checking build system type""... $ac_c" 1>&6
06825bd1 1128echo "configure:1129: checking build system type" >&5
c906108c
SS
1129
1130build_alias=$build
1131case "$build_alias" in
1132NONE)
1133 case $nonopt in
1134 NONE) build_alias=$host_alias ;;
1135 *) build_alias=$nonopt ;;
1136 esac ;;
1137esac
1138
1139build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1140build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1141build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1142build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143echo "$ac_t""$build" 1>&6
1144
1145test "$host_alias" != "$target_alias" &&
1146 test "$program_prefix$program_suffix$program_transform_name" = \
1147 NONENONEs,x,x, &&
1148 program_prefix=${target_alias}-
1149
1150
8bb2c122
MK
1151# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1152# doesn't support cross-compilation, but the one from Autoconf 2.5x
1153# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1154# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1155# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1156# 2.5x.
1157if test $host != $build; then
1158 ac_tool_prefix=${host_alias}-
1159else
1160 ac_tool_prefix=
1161fi
1162
1163# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1165echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 1166echo "configure:1167: checking for $ac_word" >&5
8bb2c122
MK
1167if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169else
1170 if test -n "$RANLIB"; then
1171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1172else
1173 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1174 ac_dummy="$PATH"
1175 for ac_dir in $ac_dummy; do
1176 test -z "$ac_dir" && ac_dir=.
1177 if test -f $ac_dir/$ac_word; then
1178 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1179 break
1180 fi
1181 done
1182 IFS="$ac_save_ifs"
1183fi
1184fi
1185RANLIB="$ac_cv_prog_RANLIB"
1186if test -n "$RANLIB"; then
1187 echo "$ac_t""$RANLIB" 1>&6
1188else
1189 echo "$ac_t""no" 1>&6
1190fi
1191
1192
1193if test -z "$ac_cv_prog_RANLIB"; then
1194if test -n "$ac_tool_prefix"; then
1195 # Extract the first word of "ranlib", so it can be a program name with args.
1196set dummy ranlib; ac_word=$2
1197echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 1198echo "configure:1199: checking for $ac_word" >&5
8bb2c122
MK
1199if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1200 echo $ac_n "(cached) $ac_c" 1>&6
1201else
1202 if test -n "$RANLIB"; then
1203 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1204else
1205 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1206 ac_dummy="$PATH"
1207 for ac_dir in $ac_dummy; do
1208 test -z "$ac_dir" && ac_dir=.
1209 if test -f $ac_dir/$ac_word; then
1210 ac_cv_prog_RANLIB="ranlib"
1211 break
1212 fi
1213 done
1214 IFS="$ac_save_ifs"
1215 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1216fi
1217fi
1218RANLIB="$ac_cv_prog_RANLIB"
1219if test -n "$RANLIB"; then
1220 echo "$ac_t""$RANLIB" 1>&6
1221else
1222 echo "$ac_t""no" 1>&6
1223fi
1224
1225else
1226 RANLIB=":"
1227fi
1228fi
1229
1230
c906108c
SS
1231ALL_LINGUAS=
1232echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
06825bd1 1233echo "configure:1234: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1234set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1235if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1236 echo $ac_n "(cached) $ac_c" 1>&6
1237else
1238 cat > conftestmake <<\EOF
1239all:
1240 @echo 'ac_maketemp="${MAKE}"'
1241EOF
1242# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1243eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1244if test -n "$ac_maketemp"; then
1245 eval ac_cv_prog_make_${ac_make}_set=yes
1246else
1247 eval ac_cv_prog_make_${ac_make}_set=no
1248fi
1249rm -f conftestmake
1250fi
1251if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1252 echo "$ac_t""yes" 1>&6
1253 SET_MAKE=
1254else
1255 echo "$ac_t""no" 1>&6
1256 SET_MAKE="MAKE=${MAKE-make}"
1257fi
1258
1259# Extract the first word of "ranlib", so it can be a program name with args.
1260set dummy ranlib; ac_word=$2
1261echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 1262echo "configure:1263: checking for $ac_word" >&5
c906108c
SS
1263if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1264 echo $ac_n "(cached) $ac_c" 1>&6
1265else
1266 if test -n "$RANLIB"; then
1267 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1268else
1269 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272 test -z "$ac_dir" && ac_dir=.
1273 if test -f $ac_dir/$ac_word; then
1274 ac_cv_prog_RANLIB="ranlib"
1275 break
1276 fi
1277 done
1278 IFS="$ac_save_ifs"
1279 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1280fi
1281fi
1282RANLIB="$ac_cv_prog_RANLIB"
1283if test -n "$RANLIB"; then
1284 echo "$ac_t""$RANLIB" 1>&6
1285else
1286 echo "$ac_t""no" 1>&6
1287fi
1288
1289echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
06825bd1 1290echo "configure:1291: checking for ANSI C header files" >&5
c906108c
SS
1291if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1292 echo $ac_n "(cached) $ac_c" 1>&6
1293else
1294 cat > conftest.$ac_ext <<EOF
06825bd1 1295#line 1296 "configure"
c906108c
SS
1296#include "confdefs.h"
1297#include <stdlib.h>
1298#include <stdarg.h>
1299#include <string.h>
1300#include <float.h>
1301EOF
1302ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 1303{ (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1304ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1305if test -z "$ac_err"; then
1306 rm -rf conftest*
1307 ac_cv_header_stdc=yes
1308else
1309 echo "$ac_err" >&5
1310 echo "configure: failed program was:" >&5
1311 cat conftest.$ac_ext >&5
1312 rm -rf conftest*
1313 ac_cv_header_stdc=no
1314fi
1315rm -f conftest*
1316
1317if test $ac_cv_header_stdc = yes; then
1318 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1319cat > conftest.$ac_ext <<EOF
06825bd1 1320#line 1321 "configure"
c906108c
SS
1321#include "confdefs.h"
1322#include <string.h>
1323EOF
1324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1325 egrep "memchr" >/dev/null 2>&1; then
1326 :
1327else
1328 rm -rf conftest*
1329 ac_cv_header_stdc=no
1330fi
1331rm -f conftest*
1332
1333fi
1334
1335if test $ac_cv_header_stdc = yes; then
1336 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1337cat > conftest.$ac_ext <<EOF
06825bd1 1338#line 1339 "configure"
c906108c
SS
1339#include "confdefs.h"
1340#include <stdlib.h>
1341EOF
1342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1343 egrep "free" >/dev/null 2>&1; then
1344 :
1345else
1346 rm -rf conftest*
1347 ac_cv_header_stdc=no
1348fi
1349rm -f conftest*
1350
1351fi
1352
1353if test $ac_cv_header_stdc = yes; then
1354 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1355if test "$cross_compiling" = yes; then
1356 :
1357else
1358 cat > conftest.$ac_ext <<EOF
06825bd1 1359#line 1360 "configure"
c906108c
SS
1360#include "confdefs.h"
1361#include <ctype.h>
1362#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1363#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1364#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1365int main () { int i; for (i = 0; i < 256; i++)
1366if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1367exit (0); }
1368
1369EOF
06825bd1 1370if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1371then
1372 :
1373else
1374 echo "configure: failed program was:" >&5
1375 cat conftest.$ac_ext >&5
1376 rm -fr conftest*
1377 ac_cv_header_stdc=no
1378fi
1379rm -fr conftest*
1380fi
1381
1382fi
1383fi
1384
1385echo "$ac_t""$ac_cv_header_stdc" 1>&6
1386if test $ac_cv_header_stdc = yes; then
1387 cat >> confdefs.h <<\EOF
1388#define STDC_HEADERS 1
1389EOF
1390
1391fi
1392
1393echo $ac_n "checking for working const""... $ac_c" 1>&6
06825bd1 1394echo "configure:1395: checking for working const" >&5
c906108c
SS
1395if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1396 echo $ac_n "(cached) $ac_c" 1>&6
1397else
1398 cat > conftest.$ac_ext <<EOF
06825bd1 1399#line 1400 "configure"
c906108c
SS
1400#include "confdefs.h"
1401
1402int main() {
1403
1404/* Ultrix mips cc rejects this. */
1405typedef int charset[2]; const charset x;
1406/* SunOS 4.1.1 cc rejects this. */
1407char const *const *ccp;
1408char **p;
1409/* NEC SVR4.0.2 mips cc rejects this. */
1410struct point {int x, y;};
1411static struct point const zero = {0,0};
1412/* AIX XL C 1.02.0.0 rejects this.
1413 It does not let you subtract one const X* pointer from another in an arm
1414 of an if-expression whose if-part is not a constant expression */
1415const char *g = "string";
1416ccp = &g + (g ? g-g : 0);
1417/* HPUX 7.0 cc rejects these. */
1418++ccp;
1419p = (char**) ccp;
1420ccp = (char const *const *) p;
1421{ /* SCO 3.2v4 cc rejects this. */
1422 char *t;
1423 char const *s = 0 ? (char *) 0 : (char const *) 0;
1424
1425 *t++ = 0;
1426}
1427{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1428 int x[] = {25, 17};
1429 const int *foo = &x[0];
1430 ++foo;
1431}
1432{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1433 typedef const int *iptr;
1434 iptr p = 0;
1435 ++p;
1436}
1437{ /* AIX XL C 1.02.0.0 rejects this saying
1438 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1439 struct s { int j; const int *ap[3]; };
1440 struct s *b; b->j = 5;
1441}
1442{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1443 const int foo = 10;
1444}
1445
1446; return 0; }
1447EOF
06825bd1 1448if { (eval echo configure:1449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1449 rm -rf conftest*
1450 ac_cv_c_const=yes
1451else
1452 echo "configure: failed program was:" >&5
1453 cat conftest.$ac_ext >&5
1454 rm -rf conftest*
1455 ac_cv_c_const=no
1456fi
1457rm -f conftest*
1458fi
1459
1460echo "$ac_t""$ac_cv_c_const" 1>&6
1461if test $ac_cv_c_const = no; then
1462 cat >> confdefs.h <<\EOF
1463#define const
1464EOF
1465
1466fi
1467
1468echo $ac_n "checking for inline""... $ac_c" 1>&6
06825bd1 1469echo "configure:1470: checking for inline" >&5
c906108c
SS
1470if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1471 echo $ac_n "(cached) $ac_c" 1>&6
1472else
1473 ac_cv_c_inline=no
1474for ac_kw in inline __inline__ __inline; do
1475 cat > conftest.$ac_ext <<EOF
06825bd1 1476#line 1477 "configure"
c906108c
SS
1477#include "confdefs.h"
1478
1479int main() {
1480} $ac_kw foo() {
1481; return 0; }
1482EOF
06825bd1 1483if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1484 rm -rf conftest*
1485 ac_cv_c_inline=$ac_kw; break
1486else
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1489fi
1490rm -f conftest*
1491done
1492
1493fi
1494
1495echo "$ac_t""$ac_cv_c_inline" 1>&6
1496case "$ac_cv_c_inline" in
1497 inline | yes) ;;
1498 no) cat >> confdefs.h <<\EOF
1499#define inline
1500EOF
1501 ;;
1502 *) cat >> confdefs.h <<EOF
1503#define inline $ac_cv_c_inline
1504EOF
1505 ;;
1506esac
1507
1508echo $ac_n "checking for off_t""... $ac_c" 1>&6
06825bd1 1509echo "configure:1510: checking for off_t" >&5
c906108c
SS
1510if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1512else
1513 cat > conftest.$ac_ext <<EOF
06825bd1 1514#line 1515 "configure"
c906108c
SS
1515#include "confdefs.h"
1516#include <sys/types.h>
1517#if STDC_HEADERS
1518#include <stdlib.h>
1519#include <stddef.h>
1520#endif
1521EOF
1522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1523 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1524 rm -rf conftest*
1525 ac_cv_type_off_t=yes
1526else
1527 rm -rf conftest*
1528 ac_cv_type_off_t=no
1529fi
1530rm -f conftest*
1531
1532fi
1533echo "$ac_t""$ac_cv_type_off_t" 1>&6
1534if test $ac_cv_type_off_t = no; then
1535 cat >> confdefs.h <<\EOF
1536#define off_t long
1537EOF
1538
1539fi
1540
1541echo $ac_n "checking for size_t""... $ac_c" 1>&6
06825bd1 1542echo "configure:1543: checking for size_t" >&5
c906108c
SS
1543if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1545else
1546 cat > conftest.$ac_ext <<EOF
06825bd1 1547#line 1548 "configure"
c906108c
SS
1548#include "confdefs.h"
1549#include <sys/types.h>
1550#if STDC_HEADERS
1551#include <stdlib.h>
1552#include <stddef.h>
1553#endif
1554EOF
1555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1556 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1557 rm -rf conftest*
1558 ac_cv_type_size_t=yes
1559else
1560 rm -rf conftest*
1561 ac_cv_type_size_t=no
1562fi
1563rm -f conftest*
1564
1565fi
1566echo "$ac_t""$ac_cv_type_size_t" 1>&6
1567if test $ac_cv_type_size_t = no; then
1568 cat >> confdefs.h <<\EOF
1569#define size_t unsigned
1570EOF
1571
1572fi
1573
1574# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1575# for constant arguments. Useless!
1576echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
06825bd1 1577echo "configure:1578: checking for working alloca.h" >&5
c906108c
SS
1578if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1580else
1581 cat > conftest.$ac_ext <<EOF
06825bd1 1582#line 1583 "configure"
c906108c
SS
1583#include "confdefs.h"
1584#include <alloca.h>
1585int main() {
1586char *p = alloca(2 * sizeof(int));
1587; return 0; }
1588EOF
06825bd1 1589if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1590 rm -rf conftest*
1591 ac_cv_header_alloca_h=yes
1592else
1593 echo "configure: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595 rm -rf conftest*
1596 ac_cv_header_alloca_h=no
1597fi
1598rm -f conftest*
1599fi
1600
1601echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1602if test $ac_cv_header_alloca_h = yes; then
1603 cat >> confdefs.h <<\EOF
1604#define HAVE_ALLOCA_H 1
1605EOF
1606
1607fi
1608
1609echo $ac_n "checking for alloca""... $ac_c" 1>&6
06825bd1 1610echo "configure:1611: checking for alloca" >&5
c906108c
SS
1611if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1612 echo $ac_n "(cached) $ac_c" 1>&6
1613else
1614 cat > conftest.$ac_ext <<EOF
06825bd1 1615#line 1616 "configure"
c906108c
SS
1616#include "confdefs.h"
1617
1618#ifdef __GNUC__
1619# define alloca __builtin_alloca
1620#else
1621# ifdef _MSC_VER
1622# include <malloc.h>
1623# define alloca _alloca
1624# else
1625# if HAVE_ALLOCA_H
1626# include <alloca.h>
1627# else
1628# ifdef _AIX
1629 #pragma alloca
1630# else
1631# ifndef alloca /* predefined by HP cc +Olibcalls */
1632char *alloca ();
1633# endif
1634# endif
1635# endif
1636# endif
1637#endif
1638
1639int main() {
1640char *p = (char *) alloca(1);
1641; return 0; }
1642EOF
06825bd1 1643if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1644 rm -rf conftest*
1645 ac_cv_func_alloca_works=yes
1646else
1647 echo "configure: failed program was:" >&5
1648 cat conftest.$ac_ext >&5
1649 rm -rf conftest*
1650 ac_cv_func_alloca_works=no
1651fi
1652rm -f conftest*
1653fi
1654
1655echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1656if test $ac_cv_func_alloca_works = yes; then
1657 cat >> confdefs.h <<\EOF
1658#define HAVE_ALLOCA 1
1659EOF
1660
1661fi
1662
1663if test $ac_cv_func_alloca_works = no; then
1664 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1665 # that cause trouble. Some versions do not even contain alloca or
1666 # contain a buggy version. If you still want to use their alloca,
1667 # use ar to extract alloca.o from them instead of compiling alloca.c.
1668 ALLOCA=alloca.${ac_objext}
1669 cat >> confdefs.h <<\EOF
1670#define C_ALLOCA 1
1671EOF
1672
1673
1674echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
06825bd1 1675echo "configure:1676: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1676if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1677 echo $ac_n "(cached) $ac_c" 1>&6
1678else
1679 cat > conftest.$ac_ext <<EOF
06825bd1 1680#line 1681 "configure"
c906108c
SS
1681#include "confdefs.h"
1682#if defined(CRAY) && ! defined(CRAY2)
1683webecray
1684#else
1685wenotbecray
1686#endif
1687
1688EOF
1689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1690 egrep "webecray" >/dev/null 2>&1; then
1691 rm -rf conftest*
1692 ac_cv_os_cray=yes
1693else
1694 rm -rf conftest*
1695 ac_cv_os_cray=no
1696fi
1697rm -f conftest*
1698
1699fi
1700
1701echo "$ac_t""$ac_cv_os_cray" 1>&6
1702if test $ac_cv_os_cray = yes; then
1703for ac_func in _getb67 GETB67 getb67; do
1704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 1705echo "configure:1706: checking for $ac_func" >&5
c906108c
SS
1706if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
1708else
1709 cat > conftest.$ac_ext <<EOF
06825bd1 1710#line 1711 "configure"
c906108c
SS
1711#include "confdefs.h"
1712/* System header to define __stub macros and hopefully few prototypes,
1713 which can conflict with char $ac_func(); below. */
1714#include <assert.h>
1715/* Override any gcc2 internal prototype to avoid an error. */
1716/* We use char because int might match the return type of a gcc2
1717 builtin and then its argument prototype would still apply. */
1718char $ac_func();
1719
1720int main() {
1721
1722/* The GNU C library defines this for functions which it implements
1723 to always fail with ENOSYS. Some functions are actually named
1724 something starting with __ and the normal name is an alias. */
1725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1726choke me
1727#else
1728$ac_func();
1729#endif
1730
1731; return 0; }
1732EOF
06825bd1 1733if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1734 rm -rf conftest*
1735 eval "ac_cv_func_$ac_func=yes"
1736else
1737 echo "configure: failed program was:" >&5
1738 cat conftest.$ac_ext >&5
1739 rm -rf conftest*
1740 eval "ac_cv_func_$ac_func=no"
1741fi
1742rm -f conftest*
1743fi
1744
1745if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1746 echo "$ac_t""yes" 1>&6
1747 cat >> confdefs.h <<EOF
1748#define CRAY_STACKSEG_END $ac_func
1749EOF
1750
1751 break
1752else
1753 echo "$ac_t""no" 1>&6
1754fi
1755
1756done
1757fi
1758
1759echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
06825bd1 1760echo "configure:1761: checking stack direction for C alloca" >&5
c906108c
SS
1761if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1762 echo $ac_n "(cached) $ac_c" 1>&6
1763else
1764 if test "$cross_compiling" = yes; then
1765 ac_cv_c_stack_direction=0
1766else
1767 cat > conftest.$ac_ext <<EOF
06825bd1 1768#line 1769 "configure"
c906108c
SS
1769#include "confdefs.h"
1770find_stack_direction ()
1771{
1772 static char *addr = 0;
1773 auto char dummy;
1774 if (addr == 0)
1775 {
1776 addr = &dummy;
1777 return find_stack_direction ();
1778 }
1779 else
1780 return (&dummy > addr) ? 1 : -1;
1781}
1782main ()
1783{
1784 exit (find_stack_direction() < 0);
1785}
1786EOF
06825bd1 1787if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1788then
1789 ac_cv_c_stack_direction=1
1790else
1791 echo "configure: failed program was:" >&5
1792 cat conftest.$ac_ext >&5
1793 rm -fr conftest*
1794 ac_cv_c_stack_direction=-1
1795fi
1796rm -fr conftest*
1797fi
1798
1799fi
1800
1801echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1802cat >> confdefs.h <<EOF
1803#define STACK_DIRECTION $ac_cv_c_stack_direction
1804EOF
1805
1806fi
1807
c41b7eb1 1808for ac_hdr in unistd.h
c906108c
SS
1809do
1810ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1811echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 1812echo "configure:1813: checking for $ac_hdr" >&5
c906108c
SS
1813if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1815else
1816 cat > conftest.$ac_ext <<EOF
06825bd1 1817#line 1818 "configure"
c906108c
SS
1818#include "confdefs.h"
1819#include <$ac_hdr>
1820EOF
1821ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 1822{ (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1823ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1824if test -z "$ac_err"; then
1825 rm -rf conftest*
1826 eval "ac_cv_header_$ac_safe=yes"
1827else
1828 echo "$ac_err" >&5
1829 echo "configure: failed program was:" >&5
1830 cat conftest.$ac_ext >&5
1831 rm -rf conftest*
1832 eval "ac_cv_header_$ac_safe=no"
1833fi
1834rm -f conftest*
1835fi
1836if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1837 echo "$ac_t""yes" 1>&6
1838 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1839 cat >> confdefs.h <<EOF
1840#define $ac_tr_hdr 1
1841EOF
1842
1843else
1844 echo "$ac_t""no" 1>&6
1845fi
1846done
1847
1848for ac_func in getpagesize
1849do
1850echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 1851echo "configure:1852: checking for $ac_func" >&5
c906108c
SS
1852if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
1854else
1855 cat > conftest.$ac_ext <<EOF
06825bd1 1856#line 1857 "configure"
c906108c
SS
1857#include "confdefs.h"
1858/* System header to define __stub macros and hopefully few prototypes,
1859 which can conflict with char $ac_func(); below. */
1860#include <assert.h>
1861/* Override any gcc2 internal prototype to avoid an error. */
1862/* We use char because int might match the return type of a gcc2
1863 builtin and then its argument prototype would still apply. */
1864char $ac_func();
1865
1866int main() {
1867
1868/* The GNU C library defines this for functions which it implements
1869 to always fail with ENOSYS. Some functions are actually named
1870 something starting with __ and the normal name is an alias. */
1871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1872choke me
1873#else
1874$ac_func();
1875#endif
1876
1877; return 0; }
1878EOF
06825bd1 1879if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1880 rm -rf conftest*
1881 eval "ac_cv_func_$ac_func=yes"
1882else
1883 echo "configure: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 rm -rf conftest*
1886 eval "ac_cv_func_$ac_func=no"
1887fi
1888rm -f conftest*
1889fi
1890
1891if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1892 echo "$ac_t""yes" 1>&6
1893 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1894 cat >> confdefs.h <<EOF
1895#define $ac_tr_func 1
1896EOF
1897
1898else
1899 echo "$ac_t""no" 1>&6
1900fi
1901done
1902
1903echo $ac_n "checking for working mmap""... $ac_c" 1>&6
06825bd1 1904echo "configure:1905: checking for working mmap" >&5
c906108c
SS
1905if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907else
1908 if test "$cross_compiling" = yes; then
1909 ac_cv_func_mmap_fixed_mapped=no
1910else
1911 cat > conftest.$ac_ext <<EOF
06825bd1 1912#line 1913 "configure"
c906108c
SS
1913#include "confdefs.h"
1914
1915/* Thanks to Mike Haertel and Jim Avera for this test.
1916 Here is a matrix of mmap possibilities:
1917 mmap private not fixed
1918 mmap private fixed at somewhere currently unmapped
1919 mmap private fixed at somewhere already mapped
1920 mmap shared not fixed
1921 mmap shared fixed at somewhere currently unmapped
1922 mmap shared fixed at somewhere already mapped
1923 For private mappings, we should verify that changes cannot be read()
1924 back from the file, nor mmap's back from the file at a different
1925 address. (There have been systems where private was not correctly
1926 implemented like the infamous i386 svr4.0, and systems where the
1927 VM page cache was not coherent with the filesystem buffer cache
1928 like early versions of FreeBSD and possibly contemporary NetBSD.)
1929 For shared mappings, we should conversely verify that changes get
1930 propogated back to all the places they're supposed to be.
1931
1932 Grep wants private fixed already mapped.
1933 The main things grep needs to know about mmap are:
1934 * does it exist and is it safe to write into the mmap'd area
1935 * how to use it (BSD variants) */
1936#include <sys/types.h>
1937#include <fcntl.h>
1938#include <sys/mman.h>
1939
1940/* This mess was copied from the GNU getpagesize.h. */
1941#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1942# ifdef HAVE_UNISTD_H
1943# include <unistd.h>
1944# endif
c906108c
SS
1945
1946/* Assume that all systems that can run configure have sys/param.h. */
1947# ifndef HAVE_SYS_PARAM_H
1948# define HAVE_SYS_PARAM_H 1
1949# endif
1950
1951# ifdef _SC_PAGESIZE
1952# define getpagesize() sysconf(_SC_PAGESIZE)
1953# else /* no _SC_PAGESIZE */
1954# ifdef HAVE_SYS_PARAM_H
1955# include <sys/param.h>
1956# ifdef EXEC_PAGESIZE
1957# define getpagesize() EXEC_PAGESIZE
1958# else /* no EXEC_PAGESIZE */
1959# ifdef NBPG
1960# define getpagesize() NBPG * CLSIZE
1961# ifndef CLSIZE
1962# define CLSIZE 1
1963# endif /* no CLSIZE */
1964# else /* no NBPG */
1965# ifdef NBPC
1966# define getpagesize() NBPC
1967# else /* no NBPC */
1968# ifdef PAGESIZE
1969# define getpagesize() PAGESIZE
1970# endif /* PAGESIZE */
1971# endif /* no NBPC */
1972# endif /* no NBPG */
1973# endif /* no EXEC_PAGESIZE */
1974# else /* no HAVE_SYS_PARAM_H */
1975# define getpagesize() 8192 /* punt totally */
1976# endif /* no HAVE_SYS_PARAM_H */
1977# endif /* no _SC_PAGESIZE */
1978
1979#endif /* no HAVE_GETPAGESIZE */
1980
1981#ifdef __cplusplus
1982extern "C" { void *malloc(unsigned); }
1983#else
1984char *malloc();
1985#endif
1986
1987int
1988main()
1989{
1990 char *data, *data2, *data3;
1991 int i, pagesize;
1992 int fd;
1993
1994 pagesize = getpagesize();
1995
1996 /*
1997 * First, make a file with some known garbage in it.
1998 */
1999 data = malloc(pagesize);
2000 if (!data)
2001 exit(1);
2002 for (i = 0; i < pagesize; ++i)
2003 *(data + i) = rand();
2004 umask(0);
2005 fd = creat("conftestmmap", 0600);
2006 if (fd < 0)
2007 exit(1);
2008 if (write(fd, data, pagesize) != pagesize)
2009 exit(1);
2010 close(fd);
2011
2012 /*
2013 * Next, try to mmap the file at a fixed address which
2014 * already has something else allocated at it. If we can,
2015 * also make sure that we see the same garbage.
2016 */
2017 fd = open("conftestmmap", O_RDWR);
2018 if (fd < 0)
2019 exit(1);
2020 data2 = malloc(2 * pagesize);
2021 if (!data2)
2022 exit(1);
2023 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2024 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2025 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2026 exit(1);
2027 for (i = 0; i < pagesize; ++i)
2028 if (*(data + i) != *(data2 + i))
2029 exit(1);
2030
2031 /*
2032 * Finally, make sure that changes to the mapped area
2033 * do not percolate back to the file as seen by read().
2034 * (This is a bug on some variants of i386 svr4.0.)
2035 */
2036 for (i = 0; i < pagesize; ++i)
2037 *(data2 + i) = *(data2 + i) + 1;
2038 data3 = malloc(pagesize);
2039 if (!data3)
2040 exit(1);
2041 if (read(fd, data3, pagesize) != pagesize)
2042 exit(1);
2043 for (i = 0; i < pagesize; ++i)
2044 if (*(data + i) != *(data3 + i))
2045 exit(1);
2046 close(fd);
2047 unlink("conftestmmap");
2048 exit(0);
2049}
2050
2051EOF
06825bd1 2052if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2053then
2054 ac_cv_func_mmap_fixed_mapped=yes
2055else
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 rm -fr conftest*
2059 ac_cv_func_mmap_fixed_mapped=no
2060fi
2061rm -fr conftest*
2062fi
2063
2064fi
2065
2066echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2067if test $ac_cv_func_mmap_fixed_mapped = yes; then
2068 cat >> confdefs.h <<\EOF
2069#define HAVE_MMAP 1
2070EOF
2071
2072fi
2073
2074
2075 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2076unistd.h values.h sys/param.h
2077do
2078ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2079echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 2080echo "configure:2081: checking for $ac_hdr" >&5
c906108c
SS
2081if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2082 echo $ac_n "(cached) $ac_c" 1>&6
2083else
2084 cat > conftest.$ac_ext <<EOF
06825bd1 2085#line 2086 "configure"
c906108c
SS
2086#include "confdefs.h"
2087#include <$ac_hdr>
2088EOF
2089ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 2090{ (eval echo configure:2091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2091ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2092if test -z "$ac_err"; then
2093 rm -rf conftest*
2094 eval "ac_cv_header_$ac_safe=yes"
2095else
2096 echo "$ac_err" >&5
2097 echo "configure: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 rm -rf conftest*
2100 eval "ac_cv_header_$ac_safe=no"
2101fi
2102rm -f conftest*
2103fi
2104if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2105 echo "$ac_t""yes" 1>&6
2106 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2107 cat >> confdefs.h <<EOF
2108#define $ac_tr_hdr 1
2109EOF
2110
2111else
2112 echo "$ac_t""no" 1>&6
2113fi
2114done
2115
2116 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2117__argz_count __argz_stringify __argz_next
2118do
2119echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 2120echo "configure:2121: checking for $ac_func" >&5
c906108c
SS
2121if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123else
2124 cat > conftest.$ac_ext <<EOF
06825bd1 2125#line 2126 "configure"
c906108c
SS
2126#include "confdefs.h"
2127/* System header to define __stub macros and hopefully few prototypes,
2128 which can conflict with char $ac_func(); below. */
2129#include <assert.h>
2130/* Override any gcc2 internal prototype to avoid an error. */
2131/* We use char because int might match the return type of a gcc2
2132 builtin and then its argument prototype would still apply. */
2133char $ac_func();
2134
2135int main() {
2136
2137/* The GNU C library defines this for functions which it implements
2138 to always fail with ENOSYS. Some functions are actually named
2139 something starting with __ and the normal name is an alias. */
2140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2141choke me
2142#else
2143$ac_func();
2144#endif
2145
2146; return 0; }
2147EOF
06825bd1 2148if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2149 rm -rf conftest*
2150 eval "ac_cv_func_$ac_func=yes"
2151else
2152 echo "configure: failed program was:" >&5
2153 cat conftest.$ac_ext >&5
2154 rm -rf conftest*
2155 eval "ac_cv_func_$ac_func=no"
2156fi
2157rm -f conftest*
2158fi
2159
2160if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2161 echo "$ac_t""yes" 1>&6
2162 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2163 cat >> confdefs.h <<EOF
2164#define $ac_tr_func 1
2165EOF
2166
2167else
2168 echo "$ac_t""no" 1>&6
2169fi
2170done
2171
2172
2173 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2174 for ac_func in stpcpy
2175do
2176echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 2177echo "configure:2178: checking for $ac_func" >&5
c906108c
SS
2178if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2179 echo $ac_n "(cached) $ac_c" 1>&6
2180else
2181 cat > conftest.$ac_ext <<EOF
06825bd1 2182#line 2183 "configure"
c906108c
SS
2183#include "confdefs.h"
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $ac_func(); below. */
2186#include <assert.h>
2187/* Override any gcc2 internal prototype to avoid an error. */
2188/* We use char because int might match the return type of a gcc2
2189 builtin and then its argument prototype would still apply. */
2190char $ac_func();
2191
2192int main() {
2193
2194/* The GNU C library defines this for functions which it implements
2195 to always fail with ENOSYS. Some functions are actually named
2196 something starting with __ and the normal name is an alias. */
2197#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2198choke me
2199#else
2200$ac_func();
2201#endif
2202
2203; return 0; }
2204EOF
06825bd1 2205if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2206 rm -rf conftest*
2207 eval "ac_cv_func_$ac_func=yes"
2208else
2209 echo "configure: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 rm -rf conftest*
2212 eval "ac_cv_func_$ac_func=no"
2213fi
2214rm -f conftest*
2215fi
2216
2217if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2218 echo "$ac_t""yes" 1>&6
2219 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2220 cat >> confdefs.h <<EOF
2221#define $ac_tr_func 1
2222EOF
2223
2224else
2225 echo "$ac_t""no" 1>&6
2226fi
2227done
2228
2229 fi
2230 if test "${ac_cv_func_stpcpy}" = "yes"; then
2231 cat >> confdefs.h <<\EOF
2232#define HAVE_STPCPY 1
2233EOF
2234
2235 fi
2236
2237 if test $ac_cv_header_locale_h = yes; then
2238 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
06825bd1 2239echo "configure:2240: checking for LC_MESSAGES" >&5
c906108c
SS
2240if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243 cat > conftest.$ac_ext <<EOF
06825bd1 2244#line 2245 "configure"
c906108c
SS
2245#include "confdefs.h"
2246#include <locale.h>
2247int main() {
2248return LC_MESSAGES
2249; return 0; }
2250EOF
06825bd1 2251if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2252 rm -rf conftest*
2253 am_cv_val_LC_MESSAGES=yes
2254else
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257 rm -rf conftest*
2258 am_cv_val_LC_MESSAGES=no
2259fi
2260rm -f conftest*
2261fi
2262
2263echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2264 if test $am_cv_val_LC_MESSAGES = yes; then
2265 cat >> confdefs.h <<\EOF
2266#define HAVE_LC_MESSAGES 1
2267EOF
2268
2269 fi
2270 fi
2271 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
06825bd1 2272echo "configure:2273: checking whether NLS is requested" >&5
c906108c
SS
2273 # Check whether --enable-nls or --disable-nls was given.
2274if test "${enable_nls+set}" = set; then
2275 enableval="$enable_nls"
2276 USE_NLS=$enableval
2277else
2278 USE_NLS=yes
2279fi
2280
2281 echo "$ac_t""$USE_NLS" 1>&6
2282
2283
2284 USE_INCLUDED_LIBINTL=no
2285
2286 if test "$USE_NLS" = "yes"; then
2287 cat >> confdefs.h <<\EOF
2288#define ENABLE_NLS 1
2289EOF
2290
2291 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
06825bd1 2292echo "configure:2293: checking whether included gettext is requested" >&5
c906108c
SS
2293 # Check whether --with-included-gettext or --without-included-gettext was given.
2294if test "${with_included_gettext+set}" = set; then
2295 withval="$with_included_gettext"
2296 nls_cv_force_use_gnu_gettext=$withval
2297else
2298 nls_cv_force_use_gnu_gettext=no
2299fi
2300
2301 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2302
2303 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2304 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2305 nls_cv_header_intl=
2306 nls_cv_header_libgt=
2307 CATOBJEXT=NONE
2308
2309 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2310echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
06825bd1 2311echo "configure:2312: checking for libintl.h" >&5
c906108c
SS
2312if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2313 echo $ac_n "(cached) $ac_c" 1>&6
2314else
2315 cat > conftest.$ac_ext <<EOF
06825bd1 2316#line 2317 "configure"
c906108c
SS
2317#include "confdefs.h"
2318#include <libintl.h>
2319EOF
2320ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 2321{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2322ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2323if test -z "$ac_err"; then
2324 rm -rf conftest*
2325 eval "ac_cv_header_$ac_safe=yes"
2326else
2327 echo "$ac_err" >&5
2328 echo "configure: failed program was:" >&5
2329 cat conftest.$ac_ext >&5
2330 rm -rf conftest*
2331 eval "ac_cv_header_$ac_safe=no"
2332fi
2333rm -f conftest*
2334fi
2335if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2336 echo "$ac_t""yes" 1>&6
2337 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
06825bd1 2338echo "configure:2339: checking for gettext in libc" >&5
c906108c
SS
2339if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2340 echo $ac_n "(cached) $ac_c" 1>&6
2341else
2342 cat > conftest.$ac_ext <<EOF
06825bd1 2343#line 2344 "configure"
c906108c
SS
2344#include "confdefs.h"
2345#include <libintl.h>
2346int main() {
2347return (int) gettext ("")
2348; return 0; }
2349EOF
06825bd1 2350if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2351 rm -rf conftest*
2352 gt_cv_func_gettext_libc=yes
2353else
2354 echo "configure: failed program was:" >&5
2355 cat conftest.$ac_ext >&5
2356 rm -rf conftest*
2357 gt_cv_func_gettext_libc=no
2358fi
2359rm -f conftest*
2360fi
2361
2362echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2363
2364 if test "$gt_cv_func_gettext_libc" != "yes"; then
2365 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
06825bd1 2366echo "configure:2367: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2367ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2368if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370else
2371 ac_save_LIBS="$LIBS"
2372LIBS="-lintl $LIBS"
2373cat > conftest.$ac_ext <<EOF
06825bd1 2374#line 2375 "configure"
c906108c
SS
2375#include "confdefs.h"
2376/* Override any gcc2 internal prototype to avoid an error. */
2377/* We use char because int might match the return type of a gcc2
2378 builtin and then its argument prototype would still apply. */
2379char bindtextdomain();
2380
2381int main() {
2382bindtextdomain()
2383; return 0; }
2384EOF
06825bd1 2385if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2386 rm -rf conftest*
2387 eval "ac_cv_lib_$ac_lib_var=yes"
2388else
2389 echo "configure: failed program was:" >&5
2390 cat conftest.$ac_ext >&5
2391 rm -rf conftest*
2392 eval "ac_cv_lib_$ac_lib_var=no"
2393fi
2394rm -f conftest*
2395LIBS="$ac_save_LIBS"
2396
2397fi
2398if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2399 echo "$ac_t""yes" 1>&6
2400 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
06825bd1 2401echo "configure:2402: checking for gettext in libintl" >&5
c906108c
SS
2402if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2403 echo $ac_n "(cached) $ac_c" 1>&6
2404else
2405 cat > conftest.$ac_ext <<EOF
06825bd1 2406#line 2407 "configure"
c906108c
SS
2407#include "confdefs.h"
2408
2409int main() {
2410return (int) gettext ("")
2411; return 0; }
2412EOF
06825bd1 2413if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2414 rm -rf conftest*
2415 gt_cv_func_gettext_libintl=yes
2416else
2417 echo "configure: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 rm -rf conftest*
2420 gt_cv_func_gettext_libintl=no
2421fi
2422rm -f conftest*
2423fi
2424
2425echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2426else
2427 echo "$ac_t""no" 1>&6
2428fi
2429
2430 fi
2431
2432 if test "$gt_cv_func_gettext_libc" = "yes" \
2433 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2434 cat >> confdefs.h <<\EOF
2435#define HAVE_GETTEXT 1
2436EOF
2437
2438 # Extract the first word of "msgfmt", so it can be a program name with args.
2439set dummy msgfmt; ac_word=$2
2440echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2441echo "configure:2442: checking for $ac_word" >&5
c906108c
SS
2442if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2443 echo $ac_n "(cached) $ac_c" 1>&6
2444else
2445 case "$MSGFMT" in
2446 /*)
2447 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2448 ;;
2449 *)
2450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2451 for ac_dir in $PATH; do
2452 test -z "$ac_dir" && ac_dir=.
2453 if test -f $ac_dir/$ac_word; then
2454 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2455 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2456 break
2457 fi
2458 fi
2459 done
2460 IFS="$ac_save_ifs"
2461 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2462 ;;
2463esac
2464fi
2465MSGFMT="$ac_cv_path_MSGFMT"
2466if test -n "$MSGFMT"; then
2467 echo "$ac_t""$MSGFMT" 1>&6
2468else
2469 echo "$ac_t""no" 1>&6
2470fi
2471 if test "$MSGFMT" != "no"; then
2472 for ac_func in dcgettext
2473do
2474echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 2475echo "configure:2476: checking for $ac_func" >&5
c906108c
SS
2476if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2477 echo $ac_n "(cached) $ac_c" 1>&6
2478else
2479 cat > conftest.$ac_ext <<EOF
06825bd1 2480#line 2481 "configure"
c906108c
SS
2481#include "confdefs.h"
2482/* System header to define __stub macros and hopefully few prototypes,
2483 which can conflict with char $ac_func(); below. */
2484#include <assert.h>
2485/* Override any gcc2 internal prototype to avoid an error. */
2486/* We use char because int might match the return type of a gcc2
2487 builtin and then its argument prototype would still apply. */
2488char $ac_func();
2489
2490int main() {
2491
2492/* The GNU C library defines this for functions which it implements
2493 to always fail with ENOSYS. Some functions are actually named
2494 something starting with __ and the normal name is an alias. */
2495#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2496choke me
2497#else
2498$ac_func();
2499#endif
2500
2501; return 0; }
2502EOF
06825bd1 2503if { (eval echo configure:2504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2504 rm -rf conftest*
2505 eval "ac_cv_func_$ac_func=yes"
2506else
2507 echo "configure: failed program was:" >&5
2508 cat conftest.$ac_ext >&5
2509 rm -rf conftest*
2510 eval "ac_cv_func_$ac_func=no"
2511fi
2512rm -f conftest*
2513fi
2514
2515if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2516 echo "$ac_t""yes" 1>&6
2517 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2518 cat >> confdefs.h <<EOF
2519#define $ac_tr_func 1
2520EOF
2521
2522else
2523 echo "$ac_t""no" 1>&6
2524fi
2525done
2526
2527 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2528set dummy gmsgfmt; ac_word=$2
2529echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2530echo "configure:2531: checking for $ac_word" >&5
c906108c
SS
2531if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2533else
2534 case "$GMSGFMT" in
2535 /*)
2536 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2537 ;;
2538 ?:/*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2540 ;;
2541 *)
2542 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2543 ac_dummy="$PATH"
2544 for ac_dir in $ac_dummy; do
2545 test -z "$ac_dir" && ac_dir=.
2546 if test -f $ac_dir/$ac_word; then
2547 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2548 break
2549 fi
2550 done
2551 IFS="$ac_save_ifs"
2552 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2553 ;;
2554esac
2555fi
2556GMSGFMT="$ac_cv_path_GMSGFMT"
2557if test -n "$GMSGFMT"; then
2558 echo "$ac_t""$GMSGFMT" 1>&6
2559else
2560 echo "$ac_t""no" 1>&6
2561fi
2562
2563 # Extract the first word of "xgettext", so it can be a program name with args.
2564set dummy xgettext; ac_word=$2
2565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2566echo "configure:2567: checking for $ac_word" >&5
c906108c
SS
2567if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2568 echo $ac_n "(cached) $ac_c" 1>&6
2569else
2570 case "$XGETTEXT" in
2571 /*)
2572 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2573 ;;
2574 *)
2575 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2576 for ac_dir in $PATH; do
2577 test -z "$ac_dir" && ac_dir=.
2578 if test -f $ac_dir/$ac_word; then
2579 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2580 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2581 break
2582 fi
2583 fi
2584 done
2585 IFS="$ac_save_ifs"
2586 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2587 ;;
2588esac
2589fi
2590XGETTEXT="$ac_cv_path_XGETTEXT"
2591if test -n "$XGETTEXT"; then
2592 echo "$ac_t""$XGETTEXT" 1>&6
2593else
2594 echo "$ac_t""no" 1>&6
2595fi
2596
2597 cat > conftest.$ac_ext <<EOF
06825bd1 2598#line 2599 "configure"
c906108c
SS
2599#include "confdefs.h"
2600
2601int main() {
2602extern int _nl_msg_cat_cntr;
2603 return _nl_msg_cat_cntr
2604; return 0; }
2605EOF
06825bd1 2606if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2607 rm -rf conftest*
2608 CATOBJEXT=.gmo
2609 DATADIRNAME=share
2610else
2611 echo "configure: failed program was:" >&5
2612 cat conftest.$ac_ext >&5
2613 rm -rf conftest*
2614 CATOBJEXT=.mo
2615 DATADIRNAME=lib
2616fi
2617rm -f conftest*
2618 INSTOBJEXT=.mo
2619 fi
2620 fi
2621
2622else
2623 echo "$ac_t""no" 1>&6
2624fi
2625
2626
2627
2628 if test "$CATOBJEXT" = "NONE"; then
2629 nls_cv_use_gnu_gettext=yes
2630 fi
2631 fi
2632
2633 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2634 INTLOBJS="\$(GETTOBJS)"
2635 # Extract the first word of "msgfmt", so it can be a program name with args.
2636set dummy msgfmt; ac_word=$2
2637echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2638echo "configure:2639: checking for $ac_word" >&5
c906108c
SS
2639if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2640 echo $ac_n "(cached) $ac_c" 1>&6
2641else
2642 case "$MSGFMT" in
2643 /*)
2644 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2645 ;;
2646 *)
2647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2648 for ac_dir in $PATH; do
2649 test -z "$ac_dir" && ac_dir=.
2650 if test -f $ac_dir/$ac_word; then
2651 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2652 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2653 break
2654 fi
2655 fi
2656 done
2657 IFS="$ac_save_ifs"
2658 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2659 ;;
2660esac
2661fi
2662MSGFMT="$ac_cv_path_MSGFMT"
2663if test -n "$MSGFMT"; then
2664 echo "$ac_t""$MSGFMT" 1>&6
2665else
2666 echo "$ac_t""no" 1>&6
2667fi
2668
2669 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2670set dummy gmsgfmt; ac_word=$2
2671echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2672echo "configure:2673: checking for $ac_word" >&5
c906108c
SS
2673if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2674 echo $ac_n "(cached) $ac_c" 1>&6
2675else
2676 case "$GMSGFMT" in
2677 /*)
2678 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2679 ;;
2680 ?:/*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2682 ;;
2683 *)
2684 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2685 ac_dummy="$PATH"
2686 for ac_dir in $ac_dummy; do
2687 test -z "$ac_dir" && ac_dir=.
2688 if test -f $ac_dir/$ac_word; then
2689 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2690 break
2691 fi
2692 done
2693 IFS="$ac_save_ifs"
2694 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2695 ;;
2696esac
2697fi
2698GMSGFMT="$ac_cv_path_GMSGFMT"
2699if test -n "$GMSGFMT"; then
2700 echo "$ac_t""$GMSGFMT" 1>&6
2701else
2702 echo "$ac_t""no" 1>&6
2703fi
2704
2705 # Extract the first word of "xgettext", so it can be a program name with args.
2706set dummy xgettext; ac_word=$2
2707echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 2708echo "configure:2709: checking for $ac_word" >&5
c906108c
SS
2709if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711else
2712 case "$XGETTEXT" in
2713 /*)
2714 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2715 ;;
2716 *)
2717 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2718 for ac_dir in $PATH; do
2719 test -z "$ac_dir" && ac_dir=.
2720 if test -f $ac_dir/$ac_word; then
2721 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2722 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2723 break
2724 fi
2725 fi
2726 done
2727 IFS="$ac_save_ifs"
2728 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2729 ;;
2730esac
2731fi
2732XGETTEXT="$ac_cv_path_XGETTEXT"
2733if test -n "$XGETTEXT"; then
2734 echo "$ac_t""$XGETTEXT" 1>&6
2735else
2736 echo "$ac_t""no" 1>&6
2737fi
2738
2739
2740 USE_INCLUDED_LIBINTL=yes
2741 CATOBJEXT=.gmo
2742 INSTOBJEXT=.mo
2743 DATADIRNAME=share
2744 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2745 INTLLIBS=$INTLDEPS
2746 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2747 nls_cv_header_intl=libintl.h
2748 nls_cv_header_libgt=libgettext.h
2749 fi
2750
2751 if test "$XGETTEXT" != ":"; then
2752 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2753 : ;
2754 else
2755 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2756 XGETTEXT=":"
2757 fi
2758 fi
2759
2760 # We need to process the po/ directory.
2761 POSUB=po
2762 else
2763 DATADIRNAME=share
2764 nls_cv_header_intl=libintl.h
2765 nls_cv_header_libgt=libgettext.h
2766 fi
2767
2768 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2769 # because some of the sources are only built for this goal.
2770 if test "$PACKAGE" = gettext; then
2771 USE_NLS=yes
2772 USE_INCLUDED_LIBINTL=yes
2773 fi
2774
2775 for lang in $ALL_LINGUAS; do
2776 GMOFILES="$GMOFILES $lang.gmo"
2777 POFILES="$POFILES $lang.po"
2778 done
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793 if test "x$CATOBJEXT" != "x"; then
2794 if test "x$ALL_LINGUAS" = "x"; then
2795 LINGUAS=
2796 else
2797 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
06825bd1 2798echo "configure:2799: checking for catalogs to be installed" >&5
c906108c
SS
2799 NEW_LINGUAS=
2800 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2801 case "$ALL_LINGUAS" in
2802 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2803 esac
2804 done
2805 LINGUAS=$NEW_LINGUAS
2806 echo "$ac_t""$LINGUAS" 1>&6
2807 fi
2808
2809 if test -n "$LINGUAS"; then
2810 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2811 fi
2812 fi
2813
2814 if test $ac_cv_header_locale_h = yes; then
2815 INCLUDE_LOCALE_H="#include <locale.h>"
2816 else
2817 INCLUDE_LOCALE_H="\
2818/* The system does not provide the header <locale.h>. Take care yourself. */"
2819 fi
2820
2821
2822 if test -f $srcdir/po2tbl.sed.in; then
2823 if test "$CATOBJEXT" = ".cat"; then
2824 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2825echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
06825bd1 2826echo "configure:2827: checking for linux/version.h" >&5
c906108c
SS
2827if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2828 echo $ac_n "(cached) $ac_c" 1>&6
2829else
2830 cat > conftest.$ac_ext <<EOF
06825bd1 2831#line 2832 "configure"
c906108c
SS
2832#include "confdefs.h"
2833#include <linux/version.h>
2834EOF
2835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 2836{ (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2837ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2838if test -z "$ac_err"; then
2839 rm -rf conftest*
2840 eval "ac_cv_header_$ac_safe=yes"
2841else
2842 echo "$ac_err" >&5
2843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -rf conftest*
2846 eval "ac_cv_header_$ac_safe=no"
2847fi
2848rm -f conftest*
2849fi
2850if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2851 echo "$ac_t""yes" 1>&6
2852 msgformat=linux
2853else
2854 echo "$ac_t""no" 1>&6
2855msgformat=xopen
2856fi
2857
2858
2859 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2860 fi
2861 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2862 $srcdir/po2tbl.sed.in > po2tbl.sed
2863 fi
2864
2865 if test "$PACKAGE" = "gettext"; then
2866 GT_NO="#NO#"
2867 GT_YES=
2868 else
2869 GT_NO=
2870 GT_YES="#YES#"
2871 fi
2872
2873
2874
2875 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2876
2877
2878 l=
2879
2880
4536bbc6 2881 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2882 test -d po || mkdir po
2883 if test "x$srcdir" != "x."; then
2884 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2885 posrcprefix="$srcdir/"
2886 else
2887 posrcprefix="../$srcdir/"
2888 fi
2889 else
2890 posrcprefix="../"
2891 fi
2892 rm -f po/POTFILES
2893 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2894 < $srcdir/po/POTFILES.in > po/POTFILES
2895 fi
2896
0fbb3da7
TT
2897cat >> confdefs.h <<\EOF
2898#define PACKAGE "gdb"
2899EOF
2900
2901
c906108c
SS
2902
2903
2904CONFIG_OBS=
66b965bb 2905CONFIG_LIB_OBS=
c906108c
SS
2906CONFIG_DEPS=
2907CONFIG_SRCS=
fb40c209
AC
2908CONFIG_INITS=
2909ENABLE_CFLAGS=
b3a90332
AC
2910CONFIG_ALL=
2911CONFIG_CLEAN=
e56ac5c3
AC
2912CONFIG_INSTALL=
2913CONFIG_UNINSTALL=
c906108c 2914
ffc6a242 2915SUBDIRS="doc testsuite nlm"
c906108c
SS
2916configdirs="doc testsuite"
2917
96baa820
JM
2918# Check whether --enable-multi-ice or --disable-multi-ice was given.
2919if test "${enable_multi_ice+set}" = set; then
2920 enableval="$enable_multi_ice"
2921 case "${enableval}" in
2922 yes ) enable_multi_ice="yes" ;;
2923 no) enable_multi_ice="no" ;;
2924 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2925 esac
2926
2927fi
2928
2929
2930if test "${enable_multi_ice}" = "yes"; then
2931 configdirs="${configdirs} multi-ice"
2932fi
2933
c906108c
SS
2934
2935. ${srcdir}/configure.host
2936
2937. ${srcdir}/configure.tgt
2938
1ba607ad
AC
2939targ=${target} ; . ${srcdir}/../bfd/config.bfd
2940
2941
2942targ=${target}
2943. ${srcdir}/../bfd/config.bfd
5c8cc331
AC
2944
2945targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2946
1ba607ad
AC
2947if test x"${targ_archs}" != x ; then
2948 cat >> confdefs.h <<EOF
2949#define DEFAULT_BFD_ARCH ${targ_archs}
2950EOF
2951
2952fi
2953if test x"${targ_defvec}" != x ; then
2954 cat >> confdefs.h <<EOF
2955#define DEFAULT_BFD_VEC ${targ_defvec}
2956EOF
2957
2958fi
c906108c 2959
8bb2c122
MK
2960if test "$program_transform_name" = s,x,x,; then
2961 program_transform_name=
2962else
2963 # Double any \ or $. echo might interpret backslashes.
2964 cat <<\EOF_SED > conftestsed
2965s,\\,\\\\,g; s,\$,$$,g
2966EOF_SED
2967 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2968 rm -f conftestsed
2969fi
2970test "$program_prefix" != NONE &&
2971 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2972# Use a double $ so make ignores it.
2973test "$program_suffix" != NONE &&
2974 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2975
2976# sed with no file args requires a program.
2977test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2978
2979
06825bd1
MK
2980# Enable TUI.
2981# Check whether --enable-tui or --disable-tui was given.
2982if test "${enable_tui+set}" = set; then
2983 enableval="$enable_tui"
2984 case $enableval in
2985 yes | no)
2986 ;;
2987 *)
2988 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
2989 esac
2990fi
2991
2992if test x"$enable_tui" = xyes; then
2993 if test -d $srcdir/tui; then
2994 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
2995 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
2996 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
2997 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
2998 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
2999 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3000 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3001 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3002 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3003 need_curses=yes
3004 fi
3005fi
3006
8bb2c122
MK
3007# --------------------- #
3008# Checks for programs. #
3009# --------------------- #
3010
c41b7eb1 3011for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3012do
3013# Extract the first word of "$ac_prog", so it can be a program name with args.
3014set dummy $ac_prog; ac_word=$2
3015echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3016echo "configure:3017: checking for $ac_word" >&5
7a292a7a
SS
3017if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3018 echo $ac_n "(cached) $ac_c" 1>&6
3019else
3020 if test -n "$AWK"; then
3021 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3022else
3023 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3024 ac_dummy="$PATH"
3025 for ac_dir in $ac_dummy; do
3026 test -z "$ac_dir" && ac_dir=.
3027 if test -f $ac_dir/$ac_word; then
3028 ac_cv_prog_AWK="$ac_prog"
3029 break
3030 fi
3031 done
3032 IFS="$ac_save_ifs"
3033fi
3034fi
3035AWK="$ac_cv_prog_AWK"
3036if test -n "$AWK"; then
3037 echo "$ac_t""$AWK" 1>&6
3038else
3039 echo "$ac_t""no" 1>&6
3040fi
3041
3042test -n "$AWK" && break
3043done
3044
c906108c
SS
3045# Find a good install program. We prefer a C program (faster),
3046# so one script is as good as another. But avoid the broken or
3047# incompatible versions:
3048# SysV /etc/install, /usr/sbin/install
3049# SunOS /usr/etc/install
3050# IRIX /sbin/install
3051# AIX /bin/install
3052# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3053# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3054# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3055# ./install, which can be erroneously created by make from ./install.sh.
3056echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
06825bd1 3057echo "configure:3058: checking for a BSD compatible install" >&5
c906108c
SS
3058if test -z "$INSTALL"; then
3059if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3060 echo $ac_n "(cached) $ac_c" 1>&6
3061else
3062 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3063 for ac_dir in $PATH; do
3064 # Account for people who put trailing slashes in PATH elements.
3065 case "$ac_dir/" in
3066 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3067 *)
3068 # OSF1 and SCO ODT 3.0 have their own names for install.
3069 # Don't use installbsd from OSF since it installs stuff as root
3070 # by default.
3071 for ac_prog in ginstall scoinst install; do
3072 if test -f $ac_dir/$ac_prog; then
3073 if test $ac_prog = install &&
3074 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3075 # AIX install. It has an incompatible calling convention.
3076 :
3077 else
3078 ac_cv_path_install="$ac_dir/$ac_prog -c"
3079 break 2
3080 fi
3081 fi
3082 done
3083 ;;
3084 esac
3085 done
3086 IFS="$ac_save_IFS"
3087
3088fi
3089 if test "${ac_cv_path_install+set}" = set; then
3090 INSTALL="$ac_cv_path_install"
3091 else
3092 # As a last resort, use the slow shell script. We don't cache a
3093 # path for INSTALL within a source directory, because that will
3094 # break other packages using the cache if that directory is
3095 # removed, or if the path is relative.
3096 INSTALL="$ac_install_sh"
3097 fi
3098fi
3099echo "$ac_t""$INSTALL" 1>&6
3100
3101# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3102# It thinks the first close brace ends the variable substitution.
3103test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3104
3105test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3106
3107test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3108
8bb2c122 3109echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
06825bd1 3110echo "configure:3111: checking whether ln -s works" >&5
8bb2c122
MK
3111if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3112 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3113else
8bb2c122
MK
3114 rm -f conftestdata
3115if ln -s X conftestdata 2>/dev/null
3116then
3117 rm -f conftestdata
3118 ac_cv_prog_LN_S="ln -s"
3119else
3120 ac_cv_prog_LN_S=ln
3121fi
3122fi
3123LN_S="$ac_cv_prog_LN_S"
3124if test "$ac_cv_prog_LN_S" = "ln -s"; then
3125 echo "$ac_t""yes" 1>&6
3126else
3127 echo "$ac_t""no" 1>&6
c906108c
SS
3128fi
3129
8bb2c122
MK
3130# Extract the first word of "ranlib", so it can be a program name with args.
3131set dummy ranlib; ac_word=$2
c906108c 3132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3133echo "configure:3134: checking for $ac_word" >&5
8bb2c122 3134if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3135 echo $ac_n "(cached) $ac_c" 1>&6
3136else
8bb2c122
MK
3137 if test -n "$RANLIB"; then
3138 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3139else
3140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3141 ac_dummy="$PATH"
3142 for ac_dir in $ac_dummy; do
3143 test -z "$ac_dir" && ac_dir=.
3144 if test -f $ac_dir/$ac_word; then
8bb2c122 3145 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3146 break
3147 fi
3148 done
3149 IFS="$ac_save_ifs"
8bb2c122 3150 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3151fi
3152fi
8bb2c122
MK
3153RANLIB="$ac_cv_prog_RANLIB"
3154if test -n "$RANLIB"; then
3155 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3156else
3157 echo "$ac_t""no" 1>&6
3158fi
3159
8bb2c122
MK
3160for ac_prog in 'bison -y' byacc
3161do
3162# Extract the first word of "$ac_prog", so it can be a program name with args.
3163set dummy $ac_prog; ac_word=$2
c906108c 3164echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3165echo "configure:3166: checking for $ac_word" >&5
8bb2c122 3166if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3167 echo $ac_n "(cached) $ac_c" 1>&6
3168else
8bb2c122
MK
3169 if test -n "$YACC"; then
3170 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3171else
3172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175 test -z "$ac_dir" && ac_dir=.
3176 if test -f $ac_dir/$ac_word; then
8bb2c122 3177 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3178 break
3179 fi
3180 done
3181 IFS="$ac_save_ifs"
3182fi
3183fi
8bb2c122
MK
3184YACC="$ac_cv_prog_YACC"
3185if test -n "$YACC"; then
3186 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3187else
3188 echo "$ac_t""no" 1>&6
3189fi
3190
8bb2c122
MK
3191test -n "$YACC" && break
3192done
3193test -n "$YACC" || YACC="yacc"
c906108c 3194
8bb2c122
MK
3195
3196# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3197set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3198echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3199echo "configure:3200: checking for $ac_word" >&5
8bb2c122 3200if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3201 echo $ac_n "(cached) $ac_c" 1>&6
3202else
8bb2c122
MK
3203 if test -n "$AR"; then
3204 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3205else
3206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3207 ac_dummy="$PATH"
3208 for ac_dir in $ac_dummy; do
3209 test -z "$ac_dir" && ac_dir=.
3210 if test -f $ac_dir/$ac_word; then
8bb2c122 3211 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3212 break
3213 fi
3214 done
3215 IFS="$ac_save_ifs"
8bb2c122 3216 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3217fi
3218fi
8bb2c122
MK
3219AR="$ac_cv_prog_AR"
3220if test -n "$AR"; then
3221 echo "$ac_t""$AR" 1>&6
c906108c
SS
3222else
3223 echo "$ac_t""no" 1>&6
3224fi
3225
8bb2c122 3226
c906108c 3227
95ca63c4
CF
3228# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3229set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3230echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3231echo "configure:3232: checking for $ac_word" >&5
95ca63c4
CF
3232if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3233 echo $ac_n "(cached) $ac_c" 1>&6
3234else
3235 if test -n "$DLLTOOL"; then
3236 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3237else
3238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3239 ac_dummy="$PATH"
3240 for ac_dir in $ac_dummy; do
3241 test -z "$ac_dir" && ac_dir=.
3242 if test -f $ac_dir/$ac_word; then
3243 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3244 break
3245 fi
3246 done
3247 IFS="$ac_save_ifs"
3248 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3249fi
3250fi
3251DLLTOOL="$ac_cv_prog_DLLTOOL"
3252if test -n "$DLLTOOL"; then
3253 echo "$ac_t""$DLLTOOL" 1>&6
3254else
3255 echo "$ac_t""no" 1>&6
3256fi
3257
3258
3259
3260# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3261set dummy ${ac_tool_prefix}windres; ac_word=$2
3262echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3263echo "configure:3264: checking for $ac_word" >&5
95ca63c4
CF
3264if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3265 echo $ac_n "(cached) $ac_c" 1>&6
3266else
3267 if test -n "$WINDRES"; then
3268 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3269else
3270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3271 ac_dummy="$PATH"
3272 for ac_dir in $ac_dummy; do
3273 test -z "$ac_dir" && ac_dir=.
3274 if test -f $ac_dir/$ac_word; then
3275 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3276 break
3277 fi
3278 done
3279 IFS="$ac_save_ifs"
3280 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3281fi
3282fi
3283WINDRES="$ac_cv_prog_WINDRES"
3284if test -n "$WINDRES"; then
3285 echo "$ac_t""$WINDRES" 1>&6
3286else
3287 echo "$ac_t""no" 1>&6
3288fi
3289
3290
3291
c906108c 3292
8bb2c122 3293# Needed for GNU/Hurd.
75c6e08a
MK
3294# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3295set dummy ${ac_tool_prefix}mig; ac_word=$2
3296echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06825bd1 3297echo "configure:3298: checking for $ac_word" >&5
75c6e08a
MK
3298if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3299 echo $ac_n "(cached) $ac_c" 1>&6
3300else
3301 if test -n "$MIG"; then
3302 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3303else
3304 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3305 ac_dummy="$PATH"
3306 for ac_dir in $ac_dummy; do
3307 test -z "$ac_dir" && ac_dir=.
3308 if test -f $ac_dir/$ac_word; then
3309 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3310 break
3311 fi
3312 done
3313 IFS="$ac_save_ifs"
3314 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3315fi
3316fi
3317MIG="$ac_cv_prog_MIG"
3318if test -n "$MIG"; then
3319 echo "$ac_t""$MIG" 1>&6
3320else
3321 echo "$ac_t""no" 1>&6
3322fi
3323
3324
3325
3326
9a156167
MK
3327# ---------------------- #
3328# Checks for libraries. #
3329# ---------------------- #
3330
3331# We might need to link with -lm; most simulators need it.
3332echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
06825bd1 3333echo "configure:3334: checking for main in -lm" >&5
9a156167
MK
3334ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3335if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3336 echo $ac_n "(cached) $ac_c" 1>&6
3337else
3338 ac_save_LIBS="$LIBS"
3339LIBS="-lm $LIBS"
3340cat > conftest.$ac_ext <<EOF
06825bd1 3341#line 3342 "configure"
9a156167
MK
3342#include "confdefs.h"
3343
3344int main() {
3345main()
3346; return 0; }
3347EOF
06825bd1 3348if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3349 rm -rf conftest*
3350 eval "ac_cv_lib_$ac_lib_var=yes"
3351else
3352 echo "configure: failed program was:" >&5
3353 cat conftest.$ac_ext >&5
3354 rm -rf conftest*
3355 eval "ac_cv_lib_$ac_lib_var=no"
3356fi
3357rm -f conftest*
3358LIBS="$ac_save_LIBS"
3359
3360fi
3361if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3362 echo "$ac_t""yes" 1>&6
3363 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3364 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3365 cat >> confdefs.h <<EOF
3366#define $ac_tr_lib 1
3367EOF
3368
3369 LIBS="-lm $LIBS"
3370
3371else
3372 echo "$ac_t""no" 1>&6
3373fi
3374
3375
3376# We need to link with -lw to get `wctype' on Solaris before Solaris
3377# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3378# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3379# is known to have this problem). Therefore we avoid libw if we can.
3380echo $ac_n "checking for wctype""... $ac_c" 1>&6
06825bd1 3381echo "configure:3382: checking for wctype" >&5
9a156167
MK
3382if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3383 echo $ac_n "(cached) $ac_c" 1>&6
3384else
3385 cat > conftest.$ac_ext <<EOF
06825bd1 3386#line 3387 "configure"
9a156167
MK
3387#include "confdefs.h"
3388/* System header to define __stub macros and hopefully few prototypes,
3389 which can conflict with char wctype(); below. */
3390#include <assert.h>
3391/* Override any gcc2 internal prototype to avoid an error. */
3392/* We use char because int might match the return type of a gcc2
3393 builtin and then its argument prototype would still apply. */
3394char wctype();
3395
3396int main() {
3397
3398/* The GNU C library defines this for functions which it implements
3399 to always fail with ENOSYS. Some functions are actually named
3400 something starting with __ and the normal name is an alias. */
3401#if defined (__stub_wctype) || defined (__stub___wctype)
3402choke me
3403#else
3404wctype();
3405#endif
3406
3407; return 0; }
3408EOF
06825bd1 3409if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3410 rm -rf conftest*
3411 eval "ac_cv_func_wctype=yes"
3412else
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 rm -rf conftest*
3416 eval "ac_cv_func_wctype=no"
3417fi
3418rm -f conftest*
3419fi
3420
3421if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3422 echo "$ac_t""yes" 1>&6
3423 :
3424else
3425 echo "$ac_t""no" 1>&6
3426echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
06825bd1 3427echo "configure:3428: checking for wctype in -lw" >&5
9a156167
MK
3428ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3429if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3430 echo $ac_n "(cached) $ac_c" 1>&6
3431else
3432 ac_save_LIBS="$LIBS"
3433LIBS="-lw $LIBS"
3434cat > conftest.$ac_ext <<EOF
06825bd1 3435#line 3436 "configure"
9a156167
MK
3436#include "confdefs.h"
3437/* Override any gcc2 internal prototype to avoid an error. */
3438/* We use char because int might match the return type of a gcc2
3439 builtin and then its argument prototype would still apply. */
3440char wctype();
3441
3442int main() {
3443wctype()
3444; return 0; }
3445EOF
06825bd1 3446if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3447 rm -rf conftest*
3448 eval "ac_cv_lib_$ac_lib_var=yes"
3449else
3450 echo "configure: failed program was:" >&5
3451 cat conftest.$ac_ext >&5
3452 rm -rf conftest*
3453 eval "ac_cv_lib_$ac_lib_var=no"
3454fi
3455rm -f conftest*
3456LIBS="$ac_save_LIBS"
3457
3458fi
3459if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3460 echo "$ac_t""yes" 1>&6
3461 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3462 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3463 cat >> confdefs.h <<EOF
3464#define $ac_tr_lib 1
3465EOF
3466
3467 LIBS="-lw $LIBS"
3468
3469else
3470 echo "$ac_t""no" 1>&6
3471fi
3472
3473fi
3474
3475
3476# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3477
3478echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
06825bd1 3479echo "configure:3480: checking for library containing socketpair" >&5
9a156167
MK
3480if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3481 echo $ac_n "(cached) $ac_c" 1>&6
3482else
3483 ac_func_search_save_LIBS="$LIBS"
3484ac_cv_search_socketpair="no"
3485cat > conftest.$ac_ext <<EOF
06825bd1 3486#line 3487 "configure"
9a156167
MK
3487#include "confdefs.h"
3488/* Override any gcc2 internal prototype to avoid an error. */
3489/* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491char socketpair();
3492
3493int main() {
3494socketpair()
3495; return 0; }
3496EOF
06825bd1 3497if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3498 rm -rf conftest*
3499 ac_cv_search_socketpair="none required"
3500else
3501 echo "configure: failed program was:" >&5
3502 cat conftest.$ac_ext >&5
3503fi
3504rm -f conftest*
3505test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3506LIBS="-l$i $ac_func_search_save_LIBS"
3507cat > conftest.$ac_ext <<EOF
06825bd1 3508#line 3509 "configure"
9a156167
MK
3509#include "confdefs.h"
3510/* Override any gcc2 internal prototype to avoid an error. */
3511/* We use char because int might match the return type of a gcc2
3512 builtin and then its argument prototype would still apply. */
3513char socketpair();
3514
3515int main() {
3516socketpair()
3517; return 0; }
3518EOF
06825bd1 3519if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3520 rm -rf conftest*
3521 ac_cv_search_socketpair="-l$i"
3522break
3523else
3524 echo "configure: failed program was:" >&5
3525 cat conftest.$ac_ext >&5
3526fi
3527rm -f conftest*
3528done
3529LIBS="$ac_func_search_save_LIBS"
3530fi
3531
3532echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3533if test "$ac_cv_search_socketpair" != "no"; then
3534 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3535
3536else :
3537
3538fi
3539
06825bd1
MK
3540# Since GDB uses Readline, we need termcap functionality, so we need
3541# to find a library that provides that. When GDB is configured with
3542# --enable-tui, we need full curses functionality.
3543#
3544# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3545# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3546# Makefile fragments. That's why we need to have `Hcurses' before
3547# `curses'. I don't see why we should use HP curses if a more
3548# standard curses is available, except that according to HP's
3549# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3550# HP-UX 10.10 and 10.20.
3551
3552if test "$need_curses" = yes; then
3553
3554echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
3555echo "configure:3556: checking for library containing initscr" >&5
3556if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3557 echo $ac_n "(cached) $ac_c" 1>&6
3558else
3559 ac_func_search_save_LIBS="$LIBS"
3560ac_cv_search_initscr="no"
3561cat > conftest.$ac_ext <<EOF
3562#line 3563 "configure"
3563#include "confdefs.h"
3564/* Override any gcc2 internal prototype to avoid an error. */
3565/* We use char because int might match the return type of a gcc2
3566 builtin and then its argument prototype would still apply. */
3567char initscr();
3568
3569int main() {
3570initscr()
3571; return 0; }
3572EOF
3573if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3574 rm -rf conftest*
3575 ac_cv_search_initscr="none required"
3576else
3577 echo "configure: failed program was:" >&5
3578 cat conftest.$ac_ext >&5
3579fi
3580rm -f conftest*
3581test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3582LIBS="-l$i $ac_func_search_save_LIBS"
3583cat > conftest.$ac_ext <<EOF
3584#line 3585 "configure"
3585#include "confdefs.h"
3586/* Override any gcc2 internal prototype to avoid an error. */
3587/* We use char because int might match the return type of a gcc2
3588 builtin and then its argument prototype would still apply. */
3589char initscr();
3590
3591int main() {
3592initscr()
3593; return 0; }
3594EOF
3595if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3596 rm -rf conftest*
3597 ac_cv_search_initscr="-l$i"
3598break
3599else
3600 echo "configure: failed program was:" >&5
3601 cat conftest.$ac_ext >&5
3602fi
3603rm -f conftest*
3604done
3605LIBS="$ac_func_search_save_LIBS"
3606fi
3607
3608echo "$ac_t""$ac_cv_search_initscr" 1>&6
3609if test "$ac_cv_search_initscr" != "no"; then
3610 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3611
3612else :
3613 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3614fi
3615fi
3616
3617case $host_os in
3618 cygwin*)
3619 if test -d $srcdir/libtermcap; then
3620 LIBS="../libtermcap/libtermcap.a $LIBS"
3621 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3622 fi ;;
3623 go32*)
3624 # ??? Is this really true?
3625 ac_cv_search_tgetent="none required"
3626 ;;
3627 aix*)
3628 # Readline prefers curses over termcap on AIX.
3629 # ??? Why?
3630
3631echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
3632echo "configure:3633: checking for library containing tgetent" >&5
3633if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3634 echo $ac_n "(cached) $ac_c" 1>&6
3635else
3636 ac_func_search_save_LIBS="$LIBS"
3637ac_cv_search_tgetent="no"
3638cat > conftest.$ac_ext <<EOF
3639#line 3640 "configure"
3640#include "confdefs.h"
3641/* Override any gcc2 internal prototype to avoid an error. */
3642/* We use char because int might match the return type of a gcc2
3643 builtin and then its argument prototype would still apply. */
3644char tgetent();
3645
3646int main() {
3647tgetent()
3648; return 0; }
3649EOF
3650if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3651 rm -rf conftest*
3652 ac_cv_search_tgetent="none required"
3653else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656fi
3657rm -f conftest*
3658test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3659LIBS="-l$i $ac_func_search_save_LIBS"
3660cat > conftest.$ac_ext <<EOF
3661#line 3662 "configure"
3662#include "confdefs.h"
3663/* Override any gcc2 internal prototype to avoid an error. */
3664/* We use char because int might match the return type of a gcc2
3665 builtin and then its argument prototype would still apply. */
3666char tgetent();
3667
3668int main() {
3669tgetent()
3670; return 0; }
3671EOF
3672if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3673 rm -rf conftest*
3674 ac_cv_search_tgetent="-l$i"
3675break
3676else
3677 echo "configure: failed program was:" >&5
3678 cat conftest.$ac_ext >&5
3679fi
3680rm -f conftest*
3681done
3682LIBS="$ac_func_search_save_LIBS"
3683fi
3684
3685echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3686if test "$ac_cv_search_tgetent" != "no"; then
3687 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3688
3689else :
3690
3691fi
3692 ;;
3693esac
3694
3695# Note: We used to check for libtermlib and libterminfo too, but
3696# Readline doesn't, so I think we're safe with leaving them out.
3697
3698echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
3699echo "configure:3700: checking for library containing tgetent" >&5
3700if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3701 echo $ac_n "(cached) $ac_c" 1>&6
3702else
3703 ac_func_search_save_LIBS="$LIBS"
3704ac_cv_search_tgetent="no"
3705cat > conftest.$ac_ext <<EOF
3706#line 3707 "configure"
3707#include "confdefs.h"
3708/* Override any gcc2 internal prototype to avoid an error. */
3709/* We use char because int might match the return type of a gcc2
3710 builtin and then its argument prototype would still apply. */
3711char tgetent();
3712
3713int main() {
3714tgetent()
3715; return 0; }
3716EOF
3717if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3718 rm -rf conftest*
3719 ac_cv_search_tgetent="none required"
3720else
3721 echo "configure: failed program was:" >&5
3722 cat conftest.$ac_ext >&5
3723fi
3724rm -f conftest*
3725test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3726LIBS="-l$i $ac_func_search_save_LIBS"
3727cat > conftest.$ac_ext <<EOF
3728#line 3729 "configure"
3729#include "confdefs.h"
3730/* Override any gcc2 internal prototype to avoid an error. */
3731/* We use char because int might match the return type of a gcc2
3732 builtin and then its argument prototype would still apply. */
3733char tgetent();
3734
3735int main() {
3736tgetent()
3737; return 0; }
3738EOF
3739if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3740 rm -rf conftest*
3741 ac_cv_search_tgetent="-l$i"
3742break
3743else
3744 echo "configure: failed program was:" >&5
3745 cat conftest.$ac_ext >&5
3746fi
3747rm -f conftest*
3748done
3749LIBS="$ac_func_search_save_LIBS"
3750fi
3751
3752echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3753if test "$ac_cv_search_tgetent" != "no"; then
3754 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3755
3756else :
3757
3758fi
3759
3760if test "$ac_cv_search_tgetent" = no; then
3761 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3762fi
3763
5ee754fc
MK
3764# ------------------------- #
3765# Checks for header files. #
3766# ------------------------- #
3767
3768ac_header_dirent=no
3769for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3770do
3771ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3772echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
06825bd1 3773echo "configure:3774: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3774if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3775 echo $ac_n "(cached) $ac_c" 1>&6
3776else
3777 cat > conftest.$ac_ext <<EOF
06825bd1 3778#line 3779 "configure"
c906108c
SS
3779#include "confdefs.h"
3780#include <sys/types.h>
5ee754fc
MK
3781#include <$ac_hdr>
3782int main() {
3783DIR *dirp = 0;
3784; return 0; }
3785EOF
06825bd1 3786if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3787 rm -rf conftest*
3788 eval "ac_cv_header_dirent_$ac_safe=yes"
3789else
3790 echo "configure: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3792 rm -rf conftest*
3793 eval "ac_cv_header_dirent_$ac_safe=no"
3794fi
3795rm -f conftest*
3796fi
3797if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3798 echo "$ac_t""yes" 1>&6
3799 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3800 cat >> confdefs.h <<EOF
3801#define $ac_tr_hdr 1
3802EOF
3803 ac_header_dirent=$ac_hdr; break
3804else
3805 echo "$ac_t""no" 1>&6
3806fi
3807done
3808# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3809if test $ac_header_dirent = dirent.h; then
3810echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
06825bd1 3811echo "configure:3812: checking for opendir in -ldir" >&5
5ee754fc
MK
3812ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3813if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3814 echo $ac_n "(cached) $ac_c" 1>&6
3815else
3816 ac_save_LIBS="$LIBS"
3817LIBS="-ldir $LIBS"
3818cat > conftest.$ac_ext <<EOF
06825bd1 3819#line 3820 "configure"
5ee754fc
MK
3820#include "confdefs.h"
3821/* Override any gcc2 internal prototype to avoid an error. */
3822/* We use char because int might match the return type of a gcc2
3823 builtin and then its argument prototype would still apply. */
3824char opendir();
c906108c
SS
3825
3826int main() {
5ee754fc 3827opendir()
c906108c
SS
3828; return 0; }
3829EOF
06825bd1 3830if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3831 rm -rf conftest*
5ee754fc 3832 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3833else
3834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
3836 rm -rf conftest*
5ee754fc 3837 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3838fi
3839rm -f conftest*
5ee754fc
MK
3840LIBS="$ac_save_LIBS"
3841
3842fi
3843if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3844 echo "$ac_t""yes" 1>&6
3845 LIBS="$LIBS -ldir"
3846else
3847 echo "$ac_t""no" 1>&6
c906108c
SS
3848fi
3849
5ee754fc
MK
3850else
3851echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
06825bd1 3852echo "configure:3853: checking for opendir in -lx" >&5
5ee754fc
MK
3853ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3854if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
3856else
3857 ac_save_LIBS="$LIBS"
3858LIBS="-lx $LIBS"
3859cat > conftest.$ac_ext <<EOF
06825bd1 3860#line 3861 "configure"
5ee754fc
MK
3861#include "confdefs.h"
3862/* Override any gcc2 internal prototype to avoid an error. */
3863/* We use char because int might match the return type of a gcc2
3864 builtin and then its argument prototype would still apply. */
3865char opendir();
3866
3867int main() {
3868opendir()
3869; return 0; }
c906108c 3870EOF
06825bd1 3871if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3872 rm -rf conftest*
3873 eval "ac_cv_lib_$ac_lib_var=yes"
3874else
3875 echo "configure: failed program was:" >&5
3876 cat conftest.$ac_ext >&5
3877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=no"
3879fi
3880rm -f conftest*
3881LIBS="$ac_save_LIBS"
c906108c 3882
5ee754fc
MK
3883fi
3884if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885 echo "$ac_t""yes" 1>&6
3886 LIBS="$LIBS -lx"
3887else
3888 echo "$ac_t""no" 1>&6
3889fi
c906108c 3890
5ee754fc 3891fi
c906108c 3892
5ee754fc 3893echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
06825bd1 3894echo "configure:3895: checking whether stat file-mode macros are broken" >&5
5ee754fc 3895if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3896 echo $ac_n "(cached) $ac_c" 1>&6
3897else
3898 cat > conftest.$ac_ext <<EOF
06825bd1 3899#line 3900 "configure"
9608ab8b
MK
3900#include "confdefs.h"
3901#include <sys/types.h>
5ee754fc
MK
3902#include <sys/stat.h>
3903
3904#if defined(S_ISBLK) && defined(S_IFDIR)
3905# if S_ISBLK (S_IFDIR)
3906You lose.
3907# endif
3908#endif
3909
3910#if defined(S_ISBLK) && defined(S_IFCHR)
3911# if S_ISBLK (S_IFCHR)
3912You lose.
3913# endif
3914#endif
3915
3916#if defined(S_ISLNK) && defined(S_IFREG)
3917# if S_ISLNK (S_IFREG)
3918You lose.
3919# endif
3920#endif
3921
3922#if defined(S_ISSOCK) && defined(S_IFREG)
3923# if S_ISSOCK (S_IFREG)
3924You lose.
3925# endif
3926#endif
3927
9608ab8b 3928EOF
5ee754fc
MK
3929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3930 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3931 rm -rf conftest*
5ee754fc
MK
3932 ac_cv_header_stat_broken=yes
3933else
3934 rm -rf conftest*
3935 ac_cv_header_stat_broken=no
3936fi
3937rm -f conftest*
3938
3939fi
3940
3941echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3942if test $ac_cv_header_stat_broken = yes; then
3943 cat >> confdefs.h <<\EOF
3944#define STAT_MACROS_BROKEN 1
3945EOF
3946
3947fi
3948
3949echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
06825bd1 3950echo "configure:3951: checking for ANSI C header files" >&5
5ee754fc
MK
3951if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3952 echo $ac_n "(cached) $ac_c" 1>&6
3953else
3954 cat > conftest.$ac_ext <<EOF
06825bd1 3955#line 3956 "configure"
5ee754fc
MK
3956#include "confdefs.h"
3957#include <stdlib.h>
3958#include <stdarg.h>
3959#include <string.h>
3960#include <float.h>
3961EOF
3962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 3963{ (eval echo configure:3964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
3964ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3965if test -z "$ac_err"; then
3966 rm -rf conftest*
3967 ac_cv_header_stdc=yes
3968else
3969 echo "$ac_err" >&5
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 ac_cv_header_stdc=no
3974fi
3975rm -f conftest*
3976
3977if test $ac_cv_header_stdc = yes; then
3978 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3979cat > conftest.$ac_ext <<EOF
06825bd1 3980#line 3981 "configure"
5ee754fc
MK
3981#include "confdefs.h"
3982#include <string.h>
3983EOF
3984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3985 egrep "memchr" >/dev/null 2>&1; then
3986 :
3987else
3988 rm -rf conftest*
3989 ac_cv_header_stdc=no
3990fi
3991rm -f conftest*
3992
3993fi
3994
3995if test $ac_cv_header_stdc = yes; then
3996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3997cat > conftest.$ac_ext <<EOF
06825bd1 3998#line 3999 "configure"
5ee754fc
MK
3999#include "confdefs.h"
4000#include <stdlib.h>
4001EOF
4002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4003 egrep "free" >/dev/null 2>&1; then
4004 :
4005else
4006 rm -rf conftest*
4007 ac_cv_header_stdc=no
4008fi
4009rm -f conftest*
4010
4011fi
4012
4013if test $ac_cv_header_stdc = yes; then
4014 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4015if test "$cross_compiling" = yes; then
4016 :
4017else
4018 cat > conftest.$ac_ext <<EOF
06825bd1 4019#line 4020 "configure"
5ee754fc
MK
4020#include "confdefs.h"
4021#include <ctype.h>
4022#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4023#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4024#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4025int main () { int i; for (i = 0; i < 256; i++)
4026if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4027exit (0); }
4028
4029EOF
06825bd1 4030if { (eval echo configure:4031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4031then
4032 :
9608ab8b 4033else
5ee754fc
MK
4034 echo "configure: failed program was:" >&5
4035 cat conftest.$ac_ext >&5
4036 rm -fr conftest*
4037 ac_cv_header_stdc=no
4038fi
4039rm -fr conftest*
4040fi
4041
4042fi
4043fi
4044
4045echo "$ac_t""$ac_cv_header_stdc" 1>&6
4046if test $ac_cv_header_stdc = yes; then
4047 cat >> confdefs.h <<\EOF
4048#define STDC_HEADERS 1
4049EOF
4050
4051fi
4052
4053for ac_hdr in link.h
4054do
4055ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4056echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4057echo "configure:4058: checking for $ac_hdr" >&5
5ee754fc
MK
4058if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4059 echo $ac_n "(cached) $ac_c" 1>&6
4060else
4061 cat > conftest.$ac_ext <<EOF
06825bd1 4062#line 4063 "configure"
5ee754fc
MK
4063#include "confdefs.h"
4064#include <$ac_hdr>
4065EOF
4066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4067{ (eval echo configure:4068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4069if test -z "$ac_err"; then
4070 rm -rf conftest*
4071 eval "ac_cv_header_$ac_safe=yes"
4072else
4073 echo "$ac_err" >&5
4074 echo "configure: failed program was:" >&5
4075 cat conftest.$ac_ext >&5
4076 rm -rf conftest*
4077 eval "ac_cv_header_$ac_safe=no"
4078fi
4079rm -f conftest*
4080fi
4081if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4082 echo "$ac_t""yes" 1>&6
4083 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4084 cat >> confdefs.h <<EOF
4085#define $ac_tr_hdr 1
4086EOF
4087
4088else
4089 echo "$ac_t""no" 1>&6
4090fi
4091done
4092
4093for ac_hdr in nlist.h
4094do
4095ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4096echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4097echo "configure:4098: checking for $ac_hdr" >&5
5ee754fc
MK
4098if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4099 echo $ac_n "(cached) $ac_c" 1>&6
4100else
4101 cat > conftest.$ac_ext <<EOF
06825bd1 4102#line 4103 "configure"
5ee754fc
MK
4103#include "confdefs.h"
4104#include <$ac_hdr>
4105EOF
4106ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4107{ (eval echo configure:4108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4108ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4109if test -z "$ac_err"; then
4110 rm -rf conftest*
4111 eval "ac_cv_header_$ac_safe=yes"
4112else
4113 echo "$ac_err" >&5
4114 echo "configure: failed program was:" >&5
4115 cat conftest.$ac_ext >&5
4116 rm -rf conftest*
4117 eval "ac_cv_header_$ac_safe=no"
4118fi
4119rm -f conftest*
4120fi
4121if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4122 echo "$ac_t""yes" 1>&6
4123 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4124 cat >> confdefs.h <<EOF
4125#define $ac_tr_hdr 1
4126EOF
4127
4128else
4129 echo "$ac_t""no" 1>&6
4130fi
4131done
4132
4133for ac_hdr in poll.h sys/poll.h
4134do
4135ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4136echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4137echo "configure:4138: checking for $ac_hdr" >&5
5ee754fc
MK
4138if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4139 echo $ac_n "(cached) $ac_c" 1>&6
4140else
4141 cat > conftest.$ac_ext <<EOF
06825bd1 4142#line 4143 "configure"
5ee754fc
MK
4143#include "confdefs.h"
4144#include <$ac_hdr>
4145EOF
4146ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4147{ (eval echo configure:4148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4148ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4149if test -z "$ac_err"; then
4150 rm -rf conftest*
4151 eval "ac_cv_header_$ac_safe=yes"
4152else
4153 echo "$ac_err" >&5
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156 rm -rf conftest*
4157 eval "ac_cv_header_$ac_safe=no"
4158fi
4159rm -f conftest*
4160fi
4161if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4162 echo "$ac_t""yes" 1>&6
4163 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4164 cat >> confdefs.h <<EOF
4165#define $ac_tr_hdr 1
4166EOF
4167
4168else
4169 echo "$ac_t""no" 1>&6
4170fi
4171done
4172
4173for ac_hdr in proc_service.h thread_db.h
4174do
4175ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4176echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4177echo "configure:4178: checking for $ac_hdr" >&5
5ee754fc
MK
4178if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4179 echo $ac_n "(cached) $ac_c" 1>&6
4180else
4181 cat > conftest.$ac_ext <<EOF
06825bd1 4182#line 4183 "configure"
5ee754fc
MK
4183#include "confdefs.h"
4184#include <$ac_hdr>
4185EOF
4186ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4187{ (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4188ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4189if test -z "$ac_err"; then
4190 rm -rf conftest*
4191 eval "ac_cv_header_$ac_safe=yes"
4192else
4193 echo "$ac_err" >&5
4194 echo "configure: failed program was:" >&5
4195 cat conftest.$ac_ext >&5
4196 rm -rf conftest*
4197 eval "ac_cv_header_$ac_safe=no"
4198fi
4199rm -f conftest*
4200fi
4201if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4202 echo "$ac_t""yes" 1>&6
4203 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4204 cat >> confdefs.h <<EOF
4205#define $ac_tr_hdr 1
4206EOF
4207
4208else
4209 echo "$ac_t""no" 1>&6
4210fi
4211done
4212
4213for ac_hdr in stddef.h
4214do
4215ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4216echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4217echo "configure:4218: checking for $ac_hdr" >&5
5ee754fc
MK
4218if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4219 echo $ac_n "(cached) $ac_c" 1>&6
4220else
4221 cat > conftest.$ac_ext <<EOF
06825bd1 4222#line 4223 "configure"
5ee754fc
MK
4223#include "confdefs.h"
4224#include <$ac_hdr>
4225EOF
4226ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4227{ (eval echo configure:4228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4228ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4229if test -z "$ac_err"; then
4230 rm -rf conftest*
4231 eval "ac_cv_header_$ac_safe=yes"
4232else
4233 echo "$ac_err" >&5
4234 echo "configure: failed program was:" >&5
4235 cat conftest.$ac_ext >&5
4236 rm -rf conftest*
4237 eval "ac_cv_header_$ac_safe=no"
4238fi
4239rm -f conftest*
4240fi
4241if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4242 echo "$ac_t""yes" 1>&6
4243 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4244 cat >> confdefs.h <<EOF
4245#define $ac_tr_hdr 1
4246EOF
4247
4248else
4249 echo "$ac_t""no" 1>&6
4250fi
4251done
4252
4253for ac_hdr in stdlib.h
4254do
4255ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4256echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4257echo "configure:4258: checking for $ac_hdr" >&5
5ee754fc
MK
4258if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4260else
4261 cat > conftest.$ac_ext <<EOF
06825bd1 4262#line 4263 "configure"
5ee754fc
MK
4263#include "confdefs.h"
4264#include <$ac_hdr>
4265EOF
4266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4267{ (eval echo configure:4268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4269if test -z "$ac_err"; then
4270 rm -rf conftest*
4271 eval "ac_cv_header_$ac_safe=yes"
4272else
4273 echo "$ac_err" >&5
4274 echo "configure: failed program was:" >&5
4275 cat conftest.$ac_ext >&5
4276 rm -rf conftest*
4277 eval "ac_cv_header_$ac_safe=no"
4278fi
4279rm -f conftest*
4280fi
4281if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4282 echo "$ac_t""yes" 1>&6
4283 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4284 cat >> confdefs.h <<EOF
4285#define $ac_tr_hdr 1
4286EOF
4287
4288else
4289 echo "$ac_t""no" 1>&6
4290fi
4291done
4292
4293for ac_hdr in stdint.h
4294do
4295ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4296echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4297echo "configure:4298: checking for $ac_hdr" >&5
5ee754fc
MK
4298if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4299 echo $ac_n "(cached) $ac_c" 1>&6
4300else
4301 cat > conftest.$ac_ext <<EOF
06825bd1 4302#line 4303 "configure"
5ee754fc
MK
4303#include "confdefs.h"
4304#include <$ac_hdr>
4305EOF
4306ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4307{ (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4308ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4309if test -z "$ac_err"; then
4310 rm -rf conftest*
4311 eval "ac_cv_header_$ac_safe=yes"
4312else
4313 echo "$ac_err" >&5
4314 echo "configure: failed program was:" >&5
4315 cat conftest.$ac_ext >&5
4316 rm -rf conftest*
4317 eval "ac_cv_header_$ac_safe=no"
4318fi
4319rm -f conftest*
4320fi
4321if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4322 echo "$ac_t""yes" 1>&6
4323 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4324 cat >> confdefs.h <<EOF
4325#define $ac_tr_hdr 1
4326EOF
4327
4328else
4329 echo "$ac_t""no" 1>&6
4330fi
4331done
4332
4333for ac_hdr in string.h memory.h strings.h
4334do
4335ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4336echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4337echo "configure:4338: checking for $ac_hdr" >&5
5ee754fc
MK
4338if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4339 echo $ac_n "(cached) $ac_c" 1>&6
4340else
4341 cat > conftest.$ac_ext <<EOF
06825bd1 4342#line 4343 "configure"
5ee754fc
MK
4343#include "confdefs.h"
4344#include <$ac_hdr>
4345EOF
4346ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4347{ (eval echo configure:4348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4348ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4349if test -z "$ac_err"; then
4350 rm -rf conftest*
4351 eval "ac_cv_header_$ac_safe=yes"
4352else
4353 echo "$ac_err" >&5
4354 echo "configure: failed program was:" >&5
4355 cat conftest.$ac_ext >&5
4356 rm -rf conftest*
4357 eval "ac_cv_header_$ac_safe=no"
4358fi
4359rm -f conftest*
4360fi
4361if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4362 echo "$ac_t""yes" 1>&6
4363 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4364 cat >> confdefs.h <<EOF
4365#define $ac_tr_hdr 1
4366EOF
4367
4368else
4369 echo "$ac_t""no" 1>&6
4370fi
4371done
4372
4373for ac_hdr in sys/fault.h
4374do
4375ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4376echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4377echo "configure:4378: checking for $ac_hdr" >&5
5ee754fc
MK
4378if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4379 echo $ac_n "(cached) $ac_c" 1>&6
4380else
4381 cat > conftest.$ac_ext <<EOF
06825bd1 4382#line 4383 "configure"
5ee754fc
MK
4383#include "confdefs.h"
4384#include <$ac_hdr>
4385EOF
4386ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4387{ (eval echo configure:4388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4388ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4389if test -z "$ac_err"; then
4390 rm -rf conftest*
4391 eval "ac_cv_header_$ac_safe=yes"
4392else
4393 echo "$ac_err" >&5
4394 echo "configure: failed program was:" >&5
4395 cat conftest.$ac_ext >&5
4396 rm -rf conftest*
4397 eval "ac_cv_header_$ac_safe=no"
4398fi
4399rm -f conftest*
4400fi
4401if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4402 echo "$ac_t""yes" 1>&6
4403 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4404 cat >> confdefs.h <<EOF
4405#define $ac_tr_hdr 1
4406EOF
4407
4408else
4409 echo "$ac_t""no" 1>&6
4410fi
4411done
4412
4413for ac_hdr in sys/file.h
4414do
4415ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4416echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4417echo "configure:4418: checking for $ac_hdr" >&5
5ee754fc
MK
4418if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4420else
4421 cat > conftest.$ac_ext <<EOF
06825bd1 4422#line 4423 "configure"
5ee754fc
MK
4423#include "confdefs.h"
4424#include <$ac_hdr>
4425EOF
4426ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4427{ (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4428ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4429if test -z "$ac_err"; then
4430 rm -rf conftest*
4431 eval "ac_cv_header_$ac_safe=yes"
4432else
4433 echo "$ac_err" >&5
4434 echo "configure: failed program was:" >&5
4435 cat conftest.$ac_ext >&5
4436 rm -rf conftest*
4437 eval "ac_cv_header_$ac_safe=no"
4438fi
4439rm -f conftest*
4440fi
4441if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4442 echo "$ac_t""yes" 1>&6
4443 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4444 cat >> confdefs.h <<EOF
4445#define $ac_tr_hdr 1
4446EOF
4447
4448else
4449 echo "$ac_t""no" 1>&6
4450fi
4451done
4452
4453for ac_hdr in sys/filio.h
4454do
4455ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4456echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4457echo "configure:4458: checking for $ac_hdr" >&5
5ee754fc
MK
4458if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4459 echo $ac_n "(cached) $ac_c" 1>&6
4460else
4461 cat > conftest.$ac_ext <<EOF
06825bd1 4462#line 4463 "configure"
5ee754fc
MK
4463#include "confdefs.h"
4464#include <$ac_hdr>
4465EOF
4466ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4467{ (eval echo configure:4468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4468ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4469if test -z "$ac_err"; then
4470 rm -rf conftest*
4471 eval "ac_cv_header_$ac_safe=yes"
4472else
4473 echo "$ac_err" >&5
4474 echo "configure: failed program was:" >&5
4475 cat conftest.$ac_ext >&5
4476 rm -rf conftest*
4477 eval "ac_cv_header_$ac_safe=no"
4478fi
4479rm -f conftest*
4480fi
4481if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4482 echo "$ac_t""yes" 1>&6
4483 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4484 cat >> confdefs.h <<EOF
4485#define $ac_tr_hdr 1
4486EOF
4487
4488else
4489 echo "$ac_t""no" 1>&6
4490fi
4491done
4492
4493for ac_hdr in sys/ioctl.h
4494do
4495ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4496echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4497echo "configure:4498: checking for $ac_hdr" >&5
5ee754fc
MK
4498if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4499 echo $ac_n "(cached) $ac_c" 1>&6
4500else
4501 cat > conftest.$ac_ext <<EOF
06825bd1 4502#line 4503 "configure"
5ee754fc
MK
4503#include "confdefs.h"
4504#include <$ac_hdr>
4505EOF
4506ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4507{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4508ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4509if test -z "$ac_err"; then
4510 rm -rf conftest*
4511 eval "ac_cv_header_$ac_safe=yes"
4512else
4513 echo "$ac_err" >&5
4514 echo "configure: failed program was:" >&5
4515 cat conftest.$ac_ext >&5
4516 rm -rf conftest*
4517 eval "ac_cv_header_$ac_safe=no"
4518fi
4519rm -f conftest*
4520fi
4521if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4522 echo "$ac_t""yes" 1>&6
4523 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4524 cat >> confdefs.h <<EOF
4525#define $ac_tr_hdr 1
4526EOF
4527
4528else
4529 echo "$ac_t""no" 1>&6
4530fi
4531done
4532
4533for ac_hdr in sys/param.h
4534do
4535ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4536echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4537echo "configure:4538: checking for $ac_hdr" >&5
5ee754fc
MK
4538if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4539 echo $ac_n "(cached) $ac_c" 1>&6
4540else
4541 cat > conftest.$ac_ext <<EOF
06825bd1 4542#line 4543 "configure"
5ee754fc
MK
4543#include "confdefs.h"
4544#include <$ac_hdr>
4545EOF
4546ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4547{ (eval echo configure:4548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4548ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4549if test -z "$ac_err"; then
4550 rm -rf conftest*
4551 eval "ac_cv_header_$ac_safe=yes"
4552else
4553 echo "$ac_err" >&5
4554 echo "configure: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 rm -rf conftest*
4557 eval "ac_cv_header_$ac_safe=no"
4558fi
4559rm -f conftest*
4560fi
4561if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4562 echo "$ac_t""yes" 1>&6
4563 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4564 cat >> confdefs.h <<EOF
4565#define $ac_tr_hdr 1
4566EOF
4567
4568else
4569 echo "$ac_t""no" 1>&6
4570fi
4571done
4572
4573for ac_hdr in sys/proc.h
4574do
4575ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4576echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4577echo "configure:4578: checking for $ac_hdr" >&5
5ee754fc
MK
4578if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4579 echo $ac_n "(cached) $ac_c" 1>&6
4580else
4581 cat > conftest.$ac_ext <<EOF
06825bd1 4582#line 4583 "configure"
5ee754fc
MK
4583#include "confdefs.h"
4584#include <$ac_hdr>
4585EOF
4586ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4587{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4588ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4589if test -z "$ac_err"; then
4590 rm -rf conftest*
4591 eval "ac_cv_header_$ac_safe=yes"
4592else
4593 echo "$ac_err" >&5
4594 echo "configure: failed program was:" >&5
4595 cat conftest.$ac_ext >&5
4596 rm -rf conftest*
4597 eval "ac_cv_header_$ac_safe=no"
4598fi
4599rm -f conftest*
4600fi
4601if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4602 echo "$ac_t""yes" 1>&6
4603 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4604 cat >> confdefs.h <<EOF
4605#define $ac_tr_hdr 1
4606EOF
4607
4608else
4609 echo "$ac_t""no" 1>&6
4610fi
4611done
4612
4613for ac_hdr in sys/procfs.h
4614do
4615ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4616echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4617echo "configure:4618: checking for $ac_hdr" >&5
5ee754fc
MK
4618if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4619 echo $ac_n "(cached) $ac_c" 1>&6
4620else
4621 cat > conftest.$ac_ext <<EOF
06825bd1 4622#line 4623 "configure"
5ee754fc
MK
4623#include "confdefs.h"
4624#include <$ac_hdr>
4625EOF
4626ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4627{ (eval echo configure:4628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4628ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4629if test -z "$ac_err"; then
4630 rm -rf conftest*
4631 eval "ac_cv_header_$ac_safe=yes"
4632else
4633 echo "$ac_err" >&5
4634 echo "configure: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4636 rm -rf conftest*
4637 eval "ac_cv_header_$ac_safe=no"
4638fi
4639rm -f conftest*
4640fi
4641if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4642 echo "$ac_t""yes" 1>&6
4643 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4644 cat >> confdefs.h <<EOF
4645#define $ac_tr_hdr 1
4646EOF
4647
4648else
4649 echo "$ac_t""no" 1>&6
4650fi
4651done
4652
4653for ac_hdr in sys/ptrace.h ptrace.h
4654do
4655ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4656echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4657echo "configure:4658: checking for $ac_hdr" >&5
5ee754fc
MK
4658if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4659 echo $ac_n "(cached) $ac_c" 1>&6
4660else
4661 cat > conftest.$ac_ext <<EOF
06825bd1 4662#line 4663 "configure"
5ee754fc
MK
4663#include "confdefs.h"
4664#include <$ac_hdr>
4665EOF
4666ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4667{ (eval echo configure:4668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4668ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4669if test -z "$ac_err"; then
4670 rm -rf conftest*
4671 eval "ac_cv_header_$ac_safe=yes"
4672else
4673 echo "$ac_err" >&5
4674 echo "configure: failed program was:" >&5
4675 cat conftest.$ac_ext >&5
4676 rm -rf conftest*
4677 eval "ac_cv_header_$ac_safe=no"
4678fi
4679rm -f conftest*
4680fi
4681if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4682 echo "$ac_t""yes" 1>&6
4683 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4684 cat >> confdefs.h <<EOF
4685#define $ac_tr_hdr 1
4686EOF
4687
4688else
4689 echo "$ac_t""no" 1>&6
4690fi
4691done
4692
4693for ac_hdr in sys/reg.h sys/debugreg.h
4694do
4695ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4696echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4697echo "configure:4698: checking for $ac_hdr" >&5
5ee754fc
MK
4698if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4699 echo $ac_n "(cached) $ac_c" 1>&6
4700else
4701 cat > conftest.$ac_ext <<EOF
06825bd1 4702#line 4703 "configure"
5ee754fc
MK
4703#include "confdefs.h"
4704#include <$ac_hdr>
4705EOF
4706ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4707{ (eval echo configure:4708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4708ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4709if test -z "$ac_err"; then
4710 rm -rf conftest*
4711 eval "ac_cv_header_$ac_safe=yes"
4712else
4713 echo "$ac_err" >&5
4714 echo "configure: failed program was:" >&5
4715 cat conftest.$ac_ext >&5
4716 rm -rf conftest*
4717 eval "ac_cv_header_$ac_safe=no"
4718fi
4719rm -f conftest*
4720fi
4721if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4722 echo "$ac_t""yes" 1>&6
4723 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4724 cat >> confdefs.h <<EOF
4725#define $ac_tr_hdr 1
4726EOF
4727
4728else
4729 echo "$ac_t""no" 1>&6
4730fi
4731done
4732
4733for ac_hdr in sys/select.h
4734do
4735ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4736echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4737echo "configure:4738: checking for $ac_hdr" >&5
5ee754fc
MK
4738if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4739 echo $ac_n "(cached) $ac_c" 1>&6
4740else
4741 cat > conftest.$ac_ext <<EOF
06825bd1 4742#line 4743 "configure"
5ee754fc
MK
4743#include "confdefs.h"
4744#include <$ac_hdr>
4745EOF
4746ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4747{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4748ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4749if test -z "$ac_err"; then
4750 rm -rf conftest*
4751 eval "ac_cv_header_$ac_safe=yes"
4752else
4753 echo "$ac_err" >&5
4754 echo "configure: failed program was:" >&5
4755 cat conftest.$ac_ext >&5
4756 rm -rf conftest*
4757 eval "ac_cv_header_$ac_safe=no"
4758fi
4759rm -f conftest*
4760fi
4761if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4762 echo "$ac_t""yes" 1>&6
4763 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4764 cat >> confdefs.h <<EOF
4765#define $ac_tr_hdr 1
4766EOF
4767
4768else
4769 echo "$ac_t""no" 1>&6
4770fi
4771done
4772
4773for ac_hdr in sys/syscall.h
4774do
4775ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4776echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4777echo "configure:4778: checking for $ac_hdr" >&5
5ee754fc
MK
4778if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4779 echo $ac_n "(cached) $ac_c" 1>&6
4780else
4781 cat > conftest.$ac_ext <<EOF
06825bd1 4782#line 4783 "configure"
5ee754fc
MK
4783#include "confdefs.h"
4784#include <$ac_hdr>
4785EOF
4786ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4787{ (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4788ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4789if test -z "$ac_err"; then
4790 rm -rf conftest*
4791 eval "ac_cv_header_$ac_safe=yes"
4792else
4793 echo "$ac_err" >&5
4794 echo "configure: failed program was:" >&5
4795 cat conftest.$ac_ext >&5
4796 rm -rf conftest*
4797 eval "ac_cv_header_$ac_safe=no"
4798fi
4799rm -f conftest*
4800fi
4801if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4802 echo "$ac_t""yes" 1>&6
4803 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4804 cat >> confdefs.h <<EOF
4805#define $ac_tr_hdr 1
4806EOF
4807
4808else
4809 echo "$ac_t""no" 1>&6
4810fi
4811done
4812
4813for ac_hdr in sys/user.h
4814do
4815ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4816echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4817echo "configure:4818: checking for $ac_hdr" >&5
5ee754fc
MK
4818if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4819 echo $ac_n "(cached) $ac_c" 1>&6
4820else
4821 cat > conftest.$ac_ext <<EOF
06825bd1 4822#line 4823 "configure"
5ee754fc
MK
4823#include "confdefs.h"
4824#include <$ac_hdr>
4825EOF
4826ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4827{ (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4828ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4829if test -z "$ac_err"; then
4830 rm -rf conftest*
4831 eval "ac_cv_header_$ac_safe=yes"
4832else
4833 echo "$ac_err" >&5
4834 echo "configure: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836 rm -rf conftest*
4837 eval "ac_cv_header_$ac_safe=no"
4838fi
4839rm -f conftest*
4840fi
4841if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4842 echo "$ac_t""yes" 1>&6
4843 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4844 cat >> confdefs.h <<EOF
4845#define $ac_tr_hdr 1
4846EOF
4847
4848else
4849 echo "$ac_t""no" 1>&6
4850fi
4851done
4852
4853for ac_hdr in sys/wait.h wait.h
4854do
4855ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4856echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4857echo "configure:4858: checking for $ac_hdr" >&5
5ee754fc
MK
4858if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4859 echo $ac_n "(cached) $ac_c" 1>&6
4860else
4861 cat > conftest.$ac_ext <<EOF
06825bd1 4862#line 4863 "configure"
5ee754fc
MK
4863#include "confdefs.h"
4864#include <$ac_hdr>
4865EOF
4866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4867{ (eval echo configure:4868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4868ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4869if test -z "$ac_err"; then
4870 rm -rf conftest*
4871 eval "ac_cv_header_$ac_safe=yes"
4872else
4873 echo "$ac_err" >&5
9608ab8b
MK
4874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
4876 rm -rf conftest*
5ee754fc 4877 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4878fi
4879rm -f conftest*
4880fi
5ee754fc 4881if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4882 echo "$ac_t""yes" 1>&6
4883 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4884 cat >> confdefs.h <<EOF
4885#define $ac_tr_hdr 1
4886EOF
5ee754fc 4887
9608ab8b
MK
4888else
4889 echo "$ac_t""no" 1>&6
4890fi
4891done
5ee754fc
MK
4892
4893for ac_hdr in termios.h termio.h sgtty.h
4894do
4895ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4896echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4897echo "configure:4898: checking for $ac_hdr" >&5
5ee754fc 4898if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4899 echo $ac_n "(cached) $ac_c" 1>&6
4900else
5ee754fc 4901 cat > conftest.$ac_ext <<EOF
06825bd1 4902#line 4903 "configure"
9608ab8b 4903#include "confdefs.h"
5ee754fc 4904#include <$ac_hdr>
9608ab8b 4905EOF
5ee754fc 4906ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4907{ (eval echo configure:4908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4908ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4909if test -z "$ac_err"; then
9608ab8b 4910 rm -rf conftest*
5ee754fc 4911 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4912else
5ee754fc 4913 echo "$ac_err" >&5
9608ab8b
MK
4914 echo "configure: failed program was:" >&5
4915 cat conftest.$ac_ext >&5
4916 rm -rf conftest*
5ee754fc 4917 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4918fi
4919rm -f conftest*
9608ab8b 4920fi
5ee754fc 4921if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4922 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4923 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4924 cat >> confdefs.h <<EOF
4925#define $ac_tr_hdr 1
4926EOF
4927
9608ab8b
MK
4928else
4929 echo "$ac_t""no" 1>&6
4930fi
5ee754fc 4931done
9608ab8b 4932
5ee754fc
MK
4933for ac_hdr in unistd.h
4934do
4935ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4936echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4937echo "configure:4938: checking for $ac_hdr" >&5
5ee754fc 4938if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4939 echo $ac_n "(cached) $ac_c" 1>&6
4940else
5ee754fc 4941 cat > conftest.$ac_ext <<EOF
06825bd1 4942#line 4943 "configure"
9608ab8b 4943#include "confdefs.h"
5ee754fc 4944#include <$ac_hdr>
9608ab8b 4945EOF
5ee754fc 4946ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 4947{ (eval echo configure:4948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4948ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4949if test -z "$ac_err"; then
9608ab8b 4950 rm -rf conftest*
5ee754fc 4951 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4952else
5ee754fc 4953 echo "$ac_err" >&5
9608ab8b
MK
4954 echo "configure: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
4956 rm -rf conftest*
5ee754fc 4957 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4958fi
4959rm -f conftest*
9608ab8b 4960fi
5ee754fc 4961if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4962 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4963 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4964 cat >> confdefs.h <<EOF
4965#define $ac_tr_hdr 1
4966EOF
4967
9608ab8b
MK
4968else
4969 echo "$ac_t""no" 1>&6
4970fi
5ee754fc 4971done
9608ab8b 4972
9608ab8b 4973
5ee754fc
MK
4974# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
4975# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
4976# think that we don't have <curses.h> if we're using GCC.
4977case $host_os in
4978 solaris2.[78])
4979 if test "$GCC" = yes; then
4980 cat >> confdefs.h <<\EOF
4981#define _MSE_INT_H 1
4982EOF
4983
4984 fi ;;
4985esac
4986for ac_hdr in curses.h ncurses.h term.h
4987do
4988ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4989echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 4990echo "configure:4991: checking for $ac_hdr" >&5
5ee754fc 4991if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4992 echo $ac_n "(cached) $ac_c" 1>&6
4993else
4994 cat > conftest.$ac_ext <<EOF
06825bd1 4995#line 4996 "configure"
c906108c 4996#include "confdefs.h"
5ee754fc 4997#include <$ac_hdr>
c906108c
SS
4998EOF
4999ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 5000{ (eval echo configure:5001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5001ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5002if test -z "$ac_err"; then
5003 rm -rf conftest*
5ee754fc 5004 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5005else
5006 echo "$ac_err" >&5
5007 echo "configure: failed program was:" >&5
5008 cat conftest.$ac_ext >&5
5009 rm -rf conftest*
5ee754fc 5010 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5011fi
5012rm -f conftest*
c906108c 5013fi
5ee754fc
MK
5014if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5015 echo "$ac_t""yes" 1>&6
5016 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5017 cat >> confdefs.h <<EOF
5018#define $ac_tr_hdr 1
c906108c 5019EOF
5ee754fc 5020
c906108c 5021else
5ee754fc 5022 echo "$ac_t""no" 1>&6
c906108c 5023fi
5ee754fc 5024done
c906108c
SS
5025
5026
5ee754fc
MK
5027# FIXME: kettenis/20030102: In most cases we include these
5028# unconditionally, so what's the point in checking these?
5029for ac_hdr in ctype.h time.h
c906108c
SS
5030do
5031ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5032echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 5033echo "configure:5034: checking for $ac_hdr" >&5
c906108c
SS
5034if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5035 echo $ac_n "(cached) $ac_c" 1>&6
5036else
5037 cat > conftest.$ac_ext <<EOF
06825bd1 5038#line 5039 "configure"
c906108c
SS
5039#include "confdefs.h"
5040#include <$ac_hdr>
5041EOF
5042ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 5043{ (eval echo configure:5044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5044ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5045if test -z "$ac_err"; then
5046 rm -rf conftest*
5047 eval "ac_cv_header_$ac_safe=yes"
5048else
5049 echo "$ac_err" >&5
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 eval "ac_cv_header_$ac_safe=no"
5054fi
5055rm -f conftest*
5056fi
5057if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5060 cat >> confdefs.h <<EOF
5061#define $ac_tr_hdr 1
5062EOF
5063
5064else
5065 echo "$ac_t""no" 1>&6
5066fi
5067done
5068
5ee754fc
MK
5069
5070# ------------------ #
5071# Checks for types. #
5072# ------------------ #
5073
5074echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
06825bd1 5075echo "configure:5076: checking return type of signal handlers" >&5
5ee754fc 5076if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5077 echo $ac_n "(cached) $ac_c" 1>&6
5078else
5079 cat > conftest.$ac_ext <<EOF
06825bd1 5080#line 5081 "configure"
c906108c
SS
5081#include "confdefs.h"
5082#include <sys/types.h>
5ee754fc
MK
5083#include <signal.h>
5084#ifdef signal
5085#undef signal
c906108c 5086#endif
5ee754fc
MK
5087#ifdef __cplusplus
5088extern "C" void (*signal (int, void (*)(int)))(int);
5089#else
5090void (*signal ()) ();
c906108c
SS
5091#endif
5092
5ee754fc
MK
5093int main() {
5094int i;
5095; return 0; }
c906108c 5096EOF
06825bd1 5097if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5098 rm -rf conftest*
5ee754fc 5099 ac_cv_type_signal=void
c906108c 5100else
5ee754fc
MK
5101 echo "configure: failed program was:" >&5
5102 cat conftest.$ac_ext >&5
c906108c 5103 rm -rf conftest*
5ee754fc 5104 ac_cv_type_signal=int
c906108c
SS
5105fi
5106rm -f conftest*
c906108c
SS
5107fi
5108
5ee754fc
MK
5109echo "$ac_t""$ac_cv_type_signal" 1>&6
5110cat >> confdefs.h <<EOF
5111#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5112EOF
5113
c906108c
SS
5114
5115
5ee754fc
MK
5116# ------------------------------------- #
5117# Checks for compiler characteristics. #
5118# ------------------------------------- #
5119
c906108c 5120echo $ac_n "checking for working const""... $ac_c" 1>&6
06825bd1 5121echo "configure:5122: checking for working const" >&5
c906108c
SS
5122if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5123 echo $ac_n "(cached) $ac_c" 1>&6
5124else
5125 cat > conftest.$ac_ext <<EOF
06825bd1 5126#line 5127 "configure"
c906108c
SS
5127#include "confdefs.h"
5128
5129int main() {
5130
5131/* Ultrix mips cc rejects this. */
5132typedef int charset[2]; const charset x;
5133/* SunOS 4.1.1 cc rejects this. */
5134char const *const *ccp;
5135char **p;
5136/* NEC SVR4.0.2 mips cc rejects this. */
5137struct point {int x, y;};
5138static struct point const zero = {0,0};
5139/* AIX XL C 1.02.0.0 rejects this.
5140 It does not let you subtract one const X* pointer from another in an arm
5141 of an if-expression whose if-part is not a constant expression */
5142const char *g = "string";
5143ccp = &g + (g ? g-g : 0);
5144/* HPUX 7.0 cc rejects these. */
5145++ccp;
5146p = (char**) ccp;
5147ccp = (char const *const *) p;
5148{ /* SCO 3.2v4 cc rejects this. */
5149 char *t;
5150 char const *s = 0 ? (char *) 0 : (char const *) 0;
5151
5152 *t++ = 0;
5153}
5154{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5155 int x[] = {25, 17};
5156 const int *foo = &x[0];
5157 ++foo;
5158}
5159{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5160 typedef const int *iptr;
5161 iptr p = 0;
5162 ++p;
5163}
5164{ /* AIX XL C 1.02.0.0 rejects this saying
5165 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5166 struct s { int j; const int *ap[3]; };
5167 struct s *b; b->j = 5;
5168}
5169{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5170 const int foo = 10;
5171}
5172
5173; return 0; }
5174EOF
06825bd1 5175if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5176 rm -rf conftest*
5177 ac_cv_c_const=yes
5178else
5179 echo "configure: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5181 rm -rf conftest*
5182 ac_cv_c_const=no
5183fi
5184rm -f conftest*
5185fi
5186
5187echo "$ac_t""$ac_cv_c_const" 1>&6
5188if test $ac_cv_c_const = no; then
5189 cat >> confdefs.h <<\EOF
5190#define const
5191EOF
5192
5193fi
5194
bce58c09 5195echo $ac_n "checking for inline""... $ac_c" 1>&6
06825bd1 5196echo "configure:5197: checking for inline" >&5
bce58c09
JB
5197if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5198 echo $ac_n "(cached) $ac_c" 1>&6
5199else
5200 ac_cv_c_inline=no
5201for ac_kw in inline __inline__ __inline; do
5202 cat > conftest.$ac_ext <<EOF
06825bd1 5203#line 5204 "configure"
bce58c09
JB
5204#include "confdefs.h"
5205
5206int main() {
5207} $ac_kw foo() {
5208; return 0; }
5209EOF
06825bd1 5210if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5211 rm -rf conftest*
5212 ac_cv_c_inline=$ac_kw; break
5213else
5214 echo "configure: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216fi
5217rm -f conftest*
5218done
5219
5220fi
5221
5222echo "$ac_t""$ac_cv_c_inline" 1>&6
5223case "$ac_cv_c_inline" in
5224 inline | yes) ;;
5225 no) cat >> confdefs.h <<\EOF
5226#define inline
5227EOF
5228 ;;
5229 *) cat >> confdefs.h <<EOF
5230#define inline $ac_cv_c_inline
5231EOF
5232 ;;
5233esac
5234
c906108c 5235
5ee754fc
MK
5236# ------------------------------ #
5237# Checks for library functions. #
5238# ------------------------------ #
5239
46711df8
MK
5240# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5241# for constant arguments. Useless!
5242echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
06825bd1 5243echo "configure:5244: checking for working alloca.h" >&5
46711df8
MK
5244if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5245 echo $ac_n "(cached) $ac_c" 1>&6
5246else
5247 cat > conftest.$ac_ext <<EOF
06825bd1 5248#line 5249 "configure"
46711df8
MK
5249#include "confdefs.h"
5250#include <alloca.h>
5251int main() {
5252char *p = alloca(2 * sizeof(int));
5253; return 0; }
5254EOF
06825bd1 5255if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5256 rm -rf conftest*
5257 ac_cv_header_alloca_h=yes
5258else
5259 echo "configure: failed program was:" >&5
5260 cat conftest.$ac_ext >&5
5261 rm -rf conftest*
5262 ac_cv_header_alloca_h=no
5263fi
5264rm -f conftest*
5265fi
5266
5267echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5268if test $ac_cv_header_alloca_h = yes; then
5269 cat >> confdefs.h <<\EOF
5270#define HAVE_ALLOCA_H 1
5271EOF
5272
5273fi
5274
5275echo $ac_n "checking for alloca""... $ac_c" 1>&6
06825bd1 5276echo "configure:5277: checking for alloca" >&5
46711df8
MK
5277if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5278 echo $ac_n "(cached) $ac_c" 1>&6
5279else
5280 cat > conftest.$ac_ext <<EOF
06825bd1 5281#line 5282 "configure"
46711df8
MK
5282#include "confdefs.h"
5283
5284#ifdef __GNUC__
5285# define alloca __builtin_alloca
5286#else
5287# ifdef _MSC_VER
5288# include <malloc.h>
5289# define alloca _alloca
5290# else
5291# if HAVE_ALLOCA_H
5292# include <alloca.h>
5293# else
5294# ifdef _AIX
5295 #pragma alloca
5296# else
5297# ifndef alloca /* predefined by HP cc +Olibcalls */
5298char *alloca ();
5299# endif
5300# endif
5301# endif
5302# endif
5303#endif
5304
5305int main() {
5306char *p = (char *) alloca(1);
5307; return 0; }
5308EOF
06825bd1 5309if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5310 rm -rf conftest*
5311 ac_cv_func_alloca_works=yes
5312else
5313 echo "configure: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 rm -rf conftest*
5316 ac_cv_func_alloca_works=no
5317fi
5318rm -f conftest*
5319fi
5320
5321echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5322if test $ac_cv_func_alloca_works = yes; then
5323 cat >> confdefs.h <<\EOF
5324#define HAVE_ALLOCA 1
5325EOF
5326
5327fi
5328
5329if test $ac_cv_func_alloca_works = no; then
5330 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5331 # that cause trouble. Some versions do not even contain alloca or
5332 # contain a buggy version. If you still want to use their alloca,
5333 # use ar to extract alloca.o from them instead of compiling alloca.c.
5334 ALLOCA=alloca.${ac_objext}
5335 cat >> confdefs.h <<\EOF
5336#define C_ALLOCA 1
5337EOF
5338
5339
5340echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
06825bd1 5341echo "configure:5342: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5342if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5344else
5345 cat > conftest.$ac_ext <<EOF
06825bd1 5346#line 5347 "configure"
46711df8
MK
5347#include "confdefs.h"
5348#if defined(CRAY) && ! defined(CRAY2)
5349webecray
5350#else
5351wenotbecray
5352#endif
5353
5354EOF
5355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5356 egrep "webecray" >/dev/null 2>&1; then
5357 rm -rf conftest*
5358 ac_cv_os_cray=yes
5359else
5360 rm -rf conftest*
5361 ac_cv_os_cray=no
5362fi
5363rm -f conftest*
5364
5365fi
5366
5367echo "$ac_t""$ac_cv_os_cray" 1>&6
5368if test $ac_cv_os_cray = yes; then
5369for ac_func in _getb67 GETB67 getb67; do
5370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 5371echo "configure:5372: checking for $ac_func" >&5
46711df8
MK
5372if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5373 echo $ac_n "(cached) $ac_c" 1>&6
5374else
5375 cat > conftest.$ac_ext <<EOF
06825bd1 5376#line 5377 "configure"
46711df8
MK
5377#include "confdefs.h"
5378/* System header to define __stub macros and hopefully few prototypes,
5379 which can conflict with char $ac_func(); below. */
5380#include <assert.h>
5381/* Override any gcc2 internal prototype to avoid an error. */
5382/* We use char because int might match the return type of a gcc2
5383 builtin and then its argument prototype would still apply. */
5384char $ac_func();
5385
5386int main() {
5387
5388/* The GNU C library defines this for functions which it implements
5389 to always fail with ENOSYS. Some functions are actually named
5390 something starting with __ and the normal name is an alias. */
5391#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5392choke me
5393#else
5394$ac_func();
5395#endif
5396
5397; return 0; }
5398EOF
06825bd1 5399if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5400 rm -rf conftest*
5401 eval "ac_cv_func_$ac_func=yes"
5402else
5403 echo "configure: failed program was:" >&5
5404 cat conftest.$ac_ext >&5
5405 rm -rf conftest*
5406 eval "ac_cv_func_$ac_func=no"
5407fi
5408rm -f conftest*
5409fi
5410
5411if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5412 echo "$ac_t""yes" 1>&6
5413 cat >> confdefs.h <<EOF
5414#define CRAY_STACKSEG_END $ac_func
5415EOF
5416
5417 break
5418else
5419 echo "$ac_t""no" 1>&6
5420fi
5421
5422done
5423fi
5424
5425echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
06825bd1 5426echo "configure:5427: checking stack direction for C alloca" >&5
46711df8
MK
5427if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5428 echo $ac_n "(cached) $ac_c" 1>&6
5429else
5430 if test "$cross_compiling" = yes; then
5431 ac_cv_c_stack_direction=0
5432else
5433 cat > conftest.$ac_ext <<EOF
06825bd1 5434#line 5435 "configure"
46711df8
MK
5435#include "confdefs.h"
5436find_stack_direction ()
5437{
5438 static char *addr = 0;
5439 auto char dummy;
5440 if (addr == 0)
5441 {
5442 addr = &dummy;
5443 return find_stack_direction ();
5444 }
5445 else
5446 return (&dummy > addr) ? 1 : -1;
5447}
5448main ()
5449{
5450 exit (find_stack_direction() < 0);
5451}
5452EOF
06825bd1 5453if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5454then
5455 ac_cv_c_stack_direction=1
5456else
5457 echo "configure: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 rm -fr conftest*
5460 ac_cv_c_stack_direction=-1
5461fi
5462rm -fr conftest*
5463fi
5464
5465fi
5466
5467echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5468cat >> confdefs.h <<EOF
5469#define STACK_DIRECTION $ac_cv_c_stack_direction
5470EOF
5471
5472fi
5473
97bf5e38
MK
5474for ac_hdr in unistd.h
5475do
5476ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5477echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06825bd1 5478echo "configure:5479: checking for $ac_hdr" >&5
74c1b268
AC
5479if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481else
5482 cat > conftest.$ac_ext <<EOF
06825bd1 5483#line 5484 "configure"
74c1b268 5484#include "confdefs.h"
97bf5e38 5485#include <$ac_hdr>
74c1b268
AC
5486EOF
5487ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 5488{ (eval echo configure:5489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5489ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5490if test -z "$ac_err"; then
5491 rm -rf conftest*
5492 eval "ac_cv_header_$ac_safe=yes"
5493else
5494 echo "$ac_err" >&5
5495 echo "configure: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5497 rm -rf conftest*
5498 eval "ac_cv_header_$ac_safe=no"
5499fi
5500rm -f conftest*
5501fi
5502if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5504 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5505 cat >> confdefs.h <<EOF
5506#define $ac_tr_hdr 1
74c1b268 5507EOF
97bf5e38 5508
74c1b268
AC
5509else
5510 echo "$ac_t""no" 1>&6
5511fi
97bf5e38 5512done
74c1b268 5513
97bf5e38
MK
5514for ac_func in getpagesize
5515do
5516echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 5517echo "configure:5518: checking for $ac_func" >&5
97bf5e38 5518if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5519 echo $ac_n "(cached) $ac_c" 1>&6
5520else
5521 cat > conftest.$ac_ext <<EOF
06825bd1 5522#line 5523 "configure"
74c1b268
AC
5523#include "confdefs.h"
5524/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5525 which can conflict with char $ac_func(); below. */
74c1b268
AC
5526#include <assert.h>
5527/* Override any gcc2 internal prototype to avoid an error. */
5528/* We use char because int might match the return type of a gcc2
5529 builtin and then its argument prototype would still apply. */
97bf5e38 5530char $ac_func();
74c1b268
AC
5531
5532int main() {
5533
5534/* The GNU C library defines this for functions which it implements
5535 to always fail with ENOSYS. Some functions are actually named
5536 something starting with __ and the normal name is an alias. */
97bf5e38 5537#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5538choke me
5539#else
97bf5e38 5540$ac_func();
74c1b268
AC
5541#endif
5542
5543; return 0; }
5544EOF
06825bd1 5545if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5546 rm -rf conftest*
97bf5e38 5547 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5548else
5549 echo "configure: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5551 rm -rf conftest*
97bf5e38 5552 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5553fi
5554rm -f conftest*
5555fi
5556
97bf5e38 5557if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5558 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5559 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5560 cat >> confdefs.h <<EOF
5561#define $ac_tr_func 1
5562EOF
5563
74c1b268
AC
5564else
5565 echo "$ac_t""no" 1>&6
5566fi
97bf5e38 5567done
74c1b268 5568
97bf5e38 5569echo $ac_n "checking for working mmap""... $ac_c" 1>&6
06825bd1 5570echo "configure:5571: checking for working mmap" >&5
97bf5e38
MK
5571if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5572 echo $ac_n "(cached) $ac_c" 1>&6
5573else
5574 if test "$cross_compiling" = yes; then
5575 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5576else
5577 cat > conftest.$ac_ext <<EOF
06825bd1 5578#line 5579 "configure"
74c1b268 5579#include "confdefs.h"
97bf5e38
MK
5580
5581/* Thanks to Mike Haertel and Jim Avera for this test.
5582 Here is a matrix of mmap possibilities:
5583 mmap private not fixed
5584 mmap private fixed at somewhere currently unmapped
5585 mmap private fixed at somewhere already mapped
5586 mmap shared not fixed
5587 mmap shared fixed at somewhere currently unmapped
5588 mmap shared fixed at somewhere already mapped
5589 For private mappings, we should verify that changes cannot be read()
5590 back from the file, nor mmap's back from the file at a different
5591 address. (There have been systems where private was not correctly
5592 implemented like the infamous i386 svr4.0, and systems where the
5593 VM page cache was not coherent with the filesystem buffer cache
5594 like early versions of FreeBSD and possibly contemporary NetBSD.)
5595 For shared mappings, we should conversely verify that changes get
5596 propogated back to all the places they're supposed to be.
5597
5598 Grep wants private fixed already mapped.
5599 The main things grep needs to know about mmap are:
5600 * does it exist and is it safe to write into the mmap'd area
5601 * how to use it (BSD variants) */
74c1b268 5602#include <sys/types.h>
97bf5e38
MK
5603#include <fcntl.h>
5604#include <sys/mman.h>
5605
5606/* This mess was copied from the GNU getpagesize.h. */
5607#ifndef HAVE_GETPAGESIZE
5608# ifdef HAVE_UNISTD_H
5609# include <unistd.h>
5610# endif
5611
5612/* Assume that all systems that can run configure have sys/param.h. */
5613# ifndef HAVE_SYS_PARAM_H
5614# define HAVE_SYS_PARAM_H 1
5615# endif
5616
5617# ifdef _SC_PAGESIZE
5618# define getpagesize() sysconf(_SC_PAGESIZE)
5619# else /* no _SC_PAGESIZE */
5620# ifdef HAVE_SYS_PARAM_H
5621# include <sys/param.h>
5622# ifdef EXEC_PAGESIZE
5623# define getpagesize() EXEC_PAGESIZE
5624# else /* no EXEC_PAGESIZE */
5625# ifdef NBPG
5626# define getpagesize() NBPG * CLSIZE
5627# ifndef CLSIZE
5628# define CLSIZE 1
5629# endif /* no CLSIZE */
5630# else /* no NBPG */
5631# ifdef NBPC
5632# define getpagesize() NBPC
5633# else /* no NBPC */
5634# ifdef PAGESIZE
5635# define getpagesize() PAGESIZE
5636# endif /* PAGESIZE */
5637# endif /* no NBPC */
5638# endif /* no NBPG */
5639# endif /* no EXEC_PAGESIZE */
5640# else /* no HAVE_SYS_PARAM_H */
5641# define getpagesize() 8192 /* punt totally */
5642# endif /* no HAVE_SYS_PARAM_H */
5643# endif /* no _SC_PAGESIZE */
5644
5645#endif /* no HAVE_GETPAGESIZE */
5646
74c1b268 5647#ifdef __cplusplus
97bf5e38 5648extern "C" { void *malloc(unsigned); }
74c1b268 5649#else
97bf5e38 5650char *malloc();
74c1b268 5651#endif
74c1b268 5652
97bf5e38
MK
5653int
5654main()
5655{
5656 char *data, *data2, *data3;
5657 int i, pagesize;
5658 int fd;
74c1b268 5659
97bf5e38 5660 pagesize = getpagesize();
74c1b268 5661
97bf5e38
MK
5662 /*
5663 * First, make a file with some known garbage in it.
5664 */
5665 data = malloc(pagesize);
5666 if (!data)
5667 exit(1);
5668 for (i = 0; i < pagesize; ++i)
5669 *(data + i) = rand();
5670 umask(0);
5671 fd = creat("conftestmmap", 0600);
5672 if (fd < 0)
5673 exit(1);
5674 if (write(fd, data, pagesize) != pagesize)
5675 exit(1);
5676 close(fd);
74c1b268 5677
97bf5e38
MK
5678 /*
5679 * Next, try to mmap the file at a fixed address which
5680 * already has something else allocated at it. If we can,
5681 * also make sure that we see the same garbage.
5682 */
5683 fd = open("conftestmmap", O_RDWR);
5684 if (fd < 0)
5685 exit(1);
5686 data2 = malloc(2 * pagesize);
5687 if (!data2)
5688 exit(1);
5689 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5690 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5691 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5692 exit(1);
5693 for (i = 0; i < pagesize; ++i)
5694 if (*(data + i) != *(data2 + i))
5695 exit(1);
74c1b268 5696
97bf5e38
MK
5697 /*
5698 * Finally, make sure that changes to the mapped area
5699 * do not percolate back to the file as seen by read().
5700 * (This is a bug on some variants of i386 svr4.0.)
5701 */
5702 for (i = 0; i < pagesize; ++i)
5703 *(data2 + i) = *(data2 + i) + 1;
5704 data3 = malloc(pagesize);
5705 if (!data3)
5706 exit(1);
5707 if (read(fd, data3, pagesize) != pagesize)
5708 exit(1);
5709 for (i = 0; i < pagesize; ++i)
5710 if (*(data + i) != *(data3 + i))
5711 exit(1);
5712 close(fd);
5713 unlink("conftestmmap");
5714 exit(0);
74c1b268 5715}
97bf5e38 5716
74c1b268 5717EOF
06825bd1 5718if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5719then
97bf5e38 5720 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5721else
5722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 rm -fr conftest*
97bf5e38 5725 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5726fi
5727rm -fr conftest*
5728fi
5729
5730fi
5731
97bf5e38
MK
5732echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5733if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5734 cat >> confdefs.h <<\EOF
97bf5e38 5735#define HAVE_MMAP 1
74c1b268
AC
5736EOF
5737
5738fi
5739
97bf5e38 5740echo $ac_n "checking for pid_t""... $ac_c" 1>&6
06825bd1 5741echo "configure:5742: checking for pid_t" >&5
97bf5e38 5742if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5743 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5744else
5745 cat > conftest.$ac_ext <<EOF
06825bd1 5746#line 5747 "configure"
0200359f 5747#include "confdefs.h"
97bf5e38
MK
5748#include <sys/types.h>
5749#if STDC_HEADERS
5750#include <stdlib.h>
5751#include <stddef.h>
0200359f 5752#endif
0200359f 5753EOF
97bf5e38
MK
5754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5755 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5756 rm -rf conftest*
5757 ac_cv_type_pid_t=yes
0200359f 5758else
97bf5e38
MK
5759 rm -rf conftest*
5760 ac_cv_type_pid_t=no
0200359f 5761fi
97bf5e38 5762rm -f conftest*
0200359f
MK
5763
5764fi
97bf5e38
MK
5765echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5766if test $ac_cv_type_pid_t = no; then
0200359f 5767 cat >> confdefs.h <<\EOF
97bf5e38 5768#define pid_t int
0200359f
MK
5769EOF
5770
5771fi
5772
97bf5e38
MK
5773ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5774echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
06825bd1 5775echo "configure:5776: checking for vfork.h" >&5
97bf5e38 5776if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5777 echo $ac_n "(cached) $ac_c" 1>&6
5778else
5779 cat > conftest.$ac_ext <<EOF
06825bd1 5780#line 5781 "configure"
72473524 5781#include "confdefs.h"
97bf5e38 5782#include <vfork.h>
72473524 5783EOF
97bf5e38 5784ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 5785{ (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5786ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5787if test -z "$ac_err"; then
72473524 5788 rm -rf conftest*
97bf5e38 5789 eval "ac_cv_header_$ac_safe=yes"
72473524 5790else
97bf5e38 5791 echo "$ac_err" >&5
72473524
DJ
5792 echo "configure: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 rm -rf conftest*
97bf5e38 5795 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5796fi
5797rm -f conftest*
5798fi
97bf5e38
MK
5799if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5800 echo "$ac_t""yes" 1>&6
72473524 5801 cat >> confdefs.h <<\EOF
97bf5e38 5802#define HAVE_VFORK_H 1
72473524
DJ
5803EOF
5804
97bf5e38
MK
5805else
5806 echo "$ac_t""no" 1>&6
72473524 5807fi
c906108c 5808
97bf5e38 5809echo $ac_n "checking for working vfork""... $ac_c" 1>&6
06825bd1 5810echo "configure:5811: checking for working vfork" >&5
97bf5e38
MK
5811if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5812 echo $ac_n "(cached) $ac_c" 1>&6
5813else
5814 if test "$cross_compiling" = yes; then
5815 echo $ac_n "checking for vfork""... $ac_c" 1>&6
06825bd1 5816echo "configure:5817: checking for vfork" >&5
97bf5e38 5817if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5818 echo $ac_n "(cached) $ac_c" 1>&6
5819else
5820 cat > conftest.$ac_ext <<EOF
06825bd1 5821#line 5822 "configure"
2b2d558c 5822#include "confdefs.h"
97bf5e38
MK
5823/* System header to define __stub macros and hopefully few prototypes,
5824 which can conflict with char vfork(); below. */
5825#include <assert.h>
5826/* Override any gcc2 internal prototype to avoid an error. */
5827/* We use char because int might match the return type of a gcc2
5828 builtin and then its argument prototype would still apply. */
5829char vfork();
2b2d558c
MK
5830
5831int main() {
97bf5e38
MK
5832
5833/* The GNU C library defines this for functions which it implements
5834 to always fail with ENOSYS. Some functions are actually named
5835 something starting with __ and the normal name is an alias. */
5836#if defined (__stub_vfork) || defined (__stub___vfork)
5837choke me
5838#else
5839vfork();
5840#endif
5841
2b2d558c
MK
5842; return 0; }
5843EOF
06825bd1 5844if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5845 rm -rf conftest*
97bf5e38 5846 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5847else
5848 echo "configure: failed program was:" >&5
5849 cat conftest.$ac_ext >&5
5850 rm -rf conftest*
97bf5e38 5851 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5852fi
5853rm -f conftest*
5854fi
5855
97bf5e38
MK
5856if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5857 echo "$ac_t""yes" 1>&6
5858 :
5859else
5860 echo "$ac_t""no" 1>&6
2b2d558c
MK
5861fi
5862
97bf5e38 5863ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5864else
5865 cat > conftest.$ac_ext <<EOF
06825bd1 5866#line 5867 "configure"
7dfa765c 5867#include "confdefs.h"
97bf5e38
MK
5868/* Thanks to Paul Eggert for this test. */
5869#include <stdio.h>
5870#include <sys/types.h>
5871#include <sys/stat.h>
5872#ifdef HAVE_UNISTD_H
5873#include <unistd.h>
5874#endif
5875#ifdef HAVE_VFORK_H
5876#include <vfork.h>
5877#endif
5878/* On some sparc systems, changes by the child to local and incoming
5879 argument registers are propagated back to the parent.
5880 The compiler is told about this with #include <vfork.h>,
5881 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5882 Test for this by using a static variable whose address
5883 is put into a register that is clobbered by the vfork. */
5884static
5885#ifdef __cplusplus
5886sparc_address_test (int arg)
5887#else
5888sparc_address_test (arg) int arg;
5889#endif
5890{
5891 static pid_t child;
5892 if (!child) {
5893 child = vfork ();
5894 if (child < 0) {
5895 perror ("vfork");
5896 _exit(2);
5897 }
5898 if (!child) {
5899 arg = getpid();
5900 write(-1, "", 0);
5901 _exit (arg);
5902 }
5903 }
5904}
5905main() {
5906 pid_t parent = getpid ();
5907 pid_t child;
7dfa765c 5908
97bf5e38 5909 sparc_address_test ();
7dfa765c 5910
97bf5e38 5911 child = vfork ();
7dfa765c 5912
97bf5e38
MK
5913 if (child == 0) {
5914 /* Here is another test for sparc vfork register problems.
5915 This test uses lots of local variables, at least
5916 as many local variables as main has allocated so far
5917 including compiler temporaries. 4 locals are enough for
5918 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5919 A buggy compiler should reuse the register of parent
5920 for one of the local variables, since it will think that
5921 parent can't possibly be used any more in this routine.
5922 Assigning to the local variable will thus munge parent
5923 in the parent process. */
5924 pid_t
5925 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5926 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5927 /* Convince the compiler that p..p7 are live; otherwise, it might
5928 use the same hardware register for all 8 local variables. */
5929 if (p != p1 || p != p2 || p != p3 || p != p4
5930 || p != p5 || p != p6 || p != p7)
5931 _exit(1);
7dfa765c 5932
97bf5e38
MK
5933 /* On some systems (e.g. IRIX 3.3),
5934 vfork doesn't separate parent from child file descriptors.
5935 If the child closes a descriptor before it execs or exits,
5936 this munges the parent's descriptor as well.
5937 Test for this by closing stdout in the child. */
5938 _exit(close(fileno(stdout)) != 0);
5939 } else {
5940 int status;
5941 struct stat st;
64bb1671 5942
97bf5e38
MK
5943 while (wait(&status) != child)
5944 ;
5945 exit(
5946 /* Was there some problem with vforking? */
5947 child < 0
64bb1671 5948
97bf5e38
MK
5949 /* Did the child fail? (This shouldn't happen.) */
5950 || status
64bb1671 5951
97bf5e38
MK
5952 /* Did the vfork/compiler bug occur? */
5953 || parent != getpid()
5954
5955 /* Did the file descriptor bug occur? */
5956 || fstat(fileno(stdout), &st) != 0
5957 );
5958 }
5959}
5c44784c 5960EOF
06825bd1 5961if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
5962then
5963 ac_cv_func_vfork_works=yes
5c44784c
JM
5964else
5965 echo "configure: failed program was:" >&5
5966 cat conftest.$ac_ext >&5
97bf5e38
MK
5967 rm -fr conftest*
5968 ac_cv_func_vfork_works=no
5c44784c 5969fi
97bf5e38 5970rm -fr conftest*
5c44784c
JM
5971fi
5972
0afdd437
MK
5973fi
5974
97bf5e38
MK
5975echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
5976if test $ac_cv_func_vfork_works = no; then
0afdd437 5977 cat >> confdefs.h <<\EOF
97bf5e38 5978#define vfork fork
0afdd437
MK
5979EOF
5980
5981fi
5982
97bf5e38
MK
5983for ac_func in canonicalize_file_name realpath
5984do
5985echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 5986echo "configure:5987: checking for $ac_func" >&5
97bf5e38 5987if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
5988 echo $ac_n "(cached) $ac_c" 1>&6
5989else
5990 cat > conftest.$ac_ext <<EOF
06825bd1 5991#line 5992 "configure"
7e89e357 5992#include "confdefs.h"
97bf5e38
MK
5993/* System header to define __stub macros and hopefully few prototypes,
5994 which can conflict with char $ac_func(); below. */
5995#include <assert.h>
5996/* Override any gcc2 internal prototype to avoid an error. */
5997/* We use char because int might match the return type of a gcc2
5998 builtin and then its argument prototype would still apply. */
5999char $ac_func();
6000
7e89e357 6001int main() {
97bf5e38
MK
6002
6003/* The GNU C library defines this for functions which it implements
6004 to always fail with ENOSYS. Some functions are actually named
6005 something starting with __ and the normal name is an alias. */
6006#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6007choke me
6008#else
6009$ac_func();
6010#endif
6011
7e89e357
JT
6012; return 0; }
6013EOF
06825bd1 6014if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6015 rm -rf conftest*
97bf5e38 6016 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6017else
6018 echo "configure: failed program was:" >&5
6019 cat conftest.$ac_ext >&5
6020 rm -rf conftest*
97bf5e38 6021 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6022fi
6023rm -f conftest*
6024fi
6025
97bf5e38
MK
6026if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6027 echo "$ac_t""yes" 1>&6
6028 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6029 cat >> confdefs.h <<EOF
6030#define $ac_tr_func 1
7e89e357 6031EOF
97bf5e38
MK
6032
6033else
6034 echo "$ac_t""no" 1>&6
7e89e357 6035fi
97bf5e38 6036done
7e89e357 6037
97bf5e38 6038for ac_func in poll
7be570e7
JM
6039do
6040echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 6041echo "configure:6042: checking for $ac_func" >&5
7be570e7
JM
6042if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6043 echo $ac_n "(cached) $ac_c" 1>&6
6044else
6045 cat > conftest.$ac_ext <<EOF
06825bd1 6046#line 6047 "configure"
7be570e7
JM
6047#include "confdefs.h"
6048/* System header to define __stub macros and hopefully few prototypes,
6049 which can conflict with char $ac_func(); below. */
6050#include <assert.h>
6051/* Override any gcc2 internal prototype to avoid an error. */
6052/* We use char because int might match the return type of a gcc2
6053 builtin and then its argument prototype would still apply. */
6054char $ac_func();
6055
6056int main() {
6057
6058/* The GNU C library defines this for functions which it implements
6059 to always fail with ENOSYS. Some functions are actually named
6060 something starting with __ and the normal name is an alias. */
6061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6062choke me
6063#else
6064$ac_func();
6065#endif
6066
6067; return 0; }
6068EOF
06825bd1 6069if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6070 rm -rf conftest*
6071 eval "ac_cv_func_$ac_func=yes"
6072else
6073 echo "configure: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 rm -rf conftest*
6076 eval "ac_cv_func_$ac_func=no"
6077fi
6078rm -f conftest*
6079fi
6080
6081if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6082 echo "$ac_t""yes" 1>&6
6083 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6084 cat >> confdefs.h <<EOF
6085#define $ac_tr_func 1
6086EOF
6087
6088else
6089 echo "$ac_t""no" 1>&6
6090fi
6091done
6092
97bf5e38
MK
6093for ac_func in sbrk
6094do
6095echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 6096echo "configure:6097: checking for $ac_func" >&5
97bf5e38 6097if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6098 echo $ac_n "(cached) $ac_c" 1>&6
6099else
6100 cat > conftest.$ac_ext <<EOF
06825bd1 6101#line 6102 "configure"
c906108c 6102#include "confdefs.h"
97bf5e38
MK
6103/* System header to define __stub macros and hopefully few prototypes,
6104 which can conflict with char $ac_func(); below. */
6105#include <assert.h>
6106/* Override any gcc2 internal prototype to avoid an error. */
6107/* We use char because int might match the return type of a gcc2
6108 builtin and then its argument prototype would still apply. */
6109char $ac_func();
c906108c 6110
97bf5e38
MK
6111int main() {
6112
6113/* The GNU C library defines this for functions which it implements
6114 to always fail with ENOSYS. Some functions are actually named
6115 something starting with __ and the normal name is an alias. */
6116#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6117choke me
c906108c 6118#else
97bf5e38 6119$ac_func();
c906108c 6120#endif
97bf5e38 6121
c906108c
SS
6122; return 0; }
6123EOF
06825bd1 6124if { (eval echo configure:6125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6125 rm -rf conftest*
97bf5e38 6126 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6127else
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
6130 rm -rf conftest*
97bf5e38 6131 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6132fi
6133rm -f conftest*
6134fi
6135
97bf5e38
MK
6136if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6137 echo "$ac_t""yes" 1>&6
6138 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6139 cat >> confdefs.h <<EOF
6140#define $ac_tr_func 1
c906108c 6141EOF
97bf5e38
MK
6142
6143else
6144 echo "$ac_t""no" 1>&6
c906108c 6145fi
97bf5e38 6146done
c906108c 6147
97bf5e38
MK
6148for ac_func in setpgid setpgrp
6149do
6150echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 6151echo "configure:6152: checking for $ac_func" >&5
97bf5e38 6152if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6153 echo $ac_n "(cached) $ac_c" 1>&6
6154else
6155 cat > conftest.$ac_ext <<EOF
06825bd1 6156#line 6157 "configure"
c906108c 6157#include "confdefs.h"
97bf5e38
MK
6158/* System header to define __stub macros and hopefully few prototypes,
6159 which can conflict with char $ac_func(); below. */
6160#include <assert.h>
6161/* Override any gcc2 internal prototype to avoid an error. */
6162/* We use char because int might match the return type of a gcc2
6163 builtin and then its argument prototype would still apply. */
6164char $ac_func();
c906108c 6165
97bf5e38
MK
6166int main() {
6167
6168/* The GNU C library defines this for functions which it implements
6169 to always fail with ENOSYS. Some functions are actually named
6170 something starting with __ and the normal name is an alias. */
6171#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6172choke me
c906108c 6173#else
97bf5e38 6174$ac_func();
c906108c 6175#endif
97bf5e38 6176
c906108c
SS
6177; return 0; }
6178EOF
06825bd1 6179if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6180 rm -rf conftest*
97bf5e38 6181 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6182else
6183 echo "configure: failed program was:" >&5
6184 cat conftest.$ac_ext >&5
6185 rm -rf conftest*
97bf5e38 6186 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6187fi
6188rm -f conftest*
6189fi
6190
97bf5e38
MK
6191if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6192 echo "$ac_t""yes" 1>&6
6193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6194 cat >> confdefs.h <<EOF
6195#define $ac_tr_func 1
c906108c 6196EOF
97bf5e38
MK
6197
6198else
6199 echo "$ac_t""no" 1>&6
c906108c 6200fi
97bf5e38 6201done
c906108c 6202
e1ea1d75 6203for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6204do
6205echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 6206echo "configure:6207: checking for $ac_func" >&5
97bf5e38 6207if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6208 echo $ac_n "(cached) $ac_c" 1>&6
6209else
6210 cat > conftest.$ac_ext <<EOF
06825bd1 6211#line 6212 "configure"
c906108c 6212#include "confdefs.h"
97bf5e38
MK
6213/* System header to define __stub macros and hopefully few prototypes,
6214 which can conflict with char $ac_func(); below. */
6215#include <assert.h>
6216/* Override any gcc2 internal prototype to avoid an error. */
6217/* We use char because int might match the return type of a gcc2
6218 builtin and then its argument prototype would still apply. */
6219char $ac_func();
c906108c 6220
97bf5e38
MK
6221int main() {
6222
6223/* The GNU C library defines this for functions which it implements
6224 to always fail with ENOSYS. Some functions are actually named
6225 something starting with __ and the normal name is an alias. */
6226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6227choke me
c906108c 6228#else
97bf5e38 6229$ac_func();
c906108c 6230#endif
97bf5e38 6231
c906108c
SS
6232; return 0; }
6233EOF
06825bd1 6234if { (eval echo configure:6235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6235 rm -rf conftest*
97bf5e38 6236 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6237else
6238 echo "configure: failed program was:" >&5
6239 cat conftest.$ac_ext >&5
6240 rm -rf conftest*
97bf5e38 6241 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6242fi
6243rm -f conftest*
6244fi
6245
97bf5e38
MK
6246if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6247 echo "$ac_t""yes" 1>&6
6248 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6249 cat >> confdefs.h <<EOF
6250#define $ac_tr_func 1
c906108c 6251EOF
e1ea1d75 6252
97bf5e38
MK
6253else
6254 echo "$ac_t""no" 1>&6
c906108c 6255fi
97bf5e38 6256done
c906108c 6257
97bf5e38
MK
6258for ac_func in socketpair
6259do
6260echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06825bd1 6261echo "configure:6262: checking for $ac_func" >&5
97bf5e38 6262if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6263 echo $ac_n "(cached) $ac_c" 1>&6
6264else
6265 cat > conftest.$ac_ext <<EOF
06825bd1 6266#line 6267 "configure"
c906108c 6267#include "confdefs.h"
97bf5e38
MK
6268/* System header to define __stub macros and hopefully few prototypes,
6269 which can conflict with char $ac_func(); below. */
6270#include <assert.h>
6271/* Override any gcc2 internal prototype to avoid an error. */
6272/* We use char because int might match the return type of a gcc2
6273 builtin and then its argument prototype would still apply. */
6274char $ac_func();
c906108c 6275
97bf5e38
MK
6276int main() {
6277
6278/* The GNU C library defines this for functions which it implements
6279 to always fail with ENOSYS. Some functions are actually named
6280 something starting with __ and the normal name is an alias. */
6281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6282choke me
c906108c 6283#else
97bf5e38 6284$ac_func();
c906108c 6285#endif
97bf5e38 6286
c906108c
SS
6287; return 0; }
6288EOF
06825bd1 6289if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6290 rm -rf conftest*
97bf5e38 6291 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6292else
6293 echo "configure: failed program was:" >&5
6294 cat conftest.$ac_ext >&5
6295 rm -rf conftest*
97bf5e38 6296 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6297fi
6298rm -f conftest*
6299fi
6300
97bf5e38
MK
6301if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6302 echo "$ac_t""yes" 1>&6
6303 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6304 cat >> confdefs.h <<EOF
6305#define $ac_tr_func 1
c906108c 6306EOF
97bf5e38
MK
6307
6308else
6309 echo "$ac_t""no" 1>&6
c906108c 6310fi
97bf5e38 6311done
c906108c 6312
97bf5e38
MK
6313
6314if test "$cross_compiling" = no; then
6315 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
06825bd1 6316echo "configure:6317: checking whether setpgrp takes no argument" >&5
97bf5e38 6317if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6318 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6319else
6320 if test "$cross_compiling" = yes; then
6321 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6322else
6323 cat > conftest.$ac_ext <<EOF
06825bd1 6324#line 6325 "configure"
c906108c
SS
6325#include "confdefs.h"
6326
c906108c
SS
6327#ifdef HAVE_UNISTD_H
6328#include <unistd.h>
6329#endif
97bf5e38
MK
6330
6331/*
6332 * If this system has a BSD-style setpgrp, which takes arguments, exit
6333 * successfully.
6334 */
6335main()
6336{
6337 if (setpgrp(1,1) == -1)
6338 exit(0);
6339 else
6340 exit(1);
6341}
6342
c906108c 6343EOF
06825bd1 6344if { (eval echo configure:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6345then
6346 ac_cv_func_setpgrp_void=no
c906108c
SS
6347else
6348 echo "configure: failed program was:" >&5
6349 cat conftest.$ac_ext >&5
97bf5e38
MK
6350 rm -fr conftest*
6351 ac_cv_func_setpgrp_void=yes
c906108c 6352fi
97bf5e38 6353rm -fr conftest*
c906108c
SS
6354fi
6355
97bf5e38
MK
6356
6357fi
6358
6359echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6360if test $ac_cv_func_setpgrp_void = yes; then
6361 cat >> confdefs.h <<\EOF
6362#define SETPGRP_VOID 1
c906108c
SS
6363EOF
6364
6365fi
6366
97bf5e38
MK
6367else
6368 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
06825bd1 6369echo "configure:6370: checking whether setpgrp takes no argument" >&5
97bf5e38 6370if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6371 echo $ac_n "(cached) $ac_c" 1>&6
6372else
6373 cat > conftest.$ac_ext <<EOF
06825bd1 6374#line 6375 "configure"
b83266a0
SS
6375#include "confdefs.h"
6376
b83266a0 6377#include <unistd.h>
97bf5e38 6378
b83266a0 6379int main() {
97bf5e38
MK
6380
6381 if (setpgrp(1,1) == -1)
6382 exit (0);
6383 else
6384 exit (1);
6385
b83266a0
SS
6386; return 0; }
6387EOF
06825bd1 6388if { (eval echo configure:6389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6389 rm -rf conftest*
97bf5e38 6390 ac_cv_func_setpgrp_void=no
b83266a0
SS
6391else
6392 echo "configure: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
6394 rm -rf conftest*
97bf5e38 6395 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6396fi
6397rm -f conftest*
6398fi
6399
97bf5e38
MK
6400echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6401if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6402 cat >> confdefs.h <<\EOF
97bf5e38 6403#define SETPGRP_VOID 1
b83266a0
SS
6404EOF
6405
97bf5e38 6406fi
b83266a0
SS
6407fi
6408
97bf5e38
MK
6409# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6410# since sigsetjmp might only be defined as a macro.
6411echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
06825bd1 6412echo "configure:6413: checking for sigsetjmp" >&5
97bf5e38 6413if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6414 echo $ac_n "(cached) $ac_c" 1>&6
6415else
6416 cat > conftest.$ac_ext <<EOF
06825bd1 6417#line 6418 "configure"
a4db0f07
RH
6418#include "confdefs.h"
6419
97bf5e38
MK
6420#include <setjmp.h>
6421
a4db0f07 6422int main() {
97bf5e38 6423sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6424; return 0; }
6425EOF
06825bd1 6426if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6427 rm -rf conftest*
97bf5e38 6428 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6429else
6430 echo "configure: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 rm -rf conftest*
97bf5e38 6433 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6434fi
6435rm -f conftest*
6436fi
6437
97bf5e38
MK
6438echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6439if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6440 cat >> confdefs.h <<\EOF
97bf5e38 6441#define HAVE_SIGSETJMP 1
a4db0f07
RH
6442EOF
6443
6444fi
c906108c 6445
06825bd1
MK
6446# Assume we'll default to using the included libiberty regex.
6447gdb_use_included_regex=yes
6448
6449# However, if the system regex is GNU regex, then default to *not*
6450# using the included regex.
6451echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
6452echo "configure:6453: checking for GNU regex" >&5
6453if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6454 echo $ac_n "(cached) $ac_c" 1>&6
6455else
6456 cat > conftest.$ac_ext <<EOF
6457#line 6458 "configure"
6458#include "confdefs.h"
6459#include <gnu-versions.h>
6460int main() {
6461#define REGEX_INTERFACE_VERSION 1
6462#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6463# error "Version mismatch"
6464#endif
6465; return 0; }
6466EOF
6467if { (eval echo configure:6468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6468 rm -rf conftest*
6469 gdb_cv_have_gnu_regex=yes
6470else
6471 echo "configure: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473 rm -rf conftest*
6474 gdb_cv_have_gnu_regex=no
6475fi
6476rm -f conftest*
6477fi
6478
6479echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6480if test $gdb_cv_have_gnu_regex = yes; then
6481 gdb_use_included_regex=no
6482fi
6483
6484# Check whether --with-included-regex or --without-included-regex was given.
6485if test "${with_included_regex+set}" = set; then
6486 withval="$with_included_regex"
6487 gdb_with_regex=$withval
6488else
6489 gdb_with_regex=$gdb_use_included_regex
6490fi
6491
6492if test "$gdb_with_regex" = yes; then
6493 cat >> confdefs.h <<\EOF
6494#define USE_INCLUDED_REGEX 1
6495EOF
6496
6497fi
6498
97bf5e38
MK
6499# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6500# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6501echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
06825bd1 6502echo "configure:6503: checking for r_fs in struct reg" >&5
97bf5e38
MK
6503if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6504 echo $ac_n "(cached) $ac_c" 1>&6
6505else
6506 cat > conftest.$ac_ext <<EOF
06825bd1 6507#line 6508 "configure"
c906108c 6508#include "confdefs.h"
97bf5e38
MK
6509#include <machine/reg.h>
6510int main() {
6511struct reg r; r.r_fs;
6512; return 0; }
c906108c 6513EOF
06825bd1 6514if { (eval echo configure:6515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6515 rm -rf conftest*
97bf5e38 6516 gdb_cv_struct_reg_r_fs=yes
c906108c 6517else
97bf5e38
MK
6518 echo "configure: failed program was:" >&5
6519 cat conftest.$ac_ext >&5
c906108c 6520 rm -rf conftest*
97bf5e38 6521 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6522fi
6523rm -f conftest*
97bf5e38 6524fi
c906108c 6525
97bf5e38
MK
6526echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6527if test $gdb_cv_struct_reg_r_fs = yes; then
6528 cat >> confdefs.h <<\EOF
6529#define HAVE_STRUCT_REG_R_FS 1
6530EOF
6531
6532fi
6533echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
06825bd1 6534echo "configure:6535: checking for r_gs in struct reg" >&5
97bf5e38
MK
6535if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6536 echo $ac_n "(cached) $ac_c" 1>&6
6537else
6538 cat > conftest.$ac_ext <<EOF
06825bd1 6539#line 6540 "configure"
c906108c 6540#include "confdefs.h"
97bf5e38
MK
6541#include <machine/reg.h>
6542int main() {
6543struct reg r; r.r_gs;
6544; return 0; }
c906108c 6545EOF
06825bd1 6546if { (eval echo configure:6547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6547 rm -rf conftest*
97bf5e38 6548 gdb_cv_struct_reg_r_gs=yes
c906108c 6549else
97bf5e38
MK
6550 echo "configure: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
c906108c 6552 rm -rf conftest*
97bf5e38 6553 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6554fi
6555rm -f conftest*
c906108c 6556fi
c906108c 6557
97bf5e38
MK
6558echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6559if test $gdb_cv_struct_reg_r_gs = yes; then
6560 cat >> confdefs.h <<\EOF
6561#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6562EOF
6563
c906108c
SS
6564fi
6565
97bf5e38
MK
6566# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6567echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
06825bd1 6568echo "configure:6569: checking for PTRACE_GETREGS" >&5
97bf5e38 6569if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6570 echo $ac_n "(cached) $ac_c" 1>&6
6571else
6572 cat > conftest.$ac_ext <<EOF
06825bd1 6573#line 6574 "configure"
c906108c 6574#include "confdefs.h"
97bf5e38 6575#include <sys/ptrace.h>
c906108c 6576int main() {
97bf5e38 6577PTRACE_GETREGS;
c906108c
SS
6578; return 0; }
6579EOF
06825bd1 6580if { (eval echo configure:6581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6581 rm -rf conftest*
97bf5e38 6582 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6583else
6584 echo "configure: failed program was:" >&5
6585 cat conftest.$ac_ext >&5
6586 rm -rf conftest*
97bf5e38 6587 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6588fi
6589rm -f conftest*
6590fi
6591
97bf5e38
MK
6592echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6593if test $gdb_cv_have_ptrace_getregs = yes; then
6594 cat >> confdefs.h <<\EOF
6595#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6596EOF
6597
97bf5e38 6598fi
c906108c 6599
97bf5e38
MK
6600# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6601echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
06825bd1 6602echo "configure:6603: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6603if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6604 echo $ac_n "(cached) $ac_c" 1>&6
6605else
6606 cat > conftest.$ac_ext <<EOF
06825bd1 6607#line 6608 "configure"
c906108c 6608#include "confdefs.h"
97bf5e38 6609#include <sys/ptrace.h>
c906108c 6610int main() {
97bf5e38 6611PTRACE_GETFPXREGS;
c906108c
SS
6612; return 0; }
6613EOF
06825bd1 6614if { (eval echo configure:6615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6615 rm -rf conftest*
97bf5e38 6616 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6617else
6618 echo "configure: failed program was:" >&5
6619 cat conftest.$ac_ext >&5
6620 rm -rf conftest*
97bf5e38 6621 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6622fi
6623rm -f conftest*
6624fi
6625
97bf5e38
MK
6626echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6627if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6628 cat >> confdefs.h <<\EOF
6629#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6630EOF
6631
97bf5e38 6632fi
c906108c 6633
97bf5e38
MK
6634# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6635echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
06825bd1 6636echo "configure:6637: checking for PT_GETDBREGS" >&5
97bf5e38 6637if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6638 echo $ac_n "(cached) $ac_c" 1>&6
6639else
6640 cat > conftest.$ac_ext <<EOF
06825bd1 6641#line 6642 "configure"
c906108c 6642#include "confdefs.h"
97bf5e38
MK
6643#include <sys/types.h>
6644#include <sys/ptrace.h>
c906108c 6645int main() {
97bf5e38 6646PT_GETDBREGS;
c906108c
SS
6647; return 0; }
6648EOF
06825bd1 6649if { (eval echo configure:6650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6650 rm -rf conftest*
97bf5e38 6651 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6652else
6653 echo "configure: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 rm -rf conftest*
97bf5e38 6656 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6657fi
6658rm -f conftest*
6659fi
6660
97bf5e38
MK
6661echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6662if test $gdb_cv_have_pt_getdbregs = yes; then
6663 cat >> confdefs.h <<\EOF
6664#define HAVE_PT_GETDBREGS 1
c906108c
SS
6665EOF
6666
97bf5e38 6667fi
c906108c 6668
97bf5e38
MK
6669# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6670echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
06825bd1 6671echo "configure:6672: checking for PT_GETXMMREGS" >&5
97bf5e38 6672if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6673 echo $ac_n "(cached) $ac_c" 1>&6
6674else
6675 cat > conftest.$ac_ext <<EOF
06825bd1 6676#line 6677 "configure"
c906108c 6677#include "confdefs.h"
97bf5e38
MK
6678#include <sys/types.h>
6679#include <sys/ptrace.h>
c906108c 6680int main() {
97bf5e38 6681PT_GETXMMREGS;
c906108c
SS
6682; return 0; }
6683EOF
06825bd1 6684if { (eval echo configure:6685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6685 rm -rf conftest*
97bf5e38 6686 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6687else
6688 echo "configure: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 rm -rf conftest*
97bf5e38 6691 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6692fi
6693rm -f conftest*
6694fi
6695
97bf5e38
MK
6696echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6697if test $gdb_cv_have_pt_getxmmregs = yes; then
6698 cat >> confdefs.h <<\EOF
6699#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6700EOF
6701
97bf5e38 6702fi
c906108c 6703
97bf5e38
MK
6704
6705echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
06825bd1 6706echo "configure:6707: checking whether malloc must be declared" >&5
97bf5e38 6707if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6708 echo $ac_n "(cached) $ac_c" 1>&6
6709else
6710 cat > conftest.$ac_ext <<EOF
06825bd1 6711#line 6712 "configure"
3862412b 6712#include "confdefs.h"
e17bf198 6713
97bf5e38
MK
6714#include <stdio.h>
6715#ifdef HAVE_STRING_H
6716#include <string.h>
6717#else
6718#ifdef HAVE_STRINGS_H
6719#include <strings.h>
6720#endif
6721#endif
6722#ifdef HAVE_STDLIB_H
6723#include <stdlib.h>
6724#endif
6725#ifdef HAVE_UNISTD_H
6726#include <unistd.h>
6727#endif
3862412b 6728int main() {
97bf5e38 6729char *(*pfn) = (char *(*)) malloc
3862412b
MK
6730; return 0; }
6731EOF
06825bd1 6732if { (eval echo configure:6733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6733 rm -rf conftest*
97bf5e38 6734 bfd_cv_decl_needed_malloc=no
3862412b
MK
6735else
6736 echo "configure: failed program was:" >&5
6737 cat conftest.$ac_ext >&5
6738 rm -rf conftest*
97bf5e38 6739 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6740fi
6741rm -f conftest*
6742fi
6743
97bf5e38
MK
6744echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6745if test $bfd_cv_decl_needed_malloc = yes; then
6746 cat >> confdefs.h <<\EOF
6747#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6748EOF
6749
97bf5e38 6750fi
3862412b 6751
97bf5e38 6752echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
06825bd1 6753echo "configure:6754: checking whether realloc must be declared" >&5
97bf5e38 6754if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6755 echo $ac_n "(cached) $ac_c" 1>&6
6756else
6757 cat > conftest.$ac_ext <<EOF
06825bd1 6758#line 6759 "configure"
3862412b 6759#include "confdefs.h"
e17bf198 6760
97bf5e38
MK
6761#include <stdio.h>
6762#ifdef HAVE_STRING_H
6763#include <string.h>
6764#else
6765#ifdef HAVE_STRINGS_H
6766#include <strings.h>
6767#endif
6768#endif
6769#ifdef HAVE_STDLIB_H
6770#include <stdlib.h>
6771#endif
6772#ifdef HAVE_UNISTD_H
6773#include <unistd.h>
6774#endif
3862412b 6775int main() {
97bf5e38 6776char *(*pfn) = (char *(*)) realloc
3862412b
MK
6777; return 0; }
6778EOF
06825bd1 6779if { (eval echo configure:6780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6780 rm -rf conftest*
97bf5e38 6781 bfd_cv_decl_needed_realloc=no
3862412b
MK
6782else
6783 echo "configure: failed program was:" >&5
6784 cat conftest.$ac_ext >&5
6785 rm -rf conftest*
97bf5e38 6786 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6787fi
6788rm -f conftest*
6789fi
6790
97bf5e38
MK
6791echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6792if test $bfd_cv_decl_needed_realloc = yes; then
6793 cat >> confdefs.h <<\EOF
6794#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6795EOF
6796
97bf5e38 6797fi
3862412b 6798
97bf5e38 6799echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
06825bd1 6800echo "configure:6801: checking whether free must be declared" >&5
97bf5e38 6801if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6802 echo $ac_n "(cached) $ac_c" 1>&6
6803else
6804 cat > conftest.$ac_ext <<EOF
06825bd1 6805#line 6806 "configure"
451928c5 6806#include "confdefs.h"
e17bf198 6807
97bf5e38
MK
6808#include <stdio.h>
6809#ifdef HAVE_STRING_H
6810#include <string.h>
6811#else
6812#ifdef HAVE_STRINGS_H
6813#include <strings.h>
6814#endif
6815#endif
6816#ifdef HAVE_STDLIB_H
6817#include <stdlib.h>
6818#endif
6819#ifdef HAVE_UNISTD_H
6820#include <unistd.h>
6821#endif
451928c5 6822int main() {
97bf5e38 6823char *(*pfn) = (char *(*)) free
451928c5
AC
6824; return 0; }
6825EOF
06825bd1 6826if { (eval echo configure:6827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6827 rm -rf conftest*
97bf5e38 6828 bfd_cv_decl_needed_free=no
451928c5
AC
6829else
6830 echo "configure: failed program was:" >&5
6831 cat conftest.$ac_ext >&5
6832 rm -rf conftest*
97bf5e38 6833 bfd_cv_decl_needed_free=yes
451928c5
AC
6834fi
6835rm -f conftest*
6836fi
6837
97bf5e38
MK
6838echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6839if test $bfd_cv_decl_needed_free = yes; then
6840 cat >> confdefs.h <<\EOF
6841#define NEED_DECLARATION_FREE 1
451928c5
AC
6842EOF
6843
97bf5e38 6844fi
451928c5 6845
97bf5e38 6846echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
06825bd1 6847echo "configure:6848: checking whether strerror must be declared" >&5
97bf5e38 6848if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6849 echo $ac_n "(cached) $ac_c" 1>&6
6850else
6851 cat > conftest.$ac_ext <<EOF
06825bd1 6852#line 6853 "configure"
451928c5 6853#include "confdefs.h"
e17bf198 6854
97bf5e38
MK
6855#include <stdio.h>
6856#ifdef HAVE_STRING_H
6857#include <string.h>
6858#else
6859#ifdef HAVE_STRINGS_H
6860#include <strings.h>
6861#endif
6862#endif
6863#ifdef HAVE_STDLIB_H
6864#include <stdlib.h>
6865#endif
6866#ifdef HAVE_UNISTD_H
6867#include <unistd.h>
6868#endif
451928c5 6869int main() {
97bf5e38 6870char *(*pfn) = (char *(*)) strerror
451928c5
AC
6871; return 0; }
6872EOF
06825bd1 6873if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6874 rm -rf conftest*
97bf5e38 6875 bfd_cv_decl_needed_strerror=no
451928c5
AC
6876else
6877 echo "configure: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 rm -rf conftest*
97bf5e38 6880 bfd_cv_decl_needed_strerror=yes
451928c5
AC
6881fi
6882rm -f conftest*
6883fi
6884
97bf5e38
MK
6885echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6886if test $bfd_cv_decl_needed_strerror = yes; then
6887 cat >> confdefs.h <<\EOF
6888#define NEED_DECLARATION_STRERROR 1
451928c5
AC
6889EOF
6890
97bf5e38 6891fi
451928c5 6892
97bf5e38 6893echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
06825bd1 6894echo "configure:6895: checking whether strdup must be declared" >&5
97bf5e38 6895if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
6896 echo $ac_n "(cached) $ac_c" 1>&6
6897else
6898 cat > conftest.$ac_ext <<EOF
06825bd1 6899#line 6900 "configure"
3862412b 6900#include "confdefs.h"
e17bf198 6901
97bf5e38
MK
6902#include <stdio.h>
6903#ifdef HAVE_STRING_H
6904#include <string.h>
6905#else
6906#ifdef HAVE_STRINGS_H
6907#include <strings.h>
6908#endif
6909#endif
6910#ifdef HAVE_STDLIB_H
6911#include <stdlib.h>
6912#endif
6913#ifdef HAVE_UNISTD_H
6914#include <unistd.h>
6915#endif
3862412b 6916int main() {
97bf5e38 6917char *(*pfn) = (char *(*)) strdup
3862412b
MK
6918; return 0; }
6919EOF
06825bd1 6920if { (eval echo configure:6921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6921 rm -rf conftest*
97bf5e38 6922 bfd_cv_decl_needed_strdup=no
3862412b
MK
6923else
6924 echo "configure: failed program was:" >&5
6925 cat conftest.$ac_ext >&5
6926 rm -rf conftest*
97bf5e38 6927 bfd_cv_decl_needed_strdup=yes
3862412b
MK
6928fi
6929rm -f conftest*
6930fi
6931
97bf5e38
MK
6932echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
6933if test $bfd_cv_decl_needed_strdup = yes; then
6934 cat >> confdefs.h <<\EOF
6935#define NEED_DECLARATION_STRDUP 1
3862412b
MK
6936EOF
6937
97bf5e38 6938fi
3862412b 6939
97bf5e38 6940echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
06825bd1 6941echo "configure:6942: checking whether strstr must be declared" >&5
97bf5e38 6942if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
6943 echo $ac_n "(cached) $ac_c" 1>&6
6944else
6945 cat > conftest.$ac_ext <<EOF
06825bd1 6946#line 6947 "configure"
3862412b 6947#include "confdefs.h"
e17bf198 6948
97bf5e38
MK
6949#include <stdio.h>
6950#ifdef HAVE_STRING_H
6951#include <string.h>
6952#else
6953#ifdef HAVE_STRINGS_H
6954#include <strings.h>
6955#endif
6956#endif
6957#ifdef HAVE_STDLIB_H
6958#include <stdlib.h>
6959#endif
6960#ifdef HAVE_UNISTD_H
6961#include <unistd.h>
6962#endif
3862412b 6963int main() {
97bf5e38 6964char *(*pfn) = (char *(*)) strstr
3862412b
MK
6965; return 0; }
6966EOF
06825bd1 6967if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6968 rm -rf conftest*
97bf5e38 6969 bfd_cv_decl_needed_strstr=no
3862412b
MK
6970else
6971 echo "configure: failed program was:" >&5
6972 cat conftest.$ac_ext >&5
6973 rm -rf conftest*
97bf5e38 6974 bfd_cv_decl_needed_strstr=yes
3862412b
MK
6975fi
6976rm -f conftest*
6977fi
6978
97bf5e38
MK
6979echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
6980if test $bfd_cv_decl_needed_strstr = yes; then
6981 cat >> confdefs.h <<\EOF
6982#define NEED_DECLARATION_STRSTR 1
3862412b
MK
6983EOF
6984
97bf5e38 6985fi
3862412b 6986
97bf5e38 6987echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
06825bd1 6988echo "configure:6989: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 6989if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
6990 echo $ac_n "(cached) $ac_c" 1>&6
6991else
6992 cat > conftest.$ac_ext <<EOF
06825bd1 6993#line 6994 "configure"
596c9d4b
KB
6994#include "confdefs.h"
6995
97bf5e38
MK
6996#include <stdio.h>
6997#ifdef HAVE_STRING_H
6998#include <string.h>
6999#else
7000#ifdef HAVE_STRINGS_H
7001#include <strings.h>
7002#endif
7003#endif
7004#ifdef HAVE_STDLIB_H
7005#include <stdlib.h>
7006#endif
7007#ifdef HAVE_UNISTD_H
7008#include <unistd.h>
7009#endif
596c9d4b 7010int main() {
97bf5e38 7011char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7012; return 0; }
7013EOF
06825bd1 7014if { (eval echo configure:7015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7015 rm -rf conftest*
97bf5e38 7016 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7017else
7018 echo "configure: failed program was:" >&5
7019 cat conftest.$ac_ext >&5
7020 rm -rf conftest*
97bf5e38 7021 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7022fi
7023rm -f conftest*
7024fi
7025
97bf5e38
MK
7026echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7027if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7028 cat >> confdefs.h <<\EOF
7029#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7030EOF
7031
97bf5e38 7032fi
596c9d4b 7033
97bf5e38
MK
7034
7035# The following save_state_t checkery is only necessary for HPUX
7036# versions earlier than 10.20. When those fade from memory, this
7037# could be expunged. --jsm 1999-03-22
7038
7039echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
06825bd1 7040echo "configure:7041: checking for HPUX save_state structure" >&5
97bf5e38 7041cat > conftest.$ac_ext <<EOF
06825bd1 7042#line 7043 "configure"
97bf5e38
MK
7043#include "confdefs.h"
7044#include <machine/save_state.h>
7045EOF
7046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7047 egrep "save_state_t" >/dev/null 2>&1; then
7048 rm -rf conftest*
7049 gdb_cv_hpux_savestate=yes
7050else
7051 rm -rf conftest*
7052 gdb_cv_hpux_savestate=no
7053fi
7054rm -f conftest*
7055
7056cat > conftest.$ac_ext <<EOF
06825bd1 7057#line 7058 "configure"
97bf5e38
MK
7058#include "confdefs.h"
7059#include <machine/save_state.h>
7060EOF
7061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7062 egrep "ss_wide" >/dev/null 2>&1; then
7063 rm -rf conftest*
7064 gdb_cv_hpux_sswide=yes
7065else
7066 rm -rf conftest*
7067 gdb_cv_hpux_sswide=no
7068fi
7069rm -f conftest*
7070
7071if test $gdb_cv_hpux_savestate = yes
7072then
7073 cat >> confdefs.h <<\EOF
7074#define HAVE_STRUCT_SAVE_STATE_T 1
7075EOF
7076
7077fi
7078if test $gdb_cv_hpux_sswide = yes
7079then
7080 cat >> confdefs.h <<\EOF
7081#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7082EOF
7083
7084fi
7085echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7086
7087
7088# If we are configured native on GNU/Linux, work around problems with
7089# sys/procfs.h
7090# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7091
7092if test "${target}" = "${host}"; then
7093 case "${host}" in
7094 i[3456]86-*-linux*)
7095 cat >> confdefs.h <<\EOF
7096#define START_INFERIOR_TRAPS_EXPECTED 2
7097EOF
7098
7099 cat >> confdefs.h <<\EOF
7100#define sys_quotactl 1
7101EOF
7102
7103 ;;
7104 ia64-*-aix*)
7105 cat >> confdefs.h <<\EOF
7106#define NEW_PROC_API 1
7107EOF
7108
7109 ;;
7110 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7111 cat >> confdefs.h <<\EOF
7112#define NEW_PROC_API 1
7113EOF
7114
7115 ;;
7116 *-*-solaris2.[678])
7117 cat >> confdefs.h <<\EOF
7118#define NEW_PROC_API 1
7119EOF
7120
7121 ;;
7122 esac
7123fi
7124
7125if test "$ac_cv_header_sys_procfs_h" = yes; then
7126 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7127echo "configure:7128: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7128 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7129 echo $ac_n "(cached) $ac_c" 1>&6
7130else
7131 cat > conftest.$ac_ext <<EOF
06825bd1 7132#line 7133 "configure"
596c9d4b
KB
7133#include "confdefs.h"
7134
7135#define _SYSCALL32
7136#include <sys/procfs.h>
7137int main() {
97bf5e38 7138pstatus_t avar
596c9d4b
KB
7139; return 0; }
7140EOF
06825bd1 7141if { (eval echo configure:7142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7142 rm -rf conftest*
97bf5e38 7143 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7144else
7145 echo "configure: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7147 rm -rf conftest*
97bf5e38 7148 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7149
7150fi
7151rm -f conftest*
7152fi
7153
97bf5e38 7154 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7155 cat >> confdefs.h <<\EOF
97bf5e38 7156#define HAVE_PSTATUS_T 1
596c9d4b
KB
7157EOF
7158
7159 fi
97bf5e38 7160 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7161
97bf5e38 7162 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7163echo "configure:7164: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7164 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7165 echo $ac_n "(cached) $ac_c" 1>&6
7166else
7167 cat > conftest.$ac_ext <<EOF
06825bd1 7168#line 7169 "configure"
596c9d4b
KB
7169#include "confdefs.h"
7170
7171#define _SYSCALL32
7172#include <sys/procfs.h>
7173int main() {
97bf5e38 7174prrun_t avar
596c9d4b
KB
7175; return 0; }
7176EOF
06825bd1 7177if { (eval echo configure:7178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7178 rm -rf conftest*
97bf5e38 7179 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7180else
7181 echo "configure: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 rm -rf conftest*
97bf5e38 7184 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7185
7186fi
7187rm -f conftest*
7188fi
7189
97bf5e38 7190 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7191 cat >> confdefs.h <<\EOF
97bf5e38 7192#define HAVE_PRRUN_T 1
596c9d4b
KB
7193EOF
7194
7195 fi
97bf5e38 7196 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7197
97bf5e38 7198 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7199echo "configure:7200: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7200 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7201 echo $ac_n "(cached) $ac_c" 1>&6
7202else
7203 cat > conftest.$ac_ext <<EOF
06825bd1 7204#line 7205 "configure"
596c9d4b
KB
7205#include "confdefs.h"
7206
7207#define _SYSCALL32
7208#include <sys/procfs.h>
7209int main() {
97bf5e38 7210gregset_t avar
596c9d4b
KB
7211; return 0; }
7212EOF
06825bd1 7213if { (eval echo configure:7214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7214 rm -rf conftest*
97bf5e38 7215 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7216else
7217 echo "configure: failed program was:" >&5
7218 cat conftest.$ac_ext >&5
7219 rm -rf conftest*
97bf5e38 7220 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7221
7222fi
7223rm -f conftest*
7224fi
7225
97bf5e38 7226 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7227 cat >> confdefs.h <<\EOF
97bf5e38 7228#define HAVE_GREGSET_T 1
596c9d4b
KB
7229EOF
7230
7231 fi
97bf5e38 7232 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7233
97bf5e38 7234 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7235echo "configure:7236: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7236 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7237 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7238else
7239 cat > conftest.$ac_ext <<EOF
06825bd1 7240#line 7241 "configure"
d84dd0c5 7241#include "confdefs.h"
97bf5e38
MK
7242
7243#define _SYSCALL32
d84dd0c5 7244#include <sys/procfs.h>
97bf5e38
MK
7245int main() {
7246fpregset_t avar
7247; return 0; }
d84dd0c5 7248EOF
06825bd1 7249if { (eval echo configure:7250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7250 rm -rf conftest*
7251 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7252else
7253 echo "configure: failed program was:" >&5
7254 cat conftest.$ac_ext >&5
97bf5e38
MK
7255 rm -rf conftest*
7256 bfd_cv_have_sys_procfs_type_fpregset_t=no
7257
d84dd0c5 7258fi
97bf5e38 7259rm -f conftest*
d84dd0c5
MK
7260fi
7261
97bf5e38
MK
7262 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7263 cat >> confdefs.h <<\EOF
7264#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7265EOF
7266
97bf5e38
MK
7267 fi
7268 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7269
97bf5e38 7270 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7271echo "configure:7272: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7272 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7273 echo $ac_n "(cached) $ac_c" 1>&6
7274else
7275 cat > conftest.$ac_ext <<EOF
06825bd1 7276#line 7277 "configure"
c906108c 7277#include "confdefs.h"
c906108c 7278
97bf5e38
MK
7279#define _SYSCALL32
7280#include <sys/procfs.h>
c906108c 7281int main() {
97bf5e38 7282prgregset_t avar
c906108c
SS
7283; return 0; }
7284EOF
06825bd1 7285if { (eval echo configure:7286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7286 rm -rf conftest*
97bf5e38 7287 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7288else
7289 echo "configure: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7291 rm -rf conftest*
97bf5e38
MK
7292 bfd_cv_have_sys_procfs_type_prgregset_t=no
7293
c906108c
SS
7294fi
7295rm -f conftest*
7296fi
7297
97bf5e38
MK
7298 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7299 cat >> confdefs.h <<\EOF
7300#define HAVE_PRGREGSET_T 1
c906108c
SS
7301EOF
7302
97bf5e38
MK
7303 fi
7304 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7305
97bf5e38 7306 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7307echo "configure:7308: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7308 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7309 echo $ac_n "(cached) $ac_c" 1>&6
7310else
7311 cat > conftest.$ac_ext <<EOF
06825bd1 7312#line 7313 "configure"
d45fe813 7313#include "confdefs.h"
97bf5e38
MK
7314
7315#define _SYSCALL32
7316#include <sys/procfs.h>
d45fe813 7317int main() {
97bf5e38 7318prfpregset_t avar
d45fe813
KB
7319; return 0; }
7320EOF
06825bd1 7321if { (eval echo configure:7322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7322 rm -rf conftest*
97bf5e38 7323 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7324else
7325 echo "configure: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7327 rm -rf conftest*
97bf5e38
MK
7328 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7329
d45fe813
KB
7330fi
7331rm -f conftest*
7332fi
7333
97bf5e38
MK
7334 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7335 cat >> confdefs.h <<\EOF
7336#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7337EOF
7338
97bf5e38
MK
7339 fi
7340 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7341
97bf5e38 7342 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7343echo "configure:7344: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7344 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7345 echo $ac_n "(cached) $ac_c" 1>&6
7346else
7347 cat > conftest.$ac_ext <<EOF
06825bd1 7348#line 7349 "configure"
d45fe813 7349#include "confdefs.h"
97bf5e38
MK
7350
7351#define _SYSCALL32
7352#include <sys/procfs.h>
d45fe813 7353int main() {
97bf5e38 7354prgregset32_t avar
d45fe813
KB
7355; return 0; }
7356EOF
06825bd1 7357if { (eval echo configure:7358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7358 rm -rf conftest*
97bf5e38 7359 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7360else
7361 echo "configure: failed program was:" >&5
7362 cat conftest.$ac_ext >&5
7363 rm -rf conftest*
97bf5e38
MK
7364 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7365
d45fe813
KB
7366fi
7367rm -f conftest*
7368fi
7369
97bf5e38
MK
7370 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7371 cat >> confdefs.h <<\EOF
7372#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7373EOF
7374
97bf5e38
MK
7375 fi
7376 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7377
97bf5e38 7378 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7379echo "configure:7380: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7380 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7381 echo $ac_n "(cached) $ac_c" 1>&6
7382else
7383 cat > conftest.$ac_ext <<EOF
06825bd1 7384#line 7385 "configure"
d45fe813 7385#include "confdefs.h"
97bf5e38
MK
7386
7387#define _SYSCALL32
7388#include <sys/procfs.h>
d45fe813 7389int main() {
97bf5e38 7390prfpregset32_t avar
d45fe813
KB
7391; return 0; }
7392EOF
06825bd1 7393if { (eval echo configure:7394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7394 rm -rf conftest*
97bf5e38 7395 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7396else
7397 echo "configure: failed program was:" >&5
7398 cat conftest.$ac_ext >&5
7399 rm -rf conftest*
97bf5e38
MK
7400 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7401
d45fe813
KB
7402fi
7403rm -f conftest*
7404fi
7405
97bf5e38
MK
7406 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7407 cat >> confdefs.h <<\EOF
7408#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7409EOF
7410
97bf5e38
MK
7411 fi
7412 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7413
97bf5e38 7414 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7415echo "configure:7416: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7416 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7417 echo $ac_n "(cached) $ac_c" 1>&6
7418else
7419 cat > conftest.$ac_ext <<EOF
06825bd1 7420#line 7421 "configure"
d45fe813 7421#include "confdefs.h"
97bf5e38 7422
d45fe813 7423#define _SYSCALL32
97bf5e38 7424#include <sys/procfs.h>
d45fe813 7425int main() {
97bf5e38 7426lwpid_t avar
d45fe813
KB
7427; return 0; }
7428EOF
06825bd1 7429if { (eval echo configure:7430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7430 rm -rf conftest*
97bf5e38 7431 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7432else
7433 echo "configure: failed program was:" >&5
7434 cat conftest.$ac_ext >&5
7435 rm -rf conftest*
97bf5e38
MK
7436 bfd_cv_have_sys_procfs_type_lwpid_t=no
7437
d45fe813
KB
7438fi
7439rm -f conftest*
7440fi
7441
97bf5e38
MK
7442 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7443 cat >> confdefs.h <<\EOF
7444#define HAVE_LWPID_T 1
d45fe813
KB
7445EOF
7446
97bf5e38
MK
7447 fi
7448 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7449
97bf5e38 7450 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7451echo "configure:7452: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7452 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7453 echo $ac_n "(cached) $ac_c" 1>&6
7454else
7455 cat > conftest.$ac_ext <<EOF
06825bd1 7456#line 7457 "configure"
c906108c
SS
7457#include "confdefs.h"
7458
97bf5e38
MK
7459#define _SYSCALL32
7460#include <sys/procfs.h>
c906108c 7461int main() {
97bf5e38 7462psaddr_t avar
c906108c
SS
7463; return 0; }
7464EOF
06825bd1 7465if { (eval echo configure:7466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7466 rm -rf conftest*
97bf5e38 7467 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7468else
7469 echo "configure: failed program was:" >&5
7470 cat conftest.$ac_ext >&5
7471 rm -rf conftest*
97bf5e38
MK
7472 bfd_cv_have_sys_procfs_type_psaddr_t=no
7473
c906108c
SS
7474fi
7475rm -f conftest*
7476fi
7477
97bf5e38
MK
7478 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7479 cat >> confdefs.h <<\EOF
7480#define HAVE_PSADDR_T 1
c906108c
SS
7481EOF
7482
97bf5e38
MK
7483 fi
7484 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7485
97bf5e38 7486 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7487echo "configure:7488: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7488 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7489 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7490else
7491 cat > conftest.$ac_ext <<EOF
06825bd1 7492#line 7493 "configure"
c906108c
SS
7493#include "confdefs.h"
7494
97bf5e38
MK
7495#define _SYSCALL32
7496#include <sys/procfs.h>
7497int main() {
7498prsysent_t avar
7499; return 0; }
c906108c 7500EOF
06825bd1 7501if { (eval echo configure:7502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7502 rm -rf conftest*
7503 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7504else
7505 echo "configure: failed program was:" >&5
7506 cat conftest.$ac_ext >&5
97bf5e38
MK
7507 rm -rf conftest*
7508 bfd_cv_have_sys_procfs_type_prsysent_t=no
7509
c906108c 7510fi
97bf5e38 7511rm -f conftest*
c906108c
SS
7512fi
7513
97bf5e38
MK
7514 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7515 cat >> confdefs.h <<\EOF
7516#define HAVE_PRSYSENT_T 1
c906108c
SS
7517EOF
7518
97bf5e38
MK
7519 fi
7520 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7521
97bf5e38 7522 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7523echo "configure:7524: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7524 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7525 echo $ac_n "(cached) $ac_c" 1>&6
7526else
7527 cat > conftest.$ac_ext <<EOF
06825bd1 7528#line 7529 "configure"
c906108c
SS
7529#include "confdefs.h"
7530
97bf5e38
MK
7531#define _SYSCALL32
7532#include <sys/procfs.h>
c906108c 7533int main() {
97bf5e38 7534pr_sigset_t avar
c906108c
SS
7535; return 0; }
7536EOF
06825bd1 7537if { (eval echo configure:7538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7538 rm -rf conftest*
97bf5e38 7539 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7540else
7541 echo "configure: failed program was:" >&5
7542 cat conftest.$ac_ext >&5
7543 rm -rf conftest*
97bf5e38
MK
7544 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7545
c906108c
SS
7546fi
7547rm -f conftest*
7548fi
7549
97bf5e38
MK
7550 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7551 cat >> confdefs.h <<\EOF
7552#define HAVE_PR_SIGSET_T 1
c906108c
SS
7553EOF
7554
97bf5e38
MK
7555 fi
7556 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7557
97bf5e38 7558 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7559echo "configure:7560: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7560 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7561 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7562else
7563 cat > conftest.$ac_ext <<EOF
06825bd1 7564#line 7565 "configure"
c906108c
SS
7565#include "confdefs.h"
7566
97bf5e38
MK
7567#define _SYSCALL32
7568#include <sys/procfs.h>
7569int main() {
7570pr_sigaction64_t avar
7571; return 0; }
c906108c 7572EOF
06825bd1 7573if { (eval echo configure:7574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7574 rm -rf conftest*
7575 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7576else
7577 echo "configure: failed program was:" >&5
7578 cat conftest.$ac_ext >&5
97bf5e38
MK
7579 rm -rf conftest*
7580 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7581
c906108c 7582fi
97bf5e38 7583rm -f conftest*
c906108c
SS
7584fi
7585
97bf5e38
MK
7586 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7587 cat >> confdefs.h <<\EOF
7588#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7589EOF
7590
97bf5e38
MK
7591 fi
7592 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7593
7594 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7595echo "configure:7596: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7596 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7597 echo $ac_n "(cached) $ac_c" 1>&6
7598else
7599 cat > conftest.$ac_ext <<EOF
06825bd1 7600#line 7601 "configure"
97bf5e38
MK
7601#include "confdefs.h"
7602
7603#define _SYSCALL32
7604#include <sys/procfs.h>
7605int main() {
7606pr_siginfo64_t avar
7607; return 0; }
7608EOF
06825bd1 7609if { (eval echo configure:7610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7610 rm -rf conftest*
7611 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7612else
7613 echo "configure: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 rm -rf conftest*
7616 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7617
7618fi
7619rm -f conftest*
c906108c 7620fi
c906108c 7621
97bf5e38
MK
7622 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7623 cat >> confdefs.h <<\EOF
7624#define HAVE_PR_SIGINFO64_T 1
7625EOF
c906108c 7626
97bf5e38
MK
7627 fi
7628 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7629
7630
7631
7632
7633
7634 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7635 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
06825bd1 7636echo "configure:7637: checking whether prfpregset_t type is broken" >&5
97bf5e38 7637 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7638 echo $ac_n "(cached) $ac_c" 1>&6
7639else
7640 if test "$cross_compiling" = yes; then
97bf5e38 7641 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7642else
7643 cat > conftest.$ac_ext <<EOF
06825bd1 7644#line 7645 "configure"
c906108c 7645#include "confdefs.h"
97bf5e38
MK
7646#include <sys/procfs.h>
7647 int main ()
7648 {
7649 if (sizeof (prfpregset_t) == sizeof (void *))
7650 return 1;
7651 return 0;
7652 }
c906108c 7653EOF
06825bd1 7654if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7655then
97bf5e38 7656 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7657else
7658 echo "configure: failed program was:" >&5
7659 cat conftest.$ac_ext >&5
7660 rm -fr conftest*
97bf5e38 7661 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7662fi
7663rm -fr conftest*
7664fi
7665
7666fi
7667
97bf5e38
MK
7668 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7669 if test $gdb_cv_prfpregset_t_broken = yes; then
7670 cat >> confdefs.h <<\EOF
7671#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7672EOF
7673
97bf5e38
MK
7674 fi
7675 fi
c906108c 7676
97bf5e38
MK
7677
7678 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
06825bd1 7679echo "configure:7680: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7680 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7681 echo $ac_n "(cached) $ac_c" 1>&6
7682else
7683 cat > conftest.$ac_ext <<EOF
06825bd1 7684#line 7685 "configure"
c906108c 7685#include "confdefs.h"
97bf5e38
MK
7686#include <unistd.h>
7687#include <sys/types.h>
7688#include <sys/procfs.h>
7689
7690int main() {
7691
7692 int dummy;;
7693 dummy = ioctl(0, PIOCSET, &dummy);
7694
7695; return 0; }
c906108c 7696EOF
06825bd1 7697if { (eval echo configure:7698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7698 rm -rf conftest*
97bf5e38 7699 gdb_cv_have_procfs_piocset=yes
c906108c 7700else
c906108c
SS
7701 echo "configure: failed program was:" >&5
7702 cat conftest.$ac_ext >&5
7703 rm -rf conftest*
97bf5e38 7704 gdb_cv_have_procfs_piocset=no
c906108c
SS
7705fi
7706rm -f conftest*
7707fi
97bf5e38
MK
7708
7709 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7710 if test $gdb_cv_have_procfs_piocset = yes; then
7711 cat >> confdefs.h <<\EOF
7712#define HAVE_PROCFS_PIOCSET 1
c906108c 7713EOF
97bf5e38
MK
7714
7715 fi
c906108c 7716fi
c906108c 7717
97bf5e38
MK
7718if test ${host} = ${target} ; then
7719
7720 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
06825bd1 7721echo "configure:7722: checking for member l_addr in struct link_map" >&5
97bf5e38 7722 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7723 echo $ac_n "(cached) $ac_c" 1>&6
7724else
7725 cat > conftest.$ac_ext <<EOF
06825bd1 7726#line 7727 "configure"
c906108c 7727#include "confdefs.h"
97bf5e38 7728#include <link.h>
c906108c 7729int main() {
97bf5e38 7730struct link_map lm; (void) lm.l_addr;
c906108c
SS
7731; return 0; }
7732EOF
06825bd1 7733if { (eval echo configure:7734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7734 rm -rf conftest*
97bf5e38 7735 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7736else
7737 echo "configure: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 rm -rf conftest*
97bf5e38 7740 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7741fi
7742rm -f conftest*
7743fi
7744
97bf5e38
MK
7745 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7746 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7747 cat >> confdefs.h <<\EOF
7748#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7749EOF
97bf5e38
MK
7750
7751 fi
7752
7753
7754 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
06825bd1 7755echo "configure:7756: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7756 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7757 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7758else
97bf5e38 7759 cat > conftest.$ac_ext <<EOF
06825bd1 7760#line 7761 "configure"
97bf5e38
MK
7761#include "confdefs.h"
7762#include <sys/types.h>
7763#include <link.h>
7764int main() {
7765struct link_map lm; (void) lm.lm_addr;
7766; return 0; }
7767EOF
06825bd1 7768if { (eval echo configure:7769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7769 rm -rf conftest*
7770 gdb_cv_have_struct_link_map_with_lm_members=yes
7771else
7772 echo "configure: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7774 rm -rf conftest*
7775 gdb_cv_have_struct_link_map_with_lm_members=no
7776fi
7777rm -f conftest*
c906108c 7778fi
c906108c 7779
97bf5e38
MK
7780 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7781 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7782 cat >> confdefs.h <<\EOF
7783#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7784EOF
7785
7786 fi
7787
7788
7789 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
06825bd1 7790echo "configure:7791: checking for member som_addr in struct so_map" >&5
97bf5e38 7791 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7792 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7793else
7794 cat > conftest.$ac_ext <<EOF
06825bd1 7795#line 7796 "configure"
c906108c 7796#include "confdefs.h"
97bf5e38
MK
7797#include <sys/types.h>
7798#ifdef HAVE_NLIST_H
7799#include <nlist.h>
7800#endif
7801#include <link.h>
7802int main() {
7803struct so_map lm; (void) lm.som_addr;
7804; return 0; }
7805EOF
06825bd1 7806if { (eval echo configure:7807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7807 rm -rf conftest*
7808 gdb_cv_have_struct_so_map_with_som_members=yes
7809else
7810 echo "configure: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7812 rm -rf conftest*
7813 gdb_cv_have_struct_so_map_with_som_members=no
7814fi
7815rm -f conftest*
7816fi
c906108c 7817
97bf5e38
MK
7818 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7819 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7820 cat >> confdefs.h <<\EOF
7821#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7822EOF
c906108c 7823
97bf5e38 7824 fi
c906108c 7825
97bf5e38
MK
7826
7827 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
06825bd1 7828echo "configure:7829: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7829 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7830 echo $ac_n "(cached) $ac_c" 1>&6
7831else
7832 cat > conftest.$ac_ext <<EOF
06825bd1 7833#line 7834 "configure"
97bf5e38
MK
7834#include "confdefs.h"
7835#define _SYSCALL32
7836#include <sys/link.h>
7837int main() {
7838struct link_map32 l;
7839; return 0; }
7840EOF
06825bd1 7841if { (eval echo configure:7842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7842 rm -rf conftest*
7843 gdb_cv_have_struct_link_map32=yes
7844else
7845 echo "configure: failed program was:" >&5
7846 cat conftest.$ac_ext >&5
7847 rm -rf conftest*
7848 gdb_cv_have_struct_link_map32=no
7849fi
7850rm -f conftest*
7851fi
c906108c 7852
97bf5e38
MK
7853 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7854 if test $gdb_cv_have_struct_link_map32 = yes; then
7855 cat >> confdefs.h <<\EOF
7856#define HAVE_STRUCT_LINK_MAP32 1
7857EOF
c906108c 7858
97bf5e38
MK
7859 cat >> confdefs.h <<\EOF
7860#define _SYSCALL32 1
7861EOF
c906108c 7862
97bf5e38
MK
7863 fi
7864fi
c906108c 7865
c906108c 7866
97bf5e38 7867echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
06825bd1 7868echo "configure:7869: checking for long long support in compiler" >&5
97bf5e38
MK
7869if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7870 echo $ac_n "(cached) $ac_c" 1>&6
7871else
7872 cat > conftest.$ac_ext <<EOF
06825bd1 7873#line 7874 "configure"
97bf5e38 7874#include "confdefs.h"
c906108c 7875
97bf5e38 7876int main() {
c906108c 7877
97bf5e38
MK
7878 extern long long foo;
7879 switch (foo & 2) { case 0: return 1; }
c906108c 7880
97bf5e38
MK
7881; return 0; }
7882EOF
06825bd1 7883if { (eval echo configure:7884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7884 rm -rf conftest*
7885 gdb_cv_c_long_long=yes
7886else
7887 echo "configure: failed program was:" >&5
7888 cat conftest.$ac_ext >&5
7889 rm -rf conftest*
7890 gdb_cv_c_long_long=no
7891fi
7892rm -f conftest*
7893fi
c906108c 7894
97bf5e38
MK
7895echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7896if test $gdb_cv_c_long_long = yes; then
7897 cat >> confdefs.h <<\EOF
7898#define CC_HAS_LONG_LONG 1
7899EOF
7900
7901fi
7902
7903
7904echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
06825bd1 7905echo "configure:7906: checking for long long support in printf" >&5
97bf5e38
MK
7906if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
7907 echo $ac_n "(cached) $ac_c" 1>&6
7908else
7909 if test "$cross_compiling" = yes; then
7910 gdb_cv_printf_has_long_long=no
7911else
7912 cat > conftest.$ac_ext <<EOF
06825bd1 7913#line 7914 "configure"
97bf5e38
MK
7914#include "confdefs.h"
7915
7916int main () {
7917 char buf[32];
7918 long long l = 0;
7919 l = (l << 16) + 0x0123;
7920 l = (l << 16) + 0x4567;
7921 l = (l << 16) + 0x89ab;
7922 l = (l << 16) + 0xcdef;
7923 sprintf (buf, "0x%016llx", l);
7924 return (strcmp ("0x0123456789abcdef", buf));
c906108c 7925}
97bf5e38 7926EOF
06825bd1 7927if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7928then
7929 gdb_cv_printf_has_long_long=yes
7930else
7931 echo "configure: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 rm -fr conftest*
7934 gdb_cv_printf_has_long_long=no
7935fi
7936rm -fr conftest*
7937fi
7938
7939fi
7940
7941if test $gdb_cv_printf_has_long_long = yes; then
7942 cat >> confdefs.h <<\EOF
7943#define PRINTF_HAS_LONG_LONG 1
7944EOF
7945
7946fi
7947echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
7948
7949
7950echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
06825bd1 7951echo "configure:7952: checking for long double support in compiler" >&5
97bf5e38
MK
7952if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
7953 echo $ac_n "(cached) $ac_c" 1>&6
7954else
7955 cat > conftest.$ac_ext <<EOF
06825bd1 7956#line 7957 "configure"
97bf5e38
MK
7957#include "confdefs.h"
7958
7959int main() {
7960long double foo;
7961; return 0; }
7962EOF
06825bd1 7963if { (eval echo configure:7964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7964 rm -rf conftest*
7965 ac_cv_c_long_double=yes
7966else
7967 echo "configure: failed program was:" >&5
7968 cat conftest.$ac_ext >&5
7969 rm -rf conftest*
7970 ac_cv_c_long_double=no
7971fi
7972rm -f conftest*
7973fi
c906108c 7974
97bf5e38
MK
7975echo "$ac_t""$ac_cv_c_long_double" 1>&6
7976if test $ac_cv_c_long_double = yes; then
7977 cat >> confdefs.h <<\EOF
7978#define HAVE_LONG_DOUBLE 1
c906108c 7979EOF
97bf5e38
MK
7980
7981fi
7982
7983
7984echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
06825bd1 7985echo "configure:7986: checking for long double support in printf" >&5
97bf5e38
MK
7986if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
7987 echo $ac_n "(cached) $ac_c" 1>&6
7988else
7989 if test "$cross_compiling" = yes; then
7990 gdb_cv_printf_has_long_double=no
7991else
7992 cat > conftest.$ac_ext <<EOF
06825bd1 7993#line 7994 "configure"
97bf5e38
MK
7994#include "confdefs.h"
7995
7996int main () {
7997 char buf[16];
7998 long double f = 3.141592653;
7999 sprintf (buf, "%Lg", f);
8000 return (strncmp ("3.14159", buf, 7));
8001}
8002EOF
06825bd1 8003if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8004then
97bf5e38 8005 gdb_cv_printf_has_long_double=yes
c906108c
SS
8006else
8007 echo "configure: failed program was:" >&5
8008 cat conftest.$ac_ext >&5
8009 rm -fr conftest*
97bf5e38 8010 gdb_cv_printf_has_long_double=no
c906108c
SS
8011fi
8012rm -fr conftest*
8013fi
8014
8015fi
8016
97bf5e38 8017if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8018 cat >> confdefs.h <<\EOF
97bf5e38
MK
8019#define PRINTF_HAS_LONG_DOUBLE 1
8020EOF
8021
8022fi
8023echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8024
8025
8026echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
06825bd1 8027echo "configure:8028: checking for long double support in scanf" >&5
97bf5e38
MK
8028if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8029 echo $ac_n "(cached) $ac_c" 1>&6
8030else
8031 if test "$cross_compiling" = yes; then
8032 gdb_cv_scanf_has_long_double=no
8033else
8034 cat > conftest.$ac_ext <<EOF
06825bd1 8035#line 8036 "configure"
97bf5e38
MK
8036#include "confdefs.h"
8037
8038int main () {
8039 char *buf = "3.141592653";
8040 long double f = 0;
8041 sscanf (buf, "%Lg", &f);
8042 return !(f > 3.14159 && f < 3.14160);
8043}
c906108c 8044EOF
06825bd1 8045if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8046then
8047 gdb_cv_scanf_has_long_double=yes
8048else
8049 echo "configure: failed program was:" >&5
8050 cat conftest.$ac_ext >&5
8051 rm -fr conftest*
8052 gdb_cv_scanf_has_long_double=no
8053fi
8054rm -fr conftest*
8055fi
c906108c
SS
8056
8057fi
8058
97bf5e38
MK
8059if test $gdb_cv_scanf_has_long_double = yes; then
8060 cat >> confdefs.h <<\EOF
8061#define SCANF_HAS_LONG_DOUBLE 1
8062EOF
8063
8064fi
8065echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8066
438013df
AO
8067case ${host_os} in
8068aix*)
8069 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
06825bd1 8070echo "configure:8071: checking for -bbigtoc option" >&5
438013df
AO
8071if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8072 echo $ac_n "(cached) $ac_c" 1>&6
8073else
8074
8075 SAVE_LDFLAGS=$LDFLAGS
8076
8077 case $GCC in
8078 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8079 *) gdb_cv_bigtoc=-bbigtoc ;;
8080 esac
8081
8082 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8083 cat > conftest.$ac_ext <<EOF
06825bd1 8084#line 8085 "configure"
438013df
AO
8085#include "confdefs.h"
8086
8087int main() {
8088int i;
8089; return 0; }
8090EOF
06825bd1 8091if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8092 :
8093else
8094 echo "configure: failed program was:" >&5
8095 cat conftest.$ac_ext >&5
8096 rm -rf conftest*
8097 gdb_cv_bigtoc=
8098fi
8099rm -f conftest*
8100
8101fi
8102
8103echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8104 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8105 ;;
8106esac
8107
c906108c
SS
8108
8109
8110if test ${build} = ${host} -a ${host} = ${target} ; then
8111 case ${host_os} in
8112 hpux*)
8113 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
06825bd1 8114echo "configure:8115: checking for HPUX/OSF thread support" >&5
c906108c
SS
8115 if test -f /usr/include/dce/cma_config.h ; then
8116 if test "$GCC" = "yes" ; then
8117 echo "$ac_t""yes" 1>&6
8118 cat >> confdefs.h <<\EOF
8119#define HAVE_HPUX_THREAD_SUPPORT 1
8120EOF
8121
66b965bb 8122 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8123 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8124 else
8125 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8126 fi
8127 else
8128 echo "$ac_t""no" 1>&6
8129 fi
8130 ;;
8131 solaris*)
d92419e5
JB
8132 # See if thread_db library is around for Solaris thread debugging.
8133 # Note that we must explicitly test for version 1 of the library
8134 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8135 # the same API.
c906108c 8136 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
06825bd1 8137echo "configure:8138: checking for Solaris thread debugging library" >&5
c906108c
SS
8138 if test -f /usr/lib/libthread_db.so.1 ; then
8139 echo "$ac_t""yes" 1>&6
8140 cat >> confdefs.h <<\EOF
8141#define HAVE_THREAD_DB_LIB 1
8142EOF
8143
66b965bb 8144 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8145 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8146 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
06825bd1 8147echo "configure:8148: checking for dlopen in -ldl" >&5
c906108c
SS
8148ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8149if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8150 echo $ac_n "(cached) $ac_c" 1>&6
8151else
8152 ac_save_LIBS="$LIBS"
8153LIBS="-ldl $LIBS"
8154cat > conftest.$ac_ext <<EOF
06825bd1 8155#line 8156 "configure"
c906108c
SS
8156#include "confdefs.h"
8157/* Override any gcc2 internal prototype to avoid an error. */
8158/* We use char because int might match the return type of a gcc2
8159 builtin and then its argument prototype would still apply. */
8160char dlopen();
8161
8162int main() {
8163dlopen()
8164; return 0; }
8165EOF
06825bd1 8166if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8167 rm -rf conftest*
8168 eval "ac_cv_lib_$ac_lib_var=yes"
8169else
8170 echo "configure: failed program was:" >&5
8171 cat conftest.$ac_ext >&5
8172 rm -rf conftest*
8173 eval "ac_cv_lib_$ac_lib_var=no"
8174fi
8175rm -f conftest*
8176LIBS="$ac_save_LIBS"
8177
8178fi
8179if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8180 echo "$ac_t""yes" 1>&6
8181 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8182 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8183 cat >> confdefs.h <<EOF
8184#define $ac_tr_lib 1
8185EOF
8186
8187 LIBS="-ldl $LIBS"
8188
8189else
8190 echo "$ac_t""no" 1>&6
8191fi
8192
8193 if test "$GCC" = "yes" ; then
8194 # The GNU linker requires the -export-dynamic option to make
8195 # all symbols visible in the dynamic symbol table.
8196 hold_ldflags=$LDFLAGS
8197 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
06825bd1 8198echo "configure:8199: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8199 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8200 cat > conftest.$ac_ext <<EOF
06825bd1 8201#line 8202 "configure"
c906108c
SS
8202#include "confdefs.h"
8203
8204int main() {
8205int i;
8206; return 0; }
8207EOF
06825bd1 8208if { (eval echo configure:8209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8209 rm -rf conftest*
8210 found=yes
8211else
8212 echo "configure: failed program was:" >&5
8213 cat conftest.$ac_ext >&5
8214 rm -rf conftest*
8215 found=no
8216fi
8217rm -f conftest*
8218 LDFLAGS=$hold_ldflags
8219 echo "$ac_t""$found" 1>&6
8220 if test $found = yes; then
8221 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8222 fi
8223 fi
8224 # Sun randomly tweaked the prototypes in <proc_service.h>
8225 # at one point.
8226 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
06825bd1 8227echo "configure:8228: checking if <proc_service.h> is old" >&5
c906108c
SS
8228 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8229 echo $ac_n "(cached) $ac_c" 1>&6
8230else
8231
8232 cat > conftest.$ac_ext <<EOF
06825bd1 8233#line 8234 "configure"
c906108c
SS
8234#include "confdefs.h"
8235
8236 #include <proc_service.h>
8237 ps_err_e ps_pdwrite
8238 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8239
8240int main() {
8241
8242; return 0; }
8243EOF
06825bd1 8244if { (eval echo configure:8245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8245 rm -rf conftest*
8246 gdb_cv_proc_service_is_old=no
8247else
8248 echo "configure: failed program was:" >&5
8249 cat conftest.$ac_ext >&5
8250 rm -rf conftest*
8251 gdb_cv_proc_service_is_old=yes
8252fi
8253rm -f conftest*
8254
8255fi
8256
8257 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8258 if test $gdb_cv_proc_service_is_old = yes; then
8259 cat >> confdefs.h <<\EOF
8260#define PROC_SERVICE_IS_OLD 1
8261EOF
8262
8263 fi
8264 else
8265 echo "$ac_t""no" 1>&6
8266 fi
8267 ;;
d92419e5
JB
8268 aix*)
8269 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
06825bd1 8270echo "configure:8271: checking for AiX thread debugging library" >&5
d92419e5
JB
8271 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8272 echo $ac_n "(cached) $ac_c" 1>&6
8273else
8274 cat > conftest.$ac_ext <<EOF
06825bd1 8275#line 8276 "configure"
d92419e5
JB
8276#include "confdefs.h"
8277#include <sys/pthdebug.h>
8278int main() {
8279#ifndef PTHDB_VERSION_3
8280 #error
8281 #endif
8282; return 0; }
8283EOF
06825bd1 8284if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8285 rm -rf conftest*
8286 gdb_cv_have_aix_thread_debug=yes
8287else
8288 echo "configure: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 rm -rf conftest*
8291 gdb_cv_have_aix_thread_debug=no
8292fi
8293rm -f conftest*
8294fi
8295
8296 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8297 if test $gdb_cv_have_aix_thread_debug = yes; then
8298 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8299 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8300 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8301 fi
8302 ;;
c906108c
SS
8303 esac
8304
8305fi
8306
3f47be5c
EZ
8307if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8308 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
06825bd1 8309echo "configure:8310: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8310if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8311 echo $ac_n "(cached) $ac_c" 1>&6
8312else
8313 cat > conftest.$ac_ext <<EOF
06825bd1 8314#line 8315 "configure"
3f47be5c
EZ
8315#include "confdefs.h"
8316#include <thread_db.h>
8317int main() {
8318int i = TD_NOTALLOC;
8319; return 0; }
8320EOF
06825bd1 8321if { (eval echo configure:8322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8322 rm -rf conftest*
8323 gdb_cv_thread_db_h_has_td_notalloc=yes
8324else
8325 echo "configure: failed program was:" >&5
8326 cat conftest.$ac_ext >&5
8327 rm -rf conftest*
8328 gdb_cv_thread_db_h_has_td_notalloc=no
8329
8330fi
8331rm -f conftest*
8332
8333fi
8334
8335echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8336fi
8337if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8338 cat >> confdefs.h <<\EOF
8339#define THREAD_DB_HAS_TD_NOTALLOC 1
8340EOF
8341
8342fi
8343
eb784848
DJ
8344if test $host = $target; then
8345 case $target in
8346 *-linux*)
8347 save_CFLAGS=$CFLAGS
8348 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8349 cat > conftest.$ac_ext <<EOF
06825bd1 8350#line 8351 "configure"
eb784848
DJ
8351#include "confdefs.h"
8352#include <unistd.h>
8353int main() {
8354pread64 (0, NULL, 0, 0);
8355; return 0; }
8356EOF
06825bd1 8357if { (eval echo configure:8358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
eb784848
DJ
8358 rm -rf conftest*
8359 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8360 cat >> confdefs.h <<\EOF
8361#define HAVE_PREAD64 1
8362EOF
8363
8364else
8365 echo "configure: failed program was:" >&5
8366 cat conftest.$ac_ext >&5
8367fi
8368rm -f conftest*
8369 CFLAGS=$save_CFLAGS
8370 ;;
8371 esac
8372fi
8373
fb40c209 8374
d318976c
FN
8375# Check whether --enable-gdbcli or --disable-gdbcli was given.
8376if test "${enable_gdbcli+set}" = set; then
8377 enableval="$enable_gdbcli"
8378
6bad8db2
FN
8379 case "${enableval}" in
8380 yes) enable_gdbcli=yes ;;
8381 "") enable_gdbcli=yes ;;
d318976c
FN
8382 no)
8383 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
8384 ;;
8385 *)
6bad8db2 8386 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
d318976c
FN
8387 ;;
8388 esac
8389
8390else
8391 enable_gdbcli=yes
8392fi
8393
8394case ${enable_gdbcli} in
8395 "yes" )
6bad8db2 8396 if test -d "${srcdir}/cli" ; then
d318976c
FN
8397 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
8398 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
486697a0 8399 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
d318976c
FN
8400 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
8401 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
8402 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
8403 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
8404 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
8405 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
8406 fi
8407 ;;
8408esac
8409
8410
fb40c209
AC
8411# Check whether --enable-gdbmi or --disable-gdbmi was given.
8412if test "${enable_gdbmi+set}" = set; then
8413 enableval="$enable_gdbmi"
8414
8415 case "${enable_gdbmi}" in
8416 yes | no) ;;
8417 "") enable_gdbmi=yes ;;
8418 *)
8419 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
8420 ;;
8421 esac
8422
b0e2e90a
AC
8423else
8424 enable_gdbmi=yes
fb40c209
AC
8425fi
8426
8427case ${enable_gdbmi} in
8428 "yes" )
8429 if test -d "${srcdir}/mi" ; then
8430 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
8431 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
486697a0 8432 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
fb40c209 8433 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 8434 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
b3a90332
AC
8435 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
8436 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
e56ac5c3
AC
8437 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
8438 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
8439 fi
8440 ;;
8441esac
c906108c 8442
b4df4f68
FN
8443# Configure UI_OUT by default (before 5.2 it can be disabled)
8444# It must be configured if gdbmi is configured
8445
8446UIOUT_CFLAGS=
8447
8448
8449# Check whether --with-uiout or --without-uiout was given.
8450if test "${with_uiout+set}" = set; then
8451 withval="$with_uiout"
8452 case "${withval}" in
8453 yes) want_uiout=true ;;
8454 no) if test $enable_gdbmi = yes; then
8455 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
8456 else
8457 want_uiout=false
8458 fi ;;
8459 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
8460esac
8461else
8462 want_uiout=true
8463fi
8464
8465if test $want_uiout = true; then
8466 UIOUT_CFLAGS="-DUI_OUT=1"
8467fi
8468
c906108c
SS
8469# Check whether --enable-netrom or --disable-netrom was given.
8470if test "${enable_netrom+set}" = set; then
8471 enableval="$enable_netrom"
8472 case "${enableval}" in
8473yes) enable_netrom=yes ;;
8474no) enable_netrom=no ;;
8475*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
8476esac
8477fi
8478
8479
8480if test "${enable_netrom}" = "yes"; then
66b965bb 8481 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
8482 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
8483fi
8484
1decb323 8485
3b851bce
AC
8486# NOTE: Don't add -Wall or -Wunused, they both include
8487# -Wunused-parameter which reports bogus warnings.
8488# NOTE: If you add to this list, remember to update
8489# gdb/doc/gdbint.texinfo.
1decb323 8490build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8491-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8492# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8493# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8494# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8495# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8496# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8497# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8498# Check whether --enable-build-warnings or --disable-build-warnings was given.
8499if test "${enable_build_warnings+set}" = set; then
8500 enableval="$enable_build_warnings"
1decb323 8501 case "${enableval}" in
c906108c
SS
8502 yes) ;;
8503 no) build_warnings="-w";;
8504 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8505 build_warnings="${build_warnings} ${t}";;
8506 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8507 build_warnings="${t} ${build_warnings}";;
8508 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8509esac
d4f3574e 8510if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8511 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8512fi
1decb323 8513fi
3b851bce
AC
8514# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8515if test "${enable_gdb_build_warnings+set}" = set; then
8516 enableval="$enable_gdb_build_warnings"
8517 case "${enableval}" in
8518 yes) ;;
8519 no) build_warnings="-w";;
8520 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8521 build_warnings="${build_warnings} ${t}";;
8522 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8523 build_warnings="${t} ${build_warnings}";;
8524 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8525esac
8526if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8527 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8528fi
8529fi
104c1213
JM
8530WARN_CFLAGS=""
8531WERROR_CFLAGS=""
c906108c
SS
8532if test "x${build_warnings}" != x -a "x$GCC" = xyes
8533then
746a987d 8534 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
06825bd1 8535echo "configure:8536: checking compiler warning flags" >&5
746a987d
AC
8536 # Separate out the -Werror flag as some files just cannot be
8537 # compiled with it enabled.
8538 for w in ${build_warnings}; do
8539 case $w in
8540 -Werr*) WERROR_CFLAGS=-Werror ;;
8541 *) # Check that GCC accepts it
4536bbc6
AC
8542 saved_CFLAGS="$CFLAGS"
8543 CFLAGS="$CFLAGS $w"
8544 cat > conftest.$ac_ext <<EOF
06825bd1 8545#line 8546 "configure"
4536bbc6
AC
8546#include "confdefs.h"
8547
8548int main() {
8549
8550; return 0; }
8551EOF
06825bd1 8552if { (eval echo configure:8553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8553 rm -rf conftest*
8554 WARN_CFLAGS="${WARN_CFLAGS} $w"
8555else
8556 echo "configure: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558fi
8559rm -f conftest*
8560 CFLAGS="$saved_CFLAGS"
746a987d
AC
8561 esac
8562 done
8563 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8564fi
8565
8566
104c1213 8567
c906108c
SS
8568MMALLOC_CFLAGS=
8569MMALLOC=
8570
8571
8572
8573# Check whether --with-mmalloc or --without-mmalloc was given.
8574if test "${with_mmalloc+set}" = set; then
8575 withval="$with_mmalloc"
8576 case "${withval}" in
8577 yes) want_mmalloc=true ;;
8578 no) want_mmalloc=false;;
8579 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8580esac
8581else
8582 want_mmalloc=false
8583fi
8584
8585if test x$want_mmalloc = xtrue; then
8586 cat >> confdefs.h <<\EOF
8587#define USE_MMALLOC 1
8588EOF
8589
8590 cat >> confdefs.h <<\EOF
8591#define MMCHECK_FORCE 1
8592EOF
8593
8594 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8595 MMALLOC='../mmalloc/libmmalloc.a'
8596fi
8597
7a292a7a
SS
8598# In the Cygwin environment, we need some additional flags.
8599echo $ac_n "checking for cygwin""... $ac_c" 1>&6
06825bd1 8600echo "configure:8601: checking for cygwin" >&5
7a292a7a
SS
8601if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8602 echo $ac_n "(cached) $ac_c" 1>&6
8603else
8604 cat > conftest.$ac_ext <<EOF
06825bd1 8605#line 8606 "configure"
7a292a7a
SS
8606#include "confdefs.h"
8607
8608#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8609lose
8610#endif
8611EOF
8612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8613 egrep "lose" >/dev/null 2>&1; then
8614 rm -rf conftest*
8615 gdb_cv_os_cygwin=yes
8616else
8617 rm -rf conftest*
8618 gdb_cv_os_cygwin=no
8619fi
8620rm -f conftest*
8621
8622fi
8623
8624echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8625
aff38e61
AC
8626
8627SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8628case ${host} in
95cbc983
AC
8629 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8630 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8631esac
8632
8633
cd0fc7c3
SS
8634# libreadline needs libuser32.a in a cygwin environment
8635WIN32LIBS=
8636if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8637 WIN32LIBS="-luser32"
8638 case "${target}" in
8639 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8640 ;;
8641 esac
cd0fc7c3 8642fi
c906108c 8643
7a292a7a 8644
3fc11d3e
JM
8645LIBGUI="../libgui/src/libgui.a"
8646GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8647
8648
7a292a7a 8649
8b93c638
JM
8650# Check whether --with-cpu or --without-cpu was given.
8651if test "${with_cpu+set}" = set; then
8652 withval="$with_cpu"
8653 case "${target}" in
8654 powerpc-* | powerpcle-* )
8655 ## It would be nice to keep this table in sync with the one in
8656 ## gcc/configure.
8657 case "${with_cpu}" in
8658 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
8659 | 604 | 750 )
8660 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
8661 ;;
8662 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
8663 ## These are all RS6000 variants, as far as GDB is concerned.
8664 with_cpu=rs6000
8665 ;;
8666 603e | ec603e )
8667 with_cpu=603
8668 ;;
8669 604e )
8670 with_cpu=604
8671 ;;
8672 * )
8673 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
8674 with_cpu=ppc-uisa
8675 ;;
8676 esac
8677 ;;
8678 * )
8679 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
8680 ;;
8681esac
8682cat >> confdefs.h <<EOF
8683#define TARGET_CPU_DEFAULT "${with_cpu}"
8684EOF
8685
8686
8687fi
8688
8689
8690
3fc11d3e
JM
8691# Check whether --enable-gdbtk or --disable-gdbtk was given.
8692if test "${enable_gdbtk+set}" = set; then
8693 enableval="$enable_gdbtk"
8694 case "${enableval}" in
8695 yes)
8696 case "$host" in
8697 *go32*)
8698 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8699 enable_gdbtk=no ;;
8700 *windows*)
8701 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8702 enable_gdbtk=no ;;
8703 *)
8704 enable_gdbtk=yes ;;
8705 esac ;;
8706 no)
8707 enable_gdbtk=no ;;
8708 *)
8709 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8710esac
8711else
8712
8713# Default is on for everything but go32 and Cygwin
8714case "$host" in
8715 *go32* | *windows*)
8716 ;;
8717 *)
379d6434
AC
8718 if test -d "${srcdir}/gdbtk" ; then
8719 enable_gdbtk=yes
8720 fi
8721 ;;
8722esac
3fc11d3e
JM
8723
8724fi
8725
8726
8727WIN32LDAPP=
8728
8729
8730
8731configdir="unix"
8732
8733GDBTKLIBS=
8734if test "${enable_gdbtk}" = "yes"; then
8735
d1c3b63a
KS
8736 # Gdbtk must have an absolute path to srcdir in order to run
8737 # properly when not installed.
8738 here=`pwd`
8739 cd ${srcdir}
8740 GDBTK_SRC_DIR=`pwd`
8741 cd $here
8742
3fc11d3e
JM
8743
8744#
8745# Ok, lets find the tcl configuration
8746# First, look for one uninstalled.
8747# the alternative search directory is invoked by --with-tclconfig
8748#
8749
8750if test x"${no_tcl}" = x ; then
8751 # we reset no_tcl in case something fails here
8752 no_tcl=true
8753 # Check whether --with-tclconfig or --without-tclconfig was given.
8754if test "${with_tclconfig+set}" = set; then
8755 withval="$with_tclconfig"
8756 with_tclconfig=${withval}
8757fi
8758
8759 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
06825bd1 8760echo "configure:8761: checking for Tcl configuration" >&5
3fc11d3e
JM
8761 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8762 echo $ac_n "(cached) $ac_c" 1>&6
8763else
8764
8765
8766 # First check to see if --with-tclconfig was specified.
8767 if test x"${with_tclconfig}" != x ; then
8768 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8769 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8770 else
8771 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8772 fi
8773 fi
8774
8775 # then check for a private Tcl installation
8776 if test x"${ac_cv_c_tclconfig}" = x ; then
8777 for i in \
8778 ../tcl \
8779 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8780 ../../tcl \
8781 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8782 ../../../tcl \
8783 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8784 if test -f "$i/${configdir}/tclConfig.sh" ; then
8785 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8786 break
8787 fi
8788 done
8789 fi
8790 # check in a few common install locations
8791 if test x"${ac_cv_c_tclconfig}" = x ; then
8792 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8793 if test -f "$i/tclConfig.sh" ; then
8794 ac_cv_c_tclconfig=`(cd $i; pwd)`
8795 break
8796 fi
8797 done
8798 fi
8799 # check in a few other private locations
8800 if test x"${ac_cv_c_tclconfig}" = x ; then
8801 for i in \
8802 ${srcdir}/../tcl \
8803 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8804 if test -f "$i/${configdir}/tclConfig.sh" ; then
8805 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8806 break
8807 fi
8808 done
8809 fi
8810
8811fi
8812
8813 if test x"${ac_cv_c_tclconfig}" = x ; then
8814 TCLCONFIG="# no Tcl configs found"
8815 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8816 else
8817 no_tcl=
8818 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8819 echo "$ac_t""found $TCLCONFIG" 1>&6
8820 fi
8821fi
8822
8823 if test -z "${no_tcl}"; then
8824
8825 . $TCLCONFIG
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852#
8853# Ok, lets find the tk configuration
8854# First, look for one uninstalled.
8855# the alternative search directory is invoked by --with-tkconfig
8856#
8857
8858if test x"${no_tk}" = x ; then
8859 # we reset no_tk in case something fails here
8860 no_tk=true
8861 # Check whether --with-tkconfig or --without-tkconfig was given.
8862if test "${with_tkconfig+set}" = set; then
8863 withval="$with_tkconfig"
8864 with_tkconfig=${withval}
8865fi
8866
8867 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
06825bd1 8868echo "configure:8869: checking for Tk configuration" >&5
3fc11d3e
JM
8869 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8870 echo $ac_n "(cached) $ac_c" 1>&6
8871else
8872
8873
8874 # First check to see if --with-tkconfig was specified.
8875 if test x"${with_tkconfig}" != x ; then
8876 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8877 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8878 else
8879 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8880 fi
8881 fi
8882
8883 # then check for a private Tk library
8884 if test x"${ac_cv_c_tkconfig}" = x ; then
8885 for i in \
8886 ../tk \
8887 `ls -dr ../tk[4-9]* 2>/dev/null` \
8888 ../../tk \
8889 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8890 ../../../tk \
8891 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8892 if test -f "$i/${configdir}/tkConfig.sh" ; then
8893 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8894 break
8895 fi
8896 done
8897 fi
8898 # check in a few common install locations
8899 if test x"${ac_cv_c_tkconfig}" = x ; then
8900 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8901 if test -f "$i/tkConfig.sh" ; then
8902 ac_cv_c_tkconfig=`(cd $i; pwd)`
8903 break
8904 fi
8905 done
8906 fi
8907 # check in a few other private locations
8908 if test x"${ac_cv_c_tkconfig}" = x ; then
8909 for i in \
8910 ${srcdir}/../tk \
8911 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8912 if test -f "$i/${configdir}/tkConfig.sh" ; then
8913 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8914 break
8915 fi
8916 done
8917 fi
8918
8919fi
8920
8921 if test x"${ac_cv_c_tkconfig}" = x ; then
8922 TKCONFIG="# no Tk configs found"
8923 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8924 else
8925 no_tk=
8926 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8927 echo "$ac_t""found $TKCONFIG" 1>&6
8928 fi
8929fi
8930
8931
8932
dd2504ab
JM
8933 # now look for Tcl library stuff
8934
8935 case "${host}" in
8936 *-*-cygwin*)
8937 tcldir=../tcl/win/
8938 ;;
8939 *)
8940 tcldir=../tcl/unix/
8941 ;;
8942 esac
8943
8944 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8945
3fc11d3e
JM
8946 # If $no_tk is nonempty, then we can't do Tk, and there is no
8947 # point to doing Tcl.
8948 if test -z "${no_tk}"; then
8949
8950 if test -f "$TKCONFIG" ; then
8951 . $TKCONFIG
8952 fi
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967#
8968# Ok, lets find the tcl source trees so we can use the headers
8969# Warning: transition of version 9 to 10 will break this algorithm
8970# because 10 sorts before 9. We also look for just tcl. We have to
8971# be careful that we don't match stuff like tclX by accident.
8972# the alternative search directory is involked by --with-tclinclude
8973#
8974
8975no_tcl=true
8976echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
06825bd1 8977echo "configure:8978: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8978# Check whether --with-tclinclude or --without-tclinclude was given.
8979if test "${with_tclinclude+set}" = set; then
8980 withval="$with_tclinclude"
8981 with_tclinclude=${withval}
8982fi
8983
8984if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8985 echo $ac_n "(cached) $ac_c" 1>&6
8986else
8987
8988# first check to see if --with-tclinclude was specified
8989if test x"${with_tclinclude}" != x ; then
8990 if test -f ${with_tclinclude}/tclInt.h ; then
8991 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8992 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8993 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8994 else
8995 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8996 fi
8997fi
8998
8999# next check if it came with Tcl configuration file
9000if test x"${ac_cv_c_tclconfig}" = x ; then
9001 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9002 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9003 fi
9004fi
9005
9006# next check in private source directory
9007#
9008# since ls returns lowest version numbers first, reverse its output
9009if test x"${ac_cv_c_tclh}" = x ; then
9010 for i in \
9011 ${srcdir}/../tcl \
9012 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9013 ${srcdir}/../../tcl \
9014 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9015 ${srcdir}/../../../tcl \
9016 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9017 if test -f $i/generic/tclInt.h ; then
9018 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9019 break
9020 fi
9021 done
9022fi
9023# finally check in a few common install locations
9024#
9025# since ls returns lowest version numbers first, reverse its output
9026if test x"${ac_cv_c_tclh}" = x ; then
9027 for i in \
9028 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9029 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9030 /usr/local/src/tcl \
9031 /usr/local/lib/tcl \
9032 ${prefix}/include ; do
9033 if test -f $i/generic/tclInt.h ; then
9034 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9035 break
9036 fi
9037 done
9038fi
9039# see if one is installed
9040if test x"${ac_cv_c_tclh}" = x ; then
9041 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9042echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
06825bd1 9043echo "configure:9044: checking for tclInt.h" >&5
3fc11d3e
JM
9044if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9045 echo $ac_n "(cached) $ac_c" 1>&6
9046else
9047 cat > conftest.$ac_ext <<EOF
06825bd1 9048#line 9049 "configure"
3fc11d3e
JM
9049#include "confdefs.h"
9050#include <tclInt.h>
9051EOF
9052ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 9053{ (eval echo configure:9054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9054ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9055if test -z "$ac_err"; then
9056 rm -rf conftest*
9057 eval "ac_cv_header_$ac_safe=yes"
9058else
9059 echo "$ac_err" >&5
9060 echo "configure: failed program was:" >&5
9061 cat conftest.$ac_ext >&5
9062 rm -rf conftest*
9063 eval "ac_cv_header_$ac_safe=no"
9064fi
9065rm -f conftest*
9066fi
9067if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9068 echo "$ac_t""yes" 1>&6
9069 ac_cv_c_tclh=installed
9070else
9071 echo "$ac_t""no" 1>&6
9072ac_cv_c_tclh=""
9073fi
9074
9075fi
9076
9077fi
9078
9079if test x"${ac_cv_c_tclh}" = x ; then
9080 TCLHDIR="# no Tcl private headers found"
9081 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9082fi
9083if test x"${ac_cv_c_tclh}" != x ; then
9084 no_tcl=""
9085 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9086 echo "$ac_t""is installed" 1>&6
9087 TCLHDIR=""
9088 else
9089 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9090 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9091 TCLHDIR="-I${ac_cv_c_tclh}"
9092 fi
9093fi
9094
9095
9096
9097
9098#
9099# Ok, lets find the tk source trees so we can use the headers
9100# If the directory (presumably symlink) named "tk" exists, use that one
9101# in preference to any others. Same logic is used when choosing library
9102# and again with Tcl. The search order is the best place to look first, then in
9103# decreasing significance. The loop breaks if the trigger file is found.
9104# Note the gross little conversion here of srcdir by cd'ing to the found
9105# directory. This converts the path from a relative to an absolute, so
9106# recursive cache variables for the path will work right. We check all
9107# the possible paths in one loop rather than many seperate loops to speed
9108# things up.
9109# the alternative search directory is involked by --with-tkinclude
9110#
9111no_tk=true
9112echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
06825bd1 9113echo "configure:9114: checking for Tk private headers" >&5
3fc11d3e
JM
9114# Check whether --with-tkinclude or --without-tkinclude was given.
9115if test "${with_tkinclude+set}" = set; then
9116 withval="$with_tkinclude"
9117 with_tkinclude=${withval}
9118fi
9119
9120if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9121 echo $ac_n "(cached) $ac_c" 1>&6
9122else
9123
9124# first check to see if --with-tkinclude was specified
9125if test x"${with_tkinclude}" != x ; then
9126 if test -f ${with_tkinclude}/tk.h ; then
9127 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9128 elif test -f ${with_tkinclude}/generic/tk.h ; then
9129 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9130 else
9131 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9132 fi
9133fi
9134
9135# next check if it came with Tk configuration file
9136if test x"${ac_cv_c_tkconfig}" = x ; then
9137 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9138 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9139 fi
9140fi
9141
9142# next check in private source directory
9143#
9144# since ls returns lowest version numbers first, reverse its output
9145if test x"${ac_cv_c_tkh}" = x ; then
9146 for i in \
9147 ${srcdir}/../tk \
9148 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9149 ${srcdir}/../../tk \
9150 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9151 ${srcdir}/../../../tk \
9152 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9153 if test -f $i/generic/tk.h ; then
9154 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9155 break
9156 fi
9157 done
9158fi
9159# finally check in a few common install locations
9160#
9161# since ls returns lowest version numbers first, reverse its output
9162if test x"${ac_cv_c_tkh}" = x ; then
9163 for i in \
9164 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9165 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9166 /usr/local/src/tk \
9167 /usr/local/lib/tk \
9168 ${prefix}/include ; do
9169 if test -f $i/generic/tk.h ; then
9170 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9171 break
9172 fi
9173 done
9174fi
9175# see if one is installed
9176if test x"${ac_cv_c_tkh}" = x ; then
9177 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9178echo $ac_n "checking for tk.h""... $ac_c" 1>&6
06825bd1 9179echo "configure:9180: checking for tk.h" >&5
3fc11d3e
JM
9180if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9181 echo $ac_n "(cached) $ac_c" 1>&6
9182else
9183 cat > conftest.$ac_ext <<EOF
06825bd1 9184#line 9185 "configure"
3fc11d3e
JM
9185#include "confdefs.h"
9186#include <tk.h>
9187EOF
9188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 9189{ (eval echo configure:9190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9191if test -z "$ac_err"; then
9192 rm -rf conftest*
9193 eval "ac_cv_header_$ac_safe=yes"
9194else
9195 echo "$ac_err" >&5
9196 echo "configure: failed program was:" >&5
9197 cat conftest.$ac_ext >&5
9198 rm -rf conftest*
9199 eval "ac_cv_header_$ac_safe=no"
9200fi
9201rm -f conftest*
9202fi
9203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9204 echo "$ac_t""yes" 1>&6
9205 ac_cv_c_tkh=installed
9206else
9207 echo "$ac_t""no" 1>&6
9208ac_cv_c_tkh=""
9209fi
9210
9211fi
9212
9213fi
9214
9215if test x"${ac_cv_c_tkh}" != x ; then
9216 no_tk=""
9217 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9218 echo "$ac_t""is installed" 1>&6
9219 TKHDIR=""
9220 else
9221 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9222 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9223 TKHDIR="-I${ac_cv_c_tkh}"
9224 fi
9225else
9226 TKHDIR="# no Tk directory found"
9227 echo "configure: warning: Can't find Tk private headers" 1>&2
9228 no_tk=true
9229fi
9230
9231
9232
9233
9234echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
06825bd1 9235echo "configure:9236: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9236if test x"${ac_cv_c_itclh}" = x ; then
9237 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9238 if test -f $i/generic/itcl.h ; then
9239 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9240 break
9241 fi
9242 done
9243fi
9244if test x"${ac_cv_c_itclh}" = x ; then
9245 ITCLHDIR="# no Itcl private headers found"
9246 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9247fi
9248if test x"${ac_cv_c_itclh}" != x ; then
9249 ITCLHDIR="-I${ac_cv_c_itclh}"
9250fi
9251# should always be here
9252# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9253
9254#AC_SUBST(ITCLLIB)
9255
9256
9257echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
06825bd1 9258echo "configure:9259: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9259if test x"${ac_cv_c_itkh}" = x ; then
9260 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9261 if test -f $i/generic/itk.h ; then
9262 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9263 break
9264 fi
9265 done
9266fi
9267if test x"${ac_cv_c_itkh}" = x ; then
9268 ITKHDIR="# no Itk private headers found"
9269 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9270fi
9271if test x"${ac_cv_c_itkh}" != x ; then
9272 ITKHDIR="-I${ac_cv_c_itkh}"
9273fi
9274# should always be here
9275# ITKLIB="../itcl/itk/unix/libitk.a"
9276
9277#AC_SUBST(ITKLIB)
9278
3fc11d3e 9279
dd2504ab
JM
9280
9281 # now look for Tk library stuff
9282
9283 case "${host}" in
9284 *-*-cygwin*)
9285 tkdir=../tk/win/
9286 ;;
9287 *)
9288 tkdir=../tk/unix/
9289 ;;
9290 esac
9291
9292 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9293
3fc11d3e
JM
9294 # now look for Itcl library stuff
9295
9296
9297#
9298# Ok, lets find the itcl configuration
9299# First, look for one uninstalled.
9300# the alternative search directory is invoked by --with-itclconfig
9301#
9302
9303if test x"${no_itcl}" = x ; then
9304 # we reset no_itcl in case something fails here
9305 no_itcl=true
9306 # Check whether --with-itclconfig or --without-itclconfig was given.
9307if test "${with_itclconfig+set}" = set; then
9308 withval="$with_itclconfig"
9309 with_itclconfig=${withval}
9310fi
9311
9312 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
06825bd1 9313echo "configure:9314: checking for Itcl configuration" >&5
3fc11d3e
JM
9314 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9315 echo $ac_n "(cached) $ac_c" 1>&6
9316else
9317
9318
9319 # First check to see if --with-itclconfig was specified.
9320 if test x"${with_itclconfig}" != x ; then
9321 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9322 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9323 else
9324 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9325 fi
9326 fi
9327
9328 # then check for a private Itcl library
9329 if test x"${ac_cv_c_itclconfig}" = x ; then
9330 for i in \
9331 ../itcl/itcl \
9332 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9333 ../../itcl \
9334 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9335 ../../../itcl \
9336 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9337 if test -f "$i/itclConfig.sh" ; then
9338 ac_cv_c_itclconfig=`(cd $i; pwd)`
9339 break
9340 fi
9341 done
9342 fi
9343 # check in a few common install locations
9344 if test x"${ac_cv_c_itclconfig}" = x ; then
9345 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9346 if test -f "$i/itclConfig.sh" ; then
9347 ac_cv_c_itclconfig=`(cd $i; pwd)`
9348 break
9349 fi
9350 done
9351 fi
9352 # check in a few other private locations
9353 if test x"${ac_cv_c_itclconfig}" = x ; then
9354 for i in \
9355 ${srcdir}/../itcl/itcl \
9356 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9357 if test -f "$i/itclConfig.sh" ; then
9358 ac_cv_c_itclconfig=`(cd $i; pwd)`
9359 break
9360 fi
9361 done
9362 fi
9363
9364fi
9365
9366 if test x"${ac_cv_c_itclconfig}" = x ; then
9367 ITCLCONFIG="# no Itcl configs found"
9368 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9369 else
9370 no_itcl=
9371 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9372 echo "$ac_t""found $ITCLCONFIG" 1>&6
9373 fi
9374fi
9375
9376 if test -z "${no_itcl}"; then
9377
9378 if test -f "$ITCLCONFIG" ; then
9379 . $ITCLCONFIG
9380 fi
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
3fc11d3e
JM
9391
9392
9393 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9394 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9395 fi
9396
9397
9398 # now look for Itk library stuff
9399
9400#
9401# Ok, lets find the itk configuration
9402# First, look for one uninstalled.
9403# the alternative search directory is invoked by --with-itkconfig
9404#
9405
9406if test x"${no_itk}" = x ; then
9407 # we reset no_itk in case something fails here
9408 no_itk=true
9409 # Check whether --with-itkconfig or --without-itkconfig was given.
9410if test "${with_itkconfig+set}" = set; then
9411 withval="$with_itkconfig"
9412 with_itkconfig=${withval}
9413fi
9414
9415 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
06825bd1 9416echo "configure:9417: checking for Itk configuration" >&5
3fc11d3e
JM
9417 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9418 echo $ac_n "(cached) $ac_c" 1>&6
9419else
9420
9421
9422 # First check to see if --with-itkconfig was specified.
9423 if test x"${with_itkconfig}" != x ; then
9424 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9425 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9426 else
9427 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9428 fi
9429 fi
9430
9431 # then check for a private Itk library
9432 if test x"${ac_cv_c_itkconfig}" = x ; then
9433 for i in \
9434 ../itcl/itk \
9435 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9436 ../../itk \
9437 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9438 ../../../itk \
9439 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9440 if test -f "$i/itkConfig.sh" ; then
9441 ac_cv_c_itkconfig=`(cd $i; pwd)`
9442 break
9443 fi
9444 done
9445 fi
9446 # check in a few common install locations
9447 if test x"${ac_cv_c_itkconfig}" = x ; then
9448 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9449 if test -f "$i/itkConfig.sh" ; then
9450 ac_cv_c_itkconfig=`(cd $i; pwd)`
9451 break
9452 fi
9453 done
9454 fi
9455 # check in a few other private locations
9456 if test x"${ac_cv_c_itkconfig}" = x ; then
9457 for i in \
9458 ${srcdir}/../itcl/itk \
9459 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9460 if test -f "$i/itkConfig.sh" ; then
9461 ac_cv_c_itkconfig=`(cd $i; pwd)`
9462 break
9463 fi
9464 done
9465 fi
9466
9467fi
9468
9469 if test x"${ac_cv_c_itkconfig}" = x ; then
9470 ITKCONFIG="# no Itk configs found"
9471 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9472 else
9473 no_itk=
9474 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9475 echo "$ac_t""found $ITKCONFIG" 1>&6
9476 fi
9477fi
9478
9479
9480 if test -z "${no_itcl}"; then
9481
9482 if test -f "$ITKCONFIG" ; then
9483 . $ITKCONFIG
9484 fi
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
3fc11d3e 9497 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9498 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9499 fi
9500
4226a5a5 9501 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9502 # Tcl/Tk 8.1 require -fwritable strings. I don't
9503 # know whether 8.2 will or not, but I bet it will.
9504 # I don't have to worry about 7.x since we don't support it.
9505 GDBTK_CFLAGS=""
9506 if test "$GCC" = "yes"; then
9507 if test "$TCL_VERSION" != "8.0" ; then
9508 GDBTK_CFLAGS="-fwritable-strings"
9509 fi
9510 fi
9511
9512 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9513 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9514 # Yes, the ordering seems wrong here. But it isn't.
9515 # TK_LIBS is the list of libraries that need to be linked
9516 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9517 # were in LIBS then any link tests after this point would
9518 # try to include things like `$(LIBGUI)', which wouldn't work.
9519 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9520
9521 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9522 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9523 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9524 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9525 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9526 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9527 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9528 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9529
9530 if test x$gdb_cv_os_cygwin = xyes; then
9531 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9532 WIN32LDAPP="-Wl,--subsystem,console"
9533 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9534 fi
9535 fi
9536 fi
ffc6a242
KS
9537
9538 SUBDIRS="${SUBDIRS} gdbtk"
9539 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9540fi
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
dd2504ab 9554
c906108c
SS
9555# If we find X, set shell vars x_includes and x_libraries to the
9556# paths, otherwise set no_x=yes.
9557# Uses ac_ vars as temps to allow command line to override cache and checks.
9558# --without-x overrides everything else, but does not touch the cache.
9559echo $ac_n "checking for X""... $ac_c" 1>&6
06825bd1 9560echo "configure:9561: checking for X" >&5
c906108c
SS
9561
9562# Check whether --with-x or --without-x was given.
9563if test "${with_x+set}" = set; then
9564 withval="$with_x"
9565 :
9566fi
9567
9568# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9569if test "x$with_x" = xno; then
9570 # The user explicitly disabled X.
9571 have_x=disabled
9572else
9573 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9574 # Both variables are already set.
9575 have_x=yes
9576 else
9577if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9578 echo $ac_n "(cached) $ac_c" 1>&6
9579else
9580 # One or both of the vars are not set, and there is no cached value.
9581ac_x_includes=NO ac_x_libraries=NO
9582rm -fr conftestdir
9583if mkdir conftestdir; then
9584 cd conftestdir
9585 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9586 cat > Imakefile <<'EOF'
9587acfindx:
9588 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9589EOF
9590 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9591 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9592 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9593 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9594 for ac_extension in a so sl; do
9595 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9596 test -f $ac_im_libdir/libX11.$ac_extension; then
9597 ac_im_usrlibdir=$ac_im_libdir; break
9598 fi
9599 done
9600 # Screen out bogus values from the imake configuration. They are
9601 # bogus both because they are the default anyway, and because
9602 # using them would break gcc on systems where it needs fixed includes.
9603 case "$ac_im_incroot" in
9604 /usr/include) ;;
9605 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9606 esac
9607 case "$ac_im_usrlibdir" in
9608 /usr/lib | /lib) ;;
9609 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9610 esac
9611 fi
9612 cd ..
9613 rm -fr conftestdir
9614fi
9615
9616if test "$ac_x_includes" = NO; then
9617 # Guess where to find include files, by looking for this one X11 .h file.
9618 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9619
9620 # First, try using that file with no special directory specified.
9621cat > conftest.$ac_ext <<EOF
06825bd1 9622#line 9623 "configure"
c906108c
SS
9623#include "confdefs.h"
9624#include <$x_direct_test_include>
9625EOF
9626ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06825bd1 9627{ (eval echo configure:9628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9628ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9629if test -z "$ac_err"; then
9630 rm -rf conftest*
9631 # We can compile using X headers with no special include directory.
9632ac_x_includes=
9633else
9634 echo "$ac_err" >&5
9635 echo "configure: failed program was:" >&5
9636 cat conftest.$ac_ext >&5
9637 rm -rf conftest*
9638 # Look for the header file in a standard set of common directories.
9639# Check X11 before X11Rn because it is often a symlink to the current release.
9640 for ac_dir in \
9641 /usr/X11/include \
9642 /usr/X11R6/include \
9643 /usr/X11R5/include \
9644 /usr/X11R4/include \
9645 \
9646 /usr/include/X11 \
9647 /usr/include/X11R6 \
9648 /usr/include/X11R5 \
9649 /usr/include/X11R4 \
9650 \
9651 /usr/local/X11/include \
9652 /usr/local/X11R6/include \
9653 /usr/local/X11R5/include \
9654 /usr/local/X11R4/include \
9655 \
9656 /usr/local/include/X11 \
9657 /usr/local/include/X11R6 \
9658 /usr/local/include/X11R5 \
9659 /usr/local/include/X11R4 \
9660 \
9661 /usr/X386/include \
9662 /usr/x386/include \
9663 /usr/XFree86/include/X11 \
9664 \
9665 /usr/include \
9666 /usr/local/include \
9667 /usr/unsupported/include \
9668 /usr/athena/include \
9669 /usr/local/x11r5/include \
9670 /usr/lpp/Xamples/include \
9671 \
9672 /usr/openwin/include \
9673 /usr/openwin/share/include \
9674 ; \
9675 do
9676 if test -r "$ac_dir/$x_direct_test_include"; then
9677 ac_x_includes=$ac_dir
9678 break
9679 fi
9680 done
9681fi
9682rm -f conftest*
9683fi # $ac_x_includes = NO
9684
9685if test "$ac_x_libraries" = NO; then
9686 # Check for the libraries.
9687
9688 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9689 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9690
9691 # See if we find them without any special options.
9692 # Don't add to $LIBS permanently.
9693 ac_save_LIBS="$LIBS"
9694 LIBS="-l$x_direct_test_library $LIBS"
9695cat > conftest.$ac_ext <<EOF
06825bd1 9696#line 9697 "configure"
c906108c
SS
9697#include "confdefs.h"
9698
9699int main() {
9700${x_direct_test_function}()
9701; return 0; }
9702EOF
06825bd1 9703if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9704 rm -rf conftest*
9705 LIBS="$ac_save_LIBS"
9706# We can link X programs with no special library path.
9707ac_x_libraries=
9708else
9709 echo "configure: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 rm -rf conftest*
9712 LIBS="$ac_save_LIBS"
9713# First see if replacing the include by lib works.
9714# Check X11 before X11Rn because it is often a symlink to the current release.
9715for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9716 /usr/X11/lib \
9717 /usr/X11R6/lib \
9718 /usr/X11R5/lib \
9719 /usr/X11R4/lib \
9720 \
9721 /usr/lib/X11 \
9722 /usr/lib/X11R6 \
9723 /usr/lib/X11R5 \
9724 /usr/lib/X11R4 \
9725 \
9726 /usr/local/X11/lib \
9727 /usr/local/X11R6/lib \
9728 /usr/local/X11R5/lib \
9729 /usr/local/X11R4/lib \
9730 \
9731 /usr/local/lib/X11 \
9732 /usr/local/lib/X11R6 \
9733 /usr/local/lib/X11R5 \
9734 /usr/local/lib/X11R4 \
9735 \
9736 /usr/X386/lib \
9737 /usr/x386/lib \
9738 /usr/XFree86/lib/X11 \
9739 \
9740 /usr/lib \
9741 /usr/local/lib \
9742 /usr/unsupported/lib \
9743 /usr/athena/lib \
9744 /usr/local/x11r5/lib \
9745 /usr/lpp/Xamples/lib \
9746 /lib/usr/lib/X11 \
9747 \
9748 /usr/openwin/lib \
9749 /usr/openwin/share/lib \
9750 ; \
9751do
9752 for ac_extension in a so sl; do
9753 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9754 ac_x_libraries=$ac_dir
9755 break 2
9756 fi
9757 done
9758done
9759fi
9760rm -f conftest*
9761fi # $ac_x_libraries = NO
9762
9763if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9764 # Didn't find X anywhere. Cache the known absence of X.
9765 ac_cv_have_x="have_x=no"
9766else
9767 # Record where we found X for the cache.
9768 ac_cv_have_x="have_x=yes \
9769 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9770fi
9771fi
9772 fi
9773 eval "$ac_cv_have_x"
9774fi # $with_x != no
9775
9776if test "$have_x" != yes; then
9777 echo "$ac_t""$have_x" 1>&6
9778 no_x=yes
9779else
9780 # If each of the values was on the command line, it overrides each guess.
9781 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9782 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9783 # Update the cache value to reflect the command line values.
9784 ac_cv_have_x="have_x=yes \
9785 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9786 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9787fi
9788
9789
7a292a7a
SS
9790
9791# Unlike the sim directory, whether a simulator is linked is controlled by
9792# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9793# This code just checks for a few cases where we'd like to ignore those
9794# definitions, even when they're present in the '.mt' file. These cases
9795# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9796# not part of the source tree.
7a292a7a
SS
9797#
9798# Check whether --enable-sim or --disable-sim was given.
9799if test "${enable_sim+set}" = set; then
9800 enableval="$enable_sim"
9801 echo "enable_sim = $enable_sim";
9802 echo "enableval = ${enableval}";
9803 case "${enableval}" in
9804 yes) ignore_sim=false ;;
9805 no) ignore_sim=true ;;
9806 *) ignore_sim=false ;;
9807 esac
9808else
9809 ignore_sim=false
9810fi
9811
9812
9813if test ! -d "${srcdir}/../sim"; then
9814 ignore_sim=true
9815fi
9816
9817if test "${ignore_sim}" = "true"; then
9818 IGNORE_SIM="SIM="
9819 IGNORE_SIM_OBS="SIM_OBS="
9820else
9821 IGNORE_SIM=""
9822 IGNORE_SIM_OBS=""
9823 cat >> confdefs.h <<\EOF
9824#define WITH_SIM 1
9825EOF
9826
9827fi
9828
9829
9830
c906108c
SS
9831
9832
9833
9834
9835
9836
dfcd3bfb 9837
e56ac5c3
AC
9838
9839
b3a90332
AC
9840
9841
b46cd165 9842
c906108c
SS
9843# Begin stuff to support --enable-shared
9844# Check whether --enable-shared or --disable-shared was given.
9845if test "${enable_shared+set}" = set; then
9846 enableval="$enable_shared"
9847 case "${enableval}" in
9848 yes) shared=true ;;
9849 no) shared=false ;;
9850 *) shared=true ;;
9851esac
9852fi
9853
9854HLDFLAGS=
9855HLDENV=
9856# If we have shared libraries, try to set rpath reasonably.
9857if test "${shared}" = "true"; then
9858 case "${host}" in
9859 *-*-hpux*)
9860 HLDFLAGS='-Wl,+s,+b,$(libdir)'
9861 ;;
9862 *-*-irix5* | *-*-irix6*)
9863 HLDFLAGS='-Wl,-rpath,$(libdir)'
9864 ;;
9865 *-*-linux*aout*)
9866 ;;
88987551 9867 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
9868 HLDFLAGS='-Wl,-rpath,$(libdir)'
9869 ;;
9870 *-*-solaris*)
9871 HLDFLAGS='-R $(libdir)'
9872 ;;
9873 *-*-sysv4*)
9874 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
9875 ;;
9876 esac
9877fi
9878
9879# On SunOS, if the linker supports the -rpath option, use it to
9880# prevent ../bfd and ../opcodes from being included in the run time
9881# search path.
9882case "${host}" in
9883 *-*-sunos*)
9884 echo 'main () { }' > conftest.c
9885 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9886 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9887 :
9888 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9889 :
9890 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9891 :
9892 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9893 :
9894 elif test "${shared}" = "true"; then
9895 HLDFLAGS='-Wl,-rpath=$(libdir)'
9896 else
9897 HLDFLAGS='-Wl,-rpath='
9898 fi
9899 rm -f conftest.t conftest.c conftest
9900 ;;
9901esac
9902
9903
9904# End stuff to support --enable-shared
9905
9906# target_subdir is used by the testsuite to find the target libraries.
9907target_subdir=
9908if test "${host}" != "${target}"; then
9909 target_subdir="${target_alias}/"
9910fi
9911
9912
9913frags=
9914host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9915if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9916 # When building a native debuger the .mh file containing things
9917 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9918 # since it no longer contains anything useful.
9919 if test "${target}" = "${host}"; then
9920 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9921 else
9922 host_makefile_frag=/dev/null
9923 fi
c906108c
SS
9924fi
9925frags="$frags $host_makefile_frag"
9926
9927target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9928if test ! -f ${target_makefile_frag}; then
9929{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9930fi
9931frags="$frags $target_makefile_frag"
9932
9933
9934
9935
9936
9937hostfile=`sed -n '
9938s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9939' ${host_makefile_frag}`
9940
9941targetfile=`sed -n '
9942s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9943' ${target_makefile_frag}`
9944
6166d547
AC
9945GDB_MULTI_ARCH=`sed -n '
9946s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9947' ${target_makefile_frag}`
9948
c906108c 9949if test "${target}" = "${host}"; then
a85f51e7
DJ
9950# We pick this up from the host configuration file (.mh) because we
9951# do not have a native configuration Makefile fragment.
c906108c
SS
9952nativefile=`sed -n '
9953s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9954' ${host_makefile_frag}`
c906108c
SS
9955fi
9956
9957
6166d547
AC
9958# New targets should just set gdb_multi_arch=yes in configure.tgt.
9959# Old targets being converted can either do that or set GDB_MULTI_ARCH
9960# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9961# will be the default.
9962if test x"${GDB_MULTI_ARCH}" = x ; then
9963 case "${gdb_multi_arch}" in
9964 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9965 no ) GDB_MULTI_ARCH=0 ;;
9966 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9967 esac
9968fi
9969if test x"${GDB_MULTI_ARCH}" != x ; then
9970 cat >> confdefs.h <<EOF
9971#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9972EOF
9973
9974fi
6c5cfe5b 9975# Warn the user when they use an old practice
6166d547
AC
9976case "${GDB_MULTI_ARCH}" in
9977 "" ) ;;
9978 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9979 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9980 GDB_MULTI_ARCH_PURE )
9981 if test x"${targetfile}" != x ; then
6c5cfe5b 9982 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9983 targetfile=""
6166d547
AC
9984 fi ;;
9985 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9986esac
9987
96baa820
JM
9988if test "${enable_multi_ice}" = "yes"; then
9989 SUBDIRS="${SUBDIRS} multi-ice"
9990fi
9991
a85f51e7
DJ
9992# ``gdbserver'' can only be built in a native configuration.
9993if test x"${target}" = x"${host}"; then
9994 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
06825bd1 9995echo "configure:9996: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
9996 if test x"${build_gdbserver}" = xyes ; then
9997 configdirs="${configdirs} gdbserver"
9998 SUBDIRS="${SUBDIRS} gdbserver"
9999 echo "$ac_t""yes" 1>&6
10000 else
10001 echo "$ac_t""no" 1>&6
10002 fi
10003fi
10004
96baa820
JM
10005
10006
c906108c 10007# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10008# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10009# version.
c906108c
SS
10010
10011files=
10012links=
5a2402b8 10013
c906108c 10014rm -f xm.h
5a2402b8 10015xm_h=""
c906108c 10016if test "${hostfile}" != ""; then
5a2402b8
AC
10017 xm_h=xm.h
10018 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10019 files="${files} ${GDB_XM_FILE}"
10020 links="${links} xm.h"
10021 cat >> confdefs.h <<EOF
10022#define GDB_XM_FILE ${GDB_XM_FILE}
10023EOF
10024
c906108c 10025fi
5a2402b8
AC
10026
10027
c906108c 10028rm -f tm.h
5a2402b8 10029tm_h=""
c906108c 10030if test "${targetfile}" != ""; then
5a2402b8
AC
10031 tm_h=tm.h
10032 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10033 files="${files} ${GDB_TM_FILE}"
10034 links="${links} tm.h"
10035 cat >> confdefs.h <<EOF
10036#define GDB_TM_FILE ${GDB_TM_FILE}
10037EOF
10038
c906108c 10039fi
5a2402b8
AC
10040
10041
c906108c 10042rm -f nm.h
5a2402b8 10043nm_h=""
c906108c 10044if test "${nativefile}" != ""; then
5a2402b8
AC
10045 nm_h=nm.h
10046 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10047 files="${files} ${GDB_NM_FILE}"
10048 links="${links} nm.h"
10049 cat >> confdefs.h <<EOF
10050#define GDB_NM_FILE ${GDB_NM_FILE}
10051EOF
10052
c906108c 10053fi
5a2402b8
AC
10054
10055
c906108c
SS
10056
10057
10058echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
06825bd1 10059echo "configure:10060: checking for Cygwin environment" >&5
c906108c
SS
10060if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10061 echo $ac_n "(cached) $ac_c" 1>&6
10062else
10063 cat > conftest.$ac_ext <<EOF
06825bd1 10064#line 10065 "configure"
c906108c
SS
10065#include "confdefs.h"
10066
10067int main() {
10068
10069#ifndef __CYGWIN__
10070#define __CYGWIN__ __CYGWIN32__
10071#endif
10072return __CYGWIN__;
10073; return 0; }
10074EOF
06825bd1 10075if { (eval echo configure:10076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10076 rm -rf conftest*
10077 ac_cv_cygwin=yes
10078else
10079 echo "configure: failed program was:" >&5
10080 cat conftest.$ac_ext >&5
10081 rm -rf conftest*
10082 ac_cv_cygwin=no
10083fi
10084rm -f conftest*
10085rm -f conftest*
10086fi
10087
10088echo "$ac_t""$ac_cv_cygwin" 1>&6
10089CYGWIN=
10090test "$ac_cv_cygwin" = yes && CYGWIN=yes
10091echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
06825bd1 10092echo "configure:10093: checking for mingw32 environment" >&5
c906108c
SS
10093if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10094 echo $ac_n "(cached) $ac_c" 1>&6
10095else
10096 cat > conftest.$ac_ext <<EOF
06825bd1 10097#line 10098 "configure"
c906108c
SS
10098#include "confdefs.h"
10099
10100int main() {
10101return __MINGW32__;
10102; return 0; }
10103EOF
06825bd1 10104if { (eval echo configure:10105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10105 rm -rf conftest*
10106 ac_cv_mingw32=yes
10107else
10108 echo "configure: failed program was:" >&5
10109 cat conftest.$ac_ext >&5
10110 rm -rf conftest*
10111 ac_cv_mingw32=no
10112fi
10113rm -f conftest*
10114rm -f conftest*
10115fi
10116
10117echo "$ac_t""$ac_cv_mingw32" 1>&6
10118MINGW32=
10119test "$ac_cv_mingw32" = yes && MINGW32=yes
10120
10121
10122echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
06825bd1 10123echo "configure:10124: checking for executable suffix" >&5
c906108c
SS
10124if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10125 echo $ac_n "(cached) $ac_c" 1>&6
10126else
10127 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10128 ac_cv_exeext=.exe
10129else
10130 rm -f conftest*
10131 echo 'int main () { return 0; }' > conftest.$ac_ext
10132 ac_cv_exeext=
06825bd1 10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10134 for file in conftest.*; do
10135 case $file in
9608ab8b 10136 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10137 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10138 esac
10139 done
10140 else
10141 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10142 fi
10143 rm -f conftest*
10144 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10145fi
10146fi
10147
10148EXEEXT=""
10149test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10150echo "$ac_t""${ac_cv_exeext}" 1>&6
10151ac_exeext=$EXEEXT
10152
10153
234b45d4
KB
10154
10155cat >> confdefs.h <<\EOF
10156#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10157EOF
10158
10159
10160
10161
10162 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10163if test "${with_libiconv_prefix+set}" = set; then
10164 withval="$with_libiconv_prefix"
10165
10166 for dir in `echo "$withval" | tr : ' '`; do
10167 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10168 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10169 done
10170
10171fi
10172
10173
10174 echo $ac_n "checking for iconv""... $ac_c" 1>&6
06825bd1 10175echo "configure:10176: checking for iconv" >&5
234b45d4
KB
10176if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10177 echo $ac_n "(cached) $ac_c" 1>&6
10178else
10179
10180 am_cv_func_iconv="no, consider installing GNU libiconv"
10181 am_cv_lib_iconv=no
10182 cat > conftest.$ac_ext <<EOF
06825bd1 10183#line 10184 "configure"
234b45d4
KB
10184#include "confdefs.h"
10185#include <stdlib.h>
10186#include <iconv.h>
10187int main() {
10188iconv_t cd = iconv_open("","");
10189 iconv(cd,NULL,NULL,NULL,NULL);
10190 iconv_close(cd);
10191; return 0; }
10192EOF
06825bd1 10193if { (eval echo configure:10194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10194 rm -rf conftest*
10195 am_cv_func_iconv=yes
10196else
10197 echo "configure: failed program was:" >&5
10198 cat conftest.$ac_ext >&5
10199fi
10200rm -f conftest*
10201 if test "$am_cv_func_iconv" != yes; then
10202 am_save_LIBS="$LIBS"
10203 LIBS="$LIBS -liconv"
10204 cat > conftest.$ac_ext <<EOF
06825bd1 10205#line 10206 "configure"
234b45d4
KB
10206#include "confdefs.h"
10207#include <stdlib.h>
10208#include <iconv.h>
10209int main() {
10210iconv_t cd = iconv_open("","");
10211 iconv(cd,NULL,NULL,NULL,NULL);
10212 iconv_close(cd);
10213; return 0; }
10214EOF
06825bd1 10215if { (eval echo configure:10216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10216 rm -rf conftest*
10217 am_cv_lib_iconv=yes
10218 am_cv_func_iconv=yes
10219else
10220 echo "configure: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10222fi
10223rm -f conftest*
10224 LIBS="$am_save_LIBS"
10225 fi
10226
10227fi
10228
10229echo "$ac_t""$am_cv_func_iconv" 1>&6
10230 if test "$am_cv_func_iconv" = yes; then
10231 cat >> confdefs.h <<\EOF
10232#define HAVE_ICONV 1
10233EOF
10234
10235 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
06825bd1 10236echo "configure:10237: checking for iconv declaration" >&5
234b45d4
KB
10237 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10238 echo $ac_n "(cached) $ac_c" 1>&6
10239else
10240
10241 cat > conftest.$ac_ext <<EOF
06825bd1 10242#line 10243 "configure"
234b45d4
KB
10243#include "confdefs.h"
10244
10245#include <stdlib.h>
10246#include <iconv.h>
10247extern
10248#ifdef __cplusplus
10249"C"
10250#endif
10251#if defined(__STDC__) || defined(__cplusplus)
10252size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10253#else
10254size_t iconv();
10255#endif
10256
10257int main() {
10258
10259; return 0; }
10260EOF
06825bd1 10261if { (eval echo configure:10262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10262 rm -rf conftest*
10263 am_cv_proto_iconv_arg1=""
10264else
10265 echo "configure: failed program was:" >&5
10266 cat conftest.$ac_ext >&5
10267 rm -rf conftest*
10268 am_cv_proto_iconv_arg1="const"
10269fi
10270rm -f conftest*
10271 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);"
10272fi
10273
10274 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10275 echo "$ac_t""${ac_t:-
10276 }$am_cv_proto_iconv" 1>&6
10277 cat >> confdefs.h <<EOF
10278#define ICONV_CONST $am_cv_proto_iconv_arg1
10279EOF
10280
10281 fi
10282 LIBICONV=
10283 if test "$am_cv_lib_iconv" = yes; then
10284 LIBICONV="-liconv"
10285 fi
10286
10287
10288
c906108c
SS
10289subdirs="$configdirs"
10290
10291trap '' 1 2 15
10292cat > confcache <<\EOF
10293# This file is a shell script that caches the results of configure
10294# tests run on this system so they can be shared between configure
10295# scripts and configure runs. It is not useful on other systems.
10296# If it contains results you don't want to keep, you may remove or edit it.
10297#
10298# By default, configure uses ./config.cache as the cache file,
10299# creating it if it does not exist already. You can give configure
10300# the --cache-file=FILE option to use a different cache file; that is
10301# what configure does when it calls configure scripts in
10302# subdirectories, so they share the cache.
10303# Giving --cache-file=/dev/null disables caching, for debugging configure.
10304# config.status only pays attention to the cache file if you give it the
10305# --recheck option to rerun configure.
10306#
10307EOF
10308# The following way of writing the cache mishandles newlines in values,
10309# but we know of no workaround that is simple, portable, and efficient.
10310# So, don't put newlines in cache variables' values.
10311# Ultrix sh set writes to stderr and can't be redirected directly,
10312# and sets the high bit in the cache file unless we assign to the vars.
10313(set) 2>&1 |
10314 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10315 *ac_space=\ *)
10316 # `set' does not quote correctly, so add quotes (double-quote substitution
10317 # turns \\\\ into \\, and sed turns \\ into \).
10318 sed -n \
10319 -e "s/'/'\\\\''/g" \
10320 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10321 ;;
10322 *)
10323 # `set' quotes correctly as required by POSIX, so do not add quotes.
10324 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10325 ;;
10326 esac >> confcache
10327if cmp -s $cache_file confcache; then
10328 :
10329else
10330 if test -w $cache_file; then
10331 echo "updating cache $cache_file"
10332 cat confcache > $cache_file
10333 else
10334 echo "not updating unwritable cache $cache_file"
10335 fi
10336fi
10337rm -f confcache
10338
10339trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10340
10341test "x$prefix" = xNONE && prefix=$ac_default_prefix
10342# Let make expand exec_prefix.
10343test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10344
10345# Any assignment to VPATH causes Sun make to only execute
10346# the first set of double-colon rules, so remove it if not needed.
10347# If there is a colon in the path, we need to keep it.
10348if test "x$srcdir" = x.; then
10349 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10350fi
10351
10352trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10353
10354DEFS=-DHAVE_CONFIG_H
10355
10356# Without the "./", some shells look in PATH for config.status.
10357: ${CONFIG_STATUS=./config.status}
10358
10359echo creating $CONFIG_STATUS
10360rm -f $CONFIG_STATUS
10361cat > $CONFIG_STATUS <<EOF
10362#! /bin/sh
10363# Generated automatically by configure.
10364# Run this file to recreate the current configuration.
10365# This directory was configured as follows,
10366# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10367#
10368# $0 $ac_configure_args
10369#
10370# Compiler output produced by configure, useful for debugging
10371# configure, is in ./config.log if it exists.
10372
10373ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10374for ac_option
10375do
10376 case "\$ac_option" in
10377 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10378 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10379 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10380 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10381 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10382 exit 0 ;;
10383 -help | --help | --hel | --he | --h)
10384 echo "\$ac_cs_usage"; exit 0 ;;
10385 *) echo "\$ac_cs_usage"; exit 1 ;;
10386 esac
10387done
10388
10389ac_given_srcdir=$srcdir
10390ac_given_INSTALL="$INSTALL"
10391
ed952ac5 10392trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10393EOF
10394cat >> $CONFIG_STATUS <<EOF
10395
10396# Protect against being on the right side of a sed subst in config.status.
10397sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10398 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10399$ac_vpsub
10400$extrasub
10401s%@SHELL@%$SHELL%g
10402s%@CFLAGS@%$CFLAGS%g
10403s%@CPPFLAGS@%$CPPFLAGS%g
10404s%@CXXFLAGS@%$CXXFLAGS%g
10405s%@FFLAGS@%$FFLAGS%g
10406s%@DEFS@%$DEFS%g
10407s%@LDFLAGS@%$LDFLAGS%g
10408s%@LIBS@%$LIBS%g
10409s%@exec_prefix@%$exec_prefix%g
10410s%@prefix@%$prefix%g
10411s%@program_transform_name@%$program_transform_name%g
10412s%@bindir@%$bindir%g
10413s%@sbindir@%$sbindir%g
10414s%@libexecdir@%$libexecdir%g
10415s%@datadir@%$datadir%g
10416s%@sysconfdir@%$sysconfdir%g
10417s%@sharedstatedir@%$sharedstatedir%g
10418s%@localstatedir@%$localstatedir%g
10419s%@libdir@%$libdir%g
10420s%@includedir@%$includedir%g
10421s%@oldincludedir@%$oldincludedir%g
10422s%@infodir@%$infodir%g
10423s%@mandir@%$mandir%g
413ccac7
AC
10424s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10425s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10426s%@MAINT@%$MAINT%g
c906108c
SS
10427s%@CC@%$CC%g
10428s%@CPP@%$CPP%g
10429s%@host@%$host%g
10430s%@host_alias@%$host_alias%g
10431s%@host_cpu@%$host_cpu%g
10432s%@host_vendor@%$host_vendor%g
10433s%@host_os@%$host_os%g
10434s%@target@%$target%g
10435s%@target_alias@%$target_alias%g
10436s%@target_cpu@%$target_cpu%g
10437s%@target_vendor@%$target_vendor%g
10438s%@target_os@%$target_os%g
10439s%@build@%$build%g
10440s%@build_alias@%$build_alias%g
10441s%@build_cpu@%$build_cpu%g
10442s%@build_vendor@%$build_vendor%g
10443s%@build_os@%$build_os%g
c906108c 10444s%@RANLIB@%$RANLIB%g
8bb2c122 10445s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10446s%@ALLOCA@%$ALLOCA%g
10447s%@USE_NLS@%$USE_NLS%g
10448s%@MSGFMT@%$MSGFMT%g
10449s%@GMSGFMT@%$GMSGFMT%g
10450s%@XGETTEXT@%$XGETTEXT%g
10451s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10452s%@CATALOGS@%$CATALOGS%g
10453s%@CATOBJEXT@%$CATOBJEXT%g
10454s%@DATADIRNAME@%$DATADIRNAME%g
10455s%@GMOFILES@%$GMOFILES%g
10456s%@INSTOBJEXT@%$INSTOBJEXT%g
10457s%@INTLDEPS@%$INTLDEPS%g
10458s%@INTLLIBS@%$INTLLIBS%g
10459s%@INTLOBJS@%$INTLOBJS%g
10460s%@POFILES@%$POFILES%g
10461s%@POSUB@%$POSUB%g
10462s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10463s%@GT_NO@%$GT_NO%g
10464s%@GT_YES@%$GT_YES%g
10465s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10466s%@l@%$l%g
7a292a7a 10467s%@AWK@%$AWK%g
c906108c
SS
10468s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10469s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10470s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10471s%@LN_S@%$LN_S%g
10472s%@YACC@%$YACC%g
c906108c 10473s%@AR@%$AR%g
95ca63c4
CF
10474s%@DLLTOOL@%$DLLTOOL%g
10475s%@WINDRES@%$WINDRES%g
75c6e08a 10476s%@MIG@%$MIG%g
c906108c 10477s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
b4df4f68 10478s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
c906108c 10479s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10480s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10481s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10482s%@MMALLOC@%$MMALLOC%g
aff38e61 10483s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10484s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10485s%@LIBGUI@%$LIBGUI%g
10486s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10487s%@WIN32LDAPP@%$WIN32LDAPP%g
10488s%@TCL_VERSION@%$TCL_VERSION%g
10489s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10490s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10491s%@TCL_CC@%$TCL_CC%g
10492s%@TCL_DEFS@%$TCL_DEFS%g
10493s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10494s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10495s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10496s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10497s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10498s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10499s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10500s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10501s%@TCL_RANLIB@%$TCL_RANLIB%g
10502s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10503s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10504s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10505s%@TK_VERSION@%$TK_VERSION%g
10506s%@TK_DEFS@%$TK_DEFS%g
10507s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10508s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10509s%@TK_XLIBSW@%$TK_XLIBSW%g
10510s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10511s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10512s%@TCLHDIR@%$TCLHDIR%g
10513s%@TKHDIR@%$TKHDIR%g
10514s%@ITCLHDIR@%$ITCLHDIR%g
10515s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10516s%@ITCL_VERSION@%$ITCL_VERSION%g
10517s%@ITCL_DEFS@%$ITCL_DEFS%g
10518s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10519s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10520s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10521s%@ITK_VERSION@%$ITK_VERSION%g
10522s%@ITK_DEFS@%$ITK_DEFS%g
10523s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10524s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10525s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10526s%@X_CFLAGS@%$X_CFLAGS%g
10527s%@X_LDFLAGS@%$X_LDFLAGS%g
10528s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10529s%@TCL_DEPS@%$TCL_DEPS%g
10530s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10531s%@ITCLLIB@%$ITCLLIB%g
10532s%@ITCL_DEPS@%$ITCL_DEPS%g
10533s%@ITKLIB@%$ITKLIB%g
10534s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10535s%@GDBTKLIBS@%$GDBTKLIBS%g
10536s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10537s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10538s%@IGNORE_SIM@%$IGNORE_SIM%g
10539s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10540s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10541s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10542s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10543s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10544s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10545s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10546s%@CONFIG_ALL@%$CONFIG_ALL%g
10547s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10548s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10549s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10550s%@HLDFLAGS@%$HLDFLAGS%g
10551s%@HLDENV@%$HLDENV%g
10552s%@target_subdir@%$target_subdir%g
10553/@host_makefile_frag@/r $host_makefile_frag
10554s%@host_makefile_frag@%%g
10555/@target_makefile_frag@/r $target_makefile_frag
10556s%@target_makefile_frag@%%g
10557s%@frags@%$frags%g
96baa820 10558s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
10559s%@xm_h@%$xm_h%g
10560s%@tm_h@%$tm_h%g
10561s%@nm_h@%$nm_h%g
c906108c 10562s%@EXEEXT@%$EXEEXT%g
234b45d4 10563s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10564s%@subdirs@%$subdirs%g
10565
10566CEOF
10567EOF
10568
10569cat >> $CONFIG_STATUS <<\EOF
10570
10571# Split the substitutions into bite-sized pieces for seds with
10572# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10573ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10574ac_file=1 # Number of current file.
10575ac_beg=1 # First line for current file.
10576ac_end=$ac_max_sed_cmds # Line after last line for current file.
10577ac_more_lines=:
10578ac_sed_cmds=""
10579while $ac_more_lines; do
10580 if test $ac_beg -gt 1; then
10581 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10582 else
10583 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10584 fi
10585 if test ! -s conftest.s$ac_file; then
10586 ac_more_lines=false
10587 rm -f conftest.s$ac_file
10588 else
10589 if test -z "$ac_sed_cmds"; then
10590 ac_sed_cmds="sed -f conftest.s$ac_file"
10591 else
10592 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10593 fi
10594 ac_file=`expr $ac_file + 1`
10595 ac_beg=$ac_end
10596 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10597 fi
10598done
10599if test -z "$ac_sed_cmds"; then
10600 ac_sed_cmds=cat
10601fi
10602EOF
10603
10604cat >> $CONFIG_STATUS <<EOF
10605
ed952ac5 10606CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10607EOF
10608cat >> $CONFIG_STATUS <<\EOF
10609for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10610 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10611 case "$ac_file" in
10612 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10613 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10614 *) ac_file_in="${ac_file}.in" ;;
10615 esac
10616
10617 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10618
10619 # Remove last slash and all that follows it. Not all systems have dirname.
10620 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10621 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10622 # The file is in a subdirectory.
10623 test ! -d "$ac_dir" && mkdir "$ac_dir"
10624 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10625 # A "../" for each directory in $ac_dir_suffix.
10626 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10627 else
10628 ac_dir_suffix= ac_dots=
10629 fi
10630
10631 case "$ac_given_srcdir" in
10632 .) srcdir=.
10633 if test -z "$ac_dots"; then top_srcdir=.
10634 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10635 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10636 *) # Relative path.
10637 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10638 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10639 esac
10640
10641 case "$ac_given_INSTALL" in
10642 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10643 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10644 esac
10645
10646 echo creating "$ac_file"
10647 rm -f "$ac_file"
10648 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10649 case "$ac_file" in
10650 *Makefile*) ac_comsub="1i\\
10651# $configure_input" ;;
10652 *) ac_comsub= ;;
10653 esac
10654
10655 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10656 sed -e "$ac_comsub
10657s%@configure_input@%$configure_input%g
10658s%@srcdir@%$srcdir%g
10659s%@top_srcdir@%$top_srcdir%g
10660s%@INSTALL@%$INSTALL%g
10661" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10662fi; done
10663rm -f conftest.s*
10664
10665# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10666# NAME is the cpp macro being defined and VALUE is the value it is being given.
10667#
10668# ac_d sets the value in "#define NAME VALUE" lines.
10669ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10670ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10671ac_dC='\3'
10672ac_dD='%g'
10673# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10674ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10675ac_uB='\([ ]\)%\1#\2define\3'
10676ac_uC=' '
10677ac_uD='\4%g'
10678# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10679ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10680ac_eB='$%\1#\2define\3'
10681ac_eC=' '
10682ac_eD='%g'
10683
10684if test "${CONFIG_HEADERS+set}" != set; then
10685EOF
10686cat >> $CONFIG_STATUS <<EOF
10687 CONFIG_HEADERS="config.h:config.in"
10688EOF
10689cat >> $CONFIG_STATUS <<\EOF
10690fi
10691for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10692 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10693 case "$ac_file" in
10694 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10695 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10696 *) ac_file_in="${ac_file}.in" ;;
10697 esac
10698
10699 echo creating $ac_file
10700
10701 rm -f conftest.frag conftest.in conftest.out
10702 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10703 cat $ac_file_inputs > conftest.in
10704
10705EOF
10706
10707# Transform confdefs.h into a sed script conftest.vals that substitutes
10708# the proper values into config.h.in to produce config.h. And first:
10709# Protect against being on the right side of a sed subst in config.status.
10710# Protect against being in an unquoted here document in config.status.
10711rm -f conftest.vals
10712cat > conftest.hdr <<\EOF
10713s/[\\&%]/\\&/g
10714s%[\\$`]%\\&%g
10715s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10716s%ac_d%ac_u%gp
10717s%ac_u%ac_e%gp
10718EOF
10719sed -n -f conftest.hdr confdefs.h > conftest.vals
10720rm -f conftest.hdr
10721
10722# This sed command replaces #undef with comments. This is necessary, for
10723# example, in the case of _POSIX_SOURCE, which is predefined and required
10724# on some systems where configure will not decide to define it.
10725cat >> conftest.vals <<\EOF
10726s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10727EOF
10728
10729# Break up conftest.vals because some shells have a limit on
10730# the size of here documents, and old seds have small limits too.
10731
10732rm -f conftest.tail
10733while :
10734do
10735 ac_lines=`grep -c . conftest.vals`
10736 # grep -c gives empty output for an empty file on some AIX systems.
10737 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10738 # Write a limited-size here document to conftest.frag.
10739 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10740 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10741 echo 'CEOF
10742 sed -f conftest.frag conftest.in > conftest.out
10743 rm -f conftest.in
10744 mv conftest.out conftest.in
10745' >> $CONFIG_STATUS
10746 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10747 rm -f conftest.vals
10748 mv conftest.tail conftest.vals
10749done
10750rm -f conftest.vals
10751
10752cat >> $CONFIG_STATUS <<\EOF
10753 rm -f conftest.frag conftest.h
10754 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10755 cat conftest.in >> conftest.h
10756 rm -f conftest.in
10757 if cmp -s $ac_file conftest.h 2>/dev/null; then
10758 echo "$ac_file is unchanged"
10759 rm -f conftest.h
10760 else
10761 # Remove last slash and all that follows it. Not all systems have dirname.
10762 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10763 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10764 # The file is in a subdirectory.
10765 test ! -d "$ac_dir" && mkdir "$ac_dir"
10766 fi
10767 rm -f $ac_file
10768 mv conftest.h $ac_file
10769 fi
10770fi; done
10771
10772EOF
10773
10774cat >> $CONFIG_STATUS <<EOF
10775ac_sources="$files"
10776ac_dests="$links"
10777EOF
10778
10779cat >> $CONFIG_STATUS <<\EOF
10780srcdir=$ac_given_srcdir
10781while test -n "$ac_sources"; do
10782 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10783 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10784
10785 echo "linking $srcdir/$ac_source to $ac_dest"
10786
10787 if test ! -r $srcdir/$ac_source; then
10788 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10789 fi
10790 rm -f $ac_dest
10791
10792 # Make relative symlinks.
10793 # Remove last slash and all that follows it. Not all systems have dirname.
10794 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10795 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10796 # The dest file is in a subdirectory.
10797 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10798 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10799 # A "../" for each directory in $ac_dest_dir_suffix.
10800 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10801 else
10802 ac_dest_dir_suffix= ac_dots=
10803 fi
10804
10805 case "$srcdir" in
10806 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10807 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10808 esac
10809
10810 # Make a symlink if possible; otherwise try a hard link.
10811 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10812 ln $srcdir/$ac_source $ac_dest; then :
10813 else
10814 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10815 fi
10816done
10817EOF
10818cat >> $CONFIG_STATUS <<EOF
10819
10820gdb_host_cpu=$gdb_host_cpu
10821gdb_target_cpu=$gdb_target_cpu
10822nativefile=$nativefile
10823
10824EOF
10825cat >> $CONFIG_STATUS <<\EOF
10826
10827if test "${nativefile}" = ""; then
c4620205 10828 < Makefile \
e27da16d
JT
10829 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10830 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10831 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10832 > Makefile.tem
c906108c
SS
10833mv -f Makefile.tem Makefile
10834fi
10835
10836sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10837/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10838/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10839mv -f Makefile.tmp Makefile
10840
2acceee2 10841
c906108c
SS
10842case x$CONFIG_HEADERS in
10843xconfig.h:config.in)
10844echo > stamp-h ;;
10845esac
10846
10847exit 0
10848EOF
10849chmod +x $CONFIG_STATUS
10850rm -fr confdefs* $ac_clean_files
10851test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10852
10853if test "$no_recursion" != yes; then
10854
10855 # Remove --cache-file and --srcdir arguments so they do not pile up.
10856 ac_sub_configure_args=
10857 ac_prev=
10858 for ac_arg in $ac_configure_args; do
10859 if test -n "$ac_prev"; then
10860 ac_prev=
10861 continue
10862 fi
10863 case "$ac_arg" in
10864 -cache-file | --cache-file | --cache-fil | --cache-fi \
10865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10866 ac_prev=cache_file ;;
10867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10869 ;;
10870 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10871 ac_prev=srcdir ;;
10872 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10873 ;;
10874 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10875 esac
10876 done
10877
10878 for ac_config_dir in $configdirs; do
10879
10880 # Do not complain, so a configure script can configure whichever
10881 # parts of a large source tree are present.
10882 if test ! -d $srcdir/$ac_config_dir; then
10883 continue
10884 fi
10885
10886 echo configuring in $ac_config_dir
10887
10888 case "$srcdir" in
10889 .) ;;
10890 *)
10891 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10892 else
10893 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10894 fi
10895 ;;
10896 esac
10897
10898 ac_popdir=`pwd`
10899 cd $ac_config_dir
10900
10901 # A "../" for each directory in /$ac_config_dir.
10902 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10903
10904 case "$srcdir" in
10905 .) # No --srcdir option. We are building in place.
10906 ac_sub_srcdir=$srcdir ;;
10907 /*) # Absolute path.
10908 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10909 *) # Relative path.
10910 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10911 esac
10912
10913 # Check for guested configure; otherwise get Cygnus style configure.
10914 if test -f $ac_sub_srcdir/configure; then
10915 ac_sub_configure=$ac_sub_srcdir/configure
10916 elif test -f $ac_sub_srcdir/configure.in; then
10917 ac_sub_configure=$ac_configure
10918 else
10919 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10920 ac_sub_configure=
10921 fi
10922
10923 # The recursion is here.
10924 if test -n "$ac_sub_configure"; then
10925
10926 # Make the cache file name correct relative to the subdirectory.
10927 case "$cache_file" in
10928 /*) ac_sub_cache_file=$cache_file ;;
10929 *) # Relative path.
10930 ac_sub_cache_file="$ac_dots$cache_file" ;;
10931 esac
10932 case "$ac_given_INSTALL" in
10933 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10934 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10935 esac
10936
10937 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10938 # The eval makes quoting arguments work.
10939 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10940 then :
10941 else
10942 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10943 fi
10944 fi
10945
10946 cd $ac_popdir
10947 done
10948fi
10949
10950
10951exit 0
This page took 0.826821 seconds and 4 git commands to generate.