2003-01-02 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
29ac_help="$ac_help
30 --without-included-regex don't use included regex; this is the default
31 on systems with version 2 of the GNU C library
32 (use with caution on other system)"
c906108c
SS
33ac_help="$ac_help
34 --enable-netrom Enable NetROM support"
35ac_help="$ac_help
36 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
37ac_help="$ac_help
38 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
39ac_help="$ac_help
40 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
41ac_help="$ac_help
42 --with-cpu=CPU Set the default CPU variant to debug"
43ac_help="$ac_help
44 --enable-gdbtk Enable GDBTK GUI front end"
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
c906108c
SS
61ac_help="$ac_help
62 --enable-shared Use shared libraries"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
c41b7eb1 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
c41b7eb1 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
c41b7eb1
JB
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
c41b7eb1
JB
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
f5dbc56d 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
f5dbc56d 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
f5dbc56d 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
f5dbc56d 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
f5dbc56d 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
f5dbc56d 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
f5dbc56d 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
f5dbc56d 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
833echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
f5dbc56d 834echo "configure:835: checking how to run the C preprocessor" >&5
c906108c
SS
835# On Suns, sometimes $CPP names a directory.
836if test -n "$CPP" && test -d "$CPP"; then
837 CPP=
838fi
839if test -z "$CPP"; then
840if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842else
843 # This must be in double quotes, not single quotes, because CPP may get
844 # substituted into the Makefile and "${CC-cc}" will confuse make.
845 CPP="${CC-cc} -E"
846 # On the NeXT, cc -E runs the code through the compiler's parser,
847 # not just through cpp.
848 cat > conftest.$ac_ext <<EOF
f5dbc56d 849#line 850 "configure"
c906108c
SS
850#include "confdefs.h"
851#include <assert.h>
852Syntax Error
853EOF
854ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 855{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
856ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
857if test -z "$ac_err"; then
858 :
859else
860 echo "$ac_err" >&5
861 echo "configure: failed program was:" >&5
862 cat conftest.$ac_ext >&5
863 rm -rf conftest*
864 CPP="${CC-cc} -E -traditional-cpp"
865 cat > conftest.$ac_ext <<EOF
f5dbc56d 866#line 867 "configure"
c906108c
SS
867#include "confdefs.h"
868#include <assert.h>
869Syntax Error
870EOF
871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 872{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
874if test -z "$ac_err"; then
875 :
876else
877 echo "$ac_err" >&5
878 echo "configure: failed program was:" >&5
879 cat conftest.$ac_ext >&5
880 rm -rf conftest*
881 CPP="${CC-cc} -nologo -E"
882 cat > conftest.$ac_ext <<EOF
f5dbc56d 883#line 884 "configure"
c906108c
SS
884#include "confdefs.h"
885#include <assert.h>
886Syntax Error
887EOF
888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 889{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
891if test -z "$ac_err"; then
892 :
893else
894 echo "$ac_err" >&5
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
897 rm -rf conftest*
898 CPP=/lib/cpp
899fi
900rm -f conftest*
901fi
902rm -f conftest*
903fi
904rm -f conftest*
905 ac_cv_prog_CPP="$CPP"
906fi
907 CPP="$ac_cv_prog_CPP"
908else
909 ac_cv_prog_CPP="$CPP"
910fi
911echo "$ac_t""$CPP" 1>&6
912
913echo $ac_n "checking for AIX""... $ac_c" 1>&6
f5dbc56d 914echo "configure:915: checking for AIX" >&5
c906108c 915cat > conftest.$ac_ext <<EOF
f5dbc56d 916#line 917 "configure"
c906108c
SS
917#include "confdefs.h"
918#ifdef _AIX
919 yes
920#endif
921
922EOF
923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
924 egrep "yes" >/dev/null 2>&1; then
925 rm -rf conftest*
926 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
927#define _ALL_SOURCE 1
928EOF
929
930else
931 rm -rf conftest*
932 echo "$ac_t""no" 1>&6
933fi
934rm -f conftest*
935
936
56157b4a 937echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
f5dbc56d 938echo "configure:939: checking for POSIXized ISC" >&5
56157b4a
AC
939if test -d /etc/conf/kconfig.d &&
940 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
941then
942 echo "$ac_t""yes" 1>&6
943 ISC=yes # If later tests want to check for ISC.
944 cat >> confdefs.h <<\EOF
945#define _POSIX_SOURCE 1
c906108c
SS
946EOF
947
56157b4a
AC
948 if test "$GCC" = yes; then
949 CC="$CC -posix"
950 else
951 CC="$CC -Xp"
952 fi
c906108c
SS
953else
954 echo "$ac_t""no" 1>&6
56157b4a 955 ISC=
c906108c
SS
956fi
957
958
959
960
961echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
f5dbc56d 962echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
963if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
965else
966 am_cv_prog_cc_stdc=no
967ac_save_CC="$CC"
968# Don't try gcc -ansi; that turns off useful extensions and
969# breaks some systems' header files.
970# AIX -qlanglvl=ansi
971# Ultrix and OSF/1 -std1
56157b4a
AC
972# HP-UX 10.20 and later -Ae
973# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 974# SVR4 -Xc -D__EXTENSIONS__
56157b4a 975for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
976do
977 CC="$ac_save_CC $ac_arg"
978 cat > conftest.$ac_ext <<EOF
f5dbc56d 979#line 980 "configure"
c906108c
SS
980#include "confdefs.h"
981#include <stdarg.h>
982#include <stdio.h>
983#include <sys/types.h>
984#include <sys/stat.h>
985/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
986struct buf { int x; };
987FILE * (*rcsopen) (struct buf *, struct stat *, int);
988static char *e (p, i)
989 char **p;
990 int i;
991{
992 return p[i];
993}
994static char *f (char * (*g) (char **, int), char **p, ...)
995{
996 char *s;
997 va_list v;
998 va_start (v,p);
999 s = g (p, va_arg (v,int));
1000 va_end (v);
1001 return s;
1002}
1003int test (int i, double x);
1004struct s1 {int (*f) (int a);};
1005struct s2 {int (*f) (double a);};
1006int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1007int argc;
1008char **argv;
1009
1010int main() {
1011
1012return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1013
1014; return 0; }
1015EOF
f5dbc56d 1016if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1017 rm -rf conftest*
1018 am_cv_prog_cc_stdc="$ac_arg"; break
1019else
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022fi
1023rm -f conftest*
1024done
1025CC="$ac_save_CC"
1026
1027fi
1028
1029if test -z "$am_cv_prog_cc_stdc"; then
1030 echo "$ac_t""none needed" 1>&6
1031else
1032 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1033fi
1034case "x$am_cv_prog_cc_stdc" in
1035 x|xno) ;;
1036 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1037esac
1038
1039
1040ac_aux_dir=
1041for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1042 if test -f $ac_dir/install-sh; then
1043 ac_aux_dir=$ac_dir
1044 ac_install_sh="$ac_aux_dir/install-sh -c"
1045 break
1046 elif test -f $ac_dir/install.sh; then
1047 ac_aux_dir=$ac_dir
1048 ac_install_sh="$ac_aux_dir/install.sh -c"
1049 break
1050 fi
1051done
1052if test -z "$ac_aux_dir"; then
1053 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1054fi
1055ac_config_guess=$ac_aux_dir/config.guess
1056ac_config_sub=$ac_aux_dir/config.sub
1057ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1058
1059
1060# Do some error checking and defaulting for the host and target type.
1061# The inputs are:
1062# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1063#
1064# The rules are:
1065# 1. You are not allowed to specify --host, --target, and nonopt at the
1066# same time.
1067# 2. Host defaults to nonopt.
1068# 3. If nonopt is not specified, then host defaults to the current host,
1069# as determined by config.guess.
1070# 4. Target and build default to nonopt.
1071# 5. If nonopt is not specified, then target and build default to host.
1072
1073# The aliases save the names the user supplied, while $host etc.
1074# will get canonicalized.
1075case $host---$target---$nonopt in
1076NONE---*---* | *---NONE---* | *---*---NONE) ;;
1077*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1078esac
1079
1080
1081# Make sure we can run config.sub.
1082if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1083else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1084fi
1085
1086echo $ac_n "checking host system type""... $ac_c" 1>&6
f5dbc56d 1087echo "configure:1088: checking host system type" >&5
c906108c
SS
1088
1089host_alias=$host
1090case "$host_alias" in
1091NONE)
1092 case $nonopt in
1093 NONE)
1094 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1095 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1096 fi ;;
1097 *) host_alias=$nonopt ;;
1098 esac ;;
1099esac
1100
1101host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1102host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1103host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1104host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1105echo "$ac_t""$host" 1>&6
1106
1107echo $ac_n "checking target system type""... $ac_c" 1>&6
f5dbc56d 1108echo "configure:1109: checking target system type" >&5
c906108c
SS
1109
1110target_alias=$target
1111case "$target_alias" in
1112NONE)
1113 case $nonopt in
1114 NONE) target_alias=$host_alias ;;
1115 *) target_alias=$nonopt ;;
1116 esac ;;
1117esac
1118
1119target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1120target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123echo "$ac_t""$target" 1>&6
1124
1125echo $ac_n "checking build system type""... $ac_c" 1>&6
f5dbc56d 1126echo "configure:1127: checking build system type" >&5
c906108c
SS
1127
1128build_alias=$build
1129case "$build_alias" in
1130NONE)
1131 case $nonopt in
1132 NONE) build_alias=$host_alias ;;
1133 *) build_alias=$nonopt ;;
1134 esac ;;
1135esac
1136
1137build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1138build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1139build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1140build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141echo "$ac_t""$build" 1>&6
1142
1143test "$host_alias" != "$target_alias" &&
1144 test "$program_prefix$program_suffix$program_transform_name" = \
1145 NONENONEs,x,x, &&
1146 program_prefix=${target_alias}-
1147
1148
8bb2c122
MK
1149# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1150# doesn't support cross-compilation, but the one from Autoconf 2.5x
1151# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1152# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1153# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1154# 2.5x.
1155if test $host != $build; then
1156 ac_tool_prefix=${host_alias}-
1157else
1158 ac_tool_prefix=
1159fi
1160
1161# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1162set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1163echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 1164echo "configure:1165: checking for $ac_word" >&5
8bb2c122
MK
1165if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
1168 if test -n "$RANLIB"; then
1169 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1170else
1171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1172 ac_dummy="$PATH"
1173 for ac_dir in $ac_dummy; do
1174 test -z "$ac_dir" && ac_dir=.
1175 if test -f $ac_dir/$ac_word; then
1176 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1177 break
1178 fi
1179 done
1180 IFS="$ac_save_ifs"
1181fi
1182fi
1183RANLIB="$ac_cv_prog_RANLIB"
1184if test -n "$RANLIB"; then
1185 echo "$ac_t""$RANLIB" 1>&6
1186else
1187 echo "$ac_t""no" 1>&6
1188fi
1189
1190
1191if test -z "$ac_cv_prog_RANLIB"; then
1192if test -n "$ac_tool_prefix"; then
1193 # Extract the first word of "ranlib", so it can be a program name with args.
1194set dummy ranlib; ac_word=$2
1195echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 1196echo "configure:1197: checking for $ac_word" >&5
8bb2c122
MK
1197if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1199else
1200 if test -n "$RANLIB"; then
1201 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1202else
1203 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206 test -z "$ac_dir" && ac_dir=.
1207 if test -f $ac_dir/$ac_word; then
1208 ac_cv_prog_RANLIB="ranlib"
1209 break
1210 fi
1211 done
1212 IFS="$ac_save_ifs"
1213 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1214fi
1215fi
1216RANLIB="$ac_cv_prog_RANLIB"
1217if test -n "$RANLIB"; then
1218 echo "$ac_t""$RANLIB" 1>&6
1219else
1220 echo "$ac_t""no" 1>&6
1221fi
1222
1223else
1224 RANLIB=":"
1225fi
1226fi
1227
1228
c906108c
SS
1229ALL_LINGUAS=
1230echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
f5dbc56d 1231echo "configure:1232: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1232set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1233if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1234 echo $ac_n "(cached) $ac_c" 1>&6
1235else
1236 cat > conftestmake <<\EOF
1237all:
1238 @echo 'ac_maketemp="${MAKE}"'
1239EOF
1240# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1241eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1242if test -n "$ac_maketemp"; then
1243 eval ac_cv_prog_make_${ac_make}_set=yes
1244else
1245 eval ac_cv_prog_make_${ac_make}_set=no
1246fi
1247rm -f conftestmake
1248fi
1249if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1250 echo "$ac_t""yes" 1>&6
1251 SET_MAKE=
1252else
1253 echo "$ac_t""no" 1>&6
1254 SET_MAKE="MAKE=${MAKE-make}"
1255fi
1256
1257# Extract the first word of "ranlib", so it can be a program name with args.
1258set dummy ranlib; ac_word=$2
1259echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 1260echo "configure:1261: checking for $ac_word" >&5
c906108c
SS
1261if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1263else
1264 if test -n "$RANLIB"; then
1265 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1266else
1267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1268 ac_dummy="$PATH"
1269 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 if test -f $ac_dir/$ac_word; then
1272 ac_cv_prog_RANLIB="ranlib"
1273 break
1274 fi
1275 done
1276 IFS="$ac_save_ifs"
1277 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1278fi
1279fi
1280RANLIB="$ac_cv_prog_RANLIB"
1281if test -n "$RANLIB"; then
1282 echo "$ac_t""$RANLIB" 1>&6
1283else
1284 echo "$ac_t""no" 1>&6
1285fi
1286
1287echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
f5dbc56d 1288echo "configure:1289: checking for ANSI C header files" >&5
c906108c
SS
1289if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1290 echo $ac_n "(cached) $ac_c" 1>&6
1291else
1292 cat > conftest.$ac_ext <<EOF
f5dbc56d 1293#line 1294 "configure"
c906108c
SS
1294#include "confdefs.h"
1295#include <stdlib.h>
1296#include <stdarg.h>
1297#include <string.h>
1298#include <float.h>
1299EOF
1300ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 1301{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1302ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1303if test -z "$ac_err"; then
1304 rm -rf conftest*
1305 ac_cv_header_stdc=yes
1306else
1307 echo "$ac_err" >&5
1308 echo "configure: failed program was:" >&5
1309 cat conftest.$ac_ext >&5
1310 rm -rf conftest*
1311 ac_cv_header_stdc=no
1312fi
1313rm -f conftest*
1314
1315if test $ac_cv_header_stdc = yes; then
1316 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1317cat > conftest.$ac_ext <<EOF
f5dbc56d 1318#line 1319 "configure"
c906108c
SS
1319#include "confdefs.h"
1320#include <string.h>
1321EOF
1322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1323 egrep "memchr" >/dev/null 2>&1; then
1324 :
1325else
1326 rm -rf conftest*
1327 ac_cv_header_stdc=no
1328fi
1329rm -f conftest*
1330
1331fi
1332
1333if test $ac_cv_header_stdc = yes; then
1334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1335cat > conftest.$ac_ext <<EOF
f5dbc56d 1336#line 1337 "configure"
c906108c
SS
1337#include "confdefs.h"
1338#include <stdlib.h>
1339EOF
1340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1341 egrep "free" >/dev/null 2>&1; then
1342 :
1343else
1344 rm -rf conftest*
1345 ac_cv_header_stdc=no
1346fi
1347rm -f conftest*
1348
1349fi
1350
1351if test $ac_cv_header_stdc = yes; then
1352 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1353if test "$cross_compiling" = yes; then
1354 :
1355else
1356 cat > conftest.$ac_ext <<EOF
f5dbc56d 1357#line 1358 "configure"
c906108c
SS
1358#include "confdefs.h"
1359#include <ctype.h>
1360#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1361#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1362#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1363int main () { int i; for (i = 0; i < 256; i++)
1364if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1365exit (0); }
1366
1367EOF
f5dbc56d 1368if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1369then
1370 :
1371else
1372 echo "configure: failed program was:" >&5
1373 cat conftest.$ac_ext >&5
1374 rm -fr conftest*
1375 ac_cv_header_stdc=no
1376fi
1377rm -fr conftest*
1378fi
1379
1380fi
1381fi
1382
1383echo "$ac_t""$ac_cv_header_stdc" 1>&6
1384if test $ac_cv_header_stdc = yes; then
1385 cat >> confdefs.h <<\EOF
1386#define STDC_HEADERS 1
1387EOF
1388
1389fi
1390
1391echo $ac_n "checking for working const""... $ac_c" 1>&6
f5dbc56d 1392echo "configure:1393: checking for working const" >&5
c906108c
SS
1393if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395else
1396 cat > conftest.$ac_ext <<EOF
f5dbc56d 1397#line 1398 "configure"
c906108c
SS
1398#include "confdefs.h"
1399
1400int main() {
1401
1402/* Ultrix mips cc rejects this. */
1403typedef int charset[2]; const charset x;
1404/* SunOS 4.1.1 cc rejects this. */
1405char const *const *ccp;
1406char **p;
1407/* NEC SVR4.0.2 mips cc rejects this. */
1408struct point {int x, y;};
1409static struct point const zero = {0,0};
1410/* AIX XL C 1.02.0.0 rejects this.
1411 It does not let you subtract one const X* pointer from another in an arm
1412 of an if-expression whose if-part is not a constant expression */
1413const char *g = "string";
1414ccp = &g + (g ? g-g : 0);
1415/* HPUX 7.0 cc rejects these. */
1416++ccp;
1417p = (char**) ccp;
1418ccp = (char const *const *) p;
1419{ /* SCO 3.2v4 cc rejects this. */
1420 char *t;
1421 char const *s = 0 ? (char *) 0 : (char const *) 0;
1422
1423 *t++ = 0;
1424}
1425{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1426 int x[] = {25, 17};
1427 const int *foo = &x[0];
1428 ++foo;
1429}
1430{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1431 typedef const int *iptr;
1432 iptr p = 0;
1433 ++p;
1434}
1435{ /* AIX XL C 1.02.0.0 rejects this saying
1436 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1437 struct s { int j; const int *ap[3]; };
1438 struct s *b; b->j = 5;
1439}
1440{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1441 const int foo = 10;
1442}
1443
1444; return 0; }
1445EOF
f5dbc56d 1446if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1447 rm -rf conftest*
1448 ac_cv_c_const=yes
1449else
1450 echo "configure: failed program was:" >&5
1451 cat conftest.$ac_ext >&5
1452 rm -rf conftest*
1453 ac_cv_c_const=no
1454fi
1455rm -f conftest*
1456fi
1457
1458echo "$ac_t""$ac_cv_c_const" 1>&6
1459if test $ac_cv_c_const = no; then
1460 cat >> confdefs.h <<\EOF
1461#define const
1462EOF
1463
1464fi
1465
1466echo $ac_n "checking for inline""... $ac_c" 1>&6
f5dbc56d 1467echo "configure:1468: checking for inline" >&5
c906108c
SS
1468if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1469 echo $ac_n "(cached) $ac_c" 1>&6
1470else
1471 ac_cv_c_inline=no
1472for ac_kw in inline __inline__ __inline; do
1473 cat > conftest.$ac_ext <<EOF
f5dbc56d 1474#line 1475 "configure"
c906108c
SS
1475#include "confdefs.h"
1476
1477int main() {
1478} $ac_kw foo() {
1479; return 0; }
1480EOF
f5dbc56d 1481if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1482 rm -rf conftest*
1483 ac_cv_c_inline=$ac_kw; break
1484else
1485 echo "configure: failed program was:" >&5
1486 cat conftest.$ac_ext >&5
1487fi
1488rm -f conftest*
1489done
1490
1491fi
1492
1493echo "$ac_t""$ac_cv_c_inline" 1>&6
1494case "$ac_cv_c_inline" in
1495 inline | yes) ;;
1496 no) cat >> confdefs.h <<\EOF
1497#define inline
1498EOF
1499 ;;
1500 *) cat >> confdefs.h <<EOF
1501#define inline $ac_cv_c_inline
1502EOF
1503 ;;
1504esac
1505
1506echo $ac_n "checking for off_t""... $ac_c" 1>&6
f5dbc56d 1507echo "configure:1508: checking for off_t" >&5
c906108c
SS
1508if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510else
1511 cat > conftest.$ac_ext <<EOF
f5dbc56d 1512#line 1513 "configure"
c906108c
SS
1513#include "confdefs.h"
1514#include <sys/types.h>
1515#if STDC_HEADERS
1516#include <stdlib.h>
1517#include <stddef.h>
1518#endif
1519EOF
1520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1521 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1522 rm -rf conftest*
1523 ac_cv_type_off_t=yes
1524else
1525 rm -rf conftest*
1526 ac_cv_type_off_t=no
1527fi
1528rm -f conftest*
1529
1530fi
1531echo "$ac_t""$ac_cv_type_off_t" 1>&6
1532if test $ac_cv_type_off_t = no; then
1533 cat >> confdefs.h <<\EOF
1534#define off_t long
1535EOF
1536
1537fi
1538
1539echo $ac_n "checking for size_t""... $ac_c" 1>&6
f5dbc56d 1540echo "configure:1541: checking for size_t" >&5
c906108c
SS
1541if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1542 echo $ac_n "(cached) $ac_c" 1>&6
1543else
1544 cat > conftest.$ac_ext <<EOF
f5dbc56d 1545#line 1546 "configure"
c906108c
SS
1546#include "confdefs.h"
1547#include <sys/types.h>
1548#if STDC_HEADERS
1549#include <stdlib.h>
1550#include <stddef.h>
1551#endif
1552EOF
1553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1554 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1555 rm -rf conftest*
1556 ac_cv_type_size_t=yes
1557else
1558 rm -rf conftest*
1559 ac_cv_type_size_t=no
1560fi
1561rm -f conftest*
1562
1563fi
1564echo "$ac_t""$ac_cv_type_size_t" 1>&6
1565if test $ac_cv_type_size_t = no; then
1566 cat >> confdefs.h <<\EOF
1567#define size_t unsigned
1568EOF
1569
1570fi
1571
1572# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1573# for constant arguments. Useless!
1574echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
f5dbc56d 1575echo "configure:1576: checking for working alloca.h" >&5
c906108c
SS
1576if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1577 echo $ac_n "(cached) $ac_c" 1>&6
1578else
1579 cat > conftest.$ac_ext <<EOF
f5dbc56d 1580#line 1581 "configure"
c906108c
SS
1581#include "confdefs.h"
1582#include <alloca.h>
1583int main() {
1584char *p = alloca(2 * sizeof(int));
1585; return 0; }
1586EOF
f5dbc56d 1587if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1588 rm -rf conftest*
1589 ac_cv_header_alloca_h=yes
1590else
1591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=no
1595fi
1596rm -f conftest*
1597fi
1598
1599echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1600if test $ac_cv_header_alloca_h = yes; then
1601 cat >> confdefs.h <<\EOF
1602#define HAVE_ALLOCA_H 1
1603EOF
1604
1605fi
1606
1607echo $ac_n "checking for alloca""... $ac_c" 1>&6
f5dbc56d 1608echo "configure:1609: checking for alloca" >&5
c906108c
SS
1609if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1610 echo $ac_n "(cached) $ac_c" 1>&6
1611else
1612 cat > conftest.$ac_ext <<EOF
f5dbc56d 1613#line 1614 "configure"
c906108c
SS
1614#include "confdefs.h"
1615
1616#ifdef __GNUC__
1617# define alloca __builtin_alloca
1618#else
1619# ifdef _MSC_VER
1620# include <malloc.h>
1621# define alloca _alloca
1622# else
1623# if HAVE_ALLOCA_H
1624# include <alloca.h>
1625# else
1626# ifdef _AIX
1627 #pragma alloca
1628# else
1629# ifndef alloca /* predefined by HP cc +Olibcalls */
1630char *alloca ();
1631# endif
1632# endif
1633# endif
1634# endif
1635#endif
1636
1637int main() {
1638char *p = (char *) alloca(1);
1639; return 0; }
1640EOF
f5dbc56d 1641if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1642 rm -rf conftest*
1643 ac_cv_func_alloca_works=yes
1644else
1645 echo "configure: failed program was:" >&5
1646 cat conftest.$ac_ext >&5
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=no
1649fi
1650rm -f conftest*
1651fi
1652
1653echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1654if test $ac_cv_func_alloca_works = yes; then
1655 cat >> confdefs.h <<\EOF
1656#define HAVE_ALLOCA 1
1657EOF
1658
1659fi
1660
1661if test $ac_cv_func_alloca_works = no; then
1662 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1663 # that cause trouble. Some versions do not even contain alloca or
1664 # contain a buggy version. If you still want to use their alloca,
1665 # use ar to extract alloca.o from them instead of compiling alloca.c.
1666 ALLOCA=alloca.${ac_objext}
1667 cat >> confdefs.h <<\EOF
1668#define C_ALLOCA 1
1669EOF
1670
1671
1672echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
f5dbc56d 1673echo "configure:1674: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1674if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676else
1677 cat > conftest.$ac_ext <<EOF
f5dbc56d 1678#line 1679 "configure"
c906108c
SS
1679#include "confdefs.h"
1680#if defined(CRAY) && ! defined(CRAY2)
1681webecray
1682#else
1683wenotbecray
1684#endif
1685
1686EOF
1687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1688 egrep "webecray" >/dev/null 2>&1; then
1689 rm -rf conftest*
1690 ac_cv_os_cray=yes
1691else
1692 rm -rf conftest*
1693 ac_cv_os_cray=no
1694fi
1695rm -f conftest*
1696
1697fi
1698
1699echo "$ac_t""$ac_cv_os_cray" 1>&6
1700if test $ac_cv_os_cray = yes; then
1701for ac_func in _getb67 GETB67 getb67; do
1702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 1703echo "configure:1704: checking for $ac_func" >&5
c906108c
SS
1704if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1705 echo $ac_n "(cached) $ac_c" 1>&6
1706else
1707 cat > conftest.$ac_ext <<EOF
f5dbc56d 1708#line 1709 "configure"
c906108c
SS
1709#include "confdefs.h"
1710/* System header to define __stub macros and hopefully few prototypes,
1711 which can conflict with char $ac_func(); below. */
1712#include <assert.h>
1713/* Override any gcc2 internal prototype to avoid an error. */
1714/* We use char because int might match the return type of a gcc2
1715 builtin and then its argument prototype would still apply. */
1716char $ac_func();
1717
1718int main() {
1719
1720/* The GNU C library defines this for functions which it implements
1721 to always fail with ENOSYS. Some functions are actually named
1722 something starting with __ and the normal name is an alias. */
1723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1724choke me
1725#else
1726$ac_func();
1727#endif
1728
1729; return 0; }
1730EOF
f5dbc56d 1731if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1732 rm -rf conftest*
1733 eval "ac_cv_func_$ac_func=yes"
1734else
1735 echo "configure: failed program was:" >&5
1736 cat conftest.$ac_ext >&5
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=no"
1739fi
1740rm -f conftest*
1741fi
1742
1743if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1744 echo "$ac_t""yes" 1>&6
1745 cat >> confdefs.h <<EOF
1746#define CRAY_STACKSEG_END $ac_func
1747EOF
1748
1749 break
1750else
1751 echo "$ac_t""no" 1>&6
1752fi
1753
1754done
1755fi
1756
1757echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
f5dbc56d 1758echo "configure:1759: checking stack direction for C alloca" >&5
c906108c
SS
1759if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1760 echo $ac_n "(cached) $ac_c" 1>&6
1761else
1762 if test "$cross_compiling" = yes; then
1763 ac_cv_c_stack_direction=0
1764else
1765 cat > conftest.$ac_ext <<EOF
f5dbc56d 1766#line 1767 "configure"
c906108c
SS
1767#include "confdefs.h"
1768find_stack_direction ()
1769{
1770 static char *addr = 0;
1771 auto char dummy;
1772 if (addr == 0)
1773 {
1774 addr = &dummy;
1775 return find_stack_direction ();
1776 }
1777 else
1778 return (&dummy > addr) ? 1 : -1;
1779}
1780main ()
1781{
1782 exit (find_stack_direction() < 0);
1783}
1784EOF
f5dbc56d 1785if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1786then
1787 ac_cv_c_stack_direction=1
1788else
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1791 rm -fr conftest*
1792 ac_cv_c_stack_direction=-1
1793fi
1794rm -fr conftest*
1795fi
1796
1797fi
1798
1799echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1800cat >> confdefs.h <<EOF
1801#define STACK_DIRECTION $ac_cv_c_stack_direction
1802EOF
1803
1804fi
1805
c41b7eb1 1806for ac_hdr in unistd.h
c906108c
SS
1807do
1808ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1809echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 1810echo "configure:1811: checking for $ac_hdr" >&5
c906108c
SS
1811if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1813else
1814 cat > conftest.$ac_ext <<EOF
f5dbc56d 1815#line 1816 "configure"
c906108c
SS
1816#include "confdefs.h"
1817#include <$ac_hdr>
1818EOF
1819ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 1820{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1821ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1822if test -z "$ac_err"; then
1823 rm -rf conftest*
1824 eval "ac_cv_header_$ac_safe=yes"
1825else
1826 echo "$ac_err" >&5
1827 echo "configure: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1829 rm -rf conftest*
1830 eval "ac_cv_header_$ac_safe=no"
1831fi
1832rm -f conftest*
1833fi
1834if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1835 echo "$ac_t""yes" 1>&6
1836 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1837 cat >> confdefs.h <<EOF
1838#define $ac_tr_hdr 1
1839EOF
1840
1841else
1842 echo "$ac_t""no" 1>&6
1843fi
1844done
1845
1846for ac_func in getpagesize
1847do
1848echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 1849echo "configure:1850: checking for $ac_func" >&5
c906108c
SS
1850if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
1852else
1853 cat > conftest.$ac_ext <<EOF
f5dbc56d 1854#line 1855 "configure"
c906108c
SS
1855#include "confdefs.h"
1856/* System header to define __stub macros and hopefully few prototypes,
1857 which can conflict with char $ac_func(); below. */
1858#include <assert.h>
1859/* Override any gcc2 internal prototype to avoid an error. */
1860/* We use char because int might match the return type of a gcc2
1861 builtin and then its argument prototype would still apply. */
1862char $ac_func();
1863
1864int main() {
1865
1866/* The GNU C library defines this for functions which it implements
1867 to always fail with ENOSYS. Some functions are actually named
1868 something starting with __ and the normal name is an alias. */
1869#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1870choke me
1871#else
1872$ac_func();
1873#endif
1874
1875; return 0; }
1876EOF
f5dbc56d 1877if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1878 rm -rf conftest*
1879 eval "ac_cv_func_$ac_func=yes"
1880else
1881 echo "configure: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=no"
1885fi
1886rm -f conftest*
1887fi
1888
1889if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1890 echo "$ac_t""yes" 1>&6
1891 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1892 cat >> confdefs.h <<EOF
1893#define $ac_tr_func 1
1894EOF
1895
1896else
1897 echo "$ac_t""no" 1>&6
1898fi
1899done
1900
1901echo $ac_n "checking for working mmap""... $ac_c" 1>&6
f5dbc56d 1902echo "configure:1903: checking for working mmap" >&5
c906108c
SS
1903if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1905else
1906 if test "$cross_compiling" = yes; then
1907 ac_cv_func_mmap_fixed_mapped=no
1908else
1909 cat > conftest.$ac_ext <<EOF
f5dbc56d 1910#line 1911 "configure"
c906108c
SS
1911#include "confdefs.h"
1912
1913/* Thanks to Mike Haertel and Jim Avera for this test.
1914 Here is a matrix of mmap possibilities:
1915 mmap private not fixed
1916 mmap private fixed at somewhere currently unmapped
1917 mmap private fixed at somewhere already mapped
1918 mmap shared not fixed
1919 mmap shared fixed at somewhere currently unmapped
1920 mmap shared fixed at somewhere already mapped
1921 For private mappings, we should verify that changes cannot be read()
1922 back from the file, nor mmap's back from the file at a different
1923 address. (There have been systems where private was not correctly
1924 implemented like the infamous i386 svr4.0, and systems where the
1925 VM page cache was not coherent with the filesystem buffer cache
1926 like early versions of FreeBSD and possibly contemporary NetBSD.)
1927 For shared mappings, we should conversely verify that changes get
1928 propogated back to all the places they're supposed to be.
1929
1930 Grep wants private fixed already mapped.
1931 The main things grep needs to know about mmap are:
1932 * does it exist and is it safe to write into the mmap'd area
1933 * how to use it (BSD variants) */
1934#include <sys/types.h>
1935#include <fcntl.h>
1936#include <sys/mman.h>
1937
1938/* This mess was copied from the GNU getpagesize.h. */
1939#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1940# ifdef HAVE_UNISTD_H
1941# include <unistd.h>
1942# endif
c906108c
SS
1943
1944/* Assume that all systems that can run configure have sys/param.h. */
1945# ifndef HAVE_SYS_PARAM_H
1946# define HAVE_SYS_PARAM_H 1
1947# endif
1948
1949# ifdef _SC_PAGESIZE
1950# define getpagesize() sysconf(_SC_PAGESIZE)
1951# else /* no _SC_PAGESIZE */
1952# ifdef HAVE_SYS_PARAM_H
1953# include <sys/param.h>
1954# ifdef EXEC_PAGESIZE
1955# define getpagesize() EXEC_PAGESIZE
1956# else /* no EXEC_PAGESIZE */
1957# ifdef NBPG
1958# define getpagesize() NBPG * CLSIZE
1959# ifndef CLSIZE
1960# define CLSIZE 1
1961# endif /* no CLSIZE */
1962# else /* no NBPG */
1963# ifdef NBPC
1964# define getpagesize() NBPC
1965# else /* no NBPC */
1966# ifdef PAGESIZE
1967# define getpagesize() PAGESIZE
1968# endif /* PAGESIZE */
1969# endif /* no NBPC */
1970# endif /* no NBPG */
1971# endif /* no EXEC_PAGESIZE */
1972# else /* no HAVE_SYS_PARAM_H */
1973# define getpagesize() 8192 /* punt totally */
1974# endif /* no HAVE_SYS_PARAM_H */
1975# endif /* no _SC_PAGESIZE */
1976
1977#endif /* no HAVE_GETPAGESIZE */
1978
1979#ifdef __cplusplus
1980extern "C" { void *malloc(unsigned); }
1981#else
1982char *malloc();
1983#endif
1984
1985int
1986main()
1987{
1988 char *data, *data2, *data3;
1989 int i, pagesize;
1990 int fd;
1991
1992 pagesize = getpagesize();
1993
1994 /*
1995 * First, make a file with some known garbage in it.
1996 */
1997 data = malloc(pagesize);
1998 if (!data)
1999 exit(1);
2000 for (i = 0; i < pagesize; ++i)
2001 *(data + i) = rand();
2002 umask(0);
2003 fd = creat("conftestmmap", 0600);
2004 if (fd < 0)
2005 exit(1);
2006 if (write(fd, data, pagesize) != pagesize)
2007 exit(1);
2008 close(fd);
2009
2010 /*
2011 * Next, try to mmap the file at a fixed address which
2012 * already has something else allocated at it. If we can,
2013 * also make sure that we see the same garbage.
2014 */
2015 fd = open("conftestmmap", O_RDWR);
2016 if (fd < 0)
2017 exit(1);
2018 data2 = malloc(2 * pagesize);
2019 if (!data2)
2020 exit(1);
2021 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2022 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2023 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2024 exit(1);
2025 for (i = 0; i < pagesize; ++i)
2026 if (*(data + i) != *(data2 + i))
2027 exit(1);
2028
2029 /*
2030 * Finally, make sure that changes to the mapped area
2031 * do not percolate back to the file as seen by read().
2032 * (This is a bug on some variants of i386 svr4.0.)
2033 */
2034 for (i = 0; i < pagesize; ++i)
2035 *(data2 + i) = *(data2 + i) + 1;
2036 data3 = malloc(pagesize);
2037 if (!data3)
2038 exit(1);
2039 if (read(fd, data3, pagesize) != pagesize)
2040 exit(1);
2041 for (i = 0; i < pagesize; ++i)
2042 if (*(data + i) != *(data3 + i))
2043 exit(1);
2044 close(fd);
2045 unlink("conftestmmap");
2046 exit(0);
2047}
2048
2049EOF
f5dbc56d 2050if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2051then
2052 ac_cv_func_mmap_fixed_mapped=yes
2053else
2054 echo "configure: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 rm -fr conftest*
2057 ac_cv_func_mmap_fixed_mapped=no
2058fi
2059rm -fr conftest*
2060fi
2061
2062fi
2063
2064echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2065if test $ac_cv_func_mmap_fixed_mapped = yes; then
2066 cat >> confdefs.h <<\EOF
2067#define HAVE_MMAP 1
2068EOF
2069
2070fi
2071
2072
2073 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2074unistd.h values.h sys/param.h
2075do
2076ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2077echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 2078echo "configure:2079: checking for $ac_hdr" >&5
c906108c
SS
2079if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2080 echo $ac_n "(cached) $ac_c" 1>&6
2081else
2082 cat > conftest.$ac_ext <<EOF
f5dbc56d 2083#line 2084 "configure"
c906108c
SS
2084#include "confdefs.h"
2085#include <$ac_hdr>
2086EOF
2087ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 2088{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2089ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2090if test -z "$ac_err"; then
2091 rm -rf conftest*
2092 eval "ac_cv_header_$ac_safe=yes"
2093else
2094 echo "$ac_err" >&5
2095 echo "configure: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097 rm -rf conftest*
2098 eval "ac_cv_header_$ac_safe=no"
2099fi
2100rm -f conftest*
2101fi
2102if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2103 echo "$ac_t""yes" 1>&6
2104 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2105 cat >> confdefs.h <<EOF
2106#define $ac_tr_hdr 1
2107EOF
2108
2109else
2110 echo "$ac_t""no" 1>&6
2111fi
2112done
2113
2114 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2115__argz_count __argz_stringify __argz_next
2116do
2117echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 2118echo "configure:2119: checking for $ac_func" >&5
c906108c
SS
2119if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2120 echo $ac_n "(cached) $ac_c" 1>&6
2121else
2122 cat > conftest.$ac_ext <<EOF
f5dbc56d 2123#line 2124 "configure"
c906108c
SS
2124#include "confdefs.h"
2125/* System header to define __stub macros and hopefully few prototypes,
2126 which can conflict with char $ac_func(); below. */
2127#include <assert.h>
2128/* Override any gcc2 internal prototype to avoid an error. */
2129/* We use char because int might match the return type of a gcc2
2130 builtin and then its argument prototype would still apply. */
2131char $ac_func();
2132
2133int main() {
2134
2135/* The GNU C library defines this for functions which it implements
2136 to always fail with ENOSYS. Some functions are actually named
2137 something starting with __ and the normal name is an alias. */
2138#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2139choke me
2140#else
2141$ac_func();
2142#endif
2143
2144; return 0; }
2145EOF
f5dbc56d 2146if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2147 rm -rf conftest*
2148 eval "ac_cv_func_$ac_func=yes"
2149else
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=no"
2154fi
2155rm -f conftest*
2156fi
2157
2158if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2159 echo "$ac_t""yes" 1>&6
2160 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2161 cat >> confdefs.h <<EOF
2162#define $ac_tr_func 1
2163EOF
2164
2165else
2166 echo "$ac_t""no" 1>&6
2167fi
2168done
2169
2170
2171 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2172 for ac_func in stpcpy
2173do
2174echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 2175echo "configure:2176: checking for $ac_func" >&5
c906108c
SS
2176if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2177 echo $ac_n "(cached) $ac_c" 1>&6
2178else
2179 cat > conftest.$ac_ext <<EOF
f5dbc56d 2180#line 2181 "configure"
c906108c
SS
2181#include "confdefs.h"
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $ac_func(); below. */
2184#include <assert.h>
2185/* Override any gcc2 internal prototype to avoid an error. */
2186/* We use char because int might match the return type of a gcc2
2187 builtin and then its argument prototype would still apply. */
2188char $ac_func();
2189
2190int main() {
2191
2192/* The GNU C library defines this for functions which it implements
2193 to always fail with ENOSYS. Some functions are actually named
2194 something starting with __ and the normal name is an alias. */
2195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2196choke me
2197#else
2198$ac_func();
2199#endif
2200
2201; return 0; }
2202EOF
f5dbc56d 2203if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2204 rm -rf conftest*
2205 eval "ac_cv_func_$ac_func=yes"
2206else
2207 echo "configure: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=no"
2211fi
2212rm -f conftest*
2213fi
2214
2215if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2216 echo "$ac_t""yes" 1>&6
2217 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2218 cat >> confdefs.h <<EOF
2219#define $ac_tr_func 1
2220EOF
2221
2222else
2223 echo "$ac_t""no" 1>&6
2224fi
2225done
2226
2227 fi
2228 if test "${ac_cv_func_stpcpy}" = "yes"; then
2229 cat >> confdefs.h <<\EOF
2230#define HAVE_STPCPY 1
2231EOF
2232
2233 fi
2234
2235 if test $ac_cv_header_locale_h = yes; then
2236 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
f5dbc56d 2237echo "configure:2238: checking for LC_MESSAGES" >&5
c906108c
SS
2238if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2239 echo $ac_n "(cached) $ac_c" 1>&6
2240else
2241 cat > conftest.$ac_ext <<EOF
f5dbc56d 2242#line 2243 "configure"
c906108c
SS
2243#include "confdefs.h"
2244#include <locale.h>
2245int main() {
2246return LC_MESSAGES
2247; return 0; }
2248EOF
f5dbc56d 2249if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2250 rm -rf conftest*
2251 am_cv_val_LC_MESSAGES=yes
2252else
2253 echo "configure: failed program was:" >&5
2254 cat conftest.$ac_ext >&5
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=no
2257fi
2258rm -f conftest*
2259fi
2260
2261echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2262 if test $am_cv_val_LC_MESSAGES = yes; then
2263 cat >> confdefs.h <<\EOF
2264#define HAVE_LC_MESSAGES 1
2265EOF
2266
2267 fi
2268 fi
2269 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
f5dbc56d 2270echo "configure:2271: checking whether NLS is requested" >&5
c906108c
SS
2271 # Check whether --enable-nls or --disable-nls was given.
2272if test "${enable_nls+set}" = set; then
2273 enableval="$enable_nls"
2274 USE_NLS=$enableval
2275else
2276 USE_NLS=yes
2277fi
2278
2279 echo "$ac_t""$USE_NLS" 1>&6
2280
2281
2282 USE_INCLUDED_LIBINTL=no
2283
2284 if test "$USE_NLS" = "yes"; then
2285 cat >> confdefs.h <<\EOF
2286#define ENABLE_NLS 1
2287EOF
2288
2289 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
f5dbc56d 2290echo "configure:2291: checking whether included gettext is requested" >&5
c906108c
SS
2291 # Check whether --with-included-gettext or --without-included-gettext was given.
2292if test "${with_included_gettext+set}" = set; then
2293 withval="$with_included_gettext"
2294 nls_cv_force_use_gnu_gettext=$withval
2295else
2296 nls_cv_force_use_gnu_gettext=no
2297fi
2298
2299 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2300
2301 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2302 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2303 nls_cv_header_intl=
2304 nls_cv_header_libgt=
2305 CATOBJEXT=NONE
2306
2307 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2308echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
f5dbc56d 2309echo "configure:2310: checking for libintl.h" >&5
c906108c
SS
2310if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2311 echo $ac_n "(cached) $ac_c" 1>&6
2312else
2313 cat > conftest.$ac_ext <<EOF
f5dbc56d 2314#line 2315 "configure"
c906108c
SS
2315#include "confdefs.h"
2316#include <libintl.h>
2317EOF
2318ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 2319{ (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2320ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321if test -z "$ac_err"; then
2322 rm -rf conftest*
2323 eval "ac_cv_header_$ac_safe=yes"
2324else
2325 echo "$ac_err" >&5
2326 echo "configure: failed program was:" >&5
2327 cat conftest.$ac_ext >&5
2328 rm -rf conftest*
2329 eval "ac_cv_header_$ac_safe=no"
2330fi
2331rm -f conftest*
2332fi
2333if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2334 echo "$ac_t""yes" 1>&6
2335 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
f5dbc56d 2336echo "configure:2337: checking for gettext in libc" >&5
c906108c
SS
2337if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2338 echo $ac_n "(cached) $ac_c" 1>&6
2339else
2340 cat > conftest.$ac_ext <<EOF
f5dbc56d 2341#line 2342 "configure"
c906108c
SS
2342#include "confdefs.h"
2343#include <libintl.h>
2344int main() {
2345return (int) gettext ("")
2346; return 0; }
2347EOF
f5dbc56d 2348if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2349 rm -rf conftest*
2350 gt_cv_func_gettext_libc=yes
2351else
2352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=no
2356fi
2357rm -f conftest*
2358fi
2359
2360echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2361
2362 if test "$gt_cv_func_gettext_libc" != "yes"; then
2363 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
f5dbc56d 2364echo "configure:2365: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2365ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2366if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2367 echo $ac_n "(cached) $ac_c" 1>&6
2368else
2369 ac_save_LIBS="$LIBS"
2370LIBS="-lintl $LIBS"
2371cat > conftest.$ac_ext <<EOF
f5dbc56d 2372#line 2373 "configure"
c906108c
SS
2373#include "confdefs.h"
2374/* Override any gcc2 internal prototype to avoid an error. */
2375/* We use char because int might match the return type of a gcc2
2376 builtin and then its argument prototype would still apply. */
2377char bindtextdomain();
2378
2379int main() {
2380bindtextdomain()
2381; return 0; }
2382EOF
f5dbc56d 2383if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2384 rm -rf conftest*
2385 eval "ac_cv_lib_$ac_lib_var=yes"
2386else
2387 echo "configure: failed program was:" >&5
2388 cat conftest.$ac_ext >&5
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=no"
2391fi
2392rm -f conftest*
2393LIBS="$ac_save_LIBS"
2394
2395fi
2396if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2397 echo "$ac_t""yes" 1>&6
2398 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
f5dbc56d 2399echo "configure:2400: checking for gettext in libintl" >&5
c906108c
SS
2400if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2401 echo $ac_n "(cached) $ac_c" 1>&6
2402else
2403 cat > conftest.$ac_ext <<EOF
f5dbc56d 2404#line 2405 "configure"
c906108c
SS
2405#include "confdefs.h"
2406
2407int main() {
2408return (int) gettext ("")
2409; return 0; }
2410EOF
f5dbc56d 2411if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2412 rm -rf conftest*
2413 gt_cv_func_gettext_libintl=yes
2414else
2415 echo "configure: failed program was:" >&5
2416 cat conftest.$ac_ext >&5
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=no
2419fi
2420rm -f conftest*
2421fi
2422
2423echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2424else
2425 echo "$ac_t""no" 1>&6
2426fi
2427
2428 fi
2429
2430 if test "$gt_cv_func_gettext_libc" = "yes" \
2431 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2432 cat >> confdefs.h <<\EOF
2433#define HAVE_GETTEXT 1
2434EOF
2435
2436 # Extract the first word of "msgfmt", so it can be a program name with args.
2437set dummy msgfmt; ac_word=$2
2438echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2439echo "configure:2440: checking for $ac_word" >&5
c906108c
SS
2440if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2441 echo $ac_n "(cached) $ac_c" 1>&6
2442else
2443 case "$MSGFMT" in
2444 /*)
2445 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2446 ;;
2447 *)
2448 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2449 for ac_dir in $PATH; do
2450 test -z "$ac_dir" && ac_dir=.
2451 if test -f $ac_dir/$ac_word; then
2452 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2453 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2454 break
2455 fi
2456 fi
2457 done
2458 IFS="$ac_save_ifs"
2459 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2460 ;;
2461esac
2462fi
2463MSGFMT="$ac_cv_path_MSGFMT"
2464if test -n "$MSGFMT"; then
2465 echo "$ac_t""$MSGFMT" 1>&6
2466else
2467 echo "$ac_t""no" 1>&6
2468fi
2469 if test "$MSGFMT" != "no"; then
2470 for ac_func in dcgettext
2471do
2472echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 2473echo "configure:2474: checking for $ac_func" >&5
c906108c
SS
2474if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2475 echo $ac_n "(cached) $ac_c" 1>&6
2476else
2477 cat > conftest.$ac_ext <<EOF
f5dbc56d 2478#line 2479 "configure"
c906108c
SS
2479#include "confdefs.h"
2480/* System header to define __stub macros and hopefully few prototypes,
2481 which can conflict with char $ac_func(); below. */
2482#include <assert.h>
2483/* Override any gcc2 internal prototype to avoid an error. */
2484/* We use char because int might match the return type of a gcc2
2485 builtin and then its argument prototype would still apply. */
2486char $ac_func();
2487
2488int main() {
2489
2490/* The GNU C library defines this for functions which it implements
2491 to always fail with ENOSYS. Some functions are actually named
2492 something starting with __ and the normal name is an alias. */
2493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2494choke me
2495#else
2496$ac_func();
2497#endif
2498
2499; return 0; }
2500EOF
f5dbc56d 2501if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2502 rm -rf conftest*
2503 eval "ac_cv_func_$ac_func=yes"
2504else
2505 echo "configure: failed program was:" >&5
2506 cat conftest.$ac_ext >&5
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=no"
2509fi
2510rm -f conftest*
2511fi
2512
2513if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2514 echo "$ac_t""yes" 1>&6
2515 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2516 cat >> confdefs.h <<EOF
2517#define $ac_tr_func 1
2518EOF
2519
2520else
2521 echo "$ac_t""no" 1>&6
2522fi
2523done
2524
2525 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2526set dummy gmsgfmt; ac_word=$2
2527echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2528echo "configure:2529: checking for $ac_word" >&5
c906108c
SS
2529if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2530 echo $ac_n "(cached) $ac_c" 1>&6
2531else
2532 case "$GMSGFMT" in
2533 /*)
2534 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2535 ;;
2536 ?:/*)
2537 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2538 ;;
2539 *)
2540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2541 ac_dummy="$PATH"
2542 for ac_dir in $ac_dummy; do
2543 test -z "$ac_dir" && ac_dir=.
2544 if test -f $ac_dir/$ac_word; then
2545 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2546 break
2547 fi
2548 done
2549 IFS="$ac_save_ifs"
2550 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2551 ;;
2552esac
2553fi
2554GMSGFMT="$ac_cv_path_GMSGFMT"
2555if test -n "$GMSGFMT"; then
2556 echo "$ac_t""$GMSGFMT" 1>&6
2557else
2558 echo "$ac_t""no" 1>&6
2559fi
2560
2561 # Extract the first word of "xgettext", so it can be a program name with args.
2562set dummy xgettext; ac_word=$2
2563echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2564echo "configure:2565: checking for $ac_word" >&5
c906108c
SS
2565if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2566 echo $ac_n "(cached) $ac_c" 1>&6
2567else
2568 case "$XGETTEXT" in
2569 /*)
2570 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2571 ;;
2572 *)
2573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2574 for ac_dir in $PATH; do
2575 test -z "$ac_dir" && ac_dir=.
2576 if test -f $ac_dir/$ac_word; then
2577 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2578 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2579 break
2580 fi
2581 fi
2582 done
2583 IFS="$ac_save_ifs"
2584 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2585 ;;
2586esac
2587fi
2588XGETTEXT="$ac_cv_path_XGETTEXT"
2589if test -n "$XGETTEXT"; then
2590 echo "$ac_t""$XGETTEXT" 1>&6
2591else
2592 echo "$ac_t""no" 1>&6
2593fi
2594
2595 cat > conftest.$ac_ext <<EOF
f5dbc56d 2596#line 2597 "configure"
c906108c
SS
2597#include "confdefs.h"
2598
2599int main() {
2600extern int _nl_msg_cat_cntr;
2601 return _nl_msg_cat_cntr
2602; return 0; }
2603EOF
f5dbc56d 2604if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2605 rm -rf conftest*
2606 CATOBJEXT=.gmo
2607 DATADIRNAME=share
2608else
2609 echo "configure: failed program was:" >&5
2610 cat conftest.$ac_ext >&5
2611 rm -rf conftest*
2612 CATOBJEXT=.mo
2613 DATADIRNAME=lib
2614fi
2615rm -f conftest*
2616 INSTOBJEXT=.mo
2617 fi
2618 fi
2619
2620else
2621 echo "$ac_t""no" 1>&6
2622fi
2623
2624
2625
2626 if test "$CATOBJEXT" = "NONE"; then
2627 nls_cv_use_gnu_gettext=yes
2628 fi
2629 fi
2630
2631 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2632 INTLOBJS="\$(GETTOBJS)"
2633 # Extract the first word of "msgfmt", so it can be a program name with args.
2634set dummy msgfmt; ac_word=$2
2635echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2636echo "configure:2637: checking for $ac_word" >&5
c906108c
SS
2637if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2638 echo $ac_n "(cached) $ac_c" 1>&6
2639else
2640 case "$MSGFMT" in
2641 /*)
2642 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2643 ;;
2644 *)
2645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2646 for ac_dir in $PATH; do
2647 test -z "$ac_dir" && ac_dir=.
2648 if test -f $ac_dir/$ac_word; then
2649 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2650 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2651 break
2652 fi
2653 fi
2654 done
2655 IFS="$ac_save_ifs"
2656 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2657 ;;
2658esac
2659fi
2660MSGFMT="$ac_cv_path_MSGFMT"
2661if test -n "$MSGFMT"; then
2662 echo "$ac_t""$MSGFMT" 1>&6
2663else
2664 echo "$ac_t""no" 1>&6
2665fi
2666
2667 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2668set dummy gmsgfmt; ac_word=$2
2669echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2670echo "configure:2671: checking for $ac_word" >&5
c906108c
SS
2671if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2672 echo $ac_n "(cached) $ac_c" 1>&6
2673else
2674 case "$GMSGFMT" in
2675 /*)
2676 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2677 ;;
2678 ?:/*)
2679 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2680 ;;
2681 *)
2682 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2683 ac_dummy="$PATH"
2684 for ac_dir in $ac_dummy; do
2685 test -z "$ac_dir" && ac_dir=.
2686 if test -f $ac_dir/$ac_word; then
2687 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2688 break
2689 fi
2690 done
2691 IFS="$ac_save_ifs"
2692 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2693 ;;
2694esac
2695fi
2696GMSGFMT="$ac_cv_path_GMSGFMT"
2697if test -n "$GMSGFMT"; then
2698 echo "$ac_t""$GMSGFMT" 1>&6
2699else
2700 echo "$ac_t""no" 1>&6
2701fi
2702
2703 # Extract the first word of "xgettext", so it can be a program name with args.
2704set dummy xgettext; ac_word=$2
2705echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 2706echo "configure:2707: checking for $ac_word" >&5
c906108c
SS
2707if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2708 echo $ac_n "(cached) $ac_c" 1>&6
2709else
2710 case "$XGETTEXT" in
2711 /*)
2712 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2713 ;;
2714 *)
2715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2716 for ac_dir in $PATH; do
2717 test -z "$ac_dir" && ac_dir=.
2718 if test -f $ac_dir/$ac_word; then
2719 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2720 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2721 break
2722 fi
2723 fi
2724 done
2725 IFS="$ac_save_ifs"
2726 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2727 ;;
2728esac
2729fi
2730XGETTEXT="$ac_cv_path_XGETTEXT"
2731if test -n "$XGETTEXT"; then
2732 echo "$ac_t""$XGETTEXT" 1>&6
2733else
2734 echo "$ac_t""no" 1>&6
2735fi
2736
2737
2738 USE_INCLUDED_LIBINTL=yes
2739 CATOBJEXT=.gmo
2740 INSTOBJEXT=.mo
2741 DATADIRNAME=share
2742 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2743 INTLLIBS=$INTLDEPS
2744 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2745 nls_cv_header_intl=libintl.h
2746 nls_cv_header_libgt=libgettext.h
2747 fi
2748
2749 if test "$XGETTEXT" != ":"; then
2750 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2751 : ;
2752 else
2753 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2754 XGETTEXT=":"
2755 fi
2756 fi
2757
2758 # We need to process the po/ directory.
2759 POSUB=po
2760 else
2761 DATADIRNAME=share
2762 nls_cv_header_intl=libintl.h
2763 nls_cv_header_libgt=libgettext.h
2764 fi
2765
2766 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2767 # because some of the sources are only built for this goal.
2768 if test "$PACKAGE" = gettext; then
2769 USE_NLS=yes
2770 USE_INCLUDED_LIBINTL=yes
2771 fi
2772
2773 for lang in $ALL_LINGUAS; do
2774 GMOFILES="$GMOFILES $lang.gmo"
2775 POFILES="$POFILES $lang.po"
2776 done
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791 if test "x$CATOBJEXT" != "x"; then
2792 if test "x$ALL_LINGUAS" = "x"; then
2793 LINGUAS=
2794 else
2795 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
f5dbc56d 2796echo "configure:2797: checking for catalogs to be installed" >&5
c906108c
SS
2797 NEW_LINGUAS=
2798 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2799 case "$ALL_LINGUAS" in
2800 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2801 esac
2802 done
2803 LINGUAS=$NEW_LINGUAS
2804 echo "$ac_t""$LINGUAS" 1>&6
2805 fi
2806
2807 if test -n "$LINGUAS"; then
2808 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2809 fi
2810 fi
2811
2812 if test $ac_cv_header_locale_h = yes; then
2813 INCLUDE_LOCALE_H="#include <locale.h>"
2814 else
2815 INCLUDE_LOCALE_H="\
2816/* The system does not provide the header <locale.h>. Take care yourself. */"
2817 fi
2818
2819
2820 if test -f $srcdir/po2tbl.sed.in; then
2821 if test "$CATOBJEXT" = ".cat"; then
2822 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2823echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
f5dbc56d 2824echo "configure:2825: checking for linux/version.h" >&5
c906108c
SS
2825if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827else
2828 cat > conftest.$ac_ext <<EOF
f5dbc56d 2829#line 2830 "configure"
c906108c
SS
2830#include "confdefs.h"
2831#include <linux/version.h>
2832EOF
2833ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 2834{ (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2835ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2836if test -z "$ac_err"; then
2837 rm -rf conftest*
2838 eval "ac_cv_header_$ac_safe=yes"
2839else
2840 echo "$ac_err" >&5
2841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2843 rm -rf conftest*
2844 eval "ac_cv_header_$ac_safe=no"
2845fi
2846rm -f conftest*
2847fi
2848if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2849 echo "$ac_t""yes" 1>&6
2850 msgformat=linux
2851else
2852 echo "$ac_t""no" 1>&6
2853msgformat=xopen
2854fi
2855
2856
2857 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2858 fi
2859 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2860 $srcdir/po2tbl.sed.in > po2tbl.sed
2861 fi
2862
2863 if test "$PACKAGE" = "gettext"; then
2864 GT_NO="#NO#"
2865 GT_YES=
2866 else
2867 GT_NO=
2868 GT_YES="#YES#"
2869 fi
2870
2871
2872
2873 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2874
2875
2876 l=
2877
2878
4536bbc6 2879 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2880 test -d po || mkdir po
2881 if test "x$srcdir" != "x."; then
2882 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2883 posrcprefix="$srcdir/"
2884 else
2885 posrcprefix="../$srcdir/"
2886 fi
2887 else
2888 posrcprefix="../"
2889 fi
2890 rm -f po/POTFILES
2891 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2892 < $srcdir/po/POTFILES.in > po/POTFILES
2893 fi
2894
0fbb3da7
TT
2895cat >> confdefs.h <<\EOF
2896#define PACKAGE "gdb"
2897EOF
2898
2899
c906108c
SS
2900
2901
2902CONFIG_OBS=
66b965bb 2903CONFIG_LIB_OBS=
c906108c
SS
2904CONFIG_DEPS=
2905CONFIG_SRCS=
fb40c209
AC
2906CONFIG_INITS=
2907ENABLE_CFLAGS=
b3a90332
AC
2908CONFIG_ALL=
2909CONFIG_CLEAN=
e56ac5c3
AC
2910CONFIG_INSTALL=
2911CONFIG_UNINSTALL=
c906108c 2912
ffc6a242 2913SUBDIRS="doc testsuite nlm"
c906108c
SS
2914configdirs="doc testsuite"
2915
96baa820
JM
2916# Check whether --enable-multi-ice or --disable-multi-ice was given.
2917if test "${enable_multi_ice+set}" = set; then
2918 enableval="$enable_multi_ice"
2919 case "${enableval}" in
2920 yes ) enable_multi_ice="yes" ;;
2921 no) enable_multi_ice="no" ;;
2922 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2923 esac
2924
2925fi
2926
2927
2928if test "${enable_multi_ice}" = "yes"; then
2929 configdirs="${configdirs} multi-ice"
2930fi
2931
c906108c
SS
2932
2933. ${srcdir}/configure.host
2934
2935. ${srcdir}/configure.tgt
2936
1ba607ad
AC
2937targ=${target} ; . ${srcdir}/../bfd/config.bfd
2938
2939
2940targ=${target}
2941. ${srcdir}/../bfd/config.bfd
5c8cc331
AC
2942
2943targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2944
1ba607ad
AC
2945if test x"${targ_archs}" != x ; then
2946 cat >> confdefs.h <<EOF
2947#define DEFAULT_BFD_ARCH ${targ_archs}
2948EOF
2949
2950fi
2951if test x"${targ_defvec}" != x ; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_VEC ${targ_defvec}
2954EOF
2955
2956fi
c906108c 2957
8bb2c122
MK
2958if test "$program_transform_name" = s,x,x,; then
2959 program_transform_name=
2960else
2961 # Double any \ or $. echo might interpret backslashes.
2962 cat <<\EOF_SED > conftestsed
2963s,\\,\\\\,g; s,\$,$$,g
2964EOF_SED
2965 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2966 rm -f conftestsed
2967fi
2968test "$program_prefix" != NONE &&
2969 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2970# Use a double $ so make ignores it.
2971test "$program_suffix" != NONE &&
2972 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2973
2974# sed with no file args requires a program.
2975test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2976
2977
627af7ea
MK
2978# The CLI cannot be disabled yet, but may be in the future.
2979
2980# Enable CLI.
2981# Check whether --enable-gdbcli or --disable-gdbcli was given.
2982if test "${enable_gdbcli+set}" = set; then
2983 enableval="$enable_gdbcli"
2984 case $enableval in
2985 yes)
2986 ;;
2987 no)
2988 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2989 *)
2990 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2991 esac
2992else
2993 enable_gdbcli=yes
2994fi
2995
2996if test x"$enable_gdbcli" = xyes; then
2997 if test -d $srcdir/cli; then
2998 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2999 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3000 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3001 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3002 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3003 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3004 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3005 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3006 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3007 fi
3008fi
3009
3010# Enable MI.
3011# Check whether --enable-gdbmi or --disable-gdbmi was given.
3012if test "${enable_gdbmi+set}" = set; then
3013 enableval="$enable_gdbmi"
3014 case $enableval in
3015 yes | no)
3016 ;;
3017 *)
3018 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3019 esac
3020else
3021 enable_gdbmi=yes
3022fi
3023
3024if test x"$enable_gdbmi" = xyes; then
3025 if test -d $srcdir/mi; then
3026 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3027 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3028 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3029 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3031 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3032 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3033 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3034 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3035 fi
3036fi
3037
06825bd1
MK
3038# Enable TUI.
3039# Check whether --enable-tui or --disable-tui was given.
3040if test "${enable_tui+set}" = set; then
3041 enableval="$enable_tui"
3042 case $enableval in
3043 yes | no)
3044 ;;
3045 *)
3046 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3047 esac
3048fi
3049
3050if test x"$enable_tui" = xyes; then
3051 if test -d $srcdir/tui; then
3052 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3053 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3054 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3055 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3056 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3057 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3058 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3059 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3060 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3061 need_curses=yes
3062 fi
3063fi
3064
8bb2c122
MK
3065# --------------------- #
3066# Checks for programs. #
3067# --------------------- #
3068
c41b7eb1 3069for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3070do
3071# Extract the first word of "$ac_prog", so it can be a program name with args.
3072set dummy $ac_prog; ac_word=$2
3073echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3074echo "configure:3075: checking for $ac_word" >&5
7a292a7a
SS
3075if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3076 echo $ac_n "(cached) $ac_c" 1>&6
3077else
3078 if test -n "$AWK"; then
3079 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3080else
3081 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3082 ac_dummy="$PATH"
3083 for ac_dir in $ac_dummy; do
3084 test -z "$ac_dir" && ac_dir=.
3085 if test -f $ac_dir/$ac_word; then
3086 ac_cv_prog_AWK="$ac_prog"
3087 break
3088 fi
3089 done
3090 IFS="$ac_save_ifs"
3091fi
3092fi
3093AWK="$ac_cv_prog_AWK"
3094if test -n "$AWK"; then
3095 echo "$ac_t""$AWK" 1>&6
3096else
3097 echo "$ac_t""no" 1>&6
3098fi
3099
3100test -n "$AWK" && break
3101done
3102
c906108c
SS
3103# Find a good install program. We prefer a C program (faster),
3104# so one script is as good as another. But avoid the broken or
3105# incompatible versions:
3106# SysV /etc/install, /usr/sbin/install
3107# SunOS /usr/etc/install
3108# IRIX /sbin/install
3109# AIX /bin/install
3110# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3111# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3112# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3113# ./install, which can be erroneously created by make from ./install.sh.
3114echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
f5dbc56d 3115echo "configure:3116: checking for a BSD compatible install" >&5
c906108c
SS
3116if test -z "$INSTALL"; then
3117if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3121 for ac_dir in $PATH; do
3122 # Account for people who put trailing slashes in PATH elements.
3123 case "$ac_dir/" in
3124 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3125 *)
3126 # OSF1 and SCO ODT 3.0 have their own names for install.
3127 # Don't use installbsd from OSF since it installs stuff as root
3128 # by default.
3129 for ac_prog in ginstall scoinst install; do
3130 if test -f $ac_dir/$ac_prog; then
3131 if test $ac_prog = install &&
3132 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3133 # AIX install. It has an incompatible calling convention.
3134 :
3135 else
3136 ac_cv_path_install="$ac_dir/$ac_prog -c"
3137 break 2
3138 fi
3139 fi
3140 done
3141 ;;
3142 esac
3143 done
3144 IFS="$ac_save_IFS"
3145
3146fi
3147 if test "${ac_cv_path_install+set}" = set; then
3148 INSTALL="$ac_cv_path_install"
3149 else
3150 # As a last resort, use the slow shell script. We don't cache a
3151 # path for INSTALL within a source directory, because that will
3152 # break other packages using the cache if that directory is
3153 # removed, or if the path is relative.
3154 INSTALL="$ac_install_sh"
3155 fi
3156fi
3157echo "$ac_t""$INSTALL" 1>&6
3158
3159# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3160# It thinks the first close brace ends the variable substitution.
3161test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3162
3163test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3164
3165test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3166
8bb2c122 3167echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
f5dbc56d 3168echo "configure:3169: checking whether ln -s works" >&5
8bb2c122
MK
3169if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3170 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3171else
8bb2c122
MK
3172 rm -f conftestdata
3173if ln -s X conftestdata 2>/dev/null
3174then
3175 rm -f conftestdata
3176 ac_cv_prog_LN_S="ln -s"
3177else
3178 ac_cv_prog_LN_S=ln
3179fi
3180fi
3181LN_S="$ac_cv_prog_LN_S"
3182if test "$ac_cv_prog_LN_S" = "ln -s"; then
3183 echo "$ac_t""yes" 1>&6
3184else
3185 echo "$ac_t""no" 1>&6
c906108c
SS
3186fi
3187
8bb2c122
MK
3188# Extract the first word of "ranlib", so it can be a program name with args.
3189set dummy ranlib; ac_word=$2
c906108c 3190echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3191echo "configure:3192: checking for $ac_word" >&5
8bb2c122 3192if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3193 echo $ac_n "(cached) $ac_c" 1>&6
3194else
8bb2c122
MK
3195 if test -n "$RANLIB"; then
3196 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3197else
3198 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3199 ac_dummy="$PATH"
3200 for ac_dir in $ac_dummy; do
3201 test -z "$ac_dir" && ac_dir=.
3202 if test -f $ac_dir/$ac_word; then
8bb2c122 3203 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3204 break
3205 fi
3206 done
3207 IFS="$ac_save_ifs"
8bb2c122 3208 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3209fi
3210fi
8bb2c122
MK
3211RANLIB="$ac_cv_prog_RANLIB"
3212if test -n "$RANLIB"; then
3213 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3214else
3215 echo "$ac_t""no" 1>&6
3216fi
3217
8bb2c122
MK
3218for ac_prog in 'bison -y' byacc
3219do
3220# Extract the first word of "$ac_prog", so it can be a program name with args.
3221set dummy $ac_prog; ac_word=$2
c906108c 3222echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3223echo "configure:3224: checking for $ac_word" >&5
8bb2c122 3224if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3225 echo $ac_n "(cached) $ac_c" 1>&6
3226else
8bb2c122
MK
3227 if test -n "$YACC"; then
3228 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3229else
3230 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233 test -z "$ac_dir" && ac_dir=.
3234 if test -f $ac_dir/$ac_word; then
8bb2c122 3235 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3236 break
3237 fi
3238 done
3239 IFS="$ac_save_ifs"
3240fi
3241fi
8bb2c122
MK
3242YACC="$ac_cv_prog_YACC"
3243if test -n "$YACC"; then
3244 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3245else
3246 echo "$ac_t""no" 1>&6
3247fi
3248
8bb2c122
MK
3249test -n "$YACC" && break
3250done
3251test -n "$YACC" || YACC="yacc"
c906108c 3252
8bb2c122
MK
3253
3254# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3255set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3256echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3257echo "configure:3258: checking for $ac_word" >&5
8bb2c122 3258if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3259 echo $ac_n "(cached) $ac_c" 1>&6
3260else
8bb2c122
MK
3261 if test -n "$AR"; then
3262 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3263else
3264 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267 test -z "$ac_dir" && ac_dir=.
3268 if test -f $ac_dir/$ac_word; then
8bb2c122 3269 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3270 break
3271 fi
3272 done
3273 IFS="$ac_save_ifs"
8bb2c122 3274 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3275fi
3276fi
8bb2c122
MK
3277AR="$ac_cv_prog_AR"
3278if test -n "$AR"; then
3279 echo "$ac_t""$AR" 1>&6
c906108c
SS
3280else
3281 echo "$ac_t""no" 1>&6
3282fi
3283
8bb2c122 3284
c906108c 3285
95ca63c4
CF
3286# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3287set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3288echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3289echo "configure:3290: checking for $ac_word" >&5
95ca63c4
CF
3290if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3291 echo $ac_n "(cached) $ac_c" 1>&6
3292else
3293 if test -n "$DLLTOOL"; then
3294 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3295else
3296 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3297 ac_dummy="$PATH"
3298 for ac_dir in $ac_dummy; do
3299 test -z "$ac_dir" && ac_dir=.
3300 if test -f $ac_dir/$ac_word; then
3301 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3302 break
3303 fi
3304 done
3305 IFS="$ac_save_ifs"
3306 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3307fi
3308fi
3309DLLTOOL="$ac_cv_prog_DLLTOOL"
3310if test -n "$DLLTOOL"; then
3311 echo "$ac_t""$DLLTOOL" 1>&6
3312else
3313 echo "$ac_t""no" 1>&6
3314fi
3315
3316
3317
3318# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3319set dummy ${ac_tool_prefix}windres; ac_word=$2
3320echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3321echo "configure:3322: checking for $ac_word" >&5
95ca63c4
CF
3322if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3323 echo $ac_n "(cached) $ac_c" 1>&6
3324else
3325 if test -n "$WINDRES"; then
3326 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3327else
3328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3329 ac_dummy="$PATH"
3330 for ac_dir in $ac_dummy; do
3331 test -z "$ac_dir" && ac_dir=.
3332 if test -f $ac_dir/$ac_word; then
3333 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3334 break
3335 fi
3336 done
3337 IFS="$ac_save_ifs"
3338 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3339fi
3340fi
3341WINDRES="$ac_cv_prog_WINDRES"
3342if test -n "$WINDRES"; then
3343 echo "$ac_t""$WINDRES" 1>&6
3344else
3345 echo "$ac_t""no" 1>&6
3346fi
3347
3348
3349
c906108c 3350
8bb2c122 3351# Needed for GNU/Hurd.
75c6e08a
MK
3352# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3353set dummy ${ac_tool_prefix}mig; ac_word=$2
3354echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
f5dbc56d 3355echo "configure:3356: checking for $ac_word" >&5
75c6e08a
MK
3356if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358else
3359 if test -n "$MIG"; then
3360 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3361else
3362 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3363 ac_dummy="$PATH"
3364 for ac_dir in $ac_dummy; do
3365 test -z "$ac_dir" && ac_dir=.
3366 if test -f $ac_dir/$ac_word; then
3367 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3368 break
3369 fi
3370 done
3371 IFS="$ac_save_ifs"
3372 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3373fi
3374fi
3375MIG="$ac_cv_prog_MIG"
3376if test -n "$MIG"; then
3377 echo "$ac_t""$MIG" 1>&6
3378else
3379 echo "$ac_t""no" 1>&6
3380fi
3381
3382
3383
3384
9a156167
MK
3385# ---------------------- #
3386# Checks for libraries. #
3387# ---------------------- #
3388
3389# We might need to link with -lm; most simulators need it.
3390echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
f5dbc56d 3391echo "configure:3392: checking for main in -lm" >&5
9a156167
MK
3392ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3393if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3394 echo $ac_n "(cached) $ac_c" 1>&6
3395else
3396 ac_save_LIBS="$LIBS"
3397LIBS="-lm $LIBS"
3398cat > conftest.$ac_ext <<EOF
f5dbc56d 3399#line 3400 "configure"
9a156167
MK
3400#include "confdefs.h"
3401
3402int main() {
3403main()
3404; return 0; }
3405EOF
f5dbc56d 3406if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3407 rm -rf conftest*
3408 eval "ac_cv_lib_$ac_lib_var=yes"
3409else
3410 echo "configure: failed program was:" >&5
3411 cat conftest.$ac_ext >&5
3412 rm -rf conftest*
3413 eval "ac_cv_lib_$ac_lib_var=no"
3414fi
3415rm -f conftest*
3416LIBS="$ac_save_LIBS"
3417
3418fi
3419if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3420 echo "$ac_t""yes" 1>&6
3421 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3422 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3423 cat >> confdefs.h <<EOF
3424#define $ac_tr_lib 1
3425EOF
3426
3427 LIBS="-lm $LIBS"
3428
3429else
3430 echo "$ac_t""no" 1>&6
3431fi
3432
3433
3434# We need to link with -lw to get `wctype' on Solaris before Solaris
3435# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3436# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3437# is known to have this problem). Therefore we avoid libw if we can.
3438echo $ac_n "checking for wctype""... $ac_c" 1>&6
f5dbc56d 3439echo "configure:3440: checking for wctype" >&5
9a156167
MK
3440if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 cat > conftest.$ac_ext <<EOF
f5dbc56d 3444#line 3445 "configure"
9a156167
MK
3445#include "confdefs.h"
3446/* System header to define __stub macros and hopefully few prototypes,
3447 which can conflict with char wctype(); below. */
3448#include <assert.h>
3449/* Override any gcc2 internal prototype to avoid an error. */
3450/* We use char because int might match the return type of a gcc2
3451 builtin and then its argument prototype would still apply. */
3452char wctype();
3453
3454int main() {
3455
3456/* The GNU C library defines this for functions which it implements
3457 to always fail with ENOSYS. Some functions are actually named
3458 something starting with __ and the normal name is an alias. */
3459#if defined (__stub_wctype) || defined (__stub___wctype)
3460choke me
3461#else
3462wctype();
3463#endif
3464
3465; return 0; }
3466EOF
f5dbc56d 3467if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3468 rm -rf conftest*
3469 eval "ac_cv_func_wctype=yes"
3470else
3471 echo "configure: failed program was:" >&5
3472 cat conftest.$ac_ext >&5
3473 rm -rf conftest*
3474 eval "ac_cv_func_wctype=no"
3475fi
3476rm -f conftest*
3477fi
3478
3479if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3480 echo "$ac_t""yes" 1>&6
3481 :
3482else
3483 echo "$ac_t""no" 1>&6
3484echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
f5dbc56d 3485echo "configure:3486: checking for wctype in -lw" >&5
9a156167
MK
3486ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3487if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3488 echo $ac_n "(cached) $ac_c" 1>&6
3489else
3490 ac_save_LIBS="$LIBS"
3491LIBS="-lw $LIBS"
3492cat > conftest.$ac_ext <<EOF
f5dbc56d 3493#line 3494 "configure"
9a156167
MK
3494#include "confdefs.h"
3495/* Override any gcc2 internal prototype to avoid an error. */
3496/* We use char because int might match the return type of a gcc2
3497 builtin and then its argument prototype would still apply. */
3498char wctype();
3499
3500int main() {
3501wctype()
3502; return 0; }
3503EOF
f5dbc56d 3504if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3505 rm -rf conftest*
3506 eval "ac_cv_lib_$ac_lib_var=yes"
3507else
3508 echo "configure: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3510 rm -rf conftest*
3511 eval "ac_cv_lib_$ac_lib_var=no"
3512fi
3513rm -f conftest*
3514LIBS="$ac_save_LIBS"
3515
3516fi
3517if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3518 echo "$ac_t""yes" 1>&6
3519 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3520 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3521 cat >> confdefs.h <<EOF
3522#define $ac_tr_lib 1
3523EOF
3524
3525 LIBS="-lw $LIBS"
3526
3527else
3528 echo "$ac_t""no" 1>&6
3529fi
3530
3531fi
3532
3533
3534# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3535
3536echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
f5dbc56d 3537echo "configure:3538: checking for library containing socketpair" >&5
9a156167
MK
3538if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3539 echo $ac_n "(cached) $ac_c" 1>&6
3540else
3541 ac_func_search_save_LIBS="$LIBS"
3542ac_cv_search_socketpair="no"
3543cat > conftest.$ac_ext <<EOF
f5dbc56d 3544#line 3545 "configure"
9a156167
MK
3545#include "confdefs.h"
3546/* Override any gcc2 internal prototype to avoid an error. */
3547/* We use char because int might match the return type of a gcc2
3548 builtin and then its argument prototype would still apply. */
3549char socketpair();
3550
3551int main() {
3552socketpair()
3553; return 0; }
3554EOF
f5dbc56d 3555if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3556 rm -rf conftest*
3557 ac_cv_search_socketpair="none required"
3558else
3559 echo "configure: failed program was:" >&5
3560 cat conftest.$ac_ext >&5
3561fi
3562rm -f conftest*
3563test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3564LIBS="-l$i $ac_func_search_save_LIBS"
3565cat > conftest.$ac_ext <<EOF
f5dbc56d 3566#line 3567 "configure"
9a156167
MK
3567#include "confdefs.h"
3568/* Override any gcc2 internal prototype to avoid an error. */
3569/* We use char because int might match the return type of a gcc2
3570 builtin and then its argument prototype would still apply. */
3571char socketpair();
3572
3573int main() {
3574socketpair()
3575; return 0; }
3576EOF
f5dbc56d 3577if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3578 rm -rf conftest*
3579 ac_cv_search_socketpair="-l$i"
3580break
3581else
3582 echo "configure: failed program was:" >&5
3583 cat conftest.$ac_ext >&5
3584fi
3585rm -f conftest*
3586done
3587LIBS="$ac_func_search_save_LIBS"
3588fi
3589
3590echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3591if test "$ac_cv_search_socketpair" != "no"; then
3592 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3593
3594else :
3595
3596fi
3597
06825bd1
MK
3598# Since GDB uses Readline, we need termcap functionality, so we need
3599# to find a library that provides that. When GDB is configured with
3600# --enable-tui, we need full curses functionality.
3601#
3602# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3603# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3604# Makefile fragments. That's why we need to have `Hcurses' before
3605# `curses'. I don't see why we should use HP curses if a more
3606# standard curses is available, except that according to HP's
3607# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3608# HP-UX 10.10 and 10.20.
3609
3610if test "$need_curses" = yes; then
3611
3612echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
f5dbc56d 3613echo "configure:3614: checking for library containing initscr" >&5
06825bd1
MK
3614if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3616else
3617 ac_func_search_save_LIBS="$LIBS"
3618ac_cv_search_initscr="no"
3619cat > conftest.$ac_ext <<EOF
f5dbc56d 3620#line 3621 "configure"
06825bd1
MK
3621#include "confdefs.h"
3622/* Override any gcc2 internal prototype to avoid an error. */
3623/* We use char because int might match the return type of a gcc2
3624 builtin and then its argument prototype would still apply. */
3625char initscr();
3626
3627int main() {
3628initscr()
3629; return 0; }
3630EOF
f5dbc56d 3631if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3632 rm -rf conftest*
3633 ac_cv_search_initscr="none required"
3634else
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637fi
3638rm -f conftest*
3639test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3640LIBS="-l$i $ac_func_search_save_LIBS"
3641cat > conftest.$ac_ext <<EOF
f5dbc56d 3642#line 3643 "configure"
06825bd1
MK
3643#include "confdefs.h"
3644/* Override any gcc2 internal prototype to avoid an error. */
3645/* We use char because int might match the return type of a gcc2
3646 builtin and then its argument prototype would still apply. */
3647char initscr();
3648
3649int main() {
3650initscr()
3651; return 0; }
3652EOF
f5dbc56d 3653if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3654 rm -rf conftest*
3655 ac_cv_search_initscr="-l$i"
3656break
3657else
3658 echo "configure: failed program was:" >&5
3659 cat conftest.$ac_ext >&5
3660fi
3661rm -f conftest*
3662done
3663LIBS="$ac_func_search_save_LIBS"
3664fi
3665
3666echo "$ac_t""$ac_cv_search_initscr" 1>&6
3667if test "$ac_cv_search_initscr" != "no"; then
3668 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3669
3670else :
3671 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3672fi
3673fi
3674
3675case $host_os in
3676 cygwin*)
3677 if test -d $srcdir/libtermcap; then
3678 LIBS="../libtermcap/libtermcap.a $LIBS"
3679 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3680 fi ;;
3681 go32*)
3682 # ??? Is this really true?
3683 ac_cv_search_tgetent="none required"
3684 ;;
3685 aix*)
3686 # Readline prefers curses over termcap on AIX.
3687 # ??? Why?
3688
3689echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
f5dbc56d 3690echo "configure:3691: checking for library containing tgetent" >&5
06825bd1
MK
3691if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3692 echo $ac_n "(cached) $ac_c" 1>&6
3693else
3694 ac_func_search_save_LIBS="$LIBS"
3695ac_cv_search_tgetent="no"
3696cat > conftest.$ac_ext <<EOF
f5dbc56d 3697#line 3698 "configure"
06825bd1
MK
3698#include "confdefs.h"
3699/* Override any gcc2 internal prototype to avoid an error. */
3700/* We use char because int might match the return type of a gcc2
3701 builtin and then its argument prototype would still apply. */
3702char tgetent();
3703
3704int main() {
3705tgetent()
3706; return 0; }
3707EOF
f5dbc56d 3708if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3709 rm -rf conftest*
3710 ac_cv_search_tgetent="none required"
3711else
3712 echo "configure: failed program was:" >&5
3713 cat conftest.$ac_ext >&5
3714fi
3715rm -f conftest*
3716test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3717LIBS="-l$i $ac_func_search_save_LIBS"
3718cat > conftest.$ac_ext <<EOF
f5dbc56d 3719#line 3720 "configure"
06825bd1
MK
3720#include "confdefs.h"
3721/* Override any gcc2 internal prototype to avoid an error. */
3722/* We use char because int might match the return type of a gcc2
3723 builtin and then its argument prototype would still apply. */
3724char tgetent();
3725
3726int main() {
3727tgetent()
3728; return 0; }
3729EOF
f5dbc56d 3730if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3731 rm -rf conftest*
3732 ac_cv_search_tgetent="-l$i"
3733break
3734else
3735 echo "configure: failed program was:" >&5
3736 cat conftest.$ac_ext >&5
3737fi
3738rm -f conftest*
3739done
3740LIBS="$ac_func_search_save_LIBS"
3741fi
3742
3743echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3744if test "$ac_cv_search_tgetent" != "no"; then
3745 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3746
3747else :
3748
3749fi
3750 ;;
3751esac
3752
3753# Note: We used to check for libtermlib and libterminfo too, but
3754# Readline doesn't, so I think we're safe with leaving them out.
3755
3756echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
f5dbc56d 3757echo "configure:3758: checking for library containing tgetent" >&5
06825bd1
MK
3758if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3759 echo $ac_n "(cached) $ac_c" 1>&6
3760else
3761 ac_func_search_save_LIBS="$LIBS"
3762ac_cv_search_tgetent="no"
3763cat > conftest.$ac_ext <<EOF
f5dbc56d 3764#line 3765 "configure"
06825bd1
MK
3765#include "confdefs.h"
3766/* Override any gcc2 internal prototype to avoid an error. */
3767/* We use char because int might match the return type of a gcc2
3768 builtin and then its argument prototype would still apply. */
3769char tgetent();
3770
3771int main() {
3772tgetent()
3773; return 0; }
3774EOF
f5dbc56d 3775if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3776 rm -rf conftest*
3777 ac_cv_search_tgetent="none required"
3778else
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781fi
3782rm -f conftest*
3783test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3784LIBS="-l$i $ac_func_search_save_LIBS"
3785cat > conftest.$ac_ext <<EOF
f5dbc56d 3786#line 3787 "configure"
06825bd1
MK
3787#include "confdefs.h"
3788/* Override any gcc2 internal prototype to avoid an error. */
3789/* We use char because int might match the return type of a gcc2
3790 builtin and then its argument prototype would still apply. */
3791char tgetent();
3792
3793int main() {
3794tgetent()
3795; return 0; }
3796EOF
f5dbc56d 3797if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3798 rm -rf conftest*
3799 ac_cv_search_tgetent="-l$i"
3800break
3801else
3802 echo "configure: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804fi
3805rm -f conftest*
3806done
3807LIBS="$ac_func_search_save_LIBS"
3808fi
3809
3810echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3811if test "$ac_cv_search_tgetent" != "no"; then
3812 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3813
3814else :
3815
3816fi
3817
3818if test "$ac_cv_search_tgetent" = no; then
3819 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3820fi
3821
5ee754fc
MK
3822# ------------------------- #
3823# Checks for header files. #
3824# ------------------------- #
3825
3826ac_header_dirent=no
3827for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3828do
3829ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3830echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
f5dbc56d 3831echo "configure:3832: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3832if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3833 echo $ac_n "(cached) $ac_c" 1>&6
3834else
3835 cat > conftest.$ac_ext <<EOF
f5dbc56d 3836#line 3837 "configure"
c906108c
SS
3837#include "confdefs.h"
3838#include <sys/types.h>
5ee754fc
MK
3839#include <$ac_hdr>
3840int main() {
3841DIR *dirp = 0;
3842; return 0; }
3843EOF
f5dbc56d 3844if { (eval echo configure:3845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3845 rm -rf conftest*
3846 eval "ac_cv_header_dirent_$ac_safe=yes"
3847else
3848 echo "configure: failed program was:" >&5
3849 cat conftest.$ac_ext >&5
3850 rm -rf conftest*
3851 eval "ac_cv_header_dirent_$ac_safe=no"
3852fi
3853rm -f conftest*
3854fi
3855if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3856 echo "$ac_t""yes" 1>&6
3857 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3858 cat >> confdefs.h <<EOF
3859#define $ac_tr_hdr 1
3860EOF
3861 ac_header_dirent=$ac_hdr; break
3862else
3863 echo "$ac_t""no" 1>&6
3864fi
3865done
3866# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3867if test $ac_header_dirent = dirent.h; then
3868echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
f5dbc56d 3869echo "configure:3870: checking for opendir in -ldir" >&5
5ee754fc
MK
3870ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3871if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3872 echo $ac_n "(cached) $ac_c" 1>&6
3873else
3874 ac_save_LIBS="$LIBS"
3875LIBS="-ldir $LIBS"
3876cat > conftest.$ac_ext <<EOF
f5dbc56d 3877#line 3878 "configure"
5ee754fc
MK
3878#include "confdefs.h"
3879/* Override any gcc2 internal prototype to avoid an error. */
3880/* We use char because int might match the return type of a gcc2
3881 builtin and then its argument prototype would still apply. */
3882char opendir();
c906108c
SS
3883
3884int main() {
5ee754fc 3885opendir()
c906108c
SS
3886; return 0; }
3887EOF
f5dbc56d 3888if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3889 rm -rf conftest*
5ee754fc 3890 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3891else
3892 echo "configure: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3894 rm -rf conftest*
5ee754fc 3895 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3896fi
3897rm -f conftest*
5ee754fc
MK
3898LIBS="$ac_save_LIBS"
3899
3900fi
3901if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3902 echo "$ac_t""yes" 1>&6
3903 LIBS="$LIBS -ldir"
3904else
3905 echo "$ac_t""no" 1>&6
c906108c
SS
3906fi
3907
5ee754fc
MK
3908else
3909echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
f5dbc56d 3910echo "configure:3911: checking for opendir in -lx" >&5
5ee754fc
MK
3911ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3912if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3914else
3915 ac_save_LIBS="$LIBS"
3916LIBS="-lx $LIBS"
3917cat > conftest.$ac_ext <<EOF
f5dbc56d 3918#line 3919 "configure"
5ee754fc
MK
3919#include "confdefs.h"
3920/* Override any gcc2 internal prototype to avoid an error. */
3921/* We use char because int might match the return type of a gcc2
3922 builtin and then its argument prototype would still apply. */
3923char opendir();
3924
3925int main() {
3926opendir()
3927; return 0; }
c906108c 3928EOF
f5dbc56d 3929if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3930 rm -rf conftest*
3931 eval "ac_cv_lib_$ac_lib_var=yes"
3932else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 eval "ac_cv_lib_$ac_lib_var=no"
3937fi
3938rm -f conftest*
3939LIBS="$ac_save_LIBS"
c906108c 3940
5ee754fc
MK
3941fi
3942if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3943 echo "$ac_t""yes" 1>&6
3944 LIBS="$LIBS -lx"
3945else
3946 echo "$ac_t""no" 1>&6
3947fi
c906108c 3948
5ee754fc 3949fi
c906108c 3950
5ee754fc 3951echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
f5dbc56d 3952echo "configure:3953: checking whether stat file-mode macros are broken" >&5
5ee754fc 3953if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3954 echo $ac_n "(cached) $ac_c" 1>&6
3955else
3956 cat > conftest.$ac_ext <<EOF
f5dbc56d 3957#line 3958 "configure"
9608ab8b
MK
3958#include "confdefs.h"
3959#include <sys/types.h>
5ee754fc
MK
3960#include <sys/stat.h>
3961
3962#if defined(S_ISBLK) && defined(S_IFDIR)
3963# if S_ISBLK (S_IFDIR)
3964You lose.
3965# endif
3966#endif
3967
3968#if defined(S_ISBLK) && defined(S_IFCHR)
3969# if S_ISBLK (S_IFCHR)
3970You lose.
3971# endif
3972#endif
3973
3974#if defined(S_ISLNK) && defined(S_IFREG)
3975# if S_ISLNK (S_IFREG)
3976You lose.
3977# endif
3978#endif
3979
3980#if defined(S_ISSOCK) && defined(S_IFREG)
3981# if S_ISSOCK (S_IFREG)
3982You lose.
3983# endif
3984#endif
3985
9608ab8b 3986EOF
5ee754fc
MK
3987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3988 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3989 rm -rf conftest*
5ee754fc
MK
3990 ac_cv_header_stat_broken=yes
3991else
3992 rm -rf conftest*
3993 ac_cv_header_stat_broken=no
3994fi
3995rm -f conftest*
3996
3997fi
3998
3999echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4000if test $ac_cv_header_stat_broken = yes; then
4001 cat >> confdefs.h <<\EOF
4002#define STAT_MACROS_BROKEN 1
4003EOF
4004
4005fi
4006
4007echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
f5dbc56d 4008echo "configure:4009: checking for ANSI C header files" >&5
5ee754fc
MK
4009if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011else
4012 cat > conftest.$ac_ext <<EOF
f5dbc56d 4013#line 4014 "configure"
5ee754fc
MK
4014#include "confdefs.h"
4015#include <stdlib.h>
4016#include <stdarg.h>
4017#include <string.h>
4018#include <float.h>
4019EOF
4020ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4021{ (eval echo configure:4022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4022ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4023if test -z "$ac_err"; then
4024 rm -rf conftest*
4025 ac_cv_header_stdc=yes
4026else
4027 echo "$ac_err" >&5
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4030 rm -rf conftest*
4031 ac_cv_header_stdc=no
4032fi
4033rm -f conftest*
4034
4035if test $ac_cv_header_stdc = yes; then
4036 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4037cat > conftest.$ac_ext <<EOF
f5dbc56d 4038#line 4039 "configure"
5ee754fc
MK
4039#include "confdefs.h"
4040#include <string.h>
4041EOF
4042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4043 egrep "memchr" >/dev/null 2>&1; then
4044 :
4045else
4046 rm -rf conftest*
4047 ac_cv_header_stdc=no
4048fi
4049rm -f conftest*
4050
4051fi
4052
4053if test $ac_cv_header_stdc = yes; then
4054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4055cat > conftest.$ac_ext <<EOF
f5dbc56d 4056#line 4057 "configure"
5ee754fc
MK
4057#include "confdefs.h"
4058#include <stdlib.h>
4059EOF
4060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4061 egrep "free" >/dev/null 2>&1; then
4062 :
4063else
4064 rm -rf conftest*
4065 ac_cv_header_stdc=no
4066fi
4067rm -f conftest*
4068
4069fi
4070
4071if test $ac_cv_header_stdc = yes; then
4072 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4073if test "$cross_compiling" = yes; then
4074 :
4075else
4076 cat > conftest.$ac_ext <<EOF
f5dbc56d 4077#line 4078 "configure"
5ee754fc
MK
4078#include "confdefs.h"
4079#include <ctype.h>
4080#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4081#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4082#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4083int main () { int i; for (i = 0; i < 256; i++)
4084if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4085exit (0); }
4086
4087EOF
f5dbc56d 4088if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4089then
4090 :
9608ab8b 4091else
5ee754fc
MK
4092 echo "configure: failed program was:" >&5
4093 cat conftest.$ac_ext >&5
4094 rm -fr conftest*
4095 ac_cv_header_stdc=no
4096fi
4097rm -fr conftest*
4098fi
4099
4100fi
4101fi
4102
4103echo "$ac_t""$ac_cv_header_stdc" 1>&6
4104if test $ac_cv_header_stdc = yes; then
4105 cat >> confdefs.h <<\EOF
4106#define STDC_HEADERS 1
4107EOF
4108
4109fi
4110
4111for ac_hdr in link.h
4112do
4113ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4114echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4115echo "configure:4116: checking for $ac_hdr" >&5
5ee754fc
MK
4116if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4117 echo $ac_n "(cached) $ac_c" 1>&6
4118else
4119 cat > conftest.$ac_ext <<EOF
f5dbc56d 4120#line 4121 "configure"
5ee754fc
MK
4121#include "confdefs.h"
4122#include <$ac_hdr>
4123EOF
4124ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4125{ (eval echo configure:4126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4126ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4127if test -z "$ac_err"; then
4128 rm -rf conftest*
4129 eval "ac_cv_header_$ac_safe=yes"
4130else
4131 echo "$ac_err" >&5
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4134 rm -rf conftest*
4135 eval "ac_cv_header_$ac_safe=no"
4136fi
4137rm -f conftest*
4138fi
4139if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4140 echo "$ac_t""yes" 1>&6
4141 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4142 cat >> confdefs.h <<EOF
4143#define $ac_tr_hdr 1
4144EOF
4145
4146else
4147 echo "$ac_t""no" 1>&6
4148fi
4149done
4150
4151for ac_hdr in nlist.h
4152do
4153ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4154echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4155echo "configure:4156: checking for $ac_hdr" >&5
5ee754fc
MK
4156if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4157 echo $ac_n "(cached) $ac_c" 1>&6
4158else
4159 cat > conftest.$ac_ext <<EOF
f5dbc56d 4160#line 4161 "configure"
5ee754fc
MK
4161#include "confdefs.h"
4162#include <$ac_hdr>
4163EOF
4164ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4165{ (eval echo configure:4166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4166ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4167if test -z "$ac_err"; then
4168 rm -rf conftest*
4169 eval "ac_cv_header_$ac_safe=yes"
4170else
4171 echo "$ac_err" >&5
4172 echo "configure: failed program was:" >&5
4173 cat conftest.$ac_ext >&5
4174 rm -rf conftest*
4175 eval "ac_cv_header_$ac_safe=no"
4176fi
4177rm -f conftest*
4178fi
4179if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4180 echo "$ac_t""yes" 1>&6
4181 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4182 cat >> confdefs.h <<EOF
4183#define $ac_tr_hdr 1
4184EOF
4185
4186else
4187 echo "$ac_t""no" 1>&6
4188fi
4189done
4190
4191for ac_hdr in poll.h sys/poll.h
4192do
4193ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4194echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4195echo "configure:4196: checking for $ac_hdr" >&5
5ee754fc
MK
4196if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4197 echo $ac_n "(cached) $ac_c" 1>&6
4198else
4199 cat > conftest.$ac_ext <<EOF
f5dbc56d 4200#line 4201 "configure"
5ee754fc
MK
4201#include "confdefs.h"
4202#include <$ac_hdr>
4203EOF
4204ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4205{ (eval echo configure:4206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4206ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4207if test -z "$ac_err"; then
4208 rm -rf conftest*
4209 eval "ac_cv_header_$ac_safe=yes"
4210else
4211 echo "$ac_err" >&5
4212 echo "configure: failed program was:" >&5
4213 cat conftest.$ac_ext >&5
4214 rm -rf conftest*
4215 eval "ac_cv_header_$ac_safe=no"
4216fi
4217rm -f conftest*
4218fi
4219if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4220 echo "$ac_t""yes" 1>&6
4221 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4222 cat >> confdefs.h <<EOF
4223#define $ac_tr_hdr 1
4224EOF
4225
4226else
4227 echo "$ac_t""no" 1>&6
4228fi
4229done
4230
4231for ac_hdr in proc_service.h thread_db.h
4232do
4233ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4234echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4235echo "configure:4236: checking for $ac_hdr" >&5
5ee754fc
MK
4236if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4237 echo $ac_n "(cached) $ac_c" 1>&6
4238else
4239 cat > conftest.$ac_ext <<EOF
f5dbc56d 4240#line 4241 "configure"
5ee754fc
MK
4241#include "confdefs.h"
4242#include <$ac_hdr>
4243EOF
4244ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4245{ (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4246ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4247if test -z "$ac_err"; then
4248 rm -rf conftest*
4249 eval "ac_cv_header_$ac_safe=yes"
4250else
4251 echo "$ac_err" >&5
4252 echo "configure: failed program was:" >&5
4253 cat conftest.$ac_ext >&5
4254 rm -rf conftest*
4255 eval "ac_cv_header_$ac_safe=no"
4256fi
4257rm -f conftest*
4258fi
4259if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4260 echo "$ac_t""yes" 1>&6
4261 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4262 cat >> confdefs.h <<EOF
4263#define $ac_tr_hdr 1
4264EOF
4265
4266else
4267 echo "$ac_t""no" 1>&6
4268fi
4269done
4270
4271for ac_hdr in stddef.h
4272do
4273ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4274echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4275echo "configure:4276: checking for $ac_hdr" >&5
5ee754fc
MK
4276if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4277 echo $ac_n "(cached) $ac_c" 1>&6
4278else
4279 cat > conftest.$ac_ext <<EOF
f5dbc56d 4280#line 4281 "configure"
5ee754fc
MK
4281#include "confdefs.h"
4282#include <$ac_hdr>
4283EOF
4284ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4285{ (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4286ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4287if test -z "$ac_err"; then
4288 rm -rf conftest*
4289 eval "ac_cv_header_$ac_safe=yes"
4290else
4291 echo "$ac_err" >&5
4292 echo "configure: failed program was:" >&5
4293 cat conftest.$ac_ext >&5
4294 rm -rf conftest*
4295 eval "ac_cv_header_$ac_safe=no"
4296fi
4297rm -f conftest*
4298fi
4299if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4300 echo "$ac_t""yes" 1>&6
4301 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4302 cat >> confdefs.h <<EOF
4303#define $ac_tr_hdr 1
4304EOF
4305
4306else
4307 echo "$ac_t""no" 1>&6
4308fi
4309done
4310
4311for ac_hdr in stdlib.h
4312do
4313ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4314echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4315echo "configure:4316: checking for $ac_hdr" >&5
5ee754fc
MK
4316if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4317 echo $ac_n "(cached) $ac_c" 1>&6
4318else
4319 cat > conftest.$ac_ext <<EOF
f5dbc56d 4320#line 4321 "configure"
5ee754fc
MK
4321#include "confdefs.h"
4322#include <$ac_hdr>
4323EOF
4324ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4325{ (eval echo configure:4326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4326ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4327if test -z "$ac_err"; then
4328 rm -rf conftest*
4329 eval "ac_cv_header_$ac_safe=yes"
4330else
4331 echo "$ac_err" >&5
4332 echo "configure: failed program was:" >&5
4333 cat conftest.$ac_ext >&5
4334 rm -rf conftest*
4335 eval "ac_cv_header_$ac_safe=no"
4336fi
4337rm -f conftest*
4338fi
4339if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4340 echo "$ac_t""yes" 1>&6
4341 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4342 cat >> confdefs.h <<EOF
4343#define $ac_tr_hdr 1
4344EOF
4345
4346else
4347 echo "$ac_t""no" 1>&6
4348fi
4349done
4350
4351for ac_hdr in stdint.h
4352do
4353ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4354echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4355echo "configure:4356: checking for $ac_hdr" >&5
5ee754fc
MK
4356if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4357 echo $ac_n "(cached) $ac_c" 1>&6
4358else
4359 cat > conftest.$ac_ext <<EOF
f5dbc56d 4360#line 4361 "configure"
5ee754fc
MK
4361#include "confdefs.h"
4362#include <$ac_hdr>
4363EOF
4364ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4365{ (eval echo configure:4366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4366ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4367if test -z "$ac_err"; then
4368 rm -rf conftest*
4369 eval "ac_cv_header_$ac_safe=yes"
4370else
4371 echo "$ac_err" >&5
4372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 eval "ac_cv_header_$ac_safe=no"
4376fi
4377rm -f conftest*
4378fi
4379if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4380 echo "$ac_t""yes" 1>&6
4381 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4382 cat >> confdefs.h <<EOF
4383#define $ac_tr_hdr 1
4384EOF
4385
4386else
4387 echo "$ac_t""no" 1>&6
4388fi
4389done
4390
4391for ac_hdr in string.h memory.h strings.h
4392do
4393ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4394echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4395echo "configure:4396: checking for $ac_hdr" >&5
5ee754fc
MK
4396if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4397 echo $ac_n "(cached) $ac_c" 1>&6
4398else
4399 cat > conftest.$ac_ext <<EOF
f5dbc56d 4400#line 4401 "configure"
5ee754fc
MK
4401#include "confdefs.h"
4402#include <$ac_hdr>
4403EOF
4404ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4405{ (eval echo configure:4406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4406ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4407if test -z "$ac_err"; then
4408 rm -rf conftest*
4409 eval "ac_cv_header_$ac_safe=yes"
4410else
4411 echo "$ac_err" >&5
4412 echo "configure: failed program was:" >&5
4413 cat conftest.$ac_ext >&5
4414 rm -rf conftest*
4415 eval "ac_cv_header_$ac_safe=no"
4416fi
4417rm -f conftest*
4418fi
4419if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4420 echo "$ac_t""yes" 1>&6
4421 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4422 cat >> confdefs.h <<EOF
4423#define $ac_tr_hdr 1
4424EOF
4425
4426else
4427 echo "$ac_t""no" 1>&6
4428fi
4429done
4430
4431for ac_hdr in sys/fault.h
4432do
4433ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4434echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4435echo "configure:4436: checking for $ac_hdr" >&5
5ee754fc
MK
4436if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438else
4439 cat > conftest.$ac_ext <<EOF
f5dbc56d 4440#line 4441 "configure"
5ee754fc
MK
4441#include "confdefs.h"
4442#include <$ac_hdr>
4443EOF
4444ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4445{ (eval echo configure:4446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4446ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4447if test -z "$ac_err"; then
4448 rm -rf conftest*
4449 eval "ac_cv_header_$ac_safe=yes"
4450else
4451 echo "$ac_err" >&5
4452 echo "configure: failed program was:" >&5
4453 cat conftest.$ac_ext >&5
4454 rm -rf conftest*
4455 eval "ac_cv_header_$ac_safe=no"
4456fi
4457rm -f conftest*
4458fi
4459if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4462 cat >> confdefs.h <<EOF
4463#define $ac_tr_hdr 1
4464EOF
4465
4466else
4467 echo "$ac_t""no" 1>&6
4468fi
4469done
4470
4471for ac_hdr in sys/file.h
4472do
4473ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4474echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4475echo "configure:4476: checking for $ac_hdr" >&5
5ee754fc
MK
4476if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4477 echo $ac_n "(cached) $ac_c" 1>&6
4478else
4479 cat > conftest.$ac_ext <<EOF
f5dbc56d 4480#line 4481 "configure"
5ee754fc
MK
4481#include "confdefs.h"
4482#include <$ac_hdr>
4483EOF
4484ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4485{ (eval echo configure:4486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4486ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4487if test -z "$ac_err"; then
4488 rm -rf conftest*
4489 eval "ac_cv_header_$ac_safe=yes"
4490else
4491 echo "$ac_err" >&5
4492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4494 rm -rf conftest*
4495 eval "ac_cv_header_$ac_safe=no"
4496fi
4497rm -f conftest*
4498fi
4499if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4500 echo "$ac_t""yes" 1>&6
4501 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4502 cat >> confdefs.h <<EOF
4503#define $ac_tr_hdr 1
4504EOF
4505
4506else
4507 echo "$ac_t""no" 1>&6
4508fi
4509done
4510
4511for ac_hdr in sys/filio.h
4512do
4513ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4514echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4515echo "configure:4516: checking for $ac_hdr" >&5
5ee754fc
MK
4516if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4517 echo $ac_n "(cached) $ac_c" 1>&6
4518else
4519 cat > conftest.$ac_ext <<EOF
f5dbc56d 4520#line 4521 "configure"
5ee754fc
MK
4521#include "confdefs.h"
4522#include <$ac_hdr>
4523EOF
4524ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4525{ (eval echo configure:4526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4526ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4527if test -z "$ac_err"; then
4528 rm -rf conftest*
4529 eval "ac_cv_header_$ac_safe=yes"
4530else
4531 echo "$ac_err" >&5
4532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4534 rm -rf conftest*
4535 eval "ac_cv_header_$ac_safe=no"
4536fi
4537rm -f conftest*
4538fi
4539if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4540 echo "$ac_t""yes" 1>&6
4541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4542 cat >> confdefs.h <<EOF
4543#define $ac_tr_hdr 1
4544EOF
4545
4546else
4547 echo "$ac_t""no" 1>&6
4548fi
4549done
4550
4551for ac_hdr in sys/ioctl.h
4552do
4553ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4554echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4555echo "configure:4556: checking for $ac_hdr" >&5
5ee754fc
MK
4556if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4557 echo $ac_n "(cached) $ac_c" 1>&6
4558else
4559 cat > conftest.$ac_ext <<EOF
f5dbc56d 4560#line 4561 "configure"
5ee754fc
MK
4561#include "confdefs.h"
4562#include <$ac_hdr>
4563EOF
4564ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4565{ (eval echo configure:4566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4566ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4567if test -z "$ac_err"; then
4568 rm -rf conftest*
4569 eval "ac_cv_header_$ac_safe=yes"
4570else
4571 echo "$ac_err" >&5
4572 echo "configure: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 rm -rf conftest*
4575 eval "ac_cv_header_$ac_safe=no"
4576fi
4577rm -f conftest*
4578fi
4579if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4580 echo "$ac_t""yes" 1>&6
4581 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4582 cat >> confdefs.h <<EOF
4583#define $ac_tr_hdr 1
4584EOF
4585
4586else
4587 echo "$ac_t""no" 1>&6
4588fi
4589done
4590
4591for ac_hdr in sys/param.h
4592do
4593ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4594echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4595echo "configure:4596: checking for $ac_hdr" >&5
5ee754fc
MK
4596if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4597 echo $ac_n "(cached) $ac_c" 1>&6
4598else
4599 cat > conftest.$ac_ext <<EOF
f5dbc56d 4600#line 4601 "configure"
5ee754fc
MK
4601#include "confdefs.h"
4602#include <$ac_hdr>
4603EOF
4604ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4605{ (eval echo configure:4606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4606ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4607if test -z "$ac_err"; then
4608 rm -rf conftest*
4609 eval "ac_cv_header_$ac_safe=yes"
4610else
4611 echo "$ac_err" >&5
4612 echo "configure: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4614 rm -rf conftest*
4615 eval "ac_cv_header_$ac_safe=no"
4616fi
4617rm -f conftest*
4618fi
4619if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4620 echo "$ac_t""yes" 1>&6
4621 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4622 cat >> confdefs.h <<EOF
4623#define $ac_tr_hdr 1
4624EOF
4625
4626else
4627 echo "$ac_t""no" 1>&6
4628fi
4629done
4630
4631for ac_hdr in sys/proc.h
4632do
4633ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4634echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4635echo "configure:4636: checking for $ac_hdr" >&5
5ee754fc
MK
4636if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4637 echo $ac_n "(cached) $ac_c" 1>&6
4638else
4639 cat > conftest.$ac_ext <<EOF
f5dbc56d 4640#line 4641 "configure"
5ee754fc
MK
4641#include "confdefs.h"
4642#include <$ac_hdr>
4643EOF
4644ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4645{ (eval echo configure:4646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4646ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4647if test -z "$ac_err"; then
4648 rm -rf conftest*
4649 eval "ac_cv_header_$ac_safe=yes"
4650else
4651 echo "$ac_err" >&5
4652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 rm -rf conftest*
4655 eval "ac_cv_header_$ac_safe=no"
4656fi
4657rm -f conftest*
4658fi
4659if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4660 echo "$ac_t""yes" 1>&6
4661 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4662 cat >> confdefs.h <<EOF
4663#define $ac_tr_hdr 1
4664EOF
4665
4666else
4667 echo "$ac_t""no" 1>&6
4668fi
4669done
4670
4671for ac_hdr in sys/procfs.h
4672do
4673ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4674echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4675echo "configure:4676: checking for $ac_hdr" >&5
5ee754fc
MK
4676if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4677 echo $ac_n "(cached) $ac_c" 1>&6
4678else
4679 cat > conftest.$ac_ext <<EOF
f5dbc56d 4680#line 4681 "configure"
5ee754fc
MK
4681#include "confdefs.h"
4682#include <$ac_hdr>
4683EOF
4684ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4685{ (eval echo configure:4686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4686ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4687if test -z "$ac_err"; then
4688 rm -rf conftest*
4689 eval "ac_cv_header_$ac_safe=yes"
4690else
4691 echo "$ac_err" >&5
4692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
4694 rm -rf conftest*
4695 eval "ac_cv_header_$ac_safe=no"
4696fi
4697rm -f conftest*
4698fi
4699if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4700 echo "$ac_t""yes" 1>&6
4701 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4702 cat >> confdefs.h <<EOF
4703#define $ac_tr_hdr 1
4704EOF
4705
4706else
4707 echo "$ac_t""no" 1>&6
4708fi
4709done
4710
4711for ac_hdr in sys/ptrace.h ptrace.h
4712do
4713ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4714echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4715echo "configure:4716: checking for $ac_hdr" >&5
5ee754fc
MK
4716if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4717 echo $ac_n "(cached) $ac_c" 1>&6
4718else
4719 cat > conftest.$ac_ext <<EOF
f5dbc56d 4720#line 4721 "configure"
5ee754fc
MK
4721#include "confdefs.h"
4722#include <$ac_hdr>
4723EOF
4724ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4725{ (eval echo configure:4726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4726ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4727if test -z "$ac_err"; then
4728 rm -rf conftest*
4729 eval "ac_cv_header_$ac_safe=yes"
4730else
4731 echo "$ac_err" >&5
4732 echo "configure: failed program was:" >&5
4733 cat conftest.$ac_ext >&5
4734 rm -rf conftest*
4735 eval "ac_cv_header_$ac_safe=no"
4736fi
4737rm -f conftest*
4738fi
4739if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4740 echo "$ac_t""yes" 1>&6
4741 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4742 cat >> confdefs.h <<EOF
4743#define $ac_tr_hdr 1
4744EOF
4745
4746else
4747 echo "$ac_t""no" 1>&6
4748fi
4749done
4750
4751for ac_hdr in sys/reg.h sys/debugreg.h
4752do
4753ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4754echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4755echo "configure:4756: checking for $ac_hdr" >&5
5ee754fc
MK
4756if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4758else
4759 cat > conftest.$ac_ext <<EOF
f5dbc56d 4760#line 4761 "configure"
5ee754fc
MK
4761#include "confdefs.h"
4762#include <$ac_hdr>
4763EOF
4764ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4765{ (eval echo configure:4766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4766ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4767if test -z "$ac_err"; then
4768 rm -rf conftest*
4769 eval "ac_cv_header_$ac_safe=yes"
4770else
4771 echo "$ac_err" >&5
4772 echo "configure: failed program was:" >&5
4773 cat conftest.$ac_ext >&5
4774 rm -rf conftest*
4775 eval "ac_cv_header_$ac_safe=no"
4776fi
4777rm -f conftest*
4778fi
4779if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4780 echo "$ac_t""yes" 1>&6
4781 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4782 cat >> confdefs.h <<EOF
4783#define $ac_tr_hdr 1
4784EOF
4785
4786else
4787 echo "$ac_t""no" 1>&6
4788fi
4789done
4790
4791for ac_hdr in sys/select.h
4792do
4793ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4794echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4795echo "configure:4796: checking for $ac_hdr" >&5
5ee754fc
MK
4796if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4797 echo $ac_n "(cached) $ac_c" 1>&6
4798else
4799 cat > conftest.$ac_ext <<EOF
f5dbc56d 4800#line 4801 "configure"
5ee754fc
MK
4801#include "confdefs.h"
4802#include <$ac_hdr>
4803EOF
4804ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4805{ (eval echo configure:4806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4806ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4807if test -z "$ac_err"; then
4808 rm -rf conftest*
4809 eval "ac_cv_header_$ac_safe=yes"
4810else
4811 echo "$ac_err" >&5
4812 echo "configure: failed program was:" >&5
4813 cat conftest.$ac_ext >&5
4814 rm -rf conftest*
4815 eval "ac_cv_header_$ac_safe=no"
4816fi
4817rm -f conftest*
4818fi
4819if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4820 echo "$ac_t""yes" 1>&6
4821 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4822 cat >> confdefs.h <<EOF
4823#define $ac_tr_hdr 1
4824EOF
4825
4826else
4827 echo "$ac_t""no" 1>&6
4828fi
4829done
4830
4831for ac_hdr in sys/syscall.h
4832do
4833ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4834echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4835echo "configure:4836: checking for $ac_hdr" >&5
5ee754fc
MK
4836if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4837 echo $ac_n "(cached) $ac_c" 1>&6
4838else
4839 cat > conftest.$ac_ext <<EOF
f5dbc56d 4840#line 4841 "configure"
5ee754fc
MK
4841#include "confdefs.h"
4842#include <$ac_hdr>
4843EOF
4844ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4845{ (eval echo configure:4846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4846ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4847if test -z "$ac_err"; then
4848 rm -rf conftest*
4849 eval "ac_cv_header_$ac_safe=yes"
4850else
4851 echo "$ac_err" >&5
4852 echo "configure: failed program was:" >&5
4853 cat conftest.$ac_ext >&5
4854 rm -rf conftest*
4855 eval "ac_cv_header_$ac_safe=no"
4856fi
4857rm -f conftest*
4858fi
4859if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4860 echo "$ac_t""yes" 1>&6
4861 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4862 cat >> confdefs.h <<EOF
4863#define $ac_tr_hdr 1
4864EOF
4865
4866else
4867 echo "$ac_t""no" 1>&6
4868fi
4869done
4870
4871for ac_hdr in sys/user.h
4872do
4873ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4874echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4875echo "configure:4876: checking for $ac_hdr" >&5
5ee754fc
MK
4876if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4877 echo $ac_n "(cached) $ac_c" 1>&6
4878else
4879 cat > conftest.$ac_ext <<EOF
f5dbc56d 4880#line 4881 "configure"
5ee754fc
MK
4881#include "confdefs.h"
4882#include <$ac_hdr>
4883EOF
4884ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4885{ (eval echo configure:4886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4886ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4887if test -z "$ac_err"; then
4888 rm -rf conftest*
4889 eval "ac_cv_header_$ac_safe=yes"
4890else
4891 echo "$ac_err" >&5
4892 echo "configure: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894 rm -rf conftest*
4895 eval "ac_cv_header_$ac_safe=no"
4896fi
4897rm -f conftest*
4898fi
4899if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4900 echo "$ac_t""yes" 1>&6
4901 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4902 cat >> confdefs.h <<EOF
4903#define $ac_tr_hdr 1
4904EOF
4905
4906else
4907 echo "$ac_t""no" 1>&6
4908fi
4909done
4910
4911for ac_hdr in sys/wait.h wait.h
4912do
4913ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4914echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4915echo "configure:4916: checking for $ac_hdr" >&5
5ee754fc
MK
4916if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4917 echo $ac_n "(cached) $ac_c" 1>&6
4918else
4919 cat > conftest.$ac_ext <<EOF
f5dbc56d 4920#line 4921 "configure"
5ee754fc
MK
4921#include "confdefs.h"
4922#include <$ac_hdr>
4923EOF
4924ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4925{ (eval echo configure:4926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4926ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4927if test -z "$ac_err"; then
4928 rm -rf conftest*
4929 eval "ac_cv_header_$ac_safe=yes"
4930else
4931 echo "$ac_err" >&5
9608ab8b
MK
4932 echo "configure: failed program was:" >&5
4933 cat conftest.$ac_ext >&5
4934 rm -rf conftest*
5ee754fc 4935 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4936fi
4937rm -f conftest*
4938fi
5ee754fc 4939if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4940 echo "$ac_t""yes" 1>&6
4941 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4942 cat >> confdefs.h <<EOF
4943#define $ac_tr_hdr 1
4944EOF
5ee754fc 4945
9608ab8b
MK
4946else
4947 echo "$ac_t""no" 1>&6
4948fi
4949done
5ee754fc
MK
4950
4951for ac_hdr in termios.h termio.h sgtty.h
4952do
4953ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4954echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4955echo "configure:4956: checking for $ac_hdr" >&5
5ee754fc 4956if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4957 echo $ac_n "(cached) $ac_c" 1>&6
4958else
5ee754fc 4959 cat > conftest.$ac_ext <<EOF
f5dbc56d 4960#line 4961 "configure"
9608ab8b 4961#include "confdefs.h"
5ee754fc 4962#include <$ac_hdr>
9608ab8b 4963EOF
5ee754fc 4964ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 4965{ (eval echo configure:4966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4966ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4967if test -z "$ac_err"; then
9608ab8b 4968 rm -rf conftest*
5ee754fc 4969 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4970else
5ee754fc 4971 echo "$ac_err" >&5
9608ab8b
MK
4972 echo "configure: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 rm -rf conftest*
5ee754fc 4975 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4976fi
4977rm -f conftest*
9608ab8b 4978fi
5ee754fc 4979if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4980 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4981 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4982 cat >> confdefs.h <<EOF
4983#define $ac_tr_hdr 1
4984EOF
4985
9608ab8b
MK
4986else
4987 echo "$ac_t""no" 1>&6
4988fi
5ee754fc 4989done
9608ab8b 4990
5ee754fc
MK
4991for ac_hdr in unistd.h
4992do
4993ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4994echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 4995echo "configure:4996: checking for $ac_hdr" >&5
5ee754fc 4996if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4997 echo $ac_n "(cached) $ac_c" 1>&6
4998else
5ee754fc 4999 cat > conftest.$ac_ext <<EOF
f5dbc56d 5000#line 5001 "configure"
9608ab8b 5001#include "confdefs.h"
5ee754fc 5002#include <$ac_hdr>
9608ab8b 5003EOF
5ee754fc 5004ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 5005{ (eval echo configure:5006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5006ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5007if test -z "$ac_err"; then
9608ab8b 5008 rm -rf conftest*
5ee754fc 5009 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5010else
5ee754fc 5011 echo "$ac_err" >&5
9608ab8b
MK
5012 echo "configure: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5014 rm -rf conftest*
5ee754fc 5015 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5016fi
5017rm -f conftest*
9608ab8b 5018fi
5ee754fc 5019if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5020 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5021 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5022 cat >> confdefs.h <<EOF
5023#define $ac_tr_hdr 1
5024EOF
5025
9608ab8b
MK
5026else
5027 echo "$ac_t""no" 1>&6
5028fi
5ee754fc 5029done
9608ab8b 5030
9608ab8b 5031
5ee754fc
MK
5032# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5033# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5034# think that we don't have <curses.h> if we're using GCC.
5035case $host_os in
5036 solaris2.[78])
5037 if test "$GCC" = yes; then
5038 cat >> confdefs.h <<\EOF
5039#define _MSE_INT_H 1
5040EOF
5041
5042 fi ;;
5043esac
5044for ac_hdr in curses.h ncurses.h term.h
5045do
5046ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5047echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 5048echo "configure:5049: checking for $ac_hdr" >&5
5ee754fc 5049if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5050 echo $ac_n "(cached) $ac_c" 1>&6
5051else
5052 cat > conftest.$ac_ext <<EOF
f5dbc56d 5053#line 5054 "configure"
c906108c 5054#include "confdefs.h"
5ee754fc 5055#include <$ac_hdr>
c906108c
SS
5056EOF
5057ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 5058{ (eval echo configure:5059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5059ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5060if test -z "$ac_err"; then
5061 rm -rf conftest*
5ee754fc 5062 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5063else
5064 echo "$ac_err" >&5
5065 echo "configure: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5067 rm -rf conftest*
5ee754fc 5068 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5069fi
5070rm -f conftest*
c906108c 5071fi
5ee754fc
MK
5072if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5073 echo "$ac_t""yes" 1>&6
5074 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5075 cat >> confdefs.h <<EOF
5076#define $ac_tr_hdr 1
c906108c 5077EOF
5ee754fc 5078
c906108c 5079else
5ee754fc 5080 echo "$ac_t""no" 1>&6
c906108c 5081fi
5ee754fc 5082done
c906108c
SS
5083
5084
5ee754fc
MK
5085# FIXME: kettenis/20030102: In most cases we include these
5086# unconditionally, so what's the point in checking these?
5087for ac_hdr in ctype.h time.h
c906108c
SS
5088do
5089ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5090echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 5091echo "configure:5092: checking for $ac_hdr" >&5
c906108c
SS
5092if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5093 echo $ac_n "(cached) $ac_c" 1>&6
5094else
5095 cat > conftest.$ac_ext <<EOF
f5dbc56d 5096#line 5097 "configure"
c906108c
SS
5097#include "confdefs.h"
5098#include <$ac_hdr>
5099EOF
5100ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 5101{ (eval echo configure:5102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5102ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5103if test -z "$ac_err"; then
5104 rm -rf conftest*
5105 eval "ac_cv_header_$ac_safe=yes"
5106else
5107 echo "$ac_err" >&5
5108 echo "configure: failed program was:" >&5
5109 cat conftest.$ac_ext >&5
5110 rm -rf conftest*
5111 eval "ac_cv_header_$ac_safe=no"
5112fi
5113rm -f conftest*
5114fi
5115if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5116 echo "$ac_t""yes" 1>&6
5117 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5118 cat >> confdefs.h <<EOF
5119#define $ac_tr_hdr 1
5120EOF
5121
5122else
5123 echo "$ac_t""no" 1>&6
5124fi
5125done
5126
5ee754fc
MK
5127
5128# ------------------ #
5129# Checks for types. #
5130# ------------------ #
5131
5132echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
f5dbc56d 5133echo "configure:5134: checking return type of signal handlers" >&5
5ee754fc 5134if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5135 echo $ac_n "(cached) $ac_c" 1>&6
5136else
5137 cat > conftest.$ac_ext <<EOF
f5dbc56d 5138#line 5139 "configure"
c906108c
SS
5139#include "confdefs.h"
5140#include <sys/types.h>
5ee754fc
MK
5141#include <signal.h>
5142#ifdef signal
5143#undef signal
c906108c 5144#endif
5ee754fc
MK
5145#ifdef __cplusplus
5146extern "C" void (*signal (int, void (*)(int)))(int);
5147#else
5148void (*signal ()) ();
c906108c
SS
5149#endif
5150
5ee754fc
MK
5151int main() {
5152int i;
5153; return 0; }
c906108c 5154EOF
f5dbc56d 5155if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5156 rm -rf conftest*
5ee754fc 5157 ac_cv_type_signal=void
c906108c 5158else
5ee754fc
MK
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
c906108c 5161 rm -rf conftest*
5ee754fc 5162 ac_cv_type_signal=int
c906108c
SS
5163fi
5164rm -f conftest*
c906108c
SS
5165fi
5166
5ee754fc
MK
5167echo "$ac_t""$ac_cv_type_signal" 1>&6
5168cat >> confdefs.h <<EOF
5169#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5170EOF
5171
c906108c
SS
5172
5173
5ee754fc
MK
5174# ------------------------------------- #
5175# Checks for compiler characteristics. #
5176# ------------------------------------- #
5177
c906108c 5178echo $ac_n "checking for working const""... $ac_c" 1>&6
f5dbc56d 5179echo "configure:5180: checking for working const" >&5
c906108c
SS
5180if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
5182else
5183 cat > conftest.$ac_ext <<EOF
f5dbc56d 5184#line 5185 "configure"
c906108c
SS
5185#include "confdefs.h"
5186
5187int main() {
5188
5189/* Ultrix mips cc rejects this. */
5190typedef int charset[2]; const charset x;
5191/* SunOS 4.1.1 cc rejects this. */
5192char const *const *ccp;
5193char **p;
5194/* NEC SVR4.0.2 mips cc rejects this. */
5195struct point {int x, y;};
5196static struct point const zero = {0,0};
5197/* AIX XL C 1.02.0.0 rejects this.
5198 It does not let you subtract one const X* pointer from another in an arm
5199 of an if-expression whose if-part is not a constant expression */
5200const char *g = "string";
5201ccp = &g + (g ? g-g : 0);
5202/* HPUX 7.0 cc rejects these. */
5203++ccp;
5204p = (char**) ccp;
5205ccp = (char const *const *) p;
5206{ /* SCO 3.2v4 cc rejects this. */
5207 char *t;
5208 char const *s = 0 ? (char *) 0 : (char const *) 0;
5209
5210 *t++ = 0;
5211}
5212{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5213 int x[] = {25, 17};
5214 const int *foo = &x[0];
5215 ++foo;
5216}
5217{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5218 typedef const int *iptr;
5219 iptr p = 0;
5220 ++p;
5221}
5222{ /* AIX XL C 1.02.0.0 rejects this saying
5223 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5224 struct s { int j; const int *ap[3]; };
5225 struct s *b; b->j = 5;
5226}
5227{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5228 const int foo = 10;
5229}
5230
5231; return 0; }
5232EOF
f5dbc56d 5233if { (eval echo configure:5234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5234 rm -rf conftest*
5235 ac_cv_c_const=yes
5236else
5237 echo "configure: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
5239 rm -rf conftest*
5240 ac_cv_c_const=no
5241fi
5242rm -f conftest*
5243fi
5244
5245echo "$ac_t""$ac_cv_c_const" 1>&6
5246if test $ac_cv_c_const = no; then
5247 cat >> confdefs.h <<\EOF
5248#define const
5249EOF
5250
5251fi
5252
bce58c09 5253echo $ac_n "checking for inline""... $ac_c" 1>&6
f5dbc56d 5254echo "configure:5255: checking for inline" >&5
bce58c09
JB
5255if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5256 echo $ac_n "(cached) $ac_c" 1>&6
5257else
5258 ac_cv_c_inline=no
5259for ac_kw in inline __inline__ __inline; do
5260 cat > conftest.$ac_ext <<EOF
f5dbc56d 5261#line 5262 "configure"
bce58c09
JB
5262#include "confdefs.h"
5263
5264int main() {
5265} $ac_kw foo() {
5266; return 0; }
5267EOF
f5dbc56d 5268if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5269 rm -rf conftest*
5270 ac_cv_c_inline=$ac_kw; break
5271else
5272 echo "configure: failed program was:" >&5
5273 cat conftest.$ac_ext >&5
5274fi
5275rm -f conftest*
5276done
5277
5278fi
5279
5280echo "$ac_t""$ac_cv_c_inline" 1>&6
5281case "$ac_cv_c_inline" in
5282 inline | yes) ;;
5283 no) cat >> confdefs.h <<\EOF
5284#define inline
5285EOF
5286 ;;
5287 *) cat >> confdefs.h <<EOF
5288#define inline $ac_cv_c_inline
5289EOF
5290 ;;
5291esac
5292
c906108c 5293
5ee754fc
MK
5294# ------------------------------ #
5295# Checks for library functions. #
5296# ------------------------------ #
5297
46711df8
MK
5298# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5299# for constant arguments. Useless!
5300echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
f5dbc56d 5301echo "configure:5302: checking for working alloca.h" >&5
46711df8
MK
5302if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5303 echo $ac_n "(cached) $ac_c" 1>&6
5304else
5305 cat > conftest.$ac_ext <<EOF
f5dbc56d 5306#line 5307 "configure"
46711df8
MK
5307#include "confdefs.h"
5308#include <alloca.h>
5309int main() {
5310char *p = alloca(2 * sizeof(int));
5311; return 0; }
5312EOF
f5dbc56d 5313if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5314 rm -rf conftest*
5315 ac_cv_header_alloca_h=yes
5316else
5317 echo "configure: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 rm -rf conftest*
5320 ac_cv_header_alloca_h=no
5321fi
5322rm -f conftest*
5323fi
5324
5325echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5326if test $ac_cv_header_alloca_h = yes; then
5327 cat >> confdefs.h <<\EOF
5328#define HAVE_ALLOCA_H 1
5329EOF
5330
5331fi
5332
5333echo $ac_n "checking for alloca""... $ac_c" 1>&6
f5dbc56d 5334echo "configure:5335: checking for alloca" >&5
46711df8
MK
5335if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5336 echo $ac_n "(cached) $ac_c" 1>&6
5337else
5338 cat > conftest.$ac_ext <<EOF
f5dbc56d 5339#line 5340 "configure"
46711df8
MK
5340#include "confdefs.h"
5341
5342#ifdef __GNUC__
5343# define alloca __builtin_alloca
5344#else
5345# ifdef _MSC_VER
5346# include <malloc.h>
5347# define alloca _alloca
5348# else
5349# if HAVE_ALLOCA_H
5350# include <alloca.h>
5351# else
5352# ifdef _AIX
5353 #pragma alloca
5354# else
5355# ifndef alloca /* predefined by HP cc +Olibcalls */
5356char *alloca ();
5357# endif
5358# endif
5359# endif
5360# endif
5361#endif
5362
5363int main() {
5364char *p = (char *) alloca(1);
5365; return 0; }
5366EOF
f5dbc56d 5367if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5368 rm -rf conftest*
5369 ac_cv_func_alloca_works=yes
5370else
5371 echo "configure: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 rm -rf conftest*
5374 ac_cv_func_alloca_works=no
5375fi
5376rm -f conftest*
5377fi
5378
5379echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5380if test $ac_cv_func_alloca_works = yes; then
5381 cat >> confdefs.h <<\EOF
5382#define HAVE_ALLOCA 1
5383EOF
5384
5385fi
5386
5387if test $ac_cv_func_alloca_works = no; then
5388 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5389 # that cause trouble. Some versions do not even contain alloca or
5390 # contain a buggy version. If you still want to use their alloca,
5391 # use ar to extract alloca.o from them instead of compiling alloca.c.
5392 ALLOCA=alloca.${ac_objext}
5393 cat >> confdefs.h <<\EOF
5394#define C_ALLOCA 1
5395EOF
5396
5397
5398echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
f5dbc56d 5399echo "configure:5400: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5400if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5401 echo $ac_n "(cached) $ac_c" 1>&6
5402else
5403 cat > conftest.$ac_ext <<EOF
f5dbc56d 5404#line 5405 "configure"
46711df8
MK
5405#include "confdefs.h"
5406#if defined(CRAY) && ! defined(CRAY2)
5407webecray
5408#else
5409wenotbecray
5410#endif
5411
5412EOF
5413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5414 egrep "webecray" >/dev/null 2>&1; then
5415 rm -rf conftest*
5416 ac_cv_os_cray=yes
5417else
5418 rm -rf conftest*
5419 ac_cv_os_cray=no
5420fi
5421rm -f conftest*
5422
5423fi
5424
5425echo "$ac_t""$ac_cv_os_cray" 1>&6
5426if test $ac_cv_os_cray = yes; then
5427for ac_func in _getb67 GETB67 getb67; do
5428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 5429echo "configure:5430: checking for $ac_func" >&5
46711df8
MK
5430if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5431 echo $ac_n "(cached) $ac_c" 1>&6
5432else
5433 cat > conftest.$ac_ext <<EOF
f5dbc56d 5434#line 5435 "configure"
46711df8
MK
5435#include "confdefs.h"
5436/* System header to define __stub macros and hopefully few prototypes,
5437 which can conflict with char $ac_func(); below. */
5438#include <assert.h>
5439/* Override any gcc2 internal prototype to avoid an error. */
5440/* We use char because int might match the return type of a gcc2
5441 builtin and then its argument prototype would still apply. */
5442char $ac_func();
5443
5444int main() {
5445
5446/* The GNU C library defines this for functions which it implements
5447 to always fail with ENOSYS. Some functions are actually named
5448 something starting with __ and the normal name is an alias. */
5449#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5450choke me
5451#else
5452$ac_func();
5453#endif
5454
5455; return 0; }
5456EOF
f5dbc56d 5457if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5458 rm -rf conftest*
5459 eval "ac_cv_func_$ac_func=yes"
5460else
5461 echo "configure: failed program was:" >&5
5462 cat conftest.$ac_ext >&5
5463 rm -rf conftest*
5464 eval "ac_cv_func_$ac_func=no"
5465fi
5466rm -f conftest*
5467fi
5468
5469if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5470 echo "$ac_t""yes" 1>&6
5471 cat >> confdefs.h <<EOF
5472#define CRAY_STACKSEG_END $ac_func
5473EOF
5474
5475 break
5476else
5477 echo "$ac_t""no" 1>&6
5478fi
5479
5480done
5481fi
5482
5483echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
f5dbc56d 5484echo "configure:5485: checking stack direction for C alloca" >&5
46711df8
MK
5485if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5486 echo $ac_n "(cached) $ac_c" 1>&6
5487else
5488 if test "$cross_compiling" = yes; then
5489 ac_cv_c_stack_direction=0
5490else
5491 cat > conftest.$ac_ext <<EOF
f5dbc56d 5492#line 5493 "configure"
46711df8
MK
5493#include "confdefs.h"
5494find_stack_direction ()
5495{
5496 static char *addr = 0;
5497 auto char dummy;
5498 if (addr == 0)
5499 {
5500 addr = &dummy;
5501 return find_stack_direction ();
5502 }
5503 else
5504 return (&dummy > addr) ? 1 : -1;
5505}
5506main ()
5507{
5508 exit (find_stack_direction() < 0);
5509}
5510EOF
f5dbc56d 5511if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5512then
5513 ac_cv_c_stack_direction=1
5514else
5515 echo "configure: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517 rm -fr conftest*
5518 ac_cv_c_stack_direction=-1
5519fi
5520rm -fr conftest*
5521fi
5522
5523fi
5524
5525echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5526cat >> confdefs.h <<EOF
5527#define STACK_DIRECTION $ac_cv_c_stack_direction
5528EOF
5529
5530fi
5531
97bf5e38
MK
5532for ac_hdr in unistd.h
5533do
5534ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5535echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
f5dbc56d 5536echo "configure:5537: checking for $ac_hdr" >&5
74c1b268
AC
5537if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5539else
5540 cat > conftest.$ac_ext <<EOF
f5dbc56d 5541#line 5542 "configure"
74c1b268 5542#include "confdefs.h"
97bf5e38 5543#include <$ac_hdr>
74c1b268
AC
5544EOF
5545ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 5546{ (eval echo configure:5547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5547ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5548if test -z "$ac_err"; then
5549 rm -rf conftest*
5550 eval "ac_cv_header_$ac_safe=yes"
5551else
5552 echo "$ac_err" >&5
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 rm -rf conftest*
5556 eval "ac_cv_header_$ac_safe=no"
5557fi
5558rm -f conftest*
5559fi
5560if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5561 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5562 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5563 cat >> confdefs.h <<EOF
5564#define $ac_tr_hdr 1
74c1b268 5565EOF
97bf5e38 5566
74c1b268
AC
5567else
5568 echo "$ac_t""no" 1>&6
5569fi
97bf5e38 5570done
74c1b268 5571
97bf5e38
MK
5572for ac_func in getpagesize
5573do
5574echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 5575echo "configure:5576: checking for $ac_func" >&5
97bf5e38 5576if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5577 echo $ac_n "(cached) $ac_c" 1>&6
5578else
5579 cat > conftest.$ac_ext <<EOF
f5dbc56d 5580#line 5581 "configure"
74c1b268
AC
5581#include "confdefs.h"
5582/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5583 which can conflict with char $ac_func(); below. */
74c1b268
AC
5584#include <assert.h>
5585/* Override any gcc2 internal prototype to avoid an error. */
5586/* We use char because int might match the return type of a gcc2
5587 builtin and then its argument prototype would still apply. */
97bf5e38 5588char $ac_func();
74c1b268
AC
5589
5590int main() {
5591
5592/* The GNU C library defines this for functions which it implements
5593 to always fail with ENOSYS. Some functions are actually named
5594 something starting with __ and the normal name is an alias. */
97bf5e38 5595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5596choke me
5597#else
97bf5e38 5598$ac_func();
74c1b268
AC
5599#endif
5600
5601; return 0; }
5602EOF
f5dbc56d 5603if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5604 rm -rf conftest*
97bf5e38 5605 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5606else
5607 echo "configure: failed program was:" >&5
5608 cat conftest.$ac_ext >&5
5609 rm -rf conftest*
97bf5e38 5610 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5611fi
5612rm -f conftest*
5613fi
5614
97bf5e38 5615if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5616 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5617 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5618 cat >> confdefs.h <<EOF
5619#define $ac_tr_func 1
5620EOF
5621
74c1b268
AC
5622else
5623 echo "$ac_t""no" 1>&6
5624fi
97bf5e38 5625done
74c1b268 5626
97bf5e38 5627echo $ac_n "checking for working mmap""... $ac_c" 1>&6
f5dbc56d 5628echo "configure:5629: checking for working mmap" >&5
97bf5e38
MK
5629if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5630 echo $ac_n "(cached) $ac_c" 1>&6
5631else
5632 if test "$cross_compiling" = yes; then
5633 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5634else
5635 cat > conftest.$ac_ext <<EOF
f5dbc56d 5636#line 5637 "configure"
74c1b268 5637#include "confdefs.h"
97bf5e38
MK
5638
5639/* Thanks to Mike Haertel and Jim Avera for this test.
5640 Here is a matrix of mmap possibilities:
5641 mmap private not fixed
5642 mmap private fixed at somewhere currently unmapped
5643 mmap private fixed at somewhere already mapped
5644 mmap shared not fixed
5645 mmap shared fixed at somewhere currently unmapped
5646 mmap shared fixed at somewhere already mapped
5647 For private mappings, we should verify that changes cannot be read()
5648 back from the file, nor mmap's back from the file at a different
5649 address. (There have been systems where private was not correctly
5650 implemented like the infamous i386 svr4.0, and systems where the
5651 VM page cache was not coherent with the filesystem buffer cache
5652 like early versions of FreeBSD and possibly contemporary NetBSD.)
5653 For shared mappings, we should conversely verify that changes get
5654 propogated back to all the places they're supposed to be.
5655
5656 Grep wants private fixed already mapped.
5657 The main things grep needs to know about mmap are:
5658 * does it exist and is it safe to write into the mmap'd area
5659 * how to use it (BSD variants) */
74c1b268 5660#include <sys/types.h>
97bf5e38
MK
5661#include <fcntl.h>
5662#include <sys/mman.h>
5663
5664/* This mess was copied from the GNU getpagesize.h. */
5665#ifndef HAVE_GETPAGESIZE
5666# ifdef HAVE_UNISTD_H
5667# include <unistd.h>
5668# endif
5669
5670/* Assume that all systems that can run configure have sys/param.h. */
5671# ifndef HAVE_SYS_PARAM_H
5672# define HAVE_SYS_PARAM_H 1
5673# endif
5674
5675# ifdef _SC_PAGESIZE
5676# define getpagesize() sysconf(_SC_PAGESIZE)
5677# else /* no _SC_PAGESIZE */
5678# ifdef HAVE_SYS_PARAM_H
5679# include <sys/param.h>
5680# ifdef EXEC_PAGESIZE
5681# define getpagesize() EXEC_PAGESIZE
5682# else /* no EXEC_PAGESIZE */
5683# ifdef NBPG
5684# define getpagesize() NBPG * CLSIZE
5685# ifndef CLSIZE
5686# define CLSIZE 1
5687# endif /* no CLSIZE */
5688# else /* no NBPG */
5689# ifdef NBPC
5690# define getpagesize() NBPC
5691# else /* no NBPC */
5692# ifdef PAGESIZE
5693# define getpagesize() PAGESIZE
5694# endif /* PAGESIZE */
5695# endif /* no NBPC */
5696# endif /* no NBPG */
5697# endif /* no EXEC_PAGESIZE */
5698# else /* no HAVE_SYS_PARAM_H */
5699# define getpagesize() 8192 /* punt totally */
5700# endif /* no HAVE_SYS_PARAM_H */
5701# endif /* no _SC_PAGESIZE */
5702
5703#endif /* no HAVE_GETPAGESIZE */
5704
74c1b268 5705#ifdef __cplusplus
97bf5e38 5706extern "C" { void *malloc(unsigned); }
74c1b268 5707#else
97bf5e38 5708char *malloc();
74c1b268 5709#endif
74c1b268 5710
97bf5e38
MK
5711int
5712main()
5713{
5714 char *data, *data2, *data3;
5715 int i, pagesize;
5716 int fd;
74c1b268 5717
97bf5e38 5718 pagesize = getpagesize();
74c1b268 5719
97bf5e38
MK
5720 /*
5721 * First, make a file with some known garbage in it.
5722 */
5723 data = malloc(pagesize);
5724 if (!data)
5725 exit(1);
5726 for (i = 0; i < pagesize; ++i)
5727 *(data + i) = rand();
5728 umask(0);
5729 fd = creat("conftestmmap", 0600);
5730 if (fd < 0)
5731 exit(1);
5732 if (write(fd, data, pagesize) != pagesize)
5733 exit(1);
5734 close(fd);
74c1b268 5735
97bf5e38
MK
5736 /*
5737 * Next, try to mmap the file at a fixed address which
5738 * already has something else allocated at it. If we can,
5739 * also make sure that we see the same garbage.
5740 */
5741 fd = open("conftestmmap", O_RDWR);
5742 if (fd < 0)
5743 exit(1);
5744 data2 = malloc(2 * pagesize);
5745 if (!data2)
5746 exit(1);
5747 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5748 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5749 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5750 exit(1);
5751 for (i = 0; i < pagesize; ++i)
5752 if (*(data + i) != *(data2 + i))
5753 exit(1);
74c1b268 5754
97bf5e38
MK
5755 /*
5756 * Finally, make sure that changes to the mapped area
5757 * do not percolate back to the file as seen by read().
5758 * (This is a bug on some variants of i386 svr4.0.)
5759 */
5760 for (i = 0; i < pagesize; ++i)
5761 *(data2 + i) = *(data2 + i) + 1;
5762 data3 = malloc(pagesize);
5763 if (!data3)
5764 exit(1);
5765 if (read(fd, data3, pagesize) != pagesize)
5766 exit(1);
5767 for (i = 0; i < pagesize; ++i)
5768 if (*(data + i) != *(data3 + i))
5769 exit(1);
5770 close(fd);
5771 unlink("conftestmmap");
5772 exit(0);
74c1b268 5773}
97bf5e38 5774
74c1b268 5775EOF
f5dbc56d 5776if { (eval echo configure:5777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5777then
97bf5e38 5778 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5779else
5780 echo "configure: failed program was:" >&5
5781 cat conftest.$ac_ext >&5
5782 rm -fr conftest*
97bf5e38 5783 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5784fi
5785rm -fr conftest*
5786fi
5787
5788fi
5789
97bf5e38
MK
5790echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5791if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5792 cat >> confdefs.h <<\EOF
97bf5e38 5793#define HAVE_MMAP 1
74c1b268
AC
5794EOF
5795
5796fi
5797
97bf5e38 5798echo $ac_n "checking for pid_t""... $ac_c" 1>&6
f5dbc56d 5799echo "configure:5800: checking for pid_t" >&5
97bf5e38 5800if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5801 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5802else
5803 cat > conftest.$ac_ext <<EOF
f5dbc56d 5804#line 5805 "configure"
0200359f 5805#include "confdefs.h"
97bf5e38
MK
5806#include <sys/types.h>
5807#if STDC_HEADERS
5808#include <stdlib.h>
5809#include <stddef.h>
0200359f 5810#endif
0200359f 5811EOF
97bf5e38
MK
5812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5813 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5814 rm -rf conftest*
5815 ac_cv_type_pid_t=yes
0200359f 5816else
97bf5e38
MK
5817 rm -rf conftest*
5818 ac_cv_type_pid_t=no
0200359f 5819fi
97bf5e38 5820rm -f conftest*
0200359f
MK
5821
5822fi
97bf5e38
MK
5823echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5824if test $ac_cv_type_pid_t = no; then
0200359f 5825 cat >> confdefs.h <<\EOF
97bf5e38 5826#define pid_t int
0200359f
MK
5827EOF
5828
5829fi
5830
97bf5e38
MK
5831ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5832echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
f5dbc56d 5833echo "configure:5834: checking for vfork.h" >&5
97bf5e38 5834if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5835 echo $ac_n "(cached) $ac_c" 1>&6
5836else
5837 cat > conftest.$ac_ext <<EOF
f5dbc56d 5838#line 5839 "configure"
72473524 5839#include "confdefs.h"
97bf5e38 5840#include <vfork.h>
72473524 5841EOF
97bf5e38 5842ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 5843{ (eval echo configure:5844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5844ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5845if test -z "$ac_err"; then
72473524 5846 rm -rf conftest*
97bf5e38 5847 eval "ac_cv_header_$ac_safe=yes"
72473524 5848else
97bf5e38 5849 echo "$ac_err" >&5
72473524
DJ
5850 echo "configure: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5852 rm -rf conftest*
97bf5e38 5853 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5854fi
5855rm -f conftest*
5856fi
97bf5e38
MK
5857if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5858 echo "$ac_t""yes" 1>&6
72473524 5859 cat >> confdefs.h <<\EOF
97bf5e38 5860#define HAVE_VFORK_H 1
72473524
DJ
5861EOF
5862
97bf5e38
MK
5863else
5864 echo "$ac_t""no" 1>&6
72473524 5865fi
c906108c 5866
97bf5e38 5867echo $ac_n "checking for working vfork""... $ac_c" 1>&6
f5dbc56d 5868echo "configure:5869: checking for working vfork" >&5
97bf5e38
MK
5869if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5870 echo $ac_n "(cached) $ac_c" 1>&6
5871else
5872 if test "$cross_compiling" = yes; then
5873 echo $ac_n "checking for vfork""... $ac_c" 1>&6
f5dbc56d 5874echo "configure:5875: checking for vfork" >&5
97bf5e38 5875if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5876 echo $ac_n "(cached) $ac_c" 1>&6
5877else
5878 cat > conftest.$ac_ext <<EOF
f5dbc56d 5879#line 5880 "configure"
2b2d558c 5880#include "confdefs.h"
97bf5e38
MK
5881/* System header to define __stub macros and hopefully few prototypes,
5882 which can conflict with char vfork(); below. */
5883#include <assert.h>
5884/* Override any gcc2 internal prototype to avoid an error. */
5885/* We use char because int might match the return type of a gcc2
5886 builtin and then its argument prototype would still apply. */
5887char vfork();
2b2d558c
MK
5888
5889int main() {
97bf5e38
MK
5890
5891/* The GNU C library defines this for functions which it implements
5892 to always fail with ENOSYS. Some functions are actually named
5893 something starting with __ and the normal name is an alias. */
5894#if defined (__stub_vfork) || defined (__stub___vfork)
5895choke me
5896#else
5897vfork();
5898#endif
5899
2b2d558c
MK
5900; return 0; }
5901EOF
f5dbc56d 5902if { (eval echo configure:5903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5903 rm -rf conftest*
97bf5e38 5904 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5905else
5906 echo "configure: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 rm -rf conftest*
97bf5e38 5909 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5910fi
5911rm -f conftest*
5912fi
5913
97bf5e38
MK
5914if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5915 echo "$ac_t""yes" 1>&6
5916 :
5917else
5918 echo "$ac_t""no" 1>&6
2b2d558c
MK
5919fi
5920
97bf5e38 5921ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5922else
5923 cat > conftest.$ac_ext <<EOF
f5dbc56d 5924#line 5925 "configure"
7dfa765c 5925#include "confdefs.h"
97bf5e38
MK
5926/* Thanks to Paul Eggert for this test. */
5927#include <stdio.h>
5928#include <sys/types.h>
5929#include <sys/stat.h>
5930#ifdef HAVE_UNISTD_H
5931#include <unistd.h>
5932#endif
5933#ifdef HAVE_VFORK_H
5934#include <vfork.h>
5935#endif
5936/* On some sparc systems, changes by the child to local and incoming
5937 argument registers are propagated back to the parent.
5938 The compiler is told about this with #include <vfork.h>,
5939 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5940 Test for this by using a static variable whose address
5941 is put into a register that is clobbered by the vfork. */
5942static
5943#ifdef __cplusplus
5944sparc_address_test (int arg)
5945#else
5946sparc_address_test (arg) int arg;
5947#endif
5948{
5949 static pid_t child;
5950 if (!child) {
5951 child = vfork ();
5952 if (child < 0) {
5953 perror ("vfork");
5954 _exit(2);
5955 }
5956 if (!child) {
5957 arg = getpid();
5958 write(-1, "", 0);
5959 _exit (arg);
5960 }
5961 }
5962}
5963main() {
5964 pid_t parent = getpid ();
5965 pid_t child;
7dfa765c 5966
97bf5e38 5967 sparc_address_test ();
7dfa765c 5968
97bf5e38 5969 child = vfork ();
7dfa765c 5970
97bf5e38
MK
5971 if (child == 0) {
5972 /* Here is another test for sparc vfork register problems.
5973 This test uses lots of local variables, at least
5974 as many local variables as main has allocated so far
5975 including compiler temporaries. 4 locals are enough for
5976 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5977 A buggy compiler should reuse the register of parent
5978 for one of the local variables, since it will think that
5979 parent can't possibly be used any more in this routine.
5980 Assigning to the local variable will thus munge parent
5981 in the parent process. */
5982 pid_t
5983 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5984 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5985 /* Convince the compiler that p..p7 are live; otherwise, it might
5986 use the same hardware register for all 8 local variables. */
5987 if (p != p1 || p != p2 || p != p3 || p != p4
5988 || p != p5 || p != p6 || p != p7)
5989 _exit(1);
7dfa765c 5990
97bf5e38
MK
5991 /* On some systems (e.g. IRIX 3.3),
5992 vfork doesn't separate parent from child file descriptors.
5993 If the child closes a descriptor before it execs or exits,
5994 this munges the parent's descriptor as well.
5995 Test for this by closing stdout in the child. */
5996 _exit(close(fileno(stdout)) != 0);
5997 } else {
5998 int status;
5999 struct stat st;
64bb1671 6000
97bf5e38
MK
6001 while (wait(&status) != child)
6002 ;
6003 exit(
6004 /* Was there some problem with vforking? */
6005 child < 0
64bb1671 6006
97bf5e38
MK
6007 /* Did the child fail? (This shouldn't happen.) */
6008 || status
64bb1671 6009
97bf5e38
MK
6010 /* Did the vfork/compiler bug occur? */
6011 || parent != getpid()
6012
6013 /* Did the file descriptor bug occur? */
6014 || fstat(fileno(stdout), &st) != 0
6015 );
6016 }
6017}
5c44784c 6018EOF
f5dbc56d 6019if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6020then
6021 ac_cv_func_vfork_works=yes
5c44784c
JM
6022else
6023 echo "configure: failed program was:" >&5
6024 cat conftest.$ac_ext >&5
97bf5e38
MK
6025 rm -fr conftest*
6026 ac_cv_func_vfork_works=no
5c44784c 6027fi
97bf5e38 6028rm -fr conftest*
5c44784c
JM
6029fi
6030
0afdd437
MK
6031fi
6032
97bf5e38
MK
6033echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6034if test $ac_cv_func_vfork_works = no; then
0afdd437 6035 cat >> confdefs.h <<\EOF
97bf5e38 6036#define vfork fork
0afdd437
MK
6037EOF
6038
6039fi
6040
97bf5e38
MK
6041for ac_func in canonicalize_file_name realpath
6042do
6043echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6044echo "configure:6045: checking for $ac_func" >&5
97bf5e38 6045if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6046 echo $ac_n "(cached) $ac_c" 1>&6
6047else
6048 cat > conftest.$ac_ext <<EOF
f5dbc56d 6049#line 6050 "configure"
7e89e357 6050#include "confdefs.h"
97bf5e38
MK
6051/* System header to define __stub macros and hopefully few prototypes,
6052 which can conflict with char $ac_func(); below. */
6053#include <assert.h>
6054/* Override any gcc2 internal prototype to avoid an error. */
6055/* We use char because int might match the return type of a gcc2
6056 builtin and then its argument prototype would still apply. */
6057char $ac_func();
6058
7e89e357 6059int main() {
97bf5e38
MK
6060
6061/* The GNU C library defines this for functions which it implements
6062 to always fail with ENOSYS. Some functions are actually named
6063 something starting with __ and the normal name is an alias. */
6064#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6065choke me
6066#else
6067$ac_func();
6068#endif
6069
7e89e357
JT
6070; return 0; }
6071EOF
f5dbc56d 6072if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6073 rm -rf conftest*
97bf5e38 6074 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6075else
6076 echo "configure: failed program was:" >&5
6077 cat conftest.$ac_ext >&5
6078 rm -rf conftest*
97bf5e38 6079 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6080fi
6081rm -f conftest*
6082fi
6083
97bf5e38
MK
6084if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6085 echo "$ac_t""yes" 1>&6
6086 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6087 cat >> confdefs.h <<EOF
6088#define $ac_tr_func 1
7e89e357 6089EOF
97bf5e38
MK
6090
6091else
6092 echo "$ac_t""no" 1>&6
7e89e357 6093fi
97bf5e38 6094done
7e89e357 6095
97bf5e38 6096for ac_func in poll
7be570e7
JM
6097do
6098echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6099echo "configure:6100: checking for $ac_func" >&5
7be570e7
JM
6100if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6101 echo $ac_n "(cached) $ac_c" 1>&6
6102else
6103 cat > conftest.$ac_ext <<EOF
f5dbc56d 6104#line 6105 "configure"
7be570e7
JM
6105#include "confdefs.h"
6106/* System header to define __stub macros and hopefully few prototypes,
6107 which can conflict with char $ac_func(); below. */
6108#include <assert.h>
6109/* Override any gcc2 internal prototype to avoid an error. */
6110/* We use char because int might match the return type of a gcc2
6111 builtin and then its argument prototype would still apply. */
6112char $ac_func();
6113
6114int main() {
6115
6116/* The GNU C library defines this for functions which it implements
6117 to always fail with ENOSYS. Some functions are actually named
6118 something starting with __ and the normal name is an alias. */
6119#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6120choke me
6121#else
6122$ac_func();
6123#endif
6124
6125; return 0; }
6126EOF
f5dbc56d 6127if { (eval echo configure:6128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6128 rm -rf conftest*
6129 eval "ac_cv_func_$ac_func=yes"
6130else
6131 echo "configure: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6133 rm -rf conftest*
6134 eval "ac_cv_func_$ac_func=no"
6135fi
6136rm -f conftest*
6137fi
6138
6139if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6140 echo "$ac_t""yes" 1>&6
6141 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6142 cat >> confdefs.h <<EOF
6143#define $ac_tr_func 1
6144EOF
6145
6146else
6147 echo "$ac_t""no" 1>&6
6148fi
6149done
6150
97bf5e38
MK
6151for ac_func in sbrk
6152do
6153echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6154echo "configure:6155: checking for $ac_func" >&5
97bf5e38 6155if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6156 echo $ac_n "(cached) $ac_c" 1>&6
6157else
6158 cat > conftest.$ac_ext <<EOF
f5dbc56d 6159#line 6160 "configure"
c906108c 6160#include "confdefs.h"
97bf5e38
MK
6161/* System header to define __stub macros and hopefully few prototypes,
6162 which can conflict with char $ac_func(); below. */
6163#include <assert.h>
6164/* Override any gcc2 internal prototype to avoid an error. */
6165/* We use char because int might match the return type of a gcc2
6166 builtin and then its argument prototype would still apply. */
6167char $ac_func();
c906108c 6168
97bf5e38
MK
6169int main() {
6170
6171/* The GNU C library defines this for functions which it implements
6172 to always fail with ENOSYS. Some functions are actually named
6173 something starting with __ and the normal name is an alias. */
6174#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6175choke me
c906108c 6176#else
97bf5e38 6177$ac_func();
c906108c 6178#endif
97bf5e38 6179
c906108c
SS
6180; return 0; }
6181EOF
f5dbc56d 6182if { (eval echo configure:6183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6183 rm -rf conftest*
97bf5e38 6184 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6185else
6186 echo "configure: failed program was:" >&5
6187 cat conftest.$ac_ext >&5
6188 rm -rf conftest*
97bf5e38 6189 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6190fi
6191rm -f conftest*
6192fi
6193
97bf5e38
MK
6194if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6195 echo "$ac_t""yes" 1>&6
6196 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6197 cat >> confdefs.h <<EOF
6198#define $ac_tr_func 1
c906108c 6199EOF
97bf5e38
MK
6200
6201else
6202 echo "$ac_t""no" 1>&6
c906108c 6203fi
97bf5e38 6204done
c906108c 6205
97bf5e38
MK
6206for ac_func in setpgid setpgrp
6207do
6208echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6209echo "configure:6210: checking for $ac_func" >&5
97bf5e38 6210if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6211 echo $ac_n "(cached) $ac_c" 1>&6
6212else
6213 cat > conftest.$ac_ext <<EOF
f5dbc56d 6214#line 6215 "configure"
c906108c 6215#include "confdefs.h"
97bf5e38
MK
6216/* System header to define __stub macros and hopefully few prototypes,
6217 which can conflict with char $ac_func(); below. */
6218#include <assert.h>
6219/* Override any gcc2 internal prototype to avoid an error. */
6220/* We use char because int might match the return type of a gcc2
6221 builtin and then its argument prototype would still apply. */
6222char $ac_func();
c906108c 6223
97bf5e38
MK
6224int main() {
6225
6226/* The GNU C library defines this for functions which it implements
6227 to always fail with ENOSYS. Some functions are actually named
6228 something starting with __ and the normal name is an alias. */
6229#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6230choke me
c906108c 6231#else
97bf5e38 6232$ac_func();
c906108c 6233#endif
97bf5e38 6234
c906108c
SS
6235; return 0; }
6236EOF
f5dbc56d 6237if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6238 rm -rf conftest*
97bf5e38 6239 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6240else
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -rf conftest*
97bf5e38 6244 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6245fi
6246rm -f conftest*
6247fi
6248
97bf5e38
MK
6249if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6250 echo "$ac_t""yes" 1>&6
6251 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6252 cat >> confdefs.h <<EOF
6253#define $ac_tr_func 1
c906108c 6254EOF
97bf5e38
MK
6255
6256else
6257 echo "$ac_t""no" 1>&6
c906108c 6258fi
97bf5e38 6259done
c906108c 6260
e1ea1d75 6261for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6262do
6263echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6264echo "configure:6265: checking for $ac_func" >&5
97bf5e38 6265if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6266 echo $ac_n "(cached) $ac_c" 1>&6
6267else
6268 cat > conftest.$ac_ext <<EOF
f5dbc56d 6269#line 6270 "configure"
c906108c 6270#include "confdefs.h"
97bf5e38
MK
6271/* System header to define __stub macros and hopefully few prototypes,
6272 which can conflict with char $ac_func(); below. */
6273#include <assert.h>
6274/* Override any gcc2 internal prototype to avoid an error. */
6275/* We use char because int might match the return type of a gcc2
6276 builtin and then its argument prototype would still apply. */
6277char $ac_func();
c906108c 6278
97bf5e38
MK
6279int main() {
6280
6281/* The GNU C library defines this for functions which it implements
6282 to always fail with ENOSYS. Some functions are actually named
6283 something starting with __ and the normal name is an alias. */
6284#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6285choke me
c906108c 6286#else
97bf5e38 6287$ac_func();
c906108c 6288#endif
97bf5e38 6289
c906108c
SS
6290; return 0; }
6291EOF
f5dbc56d 6292if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6293 rm -rf conftest*
97bf5e38 6294 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6295else
6296 echo "configure: failed program was:" >&5
6297 cat conftest.$ac_ext >&5
6298 rm -rf conftest*
97bf5e38 6299 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6300fi
6301rm -f conftest*
6302fi
6303
97bf5e38
MK
6304if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6305 echo "$ac_t""yes" 1>&6
6306 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6307 cat >> confdefs.h <<EOF
6308#define $ac_tr_func 1
c906108c 6309EOF
e1ea1d75 6310
97bf5e38
MK
6311else
6312 echo "$ac_t""no" 1>&6
c906108c 6313fi
97bf5e38 6314done
c906108c 6315
97bf5e38
MK
6316for ac_func in socketpair
6317do
6318echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
f5dbc56d 6319echo "configure:6320: checking for $ac_func" >&5
97bf5e38 6320if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6321 echo $ac_n "(cached) $ac_c" 1>&6
6322else
6323 cat > conftest.$ac_ext <<EOF
f5dbc56d 6324#line 6325 "configure"
c906108c 6325#include "confdefs.h"
97bf5e38
MK
6326/* System header to define __stub macros and hopefully few prototypes,
6327 which can conflict with char $ac_func(); below. */
6328#include <assert.h>
6329/* Override any gcc2 internal prototype to avoid an error. */
6330/* We use char because int might match the return type of a gcc2
6331 builtin and then its argument prototype would still apply. */
6332char $ac_func();
c906108c 6333
97bf5e38
MK
6334int main() {
6335
6336/* The GNU C library defines this for functions which it implements
6337 to always fail with ENOSYS. Some functions are actually named
6338 something starting with __ and the normal name is an alias. */
6339#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6340choke me
c906108c 6341#else
97bf5e38 6342$ac_func();
c906108c 6343#endif
97bf5e38 6344
c906108c
SS
6345; return 0; }
6346EOF
f5dbc56d 6347if { (eval echo configure:6348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6348 rm -rf conftest*
97bf5e38 6349 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6350else
6351 echo "configure: failed program was:" >&5
6352 cat conftest.$ac_ext >&5
6353 rm -rf conftest*
97bf5e38 6354 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6355fi
6356rm -f conftest*
6357fi
6358
97bf5e38
MK
6359if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6360 echo "$ac_t""yes" 1>&6
6361 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6362 cat >> confdefs.h <<EOF
6363#define $ac_tr_func 1
c906108c 6364EOF
97bf5e38
MK
6365
6366else
6367 echo "$ac_t""no" 1>&6
c906108c 6368fi
97bf5e38 6369done
c906108c 6370
97bf5e38
MK
6371
6372if test "$cross_compiling" = no; then
6373 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
f5dbc56d 6374echo "configure:6375: checking whether setpgrp takes no argument" >&5
97bf5e38 6375if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6376 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6377else
6378 if test "$cross_compiling" = yes; then
6379 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6380else
6381 cat > conftest.$ac_ext <<EOF
f5dbc56d 6382#line 6383 "configure"
c906108c
SS
6383#include "confdefs.h"
6384
c906108c
SS
6385#ifdef HAVE_UNISTD_H
6386#include <unistd.h>
6387#endif
97bf5e38
MK
6388
6389/*
6390 * If this system has a BSD-style setpgrp, which takes arguments, exit
6391 * successfully.
6392 */
6393main()
6394{
6395 if (setpgrp(1,1) == -1)
6396 exit(0);
6397 else
6398 exit(1);
6399}
6400
c906108c 6401EOF
f5dbc56d 6402if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6403then
6404 ac_cv_func_setpgrp_void=no
c906108c
SS
6405else
6406 echo "configure: failed program was:" >&5
6407 cat conftest.$ac_ext >&5
97bf5e38
MK
6408 rm -fr conftest*
6409 ac_cv_func_setpgrp_void=yes
c906108c 6410fi
97bf5e38 6411rm -fr conftest*
c906108c
SS
6412fi
6413
97bf5e38
MK
6414
6415fi
6416
6417echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6418if test $ac_cv_func_setpgrp_void = yes; then
6419 cat >> confdefs.h <<\EOF
6420#define SETPGRP_VOID 1
c906108c
SS
6421EOF
6422
6423fi
6424
97bf5e38
MK
6425else
6426 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
f5dbc56d 6427echo "configure:6428: checking whether setpgrp takes no argument" >&5
97bf5e38 6428if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6429 echo $ac_n "(cached) $ac_c" 1>&6
6430else
6431 cat > conftest.$ac_ext <<EOF
f5dbc56d 6432#line 6433 "configure"
b83266a0
SS
6433#include "confdefs.h"
6434
b83266a0 6435#include <unistd.h>
97bf5e38 6436
b83266a0 6437int main() {
97bf5e38
MK
6438
6439 if (setpgrp(1,1) == -1)
6440 exit (0);
6441 else
6442 exit (1);
6443
b83266a0
SS
6444; return 0; }
6445EOF
f5dbc56d 6446if { (eval echo configure:6447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6447 rm -rf conftest*
97bf5e38 6448 ac_cv_func_setpgrp_void=no
b83266a0
SS
6449else
6450 echo "configure: failed program was:" >&5
6451 cat conftest.$ac_ext >&5
6452 rm -rf conftest*
97bf5e38 6453 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6454fi
6455rm -f conftest*
6456fi
6457
97bf5e38
MK
6458echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6459if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6460 cat >> confdefs.h <<\EOF
97bf5e38 6461#define SETPGRP_VOID 1
b83266a0
SS
6462EOF
6463
97bf5e38 6464fi
b83266a0
SS
6465fi
6466
97bf5e38
MK
6467# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6468# since sigsetjmp might only be defined as a macro.
6469echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
f5dbc56d 6470echo "configure:6471: checking for sigsetjmp" >&5
97bf5e38 6471if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6472 echo $ac_n "(cached) $ac_c" 1>&6
6473else
6474 cat > conftest.$ac_ext <<EOF
f5dbc56d 6475#line 6476 "configure"
a4db0f07
RH
6476#include "confdefs.h"
6477
97bf5e38
MK
6478#include <setjmp.h>
6479
a4db0f07 6480int main() {
97bf5e38 6481sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6482; return 0; }
6483EOF
f5dbc56d 6484if { (eval echo configure:6485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6485 rm -rf conftest*
97bf5e38 6486 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6487else
6488 echo "configure: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
6490 rm -rf conftest*
97bf5e38 6491 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6492fi
6493rm -f conftest*
6494fi
6495
97bf5e38
MK
6496echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6497if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6498 cat >> confdefs.h <<\EOF
97bf5e38 6499#define HAVE_SIGSETJMP 1
a4db0f07
RH
6500EOF
6501
6502fi
c906108c 6503
06825bd1
MK
6504# Assume we'll default to using the included libiberty regex.
6505gdb_use_included_regex=yes
6506
6507# However, if the system regex is GNU regex, then default to *not*
6508# using the included regex.
6509echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
f5dbc56d 6510echo "configure:6511: checking for GNU regex" >&5
06825bd1
MK
6511if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6512 echo $ac_n "(cached) $ac_c" 1>&6
6513else
6514 cat > conftest.$ac_ext <<EOF
f5dbc56d 6515#line 6516 "configure"
06825bd1
MK
6516#include "confdefs.h"
6517#include <gnu-versions.h>
6518int main() {
6519#define REGEX_INTERFACE_VERSION 1
6520#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6521# error "Version mismatch"
6522#endif
6523; return 0; }
6524EOF
f5dbc56d 6525if { (eval echo configure:6526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6526 rm -rf conftest*
6527 gdb_cv_have_gnu_regex=yes
6528else
6529 echo "configure: failed program was:" >&5
6530 cat conftest.$ac_ext >&5
6531 rm -rf conftest*
6532 gdb_cv_have_gnu_regex=no
6533fi
6534rm -f conftest*
6535fi
6536
6537echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6538if test $gdb_cv_have_gnu_regex = yes; then
6539 gdb_use_included_regex=no
6540fi
6541
6542# Check whether --with-included-regex or --without-included-regex was given.
6543if test "${with_included_regex+set}" = set; then
6544 withval="$with_included_regex"
6545 gdb_with_regex=$withval
6546else
6547 gdb_with_regex=$gdb_use_included_regex
6548fi
6549
6550if test "$gdb_with_regex" = yes; then
6551 cat >> confdefs.h <<\EOF
6552#define USE_INCLUDED_REGEX 1
6553EOF
6554
6555fi
6556
97bf5e38
MK
6557# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6558# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6559echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
f5dbc56d 6560echo "configure:6561: checking for r_fs in struct reg" >&5
97bf5e38
MK
6561if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6562 echo $ac_n "(cached) $ac_c" 1>&6
6563else
6564 cat > conftest.$ac_ext <<EOF
f5dbc56d 6565#line 6566 "configure"
c906108c 6566#include "confdefs.h"
97bf5e38
MK
6567#include <machine/reg.h>
6568int main() {
6569struct reg r; r.r_fs;
6570; return 0; }
c906108c 6571EOF
f5dbc56d 6572if { (eval echo configure:6573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6573 rm -rf conftest*
97bf5e38 6574 gdb_cv_struct_reg_r_fs=yes
c906108c 6575else
97bf5e38
MK
6576 echo "configure: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
c906108c 6578 rm -rf conftest*
97bf5e38 6579 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6580fi
6581rm -f conftest*
97bf5e38 6582fi
c906108c 6583
97bf5e38
MK
6584echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6585if test $gdb_cv_struct_reg_r_fs = yes; then
6586 cat >> confdefs.h <<\EOF
6587#define HAVE_STRUCT_REG_R_FS 1
6588EOF
6589
6590fi
6591echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
f5dbc56d 6592echo "configure:6593: checking for r_gs in struct reg" >&5
97bf5e38
MK
6593if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6594 echo $ac_n "(cached) $ac_c" 1>&6
6595else
6596 cat > conftest.$ac_ext <<EOF
f5dbc56d 6597#line 6598 "configure"
c906108c 6598#include "confdefs.h"
97bf5e38
MK
6599#include <machine/reg.h>
6600int main() {
6601struct reg r; r.r_gs;
6602; return 0; }
c906108c 6603EOF
f5dbc56d 6604if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6605 rm -rf conftest*
97bf5e38 6606 gdb_cv_struct_reg_r_gs=yes
c906108c 6607else
97bf5e38
MK
6608 echo "configure: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
c906108c 6610 rm -rf conftest*
97bf5e38 6611 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6612fi
6613rm -f conftest*
c906108c 6614fi
c906108c 6615
97bf5e38
MK
6616echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6617if test $gdb_cv_struct_reg_r_gs = yes; then
6618 cat >> confdefs.h <<\EOF
6619#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6620EOF
6621
c906108c
SS
6622fi
6623
97bf5e38
MK
6624# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6625echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
f5dbc56d 6626echo "configure:6627: checking for PTRACE_GETREGS" >&5
97bf5e38 6627if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6628 echo $ac_n "(cached) $ac_c" 1>&6
6629else
6630 cat > conftest.$ac_ext <<EOF
f5dbc56d 6631#line 6632 "configure"
c906108c 6632#include "confdefs.h"
97bf5e38 6633#include <sys/ptrace.h>
c906108c 6634int main() {
97bf5e38 6635PTRACE_GETREGS;
c906108c
SS
6636; return 0; }
6637EOF
f5dbc56d 6638if { (eval echo configure:6639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6639 rm -rf conftest*
97bf5e38 6640 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6641else
6642 echo "configure: failed program was:" >&5
6643 cat conftest.$ac_ext >&5
6644 rm -rf conftest*
97bf5e38 6645 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6646fi
6647rm -f conftest*
6648fi
6649
97bf5e38
MK
6650echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6651if test $gdb_cv_have_ptrace_getregs = yes; then
6652 cat >> confdefs.h <<\EOF
6653#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6654EOF
6655
97bf5e38 6656fi
c906108c 6657
97bf5e38
MK
6658# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6659echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
f5dbc56d 6660echo "configure:6661: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6661if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6662 echo $ac_n "(cached) $ac_c" 1>&6
6663else
6664 cat > conftest.$ac_ext <<EOF
f5dbc56d 6665#line 6666 "configure"
c906108c 6666#include "confdefs.h"
97bf5e38 6667#include <sys/ptrace.h>
c906108c 6668int main() {
97bf5e38 6669PTRACE_GETFPXREGS;
c906108c
SS
6670; return 0; }
6671EOF
f5dbc56d 6672if { (eval echo configure:6673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6673 rm -rf conftest*
97bf5e38 6674 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6675else
6676 echo "configure: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 rm -rf conftest*
97bf5e38 6679 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6680fi
6681rm -f conftest*
6682fi
6683
97bf5e38
MK
6684echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6685if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6686 cat >> confdefs.h <<\EOF
6687#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6688EOF
6689
97bf5e38 6690fi
c906108c 6691
97bf5e38
MK
6692# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6693echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
f5dbc56d 6694echo "configure:6695: checking for PT_GETDBREGS" >&5
97bf5e38 6695if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6696 echo $ac_n "(cached) $ac_c" 1>&6
6697else
6698 cat > conftest.$ac_ext <<EOF
f5dbc56d 6699#line 6700 "configure"
c906108c 6700#include "confdefs.h"
97bf5e38
MK
6701#include <sys/types.h>
6702#include <sys/ptrace.h>
c906108c 6703int main() {
97bf5e38 6704PT_GETDBREGS;
c906108c
SS
6705; return 0; }
6706EOF
f5dbc56d 6707if { (eval echo configure:6708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6708 rm -rf conftest*
97bf5e38 6709 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6710else
6711 echo "configure: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
6713 rm -rf conftest*
97bf5e38 6714 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6715fi
6716rm -f conftest*
6717fi
6718
97bf5e38
MK
6719echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6720if test $gdb_cv_have_pt_getdbregs = yes; then
6721 cat >> confdefs.h <<\EOF
6722#define HAVE_PT_GETDBREGS 1
c906108c
SS
6723EOF
6724
97bf5e38 6725fi
c906108c 6726
97bf5e38
MK
6727# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6728echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
f5dbc56d 6729echo "configure:6730: checking for PT_GETXMMREGS" >&5
97bf5e38 6730if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6731 echo $ac_n "(cached) $ac_c" 1>&6
6732else
6733 cat > conftest.$ac_ext <<EOF
f5dbc56d 6734#line 6735 "configure"
c906108c 6735#include "confdefs.h"
97bf5e38
MK
6736#include <sys/types.h>
6737#include <sys/ptrace.h>
c906108c 6738int main() {
97bf5e38 6739PT_GETXMMREGS;
c906108c
SS
6740; return 0; }
6741EOF
f5dbc56d 6742if { (eval echo configure:6743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6743 rm -rf conftest*
97bf5e38 6744 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6745else
6746 echo "configure: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748 rm -rf conftest*
97bf5e38 6749 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6750fi
6751rm -f conftest*
6752fi
6753
97bf5e38
MK
6754echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6755if test $gdb_cv_have_pt_getxmmregs = yes; then
6756 cat >> confdefs.h <<\EOF
6757#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6758EOF
6759
97bf5e38 6760fi
c906108c 6761
97bf5e38
MK
6762
6763echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
f5dbc56d 6764echo "configure:6765: checking whether malloc must be declared" >&5
97bf5e38 6765if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6766 echo $ac_n "(cached) $ac_c" 1>&6
6767else
6768 cat > conftest.$ac_ext <<EOF
f5dbc56d 6769#line 6770 "configure"
3862412b 6770#include "confdefs.h"
e17bf198 6771
97bf5e38
MK
6772#include <stdio.h>
6773#ifdef HAVE_STRING_H
6774#include <string.h>
6775#else
6776#ifdef HAVE_STRINGS_H
6777#include <strings.h>
6778#endif
6779#endif
6780#ifdef HAVE_STDLIB_H
6781#include <stdlib.h>
6782#endif
6783#ifdef HAVE_UNISTD_H
6784#include <unistd.h>
6785#endif
3862412b 6786int main() {
97bf5e38 6787char *(*pfn) = (char *(*)) malloc
3862412b
MK
6788; return 0; }
6789EOF
f5dbc56d 6790if { (eval echo configure:6791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6791 rm -rf conftest*
97bf5e38 6792 bfd_cv_decl_needed_malloc=no
3862412b
MK
6793else
6794 echo "configure: failed program was:" >&5
6795 cat conftest.$ac_ext >&5
6796 rm -rf conftest*
97bf5e38 6797 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6798fi
6799rm -f conftest*
6800fi
6801
97bf5e38
MK
6802echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6803if test $bfd_cv_decl_needed_malloc = yes; then
6804 cat >> confdefs.h <<\EOF
6805#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6806EOF
6807
97bf5e38 6808fi
3862412b 6809
97bf5e38 6810echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
f5dbc56d 6811echo "configure:6812: checking whether realloc must be declared" >&5
97bf5e38 6812if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6813 echo $ac_n "(cached) $ac_c" 1>&6
6814else
6815 cat > conftest.$ac_ext <<EOF
f5dbc56d 6816#line 6817 "configure"
3862412b 6817#include "confdefs.h"
e17bf198 6818
97bf5e38
MK
6819#include <stdio.h>
6820#ifdef HAVE_STRING_H
6821#include <string.h>
6822#else
6823#ifdef HAVE_STRINGS_H
6824#include <strings.h>
6825#endif
6826#endif
6827#ifdef HAVE_STDLIB_H
6828#include <stdlib.h>
6829#endif
6830#ifdef HAVE_UNISTD_H
6831#include <unistd.h>
6832#endif
3862412b 6833int main() {
97bf5e38 6834char *(*pfn) = (char *(*)) realloc
3862412b
MK
6835; return 0; }
6836EOF
f5dbc56d 6837if { (eval echo configure:6838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6838 rm -rf conftest*
97bf5e38 6839 bfd_cv_decl_needed_realloc=no
3862412b
MK
6840else
6841 echo "configure: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843 rm -rf conftest*
97bf5e38 6844 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6845fi
6846rm -f conftest*
6847fi
6848
97bf5e38
MK
6849echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6850if test $bfd_cv_decl_needed_realloc = yes; then
6851 cat >> confdefs.h <<\EOF
6852#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6853EOF
6854
97bf5e38 6855fi
3862412b 6856
97bf5e38 6857echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
f5dbc56d 6858echo "configure:6859: checking whether free must be declared" >&5
97bf5e38 6859if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6860 echo $ac_n "(cached) $ac_c" 1>&6
6861else
6862 cat > conftest.$ac_ext <<EOF
f5dbc56d 6863#line 6864 "configure"
451928c5 6864#include "confdefs.h"
e17bf198 6865
97bf5e38
MK
6866#include <stdio.h>
6867#ifdef HAVE_STRING_H
6868#include <string.h>
6869#else
6870#ifdef HAVE_STRINGS_H
6871#include <strings.h>
6872#endif
6873#endif
6874#ifdef HAVE_STDLIB_H
6875#include <stdlib.h>
6876#endif
6877#ifdef HAVE_UNISTD_H
6878#include <unistd.h>
6879#endif
451928c5 6880int main() {
97bf5e38 6881char *(*pfn) = (char *(*)) free
451928c5
AC
6882; return 0; }
6883EOF
f5dbc56d 6884if { (eval echo configure:6885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6885 rm -rf conftest*
97bf5e38 6886 bfd_cv_decl_needed_free=no
451928c5
AC
6887else
6888 echo "configure: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 rm -rf conftest*
97bf5e38 6891 bfd_cv_decl_needed_free=yes
451928c5
AC
6892fi
6893rm -f conftest*
6894fi
6895
97bf5e38
MK
6896echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6897if test $bfd_cv_decl_needed_free = yes; then
6898 cat >> confdefs.h <<\EOF
6899#define NEED_DECLARATION_FREE 1
451928c5
AC
6900EOF
6901
97bf5e38 6902fi
451928c5 6903
97bf5e38 6904echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
f5dbc56d 6905echo "configure:6906: checking whether strerror must be declared" >&5
97bf5e38 6906if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6907 echo $ac_n "(cached) $ac_c" 1>&6
6908else
6909 cat > conftest.$ac_ext <<EOF
f5dbc56d 6910#line 6911 "configure"
451928c5 6911#include "confdefs.h"
e17bf198 6912
97bf5e38
MK
6913#include <stdio.h>
6914#ifdef HAVE_STRING_H
6915#include <string.h>
6916#else
6917#ifdef HAVE_STRINGS_H
6918#include <strings.h>
6919#endif
6920#endif
6921#ifdef HAVE_STDLIB_H
6922#include <stdlib.h>
6923#endif
6924#ifdef HAVE_UNISTD_H
6925#include <unistd.h>
6926#endif
451928c5 6927int main() {
97bf5e38 6928char *(*pfn) = (char *(*)) strerror
451928c5
AC
6929; return 0; }
6930EOF
f5dbc56d 6931if { (eval echo configure:6932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6932 rm -rf conftest*
97bf5e38 6933 bfd_cv_decl_needed_strerror=no
451928c5
AC
6934else
6935 echo "configure: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 rm -rf conftest*
97bf5e38 6938 bfd_cv_decl_needed_strerror=yes
451928c5
AC
6939fi
6940rm -f conftest*
6941fi
6942
97bf5e38
MK
6943echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6944if test $bfd_cv_decl_needed_strerror = yes; then
6945 cat >> confdefs.h <<\EOF
6946#define NEED_DECLARATION_STRERROR 1
451928c5
AC
6947EOF
6948
97bf5e38 6949fi
451928c5 6950
97bf5e38 6951echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
f5dbc56d 6952echo "configure:6953: checking whether strdup must be declared" >&5
97bf5e38 6953if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
6954 echo $ac_n "(cached) $ac_c" 1>&6
6955else
6956 cat > conftest.$ac_ext <<EOF
f5dbc56d 6957#line 6958 "configure"
3862412b 6958#include "confdefs.h"
e17bf198 6959
97bf5e38
MK
6960#include <stdio.h>
6961#ifdef HAVE_STRING_H
6962#include <string.h>
6963#else
6964#ifdef HAVE_STRINGS_H
6965#include <strings.h>
6966#endif
6967#endif
6968#ifdef HAVE_STDLIB_H
6969#include <stdlib.h>
6970#endif
6971#ifdef HAVE_UNISTD_H
6972#include <unistd.h>
6973#endif
3862412b 6974int main() {
97bf5e38 6975char *(*pfn) = (char *(*)) strdup
3862412b
MK
6976; return 0; }
6977EOF
f5dbc56d 6978if { (eval echo configure:6979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6979 rm -rf conftest*
97bf5e38 6980 bfd_cv_decl_needed_strdup=no
3862412b
MK
6981else
6982 echo "configure: failed program was:" >&5
6983 cat conftest.$ac_ext >&5
6984 rm -rf conftest*
97bf5e38 6985 bfd_cv_decl_needed_strdup=yes
3862412b
MK
6986fi
6987rm -f conftest*
6988fi
6989
97bf5e38
MK
6990echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
6991if test $bfd_cv_decl_needed_strdup = yes; then
6992 cat >> confdefs.h <<\EOF
6993#define NEED_DECLARATION_STRDUP 1
3862412b
MK
6994EOF
6995
97bf5e38 6996fi
3862412b 6997
97bf5e38 6998echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
f5dbc56d 6999echo "configure:7000: checking whether strstr must be declared" >&5
97bf5e38 7000if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7001 echo $ac_n "(cached) $ac_c" 1>&6
7002else
7003 cat > conftest.$ac_ext <<EOF
f5dbc56d 7004#line 7005 "configure"
3862412b 7005#include "confdefs.h"
e17bf198 7006
97bf5e38
MK
7007#include <stdio.h>
7008#ifdef HAVE_STRING_H
7009#include <string.h>
7010#else
7011#ifdef HAVE_STRINGS_H
7012#include <strings.h>
7013#endif
7014#endif
7015#ifdef HAVE_STDLIB_H
7016#include <stdlib.h>
7017#endif
7018#ifdef HAVE_UNISTD_H
7019#include <unistd.h>
7020#endif
3862412b 7021int main() {
97bf5e38 7022char *(*pfn) = (char *(*)) strstr
3862412b
MK
7023; return 0; }
7024EOF
f5dbc56d 7025if { (eval echo configure:7026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7026 rm -rf conftest*
97bf5e38 7027 bfd_cv_decl_needed_strstr=no
3862412b
MK
7028else
7029 echo "configure: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 rm -rf conftest*
97bf5e38 7032 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7033fi
7034rm -f conftest*
7035fi
7036
97bf5e38
MK
7037echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7038if test $bfd_cv_decl_needed_strstr = yes; then
7039 cat >> confdefs.h <<\EOF
7040#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7041EOF
7042
97bf5e38 7043fi
3862412b 7044
97bf5e38 7045echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
f5dbc56d 7046echo "configure:7047: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7047if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7048 echo $ac_n "(cached) $ac_c" 1>&6
7049else
7050 cat > conftest.$ac_ext <<EOF
f5dbc56d 7051#line 7052 "configure"
596c9d4b
KB
7052#include "confdefs.h"
7053
97bf5e38
MK
7054#include <stdio.h>
7055#ifdef HAVE_STRING_H
7056#include <string.h>
7057#else
7058#ifdef HAVE_STRINGS_H
7059#include <strings.h>
7060#endif
7061#endif
7062#ifdef HAVE_STDLIB_H
7063#include <stdlib.h>
7064#endif
7065#ifdef HAVE_UNISTD_H
7066#include <unistd.h>
7067#endif
596c9d4b 7068int main() {
97bf5e38 7069char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7070; return 0; }
7071EOF
f5dbc56d 7072if { (eval echo configure:7073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7073 rm -rf conftest*
97bf5e38 7074 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7075else
7076 echo "configure: failed program was:" >&5
7077 cat conftest.$ac_ext >&5
7078 rm -rf conftest*
97bf5e38 7079 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7080fi
7081rm -f conftest*
7082fi
7083
97bf5e38
MK
7084echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7085if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7086 cat >> confdefs.h <<\EOF
7087#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7088EOF
7089
97bf5e38 7090fi
596c9d4b 7091
97bf5e38
MK
7092
7093# The following save_state_t checkery is only necessary for HPUX
7094# versions earlier than 10.20. When those fade from memory, this
7095# could be expunged. --jsm 1999-03-22
7096
7097echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
f5dbc56d 7098echo "configure:7099: checking for HPUX save_state structure" >&5
97bf5e38 7099cat > conftest.$ac_ext <<EOF
f5dbc56d 7100#line 7101 "configure"
97bf5e38
MK
7101#include "confdefs.h"
7102#include <machine/save_state.h>
7103EOF
7104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7105 egrep "save_state_t" >/dev/null 2>&1; then
7106 rm -rf conftest*
7107 gdb_cv_hpux_savestate=yes
7108else
7109 rm -rf conftest*
7110 gdb_cv_hpux_savestate=no
7111fi
7112rm -f conftest*
7113
7114cat > conftest.$ac_ext <<EOF
f5dbc56d 7115#line 7116 "configure"
97bf5e38
MK
7116#include "confdefs.h"
7117#include <machine/save_state.h>
7118EOF
7119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7120 egrep "ss_wide" >/dev/null 2>&1; then
7121 rm -rf conftest*
7122 gdb_cv_hpux_sswide=yes
7123else
7124 rm -rf conftest*
7125 gdb_cv_hpux_sswide=no
7126fi
7127rm -f conftest*
7128
7129if test $gdb_cv_hpux_savestate = yes
7130then
7131 cat >> confdefs.h <<\EOF
7132#define HAVE_STRUCT_SAVE_STATE_T 1
7133EOF
7134
7135fi
7136if test $gdb_cv_hpux_sswide = yes
7137then
7138 cat >> confdefs.h <<\EOF
7139#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7140EOF
7141
7142fi
7143echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7144
7145
7146# If we are configured native on GNU/Linux, work around problems with
7147# sys/procfs.h
7148# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7149
7150if test "${target}" = "${host}"; then
7151 case "${host}" in
7152 i[3456]86-*-linux*)
7153 cat >> confdefs.h <<\EOF
7154#define START_INFERIOR_TRAPS_EXPECTED 2
7155EOF
7156
7157 cat >> confdefs.h <<\EOF
7158#define sys_quotactl 1
7159EOF
7160
7161 ;;
7162 ia64-*-aix*)
7163 cat >> confdefs.h <<\EOF
7164#define NEW_PROC_API 1
7165EOF
7166
7167 ;;
7168 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7169 cat >> confdefs.h <<\EOF
7170#define NEW_PROC_API 1
7171EOF
7172
7173 ;;
7174 *-*-solaris2.[678])
7175 cat >> confdefs.h <<\EOF
7176#define NEW_PROC_API 1
7177EOF
7178
7179 ;;
7180 esac
7181fi
7182
7183if test "$ac_cv_header_sys_procfs_h" = yes; then
7184 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7185echo "configure:7186: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7186 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7187 echo $ac_n "(cached) $ac_c" 1>&6
7188else
7189 cat > conftest.$ac_ext <<EOF
f5dbc56d 7190#line 7191 "configure"
596c9d4b
KB
7191#include "confdefs.h"
7192
7193#define _SYSCALL32
7194#include <sys/procfs.h>
7195int main() {
97bf5e38 7196pstatus_t avar
596c9d4b
KB
7197; return 0; }
7198EOF
f5dbc56d 7199if { (eval echo configure:7200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7200 rm -rf conftest*
97bf5e38 7201 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7202else
7203 echo "configure: failed program was:" >&5
7204 cat conftest.$ac_ext >&5
7205 rm -rf conftest*
97bf5e38 7206 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7207
7208fi
7209rm -f conftest*
7210fi
7211
97bf5e38 7212 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7213 cat >> confdefs.h <<\EOF
97bf5e38 7214#define HAVE_PSTATUS_T 1
596c9d4b
KB
7215EOF
7216
7217 fi
97bf5e38 7218 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7219
97bf5e38 7220 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7221echo "configure:7222: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7222 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7223 echo $ac_n "(cached) $ac_c" 1>&6
7224else
7225 cat > conftest.$ac_ext <<EOF
f5dbc56d 7226#line 7227 "configure"
596c9d4b
KB
7227#include "confdefs.h"
7228
7229#define _SYSCALL32
7230#include <sys/procfs.h>
7231int main() {
97bf5e38 7232prrun_t avar
596c9d4b
KB
7233; return 0; }
7234EOF
f5dbc56d 7235if { (eval echo configure:7236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7236 rm -rf conftest*
97bf5e38 7237 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7238else
7239 echo "configure: failed program was:" >&5
7240 cat conftest.$ac_ext >&5
7241 rm -rf conftest*
97bf5e38 7242 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7243
7244fi
7245rm -f conftest*
7246fi
7247
97bf5e38 7248 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7249 cat >> confdefs.h <<\EOF
97bf5e38 7250#define HAVE_PRRUN_T 1
596c9d4b
KB
7251EOF
7252
7253 fi
97bf5e38 7254 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7255
97bf5e38 7256 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7257echo "configure:7258: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7258 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7259 echo $ac_n "(cached) $ac_c" 1>&6
7260else
7261 cat > conftest.$ac_ext <<EOF
f5dbc56d 7262#line 7263 "configure"
596c9d4b
KB
7263#include "confdefs.h"
7264
7265#define _SYSCALL32
7266#include <sys/procfs.h>
7267int main() {
97bf5e38 7268gregset_t avar
596c9d4b
KB
7269; return 0; }
7270EOF
f5dbc56d 7271if { (eval echo configure:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7272 rm -rf conftest*
97bf5e38 7273 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7274else
7275 echo "configure: failed program was:" >&5
7276 cat conftest.$ac_ext >&5
7277 rm -rf conftest*
97bf5e38 7278 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7279
7280fi
7281rm -f conftest*
7282fi
7283
97bf5e38 7284 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7285 cat >> confdefs.h <<\EOF
97bf5e38 7286#define HAVE_GREGSET_T 1
596c9d4b
KB
7287EOF
7288
7289 fi
97bf5e38 7290 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7291
97bf5e38 7292 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7293echo "configure:7294: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7294 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7295 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7296else
7297 cat > conftest.$ac_ext <<EOF
f5dbc56d 7298#line 7299 "configure"
d84dd0c5 7299#include "confdefs.h"
97bf5e38
MK
7300
7301#define _SYSCALL32
d84dd0c5 7302#include <sys/procfs.h>
97bf5e38
MK
7303int main() {
7304fpregset_t avar
7305; return 0; }
d84dd0c5 7306EOF
f5dbc56d 7307if { (eval echo configure:7308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7308 rm -rf conftest*
7309 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7310else
7311 echo "configure: failed program was:" >&5
7312 cat conftest.$ac_ext >&5
97bf5e38
MK
7313 rm -rf conftest*
7314 bfd_cv_have_sys_procfs_type_fpregset_t=no
7315
d84dd0c5 7316fi
97bf5e38 7317rm -f conftest*
d84dd0c5
MK
7318fi
7319
97bf5e38
MK
7320 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7321 cat >> confdefs.h <<\EOF
7322#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7323EOF
7324
97bf5e38
MK
7325 fi
7326 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7327
97bf5e38 7328 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7329echo "configure:7330: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7330 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7331 echo $ac_n "(cached) $ac_c" 1>&6
7332else
7333 cat > conftest.$ac_ext <<EOF
f5dbc56d 7334#line 7335 "configure"
c906108c 7335#include "confdefs.h"
c906108c 7336
97bf5e38
MK
7337#define _SYSCALL32
7338#include <sys/procfs.h>
c906108c 7339int main() {
97bf5e38 7340prgregset_t avar
c906108c
SS
7341; return 0; }
7342EOF
f5dbc56d 7343if { (eval echo configure:7344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7344 rm -rf conftest*
97bf5e38 7345 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7346else
7347 echo "configure: failed program was:" >&5
7348 cat conftest.$ac_ext >&5
7349 rm -rf conftest*
97bf5e38
MK
7350 bfd_cv_have_sys_procfs_type_prgregset_t=no
7351
c906108c
SS
7352fi
7353rm -f conftest*
7354fi
7355
97bf5e38
MK
7356 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7357 cat >> confdefs.h <<\EOF
7358#define HAVE_PRGREGSET_T 1
c906108c
SS
7359EOF
7360
97bf5e38
MK
7361 fi
7362 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7363
97bf5e38 7364 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7365echo "configure:7366: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7366 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7367 echo $ac_n "(cached) $ac_c" 1>&6
7368else
7369 cat > conftest.$ac_ext <<EOF
f5dbc56d 7370#line 7371 "configure"
d45fe813 7371#include "confdefs.h"
97bf5e38
MK
7372
7373#define _SYSCALL32
7374#include <sys/procfs.h>
d45fe813 7375int main() {
97bf5e38 7376prfpregset_t avar
d45fe813
KB
7377; return 0; }
7378EOF
f5dbc56d 7379if { (eval echo configure:7380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7380 rm -rf conftest*
97bf5e38 7381 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7382else
7383 echo "configure: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 rm -rf conftest*
97bf5e38
MK
7386 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7387
d45fe813
KB
7388fi
7389rm -f conftest*
7390fi
7391
97bf5e38
MK
7392 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7393 cat >> confdefs.h <<\EOF
7394#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7395EOF
7396
97bf5e38
MK
7397 fi
7398 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7399
97bf5e38 7400 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7401echo "configure:7402: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7402 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7403 echo $ac_n "(cached) $ac_c" 1>&6
7404else
7405 cat > conftest.$ac_ext <<EOF
f5dbc56d 7406#line 7407 "configure"
d45fe813 7407#include "confdefs.h"
97bf5e38
MK
7408
7409#define _SYSCALL32
7410#include <sys/procfs.h>
d45fe813 7411int main() {
97bf5e38 7412prgregset32_t avar
d45fe813
KB
7413; return 0; }
7414EOF
f5dbc56d 7415if { (eval echo configure:7416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7416 rm -rf conftest*
97bf5e38 7417 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7418else
7419 echo "configure: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 rm -rf conftest*
97bf5e38
MK
7422 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7423
d45fe813
KB
7424fi
7425rm -f conftest*
7426fi
7427
97bf5e38
MK
7428 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7429 cat >> confdefs.h <<\EOF
7430#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7431EOF
7432
97bf5e38
MK
7433 fi
7434 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7435
97bf5e38 7436 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7437echo "configure:7438: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7438 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7439 echo $ac_n "(cached) $ac_c" 1>&6
7440else
7441 cat > conftest.$ac_ext <<EOF
f5dbc56d 7442#line 7443 "configure"
d45fe813 7443#include "confdefs.h"
97bf5e38
MK
7444
7445#define _SYSCALL32
7446#include <sys/procfs.h>
d45fe813 7447int main() {
97bf5e38 7448prfpregset32_t avar
d45fe813
KB
7449; return 0; }
7450EOF
f5dbc56d 7451if { (eval echo configure:7452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7452 rm -rf conftest*
97bf5e38 7453 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7454else
7455 echo "configure: failed program was:" >&5
7456 cat conftest.$ac_ext >&5
7457 rm -rf conftest*
97bf5e38
MK
7458 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7459
d45fe813
KB
7460fi
7461rm -f conftest*
7462fi
7463
97bf5e38
MK
7464 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7465 cat >> confdefs.h <<\EOF
7466#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7467EOF
7468
97bf5e38
MK
7469 fi
7470 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7471
97bf5e38 7472 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7473echo "configure:7474: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7474 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7475 echo $ac_n "(cached) $ac_c" 1>&6
7476else
7477 cat > conftest.$ac_ext <<EOF
f5dbc56d 7478#line 7479 "configure"
d45fe813 7479#include "confdefs.h"
97bf5e38 7480
d45fe813 7481#define _SYSCALL32
97bf5e38 7482#include <sys/procfs.h>
d45fe813 7483int main() {
97bf5e38 7484lwpid_t avar
d45fe813
KB
7485; return 0; }
7486EOF
f5dbc56d 7487if { (eval echo configure:7488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7488 rm -rf conftest*
97bf5e38 7489 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7490else
7491 echo "configure: failed program was:" >&5
7492 cat conftest.$ac_ext >&5
7493 rm -rf conftest*
97bf5e38
MK
7494 bfd_cv_have_sys_procfs_type_lwpid_t=no
7495
d45fe813
KB
7496fi
7497rm -f conftest*
7498fi
7499
97bf5e38
MK
7500 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7501 cat >> confdefs.h <<\EOF
7502#define HAVE_LWPID_T 1
d45fe813
KB
7503EOF
7504
97bf5e38
MK
7505 fi
7506 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7507
97bf5e38 7508 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7509echo "configure:7510: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7510 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7511 echo $ac_n "(cached) $ac_c" 1>&6
7512else
7513 cat > conftest.$ac_ext <<EOF
f5dbc56d 7514#line 7515 "configure"
c906108c
SS
7515#include "confdefs.h"
7516
97bf5e38
MK
7517#define _SYSCALL32
7518#include <sys/procfs.h>
c906108c 7519int main() {
97bf5e38 7520psaddr_t avar
c906108c
SS
7521; return 0; }
7522EOF
f5dbc56d 7523if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7524 rm -rf conftest*
97bf5e38 7525 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7526else
7527 echo "configure: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529 rm -rf conftest*
97bf5e38
MK
7530 bfd_cv_have_sys_procfs_type_psaddr_t=no
7531
c906108c
SS
7532fi
7533rm -f conftest*
7534fi
7535
97bf5e38
MK
7536 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7537 cat >> confdefs.h <<\EOF
7538#define HAVE_PSADDR_T 1
c906108c
SS
7539EOF
7540
97bf5e38
MK
7541 fi
7542 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7543
97bf5e38 7544 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7545echo "configure:7546: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7546 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7547 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7548else
7549 cat > conftest.$ac_ext <<EOF
f5dbc56d 7550#line 7551 "configure"
c906108c
SS
7551#include "confdefs.h"
7552
97bf5e38
MK
7553#define _SYSCALL32
7554#include <sys/procfs.h>
7555int main() {
7556prsysent_t avar
7557; return 0; }
c906108c 7558EOF
f5dbc56d 7559if { (eval echo configure:7560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7560 rm -rf conftest*
7561 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7562else
7563 echo "configure: failed program was:" >&5
7564 cat conftest.$ac_ext >&5
97bf5e38
MK
7565 rm -rf conftest*
7566 bfd_cv_have_sys_procfs_type_prsysent_t=no
7567
c906108c 7568fi
97bf5e38 7569rm -f conftest*
c906108c
SS
7570fi
7571
97bf5e38
MK
7572 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7573 cat >> confdefs.h <<\EOF
7574#define HAVE_PRSYSENT_T 1
c906108c
SS
7575EOF
7576
97bf5e38
MK
7577 fi
7578 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7579
97bf5e38 7580 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7581echo "configure:7582: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7582 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7583 echo $ac_n "(cached) $ac_c" 1>&6
7584else
7585 cat > conftest.$ac_ext <<EOF
f5dbc56d 7586#line 7587 "configure"
c906108c
SS
7587#include "confdefs.h"
7588
97bf5e38
MK
7589#define _SYSCALL32
7590#include <sys/procfs.h>
c906108c 7591int main() {
97bf5e38 7592pr_sigset_t avar
c906108c
SS
7593; return 0; }
7594EOF
f5dbc56d 7595if { (eval echo configure:7596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7596 rm -rf conftest*
97bf5e38 7597 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7598else
7599 echo "configure: failed program was:" >&5
7600 cat conftest.$ac_ext >&5
7601 rm -rf conftest*
97bf5e38
MK
7602 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7603
c906108c
SS
7604fi
7605rm -f conftest*
7606fi
7607
97bf5e38
MK
7608 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7609 cat >> confdefs.h <<\EOF
7610#define HAVE_PR_SIGSET_T 1
c906108c
SS
7611EOF
7612
97bf5e38
MK
7613 fi
7614 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7615
97bf5e38 7616 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7617echo "configure:7618: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7618 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7619 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7620else
7621 cat > conftest.$ac_ext <<EOF
f5dbc56d 7622#line 7623 "configure"
c906108c
SS
7623#include "confdefs.h"
7624
97bf5e38
MK
7625#define _SYSCALL32
7626#include <sys/procfs.h>
7627int main() {
7628pr_sigaction64_t avar
7629; return 0; }
c906108c 7630EOF
f5dbc56d 7631if { (eval echo configure:7632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7632 rm -rf conftest*
7633 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7634else
7635 echo "configure: failed program was:" >&5
7636 cat conftest.$ac_ext >&5
97bf5e38
MK
7637 rm -rf conftest*
7638 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7639
c906108c 7640fi
97bf5e38 7641rm -f conftest*
c906108c
SS
7642fi
7643
97bf5e38
MK
7644 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7645 cat >> confdefs.h <<\EOF
7646#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7647EOF
7648
97bf5e38
MK
7649 fi
7650 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7651
7652 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7653echo "configure:7654: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7654 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7655 echo $ac_n "(cached) $ac_c" 1>&6
7656else
7657 cat > conftest.$ac_ext <<EOF
f5dbc56d 7658#line 7659 "configure"
97bf5e38
MK
7659#include "confdefs.h"
7660
7661#define _SYSCALL32
7662#include <sys/procfs.h>
7663int main() {
7664pr_siginfo64_t avar
7665; return 0; }
7666EOF
f5dbc56d 7667if { (eval echo configure:7668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7668 rm -rf conftest*
7669 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7670else
7671 echo "configure: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 rm -rf conftest*
7674 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7675
7676fi
7677rm -f conftest*
c906108c 7678fi
c906108c 7679
97bf5e38
MK
7680 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7681 cat >> confdefs.h <<\EOF
7682#define HAVE_PR_SIGINFO64_T 1
7683EOF
c906108c 7684
97bf5e38
MK
7685 fi
7686 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7687
7688
7689
7690
7691
7692 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7693 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
f5dbc56d 7694echo "configure:7695: checking whether prfpregset_t type is broken" >&5
97bf5e38 7695 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7696 echo $ac_n "(cached) $ac_c" 1>&6
7697else
7698 if test "$cross_compiling" = yes; then
97bf5e38 7699 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7700else
7701 cat > conftest.$ac_ext <<EOF
f5dbc56d 7702#line 7703 "configure"
c906108c 7703#include "confdefs.h"
97bf5e38
MK
7704#include <sys/procfs.h>
7705 int main ()
7706 {
7707 if (sizeof (prfpregset_t) == sizeof (void *))
7708 return 1;
7709 return 0;
7710 }
c906108c 7711EOF
f5dbc56d 7712if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7713then
97bf5e38 7714 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7715else
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 rm -fr conftest*
97bf5e38 7719 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7720fi
7721rm -fr conftest*
7722fi
7723
7724fi
7725
97bf5e38
MK
7726 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7727 if test $gdb_cv_prfpregset_t_broken = yes; then
7728 cat >> confdefs.h <<\EOF
7729#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7730EOF
7731
97bf5e38
MK
7732 fi
7733 fi
c906108c 7734
97bf5e38
MK
7735
7736 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
f5dbc56d 7737echo "configure:7738: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7738 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7739 echo $ac_n "(cached) $ac_c" 1>&6
7740else
7741 cat > conftest.$ac_ext <<EOF
f5dbc56d 7742#line 7743 "configure"
c906108c 7743#include "confdefs.h"
97bf5e38
MK
7744#include <unistd.h>
7745#include <sys/types.h>
7746#include <sys/procfs.h>
7747
7748int main() {
7749
7750 int dummy;;
7751 dummy = ioctl(0, PIOCSET, &dummy);
7752
7753; return 0; }
c906108c 7754EOF
f5dbc56d 7755if { (eval echo configure:7756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7756 rm -rf conftest*
97bf5e38 7757 gdb_cv_have_procfs_piocset=yes
c906108c 7758else
c906108c
SS
7759 echo "configure: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 rm -rf conftest*
97bf5e38 7762 gdb_cv_have_procfs_piocset=no
c906108c
SS
7763fi
7764rm -f conftest*
7765fi
97bf5e38
MK
7766
7767 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7768 if test $gdb_cv_have_procfs_piocset = yes; then
7769 cat >> confdefs.h <<\EOF
7770#define HAVE_PROCFS_PIOCSET 1
c906108c 7771EOF
97bf5e38
MK
7772
7773 fi
c906108c 7774fi
c906108c 7775
97bf5e38
MK
7776if test ${host} = ${target} ; then
7777
7778 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
f5dbc56d 7779echo "configure:7780: checking for member l_addr in struct link_map" >&5
97bf5e38 7780 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7781 echo $ac_n "(cached) $ac_c" 1>&6
7782else
7783 cat > conftest.$ac_ext <<EOF
f5dbc56d 7784#line 7785 "configure"
c906108c 7785#include "confdefs.h"
97bf5e38 7786#include <link.h>
c906108c 7787int main() {
97bf5e38 7788struct link_map lm; (void) lm.l_addr;
c906108c
SS
7789; return 0; }
7790EOF
f5dbc56d 7791if { (eval echo configure:7792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7792 rm -rf conftest*
97bf5e38 7793 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7794else
7795 echo "configure: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 rm -rf conftest*
97bf5e38 7798 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7799fi
7800rm -f conftest*
7801fi
7802
97bf5e38
MK
7803 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7804 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7805 cat >> confdefs.h <<\EOF
7806#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7807EOF
97bf5e38
MK
7808
7809 fi
7810
7811
7812 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
f5dbc56d 7813echo "configure:7814: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7814 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7815 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7816else
97bf5e38 7817 cat > conftest.$ac_ext <<EOF
f5dbc56d 7818#line 7819 "configure"
97bf5e38
MK
7819#include "confdefs.h"
7820#include <sys/types.h>
7821#include <link.h>
7822int main() {
7823struct link_map lm; (void) lm.lm_addr;
7824; return 0; }
7825EOF
f5dbc56d 7826if { (eval echo configure:7827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7827 rm -rf conftest*
7828 gdb_cv_have_struct_link_map_with_lm_members=yes
7829else
7830 echo "configure: failed program was:" >&5
7831 cat conftest.$ac_ext >&5
7832 rm -rf conftest*
7833 gdb_cv_have_struct_link_map_with_lm_members=no
7834fi
7835rm -f conftest*
c906108c 7836fi
c906108c 7837
97bf5e38
MK
7838 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7839 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7840 cat >> confdefs.h <<\EOF
7841#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7842EOF
7843
7844 fi
7845
7846
7847 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
f5dbc56d 7848echo "configure:7849: checking for member som_addr in struct so_map" >&5
97bf5e38 7849 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7850 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7851else
7852 cat > conftest.$ac_ext <<EOF
f5dbc56d 7853#line 7854 "configure"
c906108c 7854#include "confdefs.h"
97bf5e38
MK
7855#include <sys/types.h>
7856#ifdef HAVE_NLIST_H
7857#include <nlist.h>
7858#endif
7859#include <link.h>
7860int main() {
7861struct so_map lm; (void) lm.som_addr;
7862; return 0; }
7863EOF
f5dbc56d 7864if { (eval echo configure:7865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7865 rm -rf conftest*
7866 gdb_cv_have_struct_so_map_with_som_members=yes
7867else
7868 echo "configure: failed program was:" >&5
7869 cat conftest.$ac_ext >&5
7870 rm -rf conftest*
7871 gdb_cv_have_struct_so_map_with_som_members=no
7872fi
7873rm -f conftest*
7874fi
c906108c 7875
97bf5e38
MK
7876 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7877 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7878 cat >> confdefs.h <<\EOF
7879#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7880EOF
c906108c 7881
97bf5e38 7882 fi
c906108c 7883
97bf5e38
MK
7884
7885 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
f5dbc56d 7886echo "configure:7887: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7887 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7888 echo $ac_n "(cached) $ac_c" 1>&6
7889else
7890 cat > conftest.$ac_ext <<EOF
f5dbc56d 7891#line 7892 "configure"
97bf5e38
MK
7892#include "confdefs.h"
7893#define _SYSCALL32
7894#include <sys/link.h>
7895int main() {
7896struct link_map32 l;
7897; return 0; }
7898EOF
f5dbc56d 7899if { (eval echo configure:7900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7900 rm -rf conftest*
7901 gdb_cv_have_struct_link_map32=yes
7902else
7903 echo "configure: failed program was:" >&5
7904 cat conftest.$ac_ext >&5
7905 rm -rf conftest*
7906 gdb_cv_have_struct_link_map32=no
7907fi
7908rm -f conftest*
7909fi
c906108c 7910
97bf5e38
MK
7911 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7912 if test $gdb_cv_have_struct_link_map32 = yes; then
7913 cat >> confdefs.h <<\EOF
7914#define HAVE_STRUCT_LINK_MAP32 1
7915EOF
c906108c 7916
97bf5e38
MK
7917 cat >> confdefs.h <<\EOF
7918#define _SYSCALL32 1
7919EOF
c906108c 7920
97bf5e38
MK
7921 fi
7922fi
c906108c 7923
c906108c 7924
97bf5e38 7925echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
f5dbc56d 7926echo "configure:7927: checking for long long support in compiler" >&5
97bf5e38
MK
7927if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7928 echo $ac_n "(cached) $ac_c" 1>&6
7929else
7930 cat > conftest.$ac_ext <<EOF
f5dbc56d 7931#line 7932 "configure"
97bf5e38 7932#include "confdefs.h"
c906108c 7933
97bf5e38 7934int main() {
c906108c 7935
97bf5e38
MK
7936 extern long long foo;
7937 switch (foo & 2) { case 0: return 1; }
c906108c 7938
97bf5e38
MK
7939; return 0; }
7940EOF
f5dbc56d 7941if { (eval echo configure:7942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7942 rm -rf conftest*
7943 gdb_cv_c_long_long=yes
7944else
7945 echo "configure: failed program was:" >&5
7946 cat conftest.$ac_ext >&5
7947 rm -rf conftest*
7948 gdb_cv_c_long_long=no
7949fi
7950rm -f conftest*
7951fi
c906108c 7952
97bf5e38
MK
7953echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7954if test $gdb_cv_c_long_long = yes; then
7955 cat >> confdefs.h <<\EOF
7956#define CC_HAS_LONG_LONG 1
7957EOF
7958
7959fi
7960
7961
7962echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
f5dbc56d 7963echo "configure:7964: checking for long long support in printf" >&5
97bf5e38
MK
7964if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
7965 echo $ac_n "(cached) $ac_c" 1>&6
7966else
7967 if test "$cross_compiling" = yes; then
7968 gdb_cv_printf_has_long_long=no
7969else
7970 cat > conftest.$ac_ext <<EOF
f5dbc56d 7971#line 7972 "configure"
97bf5e38
MK
7972#include "confdefs.h"
7973
7974int main () {
7975 char buf[32];
7976 long long l = 0;
7977 l = (l << 16) + 0x0123;
7978 l = (l << 16) + 0x4567;
7979 l = (l << 16) + 0x89ab;
7980 l = (l << 16) + 0xcdef;
7981 sprintf (buf, "0x%016llx", l);
7982 return (strcmp ("0x0123456789abcdef", buf));
c906108c 7983}
97bf5e38 7984EOF
f5dbc56d 7985if { (eval echo configure:7986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7986then
7987 gdb_cv_printf_has_long_long=yes
7988else
7989 echo "configure: failed program was:" >&5
7990 cat conftest.$ac_ext >&5
7991 rm -fr conftest*
7992 gdb_cv_printf_has_long_long=no
7993fi
7994rm -fr conftest*
7995fi
7996
7997fi
7998
7999if test $gdb_cv_printf_has_long_long = yes; then
8000 cat >> confdefs.h <<\EOF
8001#define PRINTF_HAS_LONG_LONG 1
8002EOF
8003
8004fi
8005echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8006
8007
8008echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
f5dbc56d 8009echo "configure:8010: checking for long double support in compiler" >&5
97bf5e38
MK
8010if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8011 echo $ac_n "(cached) $ac_c" 1>&6
8012else
8013 cat > conftest.$ac_ext <<EOF
f5dbc56d 8014#line 8015 "configure"
97bf5e38
MK
8015#include "confdefs.h"
8016
8017int main() {
8018long double foo;
8019; return 0; }
8020EOF
f5dbc56d 8021if { (eval echo configure:8022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8022 rm -rf conftest*
8023 ac_cv_c_long_double=yes
8024else
8025 echo "configure: failed program was:" >&5
8026 cat conftest.$ac_ext >&5
8027 rm -rf conftest*
8028 ac_cv_c_long_double=no
8029fi
8030rm -f conftest*
8031fi
c906108c 8032
97bf5e38
MK
8033echo "$ac_t""$ac_cv_c_long_double" 1>&6
8034if test $ac_cv_c_long_double = yes; then
8035 cat >> confdefs.h <<\EOF
8036#define HAVE_LONG_DOUBLE 1
c906108c 8037EOF
97bf5e38
MK
8038
8039fi
8040
8041
8042echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
f5dbc56d 8043echo "configure:8044: checking for long double support in printf" >&5
97bf5e38
MK
8044if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8045 echo $ac_n "(cached) $ac_c" 1>&6
8046else
8047 if test "$cross_compiling" = yes; then
8048 gdb_cv_printf_has_long_double=no
8049else
8050 cat > conftest.$ac_ext <<EOF
f5dbc56d 8051#line 8052 "configure"
97bf5e38
MK
8052#include "confdefs.h"
8053
8054int main () {
8055 char buf[16];
8056 long double f = 3.141592653;
8057 sprintf (buf, "%Lg", f);
8058 return (strncmp ("3.14159", buf, 7));
8059}
8060EOF
f5dbc56d 8061if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8062then
97bf5e38 8063 gdb_cv_printf_has_long_double=yes
c906108c
SS
8064else
8065 echo "configure: failed program was:" >&5
8066 cat conftest.$ac_ext >&5
8067 rm -fr conftest*
97bf5e38 8068 gdb_cv_printf_has_long_double=no
c906108c
SS
8069fi
8070rm -fr conftest*
8071fi
8072
8073fi
8074
97bf5e38 8075if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8076 cat >> confdefs.h <<\EOF
97bf5e38
MK
8077#define PRINTF_HAS_LONG_DOUBLE 1
8078EOF
8079
8080fi
8081echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8082
8083
8084echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
f5dbc56d 8085echo "configure:8086: checking for long double support in scanf" >&5
97bf5e38
MK
8086if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8087 echo $ac_n "(cached) $ac_c" 1>&6
8088else
8089 if test "$cross_compiling" = yes; then
8090 gdb_cv_scanf_has_long_double=no
8091else
8092 cat > conftest.$ac_ext <<EOF
f5dbc56d 8093#line 8094 "configure"
97bf5e38
MK
8094#include "confdefs.h"
8095
8096int main () {
8097 char *buf = "3.141592653";
8098 long double f = 0;
8099 sscanf (buf, "%Lg", &f);
8100 return !(f > 3.14159 && f < 3.14160);
8101}
c906108c 8102EOF
f5dbc56d 8103if { (eval echo configure:8104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8104then
8105 gdb_cv_scanf_has_long_double=yes
8106else
8107 echo "configure: failed program was:" >&5
8108 cat conftest.$ac_ext >&5
8109 rm -fr conftest*
8110 gdb_cv_scanf_has_long_double=no
8111fi
8112rm -fr conftest*
8113fi
c906108c
SS
8114
8115fi
8116
97bf5e38
MK
8117if test $gdb_cv_scanf_has_long_double = yes; then
8118 cat >> confdefs.h <<\EOF
8119#define SCANF_HAS_LONG_DOUBLE 1
8120EOF
8121
8122fi
8123echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8124
438013df
AO
8125case ${host_os} in
8126aix*)
8127 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
f5dbc56d 8128echo "configure:8129: checking for -bbigtoc option" >&5
438013df
AO
8129if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8130 echo $ac_n "(cached) $ac_c" 1>&6
8131else
8132
8133 SAVE_LDFLAGS=$LDFLAGS
8134
8135 case $GCC in
8136 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8137 *) gdb_cv_bigtoc=-bbigtoc ;;
8138 esac
8139
8140 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8141 cat > conftest.$ac_ext <<EOF
f5dbc56d 8142#line 8143 "configure"
438013df
AO
8143#include "confdefs.h"
8144
8145int main() {
8146int i;
8147; return 0; }
8148EOF
f5dbc56d 8149if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8150 :
8151else
8152 echo "configure: failed program was:" >&5
8153 cat conftest.$ac_ext >&5
8154 rm -rf conftest*
8155 gdb_cv_bigtoc=
8156fi
8157rm -f conftest*
8158
8159fi
8160
8161echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8162 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8163 ;;
8164esac
8165
c906108c
SS
8166
8167
8168if test ${build} = ${host} -a ${host} = ${target} ; then
8169 case ${host_os} in
8170 hpux*)
8171 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
f5dbc56d 8172echo "configure:8173: checking for HPUX/OSF thread support" >&5
c906108c
SS
8173 if test -f /usr/include/dce/cma_config.h ; then
8174 if test "$GCC" = "yes" ; then
8175 echo "$ac_t""yes" 1>&6
8176 cat >> confdefs.h <<\EOF
8177#define HAVE_HPUX_THREAD_SUPPORT 1
8178EOF
8179
66b965bb 8180 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8181 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8182 else
8183 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8184 fi
8185 else
8186 echo "$ac_t""no" 1>&6
8187 fi
8188 ;;
8189 solaris*)
d92419e5
JB
8190 # See if thread_db library is around for Solaris thread debugging.
8191 # Note that we must explicitly test for version 1 of the library
8192 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8193 # the same API.
c906108c 8194 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
f5dbc56d 8195echo "configure:8196: checking for Solaris thread debugging library" >&5
c906108c
SS
8196 if test -f /usr/lib/libthread_db.so.1 ; then
8197 echo "$ac_t""yes" 1>&6
8198 cat >> confdefs.h <<\EOF
8199#define HAVE_THREAD_DB_LIB 1
8200EOF
8201
66b965bb 8202 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8203 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8204 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
f5dbc56d 8205echo "configure:8206: checking for dlopen in -ldl" >&5
c906108c
SS
8206ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8207if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8208 echo $ac_n "(cached) $ac_c" 1>&6
8209else
8210 ac_save_LIBS="$LIBS"
8211LIBS="-ldl $LIBS"
8212cat > conftest.$ac_ext <<EOF
f5dbc56d 8213#line 8214 "configure"
c906108c
SS
8214#include "confdefs.h"
8215/* Override any gcc2 internal prototype to avoid an error. */
8216/* We use char because int might match the return type of a gcc2
8217 builtin and then its argument prototype would still apply. */
8218char dlopen();
8219
8220int main() {
8221dlopen()
8222; return 0; }
8223EOF
f5dbc56d 8224if { (eval echo configure:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8225 rm -rf conftest*
8226 eval "ac_cv_lib_$ac_lib_var=yes"
8227else
8228 echo "configure: failed program was:" >&5
8229 cat conftest.$ac_ext >&5
8230 rm -rf conftest*
8231 eval "ac_cv_lib_$ac_lib_var=no"
8232fi
8233rm -f conftest*
8234LIBS="$ac_save_LIBS"
8235
8236fi
8237if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8238 echo "$ac_t""yes" 1>&6
8239 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8240 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8241 cat >> confdefs.h <<EOF
8242#define $ac_tr_lib 1
8243EOF
8244
8245 LIBS="-ldl $LIBS"
8246
8247else
8248 echo "$ac_t""no" 1>&6
8249fi
8250
8251 if test "$GCC" = "yes" ; then
8252 # The GNU linker requires the -export-dynamic option to make
8253 # all symbols visible in the dynamic symbol table.
8254 hold_ldflags=$LDFLAGS
8255 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
f5dbc56d 8256echo "configure:8257: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8257 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8258 cat > conftest.$ac_ext <<EOF
f5dbc56d 8259#line 8260 "configure"
c906108c
SS
8260#include "confdefs.h"
8261
8262int main() {
8263int i;
8264; return 0; }
8265EOF
f5dbc56d 8266if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8267 rm -rf conftest*
8268 found=yes
8269else
8270 echo "configure: failed program was:" >&5
8271 cat conftest.$ac_ext >&5
8272 rm -rf conftest*
8273 found=no
8274fi
8275rm -f conftest*
8276 LDFLAGS=$hold_ldflags
8277 echo "$ac_t""$found" 1>&6
8278 if test $found = yes; then
8279 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8280 fi
8281 fi
8282 # Sun randomly tweaked the prototypes in <proc_service.h>
8283 # at one point.
8284 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
f5dbc56d 8285echo "configure:8286: checking if <proc_service.h> is old" >&5
c906108c
SS
8286 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8287 echo $ac_n "(cached) $ac_c" 1>&6
8288else
8289
8290 cat > conftest.$ac_ext <<EOF
f5dbc56d 8291#line 8292 "configure"
c906108c
SS
8292#include "confdefs.h"
8293
8294 #include <proc_service.h>
8295 ps_err_e ps_pdwrite
8296 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8297
8298int main() {
8299
8300; return 0; }
8301EOF
f5dbc56d 8302if { (eval echo configure:8303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8303 rm -rf conftest*
8304 gdb_cv_proc_service_is_old=no
8305else
8306 echo "configure: failed program was:" >&5
8307 cat conftest.$ac_ext >&5
8308 rm -rf conftest*
8309 gdb_cv_proc_service_is_old=yes
8310fi
8311rm -f conftest*
8312
8313fi
8314
8315 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8316 if test $gdb_cv_proc_service_is_old = yes; then
8317 cat >> confdefs.h <<\EOF
8318#define PROC_SERVICE_IS_OLD 1
8319EOF
8320
8321 fi
8322 else
8323 echo "$ac_t""no" 1>&6
8324 fi
8325 ;;
d92419e5
JB
8326 aix*)
8327 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
f5dbc56d 8328echo "configure:8329: checking for AiX thread debugging library" >&5
d92419e5
JB
8329 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8330 echo $ac_n "(cached) $ac_c" 1>&6
8331else
8332 cat > conftest.$ac_ext <<EOF
f5dbc56d 8333#line 8334 "configure"
d92419e5
JB
8334#include "confdefs.h"
8335#include <sys/pthdebug.h>
8336int main() {
8337#ifndef PTHDB_VERSION_3
8338 #error
8339 #endif
8340; return 0; }
8341EOF
f5dbc56d 8342if { (eval echo configure:8343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8343 rm -rf conftest*
8344 gdb_cv_have_aix_thread_debug=yes
8345else
8346 echo "configure: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8348 rm -rf conftest*
8349 gdb_cv_have_aix_thread_debug=no
8350fi
8351rm -f conftest*
8352fi
8353
8354 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8355 if test $gdb_cv_have_aix_thread_debug = yes; then
8356 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8357 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8358 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8359 fi
8360 ;;
c906108c
SS
8361 esac
8362
8363fi
8364
3f47be5c
EZ
8365if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8366 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
f5dbc56d 8367echo "configure:8368: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8368if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8369 echo $ac_n "(cached) $ac_c" 1>&6
8370else
8371 cat > conftest.$ac_ext <<EOF
f5dbc56d 8372#line 8373 "configure"
3f47be5c
EZ
8373#include "confdefs.h"
8374#include <thread_db.h>
8375int main() {
8376int i = TD_NOTALLOC;
8377; return 0; }
8378EOF
f5dbc56d 8379if { (eval echo configure:8380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8380 rm -rf conftest*
8381 gdb_cv_thread_db_h_has_td_notalloc=yes
8382else
8383 echo "configure: failed program was:" >&5
8384 cat conftest.$ac_ext >&5
8385 rm -rf conftest*
8386 gdb_cv_thread_db_h_has_td_notalloc=no
8387
8388fi
8389rm -f conftest*
8390
8391fi
8392
8393echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8394fi
8395if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8396 cat >> confdefs.h <<\EOF
8397#define THREAD_DB_HAS_TD_NOTALLOC 1
8398EOF
8399
8400fi
8401
eb784848
DJ
8402if test $host = $target; then
8403 case $target in
8404 *-linux*)
8405 save_CFLAGS=$CFLAGS
8406 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8407 cat > conftest.$ac_ext <<EOF
f5dbc56d 8408#line 8409 "configure"
eb784848
DJ
8409#include "confdefs.h"
8410#include <unistd.h>
8411int main() {
8412pread64 (0, NULL, 0, 0);
8413; return 0; }
8414EOF
f5dbc56d 8415if { (eval echo configure:8416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
eb784848
DJ
8416 rm -rf conftest*
8417 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8418 cat >> confdefs.h <<\EOF
8419#define HAVE_PREAD64 1
8420EOF
8421
8422else
8423 echo "configure: failed program was:" >&5
8424 cat conftest.$ac_ext >&5
8425fi
8426rm -f conftest*
8427 CFLAGS=$save_CFLAGS
8428 ;;
8429 esac
8430fi
8431
fb40c209 8432
c906108c
SS
8433# Check whether --enable-netrom or --disable-netrom was given.
8434if test "${enable_netrom+set}" = set; then
8435 enableval="$enable_netrom"
8436 case "${enableval}" in
8437yes) enable_netrom=yes ;;
8438no) enable_netrom=no ;;
8439*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
8440esac
8441fi
8442
8443
8444if test "${enable_netrom}" = "yes"; then
66b965bb 8445 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
8446 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
8447fi
8448
1decb323 8449
3b851bce
AC
8450# NOTE: Don't add -Wall or -Wunused, they both include
8451# -Wunused-parameter which reports bogus warnings.
8452# NOTE: If you add to this list, remember to update
8453# gdb/doc/gdbint.texinfo.
1decb323 8454build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8455-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8456# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8457# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8458# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8459# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8460# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8461# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8462# Check whether --enable-build-warnings or --disable-build-warnings was given.
8463if test "${enable_build_warnings+set}" = set; then
8464 enableval="$enable_build_warnings"
1decb323 8465 case "${enableval}" in
c906108c
SS
8466 yes) ;;
8467 no) build_warnings="-w";;
8468 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8469 build_warnings="${build_warnings} ${t}";;
8470 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8471 build_warnings="${t} ${build_warnings}";;
8472 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8473esac
d4f3574e 8474if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8475 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8476fi
1decb323 8477fi
3b851bce
AC
8478# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8479if test "${enable_gdb_build_warnings+set}" = set; then
8480 enableval="$enable_gdb_build_warnings"
8481 case "${enableval}" in
8482 yes) ;;
8483 no) build_warnings="-w";;
8484 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8485 build_warnings="${build_warnings} ${t}";;
8486 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8487 build_warnings="${t} ${build_warnings}";;
8488 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8489esac
8490if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8491 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8492fi
8493fi
104c1213
JM
8494WARN_CFLAGS=""
8495WERROR_CFLAGS=""
c906108c
SS
8496if test "x${build_warnings}" != x -a "x$GCC" = xyes
8497then
746a987d 8498 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
f5dbc56d 8499echo "configure:8500: checking compiler warning flags" >&5
746a987d
AC
8500 # Separate out the -Werror flag as some files just cannot be
8501 # compiled with it enabled.
8502 for w in ${build_warnings}; do
8503 case $w in
8504 -Werr*) WERROR_CFLAGS=-Werror ;;
8505 *) # Check that GCC accepts it
4536bbc6
AC
8506 saved_CFLAGS="$CFLAGS"
8507 CFLAGS="$CFLAGS $w"
8508 cat > conftest.$ac_ext <<EOF
f5dbc56d 8509#line 8510 "configure"
4536bbc6
AC
8510#include "confdefs.h"
8511
8512int main() {
8513
8514; return 0; }
8515EOF
f5dbc56d 8516if { (eval echo configure:8517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8517 rm -rf conftest*
8518 WARN_CFLAGS="${WARN_CFLAGS} $w"
8519else
8520 echo "configure: failed program was:" >&5
8521 cat conftest.$ac_ext >&5
8522fi
8523rm -f conftest*
8524 CFLAGS="$saved_CFLAGS"
746a987d
AC
8525 esac
8526 done
8527 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8528fi
8529
8530
104c1213 8531
c906108c
SS
8532MMALLOC_CFLAGS=
8533MMALLOC=
8534
8535
8536
8537# Check whether --with-mmalloc or --without-mmalloc was given.
8538if test "${with_mmalloc+set}" = set; then
8539 withval="$with_mmalloc"
8540 case "${withval}" in
8541 yes) want_mmalloc=true ;;
8542 no) want_mmalloc=false;;
8543 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8544esac
8545else
8546 want_mmalloc=false
8547fi
8548
8549if test x$want_mmalloc = xtrue; then
8550 cat >> confdefs.h <<\EOF
8551#define USE_MMALLOC 1
8552EOF
8553
8554 cat >> confdefs.h <<\EOF
8555#define MMCHECK_FORCE 1
8556EOF
8557
8558 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8559 MMALLOC='../mmalloc/libmmalloc.a'
8560fi
8561
7a292a7a
SS
8562# In the Cygwin environment, we need some additional flags.
8563echo $ac_n "checking for cygwin""... $ac_c" 1>&6
f5dbc56d 8564echo "configure:8565: checking for cygwin" >&5
7a292a7a
SS
8565if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8566 echo $ac_n "(cached) $ac_c" 1>&6
8567else
8568 cat > conftest.$ac_ext <<EOF
f5dbc56d 8569#line 8570 "configure"
7a292a7a
SS
8570#include "confdefs.h"
8571
8572#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8573lose
8574#endif
8575EOF
8576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8577 egrep "lose" >/dev/null 2>&1; then
8578 rm -rf conftest*
8579 gdb_cv_os_cygwin=yes
8580else
8581 rm -rf conftest*
8582 gdb_cv_os_cygwin=no
8583fi
8584rm -f conftest*
8585
8586fi
8587
8588echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8589
aff38e61
AC
8590
8591SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8592case ${host} in
95cbc983
AC
8593 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8594 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8595esac
8596
8597
cd0fc7c3
SS
8598# libreadline needs libuser32.a in a cygwin environment
8599WIN32LIBS=
8600if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8601 WIN32LIBS="-luser32"
8602 case "${target}" in
8603 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8604 ;;
8605 esac
cd0fc7c3 8606fi
c906108c 8607
7a292a7a 8608
3fc11d3e
JM
8609LIBGUI="../libgui/src/libgui.a"
8610GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8611
8612
7a292a7a 8613
8b93c638
JM
8614# Check whether --with-cpu or --without-cpu was given.
8615if test "${with_cpu+set}" = set; then
8616 withval="$with_cpu"
8617 case "${target}" in
8618 powerpc-* | powerpcle-* )
8619 ## It would be nice to keep this table in sync with the one in
8620 ## gcc/configure.
8621 case "${with_cpu}" in
8622 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
8623 | 604 | 750 )
8624 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
8625 ;;
8626 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
8627 ## These are all RS6000 variants, as far as GDB is concerned.
8628 with_cpu=rs6000
8629 ;;
8630 603e | ec603e )
8631 with_cpu=603
8632 ;;
8633 604e )
8634 with_cpu=604
8635 ;;
8636 * )
8637 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
8638 with_cpu=ppc-uisa
8639 ;;
8640 esac
8641 ;;
8642 * )
8643 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
8644 ;;
8645esac
8646cat >> confdefs.h <<EOF
8647#define TARGET_CPU_DEFAULT "${with_cpu}"
8648EOF
8649
8650
8651fi
8652
8653
8654
3fc11d3e
JM
8655# Check whether --enable-gdbtk or --disable-gdbtk was given.
8656if test "${enable_gdbtk+set}" = set; then
8657 enableval="$enable_gdbtk"
8658 case "${enableval}" in
8659 yes)
8660 case "$host" in
8661 *go32*)
8662 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8663 enable_gdbtk=no ;;
8664 *windows*)
8665 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8666 enable_gdbtk=no ;;
8667 *)
8668 enable_gdbtk=yes ;;
8669 esac ;;
8670 no)
8671 enable_gdbtk=no ;;
8672 *)
8673 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8674esac
8675else
8676
8677# Default is on for everything but go32 and Cygwin
8678case "$host" in
8679 *go32* | *windows*)
8680 ;;
8681 *)
379d6434
AC
8682 if test -d "${srcdir}/gdbtk" ; then
8683 enable_gdbtk=yes
8684 fi
8685 ;;
8686esac
3fc11d3e
JM
8687
8688fi
8689
8690
8691WIN32LDAPP=
8692
8693
8694
8695configdir="unix"
8696
8697GDBTKLIBS=
8698if test "${enable_gdbtk}" = "yes"; then
8699
d1c3b63a
KS
8700 # Gdbtk must have an absolute path to srcdir in order to run
8701 # properly when not installed.
8702 here=`pwd`
8703 cd ${srcdir}
8704 GDBTK_SRC_DIR=`pwd`
8705 cd $here
8706
3fc11d3e
JM
8707
8708#
8709# Ok, lets find the tcl configuration
8710# First, look for one uninstalled.
8711# the alternative search directory is invoked by --with-tclconfig
8712#
8713
8714if test x"${no_tcl}" = x ; then
8715 # we reset no_tcl in case something fails here
8716 no_tcl=true
8717 # Check whether --with-tclconfig or --without-tclconfig was given.
8718if test "${with_tclconfig+set}" = set; then
8719 withval="$with_tclconfig"
8720 with_tclconfig=${withval}
8721fi
8722
8723 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
f5dbc56d 8724echo "configure:8725: checking for Tcl configuration" >&5
3fc11d3e
JM
8725 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8726 echo $ac_n "(cached) $ac_c" 1>&6
8727else
8728
8729
8730 # First check to see if --with-tclconfig was specified.
8731 if test x"${with_tclconfig}" != x ; then
8732 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8733 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8734 else
8735 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8736 fi
8737 fi
8738
8739 # then check for a private Tcl installation
8740 if test x"${ac_cv_c_tclconfig}" = x ; then
8741 for i in \
8742 ../tcl \
8743 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8744 ../../tcl \
8745 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8746 ../../../tcl \
8747 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8748 if test -f "$i/${configdir}/tclConfig.sh" ; then
8749 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8750 break
8751 fi
8752 done
8753 fi
8754 # check in a few common install locations
8755 if test x"${ac_cv_c_tclconfig}" = x ; then
8756 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8757 if test -f "$i/tclConfig.sh" ; then
8758 ac_cv_c_tclconfig=`(cd $i; pwd)`
8759 break
8760 fi
8761 done
8762 fi
8763 # check in a few other private locations
8764 if test x"${ac_cv_c_tclconfig}" = x ; then
8765 for i in \
8766 ${srcdir}/../tcl \
8767 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8768 if test -f "$i/${configdir}/tclConfig.sh" ; then
8769 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8770 break
8771 fi
8772 done
8773 fi
8774
8775fi
8776
8777 if test x"${ac_cv_c_tclconfig}" = x ; then
8778 TCLCONFIG="# no Tcl configs found"
8779 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8780 else
8781 no_tcl=
8782 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8783 echo "$ac_t""found $TCLCONFIG" 1>&6
8784 fi
8785fi
8786
8787 if test -z "${no_tcl}"; then
8788
8789 . $TCLCONFIG
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816#
8817# Ok, lets find the tk configuration
8818# First, look for one uninstalled.
8819# the alternative search directory is invoked by --with-tkconfig
8820#
8821
8822if test x"${no_tk}" = x ; then
8823 # we reset no_tk in case something fails here
8824 no_tk=true
8825 # Check whether --with-tkconfig or --without-tkconfig was given.
8826if test "${with_tkconfig+set}" = set; then
8827 withval="$with_tkconfig"
8828 with_tkconfig=${withval}
8829fi
8830
8831 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
f5dbc56d 8832echo "configure:8833: checking for Tk configuration" >&5
3fc11d3e
JM
8833 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8834 echo $ac_n "(cached) $ac_c" 1>&6
8835else
8836
8837
8838 # First check to see if --with-tkconfig was specified.
8839 if test x"${with_tkconfig}" != x ; then
8840 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8841 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8842 else
8843 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8844 fi
8845 fi
8846
8847 # then check for a private Tk library
8848 if test x"${ac_cv_c_tkconfig}" = x ; then
8849 for i in \
8850 ../tk \
8851 `ls -dr ../tk[4-9]* 2>/dev/null` \
8852 ../../tk \
8853 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8854 ../../../tk \
8855 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8856 if test -f "$i/${configdir}/tkConfig.sh" ; then
8857 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8858 break
8859 fi
8860 done
8861 fi
8862 # check in a few common install locations
8863 if test x"${ac_cv_c_tkconfig}" = x ; then
8864 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8865 if test -f "$i/tkConfig.sh" ; then
8866 ac_cv_c_tkconfig=`(cd $i; pwd)`
8867 break
8868 fi
8869 done
8870 fi
8871 # check in a few other private locations
8872 if test x"${ac_cv_c_tkconfig}" = x ; then
8873 for i in \
8874 ${srcdir}/../tk \
8875 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8876 if test -f "$i/${configdir}/tkConfig.sh" ; then
8877 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8878 break
8879 fi
8880 done
8881 fi
8882
8883fi
8884
8885 if test x"${ac_cv_c_tkconfig}" = x ; then
8886 TKCONFIG="# no Tk configs found"
8887 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8888 else
8889 no_tk=
8890 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8891 echo "$ac_t""found $TKCONFIG" 1>&6
8892 fi
8893fi
8894
8895
8896
dd2504ab
JM
8897 # now look for Tcl library stuff
8898
8899 case "${host}" in
8900 *-*-cygwin*)
8901 tcldir=../tcl/win/
8902 ;;
8903 *)
8904 tcldir=../tcl/unix/
8905 ;;
8906 esac
8907
8908 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8909
3fc11d3e
JM
8910 # If $no_tk is nonempty, then we can't do Tk, and there is no
8911 # point to doing Tcl.
8912 if test -z "${no_tk}"; then
8913
8914 if test -f "$TKCONFIG" ; then
8915 . $TKCONFIG
8916 fi
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931#
8932# Ok, lets find the tcl source trees so we can use the headers
8933# Warning: transition of version 9 to 10 will break this algorithm
8934# because 10 sorts before 9. We also look for just tcl. We have to
8935# be careful that we don't match stuff like tclX by accident.
8936# the alternative search directory is involked by --with-tclinclude
8937#
8938
8939no_tcl=true
8940echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
f5dbc56d 8941echo "configure:8942: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8942# Check whether --with-tclinclude or --without-tclinclude was given.
8943if test "${with_tclinclude+set}" = set; then
8944 withval="$with_tclinclude"
8945 with_tclinclude=${withval}
8946fi
8947
8948if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8949 echo $ac_n "(cached) $ac_c" 1>&6
8950else
8951
8952# first check to see if --with-tclinclude was specified
8953if test x"${with_tclinclude}" != x ; then
8954 if test -f ${with_tclinclude}/tclInt.h ; then
8955 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8956 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8957 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8958 else
8959 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8960 fi
8961fi
8962
8963# next check if it came with Tcl configuration file
8964if test x"${ac_cv_c_tclconfig}" = x ; then
8965 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8966 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8967 fi
8968fi
8969
8970# next check in private source directory
8971#
8972# since ls returns lowest version numbers first, reverse its output
8973if test x"${ac_cv_c_tclh}" = x ; then
8974 for i in \
8975 ${srcdir}/../tcl \
8976 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8977 ${srcdir}/../../tcl \
8978 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8979 ${srcdir}/../../../tcl \
8980 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8981 if test -f $i/generic/tclInt.h ; then
8982 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8983 break
8984 fi
8985 done
8986fi
8987# finally check in a few common install locations
8988#
8989# since ls returns lowest version numbers first, reverse its output
8990if test x"${ac_cv_c_tclh}" = x ; then
8991 for i in \
8992 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8993 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8994 /usr/local/src/tcl \
8995 /usr/local/lib/tcl \
8996 ${prefix}/include ; do
8997 if test -f $i/generic/tclInt.h ; then
8998 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8999 break
9000 fi
9001 done
9002fi
9003# see if one is installed
9004if test x"${ac_cv_c_tclh}" = x ; then
9005 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9006echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
f5dbc56d 9007echo "configure:9008: checking for tclInt.h" >&5
3fc11d3e
JM
9008if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9009 echo $ac_n "(cached) $ac_c" 1>&6
9010else
9011 cat > conftest.$ac_ext <<EOF
f5dbc56d 9012#line 9013 "configure"
3fc11d3e
JM
9013#include "confdefs.h"
9014#include <tclInt.h>
9015EOF
9016ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 9017{ (eval echo configure:9018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9018ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9019if test -z "$ac_err"; then
9020 rm -rf conftest*
9021 eval "ac_cv_header_$ac_safe=yes"
9022else
9023 echo "$ac_err" >&5
9024 echo "configure: failed program was:" >&5
9025 cat conftest.$ac_ext >&5
9026 rm -rf conftest*
9027 eval "ac_cv_header_$ac_safe=no"
9028fi
9029rm -f conftest*
9030fi
9031if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9032 echo "$ac_t""yes" 1>&6
9033 ac_cv_c_tclh=installed
9034else
9035 echo "$ac_t""no" 1>&6
9036ac_cv_c_tclh=""
9037fi
9038
9039fi
9040
9041fi
9042
9043if test x"${ac_cv_c_tclh}" = x ; then
9044 TCLHDIR="# no Tcl private headers found"
9045 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9046fi
9047if test x"${ac_cv_c_tclh}" != x ; then
9048 no_tcl=""
9049 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9050 echo "$ac_t""is installed" 1>&6
9051 TCLHDIR=""
9052 else
9053 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9054 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9055 TCLHDIR="-I${ac_cv_c_tclh}"
9056 fi
9057fi
9058
9059
9060
9061
9062#
9063# Ok, lets find the tk source trees so we can use the headers
9064# If the directory (presumably symlink) named "tk" exists, use that one
9065# in preference to any others. Same logic is used when choosing library
9066# and again with Tcl. The search order is the best place to look first, then in
9067# decreasing significance. The loop breaks if the trigger file is found.
9068# Note the gross little conversion here of srcdir by cd'ing to the found
9069# directory. This converts the path from a relative to an absolute, so
9070# recursive cache variables for the path will work right. We check all
9071# the possible paths in one loop rather than many seperate loops to speed
9072# things up.
9073# the alternative search directory is involked by --with-tkinclude
9074#
9075no_tk=true
9076echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
f5dbc56d 9077echo "configure:9078: checking for Tk private headers" >&5
3fc11d3e
JM
9078# Check whether --with-tkinclude or --without-tkinclude was given.
9079if test "${with_tkinclude+set}" = set; then
9080 withval="$with_tkinclude"
9081 with_tkinclude=${withval}
9082fi
9083
9084if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9085 echo $ac_n "(cached) $ac_c" 1>&6
9086else
9087
9088# first check to see if --with-tkinclude was specified
9089if test x"${with_tkinclude}" != x ; then
9090 if test -f ${with_tkinclude}/tk.h ; then
9091 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9092 elif test -f ${with_tkinclude}/generic/tk.h ; then
9093 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9094 else
9095 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9096 fi
9097fi
9098
9099# next check if it came with Tk configuration file
9100if test x"${ac_cv_c_tkconfig}" = x ; then
9101 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9102 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9103 fi
9104fi
9105
9106# next check in private source directory
9107#
9108# since ls returns lowest version numbers first, reverse its output
9109if test x"${ac_cv_c_tkh}" = x ; then
9110 for i in \
9111 ${srcdir}/../tk \
9112 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9113 ${srcdir}/../../tk \
9114 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9115 ${srcdir}/../../../tk \
9116 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9117 if test -f $i/generic/tk.h ; then
9118 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9119 break
9120 fi
9121 done
9122fi
9123# finally check in a few common install locations
9124#
9125# since ls returns lowest version numbers first, reverse its output
9126if test x"${ac_cv_c_tkh}" = x ; then
9127 for i in \
9128 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9129 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9130 /usr/local/src/tk \
9131 /usr/local/lib/tk \
9132 ${prefix}/include ; do
9133 if test -f $i/generic/tk.h ; then
9134 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9135 break
9136 fi
9137 done
9138fi
9139# see if one is installed
9140if test x"${ac_cv_c_tkh}" = x ; then
9141 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9142echo $ac_n "checking for tk.h""... $ac_c" 1>&6
f5dbc56d 9143echo "configure:9144: checking for tk.h" >&5
3fc11d3e
JM
9144if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9145 echo $ac_n "(cached) $ac_c" 1>&6
9146else
9147 cat > conftest.$ac_ext <<EOF
f5dbc56d 9148#line 9149 "configure"
3fc11d3e
JM
9149#include "confdefs.h"
9150#include <tk.h>
9151EOF
9152ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 9153{ (eval echo configure:9154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9154ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9155if test -z "$ac_err"; then
9156 rm -rf conftest*
9157 eval "ac_cv_header_$ac_safe=yes"
9158else
9159 echo "$ac_err" >&5
9160 echo "configure: failed program was:" >&5
9161 cat conftest.$ac_ext >&5
9162 rm -rf conftest*
9163 eval "ac_cv_header_$ac_safe=no"
9164fi
9165rm -f conftest*
9166fi
9167if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9168 echo "$ac_t""yes" 1>&6
9169 ac_cv_c_tkh=installed
9170else
9171 echo "$ac_t""no" 1>&6
9172ac_cv_c_tkh=""
9173fi
9174
9175fi
9176
9177fi
9178
9179if test x"${ac_cv_c_tkh}" != x ; then
9180 no_tk=""
9181 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9182 echo "$ac_t""is installed" 1>&6
9183 TKHDIR=""
9184 else
9185 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9186 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9187 TKHDIR="-I${ac_cv_c_tkh}"
9188 fi
9189else
9190 TKHDIR="# no Tk directory found"
9191 echo "configure: warning: Can't find Tk private headers" 1>&2
9192 no_tk=true
9193fi
9194
9195
9196
9197
9198echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
f5dbc56d 9199echo "configure:9200: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9200if test x"${ac_cv_c_itclh}" = x ; then
9201 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9202 if test -f $i/generic/itcl.h ; then
9203 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9204 break
9205 fi
9206 done
9207fi
9208if test x"${ac_cv_c_itclh}" = x ; then
9209 ITCLHDIR="# no Itcl private headers found"
9210 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9211fi
9212if test x"${ac_cv_c_itclh}" != x ; then
9213 ITCLHDIR="-I${ac_cv_c_itclh}"
9214fi
9215# should always be here
9216# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9217
9218#AC_SUBST(ITCLLIB)
9219
9220
9221echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
f5dbc56d 9222echo "configure:9223: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9223if test x"${ac_cv_c_itkh}" = x ; then
9224 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9225 if test -f $i/generic/itk.h ; then
9226 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9227 break
9228 fi
9229 done
9230fi
9231if test x"${ac_cv_c_itkh}" = x ; then
9232 ITKHDIR="# no Itk private headers found"
9233 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9234fi
9235if test x"${ac_cv_c_itkh}" != x ; then
9236 ITKHDIR="-I${ac_cv_c_itkh}"
9237fi
9238# should always be here
9239# ITKLIB="../itcl/itk/unix/libitk.a"
9240
9241#AC_SUBST(ITKLIB)
9242
3fc11d3e 9243
dd2504ab
JM
9244
9245 # now look for Tk library stuff
9246
9247 case "${host}" in
9248 *-*-cygwin*)
9249 tkdir=../tk/win/
9250 ;;
9251 *)
9252 tkdir=../tk/unix/
9253 ;;
9254 esac
9255
9256 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9257
3fc11d3e
JM
9258 # now look for Itcl library stuff
9259
9260
9261#
9262# Ok, lets find the itcl configuration
9263# First, look for one uninstalled.
9264# the alternative search directory is invoked by --with-itclconfig
9265#
9266
9267if test x"${no_itcl}" = x ; then
9268 # we reset no_itcl in case something fails here
9269 no_itcl=true
9270 # Check whether --with-itclconfig or --without-itclconfig was given.
9271if test "${with_itclconfig+set}" = set; then
9272 withval="$with_itclconfig"
9273 with_itclconfig=${withval}
9274fi
9275
9276 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
f5dbc56d 9277echo "configure:9278: checking for Itcl configuration" >&5
3fc11d3e
JM
9278 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9279 echo $ac_n "(cached) $ac_c" 1>&6
9280else
9281
9282
9283 # First check to see if --with-itclconfig was specified.
9284 if test x"${with_itclconfig}" != x ; then
9285 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9286 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9287 else
9288 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9289 fi
9290 fi
9291
9292 # then check for a private Itcl library
9293 if test x"${ac_cv_c_itclconfig}" = x ; then
9294 for i in \
9295 ../itcl/itcl \
9296 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9297 ../../itcl \
9298 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9299 ../../../itcl \
9300 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9301 if test -f "$i/itclConfig.sh" ; then
9302 ac_cv_c_itclconfig=`(cd $i; pwd)`
9303 break
9304 fi
9305 done
9306 fi
9307 # check in a few common install locations
9308 if test x"${ac_cv_c_itclconfig}" = x ; then
9309 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9310 if test -f "$i/itclConfig.sh" ; then
9311 ac_cv_c_itclconfig=`(cd $i; pwd)`
9312 break
9313 fi
9314 done
9315 fi
9316 # check in a few other private locations
9317 if test x"${ac_cv_c_itclconfig}" = x ; then
9318 for i in \
9319 ${srcdir}/../itcl/itcl \
9320 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9321 if test -f "$i/itclConfig.sh" ; then
9322 ac_cv_c_itclconfig=`(cd $i; pwd)`
9323 break
9324 fi
9325 done
9326 fi
9327
9328fi
9329
9330 if test x"${ac_cv_c_itclconfig}" = x ; then
9331 ITCLCONFIG="# no Itcl configs found"
9332 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9333 else
9334 no_itcl=
9335 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9336 echo "$ac_t""found $ITCLCONFIG" 1>&6
9337 fi
9338fi
9339
9340 if test -z "${no_itcl}"; then
9341
9342 if test -f "$ITCLCONFIG" ; then
9343 . $ITCLCONFIG
9344 fi
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
3fc11d3e
JM
9355
9356
9357 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9358 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9359 fi
9360
9361
9362 # now look for Itk library stuff
9363
9364#
9365# Ok, lets find the itk configuration
9366# First, look for one uninstalled.
9367# the alternative search directory is invoked by --with-itkconfig
9368#
9369
9370if test x"${no_itk}" = x ; then
9371 # we reset no_itk in case something fails here
9372 no_itk=true
9373 # Check whether --with-itkconfig or --without-itkconfig was given.
9374if test "${with_itkconfig+set}" = set; then
9375 withval="$with_itkconfig"
9376 with_itkconfig=${withval}
9377fi
9378
9379 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
f5dbc56d 9380echo "configure:9381: checking for Itk configuration" >&5
3fc11d3e
JM
9381 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9382 echo $ac_n "(cached) $ac_c" 1>&6
9383else
9384
9385
9386 # First check to see if --with-itkconfig was specified.
9387 if test x"${with_itkconfig}" != x ; then
9388 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9389 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9390 else
9391 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9392 fi
9393 fi
9394
9395 # then check for a private Itk library
9396 if test x"${ac_cv_c_itkconfig}" = x ; then
9397 for i in \
9398 ../itcl/itk \
9399 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9400 ../../itk \
9401 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9402 ../../../itk \
9403 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9404 if test -f "$i/itkConfig.sh" ; then
9405 ac_cv_c_itkconfig=`(cd $i; pwd)`
9406 break
9407 fi
9408 done
9409 fi
9410 # check in a few common install locations
9411 if test x"${ac_cv_c_itkconfig}" = x ; then
9412 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9413 if test -f "$i/itkConfig.sh" ; then
9414 ac_cv_c_itkconfig=`(cd $i; pwd)`
9415 break
9416 fi
9417 done
9418 fi
9419 # check in a few other private locations
9420 if test x"${ac_cv_c_itkconfig}" = x ; then
9421 for i in \
9422 ${srcdir}/../itcl/itk \
9423 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9424 if test -f "$i/itkConfig.sh" ; then
9425 ac_cv_c_itkconfig=`(cd $i; pwd)`
9426 break
9427 fi
9428 done
9429 fi
9430
9431fi
9432
9433 if test x"${ac_cv_c_itkconfig}" = x ; then
9434 ITKCONFIG="# no Itk configs found"
9435 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9436 else
9437 no_itk=
9438 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9439 echo "$ac_t""found $ITKCONFIG" 1>&6
9440 fi
9441fi
9442
9443
9444 if test -z "${no_itcl}"; then
9445
9446 if test -f "$ITKCONFIG" ; then
9447 . $ITKCONFIG
9448 fi
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
3fc11d3e 9461 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9462 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9463 fi
9464
4226a5a5 9465 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9466 # Tcl/Tk 8.1 require -fwritable strings. I don't
9467 # know whether 8.2 will or not, but I bet it will.
9468 # I don't have to worry about 7.x since we don't support it.
9469 GDBTK_CFLAGS=""
9470 if test "$GCC" = "yes"; then
9471 if test "$TCL_VERSION" != "8.0" ; then
9472 GDBTK_CFLAGS="-fwritable-strings"
9473 fi
9474 fi
9475
9476 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9477 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9478 # Yes, the ordering seems wrong here. But it isn't.
9479 # TK_LIBS is the list of libraries that need to be linked
9480 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9481 # were in LIBS then any link tests after this point would
9482 # try to include things like `$(LIBGUI)', which wouldn't work.
9483 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9484
9485 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9486 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9487 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9488 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9489 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9490 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9491 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9492 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9493
9494 if test x$gdb_cv_os_cygwin = xyes; then
9495 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9496 WIN32LDAPP="-Wl,--subsystem,console"
9497 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9498 fi
9499 fi
9500 fi
ffc6a242
KS
9501
9502 SUBDIRS="${SUBDIRS} gdbtk"
9503 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9504fi
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
dd2504ab 9518
c906108c
SS
9519# If we find X, set shell vars x_includes and x_libraries to the
9520# paths, otherwise set no_x=yes.
9521# Uses ac_ vars as temps to allow command line to override cache and checks.
9522# --without-x overrides everything else, but does not touch the cache.
9523echo $ac_n "checking for X""... $ac_c" 1>&6
f5dbc56d 9524echo "configure:9525: checking for X" >&5
c906108c
SS
9525
9526# Check whether --with-x or --without-x was given.
9527if test "${with_x+set}" = set; then
9528 withval="$with_x"
9529 :
9530fi
9531
9532# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9533if test "x$with_x" = xno; then
9534 # The user explicitly disabled X.
9535 have_x=disabled
9536else
9537 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9538 # Both variables are already set.
9539 have_x=yes
9540 else
9541if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9542 echo $ac_n "(cached) $ac_c" 1>&6
9543else
9544 # One or both of the vars are not set, and there is no cached value.
9545ac_x_includes=NO ac_x_libraries=NO
9546rm -fr conftestdir
9547if mkdir conftestdir; then
9548 cd conftestdir
9549 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9550 cat > Imakefile <<'EOF'
9551acfindx:
9552 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9553EOF
9554 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9555 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9556 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9557 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9558 for ac_extension in a so sl; do
9559 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9560 test -f $ac_im_libdir/libX11.$ac_extension; then
9561 ac_im_usrlibdir=$ac_im_libdir; break
9562 fi
9563 done
9564 # Screen out bogus values from the imake configuration. They are
9565 # bogus both because they are the default anyway, and because
9566 # using them would break gcc on systems where it needs fixed includes.
9567 case "$ac_im_incroot" in
9568 /usr/include) ;;
9569 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9570 esac
9571 case "$ac_im_usrlibdir" in
9572 /usr/lib | /lib) ;;
9573 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9574 esac
9575 fi
9576 cd ..
9577 rm -fr conftestdir
9578fi
9579
9580if test "$ac_x_includes" = NO; then
9581 # Guess where to find include files, by looking for this one X11 .h file.
9582 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9583
9584 # First, try using that file with no special directory specified.
9585cat > conftest.$ac_ext <<EOF
f5dbc56d 9586#line 9587 "configure"
c906108c
SS
9587#include "confdefs.h"
9588#include <$x_direct_test_include>
9589EOF
9590ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
f5dbc56d 9591{ (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9592ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593if test -z "$ac_err"; then
9594 rm -rf conftest*
9595 # We can compile using X headers with no special include directory.
9596ac_x_includes=
9597else
9598 echo "$ac_err" >&5
9599 echo "configure: failed program was:" >&5
9600 cat conftest.$ac_ext >&5
9601 rm -rf conftest*
9602 # Look for the header file in a standard set of common directories.
9603# Check X11 before X11Rn because it is often a symlink to the current release.
9604 for ac_dir in \
9605 /usr/X11/include \
9606 /usr/X11R6/include \
9607 /usr/X11R5/include \
9608 /usr/X11R4/include \
9609 \
9610 /usr/include/X11 \
9611 /usr/include/X11R6 \
9612 /usr/include/X11R5 \
9613 /usr/include/X11R4 \
9614 \
9615 /usr/local/X11/include \
9616 /usr/local/X11R6/include \
9617 /usr/local/X11R5/include \
9618 /usr/local/X11R4/include \
9619 \
9620 /usr/local/include/X11 \
9621 /usr/local/include/X11R6 \
9622 /usr/local/include/X11R5 \
9623 /usr/local/include/X11R4 \
9624 \
9625 /usr/X386/include \
9626 /usr/x386/include \
9627 /usr/XFree86/include/X11 \
9628 \
9629 /usr/include \
9630 /usr/local/include \
9631 /usr/unsupported/include \
9632 /usr/athena/include \
9633 /usr/local/x11r5/include \
9634 /usr/lpp/Xamples/include \
9635 \
9636 /usr/openwin/include \
9637 /usr/openwin/share/include \
9638 ; \
9639 do
9640 if test -r "$ac_dir/$x_direct_test_include"; then
9641 ac_x_includes=$ac_dir
9642 break
9643 fi
9644 done
9645fi
9646rm -f conftest*
9647fi # $ac_x_includes = NO
9648
9649if test "$ac_x_libraries" = NO; then
9650 # Check for the libraries.
9651
9652 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9653 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9654
9655 # See if we find them without any special options.
9656 # Don't add to $LIBS permanently.
9657 ac_save_LIBS="$LIBS"
9658 LIBS="-l$x_direct_test_library $LIBS"
9659cat > conftest.$ac_ext <<EOF
f5dbc56d 9660#line 9661 "configure"
c906108c
SS
9661#include "confdefs.h"
9662
9663int main() {
9664${x_direct_test_function}()
9665; return 0; }
9666EOF
f5dbc56d 9667if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9668 rm -rf conftest*
9669 LIBS="$ac_save_LIBS"
9670# We can link X programs with no special library path.
9671ac_x_libraries=
9672else
9673 echo "configure: failed program was:" >&5
9674 cat conftest.$ac_ext >&5
9675 rm -rf conftest*
9676 LIBS="$ac_save_LIBS"
9677# First see if replacing the include by lib works.
9678# Check X11 before X11Rn because it is often a symlink to the current release.
9679for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9680 /usr/X11/lib \
9681 /usr/X11R6/lib \
9682 /usr/X11R5/lib \
9683 /usr/X11R4/lib \
9684 \
9685 /usr/lib/X11 \
9686 /usr/lib/X11R6 \
9687 /usr/lib/X11R5 \
9688 /usr/lib/X11R4 \
9689 \
9690 /usr/local/X11/lib \
9691 /usr/local/X11R6/lib \
9692 /usr/local/X11R5/lib \
9693 /usr/local/X11R4/lib \
9694 \
9695 /usr/local/lib/X11 \
9696 /usr/local/lib/X11R6 \
9697 /usr/local/lib/X11R5 \
9698 /usr/local/lib/X11R4 \
9699 \
9700 /usr/X386/lib \
9701 /usr/x386/lib \
9702 /usr/XFree86/lib/X11 \
9703 \
9704 /usr/lib \
9705 /usr/local/lib \
9706 /usr/unsupported/lib \
9707 /usr/athena/lib \
9708 /usr/local/x11r5/lib \
9709 /usr/lpp/Xamples/lib \
9710 /lib/usr/lib/X11 \
9711 \
9712 /usr/openwin/lib \
9713 /usr/openwin/share/lib \
9714 ; \
9715do
9716 for ac_extension in a so sl; do
9717 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9718 ac_x_libraries=$ac_dir
9719 break 2
9720 fi
9721 done
9722done
9723fi
9724rm -f conftest*
9725fi # $ac_x_libraries = NO
9726
9727if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9728 # Didn't find X anywhere. Cache the known absence of X.
9729 ac_cv_have_x="have_x=no"
9730else
9731 # Record where we found X for the cache.
9732 ac_cv_have_x="have_x=yes \
9733 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9734fi
9735fi
9736 fi
9737 eval "$ac_cv_have_x"
9738fi # $with_x != no
9739
9740if test "$have_x" != yes; then
9741 echo "$ac_t""$have_x" 1>&6
9742 no_x=yes
9743else
9744 # If each of the values was on the command line, it overrides each guess.
9745 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9746 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9747 # Update the cache value to reflect the command line values.
9748 ac_cv_have_x="have_x=yes \
9749 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9750 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9751fi
9752
9753
7a292a7a
SS
9754
9755# Unlike the sim directory, whether a simulator is linked is controlled by
9756# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9757# This code just checks for a few cases where we'd like to ignore those
9758# definitions, even when they're present in the '.mt' file. These cases
9759# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9760# not part of the source tree.
7a292a7a
SS
9761#
9762# Check whether --enable-sim or --disable-sim was given.
9763if test "${enable_sim+set}" = set; then
9764 enableval="$enable_sim"
9765 echo "enable_sim = $enable_sim";
9766 echo "enableval = ${enableval}";
9767 case "${enableval}" in
9768 yes) ignore_sim=false ;;
9769 no) ignore_sim=true ;;
9770 *) ignore_sim=false ;;
9771 esac
9772else
9773 ignore_sim=false
9774fi
9775
9776
9777if test ! -d "${srcdir}/../sim"; then
9778 ignore_sim=true
9779fi
9780
9781if test "${ignore_sim}" = "true"; then
9782 IGNORE_SIM="SIM="
9783 IGNORE_SIM_OBS="SIM_OBS="
9784else
9785 IGNORE_SIM=""
9786 IGNORE_SIM_OBS=""
9787 cat >> confdefs.h <<\EOF
9788#define WITH_SIM 1
9789EOF
9790
9791fi
9792
9793
9794
c906108c
SS
9795
9796
9797
9798
9799
9800
dfcd3bfb 9801
e56ac5c3
AC
9802
9803
b3a90332
AC
9804
9805
b46cd165 9806
c906108c
SS
9807# Begin stuff to support --enable-shared
9808# Check whether --enable-shared or --disable-shared was given.
9809if test "${enable_shared+set}" = set; then
9810 enableval="$enable_shared"
9811 case "${enableval}" in
9812 yes) shared=true ;;
9813 no) shared=false ;;
9814 *) shared=true ;;
9815esac
9816fi
9817
9818HLDFLAGS=
9819HLDENV=
9820# If we have shared libraries, try to set rpath reasonably.
9821if test "${shared}" = "true"; then
9822 case "${host}" in
9823 *-*-hpux*)
9824 HLDFLAGS='-Wl,+s,+b,$(libdir)'
9825 ;;
9826 *-*-irix5* | *-*-irix6*)
9827 HLDFLAGS='-Wl,-rpath,$(libdir)'
9828 ;;
9829 *-*-linux*aout*)
9830 ;;
88987551 9831 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
9832 HLDFLAGS='-Wl,-rpath,$(libdir)'
9833 ;;
9834 *-*-solaris*)
9835 HLDFLAGS='-R $(libdir)'
9836 ;;
9837 *-*-sysv4*)
9838 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;'
9839 ;;
9840 esac
9841fi
9842
9843# On SunOS, if the linker supports the -rpath option, use it to
9844# prevent ../bfd and ../opcodes from being included in the run time
9845# search path.
9846case "${host}" in
9847 *-*-sunos*)
9848 echo 'main () { }' > conftest.c
9849 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9850 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9851 :
9852 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9853 :
9854 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9855 :
9856 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9857 :
9858 elif test "${shared}" = "true"; then
9859 HLDFLAGS='-Wl,-rpath=$(libdir)'
9860 else
9861 HLDFLAGS='-Wl,-rpath='
9862 fi
9863 rm -f conftest.t conftest.c conftest
9864 ;;
9865esac
9866
9867
9868# End stuff to support --enable-shared
9869
9870# target_subdir is used by the testsuite to find the target libraries.
9871target_subdir=
9872if test "${host}" != "${target}"; then
9873 target_subdir="${target_alias}/"
9874fi
9875
9876
9877frags=
9878host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9879if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9880 # When building a native debuger the .mh file containing things
9881 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9882 # since it no longer contains anything useful.
9883 if test "${target}" = "${host}"; then
9884 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9885 else
9886 host_makefile_frag=/dev/null
9887 fi
c906108c
SS
9888fi
9889frags="$frags $host_makefile_frag"
9890
9891target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9892if test ! -f ${target_makefile_frag}; then
9893{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9894fi
9895frags="$frags $target_makefile_frag"
9896
9897
9898
9899
9900
9901hostfile=`sed -n '
9902s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9903' ${host_makefile_frag}`
9904
9905targetfile=`sed -n '
9906s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9907' ${target_makefile_frag}`
9908
6166d547
AC
9909GDB_MULTI_ARCH=`sed -n '
9910s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9911' ${target_makefile_frag}`
9912
c906108c 9913if test "${target}" = "${host}"; then
a85f51e7
DJ
9914# We pick this up from the host configuration file (.mh) because we
9915# do not have a native configuration Makefile fragment.
c906108c
SS
9916nativefile=`sed -n '
9917s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9918' ${host_makefile_frag}`
c906108c
SS
9919fi
9920
9921
6166d547
AC
9922# New targets should just set gdb_multi_arch=yes in configure.tgt.
9923# Old targets being converted can either do that or set GDB_MULTI_ARCH
9924# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9925# will be the default.
9926if test x"${GDB_MULTI_ARCH}" = x ; then
9927 case "${gdb_multi_arch}" in
9928 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9929 no ) GDB_MULTI_ARCH=0 ;;
9930 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9931 esac
9932fi
9933if test x"${GDB_MULTI_ARCH}" != x ; then
9934 cat >> confdefs.h <<EOF
9935#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9936EOF
9937
9938fi
6c5cfe5b 9939# Warn the user when they use an old practice
6166d547
AC
9940case "${GDB_MULTI_ARCH}" in
9941 "" ) ;;
9942 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9943 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9944 GDB_MULTI_ARCH_PURE )
9945 if test x"${targetfile}" != x ; then
6c5cfe5b 9946 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9947 targetfile=""
6166d547
AC
9948 fi ;;
9949 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9950esac
9951
96baa820
JM
9952if test "${enable_multi_ice}" = "yes"; then
9953 SUBDIRS="${SUBDIRS} multi-ice"
9954fi
9955
a85f51e7
DJ
9956# ``gdbserver'' can only be built in a native configuration.
9957if test x"${target}" = x"${host}"; then
9958 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
f5dbc56d 9959echo "configure:9960: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
9960 if test x"${build_gdbserver}" = xyes ; then
9961 configdirs="${configdirs} gdbserver"
9962 SUBDIRS="${SUBDIRS} gdbserver"
9963 echo "$ac_t""yes" 1>&6
9964 else
9965 echo "$ac_t""no" 1>&6
9966 fi
9967fi
9968
96baa820
JM
9969
9970
c906108c 9971# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9972# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9973# version.
c906108c
SS
9974
9975files=
9976links=
5a2402b8 9977
c906108c 9978rm -f xm.h
5a2402b8 9979xm_h=""
c906108c 9980if test "${hostfile}" != ""; then
5a2402b8
AC
9981 xm_h=xm.h
9982 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9983 files="${files} ${GDB_XM_FILE}"
9984 links="${links} xm.h"
9985 cat >> confdefs.h <<EOF
9986#define GDB_XM_FILE ${GDB_XM_FILE}
9987EOF
9988
c906108c 9989fi
5a2402b8
AC
9990
9991
c906108c 9992rm -f tm.h
5a2402b8 9993tm_h=""
c906108c 9994if test "${targetfile}" != ""; then
5a2402b8
AC
9995 tm_h=tm.h
9996 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9997 files="${files} ${GDB_TM_FILE}"
9998 links="${links} tm.h"
9999 cat >> confdefs.h <<EOF
10000#define GDB_TM_FILE ${GDB_TM_FILE}
10001EOF
10002
c906108c 10003fi
5a2402b8
AC
10004
10005
c906108c 10006rm -f nm.h
5a2402b8 10007nm_h=""
c906108c 10008if test "${nativefile}" != ""; then
5a2402b8
AC
10009 nm_h=nm.h
10010 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10011 files="${files} ${GDB_NM_FILE}"
10012 links="${links} nm.h"
10013 cat >> confdefs.h <<EOF
10014#define GDB_NM_FILE ${GDB_NM_FILE}
10015EOF
10016
c906108c 10017fi
5a2402b8
AC
10018
10019
c906108c
SS
10020
10021
10022echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
f5dbc56d 10023echo "configure:10024: checking for Cygwin environment" >&5
c906108c
SS
10024if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10025 echo $ac_n "(cached) $ac_c" 1>&6
10026else
10027 cat > conftest.$ac_ext <<EOF
f5dbc56d 10028#line 10029 "configure"
c906108c
SS
10029#include "confdefs.h"
10030
10031int main() {
10032
10033#ifndef __CYGWIN__
10034#define __CYGWIN__ __CYGWIN32__
10035#endif
10036return __CYGWIN__;
10037; return 0; }
10038EOF
f5dbc56d 10039if { (eval echo configure:10040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10040 rm -rf conftest*
10041 ac_cv_cygwin=yes
10042else
10043 echo "configure: failed program was:" >&5
10044 cat conftest.$ac_ext >&5
10045 rm -rf conftest*
10046 ac_cv_cygwin=no
10047fi
10048rm -f conftest*
10049rm -f conftest*
10050fi
10051
10052echo "$ac_t""$ac_cv_cygwin" 1>&6
10053CYGWIN=
10054test "$ac_cv_cygwin" = yes && CYGWIN=yes
10055echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
f5dbc56d 10056echo "configure:10057: checking for mingw32 environment" >&5
c906108c
SS
10057if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10058 echo $ac_n "(cached) $ac_c" 1>&6
10059else
10060 cat > conftest.$ac_ext <<EOF
f5dbc56d 10061#line 10062 "configure"
c906108c
SS
10062#include "confdefs.h"
10063
10064int main() {
10065return __MINGW32__;
10066; return 0; }
10067EOF
f5dbc56d 10068if { (eval echo configure:10069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10069 rm -rf conftest*
10070 ac_cv_mingw32=yes
10071else
10072 echo "configure: failed program was:" >&5
10073 cat conftest.$ac_ext >&5
10074 rm -rf conftest*
10075 ac_cv_mingw32=no
10076fi
10077rm -f conftest*
10078rm -f conftest*
10079fi
10080
10081echo "$ac_t""$ac_cv_mingw32" 1>&6
10082MINGW32=
10083test "$ac_cv_mingw32" = yes && MINGW32=yes
10084
10085
10086echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
f5dbc56d 10087echo "configure:10088: checking for executable suffix" >&5
c906108c
SS
10088if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10089 echo $ac_n "(cached) $ac_c" 1>&6
10090else
10091 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10092 ac_cv_exeext=.exe
10093else
10094 rm -f conftest*
10095 echo 'int main () { return 0; }' > conftest.$ac_ext
10096 ac_cv_exeext=
f5dbc56d 10097 if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10098 for file in conftest.*; do
10099 case $file in
9608ab8b 10100 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10101 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10102 esac
10103 done
10104 else
10105 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10106 fi
10107 rm -f conftest*
10108 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10109fi
10110fi
10111
10112EXEEXT=""
10113test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10114echo "$ac_t""${ac_cv_exeext}" 1>&6
10115ac_exeext=$EXEEXT
10116
10117
234b45d4
KB
10118
10119cat >> confdefs.h <<\EOF
10120#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10121EOF
10122
10123
10124
10125
10126 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10127if test "${with_libiconv_prefix+set}" = set; then
10128 withval="$with_libiconv_prefix"
10129
10130 for dir in `echo "$withval" | tr : ' '`; do
10131 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10132 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10133 done
10134
10135fi
10136
10137
10138 echo $ac_n "checking for iconv""... $ac_c" 1>&6
f5dbc56d 10139echo "configure:10140: checking for iconv" >&5
234b45d4
KB
10140if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10141 echo $ac_n "(cached) $ac_c" 1>&6
10142else
10143
10144 am_cv_func_iconv="no, consider installing GNU libiconv"
10145 am_cv_lib_iconv=no
10146 cat > conftest.$ac_ext <<EOF
f5dbc56d 10147#line 10148 "configure"
234b45d4
KB
10148#include "confdefs.h"
10149#include <stdlib.h>
10150#include <iconv.h>
10151int main() {
10152iconv_t cd = iconv_open("","");
10153 iconv(cd,NULL,NULL,NULL,NULL);
10154 iconv_close(cd);
10155; return 0; }
10156EOF
f5dbc56d 10157if { (eval echo configure:10158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10158 rm -rf conftest*
10159 am_cv_func_iconv=yes
10160else
10161 echo "configure: failed program was:" >&5
10162 cat conftest.$ac_ext >&5
10163fi
10164rm -f conftest*
10165 if test "$am_cv_func_iconv" != yes; then
10166 am_save_LIBS="$LIBS"
10167 LIBS="$LIBS -liconv"
10168 cat > conftest.$ac_ext <<EOF
f5dbc56d 10169#line 10170 "configure"
234b45d4
KB
10170#include "confdefs.h"
10171#include <stdlib.h>
10172#include <iconv.h>
10173int main() {
10174iconv_t cd = iconv_open("","");
10175 iconv(cd,NULL,NULL,NULL,NULL);
10176 iconv_close(cd);
10177; return 0; }
10178EOF
f5dbc56d 10179if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10180 rm -rf conftest*
10181 am_cv_lib_iconv=yes
10182 am_cv_func_iconv=yes
10183else
10184 echo "configure: failed program was:" >&5
10185 cat conftest.$ac_ext >&5
10186fi
10187rm -f conftest*
10188 LIBS="$am_save_LIBS"
10189 fi
10190
10191fi
10192
10193echo "$ac_t""$am_cv_func_iconv" 1>&6
10194 if test "$am_cv_func_iconv" = yes; then
10195 cat >> confdefs.h <<\EOF
10196#define HAVE_ICONV 1
10197EOF
10198
10199 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
f5dbc56d 10200echo "configure:10201: checking for iconv declaration" >&5
234b45d4
KB
10201 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10202 echo $ac_n "(cached) $ac_c" 1>&6
10203else
10204
10205 cat > conftest.$ac_ext <<EOF
f5dbc56d 10206#line 10207 "configure"
234b45d4
KB
10207#include "confdefs.h"
10208
10209#include <stdlib.h>
10210#include <iconv.h>
10211extern
10212#ifdef __cplusplus
10213"C"
10214#endif
10215#if defined(__STDC__) || defined(__cplusplus)
10216size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10217#else
10218size_t iconv();
10219#endif
10220
10221int main() {
10222
10223; return 0; }
10224EOF
f5dbc56d 10225if { (eval echo configure:10226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10226 rm -rf conftest*
10227 am_cv_proto_iconv_arg1=""
10228else
10229 echo "configure: failed program was:" >&5
10230 cat conftest.$ac_ext >&5
10231 rm -rf conftest*
10232 am_cv_proto_iconv_arg1="const"
10233fi
10234rm -f conftest*
10235 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);"
10236fi
10237
10238 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10239 echo "$ac_t""${ac_t:-
10240 }$am_cv_proto_iconv" 1>&6
10241 cat >> confdefs.h <<EOF
10242#define ICONV_CONST $am_cv_proto_iconv_arg1
10243EOF
10244
10245 fi
10246 LIBICONV=
10247 if test "$am_cv_lib_iconv" = yes; then
10248 LIBICONV="-liconv"
10249 fi
10250
10251
10252
c906108c
SS
10253subdirs="$configdirs"
10254
10255trap '' 1 2 15
10256cat > confcache <<\EOF
10257# This file is a shell script that caches the results of configure
10258# tests run on this system so they can be shared between configure
10259# scripts and configure runs. It is not useful on other systems.
10260# If it contains results you don't want to keep, you may remove or edit it.
10261#
10262# By default, configure uses ./config.cache as the cache file,
10263# creating it if it does not exist already. You can give configure
10264# the --cache-file=FILE option to use a different cache file; that is
10265# what configure does when it calls configure scripts in
10266# subdirectories, so they share the cache.
10267# Giving --cache-file=/dev/null disables caching, for debugging configure.
10268# config.status only pays attention to the cache file if you give it the
10269# --recheck option to rerun configure.
10270#
10271EOF
10272# The following way of writing the cache mishandles newlines in values,
10273# but we know of no workaround that is simple, portable, and efficient.
10274# So, don't put newlines in cache variables' values.
10275# Ultrix sh set writes to stderr and can't be redirected directly,
10276# and sets the high bit in the cache file unless we assign to the vars.
10277(set) 2>&1 |
10278 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10279 *ac_space=\ *)
10280 # `set' does not quote correctly, so add quotes (double-quote substitution
10281 # turns \\\\ into \\, and sed turns \\ into \).
10282 sed -n \
10283 -e "s/'/'\\\\''/g" \
10284 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10285 ;;
10286 *)
10287 # `set' quotes correctly as required by POSIX, so do not add quotes.
10288 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10289 ;;
10290 esac >> confcache
10291if cmp -s $cache_file confcache; then
10292 :
10293else
10294 if test -w $cache_file; then
10295 echo "updating cache $cache_file"
10296 cat confcache > $cache_file
10297 else
10298 echo "not updating unwritable cache $cache_file"
10299 fi
10300fi
10301rm -f confcache
10302
10303trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10304
10305test "x$prefix" = xNONE && prefix=$ac_default_prefix
10306# Let make expand exec_prefix.
10307test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10308
10309# Any assignment to VPATH causes Sun make to only execute
10310# the first set of double-colon rules, so remove it if not needed.
10311# If there is a colon in the path, we need to keep it.
10312if test "x$srcdir" = x.; then
10313 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10314fi
10315
10316trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10317
10318DEFS=-DHAVE_CONFIG_H
10319
10320# Without the "./", some shells look in PATH for config.status.
10321: ${CONFIG_STATUS=./config.status}
10322
10323echo creating $CONFIG_STATUS
10324rm -f $CONFIG_STATUS
10325cat > $CONFIG_STATUS <<EOF
10326#! /bin/sh
10327# Generated automatically by configure.
10328# Run this file to recreate the current configuration.
10329# This directory was configured as follows,
10330# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10331#
10332# $0 $ac_configure_args
10333#
10334# Compiler output produced by configure, useful for debugging
10335# configure, is in ./config.log if it exists.
10336
10337ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10338for ac_option
10339do
10340 case "\$ac_option" in
10341 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10342 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10343 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10344 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10345 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10346 exit 0 ;;
10347 -help | --help | --hel | --he | --h)
10348 echo "\$ac_cs_usage"; exit 0 ;;
10349 *) echo "\$ac_cs_usage"; exit 1 ;;
10350 esac
10351done
10352
10353ac_given_srcdir=$srcdir
10354ac_given_INSTALL="$INSTALL"
10355
ed952ac5 10356trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10357EOF
10358cat >> $CONFIG_STATUS <<EOF
10359
10360# Protect against being on the right side of a sed subst in config.status.
10361sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10362 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10363$ac_vpsub
10364$extrasub
10365s%@SHELL@%$SHELL%g
10366s%@CFLAGS@%$CFLAGS%g
10367s%@CPPFLAGS@%$CPPFLAGS%g
10368s%@CXXFLAGS@%$CXXFLAGS%g
10369s%@FFLAGS@%$FFLAGS%g
10370s%@DEFS@%$DEFS%g
10371s%@LDFLAGS@%$LDFLAGS%g
10372s%@LIBS@%$LIBS%g
10373s%@exec_prefix@%$exec_prefix%g
10374s%@prefix@%$prefix%g
10375s%@program_transform_name@%$program_transform_name%g
10376s%@bindir@%$bindir%g
10377s%@sbindir@%$sbindir%g
10378s%@libexecdir@%$libexecdir%g
10379s%@datadir@%$datadir%g
10380s%@sysconfdir@%$sysconfdir%g
10381s%@sharedstatedir@%$sharedstatedir%g
10382s%@localstatedir@%$localstatedir%g
10383s%@libdir@%$libdir%g
10384s%@includedir@%$includedir%g
10385s%@oldincludedir@%$oldincludedir%g
10386s%@infodir@%$infodir%g
10387s%@mandir@%$mandir%g
413ccac7
AC
10388s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10389s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10390s%@MAINT@%$MAINT%g
c906108c
SS
10391s%@CC@%$CC%g
10392s%@CPP@%$CPP%g
10393s%@host@%$host%g
10394s%@host_alias@%$host_alias%g
10395s%@host_cpu@%$host_cpu%g
10396s%@host_vendor@%$host_vendor%g
10397s%@host_os@%$host_os%g
10398s%@target@%$target%g
10399s%@target_alias@%$target_alias%g
10400s%@target_cpu@%$target_cpu%g
10401s%@target_vendor@%$target_vendor%g
10402s%@target_os@%$target_os%g
10403s%@build@%$build%g
10404s%@build_alias@%$build_alias%g
10405s%@build_cpu@%$build_cpu%g
10406s%@build_vendor@%$build_vendor%g
10407s%@build_os@%$build_os%g
c906108c 10408s%@RANLIB@%$RANLIB%g
8bb2c122 10409s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10410s%@ALLOCA@%$ALLOCA%g
10411s%@USE_NLS@%$USE_NLS%g
10412s%@MSGFMT@%$MSGFMT%g
10413s%@GMSGFMT@%$GMSGFMT%g
10414s%@XGETTEXT@%$XGETTEXT%g
10415s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10416s%@CATALOGS@%$CATALOGS%g
10417s%@CATOBJEXT@%$CATOBJEXT%g
10418s%@DATADIRNAME@%$DATADIRNAME%g
10419s%@GMOFILES@%$GMOFILES%g
10420s%@INSTOBJEXT@%$INSTOBJEXT%g
10421s%@INTLDEPS@%$INTLDEPS%g
10422s%@INTLLIBS@%$INTLLIBS%g
10423s%@INTLOBJS@%$INTLOBJS%g
10424s%@POFILES@%$POFILES%g
10425s%@POSUB@%$POSUB%g
10426s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10427s%@GT_NO@%$GT_NO%g
10428s%@GT_YES@%$GT_YES%g
10429s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10430s%@l@%$l%g
7a292a7a 10431s%@AWK@%$AWK%g
c906108c
SS
10432s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10433s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10434s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10435s%@LN_S@%$LN_S%g
10436s%@YACC@%$YACC%g
c906108c 10437s%@AR@%$AR%g
95ca63c4
CF
10438s%@DLLTOOL@%$DLLTOOL%g
10439s%@WINDRES@%$WINDRES%g
75c6e08a 10440s%@MIG@%$MIG%g
c906108c 10441s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 10442s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10443s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10444s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10445s%@MMALLOC@%$MMALLOC%g
aff38e61 10446s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10447s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10448s%@LIBGUI@%$LIBGUI%g
10449s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10450s%@WIN32LDAPP@%$WIN32LDAPP%g
10451s%@TCL_VERSION@%$TCL_VERSION%g
10452s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10453s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10454s%@TCL_CC@%$TCL_CC%g
10455s%@TCL_DEFS@%$TCL_DEFS%g
10456s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10457s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10458s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10459s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10460s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10461s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10462s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10463s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10464s%@TCL_RANLIB@%$TCL_RANLIB%g
10465s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10466s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10467s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10468s%@TK_VERSION@%$TK_VERSION%g
10469s%@TK_DEFS@%$TK_DEFS%g
10470s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10471s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10472s%@TK_XLIBSW@%$TK_XLIBSW%g
10473s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10474s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10475s%@TCLHDIR@%$TCLHDIR%g
10476s%@TKHDIR@%$TKHDIR%g
10477s%@ITCLHDIR@%$ITCLHDIR%g
10478s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10479s%@ITCL_VERSION@%$ITCL_VERSION%g
10480s%@ITCL_DEFS@%$ITCL_DEFS%g
10481s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10482s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10483s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10484s%@ITK_VERSION@%$ITK_VERSION%g
10485s%@ITK_DEFS@%$ITK_DEFS%g
10486s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10487s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10488s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10489s%@X_CFLAGS@%$X_CFLAGS%g
10490s%@X_LDFLAGS@%$X_LDFLAGS%g
10491s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10492s%@TCL_DEPS@%$TCL_DEPS%g
10493s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10494s%@ITCLLIB@%$ITCLLIB%g
10495s%@ITCL_DEPS@%$ITCL_DEPS%g
10496s%@ITKLIB@%$ITKLIB%g
10497s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10498s%@GDBTKLIBS@%$GDBTKLIBS%g
10499s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10500s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10501s%@IGNORE_SIM@%$IGNORE_SIM%g
10502s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10503s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10504s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10505s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10506s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10507s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10508s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10509s%@CONFIG_ALL@%$CONFIG_ALL%g
10510s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10511s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10512s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10513s%@HLDFLAGS@%$HLDFLAGS%g
10514s%@HLDENV@%$HLDENV%g
10515s%@target_subdir@%$target_subdir%g
10516/@host_makefile_frag@/r $host_makefile_frag
10517s%@host_makefile_frag@%%g
10518/@target_makefile_frag@/r $target_makefile_frag
10519s%@target_makefile_frag@%%g
10520s%@frags@%$frags%g
96baa820 10521s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
10522s%@xm_h@%$xm_h%g
10523s%@tm_h@%$tm_h%g
10524s%@nm_h@%$nm_h%g
c906108c 10525s%@EXEEXT@%$EXEEXT%g
234b45d4 10526s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10527s%@subdirs@%$subdirs%g
10528
10529CEOF
10530EOF
10531
10532cat >> $CONFIG_STATUS <<\EOF
10533
10534# Split the substitutions into bite-sized pieces for seds with
10535# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10536ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10537ac_file=1 # Number of current file.
10538ac_beg=1 # First line for current file.
10539ac_end=$ac_max_sed_cmds # Line after last line for current file.
10540ac_more_lines=:
10541ac_sed_cmds=""
10542while $ac_more_lines; do
10543 if test $ac_beg -gt 1; then
10544 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10545 else
10546 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10547 fi
10548 if test ! -s conftest.s$ac_file; then
10549 ac_more_lines=false
10550 rm -f conftest.s$ac_file
10551 else
10552 if test -z "$ac_sed_cmds"; then
10553 ac_sed_cmds="sed -f conftest.s$ac_file"
10554 else
10555 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10556 fi
10557 ac_file=`expr $ac_file + 1`
10558 ac_beg=$ac_end
10559 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10560 fi
10561done
10562if test -z "$ac_sed_cmds"; then
10563 ac_sed_cmds=cat
10564fi
10565EOF
10566
10567cat >> $CONFIG_STATUS <<EOF
10568
ed952ac5 10569CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10570EOF
10571cat >> $CONFIG_STATUS <<\EOF
10572for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10573 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10574 case "$ac_file" in
10575 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10576 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10577 *) ac_file_in="${ac_file}.in" ;;
10578 esac
10579
10580 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10581
10582 # Remove last slash and all that follows it. Not all systems have dirname.
10583 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10584 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10585 # The file is in a subdirectory.
10586 test ! -d "$ac_dir" && mkdir "$ac_dir"
10587 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10588 # A "../" for each directory in $ac_dir_suffix.
10589 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10590 else
10591 ac_dir_suffix= ac_dots=
10592 fi
10593
10594 case "$ac_given_srcdir" in
10595 .) srcdir=.
10596 if test -z "$ac_dots"; then top_srcdir=.
10597 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10598 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10599 *) # Relative path.
10600 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10601 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10602 esac
10603
10604 case "$ac_given_INSTALL" in
10605 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10606 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10607 esac
10608
10609 echo creating "$ac_file"
10610 rm -f "$ac_file"
10611 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10612 case "$ac_file" in
10613 *Makefile*) ac_comsub="1i\\
10614# $configure_input" ;;
10615 *) ac_comsub= ;;
10616 esac
10617
10618 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10619 sed -e "$ac_comsub
10620s%@configure_input@%$configure_input%g
10621s%@srcdir@%$srcdir%g
10622s%@top_srcdir@%$top_srcdir%g
10623s%@INSTALL@%$INSTALL%g
10624" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10625fi; done
10626rm -f conftest.s*
10627
10628# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10629# NAME is the cpp macro being defined and VALUE is the value it is being given.
10630#
10631# ac_d sets the value in "#define NAME VALUE" lines.
10632ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10633ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10634ac_dC='\3'
10635ac_dD='%g'
10636# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10637ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10638ac_uB='\([ ]\)%\1#\2define\3'
10639ac_uC=' '
10640ac_uD='\4%g'
10641# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10642ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10643ac_eB='$%\1#\2define\3'
10644ac_eC=' '
10645ac_eD='%g'
10646
10647if test "${CONFIG_HEADERS+set}" != set; then
10648EOF
10649cat >> $CONFIG_STATUS <<EOF
10650 CONFIG_HEADERS="config.h:config.in"
10651EOF
10652cat >> $CONFIG_STATUS <<\EOF
10653fi
10654for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10655 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10656 case "$ac_file" in
10657 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10658 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10659 *) ac_file_in="${ac_file}.in" ;;
10660 esac
10661
10662 echo creating $ac_file
10663
10664 rm -f conftest.frag conftest.in conftest.out
10665 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10666 cat $ac_file_inputs > conftest.in
10667
10668EOF
10669
10670# Transform confdefs.h into a sed script conftest.vals that substitutes
10671# the proper values into config.h.in to produce config.h. And first:
10672# Protect against being on the right side of a sed subst in config.status.
10673# Protect against being in an unquoted here document in config.status.
10674rm -f conftest.vals
10675cat > conftest.hdr <<\EOF
10676s/[\\&%]/\\&/g
10677s%[\\$`]%\\&%g
10678s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10679s%ac_d%ac_u%gp
10680s%ac_u%ac_e%gp
10681EOF
10682sed -n -f conftest.hdr confdefs.h > conftest.vals
10683rm -f conftest.hdr
10684
10685# This sed command replaces #undef with comments. This is necessary, for
10686# example, in the case of _POSIX_SOURCE, which is predefined and required
10687# on some systems where configure will not decide to define it.
10688cat >> conftest.vals <<\EOF
10689s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10690EOF
10691
10692# Break up conftest.vals because some shells have a limit on
10693# the size of here documents, and old seds have small limits too.
10694
10695rm -f conftest.tail
10696while :
10697do
10698 ac_lines=`grep -c . conftest.vals`
10699 # grep -c gives empty output for an empty file on some AIX systems.
10700 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10701 # Write a limited-size here document to conftest.frag.
10702 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10703 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10704 echo 'CEOF
10705 sed -f conftest.frag conftest.in > conftest.out
10706 rm -f conftest.in
10707 mv conftest.out conftest.in
10708' >> $CONFIG_STATUS
10709 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10710 rm -f conftest.vals
10711 mv conftest.tail conftest.vals
10712done
10713rm -f conftest.vals
10714
10715cat >> $CONFIG_STATUS <<\EOF
10716 rm -f conftest.frag conftest.h
10717 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10718 cat conftest.in >> conftest.h
10719 rm -f conftest.in
10720 if cmp -s $ac_file conftest.h 2>/dev/null; then
10721 echo "$ac_file is unchanged"
10722 rm -f conftest.h
10723 else
10724 # Remove last slash and all that follows it. Not all systems have dirname.
10725 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10726 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10727 # The file is in a subdirectory.
10728 test ! -d "$ac_dir" && mkdir "$ac_dir"
10729 fi
10730 rm -f $ac_file
10731 mv conftest.h $ac_file
10732 fi
10733fi; done
10734
10735EOF
10736
10737cat >> $CONFIG_STATUS <<EOF
10738ac_sources="$files"
10739ac_dests="$links"
10740EOF
10741
10742cat >> $CONFIG_STATUS <<\EOF
10743srcdir=$ac_given_srcdir
10744while test -n "$ac_sources"; do
10745 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10746 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10747
10748 echo "linking $srcdir/$ac_source to $ac_dest"
10749
10750 if test ! -r $srcdir/$ac_source; then
10751 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10752 fi
10753 rm -f $ac_dest
10754
10755 # Make relative symlinks.
10756 # Remove last slash and all that follows it. Not all systems have dirname.
10757 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10758 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10759 # The dest file is in a subdirectory.
10760 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10761 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10762 # A "../" for each directory in $ac_dest_dir_suffix.
10763 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10764 else
10765 ac_dest_dir_suffix= ac_dots=
10766 fi
10767
10768 case "$srcdir" in
10769 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10770 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10771 esac
10772
10773 # Make a symlink if possible; otherwise try a hard link.
10774 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10775 ln $srcdir/$ac_source $ac_dest; then :
10776 else
10777 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10778 fi
10779done
10780EOF
10781cat >> $CONFIG_STATUS <<EOF
10782
10783gdb_host_cpu=$gdb_host_cpu
10784gdb_target_cpu=$gdb_target_cpu
10785nativefile=$nativefile
10786
10787EOF
10788cat >> $CONFIG_STATUS <<\EOF
10789
10790if test "${nativefile}" = ""; then
c4620205 10791 < Makefile \
e27da16d
JT
10792 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10793 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10794 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10795 > Makefile.tem
c906108c
SS
10796mv -f Makefile.tem Makefile
10797fi
10798
10799sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10800/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10801/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10802mv -f Makefile.tmp Makefile
10803
2acceee2 10804
c906108c
SS
10805case x$CONFIG_HEADERS in
10806xconfig.h:config.in)
10807echo > stamp-h ;;
10808esac
10809
10810exit 0
10811EOF
10812chmod +x $CONFIG_STATUS
10813rm -fr confdefs* $ac_clean_files
10814test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10815
10816if test "$no_recursion" != yes; then
10817
10818 # Remove --cache-file and --srcdir arguments so they do not pile up.
10819 ac_sub_configure_args=
10820 ac_prev=
10821 for ac_arg in $ac_configure_args; do
10822 if test -n "$ac_prev"; then
10823 ac_prev=
10824 continue
10825 fi
10826 case "$ac_arg" in
10827 -cache-file | --cache-file | --cache-fil | --cache-fi \
10828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10829 ac_prev=cache_file ;;
10830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10832 ;;
10833 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10834 ac_prev=srcdir ;;
10835 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10836 ;;
10837 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10838 esac
10839 done
10840
10841 for ac_config_dir in $configdirs; do
10842
10843 # Do not complain, so a configure script can configure whichever
10844 # parts of a large source tree are present.
10845 if test ! -d $srcdir/$ac_config_dir; then
10846 continue
10847 fi
10848
10849 echo configuring in $ac_config_dir
10850
10851 case "$srcdir" in
10852 .) ;;
10853 *)
10854 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10855 else
10856 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10857 fi
10858 ;;
10859 esac
10860
10861 ac_popdir=`pwd`
10862 cd $ac_config_dir
10863
10864 # A "../" for each directory in /$ac_config_dir.
10865 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10866
10867 case "$srcdir" in
10868 .) # No --srcdir option. We are building in place.
10869 ac_sub_srcdir=$srcdir ;;
10870 /*) # Absolute path.
10871 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10872 *) # Relative path.
10873 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10874 esac
10875
10876 # Check for guested configure; otherwise get Cygnus style configure.
10877 if test -f $ac_sub_srcdir/configure; then
10878 ac_sub_configure=$ac_sub_srcdir/configure
10879 elif test -f $ac_sub_srcdir/configure.in; then
10880 ac_sub_configure=$ac_configure
10881 else
10882 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10883 ac_sub_configure=
10884 fi
10885
10886 # The recursion is here.
10887 if test -n "$ac_sub_configure"; then
10888
10889 # Make the cache file name correct relative to the subdirectory.
10890 case "$cache_file" in
10891 /*) ac_sub_cache_file=$cache_file ;;
10892 *) # Relative path.
10893 ac_sub_cache_file="$ac_dots$cache_file" ;;
10894 esac
10895 case "$ac_given_INSTALL" in
10896 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10897 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10898 esac
10899
10900 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10901 # The eval makes quoting arguments work.
10902 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10903 then :
10904 else
10905 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10906 fi
10907 fi
10908
10909 cd $ac_popdir
10910 done
10911fi
10912
10913
10914exit 0
This page took 0.849296 seconds and 4 git commands to generate.