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